@flarehr/superhero-account-registry 2.50.68 → 2.52.70

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 Xt(e){return Array.isArray(e)||ArrayBuffer.isView(e)}function dh(e){return e!=null&&typeof e.GetEnumerator=="function"}function fh(e){return e!=null&&typeof e.CompareTo=="function"}function hh(e){return e!=null&&typeof e.Equals=="function"}function Ka(e){return e!=null&&typeof e.GetHashCode=="function"}function Gs(e){return e!=null&&typeof e.Dispose=="function"}function we(e){Gs(e)&&e.Dispose()}function he(){return null}function Fo(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 ph{constructor(t){this.iter=t,this.current=he()}"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 Re(e){return dh(e)?e.GetEnumerator():new ph(e[Symbol.iterator]())}function qr(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 mh{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 $h(e,t,n){return e.toString(10).padStart(t,"0").padEnd(n,"0")}function Za(e){const t=e;return typeof t.offset=="number"?t.offset:e.kind===1?0:e.getTimezoneOffset()*-6e4}function gh(e,t){return e=e,e.toString(t)}function zn(e,t){return e=e,e.toString(t)}class an{static id(t){return an.idMap.has(t)||an.idMap.set(t,++an.count),an.idMap.get(t)}}an.idMap=new WeakMap,an.count=0;function $r(e){let t=0,n=5381;const r=e.length;for(;t<r;)n=n*33^e.charCodeAt(t++);return n}function Lt(e){return e*2654435761|0}function Ja(e){return $r(e.toString(32))}function Kr(e){let t=0;const n=e.length;for(let r=0;r<n;r++){const o=e[r];t=(t<<5)+t^o}return t}function wh(e){if(e==null)return 0;switch(typeof e){case"boolean":return e?1:0;case"number":return Lt(e);case"bigint":return Ja(e);case"string":return $r(e);default:return Lt(an.id(e))}}function _h(e){return Ka(e)?e.GetHashCode():wh(e)}function bh(e){return e.getTime()}function yh(e){const t=e.length,n=new Array(t);for(let r=0;r<t;r++)n[r]=ln(e[r]);return Kr(n)}function ln(e){var t;if(e==null)return 0;switch(typeof e){case"boolean":return e?1:0;case"number":return Lt(e);case"bigint":return Ja(e);case"string":return $r(e);default:{if(Ka(e))return e.GetHashCode();if(Xt(e))return yh(e);if(e instanceof Date)return bh(e);if(((t=Object.getPrototypeOf(e))==null?void 0:t.constructor)===Object){const n=Object.values(e).map(r=>ln(r));return Kr(n)}else return Lt(an.id(e))}}}function vh(e){return _h(e)}function qs(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 Ya(e,t){return qs(e,t,He)}function xh(e,t){const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;n.sort(),r.sort();for(let o=0;o<n.length;o++)if(n[o]!==r[o]||!He(e[n[o]],t[r[o]]))return!1;return!0}function He(e,t){var n;return e===t?!0:e==null?t==null:t==null?!1:hh(e)?e.Equals(t):Xt(e)?Xt(t)&&Ya(e,t):typeof e!="object"?!1:e instanceof Date?t instanceof Date&&Xa(e,t)===0:((n=Object.getPrototypeOf(e))==null?void 0:n.constructor)===Object&&xh(e,t)}function Xa(e,t){let n,r;return"offset"in e&&"offset"in t?(n=e.getTime(),r=t.getTime()):(n=e.getTime()+Za(e),r=t.getTime()+Za(t)),n===r?0:n<r?-1:1}function Zr(e,t){return e===t?0:e<t?-1:1}function Ch(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,o=0;r<e.length;r++)if(o=n(e[r],t[r]),o!==0)return o;return 0}function Qa(e,t){return Ch(e,t,Ft)}function Sh(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 o=0,s=0;o<n.length;o++){const i=n[o];if(i!==r[o])return i<r[o]?-1:1;if(s=Ft(e[i],t[i]),s!==0)return s}return 0}function Ft(e,t){var n;return e===t?0:e==null?t==null?0:-1:t==null?1:fh(e)?e.CompareTo(t):Xt(e)?Xt(t)?Qa(e,t):-1:typeof e!="object"?e<t?-1:1:e instanceof Date?t instanceof Date?Xa(e,t):-1:((n=Object.getPrototypeOf(e))==null?void 0:n.constructor)===Object?Sh(e,t):-1}function O(e){const t={};for(const n of e)t[n[0]]=n[1];return t}function kh(e){Xt(e)?e.splice(0):e.clear()}const Vo=new WeakMap;function _e(e){if(e==null)return null;const t=(n,r)=>e(n)(r);return Vo.set(t,e),t}function kn(e){return Vo.get(e)??(t=>n=>e(t,n))}function Ks(e){if(e==null)return null;const t=(n,r,o)=>e(n)(r)(o);return Vo.set(t,e),t}function Zs(e){return Vo.get(e)??(t=>n=>r=>e(t,n,r))}function Ah(e){let t=0,n="[";for(const r of e){if(t===0)n+=dt(r);else if(t===100){n+="; ...";break}else n+="; "+dt(r);t++}return n+"]"}function dt(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 Ah(e);{const r=(n=Object.getPrototypeOf(e))==null?void 0:n.constructor;return r===Object&&t<10?"{ "+Object.entries(e).map(([o,s])=>o+" = "+dt(s,t+1)).join(`
2
- `)+" }":(r==null?void 0:r.name)??""}}return String(e)}function Eh(e,t){if(t.length===0)return e;{let n,r=!0;return t.length===1?(n=dt(t[0]),r=n.indexOf(" ")>=0):n=t.map(o=>dt(o)).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 Eh(this.name,this.fields)}GetHashCode(){const t=this.fields.map(n=>ln(n));return t.splice(0,0,Lt(this.tag)),Kr(t)}Equals(t){return this===t?!0:Fo(this,t)&&this.tag===t.tag?Ya(this.fields,t.fields):!1}CompareTo(t){return this===t?0:Fo(this,t)?this.tag===t.tag?Qa(this.fields,t.fields):this.tag<t.tag?-1:1:-1}}function Ih(e){const t={},n=Object.keys(e);for(let r=0;r<n.length;r++)t[n[r]]=e[n[r]];return t}function Th(e){return"{ "+Object.entries(e).map(([t,n])=>t+" = "+dt(n)).join(`
3
- `)+" }"}function Nh(e){const t=Object.values(e).map(n=>ln(n));return Kr(t)}function Mh(e,t){if(e===t)return!0;if(Fo(e,t)){const n=Object.keys(e);for(let r=0;r<n.length;r++)if(!He(e[n[r]],t[n[r]]))return!1;return!0}else return!1}function Rh(e,t){if(e===t)return 0;if(Fo(e,t)){const n=Object.keys(e);for(let r=0;r<n.length;r++){const o=Ft(e[n[r]],t[n[r]]);if(o!==0)return o}return 0}else return-1}class ie{toJSON(){return Ih(this)}toString(){return Th(this)}GetHashCode(){return Nh(this)}Equals(t){return Mh(this,t)}CompareTo(t){return Rh(this,t)}}class ft{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 Ph{constructor(t){this.message=t}}function Oh(e){return e instanceof Ph||e instanceof Error}function Dh(e){return e instanceof Promise}function Lo(e){return Oh(e)||Dh(e)?e:new Error(String(e))}const gr=Symbol("numeric");function el(e){return typeof e=="number"||typeof e=="bigint"||(e==null?void 0:e[gr])}function Fh(e,t){return typeof e=="number"||typeof e=="bigint"?e<t?-1:e>t?1:0:e.CompareTo(t)}function Js(e,t){return typeof e=="number"?e*t:typeof e=="bigint"?e*BigInt(t):e[gr]().multiply(t)}function Bo(e,t){return typeof e=="number"?e.toFixed(t):typeof e=="bigint"?e:e[gr]().toFixed(t)}function Uo(e,t){return typeof e=="number"?e.toPrecision(t):typeof e=="bigint"?e:e[gr]().toPrecision(t)}function zo(e,t){return typeof e=="number"?e.toExponential(t):typeof e=="bigint"?e:e[gr]().toExponential(t)}function jo(e){return typeof e=="number"?(Number(e)>>>0).toString(16):typeof e=="bigint"?BigInt.asUintN(64,e).toString(16):e[gr]().toHex()}class Vh{constructor(t,n,r,o){this.declaringType=t,this.tag=n,this.name=r,this.fields=o}}class Bt{constructor(t,n,r,o,s,i,a){this.fullname=t,this.generics=n,this.construct=r,this.parent=o,this.fields=s,this.cases=i,this.enumCases=a}toString(){return Me(this)}GetHashCode(){return tl(this)}Equals(t){return Ys(this,t)}}function xt(e){return e.generics!=null?e.generics:[]}function tl(e){const t=$r(e.fullname),n=xt(e).map(tl);return Kr([t,...n])}function Ys(e,t){return e.fullname===""?t.fullname===""&&qs(Yr(e),Yr(t),([n,r],[o,s])=>n===o&&Ys(r,s)):e.fullname===t.fullname&&qs(xt(e),xt(t),Ys)}function ht(e,t,n,r){return new Bt(e,t,n,void 0,r)}function nl(e,t,n,r){const o=new Bt(e,t,n,void 0,void 0,()=>{const s=n.prototype.cases();return r().map((i,a)=>new Vh(o,a,s[a],i))});return o}function Ee(e){return new Bt("Microsoft.FSharp.Core.FSharpOption`1",[e])}function Xs(e){return new Bt("Microsoft.FSharp.Collections.FSharpList`1",[e])}function rl(e){return new Bt("[]",[e])}const Lh=new Bt("System.Object"),j=new Bt("System.String");function wr(e){if(Array.isArray(e))return e[0];if(e instanceof Bt){const t=Jr(e);if(t!=null)return wr(t)+"[]";{const n=e.fullname.lastIndexOf(".");return n===-1?e.fullname:e.fullname.substr(n+1)}}else return e.name}function Me(e){const t=Jr(e);return t!=null?Me(t)+"[]":e.generics==null||e.generics.length===0?e.fullname:e.fullname+"["+e.generics.map(n=>Me(n)).join(",")+"]"}function ol(e){return Jr(e)!=null}function Jr(e){var t;return e.fullname==="[]"&&((t=e.generics)==null?void 0:t.length)===1?e.generics[0]:void 0}function sl(e){return e.generics!=null&&e.generics.length>0}function Qs(e){return e.enumCases!=null&&e.enumCases.length>0}function il(e){return e.generics==null?e:new Bt(e.fullname,e.generics.map(()=>Lh))}function al(e){var t;return(t=e.generics)==null?void 0:t[0]}function _r(e){if(Qs(e)&&e.enumCases!=null)return e.enumCases.map(t=>t[1]);throw new Error(`${e.fullname} is not an enum type`)}function Bh(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 br(e,t){const n=parseInt(t,10);return Bh(e,isNaN(n)?t:n)[1]}function ll(e){if(e.cases!=null)return e.cases();throw new Error(`${e.fullname} is not an F# union type`)}function Yr(e){if(e.fields!=null)return e.fields();throw new Error(`${e.fullname} is not an F# record type`)}function cl(e){if(ei(e)&&e.generics!=null)return e.generics;throw new Error(`${e.fullname} is not a tuple type`)}function ul(e){return e instanceof Bt?e.cases!=null:e instanceof z}function dl(e){return e instanceof Bt?e.fields!=null:e instanceof ie}function ei(e){return e.fullname.startsWith("System.Tuple")}function Uh(e,t){const r=ll(t)[e.tag];if(r==null)throw new Error(`Cannot find case ${e.name} in union type`);return[r,e.fields]}function fl(e){return e.fields==null?[]:e.fields}function zh(e,t){return e[t[0]]}function xv(e){return e}function jh(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 Hh(e,t){const n=Yr(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,[o,s],i)=>(r[o]=t[i],r),{})}function Wh(e,t){return e}const Gh=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],qh=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],Kh=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Zh=["January","February","March","April","May","June","July","August","September","October","November","December"];function Ct(e,t,n){let r=0,o=t;for(;o<e.length&&e[o]===n;)o++,r++;return r}function hl(e,t){return t>=e.length-1?-1:e.charCodeAt(t+1)}function Jh(e,t){let n=t;const r=e[t];let o="",s=!1;for(;t<e.length;){t++;const i=e[t];if(i===r){s=!0;break}else if(i==="\\")if(t<e.length)t++,o+=e[t];else throw new Error("Invalid string format");else o+=i}if(!s)throw new Error(`Invalid string format could not find matching quote for ${r}`);return[o,t-n+1]}function ti(e,t,n){let r=0,o=0,s="";const i=n?Xr(e.getTime(),1):e;for(;r<t.length;){const a=t[r];switch(a){case"d":switch(o=Ct(t,r,"d"),r+=o,o){case 1:s+=$l(i);break;case 2:s+=ge($l(i),2);break;case 3:s+=Gh[_l(i)];break;case 4:s+=qh[_l(i)];break}break;case"f":if(o=Ct(t,r,"f"),r+=o,o<=3){const $=10**(3-o);s+=ge(Math.floor(qo(i)/$),o)}else o<=7&&(s+=(""+qo(i)).padEnd(o,"0"));break;case"F":if(o=Ct(t,r,"F"),r+=o,o<=3){const $=10**(3-o),v=Math.floor(qo(i)/$);v!=0&&(s+=ge(v,o))}else if(o<=7){const $=qo(i);$!=0&&(s+=ge($,3))}break;case"g":o=Ct(t,r,"g"),r+=o,o<=2&&(s+="A.D.");break;case"h":switch(o=Ct(t,r,"h"),r+=o,o){case 1:s+=Go(i)%12;break;case 2:s+=ge(Go(i)%12,2);break}break;case"H":switch(o=Ct(t,r,"H"),r+=o,o){case 1:s+=Go(i);break;case 2:s+=ge(Go(i),2);break}break;case"K":switch(o=Ct(t,r,"K"),r+=o,o){case 1:switch(pl(i)){case 1:s+="Z";break;case 2:s+=yr(i.getTimezoneOffset()*-6e4);break}break}break;case"m":switch(o=Ct(t,r,"m"),r+=o,o){case 1:s+=gl(i);break;case 2:s+=ge(gl(i),2);break}break;case"M":switch(o=Ct(t,r,"M"),r+=o,o){case 1:s+=Ko(i);break;case 2:s+=ge(Ko(i),2);break;case 3:s+=Kh[Ko(i)-1];break;case 4:s+=Zh[Ko(i)-1];break}break;case"s":switch(o=Ct(t,r,"s"),r+=o,o){case 1:s+=wl(i);break;case 2:s+=ge(wl(i),2);break}break;case"t":switch(o=Ct(t,r,"t"),r+=o,o){case 1:s+=i.getHours()<12?"A":"P";break;case 2:s+=i.getHours()<12?"AM":"PM";break}break;case"y":switch(o=Ct(t,r,"y"),r+=o,o){case 1:s+=i.getFullYear()%100;break;case 2:s+=ge(i.getFullYear()%100,2);break;case 3:s+=ge(i.getFullYear(),3);break;case 4:s+=ge(i.getFullYear(),4);break;case 5:s+=ge(i.getFullYear(),5);break}break;case"z":o=Ct(t,r,"z"),r+=o;let l="";switch(pl(i)){case 1:l="+00:00";break;case 2:l=yr(i.getTimezoneOffset()*-6e4);break;case 0:l=yr(sp(i).getTimezoneOffset()*-6e4);break}const c=l[0]==="-"?"-":"+",d=parseInt(l.substring(1,3),10),u=parseInt(l.substring(4,6),10);switch(o){case 1:s+=`${c}${d}`;break;case 2:s+=`${c}${ge(d,2)}`;break;default:s+=`${c}${ge(d,2)}:${ge(u,2)}`;break}break;case":":s+=":",r++;break;case"/":s+="/",r++;break;case"'":case'"':const[h,f]=Jh(t,r);s+=h,r+=f;break;case"%":const p=hl(t,r);if(p>=0&&p!==37)r+=2,s+=ti(i,String.fromCharCode(p),n);else throw new Error("Invalid format string");break;case"\\":const _=hl(t,r);if(_>=0)r+=2,s+=String.fromCharCode(_);else throw new Error("Invalid format string");break;default:r++,s+=a;break}}return s}function pl(e){return e.kind||0}function yr(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 Ho(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 Yh(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?yr(e.getTimezoneOffset()*-6e4):"")}}function Xh(e,t){const n=e.toISOString();return n.substring(0,n.length-1)+yr(t)}function Qh(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," ")+yr(e.offset??0);if(t.length===1)switch(t){case"D":case"d":return Ho(n,"first");case"T":case"t":return Ho(n,"second");case"O":case"o":return Xh(n,e.offset??0);default:throw new Error("Unrecognized Date print format")}else return ti(n,t,!0)}function ep(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?Ho(e,"first"):e.toLocaleDateString();case"T":case"t":return n?Ho(e,"second"):e.toLocaleTimeString();case"O":case"o":return Yh(e,n);default:throw new Error("Unrecognized Date print format")}else return ti(e,t,n)}function Wo(e,t,n){return e.offset!=null?Qh(e,t):ep(e,t)}function Xr(e,t){const n=new Date(e);return n.kind=(t??0)|0,n}function tp(){return Xr(-621355968e5,1)}function ml(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 o=/^\s*(\d+[^\w\s:]\d+[^\w\s:]\d+)?\s*(\d+:\d+(?::\d+(?:\.\d+)?)?)?\s*([AaPp][Mm])?\s*(Z|[+-]([01]?\d):?([0-5]?\d)?)?\s*$/.exec(e);if(o!=null){let s,i=0;if(o[2]!=null){const a=o[2].split(":"),l=parseInt(a[0],10);i=l*3600+parseInt(a[1]||"0",10)*60+parseFloat(a[2]||"0"),o[3]!=null&&o[3].toUpperCase()==="PM"&&l<12&&(i+=720)}if(o[4]!=null){if(o[1]!=null)s=new Date(o[1]+" UTC");else{const a=new Date;s=new Date(a.getUTCFullYear()+"/"+(a.getUTCMonth()+1)+"/"+a.getUTCDate())}if(o[4]==="Z")r="Z";else{let a=parseInt(o[5],10)*60+parseInt(o[6]||"0",10);o[4][0]==="-"&&(a*=-1),r=a,i-=a*60}}else if(o[1]!=null)s=new Date(o[1]);else{const a=new Date;s=new Date(a.getFullYear()+"/"+(a.getMonth()+1)+"/"+a.getDate())}n=new Date(s.getTime()+i*1e3),n=new Date(n.getTime()+(n.getTimezoneOffset()-s.getTimezoneOffset())*6e4)}else t();isNaN(n.getTime())&&t()}return[n,r]}function np(e,t=!1){const[n,r]=ml(e),o=r!=null?t&&r==="Z"?1:2:0;return Xr(n.getTime(),o)}function rp(e,t){try{return t.contents=np(e),!0}catch{return!1}}function op(e){return e.kind===1?e:Xr(e.getTime(),1)}function sp(e){return e.kind===2?e:Xr(e.getTime(),2)}function $l(e){return e.kind===1?e.getUTCDate():e.getDate()}function Go(e){return e.kind===1?e.getUTCHours():e.getHours()}function qo(e){return e.kind===1?e.getUTCMilliseconds():e.getMilliseconds()}function gl(e){return e.kind===1?e.getUTCMinutes():e.getMinutes()}function Ko(e){return(e.kind===1?e.getUTCMonth():e.getMonth())+1}function wl(e){return e.kind===1?e.getUTCSeconds():e.getSeconds()}function _l(e){return e.kind===1?e.getUTCDay():e.getDay()}function bl(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 ni(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}function ip(e,t,n=0){return e.lastIndex=n,e.exec(t)}function yl(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 o,s=-1;for(;(o=e.exec(t))!=null;)o.index===s?e.lastIndex++:(s=o.index,r.push(o));return r}function ap(e,t,n,r,o=0){function s(){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=bl(t,r??0),t=i,r=void 0}if(typeof n=="function")return r=r??-1,t.substring(0,o)+t.substring(o).replace(e,s);if(n=n.replace(/\$0/g,i=>"$&").replace(/\${([^}]+)}/g,"$<$1>"),r!=null){let i;const a=t.substring(o),l=yl(e,a),c=yl.length>r?(i=l[r-1],a.substring(0,i.index+i[0].length)):a;return t.substring(0,o)+c.replace(e,n)+t.substring(o+c.length)}else return t.replace(e,n)}const Qr=/(^|[^%])%([0+\- ]*)(\*|\d+)?(?:\.(\d+))?(\w)/g,eo=/(?:(^|[^%])%([0+\- ]*)(\d+)?(?:\.(\d+))?(\w))?%P\(\)/g,lp=/\{(\d+)(,-?\d+)?(?:\:([a-zA-Z])(\d{0,2})|\:(.+?))?\}/g;function vl(e,t){return Fh(e,t)<0}function Ut(e){return{input:e,cont:cp(e)}}function xl(e,t){let n=0,r=0,o="";eo.lastIndex=0;let s=eo.exec(e);for(;s;){const i=s.index+(s[1]||"").length;o+=e.substring(r,i).replace(/%%/g,"%");const[,,a,l,c,d]=s;r=eo.lastIndex,o+=kl(t[n++],a,l,c,d),eo.lastIndex=r-1,s=eo.exec(e)}return o+=e.substring(r).replace(/%%/g,"%"),o}function ri(e,t){return typeof t=="string"?e(t):t.cont(e)}function Cl(e){return ri(t=>console.log(t),e)}function Qt(e){return ri(t=>t,e)}function Sl(e){return ri(t=>{throw new Error(t)},e)}function kl(e,t,n,r,o){let s="";if(t=t||"",o=o||"",el(e))switch(o.toLowerCase()!=="x"&&(vl(e,0)?(e=Js(e,-1),s="-"):t.indexOf(" ")>=0?s=" ":t.indexOf("+")>=0&&(s="+")),r=r==null?null:parseInt(r,10),o){case"f":case"F":r=r??6,e=Bo(e,r);break;case"g":case"G":e=r!=null?Uo(e,r):Uo(e);break;case"e":case"E":e=r!=null?zo(e,r):zo(e);break;case"x":e=jo(e);break;case"X":e=jo(e).toUpperCase();break;default:e=String(e);break}else e instanceof Date?e=Wo(e):e=dt(e);if(n=typeof n=="number"?n:parseInt(n,10),isNaN(n))e=s+e;else{const i=t.indexOf("0")>=0,a=t.indexOf("-")>=0,l=a||!i?" ":"0";l==="0"?(e=to(e,n-s.length,l,a),e=s+e):e=to(s+e,n,l,a)}return e}function Al(e,t,n,r="",o=-1){return(...s)=>{let i=r;const a=t.slice(),l=n.slice();for(const c of s){const[,,d,u,h,f]=l[0];let p=u;if(o>=0)p=o,o=-1;else if(p==="*"){if(c<0)throw new Error("Non-negative number required");o=c;continue}i+=a[0],i+=kl(c,d,p,h,f),a.splice(0,1),l.splice(0,1)}return l.length===0?(i+=a[0],e(i)):Al(e,a,l,i,o)}}function cp(e){return t=>{Qr.lastIndex=0;const n=[],r=[];let o=0,s=Qr.exec(e);for(;s;){const i=s.index+(s[1]||"").length;n.push(e.substring(o,i).replace(/%%/g,"%")),r.push(s),o=Qr.lastIndex,Qr.lastIndex-=1,s=Qr.exec(e)}return n.length===0?t(e.replace(/%%/g,"%")):(n.push(e.substring(o).replace(/%%/g,"%")),Al(t,n,r))}}function El(e,...t){let n;return typeof e=="object"?(n=String(t[0]),t.shift()):n=e,n.replace(lp,(r,o,s,i,a,l)=>{if(o<0||o>=t.length)throw new Error("Index must be greater or equal to zero and less than the arguments' length.");let c=t[o];if(el(c))switch(a=a==null?null:parseInt(a,10),i){case"f":case"F":a=a??2,c=Bo(c,a);break;case"g":case"G":c=a!=null?Uo(c,a):Uo(c);break;case"e":case"E":c=a!=null?zo(c,a):zo(c);break;case"p":case"P":a=a??2,c=Bo(Js(c,100),a)+" %";break;case"d":case"D":c=a!=null?oi(String(c),a,"0"):String(c);break;case"x":case"X":c=a!=null?oi(jo(c),a,"0"):jo(c),i==="X"&&(c=c.toUpperCase());break;default:if(l){let d="";c=l.replace(/([0#,]+)(\.[0#]+)?/,(u,h,f)=>{vl(c,0)&&(c=Js(c,-1),d="-"),f=f==null?"":f.substring(1),c=Bo(c,Math.max(f.length,0));let[p,_]=c.split(".");_||(_="");const $=h.replace(/,/g,"").replace(/^#+/,"").length;p=oi(p,$,"0");const v=f.replace(/#+$/,"").length;if(v>_.length?_=dp(_,v,"0"):v<_.length&&(_=_.substring(0,v)+_.substring(v).replace(/0+$/,"")),h.indexOf(",")>0){const y=p.length%3,C=Math.floor(p.length/3);let R=y>0?p.substr(0,y)+(C>0?",":""):"";for(let L=0;L<C;L++)R+=p.substr(y+L*3,3)+(L<C-1?",":"");p=R}return _.length>0?p+"."+_:p}),c=d+c}}else c instanceof Date?c=Wo(c,l||i):c=dt(c);return s=parseInt((s||" ").substring(1),10),isNaN(s)||(c=to(String(c),Math.abs(s)," ",s<0)),c})}function up(e,t){const n=e.lastIndexOf(t);return n>=0&&n===e.length-t.length}function Zo(e){return typeof e!="string"||e.length===0}function Il(e){return typeof e!="string"||/^\s*$/.test(e)}function ae(e,t){return Array.isArray(t)?t.join(e):Array.from(t).join(e)}function to(e,t,n,r){n=n||" ",t=t-e.length;for(let o=0;o<t;o++)e=r?e+n:n+e;return e}function oi(e,t,n){return to(e,t,n)}function dp(e,t,n){return to(e,t,n,!0)}function si(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 o=(r&1)===1,s=(r&2)===2;t=t||[],t=t.filter(d=>d).map(ni),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=s?e.substring(c).trim():e.substring(c);(!o||u.length>0)&&i.push(u),l=!1}else{const u=s?e.substring(c,d.index).trim():e.substring(c,d.index);(!o||u.length>0)&&(n!=null&&i.length+1===n?(i.push(s?e.substring(c).trim():e.substring(c)),l=!1):i.push(u)),c=a.lastIndex}}while(l);return i}function fp(e,...t){if(t.length===0)return e.trim();const n="["+ni(t.join(""))+"]+";return e.replace(new RegExp("^"+n),"").replace(new RegExp(n+"$"),"")}function hp(e,...t){return t.length===0?e.trimEnd():e.replace(new RegExp("["+ni(t.join(""))+"]+$"),"")}function Tl(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 jn{constructor(t){this.value=t}toJSON(){return this.value}toString(){return String(this.value)}GetHashCode(){return ln(this.value)}Equals(t){return t==null?!1:He(this.value,t instanceof jn?t.value:t)}CompareTo(t){return t==null?1:Ft(this.value,t instanceof jn?t.value:t)}}function T(e){if(e==null)throw new Error("Option has no value");return e instanceof jn?e.value:e}function ii(e){return e instanceof jn?e.value:e}function nt(e){return e==null||e instanceof jn?new jn(e):e}function pp(e){return e??void 0}function ai(e){return e==null?[]:[T(e)]}function Ye(e,t){return e!=null?T(e):t}function Nl(e,t){return e!=null?T(e):t()}function zt(e,t){return t!=null?nt(e(T(t))):void 0}const Ml="Collection was empty.";function li(e,t){return typeof e=="function"?new e(t):new Array(t)}function Rl(e,t){return e>t?e:t}function Jo(e,t,n,r){const o=t|0;return e.fill(r,o,o+n)}function An(e,t,n){const r=t.length|0,o=li(n,r);for(let s=0;s<=r-1;s++)St(o,s,e(fe(s,t)));return o}function mp(e,t,n,r){if(t.length!==n.length)throw new Error("Arrays had different lengths");const o=li(r,t.length);for(let s=0;s<=t.length-1;s++)St(o,s,e(fe(s,t),fe(s,n)));return o}function $p(e,t){const n=li(t,1);return St(n,0,e),n}function gp(e){return e.slice().reverse()}function wp(e,t){return t.find(e)}function _p(e,t,n){const r=[];for(let o=0;o<=t.length-1;o++){const s=e(fe(o,t));if(s!=null){const i=T(s);r.push(i)}}return He(n,he())?r:An(o=>o,r,n)}function Yo(e,t,n){const r=e;return n.reduce(r,t)}function bp(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 o;const s=r*e|0;o=t.slice(s,s+e),n.push(o)}return n}}function ci(e,t,n){return t==null}function fe(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 St(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 Pl(e,t,n){return t.reduceRight((r,o)=>e(o,r),n)}function yp(e,t){let n=t.GetZero();for(let r=0;r<=e.length-1;r++)n=t.Add(n,fe(r,e));return n}class pt extends ie{constructor(t,n){super(),this.head=t,this.tail=n}toString(){return"["+ae("; ",this)+"]"}Equals(t){const n=this;return n===t?!0:((o,s)=>{e:for(;;){const i=o,a=s,l=i.tail,c=a.tail;if(l!=null)if(c!=null){const d=T(l),u=T(c);if(He(i.head,a.head)){o=d,s=u;continue e}else return!1}else return!1;else return c==null}})(n,t)}GetHashCode(){return((r,o,s)=>{e:for(;;){const i=r,a=o,l=s,c=l.tail;if(c!=null){const d=T(c);if(i>18)return a|0;r=i+1,o=(a<<1)+ln(l.head)+631*i,s=d;continue e}else return a|0}})(0,0,this)|0}toJSON(){const t=this;return Array.from(t)}CompareTo(t){return((o,s)=>{e:for(;;){const i=o,a=s,l=i.tail,c=a.tail;if(l!=null)if(c!=null){const d=T(l),u=T(c),h=Ft(i.head,a.head)|0;if(h===0){o=d,s=u;continue e}else return h|0}else return 1;else return c!=null?-1:0}})(this,t)|0}GetEnumerator(){return xp(this)}[Symbol.iterator](){return qr(Re(this))}"System.Collections.IEnumerable.GetEnumerator"(){return Re(this)}}class vp{constructor(t){this.xs=t,this.it=this.xs,this.current=he()}"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=T(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=he()}Dispose(){}}function xp(e){return new vp(e)}function je(){return new pt(he(),void 0)}function no(e,t){return new pt(e,t)}function cn(e){return e.tail==null}function Ol(e){return((n,r)=>{e:for(;;){const o=n,i=r.tail;if(i!=null){n=o+1,r=T(i);continue e}else return o|0}})(0,e)|0}function En(e){if(e.tail!=null)return e.head;throw new Error(Ml+"\\nParameter name: list")}function rt(e){const t=e.tail;if(t!=null)return T(t);throw new Error(Ml+"\\nParameter name: list")}function Be(){return je()}function kt(e,t){return no(e,t)}function re(e){return no(e,je())}function K(e){return cn(e)}function vr(e){return Ol(e)}function D(e){return En(e)}function b(e){return rt(e)}function Hn(e){const t=Ol(e)|0,n=Jo(new Array(t),0,t,null);return((o,s)=>{e:for(;;){const i=o,a=s;if(!cn(a)){St(n,i,En(a)),o=i+1,s=rt(a);continue e}break}})(0,e),n}function un(e,t,n){let r=t,o=n;for(;!cn(o);)r=e(r,D(o)),o=rt(o);return r}function Xo(e){return un((t,n)=>no(n,t),je(),e)}function Cp(e,t,n){return Pl(e,Hn(t),n)}function Sp(e,t,n){return((o,s,i)=>{e:for(;;){const a=o,l=s,c=i;if(cn(c))return l;o=a+1,s=e(a,l,En(c)),i=rt(c);continue e}})(0,t,n)}function Qo(e,t){un((n,r)=>{e(r)},void 0,t)}function Oe(e,t){let n=t;for(let r=e.length-1;r>=0;r--)n=no(fe(r,e),n);return n}function k(e){return Oe(e,je())}function kp(e){let t,n;if(Xt(e))return k(e);if(e instanceof pt)return e;{const r=je();let o=r;const s=Re(e);try{for(;s["System.Collections.IEnumerator.MoveNext"]();){const l=s["System.Collections.Generic.IEnumerator`1.get_Current"]();o=(t=o,n=new pt(l,void 0),t.tail=n,n)}}finally{we(s)}const i=o,a=je();return i.tail=a,rt(r)}}function ot(e,t){return un((n,r)=>no(r,n),t,Xo(e))}function Ap(e,t){let n,r;const o=je();let s=o,i=t;for(;!cn(i);){let c=e(En(i));for(;!cn(c);)s=(n=s,r=new pt(En(c),void 0),n.tail=r,r),c=rt(c);i=rt(i)}const a=s,l=je();return a.tail=l,rt(o)}function Ep(e,t){const n=je(),r=Sp((s,i,a)=>{const l=new pt(e(s,a),void 0);return i.tail=l,l},n,t),o=je();return r.tail=o,rt(n)}function Wn(e,t){const n=je(),r=un((s,i)=>{const a=new pt(e(i),void 0);return s.tail=a,a},n,t),o=je();return r.tail=o,rt(n)}function Ip(e,t){return(r=>{e:for(;;){const o=r;if(cn(o))return;{const s=e(En(o));if(s==null){r=rt(o);continue e}else return s}}})(t)}function Tp(e,t){return Ip(n=>e(n)?nt(n):void 0,t)}function Np(e,t){return((r,o)=>{e:for(;;){const s=r,i=o;if(cn(i))return;if(e(En(i)))return s;r=s+1,o=rt(i);continue e}})(0,t)}function Mp(e,t){return((r,o)=>{e:for(;;){const s=r,i=o;if(cn(i))return;if(s===e)return nt(En(i));r=s+1,o=rt(i);continue e}})(0,t)}function Dl(e,t){const n=je(),r=un((s,i)=>{if(e(i)){const a=new pt(i,void 0);return s.tail=a,a}else return s},n,t),o=je();return r.tail=o,rt(n)}function Rp(e,t){const n=je(),r=je(),o=n,s=un((l,c)=>{let d,u;const h=l[0],f=l[1];return e(c)?[(d=new pt(c,void 0),h.tail=d,d),f]:[h,(u=new pt(c,void 0),f.tail=u,u)]},[o,r],t),i=je();s[0].tail=i;const a=je();return s[1].tail=a,[rt(o),rt(r)]}function Fl(e,t){const n=je(),r=un((s,i)=>{const a=e(i);if(a==null)return s;{const l=new pt(T(a),void 0);return s.tail=l,l}},n,t),o=je();return r.tail=o,rt(n)}function Vl(e,t,n){return Np(r=>n.Equals(e,r),t)!=null}function Pp(e,t){const n=Hn(t);return n.sort(e),k(n)}function Op(e,t,n){return Pp((r,o)=>n.Compare(e(r),e(o)),t)}function Dp(e,t){return k(An(k,bp(e,Hn(t))))}function Fp(e){return new w(0,[e])}function Ll(e){return new w(1,[e])}class w extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Ok","Error"]}}function dn(e,t){return t.tag===0?Fp(e(t.fields[0])):Ll(t.fields[0])}function Vp(e,t){return t.tag===0?e(t.fields[0]):Ll(t.fields[0])}function At(e){return e.tag===0}class Lp extends z{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["Name"]}}function Bl(e){return new Lp(e)}function ui(e){return e.fields[0]}class Bp extends z{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["Website"]}}class Up extends z{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["FirstName"]}}class zp extends z{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["LastName"]}}class jp extends z{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["Email"]}}class Hp extends z{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["MobilePhone"]}}let Wp=class extends ie{constructor(t,n,r,o){super(),this.FirstName=t,this.LastName=n,this.Email=r,this.MobilePhone=o}};class Gp extends z{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["Notes"]}}class qp extends z{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["PartnerId"]}}function fn(e){return e.fields[0]}function st(e){return new qp(e)}function es(e){return fn(e)}class Kp extends z{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["AccountId"]}}function hn(e){return e.fields[0]}function jt(e){return new Kp(e)}function ts(e){return hn(e)}class Zp extends z{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["BusinessName"]}}class Jp extends z{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["BusinessNumber"]}}class Yp extends z{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["Address1"]}}class Xp extends z{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["Address2"]}}class Qp extends z{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["City"]}}class em extends z{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["Postcode"]}}let tm=class extends z{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["State"]}};class nm extends z{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["SalesforceParentRecordId"]}}class rm extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["ExternalApi","Admin"]}}new rm(0,[]);function om(e){throw new Error(e)}const sm="Enumeration already finished.",im="Enumeration has not started. Call MoveNext.",Ul="The input sequence has an insufficient number of elements.",am="Reset is not supported on this enumerator.";function lm(){throw new Error(am)}function di(){throw new Error(im)}function fi(){throw new Error(sm)}class cm{constructor(t){this.f=t}toString(){const t=this;let n=0,r="seq [";const o=Re(t);try{for(;n<4&&o["System.Collections.IEnumerator.MoveNext"]();)n>0&&(r=r+"; "),r=r+dt(o["System.Collections.Generic.IEnumerator`1.get_Current"]()),n=n+1|0;return n===4&&(r=r+"; ..."),r+"]"}finally{we(o)}}GetEnumerator(){return this.f()}[Symbol.iterator](){return qr(Re(this))}"System.Collections.IEnumerable.GetEnumerator"(){return this.f()}}function um(e){return new cm(e)}class dm{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"(){lm()}Dispose(){this.dispose()}}function ns(e,t,n){return new dm(e,t,n)}function fm(e){let t,n,r=!1,o=!1,s;const i=()=>{if(o=!0,n!=null){const a=T(n);try{we(a)}finally{n=void 0}}if(t!=null){const a=T(t);try{we(a)}finally{t=void 0}}};return ns(()=>(r?o&&fi():di(),s!=null?T(s):fi()),()=>{let a;if(r||(r=!0),o)return!1;{let l;for(;l==null;){const c=t,d=n;if(c!=null)if(d!=null){const u=T(d);if(u["System.Collections.IEnumerator.MoveNext"]())s=nt(u["System.Collections.Generic.IEnumerator`1.get_Current"]()),l=!0;else try{we(u)}finally{n=void 0}}else{const u=T(c);u["System.Collections.IEnumerator.MoveNext"]()?n=(a=u["System.Collections.Generic.IEnumerator`1.get_Current"](),Re(a)):(i(),l=!1)}else t=Re(e)}return T(l)}},()=>{o||i()})}function hm(e,t){return ns(()=>t["System.Collections.Generic.IEnumerator`1.get_Current"](),()=>t["System.Collections.IEnumerator.MoveNext"](),()=>{try{we(t)}finally{}})}function zl(e,t,n){let r=!1,o,s=nt(e());const i=()=>{if(s!=null){const l=T(s);try{n(l)}finally{s=void 0}}},a=()=>{try{i()}finally{o=void 0}};return ns(()=>(r||di(),o!=null?T(o):fi()),()=>{if(r||(r=!0),s!=null){const l=T(s);let c;try{c=t(l)}catch(d){throw a(),d}return c!=null?(o=c,!0):(a(),!1)}else return!1},i)}function pm(e,t){let n,r=t;return ns(()=>{if(n!=null){const o=T(n)[0];return T(n)[1],o}else return di()},()=>(n=e(r),n!=null?(T(n)[0],r=T(n)[1],!0):!1),()=>{})}function mm(e,t){t==null&&om(e)}function xr(e){return um(e)}function pn(e){return mm("source",e),Re(e)}function A(e){return xr(()=>Re(e()))}function hi(e){return xr(()=>fm(e))}function $m(e,t){return xr(()=>pm(e,t))}function Et(){return A(()=>new Array(0))}function E(e){return A(()=>$p(e))}function Cv(e){return e}function pi(e){return e instanceof pt?Hn(e):Array.from(e)}function Ie(e){return Xt(e)?k(e):e instanceof pt?e:kp(e)}function jl(e,t,n){return xr(()=>zl(e,t,n))}function Hl(e,t,n){return xr(()=>{let r=-1;return zl(e,o=>(r=r+1|0,t(r,o)),n)})}function B(e,t){return hi([e,t])}function ro(e,t){return jl(()=>pn(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=>{we(n)})}function gm(e,t,n){const r=pn(t);try{const o=pn(n);try{let s=0,i=r["System.Collections.IEnumerator.MoveNext"](),a=o["System.Collections.IEnumerator.MoveNext"]();for(;s===0&&i&&a;)s=e(r["System.Collections.Generic.IEnumerator`1.get_Current"](),o["System.Collections.Generic.IEnumerator`1.get_Current"]())|0,s===0&&(i=r["System.Collections.IEnumerator.MoveNext"](),a=o["System.Collections.IEnumerator.MoveNext"]());return(s!==0?s:i?1:a?-1:0)|0}finally{we(o)}}finally{we(r)}}function Cr(e,t,n){const r=pn(t);try{let o=!1;for(;!o&&r["System.Collections.IEnumerator.MoveNext"]();)o=n.Equals(e,r["System.Collections.Generic.IEnumerator`1.get_Current"]());return o}finally{we(r)}}function oo(e,t,n){const r=pn(n);try{let o=t;for(;r["System.Collections.IEnumerator.MoveNext"]();)o=e(o,r["System.Collections.Generic.IEnumerator`1.get_Current"]());return o}finally{we(r)}}function Sr(e,t){oo((n,r)=>{e(r)},void 0,t)}function wm(e,t){oo((n,r)=>(e(n,r),n+1|0),0,t)}function De(e,t){return jl(()=>pn(t),n=>n["System.Collections.IEnumerator.MoveNext"]()?nt(e(n["System.Collections.Generic.IEnumerator`1.get_Current"]())):void 0,n=>{we(n)})}function mi(e,t){return Hl(()=>pn(t),(n,r)=>r["System.Collections.IEnumerator.MoveNext"]()?nt(e(n,r["System.Collections.Generic.IEnumerator`1.get_Current"]())):void 0,n=>{we(n)})}function _m(e){return A(()=>gp(pi(e)))}function bm(e,t){return xr(()=>{const n=pn(t);try{for(let r=1;r<=e;r++)if(!n["System.Collections.IEnumerator.MoveNext"]())throw new Error(Ul+"\\nParameter name: source");return hm(()=>{},n)}catch(r){throw we(n),r}})}function ym(e,t){return Hl(()=>pn(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(Ul+"\\nParameter name: source")}else return},n=>{we(n)})}function vm(e,t){return A(()=>hi(De(e,t)))}const Gn={None:0,LowerFirst:1,SnakeCase:2,SnakeCaseAllCaps:3,KebabCase:4};function $i(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 xm(e,t){switch(t){case Gn.LowerFirst:return e.charAt(0).toLowerCase()+e.slice(1);case Gn.SnakeCase:return $i(e,"_");case Gn.SnakeCaseAllCaps:return $i(e,"_").toUpperCase();case Gn.KebabCase:return $i(e,"-");case Gn.None:default:return e}}function In(e,t=Gn.None){const n={},r=t;function o(i){throw new Error("Cannot infer key and value of "+String(i))}function s(i,a,l){i=xm(i,a),n[i]=l}for(let i of e){let a=Gn.None;if(i==null&&o(i),i instanceof z){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:o(i);break;case 1:s(i[0],a,!0);break;case 2:const l=i[1];s(i[0],a,l);break;default:s(i[0],a,i.slice(1))}else typeof i=="string"?s(i,a,!0):o(i)}return n}function Wl(e,t,n){return e.has(t)?(n.contents=e.get(t),!0):!1}function so(e,t){if(e.has(t))return e.get(t);throw new Error(`The given key '${t}' was not present in the dictionary.`)}class Cm{constructor(t,n){const r=new ft(he());this.comparer=n,r.contents=this,this.hashMap=new Map([]),this["init@9"]=1;const o=Re(t);try{for(;o["System.Collections.IEnumerator.MoveNext"]();){const s=o["System.Collections.Generic.IEnumerator`1.get_Current"]();gi(r.contents,s[0],s[1])}}finally{we(o)}}get[Symbol.toStringTag](){return"Dictionary"}toJSON(){const t=this;return Array.from(t)}"System.Collections.IEnumerable.GetEnumerator"(){return Re(this)}GetEnumerator(){return Re(hi(this.hashMap.values()))}[Symbol.iterator](){return qr(Re(this))}"System.Collections.Generic.ICollection`1.Add2B595"(t){gi(this,t[0],t[1])}"System.Collections.Generic.ICollection`1.Clear"(){Gl(this)}"System.Collections.Generic.ICollection`1.Contains2B595"(t){const r=rs(this,t[0]);let o;switch(r!=null&&He(T(r)[1],t[1])?(o=0,T(r)):o=1,o){case 0:return!0;default:return!1}}"System.Collections.Generic.ICollection`1.CopyToZ3B4C077E"(t,n){wm((o,s)=>{St(t,n+o,s)},this)}"System.Collections.Generic.ICollection`1.get_Count"(){return ql(this)|0}"System.Collections.Generic.ICollection`1.get_IsReadOnly"(){return!1}"System.Collections.Generic.ICollection`1.Remove2B595"(t){const n=this,r=rs(n,t[0]);return r!=null?(He(T(r)[1],t[1])&&wi(n,t[0]),!0):!1}"System.Collections.Generic.IDictionary`2.Add5BDDA1"(t,n){gi(this,t,n)}"System.Collections.Generic.IDictionary`2.ContainsKey2B595"(t){return Jl(this,t)}"System.Collections.Generic.IDictionary`2.get_Item2B595"(t){return Kl(this,t)}"System.Collections.Generic.IDictionary`2.set_Item5BDDA1"(t,n){Zl(this,t,n)}"System.Collections.Generic.IDictionary`2.get_Keys"(){const t=this;return pi(A(()=>De(n=>n[0],t)))}"System.Collections.Generic.IDictionary`2.Remove2B595"(t){return wi(this,t)}"System.Collections.Generic.IDictionary`2.TryGetValue6DC89625"(t,n){const o=rs(this,t);if(o!=null){const s=T(o);return n.contents=s[1],!0}else return!1}"System.Collections.Generic.IDictionary`2.get_Values"(){const t=this;return pi(A(()=>De(n=>n[1],t)))}get size(){return ql(this)|0}clear(){Gl(this)}delete(t){return wi(this,t)}entries(){return De(n=>[n[0],n[1]],this)}get(t){return Kl(this,t)}has(t){return Jl(this,t)}keys(){return De(n=>n[0],this)}set(t,n){const r=this;return Zl(r,t,n),r}values(){return De(n=>n[1],this)}forEach(t,n){const r=this;Sr(o=>{t(o[1],o[0],r)},r)}}function io(e,t){const n=e.comparer.GetHashCode(t)|0;let r,o=he();return r=[Wl(e.hashMap,n,new ft(()=>o,s=>{o=s})),o],r[0]?[!0,n,r[1].findIndex(s=>e.comparer.Equals(t,s[0]))]:[!1,n,-1]}function rs(e,t){const n=io(e,t);let r;switch(n[0]&&n[2]>-1?r=0:r=1,r){case 0:return so(e.hashMap,n[1])[n[2]];default:return}}function Gl(e){e.hashMap.clear()}function ql(e){let t=0,n=Re(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{we(n)}return t|0}function Kl(e,t){const n=rs(e,t);if(n!=null)return T(n)[1];throw new Error("The item was not found in collection")}function Zl(e,t,n){const r=io(e,t);r[0]?r[2]>-1?so(e.hashMap,r[1])[r[2]]=[t,n]:so(e.hashMap,r[1]).push([t,n]):e.hashMap.set(r[1],[[t,n]])}function gi(e,t,n){const r=io(e,t);if(r[0]){if(r[2]>-1)throw new Error(El("An item with the same key has already been added. Key: {0}",t));so(e.hashMap,r[1]).push([t,n])}else e.hashMap.set(r[1],[[t,n]])}function Jl(e,t){const n=io(e,t);let r;switch(n[0]&&n[2]>-1?r=0:r=1,r){case 0:return!0;default:return!1}}function wi(e,t){const n=io(e,t);let r;switch(n[0]&&n[2]>-1?r=0:r=1,r){case 0:return so(e.hashMap,n[1]).splice(n[2],1),!0;default:return!1}}function Sm(e){return new Yl(0,[e])}function km(e){return new Yl(1,[e])}class Yl extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Choice1Of2","Choice2Of2"]}}function Am(e){return Sm(e)}function Em(e){return km(e)}const Im=/^[\(\{]{0,2}[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}[\)\}]{0,2}$/,Xl=/^([0-9a-f]{8})([0-9a-f]{4})([0-9a-f]{4})([0-9a-f]{4})([0-9a-f]{12})$/,Tm=/^\{0x[0-9a-f]{8},(0x[0-9a-f]{4},){2}\{(0x[0-9a-f]{2},){7}0x[0-9a-f]{2}\}\}$/;function Nm(e){function t(r){return r.replace(Xl,"$1-$2-$3-$4-$5")}const n=e.trim().toLowerCase();if(Im.test(n))return fp(n,"{","}","(",")");if(Xl.test(n))return t(n);if(Tm.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 Mm(e,t){try{return t.contents=Nm(e),!0}catch{return!1}}class Ql extends z{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["StreamId"]}}function kr(e){return e.fields[0]}var _i;(function(e){e[e.AllowHexSpecifier=512]="AllowHexSpecifier"})(_i||(_i={}));function Rm(e,t){const[,n,r,o]=e;return{sign:n||"",prefix:r||"",digits:o,radix:t}}function ec(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 Pm(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 Om(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 Dm(e,t,n){const o=/^\s*([\+\-])?(0[xXoObB])?([0-9a-fA-F]+)\s*$/.exec(e.replace(/_/g,""));if(o!=null){const[,,s,i]=o;if(n=n||Om(s,t),!Pm(n).test(i))return Rm(o,n)}return null}function Fm(e,t,n,r,o){const s=Dm(e,t,o);if(s!=null){let i=Number.parseInt(s.sign+s.digits,s.radix);if(!Number.isNaN(i)){const[a,l]=ec(!0,r);!n&&s.radix!==10&&i>=a&&i<=l&&(i=i<<32-r>>32-r);const[c,d]=ec(n,r);if(i>=c&&i<=d)return i}}throw new Error(`The input string ${e} was not in a correct format.`)}function Ar(e,t,n,r,o){try{return o.contents=Fm(e,t,n,r),!0}catch{return!1}}const Vm="#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ƒ£ē︳𐀡%𐀡",Lm="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 Bm(){const t=[...Vm].map(s=>(s.codePointAt(0)??0)-35),n=[...Lm].map(s=>(s.codePointAt(0)??0)-35),r=new Uint32Array(t),o=new Uint8Array(n);for(let s=1;s<r.length;++s)r[s]+=r[s-1];return s=>{let i=r.length,a=0;for(;i-a>1;){const l=Math.floor((i+a)/2),c=r[l];if(s<c)i=l;else if(s===c){i=a=l;break}else c<s&&(a=l)}return o[a]}}const Um=256,zm=Bm();function jm(e,t){if(t<e.length)return e.charCodeAt(t);throw new Error("Index out of range.")}const Hm=e=>Gm(e,0);function Wm(e,t){const n=jm(e,t);return zm(n)}function Gm(e,t){return(1<<Wm(e,t)&Um)!==0}function qm(e,t){const n=ip(bl(e),t);if(n!=null)return b(Ie(A(()=>De(r=>r||"",n))))}function Km(e){let t;const n=qm(".*?@(.*)",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 It(e,t){return Zo(t)?new w(1,[Qt(Ut("%s cannot be null or empty"))(e)]):new w(0,[t])}function Zm(e){const t=Km(e);if(t!=null){const n=t;return new w(0,[n])}else return new w(1,["Email is not in the correct format"])}function Jm(e){return~~e.charCodeAt(0)-48}function Ym(e){let t;const n=new w(1,["BusinessNumber is not valid"]),r=new Int32Array([10,1,3,5,7,9,11,13,15,17,19]),o=An(Jm,(t=e.split(""),t.filter(Hm)),Int32Array);return o.length===11?(St(o,0,fe(0,o)-1|0),yp(mp((s,i)=>s*i,o,r,Int32Array),{GetZero:()=>0,Add:(s,i)=>s+i})%89===0?new w(0,[e]):n):n}function tc(e){const t=It("Name",e);return t.tag===1?new w(1,[t.fields[0]]):new w(0,[Bl(t.fields[0])])}function os(e){return ui(e)}function nc(e){const t=It("Website",e);return t.tag===1?new w(1,[t.fields[0]]):new w(0,[new Bp(t.fields[0])])}function rc(e){return e.fields[0]}function oc(e){const t=It("FirstName",e);return t.tag===1?new w(1,[t.fields[0]]):new w(0,[new Up(t.fields[0])])}function sc(e){return e.fields[0]}function ic(e){const t=It("LastName",e);return t.tag===1?new w(1,[t.fields[0]]):new w(0,[new zp(t.fields[0])])}function ac(e){return e.fields[0]}function lc(e){let t;const n=It("Email",e);return t=n.tag===1?new w(1,[n.fields[0]]):Zm(n.fields[0]),t.tag===1?new w(1,[t.fields[0]]):new w(0,[new jp(t.fields[0])])}function cc(e){const t=It("MobilePhone",e);return t.tag===1?new w(1,[t.fields[0]]):new w(0,[new Hp(t.fields[0])])}function uc(e){return e.fields[0]}class dc extends ie{constructor(t,n,r,o){super(),this.FirstName=t,this.LastName=n,this.Email=r,this.MobilePhone=o}}function bi(){return ht("AccountRegistry.Shared.Primitives.ContactDetails",[],dc,()=>[["FirstName",j],["LastName",j],["Email",j],["MobilePhone",j]])}function Xm(e){const t=oc(e.FirstName);if(t.tag===1)return new w(1,[t.fields[0]]);{const n=ic(e.LastName);if(n.tag===1)return new w(1,[n.fields[0]]);{const r=lc(e.Email);if(r.tag===1)return new w(1,[r.fields[0]]);{const o=cc(e.MobilePhone);return o.tag===1?new w(1,[o.fields[0]]):new w(0,[new Wp(t.fields[0],n.fields[0],r.fields[0],o.fields[0])])}}}}function Qm(e){const t=e;if(t!=null)return new Gp(t)}function e$(e){if(e!=null)return e.fields[0]}function lt(e){return fn(e)}function mn(e){return hn(e)}function t$(e){const t=It("BusinessName",e);return t.tag===1?new w(1,[t.fields[0]]):new w(0,[new Zp(t.fields[0])])}function n$(e){let t;const n=It("BusinessNumber",e);return t=n.tag===1?new w(1,[n.fields[0]]):Ym(n.fields[0]),t.tag===1?new w(1,[t.fields[0]]):new w(0,[new Jp(t.fields[0])])}function r$(e){const t=It("Address1",e);return t.tag===1?new w(1,[t.fields[0]]):new w(0,[new Yp(t.fields[0])])}function o$(e){const t=e;if(t!=null)return new Xp(t)}function s$(e){const t=It("City",e);return t.tag===1?new w(1,[t.fields[0]]):new w(0,[new Qp(t.fields[0])])}function i$(e){const t=It("Postcode",e);return t.tag===1?new w(1,[t.fields[0]]):new w(0,[new em(t.fields[0])])}function a$(e){const t=It("State",e);return t.tag===1?new w(1,[t.fields[0]]):new w(0,[new tm(t.fields[0])])}class l$ extends ie{constructor(t,n,r,o,s,i,a,l,c){super(),this.BusinessName=t,this.BusinessNumber=n,this.Address1=r,this.Address2=o,this.City=s,this.Postcode=i,this.State=a,this.Phone=l,this.CountryCode=c}}function c$(){return ht("AccountRegistry.Shared.Primitives.LegalEntity",[],l$,()=>[["BusinessName",j],["BusinessNumber",j],["Address1",j],["Address2",Ee(j)],["City",j],["Postcode",j],["State",Ee(j)],["Phone",j],["CountryCode",Ee(j)]])}function u$(e){const t=It("SalesforceParentRecordId",e);return t.tag===1?new w(1,[t.fields[0]]):new w(0,[new nm(t.fields[0])])}class fc extends ie{constructor(t,n){super(),this.SalesforceParentRecordId=t,this.SalesforceRecordId=n}}function d$(){return ht("AccountRegistry.Shared.Primitives.SalesforceInfo",[],fc,()=>[["SalesforceParentRecordId",j],["SalesforceRecordId",Ee(j)]])}class hc extends ie{constructor(t,n){super(),this.Code=t,this.Name=n}}function f$(){return ht("AccountRegistry.Shared.Primitives.AnzsicClassifier",[],hc,()=>[["Code",j],["Name",j]])}class h$ extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Api","Direct"]}}function yi(){return nl("AccountRegistry.Shared.Primitives.AccountProvisioningModeDto",[],h$,()=>[[],[]])}let p$=class extends ie{constructor(t,n,r,o,s,i){super(),this.StreamId=t,this.Name=n,this.Website=r,this.ContactDetails=o,this.Notes=s,this.AccountProvisioningMode=i}};function m$(){return ht("AccountRegistry.Shared.AdminApi.Partner",[],p$,()=>[["StreamId",j],["Name",j],["Website",j],["ContactDetails",Ee(bi())],["Notes",Ee(j)],["AccountProvisioningMode",yi()]])}class $$ extends ie{constructor(t,n,r,o,s,i,a,l,c,d){super(),this.StreamId=t,this.PartnerId=n,this.Name=r,this.Website=o,this.ContactDetails=s,this.Notes=i,this.LegalEntity=a,this.ExternalId=l,this.ChannelId=c,this.ProvisioningMode=d}}function g$(){return ht("AccountRegistry.Shared.AdminApi.Account",[],$$,()=>[["StreamId",j],["PartnerId",j],["Name",j],["Website",j],["ContactDetails",Ee(bi())],["Notes",Ee(j)],["LegalEntity",Ee(c$())],["ExternalId",Ee(j)],["ChannelId",Ee(j)],["ProvisioningMode",yi()]])}class w$ extends ie{constructor(t,n,r,o,s,i,a,l,c,d){super(),this.AccountId=t,this.Name=n,this.Contact=r,this.ContactMobilePhone=o,this.Website=s,this.BusinessName=i,this.BusinessNumber=a,this.ExternalId=l,this.ChannelId=c,this.ProvisioningMode=d}}function _$(){return ht("AccountRegistry.Shared.AdminApi.AccountLookupItem",[],w$,()=>[["AccountId",j],["Name",j],["Contact",Ee(j)],["ContactMobilePhone",Ee(j)],["Website",j],["BusinessName",Ee(j)],["BusinessNumber",Ee(j)],["ExternalId",Ee(j)],["ChannelId",Ee(j)],["ProvisioningMode",yi()]])}class pc extends ie{constructor(t,n){super(),this.Accounts=t,this.Token=n}}function b$(){return ht("AccountRegistry.Shared.AdminApi.AccountLookup",[],pc,()=>[["Accounts",Xs(_$())],["Token",Ee(j)]])}class y$ extends ie{constructor(t,n){super(),this.PartnerId=t,this.AccountId=n}}function v$(){return ht("AccountRegistry.Shared.AdminApi.FindAccountResponse",[],y$,()=>[["PartnerId",j],["AccountId",j]])}class x$ extends ie{constructor(t,n){super(),this.ClassCode=t,this.ClassTitle=n}}function C$(){return ht("AccountRegistry.Shared.AdminApi.AnzsicClass",[],x$,()=>[["ClassCode",j],["ClassTitle",j]])}class S$ extends ie{constructor(t,n,r){super(),this.GroupCode=t,this.GroupTitle=n,this.Classes=r}}function k$(){return ht("AccountRegistry.Shared.AdminApi.AnzsicGroup",[],S$,()=>[["GroupCode",j],["GroupTitle",j],["Classes",rl(C$())]])}class A$ extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Success","TooManyResults"]}}function E$(){return nl("AccountRegistry.Shared.AdminApi.AnzsicSearchResult",[],A$,()=>[[["Item",rl(k$())]],[]])}class mc extends ie{constructor(t,n,r,o,s,i,a,l,c){super(),this.BusinessName=t,this.BusinessNumber=n,this.Address1=r,this.Address2=o,this.City=s,this.Postcode=i,this.State=a,this.Phone=l,this.CountryCode=c}}function I$(){return ht("AccountRegistry.Shared.AdminApi.Write.LegalEntityV2",[],mc,()=>[["BusinessName",j],["BusinessNumber",j],["Address1",j],["Address2",Ee(j)],["City",j],["Postcode",j],["State",Ee(j)],["Phone",j],["CountryCode",j]])}class $c extends ie{constructor(t,n,r,o,s,i,a,l,c){super(),this.Name=t,this.Website=n,this.ContactDetails=r,this.Notes=o,this.LegalEntity=s,this.ExternalId=i,this.ChannelId=a,this.SalesforceInfo=l,this.AnzsicClassifier=c}}function T$(){return ht("AccountRegistry.Shared.AdminApi.Write.AccountPost",[],$c,()=>[["Name",j],["Website",j],["ContactDetails",bi()],["Notes",Ee(j)],["LegalEntity",Ee(I$())],["ExternalId",Ee(j)],["ChannelId",Ee(j)],["SalesforceInfo",Ee(d$())],["AnzsicClassifier",Ee(f$())]])}class N$ extends ie{constructor(t){super(),this.Id=t}}function M$(){return ht("AccountRegistry.Shared.AdminApi.Write.AccountPostResponse",[],N$,()=>[["Id",j]])}var ao,ee,gc,qn,wc,_c,vi,xi,Ci,Si,bc,lo={},yc=[],R$=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,ss=Array.isArray;function $n(e,t){for(var n in t)e[n]=t[n];return e}function vc(e){var t=e.parentNode;t&&t.removeChild(e)}function m(e,t,n){var r,o,s,i={};for(s in t)s=="key"?r=t[s]:s=="ref"?o=t[s]:i[s]=t[s];if(arguments.length>2&&(i.children=arguments.length>3?ao.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(s in e.defaultProps)i[s]===void 0&&(i[s]=e.defaultProps[s]);return co(e,i,r,o,null)}function co(e,t,n,r,o){var s={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:o??++gc,__i:-1,__u:0};return o==null&&ee.vnode!=null&&ee.vnode(s),s}function ki(){return{current:null}}function Pe(e){return e.children}function Ht(e,t){this.props=e,this.context=t}function Kn(e,t){if(t==null)return e.__?Kn(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"?Kn(e):null}function xc(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 xc(e)}}function Ai(e){(!e.__d&&(e.__d=!0)&&qn.push(e)&&!is.__r++||wc!==ee.debounceRendering)&&((wc=ee.debounceRendering)||_c)(is)}function is(){var e,t,n,r,o,s,i,a;for(qn.sort(vi);e=qn.shift();)e.__d&&(t=qn.length,r=void 0,s=(o=(n=e).__v).__e,i=[],a=[],n.__P&&((r=$n({},o)).__v=o.__v+1,ee.vnode&&ee.vnode(r),Ei(n.__P,r,o,n.__n,n.__P.namespaceURI,32&o.__u?[s]:null,i,s??Kn(o),!!(32&o.__u),a),r.__v=o.__v,r.__.__k[r.__i]=r,Ec(i,r,a),r.__e!=s&&xc(r)),qn.length>t&&qn.sort(vi));is.__r=0}function Cc(e,t,n,r,o,s,i,a,l,c,d){var u,h,f,p,_,$=r&&r.__k||yc,v=t.length;for(n.__d=l,P$(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?lo:$[f.__i]||lo,f.__i=u,Ei(e,f,h,o,s,i,a,l,c,d),p=f.__e,f.ref&&h.ref!=f.ref&&(h.ref&&Ii(h.ref,null,f),d.push(f.ref,f.__c||p,f)),_==null&&p!=null&&(_=p),65536&f.__u||h.__k===f.__k?(l&&!l.isConnected&&(l=Kn(h)),l=Sc(f,l,e)):typeof f.type=="function"&&f.__d!==void 0?l=f.__d:p&&(l=p.nextSibling),f.__d=void 0,f.__u&=-196609);n.__d=l,n.__e=_}function P$(e,t,n){var r,o,s,i,a,l=t.length,c=n.length,d=c,u=0;for(e.__k=[],r=0;r<l;r++)i=r+u,(o=e.__k[r]=(o=t[r])==null||typeof o=="boolean"||typeof o=="function"?null:typeof o=="string"||typeof o=="number"||typeof o=="bigint"||o.constructor==String?co(null,o,null,null,null):ss(o)?co(Pe,{children:o},null,null,null):o.constructor===void 0&&o.__b>0?co(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o)!=null?(o.__=e,o.__b=e.__b+1,a=O$(o,n,i,d),o.__i=a,s=null,a!==-1&&(d--,(s=n[a])&&(s.__u|=131072)),s==null||s.__v===null?(a==-1&&u--,typeof o.type!="function"&&(o.__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&&(o.__u|=65536))):(s=n[i])&&s.key==null&&s.__e&&(131072&s.__u)==0&&(s.__e==e.__d&&(e.__d=Kn(s)),Ti(s,s,!1),n[i]=null,d--);if(d)for(r=0;r<c;r++)(s=n[r])!=null&&(131072&s.__u)==0&&(s.__e==e.__d&&(e.__d=Kn(s)),Ti(s,s))}function Sc(e,t,n){var r,o;if(typeof e.type=="function"){for(r=e.__k,o=0;r&&o<r.length;o++)r[o]&&(r[o].__=e,t=Sc(r[o],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"||(ss(e)?e.some(function(n){gn(n,t)}):t.push(e)),t}function O$(e,t,n,r){var o=e.key,s=e.type,i=n-1,a=n+1,l=t[n];if(l===null||l&&o==l.key&&s===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&&o==l.key&&s===l.type)return i;i--}if(a<t.length){if((l=t[a])&&(131072&l.__u)==0&&o==l.key&&s===l.type)return a;a++}}return-1}function kc(e,t,n){t[0]==="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||R$.test(t)?n:n+"px"}function as(e,t,n,r,o){var s;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||kc(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||kc(e.style,t,n[t])}else if(t[0]==="o"&&t[1]==="n")s=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+s]=n,n?r?n.u=r.u:(n.u=xi,e.addEventListener(t,s?Si:Ci,s)):e.removeEventListener(t,s?Si:Ci,s);else{if(o=="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 Ac(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t.t==null)t.t=xi++;else if(t.t<n.u)return;return n(ee.event?ee.event(t):t)}}}function Ei(e,t,n,r,o,s,i,a,l,c){var d,u,h,f,p,_,$,v,y,C,R,L,X,$e,be,ue=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(l=!!(32&n.__u),s=[a=t.__e=n.__e]),(d=ee.__b)&&d(t);e:if(typeof ue=="function")try{if(v=t.props,y=(d=ue.contextType)&&r[d.__c],C=d?y?y.props.value:d.__:r,n.__c?$=(u=t.__c=n.__c).__=u.__E:("prototype"in ue&&ue.prototype.render?t.__c=u=new ue(v,C):(t.__c=u=new Ht(v,C),u.constructor=ue,u.render=F$),y&&y.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),ue.getDerivedStateFromProps!=null&&(u.__s==u.state&&(u.__s=$n({},u.__s)),$n(u.__s,ue.getDerivedStateFromProps(v,u.__s))),f=u.props,p=u.state,u.__v=t,h)ue.getDerivedStateFromProps==null&&u.componentWillMount!=null&&u.componentWillMount(),u.componentDidMount!=null&&u.__h.push(u.componentDidMount);else{if(ue.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(Y){Y&&(Y.__=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,p,_)})}if(u.context=C,u.props=v,u.__P=e,u.__e=!1,L=ee.__r,X=0,"prototype"in ue&&ue.prototype.render){for(u.state=u.__s,u.__d=!1,L&&L(t),d=u.render(u.props,u.state,u.context),$e=0;$e<u._sb.length;$e++)u.__h.push(u._sb[$e]);u._sb=[]}else do u.__d=!1,L&&L(t),d=u.render(u.props,u.state,u.context),u.state=u.__s;while(u.__d&&++X<25);u.state=u.__s,u.getChildContext!=null&&(r=$n($n({},r),u.getChildContext())),h||u.getSnapshotBeforeUpdate==null||(_=u.getSnapshotBeforeUpdate(f,p)),Cc(e,ss(be=d!=null&&d.type===Pe&&d.key==null?d.props.children:d)?be:[be],t,n,r,o,s,i,a,l,c),u.base=t.__e,t.__u&=-161,u.__h.length&&i.push(u),$&&(u.__E=u.__=null)}catch(Y){t.__v=null,l||s!=null?(t.__e=a,t.__u|=l?160:32,s[s.indexOf(a)]=null):(t.__e=n.__e,t.__k=n.__k),ee.__e(Y,t,n)}else s==null&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=D$(n.__e,t,n,r,o,s,i,l,c);(d=ee.diffed)&&d(t)}function Ec(e,t,n){t.__d=void 0;for(var r=0;r<n.length;r++)Ii(n[r],n[++r],n[++r]);ee.__c&&ee.__c(t,e),e.some(function(o){try{e=o.__h,o.__h=[],e.some(function(s){s.call(o)})}catch(s){ee.__e(s,o.__v)}})}function D$(e,t,n,r,o,s,i,a,l){var c,d,u,h,f,p,_,$=n.props,v=t.props,y=t.type;if(y==="svg"?o="http://www.w3.org/2000/svg":y==="math"?o="http://www.w3.org/1998/Math/MathML":o||(o="http://www.w3.org/1999/xhtml"),s!=null){for(c=0;c<s.length;c++)if((f=s[c])&&"setAttribute"in f==!!y&&(y?f.localName===y:f.nodeType===3)){e=f,s[c]=null;break}}if(e==null){if(y===null)return document.createTextNode(v);e=document.createElementNS(o,y,v.is&&v),s=null,a=!1}if(y===null)$===v||a&&e.data===v||(e.data=v);else{if(s=s&&ao.call(e.childNodes),$=n.props||lo,!a&&s!=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;as(e,c,null,f,o)}}for(c in v)f=v[c],c=="children"?h=f:c=="dangerouslySetInnerHTML"?d=f:c=="value"?p=f:c=="checked"?_=f:c==="key"||a&&typeof f!="function"||$[c]===f||as(e,c,f,$[c],o);if(d)a||u&&(d.__html===u.__html||d.__html===e.innerHTML)||(e.innerHTML=d.__html),t.__k=[];else if(u&&(e.innerHTML=""),Cc(e,ss(h)?h:[h],t,n,r,y==="foreignObject"?"http://www.w3.org/1999/xhtml":o,s,i,s?s[0]:n.__k&&Kn(n,0),a,l),s!=null)for(c=s.length;c--;)s[c]!=null&&vc(s[c]);a||(c="value",p!==void 0&&(p!==e[c]||y==="progress"&&!p||y==="option"&&p!==$[c])&&as(e,c,p,$[c],o),c="checked",_!==void 0&&_!==e[c]&&as(e,c,_,$[c],o))}return e}function Ii(e,t,n){try{typeof e=="function"?e(t):e.current=t}catch(r){ee.__e(r,n)}}function Ti(e,t,n){var r,o;if(ee.unmount&&ee.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||Ii(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(s){ee.__e(s,t)}r.base=r.__P=null}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&Ti(r[o],t,n||typeof e.type!="function");n||e.__e==null||vc(e.__e),e.__c=e.__=e.__e=e.__d=void 0}function F$(e,t,n){return this.constructor(e,n)}function Tn(e,t,n){var r,o,s,i;ee.__&&ee.__(e,t),o=(r=typeof n=="function")?null:n&&n.__k||t.__k,s=[],i=[],Ei(t,e=(!r&&n||t).__k=m(Pe,null,[e]),o||lo,lo,t.namespaceURI,!r&&n?[n]:o?null:t.firstChild?ao.call(t.childNodes):null,s,!r&&n?n:o?o.__e:t.firstChild,r,i),Ec(s,e,i)}function Ni(e,t){Tn(e,t,Ni)}function Mi(e,t,n){var r,o,s,i,a=$n({},e.props);for(s in e.type&&e.type.defaultProps&&(i=e.type.defaultProps),t)s=="key"?r=t[s]:s=="ref"?o=t[s]:a[s]=t[s]===void 0&&i!==void 0?i[s]:t[s];return arguments.length>2&&(a.children=arguments.length>3?ao.call(arguments,2):n),co(e.type,a,r||e.key,o||e.ref,null)}function Nn(e,t){var n={__c:t="__cC"+bc++,__:e,Consumer:function(r,o){return r.children(o)},Provider:function(r){var o,s;return this.getChildContext||(o=[],(s={})[t]=this,this.getChildContext=function(){return s},this.shouldComponentUpdate=function(i){this.props.value!==i.value&&o.some(function(a){a.__e=!0,Ai(a)})},this.sub=function(i){o.push(i);var a=i.componentWillUnmount;i.componentWillUnmount=function(){o.splice(o.indexOf(i),1),a&&a.call(i)}}),r.children}};return n.Provider.__=n.Consumer.contextType=n}ao=yc.slice,ee={__e:function(e,t,n,r){for(var o,s,i;t=t.__;)if((o=t.__c)&&!o.__)try{if((s=o.constructor)&&s.getDerivedStateFromError!=null&&(o.setState(s.getDerivedStateFromError(e)),i=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(e,r||{}),i=o.__d),i)return o.__E=o}catch(a){e=a}throw e}},gc=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),Ai(this))},Ht.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Ai(this))},Ht.prototype.render=Pe,qn=[],_c=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,vi=function(e,t){return e.__v.__b-t.__v.__b},is.__r=0,xi=0,Ci=Ac(!1),Si=Ac(!0),bc=0;var wn,ve,Ri,Ic,Er=0,Tc=[],ls=[],Fe=ee,Nc=Fe.__b,Mc=Fe.__r,Rc=Fe.diffed,Pc=Fe.__c,Oc=Fe.unmount,Dc=Fe.__;function Zn(e,t){Fe.__h&&Fe.__h(ve,e,Er||t),Er=0;var n=ve.__H||(ve.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:ls}),n.__[e]}function We(e){return Er=1,Ir(Vc,e)}function Ir(e,t,n){var r=Zn(wn++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):Vc(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=ve,!ve.u)){var o=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!s||s.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)&&(!s||s.call(this,a,l,c))};ve.u=!0;var s=ve.shouldComponentUpdate,i=ve.componentWillUpdate;ve.componentWillUpdate=function(a,l,c){if(this.__e){var d=s;s=void 0,o(a,l,c),s=d}i&&i.call(this,a,l,c)},ve.shouldComponentUpdate=o}return r.__N||r.__}function Te(e,t){var n=Zn(wn++,3);!Fe.__s&&Vi(n.__H,t)&&(n.__=e,n.i=t,ve.__H.__h.push(n))}function _n(e,t){var n=Zn(wn++,4);!Fe.__s&&Vi(n.__H,t)&&(n.__=e,n.i=t,ve.__h.push(n))}function ce(e){return Er=5,it(function(){return{current:e}},[])}function Pi(e,t,n){Er=6,_n(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 it(e,t){var n=Zn(wn++,7);return Vi(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function Mn(e,t){return Er=8,it(function(){return e},t)}function en(e){var t=ve.context[e.__c],n=Zn(wn++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(ve)),t.props.value):e.__}function Oi(e,t){Fe.useDebugValue&&Fe.useDebugValue(t?t(e):e)}function V$(e){var t=Zn(wn++,10),n=We();return t.__=e,ve.componentDidCatch||(ve.componentDidCatch=function(r,o){t.__&&t.__(r,o),n[1](r)}),[n[0],function(){n[1](void 0)}]}function Di(){var e=Zn(wn++,11);if(!e.__){for(var t=ve.__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 L$(){for(var e;e=Tc.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(cs),e.__H.__h.forEach(Fi),e.__H.__h=[]}catch(t){e.__H.__h=[],Fe.__e(t,e.__v)}}Fe.__b=function(e){ve=null,Nc&&Nc(e)},Fe.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),Dc&&Dc(e,t)},Fe.__r=function(e){Mc&&Mc(e),wn=0;var t=(ve=e.__c).__H;t&&(Ri===ve?(t.__h=[],ve.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=ls,n.__N=n.i=void 0})):(t.__h.forEach(cs),t.__h.forEach(Fi),t.__h=[],wn=0)),Ri=ve},Fe.diffed=function(e){Rc&&Rc(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Tc.push(t)!==1&&Ic===Fe.requestAnimationFrame||((Ic=Fe.requestAnimationFrame)||B$)(L$)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==ls&&(n.__=n.__V),n.i=void 0,n.__V=ls})),Ri=ve=null},Fe.__c=function(e,t){t.some(function(n){try{n.__h.forEach(cs),n.__h=n.__h.filter(function(r){return!r.__||Fi(r)})}catch(r){t.some(function(o){o.__h&&(o.__h=[])}),t=[],Fe.__e(r,n.__v)}}),Pc&&Pc(e,t)},Fe.unmount=function(e){Oc&&Oc(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{cs(r)}catch(o){t=o}}),n.__H=void 0,t&&Fe.__e(t,n.__v))};var Fc=typeof requestAnimationFrame=="function";function B$(e){var t,n=function(){clearTimeout(r),Fc&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);Fc&&(t=requestAnimationFrame(n))}function cs(e){var t=ve,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),ve=t}function Fi(e){var t=ve;e.__c=e.__(),ve=t}function Vi(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function Vc(e,t){return typeof t=="function"?t(e):t}function Lc(e,t){for(var n in t)e[n]=t[n];return e}function Li(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 us(e,t){this.props=e,this.context=t}function Bc(e,t){function n(o){var s=this.props.ref,i=s==o.ref;return!i&&s&&(s.call?s(null):s.current=null),t?!t(this.props,o)||!i:Li(this.props,o)}function r(o){return this.shouldComponentUpdate=n,m(e,o)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(us.prototype=new Ht).isPureReactComponent=!0,us.prototype.shouldComponentUpdate=function(e,t){return Li(this.props,e)||Li(this.state,t)};var Uc=ee.__b;ee.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Uc&&Uc(e)};var U$=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function Rn(e){function t(n){var r=Lc({},n);return delete r.ref,e(r,n.ref||null)}return t.$$typeof=U$,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var zc=function(e,t){return e==null?null:gn(gn(e).map(t))},jc={map:zc,forEach:zc,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},z$=ee.__e;ee.__e=function(e,t,n,r){if(e.then){for(var o,s=t;s=s.__;)if((o=s.__c)&&o.__c)return t.__e==null&&(t.__e=n.__e,t.__k=n.__k),o.__c(e,t)}z$(e,t,n,r)};var Hc=ee.unmount;function Wc(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=Lc({},e)).__c!=null&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(r){return Wc(r,t,n)})),e}function Gc(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(r){return Gc(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 uo(){this.__u=0,this.t=null,this.__b=null}function qc(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function Kc(e){var t,n,r;function o(s){if(t||(t=e()).then(function(i){n=i.default||i},function(i){r=i}),r)throw r;if(!n)throw t;return m(n,s)}return o.displayName="Lazy",o.__f=!0,o}function Tr(){this.u=null,this.o=null}ee.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),Hc&&Hc(e)},(uo.prototype=new Ht).__c=function(e,t){var n=t.__c,r=this;r.t==null&&(r.t=[]),r.t.push(n);var o=qc(r.__v),s=!1,i=function(){s||(s=!0,n.__R=null,o?o(a):a())};n.__R=i;var a=function(){if(!--r.__u){if(r.state.__a){var l=r.state.__a;r.__v.__k[0]=Gc(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)},uo.prototype.componentWillUnmount=function(){this.t=[]},uo.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]=Wc(this.__b,n,r.__O=r.__P)}this.__b=null}var o=t.__a&&m(Pe,null,e.fallback);return o&&(o.__u&=-33),[m(Pe,null,t.__a?null:e.children),o]};var Zc=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 j$(e){return this.getChildContext=function(){return e.context},e.children}function H$(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,o){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(m(j$,{context:t.context},e.__v),t.l)}function Jc(e,t){var n=m(H$,{__v:e,i:t});return n.containerInfo=t,n}(Tr.prototype=new Ht).__a=function(e){var t=this,n=qc(t.__v),r=t.o.get(e);return r[0]++,function(o){var s=function(){t.props.revealOrder?(r.push(o),Zc(t,e,r)):o()};n?n(s):s()}},Tr.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},Tr.prototype.componentDidUpdate=Tr.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,n){Zc(e,n,t)})};var Yc=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,W$=/^(?: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)/,q$=/[A-Z0-9]/g,K$=typeof document<"u",Z$=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};function Xc(e,t,n){return t.__k==null&&(t.textContent=""),Tn(e,t),typeof n=="function"&&n(),e?e.__c:null}function Qc(e,t,n){return Ni(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 eu=ee.event;function J$(){}function Y$(){return this.cancelBubble}function X$(){return this.defaultPrevented}ee.event=function(e){return eu&&(e=eu(e)),e.persist=J$,e.isPropagationStopped=Y$,e.isDefaultPrevented=X$,e.nativeEvent=e};var Bi,Q$={enumerable:!1,configurable:!0,get:function(){return this.class}},tu=ee.vnode;ee.vnode=function(e){typeof e.type=="string"&&function(t){var n=t.props,r=t.type,o={};for(var s in n){var i=n[s];if(!(s==="value"&&"defaultValue"in n&&i==null||K$&&s==="children"&&r==="noscript"||s==="class"||s==="className")){var a=s.toLowerCase();s==="defaultValue"&&"value"in n&&n.value==null?s="value":s==="download"&&i===!0?i="":a==="translate"&&i==="no"?i=!1:a==="ondoubleclick"?s="ondblclick":a!=="onchange"||r!=="input"&&r!=="textarea"||Z$(n.type)?a==="onfocus"?s="onfocusin":a==="onblur"?s="onfocusout":G$.test(s)?s=a:r.indexOf("-")===-1&&W$.test(s)?s=s.replace(q$,"-$&").toLowerCase():i===null&&(i=void 0):a=s="oninput",a==="oninput"&&o[s=a]&&(s="oninputCapture"),o[s]=i}}r=="select"&&o.multiple&&Array.isArray(o.value)&&(o.value=gn(n.children).forEach(function(l){l.props.selected=o.value.indexOf(l.props.value)!=-1})),r=="select"&&o.defaultValue!=null&&(o.value=gn(n.children).forEach(function(l){l.props.selected=o.multiple?o.defaultValue.indexOf(l.props.value)!=-1:o.defaultValue==l.props.value})),n.class&&!n.className?(o.class=n.class,Object.defineProperty(o,"className",Q$)):(n.className&&!n.class||n.class&&n.className)&&(o.class=o.className=n.className),t.props=o}(e),e.$$typeof=Yc,tu&&tu(e)};var nu=ee.__r;ee.__r=function(e){nu&&nu(e),Bi=e.__c};var ru=ee.diffed;ee.diffed=function(e){ru&&ru(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),Bi=null};var ou={ReactCurrentDispatcher:{current:{readContext:function(e){return Bi.__n[e.__c].props.value},useCallback:Mn,useContext:en,useDebugValue:Oi,useDeferredValue:Hi,useEffect:Te,useId:Di,useImperativeHandle:Pi,useInsertionEffect:Gi,useLayoutEffect:_n,useMemo:it,useReducer:Ir,useRef:ce,useState:We,useSyncExternalStore:qi,useTransition:Wi}}},e0="17.0.2";function su(e){return m.bind(null,e)}function Nr(e){return!!e&&e.$$typeof===Yc}function iu(e){return Nr(e)&&e.type===Pe}function au(e){return!!e&&!!e.displayName&&(typeof e.displayName=="string"||e.displayName instanceof String)&&e.displayName.startsWith("Memo(")}function Ui(e){return Nr(e)?Mi.apply(null,arguments):e}function lu(e){return!!e.__k&&(Tn(null,e),!0)}function cu(e){return e&&(e.base||e.nodeType===1&&e)||null}var uu=function(e,t){return e(t)},zi=function(e,t){return e(t)},du=Pe;function ji(e){e()}function Hi(e){return e}function Wi(){return[!1,ji]}var Gi=_n,fu=Nr;function qi(e,t){var n=t(),r=We({h:{__:n,v:t}}),o=r[0].h,s=r[1];return _n(function(){o.__=n,o.v=t,Ki(o)&&s({h:o})},[e,n,t]),Te(function(){return Ki(o)&&s({h:o}),e(function(){Ki(o)&&s({h:o})})},[e]),n}function Ki(e){var t,n,r=e.v,o=e.__;try{var s=r();return!((t=o)===(n=s)&&(t!==0||1/t==1/n)||t!=t&&n!=n)}catch{return!0}}var q={useState:We,useId:Di,useReducer:Ir,useEffect:Te,useLayoutEffect:_n,useInsertionEffect:Gi,useTransition:Wi,useDeferredValue:Hi,useSyncExternalStore:qi,startTransition:ji,useRef:ce,useImperativeHandle:Pi,useMemo:it,useCallback:Mn,useContext:en,useDebugValue:Oi,version:"17.0.2",Children:jc,render:Xc,hydrate:Qc,unmountComponentAtNode:lu,createPortal:Jc,createElement:m,createContext:Nn,createFactory:su,cloneElement:Ui,createRef:ki,Fragment:Pe,isValidElement:Nr,isElement:fu,isFragment:iu,isMemo:au,findDOMNode:cu,Component:Ht,PureComponent:us,memo:Bc,forwardRef:Rn,flushSync:zi,unstable_batchedUpdates:uu,StrictMode:du,Suspense:uo,SuspenseList:Tr,lazy:Kc,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:ou};const Zi=Object.freeze(Object.defineProperty({__proto__:null,Children:jc,Component:Ht,Fragment:Pe,PureComponent:us,StrictMode:du,Suspense:uo,SuspenseList:Tr,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:ou,cloneElement:Ui,createContext:Nn,createElement:m,createFactory:su,createPortal:Jc,createRef:ki,default:q,findDOMNode:cu,flushSync:zi,forwardRef:Rn,hydrate:Qc,isElement:fu,isFragment:iu,isMemo:au,isValidElement:Nr,lazy:Kc,memo:Bc,render:Xc,startTransition:ji,unmountComponentAtNode:lu,unstable_batchedUpdates:uu,useCallback:Mn,useContext:en,useDebugValue:Oi,useDeferredValue:Hi,useEffect:Te,useErrorBoundary:V$,useId:Di,useImperativeHandle:Pi,useInsertionEffect:Gi,useLayoutEffect:_n,useMemo:it,useReducer:Ir,useRef:ce,useState:We,useSyncExternalStore:qi,useTransition:Wi,version:e0},Symbol.toStringTag,{value:"Module"})),t0=e=>{Te(()=>{const t=e();return()=>{t.Dispose()}})},n0=(e,t)=>{Te(()=>{const n=e();return()=>{n.Dispose()}},t)},r0=e=>{_n(()=>{const t=e();return()=>{t.Dispose()}})},I=q,o0=t0,hu=n0,s0=r0;function i0(e,t,n,r){const o=I.memo(e,_e(Ye(zt(kn,n),he())));return Sr(s=>{e.displayName=s},ai(t)),s=>{const i=a0(r,s);return I.createElement(o,i)}}function a0(e,t){if(e==null)return t;{const n=e;return t.key=n(t),t}}function fo(e){return{Dispose(){e()}}}function pu(e,t){hu(e,t)}function l0(e){s0(t=>(e(),fo(()=>{})))}function Ji(e){const t=I.useRef(!1);u0(()=>{t.current||(t.current=!0,e())},[])}function mu(e){const t=I.useRef(void 0),n=I.useRef(!1),r=I.useRef(!1);n.current&&(r.current=!0),pu(()=>{let o;return n.current?o=void 0:(n.current=!0,t.current=nt(e()),o=r.current?t.current:void 0),{Dispose(){Sr(s=>{we(s)},ai(o))}}},[])}function c0(e){o0(t=>(e(),fo(()=>{})))}function u0(e,t){hu(n=>(e(),fo(()=>{})),t)}function d0(e,t){const n=Ye(t,[]);return I.useCallback(e,n)}function $u(e){return I.useRef(e)}function f0(e,t,n){return i0(e,void 0,ii(n),ii(t))}function h0(e,t){const n=I.createContext(Ye(t,void 0));return Sr(r=>{n.displayName=r},ai(e)),n}function p0(e,t,n){return I.createElement(e.Provider,{value:t},...n)}function Jn(e){return I.useContext(e)}function gu(e){const t=$u(e),n=d0(r=>t.current(r),[]);return l0(()=>{t.current=e}),n}function Yn(e){return I.useState(e)}class wu{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,o=this.addListener(n==null?t:()=>t(n));return{Dispose(){r.removeListener(o)}}}Dispose(){}}class ds extends Error{constructor(){super("The operation was canceled"),Object.setPrototypeOf(this,ds.prototype)}}class Yi{static get maxTrampolineCallCount(){return 2e3}constructor(){this.callCount=0}incrementAndCheck(){return this.callCount++>Yi.maxTrampolineCallCount}hijack(t){this.callCount=0,setTimeout(t,0)}}function bn(e){return t=>{if(t.cancelToken.isCancelled)t.onCancel(new ds);else if(t.trampoline.incrementAndCheck())t.trampoline.hijack(()=>{try{e(t)}catch(n){t.onError(Lo(n))}});else try{e(t)}catch(n){t.onError(Lo(n))}}}function m0(e,t){return bn(n=>{e({onSuccess:r=>{try{t(r)(n)}catch(o){n.onError(Lo(o))}},onError:n.onError,onCancel:n.onCancel,cancelToken:n.cancelToken,trampoline:n.trampoline})})}function $0(e){return bn(t=>t.onSuccess(e))}class g0{Bind(t,n){return m0(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 o=r.next();return this.While(()=>!o.done,this.Delay(()=>{const s=n(o.value);return o=r.next(),s}))}Return(t){return $0(t)}ReturnFrom(t){return t}TryFinally(t,n){return bn(r=>{t({onSuccess:o=>{n(),r.onSuccess(o)},onError:o=>{n(),r.onError(o)},onCancel:o=>{n(),r.onCancel(o)},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:o=>{try{n(o)(r)}catch(s){r.onError(Lo(s))}}})})}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 W=new g0;function Xi(e){}function w0(e){return new wu(!1)}function _0(e){e.cancel()}function b0(e){return e!=null&&e.isCancelled}const _u=new wu;function y0(e){return bn(t=>{e({onSuccess:n=>t.onSuccess(Am(n)),onError:n=>t.onSuccess(Em(n)),onCancel:t.onCancel,cancelToken:t.cancelToken,trampoline:t.trampoline})})}function v0(e){return bn(t=>e([t.onSuccess,t.onError,t.onCancel]))}function x0(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 ds)})})}function C0(e,t){return bu(e,t)}function Mr(e,t){return C0(e,t)}function bu(e,t,n,r,o){typeof t!="function"&&(o=t,t=void 0);const s=new Yi;e({onSuccess:t||Xi,onError:n||Xi,onCancel:r||Xi,cancelToken:o||_u,trampoline:s})}function S0(e,t){return new Promise((n,r)=>bu(e,n,r,r,_u))}class yu{constructor(t,n){this.k=t,this.v=n}}function fs(e,t){return new yu(e,t)}function mt(e){return e.k}function Tt(e){return e.v}class Ge extends yu{constructor(t,n,r,o,s){super(t,n),this.left=r,this.right=o,this.h=s|0}}function hs(e,t,n,r,o){return new Ge(e,t,n,r,o)}function $t(e){return e.left}function gt(e){return e.right}function Xn(e){return e.h}function Sv(){}function vu(e,t){e:for(;;){const n=e,r=t;if(r!=null){const o=T(r);if(o instanceof Ge){const s=o;e=vu(n+1,$t(s)),t=gt(s);continue e}else return n+1|0}else return n|0}}function k0(e){return vu(0,e)}function Wt(e,t,n,r){let o,s,i;const a=e;if(a!=null){const u=T(a);i=u instanceof Ge?(o=u,Xn(o)):1}else i=0;let l;const c=r;if(c!=null){const u=T(c);l=u instanceof Ge?(s=u,Xn(s)):1}else l=0;const d=(i<l?l:i)|0;return d===0?fs(t,n):hs(t,n,e,r,d+1)}function xu(e,t,n,r){let o,s,i,a,l,c,d,u,h;const f=e;if(f!=null){const $=T(f);h=$ instanceof Ge?(o=$,Xn(o)):1}else h=0;let p;const _=r;if(_!=null){const $=T(_);p=$ instanceof Ge?(s=$,Xn(s)):1}else p=0;if(p>h+2){const $=T(r);if($ instanceof Ge){const v=$;if(i=$t(v),(i!=null?(a=T(i),a instanceof Ge?(l=a,Xn(l)):1):0)>h+1){const y=T($t(v));if(y instanceof Ge){const C=y;return Wt(Wt(e,t,n,$t(C)),mt(C),Tt(C),Wt(gt(C),mt(v),Tt(v),gt(v)))}else throw new Error("internal error: Map.rebalance")}else return Wt(Wt(e,t,n,$t(v)),mt(v),Tt(v),gt(v))}else throw new Error("internal error: Map.rebalance")}else if(h>p+2){const $=T(e);if($ instanceof Ge){const v=$;if(c=gt(v),(c!=null?(d=T(c),d instanceof Ge?(u=d,Xn(u)):1):0)>p+1){const y=T(gt(v));if(y instanceof Ge){const C=y;return Wt(Wt($t(v),mt(v),Tt(v),$t(C)),mt(C),Tt(C),Wt(gt(C),t,n,r))}else throw new Error("internal error: Map.rebalance")}else return Wt($t(v),mt(v),Tt(v),Wt(gt(v),t,n,r))}else throw new Error("internal error: Map.rebalance")}else return Wt(e,t,n,r)}function Rr(e,t,n,r){if(r!=null){const o=T(r),s=e.Compare(t,mt(o))|0;if(o instanceof Ge){const i=o;return s<0?xu(Rr(e,t,n,$t(i)),mt(i),Tt(i),gt(i)):s===0?hs(t,n,$t(i),gt(i),Xn(i)):xu($t(i),mt(i),Tt(i),Rr(e,t,n,gt(i)))}else return s<0?hs(t,n,void 0,r,2):s===0?fs(t,n):hs(t,n,r,void 0,2)}else return fs(t,n)}function Cu(e,t,n){e:for(;;){const r=e,o=t,s=n;if(s!=null){const i=T(s),a=r.Compare(o,mt(i))|0;if(a===0)return nt(Tt(i));if(i instanceof Ge){const l=i;e=r,t=o,n=a<0?$t(l):gt(l);continue e}else return}else return}}function A0(e,t,n){const r=Cu(e,t,n);if(r==null)throw new Error;return T(r)}function E0(e,t,n){e:for(;;){const r=e,o=t,s=n;if(s!=null){const i=T(s),a=r.Compare(o,mt(i))|0;if(i instanceof Ge){const l=i;if(a<0){e=r,t=o,n=$t(l);continue e}else{if(a===0)return!0;e=r,t=o,n=gt(l);continue e}}else return a===0}else return!1}}function Su(e,t){e:for(;;){const n=e,r=t;if(r!=null){const o=T(r);if(o instanceof Ge){const s=o;Su(n,$t(s)),n(mt(s),Tt(s)),e=n,t=gt(s);continue e}else n(mt(o),Tt(o))}break}}function I0(e,t){Su(e,t)}function T0(e,t,n){let r=n;I0((o,s)=>{St(t,r,[o,s]),r=r+1|0},e)}function N0(e,t){return un((n,r)=>Rr(e,r[0],r[1],n),void 0,t)}function M0(e,t,n){e:for(;;){const r=e,o=t,s=n;if(s["System.Collections.IEnumerator.MoveNext"]()){const i=s["System.Collections.Generic.IEnumerator`1.get_Current"]();e=r,t=Rr(r,i[0],i[1],o),n=s;continue e}else return o}}function R0(e,t){let n=void 0;for(let r=0;r<=t.length-1;r++){const o=fe(r,t);n=Rr(e,o[0],o[1],n)}return n}function ku(e,t){if(Xt(t))return R0(e,t);if(t instanceof pt)return N0(e,t);{const n=Re(t);try{return M0(e,void 0,n)}finally{we(n)}}}class P0 extends ie{constructor(t,n){super(),this.stack=t,this.started=n}}function Au(e){e:for(;;){const t=e;if(K(t))return Be();{const n=b(t),r=D(t);if(r!=null){const o=T(r);if(o instanceof Ge){const s=o;e=Oe([$t(s),fs(mt(s),Tt(s)),gt(s)],n);continue e}else return t}else{e=n;continue e}}}}function Eu(e){return new P0(Au(re(e)),!1)}function O0(){throw new Error("enumeration not started")}function D0(){throw new Error("enumeration already finished")}function Iu(e){if(e.started){const t=e.stack;if(K(t))return D0();if(D(t)!=null){const n=T(D(t));if(n instanceof Ge)throw new Error("Please report error: Map iterator, unexpected stack for current");return[mt(n),Tt(n)]}else throw new Error("Please report error: Map iterator, unexpected stack for current")}else return O0()}function F0(e){if(e.started){const t=e.stack;if(K(t))return!1;if(D(t)!=null){if(T(D(t))instanceof Ge)throw new Error("Please report error: Map iterator, unexpected stack for moveNext");return e.stack=Au(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 Tu(e){let t=Eu(e);return{"System.Collections.Generic.IEnumerator`1.get_Current"(){return Iu(t)},"System.Collections.IEnumerator.get_Current"(){return Iu(t)},"System.Collections.IEnumerator.MoveNext"(){return F0(t)},"System.Collections.IEnumerator.Reset"(){t=Eu(e)},Dispose(){}}}class ps{constructor(t,n){this.comparer=t,this.tree=n}GetHashCode(){return U0(this)|0}Equals(t){const n=this;if(t instanceof ps){const r=t,o=Re(n);try{const s=Re(r);try{const i=()=>{const a=o["System.Collections.IEnumerator.MoveNext"]();if(a===s["System.Collections.IEnumerator.MoveNext"]())if(a){const l=o["System.Collections.Generic.IEnumerator`1.get_Current"](),c=s["System.Collections.Generic.IEnumerator`1.get_Current"]();return He(l[0],c[0])&&He(l[1],c[1])?i():!1}else return!0;else return!1};return i()}finally{we(s)}}finally{we(o)}}else return!1}toString(){return"map ["+ae("; ",De(n=>El("({0}, {1})",n[0],n[1]),this))+"]"}get[Symbol.toStringTag](){return"FSharpMap"}toJSON(){const t=this;return Array.from(t)}GetEnumerator(){return Tu(this.tree)}[Symbol.iterator](){return qr(Re(this))}"System.Collections.IEnumerable.GetEnumerator"(){return Tu(this.tree)}CompareTo(t){const n=this;if(t instanceof ps)return gm((o,s)=>{const i=n.comparer.Compare(o[0],s[0])|0;return(i!==0?i:Ft(o[1],s[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 Mu(n,t[0])&&He(Nu(n,t[0]),t[1])}"System.Collections.Generic.ICollection`1.CopyToZ3B4C077E"(t,n){T0(this.tree,t,n)}"System.Collections.Generic.ICollection`1.get_IsReadOnly"(){return!0}"System.Collections.Generic.ICollection`1.get_Count"(){return Qi(this)|0}"System.Collections.Generic.IReadOnlyCollection`1.get_Count"(){return Qi(this)|0}get size(){return Qi(this)|0}clear(){throw new Error("Map cannot be mutated")}delete(t){throw new Error("Map cannot be mutated")}entries(){return De(n=>[n[0],n[1]],this)}get(t){return Nu(this,t)}has(t){return Mu(this,t)}keys(){return De(n=>n[0],this)}set(t,n){throw new Error("Map cannot be mutated")}values(){return De(n=>n[1],this)}forEach(t,n){const r=this;Sr(o=>{t(o[1],o[0],r)},r)}}function ms(e,t){return new ps(e,t)}function V0(e){return ms(e,void 0)}function L0(e,t,n){return ms(e.comparer,Rr(e.comparer,t,n,e.tree))}function Nu(e,t){return A0(e.comparer,t,e.tree)}function Qi(e){return k0(e.tree)}function Mu(e,t){return E0(e.comparer,t,e.tree)}function B0(e,t){return Cu(e.comparer,t,e.tree)}function U0(e){const t=(o,s)=>(o<<1)+s+631;let n=0;const r=Re(e);try{for(;r["System.Collections.IEnumerator.MoveNext"]();){const o=r["System.Collections.Generic.IEnumerator`1.get_Current"]();n=t(n,ln(o[0]))|0,n=t(n,ln(o[1]))|0}}finally{we(r)}return n|0}function Ru(e,t,n){return L0(n,e,t)}function Pu(e,t){return B0(t,e)}function z0(e,t){return ms(t,ku(t,e))}function j0(e,t){return ms(t,ku(t,e))}function ea(e){return V0(e)}class pe extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["HasNotStartedYet","InProgress","Resolved","Failed"]}}function Ou(e,t){const n=$u(w0());return mu(()=>fo(()=>{_0(n.current)})),gu(r=>{b0(n.current)||Mr(W.Delay(()=>W.TryWith(W.Delay(()=>(t(new pe(1,[])),W.Bind(e(r),o=>(t(new pe(2,[o])),W.Zero())))),o=>(t(new pe(3,[o])),W.Zero()))),n.current)})}class H0{constructor(t,n,r){this.OnNext=t,this.OnError=n||(o=>{}),this.OnCompleted=r||(()=>{})}}function W0(e,t){t.Subscribe(new H0(e))}class G0{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 K0(t=>{this._add(t)},t=>{this._remove(t)})}Trigger(t,n){let r=null;const o=n===void 0?t:(r=t,n);this.delegates.forEach(s=>{s(r,o)})}}let q0=class extends G0{};function K0(e,t){return{AddHandler(n){e(n)},RemoveHandler(n){t(n)},Subscribe(n){const r=(o,s)=>n.OnNext(s);return e(r),{Dispose(){t(r)}}}}}class Z0{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 q0}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 J0(e,t){console.error(nt(e),t)}function Y0(e,t){let n,r=new Z0(e);r.AutoReset=!1,n=r,W0(t,n.Elapsed()),n.Enabled=!0,n.Start()}function Du(e,t,n){Qo(r=>{try{r(t)}catch(o){e(o)}},n)}function Le(){return Be()}function Xe(e){return re(e)}function Fu(e,t,n,r){return re(o=>{e(W.Delay(()=>W.Bind(y0(t(n)),s=>{const i=s;return i.tag===0&&o(r(i.fields[0])),W.Zero()})))})}function Vu(e){Y0(1,t=>{Mr(e)})}function ho(e,t){if(t.indexOf(e)===0)return t}function Lu(e,t){if(up(t,e))return t}function X0(e){return t=>{let n,r,o,s,i,a;return n=ho("/",t),n!=null?(r=n,"#"+r):(o=ho("#/",t),o!=null?(s=o,s):(i=ho("#",t),i!=null?(a=i,"#/"+Tl(a,1,a.length-1)):"#/"+t))}}function Qn(e,t){return X0()(ae("/",Wn(n=>n.indexOf("?")>=0||n.indexOf("#")===0||n.indexOf("/")===0?n:encodeURIComponent(n),e)))}function ct(e,t,n){history.pushState(void 0,"",Qn(e));const r=document.createEvent("CustomEvent");r.initEvent("CUSTOM_NAVIGATION_EVENT",!0,!0),window.dispatchEvent(r)}function Bu(e,t){return Ap(n=>{if(Il(n))return Be();{const r=hp(n,"#");if(r==="?")return Be();if(ho("?",r)!=null)return re(r);{const o=r.split("?");if(!ci((s,i)=>s===i,o)&&o.length===1){const s=fe(0,o);return re(decodeURIComponent(s))}else if(!ci((s,i)=>s===i,o)&&o.length===2)if(fe(1,o)===""){const s=fe(0,o);return re(decodeURIComponent(s))}else{const s=fe(0,o),i=fe(1,o);return k([decodeURIComponent(s),"?"+i])}else return Be()}}},k(si(ho("#",e)!=null?Tl(e,1,e.length-1):t===1&&(Lu("#",e)!=null||Lu("#/",e)!=null)?"":e,["/"],void 0,0)))}function Q0(e,t,n){return t(Bu(e===2?window.location.pathname+window.location.search:window.location.hash,e))}const eg=f0(e=>{const t=gu(r=>{const o=Ye(e.onUrlChanged,s=>{});Q0(Ye(e.hashMode,1),o)});mu(()=>(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),fo(()=>{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)}))),Ji(()=>{const r=document.createEvent("CustomEvent");r.initEvent("CUSTOM_NAVIGATION_EVENT",!0,!0),window.dispatchEvent(r)});const n=e.application;return n??he()});class yn extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["AccountId","Name"]}}class er extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Asc","Desc"]}}function Uu(e){return e.tag===0?new er(1,[]):new er(0,[])}class po extends z{constructor(t,n){super(),this.tag=0,this.fields=[t,n]}cases(){return["Sort"]}}const tg=new po(new yn(1,[]),new er(0,[]));function ng(e){return[e.fields[0],e.fields[1]]}function zu(e){return e.fields[0]}function ju(e){return e.fields[1]}function Hu(e,t){const n=t.fields[0],r=t.fields[1];return e.tag===1?n.tag===1?new po(new yn(1,[]),Uu(r)):new po(new yn(1,[]),new er(0,[])):n.tag===0?new po(new yn(0,[]),Uu(r)):new po(new yn(0,[]),new er(0,[]))}class Wu extends z{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["SearchText"]}}const rg=new Wu("");function og(e){return new Wu(e)}function Gu(e){return e.fields[0]}class sg extends z{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["PageSize"]}}function ig(e){return new sg(e)}function qu(e){return e.fields[0]}class ta extends ie{constructor(t,n,r){super(),this.SearchText=t,this.Sort=n,this.PageSize=r}}class ag extends z{constructor(t,n){super(),this.tag=0,this.fields=[t,n]}cases(){return["AccountKey"]}}function lg(e){return[e.fields[0],e.fields[1]]}function cg(e,t){return new ag(e,t)}function ug(e){const t=lg(e);return[t[0],t[1]]}function dg(){return new Cm([],{Equals:He,GetHashCode:vh})}function fg(e,t){let n,r=he();if(n=[Wl(e,t,new ft(()=>r,o=>{r=o})),r],n[0])return n[1]}function Ku(e,t,n){return e.set(t,n),e}class hg extends ie{constructor(t,n,r,o,s,i){super(),this.StreamId=t,this.Name=n,this.Website=r,this.ContactDetails=o,this.Notes=s,this.AccountProvisioningMode=i}}function pg(e){const t=tc(e.Name);if(t.tag===1)return new w(1,[t.fields[0]]);{const n=nc(e.Website);if(n.tag===1)return new w(1,[n.fields[0]]);{let r;const o=e.ContactDetails;if(o!=null){const s=Xm(o);r=s.tag===1?new w(1,[s.fields[0]]):new w(0,[s.fields[0]])}else r=new w(0,[void 0]);return r.tag===1?new w(1,[r.fields[0]]):new w(0,[new hg(new Ql(e.StreamId),t.fields[0],n.fields[0],r.fields[0],Qm(e.Notes),e.AccountProvisioningMode)])}}}function na(e,t){return Tp(n=>kr(n.StreamId)===es(t),e)}class J 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","NotFound"]}}function Zu(e){let t,n,r,o,s,i,a,l,c,d,u,h,f,p,_,$,v,y,C,R,L,X,$e,be;if(K(e))t=16;else if(D(e)==="account-registry")if(K(b(e)))t=16;else if(D(b(e))==="partners")if(K(b(b(e))))t=0;else if(K(b(b(b(e)))))t=1,n=D(b(b(e)));else switch(D(b(b(b(e))))){case"accounts":{if(K(b(b(b(b(e))))))t=2,r=D(b(b(e)));else if(K(b(b(b(b(b(e)))))))t=8,c=D(b(b(b(b(e))))),d=D(b(b(e)));else switch(D(b(b(b(b(b(e))))))){case"directory":{K(b(b(b(b(b(b(e)))))))?(t=9,u=D(b(b(b(b(e))))),h=D(b(b(e)))):t=16;break}case"users":{K(b(b(b(b(b(b(e)))))))?(t=10,f=D(b(b(b(b(e))))),p=D(b(b(e)))):t=16;break}case"super-configuration":{K(b(b(b(b(b(b(e)))))))?(t=11,_=D(b(b(b(b(e))))),$=D(b(b(e)))):t=16;break}case"benefits-onboarding-configuration":{K(b(b(b(b(b(b(e)))))))?(t=12,v=D(b(b(b(b(e))))),y=D(b(b(e)))):t=16;break}case"bank-details-configuration":{K(b(b(b(b(b(b(e)))))))?(t=13,C=D(b(b(b(b(e))))),R=D(b(b(e)))):t=16;break}case"salary-packaging-configuration":{K(b(b(b(b(b(b(e)))))))?(t=14,L=D(b(b(b(b(e))))),X=D(b(b(e)))):t=16;break}case"workspace":{K(b(b(b(b(b(b(e)))))))?(t=15,$e=D(b(b(b(b(e))))),be=D(b(b(e)))):t=16;break}default:t=16}break}case"super-configuration":{K(b(b(b(b(e)))))?(t=3,o=D(b(b(e)))):t=16;break}case"benefits-onboarding-configuration":{K(b(b(b(b(e)))))?(t=4,s=D(b(b(e)))):t=16;break}case"directory":{K(b(b(b(b(e)))))?(t=5,i=D(b(b(e)))):t=16;break}case"bank-details-configuration":{K(b(b(b(b(e)))))?(t=6,a=D(b(b(e)))):t=16;break}case"workspace":{K(b(b(b(b(e)))))?(t=7,l=D(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,[st(n)]);case 2:return new J(3,[st(r)]);case 3:return new J(4,[st(o)]);case 4:return new J(5,[st(s)]);case 5:return new J(2,[st(i)]);case 6:return new J(6,[st(a)]);case 7:return new J(7,[st(l)]);case 8:return new J(8,[st(d),jt(c)]);case 9:return new J(9,[st(h),jt(u)]);case 10:return new J(10,[st(p),jt(f)]);case 11:return new J(11,[st($),jt(_)]);case 12:return new J(12,[st(y),jt(v)]);case 13:return new J(13,[st(R),jt(C)]);case 14:return new J(14,[st(X),jt(L)]);case 15:return new J(15,[st(be),jt($e)]);default:return new J(16,[])}}function mo(e){const t=(r,o)=>Ie(A(()=>B(E("account-registry"),A(()=>B(E("partners"),A(()=>B(E(lt(r)),A(()=>o)))))))),n=(r,o,s)=>{const i=Ie(A(()=>B(E("accounts"),A(()=>B(E(mn(o)),A(()=>s))))));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 ra(e){switch(e.tag){case 3:{const t=["account-registry","partners",lt(e.fields[0]),"accounts"];return Xe(n=>{ct(k(t))})}case 4:{const t=["account-registry","partners",lt(e.fields[0]),"super-configuration"];return Xe(n=>{ct(k(t))})}case 5:{const t=["account-registry","partners",lt(e.fields[0]),"benefits-onboarding-configuration"];return Xe(n=>{ct(k(t))})}case 6:{const t=["account-registry","partners",lt(e.fields[0]),"bank-details-configuration"];return Xe(n=>{ct(k(t))})}case 2:{const t=["account-registry","partners",lt(e.fields[0]),"directory"];return Xe(n=>{ct(k(t))})}case 7:{const t=["account-registry","partners",lt(e.fields[0]),"workspace"];return Xe(n=>{ct(k(t))})}case 8:{const t=["account-registry","partners",lt(e.fields[0]),"accounts",mn(e.fields[1])];return Xe(n=>{ct(k(t))})}case 9:{const t=["account-registry","partners",lt(e.fields[0]),"accounts",mn(e.fields[1]),"directory"];return Xe(n=>{ct(k(t))})}case 10:{const t=["account-registry","partners",lt(e.fields[0]),"accounts",mn(e.fields[1]),"users"];return Xe(n=>{ct(k(t))})}case 11:{const t=["account-registry","partners",lt(e.fields[0]),"accounts",mn(e.fields[1]),"super-configuration"];return Xe(n=>{ct(k(t))})}case 12:{const t=["account-registry","partners",lt(e.fields[0]),"accounts",mn(e.fields[1]),"benefits-onboarding-configuration"];return Xe(n=>{ct(k(t))})}case 13:{const t=["account-registry","partners",lt(e.fields[0]),"accounts",mn(e.fields[1]),"bank-details-configuration"];return Xe(n=>{ct(k(t))})}case 14:{const t=["account-registry","partners",lt(e.fields[0]),"accounts",mn(e.fields[1]),"salary-packaging-configuration"];return Xe(n=>{ct(k(t))})}case 15:{const t=["account-registry","partners",lt(e.fields[0]),"accounts",mn(e.fields[1]),"workspace"];return Xe(n=>{ct(k(t))})}case 0:case 16:return Le();default:{const t=["account-registry","partners",lt(e.fields[0])];return Xe(n=>{ct(k(t))})}}}function mg(e,t){switch(t.tag){case 1:return new pe(1,[]);case 2:return t.fields[0].tag===1?new pe(2,[new w(1,[t.fields[0].fields[0]])]):new pe(2,[new w(0,[e(t.fields[0].fields[0])])]);case 3:return new pe(3,[t.fields[0]]);default:return new pe(0,[])}}class Ju extends ie{constructor(t,n){super(),this.ReadProtectedData=t,this.ProvisionAccounts=n}}function $g(e){return new Ju(Vl("AccountRegistry.ReadProtectedData",e.Roles,{Equals:(t,n)=>t===n,GetHashCode:$r}),Vl("AccountRegistry.ProvisionAccounts",e.Roles,{Equals:(t,n)=>t===n,GetHashCode:$r}))}const gg=new Ju(!1,!1);class H extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["BadPrimitive","BadPrimitiveExtra","BadType","BadField","BadPath","TooSmallArray","FailMessage","BadOneOf"]}}class tn extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["PascalCase","CamelCase","SnakeCase"]}}function Yu(e){return e.slice(void 0,1).toLowerCase()+e.slice(1,e.length)}function Xu(e,t){switch(e.tag){case 2:return ap(Yu(t),"[A-Z]","_$0").toLowerCase();case 0:return t;default:return Yu(t)}}function Qu(e,t){wg(t);const n=new Date(e);return n.offset=t??new Date().getTimezoneOffset()*-6e4,n}function wg(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 _g(){return Qu(-621355968e5,0)}function bg(e){const[t,n]=ml(e),r=n==null?t.getTimezoneOffset()*-6e4:n==="Z"?0:n*6e4;return Qu(t.getTime(),r)}function yg(e,t){try{return t.contents=bg(e),!0}catch{return!1}}function $o(e){return e<0?Math.ceil(e):Math.floor(e)}function ed(e=0,t=0,n=0,r=0,o=0){switch(arguments.length){case 1:return vg(arguments[0]);case 3:e=0,t=arguments[0],n=arguments[1],r=arguments[2],o=0;break}return e*864e5+t*36e5+n*6e4+r*1e3+o}function vg(e){return Number(BigInt(e)/10000n)}function xg(e){return $o(e/864e5)}function Cg(e){return $o(e%864e5/36e5)}function Sg(e){return $o(e%36e5/6e4)}function kg(e){return $o(e%6e4/1e3)}function Ag(e){return $o(e%1e3)}function Eg(e,t="c",n){if(["c","g","G"].indexOf(t)===-1)throw new Error("Custom formats are not supported");const r=Math.abs(xg(e)),o=Math.abs(Cg(e)),s=Math.abs(Sg(e)),i=Math.abs(kg(e)),a=Math.abs(Ag(e));return`${e<0?"-":""}${r===0&&(t==="c"||t==="g")?"":t==="c"?r+".":r+":"}${t==="g"?o:ge(o,2)}:${ge(s,2)}:${ge(i,2)}${a===0&&(t==="c"||t==="g")?"":t==="g"?"."+ge(a,3):"."+$h(a,3,7)}`}function Ig(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 ed(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 o=0,s=0,i=0;const a=r[1]!=null&&r[1]==="-"?-1:1,l=+r[4],c=+r[5];if(r[3]!=null&&(o=+r[3]),r[7]!=null&&(i=+r[7]),r[8]!=null)switch(r[8].length){case 1:s=+r[8]*100;break;case 2:s=+r[8]*10;break;case 3:s=+r[8];break;case 4:s=+r[8]/10;break;case 5:s=+r[8]/100;break;case 6:s=+r[8]/1e3;break;case 7:s=+r[8]/1e4;break;default:throw new Error(`String '${e}' was not recognized as a valid TimeSpan.`)}return a*ed(o,l,c,i,s)}}throw new Error(`String '${e}' was not recognized as a valid TimeSpan.`)}function Tg(e,t){try{return t.contents=Ig(e),!0}catch{return!1}}class td{constructor(t){this.k=t}}function Nt(e){return new td(e)}function Q(e){return e.k}class me extends td{constructor(t,n,r,o){super(t),this.left=n,this.right=r,this.h=o|0}}function Mt(e,t,n,r){return new me(e,t,n,r)}function Ne(e){return e.left}function xe(e){return e.right}function Pr(e){return e.h}function kv(){}function nd(e,t){e:for(;;){const n=e,r=t;if(n!=null){const o=T(n);if(o instanceof me){const s=o;e=Ne(s),t=nd(xe(s),r+1);continue e}else return r+1|0}else return r|0}}function Ng(e){return nd(e,0)}function Gt(e,t,n){let r,o,s;const i=e;if(i!=null){const d=T(i);s=d instanceof me?(r=d,Pr(r)):1}else s=0;let a;const l=n;if(l!=null){const d=T(l);a=d instanceof me?(o=d,Pr(o)):1}else a=0;const c=(s<a?a:s)|0;return c===0?Nt(t):Mt(t,e,n,c+1)}function rd(e,t,n){let r,o,s,i,a,l,c,d,u;const h=e;if(h!=null){const _=T(h);u=_ instanceof me?(r=_,Pr(r)):1}else u=0;let f;const p=n;if(p!=null){const _=T(p);f=_ instanceof me?(o=_,Pr(o)):1}else f=0;if(f>u+2){const _=T(n);if(_ instanceof me){const $=_;if(s=Ne($),(s!=null?(i=T(s),i instanceof me?(a=i,Pr(a)):1):0)>u+1){const v=T(Ne($));if(v instanceof me){const y=v;return Gt(Gt(e,t,Ne(y)),Q(y),Gt(xe(y),Q($),xe($)))}else throw new Error("internal error: Set.rebalance")}else return Gt(Gt(e,t,Ne($)),Q($),xe($))}else throw new Error("internal error: Set.rebalance")}else if(u>f+2){const _=T(e);if(_ instanceof me){const $=_;if(l=xe($),(l!=null?(c=T(l),c instanceof me?(d=c,Pr(d)):1):0)>f+1){const v=T(xe($));if(v instanceof me){const y=v;return Gt(Gt(Ne($),Q($),Ne(y)),Q(y),Gt(xe(y),t,n))}else throw new Error("internal error: Set.rebalance")}else return Gt(Ne($),Q($),Gt(xe($),t,n))}else throw new Error("internal error: Set.rebalance")}else return Gt(e,t,n)}function Or(e,t,n){if(n!=null){const r=T(n),o=e.Compare(t,Q(r))|0;if(r instanceof me){const s=r;return o<0?rd(Or(e,t,Ne(s)),Q(s),xe(s)):o===0?n:rd(Ne(s),Q(s),Or(e,t,xe(s)))}else{const s=e.Compare(t,Q(r))|0;return s<0?Mt(t,void 0,n,2):s===0?n:Mt(t,n,void 0,2)}}else return Nt(t)}function od(e,t,n){e:for(;;){const r=e,o=t,s=n;if(s!=null){const i=T(s),a=r.Compare(o,Q(i))|0;if(i instanceof me){const l=i;if(a<0){e=r,t=o,n=Ne(l);continue e}else{if(a===0)return!0;e=r,t=o,n=xe(l);continue e}}else return a===0}else return!1}}function sd(e,t){e:for(;;){const n=e,r=t;if(r!=null){const o=T(r);if(o instanceof me){const s=o;sd(n,Ne(s)),n(Q(s)),e=n,t=xe(s);continue e}else n(Q(o))}break}}class Mg extends ie{constructor(t,n){super(),this.stack=t,this.started=n}}function id(e){e:for(;;){const t=e;if(K(t))return Be();{const n=D(t),r=b(t);if(n!=null){const o=T(n);if(o instanceof me){const s=o;e=Oe([Ne(s),Nt(Q(s)),xe(s)],r);continue e}else return t}else{e=r;continue e}}}}function ad(e){return new Mg(id(re(e)),!1)}function Rg(){throw new Error("Enumeration not started")}function Pg(){throw new Error("Enumeration already started")}function ld(e){if(e.started){const t=e.stack;if(K(t))return Pg();if(D(t)!=null){const n=T(D(t));return Q(n)}else throw new Error("Please report error: Set iterator, unexpected stack for current")}else return Rg()}function Og(e){if(e.started){const t=e.stack;if(K(t))return!1;if(D(t)!=null){if(T(D(t))instanceof me)throw new Error("Please report error: Set iterator, unexpected stack for moveNext");return e.stack=id(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 cd(e){let t=ad(e);return{"System.Collections.Generic.IEnumerator`1.get_Current"(){return ld(t)},"System.Collections.IEnumerator.get_Current"(){return ld(t)},"System.Collections.IEnumerator.MoveNext"(){return Og(t)},"System.Collections.IEnumerator.Reset"(){t=ad(e)},Dispose(){}}}function Dg(e,t,n){e:for(;;){const r=e,o=t,s=n;if(K(o))return K(s)?0:-1;if(K(s))return 1;if(D(s)!=null)if(D(o)!=null){const i=T(D(o)),a=T(D(s));if(i instanceof me){const l=i;if(Ne(l)==null)if(a instanceof me){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=kt(xe(l),b(o)),n=kt(xe(c),b(s));continue e}else{let d,u,h,f,p;switch(K(o)?K(s)?d=2:D(s)!=null?(d=1,f=b(s),p=T(D(s))):d=2:D(o)!=null?(d=0,u=b(o),h=T(D(o))):K(s)?d=2:D(s)!=null?(d=1,f=b(s),p=T(D(s))):d=2,d){case 0:if(h instanceof me){const _=h;e=r,t=Oe([Ne(_),Mt(Q(_),void 0,xe(_),0)],u),n=s;continue e}else{e=r,t=Oe([void 0,Nt(Q(h))],u),n=s;continue e}case 1:if(p instanceof me){const _=p;e=r,t=o,n=Oe([Ne(_),Mt(Q(_),void 0,xe(_),0)],f);continue e}else{e=r,t=o,n=Oe([void 0,Nt(Q(p))],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=kt(xe(l),b(o)),n=kt(void 0,b(s));continue e}else{let c,d,u,h,f;switch(K(o)?K(s)?c=2:D(s)!=null?(c=1,h=b(s),f=T(D(s))):c=2:D(o)!=null?(c=0,d=b(o),u=T(D(o))):K(s)?c=2:D(s)!=null?(c=1,h=b(s),f=T(D(s))):c=2,c){case 0:if(u instanceof me){const p=u;e=r,t=Oe([Ne(p),Mt(Q(p),void 0,xe(p),0)],d),n=s;continue e}else{e=r,t=Oe([void 0,Nt(Q(u))],d),n=s;continue e}case 1:if(f instanceof me){const p=f;e=r,t=o,n=Oe([Ne(p),Mt(Q(p),void 0,xe(p),0)],h);continue e}else{e=r,t=o,n=Oe([void 0,Nt(Q(f))],h);continue e}default:throw new Error("unexpected state in SetTree.compareStacks")}}}else if(a instanceof me){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=kt(void 0,b(o)),n=kt(xe(l),b(s));continue e}else{let c,d,u,h,f;switch(K(o)?K(s)?c=2:D(s)!=null?(c=1,h=b(s),f=T(D(s))):c=2:D(o)!=null?(c=0,d=b(o),u=T(D(o))):K(s)?c=2:D(s)!=null?(c=1,h=b(s),f=T(D(s))):c=2,c){case 0:if(u instanceof me){const p=u;e=r,t=Oe([Ne(p),Mt(Q(p),void 0,xe(p),0)],d),n=s;continue e}else{e=r,t=Oe([void 0,Nt(Q(u))],d),n=s;continue e}case 1:if(f instanceof me){const p=f;e=r,t=o,n=Oe([Ne(p),Mt(Q(p),void 0,xe(p),0)],h);continue e}else{e=r,t=o,n=Oe([void 0,Nt(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(o),n=b(s);continue e}}else{T(D(s));let i,a,l,c,d;switch(K(o)?K(s)?i=2:D(s)!=null?(i=1,c=b(s),d=T(D(s))):i=2:D(o)!=null?(i=0,a=b(o),l=T(D(o))):K(s)?i=2:D(s)!=null?(i=1,c=b(s),d=T(D(s))):i=2,i){case 0:if(l instanceof me){const u=l;e=r,t=Oe([Ne(u),Mt(Q(u),void 0,xe(u),0)],a),n=s;continue e}else{e=r,t=Oe([void 0,Nt(Q(l))],a),n=s;continue e}case 1:if(d instanceof me){const u=d;e=r,t=o,n=Oe([Ne(u),Mt(Q(u),void 0,xe(u),0)],c);continue e}else{e=r,t=o,n=Oe([void 0,Nt(Q(d))],c);continue e}default:throw new Error("unexpected state in SetTree.compareStacks")}}else if(D(o)!=null){T(D(o));let i,a,l,c,d;switch(K(o)?K(s)?i=2:D(s)!=null?(i=1,c=b(s),d=T(D(s))):i=2:D(o)!=null?(i=0,a=b(o),l=T(D(o))):K(s)?i=2:D(s)!=null?(i=1,c=b(s),d=T(D(s))):i=2,i){case 0:if(l instanceof me){const u=l;e=r,t=Oe([Ne(u),Mt(Q(u),void 0,xe(u),0)],a),n=s;continue e}else{e=r,t=Oe([void 0,Nt(Q(l))],a),n=s;continue e}case 1:if(d instanceof me){const u=d;e=r,t=o,n=Oe([Ne(u),Mt(Q(u),void 0,xe(u),0)],c);continue e}else{e=r,t=o,n=Oe([void 0,Nt(Q(d))],c);continue e}default:throw new Error("unexpected state in SetTree.compareStacks")}}else{e=r,t=b(o),n=b(s);continue e}}}function ud(e,t,n){return t==null?n==null?0:-1:n==null?1:Dg(e,re(t),re(n))|0}function Fg(e,t,n){let r=n;sd(o=>{St(t,r,o),r=r+1|0},e)}function Vg(e,t,n){e:for(;;){const r=e,o=t,s=n;if(s["System.Collections.IEnumerator.MoveNext"]()){e=r,t=Or(r,s["System.Collections.Generic.IEnumerator`1.get_Current"](),o),n=s;continue e}else return o}}function Lg(e,t){return Yo((n,r)=>Or(e,r,n),void 0,t)}function Bg(e,t){return un((n,r)=>Or(e,r,n),void 0,t)}function dd(e,t){if(Xt(t))return Lg(e,t);if(t instanceof pt)return Bg(e,t);{const n=Re(t);try{return Vg(e,void 0,n)}finally{we(n)}}}class oa{constructor(t,n){this.comparer=t,this.tree=n}GetHashCode(){return jg(this)|0}Equals(t){let n;const r=this;return t instanceof oa&&(n=t,ud(Dr(r),qt(r),qt(n))===0)}toString(){return"set ["+ae("; ",De(n=>dt(n),this))+"]"}get[Symbol.toStringTag](){return"FSharpSet"}toJSON(){const t=this;return Array.from(t)}CompareTo(t){const n=this;return ud(Dr(n),qt(n),qt(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 od(Dr(n),t,qt(n))}"System.Collections.Generic.ICollection`1.CopyToZ3B4C077E"(t,n){Fg(qt(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 cd(qt(this))}[Symbol.iterator](){return qr(Re(this))}"System.Collections.IEnumerable.GetEnumerator"(){return cd(qt(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 fd(this,t)}keys(){return De(n=>n,this)}values(){return De(n=>n,this)}entries(){return De(n=>[n,n],this)}forEach(t,n){const r=this;Sr(o=>{t(o,o,r)},r)}}function $s(e,t){return new oa(e,t)}function Dr(e){return e.comparer}function qt(e){return e.tree}function Ug(e){return $s(e,void 0)}function zg(e,t){return $s(Dr(e),Or(Dr(e),t,qt(e)))}function sa(e){return Ng(qt(e))}function fd(e,t){return od(Dr(e),t,qt(e))}function jg(e){let t=0;const n=Re(e);try{for(;n["System.Collections.IEnumerator.MoveNext"]();){const r=n["System.Collections.Generic.IEnumerator`1.get_Current"]();t=(t<<1)+ln(r)+631|0}}finally{we(n)}return Math.abs(t)|0}function ia(e,t){return fd(t,e)}function Hg(e,t){return zg(t,e)}function Wg(e){return Ug(e)}function Gg(e,t){return $s(t,dd(t,e))}function qg(e,t){return $s(t,dd(t,e))}function go(e,t,n){try{return"Expecting "+e+" but instead got:"+(n?`
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?`
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 Kg(e,t){const n=t.tag===2?go(t.fields[0],t.fields[1],!0):t.tag===1?go(t.fields[0],t.fields[1],!1)+`
6
- Reason: `+t.fields[2]:t.tag===3?go(t.fields[0],t.fields[1],!0):t.tag===4?go(t.fields[0],t.fields[1],!0)+("\nNode `"+t.fields[2]+"` is unkown."):t.tag===5?"Expecting "+t.fields[0]+`.
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]+`.
7
7
  `+(JSON.stringify(t.fields[1],null,4)+""):t.tag===7?`The following errors were found:
8
8
 
9
- `+ae(`
9
+ `+oe(`
10
10
 
11
- `,t.fields[0]):t.tag===6?"The following `failure` occurred with the decoder: "+t.fields[0]:go(t.fields[0],t.fields[1],!1);return t.tag===7?n:"Error at: `"+e+"`\n"+n}function hd(e,t,n){const r=t(e,n);if(r.tag===1){const o=r.fields[0];return new w(1,[Kg(o[0],o[1])])}else return new w(0,[r.fields[0]])}function tr(e,t){try{return hd("$",e,JSON.parse(t))}catch(n){if(n instanceof SyntaxError)return new w(1,["Given an invalid JSON: "+n.message]);throw n}}function pd(e,t){return typeof t=="string"?new w(0,[t]):new w(1,[[e,new H(0,["a string",t])]])}function Zg(e,t){if(typeof t=="string"){const n=t;return n.length===1?new w(0,[n[0]]):new w(1,[[e,new H(0,["a single character string",t])]])}else return new w(1,[[e,new H(0,["a char",t])]])}function Jg(e,t){if(typeof t=="string"){let n,r="00000000-0000-0000-0000-000000000000";return n=[Mm(t,new ft(()=>r,o=>{r=o})),r],n[0]?new w(0,[n[1]]):new w(1,[[e,new H(0,["a guid",t])]])}else return new w(1,[[e,new H(0,["a guid",t])]])}function Yg(e,t){return t==null?new w(0,[void 0]):new w(1,[[e,new H(0,["null",t])]])}const md=e=>t=>{const n=e,r=t;if(typeof r=="number"){const o=r;return isFinite(o)&&Math.floor(o)===o?-128<=o&&o<=127?new w(0,[(o+128&255)-128]):new w(1,[[n,new H(1,["a sbyte",o,"Value was either too large or too small for a sbyte"])]]):new w(1,[[n,new H(1,["a sbyte",o,"Value is not an integral value"])]])}else if(typeof r=="string"){let o,s=0;return o=[Ar(r,511,!1,8,new ft(()=>s,i=>{s=i|0})),s],o[0]?new w(0,[o[1]]):new w(1,[[n,new H(0,["a sbyte",r])]])}else return new w(1,[[n,new H(0,["a sbyte",r])]])},$d=e=>t=>{const n=e,r=t;if(typeof r=="number"){const o=r;return isFinite(o)&&Math.floor(o)===o?0<=o&&o<=255?new w(0,[o&255]):new w(1,[[n,new H(1,["a byte",o,"Value was either too large or too small for a byte"])]]):new w(1,[[n,new H(1,["a byte",o,"Value is not an integral value"])]])}else if(typeof r=="string"){let o,s=0;return o=[Ar(r,511,!0,8,new ft(()=>s,i=>{s=i})),s],o[0]?new w(0,[o[1]]):new w(1,[[n,new H(0,["a byte",r])]])}else return new w(1,[[n,new H(0,["a byte",r])]])},gd=e=>t=>{const n=e,r=t;if(typeof r=="number"){const o=r;return isFinite(o)&&Math.floor(o)===o?-32768<=o&&o<=32767?new w(0,[(o+32768&65535)-32768]):new w(1,[[n,new H(1,["an int16",o,"Value was either too large or too small for an int16"])]]):new w(1,[[n,new H(1,["an int16",o,"Value is not an integral value"])]])}else if(typeof r=="string"){let o,s=0;return o=[Ar(r,511,!1,16,new ft(()=>s,i=>{s=i|0})),s],o[0]?new w(0,[o[1]]):new w(1,[[n,new H(0,["an int16",r])]])}else return new w(1,[[n,new H(0,["an int16",r])]])},wd=e=>t=>{const n=e,r=t;if(typeof r=="number"){const o=r;return isFinite(o)&&Math.floor(o)===o?0<=o&&o<=65535?new w(0,[o&65535]):new w(1,[[n,new H(1,["an uint16",o,"Value was either too large or too small for an uint16"])]]):new w(1,[[n,new H(1,["an uint16",o,"Value is not an integral value"])]])}else if(typeof r=="string"){let o,s=0;return o=[Ar(r,511,!0,16,new ft(()=>s,i=>{s=i})),s],o[0]?new w(0,[o[1]]):new w(1,[[n,new H(0,["an uint16",r])]])}else return new w(1,[[n,new H(0,["an uint16",r])]])},_d=e=>t=>{const n=e,r=t;if(typeof r=="number"){const o=r;return isFinite(o)&&Math.floor(o)===o?-2147483648<=o&&o<=2147483647?new w(0,[~~o]):new w(1,[[n,new H(1,["an int",o,"Value was either too large or too small for an int"])]]):new w(1,[[n,new H(1,["an int",o,"Value is not an integral value"])]])}else if(typeof r=="string"){let o,s=0;return o=[Ar(r,511,!1,32,new ft(()=>s,i=>{s=i|0})),s],o[0]?new w(0,[o[1]]):new w(1,[[n,new H(0,["an int",r])]])}else return new w(1,[[n,new H(0,["an int",r])]])},bd=e=>t=>{const n=e,r=t;if(typeof r=="number"){const o=r;return isFinite(o)&&Math.floor(o)===o?0<=o&&o<=4294967295?new w(0,[o>>>0]):new w(1,[[n,new H(1,["an uint32",o,"Value was either too large or too small for an uint32"])]]):new w(1,[[n,new H(1,["an uint32",o,"Value is not an integral value"])]])}else if(typeof r=="string"){let o,s=0;return o=[Ar(r,511,!0,32,new ft(()=>s,i=>{s=i})),s],o[0]?new w(0,[o[1]]):new w(1,[[n,new H(0,["an uint32",r])]])}else return new w(1,[[n,new H(0,["an uint32",r])]])};function Xg(e,t){return typeof t=="boolean"?new w(0,[t]):new w(1,[[e,new H(0,["a boolean",t])]])}function Qg(e,t){return typeof t=="number"?new w(0,[t]):new w(1,[[e,new H(0,["a float",t])]])}function ew(e,t){return typeof t=="number"?new w(0,[t]):new w(1,[[e,new H(0,["a float32",t])]])}function tw(e,t){if(typeof t=="string"){let n,r=tp();return n=[rp(t,new ft(()=>r,o=>{r=o})),r],n[0]?new w(0,[op(n[1])]):new w(1,[[e,new H(0,["a datetime",t])]])}else return new w(1,[[e,new H(0,["a datetime",t])]])}function nw(e,t){if(typeof t=="string"){let n,r=_g();return n=[yg(t,new ft(()=>r,o=>{r=o})),r],n[0]?new w(0,[n[1]]):new w(1,[[e,new H(0,["a datetimeoffset",t])]])}else return new w(1,[[e,new H(0,["a datetime",t])]])}function rw(e,t){if(typeof t=="string"){let n,r=0;return n=[Tg(t,new ft(()=>r,o=>{r=o})),r],n[0]?new w(0,[n[1]]):new w(1,[[e,new H(0,["a timespan",t])]])}else return new w(1,[[e,new H(0,["a timespan",t])]])}function yd(e,t,n,r){let o;const s=n+".["+zn(e)+"]";if(Array.isArray(r)){const i=r;return e<i.length?t(s,fe(e,i)):new w(1,[[s,new H(5,["a longer array. Need index `"+zn(e)+"` but there are only `"+(o=i.length,zn(o))+"` entries",r])]])}else return new w(1,[[s,new H(0,["an array",r])]])}function ow(e,t,n){return n==null?new w(0,[void 0]):dn(nt,e(t,n))}function vd(e,t,n){if(Array.isArray(n)){let r=-1;return dn(Xo,Yo((o,s)=>{if(r=r+1|0,o.tag===0){const i=e(t+".["+zn(r)+"]",s);return i.tag===0?new w(0,[kt(i.fields[0],o.fields[0])]):new w(1,[i.fields[0]])}else return o},new w(0,[Be()]),n))}else return new w(1,[[t,new H(0,["a list",n])]])}function sw(e,t,n){if(Array.isArray(n)){let r=-1;return dn(_m,Yo((o,s)=>{if(r=r+1|0,o.tag===0){const i=e(t+".["+zn(r)+"]",s);return i.tag===0?new w(0,[B([i.fields[0]],o.fields[0])]):new w(1,[i.fields[0]])}else return o},new w(0,[[]]),n))}else return new w(1,[[t,new H(0,["a seq",n])]])}function xd(e,t,n){if(Array.isArray(n)){let r=-1;const o=n;return Yo((s,i)=>{if(r=r+1|0,s.tag===0){const a=s.fields[0],l=e(t+".["+zn(r)+"]",i);return l.tag===0?(St(a,r,l.fields[0]),new w(0,[a])):new w(1,[l.fields[0]])}else return s},new w(0,[Jo(new Array(o.length),0,o.length,null)]),o)}else return new w(1,[[t,new H(0,["an array",n])]])}function iw(e,t,n){return((o,s)=>{e:for(;;){const i=o,a=s;if(K(i))return new w(1,[[t,new H(7,[a])]]);{const l=hd(t,_e(D(i)),n);if(l.tag===1){o=b(i),s=ot(a,re(l.fields[0]));continue e}else return new w(0,[l.fields[0]])}}})(e,Be())}function aw(e,t,n){return new w(0,[e])}function Cd(e,t,n,r){const o=t(n,r);return o.tag===0?e(o.fields[0],n,r):new w(1,[o.fields[0]])}function lw(e,t,n,r){const o=t(n,r);return o.tag===1?new w(1,[o.fields[0]]):new w(0,[e(o.fields[0])])}function cw(e,t){let n;const r=e;return n=o=>s=>yd(0,r,o,s),o=>s=>Cd(Ks(i=>{let a;const l=t;return a=c=>d=>yd(1,l,c,d),c=>d=>Cd((u,h,f)=>aw([i,u]),_e(a),c,d)}),_e(n),o,s)}function uw(e){return z0(e,{Compare:Ft})}function dw(e){return qg(e,{Compare:Ft})}function fw(e,t,n){return n!==null&&Object.getPrototypeOf(n||!1)===Object.prototype?Pl((r,o)=>{const s=r[0];return o.tag===0?dn(i=>kt(i,o.fields[0]),r[1](t+"."+s)(n[s])):o},e,new w(0,[Be()])):new w(1,[[t,new H(0,["an object",n])]])}function hw(e,t,n,r){return r!==null&&Object.getPrototypeOf(r||!1)===Object.prototype?oo((o,s)=>{if(o.tag===0){const i=e(n,s);if(i.tag===0){const a=t(n+"."+s,r[s]);return a.tag===0?new w(0,[kt([i.fields[0],a.fields[0]],o.fields[0])]):new w(1,[a.fields[0]])}else return new w(1,[i.fields[0]])}else return o},new w(0,[Be()]),Object.keys(r)):new w(1,[[n,new H(0,["an object",r])]])}function Sd(e,t,n,r){let o;const s=t.length+e|0;if(s!==r.length)return new w(1,[[n,new H(6,[(o=r.length|0,Qt(Ut("Expected array of length %i but got %i"))(s)(o))])]]);{let i=new w(0,[Be()]);for(let a=e;a<=r.length-1;a++)if(i.tag===0){const l=i.fields[0],c=Qt(Ut("%s[%i]"))(n)(a),d=fe(a-e,t),u=fe(a,r);i=dn(h=>kt(h,l),d(c)(u))}return dn(Xo,i)}}function kd(e,t,n,r,o,s){const i=wp(a=>wr(a)===r,ll(n));if(i!=null){const a=i,l=An(c=>Kt(e,t,!1,c[1]),fl(a));return dn(c=>jh(a,Hn(c)),l.length===0&&s.length<=1?new w(0,[Be()]):Sd(1,l,o,s))}else return new w(1,[[o,new H(6,["Cannot find case "+r+" in "+Me(n)])]])}function Ad(e,t,n,r){let o;const s=new ft(he());let i;const a=Me(r);i=a===""?e:Ru(a,s,e);let l;if(dl(r)){const c=An(d=>[Xu(t,wr(d)),Kt(i,t,!1,d[1])],Yr(r));l=d=>u=>dn(h=>Hh(r,Hn(h)),fw(c,d,u))}else if(ul(r))l=c=>d=>{if(typeof d=="string")return kd(i,t,r,d,c,[]);if(Array.isArray(d)){const u=d;return Vp(h=>kd(i,t,r,h,c,u),pd(c+"[0]",fe(0,u)))}else return new w(1,[[c,new H(0,["a string or array",d])]])};else if(n)l=c=>d=>new w(1,[[c,new H(2,["an extra coder for "+Me(r),d])]]);else throw new Error((o=Me(r),Qt(Ut(`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]: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.
12
12
 
13
- Documentation available at: https://thoth-org.github.io/Thoth.Json/documentation/auto/extra-coders.html#ready-to-use-extra-coders`))(o)));return s.contents=l,l}function Kt(e,t,n,r){let o,s,i,a;const l=Me(r),c=Pu(l,e);if(c==null)if(ol(r)){const d=Kt(e,t,!1,Jr(r));return u=>h=>xd(_e(d),u,h)}else if(Qs(r))switch(Me(al(r))){case"System.SByte":return u=>h=>{const f=r,p=u,_=h,$=md(p)(_);if($.tag===1)return new w(1,[$.fields[0]]);{const v=$.fields[0]|0;return Cr(v,_r(f),{Equals:(y,C)=>y===C,GetHashCode:Lt})?new w(0,[br(f,v.toString())]):new w(1,[[p,new H(1,[Me(f),_,"Unkown value provided for the enum"])]])}};case"System.Byte":return u=>h=>{const f=r,p=u,_=h,$=$d(p)(_);if($.tag===1)return new w(1,[$.fields[0]]);{const v=$.fields[0];return Cr(v,_r(f),{Equals:(y,C)=>y===C,GetHashCode:Lt})?new w(0,[br(f,v.toString())]):new w(1,[[p,new H(1,[Me(f),_,"Unkown value provided for the enum"])]])}};case"System.Int16":return u=>h=>{const f=r,p=u,_=h,$=gd(p)(_);if($.tag===1)return new w(1,[$.fields[0]]);{const v=$.fields[0]|0;return Cr(v,_r(f),{Equals:(y,C)=>y===C,GetHashCode:Lt})?new w(0,[br(f,gh(v))]):new w(1,[[p,new H(1,[Me(f),_,"Unkown value provided for the enum"])]])}};case"System.UInt16":return u=>h=>{const f=r,p=u,_=h,$=wd(p)(_);if($.tag===1)return new w(1,[$.fields[0]]);{const v=$.fields[0];return Cr(v,_r(f),{Equals:(y,C)=>y===C,GetHashCode:Lt})?new w(0,[br(f,v.toString())]):new w(1,[[p,new H(1,[Me(f),_,"Unkown value provided for the enum"])]])}};case"System.Int32":return u=>h=>{const f=r,p=u,_=h,$=_d(p)(_);if($.tag===1)return new w(1,[$.fields[0]]);{const v=$.fields[0]|0;return Cr(v,_r(f),{Equals:(y,C)=>y===C,GetHashCode:Lt})?new w(0,[br(f,zn(v))]):new w(1,[[p,new H(1,[Me(f),_,"Unkown value provided for the enum"])]])}};case"System.UInt32":return u=>h=>{const f=r,p=u,_=h,$=bd(p)(_);if($.tag===1)return new w(1,[$.fields[0]]);{const v=$.fields[0];return Cr(v,_r(f),{Equals:(y,C)=>y===C,GetHashCode:Lt})?new w(0,[br(f,v.toString())]):new w(1,[[p,new H(1,[Me(f),_,"Unkown value provided for the enum"])]])}};default:{const u=Me(r),h=Sl(Ut(`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 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.
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(sl(r))if(ei(r)){const d=An(u=>Kt(e,t,!1,u),cl(r));return u=>h=>Array.isArray(h)?dn(f=>Wh(Hn(f)),Sd(0,d,u,h)):new w(1,[[u,new H(0,["an array",h])]])}else switch(Me(il(r))){case"Microsoft.FSharp.Core.FSharpOption`1[System.Object]":return o=Kt(e,t,!0,fe(0,xt(r))),u=>h=>ow(_e(o),u,h);case"Microsoft.FSharp.Collections.FSharpList`1[System.Object]":return s=Kt(e,t,!1,fe(0,xt(r))),u=>h=>vd(_e(s),u,h);case"System.Collections.Generic.IEnumerable`1[System.Object]":return i=Kt(e,t,!1,fe(0,xt(r))),u=>h=>sw(_e(i),u,h);case"Microsoft.FSharp.Collections.FSharpMap`2[System.Object,System.Object]":{const u=Kt(e,t,!1,fe(0,xt(r))),h=Kt(e,t,!1,fe(1,xt(r)));let f;const p=k([_=>$=>hw(_e(u),_e(h),_,$),(a=cw(_e(u),_e(h)),_=>$=>vd(_e(a),_,$))]);return f=_=>$=>iw(p,_,$),_=>$=>lw(uw,_e(f),_,$)}case"Microsoft.FSharp.Collections.FSharpSet`1[System.Object]":{const u=Kt(e,t,!1,fe(0,xt(r)));return h=>f=>{const p=xd(_e(u),h,f);return p.tag===0?new w(0,[dw(p.fields[0])]):new w(1,[p.fields[0]])}}default:return Ad(e,t,n,r)}else switch(l){case"System.Boolean":return d=>u=>Xg(d,u);case"Microsoft.FSharp.Core.Unit":return d=>u=>Yg(d,u);case"System.String":return d=>u=>pd(d,u);case"System.Char":return d=>u=>Zg(d,u);case"System.SByte":return md;case"System.Byte":return $d;case"System.Int16":return gd;case"System.UInt16":return wd;case"System.Int32":return _d;case"System.UInt32":return bd;case"System.Double":return d=>u=>Qg(d,u);case"System.Single":return d=>u=>ew(d,u);case"System.DateTime":return d=>u=>tw(d,u);case"System.DateTimeOffset":return d=>u=>nw(d,u);case"System.TimeSpan":return d=>u=>rw(d,u);case"System.Guid":return d=>u=>Jg(d,u);case"System.Object":return d=>u=>new w(0,[u]);default:return Ad(e,t,n,r)}else{const d=c;return u=>h=>d.contents(u)(h)}}function pw(e){return ea({Compare:Zr})}function nr(e,t,n){const r=Ye(t,new tn(0,[]));return Kt(pw(),r,!1,e)}class mw extends ie{constructor(t){super(),this.Roles=t}}function $w(){return ht("AccountRegistry.AdminUI.Jwt.JwtPayload",[],mw,()=>[["Roles",Xs(j)]])}function gw(e){const t=si(e??"",["."],void 0,0);if(!ci((n,r)=>n===r,t)&&t.length===3){let n;const r=fe(1,t);return n=atob(r),tr(_e(nr($w(),new tn(1,[]))),n)}else return new w(1,["Failed to decode access token"])}function Ed(e,t,n,r){return Fu(o=>{Vu(o)},e,t,o=>o.tag===1?r(o.fields[0]):n(o.fields[0]))}function ww(){return Be()}function aa(e){return ae("/",e)}function _w(e,t){const n=new Error("Duplicate SubId");return e(["Duplicate SubId: "+aa(t),n])}function Id(e,t,n){try{we(n)}catch(r){e(["Error stopping subscription: "+aa(t),r])}}function bw(e,t,n,r){try{return[n,r(t)]}catch(o){e(["Error starting subscription: "+aa(n),o]);return}}function yw(e,t){Qo(n=>{Id(e,n[0],n[1])},t)}function Td(e,t,n,r,o,s){return Qo(i=>{_w(e,i)},n),Qo(i=>{Id(e,i[0],i[1])},r),ot(o,Fl(i=>bw(e,t,i[0],i[1]),s))}function vw(){return[Be(),Wg({Compare:Ft}),Be()]}function xw(e,t,n,r,o){return ia(e,r)?[kt(e,n),r,o]:[n,Hg(e,r),kt([e,t],o)]}function Cw(e){return Cp((t,n)=>xw(t[0],t[1],n[0],n[1],n[2]),e,vw())}const Sw=Be();function Nd(e,t){const n=Gg(Wn(i=>i[0],e),{Compare:Ft}),r=Cw(t),o=r[1],s=r[0];if(n.Equals(o))return[s,Be(),e,Be()];{const i=Rp(a=>ia(a[0],o),e);return[s,i[1],i[0],Dl(a=>!ia(a[0],n),r[2])]}}function kw(e,t,n,r){const o=Ft(e,n)|0;if(o===0)throw new Error("The step of a range cannot be zero");const s=o>0;return i=>{const a=Ft(i,t)|0;return s&&a<=0||!s&&a>=0?[i,r(i,e)]:void 0}}function Aw(e,t,n,r,o){const s=kw(t,n,r,o);return A(()=>$m(s,e))}function Ew(e,t,n){return Aw(e,t,n,0,(r,o)=>r+o)}class Fr extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Writable","ReadWritable"]}}class Iw{constructor(t){this.state=new Fr(0,[Jo(new Array(Rl(t,10)),0,Rl(t,10),null),0])}}function Tw(e){return new Iw(e)}function Md(e){const t=e.state;if(t.tag===1){const n=t.fields[1]|0,r=t.fields[2]|0,o=t.fields[0],s=(r+1)%o.length|0;return s===n?e.state=new Fr(0,[o,n]):e.state=new Fr(1,[o,n,s]),nt(fe(r,o))}else return}function Nw(e,t){const n=e.state;if(n.tag===1){const r=n.fields[1]|0,o=n.fields[2]|0,s=n.fields[0];St(s,r,t);const i=(r+1)%s.length|0;i===o?e.state=new Fr(1,[Mw(e,o,s),s.length,0]):e.state=new Fr(1,[s,i,o])}else{const r=n.fields[1]|0,o=n.fields[0];St(o,r,t);const s=(r+1)%o.length|0;e.state=new Fr(1,[o,s,r])}}function Mw(e,t,n){return Array.from(A(()=>B(bm(t,n),A(()=>B(ym(t,n),A(()=>vm(r=>E(he()),Ew(0,1,n.length))))))))}class la extends ie{constructor(t,n,r,o,s,i,a){super(),this.init=t,this.update=n,this.subscribe=r,this.view=o,this.setState=s,this.onError=i,this.termination=a}}function gs(e,t,n){return new la(e,t,r=>ww(),n,_e(r=>{const o=kn(n)(r);return s=>{o(s)}}),r=>{J0(r[0],r[1])},[r=>!1,r=>{}])}function Rw(e,t){return new la(t.init,t.update,t.subscribe,t.view,e,t.onError,t.termination)}function Pw(e){return e.init}function Ow(e,t,n,r,o,s,i){const a=kn(e)(i.init),l=Zs(t)(kn(i.update)),c=Zs(n)(kn(i.view)),d=Zs(r)(kn(i.setState));return new la(a,_e(l),kn(o)(i.subscribe),_e(c),_e(d),i.onError,s(i.termination))}function Dw(e,t,n){let r;const o=n.init(t),s=o[0],i=n.subscribe(s),a=n.termination,l=Tw(10);let c=!1,d=s,u=Sw,h=!1;const f=$=>{h||(Nw(l,$),c||(c=!0,_(),c=!1))},p=kn(e)(f),_=()=>{let $,v=Md(l);for(;!h&&v!=null;){const y=T(v);if(a[0](y))yw(n.onError,u),a[1](d),h=!0;else{const C=n.update(y,d),R=C[0],L=n.subscribe(R);n.setState(R,p),Du(X=>{n.onError([Qt(Ut("Error handling the message: %A"))(y),X])},p,C[1]),d=R,u=($=Nd(u,L),Td(n.onError,p,$[0],$[1],$[2],$[3])),v=Md(l)}}};c=!0,n.setState(s,p),Du($=>{n.onError([Qt(Ut("Error intitializing:")),$])},p,o[1]),u=(r=Nd(u,i),Td(n.onError,p,r[0],r[1],r[2],r[3])),_(),c=!1}function Fw(e,t){Dw(_e(n=>n),e,t)}function Vw(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 o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}),n}var ca={exports:{}},ua={};const Lw=Vw(Zi);/**
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);/**
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 Rd;function Bw(){if(Rd)return ua;Rd=1;var e=Lw;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,o=e.useEffect,s=e.useLayoutEffect,i=e.useDebugValue;function a(u,h){var f=h(),p=r({inst:{value:f,getSnapshot:h}}),_=p[0].inst,$=p[1];return s(function(){_.value=f,_.getSnapshot=h,l(_)&&$({inst:_})},[u,f,h]),o(function(){return l(_)&&$({inst:_}),u(function(){l(_)&&$({inst:_})})},[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 ua.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:d,ua}var Pd;function Uw(){return Pd||(Pd=1,ca.exports=Bw()),ca.exports}var zw=Uw();class jw{constructor(t,n,r){this.arg=n,this.dependencies=r;const o=t(),s=[];this.finalDispatch=void 0;let i;const a=Pw(o)(this.arg);let l=a[0],c=a[1];i=[[l,d=>{const u=this.finalDispatch;u==null?s.push(d):u(d)},!1,s],c],this.state=i[0],this.cmd=i[1],this.subscribe=d=>{let u=!1;const h=Gs(this.state[0]);return Fw(this.arg,Rw((f,p)=>{const _=this.state;this.finalDispatch=p,this.state=[f,_[1],!0,s],f!==_[0]&&d()},Ow((f,p)=>{const _=this.cmd;return this.cmd=Le(),[this.state[0],_]},(f,p,_)=>f(p)(this.state[0]),Ks(f=>f),Ks(f=>f),_e(f=>f),f=>[p=>f[0](p)?!0:h&&u,p=>{const _=p;Gs(_)?we(_):f[1](p)}],o))),()=>{u=!0}}}}function Od(e,t,n){return new jw(e,t,n)}function Hw(e){return e.state}function Ww(e){return e.subscribe}function Gw(e,t,n){return He(e.arg,t)?!He(e.dependencies,n):!0}function ws(e,t,n){const r=We(()=>Od(e,t,n)),o=r[0];Gw(o,t,n)&&r[1](Od(e,t,n));const s=zw.useSyncExternalStore(Ww(o),()=>Hw(o)),i=s[2],a=s[3],l=s[1];return Te(()=>{if(i&&a.length>0){let c=Re(a);try{for(;c["System.Collections.IEnumerator.MoveNext"]();){const d=c["System.Collections.Generic.IEnumerator`1.get_Current"]();setTimeout(()=>{l(d)})}}finally{we(c)}kh(a)}},[i,a]),[s[0],l]}class Vr extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["GET","POST","PUT","PATCH","DELETE","HEAD","OPTIONS"]}}class Dd extends z{constructor(t,n){super(),this.tag=0,this.fields=[t,n]}cases(){return["Header"]}}class Fd extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Empty","Text","Binary","Form"]}}class wo extends ie{constructor(t,n,r,o,s,i,a,l){super(),this.url=t,this.method=n,this.headers=r,this.withCredentials=o,this.overridenMimeType=s,this.overridenResponseType=i,this.timeout=a,this.content=l}}class Lr extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Text","Blob","ArrayBuffer","Unknown"]}}class Vd extends ie{constructor(t,n,r,o,s,i){super(),this.statusCode=t|0,this.responseText=n,this.responseType=r,this.responseUrl=o,this.responseHeaders=s,this.content=i}}function Ld(e){return new Dd("Authorization",e)}const rr=new wo("",new Vr(0,[]),Be(),!1,void 0,void 0,void 0,new Fd(0,[]));new Vd(0,"","","",ea({Compare:Zr}),new Lr(0,[""]));function Bd(e,t){return Zo(t)?new Array(0):si(t,[e],void 0,0)}function qw(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 Br(e){return new wo(e,rr.method,rr.headers,rr.withCredentials,rr.overridenMimeType,rr.overridenResponseType,rr.timeout,rr.content)}function _o(e,t){return new wo(t.url,e,t.headers,t.withCredentials,t.overridenMimeType,t.overridenResponseType,t.timeout,t.content)}function da(e,t){return new wo(t.url,t.method,ot(t.headers,re(e)),t.withCredentials,t.overridenMimeType,t.overridenResponseType,t.timeout,t.content)}function Kw(e,t){return new wo(t.url,t.method,t.headers,t.withCredentials,t.overridenMimeType,t.overridenResponseType,t.timeout,e)}function fa(e){return v0(t=>{const n=new XMLHttpRequest;n.open(qw(e.method),e.url),n.onreadystatechange=()=>{let l,c,d,u,h,f,p;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 Lr(0,[n.responseText]):f==="text"?new Lr(0,[n.responseText]):f==="arraybuffer"?new Lr(2,[n.response]):f==="blob"?new Lr(1,[n.response]):new Lr(3,[n.response])),p=j0(_p(_=>{const $=k(Bd(":",_));if(!K($))return[D($).toLocaleLowerCase(),ae(":",b($)).trim()]},Bd(`\r
31
- `,n.getAllResponseHeaders())),{Compare:Zr}),new Vd(d,l,u,n.responseURL,p,h)))};const r=Re(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{we(r)}n.withCredentials=e.withCredentials;const o=e.overridenMimeType;if(o!=null){const l=o;n.overrideMimeType(l)}const s=e.overridenResponseType;if(s!=null)switch(s.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 Zw(e,t,n){e:for(;;){const r=e,o=t,s=n;if(K(s)){const i=r;return i.tag===1?new w(1,[i.fields[0]]):new w(0,[Xo(i.fields[0])])}else{let i;const a=o(D(s));if(a.tag===1)i=new w(1,[a.fields[0]]);else{const l=r;i=l.tag===1?new w(1,[l.fields[0]]):new w(0,[kt(a.fields[0],l.fields[0])])}if(i.tag===1)return i;e=i,t=o,n=b(s);continue e}}}function Jw(e,t){return Zw(new w(0,[Be()]),e,t)}function Yw(e){return Jw(t=>t,e)}function ha(e){return new Ql(fn(e))}function _s(e){return`${e}/account-registry/admin`}function bs(e,t){return W.Delay(()=>{const n=da(Ld(Qt(Ut("Bearer %s"))(e)),t);let r;const o=fa(n);return r=W.Bind(o,s=>W.Return(new w(0,[s]))),W.Bind(r,s=>{const i=s;if(i.tag===1)return W.Return(new w(1,[i.fields[0]]));{const a=i.fields[0];if(a.statusCode===429||a.statusCode>=500){const l=fa(n);return W.Bind(l,c=>W.Return(new w(0,[c])))}else return W.Return(new w(0,[a]))}})})}function Xw(e,t){return W.Delay(()=>{const n=bs(t,_o(new Vr(0,[]),Br(`${_s(e)}/partners`)));return W.Bind(n,r=>{const o=r;if(o.tag===1)return W.Return(new w(1,[o.fields[0]]));{const s=o.fields[0];if(s.statusCode===200){let i;const a=tr(_e(nr(Xs(m$()),new tn(1,[]))),s.responseText);return i=a.tag===1?new w(1,[a.fields[0]]):Yw(Wn(pg,a.fields[0])),W.Return(i)}else return W.Return(new w(1,["Unexpected response from backend"]))}})})}function Qw(e,t,n,r){const o=fn(n),s=hn(r);return W.Delay(()=>{const i=bs(t,_o(new Vr(0,[]),Br(`${_s(e)}/partners/${o}/accounts/${s}`)));return W.Bind(i,a=>{const l=a;if(l.tag===1)return W.Return(new w(1,[l.fields[0]]));{const c=l.fields[0];if(c.statusCode===200){const d=tr(_e(nr(g$(),new tn(1,[]))),c.responseText);return W.Return(d)}else return W.Return(new w(1,["Unexpected response from backend"]))}})})}function pa(e,t,n,r,o){return W.Delay(()=>{let s,i,a,l;const c="?"+ae("&",Fl(u=>u,k([(s=Gu(r.SearchText),Il(s)?void 0:`search=${encodeURIComponent(s.trim())}`),(i=ng(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=qu(r.PageSize)|0,a<=100&&a>=10?`page_size=${a}`:void 0)]))),d=bs(t,(l=_o(new Vr(0,[]),Br(`${_s(e)}/partners/${kr(n)}/accounts${c}`)),o==null?l:da(new Dd("token",o),l)));return W.Bind(d,u=>{const h=u;if(h.tag===1)return W.Return(new w(1,[h.fields[0]]));{const f=h.fields[0];if(f.statusCode===200){const p=tr(_e(nr(b$(),new tn(1,[]))),f.responseText);return W.Return(p)}else return W.Return(new w(1,["Unexpected response from backend"]))}})})}function e1(e,t,n){const r=hn(n);return W.Delay(()=>{const o=bs(t,_o(new Vr(0,[]),Br(`${_s(e)}/search-by-id/${r}`)));return W.Bind(o,s=>{const i=s;if(i.tag===1)return W.Return(new w(1,[i.fields[0]]));{const a=i.fields[0];if(a.statusCode===200){const l=tr(_e(nr(v$(),new tn(1,[]))),a.responseText);return W.Return(l)}else return W.Return(new w(1,["Unexpected response from backend"]))}})})}function t1(e,t){return m("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),m("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 n1=Rn(t1);function r1(e,t){return m("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),m("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 o1=Rn(r1);function s1(e,t){return m("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),m("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 i1=Rn(s1);function a1(e,t){return m("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),m("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 l1=Rn(a1);function c1(e,t){return m("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),m("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 u1=Rn(c1);class Ud extends z{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["BreadCrumb"]}}function d1(e,t,n){let r,o;return m("li",O(k([["key",e],["className","flex"],(r=[m("div",O(k([["className","flex items-center"],(o=Ie(A(()=>{let s;return B(n?Et():E((s={className:"flex-shrink-0 h-5 w-5 text-gray-400"},m(o1,s))),A(()=>E(m("a",O(Ie(A(()=>B(E(["children",e]),A(()=>B(t!=null?E(["href",Qn(T(t))]):Et(),A(()=>E(["className","ml-4 text-sm font-medium text-gray-500 hover:text-gray-700"]))))))))))))})),["children",I.Children.toArray(Array.from(o))])])))],["children",I.Children.toArray(Array.from(r))])])))}function f1(e){let t,n;return m("nav",O(k([["className","pt-2 mb-6"],["aria-label","Breadcrumb"],(t=[m("ol",O(k([["className","-ml-3 max-w-screen-xl w-full flex space-x-4"],(n=Ep((r,o)=>d1(o.fields[0][0],o.fields[0][1],r===0),e),["children",I.Children.toArray(Array.from(n))])])))],["children",I.Children.toArray(Array.from(t))])])))}function wt(e,t){return new Ud([e,mo(t)])}function zd(){return wt("Partners",new J(0,[]))}function jd(e,t){return wt(t,new J(1,[e]))}function h1(e){return wt("Super",new J(4,[e]))}function p1(e){return wt("Benefits",new J(5,[e]))}function m1(e){return wt("Bank Details",new J(6,[e]))}function $1(e){return wt("Directory",new J(2,[e]))}function g1(e){return wt("Workspace",new J(7,[e]))}function w1(e){return wt("Accounts",new J(3,[e]))}function _1(e){return new Ud([e,void 0])}function b1(e,t){let n;return wt("Directory",(n=[e,t],new J(9,[n[0],n[1]])))}function y1(e,t){let n;return wt("Users",(n=[e,t],new J(10,[n[0],n[1]])))}function v1(e,t){let n;return wt("Super",(n=[e,t],new J(11,[n[0],n[1]])))}function x1(e,t){let n;return wt("Benefits",(n=[e,t],new J(12,[n[0],n[1]])))}function C1(e,t){let n;return wt("Bank Details",(n=[e,t],new J(13,[n[0],n[1]])))}function S1(e,t){let n;return wt("Salary Packaging",(n=[e,t],new J(14,[n[0],n[1]])))}function k1(e,t){let n;return wt("Workspace",(n=[e,t],new J(15,[n[0],n[1]])))}function bo(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?es(h.Id):ui(f.fields[0].fields[0]):"..."}let o;const s=e.account;if(s==null)o="...";else{const h=s,f=h.Name;o=f.tag===2?f.fields[0].tag===1?ts(h.Id):ui(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([zd(),jd(d.Id,n),w1(d.Id),_1(o)]);break}case 1:{i=k([zd(),jd(u.Id,n)]);break}default:i=Be()}return f1((t=e.page,t.tag===16||t.tag===1||t.tag===3?i:t.tag===4?ot(i,re(h1(t.fields[0]))):t.tag===5?ot(i,re(p1(t.fields[0]))):t.tag===6?ot(i,re(m1(t.fields[0]))):t.tag===2?ot(i,re($1(t.fields[0]))):t.tag===7?ot(i,re(g1(t.fields[0]))):t.tag===8?i:t.tag===9?ot(i,re(b1(t.fields[0],t.fields[1]))):t.tag===10?ot(i,re(y1(t.fields[0],t.fields[1]))):t.tag===11?ot(i,re(v1(t.fields[0],t.fields[1]))):t.tag===12?ot(i,re(x1(t.fields[0],t.fields[1]))):t.tag===13?ot(i,re(C1(t.fields[0],t.fields[1]))):t.tag===14?ot(i,re(S1(t.fields[0],t.fields[1]))):t.tag===15?ot(i,re(k1(t.fields[0],t.fields[1]))):i))}class A1 extends z{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["Tab"]}}function E1(e){return new A1(e)}function I1(e){return e.fields[0]}function Hd(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 E1(m("a",O(Ie(A(()=>B(E(["key",t]),A(()=>B(E(["children",t]),A(()=>B(E(["className",r]),A(()=>e!==t?E(["href",Qn(re(n))]):Et())))))))))))}function Wd(e){let t,n;const r=e.headers,o=Yn(100);return m("div",O(k([["ref",s=>{const i=pp(s);if(i!=null){const a=i;o[1](~~a.offsetTop)}}],["className","relative"],(t=[m("div",{className:"w-40 mr-6"}),m("nav",O(k([["className","fixed bottom-14 flex flex-col w-40 border-r border-gray-300 mr-6"],["style",{top:o[0]}],(n=De(I1,r),["children",I.Children.toArray(Array.from(n))])])))],["children",I.Children.toArray(Array.from(t))])])))}class T1 extends ie{constructor(t,n,r){super(),this.Roles=t,this.BackendUrl=n,this.AccessToken=r}}const Pn=h0();let or=class extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["UpdateSearchText","UpdateSort","LoadAccountLookup","UpdateAccountLookup","QueryAccountLookup"]}};class N1{constructor(t){this.props=t}}function M1(e){return new N1(e)}function Gd(e){return t=>n=>W.Delay(()=>{const r=ha(e.props.partnerId);return W.Bind(pa(e.props.backendUrl,e.props.accessToken,r,t,void 0),o=>(n(new or(2,[new pe(2,[o])])),W.Zero()))})}function R1(e){return t=>n=>r=>W.Delay(()=>{const o=ha(e.props.partnerId);return W.Bind(pa(e.props.backendUrl,e.props.accessToken,o,t,n),s=>(r(new or(3,[s])),W.Zero()))})}function P1(e,t,n){return pa(e.props.backendUrl,e.props.accessToken,ha(e.props.partnerId),t,void 0)}let Ur=class extends ie{constructor(t,n,r,o){super(),this.Data=t,this.SearchText=n,this.Sort=r,this.PageSize=o}};function O1(){return[new Ur(new pe(0,[]),rg,tg,ig(20)),Le()]}function D1(e,t,n){let r,o,s,i;switch(t.tag){case 1:{const a=t.fields[0];return[new Ur(new pe(1,[]),n.SearchText,a,n.PageSize),Xe(l=>{const c=new ta(n.SearchText,a,n.PageSize);Mr(Gd(e)(c)(l))})]}case 2:return[new Ur(t.fields[0],n.SearchText,n.Sort,n.PageSize),Le()];case 3:{const a=t.fields[0];return[new Ur((r=n.Data,r.tag===2?r.fields[0].tag===0?(o=a,o.tag===1?new pe(2,[new w(1,[o.fields[0]])]):new pe(2,[new w(0,[new pc(ot(r.fields[0].fields[0].Accounts,o.fields[0].Accounts),o.fields[0].Token)])])):(s=a,s.tag===1?new pe(2,[new w(1,[s.fields[0]])]):new pe(3,[new Error("Failed to retrieve the account data")])):(i=a,i.tag===1?new pe(2,[new w(1,[i.fields[0]])]):new pe(3,[new Error("Failed to retrieve the account data")]))),n.SearchText,n.Sort,n.PageSize),Le()]}case 4:return[new Ur(new pe(1,[]),n.SearchText,n.Sort,n.PageSize),Xe(a=>{const l=new ta(n.SearchText,n.Sort,n.PageSize);Mr(Gd(e)(l)(a))})];default:return[new Ur(n.Data,og(t.fields[0]),n.Sort,n.PageSize),Le()]}}function qd(e,t,n,r){let o,s;return m("div",O(k([["className",ae(" ",["flex-grow","max-w-md"])],(o=[m("label",{for:"search",children:"Search",className:ae(" ",["block","text-sm","font-medium","text-gray-700"])}),m("div",O(k([["className","mt-1"],(s=[m("input",{id:"search",name:"search",type:"text",className:ae(" ",["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",I.Children.toArray(Array.from(s))])])))],["children",I.Children.toArray(Array.from(o))])])))}function F1(e){let t,n;return m("div",O(k([["className","pt-6"],(t=[m("div",O(k([["className",ae(" ",["flex","justify-end"])],(n=[m("button",{type:"search",children:"Search",className:ae(" ",["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",I.Children.toArray(Array.from(n))])])))],["children",I.Children.toArray(Array.from(t))])])))}function Kd(e){return["fillRule",e]}function Zd(e){return["clipRule",e]}const V1=m("svg",O(k([["className",ae(" ",["h-5","w-5"])],["fill","currentColor"],["viewBox","0 0 20 20"],["xmlns","http://www.w3.org/2000/svg"],(()=>{let e;const t=re(m("path",O(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]),Kd("evenodd"),Zd("evenodd")]))));return["children",I.Children.toArray(Array.from(t))]})()]))),L1=m("svg",O(k([["className",ae(" ",["h-5","w-5"])],["fill","currentColor"],["viewBox","0 0 20 20"],["xmlns","http://www.w3.org/2000/svg"],(()=>{let e;const t=re(m("path",O(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]),Kd("evenodd"),Zd("evenodd")]))));return["children",I.Children.toArray(Array.from(t))]})()]))),Jd=m("svg",O(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=re(m("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",I.Children.toArray(Array.from(e))]})()]))),B1=m("svg",O(k([["className",ae(" ",["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=re(m("path",{d:"M10 5V10M10 10V15M10 10H15M10 10L5 10",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}));return["children",I.Children.toArray(Array.from(e))]})()])));function Yd(e){const t=e.child,n=e.onClose;return pu(()=>{const r=o=>{o.key==="Escape"&&n()};return window.addEventListener("keydown",r),{Dispose(){window.removeEventListener("keydown",r)}}},[]),t}function U1(e){return e}const Xd=he();function ys(e){return Array.from(e)}function z1(e){return Wo(e,"O")}function j1(e){return Eg(e)}function H1(){return he()}function W1(e){return Wo(e,"O")}function G1(e,t){return JSON.stringify(t,void 0,nt(e))}function q1(e){return t=>Nl(zt(e,t),()=>Xd)}function Qd(e,t,n,r){let o;const s=new ft(he());let i;const a=Me(r);i=a===""?e:Ru(a,s,e);let l;if(dl(r)){const c=An(d=>{const u=Xu(t,wr(d)),h=vn(i,t,n,d[1]);return f=>p=>{const _=zh(f,d);return(!n||n&&_!=null)&&(p[u]=h(_)),p}},Yr(r));l=d=>oo((u,h)=>h(d)(u),{},c)}else if(ul(r))l=c=>{const d=Uh(c,r),u=d[0],h=d[1],f=h.length|0;if(f===0)return wr(u);{const p=f|0,_=fl(u),$=Jo(new Array(p+1),0,p+1,null);St($,0,wr(u));for(let v=1;v<=p;v++){const y=vn(i,t,n,fe(v-1,_)[1]);St($,v,y(fe(v-1,h)))}return $}};else throw new Error((o=Me(r),Qt(Ut(`Cannot generate auto encoder for %s. Please pass an extra encoder.
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.
32
32
 
33
- Documentation available at: https://thoth-org.github.io/Thoth.Json/documentation/auto/extra-coders.html#ready-to-use-extra-coders`))(o)));return s.contents=l,l}function vn(e,t,n,r){const o=Me(r),s=Pu(o,e);if(s==null)if(ol(r)){const i=vn(e,t,n,Jr(r));return a=>ys(De(i,a))}else if(Qs(r))switch(Me(al(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=Me(r);return Sl(Ut(`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 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.
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(sl(r))if(ei(r)){const i=An(a=>vn(e,t,n,a),cl(r));return a=>ys(mi((l,c)=>fe(l,i)(c),a))}else{const i=Me(il(r));if(i==="Microsoft.FSharp.Core.FSharpOption`1[System.Object]"){const a=new mh(()=>q1(vn(e,t,n,fe(0,xt(r)))));return l=>l==null?Xd: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,fe(0,xt(r)));return l=>ys(De(a,l))}else if(i==="Microsoft.FSharp.Collections.FSharpMap`2[System.Object,System.Object]"){const a=fe(0,xt(r)),l=vn(e,t,n,fe(1,xt(r)));if(Me(a)==="System.String"||Me(a)==="System.Guid")return c=>oo((d,u)=>{const h=u;return d[h[0]]=l(h[1]),d},{},c);{let c;return c=vn(e,t,n,a),u=>ys(De(h=>{const f=h;return[c(f[0]),l(f[1])]},u))}}else return Qd(e,t,n,r)}else switch(o){case"System.Boolean":return i=>i;case"Microsoft.FSharp.Core.Unit":return H1;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 W1;case"System.DateTimeOffset":return z1;case"System.TimeSpan":return j1;case"System.Guid":return U1;case"System.Object":return i=>i;default:return Qd(e,t,n,r)}else{const i=s;return a=>i.contents(a)}}function K1(e){return ea({Compare:Zr})}function Z1(e,t,n,r){const o=Ye(t,new tn(0,[])),s=Ye(r,!0);return vn(K1(),o,s,e)}class J1{constructor(t,n){this.accessToken=n,this.adminUrl=`${t}/account-registry/admin`}QueryAnzsic(t){const n=this;return S0(W.Delay(()=>W.Bind(ef(n,Br(`${n.adminUrl}/anzsic?maxRecordCount=15&search=${t}`)),r=>{const o=tr(_e(nr(E$(),new tn(1,[]))),r.responseText);return W.Return(o.tag===1?new Array(0):o.fields[0].tag===0?o.fields[0].fields[0]:new Array(0))})))}CreateAccount(t,n,r,o){const s=this;return W.Delay(()=>{let i,a;const l=ef(s,Kw(new Fd(1,[(i=new $c(n.AccountName,n.WebsiteUrl,new dc(r.FirstName,r.LastName,r.Email,r.MobilePhone),void 0,new mc(n.LegalEntityName,n.Abn,o.Line1,Zo(o.Line2)?void 0:o.Line2,o.City,o.Postcode,o.State,r.MobilePhone,"AU"),void 0,void 0,new fc(n.SalesforceParentRecordId,void 0),new hc(n.Industry.ClassCode,n.Industry.ClassTitle)),G1(0,Z1(T$(),new tn(1,[]),void 0,void 0)(i)))]),_o(new Vr(1,[]),Br(`${s.adminUrl}/partners/${es(t)}/accounts`))));return a=W.Bind(l,c=>W.Return(new w(0,[c]))),W.Bind(a,c=>{const d=c;if(d.tag===1)return W.Return(new w(1,[d.fields[0]]));{let u;const h=tr(_e(nr(M$(),new tn(1,[]))),d.fields[0].responseText);return u=h.tag===1?new w(1,[void 0]):new w(0,[h.fields[0].Id]),W.Return(u)}})})}}function Y1(e,t){return new J1(e,t)}function ef(e,t){return fa(da(Ld(`Bearer ${e.accessToken}`),t))}class sr extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["AccountDetailsForm","PrimaryContactForm","BusinessAddressForm"]}}let Zt=class extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["NextForm","PreviousForm","SetAccountDetailsForm","SetPrimaryContactForm","SetBusinessAddressForm","StartAccountCreation","FinishAccountCreation"]}},On=class extends ie{constructor(t,n,r,o,s){super(),this.AccountDetailsForm=t,this.PrimaryContactForm=n,this.BusinessAddressForm=r,this.CurrentView=o,this.AccountCreation=s}};function X1(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 Q1(e){switch(e.AccountCreation.tag){case 0:case 2:case 3:return!1;default:return!0}}const e_=[new On({},{},{},new sr(0,[]),new pe(0,[])),Le()];function t_(e,t,n,r){let o,s;switch(n.tag){case 1:return[new On(r.AccountDetailsForm,r.PrimaryContactForm,r.BusinessAddressForm,(o=r.CurrentView,o.tag===1?new sr(0,[]):o.tag===2?new sr(1,[]):new sr(0,[])),r.AccountCreation),Le()];case 2:return[new On(n.fields[0],r.PrimaryContactForm,r.BusinessAddressForm,r.CurrentView,r.AccountCreation),Le()];case 3:return[new On(r.AccountDetailsForm,n.fields[0],r.BusinessAddressForm,r.CurrentView,r.AccountCreation),Le()];case 4:return[new On(r.AccountDetailsForm,r.PrimaryContactForm,n.fields[0],r.CurrentView,r.AccountCreation),Le()];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,Le()];default:return[new On(r.AccountDetailsForm,r.PrimaryContactForm,r.BusinessAddressForm,r.CurrentView,new pe(1,[])),Fu(l=>{Vu(l)},l=>t.CreateAccount(l[0],l[1],l[2],l[3]),[e,r.AccountDetailsForm,r.PrimaryContactForm,r.BusinessAddressForm],l=>new Zt(6,[l]))]}}case 6:{const i=n.fields[0];return[new On(r.AccountDetailsForm,r.PrimaryContactForm,r.BusinessAddressForm,r.CurrentView,new pe(2,[i])),i.tag===1?Le():ra(new J(15,[e,jt(i.fields[0])]))]}default:return[new On(r.AccountDetailsForm,r.PrimaryContactForm,r.BusinessAddressForm,(s=r.CurrentView,s.tag===1?new sr(2,[]):s.tag===2?new sr(2,[]):new sr(1,[])),r.AccountCreation),Le()]}}var n_=0;function M(e,t,n,r,o,s){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:--n_,__i:-1,__u:0,__source:o,__self:s};if(typeof e=="function"&&(i=e.defaultProps))for(a in i)l[a]===void 0&&(l[a]=i[a]);return ee.vnode&&ee.vnode(c),c}var yo=e=>e.type==="checkbox",ir=e=>e instanceof Date,_t=e=>e==null;const tf=e=>typeof e=="object";var Ue=e=>!_t(e)&&!Array.isArray(e)&&tf(e)&&!ir(e),nf=e=>Ue(e)&&e.target?yo(e.target)?e.target.checked:e.target.value:e,r_=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,rf=(e,t)=>e.has(r_(t)),o_=e=>{const t=e.constructor&&e.constructor.prototype;return Ue(t)&&t.hasOwnProperty("isPrototypeOf")},ma=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function bt(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(!(ma&&(e instanceof Blob||r))&&(n||Ue(e)))if(t=n?[]:{},!n&&!o_(e))t=e;else for(const o in e)e.hasOwnProperty(o)&&(t[o]=bt(e[o]));else return e;return t}var vs=e=>Array.isArray(e)?e.filter(Boolean):[],ze=e=>e===void 0,F=(e,t,n)=>{if(!t||!Ue(e))return n;const r=vs(t.split(/[,[\].]+?/)).reduce((o,s)=>_t(o)?o:o[s],e);return ze(r)||r===e?ze(e[t])?n:e[t]:r},Vt=e=>typeof e=="boolean",$a=e=>/^\w*$/.test(e),of=e=>vs(e.replace(/["|']|\]/g,"").split(/\.|\[/)),Ce=(e,t,n)=>{let r=-1;const o=$a(t)?[t]:of(t),s=o.length,i=s-1;for(;++r<s;){const a=o[r];let l=n;if(r!==i){const c=e[a];l=Ue(c)||Array.isArray(c)?c:isNaN(+o[r+1])?{}:[]}if(a==="__proto__"||a==="constructor"||a==="prototype")return;e[a]=l,e=e[a]}return e};const xs={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Jt={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"},s_=q.createContext(null),ga=()=>q.useContext(s_);var sf=(e,t,n,r=!0)=>{const o={defaultValues:t._defaultValues};for(const s in e)Object.defineProperty(o,s,{get:()=>{const i=s;return t._proxyFormState[i]!==Jt.all&&(t._proxyFormState[i]=!r||Jt.all),n&&(n[i]=!0),e[i]}});return o},yt=e=>Ue(e)&&!Object.keys(e).length,af=(e,t,n,r)=>{n(e);const{name:o,...s}=e;return yt(s)||Object.keys(s).length>=Object.keys(t).length||Object.keys(s).find(i=>t[i]===(!r||Jt.all))},vo=e=>Array.isArray(e)?e:[e],lf=(e,t,n)=>!e||!t||e===t||vo(e).some(r=>r&&(n?r===t:r.startsWith(t)||t.startsWith(r)));function wa(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 i_(e){const t=ga(),{control:n=t.control,disabled:r,name:o,exact:s}=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(o);return d.current=o,wa({disabled:r,next:u=>l.current&&lf(d.current,u.name,s)&&af(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(()=>sf(i,n,c.current,!1),[i,n])}var nn=e=>typeof e=="string",cf=(e,t,n,r,o)=>nn(e)?(r&&t.watch.add(e),F(n,e,o)):Array.isArray(e)?e.map(s=>(r&&t.watch.add(s),F(n,s))):(r&&(t.watchAll=!0),n);function a_(e){const t=ga(),{control:n=t.control,name:r,defaultValue:o,disabled:s,exact:i}=e||{},a=q.useRef(r);a.current=r,wa({disabled:s,subject:n._subjects.values,next:d=>{lf(a.current,d.name,i)&&c(bt(cf(a.current,n._names,d.values||n._formValues,!1,o)))}});const[l,c]=q.useState(n._getWatch(r,o));return q.useEffect(()=>n._removeUnmounted()),l}function uf(e){const t=ga(),{name:n,disabled:r,control:o=t.control,shouldUnregister:s}=e,i=rf(o._names.array,n),a=a_({control:o,name:n,defaultValue:F(o._formValues,n,F(o._defaultValues,n,e.defaultValue)),exact:!0}),l=i_({control:o,name:n,exact:!0}),c=q.useRef(o.register(n,{...e.rules,value:a,...Vt(e.disabled)?{disabled:e.disabled}:{}})),d=q.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!F(l.errors,n)},isDirty:{enumerable:!0,get:()=>!!F(l.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!F(l.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!F(l.validatingFields,n)},error:{enumerable:!0,get:()=>F(l.errors,n)}}),[l,n]),u=q.useMemo(()=>({name:n,value:a,...Vt(r)||l.disabled?{disabled:l.disabled||r}:{},onChange:h=>c.current.onChange({target:{value:nf(h),name:n},type:xs.CHANGE}),onBlur:()=>c.current.onBlur({target:{value:F(o._formValues,n),name:n},type:xs.BLUR}),ref:h=>{const f=F(o._fields,n);f&&h&&(f._f.ref={focus:()=>h.focus(),select:()=>h.select(),setCustomValidity:p=>h.setCustomValidity(p),reportValidity:()=>h.reportValidity()})}}),[n,o._formValues,r,l.disabled,a,o._fields]);return q.useEffect(()=>{const h=o._options.shouldUnregister||s,f=(p,_)=>{const $=F(o._fields,p);$&&$._f&&($._f.mount=_)};if(f(n,!0),h){const p=bt(F(o._options.defaultValues,n));Ce(o._defaultValues,n,p),ze(F(o._formValues,n))&&Ce(o._formValues,n,p)}return!i&&o.register(n),()=>{(i?h&&!o._state.action:h)?o.unregister(n):f(n,!1)}},[n,o,i,s]),q.useEffect(()=>{o._updateDisabledField({disabled:r,fields:o._fields,name:n})},[r,n,o]),q.useMemo(()=>({field:u,formState:l,fieldState:d}),[u,l,d])}var l_=(e,t,n,r,o)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:o||!0}}:{},df=e=>({isOnSubmit:!e||e===Jt.onSubmit,isOnBlur:e===Jt.onBlur,isOnChange:e===Jt.onChange,isOnAll:e===Jt.all,isOnTouch:e===Jt.onTouched}),ff=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const xo=(e,t,n,r)=>{for(const o of n||Object.keys(e)){const s=F(e,o);if(s){const{_f:i,...a}=s;if(i){if(i.refs&&i.refs[0]&&t(i.refs[0],o)&&!r)return!0;if(i.ref&&t(i.ref,i.name)&&!r)return!0;if(xo(a,t))break}else if(Ue(a)&&xo(a,t))break}}};var c_=(e,t,n)=>{const r=vo(F(e,n));return Ce(r,"root",t[n]),Ce(e,n,r),e},_a=e=>e.type==="file",rn=e=>typeof e=="function",Cs=e=>{if(!ma)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Ss=e=>nn(e),ba=e=>e.type==="radio",ks=e=>e instanceof RegExp;const hf={value:!1,isValid:!1},pf={value:!0,isValid:!0};var mf=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&&!ze(e[0].attributes.value)?ze(e[0].value)||e[0].value===""?pf:{value:e[0].value,isValid:!0}:pf:hf}return hf};const $f={isValid:!1,value:null};var gf=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,$f):$f;function wf(e,t,n="validate"){if(Ss(e)||Array.isArray(e)&&e.every(Ss)||Vt(e)&&!e)return{type:n,message:Ss(e)?e:"",ref:t}}var zr=e=>Ue(e)&&!ks(e)?e:{value:e,message:""},_f=async(e,t,n,r,o,s)=>{const{ref:i,refs:a,required:l,maxLength:c,minLength:d,min:u,max:h,pattern:f,validate:p,name:_,valueAsNumber:$,mount:v}=e._f,y=F(n,_);if(!v||t.has(_))return{};const C=a?a[0]:i,R=G=>{o&&C.reportValidity&&(C.setCustomValidity(Vt(G)?"":G||""),C.reportValidity())},L={},X=ba(i),$e=yo(i),be=X||$e,ue=($||_a(i))&&ze(i.value)&&ze(y)||Cs(i)&&i.value===""||y===""||Array.isArray(y)&&!y.length,Y=l_.bind(null,_,r,L),de=(G,te,Se,N=xn.maxLength,ye=xn.minLength)=>{const le=G?te:Se;L[_]={type:G?N:ye,message:le,ref:i,...Y(G?N:ye,le)}};if(s?!Array.isArray(y)||!y.length:l&&(!be&&(ue||_t(y))||Vt(y)&&!y||$e&&!mf(a).isValid||X&&!gf(a).isValid)){const{value:G,message:te}=Ss(l)?{value:!!l,message:l}:zr(l);if(G&&(L[_]={type:xn.required,message:te,ref:C,...Y(xn.required,te)},!r))return R(te),L}if(!ue&&(!_t(u)||!_t(h))){let G,te;const Se=zr(h),N=zr(u);if(!_t(y)&&!isNaN(y)){const ye=i.valueAsNumber||y&&+y;_t(Se.value)||(G=ye>Se.value),_t(N.value)||(te=ye<N.value)}else{const ye=i.valueAsDate||new Date(y),le=Ve=>new Date(new Date().toDateString()+" "+Ve),Je=i.type=="time",ke=i.type=="week";nn(Se.value)&&y&&(G=Je?le(y)>le(Se.value):ke?y>Se.value:ye>new Date(Se.value)),nn(N.value)&&y&&(te=Je?le(y)<le(N.value):ke?y<N.value:ye<new Date(N.value))}if((G||te)&&(de(!!G,Se.message,N.message,xn.max,xn.min),!r))return R(L[_].message),L}if((c||d)&&!ue&&(nn(y)||s&&Array.isArray(y))){const G=zr(c),te=zr(d),Se=!_t(G.value)&&y.length>+G.value,N=!_t(te.value)&&y.length<+te.value;if((Se||N)&&(de(Se,G.message,te.message),!r))return R(L[_].message),L}if(f&&!ue&&nn(y)){const{value:G,message:te}=zr(f);if(ks(G)&&!y.match(G)&&(L[_]={type:xn.pattern,message:te,ref:i,...Y(xn.pattern,te)},!r))return R(te),L}if(p){if(rn(p)){const G=await p(y,n),te=wf(G,C);if(te&&(L[_]={...te,...Y(xn.validate,te.message)},!r))return R(te.message),L}else if(Ue(p)){let G={};for(const te in p){if(!yt(G)&&!r)break;const Se=wf(await p[te](y,n),C,te);Se&&(G={...Se,...Y(te,Se.message)},R(Se.message),r&&(L[_]=G))}if(!yt(G)&&(L[_]={ref:C,...G},!r))return L}}return R(!0),L};function u_(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;)e=ze(e)?r++:e[t[r++]];return e}function d_(e){for(const t in e)if(e.hasOwnProperty(t)&&!ze(e[t]))return!1;return!0}function qe(e,t){const n=Array.isArray(t)?t:$a(t)?[t]:of(t),r=n.length===1?e:u_(e,n),o=n.length-1,s=n[o];return r&&delete r[s],o!==0&&(Ue(r)&&yt(r)||Array.isArray(r)&&d_(r))&&qe(e,n.slice(0,-1)),e}var ya=()=>{let e=[];return{get observers(){return e},next:o=>{for(const s of e)s.next&&s.next(o)},subscribe:o=>(e.push(o),{unsubscribe:()=>{e=e.filter(s=>s!==o)}}),unsubscribe:()=>{e=[]}}},va=e=>_t(e)||!tf(e);function Dn(e,t){if(va(e)||va(t))return e===t;if(ir(e)&&ir(t))return e.getTime()===t.getTime();const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const o of n){const s=e[o];if(!r.includes(o))return!1;if(o!=="ref"){const i=t[o];if(ir(s)&&ir(i)||Ue(s)&&Ue(i)||Array.isArray(s)&&Array.isArray(i)?!Dn(s,i):s!==i)return!1}}return!0}var bf=e=>e.type==="select-multiple",f_=e=>ba(e)||yo(e),xa=e=>Cs(e)&&e.isConnected,yf=e=>{for(const t in e)if(rn(e[t]))return!0;return!1};function As(e,t={}){const n=Array.isArray(e);if(Ue(e)||n)for(const r in e)Array.isArray(e[r])||Ue(e[r])&&!yf(e[r])?(t[r]=Array.isArray(e[r])?[]:{},As(e[r],t[r])):_t(e[r])||(t[r]=!0);return t}function vf(e,t,n){const r=Array.isArray(e);if(Ue(e)||r)for(const o in e)Array.isArray(e[o])||Ue(e[o])&&!yf(e[o])?ze(t)||va(n[o])?n[o]=Array.isArray(e[o])?As(e[o],[]):{...As(e[o])}:vf(e[o],_t(t)?{}:t[o],n[o]):n[o]=!Dn(e[o],t[o]);return n}var Co=(e,t)=>vf(e,t,As(t)),xf=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>ze(e)?e:t?e===""?NaN:e&&+e:n&&nn(e)?new Date(e):r?r(e):e;function Ca(e){const t=e.ref;return _a(t)?t.files:ba(t)?gf(e.refs).value:bf(t)?[...t.selectedOptions].map(({value:n})=>n):yo(t)?mf(e.refs).value:xf(ze(t.value)?e.ref.value:t.value,e)}var h_=(e,t,n,r)=>{const o={};for(const s of e){const i=F(t,s);i&&Ce(o,s,i._f)}return{criteriaMode:n,names:[...e],fields:o,shouldUseNativeValidation:r}},So=e=>ze(e)?e:ks(e)?e.source:Ue(e)?ks(e.value)?e.value.source:e.value:e;const Cf="AsyncFunction";var p_=e=>!!e&&!!e.validate&&!!(rn(e.validate)&&e.validate.constructor.name===Cf||Ue(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===Cf)),m_=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function Sf(e,t,n){const r=F(e,n);if(r||$a(n))return{error:r,name:n};const o=n.split(".");for(;o.length;){const s=o.join("."),i=F(t,s),a=F(e,s);if(i&&!Array.isArray(i)&&n!==s)return{name:n};if(a&&a.type)return{name:s,error:a};o.pop()}return{name:n}}var $_=(e,t,n,r,o)=>o.isOnAll?!1:!n&&o.isOnTouch?!(t||e):(n?r.isOnBlur:o.isOnBlur)?!e:(n?r.isOnChange:o.isOnChange)?e:!0,g_=(e,t)=>!vs(F(e,t)).length&&qe(e,t);const w_={mode:Jt.onSubmit,reValidateMode:Jt.onChange,shouldFocusError:!0};function __(e={}){let t={...w_,...e},n={submitCount:0,isDirty:!1,isLoading:rn(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},r={},o=Ue(t.defaultValues)||Ue(t.values)?bt(t.defaultValues||t.values)||{}:{},s=t.shouldUnregister?{}:bt(o),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:ya(),array:ya(),state:ya()},h=df(t.mode),f=df(t.reValidateMode),p=t.criteriaMode===Jt.all,_=g=>x=>{clearTimeout(c),c=setTimeout(g,x)},$=async g=>{if(!t.disabled&&(d.isValid||g)){const x=t.resolver?yt((await be()).errors):await Y(r,!0);x!==n.isValid&&u.state.next({isValid:x})}},v=(g,x)=>{!t.disabled&&(d.isValidating||d.validatingFields)&&((g||Array.from(a.mount)).forEach(S=>{S&&(x?Ce(n.validatingFields,S,x):qe(n.validatingFields,S))}),u.state.next({validatingFields:n.validatingFields,isValidating:!yt(n.validatingFields)}))},y=(g,x=[],S,U,V=!0,P=!0)=>{if(U&&S&&!t.disabled){if(i.action=!0,P&&Array.isArray(F(r,g))){const Z=S(F(r,g),U.argA,U.argB);V&&Ce(r,g,Z)}if(P&&Array.isArray(F(n.errors,g))){const Z=S(F(n.errors,g),U.argA,U.argB);V&&Ce(n.errors,g,Z),g_(n.errors,g)}if(d.touchedFields&&P&&Array.isArray(F(n.touchedFields,g))){const Z=S(F(n.touchedFields,g),U.argA,U.argB);V&&Ce(n.touchedFields,g,Z)}d.dirtyFields&&(n.dirtyFields=Co(o,s)),u.state.next({name:g,isDirty:G(g,x),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else Ce(s,g,x)},C=(g,x)=>{Ce(n.errors,g,x),u.state.next({errors:n.errors})},R=g=>{n.errors=g,u.state.next({errors:n.errors,isValid:!1})},L=(g,x,S,U)=>{const V=F(r,g);if(V){const P=F(s,g,ze(S)?F(o,g):S);ze(P)||U&&U.defaultChecked||x?Ce(s,g,x?P:Ca(V._f)):N(g,P),i.mount&&$()}},X=(g,x,S,U,V)=>{let P=!1,Z=!1;const se={name:g};if(!t.disabled){const et=!!(F(r,g)&&F(r,g)._f&&F(r,g)._f.disabled);if(!S||U){d.isDirty&&(Z=n.isDirty,n.isDirty=se.isDirty=G(),P=Z!==se.isDirty);const tt=et||Dn(F(o,g),x);Z=!!(!et&&F(n.dirtyFields,g)),tt||et?qe(n.dirtyFields,g):Ce(n.dirtyFields,g,!0),se.dirtyFields=n.dirtyFields,P=P||d.dirtyFields&&Z!==!tt}if(S){const tt=F(n.touchedFields,g);tt||(Ce(n.touchedFields,g,S),se.touchedFields=n.touchedFields,P=P||d.touchedFields&&tt!==S)}P&&V&&u.state.next(se)}return P?se:{}},$e=(g,x,S,U)=>{const V=F(n.errors,g),P=d.isValid&&Vt(x)&&n.isValid!==x;if(t.delayError&&S?(l=_(()=>C(g,S)),l(t.delayError)):(clearTimeout(c),l=null,S?Ce(n.errors,g,S):qe(n.errors,g)),(S?!Dn(V,S):V)||!yt(U)||P){const Z={...U,...P&&Vt(x)?{isValid:x}:{},errors:n.errors,name:g};n={...n,...Z},u.state.next(Z)}},be=async g=>{v(g,!0);const x=await t.resolver(s,t.context,h_(g||a.mount,r,t.criteriaMode,t.shouldUseNativeValidation));return v(g),x},ue=async g=>{const{errors:x}=await be(g);if(g)for(const S of g){const U=F(x,S);U?Ce(n.errors,S,U):qe(n.errors,S)}else n.errors=x;return x},Y=async(g,x,S={valid:!0})=>{for(const U in g){const V=g[U];if(V){const{_f:P,...Z}=V;if(P){const se=a.array.has(P.name),et=V._f&&p_(V._f);et&&d.validatingFields&&v([U],!0);const tt=await _f(V,a.disabled,s,p,t.shouldUseNativeValidation&&!x,se);if(et&&d.validatingFields&&v([U]),tt[P.name]&&(S.valid=!1,x))break;!x&&(F(tt,P.name)?se?c_(n.errors,tt,P.name):Ce(n.errors,P.name,tt[P.name]):qe(n.errors,P.name))}!yt(Z)&&await Y(Z,x,S)}}return S.valid},de=()=>{for(const g of a.unMount){const x=F(r,g);x&&(x._f.refs?x._f.refs.every(S=>!xa(S)):!xa(x._f.ref))&&Po(g)}a.unMount=new Set},G=(g,x)=>!t.disabled&&(g&&x&&Ce(s,g,x),!Dn(vt(),o)),te=(g,x,S)=>cf(g,a,{...i.mount?s:ze(x)?o:nn(g)?{[g]:x}:x},S,x),Se=g=>vs(F(i.mount?s:o,g,t.shouldUnregister?F(o,g,[]):[])),N=(g,x,S={})=>{const U=F(r,g);let V=x;if(U){const P=U._f;P&&(!P.disabled&&Ce(s,g,xf(x,P)),V=Cs(P.ref)&&_t(x)?"":x,bf(P.ref)?[...P.ref.options].forEach(Z=>Z.selected=V.includes(Z.value)):P.refs?yo(P.ref)?P.refs.length>1?P.refs.forEach(Z=>(!Z.defaultChecked||!Z.disabled)&&(Z.checked=Array.isArray(V)?!!V.find(se=>se===Z.value):V===Z.value)):P.refs[0]&&(P.refs[0].checked=!!V):P.refs.forEach(Z=>Z.checked=Z.value===V):_a(P.ref)?P.ref.value="":(P.ref.value=V,P.ref.type||u.values.next({name:g,values:{...s}})))}(S.shouldDirty||S.shouldTouch)&&X(g,V,S.shouldTouch,S.shouldDirty,!0),S.shouldValidate&&Ve(g)},ye=(g,x,S)=>{for(const U in x){const V=x[U],P=`${g}.${U}`,Z=F(r,P);(a.array.has(g)||Ue(V)||Z&&!Z._f)&&!ir(V)?ye(P,V,S):N(P,V,S)}},le=(g,x,S={})=>{const U=F(r,g),V=a.array.has(g),P=bt(x);Ce(s,g,P),V?(u.array.next({name:g,values:{...s}}),(d.isDirty||d.dirtyFields)&&S.shouldDirty&&u.state.next({name:g,dirtyFields:Co(o,s),isDirty:G(g,P)})):U&&!U._f&&!_t(P)?ye(g,P,S):N(g,P,S),ff(g,a)&&u.state.next({...n}),u.values.next({name:i.mount?g:void 0,values:{...s}})},Je=async g=>{i.mount=!0;const x=g.target;let S=x.name,U=!0;const V=F(r,S),P=()=>x.type?Ca(V._f):nf(g),Z=se=>{U=Number.isNaN(se)||ir(se)&&isNaN(se.getTime())||Dn(se,F(s,S,se))};if(V){let se,et;const tt=P(),Un=g.type===xs.BLUR||g.type===xs.FOCUS_OUT,bv=!m_(V._f)&&!t.resolver&&!F(n.errors,S)&&!V._f.deps||$_(Un,F(n.touchedFields,S),n.isSubmitted,f,h),Ga=ff(S,a,Un);Ce(s,S,tt),Un?(V._f.onBlur&&V._f.onBlur(g),l&&l(0)):V._f.onChange&&V._f.onChange(g);const qa=X(S,tt,Un,!1),yv=!yt(qa)||Ga;if(!Un&&u.values.next({name:S,type:g.type,values:{...s}}),bv)return d.isValid&&(t.mode==="onBlur"&&Un?$():Un||$()),yv&&u.state.next({name:S,...Ga?{}:qa});if(!Un&&Ga&&u.state.next({...n}),t.resolver){const{errors:ch}=await be([S]);if(Z(tt),U){const vv=Sf(n.errors,r,S),uh=Sf(ch,r,vv.name||S);se=uh.error,S=uh.name,et=yt(ch)}}else v([S],!0),se=(await _f(V,a.disabled,s,p,t.shouldUseNativeValidation))[S],v([S]),Z(tt),U&&(se?et=!1:d.isValid&&(et=await Y(r,!0)));U&&(V._f.deps&&Ve(V._f.deps),$e(S,et,se,qa))}},ke=(g,x)=>{if(F(n.errors,x)&&g.focus)return g.focus(),1},Ve=async(g,x={})=>{let S,U;const V=vo(g);if(t.resolver){const P=await ue(ze(g)?g:V);S=yt(P),U=g?!V.some(Z=>F(P,Z)):S}else g?(U=(await Promise.all(V.map(async P=>{const Z=F(r,P);return await Y(Z&&Z._f?{[P]:Z}:Z)}))).every(Boolean),!(!U&&!n.isValid)&&$()):U=S=await Y(r);return u.state.next({...!nn(g)||d.isValid&&S!==n.isValid?{}:{name:g},...t.resolver||!g?{isValid:S}:{},errors:n.errors}),x.shouldFocus&&!U&&xo(r,ke,g?V:a.mount),U},vt=g=>{const x={...i.mount?s:o};return ze(g)?x:nn(g)?F(x,g):g.map(S=>F(x,S))},Yt=(g,x)=>({invalid:!!F((x||n).errors,g),isDirty:!!F((x||n).dirtyFields,g),error:F((x||n).errors,g),isValidating:!!F(n.validatingFields,g),isTouched:!!F((x||n).touchedFields,g)}),pr=g=>{g&&vo(g).forEach(x=>qe(n.errors,x)),u.state.next({errors:g?n.errors:{}})},Dt=(g,x,S)=>{const U=(F(r,g,{_f:{}})._f||{}).ref,V=F(n.errors,g)||{},{ref:P,message:Z,type:se,...et}=V;Ce(n.errors,g,{...et,...x,ref:U}),u.state.next({name:g,errors:n.errors,isValid:!1}),S&&S.shouldFocus&&U&&U.focus&&U.focus()},Ro=(g,x)=>rn(g)?u.values.subscribe({next:S=>g(te(void 0,x),S)}):te(g,x,!0),Po=(g,x={})=>{for(const S of g?vo(g):a.mount)a.mount.delete(S),a.array.delete(S),x.keepValue||(qe(r,S),qe(s,S)),!x.keepError&&qe(n.errors,S),!x.keepDirty&&qe(n.dirtyFields,S),!x.keepTouched&&qe(n.touchedFields,S),!x.keepIsValidating&&qe(n.validatingFields,S),!t.shouldUnregister&&!x.keepDefaultValue&&qe(o,S);u.values.next({values:{...s}}),u.state.next({...n,...x.keepDirty?{isDirty:G()}:{}}),!x.keepIsValid&&$()},mr=({disabled:g,name:x,field:S,fields:U})=>{(Vt(g)&&i.mount||g||a.disabled.has(x))&&(g?a.disabled.add(x):a.disabled.delete(x),X(x,Ca(S?S._f:F(U,x)._f),!1,!1,!0))},Oo=(g,x={})=>{let S=F(r,g);const U=Vt(x.disabled)||Vt(t.disabled);return Ce(r,g,{...S||{},_f:{...S&&S._f?S._f:{ref:{name:g}},name:g,mount:!0,...x}}),a.mount.add(g),S?mr({field:S,disabled:Vt(x.disabled)?x.disabled:t.disabled,name:g}):L(g,!0,x.value),{...U?{disabled:x.disabled||t.disabled}:{},...t.progressive?{required:!!x.required,min:So(x.min),max:So(x.max),minLength:So(x.minLength),maxLength:So(x.maxLength),pattern:So(x.pattern)}:{},name:g,onChange:Je,onBlur:Je,ref:V=>{if(V){Oo(g,x),S=F(r,g);const P=ze(V.value)&&V.querySelectorAll&&V.querySelectorAll("input,select,textarea")[0]||V,Z=f_(P),se=S._f.refs||[];if(Z?se.find(et=>et===P):P===S._f.ref)return;Ce(r,g,{_f:{...S._f,...Z?{refs:[...se.filter(xa),P,...Array.isArray(F(o,g))?[{}]:[]],ref:{type:P.type,name:g}}:{ref:P}}}),L(g,!1,void 0,P)}else S=F(r,g,{}),S._f&&(S._f.mount=!1),(t.shouldUnregister||x.shouldUnregister)&&!(rf(a.array,g)&&i.action)&&a.unMount.add(g)}}},ne=()=>t.shouldFocusError&&xo(r,ke,a.mount),Ae=g=>{Vt(g)&&(u.state.next({disabled:g}),xo(r,(x,S)=>{const U=F(r,S);U&&(x.disabled=U._f.disabled||g,Array.isArray(U._f.refs)&&U._f.refs.forEach(V=>{V.disabled=U._f.disabled||g}))},0,!1))},ut=(g,x)=>async S=>{let U;S&&(S.preventDefault&&S.preventDefault(),S.persist&&S.persist());let V=bt(s);if(a.disabled.size)for(const P of a.disabled)Ce(V,P,void 0);if(u.state.next({isSubmitting:!0}),t.resolver){const{errors:P,values:Z}=await be();n.errors=P,V=Z}else await Y(r);if(qe(n.errors,"root"),yt(n.errors)){u.state.next({errors:{}});try{await g(V,S)}catch(P){U=P}}else x&&await x({...n.errors},S),ne(),setTimeout(ne);if(u.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:yt(n.errors)&&!U,submitCount:n.submitCount+1,errors:n.errors}),U)throw U},Gr=(g,x={})=>{F(r,g)&&(ze(x.defaultValue)?le(g,bt(F(o,g))):(le(g,x.defaultValue),Ce(o,g,bt(x.defaultValue))),x.keepTouched||qe(n.touchedFields,g),x.keepDirty||(qe(n.dirtyFields,g),n.isDirty=x.defaultValue?G(g,bt(F(o,g))):G()),x.keepError||(qe(n.errors,g),d.isValid&&$()),u.state.next({...n}))},Do=(g,x={})=>{const S=g?bt(g):o,U=bt(S),V=yt(g),P=V?o:U;if(x.keepDefaultValues||(o=S),!x.keepValues){if(x.keepDirtyValues){const Z=new Set([...a.mount,...Object.keys(Co(o,s))]);for(const se of Array.from(Z))F(n.dirtyFields,se)?Ce(P,se,F(s,se)):le(se,F(P,se))}else{if(ma&&ze(g))for(const Z of a.mount){const se=F(r,Z);if(se&&se._f){const et=Array.isArray(se._f.refs)?se._f.refs[0]:se._f.ref;if(Cs(et)){const tt=et.closest("form");if(tt){tt.reset();break}}}}r={}}s=t.shouldUnregister?x.keepDefaultValues?bt(o):{}:bt(P),u.array.next({values:{...P}}),u.values.next({values:{...P}})}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:V?!1:x.keepDirty?n.isDirty:!!(x.keepDefaultValues&&!Dn(g,o)),isSubmitted:x.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:V?{}:x.keepDirtyValues?x.keepDefaultValues&&s?Co(o,s):n.dirtyFields:x.keepDefaultValues&&g?Co(o,g):x.keepDirty?n.dirtyFields:{},touchedFields:x.keepTouched?n.touchedFields:{},errors:x.keepErrors?n.errors:{},isSubmitSuccessful:x.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1})},lh=(g,x)=>Do(rn(g)?g(s):g,x);return{control:{register:Oo,unregister:Po,getFieldState:Yt,handleSubmit:ut,setError:Dt,_executeSchema:be,_getWatch:te,_getDirty:G,_updateValid:$,_removeUnmounted:de,_updateFieldArray:y,_updateDisabledField:mr,_getFieldArray:Se,_reset:Do,_resetDefaultValues:()=>rn(t.defaultValues)&&t.defaultValues().then(g=>{lh(g,t.resetOptions),u.state.next({isLoading:!1})}),_updateFormState:g=>{n={...n,...g}},_disableForm:Ae,_subjects:u,_proxyFormState:d,_setErrors:R,get _fields(){return r},get _formValues(){return s},get _state(){return i},set _state(g){i=g},get _defaultValues(){return o},get _names(){return a},set _names(g){a=g},get _formState(){return n},set _formState(g){n=g},get _options(){return t},set _options(g){t={...t,...g}}},trigger:Ve,register:Oo,handleSubmit:ut,watch:Ro,setValue:le,getValues:vt,reset:lh,resetField:Gr,clearErrors:pr,unregister:Po,setError:Dt,setFocus:(g,x={})=>{const S=F(r,g),U=S&&S._f;if(U){const V=U.refs?U.refs[0]:U.ref;V.focus&&(V.focus(),x.shouldSelect&&rn(V.select)&&V.select())}},getFieldState:Yt}}function Sa(e={}){const t=q.useRef(void 0),n=q.useRef(void 0),[r,o]=q.useState({isDirty:!1,isValidating:!1,isLoading:rn(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:rn(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...__(e),formState:r});const s=t.current.control;return s._options=e,wa({subject:s._subjects.state,next:i=>{af(i,s._proxyFormState,s._updateFormState,!0)&&o({...s._formState})}}),q.useEffect(()=>s._disableForm(e.disabled),[s,e.disabled]),q.useEffect(()=>{if(s._proxyFormState.isDirty){const i=s._getDirty();i!==r.isDirty&&s._subjects.state.next({isDirty:i})}},[s,r.isDirty]),q.useEffect(()=>{e.values&&!Dn(e.values,n.current)?(s._reset(e.values,s._options.resetOptions),n.current=e.values,o(i=>({...i}))):s._resetDefaultValues()},[e.values,s]),q.useEffect(()=>{e.errors&&s._setErrors(e.errors)},[e.errors,s]),q.useEffect(()=>{s._state.mount||(s._updateValid(),s._state.mount=!0),s._state.watch&&(s._state.watch=!1,s._subjects.state.next({...s._formState})),s._removeUnmounted()}),q.useEffect(()=>{e.shouldUnregister&&s._subjects.values.next({values:s._getWatch()})},[e.shouldUnregister,s]),t.current.formState=sf(r,s),t.current}function b_(e){const t=e==null?void 0:e.match(/\d+/g);return t?t.join(""):""}function Rt({label:e,name:t,control:n,validate:r,placeholder:o,optional:s,isNumber:i}){const{field:a,fieldState:l}=uf({name:t,control:n,rules:{validate:r}});return M("div",{children:[M("div",{className:"flex justify-between",children:[M("label",{className:"block text-sm font-medium",children:e}),s&&M("p",{className:"text-sm text-gray-500 font-normal",children:"Optional"})]}),M("div",{className:"mt-2",children:M("input",{...a,placeholder:o,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(b_(c.target.value)):a.onChange(c)})}),l.invalid&&M("p",{className:"mt-2 text-sm text-red-600",children:[e," is invalid"]})]})}function ka({primaryLabel:e,secondaryLabel:t,secondaryOnClick:n,isBusy:r}){return M("div",{className:"flex flex-row-reverse pt-4 pb-6 gap-3 border-t -mx-6 px-6",children:[M("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?M("div",{className:"animate-spin size-5",children:M(i1,{})}):e}),M("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 y_({defaultValues:e,validateFirstName:t,validateLastName:n,validateEmail:r,validateMobilePhone:o,onSubmit:s,onBack:i}){const{handleSubmit:a,control:l,getValues:c}=Sa({mode:"onChange",defaultValues:e});return M(Pe,{children:[M("div",{className:"font-bold text-lg mb-4",children:"Primary contact"}),M("form",{className:"space-y-6",onSubmit:a(s),children:[M("div",{className:"grid grid-cols-2 gap-3",children:[M(Rt,{label:"Given name",name:"FirstName",control:l,placeholder:"e.g. Sam",validate:t}),M(Rt,{label:"Family name / surname",name:"LastName",control:l,placeholder:"e.g. Smith",validate:n})]}),M(Rt,{label:"Email",name:"Email",control:l,placeholder:"e.g. sam.smith@example.com",validate:r}),M("div",{className:"grid grid-cols-2 gap-3",children:M(Rt,{label:"Mobile phone number",name:"MobilePhone",control:l,placeholder:"e.g. +61400111222",validate:o})}),M(ka,{primaryLabel:"Next",secondaryLabel:"Back",secondaryOnClick:()=>i(c())})]})]})}function v_(e,t){return m(y_,{defaultValues:e,validateFirstName:n=>At(oc(n)),validateLastName:n=>At(ic(n)),validateEmail:n=>At(lc(n)),validateMobilePhone:n=>At(cc(n)),onSubmit:n=>{t(new Zt(3,[n])),t(new Zt(0,[]))},onBack:n=>{t(new Zt(3,[n])),t(new Zt(1,[]))}})}function x_(){return M("div",{className:"rounded-md bg-red-50 p-4 mb-2",children:M("div",{className:"flex",children:[M("div",{className:"shrink-0",children:M(u1,{"aria-hidden":"true",className:"size-5 text-red-400"})}),M("div",{className:"ml-3",children:[M("h3",{className:"text-sm font-medium text-red-800",children:"We're having trouble creating the account"}),M("div",{className:"mt-2 text-sm text-red-700",children:M("p",{children:"Please try again. If this keeps happening, please contact support."})})]})]})})}function C_({defaultValues:e,validateAddress1:t,validateAddress2:n,validateCity:r,validateState:o,validatePostcode:s,accountCreationInProgress:i,accountCreationFailed:a,onSubmit:l,onBack:c}){const{handleSubmit:d,control:u,register:h,getValues:f}=Sa({mode:"onChange",defaultValues:e});return M(Pe,{children:[a&&M(x_,{}),M("div",{className:"font-bold text-lg mb-4",children:"Business address"}),M("form",{className:"space-y-6",onSubmit:d(l),children:[M(Rt,{label:"Address (Line one)",name:"Line1",control:u,placeholder:"e.g. 100 Example Street",validate:t}),M(Rt,{label:"Address (Line two)",name:"Line2",control:u,placeholder:"Example: Floor, Unit, Building name, etc.",validate:n,optional:!0}),M("div",{className:"grid grid-cols-2 gap-3",children:[M(Rt,{label:"City / Suburb",name:"City",control:u,placeholder:"e.g. Sydney",validate:r}),M("div",{children:[M("label",{className:"block text-sm font-medium",children:"State"}),M("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:o}),children:[M("option",{children:"NSW"}),M("option",{children:"VIC"}),M("option",{children:"QLD"}),M("option",{children:"SA"}),M("option",{children:"WA"}),M("option",{children:"NT"}),M("option",{children:"TAS"}),M("option",{children:"ACT"})]})]})]}),M("div",{className:"grid grid-cols-2 gap-3",children:M(Rt,{label:"Postcode",name:"Postcode",control:u,placeholder:"e.g. 2000",validate:s,isNumber:!0})}),M(ka,{primaryLabel:"Add account",secondaryLabel:"Back",secondaryOnClick:()=>c(f()),isBusy:i})]})]})}function S_(e,t,n,r){return m(C_,{defaultValues:e,validateAddress1:o=>At(r$(o)),validateAddress2:o=>Zo(o)?!0:o$(o)!=null,validateCity:o=>At(s$(o)),validateState:o=>At(a$(o)),validatePostcode:o=>At(i$(o)),accountCreationInProgress:t,accountCreationFailed:n,onSubmit:o=>{r(new Zt(4,[o])),r(new Zt(5,[]))},onBack:o=>{r(new Zt(4,[o])),r(new Zt(1,[]))}})}function ko(e,t,n){let r=n.initialDeps??[],o;return()=>{var s,i,a,l;let c;n.key&&((s=n.debug)!=null&&s.call(n))&&(c=Date.now());const d=e();if(!(d.length!==r.length||d.some((f,p)=>r[p]!==f)))return o;r=d;let h;if(n.key&&((i=n.debug)!=null&&i.call(n))&&(h=Date.now()),o=t(...d),n.key&&((a=n.debug)!=null&&a.call(n))){const f=Math.round((Date.now()-c)*100)/100,p=Math.round((Date.now()-h)*100)/100,_=p/16,$=(v,y)=>{for(v=String(v);v.length<y;)v=" "+v;return v};console.info(`%c⏱ ${$(p,5)} /${$(f,5)} ms`,`
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`,`
46
46
  font-size: .6rem;
47
47
  font-weight: bold;
48
- color: hsl(${Math.max(0,Math.min(120-120*_,120))}deg 100% 31%);`,n==null?void 0:n.key)}return(l=n==null?void 0:n.onChange)==null||l.call(n,o),o}}function Aa(e,t){if(e===void 0)throw new Error("Unexpected undefined");return e}const k_=(e,t)=>Math.abs(e-t)<1,A_=(e,t,n)=>{let r;return function(...o){e.clearTimeout(r),r=e.setTimeout(()=>t.apply(this,o),n)}},E_=e=>e,I_=e=>{const t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1),r=[];for(let o=t;o<=n;o++)r.push(o);return r},T_=(e,t)=>{const n=e.scrollElement;if(!n)return;const r=e.targetWindow;if(!r)return;const o=i=>{const{width:a,height:l}=i;t({width:Math.round(a),height:Math.round(l)})};if(o(n.getBoundingClientRect()),!r.ResizeObserver)return()=>{};const s=new r.ResizeObserver(i=>{const a=i[0];if(a!=null&&a.borderBoxSize){const l=a.borderBoxSize[0];if(l){o({width:l.inlineSize,height:l.blockSize});return}}o(n.getBoundingClientRect())});return s.observe(n,{box:"border-box"}),()=>{s.unobserve(n)}},kf={passive:!0},N_=typeof window>"u"?!0:"onscrollend"in window,M_=(e,t)=>{const n=e.scrollElement;if(!n)return;const r=e.targetWindow;if(!r)return;let o=0;const s=N_?()=>{}:A_(r,()=>{t(o,!1)},e.options.isScrollingResetDelay),i=c=>()=>{o=n[e.options.horizontal?"scrollLeft":"scrollTop"],s(),t(o,c)},a=i(!0),l=i(!1);return l(),n.addEventListener("scroll",a,kf),n.addEventListener("scrollend",l,kf),()=>{n.removeEventListener("scroll",a),n.removeEventListener("scrollend",l)}},R_=(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"])},P_=(e,{adjustments:t=0,behavior:n},r)=>{var o,s;const i=e+t;(s=(o=r.scrollElement)==null?void 0:o.scrollTo)==null||s.call(o,{[r.options.horizontal?"left":"top"]:i,behavior:n})};class O_{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(o=>{o.forEach(s=>{this._measureElement(s.target,s)})}));return{disconnect:()=>{var o;return(o=r())==null?void 0:o.disconnect()},observe:o=>{var s;return(s=r())==null?void 0:s.observe(o,{box:"border-box"})},unobserve:o=>{var s;return(s=r())==null?void 0:s.unobserve(o)}}})(),this.range=null,this.setOptions=n=>{Object.entries(n).forEach(([r,o])=>{typeof o>"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:I_,onChange:()=>{},measureElement:R_,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 o,s;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))&&((s=(o=this.options).onChange)==null||s.call(o,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,o=>{this.scrollRect=o,this.notify(!1,!1)})),this.unsubs.push(this.options.observeElementOffset(this,(o,s)=>{this.scrollAdjustments=0,this.scrollDirection=s?this.getScrollOffset()<o?"forward":"backward":null,this.scrollOffset=o;const i=this.isScrolling;this.isScrolling=s,this.notify(i!==s,s)}))}},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 o=new Map,s=new Map;for(let i=r-1;i>=0;i--){const a=n[i];if(o.has(a.lane))continue;const l=s.get(a.lane);if(l==null||a.end>l.end?s.set(a.lane,a):a.end<l.end&&o.set(a.lane,!0),o.size===this.options.lanes)break}return s.size===this.options.lanes?Array.from(s.values()).sort((i,a)=>i.end===a.end?i.index-a.index:i.end-a.end)[0]:void 0},this.getMeasurementOptions=ko(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(n,r,o,s,i)=>(this.pendingMeasuredCacheIndexes=[],{count:n,paddingStart:r,scrollMargin:o,getItemKey:s,enabled:i}),{key:!1}),this.getMeasurements=ko(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:n,paddingStart:r,scrollMargin:o,getItemKey:s,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 L=s(u),X=this.elementsCache.get(L);if(!R){X&&(this.observer.unobserve(X),this.elementsCache.delete(L));return}X!==R&&(X&&this.observer.unobserve(X),this.observer.observe(R),this.elementsCache.set(L,R)),R.isConnected&&this.resizeItem(u,this.options.measureElement(R,void 0,this))});const f=s(u),p=this.options.lanes===1?d[u-1]:this.getFurthestMeasurement(d,u),_=p?p.end+this.options.gap:r+o,$=a.get(f),v=typeof $=="number"?$:this.options.estimateSize(u),y=_+v,C=p?p.lane:u%this.options.lanes;d[u]={index:u,start:_,size:v,end:y,key:f,lane:C,measureElement:h}}return this.measurementsCache=d,d},{key:!1,debug:()=>this.options.debug}),this.calculateRange=ko(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset()],(n,r,o)=>this.range=n.length>0&&r>0?D_({measurements:n,outerSize:r,scrollOffset:o}):null,{key:!1,debug:()=>this.options.debug}),this.getIndexes=ko(()=>[this.options.rangeExtractor,this.calculateRange(),this.options.overscan,this.options.count],(n,r,o,s)=>r===null?[]:n({startIndex:r.startIndex,endIndex:r.endIndex,overscan:o,count:s}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=n=>{const r=this.options.indexAttribute,o=n.getAttribute(r);return o?parseInt(o,10):(console.warn(`Missing attribute name '${r}={index}' on measured element.`),-1)},this._measureElement=(n,r)=>{const o=this.indexFromElement(n),s=this.getMeasurements()[o];if(!s||!n.isConnected){this.elementsCache.forEach((a,l)=>{a===n&&(this.observer.unobserve(n),this.elementsCache.delete(l))});return}const i=this.elementsCache.get(s.key);i!==n&&(i&&this.observer.unobserve(i),this.observer.observe(n),this.elementsCache.set(s.key,n)),this.resizeItem(o,this.options.measureElement(n,r,this))},this.resizeItem=(n,r)=>{const o=this.getMeasurements()[n];if(!o)return;const s=this.itemSizeCache.get(o.key)??o.size,i=r-s;i!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(o,i,this):o.start<this.getScrollOffset()+this.scrollAdjustments)&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=i,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(o.index),this.itemSizeCache=new Map(this.itemSizeCache.set(o.key,r)),this.notify(!0,!1))},this.measureElement=n=>{n&&this._measureElement(n,void 0)},this.getVirtualItems=ko(()=>[this.getIndexes(),this.getMeasurements()],(n,r)=>{const o=[];for(let s=0,i=n.length;s<i;s++){const a=n[s],l=r[a];o.push(l)}return o},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=n=>{const r=this.getMeasurements();if(r.length!==0)return Aa(r[Af(0,r.length-1,o=>Aa(r[o]).start,n)])},this.getOffsetForAlignment=(n,r)=>{const o=this.getSize(),s=this.getScrollOffset();r==="auto"&&(n<=s?r="start":n>=s+o?r="end":r="start"),r==="start"?n=n:r==="end"?n=n-o:r==="center"&&(n=n-o/2);const i=this.options.horizontal?"scrollWidth":"scrollHeight",l=(this.scrollElement?"document"in this.scrollElement?this.scrollElement.document.documentElement[i]:this.scrollElement[i]:0)-o;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 o=this.getMeasurements()[n];if(!o)return;const s=this.getSize(),i=this.getScrollOffset();if(r==="auto")if(o.end>=i+s-this.options.scrollPaddingEnd)r="end";else if(o.start<=i+this.options.scrollPaddingStart)r="start";else return[i,r];const a=r==="end"?o.end+this.options.scrollPaddingEnd:o.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:o}={})=>{this.cancelScrollToIndex(),o==="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:o})},this.scrollToIndex=(n,{align:r="auto",behavior:o}={})=>{n=Math.max(0,Math.min(n,this.options.count-1)),this.cancelScrollToIndex(),o==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");const s=this.getOffsetForIndex(n,r);if(!s)return;const[i,a]=s;this._scrollToOffset(i,{adjustments:void 0,behavior:o}),o!=="smooth"&&this.isDynamicMode()&&this.targetWindow&&(this.scrollToIndexTimeoutId=this.targetWindow.setTimeout(()=>{if(this.scrollToIndexTimeoutId=null,this.elementsCache.has(this.options.getItemKey(n))){const[c]=Aa(this.getOffsetForIndex(n,a));k_(c,this.getScrollOffset())||this.scrollToIndex(n,{align:a,behavior:o})}else this.scrollToIndex(n,{align:a,behavior:o})}))},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 o;return r.length===0?o=this.options.paddingStart:o=this.options.lanes===1?((n=r[r.length-1])==null?void 0:n.end)??0:Math.max(...r.slice(-this.options.lanes).map(s=>s.end)),o-this.options.scrollMargin+this.options.paddingEnd},this._scrollToOffset=(n,{adjustments:r,behavior:o})=>{this.options.scrollToFn(n,{behavior:o,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 Af=(e,t,n,r)=>{for(;e<=t;){const o=(e+t)/2|0,s=n(o);if(s<r)e=o+1;else if(s>r)t=o-1;else return o}return e>0?e-1:0};function D_({measurements:e,outerSize:t,scrollOffset:n}){const r=e.length-1,s=Af(0,r,a=>e[a].start,n);let i=s;for(;i<r&&e[i].end<n+t;)i++;return{startIndex:s,endIndex:i}}const F_=typeof document<"u"?_n:Te;function V_(e){const t=Ir(()=>({}),{})[1],n={...e,onChange:(o,s)=>{var i;s?zi(t):t(),(i=e.onChange)==null||i.call(e,o,s)}},[r]=We(()=>new O_(n));return r.setOptions(n),Te(()=>r._didMount(),[]),F_(()=>r._willUpdate()),r}function L_(e){return V_({observeElementRect:T_,observeElementOffset:M_,scrollToFn:P_,...e})}var B_=Object.defineProperty,U_=(e,t,n)=>t in e?B_(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ea=(e,t,n)=>(U_(e,typeof t!="symbol"?t+"":t,n),n);let z_=class{constructor(){Ea(this,"current",this.detect()),Ea(this,"handoffState","pending"),Ea(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"}},ar=new z_,Ke=(e,t)=>{ar.isServer?Te(e,t):_n(e,t)};function on(e){let t=ce(e);return Ke(()=>{t.current=e},[e]),t}function Ia(e,t){let[n,r]=We(e),o=on(e);return Ke(()=>r(o.current),[o,r,...t]),n}let oe=function(e){let t=on(e);return q.useCallback((...n)=>t.current(...n),[t])};function j_(e,t,n){let[r,o]=We(n),s=e!==void 0,i=ce(s),a=ce(!1),l=ce(!1);return s&&!i.current&&!a.current?(a.current=!0,i.current=s,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.")):!s&&i.current&&!l.current&&(l.current=!0,i.current=s,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.")),[s?e:r,oe(c=>(s||o(c),t==null?void 0:t(c)))]}function H_(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function lr(){let e=[],t={addEventListener(n,r,o,s){return n.addEventListener(r,o,s),t.add(()=>n.removeEventListener(r,o,s))},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 H_(()=>{r.current&&n[0]()}),t.add(()=>{r.current=!1})},style(n,r,o){let s=n.style.getPropertyValue(r);return Object.assign(n.style,{[r]:o}),this.add(()=>{Object.assign(n.style,{[r]:s})})},group(n){let r=lr();return n(r),this.add(()=>r.dispose())},add(n){return e.push(n),()=>{let r=e.indexOf(n);if(r>=0)for(let o of e.splice(r,1))o()}},dispose(){for(let n of e.splice(0))n()}};return t}function Ao(){let[e]=We(lr);return Te(()=>()=>e.dispose(),[e]),e}function W_(){let e=typeof document>"u";return"useSyncExternalStore"in Zi?(t=>t.useSyncExternalStore)(Zi)(()=>()=>{},()=>!1,()=>!e):!1}function Ta(){let e=W_(),[t,n]=We(ar.isHandoffComplete);return t&&ar.isHandoffComplete===!1&&n(!1),Te(()=>{t!==!0&&n(!0)},[t]),Te(()=>ar.handoff(),[]),e?!1:t}var Ef;let Eo=(Ef=q.useId)!=null?Ef:function(){let e=Ta(),[t,n]=q.useState(e?()=>ar.nextId():null);return Ke(()=>{t===null&&n(ar.nextId())},[t]),t!=null?""+t:void 0};function at(e,t,...n){if(e in t){let o=t[e];return typeof o=="function"?o(...n):o}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(o=>`"${o}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,at),r}function Na(e){return ar.isServer?null:e instanceof Node?e.ownerDocument:e!=null&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}let If=["[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 G_=(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))(G_||{}),q_=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(q_||{}),K_=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(K_||{}),Tf=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(Tf||{});function Z_(e,t=0){var n;return e===((n=Na(e))==null?void 0:n.body)?!1:at(t,{0(){return e.matches(If)},1(){let r=e;for(;r!==null;){if(r.matches(If))return!0;r=r.parentElement}return!1}})}var J_=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(J_||{});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 Y_(e,t=n=>n){return e.slice().sort((n,r)=>{let o=t(n),s=t(r);if(o===null||s===null)return 0;let i=o.compareDocumentPosition(s);return i&Node.DOCUMENT_POSITION_FOLLOWING?-1:i&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function X_(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function Q_(){return/Android/gi.test(window.navigator.userAgent)}function Nf(){return X_()||Q_()}function Es(e,t,n){let r=on(t);Te(()=>{function o(s){r.current(s)}return document.addEventListener(e,o,n),()=>document.removeEventListener(e,o,n)},[e,n])}function eb(e,t,n){let r=on(t);Te(()=>{function o(s){r.current(s)}return window.addEventListener(e,o,n),()=>window.removeEventListener(e,o,n)},[e,n])}function tb(e,t,n=!0){let r=ce(!1);Te(()=>{requestAnimationFrame(()=>{r.current=n})},[n]);function o(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!Z_(l,Tf.Loose)&&l.tabIndex!==-1&&i.preventDefault(),t(i,l)}let s=ce(null);Es("pointerdown",i=>{var a,l;r.current&&(s.current=((l=(a=i.composedPath)==null?void 0:a.call(i))==null?void 0:l[0])||i.target)},!0),Es("mousedown",i=>{var a,l;r.current&&(s.current=((l=(a=i.composedPath)==null?void 0:a.call(i))==null?void 0:l[0])||i.target)},!0),Es("click",i=>{Nf()||s.current&&(o(i,()=>s.current),s.current=null)},!0),Es("touchend",i=>o(i,()=>i.target instanceof HTMLElement?i.target:null),!0),eb("blur",i=>o(i,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function nb(...e){return it(()=>Na(...e),[...e])}function Mf(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 rb(e,t){let[n,r]=We(()=>Mf(e));return Ke(()=>{r(Mf(e))},[e.type,e.as]),Ke(()=>{n||t.current&&t.current instanceof HTMLButtonElement&&!t.current.hasAttribute("type")&&r("button")},[n,t]),n}let ob=Symbol();function cr(...e){let t=ce(e);Te(()=>{t.current=e},[e]);let n=oe(r=>{for(let o of t.current)o!=null&&(typeof o=="function"?o(r):o.current=r)});return e.every(r=>r==null||(r==null?void 0:r[ob]))?void 0:n}function Rf(e){return[e.screenX,e.screenY]}function sb(){let e=ce([-1,-1]);return{wasMoved(t){let n=Rf(t);return e.current[0]===n[0]&&e.current[1]===n[1]?!1:(e.current=n,!0)},update(t){e.current=Rf(t)}}}function ib({container:e,accept:t,walk:n,enabled:r=!0}){let o=ce(t),s=ce(n);Te(()=>{o.current=t,s.current=n},[t,n]),Ke(()=>{if(!e||!r)return;let i=Na(e);if(!i)return;let a=o.current,l=s.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,o,s])}function Pf(e,t){let n=ce([]),r=oe(e);Te(()=>{let o=[...n.current];for(let[s,i]of t.entries())if(n.current[s]!==i){let a=r(t,o);return n.current=t,a}},[r,...t])}function Is(...e){return Array.from(new Set(e.flatMap(t=>typeof t=="string"?t.split(" "):[]))).filter(Boolean).join(" ")}var Ts=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(Ts||{}),Fn=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(Fn||{});function Cn({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:o,visible:s=!0,name:i,mergeRefs:a}){a=a??ab;let l=Of(t,e);if(s)return Ns(l,n,r,i,a);let c=o??0;if(c&2){let{static:d=!1,...u}=l;if(d)return Ns(u,n,r,i,a)}if(c&1){let{unmount:d=!0,...u}=l;return at(d?0:1,{0(){return null},1(){return Ns({...u,hidden:!0,style:{display:"none"}},n,r,i,a)}})}return Ns(l,n,r,i,a)}function Ns(e,t={},n,r,o){let{as:s=n,children:i,refName:a="ref",...l}=Ra(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[p,_]of Object.entries(t))typeof _=="boolean"&&(h=!0),_===!0&&f.push(p);h&&(u["data-headlessui-state"]=f.join(" "))}if(s===Pe&&Object.keys(Ma(l)).length>0){if(!Nr(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(_=>` - ${_}`).join(`
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(_=>` - ${_}`).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 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(`
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"?(..._)=>Is(h==null?void 0:h.className(..._),l.className):Is(h==null?void 0:h.className,l.className),p=f?{className:f}:{};return Ui(d,Object.assign({},Of(d.props,Ma(Ra(l,["ref"]))),u,c,{ref:o(d.ref,c.ref)},p))}return m(s,Object.assign({},Ra(l,["ref"]),s!==Pe&&c,s!==Pe&&u),d)}function ab(...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 Of(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let o in r)o.startsWith("on")&&typeof r[o]=="function"?(n[o]!=null||(n[o]=[]),n[o].push(r[o])):t[o]=r[o];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](o,...s){let i=n[r];for(let a of i){if((o instanceof Event||(o==null?void 0:o.nativeEvent)instanceof Event)&&o.defaultPrevented)return;a(o,...s)}}});return t}function sn(e){var t;return Object.assign(Rn(e),{displayName:(t=e.displayName)!=null?t:e.name})}function Ma(e){let t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}function Ra(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}let lb="div";var Df=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(Df||{});function cb(e,t){var n;let{features:r=1,...o}=e,s={ref:t,"aria-hidden":(r&2)===2?!0:(n=o["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:s,theirProps:o,slot:{},defaultTag:lb,name:"Hidden"})}let ub=sn(cb),Pa=Nn(null);Pa.displayName="OpenClosedContext";var Pt=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(Pt||{});function Oa(){return en(Pa)}function Ff({value:e,children:t}){return q.createElement(Pa.Provider,{value:e},t)}function db(e){function t(){document.readyState!=="loading"&&(e(),document.removeEventListener("DOMContentLoaded",t))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",t),t())}let ur=[];db(()=>{function e(t){t.target instanceof HTMLElement&&t.target!==document.body&&ur[0]!==t.target&&(ur.unshift(t.target),ur=ur.filter(n=>n!=null&&n.isConnected),ur.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 fb(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&&hb(n)?!1:r}function hb(e){if(!e)return!1;let t=e.previousElementSibling;for(;t!==null;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}function pb(e){throw new Error("Unexpected object: "+e)}var Ze=(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))(Ze||{});function Vf(e,t){let n=t.resolveItems();if(n.length<=0)return null;let r=t.resolveActiveIndex(),o=r??-1;switch(e.focus){case 0:{for(let s=0;s<n.length;++s)if(!t.resolveDisabled(n[s],s,n))return s;return r}case 1:{for(let s=o-1;s>=0;--s)if(!t.resolveDisabled(n[s],s,n))return s;return r}case 2:{for(let s=o+1;s<n.length;++s)if(!t.resolveDisabled(n[s],s,n))return s;return r}case 3:{for(let s=n.length-1;s>=0;--s)if(!t.resolveDisabled(n[s],s,n))return s;return r}case 4:{for(let s=0;s<n.length;++s)if(t.resolveId(n[s],s,n)===e.id)return s;return r}case 5:return null;default:pb(e)}}function Lf(e={},t=null,n=[]){for(let[r,o]of Object.entries(e))Uf(n,Bf(t,r),o);return n}function Bf(e,t){return e?e+"["+t+"]":t}function Uf(e,t,n){if(Array.isArray(n))for(let[r,o]of n.entries())Uf(e,Bf(t,r.toString()),o);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,""]):Lf(n,t,e)}var Ot=(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))(Ot||{}),mb={},$b=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))($b||{}),gb=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(gb||{}),wb=(e=>(e[e.Pointer=0]="Pointer",e[e.Focus=1]="Focus",e[e.Other=2]="Other",e))(wb||{}),_b=(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))(_b||{});function Da(e,t=n=>n){let n=e.activeOptionIndex!==null?e.options[e.activeOptionIndex]:null,r=t(e.options.slice()),o=r.length>0&&r[0].dataRef.current.order!==null?r.sort((i,a)=>i.dataRef.current.order-a.dataRef.current.order):Y_(r,i=>i.dataRef.current.domRef.current),s=n?o.indexOf(n):null;return s===-1&&(s=null),{options:o,activeOptionIndex:s}}let bb={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,o,s,i;if((n=e.dataRef.current)!=null&&n.disabled||(r=e.dataRef.current)!=null&&r.optionsRef.current&&!((o=e.dataRef.current)!=null&&o.optionsPropsRef.current.static)&&e.comboboxState===1)return e;if(e.virtual){let d=t.focus===Ze.Specific?t.idx:Vf(t,{resolveItems:()=>e.virtual.options,resolveActiveIndex:()=>{var h,f;return(f=(h=e.activeOptionIndex)!=null?h:e.virtual.options.findIndex(p=>!e.virtual.disabled(p)))!=null?f:null},resolveDisabled:e.virtual.disabled,resolveId(){throw new Error("Function not implemented.")}}),u=(s=t.trigger)!=null?s:2;return e.activeOptionIndex===d&&e.activationTrigger===u?e:{...e,activeOptionIndex:d,activationTrigger:u}}let a=Da(e);if(a.activeOptionIndex===null){let d=a.options.findIndex(u=>!u.dataRef.current.disabled);d!==-1&&(a.activeOptionIndex=d)}let l=t.focus===Ze.Specific?t.idx:Vf(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,o;if((n=e.dataRef.current)!=null&&n.virtual)return{...e,options:[...e.options,t.payload]};let s=t.payload,i=Da(e,l=>(l.push(s),l));e.activeOptionIndex===null&&(r=e.dataRef.current)!=null&&r.isSelected(t.payload.dataRef.current.value)&&(i.activeOptionIndex=i.options.indexOf(s));let a={...e,...i,activationTrigger:2};return(o=e.dataRef.current)!=null&&o.__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(o=>o.id!==t.id)};let r=Da(e,o=>{let s=o.findIndex(i=>i.id===t.id);return s!==-1&&o.splice(s,1),o});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 o=t.options.indexOf(e.virtual.options[e.activeOptionIndex]);o!==-1?r=o:r=null}return{...e,activeOptionIndex:r,virtual:Object.assign({},e.virtual,{options:t.options})}}},Fa=Nn(null);Fa.displayName="ComboboxActionsContext";function Io(e){let t=en(Fa);if(t===null){let n=new Error(`<${e} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Io),n}return t}let zf=Nn(null);function yb(e){var t;let n=dr("VirtualProvider"),[r,o]=it(()=>{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]),s=L_({scrollPaddingStart:r,scrollPaddingEnd:o,count:n.virtual.options.length,estimateSize(){return 40},getScrollElement(){var l;return(l=n.optionsRef.current)!=null?l:null},overscan:12}),[i,a]=We(0);return Ke(()=>{a(l=>l+1)},[(t=n.virtual)==null?void 0:t.options]),q.createElement(zf.Provider,{value:s},q.createElement("div",{style:{position:"relative",width:"100%",height:`${s.getTotalSize()}px`},ref:l=>{if(l){if(typeof process<"u"&&mb.JEST_WORKER_ID!==void 0||n.activationTrigger===0)return;n.activeOptionIndex!==null&&n.virtual.options.length>n.activeOptionIndex&&s.scrollToIndex(n.activeOptionIndex)}}},s.getVirtualItems().map(l=>{var c;return q.createElement(Pe,{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 Va=Nn(null);Va.displayName="ComboboxDataContext";function dr(e){let t=en(Va);if(t===null){let n=new Error(`<${e} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,dr),n}return t}function vb(e,t){return at(t.type,bb,e,t)}let xb=Pe;function Cb(e,t){let{value:n,defaultValue:r,onChange:o,form:s,name:i,by:a=null,disabled:l=!1,__demoMode:c=!1,nullable:d=!1,multiple:u=!1,immediate:h=!1,virtual:f=null,...p}=e,_=!1,$=null,[v=u?[]:void 0,y]=j_(n,o,r),[C,R]=Ir(vb,{dataRef:ki(),comboboxState:c?0:1,options:[],virtual:null,activeOptionIndex:null,activationTrigger:2,labelId:null}),L=ce(!1),X=ce({static:!1,hold:!1}),$e=ce(null),be=ce(null),ue=ce(null),Y=ce(null),de=oe(typeof a=="string"?(ne,Ae)=>{let ut=a;return(ne==null?void 0:ne[ut])===(Ae==null?void 0:Ae[ut])}:a??((ne,Ae)=>ne===Ae)),G=oe(ne=>C.options.findIndex(Ae=>de(Ae.dataRef.current.value,ne))),te=Mn(ne=>at(N.mode,{1:()=>v.some(Ae=>de(Ae,ne)),0:()=>de(v,ne)}),[v]),Se=oe(ne=>C.activeOptionIndex===G(ne)),N=it(()=>({...C,immediate:_,optionsPropsRef:X,labelRef:$e,inputRef:be,buttonRef:ue,optionsRef:Y,value:v,defaultValue:r,disabled:l,mode:u?1:0,virtual:C.virtual,get activeOptionIndex(){if(L.current&&C.activeOptionIndex===null&&C.options.length>0){let ne=C.options.findIndex(Ae=>!Ae.dataRef.current.disabled);if(ne!==-1)return ne}return C.activeOptionIndex},calculateIndex:G,compare:de,isSelected:te,isActive:Se,nullable:d,__demoMode:c}),[v,r,l,u,d,c,C,$]);Ke(()=>{},[$,void 0]),Ke(()=>{C.dataRef.current=N},[N]),tb([N.buttonRef,N.inputRef,N.optionsRef],()=>Ro.closeCombobox(),N.comboboxState===0);let ye=it(()=>{var ne,Ae,ut;return{open:N.comboboxState===0,disabled:l,activeIndex:N.activeOptionIndex,activeOption:N.activeOptionIndex===null?null:N.virtual?N.virtual.options[(ne=N.activeOptionIndex)!=null?ne:0]:(ut=(Ae=N.options[N.activeOptionIndex])==null?void 0:Ae.dataRef.current.value)!=null?ut:null,value:v}},[N,l,v]),le=oe(()=>{if(N.activeOptionIndex!==null){if(N.virtual)pr(N.virtual.options[N.activeOptionIndex]);else{let{dataRef:ne}=N.options[N.activeOptionIndex];pr(ne.current.value)}Ro.goToOption(Ze.Specific,N.activeOptionIndex)}}),Je=oe(()=>{R({type:0}),L.current=!0}),ke=oe(()=>{R({type:1}),L.current=!1}),Ve=oe((ne,Ae,ut)=>(L.current=!1,ne===Ze.Specific?R({type:2,focus:Ze.Specific,idx:Ae,trigger:ut}):R({type:2,focus:ne,trigger:ut}))),vt=oe((ne,Ae)=>(R({type:3,payload:{id:ne,dataRef:Ae}}),()=>{N.isActive(Ae.current.value)&&(L.current=!0),R({type:4,id:ne})})),Yt=oe(ne=>(R({type:5,id:ne}),()=>R({type:5,id:null}))),pr=oe(ne=>at(N.mode,{0(){return y==null?void 0:y(ne)},1(){let Ae=N.value.slice(),ut=Ae.findIndex(Gr=>de(Gr,ne));return ut===-1?Ae.push(ne):Ae.splice(ut,1),y==null?void 0:y(Ae)}})),Dt=oe(ne=>{R({type:6,trigger:ne})}),Ro=it(()=>({onChange:pr,registerOption:vt,registerLabel:Yt,goToOption:Ve,closeCombobox:ke,openCombobox:Je,setActivationTrigger:Dt,selectActiveOption:le}),[]),Po=t===null?{}:{ref:t},mr=ce(null),Oo=Ao();return Te(()=>{mr.current&&r!==void 0&&Oo.addEventListener(mr.current,"reset",()=>{y==null||y(r)})},[mr,y]),q.createElement(Fa.Provider,{value:Ro},q.createElement(Va.Provider,{value:N},q.createElement(Ff,{value:at(N.comboboxState,{0:Pt.Open,1:Pt.Closed})},i!=null&&v!=null&&Lf({[i]:v}).map(([ne,Ae],ut)=>q.createElement(ub,{features:Df.Hidden,ref:ut===0?Gr=>{var Do;mr.current=(Do=Gr==null?void 0:Gr.closest("form"))!=null?Do:null}:void 0,...Ma({key:ne,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:s,disabled:l,name:ne,value:Ae})})),Cn({ourProps:Po,theirProps:p,slot:ye,defaultTag:xb,name:"Combobox"}))))}let Sb="input";function kb(e,t){var n,r,o,s,i;let a=Eo(),{id:l=`headlessui-combobox-input-${a}`,onChange:c,displayValue:d,type:u="text",...h}=e,f=dr("Combobox.Input"),p=Io("Combobox.Input"),_=cr(f.inputRef,t),$=nb(f.inputRef),v=ce(!1),y=Ao(),C=oe(()=>{p.onChange(null),f.optionsRef.current&&(f.optionsRef.current.scrollTop=0),p.goToOption(Ze.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:""}();Pf(([N,ye],[le,Je])=>{if(v.current)return;let ke=f.inputRef.current;ke&&((Je===0&&ye===1||N!==le)&&(ke.value=N),requestAnimationFrame(()=>{if(v.current||!ke||($==null?void 0:$.activeElement)!==ke)return;let{selectionStart:Ve,selectionEnd:vt}=ke;Math.abs((vt??0)-(Ve??0))===0&&Ve===0&&ke.setSelectionRange(ke.value.length,ke.value.length)}))},[R,f.comboboxState,$]),Pf(([N],[ye])=>{if(N===0&&ye===1){if(v.current)return;let le=f.inputRef.current;if(!le)return;let Je=le.value,{selectionStart:ke,selectionEnd:Ve,selectionDirection:vt}=le;le.value="",le.value=Je,vt!==null?le.setSelectionRange(ke,Ve,vt):le.setSelectionRange(ke,Ve)}},[f.comboboxState]);let L=ce(!1),X=oe(()=>{L.current=!0}),$e=oe(()=>{y.nextFrame(()=>{L.current=!1})}),be=oe(N=>{switch(v.current=!0,N.key){case Ot.Enter:if(v.current=!1,f.comboboxState!==0||L.current)return;if(N.preventDefault(),N.stopPropagation(),f.activeOptionIndex===null){p.closeCombobox();return}p.selectActiveOption(),f.mode===0&&p.closeCombobox();break;case Ot.ArrowDown:return v.current=!1,N.preventDefault(),N.stopPropagation(),at(f.comboboxState,{0:()=>p.goToOption(Ze.Next),1:()=>p.openCombobox()});case Ot.ArrowUp:return v.current=!1,N.preventDefault(),N.stopPropagation(),at(f.comboboxState,{0:()=>p.goToOption(Ze.Previous),1:()=>{p.openCombobox(),y.nextFrame(()=>{f.value||p.goToOption(Ze.Last)})}});case Ot.Home:if(N.shiftKey)break;return v.current=!1,N.preventDefault(),N.stopPropagation(),p.goToOption(Ze.First);case Ot.PageUp:return v.current=!1,N.preventDefault(),N.stopPropagation(),p.goToOption(Ze.First);case Ot.End:if(N.shiftKey)break;return v.current=!1,N.preventDefault(),N.stopPropagation(),p.goToOption(Ze.Last);case Ot.PageDown:return v.current=!1,N.preventDefault(),N.stopPropagation(),p.goToOption(Ze.Last);case Ot.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(),p.closeCombobox());case Ot.Tab:if(v.current=!1,f.comboboxState!==0)return;f.mode===0&&f.activationTrigger!==1&&p.selectActiveOption(),p.closeCombobox();break}}),ue=oe(N=>{c==null||c(N),f.nullable&&f.mode===0&&N.target.value===""&&C(),p.openCombobox()}),Y=oe(N=>{var ye,le,Je;let ke=(ye=N.relatedTarget)!=null?ye:ur.find(Ve=>Ve!==N.currentTarget);if(v.current=!1,!((le=f.optionsRef.current)!=null&&le.contains(ke))&&!((Je=f.buttonRef.current)!=null&&Je.contains(ke))&&f.comboboxState===0)return N.preventDefault(),f.mode===0&&(f.nullable&&f.value===null?C():f.activationTrigger!==1&&p.selectActiveOption()),p.closeCombobox()}),de=oe(N=>{var ye,le,Je;let ke=(ye=N.relatedTarget)!=null?ye:ur.find(Ve=>Ve!==N.currentTarget);(le=f.buttonRef.current)!=null&&le.contains(ke)||(Je=f.optionsRef.current)!=null&&Je.contains(ke)||f.disabled||f.immediate&&f.comboboxState!==0&&(p.openCombobox(),y.nextFrame(()=>{p.setActivationTrigger(1)}))}),G=Ia(()=>{if(f.labelId)return[f.labelId].join(" ")},[f.labelId]),te=it(()=>({open:f.comboboxState===0,disabled:f.disabled}),[f]),Se={ref:_,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 ye;return!((ye=f.virtual)!=null&&ye.disabled(N.dataRef.current.value))&&f.compare(N.dataRef.current.value,f.virtual.options[f.activeOptionIndex])}))==null?void 0:r.id:(o=f.options[f.activeOptionIndex])==null?void 0:o.id,"aria-labelledby":G,"aria-autocomplete":"list",defaultValue:(i=(s=e.defaultValue)!=null?s:f.defaultValue!==void 0?d==null?void 0:d(f.defaultValue):null)!=null?i:f.defaultValue,disabled:f.disabled,onCompositionStart:X,onCompositionEnd:$e,onKeyDown:be,onChange:ue,onFocus:de,onBlur:Y};return Cn({ourProps:Se,theirProps:h,slot:te,defaultTag:Sb,name:"Combobox.Input"})}let Ab="button";function Eb(e,t){var n;let r=dr("Combobox.Button"),o=Io("Combobox.Button"),s=cr(r.buttonRef,t),i=Eo(),{id:a=`headlessui-combobox-button-${i}`,...l}=e,c=Ao(),d=oe(_=>{switch(_.key){case Ot.ArrowDown:return _.preventDefault(),_.stopPropagation(),r.comboboxState===1&&o.openCombobox(),c.nextFrame(()=>{var $;return($=r.inputRef.current)==null?void 0:$.focus({preventScroll:!0})});case Ot.ArrowUp:return _.preventDefault(),_.stopPropagation(),r.comboboxState===1&&(o.openCombobox(),c.nextFrame(()=>{r.value||o.goToOption(Ze.Last)})),c.nextFrame(()=>{var $;return($=r.inputRef.current)==null?void 0:$.focus({preventScroll:!0})});case Ot.Escape:return r.comboboxState!==0?void 0:(_.preventDefault(),r.optionsRef.current&&!r.optionsPropsRef.current.static&&_.stopPropagation(),o.closeCombobox(),c.nextFrame(()=>{var $;return($=r.inputRef.current)==null?void 0:$.focus({preventScroll:!0})}));default:return}}),u=oe(_=>{if(fb(_.currentTarget))return _.preventDefault();r.comboboxState===0?o.closeCombobox():(_.preventDefault(),o.openCombobox()),c.nextFrame(()=>{var $;return($=r.inputRef.current)==null?void 0:$.focus({preventScroll:!0})})}),h=Ia(()=>{if(r.labelId)return[r.labelId,a].join(" ")},[r.labelId,a]),f=it(()=>({open:r.comboboxState===0,disabled:r.disabled,value:r.value}),[r]),p={ref:s,id:a,type:rb(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:p,theirProps:l,slot:f,defaultTag:Ab,name:"Combobox.Button"})}let Ib="label";function Tb(e,t){let n=Eo(),{id:r=`headlessui-combobox-label-${n}`,...o}=e,s=dr("Combobox.Label"),i=Io("Combobox.Label"),a=cr(s.labelRef,t);Ke(()=>i.registerLabel(r),[r]);let l=oe(()=>{var d;return(d=s.inputRef.current)==null?void 0:d.focus({preventScroll:!0})}),c=it(()=>({open:s.comboboxState===0,disabled:s.disabled}),[s]);return Cn({ourProps:{ref:a,id:r,onClick:l},theirProps:o,slot:c,defaultTag:Ib,name:"Combobox.Label"})}let Nb="ul",Mb=Ts.RenderStrategy|Ts.Static;function Rb(e,t){let n=Eo(),{id:r=`headlessui-combobox-options-${n}`,hold:o=!1,...s}=e,i=dr("Combobox.Options"),a=cr(i.optionsRef,t),l=Oa(),c=l!==null?(l&Pt.Open)===Pt.Open:i.comboboxState===0;Ke(()=>{var f;i.optionsPropsRef.current.static=(f=e.static)!=null?f:!1},[i.optionsPropsRef,e.static]),Ke(()=>{i.optionsPropsRef.current.hold=o},[i.optionsPropsRef,o]),ib({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=Ia(()=>{var f,p;return(p=i.labelId)!=null?p:(f=i.buttonRef.current)==null?void 0:f.id},[i.labelId,i.buttonRef.current]),u=it(()=>({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(s,{children:q.createElement(yb,null,s.children)}),Cn({ourProps:h,theirProps:s,slot:u,defaultTag:Nb,features:Mb,visible:c,name:"Combobox.Options"})}let Pb="li";function Ob(e,t){var n;let r=Eo(),{id:o=`headlessui-combobox-option-${r}`,disabled:s=!1,value:i,order:a=null,...l}=e,c=dr("Combobox.Option"),d=Io("Combobox.Option"),u=c.virtual?c.activeOptionIndex===c.calculateIndex(i):c.activeOptionIndex===null?!1:((n=c.options[c.activeOptionIndex])==null?void 0:n.id)===o,h=c.isSelected(i),f=ce(null),p=on({disabled:s,value:i,domRef:f,order:a}),_=en(zf),$=cr(t,f,_?_.measureElement:null),v=oe(()=>d.onChange(i));Ke(()=>d.registerOption(o,p),[p,o]);let y=ce(!(c.virtual||c.__demoMode));Ke(()=>{if(!c.virtual||!c.__demoMode)return;let Y=lr();return Y.requestAnimationFrame(()=>{y.current=!0}),Y.dispose},[c.virtual,c.__demoMode]),Ke(()=>{if(!y.current||c.comboboxState!==0||!u||c.activationTrigger===0)return;let Y=lr();return Y.requestAnimationFrame(()=>{var de,G;(G=(de=f.current)==null?void 0:de.scrollIntoView)==null||G.call(de,{block:"nearest"})}),Y.dispose},[f,u,c.comboboxState,c.activationTrigger,c.activeOptionIndex]);let C=oe(Y=>{var de;if(s||(de=c.virtual)!=null&&de.disabled(i))return Y.preventDefault();v(),Nf()||requestAnimationFrame(()=>{var G;return(G=c.inputRef.current)==null?void 0:G.focus({preventScroll:!0})}),c.mode===0&&requestAnimationFrame(()=>d.closeCombobox())}),R=oe(()=>{var Y;if(s||(Y=c.virtual)!=null&&Y.disabled(i))return d.goToOption(Ze.Nothing);let de=c.calculateIndex(i);d.goToOption(Ze.Specific,de)}),L=sb(),X=oe(Y=>L.update(Y)),$e=oe(Y=>{var de;if(!L.wasMoved(Y)||s||(de=c.virtual)!=null&&de.disabled(i)||u)return;let G=c.calculateIndex(i);d.goToOption(Ze.Specific,G,0)}),be=oe(Y=>{var de;L.wasMoved(Y)&&(s||(de=c.virtual)!=null&&de.disabled(i)||u&&(c.optionsPropsRef.current.hold||d.goToOption(Ze.Nothing)))}),ue=it(()=>({active:u,selected:h,disabled:s}),[u,h,s]);return Cn({ourProps:{id:o,ref:$,role:"option",tabIndex:s===!0?void 0:-1,"aria-disabled":s===!0?!0:void 0,"aria-selected":h,disabled:void 0,onClick:C,onFocus:R,onPointerEnter:X,onMouseEnter:X,onPointerMove:$e,onMouseMove:$e,onPointerLeave:be,onMouseLeave:be},theirProps:l,slot:ue,defaultTag:Pb,name:"Combobox.Option"})}let Db=sn(Cb),Fb=sn(Eb),Vb=sn(kb),Lb=sn(Tb),Bb=sn(Rb),Ub=sn(Ob),To=Object.assign(Db,{Input:Vb,Button:Fb,Label:Lb,Options:Bb,Option:Ub});function La(){let e=ce(!1);return Ke(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function zb(e=0){let[t,n]=We(e),r=La(),o=Mn(l=>{r.current&&n(c=>c|l)},[t,r]),s=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:o,hasFlag:s,removeFlag:i,toggleFlag:a}}function jb(e){let t={called:!1};return(...n)=>{if(!t.called)return t.called=!0,e(...n)}}function Ba(e,...t){e&&t.length>0&&e.classList.add(...t)}function Ua(e,...t){e&&t.length>0&&e.classList.remove(...t)}function Hb(e,t){let n=lr();if(!e)return n.dispose;let{transitionDuration:r,transitionDelay:o}=getComputedStyle(e),[s,i]=[r,o].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=s+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 Wb(e,t,n,r){let o=n?"enter":"leave",s=lr(),i=r!==void 0?jb(r):()=>{};o==="enter"&&(e.removeAttribute("hidden"),e.style.display="");let a=at(o,{enter:()=>t.enter,leave:()=>t.leave}),l=at(o,{enter:()=>t.enterTo,leave:()=>t.leaveTo}),c=at(o,{enter:()=>t.enterFrom,leave:()=>t.leaveFrom});return Ua(e,...t.base,...t.enter,...t.enterTo,...t.enterFrom,...t.leave,...t.leaveFrom,...t.leaveTo,...t.entered),Ba(e,...t.base,...a,...c),s.nextFrame(()=>{Ua(e,...t.base,...a,...c),Ba(e,...t.base,...a,...l),Hb(e,()=>(Ua(e,...t.base,...a),Ba(e,...t.base,...t.entered),i()))}),s.dispose}function Gb({immediate:e,container:t,direction:n,classes:r,onStart:o,onStop:s}){let i=La(),a=Ao(),l=on(n);Ke(()=>{e&&(l.current="enter")},[e]),Ke(()=>{let c=lr();a.add(c.dispose);let d=t.current;if(d&&l.current!=="idle"&&i.current)return c.dispose(),o.current(l.current),c.add(Wb(d,r.current,l.current==="enter",()=>{c.dispose(),s.current(l.current)})),c.dispose},[n])}function Vn(e=""){return e.split(/\s+/).filter(t=>t.length>1)}let Ms=Nn(null);Ms.displayName="TransitionContext";var qb=(e=>(e.Visible="visible",e.Hidden="hidden",e))(qb||{});function Kb(){let e=en(Ms);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}function Zb(){let e=en(Rs);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}let Rs=Nn(null);Rs.displayName="NestingContext";function Ps(e){return"children"in e?Ps(e.children):e.current.filter(({el:t})=>t.current!==null).filter(({state:t})=>t==="visible").length>0}function jf(e,t){let n=on(e),r=ce([]),o=La(),s=Ao(),i=oe((f,p=Fn.Hidden)=>{let _=r.current.findIndex(({el:$})=>$===f);_!==-1&&(at(p,{[Fn.Unmount](){r.current.splice(_,1)},[Fn.Hidden](){r.current[_].state="hidden"}}),s.microTask(()=>{var $;!Ps(r)&&o.current&&(($=n.current)==null||$.call(n))}))}),a=oe(f=>{let p=r.current.find(({el:_})=>_===f);return p?p.state!=="visible"&&(p.state="visible"):r.current.push({el:f,state:"visible"}),()=>i(f,Fn.Unmount)}),l=ce([]),c=ce(Promise.resolve()),d=ce({enter:[],leave:[],idle:[]}),u=oe((f,p,_)=>{l.current.splice(0),t&&(t.chains.current[p]=t.chains.current[p].filter(([$])=>$!==f)),t==null||t.chains.current[p].push([f,new Promise($=>{l.current.push($)})]),t==null||t.chains.current[p].push([f,new Promise($=>{Promise.all(d.current[p].map(([v,y])=>y)).then(()=>$())})]),p==="enter"?c.current=c.current.then(()=>t==null?void 0:t.wait.current).then(()=>_(p)):_(p)}),h=oe((f,p,_)=>{Promise.all(d.current[p].splice(0).map(([$,v])=>v)).then(()=>{var $;($=l.current.shift())==null||$()}).then(()=>_(p))});return it(()=>({children:r,register:a,unregister:i,onStart:u,onStop:h,wait:c,chains:d}),[a,i,r,u,h,d,c])}function Jb(){}let Yb=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function Hf(e){var t;let n={};for(let r of Yb)n[r]=(t=e[r])!=null?t:Jb;return n}function Xb(e){let t=ce(Hf(e));return Te(()=>{t.current=Hf(e)},[e]),t}let Qb="div",Wf=Ts.RenderStrategy;function ey(e,t){var n,r;let{beforeEnter:o,afterEnter:s,beforeLeave:i,afterLeave:a,enter:l,enterFrom:c,enterTo:d,entered:u,leave:h,leaveFrom:f,leaveTo:p,..._}=e,$=ce(null),v=cr($,t),y=(n=_.unmount)==null||n?Fn.Unmount:Fn.Hidden,{show:C,appear:R,initial:L}=Kb(),[X,$e]=We(C?"visible":"hidden"),be=Zb(),{register:ue,unregister:Y}=be;Te(()=>ue($),[ue,$]),Te(()=>{if(y===Fn.Hidden&&$.current){if(C&&X!=="visible"){$e("visible");return}return at(X,{hidden:()=>Y($),visible:()=>ue($)})}},[X,$,ue,Y,C,y]);let de=on({base:Vn(_.className),enter:Vn(l),enterFrom:Vn(c),enterTo:Vn(d),entered:Vn(u),leave:Vn(h),leaveFrom:Vn(f),leaveTo:Vn(p)}),G=Xb({beforeEnter:o,afterEnter:s,beforeLeave:i,afterLeave:a}),te=Ta();Te(()=>{if(te&&X==="visible"&&$.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[$,X,te]);let Se=L&&!R,N=R&&C&&L,ye=!te||Se?"idle":C?"enter":"leave",le=zb(0),Je=oe(Dt=>at(Dt,{enter:()=>{le.addFlag(Pt.Opening),G.current.beforeEnter()},leave:()=>{le.addFlag(Pt.Closing),G.current.beforeLeave()},idle:()=>{}})),ke=oe(Dt=>at(Dt,{enter:()=>{le.removeFlag(Pt.Opening),G.current.afterEnter()},leave:()=>{le.removeFlag(Pt.Closing),G.current.afterLeave()},idle:()=>{}})),Ve=jf(()=>{$e("hidden"),Y($)},be),vt=ce(!1);Gb({immediate:N,container:$,classes:de,direction:ye,onStart:on(Dt=>{vt.current=!0,Ve.onStart($,Dt,Je)}),onStop:on(Dt=>{vt.current=!1,Ve.onStop($,Dt,ke),Dt==="leave"&&!Ps(Ve)&&($e("hidden"),Y($))})});let Yt=_,pr={ref:v};return N?Yt={...Yt,className:Is(_.className,...de.current.enter,...de.current.enterFrom)}:vt.current&&(Yt.className=Is(_.className,(r=$.current)==null?void 0:r.className),Yt.className===""&&delete Yt.className),q.createElement(Rs.Provider,{value:Ve},q.createElement(Ff,{value:at(X,{visible:Pt.Open,hidden:Pt.Closed})|le.flags},Cn({ourProps:pr,theirProps:Yt,defaultTag:Qb,features:Wf,visible:X==="visible",name:"Transition.Child"})))}function ty(e,t){let{show:n,appear:r=!1,unmount:o=!0,...s}=e,i=ce(null),a=cr(i,t);Ta();let l=Oa();if(n===void 0&&l!==null&&(n=(l&Pt.Open)===Pt.Open),![!0,!1].includes(n))throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[c,d]=We(n?"visible":"hidden"),u=jf(()=>{d("hidden")}),[h,f]=We(!0),p=ce([n]);Ke(()=>{h!==!1&&p.current[p.current.length-1]!==n&&(p.current.push(n),f(!1))},[p,n]);let _=it(()=>({show:n,appear:r,initial:h}),[n,r,h]);Te(()=>{if(n)d("visible");else if(!Ps(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:o},v=oe(()=>{var C;h&&f(!1),(C=e.beforeEnter)==null||C.call(e)}),y=oe(()=>{var C;h&&f(!1),(C=e.beforeLeave)==null||C.call(e)});return q.createElement(Rs.Provider,{value:u},q.createElement(Ms.Provider,{value:_},Cn({ourProps:{...$,as:Pe,children:q.createElement(Gf,{ref:a,...$,...s,beforeEnter:v,beforeLeave:y})},theirProps:{},defaultTag:Pe,features:Wf,visible:c==="visible",name:"Transition"})))}function ny(e,t){let n=en(Ms)!==null,r=Oa()!==null;return q.createElement(q.Fragment,null,!n&&r?q.createElement(za,{ref:t,...e}):q.createElement(Gf,{ref:t,...e}))}let za=sn(ty),Gf=sn(ey),ry=sn(ny),oy=Object.assign(za,{Child:ry,Root:za});function sy({name:e,control:t,queryAnzsic:n}){const[r,o]=We(""),[s,i]=We([]),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}=uf({name:e,control:t,rules:{required:!0}});return M("div",{children:M(To,{onChange:l.onChange,value:l.value??null,name:l.name,children:[M(To.Label,{className:"block text-sm font-medium text-gray-900",children:"Industry"}),M("div",{className:"relative mt-2",children:[M("div",{className:"grid grid-cols-1",children:[M(To.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=>o(d.target.value),onBlur:()=>o(""),placeholder:"Type to search industries",displayValue:d=>{const u=l.value;return u!=null&&u.ClassTitle?`${u.ClassCode} ${u.ClassTitle}`:""}}),M(l1,{className:"pointer-events-none col-start-1 row-start-1 ml-3 self-center text-gray-400 size-4"})]}),s.length>0&&M(To.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:s.map(d=>M(Pe,{children:[M("div",{className:"flex items-center text-xs text-gray-500 font-semibold mb-1 mx-3 mt-2 uppercase",children:[M("span",{className:"self-start",children:d.GroupCode}),M("span",{className:"ml-2",children:d.GroupTitle})]}),d.Classes.map(u=>{var h,f;return M(To.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:[M("div",{className:`flex items-center text-sm ${((h=l.value)==null?void 0:h.ClassCode)===u.ClassCode?"font-semibold":"font-normal"}`,children:[M("span",{className:"self-start",children:u.ClassCode}),M("span",{className:"ml-2",children:u.ClassTitle})]}),M("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:M(n1,{className:"size-5"})})]},u.ClassCode)})]}))}),r.length>1&&s.length===0&&M("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:M("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&&M("p",{className:"mt-2 text-sm text-red-600",children:"Industry is required"})]})})}function iy({defaultValues:e,validateAccountName:t,validateLegalEntityName:n,validateAbn:r,validateSalesforceParentRecordId:o,validateWebsiteUrl:s,queryAnzsic:i,onSubmit:a,closeModal:l}){const{handleSubmit:c,control:d}=Sa({mode:"onChange",defaultValues:e});return M(Pe,{children:[M("div",{className:"font-bold text-lg mb-4",children:"Account details"}),M("form",{className:"space-y-6",onSubmit:c(a),children:[M("div",{children:[M(Rt,{label:"Account name",name:"AccountName",control:d,placeholder:"e.g. Acme Co",validate:t}),M("p",{className:"mt-2 text-sm font-normal text-gray-500",children:"This will be used as a display name."})]}),M(Rt,{label:"Legal entity name",name:"LegalEntityName",control:d,placeholder:"e.g. ACME LTD PTY",validate:n}),M("div",{className:"grid grid-cols-2 gap-3",children:[M(Rt,{label:"ABN",name:"Abn",control:d,validate:r,isNumber:!0}),M(Rt,{label:"Salesforce parent RecordID",name:"SalesforceParentRecordId",control:d,validate:o})]}),M(Rt,{label:"Website URL",name:"WebsiteUrl",control:d,placeholder:"https://acme.com.au",validate:s}),M(sy,{name:"Industry",control:d,queryAnzsic:i}),M(ka,{primaryLabel:"Next",secondaryLabel:"Cancel",secondaryOnClick:l})]})]})}function ay(e,t,n,r){return m(iy,{defaultValues:e,validateAccountName:o=>At(tc(o)),validateLegalEntityName:o=>At(t$(o)),validateAbn:o=>At(n$(o)),validateSalesforceParentRecordId:o=>At(u$(o)),validateWebsiteUrl:o=>At(nc(o)),queryAnzsic:t,onSubmit:o=>{r(new Zt(2,[o])),r(new Zt(0,[]))},closeModal:n})}function qf(e,t){let n,r,o;const s=m("div",{className:"pt-6 px-6 pb-4 border-b font-bold text-xl",children:"Add a new account"}),i=m("div",O(k([["className","pt-4 mx-6"],(n=Ie(A(()=>t)),["children",I.Children.toArray(Array.from(n))])])));return m(Yd,{onClose:e,child:(r=[m("div",{className:"fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity","aria-hidden":!0}),m("div",O(k([["className","fixed inset-0 z-10 w-screen overflow-y-auto h-full flex items-center justify-center"],(o=[m("div",{className:"w-[480px] bg-white shadow-xl rounded-lg",children:I.Children.toArray([s,i])})],["children",I.Children.toArray(Array.from(o))])])))],m(Pe,{},...r))})}function ly(e,t){let n;const r=m("div",O(k([["className","mb-4 text-sm font-normal text-gray-500"],(n=["All fields are required unless labelled as ",m("span",{className:"font-semibold",children:"optional"}),"."],["children",I.Children.toArray(Array.from(n))])])));return qf(e,Ie(A(()=>B(E(r),A(()=>t)))))}function cy(e){let t,n,r,o;return qf(e,[m("div",O(k([["className","text-sm mb-4"],(t=[m("p",{children:["You do not have sufficient permissions."]}),(n=k(["For details, please see ",m("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"})]),m("p",{children:I.Children.toArray(Array.from(n))})),m("div",O(k([["className","flex justify-end"],(r=[m("button",O(k([(o="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",o]),["type","button"],["onClick",s=>{e()}],["children","Close"]])))],["children",I.Children.toArray(Array.from(r))])])))],["children",I.Children.toArray(Array.from(t))])])))])}function uy(e){const t=e.closeModal,n=e.partnerId,r=Jn(Pn),o=Y1(r.BackendUrl,r.AccessToken),s=ws(()=>gs(()=>e_,(l,c)=>t_(n,o,l,c),(l,c)=>{}),void 0,void 0),i=s[0],a=s[1];return r.Roles.ProvisionAccounts?ly(t,Ie(A(()=>{const l=i.CurrentView;return l.tag===1?E(v_(i.PrimaryContactForm,a)):l.tag===2?E(S_(i.BusinessAddressForm,Q1(i),X1(i),a)):E(ay(i.AccountDetailsForm,c=>o.QueryAnzsic(c),t,a))}))):cy(t)}function dy(e){const t=e.partnerId,n=Yn(!1),r=n[1],o=Ie(A(()=>{let s;return B(E(m("button",O(k([["type","button"],(s="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",s]),["onClick",i=>{r(!0)}],["children",I.Children.toArray([B1,"Add account"])]])))),A(()=>n[0]?E(m(uy,{partnerId:t,closeModal:()=>{r(!1)}})):Et()))}));return m(Pe,{},...o)}class fy extends z{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["ColumnHeader"]}}function Kf(e){return new fy(e)}function Zf(e){return e.fields[0]}class hy extends z{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["RowCell"]}}function jr(e){return new hy(e)}function Jf(e){return e.fields[0]}function py(){return["scope","col"]}function fr(e){return Kf(m("th",O(k([["className","px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"],py(),["children",e]]))))}function my(e,t){let n;return jr(m("td",O(k([["className","px-6 py-4 whitespace-nowrap text-sm"],(n=[m("a",{className:"text-indigo-600 hover:text-indigo-900",children:t,href:e})],["children",I.Children.toArray(Array.from(n))])]))))}function Os(e,t){return jr(m("td",{className:ae(" ",B(e,["px-6","py-4","whitespace-nowrap","text-sm"])),children:t}))}function $y(e,t){let n,r,o,s,i,a,l;return m("div",O(k([["className","flex flex-col mt-4"],(n=[m("div",O(k([["className","-my-2 overflow-x-auto sm:-mx-6 lg:-mx-8"],(r=[m("div",O(k([["className","py-2 align-middle inline-block min-w-full sm:px-6 lg:px-8"],(o=[m("div",O(k([["className","shadow overflow-hidden border-b border-gray-200 sm:rounded-lg"],(s=[m("table",O(k([["className","min-w-full divide-y divide-gray-200"],(i=[m("thead",{className:"bg-gray-50",children:(a=De(Zf,e),m("tr",{children:I.Children.toArray(Array.from(a))}))}),(l=mi((c,d)=>(u=>{let h;return m("tr",O(k([["className",c%2===0?"bg-white":"bg-gray-50"],(h=De(Jf,u),["children",I.Children.toArray(Array.from(h))])])))})(d),t),m("tbody",{children:I.Children.toArray(Array.from(l))}))],["children",I.Children.toArray(Array.from(i))])])))],["children",I.Children.toArray(Array.from(s))])])))],["children",I.Children.toArray(Array.from(o))])])))],["children",I.Children.toArray(Array.from(r))])])))],["children",I.Children.toArray(Array.from(n))])])))}function gy(e,t,n){return e?ot(n,t):n}function Yf(e,t,n,r){let o,s,i;return Kf(m("th",O(k([["className",ae(" ",["px-6","py-3","text-left","text-xs","font-medium","text-gray-500","sm:pl-6","uppercase","tracking-wider"])],["scope","col"],(o=[m("a",O(k([["className",ae(" ",["group","inline-flex","cursor-pointer"])],["onClick",n],(s=[r,m("span",O(k([["className",ae(" ",gy(!e,re("invisible"),k(["ml-2","flex-none","rounded","text-gray-400","group-hover:visible","group-focus:visible"])))],(i=Ie(A(()=>E(t?V1:L1))),["children",I.Children.toArray(Array.from(i))])])))],["children",I.Children.toArray(Array.from(s))])])))],["children",I.Children.toArray(Array.from(o))])]))))}function wy(e,t){return Yf(He(zu(e.Sort),new yn(1,[])),He(ju(e.Sort),new er(0,[])),n=>{t(new or(1,[Hu(new yn(1,[]),e.Sort)]))},"Name")}function _y(e,t){return Yf(He(zu(e.Sort),new yn(0,[])),He(ju(e.Sort),new er(0,[])),n=>{t(new or(1,[Hu(new yn(0,[]),e.Sort)]))},"Id")}function by(e,t){let n;return jr(m("td",O(k([["className",ae(" ",["text-gray-500","px-6","py-2","whitespace-nowrap","text-sm","align-top"])],(n=[m("span",{children:[e]}),m("br",{}),m("span",{children:[t]})],["children",I.Children.toArray(Array.from(n))])]))))}function yy(e,t,n){let r;return jr(m("td",O(k([["className",ae(" ",["text-gray-500","px-6","py-2","whitespace-nowrap","text-sm","align-top"])],(r=Ie(A(()=>{let o;return B(E(m("div",O(k([["className",ae(" ",["font-medium"])],(o=[m("span",{children:[e]})],["children",I.Children.toArray(Array.from(o))])])))),A(()=>{let s;return B((s=t,s==null?E(he()):E(m("span",{children:["Legal Entity: "+s]}))),A(()=>{const i=n;if(i==null)return E(he());{const a=i;return B(E(m("br",{})),A(()=>E(m("span",{children:["ABN: "+a]}))))}}))}))})),["children",I.Children.toArray(Array.from(r))])]))))}function vy(e){return jr(m("td",{className:ae(" ",["px-6","py-2","whitespace-nowrap","text-sm","text-gray-500","align-top"]),children:e}))}function xy(e,t,n,r){let o;return jr(m("td",O(k([["className","px-6 py-2 whitespace-nowrap text-sm align-top"],(o=Ie(A(()=>B(E(m("a",{className:"text-indigo-600 hover:text-indigo-900",children:t,href:e})),A(()=>{let s,i;return B((s=r,s==null?E(he()):(i=s,B(E(m("br",{})),A(()=>E(m("span",{children:[`Channel ID: ${i}`]})))))),A(()=>{const a=n;if(a==null)return E(he());{const l=a;return B(E(m("br",{})),A(()=>E(m("span",{children:[`External ID: ${l}`]}))))}}))})))),["children",I.Children.toArray(Array.from(o))])]))))}function Cy(e,t,n){const r=jt(n.AccountId);return Ie(A(()=>{let o;return B(E(xy(Qn(mo((o=[e,r],new J(8,[o[0],o[1]])))),n.AccountId,n.ExternalId,n.ChannelId)),A(()=>B(E(yy(n.Name,n.BusinessName,n.BusinessNumber)),A(()=>B(t.ReadProtectedData?E(by(Ye(n.Contact,""),Ye(n.ContactMobilePhone,""))):Et(),A(()=>E(vy(n.Website))))))))}))}class Sy extends ie{constructor(t,n){super(),this.Data=t,this.LoadNext=n}}class Xf extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Resolved","InProgress"]}}class Qf extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Known","Unknown"]}}function ky(e){let t;return m("thead",{className:"bg-gray-50",children:(t=De(Zf,e),m("tr",{children:I.Children.toArray(Array.from(t))}))})}function Ay(e,t){let n;return m("tr",O(k([["className",e%2===0?"bg-white":"bg-gray-50"],(n=De(Jf,t),["children",I.Children.toArray(Array.from(n))])])))}function Ey(e,t,n,r,o,s){let i,a,l,c,d,u,h;const f=t!=null&&n!=null?(i=t|0,a=n|0,Ie(A(()=>B(E("Showing "),A(()=>B(E(m("span",{className:"font-medium",children:`${i}`})),A(()=>B(E(" to "),A(()=>B(E(m("span",{className:"font-medium",children:`${a}`})),A(()=>B(E(" of "),A(()=>r.tag===1?re(" many"):k([m("span",{className:"font-medium",children:dt(r.fields[0])})," results"])))))))))))))):re(he()),p=Ie(A(()=>{let _,$;return B((_=s,_==null?E(he()):($=_,E(m("a",{className:ae(" ",["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=o;if(v==null)return E(he());{const y=v;return E(m("a",{className:ae(" ",["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:y,children:" Next"}))}}))}));return m("tfoot",O(k([["className",ae(" ",["w-full"])],(l=[m("tr",O(re((c=[m("td",O(k([["colSpan",e],(d=[m("nav",O(k([["className",ae(" ",["bg-white","px-4","py-3","flex","items-center","justify-between","border-t-1","border-gray-200","sm:px-6"])],(u=[m("div",O(k([["className",ae(" ",["hidden","sm:block"])],(h=[m("p",{className:ae(" ",["text-sm","text-gray-700"]),children:I.Children.toArray(Array.from(f))})],["children",I.Children.toArray(Array.from(h))])]))),m("div",{className:ae(" ",["flex-1","flex","justify-between","sm:justify-end"]),children:I.Children.toArray(Array.from(p))})],["children",I.Children.toArray(Array.from(u))])])))],["children",I.Children.toArray(Array.from(d))])])))],["children",I.Children.toArray(Array.from(c))]))))],["children",I.Children.toArray(Array.from(l))])])))}function Iy(e,t){const n=Yn(1),r=n[1],o=n[0]|0;return[o,s=>{if(o===e){if(t!=null){const i=t;Cl(Ut("Calling Load")),i(),r(o+1)}}else r(o+1)},s=>{r(o-1)}]}function Ty(e){let t,n,r,o,s;const i=e.data,a=e.pageSize,l=e.renderRowCells,c=e.columnHeaders,d=Dp(a,i.Data),u=Iy(vr(d),i.LoadNext),h=u[0]|0,f=u[1];let p;const _=Mp(h-1,d);p=_==null?new Xf(1,[]):new Xf(0,[_]);const $=vr(i.Data)|0,v=i.LoadNext==null?new Qf(0,[$]):new Qf(1,[]),y=p.tag===1?void 0:$>=1?(h-1)*a+1:void 0,C=p.tag===1?void 0:$>=1?(h-1)*a+vr(p.fields[0]):void 0,R=h===1?void 0:u[2],L=h===vr(d)?i.LoadNext!=null?f:void 0:h<vr(d)?f:void 0;return m("div",O(k([["className","flex flex-col mt-4"],(t=[m("div",O(k([["className","-my-2 overflow-x-auto sm:-mx-6 lg:-mx-8"],(n=[m("div",O(k([["className","py-2 align-middle inline-block min-w-full sm:px-6 lg:px-8"],(r=[m("div",O(k([["className","shadow overflow-hidden border-b border-gray-200 sm:rounded-lg"],(o=[m("table",O(k([["className","min-w-full divide-y divide-gray-200"],(s=Ie(A(()=>B(E(ky(c)),A(()=>{let X,$e;return B((X=p,X.tag===1?E(he()):E(($e=mi(Ay,l(X.fields[0])),m("tbody",{children:I.Children.toArray(Array.from($e))})))),A(()=>E(Ey(vr(c),y,C,v,L,R))))})))),["children",I.Children.toArray(Array.from(s))])])))],["children",I.Children.toArray(Array.from(o))])])))],["children",I.Children.toArray(Array.from(r))])])))],["children",I.Children.toArray(Array.from(n))])])))],["children",I.Children.toArray(Array.from(t))])])))}function Ln(e){const t=e.error,n=re(m("span",{children:[t]}));return m("div",{children:I.Children.toArray(Array.from(n))})}function Ds(){const e=re(m("span",{children:["Please wait..."]}));return m("div",{children:I.Children.toArray(Array.from(e))})}function Ny(e){let t,n,r,o,s,i;const a=Jn(Pn),l=M1({accessToken:a.AccessToken,backendUrl:a.BackendUrl,partnerId:e.partnerId}),c=ws(()=>gs(O1,(C,R)=>D1(l,C,R),(C,R)=>{}),void 0,void 0),d=c[0],u=c[1],h=new ta(d.SearchText,d.Sort,d.PageSize);Ji((t=[()=>P1(l,h),C=>{u(new or(2,[C]))}],Ou(t[0],t[1])));const f=C=>{u(new or(4,[]))},p=d.Data;let _,$,v,y;switch(p.tag){case 0:case 1:{_=2;break}case 3:{_=3,y=p.fields[0];break}default:p.fields[0].tag===1?(_=1,v=p.fields[0].fields[0]):(_=0,$=p.fields[0].fields[0])}switch(_){case 0:{const C=k([m("div",O(k([["className",ae(" ",["flex","justify-between","items-end","pt-2","sm:-mr-6","lg:mr-0"])],(n=Ie(A(()=>{let R;return B(E(m("div",O(k([["className",ae(" ",["flex","flex-row","gap-4","sm:-mr-6","lg:mr-0","w-[560px]"])],(R=[qd(Gu(d.SearchText),"Account ID, Name, Legal Entity, Channel ID or External ID",L=>{u(new or(0,[L]))},f),F1(f)],["children",I.Children.toArray(Array.from(R))])])))),A(()=>e.accountProvisioningMode.tag===0?E(he()):E(m(dy,{partnerId:e.partnerId}))))})),["children",I.Children.toArray(Array.from(n))])]))),(r=$,o=Ie(A(()=>B(E(_y(d,u)),A(()=>B(E(wy(d,u)),A(()=>B(a.Roles.ReadProtectedData?E(fr("Contact")):Et(),A(()=>E(fr("Website")))))))))),s=new Sy(r.Accounts,zt(R=>()=>{Mr(R1(l)(h)(R)(u))},r.Token)),i=qu(d.PageSize)|0,m(Ty,{columnHeaders:o,renderRowCells:R=>Wn(L=>Cy(e.partnerId,a.Roles,L),R),pageSize:i,data:s}))]);return m("div",{children:I.Children.toArray(Array.from(C))})}case 1:return m(Ln,{error:v});case 2:return m(Ds,null);default:{const C=dt(y);return m(Ln,{error:C})}}}let Fs=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,o=e.partnerId,s=ro(i=>i,[new Fs(1,[t]),new Fs(0,[n]),new Fs(2,[fn(o)]),zt(i=>new Fs(3,[hn(i)]),r)]);return m("superhero-super-configuration",In(s,1))}let Vs=class extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["backend-url","access-token","partner-id","account-id"]}};function th(e){const t=e.accessToken,n=e.backendUrl,r=e.accountId,o=e.partnerId,s=ro(i=>i,[new Vs(1,[t]),new Vs(0,[n]),new Vs(2,[fn(o)]),zt(i=>new Vs(3,[hn(i)]),r)]);return m("superhero-benefits-onboarding-configuration",In(s,1))}let Ls=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.accessToken,n=e.backendUrl,r=e.accountId,o=e.partnerId,s=ro(i=>i,[new Ls(1,[t]),new Ls(0,[n]),new Ls(2,[fn(o)]),zt(i=>new Ls(3,[hn(i)]),r)]);return m("superhero-bank-details",In(s,1))}let Bs=class extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["backend-url","access-token","partner-id","account-id"]}};function rh(e){const t=e.accessToken,n=e.backendUrl,r=e.accountId,o=e.partnerId,s=ro(i=>i,[new Bs(1,[t]),new Bs(0,[n]),new Bs(2,[fn(o)]),zt(i=>new Bs(3,[hn(i)]),r)]);return m("superhero-profile-directory-app",In(s,1))}let Us=class extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["backend-url","access-token","partner-id","account-id"]}};function oh(e){const t=e.accountId,n=e.partnerId,r=e.accessToken,o=e.backendUrl,s=ro(i=>i,[new Us(1,[r]),new Us(0,[o]),new Us(2,[fn(n)]),zt(i=>new Us(3,[hn(i)]),t)]);return m("workspace-account-registry-app",In(s,1))}let Sn=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 My(e){const t=In(e,1);return m(oy,t)}function zs(e,t){let n;return m("div",O(k([["className","px-4 py-4 sm:px-0"],(n=[m("h3",{className:"text-lg font-semibold leading-7 text-gray-900",children:e}),Ye(zt(r=>m("p",{className:"mt-1 max-w-2xl text-sm leading-6 text-gray-500",children:r}),t),he())],["children",I.Children.toArray(Array.from(n))])])))}function Qe(e,t){let n;return m("div",O(k([["className","px-4 py-4 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-0"],(n=[m("dt",{className:"text-sm font-medium leading-6 text-gray-700",children:e}),m("dd",{className:"px-1 mt-1 text-sm leading-6 text-gray-700 sm:col-span-2 sm:mt-0",children:t})],["children",I.Children.toArray(Array.from(n))])])))}function ja(e){let t,n;const r=e.value,o=e.label,s=Yn(!1),i=s[0],a=s[1];return c0(()=>{Mr(W.Delay(()=>i?W.Bind(x0(2e3),()=>(a(!1),W.Zero())):W.Zero()))}),m("div",O(k([["className","px-4 py-2 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-0"],(t=[m("dt",{className:"text-sm font-medium leading-6 text-gray-700",children:o}),m("dd",O(k([["className","flex mt-1 text-sm leading-6 text-primary-700 sm:col-span-2 sm:mt-0 relative"],(n=[My(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,[[m("div",{className:"w-[45px] h-4 not-italic font-medium text-xs leading-4 text-white flex-none order-none grow-0",children:"Copied"})]])])),m("div",{className:"px-1 cursor-pointer hover:text-primary-900 hover:bg-gray-300 rounded-md shrink",children:r})],["children",I.Children.toArray(Array.from(n))]),["onClick",l=>{navigator.clipboard.writeText(r),a(!0)}]])))],["children",I.Children.toArray(Array.from(t))])])))}function js(e,t){let n;const r=k([e,m("div",O(k([["className","mt-2 border-b border-gray-200"],(n=[m("dl",{className:"divide-y divide-gray-200 px-0 sm:px-4 max-w-2xl",children:I.Children.toArray(Array.from(t))})],["children",I.Children.toArray(Array.from(n))])])))]);return m("div",{children:I.Children.toArray(Array.from(r))})}function Ry(e){const t=Jn(Pn);return js(zs("Partner Information",void 0),Ie(A(()=>{let n;return B(E((n=["ID",kr(e.StreamId)],m(ja,{label:n[0],value:n[1]}))),A(()=>{let r;return B(E((r=["Name",os(e.Name)],Qe(r[0],r[1]))),A(()=>{let o,s,i;return B(t.Roles.ReadProtectedData?(o=e.ContactDetails,o!=null?(s=o,B(E((i=["Contact",`${sc(s.FirstName)} ${ac(s.LastName)}`],Qe(i[0],i[1]))),A(()=>{let a;return E((a=["Phone",uc(s.MobilePhone)],Qe(a[0],a[1])))}))):Et()):Et(),A(()=>{let a;return B(E((a=["Website",rc(e.Website)],Qe(a[0],a[1]))),A(()=>{let l;return E((l=["Notes",Ye(e$(e.Notes),"")],Qe(l[0],l[1])))}))}))}))}))})))}let hr=class extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Details","AccountList","SuperConfiguration","BenefitsOnboardingConfiguration","BankDetailsConfiguration","ProfileDirectory","Workspace"]}};class Py extends ie{constructor(t,n,r){super(),this.PartnerId=t,this.BackendUrl=n,this.AccessToken=r}}class Oy extends ie{constructor(t,n,r){super(),this.PartnerId=t,this.BackendUrl=n,this.AccessToken=r}}class Dy extends ie{constructor(t,n,r){super(),this.PartnerId=t,this.BackendUrl=n,this.AccessToken=r}}class Fy extends ie{constructor(t,n,r){super(),this.PartnerId=t,this.BackendUrl=n,this.AccessToken=r}}class Vy extends ie{constructor(t,n,r){super(),this.PartnerId=t,this.BackendUrl=n,this.AccessToken=r}}function Ly(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 By(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 st(kr(e.fields[0].StreamId))}}function Uy(e){const t=Wn(n=>Hd(Ly(e),n[0],Qn(mo(n[1](By(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 m(Wd,{headers:t})}function zy(e){switch(e.tag){case 1:return m(Ny,e.fields[0]);case 2:return m(eh,{partnerId:e.fields[0].PartnerId,backendUrl:e.fields[0].BackendUrl,accessToken:e.fields[0].AccessToken});case 3:return m(th,{partnerId:e.fields[0].PartnerId,backendUrl:e.fields[0].BackendUrl,accessToken:e.fields[0].AccessToken});case 4:return m(nh,{partnerId:e.fields[0].PartnerId,backendUrl:e.fields[0].BackendUrl,accessToken:e.fields[0].AccessToken});case 5:return m(rh,{partnerId:e.fields[0].PartnerId,backendUrl:e.fields[0].BackendUrl,accessToken:e.fields[0].AccessToken});case 6:return m(oh,{backendUrl:e.fields[0].BackendUrl,accessToken:e.fields[0].AccessToken,partnerId:e.fields[0].PartnerId});default:return m(Ry,e.fields[0])}}function sh(e){let t,n;const r=e.mode;return m("div",O(k([["className","flex flex-row"],(t=[Uy(r),m("div",O(k([["className","w-full"],(n=[zy(r)],["children",I.Children.toArray(Array.from(n))])])))],["children",I.Children.toArray(Array.from(t))])])))}let Hs=class extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["backend-url","access-token","partner-id","account-id"]}};function jy(e){const t=e.accessToken,n=e.backendUrl,r=e.accountId,o=e.partnerId,s=A(()=>B(E(new Hs(1,[t])),A(()=>B(E(new Hs(0,[n])),A(()=>B(E(new Hs(2,[es(o)])),A(()=>E(new Hs(3,[ts(r)])))))))));return m("superhero-import-app",In(s,1))}class Ha extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["backend-url","access-token","account-id"]}}function Hy(e){const t=e.accessToken,n=e.backendUrl,r=e.accountId,o=A(()=>B(E(new Ha(1,[t])),A(()=>B(E(new Ha(0,[n])),A(()=>E(new Ha(2,[ts(r)])))))));return m("superhero-salpac-profile-admin",In(o,1))}function Wy(e){const t=Jn(Pn);return js(zs("Account Information",void 0),Ie(A(()=>{let n;return B(E((n=["ID",e.StreamId],m(ja,{label:n[0],value:n[1]}))),A(()=>{let r;return B(E((r=["Name",e.Name],m(ja,{label:r[0],value:r[1]}))),A(()=>{let o;return B(E((o=["External ID",Ye(e.ExternalId,"")],Qe(o[0],o[1]))),A(()=>{let s;return B(E((s=["Channel ID",Ye(e.ChannelId,"")],Qe(s[0],s[1]))),A(()=>{let i;if(t.Roles.ReadProtectedData){const a=e.ContactDetails;if(a!=null){const l=a;return B(E((i=["Contact",`${l.FirstName} ${l.LastName}`],Qe(i[0],i[1]))),A(()=>{let c;return B(E((c=["Phone",l.MobilePhone],Qe(c[0],c[1]))),A(()=>{let d;return E((d=["Email",l.Email],Qe(d[0],d[1])))}))}))}else return Et()}else return Et()}))}))}))}))})))}function Gy(e){let t,n,r,o,s,i,a;if(e==null)return he();{const l=e;return js(zs("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])),(o=["Address Line 2",Ye(l.Address2,"")],Qe(o[0],o[1])),(s=["City",l.City],Qe(s[0],s[1])),(i=["State",Ye(l.State,"")],Qe(i[0],i[1])),(a=["Postcode",l.Postcode],Qe(a[0],a[1]))]))}}function qy(e){let t;if(e==null)return he();{const n=e;return js(zs("Legal Entity",void 0),re((t=["Notes",n],Qe(t[0],t[1]))))}}function Ky(e){const t=k([m(Wy,e),Gy(e.LegalEntity),qy(e.Notes)]);return m("div",{children:I.Children.toArray(Array.from(t))})}class Bn extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Details","ProfilesDirectory","Users","SuperConfiguration","BenefitsOnboardingConfiguration","BankDetailsConfiguration","SalaryPackagingConfiguration","Workspace"]}}function Zy(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 Jy(e,t,n){const r=Wn(o=>Hd(Zy(n),o[0],Qn(mo(o[1]([e,t])))),k([["Details",o=>new J(8,[o[0],o[1]])],["Workspace",o=>new J(15,[o[0],o[1]])],["Directory",o=>new J(9,[o[0],o[1]])],["Users",o=>new J(10,[o[0],o[1]])],["Super",o=>new J(11,[o[0],o[1]])],["Benefits",o=>new J(12,[o[0],o[1]])],["Bank Details",o=>new J(13,[o[0],o[1]])],["Salary Packaging",o=>new J(14,[o[0],o[1]])]]));return m(Wd,{headers:r})}function Yy(e){const t=e.account,n=e.mode,r=e.props,o=Jn(Pn),s=r.accountDetails,i=s[0],a=s[1];switch(n.tag){case 1:return m(rh,{partnerId:i,accountId:a,backendUrl:o.BackendUrl,accessToken:o.AccessToken});case 2:return m(jy,{partnerId:i,accountId:a,backendUrl:o.BackendUrl,accessToken:o.AccessToken});case 3:return m(eh,{partnerId:i,accountId:a,backendUrl:o.BackendUrl,accessToken:o.AccessToken});case 4:return m(th,{partnerId:i,accountId:a,backendUrl:o.BackendUrl,accessToken:o.AccessToken});case 5:return m(nh,{partnerId:i,accountId:a,backendUrl:o.BackendUrl,accessToken:o.AccessToken});case 6:return m(Hy,{accountId:a,backendUrl:o.BackendUrl,accessToken:o.AccessToken});case 7:return m(oh,{backendUrl:o.BackendUrl,accessToken:o.AccessToken,partnerId:i,accountId:a});default:{let l,c,d;switch(t.tag){case 0:case 1:{l=2;break}case 3:{l=3,d=t.fields[0];break}default:t.fields[0].tag===0?(l=0,c=t.fields[0].fields[0]):l=1}switch(l){case 0:return m(Ky,c);case 1:return m(Ln,{error:"There was an error retrieving account "});case 2:return m(Ds,null);default:{const u=dt(d);return m(Ln,{error:u})}}}}}function Xy(e){let t,n,r;const o=e.account,s=e.mode,i=e.props;return m("div",O(k([["className","flex flex-row"],(t=[(n=i.accountDetails,Jy(n[0],n[1],s)),m("div",O(k([["className","w-full"],(r=[m(Yy,{props:i,mode:s,account:o})],["children",I.Children.toArray(Array.from(r))])])))],["children",I.Children.toArray(Array.from(t))])])))}class Hr extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["NotStarted","Started","Finished","Failed"]}}let Ws=class extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["UpdateAccountId","Search","SearchSuccess","SearchFailure"]}},Wr=class extends ie{constructor(t,n){super(),this.AccountId=t,this.AccountDetails=n}};function Qy(){return[new Wr(void 0,new Hr(0,[])),Le()]}function ev(e,t,n,r){let o,s;switch(n.tag){case 1:{const i=r.AccountId;if(i!=null){const a=i;return[new Wr(r.AccountId,new Hr(1,[])),Ed(()=>e1(e,t,a),void 0,l=>new Ws(2,[l]),l=>new Ws(3,[l]))]}else return[new Wr(r.AccountId,new Hr(3,["Account Id is required"])),Le()]}case 2:{const i=n.fields[0];return[new Wr(r.AccountId,new Hr(2,[i])),(o=["account-registry","partners",`${i.PartnerId}`,"accounts",`${i.AccountId}`],s=[o[0],o[1],o[2],o[3],o[4]],Xe(a=>{ct(k(s))}))]}case 3:return[new Wr(r.AccountId,new Hr(3,["Account not found"])),Le()];default:return[new Wr(jt(n.fields[0]),r.AccountDetails),Le()]}}const tv=m("h3",{className:"text-base font-semibold text-gray-900",id:"modal-title",children:"Account Search"}),nv=m("div",O(k([["className","mt-2"],(()=>{let e;const t=[m("p",O(k([["className","text-sm text-gray-500 whitespace-pre-line"],(e=`Enter an Account Id below to search for an account.
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.
52
52
 
53
- If the account is found you will be redirected to the account details page.`,["children",e])])))];return["children",I.Children.toArray(Array.from(t))]})()])));function rv(e){let t,n,r,o;return m("div",O(k([["className","absolute right-0 top-0 hidden pr-4 pt-4 sm:block"],(t=[m("button",O(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=[m("span",{className:"sr-only",children:"Close"}),m("svg",O(k([["className","h-6 w-6"],["fill","none"],["stroke","currentColor"],["strokeWidth",1.5],["viewBox","0 0 24 24"],(o=re(m("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18 18 6M6 6l12 12"})),["children",I.Children.toArray(Array.from(o))])])))],["children",I.Children.toArray(Array.from(r))])])))],["children",I.Children.toArray(Array.from(t))])])))}function ov(e,t,n,r){let o,s,i;return m("div",O(k([["className","mt-5 sm:flex sm:items-center"],(o=[m("div",O(k([["className","w-full sm:max-w-xs"],(s=[m("label",{className:"sr-only",for:"account-id",children:"Account Id"}),m("input",O(Ie(A(()=>B(E(["id","account-id"]),A(()=>B(E(["autoComplete","off"]),A(()=>{let a;return B(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])),A(()=>B(E(["placeholder","Account Id"]),A(()=>B(E(["disabled",!n]),A(()=>B(E(["onChange",l=>{e(l.target.value)}]),A(()=>{const l=r;return l==null?Et():E(["value",ts(l)])}))))))))}))))))))],["children",I.Children.toArray(Array.from(s))])]))),m("button",O(k([["className",ae(" ",["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=Ie(A(()=>E(n?m("span",{children:["Search"]}):m("span",{children:["Searching..."]})))),["children",I.Children.toArray(Array.from(i))]),["onClick",t],["disabled",!n]])))],["children",I.Children.toArray(Array.from(o))])])))}function sv(e){let t,n,r,o,s,i,a;const l=e.closeModal,c=Jn(Pn),d=ws(()=>gs(Qy,($,v)=>ev(c.BackendUrl,c.AccessToken,$,v),($,v)=>{}),void 0,void 0),u=d[0],h=d[1],f=ov($=>{h(new Ws(0,[$]))},$=>{h(new Ws(1,[]))},!He(u.AccountDetails,new Hr(1,[])),u.AccountId);let p;const _=u.AccountDetails;return p=_.tag===3?m("div",{className:ae(" ",["mt-2 text-sm text-red-600"]),children:_.fields[0]}):he(),m(Yd,{onClose:l,child:m("div",O(k([["className","relative z-10"],["role",ae(" ",["dialog"])],(t=[m("div",{className:"fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity","aria-hidden":!0}),m("div",O(k([["className","fixed inset-0 z-10 w-screen overflow-y-auto"],(n=[m("div",O(k([["className","flex min-h-full items-end justify-center p-4 text-center sm:items-center sm:p-0"],["onClick",$=>{l()}],(r=[m("div",O(k([(o="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",o]),["onClick",$=>{$.preventDefault(),$.stopPropagation()}],(s=[rv($=>{l()}),m("div",O(k([["className","sm:flex sm:items-start"],(i=[m("div",O(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",I.Children.toArray([Jd])]]))),m("div",{className:"mt-3 text-center sm:ml-4 sm:mt-0 sm:text-left",children:I.Children.toArray([tv,nv,f,p])})],["children",I.Children.toArray(Array.from(i))])])))],["children",I.Children.toArray(Array.from(s))])])))],["children",I.Children.toArray(Array.from(r))])])))],["children",I.Children.toArray(Array.from(n))])])))],["children",I.Children.toArray(Array.from(t))])])))})}function iv(e,t){return Dl(n=>{const r=e.toLocaleLowerCase();return kr(n.StreamId).toLocaleLowerCase().indexOf(r)>=0?!0:os(n.Name).toLocaleLowerCase().indexOf(r)>=0},t)}function av(e){const t=Jn(Pn),n=Op(c=>os(c.Name).toLocaleLowerCase(),e.partnerList,{Compare:Zr}),r=Yn(n),o=Yn(""),s=Yn(!1),i=s[1],a=Ie(A(()=>B(E(fr("ID")),A(()=>B(E(fr("Name")),A(()=>B(t.Roles.ReadProtectedData?B(E(fr("Contact")),A(()=>E(fr("Phone")))):Et(),A(()=>E(fr("Website")))))))))),l=Ie(A(()=>B(s[0]?E(m(sv,{closeModal:()=>{i(!1)}})):E(he()),A(()=>{let c;return B(E(m("div",O(k([["className","flex items-end place-content-between"],(c=[qd(o[0],"Partner ID or Name",d=>{o[1](d),r[1](iv(d,n))},()=>{}),m("button",{className:ae(" ",["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:I.Children.toArray(["Account Search ",Jd])})],["children",I.Children.toArray(Array.from(c))])])))),A(()=>E($y(a,Wn(d=>{const u=kr(d.StreamId),h=st(u);return Ie(A(()=>{let f;return B(E((f=[Qn(mo(new J(1,[h]))),u],my(f[0],f[1]))),A(()=>B(E(Os(["text-gray-500"],os(d.Name))),A(()=>B(t.Roles.ReadProtectedData?B(E(Os(["text-gray-500"],Ye(zt(p=>`${sc(p.FirstName)} ${ac(p.LastName)}`,d.ContactDetails),""))),A(()=>E(Os(["text-gray-500"],Ye(zt(p=>uc(p.MobilePhone),d.ContactDetails),""))))):Et(),A(()=>E(Os(["text-gray-500"],rc(d.Website)))))))))}))},r[0])))))}))));return m("div",{children:I.Children.toArray(Array.from(l))})}const lv=`*,: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-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-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}}`,cv=dt(lv);function Wa(){return(Wa=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 uv=["context","children"];function dv(e){this.getChildContext=function(){return e.context};var t=e.children,n=function(r,o){if(r==null)return{};var s,i,a={},l=Object.keys(r);for(i=0;i<l.length;i++)o.indexOf(s=l[i])>=0||(a[s]=r[s]);return a}(e,uv);return Mi(t,n)}function fv(){var e=new CustomEvent("_preact",{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(e),this._vdom=m(dv,Wa({},this._props,{context:e.detail.context}),function t(n,r){if(n.nodeType===3)return n.data;if(n.nodeType!==1)return null;var o=[],s={},i=0,a=n.attributes,l=n.childNodes;for(i=a.length;i--;)a[i].name!=="slot"&&(s[a[i].name]=a[i].value,s[ih(a[i].name)]=a[i].value);for(i=l.length;i--;){var c=t(l[i],null),d=l[i].slot;d?s[d]=m(ah,{name:d},c):o[i]=c}var u=r?m(ah,null,o):o;return m(r||n.nodeName.toLowerCase(),s,u)}(this,this._vdomComponent)),(this.hasAttribute("hydrate")?Ni:Tn)(this._vdom,this._root)}function ih(e){return e.replace(/-(\w)/g,function(t,n){return n?n.toUpperCase():""})}function hv(e,t,n){if(this._vdom){var r={};r[e]=n=n??void 0,r[ih(e)]=n,this._vdom=Mi(this._vdom,r),Tn(this._vdom,this._root)}}function pv(){Tn(this._vdom=null,this._root)}function ah(e,t){var n=this;return m("slot",Wa({},e,{ref:function(r){r?(n.ref=r,n._listener||(n._listener=function(o){o.stopPropagation(),o.detail.context=t},r.addEventListener("_preact",n._listener))):n.ref.removeEventListener("_preact",n._listener)}}))}function mv(e,t,n,r){function o(){var s=Reflect.construct(HTMLElement,[],o);return s._vdomComponent=e,s._root=r&&r.shadow?s.attachShadow({mode:r.mode||"open"}):s,s}return(o.prototype=Object.create(HTMLElement.prototype)).constructor=o,o.prototype.connectedCallback=fv,o.prototype.attributeChangedCallback=hv,o.prototype.disconnectedCallback=pv,n=n||e.observedAttributes||Object.keys(e.propTypes||{}),o.observedAttributes=n,n.forEach(function(s){Object.defineProperty(o.prototype,s,{get:function(){return this._vdom.props[s]},set:function(i){this._vdom?this.attributeChangedCallback(s,null,i):(this._props||(this._props={}),this._props[s]=i,this.connectedCallback());var a=typeof i;i!=null&&a!=="string"&&a!=="boolean"&&a!=="number"||this.setAttribute(s,i)}})}),customElements.define(t,o)}function $v(e,t){mv(e,t,void 0,{shadow:!0})}class No extends ie{constructor(t,n,r,o){super(),this.Partners=t,this.Accounts=n,this.CurrentPage=r,this.Roles=o}}class Mo extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["PageChanged","GetAccountName","AppendAccount","LoadPartners"]}}function gv(e){let t;const n=Zu(Bu(window.location.hash,1)),r=n.tag===16?ra(new J(0,[])):Le();return[new No(new pe(0,[]),dg(),n,(t=gw(e),t.tag===1?(Cl(`Failed to decode jwt: ${t.fields[0]}`),gg):$g(t.fields[0]))),r]}function wv(e,t,n){switch(t.tag){case 1:{const r=t.fields[0],o=Ed(e,r,s=>new Mo(2,[r,new w(0,[s])]),s=>new Mo(2,[r,new w(1,["Failed to retrieve account name"])]));return[new No(n.Partners,Ku(n.Accounts,r,new pe(1,[])),n.CurrentPage,n.Roles),o]}case 2:return[new No(n.Partners,Ku(n.Accounts,t.fields[0],new pe(2,[t.fields[1]])),n.CurrentPage,n.Roles),Le()];case 0:{const r=t.fields[0];return r.tag===16?[n,ra(r)]:[new No(n.Partners,n.Accounts,r,n.Roles),Le()]}default:return[new No(t.fields[0],n.Accounts,n.CurrentPage,n.Roles),Le()]}}function _v(e){let t,n,r,o;const s=gv(e.accessToken);o=ws(()=>gs(()=>s,(y,C)=>wv(R=>{const L=ug(R);return Qw(e.backendUrl,e.accessToken,L[0],L[1])},y,C),(y,C)=>{}),void 0,void 0);const i=o[0],a=o[1];Ji(Ou(()=>Xw(e.backendUrl,e.accessToken),y=>{a(new Mo(3,[y]))}));const l=y=>{let C;const R=i.Partners;switch(R.tag){case 0:return new pe(0,[]);case 1:return new pe(1,[]);case 3:return new pe(3,[R.fields[0]]);default:return R.fields[0].tag===1?new pe(2,[new w(1,[Qt(xl("Unknown partner: %A%P()",[y]))])]):new pe(2,[(C=na(R.fields[0].fields[0],y),C==null?new w(1,[Qt(xl("Unknown partner: %A%P()",[y]))]):new w(0,[C.Name]))])}},c=y=>m(bo,{page:i.CurrentPage,partner:{Id:y,Name:l(y)}}),d=(y,C)=>{const R=m(sh,{mode:C});return[c(y),R]},u=(y,C)=>{let R,L,X;const $e=y[0],be=y[1];let ue,Y;const de=[$e,be];Y=cg(de[0],de[1]),ue=Nl(fg(i.Accounts,Y),()=>(a(new Mo(1,[Y])),new pe(0,[])));let G;return G=m(Xy,{props:{accountDetails:[$e,be]},mode:C,account:ue}),[(R=[$e,be,ue],L=R[0],m(bo,(X={Id:L,Name:l(L)},{account:{Id:R[1],Name:mg(Se=>Bl(Se.Name),R[2])},page:i.CurrentPage,partner:ii(X)}))),G]};let h;const f=i.Partners;let p,_,$,v;switch(f.tag){case 2:{f.fields[0].tag===1?(p=2,$=f.fields[0].fields[0]):(p=1,_=f.fields[0].fields[0]);break}case 3:{p=3,v=f.fields[0];break}default:p=0}switch(p){case 0:{h=[m(Ds,null),m(Ds,null)];break}case 1:{const y=i.CurrentPage;switch(y.tag){case 3:{const C=y.fields[0],R=c(C),L=na(_,C);if(L==null)h=[R,m(Ln,{error:"Unknown Partner"})];else{const X=L;h=d(C,new hr(1,[{accountProvisioningMode:X.AccountProvisioningMode,partnerId:C}]))}break}case 4:{const C=y.fields[0];h=d(C,new hr(2,[new Py(C,e.backendUrl,e.accessToken)]));break}case 5:{const C=y.fields[0];h=d(C,new hr(3,[new Oy(C,e.backendUrl,e.accessToken)]));break}case 6:{const C=y.fields[0];h=d(C,new hr(4,[new Dy(C,e.backendUrl,e.accessToken)]));break}case 2:{const C=y.fields[0];h=d(C,new hr(5,[new Fy(C,e.backendUrl,e.accessToken)]));break}case 7:{const C=y.fields[0];h=d(C,new hr(6,[new Vy(C,e.backendUrl,e.accessToken)]));break}case 8:{h=u([y.fields[0],y.fields[1]],new Bn(0,[]));break}case 9:{h=u([y.fields[0],y.fields[1]],new Bn(1,[]));break}case 10:{h=u([y.fields[0],y.fields[1]],new Bn(2,[]));break}case 11:{h=u([y.fields[0],y.fields[1]],new Bn(3,[]));break}case 12:{h=u([y.fields[0],y.fields[1]],new Bn(4,[]));break}case 13:{h=u([y.fields[0],y.fields[1]],new Bn(5,[]));break}case 14:{h=u([y.fields[0],y.fields[1]],new Bn(6,[]));break}case 15:{h=u([y.fields[0],y.fields[1]],new Bn(7,[]));break}case 0:case 16:{h=[m(bo,{page:i.CurrentPage}),m(av,{partnerList:_})];break}default:{const C=y.fields[0],R=c(C),L=na(_,C);h=L==null?[R,m(Ln,{error:"Unknown Partner"})]:[R,(t=new hr(0,[L]),m(sh,{mode:t}))]}}break}case 2:{h=[m(bo,{page:i.CurrentPage}),m(Ln,{error:$})];break}default:h=[m(bo,{page:i.CurrentPage}),(n=dt(v),m(Ln,{error:n}))]}return p0(Pn,new T1(i.Roles,e.backendUrl,e.accessToken),re((r=k([m("style",{children:[cv]}),eg({onUrlChanged:y=>{a(new Mo(0,[Zu(y)]))},application:m(Pe,{},h[0],h[1])})]),m("div",{children:I.Children.toArray(Array.from(r))}))))}$v(e=>m(_v,e),"superhero-account-registry")})();
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")})();