@flarehr/apollo-customer-workplace-link 1.60.45234 → 1.62.48649

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,4 +1,4 @@
1
- let e,t,r,n={data:""},i=e=>"object"==typeof window?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||n,o=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,s=/\/\*[^]*?\*\/| +/g,a=/\n+/g,c=(e,t)=>{let r="",n="",i="";for(let o in e){let s=e[o];"@"==o[0]?"i"==o[1]?r=o+" "+s+";":n+="f"==o[1]?c(s,o):o+"{"+c(s,"k"==o[1]?"":t)+"}":"object"==typeof s?n+=c(s,t?t.replace(/([^,])+/g,(e=>o.replace(/(^:.*)|([^,])+/g,(t=>/&/.test(t)?t.replace(/&/g,e):e?e+" "+t:t)))):o):null!=s&&(o=/^--/.test(o)?o:o.replace(/[A-Z]/g,"-$&").toLowerCase(),i+=c.p?c.p(o,s):o+":"+s+";")}return r+(t&&i?t+"{"+i+"}":i)+n},l={},u=e=>{if("object"==typeof e){let t="";for(let r in e)t+=r+u(e[r]);return t}return e},d=(e,t,r,n,i)=>{let d=u(e),h=l[d]||(l[d]=(e=>{let t=0,r=11;for(;t<e.length;)r=101*r+e.charCodeAt(t++)>>>0;return"go"+r})(d));if(!l[h]){let t=d!==e?e:(e=>{let t,r,n=[{}];for(;t=o.exec(e.replace(s,""));)t[4]?n.shift():t[3]?(r=t[3].replace(a," ").trim(),n.unshift(n[0][r]=n[0][r]||{})):n[0][t[1]]=t[2].replace(a," ").trim();return n[0]})(e);l[h]=c(i?{["@keyframes "+h]:t}:t,r?"":"."+h)}let p=r&&l.g?l.g:null;return r&&(l.g=l[h]),f=l[h],m=t,g=n,(_=p)?m.data=m.data.replace(_,f):-1===m.data.indexOf(f)&&(m.data=g?f+m.data:m.data+f),h;var f,m,g,_},h=(e,t,r)=>e.reduce(((e,n,i)=>{let o=t[i];if(o&&o.call){let e=o(r),t=e&&e.props&&e.props.className||/^go/.test(e)&&e;o=t?"."+t:e&&"object"==typeof e?e.props?"":c(e,""):!1===e?"":e}return e+n+(null==o?"":o)}),"");function p(e){let t=this||{},r=e.call?e(t.p):e;return d(r.unshift?r.raw?h(r,[].slice.call(arguments,1),t.p):r.reduce(((e,r)=>Object.assign(e,r&&r.call?r(t.p):r)),{}):r,i(t.target),t.g,t.o,t.k)}function f(n,i){let o=this||{};return function(){let s=arguments;function a(c,l){let u=Object.assign({},c),d=u.className||a.className;o.p=Object.assign({theme:t&&t()},u),o.o=/ *go\d+/.test(d),u.className=p.apply(o,s)+(d?" "+d:""),i&&(u.ref=l);let h=n;return n[0]&&(h=u.as||n,delete u.as),r&&h[0]&&r(u),e(h,u)}return i?i(a):a}}p.bind({g:1}),p.bind({k:1});var m,g,_,v,y,w,b,E,k={},I=[],T=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,C=Array.isArray;function S(e,t){for(var r in t)e[r]=t[r];return e}function R(e){var t=e.parentNode;t&&t.removeChild(e)}function O(e,t,r){var n,i,o,s={};for(o in t)"key"==o?n=t[o]:"ref"==o?i=t[o]:s[o]=t[o];if(arguments.length>2&&(s.children=arguments.length>3?m.call(arguments,2):r),"function"==typeof e&&null!=e.defaultProps)for(o in e.defaultProps)void 0===s[o]&&(s[o]=e.defaultProps[o]);return A(e,s,n,i,null)}function A(e,t,r,n,i){var o={type:e,props:t,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==i?++_:i};return null==i&&null!=g.vnode&&g.vnode(o),o}function P(){return{current:null}}function N(e){return e.children}function x(e,t){this.props=e,this.context=t}function L(e,t){if(null==t)return e.__?L(e.__,e.__.__k.indexOf(e)+1):null;for(var r;t<e.__k.length;t++)if(null!=(r=e.__k[t])&&null!=r.__e)return r.__d||r.__e;return"function"==typeof e.type?L(e):null}function D(e){var t,r;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(r=e.__k[t])&&null!=r.__e){e.__e=e.__c.base=r.__e;break}return D(e)}}function M(e){(!e.__d&&(e.__d=!0)&&v.push(e)&&!U.__r++||y!==g.debounceRendering)&&((y=g.debounceRendering)||w)(U)}function U(){var e,t,r,n,i,o,s,a,c;for(v.sort(b);e=v.shift();)e.__d&&(t=v.length,n=void 0,i=void 0,o=void 0,a=(s=(r=e).__v).__e,(c=r.__P)&&(n=[],i=[],(o=S({},s)).__v=s.__v+1,J(c,s,o,r.__n,void 0!==c.ownerSVGElement,null!=s.__h?[a]:null,n,null==a?L(s):a,s.__h,i),G(n,s,i),s.__e!=a&&D(s)),v.length>t&&v.sort(b));U.__r=0}function j(e,t,r,n,i,o,s,a,c,l,u){var d,h,p,f,m,g,_,v,y,w=0,b=n&&n.__k||I,E=b.length,T=E,S=t.length;for(r.__k=[],d=0;d<S;d++)null!=(f=r.__k[d]=null==(f=t[d])||"boolean"==typeof f||"function"==typeof f?null:"string"==typeof f||"number"==typeof f||"bigint"==typeof f?A(null,f,null,null,f):C(f)?A(N,{children:f},null,null,null):f.__b>0?A(f.type,f.props,f.key,f.ref?f.ref:null,f.__v):f)?(f.__=r,f.__b=r.__b+1,-1===(v=H(f,b,_=d+w,T))?p=k:(p=b[v]||k,b[v]=void 0,T--),J(e,f,p,i,o,s,a,c,l,u),m=f.__e,(h=f.ref)&&p.ref!=h&&(p.ref&&Y(p.ref,null,f),u.push(h,f.__c||m,f)),null!=m&&(null==g&&(g=m),(y=p===k||null===p.__v)?-1==v&&w--:v!==_&&(v===_+1?w++:v>_?T>S-_?w+=v-_:w--:w=v<_&&v==_-1?v-_:0),_=d+w,"function"!=typeof f.type||v===_&&p.__k!==f.__k?"function"==typeof f.type||v===_&&!y?void 0!==f.__d?(c=f.__d,f.__d=void 0):c=m.nextSibling:c=z(e,m,c):c=F(f,c,e),"function"==typeof r.type&&(r.__d=c))):(p=b[d])&&null==p.key&&p.__e&&(p.__e==c&&(p.__=n,c=L(p)),Q(p,p,!1),b[d]=null);for(r.__e=g,d=E;d--;)null!=b[d]&&("function"==typeof r.type&&null!=b[d].__e&&b[d].__e==r.__d&&(r.__d=b[d].__e.nextSibling),Q(b[d],b[d]))}function F(e,t,r){for(var n,i=e.__k,o=0;i&&o<i.length;o++)(n=i[o])&&(n.__=e,t="function"==typeof n.type?F(n,t,r):z(r,n.__e,t));return t}function B(e,t){return t=t||[],null==e||"boolean"==typeof e||(C(e)?e.some((function(e){B(e,t)})):t.push(e)),t}function z(e,t,r){return null==r||r.parentNode!==e?e.insertBefore(t,null):t==r&&null!=t.parentNode||e.insertBefore(t,r),t.nextSibling}function H(e,t,r,n){var i=e.key,o=e.type,s=r-1,a=r+1,c=t[r];if(null===c||c&&i==c.key&&o===c.type)return r;if(n>(null!=c?1:0))for(;s>=0||a<t.length;){if(s>=0){if((c=t[s])&&i==c.key&&o===c.type)return s;s--}if(a<t.length){if((c=t[a])&&i==c.key&&o===c.type)return a;a++}}return-1}function V(e,t,r){"-"===t[0]?e.setProperty(t,null==r?"":r):e[t]=null==r?"":"number"!=typeof r||T.test(t)?r:r+"px"}function q(e,t,r,n,i){var o;e:if("style"===t)if("string"==typeof r)e.style.cssText=r;else{if("string"==typeof n&&(e.style.cssText=n=""),n)for(t in n)r&&t in r||V(e.style,t,"");if(r)for(t in r)n&&r[t]===n[t]||V(e.style,t,r[t])}else if("o"===t[0]&&"n"===t[1])o=t!==(t=t.replace(/(PointerCapture)$|Capture$/,"$1")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=r,r?n?r.u=n.u:(r.u=Date.now(),e.addEventListener(t,o?K:W,o)):e.removeEventListener(t,o?K:W,o);else if("dangerouslySetInnerHTML"!==t){if(i)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!==t&&"height"!==t&&"href"!==t&&"list"!==t&&"form"!==t&&"tabIndex"!==t&&"download"!==t&&"rowSpan"!==t&&"colSpan"!==t&&"role"!==t&&t in e)try{e[t]=null==r?"":r;break e}catch(s){}"function"==typeof r||(null==r||!1===r&&"-"!==t[4]?e.removeAttribute(t):e.setAttribute(t,r))}}function W(e){var t=this.l[e.type+!1];if(e.t){if(e.t<=t.u)return}else e.t=Date.now();return t(g.event?g.event(e):e)}function K(e){return this.l[e.type+!0](g.event?g.event(e):e)}function J(e,t,r,n,i,o,s,a,c,l){var u,d,h,p,f,_,v,y,w,b,E,I,T,O,A,P=t.type;if(void 0!==t.constructor)return null;null!=r.__h&&(c=r.__h,a=t.__e=r.__e,t.__h=null,o=[a]),(u=g.__b)&&u(t);e:if("function"==typeof P)try{if(y=t.props,w=(u=P.contextType)&&n[u.__c],b=u?w?w.props.value:u.__:n,r.__c?v=(d=t.__c=r.__c).__=d.__E:("prototype"in P&&P.prototype.render?t.__c=d=new P(y,b):(t.__c=d=new x(y,b),d.constructor=P,d.render=X),w&&w.sub(d),d.props=y,d.state||(d.state={}),d.context=b,d.__n=n,h=d.__d=!0,d.__h=[],d._sb=[]),null==d.__s&&(d.__s=d.state),null!=P.getDerivedStateFromProps&&(d.__s==d.state&&(d.__s=S({},d.__s)),S(d.__s,P.getDerivedStateFromProps(y,d.__s))),p=d.props,f=d.state,d.__v=t,h)null==P.getDerivedStateFromProps&&null!=d.componentWillMount&&d.componentWillMount(),null!=d.componentDidMount&&d.__h.push(d.componentDidMount);else{if(null==P.getDerivedStateFromProps&&y!==p&&null!=d.componentWillReceiveProps&&d.componentWillReceiveProps(y,b),!d.__e&&(null!=d.shouldComponentUpdate&&!1===d.shouldComponentUpdate(y,d.__s,b)||t.__v===r.__v)){for(t.__v!==r.__v&&(d.props=y,d.state=d.__s,d.__d=!1),t.__e=r.__e,t.__k=r.__k,t.__k.forEach((function(e){e&&(e.__=t)})),E=0;E<d._sb.length;E++)d.__h.push(d._sb[E]);d._sb=[],d.__h.length&&s.push(d);break e}null!=d.componentWillUpdate&&d.componentWillUpdate(y,d.__s,b),null!=d.componentDidUpdate&&d.__h.push((function(){d.componentDidUpdate(p,f,_)}))}if(d.context=b,d.props=y,d.__P=e,d.__e=!1,I=g.__r,T=0,"prototype"in P&&P.prototype.render){for(d.state=d.__s,d.__d=!1,I&&I(t),u=d.render(d.props,d.state,d.context),O=0;O<d._sb.length;O++)d.__h.push(d._sb[O]);d._sb=[]}else do{d.__d=!1,I&&I(t),u=d.render(d.props,d.state,d.context),d.state=d.__s}while(d.__d&&++T<25);d.state=d.__s,null!=d.getChildContext&&(n=S(S({},n),d.getChildContext())),h||null==d.getSnapshotBeforeUpdate||(_=d.getSnapshotBeforeUpdate(p,f)),j(e,C(A=null!=u&&u.type===N&&null==u.key?u.props.children:u)?A:[A],t,r,n,i,o,s,a,c,l),d.base=t.__e,t.__h=null,d.__h.length&&s.push(d),v&&(d.__E=d.__=null)}catch(D){t.__v=null,(c||null!=o)&&(t.__e=a,t.__h=!!c,o[o.indexOf(a)]=null),g.__e(D,t,r)}else null==o&&t.__v===r.__v?(t.__k=r.__k,t.__e=r.__e):t.__e=function(e,t,r,n,i,o,s,a,c){var l,u,d,h=r.props,p=t.props,f=t.type,g=0;if("svg"===f&&(i=!0),null!=o)for(;g<o.length;g++)if((l=o[g])&&"setAttribute"in l==!!f&&(f?l.localName===f:3===l.nodeType)){e=l,o[g]=null;break}if(null==e){if(null===f)return document.createTextNode(p);e=i?document.createElementNS("http://www.w3.org/2000/svg",f):document.createElement(f,p.is&&p),o=null,a=!1}if(null===f)h===p||a&&e.data===p||(e.data=p);else{if(o=o&&m.call(e.childNodes),u=(h=r.props||k).dangerouslySetInnerHTML,d=p.dangerouslySetInnerHTML,!a){if(null!=o)for(h={},g=0;g<e.attributes.length;g++)h[e.attributes[g].name]=e.attributes[g].value;(d||u)&&(d&&(u&&d.__html==u.__html||d.__html===e.innerHTML)||(e.innerHTML=d&&d.__html||""))}if(function(e,t,r,n,i){var o;for(o in r)"children"===o||"key"===o||o in t||q(e,o,null,r[o],n);for(o in t)i&&"function"!=typeof t[o]||"children"===o||"key"===o||"value"===o||"checked"===o||r[o]===t[o]||q(e,o,t[o],r[o],n)}(e,p,h,i,a),d)t.__k=[];else if(j(e,C(g=t.props.children)?g:[g],t,r,n,i&&"foreignObject"!==f,o,s,o?o[0]:r.__k&&L(r,0),a,c),null!=o)for(g=o.length;g--;)null!=o[g]&&R(o[g]);a||("value"in p&&void 0!==(g=p.value)&&(g!==e.value||"progress"===f&&!g||"option"===f&&g!==h.value)&&q(e,"value",g,h.value,!1),"checked"in p&&void 0!==(g=p.checked)&&g!==e.checked&&q(e,"checked",g,h.checked,!1))}return e}(r.__e,t,r,n,i,o,s,c,l);(u=g.diffed)&&u(t)}function G(e,t,r){for(var n=0;n<r.length;n++)Y(r[n],r[++n],r[++n]);g.__c&&g.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(r){g.__e(r,t.__v)}}))}function Y(e,t,r){try{"function"==typeof e?e(t):e.current=t}catch(n){g.__e(n,r)}}function Q(e,t,r){var n,i;if(g.unmount&&g.unmount(e),(n=e.ref)&&(n.current&&n.current!==e.__e||Y(n,null,t)),null!=(n=e.__c)){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(o){g.__e(o,t)}n.base=n.__P=null,e.__c=void 0}if(n=e.__k)for(i=0;i<n.length;i++)n[i]&&Q(n[i],t,r||"function"!=typeof e.type);r||null==e.__e||R(e.__e),e.__=e.__e=e.__d=void 0}function X(e,t,r){return this.constructor(e,r)}function Z(e,t,r){var n,i,o,s;g.__&&g.__(e,t),i=(n="function"==typeof r)?null:r&&r.__k||t.__k,o=[],s=[],J(t,e=(!n&&r||t).__k=O(N,null,[e]),i||k,k,void 0!==t.ownerSVGElement,!n&&r?[r]:i?null:t.firstChild?m.call(t.childNodes):null,o,!n&&r?r:i?i.__e:t.firstChild,n,s),G(o,e,s)}function ee(e,t){Z(e,t,ee)}function te(e,t,r){var n,i,o,s,a=S({},e.props);for(o in e.type&&e.type.defaultProps&&(s=e.type.defaultProps),t)"key"==o?n=t[o]:"ref"==o?i=t[o]:a[o]=void 0===t[o]&&void 0!==s?s[o]:t[o];return arguments.length>2&&(a.children=arguments.length>3?m.call(arguments,2):r),A(e.type,a,n||e.key,i||e.ref,null)}function re(e,t){var r={__c:t="__cC"+E++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var r,n;return this.getChildContext||(r=[],(n={})[t]=this,this.getChildContext=function(){return n},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&r.some((function(e){e.__e=!0,M(e)}))},this.sub=function(e){r.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){r.splice(r.indexOf(e),1),t&&t.call(e)}}),e.children}};return r.Provider.__=r.Consumer.contextType=r}m=I.slice,g={__e:function(e,t,r,n){for(var i,o,s;t=t.__;)if((i=t.__c)&&!i.__)try{if((o=i.constructor)&&null!=o.getDerivedStateFromError&&(i.setState(o.getDerivedStateFromError(e)),s=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(e,n||{}),s=i.__d),s)return i.__E=i}catch(a){e=a}throw e}},_=0,x.prototype.setState=function(e,t){var r;r=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=S({},this.state),"function"==typeof e&&(e=e(S({},r),this.props)),e&&S(r,e),null!=e&&this.__v&&(t&&this._sb.push(t),M(this))},x.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),M(this))},x.prototype.render=N,v=[],w="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,b=function(e,t){return e.__v.__b-t.__v.__b},U.__r=0,E=0;var ne,ie,oe,se,ae=0,ce=[],le=[],ue=g.__b,de=g.__r,he=g.diffed,pe=g.__c,fe=g.unmount;function me(e,t){g.__h&&g.__h(ie,e,ae||t),ae=0;var r=ie.__H||(ie.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({__V:le}),r.__[e]}function ge(e){return ae=1,_e(xe,e)}function _e(e,t,r){var n=me(ne++,2);if(n.t=e,!n.__c&&(n.__=[r?r(t):xe(void 0,t),function(e){var t=n.__N?n.__N[0]:n.__[0],r=n.t(t,e);t!==r&&(n.__N=[r,n.__[1]],n.__c.setState({}))}],n.__c=ie,!ie.u)){var i=function(e,t,r){if(!n.__c.__H)return!0;var i=n.__c.__H.__.filter((function(e){return e.__c}));if(i.every((function(e){return!e.__N})))return!o||o.call(this,e,t,r);var s=!1;return i.forEach((function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(s=!0)}})),!(!s&&n.__c.props===e)&&(!o||o.call(this,e,t,r))};ie.u=!0;var o=ie.shouldComponentUpdate,s=ie.componentWillUpdate;ie.componentWillUpdate=function(e,t,r){if(this.__e){var n=o;o=void 0,i(e,t,r),o=n}s&&s.call(this,e,t,r)},ie.shouldComponentUpdate=i}return n.__N||n.__}function ve(e,t){var r=me(ne++,3);!g.__s&&Ne(r.__H,t)&&(r.__=e,r.i=t,ie.__H.__h.push(r))}function ye(e,t){var r=me(ne++,4);!g.__s&&Ne(r.__H,t)&&(r.__=e,r.i=t,ie.__h.push(r))}function we(e){return ae=5,Ee((function(){return{current:e}}),[])}function be(e,t,r){ae=6,ye((function(){return"function"==typeof e?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0}),null==r?r:r.concat(e))}function Ee(e,t){var r=me(ne++,7);return Ne(r.__H,t)?(r.__V=e(),r.i=t,r.__h=e,r.__V):r.__}function ke(e,t){return ae=8,Ee((function(){return e}),t)}function Ie(e){var t=ie.context[e.__c],r=me(ne++,9);return r.c=e,t?(null==r.__&&(r.__=!0,t.sub(ie)),t.props.value):e.__}function Te(e,t){g.useDebugValue&&g.useDebugValue(t?t(e):e)}function Ce(){var e=me(ne++,11);if(!e.__){for(var t=ie.__v;null!==t&&!t.__m&&null!==t.__;)t=t.__;var r=t.__m||(t.__m=[0,0]);e.__="P"+r[0]+"-"+r[1]++}return e.__}function Se(){for(var e;e=ce.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Ae),e.__H.__h.forEach(Pe),e.__H.__h=[]}catch(eh){e.__H.__h=[],g.__e(eh,e.__v)}}g.__b=function(e){ie=null,ue&&ue(e)},g.__r=function(e){de&&de(e),ne=0;var t=(ie=e.__c).__H;t&&(oe===ie?(t.__h=[],ie.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.__V=le,e.__N=e.i=void 0}))):(t.__h.forEach(Ae),t.__h.forEach(Pe),t.__h=[],ne=0)),oe=ie},g.diffed=function(e){he&&he(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==ce.push(t)&&se===g.requestAnimationFrame||((se=g.requestAnimationFrame)||Oe)(Se)),t.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.__V!==le&&(e.__=e.__V),e.i=void 0,e.__V=le}))),oe=ie=null},g.__c=function(e,t){t.some((function(e){try{e.__h.forEach(Ae),e.__h=e.__h.filter((function(e){return!e.__||Pe(e)}))}catch(r){t.some((function(e){e.__h&&(e.__h=[])})),t=[],g.__e(r,e.__v)}})),pe&&pe(e,t)},g.unmount=function(e){fe&&fe(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.forEach((function(e){try{Ae(e)}catch(r){t=r}})),r.__H=void 0,t&&g.__e(t,r.__v))};var Re="function"==typeof requestAnimationFrame;function Oe(e){var t,r=function(){clearTimeout(n),Re&&cancelAnimationFrame(t),setTimeout(e)},n=setTimeout(r,100);Re&&(t=requestAnimationFrame(r))}function Ae(e){var t=ie,r=e.__c;"function"==typeof r&&(e.__c=void 0,r()),ie=t}function Pe(e){var t=ie;e.__c=e.__(),ie=t}function Ne(e,t){return!e||e.length!==t.length||t.some((function(t,r){return t!==e[r]}))}function xe(e,t){return"function"==typeof t?t(e):t}class Le extends Error{}function De(e){let t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return function(e){return decodeURIComponent(atob(e).replace(/(.)/g,((e,t)=>{let r=t.charCodeAt(0).toString(16).toUpperCase();return r.length<2&&(r="0"+r),"%"+r})))}(t)}catch(r){return atob(t)}}function Me(e,t){if("string"!=typeof e)throw new Le("Invalid token specified: must be a string");t||(t={});const r=!0===t.header?0:1,n=e.split(".")[r];if("string"!=typeof n)throw new Le(`Invalid token specified: missing part #${r+1}`);let i;try{i=De(n)}catch(Ld){throw new Le(`Invalid token specified: invalid base64 for part #${r+1} (${Ld.message})`)}try{return JSON.parse(i)}catch(Ld){throw new Le(`Invalid token specified: invalid json for part #${r+1} (${Ld.message})`)}}function Ue(e,t){return function(){return e.apply(t,arguments)}}Le.prototype.name="InvalidTokenError";const{toString:je}=Object.prototype,{getPrototypeOf:Fe}=Object,Be=(ze=Object.create(null),e=>{const t=je.call(e);return ze[t]||(ze[t]=t.slice(8,-1).toLowerCase())});var ze;const He=e=>(e=e.toLowerCase(),t=>Be(t)===e),Ve=e=>t=>typeof t===e,{isArray:$e}=Array,qe=Ve("undefined");const We=He("ArrayBuffer");const Ke=Ve("string"),Je=Ve("function"),Ge=Ve("number"),Ye=e=>null!==e&&"object"==typeof e,Qe=e=>{if("object"!==Be(e))return!1;const t=Fe(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},Xe=He("Date"),Ze=He("File"),et=He("Blob"),tt=He("FileList"),rt=He("URLSearchParams");function nt(e,t,{allOwnKeys:r=!1}={}){if(null==e)return;let n,i;if("object"!=typeof e&&(e=[e]),$e(e))for(n=0,i=e.length;n<i;n++)t.call(null,e[n],n,e);else{const i=r?Object.getOwnPropertyNames(e):Object.keys(e),o=i.length;let s;for(n=0;n<o;n++)s=i[n],t.call(null,e[s],s,e)}}function it(e,t){t=t.toLowerCase();const r=Object.keys(e);let n,i=r.length;for(;i-- >0;)if(n=r[i],t===n.toLowerCase())return n;return null}const ot="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,st=e=>!qe(e)&&e!==ot;const at=(ct="undefined"!=typeof Uint8Array&&Fe(Uint8Array),e=>ct&&e instanceof ct);var ct;const lt=He("HTMLFormElement"),ut=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),dt=He("RegExp"),ht=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};nt(r,((r,i)=>{let o;!1!==(o=t(r,i,e))&&(n[i]=o||r)})),Object.defineProperties(e,n)},pt="abcdefghijklmnopqrstuvwxyz",ft="0123456789",mt={DIGIT:ft,ALPHA:pt,ALPHA_DIGIT:pt+pt.toUpperCase()+ft};const gt=He("AsyncFunction"),_t={isArray:$e,isArrayBuffer:We,isBuffer:function(e){return null!==e&&!qe(e)&&null!==e.constructor&&!qe(e.constructor)&&Je(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||Je(e.append)&&("formdata"===(t=Be(e))||"object"===t&&Je(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&We(e.buffer),t},isString:Ke,isNumber:Ge,isBoolean:e=>!0===e||!1===e,isObject:Ye,isPlainObject:Qe,isUndefined:qe,isDate:Xe,isFile:Ze,isBlob:et,isRegExp:dt,isFunction:Je,isStream:e=>Ye(e)&&Je(e.pipe),isURLSearchParams:rt,isTypedArray:at,isFileList:tt,forEach:nt,merge:function e(){const{caseless:t}=st(this)&&this||{},r={},n=(n,i)=>{const o=t&&it(r,i)||i;Qe(r[o])&&Qe(n)?r[o]=e(r[o],n):Qe(n)?r[o]=e({},n):$e(n)?r[o]=n.slice():r[o]=n};for(let i=0,o=arguments.length;i<o;i++)arguments[i]&&nt(arguments[i],n);return r},extend:(e,t,r,{allOwnKeys:n}={})=>(nt(t,((t,n)=>{r&&Je(t)?e[n]=Ue(t,r):e[n]=t}),{allOwnKeys:n}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},toFlatObject:(e,t,r,n)=>{let i,o,s;const a={};if(t=t||{},null==e)return t;do{for(i=Object.getOwnPropertyNames(e),o=i.length;o-- >0;)s=i[o],n&&!n(s,e,t)||a[s]||(t[s]=e[s],a[s]=!0);e=!1!==r&&Fe(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},kindOf:Be,kindOfTest:He,endsWith:(e,t,r)=>{e=String(e),(void 0===r||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return-1!==n&&n===r},toArray:e=>{if(!e)return null;if($e(e))return e;let t=e.length;if(!Ge(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},forEachEntry:(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let n;for(;(n=r.next())&&!n.done;){const r=n.value;t.call(e,r[0],r[1])}},matchAll:(e,t)=>{let r;const n=[];for(;null!==(r=e.exec(t));)n.push(r);return n},isHTMLForm:lt,hasOwnProperty:ut,hasOwnProp:ut,reduceDescriptors:ht,freezeMethods:e=>{ht(e,((t,r)=>{if(Je(e)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;const n=e[r];Je(n)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")}))}))},toObjectSet:(e,t)=>{const r={},n=e=>{e.forEach((e=>{r[e]=!0}))};return $e(e)?n(e):n(String(e).split(t)),r},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,r){return t.toUpperCase()+r})),noop:()=>{},toFiniteNumber:(e,t)=>(e=+e,Number.isFinite(e)?e:t),findKey:it,global:ot,isContextDefined:st,ALPHABET:mt,generateString:(e=16,t=mt.ALPHA_DIGIT)=>{let r="";const{length:n}=t;for(;e--;)r+=t[Math.random()*n|0];return r},isSpecCompliantForm:function(e){return!!(e&&Je(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),r=(e,n)=>{if(Ye(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[n]=e;const i=$e(e)?[]:{};return nt(e,((e,t)=>{const o=r(e,n+1);!qe(o)&&(i[t]=o)})),t[n]=void 0,i}}return e};return r(e,0)},isAsyncFn:gt,isThenable:e=>e&&(Ye(e)||Je(e))&&Je(e.then)&&Je(e.catch)};function vt(e,t,r,n,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),i&&(this.response=i)}_t.inherits(vt,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:_t.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const yt=vt.prototype,wt={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{wt[e]={value:e}})),Object.defineProperties(vt,wt),Object.defineProperty(yt,"isAxiosError",{value:!0}),vt.from=(e,t,r,n,i,o)=>{const s=Object.create(yt);return _t.toFlatObject(e,s,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),vt.call(s,e.message,t,r,n,i),s.cause=e,s.name=e.name,o&&Object.assign(s,o),s};function bt(e){return _t.isPlainObject(e)||_t.isArray(e)}function Et(e){return _t.endsWith(e,"[]")?e.slice(0,-2):e}function kt(e,t,r){return e?e.concat(t).map((function(e,t){return e=Et(e),!r&&t?"["+e+"]":e})).join(r?".":""):t}const It=_t.toFlatObject(_t,{},null,(function(e){return/^is[A-Z]/.test(e)}));function Tt(e,t,r){if(!_t.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const n=(r=_t.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!_t.isUndefined(t[e])}))).metaTokens,i=r.visitor||l,o=r.dots,s=r.indexes,a=(r.Blob||"undefined"!=typeof Blob&&Blob)&&_t.isSpecCompliantForm(t);if(!_t.isFunction(i))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(_t.isDate(e))return e.toISOString();if(!a&&_t.isBlob(e))throw new vt("Blob is not supported. Use a Buffer instead.");return _t.isArrayBuffer(e)||_t.isTypedArray(e)?a&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function l(e,r,i){let a=e;if(e&&!i&&"object"==typeof e)if(_t.endsWith(r,"{}"))r=n?r:r.slice(0,-2),e=JSON.stringify(e);else if(_t.isArray(e)&&function(e){return _t.isArray(e)&&!e.some(bt)}(e)||(_t.isFileList(e)||_t.endsWith(r,"[]"))&&(a=_t.toArray(e)))return r=Et(r),a.forEach((function(e,n){!_t.isUndefined(e)&&null!==e&&t.append(!0===s?kt([r],n,o):null===s?r:r+"[]",c(e))})),!1;return!!bt(e)||(t.append(kt(i,r,o),c(e)),!1)}const u=[],d=Object.assign(It,{defaultVisitor:l,convertValue:c,isVisitable:bt});if(!_t.isObject(e))throw new TypeError("data must be an object");return function e(r,n){if(!_t.isUndefined(r)){if(-1!==u.indexOf(r))throw Error("Circular reference detected in "+n.join("."));u.push(r),_t.forEach(r,(function(r,o){!0===(!(_t.isUndefined(r)||null===r)&&i.call(t,r,_t.isString(o)?o.trim():o,n,d))&&e(r,n?n.concat(o):[o])})),u.pop()}}(e),t}function Ct(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function St(e,t){this._pairs=[],e&&Tt(e,this,t)}const Rt=St.prototype;function Ot(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function At(e,t,r){if(!t)return e;const n=r&&r.encode||Ot,i=r&&r.serialize;let o;if(o=i?i(t,r):_t.isURLSearchParams(t)?t.toString():new St(t,r).toString(n),o){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}Rt.append=function(e,t){this._pairs.push([e,t])},Rt.toString=function(e){const t=e?function(t){return e.call(this,t,Ct)}:Ct;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};const Pt=class{constructor(){this.handlers=[]}use(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){_t.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},Nt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},xt={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:St,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},isStandardBrowserEnv:(()=>{let e;return("undefined"==typeof navigator||"ReactNative"!==(e=navigator.product)&&"NativeScript"!==e&&"NS"!==e)&&("undefined"!=typeof window&&"undefined"!=typeof document)})(),isStandardBrowserWebWorkerEnv:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,protocols:["http","https","file","blob","url","data"]};function Lt(e){function t(e,r,n,i){let o=e[i++];const s=Number.isFinite(+o),a=i>=e.length;if(o=!o&&_t.isArray(n)?n.length:o,a)return _t.hasOwnProp(n,o)?n[o]=[n[o],r]:n[o]=r,!s;n[o]&&_t.isObject(n[o])||(n[o]=[]);return t(e,r,n[o],i)&&_t.isArray(n[o])&&(n[o]=function(e){const t={},r=Object.keys(e);let n;const i=r.length;let o;for(n=0;n<i;n++)o=r[n],t[o]=e[o];return t}(n[o])),!s}if(_t.isFormData(e)&&_t.isFunction(e.entries)){const r={};return _t.forEachEntry(e,((e,n)=>{t(function(e){return _t.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),n,r,0)})),r}return null}const Dt={transitional:Nt,adapter:["xhr","http"],transformRequest:[function(e,t){const r=t.getContentType()||"",n=r.indexOf("application/json")>-1,i=_t.isObject(e);i&&_t.isHTMLForm(e)&&(e=new FormData(e));if(_t.isFormData(e))return n&&n?JSON.stringify(Lt(e)):e;if(_t.isArrayBuffer(e)||_t.isBuffer(e)||_t.isStream(e)||_t.isFile(e)||_t.isBlob(e))return e;if(_t.isArrayBufferView(e))return e.buffer;if(_t.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let o;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return Tt(e,new xt.classes.URLSearchParams,Object.assign({visitor:function(e,t,r,n){return xt.isNode&&_t.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((o=_t.isFileList(e))||r.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return Tt(o?{"files[]":e}:e,t&&new t,this.formSerializer)}}return i||n?(t.setContentType("application/json",!1),function(e,t,r){if(_t.isString(e))try{return(t||JSON.parse)(e),_t.trim(e)}catch(Ld){if("SyntaxError"!==Ld.name)throw Ld}return(r||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||Dt.transitional,r=t&&t.forcedJSONParsing,n="json"===this.responseType;if(e&&_t.isString(e)&&(r&&!this.responseType||n)){const r=!(t&&t.silentJSONParsing)&&n;try{return JSON.parse(e)}catch(Ld){if(r){if("SyntaxError"===Ld.name)throw vt.from(Ld,vt.ERR_BAD_RESPONSE,this,null,this.response);throw Ld}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:xt.classes.FormData,Blob:xt.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};_t.forEach(["delete","get","head","post","put","patch"],(e=>{Dt.headers[e]={}}));const Mt=Dt,Ut=_t.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),jt=Symbol("internals");function Ft(e){return e&&String(e).trim().toLowerCase()}function Bt(e){return!1===e||null==e?e:_t.isArray(e)?e.map(Bt):String(e)}function zt(e,t,r,n,i){return _t.isFunction(n)?n.call(this,t,r):(i&&(t=r),_t.isString(t)?_t.isString(n)?-1!==t.indexOf(n):_t.isRegExp(n)?n.test(t):void 0:void 0)}class Ht{constructor(e){e&&this.set(e)}set(e,t,r){const n=this;function i(e,t,r){const i=Ft(t);if(!i)throw new Error("header name must be a non-empty string");const o=_t.findKey(n,i);(!o||void 0===n[o]||!0===r||void 0===r&&!1!==n[o])&&(n[o||t]=Bt(e))}const o=(e,t)=>_t.forEach(e,((e,r)=>i(e,r,t)));return _t.isPlainObject(e)||e instanceof this.constructor?o(e,t):_t.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim())?o((e=>{const t={};let r,n,i;return e&&e.split("\n").forEach((function(e){i=e.indexOf(":"),r=e.substring(0,i).trim().toLowerCase(),n=e.substring(i+1).trim(),!r||t[r]&&Ut[r]||("set-cookie"===r?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)})),t})(e),t):null!=e&&i(t,e,r),this}get(e,t){if(e=Ft(e)){const r=_t.findKey(this,e);if(r){const e=this[r];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}(e);if(_t.isFunction(t))return t.call(this,e,r);if(_t.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Ft(e)){const r=_t.findKey(this,e);return!(!r||void 0===this[r]||t&&!zt(0,this[r],r,t))}return!1}delete(e,t){const r=this;let n=!1;function i(e){if(e=Ft(e)){const i=_t.findKey(r,e);!i||t&&!zt(0,r[i],i,t)||(delete r[i],n=!0)}}return _t.isArray(e)?e.forEach(i):i(e),n}clear(e){const t=Object.keys(this);let r=t.length,n=!1;for(;r--;){const i=t[r];e&&!zt(0,this[i],i,e,!0)||(delete this[i],n=!0)}return n}normalize(e){const t=this,r={};return _t.forEach(this,((n,i)=>{const o=_t.findKey(r,i);if(o)return t[o]=Bt(n),void delete t[i];const s=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,r)=>t.toUpperCase()+r))}(i):String(i).trim();s!==i&&delete t[i],t[s]=Bt(n),r[s]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return _t.forEach(this,((r,n)=>{null!=r&&!1!==r&&(t[n]=e&&_t.isArray(r)?r.join(", "):r)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const r=new this(e);return t.forEach((e=>r.set(e))),r}static accessor(e){const t=(this[jt]=this[jt]={accessors:{}}).accessors,r=this.prototype;function n(e){const n=Ft(e);t[n]||(!function(e,t){const r=_t.toCamelCase(" "+t);["get","set","has"].forEach((n=>{Object.defineProperty(e,n+r,{value:function(e,r,i){return this[n].call(this,t,e,r,i)},configurable:!0})}))}(r,e),t[n]=!0)}return _t.isArray(e)?e.forEach(n):n(e),this}}Ht.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),_t.reduceDescriptors(Ht.prototype,(({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[r]=e}}})),_t.freezeMethods(Ht);const Vt=Ht;function $t(e,t){const r=this||Mt,n=t||r,i=Vt.from(n.headers);let o=n.data;return _t.forEach(e,(function(e){o=e.call(r,o,i.normalize(),t?t.status:void 0)})),i.normalize(),o}function qt(e){return!(!e||!e.__CANCEL__)}function Wt(e,t,r){vt.call(this,null==e?"canceled":e,vt.ERR_CANCELED,t,r),this.name="CanceledError"}_t.inherits(Wt,vt,{__CANCEL__:!0});const Kt=xt.isStandardBrowserEnv?{write:function(e,t,r,n,i,o){const s=[];s.push(e+"="+encodeURIComponent(t)),_t.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),_t.isString(n)&&s.push("path="+n),_t.isString(i)&&s.push("domain="+i),!0===o&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}};function Jt(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const Gt=xt.isStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let r;function n(r){let n=r;return e&&(t.setAttribute("href",n),n=t.href),t.setAttribute("href",n),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return r=n(window.location.href),function(e){const t=_t.isString(e)?n(e):e;return t.protocol===r.protocol&&t.host===r.host}}():function(){return!0};function Yt(e,t){let r=0;const n=function(e,t){e=e||10;const r=new Array(e),n=new Array(e);let i,o=0,s=0;return t=void 0!==t?t:1e3,function(a){const c=Date.now(),l=n[s];i||(i=c),r[o]=a,n[o]=c;let u=s,d=0;for(;u!==o;)d+=r[u++],u%=e;if(o=(o+1)%e,o===s&&(s=(s+1)%e),c-i<t)return;const h=l&&c-l;return h?Math.round(1e3*d/h):void 0}}(50,250);return i=>{const o=i.loaded,s=i.lengthComputable?i.total:void 0,a=o-r,c=n(a);r=o;const l={loaded:o,total:s,progress:s?o/s:void 0,bytes:a,rate:c||void 0,estimated:c&&s&&o<=s?(s-o)/c:void 0,event:i};l[t?"download":"upload"]=!0,e(l)}}const Qt={http:null,xhr:"undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,r){let n=e.data;const i=Vt.from(e.headers).normalize(),o=e.responseType;let s,a;function c(){e.cancelToken&&e.cancelToken.unsubscribe(s),e.signal&&e.signal.removeEventListener("abort",s)}_t.isFormData(n)&&(xt.isStandardBrowserEnv||xt.isStandardBrowserWebWorkerEnv?i.setContentType(!1):i.getContentType(/^\s*multipart\/form-data/)?_t.isString(a=i.getContentType())&&i.setContentType(a.replace(/^\s*(multipart\/form-data);+/,"$1")):i.setContentType("multipart/form-data"));let l=new XMLHttpRequest;if(e.auth){const t=e.auth.username||"",r=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";i.set("Authorization","Basic "+btoa(t+":"+r))}const u=Jt(e.baseURL,e.url);function d(){if(!l)return;const n=Vt.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders());!function(e,t,r){const n=r.config.validateStatus;r.status&&n&&!n(r.status)?t(new vt("Request failed with status code "+r.status,[vt.ERR_BAD_REQUEST,vt.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):e(r)}((function(e){t(e),c()}),(function(e){r(e),c()}),{data:o&&"text"!==o&&"json"!==o?l.response:l.responseText,status:l.status,statusText:l.statusText,headers:n,config:e,request:l}),l=null}if(l.open(e.method.toUpperCase(),At(u,e.params,e.paramsSerializer),!0),l.timeout=e.timeout,"onloadend"in l?l.onloadend=d:l.onreadystatechange=function(){l&&4===l.readyState&&(0!==l.status||l.responseURL&&0===l.responseURL.indexOf("file:"))&&setTimeout(d)},l.onabort=function(){l&&(r(new vt("Request aborted",vt.ECONNABORTED,e,l)),l=null)},l.onerror=function(){r(new vt("Network Error",vt.ERR_NETWORK,e,l)),l=null},l.ontimeout=function(){let t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const n=e.transitional||Nt;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),r(new vt(t,n.clarifyTimeoutError?vt.ETIMEDOUT:vt.ECONNABORTED,e,l)),l=null},xt.isStandardBrowserEnv){const t=Gt(u)&&e.xsrfCookieName&&Kt.read(e.xsrfCookieName);t&&i.set(e.xsrfHeaderName,t)}void 0===n&&i.setContentType(null),"setRequestHeader"in l&&_t.forEach(i.toJSON(),(function(e,t){l.setRequestHeader(t,e)})),_t.isUndefined(e.withCredentials)||(l.withCredentials=!!e.withCredentials),o&&"json"!==o&&(l.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&l.addEventListener("progress",Yt(e.onDownloadProgress,!0)),"function"==typeof e.onUploadProgress&&l.upload&&l.upload.addEventListener("progress",Yt(e.onUploadProgress)),(e.cancelToken||e.signal)&&(s=t=>{l&&(r(!t||t.type?new Wt(null,e,l):t),l.abort(),l=null)},e.cancelToken&&e.cancelToken.subscribe(s),e.signal&&(e.signal.aborted?s():e.signal.addEventListener("abort",s)));const h=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(u);h&&-1===xt.protocols.indexOf(h)?r(new vt("Unsupported protocol "+h+":",vt.ERR_BAD_REQUEST,e)):l.send(n||null)}))}};_t.forEach(Qt,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(Ld){}Object.defineProperty(e,"adapterName",{value:t})}}));const Xt=e=>`- ${e}`,Zt=e=>_t.isFunction(e)||null===e||!1===e,er=e=>{e=_t.isArray(e)?e:[e];const{length:t}=e;let r,n;const i={};for(let o=0;o<t;o++){let t;if(r=e[o],n=r,!Zt(r)&&(n=Qt[(t=String(r)).toLowerCase()],void 0===n))throw new vt(`Unknown adapter '${t}'`);if(n)break;i[t||"#"+o]=n}if(!n){const e=Object.entries(i).map((([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));throw new vt("There is no suitable adapter to dispatch the request "+(t?e.length>1?"since :\n"+e.map(Xt).join("\n"):" "+Xt(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return n};function tr(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Wt(null,e)}function rr(e){tr(e),e.headers=Vt.from(e.headers),e.data=$t.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return er(e.adapter||Mt.adapter)(e).then((function(t){return tr(e),t.data=$t.call(e,e.transformResponse,t),t.headers=Vt.from(t.headers),t}),(function(t){return qt(t)||(tr(e),t&&t.response&&(t.response.data=$t.call(e,e.transformResponse,t.response),t.response.headers=Vt.from(t.response.headers))),Promise.reject(t)}))}const nr=e=>e instanceof Vt?e.toJSON():e;function ir(e,t){t=t||{};const r={};function n(e,t,r){return _t.isPlainObject(e)&&_t.isPlainObject(t)?_t.merge.call({caseless:r},e,t):_t.isPlainObject(t)?_t.merge({},t):_t.isArray(t)?t.slice():t}function i(e,t,r){return _t.isUndefined(t)?_t.isUndefined(e)?void 0:n(void 0,e,r):n(e,t,r)}function o(e,t){if(!_t.isUndefined(t))return n(void 0,t)}function s(e,t){return _t.isUndefined(t)?_t.isUndefined(e)?void 0:n(void 0,e):n(void 0,t)}function a(r,i,o){return o in t?n(r,i):o in e?n(void 0,r):void 0}const c={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(e,t)=>i(nr(e),nr(t),!0)};return _t.forEach(Object.keys(Object.assign({},e,t)),(function(n){const o=c[n]||i,s=o(e[n],t[n],n);_t.isUndefined(s)&&o!==a||(r[n]=s)})),r}const or="1.6.0",sr={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{sr[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));const ar={};sr.transitional=function(e,t,r){function n(e,t){return"[Axios v1.6.0] Transitional option '"+e+"'"+t+(r?". "+r:"")}return(r,i,o)=>{if(!1===e)throw new vt(n(i," has been removed"+(t?" in "+t:"")),vt.ERR_DEPRECATED);return t&&!ar[i]&&(ar[i]=!0,console.warn(n(i," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,i,o)}};const cr={assertOptions:function(e,t,r){if("object"!=typeof e)throw new vt("options must be an object",vt.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let i=n.length;for(;i-- >0;){const o=n[i],s=t[o];if(s){const t=e[o],r=void 0===t||s(t,o,e);if(!0!==r)throw new vt("option "+o+" must be "+r,vt.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new vt("Unknown option "+o,vt.ERR_BAD_OPTION)}},validators:sr},lr=cr.validators;class ur{constructor(e){this.defaults=e,this.interceptors={request:new Pt,response:new Pt}}request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=ir(this.defaults,t);const{transitional:r,paramsSerializer:n,headers:i}=t;void 0!==r&&cr.assertOptions(r,{silentJSONParsing:lr.transitional(lr.boolean),forcedJSONParsing:lr.transitional(lr.boolean),clarifyTimeoutError:lr.transitional(lr.boolean)},!1),null!=n&&(_t.isFunction(n)?t.paramsSerializer={serialize:n}:cr.assertOptions(n,{encode:lr.function,serialize:lr.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let o=i&&_t.merge(i.common,i[t.method]);i&&_t.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete i[e]})),t.headers=Vt.concat(o,i);const s=[];let a=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,s.unshift(e.fulfilled,e.rejected))}));const c=[];let l;this.interceptors.response.forEach((function(e){c.push(e.fulfilled,e.rejected)}));let u,d=0;if(!a){const e=[rr.bind(this),void 0];for(e.unshift.apply(e,s),e.push.apply(e,c),u=e.length,l=Promise.resolve(t);d<u;)l=l.then(e[d++],e[d++]);return l}u=s.length;let h=t;for(d=0;d<u;){const e=s[d++],t=s[d++];try{h=e(h)}catch(p){t.call(this,p);break}}try{l=rr.call(this,h)}catch(p){return Promise.reject(p)}for(d=0,u=c.length;d<u;)l=l.then(c[d++],c[d++]);return l}getUri(e){return At(Jt((e=ir(this.defaults,e)).baseURL,e.url),e.params,e.paramsSerializer)}}_t.forEach(["delete","get","head","options"],(function(e){ur.prototype[e]=function(t,r){return this.request(ir(r||{},{method:e,url:t,data:(r||{}).data}))}})),_t.forEach(["post","put","patch"],(function(e){function t(t){return function(r,n,i){return this.request(ir(i||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}ur.prototype[e]=t(),ur.prototype[e+"Form"]=t(!0)}));const dr=ur;class hr{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise((function(e){t=e}));const r=this;this.promise.then((e=>{if(!r._listeners)return;let t=r._listeners.length;for(;t-- >0;)r._listeners[t](e);r._listeners=null})),this.promise.then=e=>{let t;const n=new Promise((e=>{r.subscribe(e),t=e})).then(e);return n.cancel=function(){r.unsubscribe(t)},n},e((function(e,n,i){r.reason||(r.reason=new Wt(e,n,i),t(r.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}static source(){let e;return{token:new hr((function(t){e=t})),cancel:e}}}const pr=hr;const fr={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(fr).forEach((([e,t])=>{fr[t]=e}));const mr=fr;const gr=function e(t){const r=new dr(t),n=Ue(dr.prototype.request,r);return _t.extend(n,dr.prototype,r,{allOwnKeys:!0}),_t.extend(n,r,null,{allOwnKeys:!0}),n.create=function(r){return e(ir(t,r))},n}(Mt);gr.Axios=dr,gr.CanceledError=Wt,gr.CancelToken=pr,gr.isCancel=qt,gr.VERSION=or,gr.toFormData=Tt,gr.AxiosError=vt,gr.Cancel=gr.CanceledError,gr.all=function(e){return Promise.all(e)},gr.spread=function(e){return function(t){return e.apply(null,t)}},gr.isAxiosError=function(e){return _t.isObject(e)&&!0===e.isAxiosError},gr.mergeConfig=ir,gr.AxiosHeaders=Vt,gr.formToJSON=e=>Lt(_t.isHTMLForm(e)?new FormData(e):e),gr.getAdapter=er,gr.HttpStatusCode=mr,gr.default=gr;const _r=gr,vr=(e,t,r)=>{ve((()=>{const t=_r.CancelToken.source();return e(t),()=>{r&&r(),t.cancel()}}),t)},yr=({request:e})=>console.error("[API] Request error:",e),wr=({response:e})=>{if(e){const{status:t,request:r,data:n}=e;console.error("[API] Response error:",t,r.responseURL,JSON.stringify(n))}};let br;const Er=(e,t)=>({headers:{Authorization:`Bearer ${e}`},cancelToken:t.token}),kr=async(e,t)=>{if(!br)throw new Error("Api has not been initialized");return br.post("customer-profile/backend/v1.0/workplace-link",{},Er(e,t)).then((e=>204==e.status?{isEstablished:!0}:{isEstablished:!1,linkRequest:null==e?void 0:e.data}))},Ir=(e,t,r,n)=>{if(!br)throw new Error("Api has not been initialized");const i={linkRequestId:t,profileId:r};return br.post("customer-profile/customer-backend/v1.0/workplace-link",i,Er(e,n))};for(var Tr="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},Cr={},Sr={},Rr={byteLength:function(e){var t=Lr(e),r=t[0],n=t[1];return 3*(r+n)/4-n},toByteArray:function(e){var t,r,n=Lr(e),i=n[0],o=n[1],s=new Pr(function(e,t,r){return 3*(t+r)/4-r}(0,i,o)),a=0,c=o>0?i-4:i;for(r=0;r<c;r+=4)t=Ar[e.charCodeAt(r)]<<18|Ar[e.charCodeAt(r+1)]<<12|Ar[e.charCodeAt(r+2)]<<6|Ar[e.charCodeAt(r+3)],s[a++]=t>>16&255,s[a++]=t>>8&255,s[a++]=255&t;2===o&&(t=Ar[e.charCodeAt(r)]<<2|Ar[e.charCodeAt(r+1)]>>4,s[a++]=255&t);1===o&&(t=Ar[e.charCodeAt(r)]<<10|Ar[e.charCodeAt(r+1)]<<4|Ar[e.charCodeAt(r+2)]>>2,s[a++]=t>>8&255,s[a++]=255&t);return s},fromByteArray:function(e){for(var t,r=e.length,n=r%3,i=[],o=16383,s=0,a=r-n;s<a;s+=o)i.push(Dr(e,s,s+o>a?a:s+o));1===n?(t=e[r-1],i.push(Or[t>>2]+Or[t<<4&63]+"==")):2===n&&(t=(e[r-2]<<8)+e[r-1],i.push(Or[t>>10]+Or[t>>4&63]+Or[t<<2&63]+"="));return i.join("")}},Or=[],Ar=[],Pr="undefined"!=typeof Uint8Array?Uint8Array:Array,Nr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",xr=0;xr<64;++xr)Or[xr]=Nr[xr],Ar[Nr.charCodeAt(xr)]=xr;function Lr(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function Dr(e,t,r){for(var n,i,o=[],s=t;s<r;s+=3)n=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),o.push(Or[(i=n)>>18&63]+Or[i>>12&63]+Or[i>>6&63]+Or[63&i]);return o.join("")}Ar["-".charCodeAt(0)]=62,Ar["_".charCodeAt(0)]=63;var Mr={};Object.defineProperty(Mr,"__esModule",{value:!0}),Mr.AppAuthError=void 0;var Ur=function(e,t){this.message=e,this.extras=t};Mr.AppAuthError=Ur,Object.defineProperty(Sr,"__esModule",{value:!0});var jr=Sr.DefaultCrypto=Sr.textEncodeLite=Sr.urlSafe=Sr.bufferToString=void 0,Fr=Rr,Br=Mr,zr="undefined"!=typeof window&&!!window.crypto,Hr=zr&&!!window.crypto.subtle,Vr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";function $r(e){for(var t=[],r=0;r<e.byteLength;r+=1){var n=e[r]%62;t.push(Vr[n])}return t.join("")}function qr(e){return Fr.fromByteArray(new Uint8Array(e)).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function Wr(e){for(var t=new ArrayBuffer(e.length),r=new Uint8Array(t),n=0;n<e.length;n++)r[n]=e.charCodeAt(n);return r}Sr.bufferToString=$r,Sr.urlSafe=qr,Sr.textEncodeLite=Wr;var Kr=function(){function e(){}return e.prototype.generateRandom=function(e){var t=new Uint8Array(e);if(zr)window.crypto.getRandomValues(t);else for(var r=0;r<e;r+=1)t[r]=62*Math.random()|0;return $r(t)},e.prototype.deriveChallenge=function(e){return e.length<43||e.length>128?Promise.reject(new Br.AppAuthError("Invalid code length.")):Hr?new Promise((function(t,r){crypto.subtle.digest("SHA-256",Wr(e)).then((function(e){return t(qr(new Uint8Array(e)))}),(function(e){return r(e)}))})):Promise.reject(new Br.AppAuthError("window.crypto.subtle is unavailable."))},e}();jr=Sr.DefaultCrypto=Kr;var Jr={},Gr={};Object.defineProperty(Gr,"__esModule",{value:!0}),Gr.IS_PROFILE=Gr.IS_LOG=void 0,Gr.IS_LOG=!0,Gr.IS_PROFILE=!1;var Yr=Tr&&Tr.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(Jr,"__esModule",{value:!0}),Jr.profile=Jr.log=void 0;var Qr=Gr;function Xr(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];Qr.IS_LOG&&((t?t.length:0)>0?console.log.apply(console,Yr([e],t)):console.log(e))}Jr.log=Xr;var Zr="undefined"!=typeof window&&!!window.performance&&!!console.profile;Jr.profile=function(e,t,r){return Qr.IS_PROFILE?function(e,t,r){var n=r.value,i=n.name;i||(i="anonymous function");r.value=Zr?function(e){console.profile(i);var t=window.performance.now(),r=n.call.apply(n,Yr([this||window],e)),o=window.performance.now()-t;return console.log(i+" took "+o+" ms"),console.profileEnd(),r}:function(e){Xr("Profile start "+i);var t=Date.now(),r=n.call.apply(n,Yr([this||window],e)),o=Date.now()-t;return Xr("Profile end "+i+" took "+o+" ms."),r};return r}(0,0,r):r},Object.defineProperty(Cr,"__esModule",{value:!0});var en=Cr.AuthorizationRequest=void 0,tn=Sr,rn=Jr,nn=function(){function e(t,r,n){void 0===r&&(r=new tn.DefaultCrypto),void 0===n&&(n=!0),this.crypto=r,this.usePkce=n,this.clientId=t.client_id,this.redirectUri=t.redirect_uri,this.scope=t.scope,this.responseType=t.response_type||e.RESPONSE_TYPE_CODE,this.state=t.state||function(e){return e.generateRandom(10)}(r),this.extras=t.extras,this.internal=t.internal}return e.prototype.setupCodeVerifier=function(){var e=this;if(this.usePkce){var t=this.crypto.generateRandom(128);return this.crypto.deriveChallenge(t).catch((function(e){rn.log("Unable to generate PKCE challenge. Not using PKCE",e)})).then((function(r){r&&(e.internal=e.internal||{},e.internal.code_verifier=t,e.extras=e.extras||{},e.extras.code_challenge=r,e.extras.code_challenge_method="S256")}))}return Promise.resolve()},e.prototype.toJson=function(){var e=this;return this.setupCodeVerifier().then((function(){return{response_type:e.responseType,client_id:e.clientId,redirect_uri:e.redirectUri,scope:e.scope,state:e.state,extras:e.extras,internal:e.internal}}))},e.RESPONSE_TYPE_TOKEN="token",e.RESPONSE_TYPE_CODE="code",e}();en=Cr.AuthorizationRequest=nn;var on={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.AuthorizationRequestHandler=e.BUILT_IN_PARAMETERS=e.AuthorizationNotifier=void 0;var t=Jr,r=function(){function e(){this.listener=null}return e.prototype.setAuthorizationListener=function(e){this.listener=e},e.prototype.onAuthorizationComplete=function(e,t,r){this.listener&&this.listener(e,t,r)},e}();e.AuthorizationNotifier=r,e.BUILT_IN_PARAMETERS=["redirect_uri","client_id","response_type","state","scope"];var n=function(){function r(e,t){this.utils=e,this.crypto=t,this.notifier=null}return r.prototype.buildRequestUrl=function(t,r){var n={redirect_uri:r.redirectUri,client_id:r.clientId,response_type:r.responseType,state:r.state,scope:r.scope};if(r.extras)for(var i in r.extras)r.extras.hasOwnProperty(i)&&e.BUILT_IN_PARAMETERS.indexOf(i)<0&&(n[i]=r.extras[i]);var o=this.utils.stringify(n);return t.authorizationEndpoint+"?"+o},r.prototype.completeAuthorizationRequestIfPossible=function(){var e=this;return t.log("Checking to see if there is an authorization response to be delivered."),this.notifier||t.log("Notifier is not present on AuthorizationRequest handler.\n No delivery of result will be possible"),this.completeAuthorizationRequest().then((function(r){r||t.log("No result is available yet."),r&&e.notifier&&e.notifier.onAuthorizationComplete(r.request,r.response,r.error)}))},r.prototype.setAuthorizationNotifier=function(e){return this.notifier=e,this},r}();e.AuthorizationRequestHandler=n}(on);var sn={},an={};Object.defineProperty(an,"__esModule",{value:!0}),an.AuthorizationError=an.AuthorizationResponse=void 0;var cn=function(){function e(e){this.code=e.code,this.state=e.state}return e.prototype.toJson=function(){return{code:this.code,state:this.state}},e}();an.AuthorizationResponse=cn;var ln=function(){function e(e){this.error=e.error,this.errorDescription=e.error_description,this.errorUri=e.error_uri,this.state=e.state}return e.prototype.toJson=function(){return{error:this.error,error_description:this.errorDescription,error_uri:this.errorUri,state:this.state}},e}();an.AuthorizationError=ln;var un={};Object.defineProperty(un,"__esModule",{value:!0}),un.BasicQueryStringUtils=void 0;var dn=function(){function e(){}return e.prototype.parse=function(e,t){return t?this.parseQueryString(e.hash):this.parseQueryString(e.search)},e.prototype.parseQueryString=function(e){for(var t={},r=(e=e.trim().replace(/^(\?|#|&)/,"")).split("&"),n=0;n<r.length;n+=1){var i=r[n].split("=");if(i.length>=2){var o=decodeURIComponent(i.shift()),s=i.length>0?i.join("="):null;s&&(t[o]=decodeURIComponent(s))}}return t},e.prototype.stringify=function(e){var t=[];for(var r in e)e.hasOwnProperty(r)&&e[r]&&t.push(encodeURIComponent(r)+"="+encodeURIComponent(e[r]));return t.join("&")},e}();un.BasicQueryStringUtils=dn;var hn,pn={},fn=Tr&&Tr.__extends||(hn=function(e,t){return(hn=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}hn(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(pn,"__esModule",{value:!0}),pn.LocalStorageBackend=pn.StorageBackend=void 0;var mn=function(){};pn.StorageBackend=mn;var gn=function(e){function t(t){var r=e.call(this)||this;return r.storage=t||window.localStorage,r}return fn(t,e),t.prototype.getItem=function(e){var t=this;return new Promise((function(r,n){var i=t.storage.getItem(e);r(i||null)}))},t.prototype.removeItem=function(e){var t=this;return new Promise((function(r,n){t.storage.removeItem(e),r()}))},t.prototype.clear=function(){var e=this;return new Promise((function(t,r){e.storage.clear(),t()}))},t.prototype.setItem=function(e,t){var r=this;return new Promise((function(n,i){r.storage.setItem(e,t),n()}))},t}(mn);pn.LocalStorageBackend=gn;var _n=Tr&&Tr.__extends||function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(sn,"__esModule",{value:!0});var vn=sn.RedirectRequestHandler=void 0,yn=Cr,wn=an,bn=Sr,En=Jr,kn=un,In=pn,Tn=function(e){return e+"_appauth_authorization_request"},Cn=function(e){return e+"_appauth_authorization_service_configuration"},Sn="appauth_current_authorization_request",Rn=function(e){function t(t,r,n,i){void 0===t&&(t=new In.LocalStorageBackend),void 0===r&&(r=new kn.BasicQueryStringUtils),void 0===n&&(n=window.location),void 0===i&&(i=new bn.DefaultCrypto);var o=e.call(this,r,i)||this;return o.storageBackend=t,o.locationLike=n,o}return _n(t,e),t.prototype.performAuthorizationRequest=function(e,t){var r=this,n=this.crypto.generateRandom(10);Promise.all([this.storageBackend.setItem(Sn,n),t.toJson().then((function(e){return r.storageBackend.setItem(Tn(n),JSON.stringify(e))})),this.storageBackend.setItem(Cn(n),JSON.stringify(e.toJson()))]).then((function(){var n=r.buildRequestUrl(e,t);En.log("Making a request to ",t,n),r.locationLike.assign(n)}))},t.prototype.completeAuthorizationRequest=function(){var e=this;return this.storageBackend.getItem(Sn).then((function(t){return t?e.storageBackend.getItem(Tn(t)).then((function(e){return JSON.parse(e)})).then((function(e){return new yn.AuthorizationRequest(e)})).then((function(r){var n=""+e.locationLike.origin+e.locationLike.pathname,i=e.utils.parse(e.locationLike,!0),o=i.state,s=i.code,a=i.error;En.log("Potential authorization request ",n,i,o,s,a);var c=o===r.state,l=null,u=null;if(c){if(a){var d=i.error_uri,h=i.error_description;u=new wn.AuthorizationError({error:a,error_description:h,error_uri:d,state:o})}else l=new wn.AuthorizationResponse({code:s,state:o});return Promise.all([e.storageBackend.removeItem(Sn),e.storageBackend.removeItem(Tn(t)),e.storageBackend.removeItem(Cn(t))]).then((function(){return En.log("Delivering authorization response"),{request:r,response:l,error:u}}))}return En.log("Mismatched request (state and request_uri) dont match."),Promise.resolve(null)})):null}))},t}(on.AuthorizationRequestHandler);vn=sn.RedirectRequestHandler=Rn;var On={},An={},Pn=Tr&&Tr.__extends||function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(An,"__esModule",{value:!0}),An.TestRequestor=Mn=An.FetchRequestor=An.JQueryRequestor=An.Requestor=void 0;var Nn=Mr,xn=function(){};An.Requestor=xn;var Ln=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Pn(t,e),t.prototype.xhr=function(e){var t=$.ajax(e);return new Promise((function(e,r){t.then((function(t,r,n){e(t)}),(function(e,t,n){r(new Nn.AppAuthError(n))}))}))},t}(xn);An.JQueryRequestor=Ln;var Dn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Pn(t,e),t.prototype.xhr=function(e){if(!e.url)return Promise.reject(new Nn.AppAuthError("A URL must be provided."));var t=new URL(e.url),r={};(r.method=e.method,r.mode="cors",e.data)&&(e.method&&"POST"===e.method.toUpperCase()?r.body=e.data:new URLSearchParams(e.data).forEach((function(e,r){t.searchParams.append(r,e)})));if(r.headers={},e.headers)for(var n in e.headers)e.headers.hasOwnProperty(n)&&(r.headers[n]=e.headers[n]);var i=e.dataType&&"json"===e.dataType.toLowerCase();return i&&(r.headers.Accept="application/json, text/javascript, */*; q=0.01"),fetch(t.toString(),r).then((function(e){if(e.status>=200&&e.status<300){var t=e.headers.get("content-type");return i||t&&-1!==t.indexOf("application/json")?e.json():e.text()}return Promise.reject(new Nn.AppAuthError(e.status.toString(),e.statusText))}))},t}(xn),Mn=An.FetchRequestor=Dn,Un=function(e){function t(t){var r=e.call(this)||this;return r.promise=t,r}return Pn(t,e),t.prototype.xhr=function(e){return this.promise},t}(xn);An.TestRequestor=Un,Object.defineProperty(On,"__esModule",{value:!0});var jn=On.AuthorizationServiceConfiguration=void 0,Fn=An,Bn=function(){function e(e){this.authorizationEndpoint=e.authorization_endpoint,this.tokenEndpoint=e.token_endpoint,this.revocationEndpoint=e.revocation_endpoint,this.userInfoEndpoint=e.userinfo_endpoint,this.endSessionEndpoint=e.end_session_endpoint}return e.prototype.toJson=function(){return{authorization_endpoint:this.authorizationEndpoint,token_endpoint:this.tokenEndpoint,revocation_endpoint:this.revocationEndpoint,end_session_endpoint:this.endSessionEndpoint,userinfo_endpoint:this.userInfoEndpoint}},e.fetchFromIssuer=function(t,r){var n=t+"/.well-known/openid-configuration";return(r||new Fn.JQueryRequestor).xhr({url:n,dataType:"json",method:"GET"}).then((function(t){return new e(t)}))},e}();jn=On.AuthorizationServiceConfiguration=Bn;var zn={};Object.defineProperty(zn,"__esModule",{value:!0});var Hn=zn.TokenRequest=zn.GRANT_TYPE_REFRESH_TOKEN=zn.GRANT_TYPE_AUTHORIZATION_CODE=void 0,Vn=zn.GRANT_TYPE_AUTHORIZATION_CODE="authorization_code";zn.GRANT_TYPE_REFRESH_TOKEN="refresh_token";var $n=function(){function e(e){this.clientId=e.client_id,this.redirectUri=e.redirect_uri,this.grantType=e.grant_type,this.code=e.code,this.refreshToken=e.refresh_token,this.extras=e.extras}return e.prototype.toJson=function(){return{grant_type:this.grantType,code:this.code,refresh_token:this.refreshToken,redirect_uri:this.redirectUri,client_id:this.clientId,extras:this.extras}},e.prototype.toStringMap=function(){var e={grant_type:this.grantType,client_id:this.clientId,redirect_uri:this.redirectUri};if(this.code&&(e.code=this.code),this.refreshToken&&(e.refresh_token=this.refreshToken),this.extras)for(var t in this.extras)this.extras.hasOwnProperty(t)&&!e.hasOwnProperty(t)&&(e[t]=this.extras[t]);return e},e}();Hn=zn.TokenRequest=$n;var qn={},Wn={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.TokenError=e.TokenResponse=e.nowInSeconds=void 0;e.nowInSeconds=function(){return Math.round((new Date).getTime()/1e3)};var t=function(){function t(t){this.accessToken=t.access_token,this.tokenType=t.token_type||"bearer",t.expires_in&&(this.expiresIn=parseInt(t.expires_in,10)),this.refreshToken=t.refresh_token,this.scope=t.scope,this.idToken=t.id_token,this.issuedAt=t.issued_at||e.nowInSeconds()}return t.prototype.toJson=function(){var e;return{access_token:this.accessToken,id_token:this.idToken,refresh_token:this.refreshToken,scope:this.scope,token_type:this.tokenType,issued_at:this.issuedAt,expires_in:null===(e=this.expiresIn)||void 0===e?void 0:e.toString()}},t.prototype.isValid=function(t){return void 0===t&&(t=-600),!this.expiresIn||e.nowInSeconds()<this.issuedAt+this.expiresIn+t},t}();e.TokenResponse=t;var r=function(){function e(e){this.error=e.error,this.errorDescription=e.error_description,this.errorUri=e.error_uri}return e.prototype.toJson=function(){return{error:this.error,error_description:this.errorDescription,error_uri:this.errorUri}},e}();e.TokenError=r}(Wn),Object.defineProperty(qn,"__esModule",{value:!0});var Kn=qn.BaseTokenRequestHandler=void 0,Jn=Mr,Gn=un,Yn=Wn,Qn=An,Xn=function(){function e(e,t){void 0===e&&(e=new Qn.JQueryRequestor),void 0===t&&(t=new Gn.BasicQueryStringUtils),this.requestor=e,this.utils=t}return e.prototype.isTokenResponse=function(e){return void 0===e.error},e.prototype.performRevokeTokenRequest=function(e,t){return this.requestor.xhr({url:e.revocationEndpoint,method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},data:this.utils.stringify(t.toStringMap())}).then((function(e){return!0}))},e.prototype.performTokenRequest=function(e,t){var r=this;return this.requestor.xhr({url:e.tokenEndpoint,method:"POST",dataType:"json",headers:{"Content-Type":"application/x-www-form-urlencoded"},data:this.utils.stringify(t.toStringMap())}).then((function(e){return r.isTokenResponse(e)?new Yn.TokenResponse(e):Promise.reject(new Jn.AppAuthError(e.error,new Yn.TokenError(e)))}))},e}();Kn=qn.BaseTokenRequestHandler=Xn;let Zn;const ei=async(e,t)=>{const r=await jn.fetchFromIssuer(e,t);return Zn=r,r},ti=async(e,t,r,n,i)=>{const o={};t&&(o.code_verifier=t);const s=new Hn({client_id:n.clientId,redirect_uri:n.redirectUri,grant_type:Vn,code:e,refresh_token:void 0,extras:o});return await r.performTokenRequest(i,s)},ri=e=>{if(e&&e.isValid())return e.accessToken},ni=async e=>{try{const t=await e.storageBackend.getItem("appauth_current_authorization_request"),r=t&&await e.storageBackend.getItem((e=>`${e}_appauth_authorization_service_configuration`)(t));if(r){const e=JSON.parse(r);Zn=new jn(e)}return!0}catch{return!1}};p.bind({g:1});const ii=f("span")([{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"}]),oi=(function(){const e=f.call({g:1},"div").apply(null,arguments);return function(t){return e(t),null}})`
1
+ let e,t,r,n={data:""},i=e=>"object"==typeof window?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||n,o=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,s=/\/\*[^]*?\*\/| +/g,a=/\n+/g,c=(e,t)=>{let r="",n="",i="";for(let o in e){let s=e[o];"@"==o[0]?"i"==o[1]?r=o+" "+s+";":n+="f"==o[1]?c(s,o):o+"{"+c(s,"k"==o[1]?"":t)+"}":"object"==typeof s?n+=c(s,t?t.replace(/([^,])+/g,(e=>o.replace(/(^:.*)|([^,])+/g,(t=>/&/.test(t)?t.replace(/&/g,e):e?e+" "+t:t)))):o):null!=s&&(o=/^--/.test(o)?o:o.replace(/[A-Z]/g,"-$&").toLowerCase(),i+=c.p?c.p(o,s):o+":"+s+";")}return r+(t&&i?t+"{"+i+"}":i)+n},l={},u=e=>{if("object"==typeof e){let t="";for(let r in e)t+=r+u(e[r]);return t}return e},d=(e,t,r,n,i)=>{let d=u(e),h=l[d]||(l[d]=(e=>{let t=0,r=11;for(;t<e.length;)r=101*r+e.charCodeAt(t++)>>>0;return"go"+r})(d));if(!l[h]){let t=d!==e?e:(e=>{let t,r,n=[{}];for(;t=o.exec(e.replace(s,""));)t[4]?n.shift():t[3]?(r=t[3].replace(a," ").trim(),n.unshift(n[0][r]=n[0][r]||{})):n[0][t[1]]=t[2].replace(a," ").trim();return n[0]})(e);l[h]=c(i?{["@keyframes "+h]:t}:t,r?"":"."+h)}let p=r&&l.g?l.g:null;return r&&(l.g=l[h]),f=l[h],m=t,g=n,(_=p)?m.data=m.data.replace(_,f):-1===m.data.indexOf(f)&&(m.data=g?f+m.data:m.data+f),h;var f,m,g,_},h=(e,t,r)=>e.reduce(((e,n,i)=>{let o=t[i];if(o&&o.call){let e=o(r),t=e&&e.props&&e.props.className||/^go/.test(e)&&e;o=t?"."+t:e&&"object"==typeof e?e.props?"":c(e,""):!1===e?"":e}return e+n+(null==o?"":o)}),"");function p(e){let t=this||{},r=e.call?e(t.p):e;return d(r.unshift?r.raw?h(r,[].slice.call(arguments,1),t.p):r.reduce(((e,r)=>Object.assign(e,r&&r.call?r(t.p):r)),{}):r,i(t.target),t.g,t.o,t.k)}function f(n,i){let o=this||{};return function(){let s=arguments;function a(c,l){let u=Object.assign({},c),d=u.className||a.className;o.p=Object.assign({theme:t&&t()},u),o.o=/ *go\d+/.test(d),u.className=p.apply(o,s)+(d?" "+d:""),i&&(u.ref=l);let h=n;return n[0]&&(h=u.as||n,delete u.as),r&&h[0]&&r(u),e(h,u)}return i?i(a):a}}p.bind({g:1}),p.bind({k:1});var m,g,_,v,y,w,b,E,k={},I=[],T=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,C=Array.isArray;function S(e,t){for(var r in t)e[r]=t[r];return e}function R(e){var t=e.parentNode;t&&t.removeChild(e)}function O(e,t,r){var n,i,o,s={};for(o in t)"key"==o?n=t[o]:"ref"==o?i=t[o]:s[o]=t[o];if(arguments.length>2&&(s.children=arguments.length>3?m.call(arguments,2):r),"function"==typeof e&&null!=e.defaultProps)for(o in e.defaultProps)void 0===s[o]&&(s[o]=e.defaultProps[o]);return A(e,s,n,i,null)}function A(e,t,r,n,i){var o={type:e,props:t,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==i?++_:i};return null==i&&null!=g.vnode&&g.vnode(o),o}function P(){return{current:null}}function N(e){return e.children}function x(e,t){this.props=e,this.context=t}function L(e,t){if(null==t)return e.__?L(e.__,e.__.__k.indexOf(e)+1):null;for(var r;t<e.__k.length;t++)if(null!=(r=e.__k[t])&&null!=r.__e)return r.__d||r.__e;return"function"==typeof e.type?L(e):null}function D(e){var t,r;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(r=e.__k[t])&&null!=r.__e){e.__e=e.__c.base=r.__e;break}return D(e)}}function M(e){(!e.__d&&(e.__d=!0)&&v.push(e)&&!U.__r++||y!==g.debounceRendering)&&((y=g.debounceRendering)||w)(U)}function U(){var e,t,r,n,i,o,s,a,c;for(v.sort(b);e=v.shift();)e.__d&&(t=v.length,n=void 0,i=void 0,o=void 0,a=(s=(r=e).__v).__e,(c=r.__P)&&(n=[],i=[],(o=S({},s)).__v=s.__v+1,J(c,s,o,r.__n,void 0!==c.ownerSVGElement,null!=s.__h?[a]:null,n,null==a?L(s):a,s.__h,i),G(n,s,i),s.__e!=a&&D(s)),v.length>t&&v.sort(b));U.__r=0}function j(e,t,r,n,i,o,s,a,c,l,u){var d,h,p,f,m,g,_,v,y,w=0,b=n&&n.__k||I,E=b.length,T=E,S=t.length;for(r.__k=[],d=0;d<S;d++)null!=(f=r.__k[d]=null==(f=t[d])||"boolean"==typeof f||"function"==typeof f?null:"string"==typeof f||"number"==typeof f||"bigint"==typeof f?A(null,f,null,null,f):C(f)?A(N,{children:f},null,null,null):f.__b>0?A(f.type,f.props,f.key,f.ref?f.ref:null,f.__v):f)?(f.__=r,f.__b=r.__b+1,-1===(v=H(f,b,_=d+w,T))?p=k:(p=b[v]||k,b[v]=void 0,T--),J(e,f,p,i,o,s,a,c,l,u),m=f.__e,(h=f.ref)&&p.ref!=h&&(p.ref&&Y(p.ref,null,f),u.push(h,f.__c||m,f)),null!=m&&(null==g&&(g=m),(y=p===k||null===p.__v)?-1==v&&w--:v!==_&&(v===_+1?w++:v>_?T>S-_?w+=v-_:w--:w=v<_&&v==_-1?v-_:0),_=d+w,"function"!=typeof f.type||v===_&&p.__k!==f.__k?"function"==typeof f.type||v===_&&!y?void 0!==f.__d?(c=f.__d,f.__d=void 0):c=m.nextSibling:c=z(e,m,c):c=F(f,c,e),"function"==typeof r.type&&(r.__d=c))):(p=b[d])&&null==p.key&&p.__e&&(p.__e==c&&(p.__=n,c=L(p)),Q(p,p,!1),b[d]=null);for(r.__e=g,d=E;d--;)null!=b[d]&&("function"==typeof r.type&&null!=b[d].__e&&b[d].__e==r.__d&&(r.__d=b[d].__e.nextSibling),Q(b[d],b[d]))}function F(e,t,r){for(var n,i=e.__k,o=0;i&&o<i.length;o++)(n=i[o])&&(n.__=e,t="function"==typeof n.type?F(n,t,r):z(r,n.__e,t));return t}function B(e,t){return t=t||[],null==e||"boolean"==typeof e||(C(e)?e.some((function(e){B(e,t)})):t.push(e)),t}function z(e,t,r){return null==r||r.parentNode!==e?e.insertBefore(t,null):t==r&&null!=t.parentNode||e.insertBefore(t,r),t.nextSibling}function H(e,t,r,n){var i=e.key,o=e.type,s=r-1,a=r+1,c=t[r];if(null===c||c&&i==c.key&&o===c.type)return r;if(n>(null!=c?1:0))for(;s>=0||a<t.length;){if(s>=0){if((c=t[s])&&i==c.key&&o===c.type)return s;s--}if(a<t.length){if((c=t[a])&&i==c.key&&o===c.type)return a;a++}}return-1}function V(e,t,r){"-"===t[0]?e.setProperty(t,null==r?"":r):e[t]=null==r?"":"number"!=typeof r||T.test(t)?r:r+"px"}function q(e,t,r,n,i){var o;e:if("style"===t)if("string"==typeof r)e.style.cssText=r;else{if("string"==typeof n&&(e.style.cssText=n=""),n)for(t in n)r&&t in r||V(e.style,t,"");if(r)for(t in r)n&&r[t]===n[t]||V(e.style,t,r[t])}else if("o"===t[0]&&"n"===t[1])o=t!==(t=t.replace(/(PointerCapture)$|Capture$/,"$1")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=r,r?n?r.u=n.u:(r.u=Date.now(),e.addEventListener(t,o?K:W,o)):e.removeEventListener(t,o?K:W,o);else if("dangerouslySetInnerHTML"!==t){if(i)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!==t&&"height"!==t&&"href"!==t&&"list"!==t&&"form"!==t&&"tabIndex"!==t&&"download"!==t&&"rowSpan"!==t&&"colSpan"!==t&&"role"!==t&&t in e)try{e[t]=null==r?"":r;break e}catch(s){}"function"==typeof r||(null==r||!1===r&&"-"!==t[4]?e.removeAttribute(t):e.setAttribute(t,r))}}function W(e){var t=this.l[e.type+!1];if(e.t){if(e.t<=t.u)return}else e.t=Date.now();return t(g.event?g.event(e):e)}function K(e){return this.l[e.type+!0](g.event?g.event(e):e)}function J(e,t,r,n,i,o,s,a,c,l){var u,d,h,p,f,_,v,y,w,b,E,I,T,O,A,P=t.type;if(void 0!==t.constructor)return null;null!=r.__h&&(c=r.__h,a=t.__e=r.__e,t.__h=null,o=[a]),(u=g.__b)&&u(t);e:if("function"==typeof P)try{if(y=t.props,w=(u=P.contextType)&&n[u.__c],b=u?w?w.props.value:u.__:n,r.__c?v=(d=t.__c=r.__c).__=d.__E:("prototype"in P&&P.prototype.render?t.__c=d=new P(y,b):(t.__c=d=new x(y,b),d.constructor=P,d.render=X),w&&w.sub(d),d.props=y,d.state||(d.state={}),d.context=b,d.__n=n,h=d.__d=!0,d.__h=[],d._sb=[]),null==d.__s&&(d.__s=d.state),null!=P.getDerivedStateFromProps&&(d.__s==d.state&&(d.__s=S({},d.__s)),S(d.__s,P.getDerivedStateFromProps(y,d.__s))),p=d.props,f=d.state,d.__v=t,h)null==P.getDerivedStateFromProps&&null!=d.componentWillMount&&d.componentWillMount(),null!=d.componentDidMount&&d.__h.push(d.componentDidMount);else{if(null==P.getDerivedStateFromProps&&y!==p&&null!=d.componentWillReceiveProps&&d.componentWillReceiveProps(y,b),!d.__e&&(null!=d.shouldComponentUpdate&&!1===d.shouldComponentUpdate(y,d.__s,b)||t.__v===r.__v)){for(t.__v!==r.__v&&(d.props=y,d.state=d.__s,d.__d=!1),t.__e=r.__e,t.__k=r.__k,t.__k.forEach((function(e){e&&(e.__=t)})),E=0;E<d._sb.length;E++)d.__h.push(d._sb[E]);d._sb=[],d.__h.length&&s.push(d);break e}null!=d.componentWillUpdate&&d.componentWillUpdate(y,d.__s,b),null!=d.componentDidUpdate&&d.__h.push((function(){d.componentDidUpdate(p,f,_)}))}if(d.context=b,d.props=y,d.__P=e,d.__e=!1,I=g.__r,T=0,"prototype"in P&&P.prototype.render){for(d.state=d.__s,d.__d=!1,I&&I(t),u=d.render(d.props,d.state,d.context),O=0;O<d._sb.length;O++)d.__h.push(d._sb[O]);d._sb=[]}else do{d.__d=!1,I&&I(t),u=d.render(d.props,d.state,d.context),d.state=d.__s}while(d.__d&&++T<25);d.state=d.__s,null!=d.getChildContext&&(n=S(S({},n),d.getChildContext())),h||null==d.getSnapshotBeforeUpdate||(_=d.getSnapshotBeforeUpdate(p,f)),j(e,C(A=null!=u&&u.type===N&&null==u.key?u.props.children:u)?A:[A],t,r,n,i,o,s,a,c,l),d.base=t.__e,t.__h=null,d.__h.length&&s.push(d),v&&(d.__E=d.__=null)}catch(D){t.__v=null,(c||null!=o)&&(t.__e=a,t.__h=!!c,o[o.indexOf(a)]=null),g.__e(D,t,r)}else null==o&&t.__v===r.__v?(t.__k=r.__k,t.__e=r.__e):t.__e=function(e,t,r,n,i,o,s,a,c){var l,u,d,h=r.props,p=t.props,f=t.type,g=0;if("svg"===f&&(i=!0),null!=o)for(;g<o.length;g++)if((l=o[g])&&"setAttribute"in l==!!f&&(f?l.localName===f:3===l.nodeType)){e=l,o[g]=null;break}if(null==e){if(null===f)return document.createTextNode(p);e=i?document.createElementNS("http://www.w3.org/2000/svg",f):document.createElement(f,p.is&&p),o=null,a=!1}if(null===f)h===p||a&&e.data===p||(e.data=p);else{if(o=o&&m.call(e.childNodes),u=(h=r.props||k).dangerouslySetInnerHTML,d=p.dangerouslySetInnerHTML,!a){if(null!=o)for(h={},g=0;g<e.attributes.length;g++)h[e.attributes[g].name]=e.attributes[g].value;(d||u)&&(d&&(u&&d.__html==u.__html||d.__html===e.innerHTML)||(e.innerHTML=d&&d.__html||""))}if(function(e,t,r,n,i){var o;for(o in r)"children"===o||"key"===o||o in t||q(e,o,null,r[o],n);for(o in t)i&&"function"!=typeof t[o]||"children"===o||"key"===o||"value"===o||"checked"===o||r[o]===t[o]||q(e,o,t[o],r[o],n)}(e,p,h,i,a),d)t.__k=[];else if(j(e,C(g=t.props.children)?g:[g],t,r,n,i&&"foreignObject"!==f,o,s,o?o[0]:r.__k&&L(r,0),a,c),null!=o)for(g=o.length;g--;)null!=o[g]&&R(o[g]);a||("value"in p&&void 0!==(g=p.value)&&(g!==e.value||"progress"===f&&!g||"option"===f&&g!==h.value)&&q(e,"value",g,h.value,!1),"checked"in p&&void 0!==(g=p.checked)&&g!==e.checked&&q(e,"checked",g,h.checked,!1))}return e}(r.__e,t,r,n,i,o,s,c,l);(u=g.diffed)&&u(t)}function G(e,t,r){for(var n=0;n<r.length;n++)Y(r[n],r[++n],r[++n]);g.__c&&g.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(r){g.__e(r,t.__v)}}))}function Y(e,t,r){try{"function"==typeof e?e(t):e.current=t}catch(n){g.__e(n,r)}}function Q(e,t,r){var n,i;if(g.unmount&&g.unmount(e),(n=e.ref)&&(n.current&&n.current!==e.__e||Y(n,null,t)),null!=(n=e.__c)){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(o){g.__e(o,t)}n.base=n.__P=null,e.__c=void 0}if(n=e.__k)for(i=0;i<n.length;i++)n[i]&&Q(n[i],t,r||"function"!=typeof e.type);r||null==e.__e||R(e.__e),e.__=e.__e=e.__d=void 0}function X(e,t,r){return this.constructor(e,r)}function Z(e,t,r){var n,i,o,s;g.__&&g.__(e,t),i=(n="function"==typeof r)?null:r&&r.__k||t.__k,o=[],s=[],J(t,e=(!n&&r||t).__k=O(N,null,[e]),i||k,k,void 0!==t.ownerSVGElement,!n&&r?[r]:i?null:t.firstChild?m.call(t.childNodes):null,o,!n&&r?r:i?i.__e:t.firstChild,n,s),G(o,e,s)}function ee(e,t){Z(e,t,ee)}function te(e,t,r){var n,i,o,s,a=S({},e.props);for(o in e.type&&e.type.defaultProps&&(s=e.type.defaultProps),t)"key"==o?n=t[o]:"ref"==o?i=t[o]:a[o]=void 0===t[o]&&void 0!==s?s[o]:t[o];return arguments.length>2&&(a.children=arguments.length>3?m.call(arguments,2):r),A(e.type,a,n||e.key,i||e.ref,null)}function re(e,t){var r={__c:t="__cC"+E++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var r,n;return this.getChildContext||(r=[],(n={})[t]=this,this.getChildContext=function(){return n},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&r.some((function(e){e.__e=!0,M(e)}))},this.sub=function(e){r.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){r.splice(r.indexOf(e),1),t&&t.call(e)}}),e.children}};return r.Provider.__=r.Consumer.contextType=r}m=I.slice,g={__e:function(e,t,r,n){for(var i,o,s;t=t.__;)if((i=t.__c)&&!i.__)try{if((o=i.constructor)&&null!=o.getDerivedStateFromError&&(i.setState(o.getDerivedStateFromError(e)),s=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(e,n||{}),s=i.__d),s)return i.__E=i}catch(a){e=a}throw e}},_=0,x.prototype.setState=function(e,t){var r;r=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=S({},this.state),"function"==typeof e&&(e=e(S({},r),this.props)),e&&S(r,e),null!=e&&this.__v&&(t&&this._sb.push(t),M(this))},x.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),M(this))},x.prototype.render=N,v=[],w="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,b=function(e,t){return e.__v.__b-t.__v.__b},U.__r=0,E=0;var ne,ie,oe,se,ae=0,ce=[],le=[],ue=g.__b,de=g.__r,he=g.diffed,pe=g.__c,fe=g.unmount;function me(e,t){g.__h&&g.__h(ie,e,ae||t),ae=0;var r=ie.__H||(ie.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({__V:le}),r.__[e]}function ge(e){return ae=1,_e(xe,e)}function _e(e,t,r){var n=me(ne++,2);if(n.t=e,!n.__c&&(n.__=[r?r(t):xe(void 0,t),function(e){var t=n.__N?n.__N[0]:n.__[0],r=n.t(t,e);t!==r&&(n.__N=[r,n.__[1]],n.__c.setState({}))}],n.__c=ie,!ie.u)){var i=function(e,t,r){if(!n.__c.__H)return!0;var i=n.__c.__H.__.filter((function(e){return e.__c}));if(i.every((function(e){return!e.__N})))return!o||o.call(this,e,t,r);var s=!1;return i.forEach((function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(s=!0)}})),!(!s&&n.__c.props===e)&&(!o||o.call(this,e,t,r))};ie.u=!0;var o=ie.shouldComponentUpdate,s=ie.componentWillUpdate;ie.componentWillUpdate=function(e,t,r){if(this.__e){var n=o;o=void 0,i(e,t,r),o=n}s&&s.call(this,e,t,r)},ie.shouldComponentUpdate=i}return n.__N||n.__}function ve(e,t){var r=me(ne++,3);!g.__s&&Ne(r.__H,t)&&(r.__=e,r.i=t,ie.__H.__h.push(r))}function ye(e,t){var r=me(ne++,4);!g.__s&&Ne(r.__H,t)&&(r.__=e,r.i=t,ie.__h.push(r))}function we(e){return ae=5,Ee((function(){return{current:e}}),[])}function be(e,t,r){ae=6,ye((function(){return"function"==typeof e?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0}),null==r?r:r.concat(e))}function Ee(e,t){var r=me(ne++,7);return Ne(r.__H,t)?(r.__V=e(),r.i=t,r.__h=e,r.__V):r.__}function ke(e,t){return ae=8,Ee((function(){return e}),t)}function Ie(e){var t=ie.context[e.__c],r=me(ne++,9);return r.c=e,t?(null==r.__&&(r.__=!0,t.sub(ie)),t.props.value):e.__}function Te(e,t){g.useDebugValue&&g.useDebugValue(t?t(e):e)}function Ce(){var e=me(ne++,11);if(!e.__){for(var t=ie.__v;null!==t&&!t.__m&&null!==t.__;)t=t.__;var r=t.__m||(t.__m=[0,0]);e.__="P"+r[0]+"-"+r[1]++}return e.__}function Se(){for(var e;e=ce.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Ae),e.__H.__h.forEach(Pe),e.__H.__h=[]}catch(rh){e.__H.__h=[],g.__e(rh,e.__v)}}g.__b=function(e){ie=null,ue&&ue(e)},g.__r=function(e){de&&de(e),ne=0;var t=(ie=e.__c).__H;t&&(oe===ie?(t.__h=[],ie.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.__V=le,e.__N=e.i=void 0}))):(t.__h.forEach(Ae),t.__h.forEach(Pe),t.__h=[],ne=0)),oe=ie},g.diffed=function(e){he&&he(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==ce.push(t)&&se===g.requestAnimationFrame||((se=g.requestAnimationFrame)||Oe)(Se)),t.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.__V!==le&&(e.__=e.__V),e.i=void 0,e.__V=le}))),oe=ie=null},g.__c=function(e,t){t.some((function(e){try{e.__h.forEach(Ae),e.__h=e.__h.filter((function(e){return!e.__||Pe(e)}))}catch(r){t.some((function(e){e.__h&&(e.__h=[])})),t=[],g.__e(r,e.__v)}})),pe&&pe(e,t)},g.unmount=function(e){fe&&fe(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.forEach((function(e){try{Ae(e)}catch(r){t=r}})),r.__H=void 0,t&&g.__e(t,r.__v))};var Re="function"==typeof requestAnimationFrame;function Oe(e){var t,r=function(){clearTimeout(n),Re&&cancelAnimationFrame(t),setTimeout(e)},n=setTimeout(r,100);Re&&(t=requestAnimationFrame(r))}function Ae(e){var t=ie,r=e.__c;"function"==typeof r&&(e.__c=void 0,r()),ie=t}function Pe(e){var t=ie;e.__c=e.__(),ie=t}function Ne(e,t){return!e||e.length!==t.length||t.some((function(t,r){return t!==e[r]}))}function xe(e,t){return"function"==typeof t?t(e):t}class Le extends Error{}function De(e){let t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return function(e){return decodeURIComponent(atob(e).replace(/(.)/g,((e,t)=>{let r=t.charCodeAt(0).toString(16).toUpperCase();return r.length<2&&(r="0"+r),"%"+r})))}(t)}catch(r){return atob(t)}}function Me(e,t){if("string"!=typeof e)throw new Le("Invalid token specified: must be a string");t||(t={});const r=!0===t.header?0:1,n=e.split(".")[r];if("string"!=typeof n)throw new Le(`Invalid token specified: missing part #${r+1}`);let i;try{i=De(n)}catch(Md){throw new Le(`Invalid token specified: invalid base64 for part #${r+1} (${Md.message})`)}try{return JSON.parse(i)}catch(Md){throw new Le(`Invalid token specified: invalid json for part #${r+1} (${Md.message})`)}}function Ue(e,t){return function(){return e.apply(t,arguments)}}Le.prototype.name="InvalidTokenError";const{toString:je}=Object.prototype,{getPrototypeOf:Fe}=Object,Be=(ze=Object.create(null),e=>{const t=je.call(e);return ze[t]||(ze[t]=t.slice(8,-1).toLowerCase())});var ze;const He=e=>(e=e.toLowerCase(),t=>Be(t)===e),Ve=e=>t=>typeof t===e,{isArray:$e}=Array,qe=Ve("undefined");const We=He("ArrayBuffer");const Ke=Ve("string"),Je=Ve("function"),Ge=Ve("number"),Ye=e=>null!==e&&"object"==typeof e,Qe=e=>{if("object"!==Be(e))return!1;const t=Fe(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},Xe=He("Date"),Ze=He("File"),et=He("Blob"),tt=He("FileList"),rt=He("URLSearchParams");function nt(e,t,{allOwnKeys:r=!1}={}){if(null==e)return;let n,i;if("object"!=typeof e&&(e=[e]),$e(e))for(n=0,i=e.length;n<i;n++)t.call(null,e[n],n,e);else{const i=r?Object.getOwnPropertyNames(e):Object.keys(e),o=i.length;let s;for(n=0;n<o;n++)s=i[n],t.call(null,e[s],s,e)}}function it(e,t){t=t.toLowerCase();const r=Object.keys(e);let n,i=r.length;for(;i-- >0;)if(n=r[i],t===n.toLowerCase())return n;return null}const ot="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,st=e=>!qe(e)&&e!==ot;const at=(ct="undefined"!=typeof Uint8Array&&Fe(Uint8Array),e=>ct&&e instanceof ct);var ct;const lt=He("HTMLFormElement"),ut=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),dt=He("RegExp"),ht=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};nt(r,((r,i)=>{let o;!1!==(o=t(r,i,e))&&(n[i]=o||r)})),Object.defineProperties(e,n)},pt="abcdefghijklmnopqrstuvwxyz",ft="0123456789",mt={DIGIT:ft,ALPHA:pt,ALPHA_DIGIT:pt+pt.toUpperCase()+ft};const gt=He("AsyncFunction"),_t={isArray:$e,isArrayBuffer:We,isBuffer:function(e){return null!==e&&!qe(e)&&null!==e.constructor&&!qe(e.constructor)&&Je(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||Je(e.append)&&("formdata"===(t=Be(e))||"object"===t&&Je(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&We(e.buffer),t},isString:Ke,isNumber:Ge,isBoolean:e=>!0===e||!1===e,isObject:Ye,isPlainObject:Qe,isUndefined:qe,isDate:Xe,isFile:Ze,isBlob:et,isRegExp:dt,isFunction:Je,isStream:e=>Ye(e)&&Je(e.pipe),isURLSearchParams:rt,isTypedArray:at,isFileList:tt,forEach:nt,merge:function e(){const{caseless:t}=st(this)&&this||{},r={},n=(n,i)=>{const o=t&&it(r,i)||i;Qe(r[o])&&Qe(n)?r[o]=e(r[o],n):Qe(n)?r[o]=e({},n):$e(n)?r[o]=n.slice():r[o]=n};for(let i=0,o=arguments.length;i<o;i++)arguments[i]&&nt(arguments[i],n);return r},extend:(e,t,r,{allOwnKeys:n}={})=>(nt(t,((t,n)=>{r&&Je(t)?e[n]=Ue(t,r):e[n]=t}),{allOwnKeys:n}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},toFlatObject:(e,t,r,n)=>{let i,o,s;const a={};if(t=t||{},null==e)return t;do{for(i=Object.getOwnPropertyNames(e),o=i.length;o-- >0;)s=i[o],n&&!n(s,e,t)||a[s]||(t[s]=e[s],a[s]=!0);e=!1!==r&&Fe(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},kindOf:Be,kindOfTest:He,endsWith:(e,t,r)=>{e=String(e),(void 0===r||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return-1!==n&&n===r},toArray:e=>{if(!e)return null;if($e(e))return e;let t=e.length;if(!Ge(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},forEachEntry:(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let n;for(;(n=r.next())&&!n.done;){const r=n.value;t.call(e,r[0],r[1])}},matchAll:(e,t)=>{let r;const n=[];for(;null!==(r=e.exec(t));)n.push(r);return n},isHTMLForm:lt,hasOwnProperty:ut,hasOwnProp:ut,reduceDescriptors:ht,freezeMethods:e=>{ht(e,((t,r)=>{if(Je(e)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;const n=e[r];Je(n)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")}))}))},toObjectSet:(e,t)=>{const r={},n=e=>{e.forEach((e=>{r[e]=!0}))};return $e(e)?n(e):n(String(e).split(t)),r},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,r){return t.toUpperCase()+r})),noop:()=>{},toFiniteNumber:(e,t)=>(e=+e,Number.isFinite(e)?e:t),findKey:it,global:ot,isContextDefined:st,ALPHABET:mt,generateString:(e=16,t=mt.ALPHA_DIGIT)=>{let r="";const{length:n}=t;for(;e--;)r+=t[Math.random()*n|0];return r},isSpecCompliantForm:function(e){return!!(e&&Je(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),r=(e,n)=>{if(Ye(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[n]=e;const i=$e(e)?[]:{};return nt(e,((e,t)=>{const o=r(e,n+1);!qe(o)&&(i[t]=o)})),t[n]=void 0,i}}return e};return r(e,0)},isAsyncFn:gt,isThenable:e=>e&&(Ye(e)||Je(e))&&Je(e.then)&&Je(e.catch)};function vt(e,t,r,n,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),i&&(this.response=i)}_t.inherits(vt,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:_t.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const yt=vt.prototype,wt={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{wt[e]={value:e}})),Object.defineProperties(vt,wt),Object.defineProperty(yt,"isAxiosError",{value:!0}),vt.from=(e,t,r,n,i,o)=>{const s=Object.create(yt);return _t.toFlatObject(e,s,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),vt.call(s,e.message,t,r,n,i),s.cause=e,s.name=e.name,o&&Object.assign(s,o),s};function bt(e){return _t.isPlainObject(e)||_t.isArray(e)}function Et(e){return _t.endsWith(e,"[]")?e.slice(0,-2):e}function kt(e,t,r){return e?e.concat(t).map((function(e,t){return e=Et(e),!r&&t?"["+e+"]":e})).join(r?".":""):t}const It=_t.toFlatObject(_t,{},null,(function(e){return/^is[A-Z]/.test(e)}));function Tt(e,t,r){if(!_t.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const n=(r=_t.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!_t.isUndefined(t[e])}))).metaTokens,i=r.visitor||l,o=r.dots,s=r.indexes,a=(r.Blob||"undefined"!=typeof Blob&&Blob)&&_t.isSpecCompliantForm(t);if(!_t.isFunction(i))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(_t.isDate(e))return e.toISOString();if(!a&&_t.isBlob(e))throw new vt("Blob is not supported. Use a Buffer instead.");return _t.isArrayBuffer(e)||_t.isTypedArray(e)?a&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function l(e,r,i){let a=e;if(e&&!i&&"object"==typeof e)if(_t.endsWith(r,"{}"))r=n?r:r.slice(0,-2),e=JSON.stringify(e);else if(_t.isArray(e)&&function(e){return _t.isArray(e)&&!e.some(bt)}(e)||(_t.isFileList(e)||_t.endsWith(r,"[]"))&&(a=_t.toArray(e)))return r=Et(r),a.forEach((function(e,n){!_t.isUndefined(e)&&null!==e&&t.append(!0===s?kt([r],n,o):null===s?r:r+"[]",c(e))})),!1;return!!bt(e)||(t.append(kt(i,r,o),c(e)),!1)}const u=[],d=Object.assign(It,{defaultVisitor:l,convertValue:c,isVisitable:bt});if(!_t.isObject(e))throw new TypeError("data must be an object");return function e(r,n){if(!_t.isUndefined(r)){if(-1!==u.indexOf(r))throw Error("Circular reference detected in "+n.join("."));u.push(r),_t.forEach(r,(function(r,o){!0===(!(_t.isUndefined(r)||null===r)&&i.call(t,r,_t.isString(o)?o.trim():o,n,d))&&e(r,n?n.concat(o):[o])})),u.pop()}}(e),t}function Ct(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function St(e,t){this._pairs=[],e&&Tt(e,this,t)}const Rt=St.prototype;function Ot(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function At(e,t,r){if(!t)return e;const n=r&&r.encode||Ot,i=r&&r.serialize;let o;if(o=i?i(t,r):_t.isURLSearchParams(t)?t.toString():new St(t,r).toString(n),o){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}Rt.append=function(e,t){this._pairs.push([e,t])},Rt.toString=function(e){const t=e?function(t){return e.call(this,t,Ct)}:Ct;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};const Pt=class{constructor(){this.handlers=[]}use(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){_t.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},Nt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},xt={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:St,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},isStandardBrowserEnv:(()=>{let e;return("undefined"==typeof navigator||"ReactNative"!==(e=navigator.product)&&"NativeScript"!==e&&"NS"!==e)&&("undefined"!=typeof window&&"undefined"!=typeof document)})(),isStandardBrowserWebWorkerEnv:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,protocols:["http","https","file","blob","url","data"]};function Lt(e){function t(e,r,n,i){let o=e[i++];const s=Number.isFinite(+o),a=i>=e.length;if(o=!o&&_t.isArray(n)?n.length:o,a)return _t.hasOwnProp(n,o)?n[o]=[n[o],r]:n[o]=r,!s;n[o]&&_t.isObject(n[o])||(n[o]=[]);return t(e,r,n[o],i)&&_t.isArray(n[o])&&(n[o]=function(e){const t={},r=Object.keys(e);let n;const i=r.length;let o;for(n=0;n<i;n++)o=r[n],t[o]=e[o];return t}(n[o])),!s}if(_t.isFormData(e)&&_t.isFunction(e.entries)){const r={};return _t.forEachEntry(e,((e,n)=>{t(function(e){return _t.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),n,r,0)})),r}return null}const Dt={transitional:Nt,adapter:["xhr","http"],transformRequest:[function(e,t){const r=t.getContentType()||"",n=r.indexOf("application/json")>-1,i=_t.isObject(e);i&&_t.isHTMLForm(e)&&(e=new FormData(e));if(_t.isFormData(e))return n&&n?JSON.stringify(Lt(e)):e;if(_t.isArrayBuffer(e)||_t.isBuffer(e)||_t.isStream(e)||_t.isFile(e)||_t.isBlob(e))return e;if(_t.isArrayBufferView(e))return e.buffer;if(_t.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let o;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return Tt(e,new xt.classes.URLSearchParams,Object.assign({visitor:function(e,t,r,n){return xt.isNode&&_t.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((o=_t.isFileList(e))||r.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return Tt(o?{"files[]":e}:e,t&&new t,this.formSerializer)}}return i||n?(t.setContentType("application/json",!1),function(e,t,r){if(_t.isString(e))try{return(t||JSON.parse)(e),_t.trim(e)}catch(Md){if("SyntaxError"!==Md.name)throw Md}return(r||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||Dt.transitional,r=t&&t.forcedJSONParsing,n="json"===this.responseType;if(e&&_t.isString(e)&&(r&&!this.responseType||n)){const r=!(t&&t.silentJSONParsing)&&n;try{return JSON.parse(e)}catch(Md){if(r){if("SyntaxError"===Md.name)throw vt.from(Md,vt.ERR_BAD_RESPONSE,this,null,this.response);throw Md}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:xt.classes.FormData,Blob:xt.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};_t.forEach(["delete","get","head","post","put","patch"],(e=>{Dt.headers[e]={}}));const Mt=Dt,Ut=_t.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),jt=Symbol("internals");function Ft(e){return e&&String(e).trim().toLowerCase()}function Bt(e){return!1===e||null==e?e:_t.isArray(e)?e.map(Bt):String(e)}function zt(e,t,r,n,i){return _t.isFunction(n)?n.call(this,t,r):(i&&(t=r),_t.isString(t)?_t.isString(n)?-1!==t.indexOf(n):_t.isRegExp(n)?n.test(t):void 0:void 0)}class Ht{constructor(e){e&&this.set(e)}set(e,t,r){const n=this;function i(e,t,r){const i=Ft(t);if(!i)throw new Error("header name must be a non-empty string");const o=_t.findKey(n,i);(!o||void 0===n[o]||!0===r||void 0===r&&!1!==n[o])&&(n[o||t]=Bt(e))}const o=(e,t)=>_t.forEach(e,((e,r)=>i(e,r,t)));return _t.isPlainObject(e)||e instanceof this.constructor?o(e,t):_t.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim())?o((e=>{const t={};let r,n,i;return e&&e.split("\n").forEach((function(e){i=e.indexOf(":"),r=e.substring(0,i).trim().toLowerCase(),n=e.substring(i+1).trim(),!r||t[r]&&Ut[r]||("set-cookie"===r?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)})),t})(e),t):null!=e&&i(t,e,r),this}get(e,t){if(e=Ft(e)){const r=_t.findKey(this,e);if(r){const e=this[r];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}(e);if(_t.isFunction(t))return t.call(this,e,r);if(_t.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Ft(e)){const r=_t.findKey(this,e);return!(!r||void 0===this[r]||t&&!zt(0,this[r],r,t))}return!1}delete(e,t){const r=this;let n=!1;function i(e){if(e=Ft(e)){const i=_t.findKey(r,e);!i||t&&!zt(0,r[i],i,t)||(delete r[i],n=!0)}}return _t.isArray(e)?e.forEach(i):i(e),n}clear(e){const t=Object.keys(this);let r=t.length,n=!1;for(;r--;){const i=t[r];e&&!zt(0,this[i],i,e,!0)||(delete this[i],n=!0)}return n}normalize(e){const t=this,r={};return _t.forEach(this,((n,i)=>{const o=_t.findKey(r,i);if(o)return t[o]=Bt(n),void delete t[i];const s=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,r)=>t.toUpperCase()+r))}(i):String(i).trim();s!==i&&delete t[i],t[s]=Bt(n),r[s]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return _t.forEach(this,((r,n)=>{null!=r&&!1!==r&&(t[n]=e&&_t.isArray(r)?r.join(", "):r)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const r=new this(e);return t.forEach((e=>r.set(e))),r}static accessor(e){const t=(this[jt]=this[jt]={accessors:{}}).accessors,r=this.prototype;function n(e){const n=Ft(e);t[n]||(!function(e,t){const r=_t.toCamelCase(" "+t);["get","set","has"].forEach((n=>{Object.defineProperty(e,n+r,{value:function(e,r,i){return this[n].call(this,t,e,r,i)},configurable:!0})}))}(r,e),t[n]=!0)}return _t.isArray(e)?e.forEach(n):n(e),this}}Ht.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),_t.reduceDescriptors(Ht.prototype,(({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[r]=e}}})),_t.freezeMethods(Ht);const Vt=Ht;function $t(e,t){const r=this||Mt,n=t||r,i=Vt.from(n.headers);let o=n.data;return _t.forEach(e,(function(e){o=e.call(r,o,i.normalize(),t?t.status:void 0)})),i.normalize(),o}function qt(e){return!(!e||!e.__CANCEL__)}function Wt(e,t,r){vt.call(this,null==e?"canceled":e,vt.ERR_CANCELED,t,r),this.name="CanceledError"}_t.inherits(Wt,vt,{__CANCEL__:!0});const Kt=xt.isStandardBrowserEnv?{write:function(e,t,r,n,i,o){const s=[];s.push(e+"="+encodeURIComponent(t)),_t.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),_t.isString(n)&&s.push("path="+n),_t.isString(i)&&s.push("domain="+i),!0===o&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}};function Jt(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const Gt=xt.isStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let r;function n(r){let n=r;return e&&(t.setAttribute("href",n),n=t.href),t.setAttribute("href",n),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return r=n(window.location.href),function(e){const t=_t.isString(e)?n(e):e;return t.protocol===r.protocol&&t.host===r.host}}():function(){return!0};function Yt(e,t){let r=0;const n=function(e,t){e=e||10;const r=new Array(e),n=new Array(e);let i,o=0,s=0;return t=void 0!==t?t:1e3,function(a){const c=Date.now(),l=n[s];i||(i=c),r[o]=a,n[o]=c;let u=s,d=0;for(;u!==o;)d+=r[u++],u%=e;if(o=(o+1)%e,o===s&&(s=(s+1)%e),c-i<t)return;const h=l&&c-l;return h?Math.round(1e3*d/h):void 0}}(50,250);return i=>{const o=i.loaded,s=i.lengthComputable?i.total:void 0,a=o-r,c=n(a);r=o;const l={loaded:o,total:s,progress:s?o/s:void 0,bytes:a,rate:c||void 0,estimated:c&&s&&o<=s?(s-o)/c:void 0,event:i};l[t?"download":"upload"]=!0,e(l)}}const Qt={http:null,xhr:"undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,r){let n=e.data;const i=Vt.from(e.headers).normalize(),o=e.responseType;let s,a;function c(){e.cancelToken&&e.cancelToken.unsubscribe(s),e.signal&&e.signal.removeEventListener("abort",s)}_t.isFormData(n)&&(xt.isStandardBrowserEnv||xt.isStandardBrowserWebWorkerEnv?i.setContentType(!1):i.getContentType(/^\s*multipart\/form-data/)?_t.isString(a=i.getContentType())&&i.setContentType(a.replace(/^\s*(multipart\/form-data);+/,"$1")):i.setContentType("multipart/form-data"));let l=new XMLHttpRequest;if(e.auth){const t=e.auth.username||"",r=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";i.set("Authorization","Basic "+btoa(t+":"+r))}const u=Jt(e.baseURL,e.url);function d(){if(!l)return;const n=Vt.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders());!function(e,t,r){const n=r.config.validateStatus;r.status&&n&&!n(r.status)?t(new vt("Request failed with status code "+r.status,[vt.ERR_BAD_REQUEST,vt.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):e(r)}((function(e){t(e),c()}),(function(e){r(e),c()}),{data:o&&"text"!==o&&"json"!==o?l.response:l.responseText,status:l.status,statusText:l.statusText,headers:n,config:e,request:l}),l=null}if(l.open(e.method.toUpperCase(),At(u,e.params,e.paramsSerializer),!0),l.timeout=e.timeout,"onloadend"in l?l.onloadend=d:l.onreadystatechange=function(){l&&4===l.readyState&&(0!==l.status||l.responseURL&&0===l.responseURL.indexOf("file:"))&&setTimeout(d)},l.onabort=function(){l&&(r(new vt("Request aborted",vt.ECONNABORTED,e,l)),l=null)},l.onerror=function(){r(new vt("Network Error",vt.ERR_NETWORK,e,l)),l=null},l.ontimeout=function(){let t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const n=e.transitional||Nt;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),r(new vt(t,n.clarifyTimeoutError?vt.ETIMEDOUT:vt.ECONNABORTED,e,l)),l=null},xt.isStandardBrowserEnv){const t=Gt(u)&&e.xsrfCookieName&&Kt.read(e.xsrfCookieName);t&&i.set(e.xsrfHeaderName,t)}void 0===n&&i.setContentType(null),"setRequestHeader"in l&&_t.forEach(i.toJSON(),(function(e,t){l.setRequestHeader(t,e)})),_t.isUndefined(e.withCredentials)||(l.withCredentials=!!e.withCredentials),o&&"json"!==o&&(l.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&l.addEventListener("progress",Yt(e.onDownloadProgress,!0)),"function"==typeof e.onUploadProgress&&l.upload&&l.upload.addEventListener("progress",Yt(e.onUploadProgress)),(e.cancelToken||e.signal)&&(s=t=>{l&&(r(!t||t.type?new Wt(null,e,l):t),l.abort(),l=null)},e.cancelToken&&e.cancelToken.subscribe(s),e.signal&&(e.signal.aborted?s():e.signal.addEventListener("abort",s)));const h=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(u);h&&-1===xt.protocols.indexOf(h)?r(new vt("Unsupported protocol "+h+":",vt.ERR_BAD_REQUEST,e)):l.send(n||null)}))}};_t.forEach(Qt,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(Md){}Object.defineProperty(e,"adapterName",{value:t})}}));const Xt=e=>`- ${e}`,Zt=e=>_t.isFunction(e)||null===e||!1===e,er=e=>{e=_t.isArray(e)?e:[e];const{length:t}=e;let r,n;const i={};for(let o=0;o<t;o++){let t;if(r=e[o],n=r,!Zt(r)&&(n=Qt[(t=String(r)).toLowerCase()],void 0===n))throw new vt(`Unknown adapter '${t}'`);if(n)break;i[t||"#"+o]=n}if(!n){const e=Object.entries(i).map((([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));throw new vt("There is no suitable adapter to dispatch the request "+(t?e.length>1?"since :\n"+e.map(Xt).join("\n"):" "+Xt(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return n};function tr(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Wt(null,e)}function rr(e){tr(e),e.headers=Vt.from(e.headers),e.data=$t.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return er(e.adapter||Mt.adapter)(e).then((function(t){return tr(e),t.data=$t.call(e,e.transformResponse,t),t.headers=Vt.from(t.headers),t}),(function(t){return qt(t)||(tr(e),t&&t.response&&(t.response.data=$t.call(e,e.transformResponse,t.response),t.response.headers=Vt.from(t.response.headers))),Promise.reject(t)}))}const nr=e=>e instanceof Vt?e.toJSON():e;function ir(e,t){t=t||{};const r={};function n(e,t,r){return _t.isPlainObject(e)&&_t.isPlainObject(t)?_t.merge.call({caseless:r},e,t):_t.isPlainObject(t)?_t.merge({},t):_t.isArray(t)?t.slice():t}function i(e,t,r){return _t.isUndefined(t)?_t.isUndefined(e)?void 0:n(void 0,e,r):n(e,t,r)}function o(e,t){if(!_t.isUndefined(t))return n(void 0,t)}function s(e,t){return _t.isUndefined(t)?_t.isUndefined(e)?void 0:n(void 0,e):n(void 0,t)}function a(r,i,o){return o in t?n(r,i):o in e?n(void 0,r):void 0}const c={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(e,t)=>i(nr(e),nr(t),!0)};return _t.forEach(Object.keys(Object.assign({},e,t)),(function(n){const o=c[n]||i,s=o(e[n],t[n],n);_t.isUndefined(s)&&o!==a||(r[n]=s)})),r}const or="1.6.0",sr={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{sr[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));const ar={};sr.transitional=function(e,t,r){function n(e,t){return"[Axios v1.6.0] Transitional option '"+e+"'"+t+(r?". "+r:"")}return(r,i,o)=>{if(!1===e)throw new vt(n(i," has been removed"+(t?" in "+t:"")),vt.ERR_DEPRECATED);return t&&!ar[i]&&(ar[i]=!0,console.warn(n(i," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,i,o)}};const cr={assertOptions:function(e,t,r){if("object"!=typeof e)throw new vt("options must be an object",vt.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let i=n.length;for(;i-- >0;){const o=n[i],s=t[o];if(s){const t=e[o],r=void 0===t||s(t,o,e);if(!0!==r)throw new vt("option "+o+" must be "+r,vt.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new vt("Unknown option "+o,vt.ERR_BAD_OPTION)}},validators:sr},lr=cr.validators;class ur{constructor(e){this.defaults=e,this.interceptors={request:new Pt,response:new Pt}}request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=ir(this.defaults,t);const{transitional:r,paramsSerializer:n,headers:i}=t;void 0!==r&&cr.assertOptions(r,{silentJSONParsing:lr.transitional(lr.boolean),forcedJSONParsing:lr.transitional(lr.boolean),clarifyTimeoutError:lr.transitional(lr.boolean)},!1),null!=n&&(_t.isFunction(n)?t.paramsSerializer={serialize:n}:cr.assertOptions(n,{encode:lr.function,serialize:lr.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let o=i&&_t.merge(i.common,i[t.method]);i&&_t.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete i[e]})),t.headers=Vt.concat(o,i);const s=[];let a=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,s.unshift(e.fulfilled,e.rejected))}));const c=[];let l;this.interceptors.response.forEach((function(e){c.push(e.fulfilled,e.rejected)}));let u,d=0;if(!a){const e=[rr.bind(this),void 0];for(e.unshift.apply(e,s),e.push.apply(e,c),u=e.length,l=Promise.resolve(t);d<u;)l=l.then(e[d++],e[d++]);return l}u=s.length;let h=t;for(d=0;d<u;){const e=s[d++],t=s[d++];try{h=e(h)}catch(p){t.call(this,p);break}}try{l=rr.call(this,h)}catch(p){return Promise.reject(p)}for(d=0,u=c.length;d<u;)l=l.then(c[d++],c[d++]);return l}getUri(e){return At(Jt((e=ir(this.defaults,e)).baseURL,e.url),e.params,e.paramsSerializer)}}_t.forEach(["delete","get","head","options"],(function(e){ur.prototype[e]=function(t,r){return this.request(ir(r||{},{method:e,url:t,data:(r||{}).data}))}})),_t.forEach(["post","put","patch"],(function(e){function t(t){return function(r,n,i){return this.request(ir(i||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}ur.prototype[e]=t(),ur.prototype[e+"Form"]=t(!0)}));const dr=ur;class hr{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise((function(e){t=e}));const r=this;this.promise.then((e=>{if(!r._listeners)return;let t=r._listeners.length;for(;t-- >0;)r._listeners[t](e);r._listeners=null})),this.promise.then=e=>{let t;const n=new Promise((e=>{r.subscribe(e),t=e})).then(e);return n.cancel=function(){r.unsubscribe(t)},n},e((function(e,n,i){r.reason||(r.reason=new Wt(e,n,i),t(r.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}static source(){let e;return{token:new hr((function(t){e=t})),cancel:e}}}const pr=hr;const fr={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(fr).forEach((([e,t])=>{fr[t]=e}));const mr=fr;const gr=function e(t){const r=new dr(t),n=Ue(dr.prototype.request,r);return _t.extend(n,dr.prototype,r,{allOwnKeys:!0}),_t.extend(n,r,null,{allOwnKeys:!0}),n.create=function(r){return e(ir(t,r))},n}(Mt);gr.Axios=dr,gr.CanceledError=Wt,gr.CancelToken=pr,gr.isCancel=qt,gr.VERSION=or,gr.toFormData=Tt,gr.AxiosError=vt,gr.Cancel=gr.CanceledError,gr.all=function(e){return Promise.all(e)},gr.spread=function(e){return function(t){return e.apply(null,t)}},gr.isAxiosError=function(e){return _t.isObject(e)&&!0===e.isAxiosError},gr.mergeConfig=ir,gr.AxiosHeaders=Vt,gr.formToJSON=e=>Lt(_t.isHTMLForm(e)?new FormData(e):e),gr.getAdapter=er,gr.HttpStatusCode=mr,gr.default=gr;const _r=gr,vr=(e,t,r)=>{ve((()=>{const t=_r.CancelToken.source();return e(t),()=>{r&&r(),t.cancel()}}),t)},yr=({request:e})=>console.error("[API] Request error:",e),wr=({response:e})=>{if(e){const{status:t,request:r,data:n}=e;console.error("[API] Response error:",t,r.responseURL,JSON.stringify(n))}};let br;const Er=(e,t)=>({headers:{Authorization:`Bearer ${e}`},cancelToken:t.token}),kr=async(e,t)=>{if(!br)throw new Error("Api has not been initialized");return br.post("customer-profile/backend/v1.0/workplace-link",{},Er(e,t)).then((e=>204==e.status?{isEstablished:!0}:{isEstablished:!1,linkRequest:null==e?void 0:e.data}))},Ir=(e,t,r,n)=>{if(!br)throw new Error("Api has not been initialized");const i={linkRequestId:t,profileId:r};return br.post("customer-profile/customer-backend/v1.0/workplace-link",i,Er(e,n))};for(var Tr="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},Cr={},Sr={},Rr={byteLength:function(e){var t=Lr(e),r=t[0],n=t[1];return 3*(r+n)/4-n},toByteArray:function(e){var t,r,n=Lr(e),i=n[0],o=n[1],s=new Pr(function(e,t,r){return 3*(t+r)/4-r}(0,i,o)),a=0,c=o>0?i-4:i;for(r=0;r<c;r+=4)t=Ar[e.charCodeAt(r)]<<18|Ar[e.charCodeAt(r+1)]<<12|Ar[e.charCodeAt(r+2)]<<6|Ar[e.charCodeAt(r+3)],s[a++]=t>>16&255,s[a++]=t>>8&255,s[a++]=255&t;2===o&&(t=Ar[e.charCodeAt(r)]<<2|Ar[e.charCodeAt(r+1)]>>4,s[a++]=255&t);1===o&&(t=Ar[e.charCodeAt(r)]<<10|Ar[e.charCodeAt(r+1)]<<4|Ar[e.charCodeAt(r+2)]>>2,s[a++]=t>>8&255,s[a++]=255&t);return s},fromByteArray:function(e){for(var t,r=e.length,n=r%3,i=[],o=16383,s=0,a=r-n;s<a;s+=o)i.push(Dr(e,s,s+o>a?a:s+o));1===n?(t=e[r-1],i.push(Or[t>>2]+Or[t<<4&63]+"==")):2===n&&(t=(e[r-2]<<8)+e[r-1],i.push(Or[t>>10]+Or[t>>4&63]+Or[t<<2&63]+"="));return i.join("")}},Or=[],Ar=[],Pr="undefined"!=typeof Uint8Array?Uint8Array:Array,Nr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",xr=0;xr<64;++xr)Or[xr]=Nr[xr],Ar[Nr.charCodeAt(xr)]=xr;function Lr(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function Dr(e,t,r){for(var n,i,o=[],s=t;s<r;s+=3)n=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),o.push(Or[(i=n)>>18&63]+Or[i>>12&63]+Or[i>>6&63]+Or[63&i]);return o.join("")}Ar["-".charCodeAt(0)]=62,Ar["_".charCodeAt(0)]=63;var Mr={};Object.defineProperty(Mr,"__esModule",{value:!0}),Mr.AppAuthError=void 0;var Ur=function(e,t){this.message=e,this.extras=t};Mr.AppAuthError=Ur,Object.defineProperty(Sr,"__esModule",{value:!0});var jr=Sr.DefaultCrypto=Sr.textEncodeLite=Sr.urlSafe=Sr.bufferToString=void 0,Fr=Rr,Br=Mr,zr="undefined"!=typeof window&&!!window.crypto,Hr=zr&&!!window.crypto.subtle,Vr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";function $r(e){for(var t=[],r=0;r<e.byteLength;r+=1){var n=e[r]%62;t.push(Vr[n])}return t.join("")}function qr(e){return Fr.fromByteArray(new Uint8Array(e)).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function Wr(e){for(var t=new ArrayBuffer(e.length),r=new Uint8Array(t),n=0;n<e.length;n++)r[n]=e.charCodeAt(n);return r}Sr.bufferToString=$r,Sr.urlSafe=qr,Sr.textEncodeLite=Wr;var Kr=function(){function e(){}return e.prototype.generateRandom=function(e){var t=new Uint8Array(e);if(zr)window.crypto.getRandomValues(t);else for(var r=0;r<e;r+=1)t[r]=62*Math.random()|0;return $r(t)},e.prototype.deriveChallenge=function(e){return e.length<43||e.length>128?Promise.reject(new Br.AppAuthError("Invalid code length.")):Hr?new Promise((function(t,r){crypto.subtle.digest("SHA-256",Wr(e)).then((function(e){return t(qr(new Uint8Array(e)))}),(function(e){return r(e)}))})):Promise.reject(new Br.AppAuthError("window.crypto.subtle is unavailable."))},e}();jr=Sr.DefaultCrypto=Kr;var Jr={},Gr={};Object.defineProperty(Gr,"__esModule",{value:!0}),Gr.IS_PROFILE=Gr.IS_LOG=void 0,Gr.IS_LOG=!0,Gr.IS_PROFILE=!1;var Yr=Tr&&Tr.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(Jr,"__esModule",{value:!0}),Jr.profile=Jr.log=void 0;var Qr=Gr;function Xr(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];Qr.IS_LOG&&((t?t.length:0)>0?console.log.apply(console,Yr([e],t)):console.log(e))}Jr.log=Xr;var Zr="undefined"!=typeof window&&!!window.performance&&!!console.profile;Jr.profile=function(e,t,r){return Qr.IS_PROFILE?function(e,t,r){var n=r.value,i=n.name;i||(i="anonymous function");r.value=Zr?function(e){console.profile(i);var t=window.performance.now(),r=n.call.apply(n,Yr([this||window],e)),o=window.performance.now()-t;return console.log(i+" took "+o+" ms"),console.profileEnd(),r}:function(e){Xr("Profile start "+i);var t=Date.now(),r=n.call.apply(n,Yr([this||window],e)),o=Date.now()-t;return Xr("Profile end "+i+" took "+o+" ms."),r};return r}(0,0,r):r},Object.defineProperty(Cr,"__esModule",{value:!0});var en=Cr.AuthorizationRequest=void 0,tn=Sr,rn=Jr,nn=function(){function e(t,r,n){void 0===r&&(r=new tn.DefaultCrypto),void 0===n&&(n=!0),this.crypto=r,this.usePkce=n,this.clientId=t.client_id,this.redirectUri=t.redirect_uri,this.scope=t.scope,this.responseType=t.response_type||e.RESPONSE_TYPE_CODE,this.state=t.state||function(e){return e.generateRandom(10)}(r),this.extras=t.extras,this.internal=t.internal}return e.prototype.setupCodeVerifier=function(){var e=this;if(this.usePkce){var t=this.crypto.generateRandom(128);return this.crypto.deriveChallenge(t).catch((function(e){rn.log("Unable to generate PKCE challenge. Not using PKCE",e)})).then((function(r){r&&(e.internal=e.internal||{},e.internal.code_verifier=t,e.extras=e.extras||{},e.extras.code_challenge=r,e.extras.code_challenge_method="S256")}))}return Promise.resolve()},e.prototype.toJson=function(){var e=this;return this.setupCodeVerifier().then((function(){return{response_type:e.responseType,client_id:e.clientId,redirect_uri:e.redirectUri,scope:e.scope,state:e.state,extras:e.extras,internal:e.internal}}))},e.RESPONSE_TYPE_TOKEN="token",e.RESPONSE_TYPE_CODE="code",e}();en=Cr.AuthorizationRequest=nn;var on={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.AuthorizationRequestHandler=e.BUILT_IN_PARAMETERS=e.AuthorizationNotifier=void 0;var t=Jr,r=function(){function e(){this.listener=null}return e.prototype.setAuthorizationListener=function(e){this.listener=e},e.prototype.onAuthorizationComplete=function(e,t,r){this.listener&&this.listener(e,t,r)},e}();e.AuthorizationNotifier=r,e.BUILT_IN_PARAMETERS=["redirect_uri","client_id","response_type","state","scope"];var n=function(){function r(e,t){this.utils=e,this.crypto=t,this.notifier=null}return r.prototype.buildRequestUrl=function(t,r){var n={redirect_uri:r.redirectUri,client_id:r.clientId,response_type:r.responseType,state:r.state,scope:r.scope};if(r.extras)for(var i in r.extras)r.extras.hasOwnProperty(i)&&e.BUILT_IN_PARAMETERS.indexOf(i)<0&&(n[i]=r.extras[i]);var o=this.utils.stringify(n);return t.authorizationEndpoint+"?"+o},r.prototype.completeAuthorizationRequestIfPossible=function(){var e=this;return t.log("Checking to see if there is an authorization response to be delivered."),this.notifier||t.log("Notifier is not present on AuthorizationRequest handler.\n No delivery of result will be possible"),this.completeAuthorizationRequest().then((function(r){r||t.log("No result is available yet."),r&&e.notifier&&e.notifier.onAuthorizationComplete(r.request,r.response,r.error)}))},r.prototype.setAuthorizationNotifier=function(e){return this.notifier=e,this},r}();e.AuthorizationRequestHandler=n}(on);var sn={},an={};Object.defineProperty(an,"__esModule",{value:!0}),an.AuthorizationError=an.AuthorizationResponse=void 0;var cn=function(){function e(e){this.code=e.code,this.state=e.state}return e.prototype.toJson=function(){return{code:this.code,state:this.state}},e}();an.AuthorizationResponse=cn;var ln=function(){function e(e){this.error=e.error,this.errorDescription=e.error_description,this.errorUri=e.error_uri,this.state=e.state}return e.prototype.toJson=function(){return{error:this.error,error_description:this.errorDescription,error_uri:this.errorUri,state:this.state}},e}();an.AuthorizationError=ln;var un={};Object.defineProperty(un,"__esModule",{value:!0}),un.BasicQueryStringUtils=void 0;var dn=function(){function e(){}return e.prototype.parse=function(e,t){return t?this.parseQueryString(e.hash):this.parseQueryString(e.search)},e.prototype.parseQueryString=function(e){for(var t={},r=(e=e.trim().replace(/^(\?|#|&)/,"")).split("&"),n=0;n<r.length;n+=1){var i=r[n].split("=");if(i.length>=2){var o=decodeURIComponent(i.shift()),s=i.length>0?i.join("="):null;s&&(t[o]=decodeURIComponent(s))}}return t},e.prototype.stringify=function(e){var t=[];for(var r in e)e.hasOwnProperty(r)&&e[r]&&t.push(encodeURIComponent(r)+"="+encodeURIComponent(e[r]));return t.join("&")},e}();un.BasicQueryStringUtils=dn;var hn,pn={},fn=Tr&&Tr.__extends||(hn=function(e,t){return(hn=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}hn(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(pn,"__esModule",{value:!0}),pn.LocalStorageBackend=pn.StorageBackend=void 0;var mn=function(){};pn.StorageBackend=mn;var gn=function(e){function t(t){var r=e.call(this)||this;return r.storage=t||window.localStorage,r}return fn(t,e),t.prototype.getItem=function(e){var t=this;return new Promise((function(r,n){var i=t.storage.getItem(e);r(i||null)}))},t.prototype.removeItem=function(e){var t=this;return new Promise((function(r,n){t.storage.removeItem(e),r()}))},t.prototype.clear=function(){var e=this;return new Promise((function(t,r){e.storage.clear(),t()}))},t.prototype.setItem=function(e,t){var r=this;return new Promise((function(n,i){r.storage.setItem(e,t),n()}))},t}(mn);pn.LocalStorageBackend=gn;var _n=Tr&&Tr.__extends||function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(sn,"__esModule",{value:!0});var vn=sn.RedirectRequestHandler=void 0,yn=Cr,wn=an,bn=Sr,En=Jr,kn=un,In=pn,Tn=function(e){return e+"_appauth_authorization_request"},Cn=function(e){return e+"_appauth_authorization_service_configuration"},Sn="appauth_current_authorization_request",Rn=function(e){function t(t,r,n,i){void 0===t&&(t=new In.LocalStorageBackend),void 0===r&&(r=new kn.BasicQueryStringUtils),void 0===n&&(n=window.location),void 0===i&&(i=new bn.DefaultCrypto);var o=e.call(this,r,i)||this;return o.storageBackend=t,o.locationLike=n,o}return _n(t,e),t.prototype.performAuthorizationRequest=function(e,t){var r=this,n=this.crypto.generateRandom(10);Promise.all([this.storageBackend.setItem(Sn,n),t.toJson().then((function(e){return r.storageBackend.setItem(Tn(n),JSON.stringify(e))})),this.storageBackend.setItem(Cn(n),JSON.stringify(e.toJson()))]).then((function(){var n=r.buildRequestUrl(e,t);En.log("Making a request to ",t,n),r.locationLike.assign(n)}))},t.prototype.completeAuthorizationRequest=function(){var e=this;return this.storageBackend.getItem(Sn).then((function(t){return t?e.storageBackend.getItem(Tn(t)).then((function(e){return JSON.parse(e)})).then((function(e){return new yn.AuthorizationRequest(e)})).then((function(r){var n=""+e.locationLike.origin+e.locationLike.pathname,i=e.utils.parse(e.locationLike,!0),o=i.state,s=i.code,a=i.error;En.log("Potential authorization request ",n,i,o,s,a);var c=o===r.state,l=null,u=null;if(c){if(a){var d=i.error_uri,h=i.error_description;u=new wn.AuthorizationError({error:a,error_description:h,error_uri:d,state:o})}else l=new wn.AuthorizationResponse({code:s,state:o});return Promise.all([e.storageBackend.removeItem(Sn),e.storageBackend.removeItem(Tn(t)),e.storageBackend.removeItem(Cn(t))]).then((function(){return En.log("Delivering authorization response"),{request:r,response:l,error:u}}))}return En.log("Mismatched request (state and request_uri) dont match."),Promise.resolve(null)})):null}))},t}(on.AuthorizationRequestHandler);vn=sn.RedirectRequestHandler=Rn;var On={},An={},Pn=Tr&&Tr.__extends||function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(An,"__esModule",{value:!0}),An.TestRequestor=Mn=An.FetchRequestor=An.JQueryRequestor=An.Requestor=void 0;var Nn=Mr,xn=function(){};An.Requestor=xn;var Ln=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Pn(t,e),t.prototype.xhr=function(e){var t=$.ajax(e);return new Promise((function(e,r){t.then((function(t,r,n){e(t)}),(function(e,t,n){r(new Nn.AppAuthError(n))}))}))},t}(xn);An.JQueryRequestor=Ln;var Dn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Pn(t,e),t.prototype.xhr=function(e){if(!e.url)return Promise.reject(new Nn.AppAuthError("A URL must be provided."));var t=new URL(e.url),r={};(r.method=e.method,r.mode="cors",e.data)&&(e.method&&"POST"===e.method.toUpperCase()?r.body=e.data:new URLSearchParams(e.data).forEach((function(e,r){t.searchParams.append(r,e)})));if(r.headers={},e.headers)for(var n in e.headers)e.headers.hasOwnProperty(n)&&(r.headers[n]=e.headers[n]);var i=e.dataType&&"json"===e.dataType.toLowerCase();return i&&(r.headers.Accept="application/json, text/javascript, */*; q=0.01"),fetch(t.toString(),r).then((function(e){if(e.status>=200&&e.status<300){var t=e.headers.get("content-type");return i||t&&-1!==t.indexOf("application/json")?e.json():e.text()}return Promise.reject(new Nn.AppAuthError(e.status.toString(),e.statusText))}))},t}(xn),Mn=An.FetchRequestor=Dn,Un=function(e){function t(t){var r=e.call(this)||this;return r.promise=t,r}return Pn(t,e),t.prototype.xhr=function(e){return this.promise},t}(xn);An.TestRequestor=Un,Object.defineProperty(On,"__esModule",{value:!0});var jn=On.AuthorizationServiceConfiguration=void 0,Fn=An,Bn=function(){function e(e){this.authorizationEndpoint=e.authorization_endpoint,this.tokenEndpoint=e.token_endpoint,this.revocationEndpoint=e.revocation_endpoint,this.userInfoEndpoint=e.userinfo_endpoint,this.endSessionEndpoint=e.end_session_endpoint}return e.prototype.toJson=function(){return{authorization_endpoint:this.authorizationEndpoint,token_endpoint:this.tokenEndpoint,revocation_endpoint:this.revocationEndpoint,end_session_endpoint:this.endSessionEndpoint,userinfo_endpoint:this.userInfoEndpoint}},e.fetchFromIssuer=function(t,r){var n=t+"/.well-known/openid-configuration";return(r||new Fn.JQueryRequestor).xhr({url:n,dataType:"json",method:"GET"}).then((function(t){return new e(t)}))},e}();jn=On.AuthorizationServiceConfiguration=Bn;var zn={};Object.defineProperty(zn,"__esModule",{value:!0});var Hn=zn.TokenRequest=zn.GRANT_TYPE_REFRESH_TOKEN=zn.GRANT_TYPE_AUTHORIZATION_CODE=void 0,Vn=zn.GRANT_TYPE_AUTHORIZATION_CODE="authorization_code";zn.GRANT_TYPE_REFRESH_TOKEN="refresh_token";var $n=function(){function e(e){this.clientId=e.client_id,this.redirectUri=e.redirect_uri,this.grantType=e.grant_type,this.code=e.code,this.refreshToken=e.refresh_token,this.extras=e.extras}return e.prototype.toJson=function(){return{grant_type:this.grantType,code:this.code,refresh_token:this.refreshToken,redirect_uri:this.redirectUri,client_id:this.clientId,extras:this.extras}},e.prototype.toStringMap=function(){var e={grant_type:this.grantType,client_id:this.clientId,redirect_uri:this.redirectUri};if(this.code&&(e.code=this.code),this.refreshToken&&(e.refresh_token=this.refreshToken),this.extras)for(var t in this.extras)this.extras.hasOwnProperty(t)&&!e.hasOwnProperty(t)&&(e[t]=this.extras[t]);return e},e}();Hn=zn.TokenRequest=$n;var qn={},Wn={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.TokenError=e.TokenResponse=e.nowInSeconds=void 0;e.nowInSeconds=function(){return Math.round((new Date).getTime()/1e3)};var t=function(){function t(t){this.accessToken=t.access_token,this.tokenType=t.token_type||"bearer",t.expires_in&&(this.expiresIn=parseInt(t.expires_in,10)),this.refreshToken=t.refresh_token,this.scope=t.scope,this.idToken=t.id_token,this.issuedAt=t.issued_at||e.nowInSeconds()}return t.prototype.toJson=function(){var e;return{access_token:this.accessToken,id_token:this.idToken,refresh_token:this.refreshToken,scope:this.scope,token_type:this.tokenType,issued_at:this.issuedAt,expires_in:null===(e=this.expiresIn)||void 0===e?void 0:e.toString()}},t.prototype.isValid=function(t){return void 0===t&&(t=-600),!this.expiresIn||e.nowInSeconds()<this.issuedAt+this.expiresIn+t},t}();e.TokenResponse=t;var r=function(){function e(e){this.error=e.error,this.errorDescription=e.error_description,this.errorUri=e.error_uri}return e.prototype.toJson=function(){return{error:this.error,error_description:this.errorDescription,error_uri:this.errorUri}},e}();e.TokenError=r}(Wn),Object.defineProperty(qn,"__esModule",{value:!0});var Kn=qn.BaseTokenRequestHandler=void 0,Jn=Mr,Gn=un,Yn=Wn,Qn=An,Xn=function(){function e(e,t){void 0===e&&(e=new Qn.JQueryRequestor),void 0===t&&(t=new Gn.BasicQueryStringUtils),this.requestor=e,this.utils=t}return e.prototype.isTokenResponse=function(e){return void 0===e.error},e.prototype.performRevokeTokenRequest=function(e,t){return this.requestor.xhr({url:e.revocationEndpoint,method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},data:this.utils.stringify(t.toStringMap())}).then((function(e){return!0}))},e.prototype.performTokenRequest=function(e,t){var r=this;return this.requestor.xhr({url:e.tokenEndpoint,method:"POST",dataType:"json",headers:{"Content-Type":"application/x-www-form-urlencoded"},data:this.utils.stringify(t.toStringMap())}).then((function(e){return r.isTokenResponse(e)?new Yn.TokenResponse(e):Promise.reject(new Jn.AppAuthError(e.error,new Yn.TokenError(e)))}))},e}();Kn=qn.BaseTokenRequestHandler=Xn;let Zn;const ei=async(e,t)=>{const r=await jn.fetchFromIssuer(e,t);return Zn=r,r},ti=async(e,t,r,n,i)=>{const o={};t&&(o.code_verifier=t);const s=new Hn({client_id:n.clientId,redirect_uri:n.redirectUri,grant_type:Vn,code:e,refresh_token:void 0,extras:o});return await r.performTokenRequest(i,s)},ri=e=>{if(e&&e.isValid())return e.accessToken},ni=async e=>{try{const t=await e.storageBackend.getItem("appauth_current_authorization_request"),r=t&&await e.storageBackend.getItem((e=>`${e}_appauth_authorization_service_configuration`)(t));if(r){const e=JSON.parse(r);Zn=new jn(e)}return!0}catch{return!1}};p.bind({g:1});const ii=f("span")([{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"}]),oi=(function(){const e=f.call({g:1},"div").apply(null,arguments);return function(t){return e(t),null}})`
2
2
  @import url('//fonts.googleapis.com/css?family=Poppins');
3
3
 
4
4
  workplace-link {
@@ -93,7 +93,7 @@ let e,t,r,n={data:""},i=e=>"object"==typeof window?((e?e.querySelector("#_goober
93
93
  * @license qrcode.react
94
94
  * Copyright (c) Paul O'Shannessy
95
95
  * SPDX-License-Identifier: ISC
96
- */function zo(e,t=0){const r=[];return e.forEach((function(e,n){let i=null;e.forEach((function(o,s){if(!o&&null!==i)return r.push(`M${i+t} ${n+t}h${s-i}v1H${i+t}z`),void(i=null);if(s!==e.length-1)o&&null===i&&(i=s);else{if(!o)return;null===i?r.push(`M${s+t},${n+t} h1v1H${s+t}z`):r.push(`M${i+t},${n+t} h${s+1-i}v1H${i+t}z`)}}))})),r.join("")}function Ho(e,t){return e.slice().map(((e,r)=>r<t.y||r>=t.y+t.h?e:e.map(((e,r)=>(r<t.x||r>=t.x+t.w)&&e))))}function Vo(e,t,r,n){if(null==n)return null;const i=r?Fo:0,o=e.length+2*i,s=Math.floor(t*Bo),a=o/t,c=(n.width||s)*a,l=(n.height||s)*a,u=null==n.x?e.length/2-c/2:n.x*a,d=null==n.y?e.length/2-l/2:n.y*a;let h=null;if(n.excavate){let e=Math.floor(u),t=Math.floor(d);h={x:e,y:t,w:Math.ceil(c+u-e),h:Math.ceil(l+d-t)}}return{x:u,y:d,h:l,w:c,excavation:h}}var $o=function(){try{(new Path2D).addPath(new Path2D)}catch(Ld){return!1}return!0}();function qo(e){const t=e,{value:r,size:n=Lo,level:i=Do,bgColor:o=Mo,fgColor:s=Uo,includeMargin:a=jo,style:c,imageSettings:l}=t,u=Po(t,["value","size","level","bgColor","fgColor","includeMargin","style","imageSettings"]),d=null==l?void 0:l.src,h=we(null),p=we(null),[f,m]=ge(!1);ve((()=>{if(null!=h.current){const e=h.current,t=e.getContext("2d");if(!t)return;let c=No.QrCode.encodeText(r,xo[i]).getModules();const u=a?Fo:0,d=c.length+2*u,f=Vo(c,n,a,l),m=p.current,g=null!=f&&null!==m&&m.complete&&0!==m.naturalHeight&&0!==m.naturalWidth;g&&null!=f.excavation&&(c=Ho(c,f.excavation));const _=window.devicePixelRatio||1;e.height=e.width=n*_;const v=n/d*_;t.scale(v,v),t.fillStyle=o,t.fillRect(0,0,d,d),t.fillStyle=s,$o?t.fill(new Path2D(zo(c,u))):c.forEach((function(e,r){e.forEach((function(e,n){e&&t.fillRect(n+u,r+u,1,1)}))})),g&&t.drawImage(m,f.x+u,f.y+u,f.w,f.h)}})),ve((()=>{m(!1)}),[d]);const g=Ao({height:n,width:n},c);let _=null;return null!=d&&(_=bo.createElement("img",{src:d,key:d,style:{display:"none"},onLoad:()=>{m(!0)},ref:p})),bo.createElement(bo.Fragment,null,bo.createElement("canvas",Ao({style:g,height:n,width:n,ref:h},u)),_)}function Wo(e){const t=e,{value:r,size:n=Lo,level:i=Do,bgColor:o=Mo,fgColor:s=Uo,includeMargin:a=jo,imageSettings:c}=t,l=Po(t,["value","size","level","bgColor","fgColor","includeMargin","imageSettings"]);let u=No.QrCode.encodeText(r,xo[i]).getModules();const d=a?Fo:0,h=u.length+2*d,p=Vo(u,n,a,c);let f=null;null!=c&&null!=p&&(null!=p.excavation&&(u=Ho(u,p.excavation)),f=bo.createElement("image",{xlinkHref:c.src,height:p.h,width:p.w,x:p.x+d,y:p.y+d,preserveAspectRatio:"none"}));const m=zo(u,d);return bo.createElement("svg",Ao({height:n,width:n,viewBox:`0 0 ${h} ${h}`},l),bo.createElement("path",{fill:o,d:`M0,0 h${h}v${h}H0z`,shapeRendering:"crispEdges"}),bo.createElement("path",{fill:s,d:m,shapeRendering:"crispEdges"}),f)}var Ko=e=>{const t=e,{renderAs:r}=t,n=Po(t,["renderAs"]);return"svg"===r?bo.createElement(Wo,Ao({},n)):bo.createElement(qo,Ao({},n))};const Jo=""+new URL("assets/google-play-badge-215e4644.png",import.meta.url).href,Go=""+new URL("assets/apple-store-badge-a26fc5b3.svg",import.meta.url).href,Yo=""+new URL("assets/fireworks-ab74a101.png",import.meta.url).href,Qo=()=>ui(si,{children:ui(hi,{children:[ui(vi,{src:Yo}),ui("h1",{children:"You’re registered!"}),ui("h2",{children:"To start accessing your benefits, download the Flare app and sign in!"}),ui(pi,{children:ui(Ko,{value:"https://esjpe.app.link"})}),ui("h3",{children:"Download the Flare App"}),ui("p",{children:"Available on iOS and Android"}),ui(fi,{children:[ui(_i,{href:"https://apps.apple.com/us/app/flare/id1587276031",children:ui(mi,{src:Go})}),ui(_i,{href:"https://play.google.com/store/apps/details?id=com.flarehr.payandbenefits",children:ui(gi,{src:Jo})})]})]})}),Xo=""+new URL("assets/cross-icon-bd6b1cff.svg",import.meta.url).href,Zo=f("img")`
96
+ */function zo(e,t=0){const r=[];return e.forEach((function(e,n){let i=null;e.forEach((function(o,s){if(!o&&null!==i)return r.push(`M${i+t} ${n+t}h${s-i}v1H${i+t}z`),void(i=null);if(s!==e.length-1)o&&null===i&&(i=s);else{if(!o)return;null===i?r.push(`M${s+t},${n+t} h1v1H${s+t}z`):r.push(`M${i+t},${n+t} h${s+1-i}v1H${i+t}z`)}}))})),r.join("")}function Ho(e,t){return e.slice().map(((e,r)=>r<t.y||r>=t.y+t.h?e:e.map(((e,r)=>(r<t.x||r>=t.x+t.w)&&e))))}function Vo(e,t,r,n){if(null==n)return null;const i=r?Fo:0,o=e.length+2*i,s=Math.floor(t*Bo),a=o/t,c=(n.width||s)*a,l=(n.height||s)*a,u=null==n.x?e.length/2-c/2:n.x*a,d=null==n.y?e.length/2-l/2:n.y*a;let h=null;if(n.excavate){let e=Math.floor(u),t=Math.floor(d);h={x:e,y:t,w:Math.ceil(c+u-e),h:Math.ceil(l+d-t)}}return{x:u,y:d,h:l,w:c,excavation:h}}var $o=function(){try{(new Path2D).addPath(new Path2D)}catch(Md){return!1}return!0}();function qo(e){const t=e,{value:r,size:n=Lo,level:i=Do,bgColor:o=Mo,fgColor:s=Uo,includeMargin:a=jo,style:c,imageSettings:l}=t,u=Po(t,["value","size","level","bgColor","fgColor","includeMargin","style","imageSettings"]),d=null==l?void 0:l.src,h=we(null),p=we(null),[f,m]=ge(!1);ve((()=>{if(null!=h.current){const e=h.current,t=e.getContext("2d");if(!t)return;let c=No.QrCode.encodeText(r,xo[i]).getModules();const u=a?Fo:0,d=c.length+2*u,f=Vo(c,n,a,l),m=p.current,g=null!=f&&null!==m&&m.complete&&0!==m.naturalHeight&&0!==m.naturalWidth;g&&null!=f.excavation&&(c=Ho(c,f.excavation));const _=window.devicePixelRatio||1;e.height=e.width=n*_;const v=n/d*_;t.scale(v,v),t.fillStyle=o,t.fillRect(0,0,d,d),t.fillStyle=s,$o?t.fill(new Path2D(zo(c,u))):c.forEach((function(e,r){e.forEach((function(e,n){e&&t.fillRect(n+u,r+u,1,1)}))})),g&&t.drawImage(m,f.x+u,f.y+u,f.w,f.h)}})),ve((()=>{m(!1)}),[d]);const g=Ao({height:n,width:n},c);let _=null;return null!=d&&(_=bo.createElement("img",{src:d,key:d,style:{display:"none"},onLoad:()=>{m(!0)},ref:p})),bo.createElement(bo.Fragment,null,bo.createElement("canvas",Ao({style:g,height:n,width:n,ref:h},u)),_)}function Wo(e){const t=e,{value:r,size:n=Lo,level:i=Do,bgColor:o=Mo,fgColor:s=Uo,includeMargin:a=jo,imageSettings:c}=t,l=Po(t,["value","size","level","bgColor","fgColor","includeMargin","imageSettings"]);let u=No.QrCode.encodeText(r,xo[i]).getModules();const d=a?Fo:0,h=u.length+2*d,p=Vo(u,n,a,c);let f=null;null!=c&&null!=p&&(null!=p.excavation&&(u=Ho(u,p.excavation)),f=bo.createElement("image",{xlinkHref:c.src,height:p.h,width:p.w,x:p.x+d,y:p.y+d,preserveAspectRatio:"none"}));const m=zo(u,d);return bo.createElement("svg",Ao({height:n,width:n,viewBox:`0 0 ${h} ${h}`},l),bo.createElement("path",{fill:o,d:`M0,0 h${h}v${h}H0z`,shapeRendering:"crispEdges"}),bo.createElement("path",{fill:s,d:m,shapeRendering:"crispEdges"}),f)}var Ko=e=>{const t=e,{renderAs:r}=t,n=Po(t,["renderAs"]);return"svg"===r?bo.createElement(Wo,Ao({},n)):bo.createElement(qo,Ao({},n))};const Jo=""+new URL("assets/google-play-badge-f72611e2.png",import.meta.url).href,Go=""+new URL("assets/apple-store-badge-a26fc5b3.svg",import.meta.url).href,Yo=""+new URL("assets/fireworks-ab74a101.png",import.meta.url).href,Qo=()=>ui(si,{children:ui(hi,{children:[ui(vi,{src:Yo}),ui("h1",{children:"You’re registered!"}),ui("h2",{children:"To start accessing your benefits, download the Flare app and sign in!"}),ui(pi,{children:ui(Ko,{value:"https://esjpe.app.link"})}),ui("h3",{children:"Download the Flare App"}),ui("p",{children:"Available on iOS and Android"}),ui(fi,{children:[ui(_i,{href:"https://apps.apple.com/au/app/flare/id1587276031",children:ui(mi,{src:Go})}),ui(_i,{href:"https://play.google.com/store/apps/details?id=com.flarehr.payandbenefits",children:ui(gi,{src:Jo})})]})]})}),Xo=e=>O("svg",{xmlns:"http://www.w3.org/2000/svg",width:125,height:125,fill:"none","xmlns:v":"https://vecta.io/nano",...e},O("g",{clipPath:"url(#A)"},O("path",{d:"M62.499 119.932c31.719 0 57.432-25.713 57.432-57.432S94.218 5.068 62.499 5.068 5.066 30.781 5.066 62.5s25.713 57.432 57.432 57.432z",fill:"#eeefee"}),O("path",{d:"M73.142 6.068a57.43 57.43 0 0 1 32.806 26.793c7.122 12.785 9.095 27.806 5.516 41.996s-12.44 26.479-24.774 34.357-27.209 10.749-41.589 8.029c7.466 2.369 15.338 3.185 23.131 2.399a57.43 57.43 0 0 0 22.186-6.97 57.44 57.44 0 0 0 17.604-15.196c4.77-6.213 8.219-13.336 10.134-20.93s2.258-15.502 1.005-23.233-4.075-15.126-8.291-21.727-9.738-12.27-16.226-16.658a57.43 57.43 0 0 0-21.502-8.859z",fill:"#dbd8dd"}),O("path",{d:"M72.773 62.5l18.233 18.233-10.272 10.272-18.233-18.233-18.233 18.233-10.272-10.272L52.229 62.5 33.996 44.267l10.272-10.272 18.233 18.233 18.233-18.233 10.272 10.272L72.773 62.5z",fill:"silver"}),O("g",{fill:"#323c6b"},O("path",{d:"M80.732 91.85a.86.86 0 0 1-.324-.064c-.103-.042-.196-.105-.274-.183L62.499 73.966 44.864 91.603c-.158.158-.373.247-.597.247s-.439-.089-.597-.247L33.397 81.331c-.158-.158-.247-.373-.247-.597s.089-.439.247-.597L51.033 62.5 33.396 44.865c-.158-.158-.247-.373-.247-.597s.089-.439.247-.597l10.272-10.272c.158-.158.373-.247.597-.247s.439.089.597.247l17.637 17.635 17.635-17.635c.158-.158.373-.247.597-.247s.439.089.597.247L91.6 43.671c.158.158.247.373.247.597s-.089.439-.247.597L73.965 62.5 91.6 80.135c.158.158.247.373.247.597s-.089.439-.247.597L81.328 91.601a.84.84 0 0 1-.596.248zM62.499 71.927a.83.83 0 0 1 .323.064c.102.043.196.104.274.183l17.635 17.635 9.078-9.078-17.635-17.635c-.158-.158-.247-.373-.247-.597s.089-.439.247-.597L89.81 44.267l-9.078-9.078-17.635 17.635c-.158.158-.373.247-.597.247s-.439-.089-.597-.247L44.267 35.189l-9.078 9.078 17.635 17.635c.158.158.247.373.247.597s-.089.439-.247.597L35.19 80.731l9.078 9.078 17.635-17.635c.158-.158.373-.247.596-.247zm.001 48.85A58.28 58.28 0 0 1 5.342 51.131c2.248-11.304 7.799-21.689 15.949-29.839S39.826 7.591 51.13 5.343a58.28 58.28 0 0 1 33.671 3.316 58.27 58.27 0 0 1 26.154 21.464c6.403 9.584 9.822 20.851 9.822 32.377-.018 15.451-6.163 30.264-17.088 41.189S77.95 120.76 62.5 120.777zm0-114.865a56.59 56.59 0 0 0-40.013 96.602A56.59 56.59 0 0 0 119.089 62.5c-.017-15.003-5.985-29.386-16.593-39.995A56.65 56.65 0 0 0 62.5 5.912z"}))),O("defs",null,O("clipPath",{id:"A"},O("path",{fill:"#fff",d:"M0 0h125v125H0z"})))),Zo=f("img")`
97
97
  ${()=>({marginBottom:"2.5rem",height:"7rem"})}
98
98
  `,es=f("div")`
99
99
  ${()=>({marginTop:"6rem",marginBottom:"6rem",display:"flex",width:"100%",flexDirection:"column",alignItems:"center",textAlign:"center"})}
@@ -105,7 +105,7 @@ let e,t,r,n={data:""},i=e=>"object"==typeof window?((e?e.querySelector("#_goober
105
105
  p {
106
106
  ${()=>({marginTop:"0px",marginBottom:"0px",fontSize:"1rem",lineHeight:"1.5rem",fontWeight:"400"})}
107
107
  }
108
- `,ts=()=>ui(es,{children:[ui(Zo,{src:Xo}),ui("h1",{children:"Something went wrong!"}),ui("p",{children:"We’re having some difficulties."}),ui("p",{children:"Please try again shortly."})]}),rs=()=>{const e=(()=>{const e=document.getElementsByTagName("workplace-link");return e.length>0?e[0]:void 0})();e&&e.dispatchEvent(new CustomEvent("step-completion",{detail:"app-workplace-linking",bubbles:!0}))},ns=({apolloAccessToken:e})=>{const[t,r]=ge(0),[n,i]=ge(!1),[o,s]=ge(),a=e=>{console.error(`[Link Workplace]: ${e}`)};vr((async t=>{const n=e=>{a(e),r(3)},i=await(async(e,t,r)=>{const n=new on.AuthorizationNotifier,i=new vn,o=new Mn,s=new Kn(o);return i.setAuthorizationNotifier(n),n.setAuthorizationListener((async(n,i,o)=>{if(e(),await new Promise((e=>setTimeout(e,1e3))),o)return r(`[AuthListener]: Auth response error received: ${o.errorDescription}`);if(!i)return await t();let a;if(n.internal&&n.internal.code_verifier&&(a=n.internal.code_verifier),!Zn)return r("[AuthListener]: OIDC configuration not found");try{const e=await ti(i.code,a,s,n,Zn),o=ri(e);return o&&i.state?await t(o,i.state):r("[AuthListener]: Could not resolve access token or state")}catch(Ld){return r(`[AuthListener]: Token code exchange failed: ${Ld}`)}})),{authorizationHandler:i,tokenHandler:s,requestor:o}})((()=>r(2)),(async(i,o)=>{if(!i||!o)return r(1);try{const n=Me(e);await Ir(i,o,n.sub,t),r(4)}catch(Ld){n(`Error when trying to establish workplace link: ${Ld}`)}}),n);s(i)}),[]),vr((async()=>{o&&(await(async e=>{await ni(e),await e.completeAuthorizationRequestIfPossible()})(o.authorizationHandler),await new Promise((e=>setTimeout(e,1e3))),i(!0))}),[o]),ve((()=>{o&&0===t&&n&&r(1)}),[o,t,n]),vr((async n=>{if(o&&1===t)try{const t=await kr(e,n);if(t.isEstablished)return r(4);if(t.linkRequest){const e={openIdConnectUrl:t.linkRequest.openIdConnectUrl,clientId:t.linkRequest.clientId,redirectUri:`${window.location.protocol}//${window.location.host}${window.location.pathname}`,scope:`${t.linkRequest.clientId} openid`,state:t.linkRequest.linkRequestId};await(async(e,t,r)=>{const n=await ei(r.openIdConnectUrl,e),i=new en({client_id:r.clientId,redirect_uri:r.redirectUri,scope:r.scope,response_type:en.RESPONSE_TYPE_CODE,state:r.state,extras:{response_mode:"fragment",prompt:"login",option:"signup"}},new jr,!0);t.performAuthorizationRequest(n,i)})(o.requestor,null==o?void 0:o.authorizationHandler,e)}else a("Invalid response when requesting a workplace link"),r(3)}catch(Ld){a(`Could not redirect to OIDC provider: ${Ld}`),r(3)}}),[o,t]),ve((()=>{4===t&&rs()}),[t]);const c=0==t||1==t||2==t;return ui(N,{children:[c&&ui(di,{isActive:c}),3==t&&ui(ts,{}),4==t&&ui(Qo,{})]})},is=function(e){const t=[];let r=0;for(let n=0;n<e.length;n++){let i=e.charCodeAt(n);i<128?t[r++]=i:i<2048?(t[r++]=i>>6|192,t[r++]=63&i|128):55296==(64512&i)&&n+1<e.length&&56320==(64512&e.charCodeAt(n+1))?(i=65536+((1023&i)<<10)+(1023&e.charCodeAt(++n)),t[r++]=i>>18|240,t[r++]=i>>12&63|128,t[r++]=i>>6&63|128,t[r++]=63&i|128):(t[r++]=i>>12|224,t[r++]=i>>6&63|128,t[r++]=63&i|128)}return t},os={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:"function"==typeof atob,encodeByteArray(e,t){if(!Array.isArray(e))throw Error("encodeByteArray takes an array as a parameter");this.init_();const r=t?this.byteToCharMapWebSafe_:this.byteToCharMap_,n=[];for(let i=0;i<e.length;i+=3){const t=e[i],o=i+1<e.length,s=o?e[i+1]:0,a=i+2<e.length,c=a?e[i+2]:0,l=t>>2,u=(3&t)<<4|s>>4;let d=(15&s)<<2|c>>6,h=63&c;a||(h=64,o||(d=64)),n.push(r[l],r[u],r[d],r[h])}return n.join("")},encodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?btoa(e):this.encodeByteArray(is(e),t)},decodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?atob(e):function(e){const t=[];let r=0,n=0;for(;r<e.length;){const i=e[r++];if(i<128)t[n++]=String.fromCharCode(i);else if(i>191&&i<224){const o=e[r++];t[n++]=String.fromCharCode((31&i)<<6|63&o)}else if(i>239&&i<365){const o=((7&i)<<18|(63&e[r++])<<12|(63&e[r++])<<6|63&e[r++])-65536;t[n++]=String.fromCharCode(55296+(o>>10)),t[n++]=String.fromCharCode(56320+(1023&o))}else{const o=e[r++],s=e[r++];t[n++]=String.fromCharCode((15&i)<<12|(63&o)<<6|63&s)}}return t.join("")}(this.decodeStringToByteArray(e,t))},decodeStringToByteArray(e,t){this.init_();const r=t?this.charToByteMapWebSafe_:this.charToByteMap_,n=[];for(let i=0;i<e.length;){const t=r[e.charAt(i++)],o=i<e.length?r[e.charAt(i)]:0;++i;const s=i<e.length?r[e.charAt(i)]:64;++i;const a=i<e.length?r[e.charAt(i)]:64;if(++i,null==t||null==o||null==s||null==a)throw new ss;const c=t<<2|o>>4;if(n.push(c),64!==s){const e=o<<4&240|s>>2;if(n.push(e),64!==a){const e=s<<6&192|a;n.push(e)}}}return n},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let e=0;e<this.ENCODED_VALS.length;e++)this.byteToCharMap_[e]=this.ENCODED_VALS.charAt(e),this.charToByteMap_[this.byteToCharMap_[e]]=e,this.byteToCharMapWebSafe_[e]=this.ENCODED_VALS_WEBSAFE.charAt(e),this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[e]]=e,e>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(e)]=e,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(e)]=e)}}};class ss extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}}const as=function(e){return function(e){const t=is(e);return os.encodeByteArray(t,!0)}(e).replace(/\./g,"")},cs=function(e){try{return os.decodeString(e,!0)}catch(Ld){console.error("base64Decode failed: ",Ld)}return null};
108
+ `,ts=()=>ui(es,{children:[ui(Zo,{src:Xo}),ui("h1",{children:"Something went wrong!"}),ui("p",{children:"We’re having some difficulties."}),ui("p",{children:"Please try again shortly."})]}),rs=()=>{const e=(()=>{const e=document.getElementsByTagName("workplace-link");return e.length>0?e[0]:void 0})();e&&e.dispatchEvent(new CustomEvent("step-completion",{detail:"app-workplace-linking",bubbles:!0}))},ns=({apolloAccessToken:e})=>{const[t,r]=ge(0),[n,i]=ge(!1),[o,s]=ge(),a=e=>{console.error(`[Link Workplace]: ${e}`)};vr((async t=>{const n=e=>{a(e),r(3)},i=await(async(e,t,r)=>{const n=new on.AuthorizationNotifier,i=new vn,o=new Mn,s=new Kn(o);return i.setAuthorizationNotifier(n),n.setAuthorizationListener((async(n,i,o)=>{if(e(),await new Promise((e=>setTimeout(e,1e3))),o)return r(`[AuthListener]: Auth response error received: ${o.errorDescription}`);if(!i)return await t();let a;if(n.internal&&n.internal.code_verifier&&(a=n.internal.code_verifier),!Zn)return r("[AuthListener]: OIDC configuration not found");try{const e=await ti(i.code,a,s,n,Zn),o=ri(e);return o&&i.state?await t(o,i.state):r("[AuthListener]: Could not resolve access token or state")}catch(Md){return r(`[AuthListener]: Token code exchange failed: ${Md}`)}})),{authorizationHandler:i,tokenHandler:s,requestor:o}})((()=>r(2)),(async(i,o)=>{if(!i||!o)return r(1);try{const n=Me(e);await Ir(i,o,n.sub,t),r(4)}catch(Md){n(`Error when trying to establish workplace link: ${Md}`)}}),n);s(i)}),[]),vr((async()=>{o&&(await(async e=>{await ni(e),await e.completeAuthorizationRequestIfPossible()})(o.authorizationHandler),await new Promise((e=>setTimeout(e,1e3))),i(!0))}),[o]),ve((()=>{o&&0===t&&n&&r(1)}),[o,t,n]),vr((async n=>{if(o&&1===t)try{const t=await kr(e,n);if(t.isEstablished)return r(4);if(t.linkRequest){const e={openIdConnectUrl:t.linkRequest.openIdConnectUrl,clientId:t.linkRequest.clientId,redirectUri:`${window.location.protocol}//${window.location.host}${window.location.pathname}`,scope:`${t.linkRequest.clientId} openid`,state:t.linkRequest.linkRequestId};await(async(e,t,r)=>{const n=await ei(r.openIdConnectUrl,e),i=new en({client_id:r.clientId,redirect_uri:r.redirectUri,scope:r.scope,response_type:en.RESPONSE_TYPE_CODE,state:r.state,extras:{response_mode:"fragment",prompt:"login",option:"signup"}},new jr,!0);t.performAuthorizationRequest(n,i)})(o.requestor,null==o?void 0:o.authorizationHandler,e)}else a("Invalid response when requesting a workplace link"),r(3)}catch(Md){a(`Could not redirect to OIDC provider: ${Md}`),r(3)}}),[o,t]),ve((()=>{4===t&&rs()}),[t]);const c=0==t||1==t||2==t;return ui(N,{children:[c&&ui(di,{isActive:c}),3==t&&ui(ts,{}),4==t&&ui(Qo,{})]})},is=function(e){const t=[];let r=0;for(let n=0;n<e.length;n++){let i=e.charCodeAt(n);i<128?t[r++]=i:i<2048?(t[r++]=i>>6|192,t[r++]=63&i|128):55296==(64512&i)&&n+1<e.length&&56320==(64512&e.charCodeAt(n+1))?(i=65536+((1023&i)<<10)+(1023&e.charCodeAt(++n)),t[r++]=i>>18|240,t[r++]=i>>12&63|128,t[r++]=i>>6&63|128,t[r++]=63&i|128):(t[r++]=i>>12|224,t[r++]=i>>6&63|128,t[r++]=63&i|128)}return t},os={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:"function"==typeof atob,encodeByteArray(e,t){if(!Array.isArray(e))throw Error("encodeByteArray takes an array as a parameter");this.init_();const r=t?this.byteToCharMapWebSafe_:this.byteToCharMap_,n=[];for(let i=0;i<e.length;i+=3){const t=e[i],o=i+1<e.length,s=o?e[i+1]:0,a=i+2<e.length,c=a?e[i+2]:0,l=t>>2,u=(3&t)<<4|s>>4;let d=(15&s)<<2|c>>6,h=63&c;a||(h=64,o||(d=64)),n.push(r[l],r[u],r[d],r[h])}return n.join("")},encodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?btoa(e):this.encodeByteArray(is(e),t)},decodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?atob(e):function(e){const t=[];let r=0,n=0;for(;r<e.length;){const i=e[r++];if(i<128)t[n++]=String.fromCharCode(i);else if(i>191&&i<224){const o=e[r++];t[n++]=String.fromCharCode((31&i)<<6|63&o)}else if(i>239&&i<365){const o=((7&i)<<18|(63&e[r++])<<12|(63&e[r++])<<6|63&e[r++])-65536;t[n++]=String.fromCharCode(55296+(o>>10)),t[n++]=String.fromCharCode(56320+(1023&o))}else{const o=e[r++],s=e[r++];t[n++]=String.fromCharCode((15&i)<<12|(63&o)<<6|63&s)}}return t.join("")}(this.decodeStringToByteArray(e,t))},decodeStringToByteArray(e,t){this.init_();const r=t?this.charToByteMapWebSafe_:this.charToByteMap_,n=[];for(let i=0;i<e.length;){const t=r[e.charAt(i++)],o=i<e.length?r[e.charAt(i)]:0;++i;const s=i<e.length?r[e.charAt(i)]:64;++i;const a=i<e.length?r[e.charAt(i)]:64;if(++i,null==t||null==o||null==s||null==a)throw new ss;const c=t<<2|o>>4;if(n.push(c),64!==s){const e=o<<4&240|s>>2;if(n.push(e),64!==a){const e=s<<6&192|a;n.push(e)}}}return n},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let e=0;e<this.ENCODED_VALS.length;e++)this.byteToCharMap_[e]=this.ENCODED_VALS.charAt(e),this.charToByteMap_[this.byteToCharMap_[e]]=e,this.byteToCharMapWebSafe_[e]=this.ENCODED_VALS_WEBSAFE.charAt(e),this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[e]]=e,e>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(e)]=e,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(e)]=e)}}};class ss extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}}const as=function(e){return function(e){const t=is(e);return os.encodeByteArray(t,!0)}(e).replace(/\./g,"")},cs=function(e){try{return os.decodeString(e,!0)}catch(Md){console.error("base64Decode failed: ",Md)}return null};
109
109
  /**
110
110
  * @license
111
111
  * Copyright 2022 Google LLC
@@ -139,7 +139,7 @@ const ls=()=>
139
139
  * See the License for the specific language governing permissions and
140
140
  * limitations under the License.
141
141
  */
142
- function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if("undefined"!=typeof global)return global;throw new Error("Unable to locate global object.")}().__FIREBASE_DEFAULTS__,us=()=>{try{return ls()||(()=>{if("undefined"==typeof process||void 0===process.env)return;const e={}.__FIREBASE_DEFAULTS__;return e?JSON.parse(e):void 0})()||(()=>{if("undefined"==typeof document)return;let e;try{e=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch(Ld){return}const t=e&&cs(e[1]);return t&&JSON.parse(t)})()}catch(Ld){return void console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${Ld}`)}},ds=()=>{var e;return null===(e=us())||void 0===e?void 0:e.config},hs=e=>{var t;return null===(t=us())||void 0===t?void 0:t[`_${e}`]};
142
+ function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if("undefined"!=typeof global)return global;throw new Error("Unable to locate global object.")}().__FIREBASE_DEFAULTS__,us=()=>{try{return ls()||(()=>{if("undefined"==typeof process||void 0===process.env)return;const e={}.__FIREBASE_DEFAULTS__;return e?JSON.parse(e):void 0})()||(()=>{if("undefined"==typeof document)return;let e;try{e=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch(Md){return}const t=e&&cs(e[1]);return t&&JSON.parse(t)})()}catch(Md){return void console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${Md}`)}},ds=()=>{var e;return null===(e=us())||void 0===e?void 0:e.config},hs=e=>{var t;return null===(t=us())||void 0===t?void 0:t[`_${e}`]};
143
143
  /**
144
144
  * @license
145
145
  * Copyright 2017 Google LLC
@@ -188,7 +188,7 @@ class ps{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new P
188
188
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
189
189
  * See the License for the specific language governing permissions and
190
190
  * limitations under the License.
191
- */function ws(e){const t=[];for(const[r,n]of Object.entries(e))Array.isArray(n)?n.forEach((e=>{t.push(encodeURIComponent(r)+"="+encodeURIComponent(e))})):t.push(encodeURIComponent(r)+"="+encodeURIComponent(n));return t.length?"&"+t.join("&"):""}class bs{constructor(e,t){this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=t,this.task.then((()=>{e(this)})).catch((e=>{this.error(e)}))}next(e){this.forEachObserver((t=>{t.next(e)}))}error(e){this.forEachObserver((t=>{t.error(e)})),this.close(e)}complete(){this.forEachObserver((e=>{e.complete()})),this.close()}subscribe(e,t,r){let n;if(void 0===e&&void 0===t&&void 0===r)throw new Error("Missing Observer.");n=function(e,t){if("object"!=typeof e||null===e)return!1;for(const r of t)if(r in e&&"function"==typeof e[r])return!0;return!1}(e,["next","error","complete"])?e:{next:e,error:t,complete:r},void 0===n.next&&(n.next=Es),void 0===n.error&&(n.error=Es),void 0===n.complete&&(n.complete=Es);const i=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then((()=>{try{this.finalError?n.error(this.finalError):n.complete()}catch(Ld){}})),this.observers.push(n),i}unsubscribeOne(e){void 0!==this.observers&&void 0!==this.observers[e]&&(delete this.observers[e],this.observerCount-=1,0===this.observerCount&&void 0!==this.onNoObservers&&this.onNoObservers(this))}forEachObserver(e){if(!this.finalized)for(let t=0;t<this.observers.length;t++)this.sendOne(t,e)}sendOne(e,t){this.task.then((()=>{if(void 0!==this.observers&&void 0!==this.observers[e])try{t(this.observers[e])}catch(Ld){"undefined"!=typeof console&&console.error&&console.error(Ld)}}))}close(e){this.finalized||(this.finalized=!0,void 0!==e&&(this.finalError=e),this.task.then((()=>{this.observers=void 0,this.onNoObservers=void 0})))}}function Es(){}
191
+ */function ws(e){const t=[];for(const[r,n]of Object.entries(e))Array.isArray(n)?n.forEach((e=>{t.push(encodeURIComponent(r)+"="+encodeURIComponent(e))})):t.push(encodeURIComponent(r)+"="+encodeURIComponent(n));return t.length?"&"+t.join("&"):""}class bs{constructor(e,t){this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=t,this.task.then((()=>{e(this)})).catch((e=>{this.error(e)}))}next(e){this.forEachObserver((t=>{t.next(e)}))}error(e){this.forEachObserver((t=>{t.error(e)})),this.close(e)}complete(){this.forEachObserver((e=>{e.complete()})),this.close()}subscribe(e,t,r){let n;if(void 0===e&&void 0===t&&void 0===r)throw new Error("Missing Observer.");n=function(e,t){if("object"!=typeof e||null===e)return!1;for(const r of t)if(r in e&&"function"==typeof e[r])return!0;return!1}(e,["next","error","complete"])?e:{next:e,error:t,complete:r},void 0===n.next&&(n.next=Es),void 0===n.error&&(n.error=Es),void 0===n.complete&&(n.complete=Es);const i=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then((()=>{try{this.finalError?n.error(this.finalError):n.complete()}catch(Md){}})),this.observers.push(n),i}unsubscribeOne(e){void 0!==this.observers&&void 0!==this.observers[e]&&(delete this.observers[e],this.observerCount-=1,0===this.observerCount&&void 0!==this.onNoObservers&&this.onNoObservers(this))}forEachObserver(e){if(!this.finalized)for(let t=0;t<this.observers.length;t++)this.sendOne(t,e)}sendOne(e,t){this.task.then((()=>{if(void 0!==this.observers&&void 0!==this.observers[e])try{t(this.observers[e])}catch(Md){"undefined"!=typeof console&&console.error&&console.error(Md)}}))}close(e){this.finalized||(this.finalized=!0,void 0!==e&&(this.finalError=e),this.task.then((()=>{this.observers=void 0,this.onNoObservers=void 0})))}}function Es(){}
192
192
  /**
193
193
  * @license
194
194
  * Copyright 2021 Google LLC
@@ -236,7 +236,7 @@ class ps{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new P
236
236
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
237
237
  * See the License for the specific language governing permissions and
238
238
  * limitations under the License.
239
- */class Cs{constructor(e,t){this.name=e,this.container=t,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}get(e){const t=this.normalizeInstanceIdentifier(e);if(!this.instancesDeferred.has(t)){const e=new ps;if(this.instancesDeferred.set(t,e),this.isInitialized(t)||this.shouldAutoInitialize())try{const r=this.getOrInitializeService({instanceIdentifier:t});r&&e.resolve(r)}catch(Ld){}}return this.instancesDeferred.get(t).promise}getImmediate(e){var t;const r=this.normalizeInstanceIdentifier(null==e?void 0:e.identifier),n=null!==(t=null==e?void 0:e.optional)&&void 0!==t&&t;if(!this.isInitialized(r)&&!this.shouldAutoInitialize()){if(n)return null;throw Error(`Service ${this.name} is not available`)}try{return this.getOrInitializeService({instanceIdentifier:r})}catch(Ld){if(n)return null;throw Ld}}getComponent(){return this.component}setComponent(e){if(e.name!==this.name)throw Error(`Mismatching Component ${e.name} for Provider ${this.name}.`);if(this.component)throw Error(`Component for ${this.name} has already been provided`);if(this.component=e,this.shouldAutoInitialize()){if(function(e){return"EAGER"===e.instantiationMode}
239
+ */class Cs{constructor(e,t){this.name=e,this.container=t,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}get(e){const t=this.normalizeInstanceIdentifier(e);if(!this.instancesDeferred.has(t)){const e=new ps;if(this.instancesDeferred.set(t,e),this.isInitialized(t)||this.shouldAutoInitialize())try{const r=this.getOrInitializeService({instanceIdentifier:t});r&&e.resolve(r)}catch(Md){}}return this.instancesDeferred.get(t).promise}getImmediate(e){var t;const r=this.normalizeInstanceIdentifier(null==e?void 0:e.identifier),n=null!==(t=null==e?void 0:e.optional)&&void 0!==t&&t;if(!this.isInitialized(r)&&!this.shouldAutoInitialize()){if(n)return null;throw Error(`Service ${this.name} is not available`)}try{return this.getOrInitializeService({instanceIdentifier:r})}catch(Md){if(n)return null;throw Md}}getComponent(){return this.component}setComponent(e){if(e.name!==this.name)throw Error(`Mismatching Component ${e.name} for Provider ${this.name}.`);if(this.component)throw Error(`Component for ${this.name} has already been provided`);if(this.component=e,this.shouldAutoInitialize()){if(function(e){return"EAGER"===e.instantiationMode}
240
240
  /**
241
241
  * @license
242
242
  * Copyright 2019 Google LLC
@@ -252,7 +252,7 @@ class ps{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new P
252
252
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
253
253
  * See the License for the specific language governing permissions and
254
254
  * limitations under the License.
255
- */(e))try{this.getOrInitializeService({instanceIdentifier:Ts})}catch(Ld){}for(const[e,t]of this.instancesDeferred.entries()){const r=this.normalizeInstanceIdentifier(e);try{const e=this.getOrInitializeService({instanceIdentifier:r});t.resolve(e)}catch(Ld){}}}}clearInstance(e=Ts){this.instancesDeferred.delete(e),this.instancesOptions.delete(e),this.instances.delete(e)}async delete(){const e=Array.from(this.instances.values());await Promise.all([...e.filter((e=>"INTERNAL"in e)).map((e=>e.INTERNAL.delete())),...e.filter((e=>"_delete"in e)).map((e=>e._delete()))])}isComponentSet(){return null!=this.component}isInitialized(e=Ts){return this.instances.has(e)}getOptions(e=Ts){return this.instancesOptions.get(e)||{}}initialize(e={}){const{options:t={}}=e,r=this.normalizeInstanceIdentifier(e.instanceIdentifier);if(this.isInitialized(r))throw Error(`${this.name}(${r}) has already been initialized`);if(!this.isComponentSet())throw Error(`Component ${this.name} has not been registered yet`);const n=this.getOrInitializeService({instanceIdentifier:r,options:t});for(const[i,o]of this.instancesDeferred.entries()){r===this.normalizeInstanceIdentifier(i)&&o.resolve(n)}return n}onInit(e,t){var r;const n=this.normalizeInstanceIdentifier(t),i=null!==(r=this.onInitCallbacks.get(n))&&void 0!==r?r:new Set;i.add(e),this.onInitCallbacks.set(n,i);const o=this.instances.get(n);return o&&e(o,n),()=>{i.delete(e)}}invokeOnInitCallbacks(e,t){const r=this.onInitCallbacks.get(t);if(r)for(const i of r)try{i(e,t)}catch(n){}}getOrInitializeService({instanceIdentifier:e,options:t={}}){let r=this.instances.get(e);if(!r&&this.component&&(r=this.component.instanceFactory(this.container,{instanceIdentifier:(n=e,n===Ts?void 0:n),options:t}),this.instances.set(e,r),this.instancesOptions.set(e,t),this.invokeOnInitCallbacks(r,e),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,e,r)}catch(i){}var n;return r||null}normalizeInstanceIdentifier(e=Ts){return this.component?this.component.multipleInstances?e:Ts:e}shouldAutoInitialize(){return!!this.component&&"EXPLICIT"!==this.component.instantiationMode}}class Ss{constructor(e){this.name=e,this.providers=new Map}addComponent(e){const t=this.getProvider(e.name);if(t.isComponentSet())throw new Error(`Component ${e.name} has already been registered with ${this.name}`);t.setComponent(e)}addOrOverwriteComponent(e){this.getProvider(e.name).isComponentSet()&&this.providers.delete(e.name),this.addComponent(e)}getProvider(e){if(this.providers.has(e))return this.providers.get(e);const t=new Cs(e,this);return this.providers.set(e,t),t}getProviders(){return Array.from(this.providers.values())}}
255
+ */(e))try{this.getOrInitializeService({instanceIdentifier:Ts})}catch(Md){}for(const[e,t]of this.instancesDeferred.entries()){const r=this.normalizeInstanceIdentifier(e);try{const e=this.getOrInitializeService({instanceIdentifier:r});t.resolve(e)}catch(Md){}}}}clearInstance(e=Ts){this.instancesDeferred.delete(e),this.instancesOptions.delete(e),this.instances.delete(e)}async delete(){const e=Array.from(this.instances.values());await Promise.all([...e.filter((e=>"INTERNAL"in e)).map((e=>e.INTERNAL.delete())),...e.filter((e=>"_delete"in e)).map((e=>e._delete()))])}isComponentSet(){return null!=this.component}isInitialized(e=Ts){return this.instances.has(e)}getOptions(e=Ts){return this.instancesOptions.get(e)||{}}initialize(e={}){const{options:t={}}=e,r=this.normalizeInstanceIdentifier(e.instanceIdentifier);if(this.isInitialized(r))throw Error(`${this.name}(${r}) has already been initialized`);if(!this.isComponentSet())throw Error(`Component ${this.name} has not been registered yet`);const n=this.getOrInitializeService({instanceIdentifier:r,options:t});for(const[i,o]of this.instancesDeferred.entries()){r===this.normalizeInstanceIdentifier(i)&&o.resolve(n)}return n}onInit(e,t){var r;const n=this.normalizeInstanceIdentifier(t),i=null!==(r=this.onInitCallbacks.get(n))&&void 0!==r?r:new Set;i.add(e),this.onInitCallbacks.set(n,i);const o=this.instances.get(n);return o&&e(o,n),()=>{i.delete(e)}}invokeOnInitCallbacks(e,t){const r=this.onInitCallbacks.get(t);if(r)for(const i of r)try{i(e,t)}catch(n){}}getOrInitializeService({instanceIdentifier:e,options:t={}}){let r=this.instances.get(e);if(!r&&this.component&&(r=this.component.instanceFactory(this.container,{instanceIdentifier:(n=e,n===Ts?void 0:n),options:t}),this.instances.set(e,r),this.instancesOptions.set(e,t),this.invokeOnInitCallbacks(r,e),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,e,r)}catch(i){}var n;return r||null}normalizeInstanceIdentifier(e=Ts){return this.component?this.component.multipleInstances?e:Ts:e}shouldAutoInitialize(){return!!this.component&&"EXPLICIT"!==this.component.instantiationMode}}class Ss{constructor(e){this.name=e,this.providers=new Map}addComponent(e){const t=this.getProvider(e.name);if(t.isComponentSet())throw new Error(`Component ${e.name} has already been registered with ${this.name}`);t.setComponent(e)}addOrOverwriteComponent(e){this.getProvider(e.name).isComponentSet()&&this.providers.delete(e.name),this.addComponent(e)}getProvider(e){if(this.providers.has(e))return this.providers.get(e);const t=new Cs(e,this);return this.providers.set(e,t),t}getProviders(){return Array.from(this.providers.values())}}
256
256
  /**
257
257
  * @license
258
258
  * Copyright 2017 Google LLC
@@ -285,7 +285,7 @@ class ps{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new P
285
285
  * See the License for the specific language governing permissions and
286
286
  * limitations under the License.
287
287
  */
288
- class Xs{constructor(e){this.container=e}getPlatformInfoString(){return this.container.getProviders().map((e=>{if(function(e){const t=e.getComponent();return"VERSION"===(null==t?void 0:t.type)}(e)){const t=e.getImmediate();return`${t.library}/${t.version}`}return null})).filter((e=>e)).join(" ")}}const Zs="@firebase/app",ea="0.9.22",ta=new Ls("@firebase/app"),ra="[DEFAULT]",na={[Zs]:"fire-core","@firebase/app-compat":"fire-core-compat","@firebase/analytics":"fire-analytics","@firebase/analytics-compat":"fire-analytics-compat","@firebase/app-check":"fire-app-check","@firebase/app-check-compat":"fire-app-check-compat","@firebase/auth":"fire-auth","@firebase/auth-compat":"fire-auth-compat","@firebase/database":"fire-rtdb","@firebase/database-compat":"fire-rtdb-compat","@firebase/functions":"fire-fn","@firebase/functions-compat":"fire-fn-compat","@firebase/installations":"fire-iid","@firebase/installations-compat":"fire-iid-compat","@firebase/messaging":"fire-fcm","@firebase/messaging-compat":"fire-fcm-compat","@firebase/performance":"fire-perf","@firebase/performance-compat":"fire-perf-compat","@firebase/remote-config":"fire-rc","@firebase/remote-config-compat":"fire-rc-compat","@firebase/storage":"fire-gcs","@firebase/storage-compat":"fire-gcs-compat","@firebase/firestore":"fire-fst","@firebase/firestore-compat":"fire-fst-compat","fire-js":"fire-js",firebase:"fire-js-all"},ia=new Map,oa=new Map;function sa(e,t){try{e.container.addComponent(t)}catch(Ld){ta.debug(`Component ${t.name} failed to register with FirebaseApp ${e.name}`,Ld)}}function aa(e){const t=e.name;if(oa.has(t))return ta.debug(`There were multiple attempts to register component ${t}.`),!1;oa.set(t,e);for(const r of ia.values())sa(r,e);return!0}function ca(e,t){const r=e.container.getProvider("heartbeat").getImmediate({optional:!0});return r&&r.triggerHeartbeat(),e.container.getProvider(t)}
288
+ class Xs{constructor(e){this.container=e}getPlatformInfoString(){return this.container.getProviders().map((e=>{if(function(e){const t=e.getComponent();return"VERSION"===(null==t?void 0:t.type)}(e)){const t=e.getImmediate();return`${t.library}/${t.version}`}return null})).filter((e=>e)).join(" ")}}const Zs="@firebase/app",ea="0.9.22",ta=new Ls("@firebase/app"),ra="[DEFAULT]",na={[Zs]:"fire-core","@firebase/app-compat":"fire-core-compat","@firebase/analytics":"fire-analytics","@firebase/analytics-compat":"fire-analytics-compat","@firebase/app-check":"fire-app-check","@firebase/app-check-compat":"fire-app-check-compat","@firebase/auth":"fire-auth","@firebase/auth-compat":"fire-auth-compat","@firebase/database":"fire-rtdb","@firebase/database-compat":"fire-rtdb-compat","@firebase/functions":"fire-fn","@firebase/functions-compat":"fire-fn-compat","@firebase/installations":"fire-iid","@firebase/installations-compat":"fire-iid-compat","@firebase/messaging":"fire-fcm","@firebase/messaging-compat":"fire-fcm-compat","@firebase/performance":"fire-perf","@firebase/performance-compat":"fire-perf-compat","@firebase/remote-config":"fire-rc","@firebase/remote-config-compat":"fire-rc-compat","@firebase/storage":"fire-gcs","@firebase/storage-compat":"fire-gcs-compat","@firebase/firestore":"fire-fst","@firebase/firestore-compat":"fire-fst-compat","fire-js":"fire-js",firebase:"fire-js-all"},ia=new Map,oa=new Map;function sa(e,t){try{e.container.addComponent(t)}catch(Md){ta.debug(`Component ${t.name} failed to register with FirebaseApp ${e.name}`,Md)}}function aa(e){const t=e.name;if(oa.has(t))return ta.debug(`There were multiple attempts to register component ${t}.`),!1;oa.set(t,e);for(const r of ia.values())sa(r,e);return!0}function ca(e,t){const r=e.container.getProvider("heartbeat").getImmediate({optional:!0});return r&&r.triggerHeartbeat(),e.container.getProvider(t)}
289
289
  /**
290
290
  * @license
291
291
  * Copyright 2019 Google LLC
@@ -350,7 +350,7 @@ class ua{constructor(e,t,r){this._isDeleted=!1,this._options=Object.assign({},e)
350
350
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
351
351
  * See the License for the specific language governing permissions and
352
352
  * limitations under the License.
353
- */const fa="firebase-heartbeat-database",ma=1,ga="firebase-heartbeat-store";let _a=null;function va(){return _a||(_a=function(e,t,{blocked:r,upgrade:n,blocking:i,terminated:o}={}){const s=indexedDB.open(e,t),a=Ws(s);return n&&s.addEventListener("upgradeneeded",(e=>{n(Ws(s.result),e.oldVersion,e.newVersion,Ws(s.transaction),e)})),r&&s.addEventListener("blocked",(e=>r(e.oldVersion,e.newVersion,e))),a.then((e=>{o&&e.addEventListener("close",(()=>o())),i&&e.addEventListener("versionchange",(e=>i(e.oldVersion,e.newVersion,e)))})).catch((()=>{})),a}(fa,ma,{upgrade:(e,t)=>{if(0===t)e.createObjectStore(ga)}}).catch((e=>{throw la.create("idb-open",{originalErrorMessage:e.message})}))),_a}async function ya(e,t){try{const r=(await va()).transaction(ga,"readwrite"),n=r.objectStore(ga);await n.put(t,wa(e)),await r.done}catch(Ld){if(Ld instanceof ms)ta.warn(Ld.message);else{const t=la.create("idb-set",{originalErrorMessage:null==Ld?void 0:Ld.message});ta.warn(t.message)}}}function wa(e){return`${e.name}!${e.options.appId}`}
353
+ */const fa="firebase-heartbeat-database",ma=1,ga="firebase-heartbeat-store";let _a=null;function va(){return _a||(_a=function(e,t,{blocked:r,upgrade:n,blocking:i,terminated:o}={}){const s=indexedDB.open(e,t),a=Ws(s);return n&&s.addEventListener("upgradeneeded",(e=>{n(Ws(s.result),e.oldVersion,e.newVersion,Ws(s.transaction),e)})),r&&s.addEventListener("blocked",(e=>r(e.oldVersion,e.newVersion,e))),a.then((e=>{o&&e.addEventListener("close",(()=>o())),i&&e.addEventListener("versionchange",(e=>i(e.oldVersion,e.newVersion,e)))})).catch((()=>{})),a}(fa,ma,{upgrade:(e,t)=>{if(0===t)e.createObjectStore(ga)}}).catch((e=>{throw la.create("idb-open",{originalErrorMessage:e.message})}))),_a}async function ya(e,t){try{const r=(await va()).transaction(ga,"readwrite"),n=r.objectStore(ga);await n.put(t,wa(e)),await r.done}catch(Md){if(Md instanceof ms)ta.warn(Md.message);else{const t=la.create("idb-set",{originalErrorMessage:null==Md?void 0:Md.message});ta.warn(t.message)}}}function wa(e){return`${e.name}!${e.options.appId}`}
354
354
  /**
355
355
  * @license
356
356
  * Copyright 2021 Google LLC
@@ -366,7 +366,7 @@ class ua{constructor(e,t,r){this._isDeleted=!1,this._options=Object.assign({},e)
366
366
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
367
367
  * See the License for the specific language governing permissions and
368
368
  * limitations under the License.
369
- */class ba{constructor(e){this.container=e,this._heartbeatsCache=null;const t=this.container.getProvider("app").getImmediate();this._storage=new ka(t),this._heartbeatsCachePromise=this._storage.read().then((e=>(this._heartbeatsCache=e,e)))}async triggerHeartbeat(){const e=this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),t=Ea();if(null===this._heartbeatsCache&&(this._heartbeatsCache=await this._heartbeatsCachePromise),this._heartbeatsCache.lastSentHeartbeatDate!==t&&!this._heartbeatsCache.heartbeats.some((e=>e.date===t)))return this._heartbeatsCache.heartbeats.push({date:t,agent:e}),this._heartbeatsCache.heartbeats=this._heartbeatsCache.heartbeats.filter((e=>{const t=new Date(e.date).valueOf();return Date.now()-t<=2592e6})),this._storage.overwrite(this._heartbeatsCache)}async getHeartbeatsHeader(){if(null===this._heartbeatsCache&&await this._heartbeatsCachePromise,null===this._heartbeatsCache||0===this._heartbeatsCache.heartbeats.length)return"";const e=Ea(),{heartbeatsToSend:t,unsentEntries:r}=function(e,t=1024){const r=[];let n=e.slice();for(const i of e){const e=r.find((e=>e.agent===i.agent));if(e){if(e.dates.push(i.date),Ia(r)>t){e.dates.pop();break}}else if(r.push({agent:i.agent,dates:[i.date]}),Ia(r)>t){r.pop();break}n=n.slice(1)}return{heartbeatsToSend:r,unsentEntries:n}}(this._heartbeatsCache.heartbeats),n=as(JSON.stringify({version:2,heartbeats:t}));return this._heartbeatsCache.lastSentHeartbeatDate=e,r.length>0?(this._heartbeatsCache.heartbeats=r,await this._storage.overwrite(this._heartbeatsCache)):(this._heartbeatsCache.heartbeats=[],this._storage.overwrite(this._heartbeatsCache)),n}}function Ea(){return(new Date).toISOString().substring(0,10)}class ka{constructor(e){this.app=e,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}async runIndexedDBEnvironmentCheck(){return!!function(){try{return"object"==typeof indexedDB}catch(Ld){return!1}}()&&new Promise(((e,t)=>{try{let r=!0;const n="validate-browser-context-for-indexeddb-analytics-module",i=self.indexedDB.open(n);i.onsuccess=()=>{i.result.close(),r||self.indexedDB.deleteDatabase(n),e(!0)},i.onupgradeneeded=()=>{r=!1},i.onerror=()=>{var e;t((null===(e=i.error)||void 0===e?void 0:e.message)||"")}}catch(r){t(r)}})).then((()=>!0)).catch((()=>!1))}async read(){if(await this._canUseIndexedDBPromise){return await async function(e){try{const t=await va();return await t.transaction(ga).objectStore(ga).get(wa(e))}catch(Ld){if(Ld instanceof ms)ta.warn(Ld.message);else{const t=la.create("idb-get",{originalErrorMessage:null==Ld?void 0:Ld.message});ta.warn(t.message)}}}(this.app)||{heartbeats:[]}}return{heartbeats:[]}}async overwrite(e){var t;if(await this._canUseIndexedDBPromise){const r=await this.read();return ya(this.app,{lastSentHeartbeatDate:null!==(t=e.lastSentHeartbeatDate)&&void 0!==t?t:r.lastSentHeartbeatDate,heartbeats:e.heartbeats})}}async add(e){var t;if(await this._canUseIndexedDBPromise){const r=await this.read();return ya(this.app,{lastSentHeartbeatDate:null!==(t=e.lastSentHeartbeatDate)&&void 0!==t?t:r.lastSentHeartbeatDate,heartbeats:[...r.heartbeats,...e.heartbeats]})}}}function Ia(e){return as(JSON.stringify({version:2,heartbeats:e})).length}
369
+ */class ba{constructor(e){this.container=e,this._heartbeatsCache=null;const t=this.container.getProvider("app").getImmediate();this._storage=new ka(t),this._heartbeatsCachePromise=this._storage.read().then((e=>(this._heartbeatsCache=e,e)))}async triggerHeartbeat(){const e=this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),t=Ea();if(null===this._heartbeatsCache&&(this._heartbeatsCache=await this._heartbeatsCachePromise),this._heartbeatsCache.lastSentHeartbeatDate!==t&&!this._heartbeatsCache.heartbeats.some((e=>e.date===t)))return this._heartbeatsCache.heartbeats.push({date:t,agent:e}),this._heartbeatsCache.heartbeats=this._heartbeatsCache.heartbeats.filter((e=>{const t=new Date(e.date).valueOf();return Date.now()-t<=2592e6})),this._storage.overwrite(this._heartbeatsCache)}async getHeartbeatsHeader(){if(null===this._heartbeatsCache&&await this._heartbeatsCachePromise,null===this._heartbeatsCache||0===this._heartbeatsCache.heartbeats.length)return"";const e=Ea(),{heartbeatsToSend:t,unsentEntries:r}=function(e,t=1024){const r=[];let n=e.slice();for(const i of e){const e=r.find((e=>e.agent===i.agent));if(e){if(e.dates.push(i.date),Ia(r)>t){e.dates.pop();break}}else if(r.push({agent:i.agent,dates:[i.date]}),Ia(r)>t){r.pop();break}n=n.slice(1)}return{heartbeatsToSend:r,unsentEntries:n}}(this._heartbeatsCache.heartbeats),n=as(JSON.stringify({version:2,heartbeats:t}));return this._heartbeatsCache.lastSentHeartbeatDate=e,r.length>0?(this._heartbeatsCache.heartbeats=r,await this._storage.overwrite(this._heartbeatsCache)):(this._heartbeatsCache.heartbeats=[],this._storage.overwrite(this._heartbeatsCache)),n}}function Ea(){return(new Date).toISOString().substring(0,10)}class ka{constructor(e){this.app=e,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}async runIndexedDBEnvironmentCheck(){return!!function(){try{return"object"==typeof indexedDB}catch(Md){return!1}}()&&new Promise(((e,t)=>{try{let r=!0;const n="validate-browser-context-for-indexeddb-analytics-module",i=self.indexedDB.open(n);i.onsuccess=()=>{i.result.close(),r||self.indexedDB.deleteDatabase(n),e(!0)},i.onupgradeneeded=()=>{r=!1},i.onerror=()=>{var e;t((null===(e=i.error)||void 0===e?void 0:e.message)||"")}}catch(r){t(r)}})).then((()=>!0)).catch((()=>!1))}async read(){if(await this._canUseIndexedDBPromise){return await async function(e){try{const t=await va();return await t.transaction(ga).objectStore(ga).get(wa(e))}catch(Md){if(Md instanceof ms)ta.warn(Md.message);else{const t=la.create("idb-get",{originalErrorMessage:null==Md?void 0:Md.message});ta.warn(t.message)}}}(this.app)||{heartbeats:[]}}return{heartbeats:[]}}async overwrite(e){var t;if(await this._canUseIndexedDBPromise){const r=await this.read();return ya(this.app,{lastSentHeartbeatDate:null!==(t=e.lastSentHeartbeatDate)&&void 0!==t?t:r.lastSentHeartbeatDate,heartbeats:e.heartbeats})}}async add(e){var t;if(await this._canUseIndexedDBPromise){const r=await this.read();return ya(this.app,{lastSentHeartbeatDate:null!==(t=e.lastSentHeartbeatDate)&&void 0!==t?t:r.lastSentHeartbeatDate,heartbeats:[...r.heartbeats,...e.heartbeats]})}}}function Ia(e){return as(JSON.stringify({version:2,heartbeats:e})).length}
370
370
  /**
371
371
  * @license
372
372
  * Copyright 2019 Google LLC
@@ -511,7 +511,7 @@ class Ga{constructor(e,t){this.shortDelay=e,this.longDelay=t,$a(t>e,"Short delay
511
511
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
512
512
  * See the License for the specific language governing permissions and
513
513
  * limitations under the License.
514
- */function ec(e,t){return e.tenantId&&!t.tenantId?Object.assign(Object.assign({},t),{tenantId:e.tenantId}):t}async function tc(e,t,r,n,i={}){return rc(e,i,(async()=>{let i={},o={};n&&("GET"===t?o=n:i={body:JSON.stringify(n)});const s=ws(Object.assign({key:e.config.apiKey},o)).slice(1),a=await e._getAdditionalHeaders();return a["Content-Type"]="application/json",e.languageCode&&(a["X-Firebase-Locale"]=e.languageCode),Qa.fetch()(ic(e,e.config.apiHost,r,s),Object.assign({method:t,headers:a,referrerPolicy:"no-referrer"},i))}))}async function rc(e,t,r){e._canInitEmulator=!1;const n=Object.assign(Object.assign({},Xa),t);try{const t=new oc(e),i=await Promise.race([r(),t.promise]);t.clearNetworkTimeout();const o=await i.json();if("needConfirmation"in o)throw sc(e,"account-exists-with-different-credential",o);if(i.ok&&!("errorMessage"in o))return o;{const t=i.ok?o.errorMessage:o.error.message,[r,s]=t.split(" : ");if("FEDERATED_USER_ID_ALREADY_LINKED"===r)throw sc(e,"credential-already-in-use",o);if("EMAIL_EXISTS"===r)throw sc(e,"email-already-in-use",o);if("USER_DISABLED"===r)throw sc(e,"user-disabled",o);const a=n[r]||r.toLowerCase().replace(/[_\s]+/g,"-");if(s)throw function(e,t,r){const n=Object.assign(Object.assign({},Ra()),{[t]:r});return new gs("auth","Firebase",n).create(t,{appName:e.name})}(e,a,s);Fa(e,a)}}catch(Ld){if(Ld instanceof ms)throw Ld;Fa(e,"network-request-failed",{message:String(Ld)})}}async function nc(e,t,r,n,i={}){const o=await tc(e,t,r,n,i);return"mfaPendingCredential"in o&&Fa(e,"multi-factor-auth-required",{_serverResponse:o}),o}function ic(e,t,r,n){const i=`${t}${r}?${n}`;return e.config.emulator?Ya(e.config,i):`${e.config.apiScheme}://${i}`}class oc{constructor(e){this.auth=e,this.timer=null,this.promise=new Promise(((e,t)=>{this.timer=setTimeout((()=>t(Ba(this.auth,"network-request-failed"))),Za.get())}))}clearNetworkTimeout(){clearTimeout(this.timer)}}function sc(e,t,r){const n={appName:e.name};r.email&&(n.email=r.email),r.phoneNumber&&(n.phoneNumber=r.phoneNumber);const i=Ba(e,t,n);return i.customData._tokenResponse=r,i}
514
+ */function ec(e,t){return e.tenantId&&!t.tenantId?Object.assign(Object.assign({},t),{tenantId:e.tenantId}):t}async function tc(e,t,r,n,i={}){return rc(e,i,(async()=>{let i={},o={};n&&("GET"===t?o=n:i={body:JSON.stringify(n)});const s=ws(Object.assign({key:e.config.apiKey},o)).slice(1),a=await e._getAdditionalHeaders();return a["Content-Type"]="application/json",e.languageCode&&(a["X-Firebase-Locale"]=e.languageCode),Qa.fetch()(ic(e,e.config.apiHost,r,s),Object.assign({method:t,headers:a,referrerPolicy:"no-referrer"},i))}))}async function rc(e,t,r){e._canInitEmulator=!1;const n=Object.assign(Object.assign({},Xa),t);try{const t=new oc(e),i=await Promise.race([r(),t.promise]);t.clearNetworkTimeout();const o=await i.json();if("needConfirmation"in o)throw sc(e,"account-exists-with-different-credential",o);if(i.ok&&!("errorMessage"in o))return o;{const t=i.ok?o.errorMessage:o.error.message,[r,s]=t.split(" : ");if("FEDERATED_USER_ID_ALREADY_LINKED"===r)throw sc(e,"credential-already-in-use",o);if("EMAIL_EXISTS"===r)throw sc(e,"email-already-in-use",o);if("USER_DISABLED"===r)throw sc(e,"user-disabled",o);const a=n[r]||r.toLowerCase().replace(/[_\s]+/g,"-");if(s)throw function(e,t,r){const n=Object.assign(Object.assign({},Ra()),{[t]:r});return new gs("auth","Firebase",n).create(t,{appName:e.name})}(e,a,s);Fa(e,a)}}catch(Md){if(Md instanceof ms)throw Md;Fa(e,"network-request-failed",{message:String(Md)})}}async function nc(e,t,r,n,i={}){const o=await tc(e,t,r,n,i);return"mfaPendingCredential"in o&&Fa(e,"multi-factor-auth-required",{_serverResponse:o}),o}function ic(e,t,r,n){const i=`${t}${r}?${n}`;return e.config.emulator?Ya(e.config,i):`${e.config.apiScheme}://${i}`}class oc{constructor(e){this.auth=e,this.timer=null,this.promise=new Promise(((e,t)=>{this.timer=setTimeout((()=>t(Ba(this.auth,"network-request-failed"))),Za.get())}))}clearNetworkTimeout(){clearTimeout(this.timer)}}function sc(e,t,r){const n={appName:e.name};r.email&&(n.email=r.email),r.phoneNumber&&(n.phoneNumber=r.phoneNumber);const i=Ba(e,t,n);return i.customData._tokenResponse=r,i}
515
515
  /**
516
516
  * @license
517
517
  * Copyright 2020 Google LLC
@@ -560,7 +560,7 @@ class Ga{constructor(e,t){this.shortDelay=e,this.longDelay=t,$a(t>e,"Short delay
560
560
  * See the License for the specific language governing permissions and
561
561
  * limitations under the License.
562
562
  */
563
- function cc(e){if(e)try{const t=new Date(Number(e));if(!isNaN(t.getTime()))return t.toUTCString()}catch(Ld){}}function lc(e){return 1e3*Number(e)}function uc(e){const[t,r,n]=e.split(".");if(void 0===t||void 0===r||void 0===n)return ja("JWT malformed, contained fewer than 3 sections"),null;try{const e=cs(r);return e?JSON.parse(e):(ja("Failed to decode base64 JWT payload"),null)}catch(Ld){return ja("Caught error parsing JWT payload as JSON",null==Ld?void 0:Ld.toString()),null}}
563
+ function cc(e){if(e)try{const t=new Date(Number(e));if(!isNaN(t.getTime()))return t.toUTCString()}catch(Md){}}function lc(e){return 1e3*Number(e)}function uc(e){const[t,r,n]=e.split(".");if(void 0===t||void 0===r||void 0===n)return ja("JWT malformed, contained fewer than 3 sections"),null;try{const e=cs(r);return e?JSON.parse(e):(ja("Failed to decode base64 JWT payload"),null)}catch(Md){return ja("Caught error parsing JWT payload as JSON",null==Md?void 0:Md.toString()),null}}
564
564
  /**
565
565
  * @license
566
566
  * Copyright 2020 Google LLC
@@ -577,7 +577,7 @@ function cc(e){if(e)try{const t=new Date(Number(e));if(!isNaN(t.getTime()))retur
577
577
  * See the License for the specific language governing permissions and
578
578
  * limitations under the License.
579
579
  */
580
- async function dc(e,t,r=!1){if(r)return t;try{return await t}catch(Ld){throw Ld instanceof ms&&function({code:e}){return"auth/user-disabled"===e||"auth/user-token-expired"===e}
580
+ async function dc(e,t,r=!1){if(r)return t;try{return await t}catch(Md){throw Md instanceof ms&&function({code:e}){return"auth/user-disabled"===e||"auth/user-token-expired"===e}
581
581
  /**
582
582
  * @license
583
583
  * Copyright 2020 Google LLC
@@ -593,7 +593,7 @@ async function dc(e,t,r=!1){if(r)return t;try{return await t}catch(Ld){throw Ld
593
593
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
594
594
  * See the License for the specific language governing permissions and
595
595
  * limitations under the License.
596
- */(Ld)&&e.auth.currentUser===e&&await e.auth.signOut(),Ld}}class hc{constructor(e){this.user=e,this.isRunning=!1,this.timerId=null,this.errorBackoff=3e4}_start(){this.isRunning||(this.isRunning=!0,this.schedule())}_stop(){this.isRunning&&(this.isRunning=!1,null!==this.timerId&&clearTimeout(this.timerId))}getInterval(e){var t;if(e){const e=this.errorBackoff;return this.errorBackoff=Math.min(2*this.errorBackoff,96e4),e}{this.errorBackoff=3e4;const e=(null!==(t=this.user.stsTokenManager.expirationTime)&&void 0!==t?t:0)-Date.now()-3e5;return Math.max(0,e)}}schedule(e=!1){if(!this.isRunning)return;const t=this.getInterval(e);this.timerId=setTimeout((async()=>{await this.iteration()}),t)}async iteration(){try{await this.user.getIdToken(!0)}catch(Ld){return void("auth/network-request-failed"===(null==Ld?void 0:Ld.code)&&this.schedule(!0))}this.schedule()}}
596
+ */(Md)&&e.auth.currentUser===e&&await e.auth.signOut(),Md}}class hc{constructor(e){this.user=e,this.isRunning=!1,this.timerId=null,this.errorBackoff=3e4}_start(){this.isRunning||(this.isRunning=!0,this.schedule())}_stop(){this.isRunning&&(this.isRunning=!1,null!==this.timerId&&clearTimeout(this.timerId))}getInterval(e){var t;if(e){const e=this.errorBackoff;return this.errorBackoff=Math.min(2*this.errorBackoff,96e4),e}{this.errorBackoff=3e4;const e=(null!==(t=this.user.stsTokenManager.expirationTime)&&void 0!==t?t:0)-Date.now()-3e5;return Math.max(0,e)}}schedule(e=!1){if(!this.isRunning)return;const t=this.getInterval(e);this.timerId=setTimeout((async()=>{await this.iteration()}),t)}async iteration(){try{await this.user.getIdToken(!0)}catch(Md){return void("auth/network-request-failed"===(null==Md?void 0:Md.code)&&this.schedule(!0))}this.schedule()}}
597
597
  /**
598
598
  * @license
599
599
  * Copyright 2020 Google LLC
@@ -788,7 +788,7 @@ function Dc(e,t=[]){let r;switch(e){case"Browser":r=Ic(fs());break;case"Worker":
788
788
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
789
789
  * See the License for the specific language governing permissions and
790
790
  * limitations under the License.
791
- */class Mc{constructor(e){this.auth=e,this.queue=[]}pushCallback(e,t){const r=t=>new Promise(((r,n)=>{try{r(e(t))}catch(Ld){n(Ld)}}));r.onAbort=t,this.queue.push(r);const n=this.queue.length-1;return()=>{this.queue[n]=()=>Promise.resolve()}}async runMiddleware(e){if(this.auth.currentUser===e)return;const t=[];try{for(const r of this.queue)await r(e),r.onAbort&&t.push(r.onAbort)}catch(Ld){t.reverse();for(const n of t)try{n()}catch(r){}throw this.auth._errorFactory.create("login-blocked",{originalMessage:null==Ld?void 0:Ld.message})}}}
791
+ */class Mc{constructor(e){this.auth=e,this.queue=[]}pushCallback(e,t){const r=t=>new Promise(((r,n)=>{try{r(e(t))}catch(Md){n(Md)}}));r.onAbort=t,this.queue.push(r);const n=this.queue.length-1;return()=>{this.queue[n]=()=>Promise.resolve()}}async runMiddleware(e){if(this.auth.currentUser===e)return;const t=[];try{for(const r of this.queue)await r(e),r.onAbort&&t.push(r.onAbort)}catch(Md){t.reverse();for(const n of t)try{n()}catch(r){}throw this.auth._errorFactory.create("login-blocked",{originalMessage:null==Md?void 0:Md.message})}}}
792
792
  /**
793
793
  * @license
794
794
  * Copyright 2023 Google LLC
@@ -820,7 +820,7 @@ function Dc(e,t=[]){let r;switch(e){case"Browser":r=Ic(fs());break;case"Worker":
820
820
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
821
821
  * See the License for the specific language governing permissions and
822
822
  * limitations under the License.
823
- */class jc{constructor(e,t,r,n){this.app=e,this.heartbeatServiceProvider=t,this.appCheckServiceProvider=r,this.config=n,this.currentUser=null,this.emulatorConfig=null,this.operations=Promise.resolve(),this.authStateSubscription=new Bc(this),this.idTokenSubscription=new Bc(this),this.beforeStateQueue=new Mc(this),this.redirectUser=null,this.isProactiveRefreshEnabled=!1,this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION=1,this._canInitEmulator=!0,this._isInitialized=!1,this._deleted=!1,this._initializationPromise=null,this._popupRedirectResolver=null,this._errorFactory=Oa,this._agentRecaptchaConfig=null,this._tenantRecaptchaConfigs={},this._projectPasswordPolicy=null,this._tenantPasswordPolicies={},this.lastNotifiedUid=void 0,this.languageCode=null,this.tenantId=null,this.settings={appVerificationDisabledForTesting:!1},this.frameworks=[],this.name=e.name,this.clientVersion=n.sdkClientVersion}_initializeWithPersistence(e,t){return t&&(this._popupRedirectResolver=yc(t)),this._initializationPromise=this.queue((async()=>{var r,n;if(!this._deleted&&(this.persistenceManager=await kc.create(this,e),!this._deleted)){if(null===(r=this._popupRedirectResolver)||void 0===r?void 0:r._shouldInitProactively)try{await this._popupRedirectResolver._initialize(this)}catch(Ld){}await this.initializeCurrentUser(t),this.lastNotifiedUid=(null===(n=this.currentUser)||void 0===n?void 0:n.uid)||null,this._deleted||(this._isInitialized=!0)}})),this._initializationPromise}async _onStorageEvent(){if(this._deleted)return;const e=await this.assertedPersistence.getCurrentUser();return this.currentUser||e?this.currentUser&&e&&this.currentUser.uid===e.uid?(this._currentUser._assign(e),void(await this.currentUser.getIdToken())):void(await this._updateCurrentUser(e,!0)):void 0}async initializeCurrentUser(e){var t;const r=await this.assertedPersistence.getCurrentUser();let n=r,i=!1;if(e&&this.config.authDomain){await this.getOrInitRedirectPersistenceManager();const r=null===(t=this.redirectUser)||void 0===t?void 0:t._redirectEventId,o=null==n?void 0:n._redirectEventId,s=await this.tryRedirectSignIn(e);r&&r!==o||!(null==s?void 0:s.user)||(n=s.user,i=!0)}if(!n)return this.directlySetCurrentUser(null);if(!n._redirectEventId){if(i)try{await this.beforeStateQueue.runMiddleware(n)}catch(Ld){n=r,this._popupRedirectResolver._overrideRedirectResult(this,(()=>Promise.reject(Ld)))}return n?this.reloadAndSetCurrentUserOrClear(n):this.directlySetCurrentUser(null)}return Ha(this._popupRedirectResolver,this,"argument-error"),await this.getOrInitRedirectPersistenceManager(),this.redirectUser&&this.redirectUser._redirectEventId===n._redirectEventId?this.directlySetCurrentUser(n):this.reloadAndSetCurrentUserOrClear(n)}async tryRedirectSignIn(e){let t=null;try{t=await this._popupRedirectResolver._completeRedirectFn(this,e,!0)}catch(Ld){await this._setRedirectUser(null)}return t}async reloadAndSetCurrentUserOrClear(e){try{await fc(e)}catch(Ld){if("auth/network-request-failed"!==(null==Ld?void 0:Ld.code))return this.directlySetCurrentUser(null)}return this.directlySetCurrentUser(e)}useDeviceLanguage(){this.languageCode=function(){if("undefined"==typeof navigator)return null;const e=navigator;return e.languages&&e.languages[0]||e.language||null}()}async _delete(){this._deleted=!0}async updateCurrentUser(e){const t=e?ks(e):null;return t&&Ha(t.auth.config.apiKey===this.config.apiKey,this,"invalid-user-token"),this._updateCurrentUser(t&&t._clone(this))}async _updateCurrentUser(e,t=!1){if(!this._deleted)return e&&Ha(this.tenantId===e.tenantId,this,"tenant-id-mismatch"),t||await this.beforeStateQueue.runMiddleware(e),this.queue((async()=>{await this.directlySetCurrentUser(e),this.notifyAuthListeners()}))}async signOut(){return await this.beforeStateQueue.runMiddleware(null),(this.redirectPersistenceManager||this._popupRedirectResolver)&&await this._setRedirectUser(null),this._updateCurrentUser(null,!0)}setPersistence(e){return this.queue((async()=>{await this.assertedPersistence.setPersistence(yc(e))}))}_getRecaptchaConfig(){return null==this.tenantId?this._agentRecaptchaConfig:this._tenantRecaptchaConfigs[this.tenantId]}async validatePassword(e){this._getPasswordPolicyInternal()||await this._updatePasswordPolicy();const t=this._getPasswordPolicyInternal();return t.schemaVersion!==this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION?Promise.reject(this._errorFactory.create("unsupported-password-policy-schema-version",{})):t.validatePassword(e)}_getPasswordPolicyInternal(){return null===this.tenantId?this._projectPasswordPolicy:this._tenantPasswordPolicies[this.tenantId]}async _updatePasswordPolicy(){const e=await async function(e,t={}){return tc(e,"GET","/v2/passwordPolicy",ec(e,t))}
823
+ */class jc{constructor(e,t,r,n){this.app=e,this.heartbeatServiceProvider=t,this.appCheckServiceProvider=r,this.config=n,this.currentUser=null,this.emulatorConfig=null,this.operations=Promise.resolve(),this.authStateSubscription=new Bc(this),this.idTokenSubscription=new Bc(this),this.beforeStateQueue=new Mc(this),this.redirectUser=null,this.isProactiveRefreshEnabled=!1,this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION=1,this._canInitEmulator=!0,this._isInitialized=!1,this._deleted=!1,this._initializationPromise=null,this._popupRedirectResolver=null,this._errorFactory=Oa,this._agentRecaptchaConfig=null,this._tenantRecaptchaConfigs={},this._projectPasswordPolicy=null,this._tenantPasswordPolicies={},this.lastNotifiedUid=void 0,this.languageCode=null,this.tenantId=null,this.settings={appVerificationDisabledForTesting:!1},this.frameworks=[],this.name=e.name,this.clientVersion=n.sdkClientVersion}_initializeWithPersistence(e,t){return t&&(this._popupRedirectResolver=yc(t)),this._initializationPromise=this.queue((async()=>{var r,n;if(!this._deleted&&(this.persistenceManager=await kc.create(this,e),!this._deleted)){if(null===(r=this._popupRedirectResolver)||void 0===r?void 0:r._shouldInitProactively)try{await this._popupRedirectResolver._initialize(this)}catch(Md){}await this.initializeCurrentUser(t),this.lastNotifiedUid=(null===(n=this.currentUser)||void 0===n?void 0:n.uid)||null,this._deleted||(this._isInitialized=!0)}})),this._initializationPromise}async _onStorageEvent(){if(this._deleted)return;const e=await this.assertedPersistence.getCurrentUser();return this.currentUser||e?this.currentUser&&e&&this.currentUser.uid===e.uid?(this._currentUser._assign(e),void(await this.currentUser.getIdToken())):void(await this._updateCurrentUser(e,!0)):void 0}async initializeCurrentUser(e){var t;const r=await this.assertedPersistence.getCurrentUser();let n=r,i=!1;if(e&&this.config.authDomain){await this.getOrInitRedirectPersistenceManager();const r=null===(t=this.redirectUser)||void 0===t?void 0:t._redirectEventId,o=null==n?void 0:n._redirectEventId,s=await this.tryRedirectSignIn(e);r&&r!==o||!(null==s?void 0:s.user)||(n=s.user,i=!0)}if(!n)return this.directlySetCurrentUser(null);if(!n._redirectEventId){if(i)try{await this.beforeStateQueue.runMiddleware(n)}catch(Md){n=r,this._popupRedirectResolver._overrideRedirectResult(this,(()=>Promise.reject(Md)))}return n?this.reloadAndSetCurrentUserOrClear(n):this.directlySetCurrentUser(null)}return Ha(this._popupRedirectResolver,this,"argument-error"),await this.getOrInitRedirectPersistenceManager(),this.redirectUser&&this.redirectUser._redirectEventId===n._redirectEventId?this.directlySetCurrentUser(n):this.reloadAndSetCurrentUserOrClear(n)}async tryRedirectSignIn(e){let t=null;try{t=await this._popupRedirectResolver._completeRedirectFn(this,e,!0)}catch(Md){await this._setRedirectUser(null)}return t}async reloadAndSetCurrentUserOrClear(e){try{await fc(e)}catch(Md){if("auth/network-request-failed"!==(null==Md?void 0:Md.code))return this.directlySetCurrentUser(null)}return this.directlySetCurrentUser(e)}useDeviceLanguage(){this.languageCode=function(){if("undefined"==typeof navigator)return null;const e=navigator;return e.languages&&e.languages[0]||e.language||null}()}async _delete(){this._deleted=!0}async updateCurrentUser(e){const t=e?ks(e):null;return t&&Ha(t.auth.config.apiKey===this.config.apiKey,this,"invalid-user-token"),this._updateCurrentUser(t&&t._clone(this))}async _updateCurrentUser(e,t=!1){if(!this._deleted)return e&&Ha(this.tenantId===e.tenantId,this,"tenant-id-mismatch"),t||await this.beforeStateQueue.runMiddleware(e),this.queue((async()=>{await this.directlySetCurrentUser(e),this.notifyAuthListeners()}))}async signOut(){return await this.beforeStateQueue.runMiddleware(null),(this.redirectPersistenceManager||this._popupRedirectResolver)&&await this._setRedirectUser(null),this._updateCurrentUser(null,!0)}setPersistence(e){return this.queue((async()=>{await this.assertedPersistence.setPersistence(yc(e))}))}_getRecaptchaConfig(){return null==this.tenantId?this._agentRecaptchaConfig:this._tenantRecaptchaConfigs[this.tenantId]}async validatePassword(e){this._getPasswordPolicyInternal()||await this._updatePasswordPolicy();const t=this._getPasswordPolicyInternal();return t.schemaVersion!==this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION?Promise.reject(this._errorFactory.create("unsupported-password-policy-schema-version",{})):t.validatePassword(e)}_getPasswordPolicyInternal(){return null===this.tenantId?this._projectPasswordPolicy:this._tenantPasswordPolicies[this.tenantId]}async _updatePasswordPolicy(){const e=await async function(e,t={}){return tc(e,"GET","/v2/passwordPolicy",ec(e,t))}
824
824
  /**
825
825
  * @license
826
826
  * Copyright 2023 Google LLC
@@ -1130,7 +1130,7 @@ async function al(e,t,r=!1){const n="signIn",i=await sl(e,n,t),o=await nl._fromI
1130
1130
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1131
1131
  * See the License for the specific language governing permissions and
1132
1132
  * limitations under the License.
1133
- */class ul extends ll{constructor(){super((()=>window.localStorage),"LOCAL"),this.boundEventHandler=(e,t)=>this.onStorageEvent(e,t),this.listeners={},this.localCache={},this.pollTimer=null,this.safariLocalStorageNotSynced=function(){const e=fs();return Cc(e)||Nc(e)}()&&function(){try{return!(!window||window===window.top)}catch(Ld){return!1}}(),this.fallbackToPolling=Lc(),this._shouldAllowMigration=!0}forAllChangedKeys(e){for(const t of Object.keys(this.listeners)){const r=this.storage.getItem(t),n=this.localCache[t];r!==n&&e(t,n,r)}}onStorageEvent(e,t=!1){if(!e.key)return void this.forAllChangedKeys(((e,t,r)=>{this.notifyListeners(e,r)}));const r=e.key;if(t?this.detachListener():this.stopPolling(),this.safariLocalStorageNotSynced){const n=this.storage.getItem(r);if(e.newValue!==n)null!==e.newValue?this.storage.setItem(r,e.newValue):this.storage.removeItem(r);else if(this.localCache[r]===e.newValue&&!t)return}const n=()=>{const e=this.storage.getItem(r);(t||this.localCache[r]!==e)&&this.notifyListeners(r,e)},i=this.storage.getItem(r);xc()&&i!==e.newValue&&e.newValue!==e.oldValue?setTimeout(n,10):n()}notifyListeners(e,t){this.localCache[e]=t;const r=this.listeners[e];if(r)for(const n of Array.from(r))n(t?JSON.parse(t):t)}startPolling(){this.stopPolling(),this.pollTimer=setInterval((()=>{this.forAllChangedKeys(((e,t,r)=>{this.onStorageEvent(new StorageEvent("storage",{key:e,oldValue:t,newValue:r}),!0)}))}),1e3)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}attachListener(){window.addEventListener("storage",this.boundEventHandler)}detachListener(){window.removeEventListener("storage",this.boundEventHandler)}_addListener(e,t){0===Object.keys(this.listeners).length&&(this.fallbackToPolling?this.startPolling():this.attachListener()),this.listeners[e]||(this.listeners[e]=new Set,this.localCache[e]=this.storage.getItem(e)),this.listeners[e].add(t)}_removeListener(e,t){this.listeners[e]&&(this.listeners[e].delete(t),0===this.listeners[e].size&&delete this.listeners[e]),0===Object.keys(this.listeners).length&&(this.detachListener(),this.stopPolling())}async _set(e,t){await super._set(e,t),this.localCache[e]=JSON.stringify(t)}async _get(e){const t=await super._get(e);return this.localCache[e]=JSON.stringify(t),t}async _remove(e){await super._remove(e),delete this.localCache[e]}}ul.type="LOCAL";const dl=ul;
1133
+ */class ul extends ll{constructor(){super((()=>window.localStorage),"LOCAL"),this.boundEventHandler=(e,t)=>this.onStorageEvent(e,t),this.listeners={},this.localCache={},this.pollTimer=null,this.safariLocalStorageNotSynced=function(){const e=fs();return Cc(e)||Nc(e)}()&&function(){try{return!(!window||window===window.top)}catch(Md){return!1}}(),this.fallbackToPolling=Lc(),this._shouldAllowMigration=!0}forAllChangedKeys(e){for(const t of Object.keys(this.listeners)){const r=this.storage.getItem(t),n=this.localCache[t];r!==n&&e(t,n,r)}}onStorageEvent(e,t=!1){if(!e.key)return void this.forAllChangedKeys(((e,t,r)=>{this.notifyListeners(e,r)}));const r=e.key;if(t?this.detachListener():this.stopPolling(),this.safariLocalStorageNotSynced){const n=this.storage.getItem(r);if(e.newValue!==n)null!==e.newValue?this.storage.setItem(r,e.newValue):this.storage.removeItem(r);else if(this.localCache[r]===e.newValue&&!t)return}const n=()=>{const e=this.storage.getItem(r);(t||this.localCache[r]!==e)&&this.notifyListeners(r,e)},i=this.storage.getItem(r);xc()&&i!==e.newValue&&e.newValue!==e.oldValue?setTimeout(n,10):n()}notifyListeners(e,t){this.localCache[e]=t;const r=this.listeners[e];if(r)for(const n of Array.from(r))n(t?JSON.parse(t):t)}startPolling(){this.stopPolling(),this.pollTimer=setInterval((()=>{this.forAllChangedKeys(((e,t,r)=>{this.onStorageEvent(new StorageEvent("storage",{key:e,oldValue:t,newValue:r}),!0)}))}),1e3)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}attachListener(){window.addEventListener("storage",this.boundEventHandler)}detachListener(){window.removeEventListener("storage",this.boundEventHandler)}_addListener(e,t){0===Object.keys(this.listeners).length&&(this.fallbackToPolling?this.startPolling():this.attachListener()),this.listeners[e]||(this.listeners[e]=new Set,this.localCache[e]=this.storage.getItem(e)),this.listeners[e].add(t)}_removeListener(e,t){this.listeners[e]&&(this.listeners[e].delete(t),0===this.listeners[e].size&&delete this.listeners[e]),0===Object.keys(this.listeners).length&&(this.detachListener(),this.stopPolling())}async _set(e,t){await super._set(e,t),this.localCache[e]=JSON.stringify(t)}async _get(e){const t=await super._get(e);return this.localCache[e]=JSON.stringify(t),t}async _remove(e){await super._remove(e),delete this.localCache[e]}}ul.type="LOCAL";const dl=ul;
1134
1134
  /**
1135
1135
  * @license
1136
1136
  * Copyright 2020 Google LLC
@@ -1262,7 +1262,7 @@ function vl(){return void 0!==_l().WorkerGlobalScope&&"function"==typeof _l().im
1262
1262
  * See the License for the specific language governing permissions and
1263
1263
  * limitations under the License.
1264
1264
  */
1265
- const yl="firebaseLocalStorageDb",wl="firebaseLocalStorage",bl="fbase_key";class El{constructor(e){this.request=e}toPromise(){return new Promise(((e,t)=>{this.request.addEventListener("success",(()=>{e(this.request.result)})),this.request.addEventListener("error",(()=>{t(this.request.error)}))}))}}function kl(e,t){return e.transaction([wl],t?"readwrite":"readonly").objectStore(wl)}function Il(){const e=indexedDB.open(yl,1);return new Promise(((t,r)=>{e.addEventListener("error",(()=>{r(e.error)})),e.addEventListener("upgradeneeded",(()=>{const t=e.result;try{t.createObjectStore(wl,{keyPath:bl})}catch(Ld){r(Ld)}})),e.addEventListener("success",(async()=>{const r=e.result;r.objectStoreNames.contains(wl)?t(r):(r.close(),await function(){const e=indexedDB.deleteDatabase(yl);return new El(e).toPromise()}(),t(await Il()))}))}))}async function Tl(e,t,r){const n=kl(e,!0).put({[bl]:t,value:r});return new El(n).toPromise()}function Cl(e,t){const r=kl(e,!0).delete(t);return new El(r).toPromise()}class Sl{constructor(){this.type="LOCAL",this._shouldAllowMigration=!0,this.listeners={},this.localCache={},this.pollTimer=null,this.pendingWrites=0,this.receiver=null,this.sender=null,this.serviceWorkerReceiverAvailable=!1,this.activeServiceWorker=null,this._workerInitializationPromise=this.initializeServiceWorkerMessaging().then((()=>{}),(()=>{}))}async _openDb(){return this.db||(this.db=await Il()),this.db}async _withRetries(e){let t=0;for(;;)try{const t=await this._openDb();return await e(t)}catch(Ld){if(t++>3)throw Ld;this.db&&(this.db.close(),this.db=void 0)}}async initializeServiceWorkerMessaging(){return vl()?this.initializeReceiver():this.initializeSender()}async initializeReceiver(){this.receiver=fl._getInstance(vl()?self:null),this.receiver._subscribe("keyChanged",(async(e,t)=>({keyProcessed:(await this._poll()).includes(t.key)}))),this.receiver._subscribe("ping",(async(e,t)=>["keyChanged"]))}async initializeSender(){var e,t;if(this.activeServiceWorker=await async function(){if(!(null===navigator||void 0===navigator?void 0:navigator.serviceWorker))return null;try{return(await navigator.serviceWorker.ready).active}catch(e){return null}}(),!this.activeServiceWorker)return;this.sender=new gl(this.activeServiceWorker);const r=await this.sender._send("ping",{},800);r&&(null===(e=r[0])||void 0===e?void 0:e.fulfilled)&&(null===(t=r[0])||void 0===t?void 0:t.value.includes("keyChanged"))&&(this.serviceWorkerReceiverAvailable=!0)}async notifyServiceWorker(e){var t;if(this.sender&&this.activeServiceWorker&&((null===(t=null===navigator||void 0===navigator?void 0:navigator.serviceWorker)||void 0===t?void 0:t.controller)||null)===this.activeServiceWorker)try{await this.sender._send("keyChanged",{key:e},this.serviceWorkerReceiverAvailable?800:50)}catch(t){}}async _isAvailable(){try{if(!indexedDB)return!1;const e=await Il();return await Tl(e,cl,"1"),await Cl(e,cl),!0}catch(e){}return!1}async _withPendingWrite(e){this.pendingWrites++;try{await e()}finally{this.pendingWrites--}}async _set(e,t){return this._withPendingWrite((async()=>(await this._withRetries((r=>Tl(r,e,t))),this.localCache[e]=t,this.notifyServiceWorker(e))))}async _get(e){const t=await this._withRetries((t=>async function(e,t){const r=kl(e,!1).get(t),n=await new El(r).toPromise();return void 0===n?null:n.value}(t,e)));return this.localCache[e]=t,t}async _remove(e){return this._withPendingWrite((async()=>(await this._withRetries((t=>Cl(t,e))),delete this.localCache[e],this.notifyServiceWorker(e))))}async _poll(){const e=await this._withRetries((e=>{const t=kl(e,!1).getAll();return new El(t).toPromise()}));if(!e)return[];if(0!==this.pendingWrites)return[];const t=[],r=new Set;for(const{fbase_key:n,value:i}of e)r.add(n),JSON.stringify(this.localCache[n])!==JSON.stringify(i)&&(this.notifyListeners(n,i),t.push(n));for(const n of Object.keys(this.localCache))this.localCache[n]&&!r.has(n)&&(this.notifyListeners(n,null),t.push(n));return t}notifyListeners(e,t){this.localCache[e]=t;const r=this.listeners[e];if(r)for(const n of Array.from(r))n(t)}startPolling(){this.stopPolling(),this.pollTimer=setInterval((async()=>this._poll()),800)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}_addListener(e,t){0===Object.keys(this.listeners).length&&this.startPolling(),this.listeners[e]||(this.listeners[e]=new Set,this._get(e)),this.listeners[e].add(t)}_removeListener(e,t){this.listeners[e]&&(this.listeners[e].delete(t),0===this.listeners[e].size&&delete this.listeners[e]),0===Object.keys(this.listeners).length&&this.stopPolling()}}Sl.type="LOCAL";const Rl=Sl;
1265
+ const yl="firebaseLocalStorageDb",wl="firebaseLocalStorage",bl="fbase_key";class El{constructor(e){this.request=e}toPromise(){return new Promise(((e,t)=>{this.request.addEventListener("success",(()=>{e(this.request.result)})),this.request.addEventListener("error",(()=>{t(this.request.error)}))}))}}function kl(e,t){return e.transaction([wl],t?"readwrite":"readonly").objectStore(wl)}function Il(){const e=indexedDB.open(yl,1);return new Promise(((t,r)=>{e.addEventListener("error",(()=>{r(e.error)})),e.addEventListener("upgradeneeded",(()=>{const t=e.result;try{t.createObjectStore(wl,{keyPath:bl})}catch(Md){r(Md)}})),e.addEventListener("success",(async()=>{const r=e.result;r.objectStoreNames.contains(wl)?t(r):(r.close(),await function(){const e=indexedDB.deleteDatabase(yl);return new El(e).toPromise()}(),t(await Il()))}))}))}async function Tl(e,t,r){const n=kl(e,!0).put({[bl]:t,value:r});return new El(n).toPromise()}function Cl(e,t){const r=kl(e,!0).delete(t);return new El(r).toPromise()}class Sl{constructor(){this.type="LOCAL",this._shouldAllowMigration=!0,this.listeners={},this.localCache={},this.pollTimer=null,this.pendingWrites=0,this.receiver=null,this.sender=null,this.serviceWorkerReceiverAvailable=!1,this.activeServiceWorker=null,this._workerInitializationPromise=this.initializeServiceWorkerMessaging().then((()=>{}),(()=>{}))}async _openDb(){return this.db||(this.db=await Il()),this.db}async _withRetries(e){let t=0;for(;;)try{const t=await this._openDb();return await e(t)}catch(Md){if(t++>3)throw Md;this.db&&(this.db.close(),this.db=void 0)}}async initializeServiceWorkerMessaging(){return vl()?this.initializeReceiver():this.initializeSender()}async initializeReceiver(){this.receiver=fl._getInstance(vl()?self:null),this.receiver._subscribe("keyChanged",(async(e,t)=>({keyProcessed:(await this._poll()).includes(t.key)}))),this.receiver._subscribe("ping",(async(e,t)=>["keyChanged"]))}async initializeSender(){var e,t;if(this.activeServiceWorker=await async function(){if(!(null===navigator||void 0===navigator?void 0:navigator.serviceWorker))return null;try{return(await navigator.serviceWorker.ready).active}catch(e){return null}}(),!this.activeServiceWorker)return;this.sender=new gl(this.activeServiceWorker);const r=await this.sender._send("ping",{},800);r&&(null===(e=r[0])||void 0===e?void 0:e.fulfilled)&&(null===(t=r[0])||void 0===t?void 0:t.value.includes("keyChanged"))&&(this.serviceWorkerReceiverAvailable=!0)}async notifyServiceWorker(e){var t;if(this.sender&&this.activeServiceWorker&&((null===(t=null===navigator||void 0===navigator?void 0:navigator.serviceWorker)||void 0===t?void 0:t.controller)||null)===this.activeServiceWorker)try{await this.sender._send("keyChanged",{key:e},this.serviceWorkerReceiverAvailable?800:50)}catch(t){}}async _isAvailable(){try{if(!indexedDB)return!1;const e=await Il();return await Tl(e,cl,"1"),await Cl(e,cl),!0}catch(e){}return!1}async _withPendingWrite(e){this.pendingWrites++;try{await e()}finally{this.pendingWrites--}}async _set(e,t){return this._withPendingWrite((async()=>(await this._withRetries((r=>Tl(r,e,t))),this.localCache[e]=t,this.notifyServiceWorker(e))))}async _get(e){const t=await this._withRetries((t=>async function(e,t){const r=kl(e,!1).get(t),n=await new El(r).toPromise();return void 0===n?null:n.value}(t,e)));return this.localCache[e]=t,t}async _remove(e){return this._withPendingWrite((async()=>(await this._withRetries((t=>Cl(t,e))),delete this.localCache[e],this.notifyServiceWorker(e))))}async _poll(){const e=await this._withRetries((e=>{const t=kl(e,!1).getAll();return new El(t).toPromise()}));if(!e)return[];if(0!==this.pendingWrites)return[];const t=[],r=new Set;for(const{fbase_key:n,value:i}of e)r.add(n),JSON.stringify(this.localCache[n])!==JSON.stringify(i)&&(this.notifyListeners(n,i),t.push(n));for(const n of Object.keys(this.localCache))this.localCache[n]&&!r.has(n)&&(this.notifyListeners(n,null),t.push(n));return t}notifyListeners(e,t){this.localCache[e]=t;const r=this.listeners[e];if(r)for(const n of Array.from(r))n(t)}startPolling(){this.stopPolling(),this.pollTimer=setInterval((async()=>this._poll()),800)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}_addListener(e,t){0===Object.keys(this.listeners).length&&this.startPolling(),this.listeners[e]||(this.listeners[e]=new Set,this._get(e)),this.listeners[e].add(t)}_removeListener(e,t){this.listeners[e]&&(this.listeners[e].delete(t),0===this.listeners[e].size&&delete this.listeners[e]),0===Object.keys(this.listeners).length&&this.stopPolling()}}Sl.type="LOCAL";const Rl=Sl;
1266
1266
  /**
1267
1267
  * @license
1268
1268
  * Copyright 2020 Google LLC
@@ -1311,7 +1311,7 @@ const Ol=1e12;class Al{constructor(e){this.auth=e,this.counter=Ol,this._widgets=
1311
1311
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1312
1312
  * See the License for the specific language governing permissions and
1313
1313
  * limitations under the License.
1314
- */(50);const{callback:e,"expired-callback":t}=this.params;if(e)try{e(this.responseToken)}catch(Ld){}this.timerId=window.setTimeout((()=>{if(this.timerId=null,this.responseToken=null,t)try{t()}catch(Ld){}this.isVisible&&this.execute()}),6e4)}),500))}checkIfDeleted(){if(this.deleted)throw new Error("reCAPTCHA mock was already deleted!")}}const Nl=Hc("rcb"),xl=new Ga(3e4,6e4);class Ll{constructor(){var e;this.hostLanguage="",this.counter=0,this.librarySeparatelyLoaded=!!(null===(e=_l().grecaptcha)||void 0===e?void 0:e.render)}load(e,t=""){return Ha(function(e){return e.length<=6&&/^\s*[a-zA-Z0-9\-]*\s*$/.test(e)}(t),e,"argument-error"),this.shouldResolveImmediately(t)&&ac(_l().grecaptcha)?Promise.resolve(_l().grecaptcha):new Promise(((r,n)=>{const i=_l().setTimeout((()=>{n(Ba(e,"network-request-failed"))}),xl.get());_l()[Nl]=()=>{_l().clearTimeout(i),delete _l()[Nl];const o=_l().grecaptcha;if(!o||!ac(o))return void n(Ba(e,"internal-error"));const s=o.render;o.render=(e,t)=>{const r=s(e,t);return this.counter++,r},this.hostLanguage=t,r(o)};zc(`https://www.google.com/recaptcha/api.js??${ws({onload:Nl,render:"explicit",hl:t})}`).catch((()=>{clearTimeout(i),n(Ba(e,"internal-error"))}))}))}clearedOneInstance(){this.counter--}shouldResolveImmediately(e){var t;return!!(null===(t=_l().grecaptcha)||void 0===t?void 0:t.render)&&(e===this.hostLanguage||this.counter>0||this.librarySeparatelyLoaded)}}class Dl{async load(e){return new Al(e)}clearedOneInstance(){}}
1314
+ */(50);const{callback:e,"expired-callback":t}=this.params;if(e)try{e(this.responseToken)}catch(Md){}this.timerId=window.setTimeout((()=>{if(this.timerId=null,this.responseToken=null,t)try{t()}catch(Md){}this.isVisible&&this.execute()}),6e4)}),500))}checkIfDeleted(){if(this.deleted)throw new Error("reCAPTCHA mock was already deleted!")}}const Nl=Hc("rcb"),xl=new Ga(3e4,6e4);class Ll{constructor(){var e;this.hostLanguage="",this.counter=0,this.librarySeparatelyLoaded=!!(null===(e=_l().grecaptcha)||void 0===e?void 0:e.render)}load(e,t=""){return Ha(function(e){return e.length<=6&&/^\s*[a-zA-Z0-9\-]*\s*$/.test(e)}(t),e,"argument-error"),this.shouldResolveImmediately(t)&&ac(_l().grecaptcha)?Promise.resolve(_l().grecaptcha):new Promise(((r,n)=>{const i=_l().setTimeout((()=>{n(Ba(e,"network-request-failed"))}),xl.get());_l()[Nl]=()=>{_l().clearTimeout(i),delete _l()[Nl];const o=_l().grecaptcha;if(!o||!ac(o))return void n(Ba(e,"internal-error"));const s=o.render;o.render=(e,t)=>{const r=s(e,t);return this.counter++,r},this.hostLanguage=t,r(o)};zc(`https://www.google.com/recaptcha/api.js??${ws({onload:Nl,render:"explicit",hl:t})}`).catch((()=>{clearTimeout(i),n(Ba(e,"internal-error"))}))}))}clearedOneInstance(){this.counter--}shouldResolveImmediately(e){var t;return!!(null===(t=_l().grecaptcha)||void 0===t?void 0:t.render)&&(e===this.hostLanguage||this.counter>0||this.librarySeparatelyLoaded)}}class Dl{async load(e){return new Al(e)}clearedOneInstance(){}}
1315
1315
  /**
1316
1316
  * @license
1317
1317
  * Copyright 2020 Google LLC
@@ -1327,7 +1327,7 @@ const Ol=1e12;class Al{constructor(e){this.auth=e,this.counter=Ol,this._widgets=
1327
1327
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1328
1328
  * See the License for the specific language governing permissions and
1329
1329
  * limitations under the License.
1330
- */const Ml="recaptcha",Ul={theme:"light",type:"image"};class jl{constructor(e,t,r=Object.assign({},Ul)){this.parameters=r,this.type=Ml,this.destroyed=!1,this.widgetId=null,this.tokenChangeListeners=new Set,this.renderPromise=null,this.recaptcha=null,this.auth=Fc(e),this.isInvisible="invisible"===this.parameters.size,Ha("undefined"!=typeof document,this.auth,"operation-not-supported-in-this-environment");const n="string"==typeof t?document.getElementById(t):t;Ha(n,this.auth,"argument-error"),this.container=n,this.parameters.callback=this.makeTokenCallback(this.parameters.callback),this._recaptchaLoader=this.auth.settings.appVerificationDisabledForTesting?new Dl:new Ll,this.validateStartingState()}async verify(){this.assertNotDestroyed();const e=await this.render(),t=this.getAssertedRecaptcha(),r=t.getResponse(e);return r||new Promise((r=>{const n=e=>{e&&(this.tokenChangeListeners.delete(n),r(e))};this.tokenChangeListeners.add(n),this.isInvisible&&t.execute(e)}))}render(){try{this.assertNotDestroyed()}catch(Ld){return Promise.reject(Ld)}return this.renderPromise||(this.renderPromise=this.makeRenderPromise().catch((e=>{throw this.renderPromise=null,e}))),this.renderPromise}_reset(){this.assertNotDestroyed(),null!==this.widgetId&&this.getAssertedRecaptcha().reset(this.widgetId)}clear(){this.assertNotDestroyed(),this.destroyed=!0,this._recaptchaLoader.clearedOneInstance(),this.isInvisible||this.container.childNodes.forEach((e=>{this.container.removeChild(e)}))}validateStartingState(){Ha(!this.parameters.sitekey,this.auth,"argument-error"),Ha(this.isInvisible||!this.container.hasChildNodes(),this.auth,"argument-error"),Ha("undefined"!=typeof document,this.auth,"operation-not-supported-in-this-environment")}makeTokenCallback(e){return t=>{if(this.tokenChangeListeners.forEach((e=>e(t))),"function"==typeof e)e(t);else if("string"==typeof e){const r=_l()[e];"function"==typeof r&&r(t)}}}assertNotDestroyed(){Ha(!this.destroyed,this.auth,"internal-error")}async makeRenderPromise(){if(await this.init(),!this.widgetId){let e=this.container;if(!this.isInvisible){const t=document.createElement("div");e.appendChild(t),e=t}this.widgetId=this.getAssertedRecaptcha().render(e,this.parameters)}return this.widgetId}async init(){Ha(Wa()&&!vl(),this.auth,"internal-error"),await function(){let e=null;return new Promise((t=>{"complete"!==document.readyState?(e=()=>t(),window.addEventListener("load",e)):t()})).catch((t=>{throw e&&window.removeEventListener("load",e),t}))}(),this.recaptcha=await this._recaptchaLoader.load(this.auth,this.auth.languageCode||void 0);const e=await async function(e){return(await tc(e,"GET","/v1/recaptchaParams")).recaptchaSiteKey||""}(this.auth);Ha(e,this.auth,"internal-error"),this.parameters.sitekey=e}getAssertedRecaptcha(){return Ha(this.recaptcha,this.auth,"internal-error"),this.recaptcha}}async function Fl(e,t,r){var n;const i=await r.verify();try{let o;if(Ha("string"==typeof i,e,"argument-error"),Ha(r.type===Ml,e,"argument-error"),o="string"==typeof t?{phoneNumber:t}:t,"session"in o){const t=o.session;if("phoneNumber"in o){Ha("enroll"===t.type,e,"internal-error");const r=
1330
+ */const Ml="recaptcha",Ul={theme:"light",type:"image"};class jl{constructor(e,t,r=Object.assign({},Ul)){this.parameters=r,this.type=Ml,this.destroyed=!1,this.widgetId=null,this.tokenChangeListeners=new Set,this.renderPromise=null,this.recaptcha=null,this.auth=Fc(e),this.isInvisible="invisible"===this.parameters.size,Ha("undefined"!=typeof document,this.auth,"operation-not-supported-in-this-environment");const n="string"==typeof t?document.getElementById(t):t;Ha(n,this.auth,"argument-error"),this.container=n,this.parameters.callback=this.makeTokenCallback(this.parameters.callback),this._recaptchaLoader=this.auth.settings.appVerificationDisabledForTesting?new Dl:new Ll,this.validateStartingState()}async verify(){this.assertNotDestroyed();const e=await this.render(),t=this.getAssertedRecaptcha(),r=t.getResponse(e);return r||new Promise((r=>{const n=e=>{e&&(this.tokenChangeListeners.delete(n),r(e))};this.tokenChangeListeners.add(n),this.isInvisible&&t.execute(e)}))}render(){try{this.assertNotDestroyed()}catch(Md){return Promise.reject(Md)}return this.renderPromise||(this.renderPromise=this.makeRenderPromise().catch((e=>{throw this.renderPromise=null,e}))),this.renderPromise}_reset(){this.assertNotDestroyed(),null!==this.widgetId&&this.getAssertedRecaptcha().reset(this.widgetId)}clear(){this.assertNotDestroyed(),this.destroyed=!0,this._recaptchaLoader.clearedOneInstance(),this.isInvisible||this.container.childNodes.forEach((e=>{this.container.removeChild(e)}))}validateStartingState(){Ha(!this.parameters.sitekey,this.auth,"argument-error"),Ha(this.isInvisible||!this.container.hasChildNodes(),this.auth,"argument-error"),Ha("undefined"!=typeof document,this.auth,"operation-not-supported-in-this-environment")}makeTokenCallback(e){return t=>{if(this.tokenChangeListeners.forEach((e=>e(t))),"function"==typeof e)e(t);else if("string"==typeof e){const r=_l()[e];"function"==typeof r&&r(t)}}}assertNotDestroyed(){Ha(!this.destroyed,this.auth,"internal-error")}async makeRenderPromise(){if(await this.init(),!this.widgetId){let e=this.container;if(!this.isInvisible){const t=document.createElement("div");e.appendChild(t),e=t}this.widgetId=this.getAssertedRecaptcha().render(e,this.parameters)}return this.widgetId}async init(){Ha(Wa()&&!vl(),this.auth,"internal-error"),await function(){let e=null;return new Promise((t=>{"complete"!==document.readyState?(e=()=>t(),window.addEventListener("load",e)):t()})).catch((t=>{throw e&&window.removeEventListener("load",e),t}))}(),this.recaptcha=await this._recaptchaLoader.load(this.auth,this.auth.languageCode||void 0);const e=await async function(e){return(await tc(e,"GET","/v1/recaptchaParams")).recaptchaSiteKey||""}(this.auth);Ha(e,this.auth,"internal-error"),this.parameters.sitekey=e}getAssertedRecaptcha(){return Ha(this.recaptcha,this.auth,"internal-error"),this.recaptcha}}async function Fl(e,t,r){var n;const i=await r.verify();try{let o;if(Ha("string"==typeof i,e,"argument-error"),Ha(r.type===Ml,e,"argument-error"),o="string"==typeof t?{phoneNumber:t}:t,"session"in o){const t=o.session;if("phoneNumber"in o){Ha("enroll"===t.type,e,"internal-error");const r=
1331
1331
  /**
1332
1332
  * @license
1333
1333
  * Copyright 2020 Google LLC
@@ -1393,7 +1393,7 @@ class zl extends Wc{constructor(e){super("custom","custom"),this.params=e}_getId
1393
1393
  * See the License for the specific language governing permissions and
1394
1394
  * limitations under the License.
1395
1395
  */
1396
- async function(e,t,r=!1){const{auth:n}=e,i="reauthenticate";try{const o=await dc(e,sl(n,i,t,e),r);Ha(o.idToken,n,"internal-error");const s=uc(o.idToken);Ha(s,n,"internal-error");const{sub:a}=s;return Ha(e.uid===a,n,"user-mismatch"),nl._forOperation(e,i,o)}catch(Ld){throw"auth/user-not-found"===(null==Ld?void 0:Ld.code)&&Fa(n,"user-mismatch"),Ld}}(r,new zl(e),e.bypassAuthState)}async function $l(e){const{auth:t,user:r}=e;return Ha(r,t,"internal-error"),async function(e,t,r=!1){const n=await dc(e,t._linkToIdToken(e.auth,await e.getIdToken()),r);return nl._forOperation(e,"link",n)}(r,new zl(e),e.bypassAuthState)}
1396
+ async function(e,t,r=!1){const{auth:n}=e,i="reauthenticate";try{const o=await dc(e,sl(n,i,t,e),r);Ha(o.idToken,n,"internal-error");const s=uc(o.idToken);Ha(s,n,"internal-error");const{sub:a}=s;return Ha(e.uid===a,n,"user-mismatch"),nl._forOperation(e,i,o)}catch(Md){throw"auth/user-not-found"===(null==Md?void 0:Md.code)&&Fa(n,"user-mismatch"),Md}}(r,new zl(e),e.bypassAuthState)}async function $l(e){const{auth:t,user:r}=e;return Ha(r,t,"internal-error"),async function(e,t,r=!1){const n=await dc(e,t._linkToIdToken(e.auth,await e.getIdToken()),r);return nl._forOperation(e,"link",n)}(r,new zl(e),e.bypassAuthState)}
1397
1397
  /**
1398
1398
  * @license
1399
1399
  * Copyright 2020 Google LLC
@@ -1409,7 +1409,7 @@ async function(e,t,r=!1){const{auth:n}=e,i="reauthenticate";try{const o=await dc
1409
1409
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1410
1410
  * See the License for the specific language governing permissions and
1411
1411
  * limitations under the License.
1412
- */class ql{constructor(e,t,r,n,i=!1){this.auth=e,this.resolver=r,this.user=n,this.bypassAuthState=i,this.pendingPromise=null,this.eventManager=null,this.filter=Array.isArray(t)?t:[t]}execute(){return new Promise((async(e,t)=>{this.pendingPromise={resolve:e,reject:t};try{this.eventManager=await this.resolver._initialize(this.auth),await this.onExecution(),this.eventManager.registerConsumer(this)}catch(Ld){this.reject(Ld)}}))}async onAuthEvent(e){const{urlResponse:t,sessionId:r,postBody:n,tenantId:i,error:o,type:s}=e;if(o)return void this.reject(o);const a={auth:this.auth,requestUri:t,sessionId:r,tenantId:i||void 0,postBody:n||void 0,user:this.user,bypassAuthState:this.bypassAuthState};try{this.resolve(await this.getIdpTask(s)(a))}catch(Ld){this.reject(Ld)}}onError(e){this.reject(e)}getIdpTask(e){switch(e){case"signInViaPopup":case"signInViaRedirect":return Hl;case"linkViaPopup":case"linkViaRedirect":return $l;case"reauthViaPopup":case"reauthViaRedirect":return Vl;default:Fa(this.auth,"internal-error")}}resolve(e){$a(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.resolve(e),this.unregisterAndCleanUp()}reject(e){$a(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.reject(e),this.unregisterAndCleanUp()}unregisterAndCleanUp(){this.eventManager&&this.eventManager.unregisterConsumer(this),this.pendingPromise=null,this.cleanUp()}}
1412
+ */class ql{constructor(e,t,r,n,i=!1){this.auth=e,this.resolver=r,this.user=n,this.bypassAuthState=i,this.pendingPromise=null,this.eventManager=null,this.filter=Array.isArray(t)?t:[t]}execute(){return new Promise((async(e,t)=>{this.pendingPromise={resolve:e,reject:t};try{this.eventManager=await this.resolver._initialize(this.auth),await this.onExecution(),this.eventManager.registerConsumer(this)}catch(Md){this.reject(Md)}}))}async onAuthEvent(e){const{urlResponse:t,sessionId:r,postBody:n,tenantId:i,error:o,type:s}=e;if(o)return void this.reject(o);const a={auth:this.auth,requestUri:t,sessionId:r,tenantId:i||void 0,postBody:n||void 0,user:this.user,bypassAuthState:this.bypassAuthState};try{this.resolve(await this.getIdpTask(s)(a))}catch(Md){this.reject(Md)}}onError(e){this.reject(e)}getIdpTask(e){switch(e){case"signInViaPopup":case"signInViaRedirect":return Hl;case"linkViaPopup":case"linkViaRedirect":return $l;case"reauthViaPopup":case"reauthViaRedirect":return Vl;default:Fa(this.auth,"internal-error")}}resolve(e){$a(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.resolve(e),this.unregisterAndCleanUp()}reject(e){$a(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.reject(e),this.unregisterAndCleanUp()}unregisterAndCleanUp(){this.eventManager&&this.eventManager.unregisterConsumer(this),this.pendingPromise=null,this.cleanUp()}}
1413
1413
  /**
1414
1414
  * @license
1415
1415
  * Copyright 2020 Google LLC
@@ -1442,7 +1442,7 @@ async function(e,t,r=!1){const{auth:n}=e,i="reauthenticate";try{const o=await dc
1442
1442
  * See the License for the specific language governing permissions and
1443
1443
  * limitations under the License.
1444
1444
  */
1445
- const Jl="pendingRedirect",Gl=new Map;class Yl extends ql{constructor(e,t,r=!1){super(e,["signInViaRedirect","linkViaRedirect","reauthViaRedirect","unknown"],t,void 0,r),this.eventId=null}async execute(){let e=Gl.get(this.auth._key());if(!e){try{const t=await async function(e,t){const r=function(e){return Ec(Jl,e.config.apiKey,e.name)}(t),n=function(e){return yc(e._redirectPersistence)}(e);if(!(await n._isAvailable()))return!1;const i="true"===await n._get(r);return await n._remove(r),i}(this.resolver,this.auth)?await super.execute():null;e=()=>Promise.resolve(t)}catch(Ld){e=()=>Promise.reject(Ld)}Gl.set(this.auth._key(),e)}return this.bypassAuthState||Gl.set(this.auth._key(),(()=>Promise.resolve(null))),e()}async onAuthEvent(e){if("signInViaRedirect"===e.type)return super.onAuthEvent(e);if("unknown"!==e.type){if(e.eventId){const t=await this.auth._redirectUserForId(e.eventId);if(t)return this.user=t,super.onAuthEvent(e);this.resolve(null)}}else this.resolve(null)}async onExecution(){}cleanUp(){}}function Ql(e,t){Gl.set(e._key(),t)}async function Xl(e,t,r=!1){const n=Fc(e),i=
1445
+ const Jl="pendingRedirect",Gl=new Map;class Yl extends ql{constructor(e,t,r=!1){super(e,["signInViaRedirect","linkViaRedirect","reauthViaRedirect","unknown"],t,void 0,r),this.eventId=null}async execute(){let e=Gl.get(this.auth._key());if(!e){try{const t=await async function(e,t){const r=function(e){return Ec(Jl,e.config.apiKey,e.name)}(t),n=function(e){return yc(e._redirectPersistence)}(e);if(!(await n._isAvailable()))return!1;const i="true"===await n._get(r);return await n._remove(r),i}(this.resolver,this.auth)?await super.execute():null;e=()=>Promise.resolve(t)}catch(Md){e=()=>Promise.reject(Md)}Gl.set(this.auth._key(),e)}return this.bypassAuthState||Gl.set(this.auth._key(),(()=>Promise.resolve(null))),e()}async onAuthEvent(e){if("signInViaRedirect"===e.type)return super.onAuthEvent(e);if("unknown"!==e.type){if(e.eventId){const t=await this.auth._redirectUserForId(e.eventId);if(t)return this.user=t,super.onAuthEvent(e);this.resolve(null)}}else this.resolve(null)}async onExecution(){}cleanUp(){}}function Ql(e,t){Gl.set(e._key(),t)}async function Xl(e,t,r=!1){const n=Fc(e),i=
1446
1446
  /**
1447
1447
  * @license
1448
1448
  * Copyright 2021 Google LLC
@@ -1557,7 +1557,7 @@ const ru=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,nu=/^https?/;async function iu(e
1557
1557
  * See the License for the specific language governing permissions and
1558
1558
  * limitations under the License.
1559
1559
  */
1560
- const gu={location:"yes",resizable:"yes",statusbar:"yes",toolbar:"no"};class _u{constructor(e){this.window=e,this.associatedEvent=null}close(){if(this.window)try{this.window.close()}catch(Ld){}}}function vu(e,t,r,n=500,i=600){const o=Math.max((window.screen.availHeight-i)/2,0).toString(),s=Math.max((window.screen.availWidth-n)/2,0).toString();let a="";const c=Object.assign(Object.assign({},gu),{width:n.toString(),height:i.toString(),top:o,left:s}),l=fs().toLowerCase();r&&(a=Sc(l)?"_blank":r),Tc(l)&&(t=t||"http://localhost",c.scrollbars="yes");const u=Object.entries(c).reduce(((e,[t,r])=>`${e}${t}=${r},`),"");if(function(e=fs()){var t;return Nc(e)&&!!(null===(t=window.navigator)||void 0===t?void 0:t.standalone)}(l)&&"_self"!==a)return function(e,t){const r=document.createElement("a");r.href=e,r.target=t;const n=document.createEvent("MouseEvent");n.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,1,null),r.dispatchEvent(n)}
1560
+ const gu={location:"yes",resizable:"yes",statusbar:"yes",toolbar:"no"};class _u{constructor(e){this.window=e,this.associatedEvent=null}close(){if(this.window)try{this.window.close()}catch(Md){}}}function vu(e,t,r,n=500,i=600){const o=Math.max((window.screen.availHeight-i)/2,0).toString(),s=Math.max((window.screen.availWidth-n)/2,0).toString();let a="";const c=Object.assign(Object.assign({},gu),{width:n.toString(),height:i.toString(),top:o,left:s}),l=fs().toLowerCase();r&&(a=Sc(l)?"_blank":r),Tc(l)&&(t=t||"http://localhost",c.scrollbars="yes");const u=Object.entries(c).reduce(((e,[t,r])=>`${e}${t}=${r},`),"");if(function(e=fs()){var t;return Nc(e)&&!!(null===(t=window.navigator)||void 0===t?void 0:t.standalone)}(l)&&"_self"!==a)return function(e,t){const r=document.createElement("a");r.href=e,r.target=t;const n=document.createEvent("MouseEvent");n.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,1,null),r.dispatchEvent(n)}
1561
1561
  /**
1562
1562
  * @license
1563
1563
  * Copyright 2021 Google LLC
@@ -1573,7 +1573,7 @@ const gu={location:"yes",resizable:"yes",statusbar:"yes",toolbar:"no"};class _u{
1573
1573
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1574
1574
  * See the License for the specific language governing permissions and
1575
1575
  * limitations under the License.
1576
- */(t||"",a),new _u(null);const d=window.open(t||"",a,u);Ha(d,e,"popup-blocked");try{d.focus()}catch(Ld){}return new _u(d)}const yu="__/auth/handler",wu="emulator/auth/handler",bu=encodeURIComponent("fac");async function Eu(e,t,r,n,i,o){Ha(e.config.authDomain,e,"auth-domain-config-required"),Ha(e.config.apiKey,e,"invalid-api-key");const s={apiKey:e.config.apiKey,appName:e.name,authType:r,redirectUrl:n,v:da,eventId:i};if(t instanceof Qc){t.setDefaultLanguage(e.languageCode),s.providerId=t.providerId||"",function(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}(t.getCustomParameters())||(s.customParameters=JSON.stringify(t.getCustomParameters()));for(const[e,t]of Object.entries(o||{}))s[e]=t}if(t instanceof Xc){const e=t.getScopes().filter((e=>""!==e));e.length>0&&(s.scopes=e.join(","))}e.tenantId&&(s.tid=e.tenantId);const a=s;for(const u of Object.keys(a))void 0===a[u]&&delete a[u];const c=await e._getAppCheckToken(),l=c?`#${bu}=${encodeURIComponent(c)}`:"";return`${function({config:e}){if(!e.emulator)return`https://${e.authDomain}/${yu}`;return Ya(e,wu)}
1576
+ */(t||"",a),new _u(null);const d=window.open(t||"",a,u);Ha(d,e,"popup-blocked");try{d.focus()}catch(Md){}return new _u(d)}const yu="__/auth/handler",wu="emulator/auth/handler",bu=encodeURIComponent("fac");async function Eu(e,t,r,n,i,o){Ha(e.config.authDomain,e,"auth-domain-config-required"),Ha(e.config.apiKey,e,"invalid-api-key");const s={apiKey:e.config.apiKey,appName:e.name,authType:r,redirectUrl:n,v:da,eventId:i};if(t instanceof Qc){t.setDefaultLanguage(e.languageCode),s.providerId=t.providerId||"",function(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}(t.getCustomParameters())||(s.customParameters=JSON.stringify(t.getCustomParameters()));for(const[e,t]of Object.entries(o||{}))s[e]=t}if(t instanceof Xc){const e=t.getScopes().filter((e=>""!==e));e.length>0&&(s.scopes=e.join(","))}e.tenantId&&(s.tid=e.tenantId);const a=s;for(const u of Object.keys(a))void 0===a[u]&&delete a[u];const c=await e._getAppCheckToken(),l=c?`#${bu}=${encodeURIComponent(c)}`:"";return`${function({config:e}){if(!e.emulator)return`https://${e.authDomain}/${yu}`;return Ya(e,wu)}
1577
1577
  /**
1578
1578
  * @license
1579
1579
  * Copyright 2020 Google LLC
@@ -1656,7 +1656,7 @@ const Ru=hs("authIdTokenMaxAge")||300;let Ou=null;function Au(e=function(e=ra){c
1656
1656
  * See the License for the specific language governing permissions and
1657
1657
  * limitations under the License.
1658
1658
  */
1659
- pa("firebase","10.5.2","app");let xu=null,Lu=null;const Du=()=>{if(!xu){if(!Lu)throw"App hasn't been initialized yet. Avoid use getAuth() when not inizialized.";const e=ha(Lu);xu=Au(e),xu.setPersistence(bc)}return xu},Mu=e=>{switch(e.code){case Aa:return Nu.INVALID_RECAPTCHA;case xa:case Da:return Nu.INVALID_PHONE_NUMBER;case Ma:return Nu.INVALID_ACCOUNT;case Na:case Pa:case La:return Nu.INVALID_OTP;default:throw e.message}},Uu=()=>{const[e,t]=ge({state:"idle"}),r=we(null),n=we(""),i=we("");return{authState:e,init:e=>{r.current||(r.current=new jl(Du(),e,{size:"invisible"}))},sendOtp:async e=>{if(!r.current)throw Error("[Sign in]: RecaptchaVerifier has not been initialized yet, please call init()");i.current=e,t({state:"sending"});try{const i=new Bl(Du()),o=await i.verifyPhoneNumber(e,r.current);return n.current=o,t({state:"sent",phoneNumber:e}),!0}catch(Ld){return t({state:"error",occuredWhen:"sending",error:Mu(Ld)}),!1}},verifyOtp:async e=>{if(!n.current)throw Error("[Sign in]: Please verify phone number first and then verify OTP.");t({state:"verifying"});try{const r=Bl.credential(n.current,e);return await async function(e,t){return al(Fc(e),t)}(Du(),r),t({state:"verified"}),!0}catch(Ld){return t({state:"error",occuredWhen:"verifying",error:Mu(Ld)}),!1}},resendOtp:async()=>{if(!i.current||!r.current)throw Error("[Sign in]: Please verify phone number first and then resend OTP.");t({state:"resending"});try{const e=new Bl(Du()),o=await e.verifyPhoneNumber(i.current,r.current);return n.current=o,t({state:"sent",phoneNumber:i.current}),!0}catch(Ld){return t({state:"error",occuredWhen:"resending",error:Mu(Ld)}),!1}}}},ju=re({authState:{state:"idle"},init:()=>{},sendOtp:async()=>!0,resendOtp:async()=>!0,verifyOtp:async()=>!0}),Fu=({children:e})=>{const t=Uu();return ui(ju.Provider,{value:t,children:e})},Bu=()=>Ie(ju),zu=f("div")`
1659
+ pa("firebase","10.5.2","app");let xu=null,Lu=null;const Du=()=>{if(!xu){if(!Lu)throw"App hasn't been initialized yet. Avoid use getAuth() when not inizialized.";const e=ha(Lu);xu=Au(e),xu.setPersistence(bc)}return xu},Mu=e=>{switch(e.code){case Aa:return Nu.INVALID_RECAPTCHA;case xa:case Da:return Nu.INVALID_PHONE_NUMBER;case Ma:return Nu.INVALID_ACCOUNT;case Na:case Pa:case La:return Nu.INVALID_OTP;default:throw e.message}},Uu=()=>{const[e,t]=ge({state:"idle"}),r=we(null),n=we(""),i=we("");return{authState:e,init:e=>{r.current||(r.current=new jl(Du(),e,{size:"invisible"}))},sendOtp:async e=>{if(!r.current)throw Error("[Sign in]: RecaptchaVerifier has not been initialized yet, please call init()");i.current=e,t({state:"sending"});try{const i=new Bl(Du()),o=await i.verifyPhoneNumber(e,r.current);return n.current=o,t({state:"sent",phoneNumber:e}),!0}catch(Md){return t({state:"error",occuredWhen:"sending",error:Mu(Md)}),!1}},verifyOtp:async e=>{if(!n.current)throw Error("[Sign in]: Please verify phone number first and then verify OTP.");t({state:"verifying"});try{const r=Bl.credential(n.current,e);return await async function(e,t){return al(Fc(e),t)}(Du(),r),t({state:"verified"}),!0}catch(Md){return t({state:"error",occuredWhen:"verifying",error:Mu(Md)}),!1}},resendOtp:async()=>{if(!i.current||!r.current)throw Error("[Sign in]: Please verify phone number first and then resend OTP.");t({state:"resending"});try{const e=new Bl(Du()),o=await e.verifyPhoneNumber(i.current,r.current);return n.current=o,t({state:"sent",phoneNumber:i.current}),!0}catch(Md){return t({state:"error",occuredWhen:"resending",error:Mu(Md)}),!1}}}},ju=re({authState:{state:"idle"},init:()=>{},sendOtp:async()=>!0,resendOtp:async()=>!0,verifyOtp:async()=>!0}),Fu=({children:e})=>{const t=Uu();return ui(ju.Provider,{value:t,children:e})},Bu=()=>Ie(ju),zu=f("div")`
1660
1660
  ${()=>({height:"1.5rem",width:"1.5rem","@keyframes spin":{to:{transform:"rotate(360deg)"}},animation:"spin 1s linear infinite",borderRadius:"9999px",borderWidth:"2px",borderColor:"currentColor",borderLeftColor:"transparent",borderTopColor:"transparent"})}
1661
1661
  `,Hu=f("button")`
1662
1662
  ${()=>({display:"inline-flex",height:"1rem",alignItems:"center",justifyContent:"center",gap:"1rem",borderRadius:"0.375rem",borderWidth:"0px",paddingLeft:"0.5rem",paddingRight:"0.5rem",fontWeight:"600","--tw-text-opacity":"1",color:"rgb(15 77 196 / var(--tw-text-opacity))",":focus":{outline:"2px solid transparent",outlineOffset:"2px"}})}
@@ -1714,4 +1714,4 @@ pa("firebase","10.5.2","app");let xu=null,Lu=null;const Du=()=>{if(!xu){if(!Lu)t
1714
1714
  ${()=>({display:"flex",flexDirection:"column",justifyContent:"center",paddingLeft:"3rem",paddingRight:"3rem",paddingTop:"3rem",paddingBottom:"3rem","--tw-text-opacity":"1",color:"rgb(25 44 84 / var(--tw-text-opacity))"})}
1715
1715
  width: 500px;
1716
1716
  height: 500px;
1717
- `,fd=e=>{const{idToken:t}=(()=>{const[e,t]=ge(""),r=Du().beforeAuthStateChanged((async e=>{t(await(null==e?void 0:e.getIdToken())??"")}));return ve((()=>r),[r]),{idToken:e}})(),[r,n]=ge(0),{apolloAccessToken:i}=e,[o,s]=ge("");vr((async e=>{try{switch(r){case 0:await(async e=>{var t;try{const r=await kr(i,e);return s((null==(t=r.linkRequest)?void 0:t.linkRequestId)??""),{isEstablished:r.isEstablished}}catch(Ld){throw`[Link Workplace]: Error when requesting a workplace link: ${Ld}`}})(e).then((e=>{e.isEstablished?n(5):n(1)}));break;case 1:t&&n(2);break;case 2:n(3);break;case 3:await(async(e,r)=>{const{sub:n}=Me(i);try{return await Ir(t,e,n,r)}catch(Ld){throw`[Link Workplace]: Error when trying to establish workplace link: ${Ld}`}})(o,e),n(5);break;case 5:rs()}}catch(Ld){console.log(Ld),n(4)}}),[r,t]);const a=void 0===r||0==r||3==r;return ui(pd,{children:[a&&ui(di,{isActive:a}),1===r&&ui(hd,{}),4===r&&ui(ts,{}),5===r&&ui(Qo,{})]})},md=e=>ui("svg",{viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",className:"lg"===e.size?"h-10 w-10":"h-5 w-5",children:[ui("path",{d:"M16 8C16 12.4183 12.4183 16 8 16C3.58172 16 0 12.4183 0 8C0 3.58172 3.58172 0 8 0C12.4183 0 16 3.58172 16 8ZM1.99743 8C1.99743 11.3151 4.68487 14.0026 8 14.0026C11.3151 14.0026 14.0026 11.3151 14.0026 8C14.0026 4.68487 11.3151 1.99743 8 1.99743C4.68487 1.99743 1.99743 4.68487 1.99743 8Z",className:"light"===e.theme?"fill-white":"fill-gray-200","fill-opacity":"light"===e.theme?"0.3":"1"}),ui("path",{d:"M8 1C8 0.447715 8.44943 -0.00643769 8.99741 0.0624193C9.70527 0.151368 10.3996 0.334798 11.0615 0.608964C12.0321 1.011 12.914 1.60028 13.6569 2.34315C14.3997 3.08602 14.989 3.96793 15.391 4.93853C15.6652 5.60043 15.8486 6.29473 15.9376 7.0026C16.0064 7.55057 15.5523 8 15 8C14.4477 8 14.0085 7.54925 13.9169 7.00462C13.842 6.55939 13.7169 6.12298 13.5433 5.7039C13.2417 4.97595 12.7998 4.31451 12.2426 3.75736C11.6855 3.20021 11.0241 2.75825 10.2961 2.45672C9.87702 2.28313 9.44061 2.15804 8.99538 2.08314C8.45075 1.99152 8 1.55228 8 1Z",className:"light"===e.theme?"fill-white":"fill-primary-base"})]}),gd=e=>{const[t,r]=ge(!1);return ui("button",{type:"button",className:`inline-flex items-center justify-center px-10 py-2 border border-transparent text-base font-medium rounded-md shadow-sm disabled:text-gray-300 bg-primary-base hover:bg-primary-hover disabled:bg-gray-100 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary-focus w-full md:w-auto ${e.class} `,disabled:e.disabled,onClick:async()=>{if(e.onClickPromise&&!t){r(!0);try{await e.onClickPromise()}catch(n){}r(!1)}},children:[ui("div",{className:"relative "+(t?"invisible":""),children:e.children}),t&&ui("div",{className:"absolute animate-spin",children:ui(md,{theme:"light"})})]})},_d=({className:e,label:t,allowedKeyPattern:r,onChange:n,value:i,...o})=>{const s=ke((e=>{r.test(e.key)||e.preventDefault()}),[r]);return ui(N,{children:[ui("label",{className:"font-medium text-sm text-gray-900 text-left",children:ui("span",{children:t})}),ui("input",{type:"text",className:`p-2 border-0 ring-2 ring-gray-200 focus:outline-none focus-visible:ring-gray-500 text-base font-medium rounded-md shadow-sm w-full ${e}`,value:i,onKeyPress:s,onChange:e=>n(e.currentTarget.value),...o})]})},vd=({className:e,children:t})=>ui("h1",{className:`text-2xl md:text-3xl font-bold ${e??""}`,children:t}),yd=({className:e,children:t})=>ui("h3",{class:`text-base md:text-lg text-gray-600 ${e??""}`,children:t}),wd=e=>{switch(e){case"sign-up-viewed":case"sign-up-completed":case"sign-up-declined":return new Promise((()=>{}))}};var bd=Object.defineProperty,Ed=(e,t,r)=>(((e,t,r)=>{t in e?bd(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r})(e,"symbol"!=typeof t?t+"":t,r),r);let kd=new class{constructor(){Ed(this,"current",this.detect()),Ed(this,"handoffState","pending"),Ed(this,"currentId",0)}set(e){this.current!==e&&(this.handoffState="pending",this.currentId=0,this.current=e)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return"server"===this.current}get isClient(){return"client"===this.current}detect(){return"undefined"==typeof window||"undefined"==typeof document?"server":"client"}handoff(){"pending"===this.handoffState&&(this.handoffState="complete")}get isHandoffComplete(){return"complete"===this.handoffState}},Id=(e,t)=>{kd.isServer?ve(e,t):ye(e,t)};function Td(e){let t=we(e);return Id((()=>{t.current=e}),[e]),t}function Cd(){let e=[],t={addEventListener:(e,r,n,i)=>(e.addEventListener(r,n,i),t.add((()=>e.removeEventListener(r,n,i)))),requestAnimationFrame(...e){let r=requestAnimationFrame(...e);return t.add((()=>cancelAnimationFrame(r)))},nextFrame:(...e)=>t.requestAnimationFrame((()=>t.requestAnimationFrame(...e))),setTimeout(...e){let r=setTimeout(...e);return t.add((()=>clearTimeout(r)))},microTask(...e){let r={current:!0};return function(e){"function"==typeof queueMicrotask?queueMicrotask(e):Promise.resolve().then(e).catch((e=>setTimeout((()=>{throw e}))))}((()=>{r.current&&e[0]()})),t.add((()=>{r.current=!1}))},style(e,t,r){let n=e.style.getPropertyValue(t);return Object.assign(e.style,{[t]:r}),this.add((()=>{Object.assign(e.style,{[t]:n})}))},group(e){let t=Cd();return e(t),this.add((()=>t.dispose()))},add:t=>(e.push(t),()=>{let r=e.indexOf(t);if(r>=0)for(let t of e.splice(r,1))t()}),dispose(){for(let t of e.splice(0))t()}};return t}function Sd(){let[e]=ge(Cd);return ve((()=>()=>e.dispose()),[e]),e}let Rd=function(e){let t=Td(e);return bo.useCallback(((...e)=>t.current(...e)),[t])};function Od(){let e=function(){let e="undefined"==typeof document;return"useSyncExternalStore"in Eo&&Eo.useSyncExternalStore((()=>()=>{}),(()=>!1),(()=>!e))}(),[t,r]=ge(kd.isHandoffComplete);return t&&!1===kd.isHandoffComplete&&r(!1),ve((()=>{!0!==t&&r(!0)}),[t]),ve((()=>kd.handoff()),[]),!e&&t}function Ad(e,t,...r){if(e in t){let n=t[e];return"function"==typeof n?n(...r):n}let n=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map((e=>`"${e}"`)).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Ad),n}let Pd=Symbol();function Nd(...e){let t=we(e);ve((()=>{t.current=e}),[e]);let r=Rd((e=>{for(let r of t.current)null!=r&&("function"==typeof r?r(e):r.current=e)}));return e.every((e=>null==e||(null==e?void 0:e[Pd])))?void 0:r}function xd(...e){return Array.from(new Set(e.flatMap((e=>"string"==typeof e?e.split(" "):[])))).filter(Boolean).join(" ")}var Ld,Dd,Md=((Dd=Md||{})[Dd.None=0]="None",Dd[Dd.RenderStrategy=1]="RenderStrategy",Dd[Dd.Static=2]="Static",Dd),Ud=((Ld=Ud||{})[Ld.Unmount=0]="Unmount",Ld[Ld.Hidden=1]="Hidden",Ld);function jd({ourProps:e,theirProps:t,slot:r,defaultTag:n,features:i,visible:o=!0,name:s}){let a=Bd(t,e);if(o)return Fd(a,r,n,s);let c=null!=i?i:0;if(2&c){let{static:e=!1,...t}=a;if(e)return Fd(t,r,n,s)}if(1&c){let{unmount:e=!0,...t}=a;return Ad(e?0:1,{0:()=>null,1:()=>Fd({...t,hidden:!0,style:{display:"none"}},r,n,s)})}return Fd(a,r,n,s)}function Fd(e,t={},r,n){let{as:i=r,children:o,refName:s="ref",...a}=Vd(e,["unmount","static"]),c=void 0!==e.ref?{[s]:e.ref}:{},l="function"==typeof o?o(t):o;"className"in a&&a.className&&"function"==typeof a.className&&(a.className=a.className(t));let u={};if(t){let e=!1,r=[];for(let[n,i]of Object.entries(t))"boolean"==typeof i&&(e=!0),!0===i&&r.push(n);e&&(u["data-headlessui-state"]=r.join(" "))}if(i===N&&Object.keys(Hd(a)).length>0){if(!so(l)||Array.isArray(l)&&l.length>1)throw new Error(['Passing props on "Fragment"!',"",`The current component <${n} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(a).map((e=>` - ${e}`)).join("\n"),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map((e=>` - ${e}`)).join("\n")].join("\n"));let e=l.props,t="function"==typeof(null==e?void 0:e.className)?(...t)=>xd(null==e?void 0:e.className(...t),a.className):xd(null==e?void 0:e.className,a.className),r=t?{className:t}:{};return co(l,Object.assign({},Bd(l.props,Hd(Vd(a,["ref"]))),u,c,function(...e){return{ref:e.every((e=>null==e))?void 0:t=>{for(let r of e)null!=r&&("function"==typeof r?r(t):r.current=t)}}}(l.ref,c.ref),r))}return O(i,Object.assign({},Vd(a,["ref"]),i!==N&&c,i!==N&&u),l)}function Bd(...e){if(0===e.length)return{};if(1===e.length)return e[0];let t={},r={};for(let n of e)for(let e in n)e.startsWith("on")&&"function"==typeof n[e]?(null!=r[e]||(r[e]=[]),r[e].push(n[e])):t[e]=n[e];if(t.disabled||t["aria-disabled"])return Object.assign(t,Object.fromEntries(Object.keys(r).map((e=>[e,void 0]))));for(let n in r)Object.assign(t,{[n](e,...t){let i=r[n];for(let r of i){if((e instanceof Event||(null==e?void 0:e.nativeEvent)instanceof Event)&&e.defaultPrevented)return;r(e,...t)}}});return t}function zd(e){var t;return Object.assign(Ci(e),{displayName:null!=(t=e.displayName)?t:e.name})}function Hd(e){let t=Object.assign({},e);for(let r in t)void 0===t[r]&&delete t[r];return t}function Vd(e,t=[]){let r=Object.assign({},e);for(let n of t)n in r&&delete r[n];return r}let $d=re(null);$d.displayName="OpenClosedContext";var qd=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(qd||{});function Wd(){return Ie($d)}function Kd({value:e,children:t}){return bo.createElement($d.Provider,{value:e},t)}function Jd(){let e=we(!1);return Id((()=>(e.current=!0,()=>{e.current=!1})),[]),e}function Gd(e,...t){e&&t.length>0&&e.classList.add(...t)}function Yd(e,...t){e&&t.length>0&&e.classList.remove(...t)}function Qd(e,t,r,n){let i=r?"enter":"leave",o=Cd(),s=void 0!==n?function(e){let t={called:!1};return(...r)=>{if(!t.called)return t.called=!0,e(...r)}}(n):()=>{};"enter"===i&&(e.removeAttribute("hidden"),e.style.display="");let a=Ad(i,{enter:()=>t.enter,leave:()=>t.leave}),c=Ad(i,{enter:()=>t.enterTo,leave:()=>t.leaveTo}),l=Ad(i,{enter:()=>t.enterFrom,leave:()=>t.leaveFrom});return Yd(e,...t.base,...t.enter,...t.enterTo,...t.enterFrom,...t.leave,...t.leaveFrom,...t.leaveTo,...t.entered),Gd(e,...t.base,...a,...l),o.nextFrame((()=>{Yd(e,...t.base,...a,...l),Gd(e,...t.base,...a,...c),function(e,t){let r=Cd();if(!e)return r.dispose;let{transitionDuration:n,transitionDelay:i}=getComputedStyle(e),[o,s]=[n,i].map((e=>{let[t=0]=e.split(",").filter(Boolean).map((e=>e.includes("ms")?parseFloat(e):1e3*parseFloat(e))).sort(((e,t)=>t-e));return t})),a=o+s;if(0!==a){r.group((r=>{r.setTimeout((()=>{t(),r.dispose()}),a),r.addEventListener(e,"transitionrun",(e=>{e.target===e.currentTarget&&r.dispose()}))}));let n=r.addEventListener(e,"transitionend",(e=>{e.target===e.currentTarget&&(t(),n())}))}else t();r.add((()=>t())),r.dispose}(e,(()=>(Yd(e,...t.base,...a),Gd(e,...t.base,...t.entered),s())))})),o.dispose}function Xd(e=""){return e.split(" ").filter((e=>e.trim().length>1))}let Zd=re(null);Zd.displayName="TransitionContext";var eh,th=((eh=th||{}).Visible="visible",eh.Hidden="hidden",eh);let rh=re(null);function nh(e){return"children"in e?nh(e.children):e.current.filter((({el:e})=>null!==e.current)).filter((({state:e})=>"visible"===e)).length>0}function ih(e,t){let r=Td(e),n=we([]),i=Jd(),o=Sd(),s=Rd(((e,t=Ud.Hidden)=>{let s=n.current.findIndex((({el:t})=>t===e));-1!==s&&(Ad(t,{[Ud.Unmount](){n.current.splice(s,1)},[Ud.Hidden](){n.current[s].state="hidden"}}),o.microTask((()=>{var e;!nh(n)&&i.current&&(null==(e=r.current)||e.call(r))})))})),a=Rd((e=>{let t=n.current.find((({el:t})=>t===e));return t?"visible"!==t.state&&(t.state="visible"):n.current.push({el:e,state:"visible"}),()=>s(e,Ud.Unmount)})),c=we([]),l=we(Promise.resolve()),u=we({enter:[],leave:[],idle:[]}),d=Rd(((e,r,n)=>{c.current.splice(0),t&&(t.chains.current[r]=t.chains.current[r].filter((([t])=>t!==e))),null==t||t.chains.current[r].push([e,new Promise((e=>{c.current.push(e)}))]),null==t||t.chains.current[r].push([e,new Promise((e=>{Promise.all(u.current[r].map((([e,t])=>t))).then((()=>e()))}))]),"enter"===r?l.current=l.current.then((()=>null==t?void 0:t.wait.current)).then((()=>n(r))):n(r)})),h=Rd(((e,t,r)=>{Promise.all(u.current[t].splice(0).map((([e,t])=>t))).then((()=>{var e;null==(e=c.current.shift())||e()})).then((()=>r(t)))}));return Ee((()=>({children:n,register:a,unregister:s,onStart:d,onStop:h,wait:l,chains:u})),[a,s,n,d,h,u,l])}function oh(){}rh.displayName="NestingContext";let sh=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function ah(e){var t;let r={};for(let n of sh)r[n]=null!=(t=e[n])?t:oh;return r}let ch=Md.RenderStrategy;let lh=zd((function(e,t){let{show:r,appear:n=!1,unmount:i=!0,...o}=e,s=we(null),a=Nd(s,t);Od();let c=Wd();if(void 0===r&&null!==c&&(r=(c&qd.Open)===qd.Open),![!0,!1].includes(r))throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[l,u]=ge(r?"visible":"hidden"),d=ih((()=>{u("hidden")})),[h,p]=ge(!0),f=we([r]);Id((()=>{!1!==h&&f.current[f.current.length-1]!==r&&(f.current.push(r),p(!1))}),[f,r]);let m=Ee((()=>({show:r,appear:n,initial:h})),[r,n,h]);ve((()=>{if(r)u("visible");else if(nh(d)){let e=s.current;if(!e)return;let t=e.getBoundingClientRect();0===t.x&&0===t.y&&0===t.width&&0===t.height&&u("hidden")}else u("hidden")}),[r,d]);let g={unmount:i},_=Rd((()=>{var t;h&&p(!1),null==(t=e.beforeEnter)||t.call(e)})),v=Rd((()=>{var t;h&&p(!1),null==(t=e.beforeLeave)||t.call(e)}));return bo.createElement(rh.Provider,{value:d},bo.createElement(Zd.Provider,{value:m},jd({ourProps:{...g,as:N,children:bo.createElement(uh,{ref:a,...g,...o,beforeEnter:_,beforeLeave:v})},theirProps:{},defaultTag:N,features:ch,visible:"visible"===l,name:"Transition"})))})),uh=zd((function(e,t){var r,n;let{beforeEnter:i,afterEnter:o,beforeLeave:s,afterLeave:a,enter:c,enterFrom:l,enterTo:u,entered:d,leave:h,leaveFrom:p,leaveTo:f,...m}=e,g=we(null),_=Nd(g,t),v=null==(r=m.unmount)||r?Ud.Unmount:Ud.Hidden,{show:y,appear:w,initial:b}=function(){let e=Ie(Zd);if(null===e)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}(),[E,k]=ge(y?"visible":"hidden"),I=function(){let e=Ie(rh);if(null===e)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}(),{register:T,unregister:C}=I;ve((()=>T(g)),[T,g]),ve((()=>{if(v===Ud.Hidden&&g.current)return y&&"visible"!==E?void k("visible"):Ad(E,{hidden:()=>C(g),visible:()=>T(g)})}),[E,g,T,C,y,v]);let S=Td({base:Xd(m.className),enter:Xd(c),enterFrom:Xd(l),enterTo:Xd(u),entered:Xd(d),leave:Xd(h),leaveFrom:Xd(p),leaveTo:Xd(f)}),R=function(e){let t=we(ah(e));return ve((()=>{t.current=ah(e)}),[e]),t}({beforeEnter:i,afterEnter:o,beforeLeave:s,afterLeave:a}),O=Od();ve((()=>{if(O&&"visible"===E&&null===g.current)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")}),[g,E,O]);let A=w&&y&&b,P=!O||b&&!w?"idle":y?"enter":"leave",N=function(e=0){let[t,r]=ge(e),n=Jd(),i=ke((e=>{n.current&&r((t=>t|e))}),[t,n]),o=ke((e=>Boolean(t&e)),[t]),s=ke((e=>{n.current&&r((t=>t&~e))}),[r,n]),a=ke((e=>{n.current&&r((t=>t^e))}),[r]);return{flags:t,addFlag:i,hasFlag:o,removeFlag:s,toggleFlag:a}}(0),x=Rd((e=>Ad(e,{enter:()=>{N.addFlag(qd.Opening),R.current.beforeEnter()},leave:()=>{N.addFlag(qd.Closing),R.current.beforeLeave()},idle:()=>{}}))),L=Rd((e=>Ad(e,{enter:()=>{N.removeFlag(qd.Opening),R.current.afterEnter()},leave:()=>{N.removeFlag(qd.Closing),R.current.afterLeave()},idle:()=>{}}))),D=ih((()=>{k("hidden"),C(g)}),I);!function({immediate:e,container:t,direction:r,classes:n,onStart:i,onStop:o}){let s=Jd(),a=Sd(),c=Td(r);Id((()=>{e&&(c.current="enter")}),[e]),Id((()=>{let e=Cd();a.add(e.dispose);let r=t.current;if(r&&"idle"!==c.current&&s.current)return e.dispose(),i.current(c.current),e.add(Qd(r,n.current,"enter"===c.current,(()=>{e.dispose(),o.current(c.current)}))),e.dispose}),[r])}({immediate:A,container:g,classes:S,direction:P,onStart:Td((e=>{D.onStart(g,e,x)})),onStop:Td((e=>{D.onStop(g,e,L),"leave"===e&&!nh(D)&&(k("hidden"),C(g))}))});let M=m,U={ref:_};return A?M={...M,className:xd(m.className,...S.current.enter,...S.current.enterFrom)}:(M.className=xd(m.className,null==(n=g.current)?void 0:n.className),""===M.className&&delete M.className),bo.createElement(rh.Provider,{value:D},bo.createElement(Kd,{value:Ad(E,{visible:qd.Open,hidden:qd.Closed})|N.flags},jd({ourProps:U,theirProps:M,defaultTag:"div",features:ch,visible:"visible"===E,name:"Transition.Child"})))})),dh=zd((function(e,t){let r=null!==Ie(Zd),n=null!==Wd();return bo.createElement(bo.Fragment,null,!r&&n?bo.createElement(lh,{ref:t,...e}):bo.createElement(uh,{ref:t,...e}))})),hh=Object.assign(lh,{Child:dh,Root:lh});const ph=({children:e})=>{const t=bo.Children.toArray(e),r=t.find((e=>e.type===fh)),n=t.find((e=>e.type===mh));return ui(hh,{appear:!0,show:!0,enter:"transition duration-700 ease-out",enterFrom:"opacity-0",enterTo:"opacity-100",class:"opacity-0",children:ui("div",{className:"my-20 flex flex-col text-center items-center max-w-[40rem] mx-auto",children:[ui(hh,{appear:!0,show:!0,enter:"transition duration-700 ease-out md:transition-none",enterFrom:"-translate-y-6",enterTo:"translate-y-0",class:"-translate-y-6",children:r&&ui("div",{className:"flex items-center h-full",children:r})}),ui(hh,{appear:!0,show:!0,enter:"transition delay-300 duration-[600ms] ease-out",enterFrom:"opacity-0 -translate-y-6",enterTo:"opacity-100 translate-y-0",class:"opacity-0 -translate-y-6",children:n&&ui("div",{className:"flex items-center h-full",children:n})})]})})},fh=({children:e})=>ui(N,{children:e}),mh=({children:e})=>ui(N,{children:e});ph.Top=fh,ph.Bottom=mh;const gh=({onSubmit:e,onDecline:t})=>{const{trace:r}={trace:wd},[n,i]=ge(""),{setPhoneNumber:o,phoneNumber:s}=(()=>{const[e,t]=ge(""),r=Ee((()=>e.replace(/ /g,"")),[e]);return{setPhoneNumber:t,phoneNumber:{valid:Ee((()=>r.startsWith("04")&&10===r.length||r.startsWith("614")&&11===r.length||r.startsWith("+614")&&12===r.length||/^\+642\d{7,9}$/.test(r)),[r]),formatted:Ee((()=>r.startsWith("04")?`+61${r.replace(/^0+/,"")}`:r.startsWith("614")?`+${r}`:r),[r]),masked:Ee((()=>(e=>{let t=0;return"#### ### ### ### ### ### ###".replace(/#/g,(()=>e[t++]??"")).trim()})(r)),[r])}}})();ve((()=>{r("sign-up-viewed")}),[r]);const a=ke((()=>{i("")}),[]),c=ke((()=>{const e=s.valid?"":"Please enter a valid Australian mobile number beginning with 04.";i(e)}),[s.valid]),l=ke((async()=>{s.valid&&await e(s).then((()=>r("sign-up-completed"))).catch(i)}),[s,e,r]);return ke((()=>r("sign-up-declined").then(t)),[t,r]),ui(ph,{children:[ui(ph.Top,{children:ui("div",{className:"flex flex-col gap-5",children:[ui(vd,{children:"Join your workplace benefits program"}),ui(yd,{children:["Enter your ",ui("b",{children:"personal"})," mobile number to finish setting up your Flare Benefits account linked to your workplace"]})]})}),ui(ph.Bottom,{children:ui("div",{className:"mt-5 md:w-[300px] text-left",children:[ui(_d,{allowedKeyPattern:/[+0-9]/,inputMode:"numeric",className:"mt-1 mb-1 w-full",label:"Australian Mobile Number",onChange:o,onfocusin:a,onfocusout:c}),ui("div",{className:"h-8 leading-none",children:ui("span",{className:"text-xs text-rose-500",children:n})}),ui("div",{className:"font-medium text-sm text-gray-900",children:["By creating your account you confirm you have read and agree to Flare Benefits"," ",ui("a",{className:"text-primary-base",href:"https://www.flarehr.com/flare-app-terms-and-conditions/",target:"_blank",rel:"noreferrer",children:" Terms of Use "}),"and",ui("a",{className:"text-primary-base",href:"https://www.flarehr.com/privacy-policy/",target:"_blank",rel:"noreferrer",children:" Privacy Policy"}),"."," "]}),ui(gd,{class:"mt-5 md:w-full text-white",onClickPromise:l,children:"Join your workplace"}),!1]})})]})},_h=""+new URL("assets/check-b48de75e.svg",import.meta.url).href,vh=({onContinue:e})=>ui(ph,{children:[ui(ph.Top,{children:ui("div",{className:"h-16 w-16 flex items-center justify-center rounded-full bg-blue-50 text-primary-base",children:ui(_h,{className:"h-7 w-7"})})}),ui(ph.Bottom,{children:ui("div",{className:"mt-5 flex flex-col items-center gap-5 text-center",children:[ui(vd,{children:"You’ve joined your workplace benefits program"}),ui(yd,{children:"With your new Flare Benefits account, you now have access to a range of exclusive benefits available through your workplace."}),ui(gd,{class:"mt-5 w-full md:w-[240px]",onClickPromise:async()=>{e()},children:"Set up your benefits"})]})})]}),yh=""+new URL("assets/left-arrow-38f55b24.svg",import.meta.url).href,wh=({className:e,onClick:t,...r})=>{const[n,i]=ge(!1);return ui("button",{className:`inline-flex items-center justify-center px-2 text-primary-base rounded-md bg-transparent hover:bg-sky-50/50 focus:ring-2 focus:ring-primary-focus ${e??""}`,onClick:ke((()=>{if(!n)return i(!0),t().finally((()=>{i(!1)}))}),[n,t]),...r,children:[ui("div",{className:"relative "+(n?"invisible":""),children:r.children}),n&&ui("div",{className:"absolute animate-spin",children:ui(md,{theme:"primary"})})]})},bh=({children:e,...t})=>ui("dialog",{className:"z-50 w-full h-full absolute top-0 left-0 bottom-0 right-0",...t,children:e}),Eh=({open:e})=>ui(bh,{open:e,children:ui("div",{className:"flex flex-col gap-5 items-center justify-center text-center mt-20",children:[ui("span",{className:"animate-spin",children:ui(md,{size:"lg"})}),ui(vd,{children:"Creating your account"}),ui("div",{children:[ui(yd,{children:"This can take up to 30 seconds."}),ui(yd,{children:"Please don't navigate away or refresh your browser."})]})]})}),kh=({phoneNumber:e,onVerify:t,onResendOtp:r,onGoBack:n})=>{const{otp:i,setOtp:o}=(()=>{const[e,t]=ge("");return{otp:{valid:Ee((()=>6===e.length),[e.length]),code:e},setOtp:t}})(),[s,a]=ge(!1),[c,l]=ge(""),{countdown:u,restart:d}=(e=>{const[t,r]=ge(e),n=we(),i=ke((()=>{clearInterval(n.current)}),[]);return ve((()=>i),[i]),{countdown:t,restart:ke((()=>{let t=e;clearInterval(n.current),n.current=setInterval((()=>{t<0?clearInterval(n.current):r(t--)}),1e3)}),[e])}})(60);ve(d,[d]);const h=ke((()=>(a(!0),l(""),t(i.code).catch(l).finally((()=>{a(!1)})))),[t,i.code]),p=ke((()=>(l(""),r().then(d).catch(l))),[r,d]);return ui(N,{children:[ui(Eh,{open:s}),ui(ph,{children:[ui(ph.Top,{children:ui("div",{className:"flex flex-col gap-5",children:[ui(vd,{children:"Verify your mobile number"}),ui(yd,{children:["An SMS verification code has been sent to the number"," ",ui("span",{className:"dd-privacy-mask",children:e}),"."]})]})}),ui(ph.Bottom,{children:ui("div",{className:"mt-5 md:w-[300px] text-left",children:[ui(_d,{allowedKeyPattern:/[0-9]/,inputMode:"numeric",minLength:6,maxLength:6,className:"mt-1 mb-1 w-full",label:"Enter your verification code",onChange:o}),c&&ui("span",{className:"text-xs text-rose-500",children:c}),ui("p",{className:"mt-2 text-center text-xs text-gray-600 disabled:opacity-75 ",children:["Didn't get the code?",ui(wh,{disabled:0!==u,className:"underline mx-2 disabled:text-gray-600 disabled:hover:bg-transparent disabled:cursor-text disabled:px-0",onClick:p,children:"Resend SMS"}),0!==u&&ui(N,{children:["in ",u," secs"]})]}),ui(gd,{class:"mt-5 md:w-full text-white",disabled:!i.valid,onClickPromise:h,children:"Continue"}),ui(gd,{class:"mt-5 md:w-full bg-white hover:bg-gray-100 focus:ring-gray-200 border-0 shadow-none text-gray-700 border-gray-300",onClickPromise:async()=>{n()},children:ui("span",{className:"flex gap-3",children:[ui("img",{src:yh}),"Back"]})})]})})]})]})},Ih=({onSignUp:e,onVerify:t,onResendOtp:r,onSuccess:n,onDecline:i})=>{const[o,s]=ge(""),{step:a,goBack:c,goNext:l}=(e=>{const[t,r]=ge(1),n=ke((()=>{const e=t-1;e>=1&&r(e)}),[t]),i=ke((()=>{const n=t+1;n<=e&&r(n)}),[t,e]);return{step:t,goBack:n,goNext:i}})(3),u=ke((t=>e(t.formatted).then((()=>{s(t.masked),l()}))),[l,e]),d=ke((e=>t(e).then((()=>{n()}))),[t,n]);return ui(N,{children:[1===a&&ui(gh,{onSubmit:u,onDecline:i}),2===a&&ui(kh,{phoneNumber:o,onVerify:d,onResendOtp:r,onGoBack:c}),3===a&&ui(vh,{onContinue:n})]})},Th=e=>{var t,r;throw"Auth_SessionExpired"===(null==(r=null==(t=e.response)?void 0:t.data)?void 0:r.code)&&window.location.reload(),e};let Ch;const Sh=()=>Ch;var Rh=(e=>(e.Auth_AccountDisabled="Sorry, your account has been deactivated. Please contact Flare if there are any issues.",e.Auth_AccountLocked="Sorry, your account is currently locked due to too many attempts. Please try again later.",e.Auth_Unregistered="Sorry, we are currently experiencing some issues. Please try again later.",e.Auth_InvalidVerificationCode="Your one time passcode doesn't look right. Please try again with a new one time passcode.",e.Auth_SessionExpired="Sorry, looks like your session has expired. Please try again.",e.Validation_InvalidPhoneNumber="Please enter a valid Australian mobile number beginning with 04.",e))(Rh||{});const Oh=e=>{var t;const r=null==(t=null==e?void 0:e.response)?void 0:t.data;throw Rh[null==r?void 0:r.code]??"Sorry, we are currently experiencing some issues. Please try again later."},Ah=e=>{const[t,r]=ge(!1),{signUp:n,verifyOtp:i,resendOtp:o}={signUp:async(e,t="Invite",r="invite")=>{await Sh().post("auth/signUp",{mobileNumber:e,source:t,channel:r}).catch(Oh)},verifyOtp:async(e,t="Invite",r="invite")=>{await Sh().post("auth/verify",{otp:e,source:t,channel:r}).catch(Oh)},resendOtp:async()=>{await Sh().post("auth/resend").catch(Oh)}},s=()=>{r(!0),rs()};return t?ui(Qo,{}):ui(N,{children:ui("div",{className:"font-inter",children:[ui("style",{children:".pointer-events-none{pointer-events:none!important}.invisible{visibility:hidden!important}.absolute{position:absolute!important}.relative{position:relative!important}.bottom-0{bottom:0!important}.left-0{left:0!important}.right-0{right:0!important}.top-0{top:0!important}.z-50{z-index:50!important}.mx-2{margin-left:.5rem!important;margin-right:.5rem!important}.mx-auto{margin-left:auto!important;margin-right:auto!important}.my-20{margin-top:5rem!important;margin-bottom:5rem!important}.my-auto{margin-top:auto!important;margin-bottom:auto!important}.mb-1{margin-bottom:.25rem!important}.ml-3{margin-left:.75rem!important}.mt-1{margin-top:.25rem!important}.mt-2{margin-top:.5rem!important}.mt-20{margin-top:5rem!important}.mt-5{margin-top:1.25rem!important}.inline-block{display:inline-block!important}.inline{display:inline!important}.flex{display:flex!important}.inline-flex{display:inline-flex!important}.h-10{height:2.5rem!important}.h-16{height:4rem!important}.h-4{height:1rem!important}.h-5{height:1.25rem!important}.h-7{height:1.75rem!important}.h-8{height:2rem!important}.h-\\[1\\.25rem\\]{height:1.25rem!important}.h-\\[1\\.5rem\\]{height:1.5rem!important}.h-full{height:100%!important}.w-10{width:2.5rem!important}.w-16{width:4rem!important}.w-4{width:1rem!important}.w-5{width:1.25rem!important}.w-7{width:1.75rem!important}.w-\\[1\\.25rem\\]{width:1.25rem!important}.w-\\[2\\.75rem\\]{width:2.75rem!important}.w-full{width:100%!important}.max-w-\\[40rem\\]{max-width:40rem!important}.max-w-\\[59\\.5rem\\]{max-width:59.5rem!important}.shrink-0{flex-shrink:0!important}.-translate-y-6{--tw-translate-y: -1.5rem !important;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))!important}.translate-x-0{--tw-translate-x: 0px !important;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))!important}.translate-x-\\[1\\.25rem\\]{--tw-translate-x: 1.25rem !important;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))!important}.translate-y-0{--tw-translate-y: 0px !important;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))!important}.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))!important}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite!important}.cursor-pointer{cursor:pointer!important}.flex-col{flex-direction:column!important}.items-center{align-items:center!important}.justify-center{justify-content:center!important}.gap-3{gap:.75rem!important}.gap-5{gap:1.25rem!important}.rounded-full{border-radius:9999px!important}.rounded-md{border-radius:.375rem!important}.border{border-width:1px!important}.border-0{border-width:0px!important}.border-2{border-width:2px!important}.border-gray-300{--tw-border-opacity: 1 !important;border-color:rgb(209 213 219 / var(--tw-border-opacity))!important}.border-transparent{border-color:transparent!important}.bg-blue-50{--tw-bg-opacity: 1 !important;background-color:rgb(239 246 255 / var(--tw-bg-opacity))!important}.bg-gray-200{--tw-bg-opacity: 1 !important;background-color:rgb(229 231 235 / var(--tw-bg-opacity))!important}.bg-primary-base{background-color:var(--fl-color-primary)!important}.bg-transparent{background-color:transparent!important}.bg-white{--tw-bg-opacity: 1 !important;background-color:rgb(255 255 255 / var(--tw-bg-opacity))!important}.fill-gray-200{fill:#e5e7eb!important}.fill-primary-base{fill:var(--fl-color-primary)!important}.fill-white{fill:#fff!important}.p-2{padding:.5rem!important}.px-10{padding-left:2.5rem!important;padding-right:2.5rem!important}.px-2{padding-left:.5rem!important;padding-right:.5rem!important}.py-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.text-left{text-align:left!important}.text-center{text-align:center!important}.text-2xl{font-size:1.5rem!important;line-height:2rem!important}.text-base{font-size:1rem!important;line-height:1.5rem!important}.text-sm{font-size:.875rem!important;line-height:1.25rem!important}.text-xs{font-size:.75rem!important;line-height:1rem!important}.font-bold{font-weight:700!important}.font-medium{font-weight:500!important}.leading-5{line-height:1.25rem!important}.leading-none{line-height:1!important}.text-gray-600{--tw-text-opacity: 1 !important;color:rgb(75 85 99 / var(--tw-text-opacity))!important}.text-gray-700{--tw-text-opacity: 1 !important;color:rgb(55 65 81 / var(--tw-text-opacity))!important}.text-gray-900{--tw-text-opacity: 1 !important;color:rgb(17 24 39 / var(--tw-text-opacity))!important}.text-primary-base{color:var(--fl-color-primary)!important}.text-rose-500{--tw-text-opacity: 1 !important;color:rgb(244 63 94 / var(--tw-text-opacity))!important}.text-white{--tw-text-opacity: 1 !important;color:rgb(255 255 255 / var(--tw-text-opacity))!important}.underline{text-decoration-line:underline!important}.accent-primary-base{accent-color:var(--fl-color-primary)!important}.opacity-0{opacity:0!important}.opacity-100{opacity:1!important}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1) !important;--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color) !important;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)!important}.shadow-none{--tw-shadow: 0 0 #0000 !important;--tw-shadow-colored: 0 0 #0000 !important;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)!important}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05) !important;--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color) !important;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)!important}.ring-0{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color) !important;--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color) !important;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)!important}.ring-2{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color) !important;--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color) !important;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)!important}.ring-gray-200{--tw-ring-opacity: 1 !important;--tw-ring-color: rgb(229 231 235 / var(--tw-ring-opacity)) !important}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter!important;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter!important;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important;transition-duration:.15s!important}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important;transition-duration:.15s!important}.delay-300{transition-delay:.3s!important}.duration-200{transition-duration:.2s!important}.duration-700{transition-duration:.7s!important}.duration-\\[600ms\\]{transition-duration:.6s!important}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)!important}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)!important}:root{--fl-color-primary_from_host: var(--fl-color-primary);--fl-color-primary-light_from_host: var(--fl-color-primary-light);--fl-color-primary-dark_from_host: var(--fl-color-primary-dark);--fl-color-primary-disabled_from_host: var(--fl-color-primary-disabled);--fl-color-primary-hover_from_host: var(--fl-color-primary-hover);--fl-color-primary-focus_from_host: var(--fl-color-primary-focus);--fl-color-primary-text_from_host: var(--fl-color-primary-text);--fl-color-secondary_from_host: var(--fl-color-secondary);--fl-color-secondary-light_from_host: var(--fl-color-secondary-light);--fl-color-secondary-dark_from_host: var(--fl-color-secondary-dark);--fl-color-secondary-disabled_from_host: var(--fl-color-secondary-disabled);--fl-color-secondary-hover_from_host: var(--fl-color-secondary-hover);--fl-color-secondary-focus_from_host: var(--fl-color-secondary-focus);--fl-color-secondary-text_from_host: var(--fl-color-secondary-text)}*{--fl-color-primary: var(--fl-color-primary_from_host, #1890ff);--fl-color-primary-light: var(--fl-color-primary-light_from_host, #74c0ff);--fl-color-primary-dark: var(--fl-color-primary-dark_from_host, #006bce);--fl-color-primary-disabled: var(--fl-color-primary-disabled_from_host, #f5f5f5);--fl-color-primary-hover: var(--fl-color-primary-hover_from_host, #40a9ff);--fl-color-primary-focus: var(--fl-color-primary-focus_from_host, #40a9ff);--fl-color-primary-text: var(--fl-color-primary-text_from_host, white);--fl-color-secondary: var(--fl-color-secondary_from_host, #d3d3d3);--fl-color-secondary-light: var(--fl-color-secondary-light_from_host, #e1e1e1);--fl-color-secondary-dark: var(--fl-color-secondary-dark_from_host, #cecece);--fl-color-secondary-disabled: var(--fl-color-secondary-disabled_from_host, #f5f5f5);--fl-color-secondary-hover: var(--fl-color-secondary-hover_from_host, #ebebeb);--fl-color-secondary-focus: var(--fl-color-secondary-focus_from_host, #ebebeb);--fl-color-secondary-text: var(--fl-color-secondary-text_from_host, #262626)}.hover\\:bg-gray-100:hover{--tw-bg-opacity: 1 !important;background-color:rgb(243 244 246 / var(--tw-bg-opacity))!important}.hover\\:bg-primary-hover:hover{background-color:var(--fl-color-primary-hover)!important}.hover\\:bg-sky-50\\/50:hover{background-color:#f0f9ff80!important}.focus\\:outline-none:focus{outline:2px solid transparent!important;outline-offset:2px!important}.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) !important;--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color) !important;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)!important}.focus\\:ring-gray-200:focus{--tw-ring-opacity: 1 !important;--tw-ring-color: rgb(229 231 235 / var(--tw-ring-opacity)) !important}.focus\\:ring-primary-focus:focus{--tw-ring-color: var(--fl-color-primary-focus) !important}.focus\\:ring-offset-2:focus{--tw-ring-offset-width: 2px !important}.focus-visible\\:ring-2:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color) !important;--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color) !important;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)!important}.focus-visible\\:ring-gray-500:focus-visible{--tw-ring-opacity: 1 !important;--tw-ring-color: rgb(107 114 128 / var(--tw-ring-opacity)) !important}.focus-visible\\:ring-white:focus-visible{--tw-ring-opacity: 1 !important;--tw-ring-color: rgb(255 255 255 / var(--tw-ring-opacity)) !important}.focus-visible\\:ring-opacity-75:focus-visible{--tw-ring-opacity: .75 !important}.disabled\\:cursor-text:disabled{cursor:text!important}.disabled\\:bg-gray-100:disabled{--tw-bg-opacity: 1 !important;background-color:rgb(243 244 246 / var(--tw-bg-opacity))!important}.disabled\\:px-0:disabled{padding-left:0!important;padding-right:0!important}.disabled\\:text-gray-300:disabled{--tw-text-opacity: 1 !important;color:rgb(209 213 219 / var(--tw-text-opacity))!important}.disabled\\:text-gray-600:disabled{--tw-text-opacity: 1 !important;color:rgb(75 85 99 / var(--tw-text-opacity))!important}.disabled\\:opacity-75:disabled{opacity:.75!important}.disabled\\:hover\\:bg-transparent:hover:disabled{background-color:transparent!important}@media (min-width: 768px){.md\\:grid{display:grid!important}.md\\:w-\\[240px\\]{width:240px!important}.md\\:w-\\[300px\\]{width:300px!important}.md\\:w-auto{width:auto!important}.md\\:w-full{width:100%!important}.md\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))!important}.md\\:text-3xl{font-size:1.875rem!important;line-height:2.25rem!important}.md\\:text-lg{font-size:1.125rem!important;line-height:1.75rem!important}.md\\:transition-none{transition-property:none!important}}\n".toString()}),ui(Ih,{onSignUp:t=>n(t,e.source,e.channel),onVerify:t=>i(t,e.source,e.channel),onResendOtp:o,onSuccess:s,onDecline:s})]})})},Ph=f("div")([{display:"flex",alignItems:"center",justifyContent:"center"}]),Nh=async(e,t)=>{await(async e=>{if(br)return br;const t=e.replace(/\/?$/,"");return br=_r.create({baseURL:`${t}`}),((e,{onRequest:t,onRequestError:r,onResponse:n,onResponseError:i})=>{e.interceptors.request.use((async e=>(t&&await t(e),e)),(async e=>{throw r&&await r(e),e})),e.interceptors.response.use((async e=>(n&&await n(e),e)),(async e=>{throw i&&await i(e),e}))})(br,{onRequestError:yr,onResponseError:wr}),br})(e.backendUrl);const{googleCloud:r,identityProvider:n,isEstablished:i}=await(async(e,t)=>{if(!br)throw new Error("Api has not been initialized");return br.get("customer-profile/backend/v1.0/workplace-link/config",Er(e,t)).then((e=>e.data))})(e.apolloAccessToken,t);Lu=r;const o=e.backendUrl;var s,a;return s=o,a=e.apolloAccessToken,s=s.replace(/\/?$/,""),Ch=_r.create({baseURL:`${s}/benefits-onboarding/backend`,headers:{Authorization:`Bearer ${a}`}}),Ch.interceptors.response.use((e=>e),Th),{identityProvider:n,isEstablished:i}};!function(n,i,o,s){c.p=i,e=n,t=o,r=s}(O);function xh(){return(xh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}var Lh=["context","children"];function Dh(e){this.getChildContext=function(){return e.context};var t=e.children,r=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)t.indexOf(r=o[n])>=0||(i[r]=e[r]);return i}(e,Lh);return te(t,r)}function Mh(){var e=new CustomEvent("_preact",{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(e),this._vdom=O(Dh,xh({},this._props,{context:e.detail.context}),function e(t,r){if(3===t.nodeType)return t.data;if(1!==t.nodeType)return null;var n=[],i={},o=0,s=t.attributes,a=t.childNodes;for(o=s.length;o--;)"slot"!==s[o].name&&(i[s[o].name]=s[o].value,i[Uh(s[o].name)]=s[o].value);for(o=a.length;o--;){var c=e(a[o],null),l=a[o].slot;l?i[l]=O(Bh,{name:l},c):n[o]=c}var u=r?O(Bh,null,n):n;return O(r||t.nodeName.toLowerCase(),i,u)}(this,this._vdomComponent)),(this.hasAttribute("hydrate")?ee:Z)(this._vdom,this._root)}function Uh(e){return e.replace(/-(\w)/g,(function(e,t){return t?t.toUpperCase():""}))}function jh(e,t,r){if(this._vdom){var n={};n[e]=r=null==r?void 0:r,n[Uh(e)]=r,this._vdom=te(this._vdom,n),Z(this._vdom,this._root)}}function Fh(){Z(this._vdom=null,this._root)}function Bh(e,t){var r=this;return O("slot",xh({},e,{ref:function(e){e?(r.ref=e,r._listener||(r._listener=function(e){e.stopPropagation(),e.detail.context=t},e.addEventListener("_preact",r._listener))):r.ref.removeEventListener("_preact",r._listener)}}))}!function(e,t,r,n){function i(){var t=Reflect.construct(HTMLElement,[],i);return t._vdomComponent=e,t._root=n&&n.shadow?t.attachShadow({mode:n.mode||"open"}):t,t}(i.prototype=Object.create(HTMLElement.prototype)).constructor=i,i.prototype.connectedCallback=Mh,i.prototype.attributeChangedCallback=jh,i.prototype.disconnectedCallback=Fh,r=r||e.observedAttributes||Object.keys(e.propTypes||{}),i.observedAttributes=r,r.forEach((function(e){Object.defineProperty(i.prototype,e,{get:function(){return this._vdom.props[e]},set:function(t){this._vdom?this.attributeChangedCallback(e,null,t):(this._props||(this._props={}),this._props[e]=t,this.connectedCallback());var r=typeof t;null!=t&&"string"!==r&&"boolean"!==r&&"number"!==r||this.setAttribute(e,t)}})})),customElements.define(t||e.tagName||e.displayName||e.name,i)}((e=>{const t={backendUrl:e["backend-url"],apolloAccessToken:e["access-token"],source:e.source,channel:e.channel},[r,n]=ge(!1),i=we(""),[o,s]=ge("Initializing");return vr((async e=>{if(t.backendUrl)try{const r=await Nh(t,e);i.current=r.identityProvider,n(r.isEstablished),s("Initialized")}catch{s("Error")}}),[t.backendUrl]),r?ui(Qo,{}):ui(N,{children:["Initializing"===o&&ui(di,{isActive:!0}),"Error"===o&&ui(ts,{}),"Initialized"===o&&ui("div",{id:"preact_root",children:[ui(oi,{}),ui(Ph,{children:["google"===i.current&&ui(fd,{...t}),"adb2c"===i.current&&ui(ns,{...t}),"flare-app-identity"===i.current&&ui(Ah,{...t})]})]})]})}),"workplace-link",["backend-url","access-token","source","channel"],{shadow:!1});
1717
+ `,fd=e=>{const{idToken:t}=(()=>{const[e,t]=ge(""),r=Du().beforeAuthStateChanged((async e=>{t(await(null==e?void 0:e.getIdToken())??"")}));return ve((()=>r),[r]),{idToken:e}})(),[r,n]=ge(0),{apolloAccessToken:i}=e,[o,s]=ge("");vr((async e=>{try{switch(r){case 0:await(async e=>{var t;try{const r=await kr(i,e);return s((null==(t=r.linkRequest)?void 0:t.linkRequestId)??""),{isEstablished:r.isEstablished}}catch(Md){throw`[Link Workplace]: Error when requesting a workplace link: ${Md}`}})(e).then((e=>{e.isEstablished?n(5):n(1)}));break;case 1:t&&n(2);break;case 2:n(3);break;case 3:await(async(e,r)=>{const{sub:n}=Me(i);try{return await Ir(t,e,n,r)}catch(Md){throw`[Link Workplace]: Error when trying to establish workplace link: ${Md}`}})(o,e),n(5);break;case 5:rs()}}catch(Md){console.log(Md),n(4)}}),[r,t]);const a=void 0===r||0==r||3==r;return ui(pd,{children:[a&&ui(di,{isActive:a}),1===r&&ui(hd,{}),4===r&&ui(ts,{}),5===r&&ui(Qo,{})]})};var md=(e=>(e[e.PHONE_NUMBER=0]="PHONE_NUMBER",e[e.OTP=1]="OTP",e[e.SUCCESS=2]="SUCCESS",e))(md||{});const gd=e=>ui("svg",{viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",className:"lg"===e.size?"h-10 w-10":"h-5 w-5",children:[ui("path",{d:"M16 8C16 12.4183 12.4183 16 8 16C3.58172 16 0 12.4183 0 8C0 3.58172 3.58172 0 8 0C12.4183 0 16 3.58172 16 8ZM1.99743 8C1.99743 11.3151 4.68487 14.0026 8 14.0026C11.3151 14.0026 14.0026 11.3151 14.0026 8C14.0026 4.68487 11.3151 1.99743 8 1.99743C4.68487 1.99743 1.99743 4.68487 1.99743 8Z",className:"light"===e.theme?"fill-white":"fill-gray-200","fill-opacity":"light"===e.theme?"0.3":"1"}),ui("path",{d:"M8 1C8 0.447715 8.44943 -0.00643769 8.99741 0.0624193C9.70527 0.151368 10.3996 0.334798 11.0615 0.608964C12.0321 1.011 12.914 1.60028 13.6569 2.34315C14.3997 3.08602 14.989 3.96793 15.391 4.93853C15.6652 5.60043 15.8486 6.29473 15.9376 7.0026C16.0064 7.55057 15.5523 8 15 8C14.4477 8 14.0085 7.54925 13.9169 7.00462C13.842 6.55939 13.7169 6.12298 13.5433 5.7039C13.2417 4.97595 12.7998 4.31451 12.2426 3.75736C11.6855 3.20021 11.0241 2.75825 10.2961 2.45672C9.87702 2.28313 9.44061 2.15804 8.99538 2.08314C8.45075 1.99152 8 1.55228 8 1Z",className:"light"===e.theme?"fill-white":"fill-primary-base"})]}),_d=e=>{const[t,r]=ge(!1);return ui("button",{type:"button",className:`inline-flex items-center justify-center px-10 py-2 border border-transparent text-base font-medium rounded-md shadow-sm disabled:text-gray-300 bg-primary-base hover:bg-primary-hover disabled:bg-gray-100 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary-focus w-full md:w-auto ${e.class} `,disabled:e.disabled,onClick:async()=>{if(e.onClickPromise&&!t){r(!0);try{await e.onClickPromise()}catch(n){}r(!1)}},children:[ui("div",{className:"relative "+(t?"invisible":""),children:e.children}),t&&ui("div",{className:"absolute animate-spin",children:ui(gd,{theme:"light"})})]})},vd=({className:e,label:t,allowedKeyPattern:r,onChange:n,value:i,iconElement:o,...s})=>{const a=ke((e=>{r.test(e.key)||e.preventDefault()}),[r]);return ui(N,{children:[ui("label",{className:"font-medium text-sm text-gray-900 text-left",children:ui("span",{children:t})}),ui("div",{className:"relative",children:[ui("input",{type:"text",className:`p-2 border-0 ring-2 ring-gray-200 focus:outline-none focus-visible:ring-gray-500 text-base font-medium rounded-md shadow-sm w-full ${e}`,value:i,onKeyPress:a,onChange:e=>n(e.currentTarget.value),...s}),o]})]})},yd=({className:e,onClick:t,...r})=>{const[n,i]=ge(!1);return ui("button",{className:`inline-flex items-center justify-center px-2 text-primary-base rounded-md bg-transparent hover:bg-sky-50/50 focus:ring-2 focus:ring-primary-focus ${e??""}`,onClick:ke((()=>{if(!n)return i(!0),t().finally((()=>{i(!1)}))}),[n,t]),...r,children:[ui("div",{className:"relative "+(n?"invisible":""),children:r.children}),n&&ui("div",{className:"absolute animate-spin",children:ui(gd,{theme:"primary"})})]})},wd=({className:e,children:t})=>ui("h1",{className:`text-2xl md:text-3xl font-bold ${e??""}`,children:t}),bd=({className:e,children:t})=>ui("h3",{class:`text-base md:text-lg text-gray-600 ${e??""}`,children:t}),Ed=e=>{switch(e){case"sign-up-viewed":case"sign-up-completed":case"sign-up-declined":return new Promise((()=>{}))}};var kd=Object.defineProperty,Id=(e,t,r)=>(((e,t,r)=>{t in e?kd(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r})(e,"symbol"!=typeof t?t+"":t,r),r);let Td=new class{constructor(){Id(this,"current",this.detect()),Id(this,"handoffState","pending"),Id(this,"currentId",0)}set(e){this.current!==e&&(this.handoffState="pending",this.currentId=0,this.current=e)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return"server"===this.current}get isClient(){return"client"===this.current}detect(){return"undefined"==typeof window||"undefined"==typeof document?"server":"client"}handoff(){"pending"===this.handoffState&&(this.handoffState="complete")}get isHandoffComplete(){return"complete"===this.handoffState}},Cd=(e,t)=>{Td.isServer?ve(e,t):ye(e,t)};function Sd(e){let t=we(e);return Cd((()=>{t.current=e}),[e]),t}function Rd(){let e=[],t={addEventListener:(e,r,n,i)=>(e.addEventListener(r,n,i),t.add((()=>e.removeEventListener(r,n,i)))),requestAnimationFrame(...e){let r=requestAnimationFrame(...e);return t.add((()=>cancelAnimationFrame(r)))},nextFrame:(...e)=>t.requestAnimationFrame((()=>t.requestAnimationFrame(...e))),setTimeout(...e){let r=setTimeout(...e);return t.add((()=>clearTimeout(r)))},microTask(...e){let r={current:!0};return function(e){"function"==typeof queueMicrotask?queueMicrotask(e):Promise.resolve().then(e).catch((e=>setTimeout((()=>{throw e}))))}((()=>{r.current&&e[0]()})),t.add((()=>{r.current=!1}))},style(e,t,r){let n=e.style.getPropertyValue(t);return Object.assign(e.style,{[t]:r}),this.add((()=>{Object.assign(e.style,{[t]:n})}))},group(e){let t=Rd();return e(t),this.add((()=>t.dispose()))},add:t=>(e.push(t),()=>{let r=e.indexOf(t);if(r>=0)for(let t of e.splice(r,1))t()}),dispose(){for(let t of e.splice(0))t()}};return t}function Od(){let[e]=ge(Rd);return ve((()=>()=>e.dispose()),[e]),e}let Ad=function(e){let t=Sd(e);return bo.useCallback(((...e)=>t.current(...e)),[t])};function Pd(){let e=function(){let e="undefined"==typeof document;return"useSyncExternalStore"in Eo&&Eo.useSyncExternalStore((()=>()=>{}),(()=>!1),(()=>!e))}(),[t,r]=ge(Td.isHandoffComplete);return t&&!1===Td.isHandoffComplete&&r(!1),ve((()=>{!0!==t&&r(!0)}),[t]),ve((()=>Td.handoff()),[]),!e&&t}function Nd(e,t,...r){if(e in t){let n=t[e];return"function"==typeof n?n(...r):n}let n=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map((e=>`"${e}"`)).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Nd),n}let xd=Symbol();function Ld(...e){let t=we(e);ve((()=>{t.current=e}),[e]);let r=Ad((e=>{for(let r of t.current)null!=r&&("function"==typeof r?r(e):r.current=e)}));return e.every((e=>null==e||(null==e?void 0:e[xd])))?void 0:r}function Dd(...e){return Array.from(new Set(e.flatMap((e=>"string"==typeof e?e.split(" "):[])))).filter(Boolean).join(" ")}var Md,Ud,jd=((Ud=jd||{})[Ud.None=0]="None",Ud[Ud.RenderStrategy=1]="RenderStrategy",Ud[Ud.Static=2]="Static",Ud),Fd=((Md=Fd||{})[Md.Unmount=0]="Unmount",Md[Md.Hidden=1]="Hidden",Md);function Bd({ourProps:e,theirProps:t,slot:r,defaultTag:n,features:i,visible:o=!0,name:s}){let a=Hd(t,e);if(o)return zd(a,r,n,s);let c=null!=i?i:0;if(2&c){let{static:e=!1,...t}=a;if(e)return zd(t,r,n,s)}if(1&c){let{unmount:e=!0,...t}=a;return Nd(e?0:1,{0:()=>null,1:()=>zd({...t,hidden:!0,style:{display:"none"}},r,n,s)})}return zd(a,r,n,s)}function zd(e,t={},r,n){let{as:i=r,children:o,refName:s="ref",...a}=qd(e,["unmount","static"]),c=void 0!==e.ref?{[s]:e.ref}:{},l="function"==typeof o?o(t):o;"className"in a&&a.className&&"function"==typeof a.className&&(a.className=a.className(t));let u={};if(t){let e=!1,r=[];for(let[n,i]of Object.entries(t))"boolean"==typeof i&&(e=!0),!0===i&&r.push(n);e&&(u["data-headlessui-state"]=r.join(" "))}if(i===N&&Object.keys($d(a)).length>0){if(!so(l)||Array.isArray(l)&&l.length>1)throw new Error(['Passing props on "Fragment"!',"",`The current component <${n} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(a).map((e=>` - ${e}`)).join("\n"),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map((e=>` - ${e}`)).join("\n")].join("\n"));let e=l.props,t="function"==typeof(null==e?void 0:e.className)?(...t)=>Dd(null==e?void 0:e.className(...t),a.className):Dd(null==e?void 0:e.className,a.className),r=t?{className:t}:{};return co(l,Object.assign({},Hd(l.props,$d(qd(a,["ref"]))),u,c,function(...e){return{ref:e.every((e=>null==e))?void 0:t=>{for(let r of e)null!=r&&("function"==typeof r?r(t):r.current=t)}}}(l.ref,c.ref),r))}return O(i,Object.assign({},qd(a,["ref"]),i!==N&&c,i!==N&&u),l)}function Hd(...e){if(0===e.length)return{};if(1===e.length)return e[0];let t={},r={};for(let n of e)for(let e in n)e.startsWith("on")&&"function"==typeof n[e]?(null!=r[e]||(r[e]=[]),r[e].push(n[e])):t[e]=n[e];if(t.disabled||t["aria-disabled"])return Object.assign(t,Object.fromEntries(Object.keys(r).map((e=>[e,void 0]))));for(let n in r)Object.assign(t,{[n](e,...t){let i=r[n];for(let r of i){if((e instanceof Event||(null==e?void 0:e.nativeEvent)instanceof Event)&&e.defaultPrevented)return;r(e,...t)}}});return t}function Vd(e){var t;return Object.assign(Ci(e),{displayName:null!=(t=e.displayName)?t:e.name})}function $d(e){let t=Object.assign({},e);for(let r in t)void 0===t[r]&&delete t[r];return t}function qd(e,t=[]){let r=Object.assign({},e);for(let n of t)n in r&&delete r[n];return r}let Wd=re(null);Wd.displayName="OpenClosedContext";var Kd=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(Kd||{});function Jd(){return Ie(Wd)}function Gd({value:e,children:t}){return bo.createElement(Wd.Provider,{value:e},t)}function Yd(){let e=we(!1);return Cd((()=>(e.current=!0,()=>{e.current=!1})),[]),e}function Qd(e,...t){e&&t.length>0&&e.classList.add(...t)}function Xd(e,...t){e&&t.length>0&&e.classList.remove(...t)}function Zd(e,t,r,n){let i=r?"enter":"leave",o=Rd(),s=void 0!==n?function(e){let t={called:!1};return(...r)=>{if(!t.called)return t.called=!0,e(...r)}}(n):()=>{};"enter"===i&&(e.removeAttribute("hidden"),e.style.display="");let a=Nd(i,{enter:()=>t.enter,leave:()=>t.leave}),c=Nd(i,{enter:()=>t.enterTo,leave:()=>t.leaveTo}),l=Nd(i,{enter:()=>t.enterFrom,leave:()=>t.leaveFrom});return Xd(e,...t.base,...t.enter,...t.enterTo,...t.enterFrom,...t.leave,...t.leaveFrom,...t.leaveTo,...t.entered),Qd(e,...t.base,...a,...l),o.nextFrame((()=>{Xd(e,...t.base,...a,...l),Qd(e,...t.base,...a,...c),function(e,t){let r=Rd();if(!e)return r.dispose;let{transitionDuration:n,transitionDelay:i}=getComputedStyle(e),[o,s]=[n,i].map((e=>{let[t=0]=e.split(",").filter(Boolean).map((e=>e.includes("ms")?parseFloat(e):1e3*parseFloat(e))).sort(((e,t)=>t-e));return t})),a=o+s;if(0!==a){r.group((r=>{r.setTimeout((()=>{t(),r.dispose()}),a),r.addEventListener(e,"transitionrun",(e=>{e.target===e.currentTarget&&r.dispose()}))}));let n=r.addEventListener(e,"transitionend",(e=>{e.target===e.currentTarget&&(t(),n())}))}else t();r.add((()=>t())),r.dispose}(e,(()=>(Xd(e,...t.base,...a),Qd(e,...t.base,...t.entered),s())))})),o.dispose}function eh(e=""){return e.split(" ").filter((e=>e.trim().length>1))}let th=re(null);th.displayName="TransitionContext";var rh,nh=((rh=nh||{}).Visible="visible",rh.Hidden="hidden",rh);let ih=re(null);function oh(e){return"children"in e?oh(e.children):e.current.filter((({el:e})=>null!==e.current)).filter((({state:e})=>"visible"===e)).length>0}function sh(e,t){let r=Sd(e),n=we([]),i=Yd(),o=Od(),s=Ad(((e,t=Fd.Hidden)=>{let s=n.current.findIndex((({el:t})=>t===e));-1!==s&&(Nd(t,{[Fd.Unmount](){n.current.splice(s,1)},[Fd.Hidden](){n.current[s].state="hidden"}}),o.microTask((()=>{var e;!oh(n)&&i.current&&(null==(e=r.current)||e.call(r))})))})),a=Ad((e=>{let t=n.current.find((({el:t})=>t===e));return t?"visible"!==t.state&&(t.state="visible"):n.current.push({el:e,state:"visible"}),()=>s(e,Fd.Unmount)})),c=we([]),l=we(Promise.resolve()),u=we({enter:[],leave:[],idle:[]}),d=Ad(((e,r,n)=>{c.current.splice(0),t&&(t.chains.current[r]=t.chains.current[r].filter((([t])=>t!==e))),null==t||t.chains.current[r].push([e,new Promise((e=>{c.current.push(e)}))]),null==t||t.chains.current[r].push([e,new Promise((e=>{Promise.all(u.current[r].map((([e,t])=>t))).then((()=>e()))}))]),"enter"===r?l.current=l.current.then((()=>null==t?void 0:t.wait.current)).then((()=>n(r))):n(r)})),h=Ad(((e,t,r)=>{Promise.all(u.current[t].splice(0).map((([e,t])=>t))).then((()=>{var e;null==(e=c.current.shift())||e()})).then((()=>r(t)))}));return Ee((()=>({children:n,register:a,unregister:s,onStart:d,onStop:h,wait:l,chains:u})),[a,s,n,d,h,u,l])}function ah(){}ih.displayName="NestingContext";let ch=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function lh(e){var t;let r={};for(let n of ch)r[n]=null!=(t=e[n])?t:ah;return r}let uh=jd.RenderStrategy;let dh=Vd((function(e,t){let{show:r,appear:n=!1,unmount:i=!0,...o}=e,s=we(null),a=Ld(s,t);Pd();let c=Jd();if(void 0===r&&null!==c&&(r=(c&Kd.Open)===Kd.Open),![!0,!1].includes(r))throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[l,u]=ge(r?"visible":"hidden"),d=sh((()=>{u("hidden")})),[h,p]=ge(!0),f=we([r]);Cd((()=>{!1!==h&&f.current[f.current.length-1]!==r&&(f.current.push(r),p(!1))}),[f,r]);let m=Ee((()=>({show:r,appear:n,initial:h})),[r,n,h]);ve((()=>{if(r)u("visible");else if(oh(d)){let e=s.current;if(!e)return;let t=e.getBoundingClientRect();0===t.x&&0===t.y&&0===t.width&&0===t.height&&u("hidden")}else u("hidden")}),[r,d]);let g={unmount:i},_=Ad((()=>{var t;h&&p(!1),null==(t=e.beforeEnter)||t.call(e)})),v=Ad((()=>{var t;h&&p(!1),null==(t=e.beforeLeave)||t.call(e)}));return bo.createElement(ih.Provider,{value:d},bo.createElement(th.Provider,{value:m},Bd({ourProps:{...g,as:N,children:bo.createElement(hh,{ref:a,...g,...o,beforeEnter:_,beforeLeave:v})},theirProps:{},defaultTag:N,features:uh,visible:"visible"===l,name:"Transition"})))})),hh=Vd((function(e,t){var r,n;let{beforeEnter:i,afterEnter:o,beforeLeave:s,afterLeave:a,enter:c,enterFrom:l,enterTo:u,entered:d,leave:h,leaveFrom:p,leaveTo:f,...m}=e,g=we(null),_=Ld(g,t),v=null==(r=m.unmount)||r?Fd.Unmount:Fd.Hidden,{show:y,appear:w,initial:b}=function(){let e=Ie(th);if(null===e)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}(),[E,k]=ge(y?"visible":"hidden"),I=function(){let e=Ie(ih);if(null===e)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}(),{register:T,unregister:C}=I;ve((()=>T(g)),[T,g]),ve((()=>{if(v===Fd.Hidden&&g.current)return y&&"visible"!==E?void k("visible"):Nd(E,{hidden:()=>C(g),visible:()=>T(g)})}),[E,g,T,C,y,v]);let S=Sd({base:eh(m.className),enter:eh(c),enterFrom:eh(l),enterTo:eh(u),entered:eh(d),leave:eh(h),leaveFrom:eh(p),leaveTo:eh(f)}),R=function(e){let t=we(lh(e));return ve((()=>{t.current=lh(e)}),[e]),t}({beforeEnter:i,afterEnter:o,beforeLeave:s,afterLeave:a}),O=Pd();ve((()=>{if(O&&"visible"===E&&null===g.current)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")}),[g,E,O]);let A=w&&y&&b,P=!O||b&&!w?"idle":y?"enter":"leave",N=function(e=0){let[t,r]=ge(e),n=Yd(),i=ke((e=>{n.current&&r((t=>t|e))}),[t,n]),o=ke((e=>Boolean(t&e)),[t]),s=ke((e=>{n.current&&r((t=>t&~e))}),[r,n]),a=ke((e=>{n.current&&r((t=>t^e))}),[r]);return{flags:t,addFlag:i,hasFlag:o,removeFlag:s,toggleFlag:a}}(0),x=Ad((e=>Nd(e,{enter:()=>{N.addFlag(Kd.Opening),R.current.beforeEnter()},leave:()=>{N.addFlag(Kd.Closing),R.current.beforeLeave()},idle:()=>{}}))),L=Ad((e=>Nd(e,{enter:()=>{N.removeFlag(Kd.Opening),R.current.afterEnter()},leave:()=>{N.removeFlag(Kd.Closing),R.current.afterLeave()},idle:()=>{}}))),D=sh((()=>{k("hidden"),C(g)}),I);!function({immediate:e,container:t,direction:r,classes:n,onStart:i,onStop:o}){let s=Yd(),a=Od(),c=Sd(r);Cd((()=>{e&&(c.current="enter")}),[e]),Cd((()=>{let e=Rd();a.add(e.dispose);let r=t.current;if(r&&"idle"!==c.current&&s.current)return e.dispose(),i.current(c.current),e.add(Zd(r,n.current,"enter"===c.current,(()=>{e.dispose(),o.current(c.current)}))),e.dispose}),[r])}({immediate:A,container:g,classes:S,direction:P,onStart:Sd((e=>{D.onStart(g,e,x)})),onStop:Sd((e=>{D.onStop(g,e,L),"leave"===e&&!oh(D)&&(k("hidden"),C(g))}))});let M=m,U={ref:_};return A?M={...M,className:Dd(m.className,...S.current.enter,...S.current.enterFrom)}:(M.className=Dd(m.className,null==(n=g.current)?void 0:n.className),""===M.className&&delete M.className),bo.createElement(ih.Provider,{value:D},bo.createElement(Gd,{value:Nd(E,{visible:Kd.Open,hidden:Kd.Closed})|N.flags},Bd({ourProps:U,theirProps:M,defaultTag:"div",features:uh,visible:"visible"===E,name:"Transition.Child"})))})),ph=Vd((function(e,t){let r=null!==Ie(th),n=null!==Jd();return bo.createElement(bo.Fragment,null,!r&&n?bo.createElement(dh,{ref:t,...e}):bo.createElement(hh,{ref:t,...e}))})),fh=Object.assign(dh,{Child:ph,Root:dh});const mh=({children:e})=>{const t=bo.Children.toArray(e),r=t.find((e=>e.type===gh)),n=t.find((e=>e.type===_h));return ui(fh,{appear:!0,show:!0,enter:"transition duration-700 ease-out",enterFrom:"opacity-0",enterTo:"opacity-100",class:"opacity-0",children:ui("div",{className:"my-20 flex flex-col text-center items-center max-w-[40rem] mx-auto",children:[ui(fh,{appear:!0,show:!0,enter:"transition duration-700 ease-out md:transition-none",enterFrom:"-translate-y-6",enterTo:"translate-y-0",class:"-translate-y-6",children:r&&ui("div",{className:"flex items-center h-full",children:r})}),ui(fh,{appear:!0,show:!0,enter:"transition delay-300 duration-[600ms] ease-out",enterFrom:"opacity-0 -translate-y-6",enterTo:"opacity-100 translate-y-0",class:"opacity-0 -translate-y-6",children:n&&ui("div",{className:"flex items-center h-full",children:n})})]})})},gh=({children:e})=>ui(N,{children:e}),_h=({children:e})=>ui(N,{children:e});mh.Top=gh,mh.Bottom=_h;const vh={verfiedPhoneNumber:void 0},yh=re(vh),wh=e=>O("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"green",className:"w-5 h-5",...e},O("path",{fillRule:"evenodd",d:"M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16Zm3.857-9.809a.75.75 0 0 0-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 1 0-1.06 1.061l2.5 2.5a.75.75 0 0 0 1.137-.089l4-5.5Z",clipRule:"evenodd"})),bh=({onSubmit:e,onDecline:t})=>{const{trace:r}={trace:Ed},[n,i]=ge(""),{setPhoneNumber:o,phoneNumber:s}=(()=>{const{verfiedPhoneNumber:e}=Ie(yh),[t,r]=ge(e??""),n=Ee((()=>t.replace(/ /g,"")),[t]),i=Ee((()=>n.startsWith("04")&&10===n.length||n.startsWith("614")&&11===n.length||n.startsWith("+614")&&12===n.length||/^\+642\d{7,9}$/.test(n)),[n]),o=Ee((()=>n.startsWith("04")?`+61${n.replace(/^0+/,"")}`:n.startsWith("614")?`+${n}`:n),[n]),s=Ee((()=>(e=>{let t=0;return"#### ### ### ### ### ### ###".replace(/#/g,(()=>e[t++]??"")).trim()})(n)),[n]),a=Ee((()=>o===e),[o,e]);return{setPhoneNumber:r,phoneNumber:{valid:i,formatted:o,masked:s,isVerified:a}}})(),[a,c]=ge(s.isVerified);ve((()=>{r("sign-up-viewed")}),[r]);const l=ke((()=>{i("")}),[]),u=ke((()=>{const e=s.valid?"":"Please enter a valid Australian mobile number beginning with 04.";i(e),c(s.isVerified)}),[s.isVerified,s.valid]),d=ke((async()=>{s.valid&&await e(s).then((()=>r("sign-up-completed"))).catch(i)}),[s,e,r]);ke((()=>r("sign-up-declined").then(t)),[t,r]);const h=ke((async()=>{c(!1)}),[]),p=a?ui("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3 text-xs text-green-700 font-bold",children:["Verified"," ",ui("span",{className:"ml-1",children:ui(wh,{})})]}):void 0;return ui(mh,{children:[ui(mh.Top,{children:ui("div",{className:"flex flex-col gap-5",children:[ui(wd,{children:"Join your workplace benefits program"}),ui(bd,{children:[a?"Confirm ":"Enter "," your ",ui("b",{children:"personal"})," mobile number to finish setting up your Flare Benefits account linked to your workplace"]})]})}),ui(mh.Bottom,{children:ui("div",{className:"mt-5 md:w-[300px] text-left",children:[ui(vd,{allowedKeyPattern:/[+0-9]/,inputMode:"numeric",className:"mt-1 mb-1 w-full",label:"Australian Mobile Number",value:s.formatted,onChange:o,onfocusin:l,onfocusout:u,iconElement:p,disabled:a}),0!==n.length&&ui("div",{className:"h-8 leading-none",children:ui("span",{className:"text-xs text-rose-500",children:n})}),a&&ui("div",{className:"mt-2 ml-2 mb-2 leading-none",children:ui("span",{className:"text-xs",children:["Not your personal number?",ui(yd,{class:"text-blue-500",onClick:h,children:"Change number"})]})}),ui("div",{className:"font-medium text-sm text-gray-900 mt-2",children:["By creating your account you confirm you have read and agree to Flare Benefits"," ",ui("a",{className:"text-primary-base",href:"https://www.flarehr.com/flare-app-terms-and-conditions/",target:"_blank",rel:"noreferrer",children:" Terms of Use "}),"and",ui("a",{className:"text-primary-base",href:"https://www.flarehr.com/privacy-policy/",target:"_blank",rel:"noreferrer",children:" Privacy Policy"}),"."," "]}),ui(_d,{class:"mt-5 md:w-full text-white",onClickPromise:d,children:"Join your workplace"}),!1]})})]})},Eh=e=>O("svg",{xmlns:"http://www.w3.org/2000/svg",height:24,viewBox:"0 -960 960 960",width:24,fill:"currentColor",...e},O("path",{d:"m313-440 224 224-57 56-320-320 320-320 57 56-224 224h487v80H313Z"})),kh=({children:e,...t})=>ui("dialog",{className:"z-50 w-full h-full absolute top-0 left-0 bottom-0 right-0",...t,children:e}),Ih=({open:e})=>ui(kh,{open:e,children:ui("div",{className:"flex flex-col gap-5 items-center justify-center text-center mt-20",children:[ui("span",{className:"animate-spin",children:ui(gd,{size:"lg"})}),ui(wd,{children:"Creating your account"}),ui("div",{children:[ui(bd,{children:"This can take up to 30 seconds."}),ui(bd,{children:"Please don't navigate away or refresh your browser."})]})]})}),Th=({phoneNumber:e,onVerify:t,onResendOtp:r,onGoBack:n})=>{const{otp:i,setOtp:o}=(()=>{const[e,t]=ge("");return{otp:{valid:Ee((()=>6===e.length),[e.length]),code:e},setOtp:t}})(),[s,a]=ge(!1),[c,l]=ge(""),{countdown:u,restart:d}=(e=>{const[t,r]=ge(e),n=we(),i=ke((()=>{clearInterval(n.current)}),[]);return ve((()=>i),[i]),{countdown:t,restart:ke((()=>{let t=e;clearInterval(n.current),n.current=setInterval((()=>{t<0?clearInterval(n.current):r(t--)}),1e3)}),[e])}})(60);ve(d,[d]);const h=ke((()=>(a(!0),l(""),t(i.code).catch(l).finally((()=>{a(!1)})))),[t,i.code]),p=ke((()=>(l(""),r().then(d).catch(l))),[r,d]);return ui(N,{children:[ui(Ih,{open:s}),ui(mh,{children:[ui(mh.Top,{children:ui("div",{className:"flex flex-col gap-5",children:[ui(wd,{children:"Verify your mobile number"}),ui(bd,{children:["An SMS verification code has been sent to the number"," ",ui("span",{className:"dd-privacy-mask",children:e}),"."]})]})}),ui(mh.Bottom,{children:ui("div",{className:"mt-5 md:w-[300px] text-left",children:[ui(vd,{allowedKeyPattern:/[0-9]/,inputMode:"numeric",minLength:6,maxLength:6,className:"mt-1 mb-1 w-full",label:"Enter your verification code",onChange:o}),c&&ui("span",{className:"text-xs text-rose-500",children:c}),ui("p",{className:"mt-2 text-center text-xs text-gray-600 disabled:opacity-75 ",children:["Didn't get the code?",ui(yd,{disabled:0!==u,className:"underline mx-2 disabled:text-gray-600 disabled:hover:bg-transparent disabled:cursor-text disabled:px-0",onClick:p,children:"Resend SMS"}),0!==u&&ui(N,{children:["in ",u," secs"]})]}),ui(_d,{class:"mt-5 md:w-full text-white",disabled:!i.valid,onClickPromise:h,children:"Continue"}),ui(_d,{class:"mt-5 md:w-full bg-white hover:bg-gray-100 focus:ring-gray-200 border-0 shadow-none text-gray-700 border-gray-300",onClickPromise:async()=>{n()},children:ui("span",{className:"flex gap-3",children:[ui(Eh,{}),"Back"]})})]})})]})]})},Ch=({onSignUp:e,onVerify:t,onResendOtp:r,onSuccess:n,onDecline:i})=>{const[o,s]=ge(""),{step:a,goBack:c,goToStep:l}=(()=>{const[e,t]=ge(0),r=ke((()=>{const r=e-1;r>=0&&t(r)}),[e]),n=ke((e=>{e<=2&&t(e)}),[]);return{step:e,goBack:r,goToStep:n}})(),u=ke((t=>e(t.formatted).then((e=>{s(t.masked),e.isVerificationRequired?l(md.OTP):n()}))),[l,e,n]),d=ke((e=>t(e).then((()=>{n()}))),[t,n]);return ui(N,{children:[a===md.PHONE_NUMBER&&ui(bh,{onSubmit:u,onDecline:i}),a===md.OTP&&ui(Th,{phoneNumber:o,onVerify:d,onResendOtp:r,onGoBack:c})]})},Sh=e=>{var t,r;throw"Auth_SessionExpired"===(null==(r=null==(t=e.response)?void 0:t.data)?void 0:r.code)&&window.location.reload(),e};let Rh;const Oh=()=>Rh;var Ah=(e=>(e.Auth_AccountDisabled="Sorry, your account has been deactivated. Please contact Flare if there are any issues.",e.Auth_AccountLocked="Sorry, your account is currently locked due to too many attempts. Please try again later.",e.Auth_Unregistered="Sorry, we are currently experiencing some issues. Please try again later.",e.Auth_InvalidVerificationCode="Your one time passcode doesn't look right. Please try again with a new one time passcode.",e.Auth_SessionExpired="Sorry, looks like your session has expired. Please try again.",e.Validation_InvalidPhoneNumber="Please enter a valid Australian mobile number beginning with 04.",e))(Ah||{});const Ph=e=>{var t;const r=null==(t=null==e?void 0:e.response)?void 0:t.data;throw Ah[null==r?void 0:r.code]??"Sorry, we are currently experiencing some issues. Please try again later."},Nh=e=>{const[t,r]=ge(!1),{signUp:n,verifyOtp:i,resendOtp:o}={signUp:async(e,t="Invite",r="invite")=>Oh().post("v2.0/auth/signUp",{mobileNumber:e,source:t,channel:r}).catch((e=>(Ph(e),Promise.reject()))).then((e=>({isVerificationRequired:e.data.isVerificationRequired??!0}))),verifyOtp:async(e,t="Invite",r="invite")=>{await Oh().post("auth/verify",{otp:e,source:t,channel:r}).catch(Ph)},resendOtp:async()=>{await Oh().post("auth/resend").catch(Ph)}},s=()=>{r(!0),rs()};return t?ui(Qo,{}):ui(N,{children:ui("div",{className:"font-inter",children:[ui("style",{children:".pointer-events-none{pointer-events:none!important}.invisible{visibility:hidden!important}.absolute{position:absolute!important}.relative{position:relative!important}.inset-y-0{top:0!important;bottom:0!important}.bottom-0{bottom:0!important}.left-0{left:0!important}.right-0{right:0!important}.top-0{top:0!important}.z-50{z-index:50!important}.mx-2{margin-left:.5rem!important;margin-right:.5rem!important}.mx-auto{margin-left:auto!important;margin-right:auto!important}.my-20{margin-top:5rem!important;margin-bottom:5rem!important}.my-auto{margin-top:auto!important;margin-bottom:auto!important}.mb-1{margin-bottom:.25rem!important}.mb-2{margin-bottom:.5rem!important}.ml-1{margin-left:.25rem!important}.ml-2{margin-left:.5rem!important}.ml-3{margin-left:.75rem!important}.mt-1{margin-top:.25rem!important}.mt-2{margin-top:.5rem!important}.mt-20{margin-top:5rem!important}.mt-5{margin-top:1.25rem!important}.inline-block{display:inline-block!important}.inline{display:inline!important}.flex{display:flex!important}.inline-flex{display:inline-flex!important}.h-10{height:2.5rem!important}.h-16{height:4rem!important}.h-4{height:1rem!important}.h-5{height:1.25rem!important}.h-7{height:1.75rem!important}.h-8{height:2rem!important}.h-\\[1\\.25rem\\]{height:1.25rem!important}.h-\\[1\\.5rem\\]{height:1.5rem!important}.h-full{height:100%!important}.w-10{width:2.5rem!important}.w-16{width:4rem!important}.w-4{width:1rem!important}.w-5{width:1.25rem!important}.w-7{width:1.75rem!important}.w-\\[1\\.25rem\\]{width:1.25rem!important}.w-\\[2\\.75rem\\]{width:2.75rem!important}.w-full{width:100%!important}.max-w-\\[40rem\\]{max-width:40rem!important}.max-w-\\[59\\.5rem\\]{max-width:59.5rem!important}.shrink-0{flex-shrink:0!important}.-translate-y-6{--tw-translate-y: -1.5rem !important;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))!important}.translate-x-0{--tw-translate-x: 0px !important;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))!important}.translate-x-\\[1\\.25rem\\]{--tw-translate-x: 1.25rem !important;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))!important}.translate-y-0{--tw-translate-y: 0px !important;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))!important}.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))!important}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite!important}.cursor-pointer{cursor:pointer!important}.flex-col{flex-direction:column!important}.items-center{align-items:center!important}.justify-center{justify-content:center!important}.gap-3{gap:.75rem!important}.gap-5{gap:1.25rem!important}.rounded-full{border-radius:9999px!important}.rounded-md{border-radius:.375rem!important}.border{border-width:1px!important}.border-0{border-width:0px!important}.border-2{border-width:2px!important}.border-gray-300{--tw-border-opacity: 1 !important;border-color:rgb(209 213 219 / var(--tw-border-opacity))!important}.border-transparent{border-color:transparent!important}.bg-blue-50{--tw-bg-opacity: 1 !important;background-color:rgb(239 246 255 / var(--tw-bg-opacity))!important}.bg-gray-200{--tw-bg-opacity: 1 !important;background-color:rgb(229 231 235 / var(--tw-bg-opacity))!important}.bg-primary-base{background-color:var(--fl-color-primary)!important}.bg-transparent{background-color:transparent!important}.bg-white{--tw-bg-opacity: 1 !important;background-color:rgb(255 255 255 / var(--tw-bg-opacity))!important}.fill-gray-200{fill:#e5e7eb!important}.fill-primary-base{fill:var(--fl-color-primary)!important}.fill-white{fill:#fff!important}.p-2{padding:.5rem!important}.px-10{padding-left:2.5rem!important;padding-right:2.5rem!important}.px-2{padding-left:.5rem!important;padding-right:.5rem!important}.py-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.pr-3{padding-right:.75rem!important}.text-left{text-align:left!important}.text-center{text-align:center!important}.text-2xl{font-size:1.5rem!important;line-height:2rem!important}.text-base{font-size:1rem!important;line-height:1.5rem!important}.text-sm{font-size:.875rem!important;line-height:1.25rem!important}.text-xs{font-size:.75rem!important;line-height:1rem!important}.font-bold{font-weight:700!important}.font-medium{font-weight:500!important}.leading-5{line-height:1.25rem!important}.leading-none{line-height:1!important}.text-blue-500{--tw-text-opacity: 1 !important;color:rgb(59 130 246 / var(--tw-text-opacity))!important}.text-gray-600{--tw-text-opacity: 1 !important;color:rgb(75 85 99 / var(--tw-text-opacity))!important}.text-gray-700{--tw-text-opacity: 1 !important;color:rgb(55 65 81 / var(--tw-text-opacity))!important}.text-gray-900{--tw-text-opacity: 1 !important;color:rgb(17 24 39 / var(--tw-text-opacity))!important}.text-green-700{--tw-text-opacity: 1 !important;color:rgb(21 128 61 / var(--tw-text-opacity))!important}.text-primary-base{color:var(--fl-color-primary)!important}.text-rose-500{--tw-text-opacity: 1 !important;color:rgb(244 63 94 / var(--tw-text-opacity))!important}.text-white{--tw-text-opacity: 1 !important;color:rgb(255 255 255 / var(--tw-text-opacity))!important}.underline{text-decoration-line:underline!important}.accent-primary-base{accent-color:var(--fl-color-primary)!important}.opacity-0{opacity:0!important}.opacity-100{opacity:1!important}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1) !important;--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color) !important;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)!important}.shadow-none{--tw-shadow: 0 0 #0000 !important;--tw-shadow-colored: 0 0 #0000 !important;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)!important}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05) !important;--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color) !important;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)!important}.ring-0{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color) !important;--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color) !important;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)!important}.ring-2{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color) !important;--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color) !important;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)!important}.ring-gray-200{--tw-ring-opacity: 1 !important;--tw-ring-color: rgb(229 231 235 / var(--tw-ring-opacity)) !important}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter!important;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter!important;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important;transition-duration:.15s!important}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important;transition-duration:.15s!important}.delay-300{transition-delay:.3s!important}.duration-200{transition-duration:.2s!important}.duration-700{transition-duration:.7s!important}.duration-\\[600ms\\]{transition-duration:.6s!important}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)!important}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)!important}:root{--fl-color-primary_from_host: var(--fl-color-primary);--fl-color-primary-light_from_host: var(--fl-color-primary-light);--fl-color-primary-dark_from_host: var(--fl-color-primary-dark);--fl-color-primary-disabled_from_host: var(--fl-color-primary-disabled);--fl-color-primary-hover_from_host: var(--fl-color-primary-hover);--fl-color-primary-focus_from_host: var(--fl-color-primary-focus);--fl-color-primary-text_from_host: var(--fl-color-primary-text);--fl-color-secondary_from_host: var(--fl-color-secondary);--fl-color-secondary-light_from_host: var(--fl-color-secondary-light);--fl-color-secondary-dark_from_host: var(--fl-color-secondary-dark);--fl-color-secondary-disabled_from_host: var(--fl-color-secondary-disabled);--fl-color-secondary-hover_from_host: var(--fl-color-secondary-hover);--fl-color-secondary-focus_from_host: var(--fl-color-secondary-focus);--fl-color-secondary-text_from_host: var(--fl-color-secondary-text)}*{--fl-color-primary: var(--fl-color-primary_from_host, #1890ff);--fl-color-primary-light: var(--fl-color-primary-light_from_host, #74c0ff);--fl-color-primary-dark: var(--fl-color-primary-dark_from_host, #006bce);--fl-color-primary-disabled: var(--fl-color-primary-disabled_from_host, #f5f5f5);--fl-color-primary-hover: var(--fl-color-primary-hover_from_host, #40a9ff);--fl-color-primary-focus: var(--fl-color-primary-focus_from_host, #40a9ff);--fl-color-primary-text: var(--fl-color-primary-text_from_host, white);--fl-color-secondary: var(--fl-color-secondary_from_host, #d3d3d3);--fl-color-secondary-light: var(--fl-color-secondary-light_from_host, #e1e1e1);--fl-color-secondary-dark: var(--fl-color-secondary-dark_from_host, #cecece);--fl-color-secondary-disabled: var(--fl-color-secondary-disabled_from_host, #f5f5f5);--fl-color-secondary-hover: var(--fl-color-secondary-hover_from_host, #ebebeb);--fl-color-secondary-focus: var(--fl-color-secondary-focus_from_host, #ebebeb);--fl-color-secondary-text: var(--fl-color-secondary-text_from_host, #262626)}.hover\\:bg-gray-100:hover{--tw-bg-opacity: 1 !important;background-color:rgb(243 244 246 / var(--tw-bg-opacity))!important}.hover\\:bg-primary-hover:hover{background-color:var(--fl-color-primary-hover)!important}.hover\\:bg-sky-50\\/50:hover{background-color:#f0f9ff80!important}.focus\\:outline-none:focus{outline:2px solid transparent!important;outline-offset:2px!important}.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) !important;--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color) !important;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)!important}.focus\\:ring-gray-200:focus{--tw-ring-opacity: 1 !important;--tw-ring-color: rgb(229 231 235 / var(--tw-ring-opacity)) !important}.focus\\:ring-primary-focus:focus{--tw-ring-color: var(--fl-color-primary-focus) !important}.focus\\:ring-offset-2:focus{--tw-ring-offset-width: 2px !important}.focus-visible\\:ring-2:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color) !important;--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color) !important;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)!important}.focus-visible\\:ring-gray-500:focus-visible{--tw-ring-opacity: 1 !important;--tw-ring-color: rgb(107 114 128 / var(--tw-ring-opacity)) !important}.focus-visible\\:ring-white:focus-visible{--tw-ring-opacity: 1 !important;--tw-ring-color: rgb(255 255 255 / var(--tw-ring-opacity)) !important}.focus-visible\\:ring-opacity-75:focus-visible{--tw-ring-opacity: .75 !important}.disabled\\:cursor-text:disabled{cursor:text!important}.disabled\\:bg-gray-100:disabled{--tw-bg-opacity: 1 !important;background-color:rgb(243 244 246 / var(--tw-bg-opacity))!important}.disabled\\:px-0:disabled{padding-left:0!important;padding-right:0!important}.disabled\\:text-gray-300:disabled{--tw-text-opacity: 1 !important;color:rgb(209 213 219 / var(--tw-text-opacity))!important}.disabled\\:text-gray-600:disabled{--tw-text-opacity: 1 !important;color:rgb(75 85 99 / var(--tw-text-opacity))!important}.disabled\\:opacity-75:disabled{opacity:.75!important}.disabled\\:hover\\:bg-transparent:hover:disabled{background-color:transparent!important}@media (min-width: 768px){.md\\:grid{display:grid!important}.md\\:w-\\[240px\\]{width:240px!important}.md\\:w-\\[300px\\]{width:300px!important}.md\\:w-auto{width:auto!important}.md\\:w-full{width:100%!important}.md\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))!important}.md\\:text-3xl{font-size:1.875rem!important;line-height:2.25rem!important}.md\\:text-lg{font-size:1.125rem!important;line-height:1.75rem!important}.md\\:transition-none{transition-property:none!important}}\n".toString()}),ui(Ch,{onSignUp:t=>n(t,e.source,e.channel),onVerify:t=>i(t,e.source,e.channel),onResendOtp:o,onSuccess:s,onDecline:s})]})})},xh=f("div")([{display:"flex",alignItems:"center",justifyContent:"center"}]),Lh=async(e,t)=>{await(async e=>{if(br)return br;const t=e.replace(/\/?$/,"");return br=_r.create({baseURL:`${t}`}),((e,{onRequest:t,onRequestError:r,onResponse:n,onResponseError:i})=>{e.interceptors.request.use((async e=>(t&&await t(e),e)),(async e=>{throw r&&await r(e),e})),e.interceptors.response.use((async e=>(n&&await n(e),e)),(async e=>{throw i&&await i(e),e}))})(br,{onRequestError:yr,onResponseError:wr}),br})(e.backendUrl);const{googleCloud:r,identityProvider:n,isEstablished:i,verifiedPhoneNumber:o}=await(async(e,t)=>{if(!br)throw new Error("Api has not been initialized");return br.get("customer-profile/backend/v1.0/workplace-link/config",Er(e,t)).then((e=>e.data))})(e.apolloAccessToken,t);Lu=r;const s=e.backendUrl;var a,c;return a=s,c=e.apolloAccessToken,a=a.replace(/\/?$/,""),Rh=_r.create({baseURL:`${a}/benefits-onboarding/backend`,headers:{Authorization:`Bearer ${c}`}}),Rh.interceptors.response.use((e=>e),Sh),{identityProvider:n,isEstablished:i,verifiedPhoneNumber:o}};!function(n,i,o,s){c.p=i,e=n,t=o,r=s}(O);function Dh(){return(Dh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}var Mh=["context","children"];function Uh(e){this.getChildContext=function(){return e.context};var t=e.children,r=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)t.indexOf(r=o[n])>=0||(i[r]=e[r]);return i}(e,Mh);return te(t,r)}function jh(){var e=new CustomEvent("_preact",{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(e),this._vdom=O(Uh,Dh({},this._props,{context:e.detail.context}),function e(t,r){if(3===t.nodeType)return t.data;if(1!==t.nodeType)return null;var n=[],i={},o=0,s=t.attributes,a=t.childNodes;for(o=s.length;o--;)"slot"!==s[o].name&&(i[s[o].name]=s[o].value,i[Fh(s[o].name)]=s[o].value);for(o=a.length;o--;){var c=e(a[o],null),l=a[o].slot;l?i[l]=O(Hh,{name:l},c):n[o]=c}var u=r?O(Hh,null,n):n;return O(r||t.nodeName.toLowerCase(),i,u)}(this,this._vdomComponent)),(this.hasAttribute("hydrate")?ee:Z)(this._vdom,this._root)}function Fh(e){return e.replace(/-(\w)/g,(function(e,t){return t?t.toUpperCase():""}))}function Bh(e,t,r){if(this._vdom){var n={};n[e]=r=null==r?void 0:r,n[Fh(e)]=r,this._vdom=te(this._vdom,n),Z(this._vdom,this._root)}}function zh(){Z(this._vdom=null,this._root)}function Hh(e,t){var r=this;return O("slot",Dh({},e,{ref:function(e){e?(r.ref=e,r._listener||(r._listener=function(e){e.stopPropagation(),e.detail.context=t},e.addEventListener("_preact",r._listener))):r.ref.removeEventListener("_preact",r._listener)}}))}!function(e,t,r,n){function i(){var t=Reflect.construct(HTMLElement,[],i);return t._vdomComponent=e,t._root=n&&n.shadow?t.attachShadow({mode:n.mode||"open"}):t,t}(i.prototype=Object.create(HTMLElement.prototype)).constructor=i,i.prototype.connectedCallback=jh,i.prototype.attributeChangedCallback=Bh,i.prototype.disconnectedCallback=zh,r=r||e.observedAttributes||Object.keys(e.propTypes||{}),i.observedAttributes=r,r.forEach((function(e){Object.defineProperty(i.prototype,e,{get:function(){return this._vdom.props[e]},set:function(t){this._vdom?this.attributeChangedCallback(e,null,t):(this._props||(this._props={}),this._props[e]=t,this.connectedCallback());var r=typeof t;null!=t&&"string"!==r&&"boolean"!==r&&"number"!==r||this.setAttribute(e,t)}})})),customElements.define(t||e.tagName||e.displayName||e.name,i)}((e=>{const t={backendUrl:e["backend-url"],apolloAccessToken:e["access-token"],source:e.source,channel:e.channel},[r,n]=ge(!1),i=we(""),[o,s]=ge("Initializing"),[a,c]=ge(vh);return vr((async e=>{if(t.backendUrl)try{const r=await Lh(t,e);i.current=r.identityProvider,n(r.isEstablished),s("Initialized"),c({verfiedPhoneNumber:r.verifiedPhoneNumber})}catch{s("Error")}}),[t.backendUrl]),r?ui(Qo,{}):ui(N,{children:["Initializing"===o&&ui(di,{isActive:!0}),"Error"===o&&ui(ts,{}),"Initialized"===o&&ui("div",{id:"preact_root",children:[ui(oi,{}),ui(xh,{children:["google"===i.current&&ui(fd,{...t}),"adb2c"===i.current&&ui(ns,{...t}),ui(yh.Provider,{value:a,children:"flare-app-identity"===i.current&&ui(Nh,{...t})})]})]})]})}),"workplace-link",["backend-url","access-token","source","channel"],{shadow:!1});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flarehr/apollo-customer-workplace-link",
3
- "version": "1.60.45234",
3
+ "version": "1.62.48649",
4
4
  "license": "MIT",
5
5
  "main": "build/bundle.js",
6
6
  "files": [
@@ -41,7 +41,8 @@
41
41
  "twin.macro": "^3.4.0",
42
42
  "typescript": "^5.0.2",
43
43
  "vite": "^4.4.5",
44
- "vite-plugin-babel-macros": "^1.0.6"
44
+ "vite-plugin-babel-macros": "^1.0.6",
45
+ "vite-plugin-svgr": "^4.2.0"
45
46
  },
46
47
  "lint-staged": {
47
48
  "!(*.d).{js,jsx,ts,tsx}": "eslint --fix",
@@ -1,3 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor">
2
- <path fill-rule="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" clip-rule="evenodd" />
3
- </svg>
@@ -1 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" width="125" height="125" fill="none" xmlns:v="https://vecta.io/nano"><g clip-path="url(#A)"><path d="M62.499 119.932c31.719 0 57.432-25.713 57.432-57.432S94.218 5.068 62.499 5.068 5.066 30.781 5.066 62.5s25.713 57.432 57.432 57.432z" fill="#eeefee"/><path d="M73.142 6.068a57.43 57.43 0 0 1 32.806 26.793c7.122 12.785 9.095 27.806 5.516 41.996s-12.44 26.479-24.774 34.357-27.209 10.749-41.589 8.029c7.466 2.369 15.338 3.185 23.131 2.399a57.43 57.43 0 0 0 22.186-6.97 57.44 57.44 0 0 0 17.604-15.196c4.77-6.213 8.219-13.336 10.134-20.93s2.258-15.502 1.005-23.233-4.075-15.126-8.291-21.727-9.738-12.27-16.226-16.658a57.43 57.43 0 0 0-21.502-8.859z" fill="#dbd8dd"/><path d="M72.773 62.5l18.233 18.233-10.272 10.272-18.233-18.233-18.233 18.233-10.272-10.272L52.229 62.5 33.996 44.267l10.272-10.272 18.233 18.233 18.233-18.233 10.272 10.272L72.773 62.5z" fill="silver"/><g fill="#323c6b"><path d="M80.732 91.85a.86.86 0 0 1-.324-.064c-.103-.042-.196-.105-.274-.183L62.499 73.966 44.864 91.603c-.158.158-.373.247-.597.247s-.439-.089-.597-.247L33.397 81.331c-.158-.158-.247-.373-.247-.597s.089-.439.247-.597L51.033 62.5 33.396 44.865c-.158-.158-.247-.373-.247-.597s.089-.439.247-.597l10.272-10.272c.158-.158.373-.247.597-.247s.439.089.597.247l17.637 17.635 17.635-17.635c.158-.158.373-.247.597-.247s.439.089.597.247L91.6 43.671c.158.158.247.373.247.597s-.089.439-.247.597L73.965 62.5 91.6 80.135c.158.158.247.373.247.597s-.089.439-.247.597L81.328 91.601a.84.84 0 0 1-.596.248zM62.499 71.927a.83.83 0 0 1 .323.064c.102.043.196.104.274.183l17.635 17.635 9.078-9.078-17.635-17.635c-.158-.158-.247-.373-.247-.597s.089-.439.247-.597L89.81 44.267l-9.078-9.078-17.635 17.635c-.158.158-.373.247-.597.247s-.439-.089-.597-.247L44.267 35.189l-9.078 9.078 17.635 17.635c.158.158.247.373.247.597s-.089.439-.247.597L35.19 80.731l9.078 9.078 17.635-17.635c.158-.158.373-.247.596-.247zm.001 48.85A58.28 58.28 0 0 1 5.342 51.131c2.248-11.304 7.799-21.689 15.949-29.839S39.826 7.591 51.13 5.343a58.28 58.28 0 0 1 33.671 3.316 58.27 58.27 0 0 1 26.154 21.464c6.403 9.584 9.822 20.851 9.822 32.377-.018 15.451-6.163 30.264-17.088 41.189S77.95 120.76 62.5 120.777zm0-114.865a56.59 56.59 0 0 0-40.013 96.602A56.59 56.59 0 0 0 119.089 62.5c-.017-15.003-5.985-29.386-16.593-39.995A56.65 56.65 0 0 0 62.5 5.912z"/></g></g><defs><clipPath id="A"><path fill="#fff" d="M0 0h125v125H0z"/></clipPath></defs></svg>
@@ -1 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 -960 960 960" width="24" fill="currentColor"><path d="m313-440 224 224-57 56-320-320 320-320 57 56-224 224h487v80H313Z"/></svg>