@aws-amplify/ui-vue 3.1.21 → 3.1.22

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.
package/dist/index.cjs CHANGED
@@ -29,7 +29,7 @@ PERFORMANCE OF THIS SOFTWARE.
29
29
  Event: `).concat(JSON.stringify(f.data)));return o.scheduler.schedule(function(){o.forward(f);var g=o._nextState(f);o.update(g,f)}),o._state},this.sendTo=function(d,m,f){var g=o.parent&&(m===Pe.Parent||o.parent.id===m),y=g?o.parent:V(m)?m===Pe.Internal?o:o.children.get(m)||it.get(m):Nl(m)?m:void 0;if(!y){if(!g)throw new Error("Unable to send event to child '".concat(m,"' from service '").concat(o.id,"'."));return}if("machine"in y){if(o.status!==K.Stopped||o.parent!==y||o.state.done){var p=E(E({},d),{name:d.name===lr?"".concat(Le(o.id)):d.name,origin:o.sessionId});!f&&o.machine.config.predictableActionArguments?o._outgoingQueue.push([y,p]):y.send(p)}}else!f&&o.machine.config.predictableActionArguments?o._outgoingQueue.push([y,d.data]):y.send(d.data)},this._exec=function(d,m,f,g){g===void 0&&(g=o.machine.options.actions);var y=d.exec||Ht(d.type,g),p=M(y)?y:y?y.exec:d.exec;if(p)try{return p(m,f.data,o.machine.config.predictableActionArguments?{action:d,_event:f}:{action:d,state:o.state,_event:f})}catch(W){throw o.parent&&o.parent.send({type:"xstate.error",data:W}),W}switch(d.type){case Je:{var b=d;o.defer(b);break}case wt:var w=d;if(typeof w.delay=="number"){o.defer(w);return}else w.to?o.sendTo(w._event,w.to,f===Oe):o.send(w._event);break;case sr:o.cancel(d.sendId);break;case jt:{if(o.status!==K.Running)return;var h=d.activity;if(!o.machine.config.predictableActionArguments&&!o.state.activities[h.id||h.type])break;if(h.type===D.Invoke){var v=Ai(h.src),S=o.machine.options.services?o.machine.options.services[v.type]:void 0,_=h.id,C=h.data,A="autoForward"in h?h.autoForward:!!h.forward;if(!S)return;var T=C?Wt(C,m,f):void 0;if(typeof S=="string")return;var I=M(S)?S(m,f.data,{data:T,src:v,meta:h.meta}):S;if(!I)return;var x=void 0;ze(I)&&(I=T?I.withContext(T):I,x={autoForward:A}),o.spawn(I,_,x)}else o.spawnActivity(h);break}case tn:{o.stopChild(d.activity.id);break}case rn:var k=d,$=k.label,O=k.value;$?o.logger($,O):o.logger(O);break}};var i=E(E({},e.defaultOptions),n),a=i.clock,s=i.logger,l=i.parent,u=i.id,c=u!==void 0?u:t.id;this.id=c,this.logger=s,this.clock=a,this.parent=l,this.options=i,this.scheduler=new yo({deferEvents:this.options.deferEvents}),this.sessionId=it.bookId()}return Object.defineProperty(e.prototype,"initialState",{get:function(){var t=this;return this._initialState?this._initialState:De(this,function(){return t._initialState=t.machine.initialState,t._initialState})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),e.prototype.execute=function(t,n){var o,i;try{for(var a=U(t.actions),s=a.next();!s.done;s=a.next()){var l=s.value;this.exec(l,t,n)}}catch(u){o={error:u}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(o)throw o.error}}},e.prototype.update=function(t,n){var o,i,a,s,l,u,c,d,m=this;if(t._sessionid=this.sessionId,this._state=t,(!this.machine.config.predictableActionArguments||n===Oe)&&this.options.execute)this.execute(this.state);else for(var f=void 0;f=this._outgoingQueue.shift();)f[0].send(f[1]);if(this.children.forEach(function(I){m.state.children[I.id]=I}),this.devTools&&this.devTools.send(n.data,t),t.event)try{for(var g=U(this.eventListeners),y=g.next();!y.done;y=g.next()){var p=y.value;p(t.event)}}catch(I){o={error:I}}finally{try{y&&!y.done&&(i=g.return)&&i.call(g)}finally{if(o)throw o.error}}try{for(var b=U(this.listeners),w=b.next();!w.done;w=b.next()){var p=w.value;p(t,t.event)}}catch(I){a={error:I}}finally{try{w&&!w.done&&(s=b.return)&&s.call(b)}finally{if(a)throw a.error}}try{for(var h=U(this.contextListeners),v=h.next();!v.done;v=h.next()){var S=v.value;S(this.state.context,this.state.history?this.state.history.context:void 0)}}catch(I){l={error:I}}finally{try{v&&!v.done&&(u=h.return)&&u.call(h)}finally{if(l)throw l.error}}if(this.state.done){var _=t.configuration.find(function(I){return I.type==="final"&&I.parent===m.machine}),C=_&&_.doneData?Wt(_.doneData,t.context,n):void 0;this._doneEvent=ft(this.id,C);try{for(var A=U(this.doneListeners),T=A.next();!T.done;T=A.next()){var p=T.value;p(this._doneEvent)}}catch(I){c={error:I}}finally{try{T&&!T.done&&(d=A.return)&&d.call(A)}finally{if(c)throw c.error}}this._stop(),this._stopChildren(),it.free(this.sessionId)}},e.prototype.onTransition=function(t){return this.listeners.add(t),this.status===K.Running&&t(this.state,this.state.event),this},e.prototype.subscribe=function(t,n,o){var i=this,a=Vt(t,n,o);this.listeners.add(a.next),this.status!==K.NotStarted&&a.next(this.state);var s=function(){i.doneListeners.delete(s),i.stopListeners.delete(s),a.complete()};return this.status===K.Stopped?a.complete():(this.onDone(s),this.onStop(s)),{unsubscribe:function(){i.listeners.delete(a.next),i.doneListeners.delete(s),i.stopListeners.delete(s)}}},e.prototype.onEvent=function(t){return this.eventListeners.add(t),this},e.prototype.onSend=function(t){return this.sendListeners.add(t),this},e.prototype.onChange=function(t){return this.contextListeners.add(t),this},e.prototype.onStop=function(t){return this.stopListeners.add(t),this},e.prototype.onDone=function(t){return this.status===K.Stopped&&this._doneEvent?t(this._doneEvent):this.doneListeners.add(t),this},e.prototype.off=function(t){return this.listeners.delete(t),this.eventListeners.delete(t),this.sendListeners.delete(t),this.stopListeners.delete(t),this.doneListeners.delete(t),this.contextListeners.delete(t),this},e.prototype.start=function(t){var n=this;if(this.status===K.Running)return this;this.machine._init(),it.register(this.sessionId,this),this.initialized=!0,this.status=K.Running;var o=t===void 0?this.initialState:De(this,function(){return Zl(t)?n.machine.resolveState(t):n.machine.resolveState(fe.from(t,n.machine.context))});return this.options.devTools&&this.attachDev(),this.scheduler.initialize(function(){n.update(o,Oe)}),this},e.prototype._stopChildren=function(){this.children.forEach(function(t){M(t.stop)&&t.stop()}),this.children.clear()},e.prototype._stop=function(){var t,n,o,i,a,s,l,u,c,d;try{for(var m=U(this.listeners),f=m.next();!f.done;f=m.next()){var g=f.value;this.listeners.delete(g)}}catch(A){t={error:A}}finally{try{f&&!f.done&&(n=m.return)&&n.call(m)}finally{if(t)throw t.error}}try{for(var y=U(this.stopListeners),p=y.next();!p.done;p=y.next()){var g=p.value;g(),this.stopListeners.delete(g)}}catch(A){o={error:A}}finally{try{p&&!p.done&&(i=y.return)&&i.call(y)}finally{if(o)throw o.error}}try{for(var b=U(this.contextListeners),w=b.next();!w.done;w=b.next()){var g=w.value;this.contextListeners.delete(g)}}catch(A){a={error:A}}finally{try{w&&!w.done&&(s=b.return)&&s.call(b)}finally{if(a)throw a.error}}try{for(var h=U(this.doneListeners),v=h.next();!v.done;v=h.next()){var g=v.value;this.doneListeners.delete(g)}}catch(A){l={error:A}}finally{try{v&&!v.done&&(u=h.return)&&u.call(h)}finally{if(l)throw l.error}}if(!this.initialized)return this;this.initialized=!1,this.status=K.Stopped,this._initialState=void 0;try{for(var S=U(Object.keys(this.delayedEventsMap)),_=S.next();!_.done;_=S.next()){var C=_.value;this.clock.clearTimeout(this.delayedEventsMap[C])}}catch(A){c={error:A}}finally{try{_&&!_.done&&(d=S.return)&&d.call(S)}finally{if(c)throw c.error}}this.scheduler.clear(),this.scheduler=new yo({deferEvents:this.options.deferEvents})},e.prototype.stop=function(){var t=this,n=this.scheduler;return this._stop(),n.schedule(function(){var o=Z({type:"xstate.stop"}),i=De(t,function(){var a=H(j([],F(t.state.configuration),!1).sort(function(d,m){return m.order-d.order}).map(function(d){return _e(d.onExit,t.machine.options.actions)})),s=F(gt(t.machine,t.state,t.state.context,o,[{type:"exit",actions:a}],t.machine.config.predictableActionArguments?t._exec:void 0,t.machine.config.predictableActionArguments||t.machine.config.preserveActionOrder),2),l=s[0],u=s[1],c=new fe({value:t.state.value,context:u,_event:o,_sessionid:t.sessionId,historyValue:void 0,history:t.state,actions:l.filter(function(d){return!Wn(d)}),activities:{},events:[],configuration:[],transitions:[],children:{},done:t.state.done,tags:t.state.tags,machine:t.machine});return c.changed=!0,c});t.update(i,o),t._stopChildren(),it.free(t.sessionId)}),this},e.prototype.batch=function(t){var n=this;if(this.status===K.NotStarted&&this.options.deferEvents)mt||Gn(!1,"".concat(t.length,' event(s) were sent to uninitialized service "').concat(this.machine.id,`" and are deferred. Make sure .start() is called for this service.
30
30
  Event: `).concat(JSON.stringify(event)));else if(this.status!==K.Running)throw new Error("".concat(t.length,' event(s) were sent to uninitialized service "').concat(this.machine.id,'". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.'));if(!!t.length){var o=!!this.machine.config.predictableActionArguments&&this._exec;this.scheduler.schedule(function(){var i,a,s=n.state,l=!1,u=[],c=function(g){var y=Z(g);n.forward(y),s=De(n,function(){return n.machine.transition(s,y,void 0,o||void 0)}),u.push.apply(u,j([],F(n.machine.config.predictableActionArguments?s.actions:s.actions.map(function(p){return Ql(p,s)})),!1)),l=l||!!s.changed};try{for(var d=U(t),m=d.next();!m.done;m=d.next()){var f=m.value;c(f)}}catch(g){i={error:g}}finally{try{m&&!m.done&&(a=d.return)&&a.call(d)}finally{if(i)throw i.error}}s.changed=l,s.actions=u,n.update(s,Z(t[t.length-1]))})}},e.prototype.sender=function(t){return this.send.bind(this,t)},e.prototype._nextState=function(t,n){var o=this;n===void 0&&(n=!!this.machine.config.predictableActionArguments&&this._exec);var i=Z(t);if(i.name.indexOf(Ln)===0&&!this.state.nextEvents.some(function(s){return s.indexOf(Ln)===0}))throw i.data.data;var a=De(this,function(){return o.machine.transition(o.state,i,void 0,n||void 0)});return a},e.prototype.nextState=function(t){return this._nextState(t,!1)},e.prototype.forward=function(t){var n,o;try{for(var i=U(this.forwardTo),a=i.next();!a.done;a=i.next()){var s=a.value,l=this.children.get(s);if(!l)throw new Error("Unable to forward event '".concat(t,"' from interpreter '").concat(this.id,"' to nonexistant child '").concat(s,"'."));l.send(t)}}catch(u){n={error:u}}finally{try{a&&!a.done&&(o=i.return)&&o.call(i)}finally{if(n)throw n.error}}},e.prototype.defer=function(t){var n=this,o=this.clock.setTimeout(function(){"to"in t&&t.to?n.sendTo(t._event,t.to,!0):n.send(t._event)},t.delay);t.id&&(this.delayedEventsMap[t.id]=o)},e.prototype.cancel=function(t){this.clock.clearTimeout(this.delayedEventsMap[t]),delete this.delayedEventsMap[t]},e.prototype.exec=function(t,n,o){o===void 0&&(o=this.machine.options.actions),this._exec(t,n.context,n._event,o)},e.prototype.removeChild=function(t){var n;this.children.delete(t),this.forwardTo.delete(t),(n=this.state)===null||n===void 0||delete n.children[t]},e.prototype.stopChild=function(t){var n=this.children.get(t);!n||(this.removeChild(t),M(n.stop)&&n.stop())},e.prototype.spawn=function(t,n,o){if(this.status!==K.Running)return dr(t,n);if(mo(t))return this.spawnPromise(Promise.resolve(t),n);if(M(t))return this.spawnCallback(t,n);if(Hl(t))return this.spawnActor(t,n);if(kl(t))return this.spawnObservable(t,n);if(ze(t))return this.spawnMachine(t,E(E({},o),{id:n}));if(Tl(t))return this.spawnBehavior(t,n);throw new Error('Unable to spawn entity "'.concat(n,'" of type "').concat(typeof t,'".'))},e.prototype.spawnMachine=function(t,n){var o=this;n===void 0&&(n={});var i=new e(t,E(E({},this.options),{parent:this,id:n.id||t.id})),a=E(E({},Yn),n);a.sync&&i.onTransition(function(l){o.send(on,{state:l,id:i.id})});var s=i;return this.children.set(i.id,s),a.autoForward&&this.forwardTo.add(i.id),i.onDone(function(l){o.removeChild(i.id),o.send(Z(l,{origin:i.id}))}).start(),s},e.prototype.spawnBehavior=function(t,n){var o=ru(t,{id:n,parent:this});return this.children.set(n,o),o},e.prototype.spawnPromise=function(t,n){var o,i=this,a=!1,s;t.then(function(u){a||(s=u,i.removeChild(n),i.send(Z(ft(n,u),{origin:n})))},function(u){if(!a){i.removeChild(n);var c=Le(n,u);try{i.send(Z(c,{origin:n}))}catch(d){Ol(u,d,n),i.devTools&&i.devTools.send(c,i.state),i.machine.strict&&i.stop()}}});var l=(o={id:n,send:function(){},subscribe:function(u,c,d){var m=Vt(u,c,d),f=!1;return t.then(function(g){f||(m.next(g),!f&&m.complete())},function(g){f||m.error(g)}),{unsubscribe:function(){return f=!0}}},stop:function(){a=!0},toJSON:function(){return{id:n}},getSnapshot:function(){return s}},o[Te]=function(){return this},o);return this.children.set(n,l),l},e.prototype.spawnCallback=function(t,n){var o,i=this,a=!1,s=new Set,l=new Set,u,c=function(f){u=f,l.forEach(function(g){return g(f)}),!a&&i.send(Z(f,{origin:n}))},d;try{d=t(c,function(f){s.add(f)})}catch(f){this.send(Le(n,f))}if(mo(d))return this.spawnPromise(d,n);var m=(o={id:n,send:function(f){return s.forEach(function(g){return g(f)})},subscribe:function(f){var g=Vt(f);return l.add(g.next),{unsubscribe:function(){l.delete(g.next)}}},stop:function(){a=!0,M(d)&&d()},toJSON:function(){return{id:n}},getSnapshot:function(){return u}},o[Te]=function(){return this},o);return this.children.set(n,m),m},e.prototype.spawnObservable=function(t,n){var o,i=this,a,s=t.subscribe(function(u){a=u,i.send(Z(u,{origin:n}))},function(u){i.removeChild(n),i.send(Z(Le(n,u),{origin:n}))},function(){i.removeChild(n),i.send(Z(ft(n),{origin:n}))}),l=(o={id:n,send:function(){},subscribe:function(u,c,d){return t.subscribe(u,c,d)},stop:function(){return s.unsubscribe()},getSnapshot:function(){return a},toJSON:function(){return{id:n}}},o[Te]=function(){return this},o);return this.children.set(n,l),l},e.prototype.spawnActor=function(t,n){return this.children.set(n,t),t},e.prototype.spawnActivity=function(t){var n=this.machine.options&&this.machine.options.activities?this.machine.options.activities[t.type]:void 0;if(!n){mt||Gn(!1,"No implementation found for activity '".concat(t.type,"'"));return}var o=n(this.state.context,t);this.spawnEffect(t.id,o)},e.prototype.spawnEffect=function(t,n){var o;this.children.set(t,(o={id:t,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},stop:n||void 0,getSnapshot:function(){},toJSON:function(){return{id:t}}},o[Te]=function(){return this},o))},e.prototype.attachDev=function(){var t=fr();if(this.options.devTools&&t){if(t.__REDUX_DEVTOOLS_EXTENSION__){var n=typeof this.options.devTools=="object"?this.options.devTools:void 0;this.devTools=t.__REDUX_DEVTOOLS_EXTENSION__.connect(E(E({name:this.id,autoPause:!0,stateSanitizer:function(o){return{value:o.value,context:o.context,actions:o.actions}}},n),{features:E({jump:!1,skip:!1},n?n.features:void 0)}),this.machine),this.devTools.init(this.state)}nu(this)}},e.prototype.toJSON=function(){return{id:this.id}},e.prototype[Te]=function(){return this},e.prototype.getSnapshot=function(){return this.status===K.NotStarted?this.initialState:this._state},e.defaultOptions={execute:!0,deferEvents:!0,clock:{setTimeout:function(t,n){return setTimeout(t,n)},clearTimeout:function(t){return clearTimeout(t)}},logger:console.log.bind(console),devTools:!1},e.interpret=Gi,e}(),iu=function(e){return V(e)?E(E({},Yn),{name:e}):E(E(E({},Yn),{name:xl()}),e)};function kt(e,t){var n=iu(t);return zl(function(o){return o?o.spawn(e,n.name,n):dr(e,n.name)})}function Gi(e,t){var n=new ou(e,t);return n}function au(e){if(typeof e=="string"){var t={type:e};return t.toString=function(){return e},t}return e}function Nt(e){return E(E({type:zt},e),{toJSON:function(){e.onDone,e.onError;var t=ar(e,["onDone","onError"]);return E(E({},t),{type:zt,src:au(e.src)})}})}var xt="",Kn="#",Pn="*",Me={},Ve=function(e){return e[0]===Kn},su=function(){return{actions:{},guards:{},services:{},activities:{},delays:{}}},lu=function(){function e(t,n,o,i){o===void 0&&(o="context"in t?t.context:void 0);var a=this,s;this.config=t,this._context=o,this.order=-1,this.__xstatenode=!0,this.__cache={events:void 0,relativeValue:new Map,initialStateValue:void 0,initialState:void 0,on:void 0,transitions:void 0,candidates:{},delayedTransitions:void 0},this.idMap={},this.tags=[],this.options=Object.assign(su(),n),this.parent=i==null?void 0:i.parent,this.key=this.config.key||(i==null?void 0:i.key)||this.config.id||"(machine)",this.machine=this.parent?this.parent.machine:this,this.path=this.parent?this.parent.path.concat(this.key):[],this.delimiter=this.config.delimiter||(this.parent?this.parent.delimiter:wi),this.id=this.config.id||j([this.machine.key],F(this.path),!1).join(this.delimiter),this.version=this.parent?this.parent.version:this.config.version,this.type=this.config.type||(this.config.parallel?"parallel":this.config.states&&Object.keys(this.config.states).length?"compound":this.config.history?"history":"atomic"),this.schema=this.parent?this.machine.schema:(s=this.config.schema)!==null&&s!==void 0?s:{},this.description=this.config.description,this.initial=this.config.initial,this.states=this.config.states?st(this.config.states,function(c,d){var m,f=new e(c,{},void 0,{parent:a,key:d});return Object.assign(a.idMap,E((m={},m[f.id]=f,m),f.idMap)),f}):Me;var l=0;function u(c){var d,m;c.order=l++;try{for(var f=U(Di(c)),g=f.next();!g.done;g=f.next()){var y=g.value;u(y)}}catch(p){d={error:p}}finally{try{g&&!g.done&&(m=f.return)&&m.call(f)}finally{if(d)throw d.error}}}u(this),this.history=this.config.history===!0?"shallow":this.config.history||!1,this._transient=!!this.config.always||(this.config.on?Array.isArray(this.config.on)?this.config.on.some(function(c){var d=c.event;return d===xt}):xt in this.config.on:!1),this.strict=!!this.config.strict,this.onEntry=de(this.config.entry||this.config.onEntry).map(function(c){return Ge(c)}),this.onExit=de(this.config.exit||this.config.onExit).map(function(c){return Ge(c)}),this.meta=this.config.meta,this.doneData=this.type==="final"?this.config.data:void 0,this.invoke=de(this.config.invoke).map(function(c,d){var m,f;if(ze(c)){var g=Pt(a.id,d);return a.machine.options.services=E((m={},m[g]=c,m),a.machine.options.services),Nt({src:g,id:g})}else if(V(c.src)){var g=c.id||Pt(a.id,d);return Nt(E(E({},c),{id:g,src:c.src}))}else if(ze(c.src)||M(c.src)){var g=c.id||Pt(a.id,d);return a.machine.options.services=E((f={},f[g]=c.src,f),a.machine.options.services),Nt(E(E({id:g},c),{src:g}))}else{var y=c.src;return Nt(E(E({id:Pt(a.id,d)},c),{src:y}))}}),this.activities=de(this.config.activities).concat(this.invoke).map(function(c){return sn(c)}),this.transition=this.transition.bind(this),this.tags=de(this.config.tags)}return e.prototype._init=function(){this.__cache.transitions||Li(this).forEach(function(t){return t.on})},e.prototype.withConfig=function(t,n){var o=this.options,i=o.actions,a=o.activities,s=o.guards,l=o.services,u=o.delays;return new e(this.config,{actions:E(E({},i),t.actions),activities:E(E({},a),t.activities),guards:E(E({},s),t.guards),services:E(E({},l),t.services),delays:E(E({},u),t.delays)},n!=null?n:this.context)},e.prototype.withContext=function(t){return new e(this.config,this.options,t)},Object.defineProperty(e.prototype,"context",{get:function(){return M(this._context)?this._context():this._context},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"definition",{get:function(){return{id:this.id,key:this.key,version:this.version,context:this.context,type:this.type,initial:this.initial,history:this.history,states:st(this.states,function(t){return t.definition}),on:this.on,transitions:this.transitions,entry:this.onEntry,exit:this.onExit,activities:this.activities||[],meta:this.meta,order:this.order||-1,data:this.doneData,invoke:this.invoke,description:this.description,tags:this.tags}},enumerable:!1,configurable:!0}),e.prototype.toJSON=function(){return this.definition},Object.defineProperty(e.prototype,"on",{get:function(){if(this.__cache.on)return this.__cache.on;var t=this.transitions;return this.__cache.on=t.reduce(function(n,o){return n[o.eventType]=n[o.eventType]||[],n[o.eventType].push(o),n},{})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"after",{get:function(){return this.__cache.delayedTransitions||(this.__cache.delayedTransitions=this.getDelayedTransitions(),this.__cache.delayedTransitions)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"transitions",{get:function(){return this.__cache.transitions||(this.__cache.transitions=this.formatTransitions(),this.__cache.transitions)},enumerable:!1,configurable:!0}),e.prototype.getCandidates=function(t){if(this.__cache.candidates[t])return this.__cache.candidates[t];var n=t===xt,o=this.transitions.filter(function(i){var a=i.eventType===t;return n?a:a||i.eventType===Pn});return this.__cache.candidates[t]=o,o},e.prototype.getDelayedTransitions=function(){var t=this,n=this.config.after;if(!n)return[];var o=function(a,s){var l=M(a)?"".concat(t.id,":delay[").concat(s,"]"):a,u=Bi(l,t.id);return t.onEntry.push(Qe(u,{delay:a})),t.onExit.push(xi(u)),u},i=Ze(n)?n.map(function(a,s){var l=o(a.delay,s);return E(E({},a),{event:l})}):H(Object.keys(n).map(function(a,s){var l=n[a],u=V(l)?{target:l}:l,c=isNaN(+a)?a:+a,d=o(c,s);return de(u).map(function(m){return E(E({},m),{event:d,delay:c})})}));return i.map(function(a){var s=a.delay;return E(E({},t.formatTransition(a)),{delay:s})})},e.prototype.getStateNodes=function(t){var n,o=this;if(!t)return[];var i=t instanceof fe?t.value:dt(t,this.delimiter);if(V(i)){var a=this.getStateNode(i).initial;return a!==void 0?this.getStateNodes((n={},n[i]=a,n)):[this,this.states[i]]}var s=Object.keys(i),l=[this];return l.push.apply(l,j([],F(H(s.map(function(u){return o.getStateNode(u).getStateNodes(i[u])}))),!1)),l},e.prototype.handles=function(t){var n=Si(t);return this.events.includes(n)},e.prototype.resolveState=function(t){var n=t instanceof fe?t:fe.create(t),o=Array.from(ut([],this.getStateNodes(n.value)));return new fe(E(E({},n),{value:this.resolve(n.value),configuration:o,done:Dt(o,this),tags:ho(o),machine:this.machine}))},e.prototype.transitionLeafNode=function(t,n,o){var i=this.getStateNode(t),a=i.next(n,o);return!a||!a.transitions.length?this.next(n,o):a},e.prototype.transitionCompoundNode=function(t,n,o){var i=Object.keys(t),a=this.getStateNode(i[0]),s=a._transition(t[i[0]],n,o);return!s||!s.transitions.length?this.next(n,o):s},e.prototype.transitionParallelNode=function(t,n,o){var i,a,s={};try{for(var l=U(Object.keys(t)),u=l.next();!u.done;u=l.next()){var c=u.value,d=t[c];if(!!d){var m=this.getStateNode(c),f=m._transition(d,n,o);f&&(s[c]=f)}}}catch(w){i={error:w}}finally{try{u&&!u.done&&(a=l.return)&&a.call(l)}finally{if(i)throw i.error}}var g=Object.keys(s).map(function(w){return s[w]}),y=H(g.map(function(w){return w.transitions})),p=g.some(function(w){return w.transitions.length>0});if(!p)return this.next(n,o);var b=H(Object.keys(s).map(function(w){return s[w].configuration}));return{transitions:y,exitSet:H(g.map(function(w){return w.exitSet})),configuration:b,source:n,actions:H(Object.keys(s).map(function(w){return s[w].actions}))}},e.prototype._transition=function(t,n,o){return V(t)?this.transitionLeafNode(t,n,o):Object.keys(t).length===1?this.transitionCompoundNode(t,n,o):this.transitionParallelNode(t,n,o)},e.prototype.getTransitionData=function(t,n){return this._transition(t.value,t,Z(n))},e.prototype.next=function(t,n){var o,i,a=this,s=n.name,l=[],u=[],c;try{for(var d=U(this.getCandidates(s)),m=d.next();!m.done;m=d.next()){var f=m.value,g=f.cond,y=f.in,p=t.context,b=y?V(y)&&Ve(y)?t.matches(dt(this.getStateNodeById(y).path,this.delimiter)):ur(dt(y,this.delimiter),Cl(this.path.slice(0,-2))(t.value)):!0,w=!1;try{w=!g||Ei(this.machine,g,p,n,t)}catch(S){throw new Error("Unable to evaluate guard '".concat(g.name||g.type,"' in transition for event '").concat(s,"' in state node '").concat(this.id,`':
31
31
  `).concat(S.message))}if(w&&b){f.target!==void 0&&(u=f.target),l.push.apply(l,j([],F(f.actions),!1)),c=f;break}}}catch(S){o={error:S}}finally{try{m&&!m.done&&(i=d.return)&&i.call(d)}finally{if(o)throw o.error}}if(!!c){if(!u.length)return{transitions:[c],exitSet:[],configuration:t.value?[this]:[],source:t,actions:l};var h=H(u.map(function(S){return a.getRelativeStateNodes(S,t.historyValue)})),v=!!c.internal;return{transitions:[c],exitSet:v?[]:H(u.map(function(S){return a.getPotentiallyReenteringNodes(S)})),configuration:h,source:t,actions:l}}},e.prototype.getPotentiallyReenteringNodes=function(t){if(this.order<t.order)return[this];for(var n=[],o=this,i=t;o&&o!==i;)n.push(o),o=o.parent;return o!==i?[]:(n.push(i),n)},e.prototype.getActions=function(t,n,o,i,a,s,l){var u,c,d,m,f=this,g=s?ut([],this.getStateNodes(s.value)):[],y=new Set;try{for(var p=U(Array.from(t).sort(function(k,$){return k.order-$.order})),b=p.next();!b.done;b=p.next()){var w=b.value;(!ct(g,w)||ct(o.exitSet,w)||w.parent&&y.has(w.parent))&&y.add(w)}}catch(k){u={error:k}}finally{try{b&&!b.done&&(c=p.return)&&c.call(p)}finally{if(u)throw u.error}}try{for(var h=U(g),v=h.next();!v.done;v=h.next()){var w=v.value;(!ct(t,w)||ct(o.exitSet,w.parent))&&o.exitSet.push(w)}}catch(k){d={error:k}}finally{try{v&&!v.done&&(m=h.return)&&m.call(h)}finally{if(d)throw d.error}}o.exitSet.sort(function(k,$){return $.order-k.order});var S=Array.from(y).sort(function(k,$){return k.order-$.order}),_=new Set(o.exitSet),C=H(S.map(function(k){var $=[];if(k.type!=="final")return $;var O=k.parent;if(!O.parent)return $;$.push(lt(k.id,k.doneData),lt(O.id,k.doneData?Wt(k.doneData,i,a):void 0));var W=O.parent;return W.type==="parallel"&&ht(W).every(function(X){return Dt(o.configuration,X)})&&$.push(lt(W.id)),$})),A=S.map(function(k){var $=k.onEntry,O=k.activities.map(function(W){return $i(W)});return{type:"entry",actions:_e(l?j(j([],F($),!1),F(O),!1):j(j([],F(O),!1),F($),!1),f.machine.options.actions)}}).concat({type:"state_done",actions:C.map(function(k){return Ti(k)})}),T=Array.from(_).map(function(k){return{type:"exit",actions:_e(j(j([],F(k.onExit),!1),F(k.activities.map(function($){return Oi($)})),!1),f.machine.options.actions)}}),I=T.concat({type:"transition",actions:_e(o.actions,this.machine.options.actions)}).concat(A);if(n){var x=_e(H(j([],F(t),!1).sort(function(k,$){return $.order-k.order}).map(function(k){return k.onExit})),this.machine.options.actions).filter(function(k){return!Wn(k)});return I.concat({type:"stop",actions:x})}return I},e.prototype.transition=function(t,n,o,i){t===void 0&&(t=this.initialState);var a=Z(n),s;if(t instanceof fe)s=o===void 0?t:this.resolveState(fe.from(t,o));else{var l=V(t)?this.resolve(Gt(this.getResolvedPath(t))):this.resolve(t),u=o!=null?o:this.machine.context;s=this.resolveState(fe.from(l,u))}if(this.strict&&!this.events.includes(a.name)&&!Al(a.name))throw new Error("Machine '".concat(this.id,"' does not accept event '").concat(a.name,"'"));var c=this._transition(s.value,s,a)||{transitions:[],configuration:[],exitSet:[],source:s,actions:[]},d=ut([],this.getStateNodes(s.value)),m=c.configuration.length?ut(d,c.configuration):d;return c.configuration=j([],F(m),!1),this.resolveTransition(c,s,s.context,i,a)},e.prototype.resolveRaisedTransition=function(t,n,o,i){var a,s=t.actions;return t=this.transition(t,n,void 0,i),t._event=o,t.event=o.data,(a=t.actions).unshift.apply(a,j([],F(s),!1)),t},e.prototype.resolveTransition=function(t,n,o,i,a){var s,l,u,c,d=this;a===void 0&&(a=Oe);var m=t.configuration,f=!n||t.transitions.length>0,g=f?t.configuration:n?n.configuration:[],y=Dt(g,this),p=f?Kl(this.machine,m):void 0,b=n?n.historyValue?n.historyValue:t.source?this.machine.historyValue(n.value):void 0:void 0,w=this.getActions(new Set(g),y,t,o,a,n,i),h=n?E({},n.activities):{};try{for(var v=U(w),S=v.next();!S.done;S=v.next()){var _=S.value;try{for(var C=(u=void 0,U(_.actions)),A=C.next();!A.done;A=C.next()){var T=A.value;T.type===jt?h[T.activity.id||T.activity.type]=T:T.type===tn&&(h[T.activity.id||T.activity.type]=!1)}}catch(se){u={error:se}}finally{try{A&&!A.done&&(c=C.return)&&c.call(C)}finally{if(u)throw u.error}}}}catch(se){s={error:se}}finally{try{S&&!S.done&&(l=v.return)&&l.call(v)}finally{if(s)throw s.error}}var I=F(gt(this,n,o,a,w,i,this.machine.config.predictableActionArguments||this.machine.config.preserveActionOrder),2),x=I[0],k=I[1],$=F(Il(x,Wn),2),O=$[0],W=$[1],X=x.filter(function(se){var Ee;return se.type===jt&&((Ee=se.activity)===null||Ee===void 0?void 0:Ee.type)===zt}),te=X.reduce(function(se,Ee){return se[Ee.activity.id]=Gl(Ee.activity,d.machine,k,a),se},n?E({},n.children):{}),ee=new fe({value:p||n.value,context:k,_event:a,_sessionid:n?n._sessionid:null,historyValue:p?b?Pl(b,p):void 0:n?n.historyValue:void 0,history:!p||t.source?n:void 0,actions:p?W:[],activities:p?h:n?n.activities:{},events:[],configuration:g,transitions:t.transitions,children:te,done:y,tags:ho(g),machine:this}),oe=o!==k;ee.changed=a.name===on||oe;var ae=ee.history;ae&&delete ae.history;var Be=!y&&(this._transient||m.some(function(se){return se._transient}));if(!f&&(!Be||a.name===xt))return ee;var ne=ee;if(!y)for(Be&&(ne=this.resolveRaisedTransition(ne,{type:gi},a,i));O.length;){var Cn=O.shift();ne=this.resolveRaisedTransition(ne,Cn._event,a,i)}var En=ne.changed||(ae?!!ne.actions.length||oe||typeof ae.value!=typeof ne.value||!zi(ne.value,ae.value):void 0);return ne.changed=En,ne.history=ae,ne},e.prototype.getStateNode=function(t){if(Ve(t))return this.machine.getStateNodeById(t);if(!this.states)throw new Error("Unable to retrieve child state '".concat(t,"' from '").concat(this.id,"'; no child states exist."));var n=this.states[t];if(!n)throw new Error("Child state '".concat(t,"' does not exist on '").concat(this.id,"'"));return n},e.prototype.getStateNodeById=function(t){var n=Ve(t)?t.slice(Kn.length):t;if(n===this.id)return this;var o=this.machine.idMap[n];if(!o)throw new Error("Child state node '#".concat(n,"' does not exist on machine '").concat(this.id,"'"));return o},e.prototype.getStateNodeByPath=function(t){if(typeof t=="string"&&Ve(t))try{return this.getStateNodeById(t.slice(1))}catch{}for(var n=zn(t,this.delimiter).slice(),o=this;n.length;){var i=n.shift();if(!i.length)break;o=o.getStateNode(i)}return o},e.prototype.resolve=function(t){var n,o=this;if(!t)return this.initialStateValue||Me;switch(this.type){case"parallel":return st(this.initialStateValue,function(a,s){return a?o.getStateNode(s).resolve(t[s]||a):Me});case"compound":if(V(t)){var i=this.getStateNode(t);return i.type==="parallel"||i.type==="compound"?(n={},n[t]=i.initialStateValue,n):t}return Object.keys(t).length?st(t,function(a,s){return a?o.getStateNode(s).resolve(a):Me}):this.initialStateValue||{};default:return t||Me}},e.prototype.getResolvedPath=function(t){if(Ve(t)){var n=this.machine.idMap[t.slice(Kn.length)];if(!n)throw new Error("Unable to find state node '".concat(t,"'"));return n.path}return zn(t,this.delimiter)},Object.defineProperty(e.prototype,"initialStateValue",{get:function(){var t;if(this.__cache.initialStateValue)return this.__cache.initialStateValue;var n;if(this.type==="parallel")n=po(this.states,function(o){return o.initialStateValue||Me},function(o){return o.type!=="history"});else if(this.initial!==void 0){if(!this.states[this.initial])throw new Error("Initial state '".concat(this.initial,"' not found on '").concat(this.key,"'"));n=Kt(this.states[this.initial])?this.initial:(t={},t[this.initial]=this.states[this.initial].initialStateValue,t)}else n={};return this.__cache.initialStateValue=n,this.__cache.initialStateValue},enumerable:!1,configurable:!0}),e.prototype.getInitialState=function(t,n){this._init();var o=this.getStateNodes(t);return this.resolveTransition({configuration:o,exitSet:[],transitions:[],source:void 0,actions:[]},void 0,n!=null?n:this.machine.context,void 0)},Object.defineProperty(e.prototype,"initialState",{get:function(){var t=this.initialStateValue;if(!t)throw new Error("Cannot retrieve initial state from simple state '".concat(this.id,"'."));return this.getInitialState(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"target",{get:function(){var t;if(this.type==="history"){var n=this.config;V(n.target)?t=Ve(n.target)?Gt(this.machine.getStateNodeById(n.target).path.slice(this.path.length-1)):n.target:t=n.target}return t},enumerable:!1,configurable:!0}),e.prototype.getRelativeStateNodes=function(t,n,o){return o===void 0&&(o=!0),o?t.type==="history"?t.resolveHistory(n):t.initialStateNodes:[t]},Object.defineProperty(e.prototype,"initialStateNodes",{get:function(){var t=this;if(Kt(this))return[this];if(this.type==="compound"&&!this.initial)return[this];var n=Mt(this.initialStateValue);return H(n.map(function(o){return t.getFromRelativePath(o)}))},enumerable:!1,configurable:!0}),e.prototype.getFromRelativePath=function(t){if(!t.length)return[this];var n=F(t),o=n[0],i=n.slice(1);if(!this.states)throw new Error("Cannot retrieve subPath '".concat(o,"' from node with no states"));var a=this.getStateNode(o);if(a.type==="history")return a.resolveHistory();if(!this.states[o])throw new Error("Child state '".concat(o,"' does not exist on '").concat(this.id,"'"));return this.states[o].getFromRelativePath(i)},e.prototype.historyValue=function(t){if(!!Object.keys(this.states).length)return{current:t||this.initialStateValue,states:po(this.states,function(n,o){if(!t)return n.historyValue();var i=V(t)?void 0:t[o];return n.historyValue(i||n.initialStateValue)},function(n){return!n.history})}},e.prototype.resolveHistory=function(t){var n=this;if(this.type!=="history")return[this];var o=this.parent;if(!t){var i=this.target;return i?H(Mt(i).map(function(s){return o.getFromRelativePath(s)})):o.initialStateNodes}var a=El(o.path,"states")(t).current;return V(a)?[o.getStateNode(a)]:H(Mt(a).map(function(s){return n.history==="deep"?o.getFromRelativePath(s):[o.states[s[0]]]}))},Object.defineProperty(e.prototype,"stateIds",{get:function(){var t=this,n=H(Object.keys(this.states).map(function(o){return t.states[o].stateIds}));return[this.id].concat(n)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"events",{get:function(){var t,n,o,i;if(this.__cache.events)return this.__cache.events;var a=this.states,s=new Set(this.ownEvents);if(a)try{for(var l=U(Object.keys(a)),u=l.next();!u.done;u=l.next()){var c=u.value,d=a[c];if(d.states)try{for(var m=(o=void 0,U(d.events)),f=m.next();!f.done;f=m.next()){var g=f.value;s.add("".concat(g))}}catch(y){o={error:y}}finally{try{f&&!f.done&&(i=m.return)&&i.call(m)}finally{if(o)throw o.error}}}}catch(y){t={error:y}}finally{try{u&&!u.done&&(n=l.return)&&n.call(l)}finally{if(t)throw t.error}}return this.__cache.events=Array.from(s)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ownEvents",{get:function(){var t=new Set(this.transitions.filter(function(n){return!(!n.target&&!n.actions.length&&n.internal)}).map(function(n){return n.eventType}));return Array.from(t)},enumerable:!1,configurable:!0}),e.prototype.resolveTarget=function(t){var n=this;if(t!==void 0)return t.map(function(o){if(!V(o))return o;var i=o[0]===n.delimiter;if(i&&!n.parent)return n.getStateNodeByPath(o.slice(1));var a=i?n.key+o:o;if(n.parent)try{var s=n.parent.getStateNodeByPath(a);return s}catch(l){throw new Error("Invalid transition definition for state node '".concat(n.id,`':
32
- `).concat(l.message))}else return n.getStateNodeByPath(a)})},e.prototype.formatTransition=function(t){var n=this,o=$l(t.target),i="internal"in t?t.internal:o?o.some(function(u){return V(u)&&u[0]===n.delimiter}):!0,a=this.machine.options.guards,s=this.resolveTarget(o),l=E(E({},t),{actions:_e(de(t.actions)),cond:Ci(t.cond,a),target:s,source:this,internal:i,eventType:t.event,toJSON:function(){return E(E({},l),{target:l.target?l.target.map(function(u){return"#".concat(u.id)}):void 0,source:"#".concat(n.id)})}});return l},e.prototype.formatTransitions=function(){var t,n,o=this,i;if(!this.config.on)i=[];else if(Array.isArray(this.config.on))i=this.config.on;else{var a=this.config.on,s=Pn,l=a[s],u=l===void 0?[]:l,c=ar(a,[typeof s=="symbol"?s:s+""]);i=H(Object.keys(c).map(function(h){var v=Fe(h,c[h]);return v}).concat(Fe(Pn,u)))}var d=this.config.always?Fe("",this.config.always):[],m=this.config.onDone?Fe(String(lt(this.id)),this.config.onDone):[],f=H(this.invoke.map(function(h){var v=[];return h.onDone&&v.push.apply(v,j([],F(Fe(String(ft(h.id)),h.onDone)),!1)),h.onError&&v.push.apply(v,j([],F(Fe(String(Le(h.id)),h.onError)),!1)),v})),g=this.after,y=H(j(j(j(j([],F(m),!1),F(f),!1),F(i),!1),F(d),!1).map(function(h){return de(h).map(function(v){return o.formatTransition(v)})}));try{for(var p=U(g),b=p.next();!b.done;b=p.next()){var w=b.value;y.push(w)}}catch(h){t={error:h}}finally{try{b&&!b.done&&(n=p.return)&&n.call(p)}finally{if(t)throw t.error}}return y},e}(),vo=!1;function St(e,t){return!mt&&!("predictableActionArguments"in e)&&!vo&&(vo=!0,console.warn("It is highly recommended to set `predictableActionArguments` to `true` when using `createMachine`. https://xstate.js.org/docs/guides/actions.html")),new lu(e,t)}var ue=Ui,pr=ki,uu=Fi;const{assign:L,stop:cu}=Mi,$t=e=>cu(e),du=L({attributeToVerify:e=>{}}),fu=L({challengeName:e=>{}}),pu=L({requiredAttributes:e=>{}}),mr=L({remoteError:e=>""}),gr=L({formValues:e=>({})}),hr=L({touched:e=>({})}),mu=L({unverifiedContactMethods:e=>{}}),gu=L({username:e=>{}}),yr=L({validationError:e=>({})}),hu=L({totpSecretCode:(e,t)=>t.data}),yu=L({challengeName:(e,t)=>{var n;return(n=t.data)===null||n===void 0?void 0:n.challengeName}}),vu=L({requiredAttributes:(e,t)=>{var n,o;return(o=(n=t.data)===null||n===void 0?void 0:n.challengeParam)===null||o===void 0?void 0:o.requiredAttributes}}),wu=L({redirectIntent:e=>"confirmPasswordReset"}),Su=L({redirectIntent:e=>"confirmSignUp"}),Wi=L({authAttributes:(e,t)=>{var n,o;const[i]=e.loginMechanisms;return{username:(n=e.formValues[i])!==null&&n!==void 0?n:e.formValues.username,password:(o=e.formValues)===null||o===void 0?void 0:o.password}}}),vr=L({validationError:(e,t)=>t.data}),wr=L({remoteError:(e,t)=>{var n;return t.data.name==="NoUserPoolError"?"Configuration error (see console) \u2013 please contact the administrator":((n=t.data)===null||n===void 0?void 0:n.message)||t.data}}),_u=L({unverifiedContactMethods:(e,t)=>t.data.unverified}),Hi=L({user:(e,t)=>t.data.user||t.data}),bu=L({username:(e,t)=>{let{formValues:{username:n,country_code:o}}=e;return o&&(n=`${o}${n}`),n}}),Cu=L({codeDeliveryDetails:(e,t)=>t.data.codeDeliveryDetails}),Eu=L({authAttributes:(e,t)=>({username:e.formValues.username})}),Sr=L({formValues:(e,t)=>{const{name:n,value:o}=t.data;return Object.assign(Object.assign({},e.formValues),{[n]:o})}}),_r=L({formValues:(e,t)=>{const n=Object.assign(Object.assign({},e.formValues),t.data);return sl(n,"password")}}),br=L({touched:(e,t)=>{const{name:n}=t.data;return Object.assign(Object.assign({},e.touched),{[`${n}`]:!0})}}),Au=e=>B(void 0,void 0,void 0,function*(){const{username:t}=e;return yield G.Auth.forgotPassword(t)}),Yi=L({formValues:(e,t)=>{var n;const[o="username"]=e.loginMechanisms;if(!e.formValues.phone_number&&o!=="phone_number")return e.formValues;const{formValues:i,country_code:a}=e,s=i.phone_number?"phone_number":"username",l=`${(n=i.country_code)!==null&&n!==void 0?n:a}${i[s]}`.replace(/[^A-Z0-9+]/gi,""),u=Object.assign(Object.assign({},i),{[s]:l});return delete u.country_code,u}});var Tu=Array.isArray,be=Tu,Iu=typeof At=="object"&&At&&At.Object===Object&&At,Ki=Iu,Pu=Ki,ku=typeof self=="object"&&self&&self.Object===Object&&self,Nu=Pu||ku||Function("return this")(),he=Nu,xu=he,$u=xu.Symbol,ln=$u,wo=ln,qi=Object.prototype,Ou=qi.hasOwnProperty,Ru=qi.toString,at=wo?wo.toStringTag:void 0;function Uu(e){var t=Ou.call(e,at),n=e[at];try{e[at]=void 0;var o=!0}catch{}var i=Ru.call(e);return o&&(t?e[at]=n:delete e[at]),i}var Bu=Uu,Fu=Object.prototype,Mu=Fu.toString;function Vu(e){return Mu.call(e)}var Du=Vu,So=ln,Lu=Bu,ju=Du,zu="[object Null]",Gu="[object Undefined]",_o=So?So.toStringTag:void 0;function Wu(e){return e==null?e===void 0?Gu:zu:_o&&_o in Object(e)?Lu(e):ju(e)}var Xe=Wu;function Hu(e){return e!=null&&typeof e=="object"}var Re=Hu,Yu=Xe,Ku=Re,qu="[object Symbol]";function Ju(e){return typeof e=="symbol"||Ku(e)&&Yu(e)==qu}var Cr=Ju,Zu=be,Qu=Cr,Xu=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ec=/^\w*$/;function tc(e,t){if(Zu(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||Qu(e)?!0:ec.test(e)||!Xu.test(e)||t!=null&&e in Object(t)}var Er=tc;function nc(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Ce=nc,rc=Xe,oc=Ce,ic="[object AsyncFunction]",ac="[object Function]",sc="[object GeneratorFunction]",lc="[object Proxy]";function uc(e){if(!oc(e))return!1;var t=rc(e);return t==ac||t==sc||t==ic||t==lc}var Ar=uc,cc=he,dc=cc["__core-js_shared__"],fc=dc,kn=fc,bo=function(){var e=/[^.]+$/.exec(kn&&kn.keys&&kn.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function pc(e){return!!bo&&bo in e}var mc=pc,gc=Function.prototype,hc=gc.toString;function yc(e){if(e!=null){try{return hc.call(e)}catch{}try{return e+""}catch{}}return""}var Ji=yc,vc=Ar,wc=mc,Sc=Ce,_c=Ji,bc=/[\\^$.*+?()[\]{}|]/g,Cc=/^\[object .+?Constructor\]$/,Ec=Function.prototype,Ac=Object.prototype,Tc=Ec.toString,Ic=Ac.hasOwnProperty,Pc=RegExp("^"+Tc.call(Ic).replace(bc,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function kc(e){if(!Sc(e)||wc(e))return!1;var t=vc(e)?Pc:Cc;return t.test(_c(e))}var Nc=kc;function xc(e,t){return e==null?void 0:e[t]}var $c=xc,Oc=Nc,Rc=$c;function Uc(e,t){var n=Rc(e,t);return Oc(n)?n:void 0}var Ue=Uc,Bc=Ue,Fc=Bc(Object,"create"),un=Fc,Co=un;function Mc(){this.__data__=Co?Co(null):{},this.size=0}var Vc=Mc;function Dc(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Lc=Dc,jc=un,zc="__lodash_hash_undefined__",Gc=Object.prototype,Wc=Gc.hasOwnProperty;function Hc(e){var t=this.__data__;if(jc){var n=t[e];return n===zc?void 0:n}return Wc.call(t,e)?t[e]:void 0}var Yc=Hc,Kc=un,qc=Object.prototype,Jc=qc.hasOwnProperty;function Zc(e){var t=this.__data__;return Kc?t[e]!==void 0:Jc.call(t,e)}var Qc=Zc,Xc=un,ed="__lodash_hash_undefined__";function td(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Xc&&t===void 0?ed:t,this}var nd=td,rd=Vc,od=Lc,id=Yc,ad=Qc,sd=nd;function et(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}et.prototype.clear=rd;et.prototype.delete=od;et.prototype.get=id;et.prototype.has=ad;et.prototype.set=sd;var ld=et;function ud(){this.__data__=[],this.size=0}var cd=ud;function dd(e,t){return e===t||e!==e&&t!==t}var _t=dd,fd=_t;function pd(e,t){for(var n=e.length;n--;)if(fd(e[n][0],t))return n;return-1}var cn=pd,md=cn,gd=Array.prototype,hd=gd.splice;function yd(e){var t=this.__data__,n=md(t,e);if(n<0)return!1;var o=t.length-1;return n==o?t.pop():hd.call(t,n,1),--this.size,!0}var vd=yd,wd=cn;function Sd(e){var t=this.__data__,n=wd(t,e);return n<0?void 0:t[n][1]}var _d=Sd,bd=cn;function Cd(e){return bd(this.__data__,e)>-1}var Ed=Cd,Ad=cn;function Td(e,t){var n=this.__data__,o=Ad(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}var Id=Td,Pd=cd,kd=vd,Nd=_d,xd=Ed,$d=Id;function tt(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}tt.prototype.clear=Pd;tt.prototype.delete=kd;tt.prototype.get=Nd;tt.prototype.has=xd;tt.prototype.set=$d;var dn=tt,Od=Ue,Rd=he,Ud=Od(Rd,"Map"),Tr=Ud,Eo=ld,Bd=dn,Fd=Tr;function Md(){this.size=0,this.__data__={hash:new Eo,map:new(Fd||Bd),string:new Eo}}var Vd=Md;function Dd(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var Ld=Dd,jd=Ld;function zd(e,t){var n=e.__data__;return jd(t)?n[typeof t=="string"?"string":"hash"]:n.map}var fn=zd,Gd=fn;function Wd(e){var t=Gd(this,e).delete(e);return this.size-=t?1:0,t}var Hd=Wd,Yd=fn;function Kd(e){return Yd(this,e).get(e)}var qd=Kd,Jd=fn;function Zd(e){return Jd(this,e).has(e)}var Qd=Zd,Xd=fn;function ef(e,t){var n=Xd(this,e),o=n.size;return n.set(e,t),this.size+=n.size==o?0:1,this}var tf=ef,nf=Vd,rf=Hd,of=qd,af=Qd,sf=tf;function nt(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}nt.prototype.clear=nf;nt.prototype.delete=rf;nt.prototype.get=of;nt.prototype.has=af;nt.prototype.set=sf;var Ir=nt,Zi=Ir,lf="Expected a function";function Pr(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(lf);var n=function(){var o=arguments,i=t?t.apply(this,o):o[0],a=n.cache;if(a.has(i))return a.get(i);var s=e.apply(this,o);return n.cache=a.set(i,s)||a,s};return n.cache=new(Pr.Cache||Zi),n}Pr.Cache=Zi;var uf=Pr,cf=uf,df=500;function ff(e){var t=cf(e,function(o){return n.size===df&&n.clear(),o}),n=t.cache;return t}var pf=ff,mf=pf,gf=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,hf=/\\(\\)?/g,yf=mf(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(gf,function(n,o,i,a){t.push(i?a.replace(hf,"$1"):o||n)}),t}),vf=yf;function wf(e,t){for(var n=-1,o=e==null?0:e.length,i=Array(o);++n<o;)i[n]=t(e[n],n,e);return i}var Qi=wf,Ao=ln,Sf=Qi,_f=be,bf=Cr,Cf=1/0,To=Ao?Ao.prototype:void 0,Io=To?To.toString:void 0;function Xi(e){if(typeof e=="string")return e;if(_f(e))return Sf(e,Xi)+"";if(bf(e))return Io?Io.call(e):"";var t=e+"";return t=="0"&&1/e==-Cf?"-0":t}var Ef=Xi,Af=Ef;function Tf(e){return e==null?"":Af(e)}var If=Tf,Pf=be,kf=Er,Nf=vf,xf=If;function $f(e,t){return Pf(e)?e:kf(e,t)?[e]:Nf(xf(e))}var pn=$f,Of=Cr,Rf=1/0;function Uf(e){if(typeof e=="string"||Of(e))return e;var t=e+"";return t=="0"&&1/e==-Rf?"-0":t}var bt=Uf,Bf=pn,Ff=bt;function Mf(e,t){t=Bf(t,e);for(var n=0,o=t.length;e!=null&&n<o;)e=e[Ff(t[n++])];return n&&n==o?e:void 0}var kr=Mf,Vf=kr;function Df(e,t,n){var o=e==null?void 0:Vf(e,t);return o===void 0?n:o}var $e=Df,Lf=dn;function jf(){this.__data__=new Lf,this.size=0}var zf=jf;function Gf(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}var Wf=Gf;function Hf(e){return this.__data__.get(e)}var Yf=Hf;function Kf(e){return this.__data__.has(e)}var qf=Kf,Jf=dn,Zf=Tr,Qf=Ir,Xf=200;function ep(e,t){var n=this.__data__;if(n instanceof Jf){var o=n.__data__;if(!Zf||o.length<Xf-1)return o.push([e,t]),this.size=++n.size,this;n=this.__data__=new Qf(o)}return n.set(e,t),this.size=n.size,this}var tp=ep,np=dn,rp=zf,op=Wf,ip=Yf,ap=qf,sp=tp;function rt(e){var t=this.__data__=new np(e);this.size=t.size}rt.prototype.clear=rp;rt.prototype.delete=op;rt.prototype.get=ip;rt.prototype.has=ap;rt.prototype.set=sp;var Nr=rt,lp=Ue,up=function(){try{var e=lp(Object,"defineProperty");return e({},"",{}),e}catch{}}(),ea=up,Po=ea;function cp(e,t,n){t=="__proto__"&&Po?Po(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var xr=cp,dp=xr,fp=_t;function pp(e,t,n){(n!==void 0&&!fp(e[t],n)||n===void 0&&!(t in e))&&dp(e,t,n)}var ta=pp;function mp(e){return function(t,n,o){for(var i=-1,a=Object(t),s=o(t),l=s.length;l--;){var u=s[e?l:++i];if(n(a[u],u,a)===!1)break}return t}}var gp=mp,hp=gp,yp=hp(),vp=yp,qn={exports:{}};(function(e,t){var n=he,o=t&&!t.nodeType&&t,i=o&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===o,s=a?n.Buffer:void 0,l=s?s.allocUnsafe:void 0;function u(c,d){if(d)return c.slice();var m=c.length,f=l?l(m):new c.constructor(m);return c.copy(f),f}e.exports=u})(qn,qn.exports);var wp=he,Sp=wp.Uint8Array,na=Sp,ko=na;function _p(e){var t=new e.constructor(e.byteLength);return new ko(t).set(new ko(e)),t}var bp=_p,Cp=bp;function Ep(e,t){var n=t?Cp(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var Ap=Ep;function Tp(e,t){var n=-1,o=e.length;for(t||(t=Array(o));++n<o;)t[n]=e[n];return t}var Ip=Tp,Pp=Ce,No=Object.create,kp=function(){function e(){}return function(t){if(!Pp(t))return{};if(No)return No(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}(),Np=kp;function xp(e,t){return function(n){return e(t(n))}}var ra=xp,$p=ra,Op=$p(Object.getPrototypeOf,Object),$r=Op,Rp=Object.prototype;function Up(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||Rp;return e===n}var Or=Up,Bp=Np,Fp=$r,Mp=Or;function Vp(e){return typeof e.constructor=="function"&&!Mp(e)?Bp(Fp(e)):{}}var Dp=Vp,Lp=Xe,jp=Re,zp="[object Arguments]";function Gp(e){return jp(e)&&Lp(e)==zp}var Wp=Gp,xo=Wp,Hp=Re,oa=Object.prototype,Yp=oa.hasOwnProperty,Kp=oa.propertyIsEnumerable,qp=xo(function(){return arguments}())?xo:function(e){return Hp(e)&&Yp.call(e,"callee")&&!Kp.call(e,"callee")},Rr=qp,Jp=9007199254740991;function Zp(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Jp}var Ur=Zp,Qp=Ar,Xp=Ur;function em(e){return e!=null&&Xp(e.length)&&!Qp(e)}var mn=em,tm=mn,nm=Re;function rm(e){return nm(e)&&tm(e)}var om=rm,yt={exports:{}};function im(){return!1}var am=im;(function(e,t){var n=he,o=am,i=t&&!t.nodeType&&t,a=i&&!0&&e&&!e.nodeType&&e,s=a&&a.exports===i,l=s?n.Buffer:void 0,u=l?l.isBuffer:void 0,c=u||o;e.exports=c})(yt,yt.exports);var sm=Xe,lm=$r,um=Re,cm="[object Object]",dm=Function.prototype,fm=Object.prototype,ia=dm.toString,pm=fm.hasOwnProperty,mm=ia.call(Object);function gm(e){if(!um(e)||sm(e)!=cm)return!1;var t=lm(e);if(t===null)return!0;var n=pm.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&ia.call(n)==mm}var hm=gm,ym=Xe,vm=Ur,wm=Re,Sm="[object Arguments]",_m="[object Array]",bm="[object Boolean]",Cm="[object Date]",Em="[object Error]",Am="[object Function]",Tm="[object Map]",Im="[object Number]",Pm="[object Object]",km="[object RegExp]",Nm="[object Set]",xm="[object String]",$m="[object WeakMap]",Om="[object ArrayBuffer]",Rm="[object DataView]",Um="[object Float32Array]",Bm="[object Float64Array]",Fm="[object Int8Array]",Mm="[object Int16Array]",Vm="[object Int32Array]",Dm="[object Uint8Array]",Lm="[object Uint8ClampedArray]",jm="[object Uint16Array]",zm="[object Uint32Array]",z={};z[Um]=z[Bm]=z[Fm]=z[Mm]=z[Vm]=z[Dm]=z[Lm]=z[jm]=z[zm]=!0;z[Sm]=z[_m]=z[Om]=z[bm]=z[Rm]=z[Cm]=z[Em]=z[Am]=z[Tm]=z[Im]=z[Pm]=z[km]=z[Nm]=z[xm]=z[$m]=!1;function Gm(e){return wm(e)&&vm(e.length)&&!!z[ym(e)]}var Wm=Gm;function Hm(e){return function(t){return e(t)}}var Ym=Hm,Jn={exports:{}};(function(e,t){var n=Ki,o=t&&!t.nodeType&&t,i=o&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===o,s=a&&n.process,l=function(){try{var u=i&&i.require&&i.require("util").types;return u||s&&s.binding&&s.binding("util")}catch{}}();e.exports=l})(Jn,Jn.exports);var Km=Wm,qm=Ym,$o=Jn.exports,Oo=$o&&$o.isTypedArray,Jm=Oo?qm(Oo):Km,Br=Jm;function Zm(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var aa=Zm,Qm=xr,Xm=_t,eg=Object.prototype,tg=eg.hasOwnProperty;function ng(e,t,n){var o=e[t];(!(tg.call(e,t)&&Xm(o,n))||n===void 0&&!(t in e))&&Qm(e,t,n)}var sa=ng,rg=sa,og=xr;function ig(e,t,n,o){var i=!n;n||(n={});for(var a=-1,s=t.length;++a<s;){var l=t[a],u=o?o(n[l],e[l],l,n,e):void 0;u===void 0&&(u=e[l]),i?og(n,l,u):rg(n,l,u)}return n}var ag=ig;function sg(e,t){for(var n=-1,o=Array(e);++n<e;)o[n]=t(n);return o}var lg=sg,ug=9007199254740991,cg=/^(?:0|[1-9]\d*)$/;function dg(e,t){var n=typeof e;return t=t==null?ug:t,!!t&&(n=="number"||n!="symbol"&&cg.test(e))&&e>-1&&e%1==0&&e<t}var gn=dg,fg=lg,pg=Rr,mg=be,gg=yt.exports,hg=gn,yg=Br,vg=Object.prototype,wg=vg.hasOwnProperty;function Sg(e,t){var n=mg(e),o=!n&&pg(e),i=!n&&!o&&gg(e),a=!n&&!o&&!i&&yg(e),s=n||o||i||a,l=s?fg(e.length,String):[],u=l.length;for(var c in e)(t||wg.call(e,c))&&!(s&&(c=="length"||i&&(c=="offset"||c=="parent")||a&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||hg(c,u)))&&l.push(c);return l}var la=Sg;function _g(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var bg=_g,Cg=Ce,Eg=Or,Ag=bg,Tg=Object.prototype,Ig=Tg.hasOwnProperty;function Pg(e){if(!Cg(e))return Ag(e);var t=Eg(e),n=[];for(var o in e)o=="constructor"&&(t||!Ig.call(e,o))||n.push(o);return n}var kg=Pg,Ng=la,xg=kg,$g=mn;function Og(e){return $g(e)?Ng(e,!0):xg(e)}var Fr=Og,Rg=ag,Ug=Fr;function Bg(e){return Rg(e,Ug(e))}var Fg=Bg,Ro=ta,Mg=qn.exports,Vg=Ap,Dg=Ip,Lg=Dp,Uo=Rr,Bo=be,jg=om,zg=yt.exports,Gg=Ar,Wg=Ce,Hg=hm,Yg=Br,Fo=aa,Kg=Fg;function qg(e,t,n,o,i,a,s){var l=Fo(e,n),u=Fo(t,n),c=s.get(u);if(c){Ro(e,n,c);return}var d=a?a(l,u,n+"",e,t,s):void 0,m=d===void 0;if(m){var f=Bo(u),g=!f&&zg(u),y=!f&&!g&&Yg(u);d=u,f||g||y?Bo(l)?d=l:jg(l)?d=Dg(l):g?(m=!1,d=Mg(u,!0)):y?(m=!1,d=Vg(u,!0)):d=[]:Hg(u)||Uo(u)?(d=l,Uo(l)?d=Kg(l):(!Wg(l)||Gg(l))&&(d=Lg(u))):m=!1}m&&(s.set(u,d),i(d,u,o,a,s),s.delete(u)),Ro(e,n,d)}var Jg=qg,Zg=Nr,Qg=ta,Xg=vp,eh=Jg,th=Ce,nh=Fr,rh=aa;function ua(e,t,n,o,i){e!==t&&Xg(t,function(a,s){if(i||(i=new Zg),th(a))eh(e,t,s,n,ua,o,i);else{var l=o?o(rh(e,s),a,s+"",e,t,i):void 0;l===void 0&&(l=a),Qg(e,s,l)}},nh)}var oh=ua;function ih(e){return e}var Mr=ih;function ah(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var sh=ah,lh=sh,Mo=Math.max;function uh(e,t,n){return t=Mo(t===void 0?e.length-1:t,0),function(){for(var o=arguments,i=-1,a=Mo(o.length-t,0),s=Array(a);++i<a;)s[i]=o[t+i];i=-1;for(var l=Array(t+1);++i<t;)l[i]=o[i];return l[t]=n(s),lh(e,this,l)}}var ch=uh;function dh(e){return function(){return e}}var fh=dh,ph=fh,Vo=ea,mh=Mr,gh=Vo?function(e,t){return Vo(e,"toString",{configurable:!0,enumerable:!1,value:ph(t),writable:!0})}:mh,hh=gh,yh=800,vh=16,wh=Date.now;function Sh(e){var t=0,n=0;return function(){var o=wh(),i=vh-(o-n);if(n=o,i>0){if(++t>=yh)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var _h=Sh,bh=hh,Ch=_h,Eh=Ch(bh),Ah=Eh,Th=Mr,Ih=ch,Ph=Ah;function kh(e,t){return Ph(Ih(e,t,Th),e+"")}var Nh=kh,xh=_t,$h=mn,Oh=gn,Rh=Ce;function Uh(e,t,n){if(!Rh(n))return!1;var o=typeof t;return(o=="number"?$h(n)&&Oh(t,n.length):o=="string"&&t in n)?xh(n[t],e):!1}var Bh=Uh,Fh=Nh,Mh=Bh;function Vh(e){return Fh(function(t,n){var o=-1,i=n.length,a=i>1?n[i-1]:void 0,s=i>2?n[2]:void 0;for(a=e.length>3&&typeof a=="function"?(i--,a):void 0,s&&Mh(n[0],n[1],s)&&(a=i<3?void 0:a,i=1),t=Object(t);++o<i;){var l=n[o];l&&e(t,l,o,a)}return t})}var Dh=Vh,Lh=oh,jh=Dh,zh=jh(function(e,t,n){Lh(e,t,n)}),Gh=zh;const Vr=(e,t,n,o)=>B(void 0,void 0,void 0,function*(){const i=yield Promise.all(o.map(s=>s(e,t,n))),a=Gh({},...i);return Dn(a)?Promise.resolve():Promise.reject(a)}),We={getAmplifyConfig(){return B(this,void 0,void 0,function*(){return G.Amplify.configure()})},getCurrentUser(){return B(this,void 0,void 0,function*(){return G.Auth.currentAuthenticatedUser()})},handleSignUp(e){return B(this,void 0,void 0,function*(){return G.Auth.signUp(Object.assign(Object.assign({},e),{autoSignIn:{enabled:!0}}))})},handleSignIn({username:e,password:t}){return B(this,void 0,void 0,function*(){return G.Auth.signIn(e,t)})},handleConfirmSignIn({user:e,code:t,mfaType:n}){return B(this,void 0,void 0,function*(){return G.Auth.confirmSignIn(e,t,n)})},handleConfirmSignUp({username:e,code:t}){return B(this,void 0,void 0,function*(){return yield G.Auth.confirmSignUp(e,t)})},handleForgotPasswordSubmit({username:e,code:t,password:n}){return B(this,void 0,void 0,function*(){return G.Auth.forgotPasswordSubmit(e,t,n)})},handleForgotPassword(e){return B(this,void 0,void 0,function*(){return G.Auth.forgotPassword(e)})},validateCustomSignUp(e,t){return B(this,void 0,void 0,function*(){})},validateFormPassword(e,t,n){return B(this,void 0,void 0,function*(){const{password:o}=e,{password:i}=t;if(!i||!n)return null;const a=[],s=+(n==null?void 0:n.passwordPolicyMinLength);o.length<s&&a.push(`Password must have at least ${s} characters`);const l=n==null?void 0:n.passwordPolicyCharacters;return l==null||l.forEach(u=>{switch(u){case"REQUIRES_LOWERCASE":/[a-z]/.test(o)||a.push("Password must have lower case letters");break;case"REQUIRES_UPPERCASE":/[A-Z]/.test(o)||a.push("Password must have upper case letters");break;case"REQUIRES_NUMBERS":/[0-9]/.test(o)||a.push("Password must have numbers");break;case"REQUIRES_SYMBOLS":il(o)||a.push("Password must have special characters")}}),a.length!==0?{password:a}:null})},validateConfirmPassword(e,t){return B(this,void 0,void 0,function*(){const{password:n,confirm_password:o}=e,{confirm_password:i,password:a}=t;return n||o?(n||o)&&n!==o&&(i&&a||(n==null?void 0:n.length)>=6&&(o==null?void 0:o.length)>=6)?{confirm_password:"Your passwords must match"}:void 0:null})},validatePreferredUsername(e,t){return B(this,void 0,void 0,function*(){})}},Wh=["SMS_MFA","SOFTWARE_TOKEN_MFA"],Nn=e=>$e(e,"data.challengeName"),Do=(e,t)=>e===t,Lo=e=>Wh.includes(e);function Hh({services:e}){return St({initial:"init",id:"signInActor",predictableActionArguments:!0,states:{init:{always:[{target:"autoSignIn.submit",cond:"shouldAutoSubmit"},{target:"autoSignIn",cond:"shouldAutoSignIn"},{target:"signIn"}]},signIn:{initial:"edit",exit:["clearFormValues","clearTouched"],states:{edit:{entry:"sendUpdate",on:{SUBMIT:{actions:"handleSubmit",target:"submit"},CHANGE:{actions:"handleInput"},FEDERATED_SIGN_IN:"federatedSignIn"}},federatedSignIn:{tags:["pending"],entry:["sendUpdate","clearError"],invoke:{src:"federatedSignIn",onError:{actions:"setRemoteError"}}},submit:{tags:["pending"],entry:["parsePhoneNumber","clearError","sendUpdate"],invoke:{src:"signIn",onDone:[{cond:"shouldSetupTOTP",actions:["setUser","setChallengeName"],target:"#signInActor.setupTOTP"},{cond:"shouldConfirmSignIn",actions:["setUser","setChallengeName"],target:"#signInActor.confirmSignIn"},{cond:"shouldForceChangePassword",actions:["setUser","setChallengeName","setRequiredAttributes"],target:"#signInActor.forceNewPassword"},{actions:"setUser",target:"verifying"}],onError:[{cond:"shouldRedirectToConfirmSignUp",actions:["setCredentials","setConfirmSignUpIntent"],target:"rejected"},{cond:"shouldRedirectToConfirmResetPassword",actions:["setUsernameAuthAttributes","setConfirmResetPasswordIntent"],target:"rejected"},{actions:"setRemoteError",target:"edit"}]}},verifying:{tags:["pending"],entry:["clearError","sendUpdate"],invoke:{src:"checkVerifiedContact",onDone:[{cond:"shouldRequestVerification",target:"#signInActor.verifyUser",actions:"setUnverifiedContactMethods"},{target:"resolved"}],onError:{actions:"setRemoteError",target:"edit"}}},resolved:{always:"#signInActor.resolved"},rejected:{always:"#signInActor.rejected"}}},autoSignIn:{initial:"pending",states:{pending:{tags:["pending"],entry:["clearError","sendUpdate"],on:{AUTO_SIGN_IN:[{cond:"shouldSetupTOTP",actions:["setUser","setChallengeName"],target:"#signInActor.setupTOTP"},{cond:"shouldConfirmSignIn",actions:["setUser","setChallengeName"],target:"#signInActor.confirmSignIn"},{cond:"shouldForceChangePassword",actions:["setUser","setChallengeName","setRequiredAttributes"],target:"#signInActor.forceNewPassword"},{actions:"setUser",target:"#signInActor.resolved"}],AUTO_SIGN_IN_FAILURE:{actions:"setRemoteError",target:"pending"}}},submit:{tags:["pending"],entry:["clearError","sendUpdate"],invoke:{src:"signIn",onDone:[{cond:"shouldSetupTOTP",actions:["setUser","setChallengeName"],target:"#signInActor.setupTOTP"},{cond:"shouldConfirmSignIn",actions:["setUser","setChallengeName"],target:"#signInActor.confirmSignIn"},{cond:"shouldForceChangePassword",actions:["setUser","setChallengeName","setRequiredAttributes"],target:"#signInActor.forceNewPassword"},{actions:"setUser",target:"#signInActor.resolved"}],onError:{actions:"setRemoteError",target:"#signInActor.signIn"}}},resolved:{always:"#signInActor.resolved"},rejected:{always:"#signInActor.rejected"}}},confirmSignIn:{initial:"edit",exit:["clearFormValues","clearError","clearTouched"],states:{edit:{entry:"sendUpdate",on:{SUBMIT:{actions:"handleSubmit",target:"submit"},SIGN_IN:"#signInActor.signIn",CHANGE:{actions:"handleInput"}}},submit:{tags:["pending"],entry:["clearError","sendUpdate"],invoke:{src:"confirmSignIn",onDone:{target:"#signInActor.resolved",actions:["setUser","clearChallengeName","clearRequiredAttributes"]},onError:{target:"edit",actions:"setRemoteError"}}}}},forceNewPassword:{type:"parallel",exit:["clearFormValues","clearError","clearTouched"],states:{validation:{initial:"pending",states:{pending:{invoke:{src:"validateFields",onDone:{target:"valid",actions:"clearValidationError"},onError:{target:"invalid",actions:"setFieldErrors"}}},valid:{entry:"sendUpdate"},invalid:{entry:"sendUpdate"}},on:{SIGN_IN:"#signInActor.signIn",CHANGE:{actions:"handleInput",target:".pending"},BLUR:{actions:"handleBlur",target:".pending"}}},submit:{initial:"idle",entry:"clearError",states:{idle:{entry:"sendUpdate",on:{SUBMIT:{actions:"handleSubmit",target:"validate"}}},validate:{entry:"sendUpdate",invoke:{src:"validateFields",onDone:{target:"pending",actions:"clearValidationError"},onError:{target:"idle",actions:"setFieldErrors"}}},pending:{tags:["pending"],entry:["sendUpdate","clearError"],invoke:{src:"forceNewPassword",onDone:[{cond:"shouldConfirmSignIn",actions:["setUser","setChallengeName"],target:"#signInActor.confirmSignIn"},{cond:"shouldSetupTOTP",actions:["setUser","setChallengeName"],target:"#signInActor.setupTOTP"},{target:"resolved",actions:["setUser","setCredentials"]}],onError:{target:"idle",actions:"setRemoteError"}}},resolved:{type:"final",always:"#signInActor.resolved"}}}}},setupTOTP:{initial:"getTotpSecretCode",exit:["clearFormValues","clearError","clearTouched"],states:{getTotpSecretCode:{invoke:{src:"getTotpSecretCode",onDone:{target:"edit",actions:"setTotpSecretCode"},onError:{target:"edit",actions:"setRemoteError"}}},edit:{entry:"sendUpdate",on:{SUBMIT:{actions:"handleSubmit",target:"submit"},SIGN_IN:"#signInActor.signIn",CHANGE:{actions:"handleInput"}}},submit:{tags:["pending"],entry:["sendUpdate","clearError"],invoke:{src:"verifyTotpToken",onDone:{actions:["clearChallengeName","clearRequiredAttributes"],target:"#signInActor.resolved"},onError:{actions:"setRemoteError",target:"edit"}}}}},verifyUser:{initial:"edit",exit:["clearFormValues","clearError","clearTouched"],states:{edit:{entry:"sendUpdate",on:{SUBMIT:{actions:"handleSubmit",target:"submit"},SKIP:"#signInActor.resolved",CHANGE:{actions:"handleInput"}}},submit:{tags:["pending"],entry:"clearError",invoke:{src:"verifyUser",onDone:{target:"#signInActor.confirmVerifyUser"},onError:{actions:"setRemoteError",target:"edit"}}}}},confirmVerifyUser:{initial:"edit",exit:["clearFormValues","clearError","clearUnverifiedContactMethods","clearAttributeToVerify","clearTouched"],states:{edit:{entry:"sendUpdate",on:{SUBMIT:{actions:"handleSubmit",target:"submit"},SKIP:"#signInActor.resolved",CHANGE:{actions:"handleInput"}}},submit:{tags:["pending"],entry:"clearError",invoke:{src:"confirmVerifyUser",onDone:{target:"#signInActor.resolved"},onError:{actions:"setRemoteError",target:"edit"}}}}},resolved:{type:"final",data:t=>({user:t.user})},rejected:{type:"final",data:(t,n)=>({intent:t.redirectIntent,authAttributes:t.authAttributes})}}},{actions:{clearAttributeToVerify:du,clearChallengeName:fu,clearRequiredAttributes:pu,clearError:mr,clearFormValues:gr,clearTouched:hr,clearUnverifiedContactMethods:mu,clearValidationError:yr,handleInput:Sr,handleSubmit:_r,handleBlur:br,parsePhoneNumber:Yi,setChallengeName:yu,setConfirmResetPasswordIntent:wu,setConfirmSignUpIntent:Su,setRequiredAttributes:vu,setCredentials:Wi,setFieldErrors:vr,setRemoteError:wr,setTotpSecretCode:hu,setUnverifiedContactMethods:_u,setUser:Hi,setUsernameAuthAttributes:Eu,sendUpdate:pr()},guards:{shouldAutoSignIn:t=>(t==null?void 0:t.intent)==="autoSignIn",shouldAutoSubmit:t=>(t==null?void 0:t.intent)==="autoSignInSubmit",shouldConfirmSignIn:(t,n)=>Lo(Nn(n)),shouldForceChangePassword:(t,n)=>Do(Nn(n),"NEW_PASSWORD_REQUIRED"),shouldRedirectToConfirmResetPassword:(t,n)=>n.data.code==="PasswordResetRequiredException",shouldRedirectToConfirmSignUp:(t,n)=>n.data.code==="UserNotConfirmedException",shouldRequestVerification:(t,n)=>{const{unverified:o,verified:i}=n.data;return Dn(i)&&!Dn(o)},shouldSetupTOTP:(t,n)=>Do(Nn(n),"MFA_SETUP")},services:{signIn(t){return B(this,void 0,void 0,function*(){const{authAttributes:n={},formValues:o={}}=t,i=Object.assign(Object.assign({},n),o),{username:a,password:s}=i;return yield e.handleSignIn({username:a,password:s})})},confirmSignIn(t){return B(this,void 0,void 0,function*(){const{challengeName:n,user:o}=t,{confirmation_code:i}=t.formValues,a=Lo(n)?n:void 0;return yield e.handleConfirmSignIn({user:o,code:i,mfaType:a}),yield G.Auth.currentAuthenticatedUser()})},forceNewPassword(t){return B(this,void 0,void 0,function*(){const{user:n,formValues:o}=t;let i,{password:a,confirm_password:s,phone_number:l,country_code:u}=o,c=di(o,["password","confirm_password","phone_number","country_code"]);l&&(i=`${u}${l}`.replace(/[^A-Z0-9+]/gi,""),c=Object.assign(Object.assign({},c),{phone_number:i}));try{const d=yield G.Auth.completeNewPassword(n,a,c);return d.challengeName?d:G.Auth.currentAuthenticatedUser()}catch(d){return Promise.reject(d)}})},getTotpSecretCode(t){return B(this,void 0,void 0,function*(){const{user:n}=t;return G.Auth.setupTOTP(n)})},verifyTotpToken(t){return B(this,void 0,void 0,function*(){const{formValues:n,user:o}=t,{confirmation_code:i}=n;return G.Auth.verifyTotpToken(o,i)})},federatedSignIn(t,n){return B(this,void 0,void 0,function*(){const{provider:o}=n.data;return yield G.Auth.federatedSignIn({provider:o})})},checkVerifiedContact(t){return B(this,void 0,void 0,function*(){const{user:n}=t;return yield G.Auth.verifiedContact(n)})},verifyUser(t){return B(this,void 0,void 0,function*(){const{unverifiedAttr:n}=t.formValues,o=yield G.Auth.verifyCurrentUserAttribute(n);return t.attributeToVerify=n,o})},confirmVerifyUser(t){return B(this,void 0,void 0,function*(){const{attributeToVerify:n}=t,{confirmation_code:o}=t.formValues;return yield G.Auth.verifyCurrentUserAttributeSubmit(n,o)})},validateFields(t){return B(this,void 0,void 0,function*(){return Vr(t.formValues,t.touched,t.passwordSettings,[We.validateFormPassword,We.validateConfirmPassword])})}}})}const Yh=St({initial:"pending",id:"signOutActor",predictableActionArguments:!0,states:{pending:{tags:["pending"],invoke:{src:"signOut",onDone:"resolved",onError:"rejected"}},resolved:{type:"final"},rejected:{type:"final"}}},{services:{signOut:()=>G.Auth.signOut()}});function Kh({services:e}){return St({id:"resetPasswordActor",initial:"init",predictableActionArguments:!0,states:{init:{always:[{target:"confirmResetPassword",cond:"shouldAutoConfirmReset",actions:"resendCode"},{target:"resetPassword"}]},resetPassword:{initial:"edit",exit:["clearFormValues","clearError","clearTouched"],states:{edit:{entry:"sendUpdate",on:{SUBMIT:{actions:"handleSubmit",target:"submit"},CHANGE:{actions:"handleInput"},BLUR:{actions:"handleBlur"}}},submit:{tags:["pending"],entry:["sendUpdate","setUsername","clearError"],invoke:{src:"resetPassword",onDone:{target:"#resetPasswordActor.confirmResetPassword"},onError:{actions:["setRemoteError"],target:"edit"}}}}},confirmResetPassword:{type:"parallel",exit:["clearFormValues","clearError","clearUsername","clearTouched"],states:{validation:{initial:"pending",states:{pending:{invoke:{src:"validateFields",onDone:{target:"valid",actions:"clearValidationError"},onError:{target:"invalid",actions:"setFieldErrors"}}},valid:{entry:"sendUpdate"},invalid:{entry:"sendUpdate"}},on:{CHANGE:{actions:"handleInput",target:".pending"},BLUR:{actions:"handleBlur",target:".pending"}}},submission:{initial:"idle",states:{idle:{entry:"sendUpdate",on:{SUBMIT:{actions:"handleSubmit",target:"validate"},RESEND:"resendCode",CHANGE:{actions:"handleInput"},BLUR:{actions:"handleBlur"}}},validate:{entry:"sendUpdate",invoke:{src:"validateFields",onDone:{target:"pending",actions:"clearValidationError"},onError:{target:"idle",actions:"setFieldErrors"}}},resendCode:{tags:["pending"],entry:["clearError","sendUpdate"],invoke:{src:"resetPassword",onDone:{target:"idle"},onError:{actions:"setRemoteError",target:"idle"}}},pending:{tags:["pending"],entry:["clearError","sendUpdate"],invoke:{src:"confirmResetPassword",onDone:{actions:"clearUsername",target:"#resetPasswordActor.resolved"},onError:{actions:"setRemoteError",target:"idle"}}}}}}},resolved:{type:"final"}}},{actions:{clearError:mr,clearFormValues:gr,clearTouched:hr,clearUsername:gu,clearValidationError:yr,handleInput:Sr,handleSubmit:_r,handleBlur:br,resendCode:Au,setFieldErrors:vr,setRemoteError:wr,setUsername:bu,sendUpdate:pr()},guards:{shouldAutoConfirmReset:(t,n)=>!(!t.intent||t.intent!=="confirmPasswordReset")},services:{resetPassword(t){return B(this,void 0,void 0,function*(){const{username:n}=t;return e.handleForgotPassword(n)})},confirmResetPassword(t){return B(this,void 0,void 0,function*(){const{username:n}=t,{confirmation_code:o,password:i}=t.formValues;return e.handleForgotPasswordSubmit({username:n,code:o,password:i})})},validateFields(t,n){return B(this,void 0,void 0,function*(){return Vr(t.formValues,t.touched,t.passwordSettings,[We.validateFormPassword,We.validateConfirmPassword])})}}})}var qh="__lodash_hash_undefined__";function Jh(e){return this.__data__.set(e,qh),this}var Zh=Jh;function Qh(e){return this.__data__.has(e)}var Xh=Qh,ey=Ir,ty=Zh,ny=Xh;function qt(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new ey;++t<n;)this.add(e[t])}qt.prototype.add=qt.prototype.push=ty;qt.prototype.has=ny;var ry=qt;function oy(e,t){for(var n=-1,o=e==null?0:e.length;++n<o;)if(t(e[n],n,e))return!0;return!1}var iy=oy;function ay(e,t){return e.has(t)}var sy=ay,ly=ry,uy=iy,cy=sy,dy=1,fy=2;function py(e,t,n,o,i,a){var s=n&dy,l=e.length,u=t.length;if(l!=u&&!(s&&u>l))return!1;var c=a.get(e),d=a.get(t);if(c&&d)return c==t&&d==e;var m=-1,f=!0,g=n&fy?new ly:void 0;for(a.set(e,t),a.set(t,e);++m<l;){var y=e[m],p=t[m];if(o)var b=s?o(p,y,m,t,e,a):o(y,p,m,e,t,a);if(b!==void 0){if(b)continue;f=!1;break}if(g){if(!uy(t,function(w,h){if(!cy(g,h)&&(y===w||i(y,w,n,o,a)))return g.push(h)})){f=!1;break}}else if(!(y===p||i(y,p,n,o,a))){f=!1;break}}return a.delete(e),a.delete(t),f}var ca=py;function my(e){var t=-1,n=Array(e.size);return e.forEach(function(o,i){n[++t]=[i,o]}),n}var gy=my;function hy(e){var t=-1,n=Array(e.size);return e.forEach(function(o){n[++t]=o}),n}var yy=hy,jo=ln,zo=na,vy=_t,wy=ca,Sy=gy,_y=yy,by=1,Cy=2,Ey="[object Boolean]",Ay="[object Date]",Ty="[object Error]",Iy="[object Map]",Py="[object Number]",ky="[object RegExp]",Ny="[object Set]",xy="[object String]",$y="[object Symbol]",Oy="[object ArrayBuffer]",Ry="[object DataView]",Go=jo?jo.prototype:void 0,xn=Go?Go.valueOf:void 0;function Uy(e,t,n,o,i,a,s){switch(n){case Ry:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Oy:return!(e.byteLength!=t.byteLength||!a(new zo(e),new zo(t)));case Ey:case Ay:case Py:return vy(+e,+t);case Ty:return e.name==t.name&&e.message==t.message;case ky:case xy:return e==t+"";case Iy:var l=Sy;case Ny:var u=o&by;if(l||(l=_y),e.size!=t.size&&!u)return!1;var c=s.get(e);if(c)return c==t;o|=Cy,s.set(e,t);var d=wy(l(e),l(t),o,i,a,s);return s.delete(e),d;case $y:if(xn)return xn.call(e)==xn.call(t)}return!1}var By=Uy;function Fy(e,t){for(var n=-1,o=t.length,i=e.length;++n<o;)e[i+n]=t[n];return e}var da=Fy,My=da,Vy=be;function Dy(e,t,n){var o=t(e);return Vy(e)?o:My(o,n(e))}var fa=Dy;function Ly(e,t){for(var n=-1,o=e==null?0:e.length,i=0,a=[];++n<o;){var s=e[n];t(s,n,e)&&(a[i++]=s)}return a}var jy=Ly;function zy(){return[]}var pa=zy,Gy=jy,Wy=pa,Hy=Object.prototype,Yy=Hy.propertyIsEnumerable,Wo=Object.getOwnPropertySymbols,Ky=Wo?function(e){return e==null?[]:(e=Object(e),Gy(Wo(e),function(t){return Yy.call(e,t)}))}:Wy,ma=Ky,qy=ra,Jy=qy(Object.keys,Object),Zy=Jy,Qy=Or,Xy=Zy,ev=Object.prototype,tv=ev.hasOwnProperty;function nv(e){if(!Qy(e))return Xy(e);var t=[];for(var n in Object(e))tv.call(e,n)&&n!="constructor"&&t.push(n);return t}var rv=nv,ov=la,iv=rv,av=mn;function sv(e){return av(e)?ov(e):iv(e)}var ga=sv,lv=fa,uv=ma,cv=ga;function dv(e){return lv(e,cv,uv)}var fv=dv,Ho=fv,pv=1,mv=Object.prototype,gv=mv.hasOwnProperty;function hv(e,t,n,o,i,a){var s=n&pv,l=Ho(e),u=l.length,c=Ho(t),d=c.length;if(u!=d&&!s)return!1;for(var m=u;m--;){var f=l[m];if(!(s?f in t:gv.call(t,f)))return!1}var g=a.get(e),y=a.get(t);if(g&&y)return g==t&&y==e;var p=!0;a.set(e,t),a.set(t,e);for(var b=s;++m<u;){f=l[m];var w=e[f],h=t[f];if(o)var v=s?o(h,w,f,t,e,a):o(w,h,f,e,t,a);if(!(v===void 0?w===h||i(w,h,n,o,a):v)){p=!1;break}b||(b=f=="constructor")}if(p&&!b){var S=e.constructor,_=t.constructor;S!=_&&"constructor"in e&&"constructor"in t&&!(typeof S=="function"&&S instanceof S&&typeof _=="function"&&_ instanceof _)&&(p=!1)}return a.delete(e),a.delete(t),p}var yv=hv,vv=Ue,wv=he,Sv=vv(wv,"DataView"),_v=Sv,bv=Ue,Cv=he,Ev=bv(Cv,"Promise"),Av=Ev,Tv=Ue,Iv=he,Pv=Tv(Iv,"Set"),kv=Pv,Nv=Ue,xv=he,$v=Nv(xv,"WeakMap"),Ov=$v,Zn=_v,Qn=Tr,Xn=Av,er=kv,tr=Ov,ha=Xe,ot=Ji,Yo="[object Map]",Rv="[object Object]",Ko="[object Promise]",qo="[object Set]",Jo="[object WeakMap]",Zo="[object DataView]",Uv=ot(Zn),Bv=ot(Qn),Fv=ot(Xn),Mv=ot(er),Vv=ot(tr),xe=ha;(Zn&&xe(new Zn(new ArrayBuffer(1)))!=Zo||Qn&&xe(new Qn)!=Yo||Xn&&xe(Xn.resolve())!=Ko||er&&xe(new er)!=qo||tr&&xe(new tr)!=Jo)&&(xe=function(e){var t=ha(e),n=t==Rv?e.constructor:void 0,o=n?ot(n):"";if(o)switch(o){case Uv:return Zo;case Bv:return Yo;case Fv:return Ko;case Mv:return qo;case Vv:return Jo}return t});var Dv=xe,$n=Nr,Lv=ca,jv=By,zv=yv,Qo=Dv,Xo=be,ei=yt.exports,Gv=Br,Wv=1,ti="[object Arguments]",ni="[object Array]",Ot="[object Object]",Hv=Object.prototype,ri=Hv.hasOwnProperty;function Yv(e,t,n,o,i,a){var s=Xo(e),l=Xo(t),u=s?ni:Qo(e),c=l?ni:Qo(t);u=u==ti?Ot:u,c=c==ti?Ot:c;var d=u==Ot,m=c==Ot,f=u==c;if(f&&ei(e)){if(!ei(t))return!1;s=!0,d=!1}if(f&&!d)return a||(a=new $n),s||Gv(e)?Lv(e,t,n,o,i,a):jv(e,t,u,n,o,i,a);if(!(n&Wv)){var g=d&&ri.call(e,"__wrapped__"),y=m&&ri.call(t,"__wrapped__");if(g||y){var p=g?e.value():e,b=y?t.value():t;return a||(a=new $n),i(p,b,n,o,a)}}return f?(a||(a=new $n),zv(e,t,n,o,i,a)):!1}var Kv=Yv,qv=Kv,oi=Re;function ya(e,t,n,o,i){return e===t?!0:e==null||t==null||!oi(e)&&!oi(t)?e!==e&&t!==t:qv(e,t,n,o,ya,i)}var va=ya,Jv=Nr,Zv=va,Qv=1,Xv=2;function ew(e,t,n,o){var i=n.length,a=i,s=!o;if(e==null)return!a;for(e=Object(e);i--;){var l=n[i];if(s&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++i<a;){l=n[i];var u=l[0],c=e[u],d=l[1];if(s&&l[2]){if(c===void 0&&!(u in e))return!1}else{var m=new Jv;if(o)var f=o(c,d,u,e,t,m);if(!(f===void 0?Zv(d,c,Qv|Xv,o,m):f))return!1}}return!0}var tw=ew,nw=Ce;function rw(e){return e===e&&!nw(e)}var wa=rw,ow=wa,iw=ga;function aw(e){for(var t=iw(e),n=t.length;n--;){var o=t[n],i=e[o];t[n]=[o,i,ow(i)]}return t}var sw=aw;function lw(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}var Sa=lw,uw=tw,cw=sw,dw=Sa;function fw(e){var t=cw(e);return t.length==1&&t[0][2]?dw(t[0][0],t[0][1]):function(n){return n===e||uw(n,e,t)}}var pw=fw;function mw(e,t){return e!=null&&t in Object(e)}var gw=mw,hw=pn,yw=Rr,vw=be,ww=gn,Sw=Ur,_w=bt;function bw(e,t,n){t=hw(t,e);for(var o=-1,i=t.length,a=!1;++o<i;){var s=_w(t[o]);if(!(a=e!=null&&n(e,s)))break;e=e[s]}return a||++o!=i?a:(i=e==null?0:e.length,!!i&&Sw(i)&&ww(s,i)&&(vw(e)||yw(e)))}var Cw=bw,Ew=gw,Aw=Cw;function Tw(e,t){return e!=null&&Aw(e,t,Ew)}var Iw=Tw,Pw=va,kw=$e,Nw=Iw,xw=Er,$w=wa,Ow=Sa,Rw=bt,Uw=1,Bw=2;function Fw(e,t){return xw(e)&&$w(t)?Ow(Rw(e),t):function(n){var o=kw(n,e);return o===void 0&&o===t?Nw(n,e):Pw(t,o,Uw|Bw)}}var Mw=Fw;function Vw(e){return function(t){return t==null?void 0:t[e]}}var Dw=Vw,Lw=kr;function jw(e){return function(t){return Lw(t,e)}}var zw=jw,Gw=Dw,Ww=zw,Hw=Er,Yw=bt;function Kw(e){return Hw(e)?Gw(Yw(e)):Ww(e)}var qw=Kw,Jw=pw,Zw=Mw,Qw=Mr,Xw=be,eS=qw;function tS(e){return typeof e=="function"?e:e==null?Qw:typeof e=="object"?Xw(e)?Zw(e[0],e[1]):Jw(e):eS(e)}var nS=tS,rS=sa,oS=pn,iS=gn,ii=Ce,aS=bt;function sS(e,t,n,o){if(!ii(e))return e;t=oS(t,e);for(var i=-1,a=t.length,s=a-1,l=e;l!=null&&++i<a;){var u=aS(t[i]),c=n;if(u==="__proto__"||u==="constructor"||u==="prototype")return e;if(i!=s){var d=l[u];c=o?o(d,u,l):void 0,c===void 0&&(c=ii(d)?d:iS(t[i+1])?[]:{})}rS(l,u,c),l=l[u]}return e}var lS=sS,uS=kr,cS=lS,dS=pn;function fS(e,t,n){for(var o=-1,i=t.length,a={};++o<i;){var s=t[o],l=uS(e,s);n(l,s)&&cS(a,dS(s,e),l)}return a}var pS=fS,mS=da,gS=$r,hS=ma,yS=pa,vS=Object.getOwnPropertySymbols,wS=vS?function(e){for(var t=[];e;)mS(t,hS(e)),e=gS(e);return t}:yS,SS=wS,_S=fa,bS=SS,CS=Fr;function ES(e){return _S(e,CS,bS)}var AS=ES,TS=Qi,IS=nS,PS=pS,kS=AS;function NS(e,t){if(e==null)return{};var n=TS(kS(e),function(o){return[o]});return t=IS(t),PS(e,n,function(o,i){return t(o,i[0])})}var xS=NS;function $S({services:e}){return St({id:"signUpActor",initial:"init",predictableActionArguments:!0,states:{init:{always:[{target:"confirmSignUp",cond:"shouldInitConfirmSignUp"},{target:"signUp"}]},signUp:{type:"parallel",exit:["clearError","clearFormValues","clearTouched"],states:{validation:{initial:"pending",states:{pending:{invoke:{src:"validateSignUp",onDone:{target:"valid",actions:"clearValidationError"},onError:{target:"invalid",actions:"setFieldErrors"}}},valid:{entry:"sendUpdate"},invalid:{entry:"sendUpdate"}},on:{CHANGE:{actions:"handleInput",target:".pending"},BLUR:{actions:"handleBlur",target:".pending"}}},submission:{initial:"idle",states:{idle:{entry:"sendUpdate",on:{SUBMIT:{actions:"handleSubmit",target:"validate"},FEDERATED_SIGN_IN:"federatedSignIn"}},federatedSignIn:{tags:["pending"],entry:["sendUpdate","clearError"],invoke:{src:"federatedSignIn",onDone:"#signUpActor.resolved",onError:{actions:"setRemoteError"}}},validate:{entry:"sendUpdate",invoke:{src:"validateSignUp",onDone:{target:"pending",actions:"clearValidationError"},onError:{target:"idle",actions:"setFieldErrors"}}},pending:{tags:["pending"],entry:["parsePhoneNumber","sendUpdate","clearError"],invoke:{src:"signUp",onDone:[{cond:"shouldSkipConfirm",target:"skipConfirm",actions:["setUser","setCredentials"]},{target:"resolved",actions:["setUser","setCredentials","setCodeDeliveryDetails"]}],onError:{target:"idle",actions:"setRemoteError"}}},skipConfirm:{always:{target:"#signUpActor.resolved",actions:"setAutoSignInIntent"}},resolved:{type:"final",always:"#signUpActor.confirmSignUp"}}}}},confirmSignUp:{initial:"edit",states:{edit:{entry:"sendUpdate",on:{SUBMIT:{actions:"handleSubmit",target:"submit"},CHANGE:{actions:"handleInput"},BLUR:{actions:"handleBlur"},RESEND:"resend"}},resend:{tags:["pending"],entry:"sendUpdate",invoke:{src:"resendConfirmationCode",onDone:{target:"edit"},onError:[{target:"#signUpActor.resolved",actions:"setAutoSignInIntent",cond:"isUserAlreadyConfirmed"},{target:"edit",actions:"setRemoteError"}]}},submit:{tags:["pending"],entry:["sendUpdate","clearError"],invoke:{src:"confirmSignUp",onDone:{target:"#signUpActor.resolved",actions:"setAutoSignInIntent"},onError:{target:"edit",actions:"setRemoteError"}}}}},resolved:{type:"final",data:(t,n)=>{const{username:o,password:i}=t.authAttributes;return{user:$e(n,"data.user")||t.user,authAttributes:{username:o,password:i},intent:t.intent}}}}},{guards:{isUserAlreadyConfirmed:(t,n)=>n.data.message==="User is already confirmed.",shouldInitConfirmSignUp:t=>t.intent&&t.intent==="confirmSignUp",shouldSkipConfirm:(t,n)=>n.data.userConfirmed},actions:{clearError:mr,clearFormValues:gr,clearTouched:hr,clearValidationError:yr,handleInput:Sr,handleSubmit:_r,handleBlur:br,parsePhoneNumber:Yi,setCredentials:Wi,setFieldErrors:vr,setRemoteError:wr,setCodeDeliveryDetails:Cu,setUser:Hi,sendUpdate:pr(),setAutoSignInIntent:ue({intent:t=>(t==null?void 0:t.intent)==="confirmSignUp"?"autoSignInSubmit":"autoSignIn"})},services:{confirmSignUp(t,n){return B(this,void 0,void 0,function*(){const{user:o,authAttributes:i,formValues:a}=t,{confirmation_code:s}=a,l=$e(o,"username")||$e(i,"username");return yield e.handleConfirmSignUp({username:l,code:s})})},resendConfirmationCode(t,n){return B(this,void 0,void 0,function*(){const{user:o,authAttributes:i}=t,a=$e(o,"username")||$e(i,"username");return G.Auth.resendSignUp(a)})},federatedSignIn(t,n){return B(this,void 0,void 0,function*(){const{provider:o}=n.data;return yield G.Auth.federatedSignIn({provider:o})})},signUp(t,n){return B(this,void 0,void 0,function*(){const{formValues:o,loginMechanisms:i}=t,[a="username"]=i,{[a]:s,password:l}=o,u=xS(o,(c,d)=>{switch(d){case"address":case"birthdate":case"email":case"family_name":case"gender":case"given_name":case"locale":case"middle_name":case"name":case"nickname":case"phone_number":case"picture":case"preferred_username":case"profile":case"updated_at":case"website":case"zoneinfo":return!0;default:return d.startsWith("custom:")}});return yield e.handleSignUp({username:s,password:l,attributes:u})})},validateSignUp(t,n){return B(this,void 0,void 0,function*(){return Vr(t.formValues,t.touched,t.passwordSettings,[e.validateFormPassword,e.validateConfirmPassword,e.validatePreferredUsername,e.validateCustomSignUp])})}}})}const{choose:OS}=Mi;function RS(){return St({id:"authenticator",initial:"idle",context:{user:void 0,config:{},services:We,actorRef:void 0,hasSetup:!1},predictableActionArguments:!0,states:{idle:{invoke:{src:"getCurrentUser",onDone:{actions:"setUser",target:"authenticated"},onError:{target:"setup"}}},setup:{initial:"waitConfig",states:{waitConfig:{on:{INIT:{actions:["configure","setHasSetup"],target:"applyConfig"}}},applyConfig:{invoke:{src:"getAmplifyConfig",onDone:{actions:"applyAmplifyConfig",target:"goToInitialState"}}},goToInitialState:{always:[{target:"#authenticator.signUp",cond:"isInitialStateSignUp"},{target:"#authenticator.resetPassword",cond:"isInitialStateResetPassword"},{target:"#authenticator.signIn"}]}}},signIn:{initial:"spawnActor",states:{spawnActor:{always:{actions:"spawnSignInActor",target:"runActor"}},runActor:{entry:"clearActorDoneData",exit:"stopSignInActor"}},on:{SIGN_UP:"signUp",RESET_PASSWORD:"resetPassword","done.invoke.signInActor":[{target:"signUp",actions:"setActorDoneData",cond:"shouldRedirectToSignUp"},{target:"resetPassword",actions:"setActorDoneData",cond:"shouldRedirectToResetPassword"},{target:"authenticated",actions:"setActorDoneData"}]}},signUp:{initial:"spawnActor",states:{spawnActor:{always:{actions:"spawnSignUpActor",target:"runActor"}},runActor:{entry:"clearActorDoneData",exit:"stopSignUpActor"},autoSignIn:{invoke:{src:"getCurrentUser",onDone:"#authenticator.authenticated",onError:"#authenticator.setup.goToInitialState"}}},on:{SIGN_IN:"signIn","done.invoke.signUpActor":{target:"#authenticator.signIn",actions:"setActorDoneData",cond:"shouldAutoSignIn"}}},resetPassword:{initial:"spawnActor",states:{spawnActor:{always:{actions:"spawnResetPasswordActor",target:"runActor"}},runActor:{entry:"clearActorDoneData",exit:"stopResetPasswordActor"}},on:{SIGN_IN:"signIn","done.invoke.resetPasswordActor":{target:"signIn",actions:"setActorDoneData"}}},signOut:{initial:"spawnActor",states:{spawnActor:{always:{actions:"spawnSignOutActor",target:"runActor"}},runActor:{entry:"clearActorDoneData",exit:["stopSignOutActor","clearUser"]}},on:{"done.invoke.signOutActor":[{target:"setup",cond:"shouldSetup"},{target:"setup.goToInitialState"}]}},authenticated:{initial:"idle",states:{idle:{on:{TOKEN_REFRESH:"refreshUser"}},refreshUser:{invoke:{src:"getCurrentUser",onDone:{actions:"setUser",target:"idle"},onError:{target:"#authenticator.signOut"}}}},on:{SIGN_OUT:"signOut"}}},on:{CHANGE:{actions:"forwardToActor"},BLUR:{actions:"forwardToActor"},SUBMIT:{actions:"forwardToActor"},FEDERATED_SIGN_IN:{actions:"forwardToActor"},AUTO_SIGN_IN:{actions:"forwardToActor"},RESEND:{actions:"forwardToActor"},SIGN_IN:{actions:"forwardToActor"},SKIP:{actions:"forwardToActor"}}},{actions:{forwardToActor:OS([{cond:"hasActor",actions:uu(e=>e.actorRef)}]),setUser:ue({user:(e,t)=>t.data}),setActorDoneData:ue({actorDoneData:(e,t)=>{var n,o;return{authAttributes:Object.assign({},(n=t.data)===null||n===void 0?void 0:n.authAttributes),intent:(o=t.data)===null||o===void 0?void 0:o.intent}},user:(e,t)=>{var n;return(n=t.data)===null||n===void 0?void 0:n.user}}),clearUser:ue({user:void 0}),clearActorDoneData:ue({actorDoneData:void 0}),applyAmplifyConfig:ue({config(e,t){var n,o,i,a,s,l,u,c,d;const m=(o=(n=t.data.aws_cognito_username_attributes)===null||n===void 0?void 0:n.map(_=>_.toLowerCase()))!==null&&o!==void 0?o:[],f=(a=(i=t.data.aws_cognito_verification_mechanisms)===null||i===void 0?void 0:i.map(_=>_.toLowerCase()))!==null&&a!==void 0?a:[],g=(l=(s=t.data.aws_cognito_signup_attributes)===null||s===void 0?void 0:s.map(_=>_.toLowerCase()))!==null&&l!==void 0?l:[],y=(c=(u=t.data.aws_cognito_social_providers)===null||u===void 0?void 0:u.map(_=>_.toLowerCase()))!==null&&c!==void 0?c:[],p=t.data.aws_cognito_password_protection_settings||{};m.length===0&&m.push("username");const{loginMechanisms:b,signUpAttributes:w,socialProviders:h,initialState:v,formFields:S}=e.config;return{loginMechanisms:b!=null?b:m,formFields:(d=US(S))!==null&&d!==void 0?d:{},passwordSettings:p,signUpAttributes:w!=null?w:Array.from(new Set([...f,...g])),socialProviders:h!=null?h:y.sort(),initialState:v}}}),spawnSignInActor:ue({actorRef:(e,t)=>{var n,o,i,a,s,l,u;const{services:c}=e,d=Hh({services:c}).withContext({authAttributes:(o=(n=e.actorDoneData)===null||n===void 0?void 0:n.authAttributes)!==null&&o!==void 0?o:{},user:e.user,intent:(i=e.actorDoneData)===null||i===void 0?void 0:i.intent,country_code:"+1",formValues:{},touched:{},validationError:{},passwordSettings:(a=e.config)===null||a===void 0?void 0:a.passwordSettings,loginMechanisms:(s=e.config)===null||s===void 0?void 0:s.loginMechanisms,socialProviders:(l=e.config)===null||l===void 0?void 0:l.socialProviders,formFields:(u=e.config)===null||u===void 0?void 0:u.formFields});return kt(d,{name:"signInActor"})}}),spawnSignUpActor:ue({actorRef:(e,t)=>{var n,o,i,a,s,l,u;const{services:c}=e,d=$S({services:c}).withContext({authAttributes:(o=(n=e.actorDoneData)===null||n===void 0?void 0:n.authAttributes)!==null&&o!==void 0?o:{},country_code:"+1",intent:(i=e.actorDoneData)===null||i===void 0?void 0:i.intent,formValues:{},touched:{},validationError:{},loginMechanisms:(a=e.config)===null||a===void 0?void 0:a.loginMechanisms,socialProviders:(s=e.config)===null||s===void 0?void 0:s.socialProviders,formFields:(l=e.config)===null||l===void 0?void 0:l.formFields,passwordSettings:(u=e.config)===null||u===void 0?void 0:u.passwordSettings});return kt(d,{name:"signUpActor"})}}),spawnResetPasswordActor:ue({actorRef:(e,t)=>{var n,o,i,a,s;const{services:l}=e,u=Kh({services:l}).withContext({formValues:{},touched:{},intent:(n=e.actorDoneData)===null||n===void 0?void 0:n.intent,username:(i=(o=e.actorDoneData)===null||o===void 0?void 0:o.authAttributes)===null||i===void 0?void 0:i.username,formFields:(a=e.config)===null||a===void 0?void 0:a.formFields,validationError:{},passwordSettings:(s=e.config)===null||s===void 0?void 0:s.passwordSettings});return kt(u,{name:"resetPasswordActor"})}}),spawnSignOutActor:ue({actorRef:e=>{const t=Yh.withContext({user:e.user});return kt(t,{name:"signOutActor"})}}),stopSignInActor:$t("signInActor"),stopSignUpActor:$t("signUpActor"),stopResetPasswordActor:$t("resetPasswordActor"),stopSignOutActor:$t("signOutActor"),configure:ue((e,t)=>{const n=t.data,{services:o}=n,i=di(n,["services"]);return{services:Object.assign(Object.assign({},We),o),config:i}}),setHasSetup:ue({hasSetup:!0})},guards:{isInitialStateSignUp:e=>e.config.initialState==="signUp",isInitialStateResetPassword:e=>e.config.initialState==="resetPassword",shouldRedirectToSignUp:(e,t)=>{var n;return((n=t.data)===null||n===void 0?void 0:n.intent)==="confirmSignUp"},shouldRedirectToResetPassword:(e,t)=>{var n;return((n=t.data)===null||n===void 0?void 0:n.intent)==="confirmPasswordReset"},shouldAutoSignIn:(e,t)=>{var n,o;return((n=t.data)===null||n===void 0?void 0:n.intent)==="autoSignIn"||((o=t.data)===null||o===void 0?void 0:o.intent)==="autoSignInSubmit"},shouldSetup:e=>e.hasSetup===!1,hasActor:e=>!!e.actorRef},services:{getCurrentUser:(e,t)=>e.services.getCurrentUser(),getAmplifyConfig:(e,t)=>e.services.getAmplifyConfig()}})}function US(e){return e&&Object.keys(e).forEach(t=>{Object.keys(e[t]).forEach(n=>{let o=e[t][n];o.required=o.isRequired})}),e}const BS={key:0,class:"amplify-flex amplify-alert amplify-alert--error amplify-authenticator__base","data-variation":"error",role:"alert"},FS={class:"amplify-flex amplify-authenticator__icon-wrapper"},MS=r.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"amplify-icon","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor"},[r.createElementVNode("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"})],-1),VS=r.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"amplify-icon","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor"},[r.createElementVNode("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})],-1),ye={__name:"base-alert",setup(e){const t=r.ref(!0),n=N("Dismiss alert");function o(){t.value=!1}return(i,a)=>{const s=ie;return t.value?(r.openBlock(),r.createElementBlock("div",BS,[r.createElementVNode("div",FS,[MS,r.createElementVNode("div",null,[r.renderSlot(i.$slots,"default")])]),r.createVNode(s,{class:"amplify-field-group__control amplify-alert__dismiss","aria-label":r.unref(n),fullwidth:!1,variation:"link",type:"button",onClick:o},{default:r.withCtx(()=>[VS]),_:1},8,["aria-label"])])):r.createCommentVNode("",!0)}}},ve=r.defineComponent({__name:"base-field-set",setup(e){let t=r.useSlots();return(n,o)=>r.renderSlot(n.$slots,"fieldSetI",r.mergeProps(n.$attrs,{slotData:r.unref(t).default&&r.unref(t).default()}),()=>[r.createElementVNode("fieldset",r.mergeProps(n.$attrs,{"data-amplify-fieldset":""}),[r.renderSlot(n.$slots,"default")],16)])}});function DS(e){return r.getCurrentScope()?(r.onScopeDispose(e),!0):!1}function _a(e){let t=0,n,o;const i=()=>{t-=1,o&&t<=0&&(o.stop(),n=void 0,o=void 0)};return(...a)=>(t+=1,n||(o=r.effectScope(!0),n=o.run(()=>e(...a))),DS(i),n)}function LS(e){return"state"in e}var ai=function(){};function jS(e){return"getSnapshot"in e?e.getSnapshot():LS(e)?e.state:void 0}function zS(e,t){t===void 0&&(t=jS);var n=r.isRef(e)?e:r.shallowRef(e),o=r.shallowRef(t(n.value)),i=function(a){n.value.send(a)};return r.watch(n,function(a,s,l){o.value=t(a);var u=a.subscribe({next:function(c){return o.value=c},error:ai,complete:ai}).unsubscribe;l(function(){return u()})},{immediate:!0}),{state:o,send:i}}const GS=e=>{var t,n,o;return{...(o=(n=(t=Xt(e))==null?void 0:t.formFields)==null?void 0:n.setupTOTP)==null?void 0:o.QR}},Dr=_a(()=>{const e=RS(),t=Gi(e).start(),n=r.ref("configuring"),{state:o,send:i}=zS(t),a=()=>{n.value="authenticated"},s=()=>{n.value="unauthenticated"},l=ol(t,async(u,c)=>{await mi(u,c,{onSignIn:a,onSignOut:s})});return G.Auth.currentAuthenticatedUser().then(()=>{n.value="authenticated"}).catch(()=>{n.value="unauthenticated"}),r.onScopeDispose(()=>{l()}),{authStatus:n,service:t,send:i,state:o}}),re=_a(()=>{const{authStatus:e,state:t,send:n}=Dr(),o=r.reactive({});return r.watchEffect(()=>{const i=ls({send:n,state:t.value});for(const s of Object.keys(i))o[s]=i[s];const a=i.route==="setupTOTP"?GS(t.value):null;o.QRFields=a,o.authStatus=e.value,o.send=n,o.state=t}),o});let WS=(e=21)=>{let t="",n=crypto.getRandomValues(new Uint8Array(e));for(;e--;){let o=n[e]&63;o<36?t+=o.toString(36):o<62?t+=(o-26).toString(36).toUpperCase():o<63?t+="_":t+="-"}return t};const hn=r.defineComponent({__name:"base-input",emits:["update:modelValue"],setup(e,{emit:t}){const n=o=>{t("update:modelValue",o.target.value)};return(o,i)=>(r.openBlock(),r.createElementBlock("input",{onChange:i[0]||(i[0]=a=>n(a)),"data-amplify-input":""},null,32))}}),HS={},YS={"data-amplify-label":""};function KS(e,t){return r.openBlock(),r.createElementBlock("label",YS,[r.renderSlot(e.$slots,"default")])}var yn=Qt(HS,[["render",KS]]);const qS=["aria-label","aria-checked"],JS=r.createElementVNode("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"},null,-1),ZS=[JS],QS=r.createElementVNode("path",{d:"M0 0h24v24H0zm0 0h24v24H0zm0 0h24v24H0zm0 0h24v24H0z",fill:"none"},null,-1),XS=r.createElementVNode("path",{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78l3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z"},null,-1),e_=[QS,XS],t_={inheritAttrs:!1},Lr=r.defineComponent({...t_,__name:"password-control",props:{name:null,label:null,autocomplete:{default:"new-password"},hasError:{type:Boolean,default:!1},labelHidden:{type:Boolean},placeholder:null,required:{type:Boolean,default:!0},describedBy:null},setup(e){var h;const t=e,n=N("Show password"),o=N("Hide password"),i=r.ref("password"),a=r.ref(n),s=Math.floor(Math.random()*999999),{name:l,label:u,autocomplete:c,hasError:d,labelHidden:m,placeholder:f,required:g}=r.toRefs(t);let y=r.ref("");function p(){a.value=a.value===n?o:n,i.value=i.value==="password"?"text":"password"}const b=N((h=f==null?void 0:f.value)!=null?h:u.value),w=N(u.value);return(v,S)=>{const _=yn,C=hn,A=Q;return r.openBlock(),r.createBlock(A,{class:r.normalizeClass([r.unref(J).Flex,r.unref(J).Field,r.unref(J).TextField,r.unref(J).PasswordField,"amplify-authenticator__column"])},{default:r.withCtx(()=>[r.createVNode(_,{class:r.normalizeClass(["amplify-label",{"amplify-visually-hidden":r.unref(m)}]),for:"amplify-field-"+r.unref(s)},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(w)),1)]),_:1},8,["class","for"]),r.createVNode(A,{class:r.normalizeClass([r.unref(J).Flex,r.unref(J).FieldGroup])},{default:r.withCtx(()=>[r.createVNode(A,{class:r.normalizeClass(r.unref(J).FieldGroupFieldWrapper)},{default:r.withCtx(()=>{var T;return[r.createVNode(C,r.mergeProps(v.$attrs,{modelValue:r.unref(y),"onUpdate:modelValue":S[0]||(S[0]=I=>r.isRef(y)?y.value=I:y=I),class:[r.unref(J).Input,r.unref(J).FieldGroupControl],id:"amplify-field-"+r.unref(s),"data-amplify-password":"true",name:r.unref(l),autocomplete:r.unref(c),required:(T=r.unref(g))!=null?T:!0,placeholder:r.unref(b),type:i.value,"aria-invalid":r.unref(d),"aria-describedBy":e.describedBy}),null,16,["modelValue","class","id","name","autocomplete","required","placeholder","type","aria-invalid","aria-describedBy"])]}),_:1},8,["class"]),r.createVNode(A,{class:r.normalizeClass(r.unref(J).FieldGroupOuterEnd)},{default:r.withCtx(()=>[r.createElementVNode("button",{"aria-label":a.value,"aria-checked":i.value!=="password",class:r.normalizeClass([r.unref(J).Button,r.unref(J).FieldGroupControl,r.unref(J).FieldShowPassword]),"data-fullwidth":"false",type:"button",role:"switch",onClick:p},[i.value==="password"?(r.openBlock(),r.createElementBlock("svg",{key:0,xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24",class:r.normalizeClass(r.unref(J).Icon)},ZS,2)):(r.openBlock(),r.createElementBlock("svg",{key:1,xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24",class:r.normalizeClass(r.unref(J).Icon)},e_,2))],10,qS)]),_:1},8,["class"])]),_:1},8,["class"])]),_:1},8,["class"])}}}),n_=["value","selected"],r_=r.defineComponent({__name:"base-select",props:{selectValue:{default:""},options:null},emits:["update:selectValue"],setup(e,{emit:t}){const n=e,{options:o,selectValue:i}=r.toRefs(n),a=s=>{t("update:selectValue",s.target.value)};return(s,l)=>(r.openBlock(),r.createElementBlock("select",{onChange:l[0]||(l[0]=u=>a(u))},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(o),(u,c)=>(r.openBlock(),r.createElementBlock("option",{key:c,value:u,selected:u==r.unref(i)?!0:void 0},r.toDisplayString(u),9,n_))),128))],32))}}),o_=r.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg","data-size":"large",fill:"currentColor",viewBox:"0 0 24 24",class:"amplify-icon amplify-icon--large"},[r.createElementVNode("path",{d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})],-1),i_=r.defineComponent({__name:"alias-control",props:{label:{default:"Username"},name:{default:"username"},placeholder:{default:""},autocomplete:{default:""},labelHidden:{type:Boolean},required:{type:Boolean,default:!0},dialCode:null,dialCodeList:null,type:{default:"text"},hasError:{type:Boolean},describedBy:null},setup(e){const t=e,{label:n,name:o,placeholder:i,autocomplete:a,labelHidden:s,required:l,dialCode:u,dialCodeList:c}=r.toRefs(t),d=Math.floor(Math.random()*999999),m=Math.floor(Math.random()*999999);return(f,g)=>{const y=yn,p=r_,b=Q,w=hn;return r.openBlock(),r.createBlock(b,{class:"amplify-flex amplify-field amplify-textfield amplify-phonenumberfield amplify-authenticator__column"},{default:r.withCtx(()=>[r.createVNode(y,r.mergeProps({for:"amplify-field-"+r.unref(d),class:["amplify-label",{"amplify-visually-hidden":r.unref(s)}]},f.$attrs),{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(n)),1)]),_:1},16,["for","class"]),r.createVNode(b,{class:"amplify-flex amplify-field-group"},{default:r.withCtx(()=>[r.createVNode(b,{class:"amplify-field-group__outer-start"},{default:r.withCtx(()=>[e.type==="tel"?(r.openBlock(),r.createBlock(b,{key:0,class:"amplify-flex amplify-field amplify-selectfield amplify-countrycodeselect amplify-dialcodeselect amplify-authenticator__column"},{default:r.withCtx(()=>[r.createVNode(y,r.mergeProps({for:"amplify-field-"+r.unref(m),class:"amplify-label amplify-visually-hidden"},f.$attrs),{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString("Country Code"))]),_:1},16,["for"]),r.createVNode(b,{class:"amplify-select__wrapper"},{default:r.withCtx(()=>[r.createVNode(p,{class:"amplify-select amplify-field-group__control",id:"amplify-field-"+r.unref(m),autocomplete:"tel-country-code","aria-label":"country code",name:"country_code",options:r.unref(c),"select-value":r.unref(u)},null,8,["id","options","select-value"]),r.createVNode(b,{class:"amplify-flex amplify-select__icon-wrapper amplify-authenticator__icon-wrapper"},{default:r.withCtx(()=>[o_]),_:1})]),_:1})]),_:1})):r.createCommentVNode("",!0)]),_:1}),r.createVNode(b,{class:"amplify-field-group__field-wrapper"},{default:r.withCtx(()=>{var h;return[r.createVNode(w,{class:"amplify-input amplify-field-group__control",id:"amplify-field-"+r.unref(d),autocomplete:r.unref(a),name:r.unref(o),required:(h=r.unref(l))!=null?h:!0,type:e.type,placeholder:r.unref(i),"aria-invalid":e.hasError,"aria-describedBy":e.describedBy},null,8,["id","autocomplete","name","required","type","placeholder","aria-invalid","aria-describedBy"])]}),_:1})]),_:1})]),_:1})}}}),a_=["id"],ba=r.defineComponent({__name:"base-form-field",props:{name:{default:""},formField:{default:()=>({})}},setup(e){const t=e,{name:n,formField:o}=r.toRefs(t),{validationErrors:i}=r.toRefs(re()),{type:a}=o.value,s=a==="password",l=WS(12),u=r.computed(()=>qs(i.value[n.value])),c=r.computed(()=>{var m;return((m=u.value)==null?void 0:m.length)>0}),d=r.computed(()=>c.value?l:void 0);return(m,f)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[s?(r.openBlock(),r.createBlock(Lr,{key:0,name:r.unref(n),label:r.unref(o).label,placeholder:r.unref(o).placeholder,required:r.unref(o).isRequired,"label-hidden":r.unref(o).labelHidden,autocomplete:r.unref(o).autocomplete,hasError:r.unref(c),describedBy:r.unref(d)},null,8,["name","label","placeholder","required","label-hidden","autocomplete","hasError","describedBy"])):(r.openBlock(),r.createBlock(i_,{key:1,name:r.unref(n),label:r.unref(o).label,placeholder:r.unref(o).placeholder,required:r.unref(o).isRequired,"label-hidden":r.unref(o).labelHidden,autocomplete:r.unref(o).autocomplete,"dial-code":r.unref(o).dialCode,"dial-code-list":r.unref(o).dialCodeList,type:r.unref(o).type,hasError:r.unref(c),describedBy:r.unref(d)},null,8,["name","label","placeholder","required","label-hidden","autocomplete","dial-code","dial-code-list","type","hasError","describedBy"])),r.unref(c)?(r.openBlock(),r.createElementBlock("div",{key:2,id:r.unref(d)},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(u),(g,y)=>(r.openBlock(),r.createElementBlock("p",{key:y,role:"alert","data-variation":"error",class:"amplify-text amplify-text--error"},r.toDisplayString(r.unref(N)(g)),1))),128))],8,a_)):r.createCommentVNode("",!0)],64))}}),we=r.defineComponent({__name:"base-form-fields",props:{route:null},setup(e){const t=e,{route:n}=r.toRefs(t),{state:o}=Dr();let i=[];return r.onBeforeMount(()=>{i=gl(n.value,o.value)}),(a,s)=>(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(i),([l,u])=>(r.openBlock(),r.createBlock(ba,{name:l,key:l,formField:u},null,8,["name","formField"]))),128))}}),Rt=r.defineComponent({__name:"federated-sign-in-button",props:{provider:null},setup(e){const t=e,{provider:n}=r.toRefs(t),{toFederatedSignIn:o}=re(),i=()=>{o({provider:n.value})};return(a,s)=>{const l=Q,u=ie;return r.openBlock(),r.createBlock(u,{class:"amplify-field-group__control federated-sign-in-button amplify-authenticator__font",fullwidth:!1,style:{"font-weight":"normal"},type:"button",onClick:i},{default:r.withCtx(()=>[r.createVNode(l,{class:"amplify-flex federated-sign-in-button-row amplify-authenticator__sign-in-button-wrapper"},{default:r.withCtx(()=>[r.renderSlot(a.$slots,"default")]),_:3})]),_:3})}}}),s_=r.createElementVNode("svg",{"aria-label":"Amazon icon",class:"amplify-icon federated-sign-in-icon",viewBox:"0 0 248 268"},[r.createElementVNode("path",{d:"M139.056521,147.024612 C133.548808,156.744524 124.782731,162.726926 115.087401,162.726926 C101.790721,162.726926 93.9937779,152.612964 93.9937779,137.68681 C93.9937779,108.224571 120.447551,102.879017 145.533369,102.879017 L145.533369,110.365976 C145.533369,123.831358 145.876354,135.063787 139.056521,147.024612 M207.206992,162.579655 C209.400505,165.692256 209.887066,169.437725 207.063416,171.770186 C199.996315,177.653081 187.429476,188.590967 180.513926,194.716661 L180.46208,194.621133 C178.176838,196.663031 174.862638,196.810303 172.27828,195.445057 C160.780281,185.9162 158.686473,181.494078 152.405048,172.403055 C133.405233,191.751331 119.909143,197.534719 95.309886,197.534719 C66.1281801,197.534719 43.4791563,179.599451 43.4791563,143.669212 C43.4791563,115.616003 58.6782107,96.5105248 80.4019706,87.1727225 C99.2063636,78.9096034 125.464714,77.4528107 145.533369,75.1641337 L145.533369,70.694248 C145.533369,62.4749122 146.167493,52.7510201 141.297893,45.6541312 C137.110277,39.2856386 129.018206,36.6586354 121.859376,36.6586354 C108.658413,36.6586354 96.9171331,43.4171982 94.0416364,57.4199213 C93.4593582,60.532522 91.1701278,63.5933787 88.003492,63.7406501 L54.4387473,60.1424518 C51.6150972,59.5095829 48.4484614,57.2248862 49.2740201,52.8982915 C56.9712583,12.2553679 93.7983558,0 126.732964,0 C143.587124,0 165.606011,4.47386604 178.902691,17.2148315 C195.760839,32.917146 194.149604,53.8694866 194.149604,76.6726704 L194.149604,130.542157 C194.149604,146.734049 200.87372,153.830938 207.206992,162.579655 Z M233.826346,208.038962 C230.467669,203.683255 211.550709,205.9821 203.056405,206.998432 C200.470662,207.321077 200.076227,205.042397 202.406981,203.404973 C217.475208,192.664928 242.201125,195.766353 245.081698,199.363845 C247.966255,202.981502 244.336653,228.071183 230.172839,240.049379 C228.001452,241.888455 225.929671,240.904388 226.89783,238.468418 C230.077218,230.430525 237.204944,212.418868 233.826346,208.038962 Z M126.768855,264 C74.0234043,264 42.0764048,241.955028 17.7852554,217.541992 C12.9733903,212.705982 6.71799208,206.295994 3.31151296,200.690918 C1.90227474,198.372135 5.59096074,195.021875 8.0442063,196.84375 C38.2390146,219.267578 82.1011654,239.538304 125.529506,239.538304 C154.819967,239.538304 191.046475,227.469543 220.66851,214.867659 C225.146771,212.966167 225.146771,219.180222 224.511585,221.060516 C224.183264,222.03242 209.514625,236.221149 189.247207,247.047411 C170.304273,257.166172 146.397132,264 126.768855,264 Z",fill:"#FF9900"})],-1),l_={class:"amplify-text amplify-authenticator__federated-text"},u_=r.createElementVNode("svg",{"aria-label":"Apple icon",class:"amplify-icon federated-sign-in-icon",fill:"#000",preserveAspectRatio:"xMidYMid",stroke:"#000",strokeWidth:"0",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},[r.createElementVNode("path",{d:"M747.4 535.7c-.4-68.2 30.5-119.6 92.9-157.5-34.9-50-87.7-77.5-157.3-82.8-65.9-5.2-138 38.4-164.4 38.4-27.9 0-91.7-36.6-141.9-36.6C273.1 298.8 163 379.8 163 544.6c0 48.7 8.9 99 26.7 150.8 23.8 68.2 109.6 235.3 199.1 232.6 46.8-1.1 79.9-33.2 140.8-33.2 59.1 0 89.7 33.2 141.9 33.2 90.3-1.3 167.9-153.2 190.5-221.6-121.1-57.1-114.6-167.2-114.6-170.7zm-105.1-305c50.7-60.2 46.1-115 44.6-134.7-44.8 2.6-96.6 30.5-126.1 64.8-32.5 36.8-51.6 82.3-47.5 133.6 48.4 3.7 92.6-21.2 129-63.7z"})],-1),c_={class:"amplify-text amplify-authenticator__federated-text"},d_=r.createElementVNode("svg",{"aria-label":"Facebook icon",class:"amplify-icon federated-sign-in-icon",viewBox:"0 0 279 538"},[r.createElementVNode("path",{d:"M82.3409742,538 L82.3409742,292.936652 L0,292.936652 L0,196.990154 L82.2410458,196.990154 L82.2410458,126.4295 C82.2410458,44.575144 132.205229,0 205.252865,0 C240.227794,0 270.306232,2.59855099 279,3.79788222 L279,89.2502322 L228.536175,89.2502322 C188.964542,89.2502322 181.270057,108.139699 181.270057,135.824262 L181.270057,196.89021 L276.202006,196.89021 L263.810888,292.836708 L181.16913,292.836708 L181.16913,538 L82.3409742,538 Z",fill:"#1877F2"})],-1),f_={class:"amplify-text amplify-authenticator__federated-text"},p_=r.createElementVNode("svg",{"aria-label":"Google icon",class:"amplify-icon federated-sign-in-icon",viewBox:"0 0 256 262",xmlns:"http://www.w3.org/2000/svg",preserveAspectRatio:"xMidYMid"},[r.createElementVNode("path",{d:"M255.878 133.451c0-10.734-.871-18.567-2.756-26.69H130.55v48.448h71.947c-1.45 12.04-9.283 30.172-26.69 42.356l-.244 1.622 38.755 30.023 2.685.268c24.659-22.774 38.875-56.282 38.875-96.027",fill:"#4285F4"}),r.createElementVNode("path",{d:"M130.55 261.1c35.248 0 64.839-11.605 86.453-31.622l-41.196-31.913c-11.024 7.688-25.82 13.055-45.257 13.055-34.523 0-63.824-22.773-74.269-54.25l-1.531.13-40.298 31.187-.527 1.465C35.393 231.798 79.49 261.1 130.55 261.1",fill:"#34A853"}),r.createElementVNode("path",{d:"M56.281 156.37c-2.756-8.123-4.351-16.827-4.351-25.82 0-8.994 1.595-17.697 4.206-25.82l-.073-1.73L15.26 71.312l-1.335.635C5.077 89.644 0 109.517 0 130.55s5.077 40.905 13.925 58.602l42.356-32.782",fill:"#FBBC05"}),r.createElementVNode("path",{d:"M130.55 50.479c24.514 0 41.05 10.589 50.479 19.438l36.844-35.974C195.245 12.91 165.798 0 130.55 0 79.49 0 35.393 29.301 13.925 71.947l42.211 32.783c10.59-31.477 39.891-54.251 74.414-54.251",fill:"#EB4335"})],-1),m_={class:"amplify-text amplify-authenticator__federated-text"},g_=["data-label"],vn=r.defineComponent({__name:"federated-sign-in",setup(e){const t=re(),{route:n,socialProviders:o}=t,i=o==null?void 0:o.includes("amazon"),a=o==null?void 0:o.includes("apple"),s=o==null?void 0:o.includes("facebook"),l=o==null?void 0:o.includes("google"),u=s||l||i||a,{getSignInWithFederationText:c,getOrText:d}=ce,m=r.computed(()=>Mn),f=r.computed(()=>c(n,"amazon")),g=r.computed(()=>c(n,"apple")),y=r.computed(()=>c(n,"facebook")),p=r.computed(()=>c(n,"google")),b=r.computed(()=>d());return(w,h)=>{const v=Q;return r.unref(u)?(r.openBlock(),r.createBlock(v,{key:0,class:"amplify-flex federated-sign-in-container amplify-authenticator__column amplify-authenticator__sign-in-base"},{default:r.withCtx(()=>[r.unref(i)?(r.openBlock(),r.createBlock(Rt,{key:0,provider:r.unref(m).Amazon},{default:r.withCtx(()=>[s_,r.createElementVNode("p",l_,r.toDisplayString(r.unref(f)),1)]),_:1},8,["provider"])):r.createCommentVNode("",!0),r.unref(a)?(r.openBlock(),r.createBlock(Rt,{key:1,provider:r.unref(m).Apple},{default:r.withCtx(()=>[u_,r.createElementVNode("p",c_,r.toDisplayString(r.unref(g)),1)]),_:1},8,["provider"])):r.createCommentVNode("",!0),r.unref(s)?(r.openBlock(),r.createBlock(Rt,{key:2,provider:r.unref(m).Facebook},{default:r.withCtx(()=>[d_,r.createElementVNode("p",f_,r.toDisplayString(r.unref(y)),1)]),_:1},8,["provider"])):r.createCommentVNode("",!0),r.unref(l)?(r.openBlock(),r.createBlock(Rt,{key:3,provider:r.unref(m).Google},{default:r.withCtx(()=>[p_,r.createElementVNode("p",m_,r.toDisplayString(r.unref(p)),1)]),_:1},8,["provider"])):r.createCommentVNode("",!0),r.createElementVNode("hr",{class:"amplify-divider amplify-divider--label amplify-divider--small","aria-orientation":"horizontal","data-size":"small","data-label":r.unref(b)},null,8,g_)]),_:1})):r.createCommentVNode("",!0)}}}),h_=r.createElementVNode("legend",{class:"amplify-visually-hidden"},"Sign in",-1),y_={"data-amplify-footer":""},jr=r.defineComponent({__name:"sign-in",emits:["signInSubmit","forgotPasswordClicked","createAccountClicked"],setup(e,{emit:t}){const n=re(),{submitForm:o,updateForm:i,toResetPassword:a}=n,{error:s,isPending:l}=r.toRefs(n),u=r.useAttrs(),{getForgotPasswordText:c,getSignInText:d,getSigningInText:m}=ce,f=r.computed(()=>c()),g=r.computed(()=>d()),y=r.computed(()=>m()),p=h=>{const{name:v,value:S}=h.target;i({name:v,value:S})},b=h=>{u!=null&&u.onSignInSubmit?t("signInSubmit",h):o(ge(h))},w=()=>{u!=null&&u.onForgotPasswordClicked?t("forgotPasswordClicked"):a()};return(h,v)=>{const S=ve,_=ye,C=ie,A=Q,T=me,I=pe;return r.renderSlot(h.$slots,"signInSlotI",r.normalizeProps(r.guardReactiveProps(h.$attrs)),()=>[r.renderSlot(h.$slots,"header"),r.createVNode(A,r.normalizeProps(r.guardReactiveProps(h.$attrs)),{default:r.withCtx(()=>[r.createVNode(T,{"data-amplify-authenticator-signin":"",onInput:p,onSubmit:r.withModifiers(b,["prevent"]),method:"post"},{formt:r.withCtx(({slotData:x})=>[r.renderSlot(h.$slots,"form",{info:x,onSignInSubmit:b,onInput:p,onForgotPasswordClicked:w})]),default:r.withCtx(()=>[r.createVNode(vn),r.createVNode(A,{class:"amplify-flex amplify-authenticator__column"},{default:r.withCtx(()=>[r.createVNode(S,{disabled:r.unref(l),class:"amplify-flex amplify-authenticator__column"},{fieldSetI:r.withCtx(({slotData:x})=>[r.renderSlot(h.$slots,"signin-fields",{info:x})]),default:r.withCtx(()=>[h_,r.createVNode(we,{route:"signIn"})]),_:3},8,["disabled"]),r.unref(s)?(r.openBlock(),r.createBlock(_,{key:0},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(N)(r.unref(s))),1)]),_:1})):r.createCommentVNode("",!0),r.createVNode(C,{disabled:r.unref(l),class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!0,loading:!1,variation:"primary"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(l)?r.unref(y):r.unref(g)),1)]),_:1},8,["disabled"])]),_:3})]),_:3},8,["onSubmit"])]),_:3},16),r.createVNode(I,null,{default:r.withCtx(()=>[r.renderSlot(h.$slots,"footer",{},()=>[r.createElementVNode("div",y_,[r.createVNode(C,{onClick:w,class:"amplify-field-group__control amplify-authenticator__font",variation:"link",fullwidth:!0,size:"small",style:{"font-weight":"normal"},type:"button"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(f)),1)]),_:1})])])]),_:3})])}}}),zr=r.defineComponent({__name:"authenticator-sign-up-form-fields",setup(e){return(t,n)=>(r.openBlock(),r.createBlock(we,{route:"signUp"}))}}),Gr=r.defineComponent({__name:"sign-up",emits:["signUpSubmit"],setup(e,{emit:t}){const n=re(),{submitForm:o,updateBlur:i,updateForm:a}=n,{error:s,hasValidationErrors:l,isPending:u}=r.toRefs(n),c=r.useAttrs(),{getCreateAccountText:d}=ce,m=r.computed(()=>d()),f=p=>{let{checked:b,name:w,type:h,value:v}=p.target;a({name:w,value:h==="checkbox"&&!b?void 0:v})};function g(p){const{name:b}=p.target;i({name:b})}const y=p=>{c!=null&&c.onSignUpSubmit?t("signUpSubmit",p):o(ge(p))};return(p,b)=>{const w=ve,h=ye,v=ie,S=Q,_=me,C=pe;return r.renderSlot(p.$slots,"signUpSlotI",r.normalizeProps(r.guardReactiveProps(p.$attrs)),()=>[r.renderSlot(p.$slots,"header"),r.createVNode(S,r.normalizeProps(r.guardReactiveProps(p.$attrs)),{default:r.withCtx(()=>[r.createVNode(_,{onInput:f,onBlurCapture:g,onSubmit:r.withModifiers(y,["prevent"])},{default:r.withCtx(()=>[r.createVNode(vn),r.createVNode(S,{class:"amplify-flex amplify-authenticator__column"},{default:r.withCtx(()=>[r.createVNode(w,{class:"amplify-flex amplify-authenticator__column",disabled:r.unref(u)},{fieldSetI:r.withCtx(({slotData:A})=>[r.renderSlot(p.$slots,"signup-fields",{info:A})]),default:r.withCtx(()=>[r.createVNode(zr)]),_:3},8,["disabled"]),r.unref(s)?(r.openBlock(),r.createBlock(h,{key:0},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(N)(r.unref(s))),1)]),_:1})):r.createCommentVNode("",!0),r.createVNode(v,{class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!0,loading:!1,variation:"primary",style:{"border-radius":"0px","font-weight":"normal"},disabled:r.unref(u)||r.unref(l)},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(m)),1)]),_:1},8,["disabled"])]),_:3})]),_:3},8,["onSubmit"])]),_:3},16),r.createVNode(C,null,{default:r.withCtx(()=>[r.renderSlot(p.$slots,"footer")]),_:3})])}}}),v_={};function w_(e,t){const n=Q;return r.openBlock(),r.createBlock(n,{tabindex:"0","aria-orientation":"horizontal","data-orientation":"horizontal",class:"amplify-authenticator__tabs",role:"tablist"},{default:r.withCtx(()=>[r.createVNode(n,{class:"amplify-flex amplify-tabs amplify-authenticator__tabs-wrapper","data-indicator-position":"top"},{default:r.withCtx(()=>[r.renderSlot(e.$slots,"default")]),_:3})]),_:3})}var S_=Qt(v_,[["render",w_]]);const __=r.defineComponent({__name:"base-two-tab-item",props:{label:null,id:null,active:{type:Boolean,default:!1}},setup(e){const t=e,{active:n,id:o,label:i}=r.toRefs(t);return(a,s)=>{const l=Q;return r.openBlock(),r.createBlock(l,{tabindex:r.unref(n)?0:-1,"data-state":r.unref(n)?"active":"inactive","aria-selected":r.unref(n)?"true":"false","aria-controls":`radix-id-${r.unref(o)}-8-content-0`,id:`radix-id-${r.unref(o)}-8-trigger-0`,"data-orientation":"horizontal",role:"tab",class:"amplify-tabs-item","data-spacing":"equal","data-radix-collection-item":""},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(i)),1)]),_:1},8,["tabindex","data-state","aria-selected","aria-controls","id"])}}}),b_="3.1.21",C_={};function E_(e,t){return r.renderSlot(e.$slots,"textI",r.normalizeProps(r.guardReactiveProps(e.$attrs)),()=>[r.createElementVNode("span",r.mergeProps(e.$attrs,{"data-amplify-text":""}),[r.renderSlot(e.$slots,"default")],16)])}var Ca=Qt(C_,[["render",E_]]);const ke=r.defineComponent({props:{level:{type:Number,default:1}},inheritAttrs:!1,setup(e,{slots:t,attrs:n}){var s,l;const o=t.default?t.default():[],i=t.headingI?t.headingI():[],a=`${n.class||""} amplify-heading--${e.level}`;if(((l=(s=i[0])==null?void 0:s.children)==null?void 0:l.length)===0)i[0].children=[r.h(`h${e.level}`,{...n,class:a},[o])];else return()=>r.h(`h${e.level}`,{"data-amplify-heading":"",...n,class:a},[i[0]?r.h(i[0].children[0]):r.h(o[0])]);return()=>i}}),Wr=r.defineComponent({__name:"confirm-sign-up",emits:["confirmSignUpSubmit","lostCodeClicked"],setup(e,{emit:t}){const n=r.useAttrs(),o=re(),{codeDeliveryDetails:i,error:a,isPending:s}=r.toRefs(o),{resendCode:l,submitForm:u,updateForm:c}=o,{getDeliveryMethodText:d,getDeliveryMessageText:m,getResendCodeText:f,getConfirmText:g}=ce,y=r.computed(()=>d(i.value)),p=r.computed(()=>f()),b=r.computed(()=>g()),w=r.computed(()=>m(i.value)),h=C=>{const{name:A,value:T}=C.target;c({name:A,value:T})},v=C=>{n!=null&&n.onConfirmSignUpSubmit?t("confirmSignUpSubmit",C):S(C)},S=C=>{u(ge(C))},_=()=>{n!=null&&n.onLostCodeClicked?t("lostCodeClicked"):l()};return(C,A)=>{const T=ke,I=Ca,x=ve,k=ye,$=ie,O=pe,W=Q,X=me;return r.renderSlot(C.$slots,"confirmSignUpSlotI",r.normalizeProps(r.guardReactiveProps(C.$attrs)),()=>[r.createVNode(W,r.normalizeProps(r.guardReactiveProps(C.$attrs)),{default:r.withCtx(()=>[r.createVNode(X,{onInput:h,onSubmit:r.withModifiers(v,["prevent"])},{default:r.withCtx(()=>[r.createVNode(W,{class:"amplify-flex amplify-authenticator__column"},{default:r.withCtx(()=>[r.renderSlot(C.$slots,"header",{},()=>[r.createVNode(T,{class:"amplify-heading amplify-authenticator__heading",level:3},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(y)),1)]),_:1})]),r.createVNode(I,{class:"amplify-authenticator__subtitle"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(w)),1)]),_:1}),r.createVNode(x,{class:"amplify-flex amplify-authenticator__column",disabled:r.unref(s)},{default:r.withCtx(()=>[r.createVNode(we,{route:"confirmSignUp"})]),_:1},8,["disabled"]),r.createVNode(O,{class:"amplify-flex amplify-authenticator__column"},{default:r.withCtx(()=>[r.unref(a)?(r.openBlock(),r.createBlock(k,{key:0},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(N)(r.unref(a))),1)]),_:1})):r.createCommentVNode("",!0),r.createVNode($,{class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!1,loading:!1,variation:"primary",type:"submit",disabled:r.unref(s)},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(b)),1)]),_:1},8,["disabled"]),r.createVNode($,{class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!1,variation:"default",style:{"font-weight":"normal"},type:"button",onClick:r.withModifiers(_,["prevent"])},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(p)),1)]),_:1},8,["onClick"]),r.renderSlot(C.$slots,"footer",{onConfirmSignUpSubmit:v,onLostCodeClicked:_})]),_:3})]),_:3})]),_:3},8,["onSubmit"])]),_:3},16)])}}}),Hr=r.defineComponent({__name:"confirm-sign-in",emits:["confirmSignInSubmit","backToSignInClicked"],setup(e,{emit:t}){const n=r.useAttrs(),o=re(),{submitForm:i,toSignIn:a,updateForm:s}=o,{user:l,error:u,isPending:c}=r.toRefs(o),d=r.computed(()=>l.value.challengeName),{getBackToSignInText:m,getConfirmText:f,getChallengeText:g}=ce,y=r.computed(()=>g(d.value)),p=r.computed(()=>m()),b=r.computed(()=>f()),w=S=>{const{name:_,value:C}=S.target;s({name:_,value:C})},h=S=>{n!=null&&n.onConfirmSignInSubmit?t("confirmSignInSubmit",S):i(ge(S))},v=()=>{n!=null&&n.onBackToSignInClicked?t("backToSignInClicked"):a()};return(S,_)=>{const C=ke,A=Q,T=ye,I=ie,x=pe,k=ve,$=me;return r.renderSlot(S.$slots,"confirmSignInSlotI",r.normalizeProps(r.guardReactiveProps(S.$attrs)),()=>[r.createVNode(A,r.normalizeProps(r.guardReactiveProps(S.$attrs)),{default:r.withCtx(()=>[r.createVNode($,{"data-amplify-authenticator-confirmsignin":"",onInput:w,onSubmit:r.withModifiers(h,["prevent"])},{default:r.withCtx(()=>[r.createVNode(k,{class:"amplify-flex amplify-authenticator__column",disabled:r.unref(c)},{default:r.withCtx(()=>[r.renderSlot(S.$slots,"header",{},()=>[r.createVNode(C,{level:3,class:"amplify-heading"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(y)),1)]),_:1})]),r.createVNode(A,{class:"amplify-flex amplify-authenticator__column"},{default:r.withCtx(()=>[r.createVNode(we,{route:"confirmSignIn"})]),_:1}),r.createVNode(x,{class:"amplify-flex amplify-authenticator__column"},{default:r.withCtx(()=>[r.unref(u)?(r.openBlock(),r.createBlock(T,{key:0},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(N)(r.unref(u))),1)]),_:1})):r.createCommentVNode("",!0),r.createVNode(I,{class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!1,loading:!1,variation:"primary",style:{"font-weight":"normal"},disabled:r.unref(c)},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(b)),1)]),_:1},8,["disabled"]),r.createVNode(I,{class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!1,size:"small",variation:"link",style:{"font-weight":"normal"},type:"button",onClick:r.withModifiers(v,["prevent"])},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(p)),1)]),_:1},8,["onClick"]),r.renderSlot(S.$slots,"footer",{onBackToSignInClicked:v,onConfirmSignInSubmit:h})]),_:3})]),_:3},8,["disabled"])]),_:3},8,["onSubmit"])]),_:3},16)])}}});var Ct={},A_=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then},Ea={},le={};let Yr;const T_=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];le.getSymbolSize=function(t){if(!t)throw new Error('"version" cannot be null or undefined');if(t<1||t>40)throw new Error('"version" should be in range from 1 to 40');return t*4+17};le.getSymbolTotalCodewords=function(t){return T_[t]};le.getBCHDigit=function(e){let t=0;for(;e!==0;)t++,e>>>=1;return t};le.setToSJISFunction=function(t){if(typeof t!="function")throw new Error('"toSJISFunc" is not a valid function.');Yr=t};le.isKanjiModeEnabled=function(){return typeof Yr!="undefined"};le.toSJIS=function(t){return Yr(t)};var wn={};(function(e){e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2};function t(n){if(typeof n!="string")throw new Error("Param is not a string");switch(n.toLowerCase()){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+n)}}e.isValid=function(o){return o&&typeof o.bit!="undefined"&&o.bit>=0&&o.bit<4},e.from=function(o,i){if(e.isValid(o))return o;try{return t(o)}catch{return i}}})(wn);function Aa(){this.buffer=[],this.length=0}Aa.prototype={get:function(e){const t=Math.floor(e/8);return(this.buffer[t]>>>7-e%8&1)===1},put:function(e,t){for(let n=0;n<t;n++)this.putBit((e>>>t-n-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(e){const t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}};var I_=Aa;function Et(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}Et.prototype.set=function(e,t,n,o){const i=e*this.size+t;this.data[i]=n,o&&(this.reservedBit[i]=!0)};Et.prototype.get=function(e,t){return this.data[e*this.size+t]};Et.prototype.xor=function(e,t,n){this.data[e*this.size+t]^=n};Et.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]};var P_=Et,Ta={};(function(e){const t=le.getSymbolSize;e.getRowColCoords=function(o){if(o===1)return[];const i=Math.floor(o/7)+2,a=t(o),s=a===145?26:Math.ceil((a-13)/(2*i-2))*2,l=[a-7];for(let u=1;u<i-1;u++)l[u]=l[u-1]-s;return l.push(6),l.reverse()},e.getPositions=function(o){const i=[],a=e.getRowColCoords(o),s=a.length;for(let l=0;l<s;l++)for(let u=0;u<s;u++)l===0&&u===0||l===0&&u===s-1||l===s-1&&u===0||i.push([a[l],a[u]]);return i}})(Ta);var Ia={};const k_=le.getSymbolSize,si=7;Ia.getPositions=function(t){const n=k_(t);return[[0,0],[n-si,0],[0,n-si]]};var Pa={};(function(e){e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const t={N1:3,N2:3,N3:40,N4:10};e.isValid=function(i){return i!=null&&i!==""&&!isNaN(i)&&i>=0&&i<=7},e.from=function(i){return e.isValid(i)?parseInt(i,10):void 0},e.getPenaltyN1=function(i){const a=i.size;let s=0,l=0,u=0,c=null,d=null;for(let m=0;m<a;m++){l=u=0,c=d=null;for(let f=0;f<a;f++){let g=i.get(m,f);g===c?l++:(l>=5&&(s+=t.N1+(l-5)),c=g,l=1),g=i.get(f,m),g===d?u++:(u>=5&&(s+=t.N1+(u-5)),d=g,u=1)}l>=5&&(s+=t.N1+(l-5)),u>=5&&(s+=t.N1+(u-5))}return s},e.getPenaltyN2=function(i){const a=i.size;let s=0;for(let l=0;l<a-1;l++)for(let u=0;u<a-1;u++){const c=i.get(l,u)+i.get(l,u+1)+i.get(l+1,u)+i.get(l+1,u+1);(c===4||c===0)&&s++}return s*t.N2},e.getPenaltyN3=function(i){const a=i.size;let s=0,l=0,u=0;for(let c=0;c<a;c++){l=u=0;for(let d=0;d<a;d++)l=l<<1&2047|i.get(c,d),d>=10&&(l===1488||l===93)&&s++,u=u<<1&2047|i.get(d,c),d>=10&&(u===1488||u===93)&&s++}return s*t.N3},e.getPenaltyN4=function(i){let a=0;const s=i.data.length;for(let u=0;u<s;u++)a+=i.data[u];return Math.abs(Math.ceil(a*100/s/5)-10)*t.N4};function n(o,i,a){switch(o){case e.Patterns.PATTERN000:return(i+a)%2===0;case e.Patterns.PATTERN001:return i%2===0;case e.Patterns.PATTERN010:return a%3===0;case e.Patterns.PATTERN011:return(i+a)%3===0;case e.Patterns.PATTERN100:return(Math.floor(i/2)+Math.floor(a/3))%2===0;case e.Patterns.PATTERN101:return i*a%2+i*a%3===0;case e.Patterns.PATTERN110:return(i*a%2+i*a%3)%2===0;case e.Patterns.PATTERN111:return(i*a%3+(i+a)%2)%2===0;default:throw new Error("bad maskPattern:"+o)}}e.applyMask=function(i,a){const s=a.size;for(let l=0;l<s;l++)for(let u=0;u<s;u++)a.isReserved(u,l)||a.xor(u,l,n(i,u,l))},e.getBestMask=function(i,a){const s=Object.keys(e.Patterns).length;let l=0,u=1/0;for(let c=0;c<s;c++){a(c),e.applyMask(c,i);const d=e.getPenaltyN1(i)+e.getPenaltyN2(i)+e.getPenaltyN3(i)+e.getPenaltyN4(i);e.applyMask(c,i),d<u&&(u=d,l=c)}return l}})(Pa);var Sn={};const Ie=wn,Ut=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],Bt=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];Sn.getBlocksCount=function(t,n){switch(n){case Ie.L:return Ut[(t-1)*4+0];case Ie.M:return Ut[(t-1)*4+1];case Ie.Q:return Ut[(t-1)*4+2];case Ie.H:return Ut[(t-1)*4+3];default:return}};Sn.getTotalCodewordsCount=function(t,n){switch(n){case Ie.L:return Bt[(t-1)*4+0];case Ie.M:return Bt[(t-1)*4+1];case Ie.Q:return Bt[(t-1)*4+2];case Ie.H:return Bt[(t-1)*4+3];default:return}};var ka={},_n={};const pt=new Uint8Array(512),Jt=new Uint8Array(256);(function(){let t=1;for(let n=0;n<255;n++)pt[n]=t,Jt[t]=n,t<<=1,t&256&&(t^=285);for(let n=255;n<512;n++)pt[n]=pt[n-255]})();_n.log=function(t){if(t<1)throw new Error("log("+t+")");return Jt[t]};_n.exp=function(t){return pt[t]};_n.mul=function(t,n){return t===0||n===0?0:pt[Jt[t]+Jt[n]]};(function(e){const t=_n;e.mul=function(o,i){const a=new Uint8Array(o.length+i.length-1);for(let s=0;s<o.length;s++)for(let l=0;l<i.length;l++)a[s+l]^=t.mul(o[s],i[l]);return a},e.mod=function(o,i){let a=new Uint8Array(o);for(;a.length-i.length>=0;){const s=a[0];for(let u=0;u<i.length;u++)a[u]^=t.mul(i[u],s);let l=0;for(;l<a.length&&a[l]===0;)l++;a=a.slice(l)}return a},e.generateECPolynomial=function(o){let i=new Uint8Array([1]);for(let a=0;a<o;a++)i=e.mul(i,new Uint8Array([1,t.exp(a)]));return i}})(ka);const Na=ka;function Kr(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}Kr.prototype.initialize=function(t){this.degree=t,this.genPoly=Na.generateECPolynomial(this.degree)};Kr.prototype.encode=function(t){if(!this.genPoly)throw new Error("Encoder not initialized");const n=new Uint8Array(t.length+this.degree);n.set(t);const o=Na.mod(n,this.genPoly),i=this.degree-o.length;if(i>0){const a=new Uint8Array(this.degree);return a.set(o,i),a}return o};var N_=Kr,xa={},Ne={},qr={};qr.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40};var Se={};const $a="[0-9]+",x_="[A-Z $%*+\\-./:]+";let vt="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";vt=vt.replace(/u/g,"\\u");const $_="(?:(?![A-Z0-9 $%*+\\-./:]|"+vt+`)(?:.|[\r
32
+ `).concat(l.message))}else return n.getStateNodeByPath(a)})},e.prototype.formatTransition=function(t){var n=this,o=$l(t.target),i="internal"in t?t.internal:o?o.some(function(u){return V(u)&&u[0]===n.delimiter}):!0,a=this.machine.options.guards,s=this.resolveTarget(o),l=E(E({},t),{actions:_e(de(t.actions)),cond:Ci(t.cond,a),target:s,source:this,internal:i,eventType:t.event,toJSON:function(){return E(E({},l),{target:l.target?l.target.map(function(u){return"#".concat(u.id)}):void 0,source:"#".concat(n.id)})}});return l},e.prototype.formatTransitions=function(){var t,n,o=this,i;if(!this.config.on)i=[];else if(Array.isArray(this.config.on))i=this.config.on;else{var a=this.config.on,s=Pn,l=a[s],u=l===void 0?[]:l,c=ar(a,[typeof s=="symbol"?s:s+""]);i=H(Object.keys(c).map(function(h){var v=Fe(h,c[h]);return v}).concat(Fe(Pn,u)))}var d=this.config.always?Fe("",this.config.always):[],m=this.config.onDone?Fe(String(lt(this.id)),this.config.onDone):[],f=H(this.invoke.map(function(h){var v=[];return h.onDone&&v.push.apply(v,j([],F(Fe(String(ft(h.id)),h.onDone)),!1)),h.onError&&v.push.apply(v,j([],F(Fe(String(Le(h.id)),h.onError)),!1)),v})),g=this.after,y=H(j(j(j(j([],F(m),!1),F(f),!1),F(i),!1),F(d),!1).map(function(h){return de(h).map(function(v){return o.formatTransition(v)})}));try{for(var p=U(g),b=p.next();!b.done;b=p.next()){var w=b.value;y.push(w)}}catch(h){t={error:h}}finally{try{b&&!b.done&&(n=p.return)&&n.call(p)}finally{if(t)throw t.error}}return y},e}(),vo=!1;function St(e,t){return!mt&&!("predictableActionArguments"in e)&&!vo&&(vo=!0,console.warn("It is highly recommended to set `predictableActionArguments` to `true` when using `createMachine`. https://xstate.js.org/docs/guides/actions.html")),new lu(e,t)}var ue=Ui,pr=ki,uu=Fi;const{assign:L,stop:cu}=Mi,$t=e=>cu(e),du=L({attributeToVerify:e=>{}}),fu=L({challengeName:e=>{}}),pu=L({requiredAttributes:e=>{}}),mr=L({remoteError:e=>""}),gr=L({formValues:e=>({})}),hr=L({touched:e=>({})}),mu=L({unverifiedContactMethods:e=>{}}),gu=L({username:e=>{}}),yr=L({validationError:e=>({})}),hu=L({totpSecretCode:(e,t)=>t.data}),yu=L({challengeName:(e,t)=>{var n;return(n=t.data)===null||n===void 0?void 0:n.challengeName}}),vu=L({requiredAttributes:(e,t)=>{var n,o;return(o=(n=t.data)===null||n===void 0?void 0:n.challengeParam)===null||o===void 0?void 0:o.requiredAttributes}}),wu=L({redirectIntent:e=>"confirmPasswordReset"}),Su=L({redirectIntent:e=>"confirmSignUp"}),Wi=L({authAttributes:(e,t)=>{var n,o;const[i]=e.loginMechanisms;return{username:(n=e.formValues[i])!==null&&n!==void 0?n:e.formValues.username,password:(o=e.formValues)===null||o===void 0?void 0:o.password}}}),vr=L({validationError:(e,t)=>t.data}),wr=L({remoteError:(e,t)=>{var n;return t.data.name==="NoUserPoolError"?"Configuration error (see console) \u2013 please contact the administrator":((n=t.data)===null||n===void 0?void 0:n.message)||t.data}}),_u=L({unverifiedContactMethods:(e,t)=>t.data.unverified}),Hi=L({user:(e,t)=>t.data.user||t.data}),bu=L({username:(e,t)=>{let{formValues:{username:n,country_code:o}}=e;return o&&(n=`${o}${n}`),n}}),Cu=L({codeDeliveryDetails:(e,t)=>t.data.codeDeliveryDetails}),Eu=L({authAttributes:(e,t)=>({username:e.formValues.username})}),Sr=L({formValues:(e,t)=>{const{name:n,value:o}=t.data;return Object.assign(Object.assign({},e.formValues),{[n]:o})}}),_r=L({formValues:(e,t)=>{const n=Object.assign(Object.assign({},e.formValues),t.data);return sl(n,"password")}}),br=L({touched:(e,t)=>{const{name:n}=t.data;return Object.assign(Object.assign({},e.touched),{[`${n}`]:!0})}}),Au=e=>B(void 0,void 0,void 0,function*(){const{username:t}=e;return yield G.Auth.forgotPassword(t)}),Yi=L({formValues:(e,t)=>{var n;const[o="username"]=e.loginMechanisms;if(!e.formValues.phone_number&&o!=="phone_number")return e.formValues;const{formValues:i,country_code:a}=e,s=i.phone_number?"phone_number":"username",l=`${(n=i.country_code)!==null&&n!==void 0?n:a}${i[s]}`.replace(/[^A-Z0-9+]/gi,""),u=Object.assign(Object.assign({},i),{[s]:l});return delete u.country_code,u}});var Tu=Array.isArray,be=Tu,Iu=typeof At=="object"&&At&&At.Object===Object&&At,Ki=Iu,Pu=Ki,ku=typeof self=="object"&&self&&self.Object===Object&&self,Nu=Pu||ku||Function("return this")(),he=Nu,xu=he,$u=xu.Symbol,ln=$u,wo=ln,qi=Object.prototype,Ou=qi.hasOwnProperty,Ru=qi.toString,at=wo?wo.toStringTag:void 0;function Uu(e){var t=Ou.call(e,at),n=e[at];try{e[at]=void 0;var o=!0}catch{}var i=Ru.call(e);return o&&(t?e[at]=n:delete e[at]),i}var Bu=Uu,Fu=Object.prototype,Mu=Fu.toString;function Vu(e){return Mu.call(e)}var Du=Vu,So=ln,Lu=Bu,ju=Du,zu="[object Null]",Gu="[object Undefined]",_o=So?So.toStringTag:void 0;function Wu(e){return e==null?e===void 0?Gu:zu:_o&&_o in Object(e)?Lu(e):ju(e)}var Xe=Wu;function Hu(e){return e!=null&&typeof e=="object"}var Re=Hu,Yu=Xe,Ku=Re,qu="[object Symbol]";function Ju(e){return typeof e=="symbol"||Ku(e)&&Yu(e)==qu}var Cr=Ju,Zu=be,Qu=Cr,Xu=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ec=/^\w*$/;function tc(e,t){if(Zu(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||Qu(e)?!0:ec.test(e)||!Xu.test(e)||t!=null&&e in Object(t)}var Er=tc;function nc(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Ce=nc,rc=Xe,oc=Ce,ic="[object AsyncFunction]",ac="[object Function]",sc="[object GeneratorFunction]",lc="[object Proxy]";function uc(e){if(!oc(e))return!1;var t=rc(e);return t==ac||t==sc||t==ic||t==lc}var Ar=uc,cc=he,dc=cc["__core-js_shared__"],fc=dc,kn=fc,bo=function(){var e=/[^.]+$/.exec(kn&&kn.keys&&kn.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function pc(e){return!!bo&&bo in e}var mc=pc,gc=Function.prototype,hc=gc.toString;function yc(e){if(e!=null){try{return hc.call(e)}catch{}try{return e+""}catch{}}return""}var Ji=yc,vc=Ar,wc=mc,Sc=Ce,_c=Ji,bc=/[\\^$.*+?()[\]{}|]/g,Cc=/^\[object .+?Constructor\]$/,Ec=Function.prototype,Ac=Object.prototype,Tc=Ec.toString,Ic=Ac.hasOwnProperty,Pc=RegExp("^"+Tc.call(Ic).replace(bc,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function kc(e){if(!Sc(e)||wc(e))return!1;var t=vc(e)?Pc:Cc;return t.test(_c(e))}var Nc=kc;function xc(e,t){return e==null?void 0:e[t]}var $c=xc,Oc=Nc,Rc=$c;function Uc(e,t){var n=Rc(e,t);return Oc(n)?n:void 0}var Ue=Uc,Bc=Ue,Fc=Bc(Object,"create"),un=Fc,Co=un;function Mc(){this.__data__=Co?Co(null):{},this.size=0}var Vc=Mc;function Dc(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Lc=Dc,jc=un,zc="__lodash_hash_undefined__",Gc=Object.prototype,Wc=Gc.hasOwnProperty;function Hc(e){var t=this.__data__;if(jc){var n=t[e];return n===zc?void 0:n}return Wc.call(t,e)?t[e]:void 0}var Yc=Hc,Kc=un,qc=Object.prototype,Jc=qc.hasOwnProperty;function Zc(e){var t=this.__data__;return Kc?t[e]!==void 0:Jc.call(t,e)}var Qc=Zc,Xc=un,ed="__lodash_hash_undefined__";function td(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Xc&&t===void 0?ed:t,this}var nd=td,rd=Vc,od=Lc,id=Yc,ad=Qc,sd=nd;function et(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}et.prototype.clear=rd;et.prototype.delete=od;et.prototype.get=id;et.prototype.has=ad;et.prototype.set=sd;var ld=et;function ud(){this.__data__=[],this.size=0}var cd=ud;function dd(e,t){return e===t||e!==e&&t!==t}var _t=dd,fd=_t;function pd(e,t){for(var n=e.length;n--;)if(fd(e[n][0],t))return n;return-1}var cn=pd,md=cn,gd=Array.prototype,hd=gd.splice;function yd(e){var t=this.__data__,n=md(t,e);if(n<0)return!1;var o=t.length-1;return n==o?t.pop():hd.call(t,n,1),--this.size,!0}var vd=yd,wd=cn;function Sd(e){var t=this.__data__,n=wd(t,e);return n<0?void 0:t[n][1]}var _d=Sd,bd=cn;function Cd(e){return bd(this.__data__,e)>-1}var Ed=Cd,Ad=cn;function Td(e,t){var n=this.__data__,o=Ad(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}var Id=Td,Pd=cd,kd=vd,Nd=_d,xd=Ed,$d=Id;function tt(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}tt.prototype.clear=Pd;tt.prototype.delete=kd;tt.prototype.get=Nd;tt.prototype.has=xd;tt.prototype.set=$d;var dn=tt,Od=Ue,Rd=he,Ud=Od(Rd,"Map"),Tr=Ud,Eo=ld,Bd=dn,Fd=Tr;function Md(){this.size=0,this.__data__={hash:new Eo,map:new(Fd||Bd),string:new Eo}}var Vd=Md;function Dd(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var Ld=Dd,jd=Ld;function zd(e,t){var n=e.__data__;return jd(t)?n[typeof t=="string"?"string":"hash"]:n.map}var fn=zd,Gd=fn;function Wd(e){var t=Gd(this,e).delete(e);return this.size-=t?1:0,t}var Hd=Wd,Yd=fn;function Kd(e){return Yd(this,e).get(e)}var qd=Kd,Jd=fn;function Zd(e){return Jd(this,e).has(e)}var Qd=Zd,Xd=fn;function ef(e,t){var n=Xd(this,e),o=n.size;return n.set(e,t),this.size+=n.size==o?0:1,this}var tf=ef,nf=Vd,rf=Hd,of=qd,af=Qd,sf=tf;function nt(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}nt.prototype.clear=nf;nt.prototype.delete=rf;nt.prototype.get=of;nt.prototype.has=af;nt.prototype.set=sf;var Ir=nt,Zi=Ir,lf="Expected a function";function Pr(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(lf);var n=function(){var o=arguments,i=t?t.apply(this,o):o[0],a=n.cache;if(a.has(i))return a.get(i);var s=e.apply(this,o);return n.cache=a.set(i,s)||a,s};return n.cache=new(Pr.Cache||Zi),n}Pr.Cache=Zi;var uf=Pr,cf=uf,df=500;function ff(e){var t=cf(e,function(o){return n.size===df&&n.clear(),o}),n=t.cache;return t}var pf=ff,mf=pf,gf=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,hf=/\\(\\)?/g,yf=mf(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(gf,function(n,o,i,a){t.push(i?a.replace(hf,"$1"):o||n)}),t}),vf=yf;function wf(e,t){for(var n=-1,o=e==null?0:e.length,i=Array(o);++n<o;)i[n]=t(e[n],n,e);return i}var Qi=wf,Ao=ln,Sf=Qi,_f=be,bf=Cr,Cf=1/0,To=Ao?Ao.prototype:void 0,Io=To?To.toString:void 0;function Xi(e){if(typeof e=="string")return e;if(_f(e))return Sf(e,Xi)+"";if(bf(e))return Io?Io.call(e):"";var t=e+"";return t=="0"&&1/e==-Cf?"-0":t}var Ef=Xi,Af=Ef;function Tf(e){return e==null?"":Af(e)}var If=Tf,Pf=be,kf=Er,Nf=vf,xf=If;function $f(e,t){return Pf(e)?e:kf(e,t)?[e]:Nf(xf(e))}var pn=$f,Of=Cr,Rf=1/0;function Uf(e){if(typeof e=="string"||Of(e))return e;var t=e+"";return t=="0"&&1/e==-Rf?"-0":t}var bt=Uf,Bf=pn,Ff=bt;function Mf(e,t){t=Bf(t,e);for(var n=0,o=t.length;e!=null&&n<o;)e=e[Ff(t[n++])];return n&&n==o?e:void 0}var kr=Mf,Vf=kr;function Df(e,t,n){var o=e==null?void 0:Vf(e,t);return o===void 0?n:o}var $e=Df,Lf=dn;function jf(){this.__data__=new Lf,this.size=0}var zf=jf;function Gf(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}var Wf=Gf;function Hf(e){return this.__data__.get(e)}var Yf=Hf;function Kf(e){return this.__data__.has(e)}var qf=Kf,Jf=dn,Zf=Tr,Qf=Ir,Xf=200;function ep(e,t){var n=this.__data__;if(n instanceof Jf){var o=n.__data__;if(!Zf||o.length<Xf-1)return o.push([e,t]),this.size=++n.size,this;n=this.__data__=new Qf(o)}return n.set(e,t),this.size=n.size,this}var tp=ep,np=dn,rp=zf,op=Wf,ip=Yf,ap=qf,sp=tp;function rt(e){var t=this.__data__=new np(e);this.size=t.size}rt.prototype.clear=rp;rt.prototype.delete=op;rt.prototype.get=ip;rt.prototype.has=ap;rt.prototype.set=sp;var Nr=rt,lp=Ue,up=function(){try{var e=lp(Object,"defineProperty");return e({},"",{}),e}catch{}}(),ea=up,Po=ea;function cp(e,t,n){t=="__proto__"&&Po?Po(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var xr=cp,dp=xr,fp=_t;function pp(e,t,n){(n!==void 0&&!fp(e[t],n)||n===void 0&&!(t in e))&&dp(e,t,n)}var ta=pp;function mp(e){return function(t,n,o){for(var i=-1,a=Object(t),s=o(t),l=s.length;l--;){var u=s[e?l:++i];if(n(a[u],u,a)===!1)break}return t}}var gp=mp,hp=gp,yp=hp(),vp=yp,qn={exports:{}};(function(e,t){var n=he,o=t&&!t.nodeType&&t,i=o&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===o,s=a?n.Buffer:void 0,l=s?s.allocUnsafe:void 0;function u(c,d){if(d)return c.slice();var m=c.length,f=l?l(m):new c.constructor(m);return c.copy(f),f}e.exports=u})(qn,qn.exports);var wp=he,Sp=wp.Uint8Array,na=Sp,ko=na;function _p(e){var t=new e.constructor(e.byteLength);return new ko(t).set(new ko(e)),t}var bp=_p,Cp=bp;function Ep(e,t){var n=t?Cp(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var Ap=Ep;function Tp(e,t){var n=-1,o=e.length;for(t||(t=Array(o));++n<o;)t[n]=e[n];return t}var Ip=Tp,Pp=Ce,No=Object.create,kp=function(){function e(){}return function(t){if(!Pp(t))return{};if(No)return No(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}(),Np=kp;function xp(e,t){return function(n){return e(t(n))}}var ra=xp,$p=ra,Op=$p(Object.getPrototypeOf,Object),$r=Op,Rp=Object.prototype;function Up(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||Rp;return e===n}var Or=Up,Bp=Np,Fp=$r,Mp=Or;function Vp(e){return typeof e.constructor=="function"&&!Mp(e)?Bp(Fp(e)):{}}var Dp=Vp,Lp=Xe,jp=Re,zp="[object Arguments]";function Gp(e){return jp(e)&&Lp(e)==zp}var Wp=Gp,xo=Wp,Hp=Re,oa=Object.prototype,Yp=oa.hasOwnProperty,Kp=oa.propertyIsEnumerable,qp=xo(function(){return arguments}())?xo:function(e){return Hp(e)&&Yp.call(e,"callee")&&!Kp.call(e,"callee")},Rr=qp,Jp=9007199254740991;function Zp(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Jp}var Ur=Zp,Qp=Ar,Xp=Ur;function em(e){return e!=null&&Xp(e.length)&&!Qp(e)}var mn=em,tm=mn,nm=Re;function rm(e){return nm(e)&&tm(e)}var om=rm,yt={exports:{}};function im(){return!1}var am=im;(function(e,t){var n=he,o=am,i=t&&!t.nodeType&&t,a=i&&!0&&e&&!e.nodeType&&e,s=a&&a.exports===i,l=s?n.Buffer:void 0,u=l?l.isBuffer:void 0,c=u||o;e.exports=c})(yt,yt.exports);var sm=Xe,lm=$r,um=Re,cm="[object Object]",dm=Function.prototype,fm=Object.prototype,ia=dm.toString,pm=fm.hasOwnProperty,mm=ia.call(Object);function gm(e){if(!um(e)||sm(e)!=cm)return!1;var t=lm(e);if(t===null)return!0;var n=pm.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&ia.call(n)==mm}var hm=gm,ym=Xe,vm=Ur,wm=Re,Sm="[object Arguments]",_m="[object Array]",bm="[object Boolean]",Cm="[object Date]",Em="[object Error]",Am="[object Function]",Tm="[object Map]",Im="[object Number]",Pm="[object Object]",km="[object RegExp]",Nm="[object Set]",xm="[object String]",$m="[object WeakMap]",Om="[object ArrayBuffer]",Rm="[object DataView]",Um="[object Float32Array]",Bm="[object Float64Array]",Fm="[object Int8Array]",Mm="[object Int16Array]",Vm="[object Int32Array]",Dm="[object Uint8Array]",Lm="[object Uint8ClampedArray]",jm="[object Uint16Array]",zm="[object Uint32Array]",z={};z[Um]=z[Bm]=z[Fm]=z[Mm]=z[Vm]=z[Dm]=z[Lm]=z[jm]=z[zm]=!0;z[Sm]=z[_m]=z[Om]=z[bm]=z[Rm]=z[Cm]=z[Em]=z[Am]=z[Tm]=z[Im]=z[Pm]=z[km]=z[Nm]=z[xm]=z[$m]=!1;function Gm(e){return wm(e)&&vm(e.length)&&!!z[ym(e)]}var Wm=Gm;function Hm(e){return function(t){return e(t)}}var Ym=Hm,Jn={exports:{}};(function(e,t){var n=Ki,o=t&&!t.nodeType&&t,i=o&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===o,s=a&&n.process,l=function(){try{var u=i&&i.require&&i.require("util").types;return u||s&&s.binding&&s.binding("util")}catch{}}();e.exports=l})(Jn,Jn.exports);var Km=Wm,qm=Ym,$o=Jn.exports,Oo=$o&&$o.isTypedArray,Jm=Oo?qm(Oo):Km,Br=Jm;function Zm(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var aa=Zm,Qm=xr,Xm=_t,eg=Object.prototype,tg=eg.hasOwnProperty;function ng(e,t,n){var o=e[t];(!(tg.call(e,t)&&Xm(o,n))||n===void 0&&!(t in e))&&Qm(e,t,n)}var sa=ng,rg=sa,og=xr;function ig(e,t,n,o){var i=!n;n||(n={});for(var a=-1,s=t.length;++a<s;){var l=t[a],u=o?o(n[l],e[l],l,n,e):void 0;u===void 0&&(u=e[l]),i?og(n,l,u):rg(n,l,u)}return n}var ag=ig;function sg(e,t){for(var n=-1,o=Array(e);++n<e;)o[n]=t(n);return o}var lg=sg,ug=9007199254740991,cg=/^(?:0|[1-9]\d*)$/;function dg(e,t){var n=typeof e;return t=t==null?ug:t,!!t&&(n=="number"||n!="symbol"&&cg.test(e))&&e>-1&&e%1==0&&e<t}var gn=dg,fg=lg,pg=Rr,mg=be,gg=yt.exports,hg=gn,yg=Br,vg=Object.prototype,wg=vg.hasOwnProperty;function Sg(e,t){var n=mg(e),o=!n&&pg(e),i=!n&&!o&&gg(e),a=!n&&!o&&!i&&yg(e),s=n||o||i||a,l=s?fg(e.length,String):[],u=l.length;for(var c in e)(t||wg.call(e,c))&&!(s&&(c=="length"||i&&(c=="offset"||c=="parent")||a&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||hg(c,u)))&&l.push(c);return l}var la=Sg;function _g(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var bg=_g,Cg=Ce,Eg=Or,Ag=bg,Tg=Object.prototype,Ig=Tg.hasOwnProperty;function Pg(e){if(!Cg(e))return Ag(e);var t=Eg(e),n=[];for(var o in e)o=="constructor"&&(t||!Ig.call(e,o))||n.push(o);return n}var kg=Pg,Ng=la,xg=kg,$g=mn;function Og(e){return $g(e)?Ng(e,!0):xg(e)}var Fr=Og,Rg=ag,Ug=Fr;function Bg(e){return Rg(e,Ug(e))}var Fg=Bg,Ro=ta,Mg=qn.exports,Vg=Ap,Dg=Ip,Lg=Dp,Uo=Rr,Bo=be,jg=om,zg=yt.exports,Gg=Ar,Wg=Ce,Hg=hm,Yg=Br,Fo=aa,Kg=Fg;function qg(e,t,n,o,i,a,s){var l=Fo(e,n),u=Fo(t,n),c=s.get(u);if(c){Ro(e,n,c);return}var d=a?a(l,u,n+"",e,t,s):void 0,m=d===void 0;if(m){var f=Bo(u),g=!f&&zg(u),y=!f&&!g&&Yg(u);d=u,f||g||y?Bo(l)?d=l:jg(l)?d=Dg(l):g?(m=!1,d=Mg(u,!0)):y?(m=!1,d=Vg(u,!0)):d=[]:Hg(u)||Uo(u)?(d=l,Uo(l)?d=Kg(l):(!Wg(l)||Gg(l))&&(d=Lg(u))):m=!1}m&&(s.set(u,d),i(d,u,o,a,s),s.delete(u)),Ro(e,n,d)}var Jg=qg,Zg=Nr,Qg=ta,Xg=vp,eh=Jg,th=Ce,nh=Fr,rh=aa;function ua(e,t,n,o,i){e!==t&&Xg(t,function(a,s){if(i||(i=new Zg),th(a))eh(e,t,s,n,ua,o,i);else{var l=o?o(rh(e,s),a,s+"",e,t,i):void 0;l===void 0&&(l=a),Qg(e,s,l)}},nh)}var oh=ua;function ih(e){return e}var Mr=ih;function ah(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var sh=ah,lh=sh,Mo=Math.max;function uh(e,t,n){return t=Mo(t===void 0?e.length-1:t,0),function(){for(var o=arguments,i=-1,a=Mo(o.length-t,0),s=Array(a);++i<a;)s[i]=o[t+i];i=-1;for(var l=Array(t+1);++i<t;)l[i]=o[i];return l[t]=n(s),lh(e,this,l)}}var ch=uh;function dh(e){return function(){return e}}var fh=dh,ph=fh,Vo=ea,mh=Mr,gh=Vo?function(e,t){return Vo(e,"toString",{configurable:!0,enumerable:!1,value:ph(t),writable:!0})}:mh,hh=gh,yh=800,vh=16,wh=Date.now;function Sh(e){var t=0,n=0;return function(){var o=wh(),i=vh-(o-n);if(n=o,i>0){if(++t>=yh)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var _h=Sh,bh=hh,Ch=_h,Eh=Ch(bh),Ah=Eh,Th=Mr,Ih=ch,Ph=Ah;function kh(e,t){return Ph(Ih(e,t,Th),e+"")}var Nh=kh,xh=_t,$h=mn,Oh=gn,Rh=Ce;function Uh(e,t,n){if(!Rh(n))return!1;var o=typeof t;return(o=="number"?$h(n)&&Oh(t,n.length):o=="string"&&t in n)?xh(n[t],e):!1}var Bh=Uh,Fh=Nh,Mh=Bh;function Vh(e){return Fh(function(t,n){var o=-1,i=n.length,a=i>1?n[i-1]:void 0,s=i>2?n[2]:void 0;for(a=e.length>3&&typeof a=="function"?(i--,a):void 0,s&&Mh(n[0],n[1],s)&&(a=i<3?void 0:a,i=1),t=Object(t);++o<i;){var l=n[o];l&&e(t,l,o,a)}return t})}var Dh=Vh,Lh=oh,jh=Dh,zh=jh(function(e,t,n){Lh(e,t,n)}),Gh=zh;const Vr=(e,t,n,o)=>B(void 0,void 0,void 0,function*(){const i=yield Promise.all(o.map(s=>s(e,t,n))),a=Gh({},...i);return Dn(a)?Promise.resolve():Promise.reject(a)}),We={getAmplifyConfig(){return B(this,void 0,void 0,function*(){return G.Amplify.configure()})},getCurrentUser(){return B(this,void 0,void 0,function*(){return G.Auth.currentAuthenticatedUser()})},handleSignUp(e){return B(this,void 0,void 0,function*(){return G.Auth.signUp(Object.assign(Object.assign({},e),{autoSignIn:{enabled:!0}}))})},handleSignIn({username:e,password:t}){return B(this,void 0,void 0,function*(){return G.Auth.signIn(e,t)})},handleConfirmSignIn({user:e,code:t,mfaType:n}){return B(this,void 0,void 0,function*(){return G.Auth.confirmSignIn(e,t,n)})},handleConfirmSignUp({username:e,code:t}){return B(this,void 0,void 0,function*(){return yield G.Auth.confirmSignUp(e,t)})},handleForgotPasswordSubmit({username:e,code:t,password:n}){return B(this,void 0,void 0,function*(){return G.Auth.forgotPasswordSubmit(e,t,n)})},handleForgotPassword(e){return B(this,void 0,void 0,function*(){return G.Auth.forgotPassword(e)})},validateCustomSignUp(e,t){return B(this,void 0,void 0,function*(){})},validateFormPassword(e,t,n){return B(this,void 0,void 0,function*(){const{password:o}=e,{password:i}=t;if(!i||!n)return null;const a=[],s=+(n==null?void 0:n.passwordPolicyMinLength);o.length<s&&a.push(`Password must have at least ${s} characters`);const l=n==null?void 0:n.passwordPolicyCharacters;return l==null||l.forEach(u=>{switch(u){case"REQUIRES_LOWERCASE":/[a-z]/.test(o)||a.push("Password must have lower case letters");break;case"REQUIRES_UPPERCASE":/[A-Z]/.test(o)||a.push("Password must have upper case letters");break;case"REQUIRES_NUMBERS":/[0-9]/.test(o)||a.push("Password must have numbers");break;case"REQUIRES_SYMBOLS":il(o)||a.push("Password must have special characters")}}),a.length!==0?{password:a}:null})},validateConfirmPassword(e,t){return B(this,void 0,void 0,function*(){const{password:n,confirm_password:o}=e,{confirm_password:i,password:a}=t;return n||o?(n||o)&&n!==o&&(i&&a||(n==null?void 0:n.length)>=6&&(o==null?void 0:o.length)>=6)?{confirm_password:"Your passwords must match"}:void 0:null})},validatePreferredUsername(e,t){return B(this,void 0,void 0,function*(){})}},Wh=["SMS_MFA","SOFTWARE_TOKEN_MFA"],Nn=e=>$e(e,"data.challengeName"),Do=(e,t)=>e===t,Lo=e=>Wh.includes(e);function Hh({services:e}){return St({initial:"init",id:"signInActor",predictableActionArguments:!0,states:{init:{always:[{target:"autoSignIn.submit",cond:"shouldAutoSubmit"},{target:"autoSignIn",cond:"shouldAutoSignIn"},{target:"signIn"}]},signIn:{initial:"edit",exit:["clearFormValues","clearTouched"],states:{edit:{entry:"sendUpdate",on:{SUBMIT:{actions:"handleSubmit",target:"submit"},CHANGE:{actions:"handleInput"},FEDERATED_SIGN_IN:"federatedSignIn"}},federatedSignIn:{tags:["pending"],entry:["sendUpdate","clearError"],invoke:{src:"federatedSignIn",onError:{actions:"setRemoteError"}}},submit:{tags:["pending"],entry:["parsePhoneNumber","clearError","sendUpdate"],invoke:{src:"signIn",onDone:[{cond:"shouldSetupTOTP",actions:["setUser","setChallengeName"],target:"#signInActor.setupTOTP"},{cond:"shouldConfirmSignIn",actions:["setUser","setChallengeName"],target:"#signInActor.confirmSignIn"},{cond:"shouldForceChangePassword",actions:["setUser","setChallengeName","setRequiredAttributes"],target:"#signInActor.forceNewPassword"},{actions:"setUser",target:"verifying"}],onError:[{cond:"shouldRedirectToConfirmSignUp",actions:["setCredentials","setConfirmSignUpIntent"],target:"rejected"},{cond:"shouldRedirectToConfirmResetPassword",actions:["setUsernameAuthAttributes","setConfirmResetPasswordIntent"],target:"rejected"},{actions:"setRemoteError",target:"edit"}]}},verifying:{tags:["pending"],entry:["clearError","sendUpdate"],invoke:{src:"checkVerifiedContact",onDone:[{cond:"shouldRequestVerification",target:"#signInActor.verifyUser",actions:"setUnverifiedContactMethods"},{target:"resolved"}],onError:{actions:"setRemoteError",target:"edit"}}},resolved:{always:"#signInActor.resolved"},rejected:{always:"#signInActor.rejected"}}},autoSignIn:{initial:"pending",states:{pending:{tags:["pending"],entry:["clearError","sendUpdate"],on:{AUTO_SIGN_IN:[{cond:"shouldSetupTOTP",actions:["setUser","setChallengeName"],target:"#signInActor.setupTOTP"},{cond:"shouldConfirmSignIn",actions:["setUser","setChallengeName"],target:"#signInActor.confirmSignIn"},{cond:"shouldForceChangePassword",actions:["setUser","setChallengeName","setRequiredAttributes"],target:"#signInActor.forceNewPassword"},{actions:"setUser",target:"#signInActor.resolved"}],AUTO_SIGN_IN_FAILURE:{actions:"setRemoteError",target:"pending"}}},submit:{tags:["pending"],entry:["clearError","sendUpdate"],invoke:{src:"signIn",onDone:[{cond:"shouldSetupTOTP",actions:["setUser","setChallengeName"],target:"#signInActor.setupTOTP"},{cond:"shouldConfirmSignIn",actions:["setUser","setChallengeName"],target:"#signInActor.confirmSignIn"},{cond:"shouldForceChangePassword",actions:["setUser","setChallengeName","setRequiredAttributes"],target:"#signInActor.forceNewPassword"},{actions:"setUser",target:"#signInActor.resolved"}],onError:{actions:"setRemoteError",target:"#signInActor.signIn"}}},resolved:{always:"#signInActor.resolved"},rejected:{always:"#signInActor.rejected"}}},confirmSignIn:{initial:"edit",exit:["clearFormValues","clearError","clearTouched"],states:{edit:{entry:"sendUpdate",on:{SUBMIT:{actions:"handleSubmit",target:"submit"},SIGN_IN:"#signInActor.signIn",CHANGE:{actions:"handleInput"}}},submit:{tags:["pending"],entry:["clearError","sendUpdate"],invoke:{src:"confirmSignIn",onDone:{target:"#signInActor.resolved",actions:["setUser","clearChallengeName","clearRequiredAttributes"]},onError:{target:"edit",actions:"setRemoteError"}}}}},forceNewPassword:{type:"parallel",exit:["clearFormValues","clearError","clearTouched"],states:{validation:{initial:"pending",states:{pending:{invoke:{src:"validateFields",onDone:{target:"valid",actions:"clearValidationError"},onError:{target:"invalid",actions:"setFieldErrors"}}},valid:{entry:"sendUpdate"},invalid:{entry:"sendUpdate"}},on:{SIGN_IN:"#signInActor.signIn",CHANGE:{actions:"handleInput",target:".pending"},BLUR:{actions:"handleBlur",target:".pending"}}},submit:{initial:"idle",entry:"clearError",states:{idle:{entry:"sendUpdate",on:{SUBMIT:{actions:"handleSubmit",target:"validate"}}},validate:{entry:"sendUpdate",invoke:{src:"validateFields",onDone:{target:"pending",actions:"clearValidationError"},onError:{target:"idle",actions:"setFieldErrors"}}},pending:{tags:["pending"],entry:["sendUpdate","clearError"],invoke:{src:"forceNewPassword",onDone:[{cond:"shouldConfirmSignIn",actions:["setUser","setChallengeName"],target:"#signInActor.confirmSignIn"},{cond:"shouldSetupTOTP",actions:["setUser","setChallengeName"],target:"#signInActor.setupTOTP"},{target:"resolved",actions:["setUser","setCredentials"]}],onError:{target:"idle",actions:"setRemoteError"}}},resolved:{type:"final",always:"#signInActor.resolved"}}}}},setupTOTP:{initial:"getTotpSecretCode",exit:["clearFormValues","clearError","clearTouched"],states:{getTotpSecretCode:{invoke:{src:"getTotpSecretCode",onDone:{target:"edit",actions:"setTotpSecretCode"},onError:{target:"edit",actions:"setRemoteError"}}},edit:{entry:"sendUpdate",on:{SUBMIT:{actions:"handleSubmit",target:"submit"},SIGN_IN:"#signInActor.signIn",CHANGE:{actions:"handleInput"}}},submit:{tags:["pending"],entry:["sendUpdate","clearError"],invoke:{src:"verifyTotpToken",onDone:{actions:["clearChallengeName","clearRequiredAttributes"],target:"#signInActor.resolved"},onError:{actions:"setRemoteError",target:"edit"}}}}},verifyUser:{initial:"edit",exit:["clearFormValues","clearError","clearTouched"],states:{edit:{entry:"sendUpdate",on:{SUBMIT:{actions:"handleSubmit",target:"submit"},SKIP:"#signInActor.resolved",CHANGE:{actions:"handleInput"}}},submit:{tags:["pending"],entry:"clearError",invoke:{src:"verifyUser",onDone:{target:"#signInActor.confirmVerifyUser"},onError:{actions:"setRemoteError",target:"edit"}}}}},confirmVerifyUser:{initial:"edit",exit:["clearFormValues","clearError","clearUnverifiedContactMethods","clearAttributeToVerify","clearTouched"],states:{edit:{entry:"sendUpdate",on:{SUBMIT:{actions:"handleSubmit",target:"submit"},SKIP:"#signInActor.resolved",CHANGE:{actions:"handleInput"}}},submit:{tags:["pending"],entry:"clearError",invoke:{src:"confirmVerifyUser",onDone:{target:"#signInActor.resolved"},onError:{actions:"setRemoteError",target:"edit"}}}}},resolved:{type:"final",data:t=>({user:t.user})},rejected:{type:"final",data:(t,n)=>({intent:t.redirectIntent,authAttributes:t.authAttributes})}}},{actions:{clearAttributeToVerify:du,clearChallengeName:fu,clearRequiredAttributes:pu,clearError:mr,clearFormValues:gr,clearTouched:hr,clearUnverifiedContactMethods:mu,clearValidationError:yr,handleInput:Sr,handleSubmit:_r,handleBlur:br,parsePhoneNumber:Yi,setChallengeName:yu,setConfirmResetPasswordIntent:wu,setConfirmSignUpIntent:Su,setRequiredAttributes:vu,setCredentials:Wi,setFieldErrors:vr,setRemoteError:wr,setTotpSecretCode:hu,setUnverifiedContactMethods:_u,setUser:Hi,setUsernameAuthAttributes:Eu,sendUpdate:pr()},guards:{shouldAutoSignIn:t=>(t==null?void 0:t.intent)==="autoSignIn",shouldAutoSubmit:t=>(t==null?void 0:t.intent)==="autoSignInSubmit",shouldConfirmSignIn:(t,n)=>Lo(Nn(n)),shouldForceChangePassword:(t,n)=>Do(Nn(n),"NEW_PASSWORD_REQUIRED"),shouldRedirectToConfirmResetPassword:(t,n)=>n.data.code==="PasswordResetRequiredException",shouldRedirectToConfirmSignUp:(t,n)=>n.data.code==="UserNotConfirmedException",shouldRequestVerification:(t,n)=>{const{unverified:o,verified:i}=n.data;return Dn(i)&&!Dn(o)},shouldSetupTOTP:(t,n)=>Do(Nn(n),"MFA_SETUP")},services:{signIn(t){return B(this,void 0,void 0,function*(){const{authAttributes:n={},formValues:o={}}=t,i=Object.assign(Object.assign({},n),o),{username:a,password:s}=i;return yield e.handleSignIn({username:a,password:s})})},confirmSignIn(t){return B(this,void 0,void 0,function*(){const{challengeName:n,user:o}=t,{confirmation_code:i}=t.formValues,a=Lo(n)?n:void 0;return yield e.handleConfirmSignIn({user:o,code:i,mfaType:a}),yield G.Auth.currentAuthenticatedUser()})},forceNewPassword(t){return B(this,void 0,void 0,function*(){const{user:n,formValues:o}=t;let i,{password:a,confirm_password:s,phone_number:l,country_code:u}=o,c=di(o,["password","confirm_password","phone_number","country_code"]);l&&(i=`${u}${l}`.replace(/[^A-Z0-9+]/gi,""),c=Object.assign(Object.assign({},c),{phone_number:i}));try{const d=yield G.Auth.completeNewPassword(n,a,c);return d.challengeName?d:G.Auth.currentAuthenticatedUser()}catch(d){return Promise.reject(d)}})},getTotpSecretCode(t){return B(this,void 0,void 0,function*(){const{user:n}=t;return G.Auth.setupTOTP(n)})},verifyTotpToken(t){return B(this,void 0,void 0,function*(){const{formValues:n,user:o}=t,{confirmation_code:i}=n;return G.Auth.verifyTotpToken(o,i)})},federatedSignIn(t,n){return B(this,void 0,void 0,function*(){const{provider:o}=n.data;return yield G.Auth.federatedSignIn({provider:o})})},checkVerifiedContact(t){return B(this,void 0,void 0,function*(){const{user:n}=t;return yield G.Auth.verifiedContact(n)})},verifyUser(t){return B(this,void 0,void 0,function*(){const{unverifiedAttr:n}=t.formValues,o=yield G.Auth.verifyCurrentUserAttribute(n);return t.attributeToVerify=n,o})},confirmVerifyUser(t){return B(this,void 0,void 0,function*(){const{attributeToVerify:n}=t,{confirmation_code:o}=t.formValues;return yield G.Auth.verifyCurrentUserAttributeSubmit(n,o)})},validateFields(t){return B(this,void 0,void 0,function*(){return Vr(t.formValues,t.touched,t.passwordSettings,[We.validateFormPassword,We.validateConfirmPassword])})}}})}const Yh=St({initial:"pending",id:"signOutActor",predictableActionArguments:!0,states:{pending:{tags:["pending"],invoke:{src:"signOut",onDone:"resolved",onError:"rejected"}},resolved:{type:"final"},rejected:{type:"final"}}},{services:{signOut:()=>G.Auth.signOut()}});function Kh({services:e}){return St({id:"resetPasswordActor",initial:"init",predictableActionArguments:!0,states:{init:{always:[{target:"confirmResetPassword",cond:"shouldAutoConfirmReset",actions:"resendCode"},{target:"resetPassword"}]},resetPassword:{initial:"edit",exit:["clearFormValues","clearError","clearTouched"],states:{edit:{entry:"sendUpdate",on:{SUBMIT:{actions:"handleSubmit",target:"submit"},CHANGE:{actions:"handleInput"},BLUR:{actions:"handleBlur"}}},submit:{tags:["pending"],entry:["sendUpdate","setUsername","clearError"],invoke:{src:"resetPassword",onDone:{target:"#resetPasswordActor.confirmResetPassword"},onError:{actions:["setRemoteError"],target:"edit"}}}}},confirmResetPassword:{type:"parallel",exit:["clearFormValues","clearError","clearUsername","clearTouched"],states:{validation:{initial:"pending",states:{pending:{invoke:{src:"validateFields",onDone:{target:"valid",actions:"clearValidationError"},onError:{target:"invalid",actions:"setFieldErrors"}}},valid:{entry:"sendUpdate"},invalid:{entry:"sendUpdate"}},on:{CHANGE:{actions:"handleInput",target:".pending"},BLUR:{actions:"handleBlur",target:".pending"}}},submission:{initial:"idle",states:{idle:{entry:"sendUpdate",on:{SUBMIT:{actions:"handleSubmit",target:"validate"},RESEND:"resendCode",CHANGE:{actions:"handleInput"},BLUR:{actions:"handleBlur"}}},validate:{entry:"sendUpdate",invoke:{src:"validateFields",onDone:{target:"pending",actions:"clearValidationError"},onError:{target:"idle",actions:"setFieldErrors"}}},resendCode:{tags:["pending"],entry:["clearError","sendUpdate"],invoke:{src:"resetPassword",onDone:{target:"idle"},onError:{actions:"setRemoteError",target:"idle"}}},pending:{tags:["pending"],entry:["clearError","sendUpdate"],invoke:{src:"confirmResetPassword",onDone:{actions:"clearUsername",target:"#resetPasswordActor.resolved"},onError:{actions:"setRemoteError",target:"idle"}}}}}}},resolved:{type:"final"}}},{actions:{clearError:mr,clearFormValues:gr,clearTouched:hr,clearUsername:gu,clearValidationError:yr,handleInput:Sr,handleSubmit:_r,handleBlur:br,resendCode:Au,setFieldErrors:vr,setRemoteError:wr,setUsername:bu,sendUpdate:pr()},guards:{shouldAutoConfirmReset:(t,n)=>!(!t.intent||t.intent!=="confirmPasswordReset")},services:{resetPassword(t){return B(this,void 0,void 0,function*(){const{username:n}=t;return e.handleForgotPassword(n)})},confirmResetPassword(t){return B(this,void 0,void 0,function*(){const{username:n}=t,{confirmation_code:o,password:i}=t.formValues;return e.handleForgotPasswordSubmit({username:n,code:o,password:i})})},validateFields(t,n){return B(this,void 0,void 0,function*(){return Vr(t.formValues,t.touched,t.passwordSettings,[We.validateFormPassword,We.validateConfirmPassword])})}}})}var qh="__lodash_hash_undefined__";function Jh(e){return this.__data__.set(e,qh),this}var Zh=Jh;function Qh(e){return this.__data__.has(e)}var Xh=Qh,ey=Ir,ty=Zh,ny=Xh;function qt(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new ey;++t<n;)this.add(e[t])}qt.prototype.add=qt.prototype.push=ty;qt.prototype.has=ny;var ry=qt;function oy(e,t){for(var n=-1,o=e==null?0:e.length;++n<o;)if(t(e[n],n,e))return!0;return!1}var iy=oy;function ay(e,t){return e.has(t)}var sy=ay,ly=ry,uy=iy,cy=sy,dy=1,fy=2;function py(e,t,n,o,i,a){var s=n&dy,l=e.length,u=t.length;if(l!=u&&!(s&&u>l))return!1;var c=a.get(e),d=a.get(t);if(c&&d)return c==t&&d==e;var m=-1,f=!0,g=n&fy?new ly:void 0;for(a.set(e,t),a.set(t,e);++m<l;){var y=e[m],p=t[m];if(o)var b=s?o(p,y,m,t,e,a):o(y,p,m,e,t,a);if(b!==void 0){if(b)continue;f=!1;break}if(g){if(!uy(t,function(w,h){if(!cy(g,h)&&(y===w||i(y,w,n,o,a)))return g.push(h)})){f=!1;break}}else if(!(y===p||i(y,p,n,o,a))){f=!1;break}}return a.delete(e),a.delete(t),f}var ca=py;function my(e){var t=-1,n=Array(e.size);return e.forEach(function(o,i){n[++t]=[i,o]}),n}var gy=my;function hy(e){var t=-1,n=Array(e.size);return e.forEach(function(o){n[++t]=o}),n}var yy=hy,jo=ln,zo=na,vy=_t,wy=ca,Sy=gy,_y=yy,by=1,Cy=2,Ey="[object Boolean]",Ay="[object Date]",Ty="[object Error]",Iy="[object Map]",Py="[object Number]",ky="[object RegExp]",Ny="[object Set]",xy="[object String]",$y="[object Symbol]",Oy="[object ArrayBuffer]",Ry="[object DataView]",Go=jo?jo.prototype:void 0,xn=Go?Go.valueOf:void 0;function Uy(e,t,n,o,i,a,s){switch(n){case Ry:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Oy:return!(e.byteLength!=t.byteLength||!a(new zo(e),new zo(t)));case Ey:case Ay:case Py:return vy(+e,+t);case Ty:return e.name==t.name&&e.message==t.message;case ky:case xy:return e==t+"";case Iy:var l=Sy;case Ny:var u=o&by;if(l||(l=_y),e.size!=t.size&&!u)return!1;var c=s.get(e);if(c)return c==t;o|=Cy,s.set(e,t);var d=wy(l(e),l(t),o,i,a,s);return s.delete(e),d;case $y:if(xn)return xn.call(e)==xn.call(t)}return!1}var By=Uy;function Fy(e,t){for(var n=-1,o=t.length,i=e.length;++n<o;)e[i+n]=t[n];return e}var da=Fy,My=da,Vy=be;function Dy(e,t,n){var o=t(e);return Vy(e)?o:My(o,n(e))}var fa=Dy;function Ly(e,t){for(var n=-1,o=e==null?0:e.length,i=0,a=[];++n<o;){var s=e[n];t(s,n,e)&&(a[i++]=s)}return a}var jy=Ly;function zy(){return[]}var pa=zy,Gy=jy,Wy=pa,Hy=Object.prototype,Yy=Hy.propertyIsEnumerable,Wo=Object.getOwnPropertySymbols,Ky=Wo?function(e){return e==null?[]:(e=Object(e),Gy(Wo(e),function(t){return Yy.call(e,t)}))}:Wy,ma=Ky,qy=ra,Jy=qy(Object.keys,Object),Zy=Jy,Qy=Or,Xy=Zy,ev=Object.prototype,tv=ev.hasOwnProperty;function nv(e){if(!Qy(e))return Xy(e);var t=[];for(var n in Object(e))tv.call(e,n)&&n!="constructor"&&t.push(n);return t}var rv=nv,ov=la,iv=rv,av=mn;function sv(e){return av(e)?ov(e):iv(e)}var ga=sv,lv=fa,uv=ma,cv=ga;function dv(e){return lv(e,cv,uv)}var fv=dv,Ho=fv,pv=1,mv=Object.prototype,gv=mv.hasOwnProperty;function hv(e,t,n,o,i,a){var s=n&pv,l=Ho(e),u=l.length,c=Ho(t),d=c.length;if(u!=d&&!s)return!1;for(var m=u;m--;){var f=l[m];if(!(s?f in t:gv.call(t,f)))return!1}var g=a.get(e),y=a.get(t);if(g&&y)return g==t&&y==e;var p=!0;a.set(e,t),a.set(t,e);for(var b=s;++m<u;){f=l[m];var w=e[f],h=t[f];if(o)var v=s?o(h,w,f,t,e,a):o(w,h,f,e,t,a);if(!(v===void 0?w===h||i(w,h,n,o,a):v)){p=!1;break}b||(b=f=="constructor")}if(p&&!b){var S=e.constructor,_=t.constructor;S!=_&&"constructor"in e&&"constructor"in t&&!(typeof S=="function"&&S instanceof S&&typeof _=="function"&&_ instanceof _)&&(p=!1)}return a.delete(e),a.delete(t),p}var yv=hv,vv=Ue,wv=he,Sv=vv(wv,"DataView"),_v=Sv,bv=Ue,Cv=he,Ev=bv(Cv,"Promise"),Av=Ev,Tv=Ue,Iv=he,Pv=Tv(Iv,"Set"),kv=Pv,Nv=Ue,xv=he,$v=Nv(xv,"WeakMap"),Ov=$v,Zn=_v,Qn=Tr,Xn=Av,er=kv,tr=Ov,ha=Xe,ot=Ji,Yo="[object Map]",Rv="[object Object]",Ko="[object Promise]",qo="[object Set]",Jo="[object WeakMap]",Zo="[object DataView]",Uv=ot(Zn),Bv=ot(Qn),Fv=ot(Xn),Mv=ot(er),Vv=ot(tr),xe=ha;(Zn&&xe(new Zn(new ArrayBuffer(1)))!=Zo||Qn&&xe(new Qn)!=Yo||Xn&&xe(Xn.resolve())!=Ko||er&&xe(new er)!=qo||tr&&xe(new tr)!=Jo)&&(xe=function(e){var t=ha(e),n=t==Rv?e.constructor:void 0,o=n?ot(n):"";if(o)switch(o){case Uv:return Zo;case Bv:return Yo;case Fv:return Ko;case Mv:return qo;case Vv:return Jo}return t});var Dv=xe,$n=Nr,Lv=ca,jv=By,zv=yv,Qo=Dv,Xo=be,ei=yt.exports,Gv=Br,Wv=1,ti="[object Arguments]",ni="[object Array]",Ot="[object Object]",Hv=Object.prototype,ri=Hv.hasOwnProperty;function Yv(e,t,n,o,i,a){var s=Xo(e),l=Xo(t),u=s?ni:Qo(e),c=l?ni:Qo(t);u=u==ti?Ot:u,c=c==ti?Ot:c;var d=u==Ot,m=c==Ot,f=u==c;if(f&&ei(e)){if(!ei(t))return!1;s=!0,d=!1}if(f&&!d)return a||(a=new $n),s||Gv(e)?Lv(e,t,n,o,i,a):jv(e,t,u,n,o,i,a);if(!(n&Wv)){var g=d&&ri.call(e,"__wrapped__"),y=m&&ri.call(t,"__wrapped__");if(g||y){var p=g?e.value():e,b=y?t.value():t;return a||(a=new $n),i(p,b,n,o,a)}}return f?(a||(a=new $n),zv(e,t,n,o,i,a)):!1}var Kv=Yv,qv=Kv,oi=Re;function ya(e,t,n,o,i){return e===t?!0:e==null||t==null||!oi(e)&&!oi(t)?e!==e&&t!==t:qv(e,t,n,o,ya,i)}var va=ya,Jv=Nr,Zv=va,Qv=1,Xv=2;function ew(e,t,n,o){var i=n.length,a=i,s=!o;if(e==null)return!a;for(e=Object(e);i--;){var l=n[i];if(s&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++i<a;){l=n[i];var u=l[0],c=e[u],d=l[1];if(s&&l[2]){if(c===void 0&&!(u in e))return!1}else{var m=new Jv;if(o)var f=o(c,d,u,e,t,m);if(!(f===void 0?Zv(d,c,Qv|Xv,o,m):f))return!1}}return!0}var tw=ew,nw=Ce;function rw(e){return e===e&&!nw(e)}var wa=rw,ow=wa,iw=ga;function aw(e){for(var t=iw(e),n=t.length;n--;){var o=t[n],i=e[o];t[n]=[o,i,ow(i)]}return t}var sw=aw;function lw(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}var Sa=lw,uw=tw,cw=sw,dw=Sa;function fw(e){var t=cw(e);return t.length==1&&t[0][2]?dw(t[0][0],t[0][1]):function(n){return n===e||uw(n,e,t)}}var pw=fw;function mw(e,t){return e!=null&&t in Object(e)}var gw=mw,hw=pn,yw=Rr,vw=be,ww=gn,Sw=Ur,_w=bt;function bw(e,t,n){t=hw(t,e);for(var o=-1,i=t.length,a=!1;++o<i;){var s=_w(t[o]);if(!(a=e!=null&&n(e,s)))break;e=e[s]}return a||++o!=i?a:(i=e==null?0:e.length,!!i&&Sw(i)&&ww(s,i)&&(vw(e)||yw(e)))}var Cw=bw,Ew=gw,Aw=Cw;function Tw(e,t){return e!=null&&Aw(e,t,Ew)}var Iw=Tw,Pw=va,kw=$e,Nw=Iw,xw=Er,$w=wa,Ow=Sa,Rw=bt,Uw=1,Bw=2;function Fw(e,t){return xw(e)&&$w(t)?Ow(Rw(e),t):function(n){var o=kw(n,e);return o===void 0&&o===t?Nw(n,e):Pw(t,o,Uw|Bw)}}var Mw=Fw;function Vw(e){return function(t){return t==null?void 0:t[e]}}var Dw=Vw,Lw=kr;function jw(e){return function(t){return Lw(t,e)}}var zw=jw,Gw=Dw,Ww=zw,Hw=Er,Yw=bt;function Kw(e){return Hw(e)?Gw(Yw(e)):Ww(e)}var qw=Kw,Jw=pw,Zw=Mw,Qw=Mr,Xw=be,eS=qw;function tS(e){return typeof e=="function"?e:e==null?Qw:typeof e=="object"?Xw(e)?Zw(e[0],e[1]):Jw(e):eS(e)}var nS=tS,rS=sa,oS=pn,iS=gn,ii=Ce,aS=bt;function sS(e,t,n,o){if(!ii(e))return e;t=oS(t,e);for(var i=-1,a=t.length,s=a-1,l=e;l!=null&&++i<a;){var u=aS(t[i]),c=n;if(u==="__proto__"||u==="constructor"||u==="prototype")return e;if(i!=s){var d=l[u];c=o?o(d,u,l):void 0,c===void 0&&(c=ii(d)?d:iS(t[i+1])?[]:{})}rS(l,u,c),l=l[u]}return e}var lS=sS,uS=kr,cS=lS,dS=pn;function fS(e,t,n){for(var o=-1,i=t.length,a={};++o<i;){var s=t[o],l=uS(e,s);n(l,s)&&cS(a,dS(s,e),l)}return a}var pS=fS,mS=da,gS=$r,hS=ma,yS=pa,vS=Object.getOwnPropertySymbols,wS=vS?function(e){for(var t=[];e;)mS(t,hS(e)),e=gS(e);return t}:yS,SS=wS,_S=fa,bS=SS,CS=Fr;function ES(e){return _S(e,CS,bS)}var AS=ES,TS=Qi,IS=nS,PS=pS,kS=AS;function NS(e,t){if(e==null)return{};var n=TS(kS(e),function(o){return[o]});return t=IS(t),PS(e,n,function(o,i){return t(o,i[0])})}var xS=NS;function $S({services:e}){return St({id:"signUpActor",initial:"init",predictableActionArguments:!0,states:{init:{always:[{target:"confirmSignUp",cond:"shouldInitConfirmSignUp"},{target:"signUp"}]},signUp:{type:"parallel",exit:["clearError","clearFormValues","clearTouched"],states:{validation:{initial:"pending",states:{pending:{invoke:{src:"validateSignUp",onDone:{target:"valid",actions:"clearValidationError"},onError:{target:"invalid",actions:"setFieldErrors"}}},valid:{entry:"sendUpdate"},invalid:{entry:"sendUpdate"}},on:{CHANGE:{actions:"handleInput",target:".pending"},BLUR:{actions:"handleBlur",target:".pending"}}},submission:{initial:"idle",states:{idle:{entry:"sendUpdate",on:{SUBMIT:{actions:"handleSubmit",target:"validate"},FEDERATED_SIGN_IN:"federatedSignIn"}},federatedSignIn:{tags:["pending"],entry:["sendUpdate","clearError"],invoke:{src:"federatedSignIn",onDone:"#signUpActor.resolved",onError:{actions:"setRemoteError"}}},validate:{entry:"sendUpdate",invoke:{src:"validateSignUp",onDone:{target:"pending",actions:"clearValidationError"},onError:{target:"idle",actions:"setFieldErrors"}}},pending:{tags:["pending"],entry:["parsePhoneNumber","sendUpdate","clearError"],invoke:{src:"signUp",onDone:[{cond:"shouldSkipConfirm",target:"skipConfirm",actions:["setUser","setCredentials"]},{target:"resolved",actions:["setUser","setCredentials","setCodeDeliveryDetails"]}],onError:{target:"idle",actions:"setRemoteError"}}},skipConfirm:{always:{target:"#signUpActor.resolved",actions:"setAutoSignInIntent"}},resolved:{type:"final",always:"#signUpActor.confirmSignUp"}}}}},confirmSignUp:{initial:"edit",states:{edit:{entry:"sendUpdate",on:{SUBMIT:{actions:"handleSubmit",target:"submit"},CHANGE:{actions:"handleInput"},BLUR:{actions:"handleBlur"},RESEND:"resend"}},resend:{tags:["pending"],entry:"sendUpdate",invoke:{src:"resendConfirmationCode",onDone:{target:"edit"},onError:[{target:"#signUpActor.resolved",actions:"setAutoSignInIntent",cond:"isUserAlreadyConfirmed"},{target:"edit",actions:"setRemoteError"}]}},submit:{tags:["pending"],entry:["sendUpdate","clearError"],invoke:{src:"confirmSignUp",onDone:{target:"#signUpActor.resolved",actions:"setAutoSignInIntent"},onError:{target:"edit",actions:"setRemoteError"}}}}},resolved:{type:"final",data:(t,n)=>{const{username:o,password:i}=t.authAttributes;return{user:$e(n,"data.user")||t.user,authAttributes:{username:o,password:i},intent:t.intent}}}}},{guards:{isUserAlreadyConfirmed:(t,n)=>n.data.message==="User is already confirmed.",shouldInitConfirmSignUp:t=>t.intent&&t.intent==="confirmSignUp",shouldSkipConfirm:(t,n)=>n.data.userConfirmed},actions:{clearError:mr,clearFormValues:gr,clearTouched:hr,clearValidationError:yr,handleInput:Sr,handleSubmit:_r,handleBlur:br,parsePhoneNumber:Yi,setCredentials:Wi,setFieldErrors:vr,setRemoteError:wr,setCodeDeliveryDetails:Cu,setUser:Hi,sendUpdate:pr(),setAutoSignInIntent:ue({intent:t=>(t==null?void 0:t.intent)==="confirmSignUp"?"autoSignInSubmit":"autoSignIn"})},services:{confirmSignUp(t,n){return B(this,void 0,void 0,function*(){const{user:o,authAttributes:i,formValues:a}=t,{confirmation_code:s}=a,l=$e(o,"username")||$e(i,"username");return yield e.handleConfirmSignUp({username:l,code:s})})},resendConfirmationCode(t,n){return B(this,void 0,void 0,function*(){const{user:o,authAttributes:i}=t,a=$e(o,"username")||$e(i,"username");return G.Auth.resendSignUp(a)})},federatedSignIn(t,n){return B(this,void 0,void 0,function*(){const{provider:o}=n.data;return yield G.Auth.federatedSignIn({provider:o})})},signUp(t,n){return B(this,void 0,void 0,function*(){const{formValues:o,loginMechanisms:i}=t,[a="username"]=i,{[a]:s,password:l}=o,u=xS(o,(c,d)=>{switch(d){case"address":case"birthdate":case"email":case"family_name":case"gender":case"given_name":case"locale":case"middle_name":case"name":case"nickname":case"phone_number":case"picture":case"preferred_username":case"profile":case"updated_at":case"website":case"zoneinfo":return!0;default:return d.startsWith("custom:")}});return yield e.handleSignUp({username:s,password:l,attributes:u})})},validateSignUp(t,n){return B(this,void 0,void 0,function*(){return Vr(t.formValues,t.touched,t.passwordSettings,[e.validateFormPassword,e.validateConfirmPassword,e.validatePreferredUsername,e.validateCustomSignUp])})}}})}const{choose:OS}=Mi;function RS(){return St({id:"authenticator",initial:"idle",context:{user:void 0,config:{},services:We,actorRef:void 0,hasSetup:!1},predictableActionArguments:!0,states:{idle:{invoke:{src:"getCurrentUser",onDone:{actions:"setUser",target:"authenticated"},onError:{target:"setup"}}},setup:{initial:"waitConfig",states:{waitConfig:{on:{INIT:{actions:["configure","setHasSetup"],target:"applyConfig"}}},applyConfig:{invoke:{src:"getAmplifyConfig",onDone:{actions:"applyAmplifyConfig",target:"goToInitialState"}}},goToInitialState:{always:[{target:"#authenticator.signUp",cond:"isInitialStateSignUp"},{target:"#authenticator.resetPassword",cond:"isInitialStateResetPassword"},{target:"#authenticator.signIn"}]}}},signIn:{initial:"spawnActor",states:{spawnActor:{always:{actions:"spawnSignInActor",target:"runActor"}},runActor:{entry:"clearActorDoneData",exit:"stopSignInActor"}},on:{SIGN_UP:"signUp",RESET_PASSWORD:"resetPassword","done.invoke.signInActor":[{target:"signUp",actions:"setActorDoneData",cond:"shouldRedirectToSignUp"},{target:"resetPassword",actions:"setActorDoneData",cond:"shouldRedirectToResetPassword"},{target:"authenticated",actions:"setActorDoneData"}]}},signUp:{initial:"spawnActor",states:{spawnActor:{always:{actions:"spawnSignUpActor",target:"runActor"}},runActor:{entry:"clearActorDoneData",exit:"stopSignUpActor"},autoSignIn:{invoke:{src:"getCurrentUser",onDone:"#authenticator.authenticated",onError:"#authenticator.setup.goToInitialState"}}},on:{SIGN_IN:"signIn","done.invoke.signUpActor":{target:"#authenticator.signIn",actions:"setActorDoneData",cond:"shouldAutoSignIn"}}},resetPassword:{initial:"spawnActor",states:{spawnActor:{always:{actions:"spawnResetPasswordActor",target:"runActor"}},runActor:{entry:"clearActorDoneData",exit:"stopResetPasswordActor"}},on:{SIGN_IN:"signIn","done.invoke.resetPasswordActor":{target:"signIn",actions:"setActorDoneData"}}},signOut:{initial:"spawnActor",states:{spawnActor:{always:{actions:"spawnSignOutActor",target:"runActor"}},runActor:{entry:"clearActorDoneData",exit:["stopSignOutActor","clearUser"]}},on:{"done.invoke.signOutActor":[{target:"setup",cond:"shouldSetup"},{target:"setup.goToInitialState"}]}},authenticated:{initial:"idle",states:{idle:{on:{TOKEN_REFRESH:"refreshUser"}},refreshUser:{invoke:{src:"getCurrentUser",onDone:{actions:"setUser",target:"idle"},onError:{target:"#authenticator.signOut"}}}},on:{SIGN_OUT:"signOut"}}},on:{CHANGE:{actions:"forwardToActor"},BLUR:{actions:"forwardToActor"},SUBMIT:{actions:"forwardToActor"},FEDERATED_SIGN_IN:{actions:"forwardToActor"},AUTO_SIGN_IN:{actions:"forwardToActor"},RESEND:{actions:"forwardToActor"},SIGN_IN:{actions:"forwardToActor"},SKIP:{actions:"forwardToActor"}}},{actions:{forwardToActor:OS([{cond:"hasActor",actions:uu(e=>e.actorRef)}]),setUser:ue({user:(e,t)=>t.data}),setActorDoneData:ue({actorDoneData:(e,t)=>{var n,o;return{authAttributes:Object.assign({},(n=t.data)===null||n===void 0?void 0:n.authAttributes),intent:(o=t.data)===null||o===void 0?void 0:o.intent}},user:(e,t)=>{var n;return(n=t.data)===null||n===void 0?void 0:n.user}}),clearUser:ue({user:void 0}),clearActorDoneData:ue({actorDoneData:void 0}),applyAmplifyConfig:ue({config(e,t){var n,o,i,a,s,l,u,c,d;const m=(o=(n=t.data.aws_cognito_username_attributes)===null||n===void 0?void 0:n.map(_=>_.toLowerCase()))!==null&&o!==void 0?o:[],f=(a=(i=t.data.aws_cognito_verification_mechanisms)===null||i===void 0?void 0:i.map(_=>_.toLowerCase()))!==null&&a!==void 0?a:[],g=(l=(s=t.data.aws_cognito_signup_attributes)===null||s===void 0?void 0:s.map(_=>_.toLowerCase()))!==null&&l!==void 0?l:[],y=(c=(u=t.data.aws_cognito_social_providers)===null||u===void 0?void 0:u.map(_=>_.toLowerCase()))!==null&&c!==void 0?c:[],p=t.data.aws_cognito_password_protection_settings||{};m.length===0&&m.push("username");const{loginMechanisms:b,signUpAttributes:w,socialProviders:h,initialState:v,formFields:S}=e.config;return{loginMechanisms:b!=null?b:m,formFields:(d=US(S))!==null&&d!==void 0?d:{},passwordSettings:p,signUpAttributes:w!=null?w:Array.from(new Set([...f,...g])),socialProviders:h!=null?h:y.sort(),initialState:v}}}),spawnSignInActor:ue({actorRef:(e,t)=>{var n,o,i,a,s,l,u;const{services:c}=e,d=Hh({services:c}).withContext({authAttributes:(o=(n=e.actorDoneData)===null||n===void 0?void 0:n.authAttributes)!==null&&o!==void 0?o:{},user:e.user,intent:(i=e.actorDoneData)===null||i===void 0?void 0:i.intent,country_code:"+1",formValues:{},touched:{},validationError:{},passwordSettings:(a=e.config)===null||a===void 0?void 0:a.passwordSettings,loginMechanisms:(s=e.config)===null||s===void 0?void 0:s.loginMechanisms,socialProviders:(l=e.config)===null||l===void 0?void 0:l.socialProviders,formFields:(u=e.config)===null||u===void 0?void 0:u.formFields});return kt(d,{name:"signInActor"})}}),spawnSignUpActor:ue({actorRef:(e,t)=>{var n,o,i,a,s,l,u;const{services:c}=e,d=$S({services:c}).withContext({authAttributes:(o=(n=e.actorDoneData)===null||n===void 0?void 0:n.authAttributes)!==null&&o!==void 0?o:{},country_code:"+1",intent:(i=e.actorDoneData)===null||i===void 0?void 0:i.intent,formValues:{},touched:{},validationError:{},loginMechanisms:(a=e.config)===null||a===void 0?void 0:a.loginMechanisms,socialProviders:(s=e.config)===null||s===void 0?void 0:s.socialProviders,formFields:(l=e.config)===null||l===void 0?void 0:l.formFields,passwordSettings:(u=e.config)===null||u===void 0?void 0:u.passwordSettings});return kt(d,{name:"signUpActor"})}}),spawnResetPasswordActor:ue({actorRef:(e,t)=>{var n,o,i,a,s;const{services:l}=e,u=Kh({services:l}).withContext({formValues:{},touched:{},intent:(n=e.actorDoneData)===null||n===void 0?void 0:n.intent,username:(i=(o=e.actorDoneData)===null||o===void 0?void 0:o.authAttributes)===null||i===void 0?void 0:i.username,formFields:(a=e.config)===null||a===void 0?void 0:a.formFields,validationError:{},passwordSettings:(s=e.config)===null||s===void 0?void 0:s.passwordSettings});return kt(u,{name:"resetPasswordActor"})}}),spawnSignOutActor:ue({actorRef:e=>{const t=Yh.withContext({user:e.user});return kt(t,{name:"signOutActor"})}}),stopSignInActor:$t("signInActor"),stopSignUpActor:$t("signUpActor"),stopResetPasswordActor:$t("resetPasswordActor"),stopSignOutActor:$t("signOutActor"),configure:ue((e,t)=>{const n=t.data,{services:o}=n,i=di(n,["services"]);return{services:Object.assign(Object.assign({},We),o),config:i}}),setHasSetup:ue({hasSetup:!0})},guards:{isInitialStateSignUp:e=>e.config.initialState==="signUp",isInitialStateResetPassword:e=>e.config.initialState==="resetPassword",shouldRedirectToSignUp:(e,t)=>{var n;return((n=t.data)===null||n===void 0?void 0:n.intent)==="confirmSignUp"},shouldRedirectToResetPassword:(e,t)=>{var n;return((n=t.data)===null||n===void 0?void 0:n.intent)==="confirmPasswordReset"},shouldAutoSignIn:(e,t)=>{var n,o;return((n=t.data)===null||n===void 0?void 0:n.intent)==="autoSignIn"||((o=t.data)===null||o===void 0?void 0:o.intent)==="autoSignInSubmit"},shouldSetup:e=>e.hasSetup===!1,hasActor:e=>!!e.actorRef},services:{getCurrentUser:(e,t)=>e.services.getCurrentUser(),getAmplifyConfig:(e,t)=>e.services.getAmplifyConfig()}})}function US(e){return e&&Object.keys(e).forEach(t=>{Object.keys(e[t]).forEach(n=>{let o=e[t][n];o.required=o.isRequired})}),e}const BS={key:0,class:"amplify-flex amplify-alert amplify-alert--error amplify-authenticator__base","data-variation":"error",role:"alert"},FS={class:"amplify-flex amplify-authenticator__icon-wrapper"},MS=r.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"amplify-icon","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor"},[r.createElementVNode("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"})],-1),VS=r.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"amplify-icon","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor"},[r.createElementVNode("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})],-1),ye={__name:"base-alert",setup(e){const t=r.ref(!0),n=N("Dismiss alert");function o(){t.value=!1}return(i,a)=>{const s=ie;return t.value?(r.openBlock(),r.createElementBlock("div",BS,[r.createElementVNode("div",FS,[MS,r.createElementVNode("div",null,[r.renderSlot(i.$slots,"default")])]),r.createVNode(s,{class:"amplify-field-group__control amplify-alert__dismiss","aria-label":r.unref(n),fullwidth:!1,variation:"link",type:"button",onClick:o},{default:r.withCtx(()=>[VS]),_:1},8,["aria-label"])])):r.createCommentVNode("",!0)}}},ve=r.defineComponent({__name:"base-field-set",setup(e){let t=r.useSlots();return(n,o)=>r.renderSlot(n.$slots,"fieldSetI",r.mergeProps(n.$attrs,{slotData:r.unref(t).default&&r.unref(t).default()}),()=>[r.createElementVNode("fieldset",r.mergeProps(n.$attrs,{"data-amplify-fieldset":""}),[r.renderSlot(n.$slots,"default")],16)])}});function DS(e){return r.getCurrentScope()?(r.onScopeDispose(e),!0):!1}function _a(e){let t=0,n,o;const i=()=>{t-=1,o&&t<=0&&(o.stop(),n=void 0,o=void 0)};return(...a)=>(t+=1,n||(o=r.effectScope(!0),n=o.run(()=>e(...a))),DS(i),n)}function LS(e){return"state"in e}var ai=function(){};function jS(e){return"getSnapshot"in e?e.getSnapshot():LS(e)?e.state:void 0}function zS(e,t){t===void 0&&(t=jS);var n=r.isRef(e)?e:r.shallowRef(e),o=r.shallowRef(t(n.value)),i=function(a){n.value.send(a)};return r.watch(n,function(a,s,l){o.value=t(a);var u=a.subscribe({next:function(c){return o.value=c},error:ai,complete:ai}).unsubscribe;l(function(){return u()})},{immediate:!0}),{state:o,send:i}}const GS=e=>{var t,n,o;return{...(o=(n=(t=Xt(e))==null?void 0:t.formFields)==null?void 0:n.setupTOTP)==null?void 0:o.QR}},Dr=_a(()=>{const e=RS(),t=Gi(e).start(),n=r.ref("configuring"),{state:o,send:i}=zS(t),a=()=>{n.value="authenticated"},s=()=>{n.value="unauthenticated"},l=ol(t,async(u,c)=>{await mi(u,c,{onSignIn:a,onSignOut:s})});return G.Auth.currentAuthenticatedUser().then(()=>{n.value="authenticated"}).catch(()=>{n.value="unauthenticated"}),r.onScopeDispose(()=>{l()}),{authStatus:n,service:t,send:i,state:o}}),re=_a(()=>{const{authStatus:e,state:t,send:n}=Dr(),o=r.reactive({});return r.watchEffect(()=>{const i=ls({send:n,state:t.value});for(const s of Object.keys(i))o[s]=i[s];const a=i.route==="setupTOTP"?GS(t.value):null;o.QRFields=a,o.authStatus=e.value,o.send=n,o.state=t}),o});let WS=(e=21)=>{let t="",n=crypto.getRandomValues(new Uint8Array(e));for(;e--;){let o=n[e]&63;o<36?t+=o.toString(36):o<62?t+=(o-26).toString(36).toUpperCase():o<63?t+="_":t+="-"}return t};const hn=r.defineComponent({__name:"base-input",emits:["update:modelValue"],setup(e,{emit:t}){const n=o=>{t("update:modelValue",o.target.value)};return(o,i)=>(r.openBlock(),r.createElementBlock("input",{onChange:i[0]||(i[0]=a=>n(a)),"data-amplify-input":""},null,32))}}),HS={},YS={"data-amplify-label":""};function KS(e,t){return r.openBlock(),r.createElementBlock("label",YS,[r.renderSlot(e.$slots,"default")])}var yn=Qt(HS,[["render",KS]]);const qS=["aria-label","aria-checked"],JS=r.createElementVNode("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"},null,-1),ZS=[JS],QS=r.createElementVNode("path",{d:"M0 0h24v24H0zm0 0h24v24H0zm0 0h24v24H0zm0 0h24v24H0z",fill:"none"},null,-1),XS=r.createElementVNode("path",{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78l3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z"},null,-1),e_=[QS,XS],t_={inheritAttrs:!1},Lr=r.defineComponent({...t_,__name:"password-control",props:{name:null,label:null,autocomplete:{default:"new-password"},hasError:{type:Boolean,default:!1},labelHidden:{type:Boolean},placeholder:null,required:{type:Boolean,default:!0},describedBy:null},setup(e){var h;const t=e,n=N("Show password"),o=N("Hide password"),i=r.ref("password"),a=r.ref(n),s=Math.floor(Math.random()*999999),{name:l,label:u,autocomplete:c,hasError:d,labelHidden:m,placeholder:f,required:g}=r.toRefs(t);let y=r.ref("");function p(){a.value=a.value===n?o:n,i.value=i.value==="password"?"text":"password"}const b=N((h=f==null?void 0:f.value)!=null?h:u.value),w=N(u.value);return(v,S)=>{const _=yn,C=hn,A=Q;return r.openBlock(),r.createBlock(A,{class:r.normalizeClass([r.unref(J).Flex,r.unref(J).Field,r.unref(J).TextField,r.unref(J).PasswordField,"amplify-authenticator__column"])},{default:r.withCtx(()=>[r.createVNode(_,{class:r.normalizeClass(["amplify-label",{"amplify-visually-hidden":r.unref(m)}]),for:"amplify-field-"+r.unref(s)},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(w)),1)]),_:1},8,["class","for"]),r.createVNode(A,{class:r.normalizeClass([r.unref(J).Flex,r.unref(J).FieldGroup])},{default:r.withCtx(()=>[r.createVNode(A,{class:r.normalizeClass(r.unref(J).FieldGroupFieldWrapper)},{default:r.withCtx(()=>{var T;return[r.createVNode(C,r.mergeProps(v.$attrs,{modelValue:r.unref(y),"onUpdate:modelValue":S[0]||(S[0]=I=>r.isRef(y)?y.value=I:y=I),class:[r.unref(J).Input,r.unref(J).FieldGroupControl],id:"amplify-field-"+r.unref(s),"data-amplify-password":"true",name:r.unref(l),autocomplete:r.unref(c),required:(T=r.unref(g))!=null?T:!0,placeholder:r.unref(b),type:i.value,"aria-invalid":r.unref(d),"aria-describedBy":e.describedBy}),null,16,["modelValue","class","id","name","autocomplete","required","placeholder","type","aria-invalid","aria-describedBy"])]}),_:1},8,["class"]),r.createVNode(A,{class:r.normalizeClass(r.unref(J).FieldGroupOuterEnd)},{default:r.withCtx(()=>[r.createElementVNode("button",{"aria-label":a.value,"aria-checked":i.value!=="password",class:r.normalizeClass([r.unref(J).Button,r.unref(J).FieldGroupControl,r.unref(J).FieldShowPassword]),"data-fullwidth":"false",type:"button",role:"switch",onClick:p},[i.value==="password"?(r.openBlock(),r.createElementBlock("svg",{key:0,xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24",class:r.normalizeClass(r.unref(J).Icon)},ZS,2)):(r.openBlock(),r.createElementBlock("svg",{key:1,xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24",class:r.normalizeClass(r.unref(J).Icon)},e_,2))],10,qS)]),_:1},8,["class"])]),_:1},8,["class"])]),_:1},8,["class"])}}}),n_=["value","selected"],r_=r.defineComponent({__name:"base-select",props:{selectValue:{default:""},options:null},emits:["update:selectValue"],setup(e,{emit:t}){const n=e,{options:o,selectValue:i}=r.toRefs(n),a=s=>{t("update:selectValue",s.target.value)};return(s,l)=>(r.openBlock(),r.createElementBlock("select",{onChange:l[0]||(l[0]=u=>a(u))},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(o),(u,c)=>(r.openBlock(),r.createElementBlock("option",{key:c,value:u,selected:u==r.unref(i)?!0:void 0},r.toDisplayString(u),9,n_))),128))],32))}}),o_=r.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg","data-size":"large",fill:"currentColor",viewBox:"0 0 24 24",class:"amplify-icon amplify-icon--large"},[r.createElementVNode("path",{d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})],-1),i_=r.defineComponent({__name:"alias-control",props:{label:{default:"Username"},name:{default:"username"},placeholder:{default:""},autocomplete:{default:""},labelHidden:{type:Boolean},required:{type:Boolean,default:!0},dialCode:null,dialCodeList:null,type:{default:"text"},hasError:{type:Boolean},describedBy:null},setup(e){const t=e,{label:n,name:o,placeholder:i,autocomplete:a,labelHidden:s,required:l,dialCode:u,dialCodeList:c}=r.toRefs(t),d=Math.floor(Math.random()*999999),m=Math.floor(Math.random()*999999);return(f,g)=>{const y=yn,p=r_,b=Q,w=hn;return r.openBlock(),r.createBlock(b,{class:"amplify-flex amplify-field amplify-textfield amplify-phonenumberfield amplify-authenticator__column"},{default:r.withCtx(()=>[r.createVNode(y,r.mergeProps({for:"amplify-field-"+r.unref(d),class:["amplify-label",{"amplify-visually-hidden":r.unref(s)}]},f.$attrs),{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(n)),1)]),_:1},16,["for","class"]),r.createVNode(b,{class:"amplify-flex amplify-field-group"},{default:r.withCtx(()=>[r.createVNode(b,{class:"amplify-field-group__outer-start"},{default:r.withCtx(()=>[e.type==="tel"?(r.openBlock(),r.createBlock(b,{key:0,class:"amplify-flex amplify-field amplify-selectfield amplify-countrycodeselect amplify-dialcodeselect amplify-authenticator__column"},{default:r.withCtx(()=>[r.createVNode(y,r.mergeProps({for:"amplify-field-"+r.unref(m),class:"amplify-label amplify-visually-hidden"},f.$attrs),{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString("Country Code"))]),_:1},16,["for"]),r.createVNode(b,{class:"amplify-select__wrapper"},{default:r.withCtx(()=>[r.createVNode(p,{class:"amplify-select amplify-field-group__control",id:"amplify-field-"+r.unref(m),autocomplete:"tel-country-code","aria-label":"country code",name:"country_code",options:r.unref(c),"select-value":r.unref(u)},null,8,["id","options","select-value"]),r.createVNode(b,{class:"amplify-flex amplify-select__icon-wrapper amplify-authenticator__icon-wrapper"},{default:r.withCtx(()=>[o_]),_:1})]),_:1})]),_:1})):r.createCommentVNode("",!0)]),_:1}),r.createVNode(b,{class:"amplify-field-group__field-wrapper"},{default:r.withCtx(()=>{var h;return[r.createVNode(w,{class:"amplify-input amplify-field-group__control",id:"amplify-field-"+r.unref(d),autocomplete:r.unref(a),name:r.unref(o),required:(h=r.unref(l))!=null?h:!0,type:e.type,placeholder:r.unref(i),"aria-invalid":e.hasError,"aria-describedBy":e.describedBy},null,8,["id","autocomplete","name","required","type","placeholder","aria-invalid","aria-describedBy"])]}),_:1})]),_:1})]),_:1})}}}),a_=["id"],ba=r.defineComponent({__name:"base-form-field",props:{name:{default:""},formField:{default:()=>({})}},setup(e){const t=e,{name:n,formField:o}=r.toRefs(t),{validationErrors:i}=r.toRefs(re()),{type:a}=o.value,s=a==="password",l=WS(12),u=r.computed(()=>qs(i.value[n.value])),c=r.computed(()=>{var m;return((m=u.value)==null?void 0:m.length)>0}),d=r.computed(()=>c.value?l:void 0);return(m,f)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[s?(r.openBlock(),r.createBlock(Lr,{key:0,name:r.unref(n),label:r.unref(o).label,placeholder:r.unref(o).placeholder,required:r.unref(o).isRequired,"label-hidden":r.unref(o).labelHidden,autocomplete:r.unref(o).autocomplete,hasError:r.unref(c),describedBy:r.unref(d)},null,8,["name","label","placeholder","required","label-hidden","autocomplete","hasError","describedBy"])):(r.openBlock(),r.createBlock(i_,{key:1,name:r.unref(n),label:r.unref(o).label,placeholder:r.unref(o).placeholder,required:r.unref(o).isRequired,"label-hidden":r.unref(o).labelHidden,autocomplete:r.unref(o).autocomplete,"dial-code":r.unref(o).dialCode,"dial-code-list":r.unref(o).dialCodeList,type:r.unref(o).type,hasError:r.unref(c),describedBy:r.unref(d)},null,8,["name","label","placeholder","required","label-hidden","autocomplete","dial-code","dial-code-list","type","hasError","describedBy"])),r.unref(c)?(r.openBlock(),r.createElementBlock("div",{key:2,id:r.unref(d)},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(u),(g,y)=>(r.openBlock(),r.createElementBlock("p",{key:y,role:"alert","data-variation":"error",class:"amplify-text amplify-text--error"},r.toDisplayString(r.unref(N)(g)),1))),128))],8,a_)):r.createCommentVNode("",!0)],64))}}),we=r.defineComponent({__name:"base-form-fields",props:{route:null},setup(e){const t=e,{route:n}=r.toRefs(t),{state:o}=Dr();let i=[];return r.onBeforeMount(()=>{i=gl(n.value,o.value)}),(a,s)=>(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(i),([l,u])=>(r.openBlock(),r.createBlock(ba,{name:l,key:l,formField:u},null,8,["name","formField"]))),128))}}),Rt=r.defineComponent({__name:"federated-sign-in-button",props:{provider:null},setup(e){const t=e,{provider:n}=r.toRefs(t),{toFederatedSignIn:o}=re(),i=()=>{o({provider:n.value})};return(a,s)=>{const l=Q,u=ie;return r.openBlock(),r.createBlock(u,{class:"amplify-field-group__control federated-sign-in-button amplify-authenticator__font",fullwidth:!1,style:{"font-weight":"normal"},type:"button",onClick:i},{default:r.withCtx(()=>[r.createVNode(l,{class:"amplify-flex federated-sign-in-button-row amplify-authenticator__sign-in-button-wrapper"},{default:r.withCtx(()=>[r.renderSlot(a.$slots,"default")]),_:3})]),_:3})}}}),s_=r.createElementVNode("svg",{"aria-label":"Amazon icon",class:"amplify-icon federated-sign-in-icon",viewBox:"0 0 248 268"},[r.createElementVNode("path",{d:"M139.056521,147.024612 C133.548808,156.744524 124.782731,162.726926 115.087401,162.726926 C101.790721,162.726926 93.9937779,152.612964 93.9937779,137.68681 C93.9937779,108.224571 120.447551,102.879017 145.533369,102.879017 L145.533369,110.365976 C145.533369,123.831358 145.876354,135.063787 139.056521,147.024612 M207.206992,162.579655 C209.400505,165.692256 209.887066,169.437725 207.063416,171.770186 C199.996315,177.653081 187.429476,188.590967 180.513926,194.716661 L180.46208,194.621133 C178.176838,196.663031 174.862638,196.810303 172.27828,195.445057 C160.780281,185.9162 158.686473,181.494078 152.405048,172.403055 C133.405233,191.751331 119.909143,197.534719 95.309886,197.534719 C66.1281801,197.534719 43.4791563,179.599451 43.4791563,143.669212 C43.4791563,115.616003 58.6782107,96.5105248 80.4019706,87.1727225 C99.2063636,78.9096034 125.464714,77.4528107 145.533369,75.1641337 L145.533369,70.694248 C145.533369,62.4749122 146.167493,52.7510201 141.297893,45.6541312 C137.110277,39.2856386 129.018206,36.6586354 121.859376,36.6586354 C108.658413,36.6586354 96.9171331,43.4171982 94.0416364,57.4199213 C93.4593582,60.532522 91.1701278,63.5933787 88.003492,63.7406501 L54.4387473,60.1424518 C51.6150972,59.5095829 48.4484614,57.2248862 49.2740201,52.8982915 C56.9712583,12.2553679 93.7983558,0 126.732964,0 C143.587124,0 165.606011,4.47386604 178.902691,17.2148315 C195.760839,32.917146 194.149604,53.8694866 194.149604,76.6726704 L194.149604,130.542157 C194.149604,146.734049 200.87372,153.830938 207.206992,162.579655 Z M233.826346,208.038962 C230.467669,203.683255 211.550709,205.9821 203.056405,206.998432 C200.470662,207.321077 200.076227,205.042397 202.406981,203.404973 C217.475208,192.664928 242.201125,195.766353 245.081698,199.363845 C247.966255,202.981502 244.336653,228.071183 230.172839,240.049379 C228.001452,241.888455 225.929671,240.904388 226.89783,238.468418 C230.077218,230.430525 237.204944,212.418868 233.826346,208.038962 Z M126.768855,264 C74.0234043,264 42.0764048,241.955028 17.7852554,217.541992 C12.9733903,212.705982 6.71799208,206.295994 3.31151296,200.690918 C1.90227474,198.372135 5.59096074,195.021875 8.0442063,196.84375 C38.2390146,219.267578 82.1011654,239.538304 125.529506,239.538304 C154.819967,239.538304 191.046475,227.469543 220.66851,214.867659 C225.146771,212.966167 225.146771,219.180222 224.511585,221.060516 C224.183264,222.03242 209.514625,236.221149 189.247207,247.047411 C170.304273,257.166172 146.397132,264 126.768855,264 Z",fill:"#FF9900"})],-1),l_={class:"amplify-text amplify-authenticator__federated-text"},u_=r.createElementVNode("svg",{"aria-label":"Apple icon",class:"amplify-icon federated-sign-in-icon",fill:"#000",preserveAspectRatio:"xMidYMid",stroke:"#000",strokeWidth:"0",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},[r.createElementVNode("path",{d:"M747.4 535.7c-.4-68.2 30.5-119.6 92.9-157.5-34.9-50-87.7-77.5-157.3-82.8-65.9-5.2-138 38.4-164.4 38.4-27.9 0-91.7-36.6-141.9-36.6C273.1 298.8 163 379.8 163 544.6c0 48.7 8.9 99 26.7 150.8 23.8 68.2 109.6 235.3 199.1 232.6 46.8-1.1 79.9-33.2 140.8-33.2 59.1 0 89.7 33.2 141.9 33.2 90.3-1.3 167.9-153.2 190.5-221.6-121.1-57.1-114.6-167.2-114.6-170.7zm-105.1-305c50.7-60.2 46.1-115 44.6-134.7-44.8 2.6-96.6 30.5-126.1 64.8-32.5 36.8-51.6 82.3-47.5 133.6 48.4 3.7 92.6-21.2 129-63.7z"})],-1),c_={class:"amplify-text amplify-authenticator__federated-text"},d_=r.createElementVNode("svg",{"aria-label":"Facebook icon",class:"amplify-icon federated-sign-in-icon",viewBox:"0 0 279 538"},[r.createElementVNode("path",{d:"M82.3409742,538 L82.3409742,292.936652 L0,292.936652 L0,196.990154 L82.2410458,196.990154 L82.2410458,126.4295 C82.2410458,44.575144 132.205229,0 205.252865,0 C240.227794,0 270.306232,2.59855099 279,3.79788222 L279,89.2502322 L228.536175,89.2502322 C188.964542,89.2502322 181.270057,108.139699 181.270057,135.824262 L181.270057,196.89021 L276.202006,196.89021 L263.810888,292.836708 L181.16913,292.836708 L181.16913,538 L82.3409742,538 Z",fill:"#1877F2"})],-1),f_={class:"amplify-text amplify-authenticator__federated-text"},p_=r.createElementVNode("svg",{"aria-label":"Google icon",class:"amplify-icon federated-sign-in-icon",viewBox:"0 0 256 262",xmlns:"http://www.w3.org/2000/svg",preserveAspectRatio:"xMidYMid"},[r.createElementVNode("path",{d:"M255.878 133.451c0-10.734-.871-18.567-2.756-26.69H130.55v48.448h71.947c-1.45 12.04-9.283 30.172-26.69 42.356l-.244 1.622 38.755 30.023 2.685.268c24.659-22.774 38.875-56.282 38.875-96.027",fill:"#4285F4"}),r.createElementVNode("path",{d:"M130.55 261.1c35.248 0 64.839-11.605 86.453-31.622l-41.196-31.913c-11.024 7.688-25.82 13.055-45.257 13.055-34.523 0-63.824-22.773-74.269-54.25l-1.531.13-40.298 31.187-.527 1.465C35.393 231.798 79.49 261.1 130.55 261.1",fill:"#34A853"}),r.createElementVNode("path",{d:"M56.281 156.37c-2.756-8.123-4.351-16.827-4.351-25.82 0-8.994 1.595-17.697 4.206-25.82l-.073-1.73L15.26 71.312l-1.335.635C5.077 89.644 0 109.517 0 130.55s5.077 40.905 13.925 58.602l42.356-32.782",fill:"#FBBC05"}),r.createElementVNode("path",{d:"M130.55 50.479c24.514 0 41.05 10.589 50.479 19.438l36.844-35.974C195.245 12.91 165.798 0 130.55 0 79.49 0 35.393 29.301 13.925 71.947l42.211 32.783c10.59-31.477 39.891-54.251 74.414-54.251",fill:"#EB4335"})],-1),m_={class:"amplify-text amplify-authenticator__federated-text"},g_=["data-label"],vn=r.defineComponent({__name:"federated-sign-in",setup(e){const t=re(),{route:n,socialProviders:o}=t,i=o==null?void 0:o.includes("amazon"),a=o==null?void 0:o.includes("apple"),s=o==null?void 0:o.includes("facebook"),l=o==null?void 0:o.includes("google"),u=s||l||i||a,{getSignInWithFederationText:c,getOrText:d}=ce,m=r.computed(()=>Mn),f=r.computed(()=>c(n,"amazon")),g=r.computed(()=>c(n,"apple")),y=r.computed(()=>c(n,"facebook")),p=r.computed(()=>c(n,"google")),b=r.computed(()=>d());return(w,h)=>{const v=Q;return r.unref(u)?(r.openBlock(),r.createBlock(v,{key:0,class:"amplify-flex federated-sign-in-container amplify-authenticator__column amplify-authenticator__sign-in-base"},{default:r.withCtx(()=>[r.unref(i)?(r.openBlock(),r.createBlock(Rt,{key:0,provider:r.unref(m).Amazon},{default:r.withCtx(()=>[s_,r.createElementVNode("p",l_,r.toDisplayString(r.unref(f)),1)]),_:1},8,["provider"])):r.createCommentVNode("",!0),r.unref(a)?(r.openBlock(),r.createBlock(Rt,{key:1,provider:r.unref(m).Apple},{default:r.withCtx(()=>[u_,r.createElementVNode("p",c_,r.toDisplayString(r.unref(g)),1)]),_:1},8,["provider"])):r.createCommentVNode("",!0),r.unref(s)?(r.openBlock(),r.createBlock(Rt,{key:2,provider:r.unref(m).Facebook},{default:r.withCtx(()=>[d_,r.createElementVNode("p",f_,r.toDisplayString(r.unref(y)),1)]),_:1},8,["provider"])):r.createCommentVNode("",!0),r.unref(l)?(r.openBlock(),r.createBlock(Rt,{key:3,provider:r.unref(m).Google},{default:r.withCtx(()=>[p_,r.createElementVNode("p",m_,r.toDisplayString(r.unref(p)),1)]),_:1},8,["provider"])):r.createCommentVNode("",!0),r.createElementVNode("hr",{class:"amplify-divider amplify-divider--label amplify-divider--small","aria-orientation":"horizontal","data-size":"small","data-label":r.unref(b)},null,8,g_)]),_:1})):r.createCommentVNode("",!0)}}}),h_=r.createElementVNode("legend",{class:"amplify-visually-hidden"},"Sign in",-1),y_={"data-amplify-footer":""},jr=r.defineComponent({__name:"sign-in",emits:["signInSubmit","forgotPasswordClicked","createAccountClicked"],setup(e,{emit:t}){const n=re(),{submitForm:o,updateForm:i,toResetPassword:a}=n,{error:s,isPending:l}=r.toRefs(n),u=r.useAttrs(),{getForgotPasswordText:c,getSignInText:d,getSigningInText:m}=ce,f=r.computed(()=>c()),g=r.computed(()=>d()),y=r.computed(()=>m()),p=h=>{const{name:v,value:S}=h.target;i({name:v,value:S})},b=h=>{u!=null&&u.onSignInSubmit?t("signInSubmit",h):o(ge(h))},w=()=>{u!=null&&u.onForgotPasswordClicked?t("forgotPasswordClicked"):a()};return(h,v)=>{const S=ve,_=ye,C=ie,A=Q,T=me,I=pe;return r.renderSlot(h.$slots,"signInSlotI",r.normalizeProps(r.guardReactiveProps(h.$attrs)),()=>[r.renderSlot(h.$slots,"header"),r.createVNode(A,r.normalizeProps(r.guardReactiveProps(h.$attrs)),{default:r.withCtx(()=>[r.createVNode(T,{"data-amplify-authenticator-signin":"",onInput:p,onSubmit:r.withModifiers(b,["prevent"]),method:"post"},{formt:r.withCtx(({slotData:x})=>[r.renderSlot(h.$slots,"form",{info:x,onSignInSubmit:b,onInput:p,onForgotPasswordClicked:w})]),default:r.withCtx(()=>[r.createVNode(vn),r.createVNode(A,{class:"amplify-flex amplify-authenticator__column"},{default:r.withCtx(()=>[r.createVNode(S,{disabled:r.unref(l),class:"amplify-flex amplify-authenticator__column"},{fieldSetI:r.withCtx(({slotData:x})=>[r.renderSlot(h.$slots,"signin-fields",{info:x})]),default:r.withCtx(()=>[h_,r.createVNode(we,{route:"signIn"})]),_:3},8,["disabled"]),r.unref(s)?(r.openBlock(),r.createBlock(_,{key:0},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(N)(r.unref(s))),1)]),_:1})):r.createCommentVNode("",!0),r.createVNode(C,{disabled:r.unref(l),class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!0,loading:!1,variation:"primary"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(l)?r.unref(y):r.unref(g)),1)]),_:1},8,["disabled"])]),_:3})]),_:3},8,["onSubmit"])]),_:3},16),r.createVNode(I,null,{default:r.withCtx(()=>[r.renderSlot(h.$slots,"footer",{},()=>[r.createElementVNode("div",y_,[r.createVNode(C,{onClick:w,class:"amplify-field-group__control amplify-authenticator__font",variation:"link",fullwidth:!0,size:"small",style:{"font-weight":"normal"},type:"button"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(f)),1)]),_:1})])])]),_:3})])}}}),zr=r.defineComponent({__name:"authenticator-sign-up-form-fields",setup(e){return(t,n)=>(r.openBlock(),r.createBlock(we,{route:"signUp"}))}}),Gr=r.defineComponent({__name:"sign-up",emits:["signUpSubmit"],setup(e,{emit:t}){const n=re(),{submitForm:o,updateBlur:i,updateForm:a}=n,{error:s,hasValidationErrors:l,isPending:u}=r.toRefs(n),c=r.useAttrs(),{getCreateAccountText:d}=ce,m=r.computed(()=>d()),f=p=>{let{checked:b,name:w,type:h,value:v}=p.target;a({name:w,value:h==="checkbox"&&!b?void 0:v})};function g(p){const{name:b}=p.target;i({name:b})}const y=p=>{c!=null&&c.onSignUpSubmit?t("signUpSubmit",p):o(ge(p))};return(p,b)=>{const w=ve,h=ye,v=ie,S=Q,_=me,C=pe;return r.renderSlot(p.$slots,"signUpSlotI",r.normalizeProps(r.guardReactiveProps(p.$attrs)),()=>[r.renderSlot(p.$slots,"header"),r.createVNode(S,r.normalizeProps(r.guardReactiveProps(p.$attrs)),{default:r.withCtx(()=>[r.createVNode(_,{onInput:f,onBlurCapture:g,onSubmit:r.withModifiers(y,["prevent"])},{default:r.withCtx(()=>[r.createVNode(vn),r.createVNode(S,{class:"amplify-flex amplify-authenticator__column"},{default:r.withCtx(()=>[r.createVNode(w,{class:"amplify-flex amplify-authenticator__column",disabled:r.unref(u)},{fieldSetI:r.withCtx(({slotData:A})=>[r.renderSlot(p.$slots,"signup-fields",{info:A})]),default:r.withCtx(()=>[r.createVNode(zr)]),_:3},8,["disabled"]),r.unref(s)?(r.openBlock(),r.createBlock(h,{key:0},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(N)(r.unref(s))),1)]),_:1})):r.createCommentVNode("",!0),r.createVNode(v,{class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!0,loading:!1,variation:"primary",style:{"border-radius":"0px","font-weight":"normal"},disabled:r.unref(u)||r.unref(l)},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(m)),1)]),_:1},8,["disabled"])]),_:3})]),_:3},8,["onSubmit"])]),_:3},16),r.createVNode(C,null,{default:r.withCtx(()=>[r.renderSlot(p.$slots,"footer")]),_:3})])}}}),v_={};function w_(e,t){const n=Q;return r.openBlock(),r.createBlock(n,{tabindex:"0","aria-orientation":"horizontal","data-orientation":"horizontal",class:"amplify-authenticator__tabs",role:"tablist"},{default:r.withCtx(()=>[r.createVNode(n,{class:"amplify-flex amplify-tabs amplify-authenticator__tabs-wrapper","data-indicator-position":"top"},{default:r.withCtx(()=>[r.renderSlot(e.$slots,"default")]),_:3})]),_:3})}var S_=Qt(v_,[["render",w_]]);const __=r.defineComponent({__name:"base-two-tab-item",props:{label:null,id:null,active:{type:Boolean,default:!1}},setup(e){const t=e,{active:n,id:o,label:i}=r.toRefs(t);return(a,s)=>{const l=Q;return r.openBlock(),r.createBlock(l,{tabindex:r.unref(n)?0:-1,"data-state":r.unref(n)?"active":"inactive","aria-selected":r.unref(n)?"true":"false","aria-controls":`radix-id-${r.unref(o)}-8-content-0`,id:`radix-id-${r.unref(o)}-8-trigger-0`,"data-orientation":"horizontal",role:"tab",class:"amplify-tabs-item","data-spacing":"equal","data-radix-collection-item":""},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(i)),1)]),_:1},8,["tabindex","data-state","aria-selected","aria-controls","id"])}}}),b_="3.1.22",C_={};function E_(e,t){return r.renderSlot(e.$slots,"textI",r.normalizeProps(r.guardReactiveProps(e.$attrs)),()=>[r.createElementVNode("span",r.mergeProps(e.$attrs,{"data-amplify-text":""}),[r.renderSlot(e.$slots,"default")],16)])}var Ca=Qt(C_,[["render",E_]]);const ke=r.defineComponent({props:{level:{type:Number,default:1}},inheritAttrs:!1,setup(e,{slots:t,attrs:n}){var s,l;const o=t.default?t.default():[],i=t.headingI?t.headingI():[],a=`${n.class||""} amplify-heading--${e.level}`;if(((l=(s=i[0])==null?void 0:s.children)==null?void 0:l.length)===0)i[0].children=[r.h(`h${e.level}`,{...n,class:a},[o])];else return()=>r.h(`h${e.level}`,{"data-amplify-heading":"",...n,class:a},[i[0]?r.h(i[0].children[0]):r.h(o[0])]);return()=>i}}),Wr=r.defineComponent({__name:"confirm-sign-up",emits:["confirmSignUpSubmit","lostCodeClicked"],setup(e,{emit:t}){const n=r.useAttrs(),o=re(),{codeDeliveryDetails:i,error:a,isPending:s}=r.toRefs(o),{resendCode:l,submitForm:u,updateForm:c}=o,{getDeliveryMethodText:d,getDeliveryMessageText:m,getResendCodeText:f,getConfirmText:g}=ce,y=r.computed(()=>d(i.value)),p=r.computed(()=>f()),b=r.computed(()=>g()),w=r.computed(()=>m(i.value)),h=C=>{const{name:A,value:T}=C.target;c({name:A,value:T})},v=C=>{n!=null&&n.onConfirmSignUpSubmit?t("confirmSignUpSubmit",C):S(C)},S=C=>{u(ge(C))},_=()=>{n!=null&&n.onLostCodeClicked?t("lostCodeClicked"):l()};return(C,A)=>{const T=ke,I=Ca,x=ve,k=ye,$=ie,O=pe,W=Q,X=me;return r.renderSlot(C.$slots,"confirmSignUpSlotI",r.normalizeProps(r.guardReactiveProps(C.$attrs)),()=>[r.createVNode(W,r.normalizeProps(r.guardReactiveProps(C.$attrs)),{default:r.withCtx(()=>[r.createVNode(X,{onInput:h,onSubmit:r.withModifiers(v,["prevent"])},{default:r.withCtx(()=>[r.createVNode(W,{class:"amplify-flex amplify-authenticator__column"},{default:r.withCtx(()=>[r.renderSlot(C.$slots,"header",{},()=>[r.createVNode(T,{class:"amplify-heading amplify-authenticator__heading",level:3},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(y)),1)]),_:1})]),r.createVNode(I,{class:"amplify-authenticator__subtitle"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(w)),1)]),_:1}),r.createVNode(x,{class:"amplify-flex amplify-authenticator__column",disabled:r.unref(s)},{default:r.withCtx(()=>[r.createVNode(we,{route:"confirmSignUp"})]),_:1},8,["disabled"]),r.createVNode(O,{class:"amplify-flex amplify-authenticator__column"},{default:r.withCtx(()=>[r.unref(a)?(r.openBlock(),r.createBlock(k,{key:0},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(N)(r.unref(a))),1)]),_:1})):r.createCommentVNode("",!0),r.createVNode($,{class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!1,loading:!1,variation:"primary",type:"submit",disabled:r.unref(s)},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(b)),1)]),_:1},8,["disabled"]),r.createVNode($,{class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!1,variation:"default",style:{"font-weight":"normal"},type:"button",onClick:r.withModifiers(_,["prevent"])},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(p)),1)]),_:1},8,["onClick"]),r.renderSlot(C.$slots,"footer",{onConfirmSignUpSubmit:v,onLostCodeClicked:_})]),_:3})]),_:3})]),_:3},8,["onSubmit"])]),_:3},16)])}}}),Hr=r.defineComponent({__name:"confirm-sign-in",emits:["confirmSignInSubmit","backToSignInClicked"],setup(e,{emit:t}){const n=r.useAttrs(),o=re(),{submitForm:i,toSignIn:a,updateForm:s}=o,{user:l,error:u,isPending:c}=r.toRefs(o),d=r.computed(()=>l.value.challengeName),{getBackToSignInText:m,getConfirmText:f,getChallengeText:g}=ce,y=r.computed(()=>g(d.value)),p=r.computed(()=>m()),b=r.computed(()=>f()),w=S=>{const{name:_,value:C}=S.target;s({name:_,value:C})},h=S=>{n!=null&&n.onConfirmSignInSubmit?t("confirmSignInSubmit",S):i(ge(S))},v=()=>{n!=null&&n.onBackToSignInClicked?t("backToSignInClicked"):a()};return(S,_)=>{const C=ke,A=Q,T=ye,I=ie,x=pe,k=ve,$=me;return r.renderSlot(S.$slots,"confirmSignInSlotI",r.normalizeProps(r.guardReactiveProps(S.$attrs)),()=>[r.createVNode(A,r.normalizeProps(r.guardReactiveProps(S.$attrs)),{default:r.withCtx(()=>[r.createVNode($,{"data-amplify-authenticator-confirmsignin":"",onInput:w,onSubmit:r.withModifiers(h,["prevent"])},{default:r.withCtx(()=>[r.createVNode(k,{class:"amplify-flex amplify-authenticator__column",disabled:r.unref(c)},{default:r.withCtx(()=>[r.renderSlot(S.$slots,"header",{},()=>[r.createVNode(C,{level:3,class:"amplify-heading"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(y)),1)]),_:1})]),r.createVNode(A,{class:"amplify-flex amplify-authenticator__column"},{default:r.withCtx(()=>[r.createVNode(we,{route:"confirmSignIn"})]),_:1}),r.createVNode(x,{class:"amplify-flex amplify-authenticator__column"},{default:r.withCtx(()=>[r.unref(u)?(r.openBlock(),r.createBlock(T,{key:0},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(N)(r.unref(u))),1)]),_:1})):r.createCommentVNode("",!0),r.createVNode(I,{class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!1,loading:!1,variation:"primary",style:{"font-weight":"normal"},disabled:r.unref(c)},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(b)),1)]),_:1},8,["disabled"]),r.createVNode(I,{class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!1,size:"small",variation:"link",style:{"font-weight":"normal"},type:"button",onClick:r.withModifiers(v,["prevent"])},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(p)),1)]),_:1},8,["onClick"]),r.renderSlot(S.$slots,"footer",{onBackToSignInClicked:v,onConfirmSignInSubmit:h})]),_:3})]),_:3},8,["disabled"])]),_:3},8,["onSubmit"])]),_:3},16)])}}});var Ct={},A_=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then},Ea={},le={};let Yr;const T_=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];le.getSymbolSize=function(t){if(!t)throw new Error('"version" cannot be null or undefined');if(t<1||t>40)throw new Error('"version" should be in range from 1 to 40');return t*4+17};le.getSymbolTotalCodewords=function(t){return T_[t]};le.getBCHDigit=function(e){let t=0;for(;e!==0;)t++,e>>>=1;return t};le.setToSJISFunction=function(t){if(typeof t!="function")throw new Error('"toSJISFunc" is not a valid function.');Yr=t};le.isKanjiModeEnabled=function(){return typeof Yr!="undefined"};le.toSJIS=function(t){return Yr(t)};var wn={};(function(e){e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2};function t(n){if(typeof n!="string")throw new Error("Param is not a string");switch(n.toLowerCase()){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+n)}}e.isValid=function(o){return o&&typeof o.bit!="undefined"&&o.bit>=0&&o.bit<4},e.from=function(o,i){if(e.isValid(o))return o;try{return t(o)}catch{return i}}})(wn);function Aa(){this.buffer=[],this.length=0}Aa.prototype={get:function(e){const t=Math.floor(e/8);return(this.buffer[t]>>>7-e%8&1)===1},put:function(e,t){for(let n=0;n<t;n++)this.putBit((e>>>t-n-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(e){const t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}};var I_=Aa;function Et(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}Et.prototype.set=function(e,t,n,o){const i=e*this.size+t;this.data[i]=n,o&&(this.reservedBit[i]=!0)};Et.prototype.get=function(e,t){return this.data[e*this.size+t]};Et.prototype.xor=function(e,t,n){this.data[e*this.size+t]^=n};Et.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]};var P_=Et,Ta={};(function(e){const t=le.getSymbolSize;e.getRowColCoords=function(o){if(o===1)return[];const i=Math.floor(o/7)+2,a=t(o),s=a===145?26:Math.ceil((a-13)/(2*i-2))*2,l=[a-7];for(let u=1;u<i-1;u++)l[u]=l[u-1]-s;return l.push(6),l.reverse()},e.getPositions=function(o){const i=[],a=e.getRowColCoords(o),s=a.length;for(let l=0;l<s;l++)for(let u=0;u<s;u++)l===0&&u===0||l===0&&u===s-1||l===s-1&&u===0||i.push([a[l],a[u]]);return i}})(Ta);var Ia={};const k_=le.getSymbolSize,si=7;Ia.getPositions=function(t){const n=k_(t);return[[0,0],[n-si,0],[0,n-si]]};var Pa={};(function(e){e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const t={N1:3,N2:3,N3:40,N4:10};e.isValid=function(i){return i!=null&&i!==""&&!isNaN(i)&&i>=0&&i<=7},e.from=function(i){return e.isValid(i)?parseInt(i,10):void 0},e.getPenaltyN1=function(i){const a=i.size;let s=0,l=0,u=0,c=null,d=null;for(let m=0;m<a;m++){l=u=0,c=d=null;for(let f=0;f<a;f++){let g=i.get(m,f);g===c?l++:(l>=5&&(s+=t.N1+(l-5)),c=g,l=1),g=i.get(f,m),g===d?u++:(u>=5&&(s+=t.N1+(u-5)),d=g,u=1)}l>=5&&(s+=t.N1+(l-5)),u>=5&&(s+=t.N1+(u-5))}return s},e.getPenaltyN2=function(i){const a=i.size;let s=0;for(let l=0;l<a-1;l++)for(let u=0;u<a-1;u++){const c=i.get(l,u)+i.get(l,u+1)+i.get(l+1,u)+i.get(l+1,u+1);(c===4||c===0)&&s++}return s*t.N2},e.getPenaltyN3=function(i){const a=i.size;let s=0,l=0,u=0;for(let c=0;c<a;c++){l=u=0;for(let d=0;d<a;d++)l=l<<1&2047|i.get(c,d),d>=10&&(l===1488||l===93)&&s++,u=u<<1&2047|i.get(d,c),d>=10&&(u===1488||u===93)&&s++}return s*t.N3},e.getPenaltyN4=function(i){let a=0;const s=i.data.length;for(let u=0;u<s;u++)a+=i.data[u];return Math.abs(Math.ceil(a*100/s/5)-10)*t.N4};function n(o,i,a){switch(o){case e.Patterns.PATTERN000:return(i+a)%2===0;case e.Patterns.PATTERN001:return i%2===0;case e.Patterns.PATTERN010:return a%3===0;case e.Patterns.PATTERN011:return(i+a)%3===0;case e.Patterns.PATTERN100:return(Math.floor(i/2)+Math.floor(a/3))%2===0;case e.Patterns.PATTERN101:return i*a%2+i*a%3===0;case e.Patterns.PATTERN110:return(i*a%2+i*a%3)%2===0;case e.Patterns.PATTERN111:return(i*a%3+(i+a)%2)%2===0;default:throw new Error("bad maskPattern:"+o)}}e.applyMask=function(i,a){const s=a.size;for(let l=0;l<s;l++)for(let u=0;u<s;u++)a.isReserved(u,l)||a.xor(u,l,n(i,u,l))},e.getBestMask=function(i,a){const s=Object.keys(e.Patterns).length;let l=0,u=1/0;for(let c=0;c<s;c++){a(c),e.applyMask(c,i);const d=e.getPenaltyN1(i)+e.getPenaltyN2(i)+e.getPenaltyN3(i)+e.getPenaltyN4(i);e.applyMask(c,i),d<u&&(u=d,l=c)}return l}})(Pa);var Sn={};const Ie=wn,Ut=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],Bt=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];Sn.getBlocksCount=function(t,n){switch(n){case Ie.L:return Ut[(t-1)*4+0];case Ie.M:return Ut[(t-1)*4+1];case Ie.Q:return Ut[(t-1)*4+2];case Ie.H:return Ut[(t-1)*4+3];default:return}};Sn.getTotalCodewordsCount=function(t,n){switch(n){case Ie.L:return Bt[(t-1)*4+0];case Ie.M:return Bt[(t-1)*4+1];case Ie.Q:return Bt[(t-1)*4+2];case Ie.H:return Bt[(t-1)*4+3];default:return}};var ka={},_n={};const pt=new Uint8Array(512),Jt=new Uint8Array(256);(function(){let t=1;for(let n=0;n<255;n++)pt[n]=t,Jt[t]=n,t<<=1,t&256&&(t^=285);for(let n=255;n<512;n++)pt[n]=pt[n-255]})();_n.log=function(t){if(t<1)throw new Error("log("+t+")");return Jt[t]};_n.exp=function(t){return pt[t]};_n.mul=function(t,n){return t===0||n===0?0:pt[Jt[t]+Jt[n]]};(function(e){const t=_n;e.mul=function(o,i){const a=new Uint8Array(o.length+i.length-1);for(let s=0;s<o.length;s++)for(let l=0;l<i.length;l++)a[s+l]^=t.mul(o[s],i[l]);return a},e.mod=function(o,i){let a=new Uint8Array(o);for(;a.length-i.length>=0;){const s=a[0];for(let u=0;u<i.length;u++)a[u]^=t.mul(i[u],s);let l=0;for(;l<a.length&&a[l]===0;)l++;a=a.slice(l)}return a},e.generateECPolynomial=function(o){let i=new Uint8Array([1]);for(let a=0;a<o;a++)i=e.mul(i,new Uint8Array([1,t.exp(a)]));return i}})(ka);const Na=ka;function Kr(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}Kr.prototype.initialize=function(t){this.degree=t,this.genPoly=Na.generateECPolynomial(this.degree)};Kr.prototype.encode=function(t){if(!this.genPoly)throw new Error("Encoder not initialized");const n=new Uint8Array(t.length+this.degree);n.set(t);const o=Na.mod(n,this.genPoly),i=this.degree-o.length;if(i>0){const a=new Uint8Array(this.degree);return a.set(o,i),a}return o};var N_=Kr,xa={},Ne={},qr={};qr.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40};var Se={};const $a="[0-9]+",x_="[A-Z $%*+\\-./:]+";let vt="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";vt=vt.replace(/u/g,"\\u");const $_="(?:(?![A-Z0-9 $%*+\\-./:]|"+vt+`)(?:.|[\r
33
33
  ]))+`;Se.KANJI=new RegExp(vt,"g");Se.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");Se.BYTE=new RegExp($_,"g");Se.NUMERIC=new RegExp($a,"g");Se.ALPHANUMERIC=new RegExp(x_,"g");const O_=new RegExp("^"+vt+"$"),R_=new RegExp("^"+$a+"$"),U_=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");Se.testKanji=function(t){return O_.test(t)};Se.testNumeric=function(t){return R_.test(t)};Se.testAlphanumeric=function(t){return U_.test(t)};(function(e){const t=qr,n=Se;e.NUMERIC={id:"Numeric",bit:1<<0,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:1<<1,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:1<<2,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:1<<3,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(a,s){if(!a.ccBits)throw new Error("Invalid mode: "+a);if(!t.isValid(s))throw new Error("Invalid version: "+s);return s>=1&&s<10?a.ccBits[0]:s<27?a.ccBits[1]:a.ccBits[2]},e.getBestModeForData=function(a){return n.testNumeric(a)?e.NUMERIC:n.testAlphanumeric(a)?e.ALPHANUMERIC:n.testKanji(a)?e.KANJI:e.BYTE},e.toString=function(a){if(a&&a.id)return a.id;throw new Error("Invalid mode")},e.isValid=function(a){return a&&a.bit&&a.ccBits};function o(i){if(typeof i!="string")throw new Error("Param is not a string");switch(i.toLowerCase()){case"numeric":return e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+i)}}e.from=function(a,s){if(e.isValid(a))return a;try{return o(a)}catch{return s}}})(Ne);(function(e){const t=le,n=Sn,o=wn,i=Ne,a=qr,s=1<<12|1<<11|1<<10|1<<9|1<<8|1<<5|1<<2|1<<0,l=t.getBCHDigit(s);function u(f,g,y){for(let p=1;p<=40;p++)if(g<=e.getCapacity(p,y,f))return p}function c(f,g){return i.getCharCountIndicator(f,g)+4}function d(f,g){let y=0;return f.forEach(function(p){y+=c(p.mode,g)+p.getBitsLength()}),y}function m(f,g){for(let y=1;y<=40;y++)if(d(f,y)<=e.getCapacity(y,g,i.MIXED))return y}e.from=function(g,y){return a.isValid(g)?parseInt(g,10):y},e.getCapacity=function(g,y,p){if(!a.isValid(g))throw new Error("Invalid QR Code version");typeof p=="undefined"&&(p=i.BYTE);const b=t.getSymbolTotalCodewords(g),w=n.getTotalCodewordsCount(g,y),h=(b-w)*8;if(p===i.MIXED)return h;const v=h-c(p,g);switch(p){case i.NUMERIC:return Math.floor(v/10*3);case i.ALPHANUMERIC:return Math.floor(v/11*2);case i.KANJI:return Math.floor(v/13);case i.BYTE:default:return Math.floor(v/8)}},e.getBestVersionForData=function(g,y){let p;const b=o.from(y,o.M);if(Array.isArray(g)){if(g.length>1)return m(g,b);if(g.length===0)return 1;p=g[0]}else p=g;return u(p.mode,p.getLength(),b)},e.getEncodedBits=function(g){if(!a.isValid(g)||g<7)throw new Error("Invalid QR Code version");let y=g<<12;for(;t.getBCHDigit(y)-l>=0;)y^=s<<t.getBCHDigit(y)-l;return g<<12|y}})(xa);var Oa={};const nr=le,Ra=1<<10|1<<8|1<<5|1<<4|1<<2|1<<1|1<<0,B_=1<<14|1<<12|1<<10|1<<4|1<<1,li=nr.getBCHDigit(Ra);Oa.getEncodedBits=function(t,n){const o=t.bit<<3|n;let i=o<<10;for(;nr.getBCHDigit(i)-li>=0;)i^=Ra<<nr.getBCHDigit(i)-li;return(o<<10|i)^B_};var Ua={};const F_=Ne;function He(e){this.mode=F_.NUMERIC,this.data=e.toString()}He.getBitsLength=function(t){return 10*Math.floor(t/3)+(t%3?t%3*3+1:0)};He.prototype.getLength=function(){return this.data.length};He.prototype.getBitsLength=function(){return He.getBitsLength(this.data.length)};He.prototype.write=function(t){let n,o,i;for(n=0;n+3<=this.data.length;n+=3)o=this.data.substr(n,3),i=parseInt(o,10),t.put(i,10);const a=this.data.length-n;a>0&&(o=this.data.substr(n),i=parseInt(o,10),t.put(i,a*3+1))};var M_=He;const V_=Ne,On=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function Ye(e){this.mode=V_.ALPHANUMERIC,this.data=e}Ye.getBitsLength=function(t){return 11*Math.floor(t/2)+6*(t%2)};Ye.prototype.getLength=function(){return this.data.length};Ye.prototype.getBitsLength=function(){return Ye.getBitsLength(this.data.length)};Ye.prototype.write=function(t){let n;for(n=0;n+2<=this.data.length;n+=2){let o=On.indexOf(this.data[n])*45;o+=On.indexOf(this.data[n+1]),t.put(o,11)}this.data.length%2&&t.put(On.indexOf(this.data[n]),6)};var D_=Ye,L_=function(t){for(var n=[],o=t.length,i=0;i<o;i++){var a=t.charCodeAt(i);if(a>=55296&&a<=56319&&o>i+1){var s=t.charCodeAt(i+1);s>=56320&&s<=57343&&(a=(a-55296)*1024+s-56320+65536,i+=1)}if(a<128){n.push(a);continue}if(a<2048){n.push(a>>6|192),n.push(a&63|128);continue}if(a<55296||a>=57344&&a<65536){n.push(a>>12|224),n.push(a>>6&63|128),n.push(a&63|128);continue}if(a>=65536&&a<=1114111){n.push(a>>18|240),n.push(a>>12&63|128),n.push(a>>6&63|128),n.push(a&63|128);continue}n.push(239,191,189)}return new Uint8Array(n).buffer};const j_=L_,z_=Ne;function Ke(e){this.mode=z_.BYTE,this.data=new Uint8Array(j_(e))}Ke.getBitsLength=function(t){return t*8};Ke.prototype.getLength=function(){return this.data.length};Ke.prototype.getBitsLength=function(){return Ke.getBitsLength(this.data.length)};Ke.prototype.write=function(e){for(let t=0,n=this.data.length;t<n;t++)e.put(this.data[t],8)};var G_=Ke;const W_=Ne,H_=le;function qe(e){this.mode=W_.KANJI,this.data=e}qe.getBitsLength=function(t){return t*13};qe.prototype.getLength=function(){return this.data.length};qe.prototype.getBitsLength=function(){return qe.getBitsLength(this.data.length)};qe.prototype.write=function(e){let t;for(t=0;t<this.data.length;t++){let n=H_.toSJIS(this.data[t]);if(n>=33088&&n<=40956)n-=33088;else if(n>=57408&&n<=60351)n-=49472;else throw new Error("Invalid SJIS character: "+this.data[t]+`
34
34
  Make sure your charset is UTF-8`);n=(n>>>8&255)*192+(n&255),e.put(n,13)}};var Y_=qe,Ba={exports:{}};(function(e){var t={single_source_shortest_paths:function(n,o,i){var a={},s={};s[o]=0;var l=t.PriorityQueue.make();l.push(o,0);for(var u,c,d,m,f,g,y,p,b;!l.empty();){u=l.pop(),c=u.value,m=u.cost,f=n[c]||{};for(d in f)f.hasOwnProperty(d)&&(g=f[d],y=m+g,p=s[d],b=typeof s[d]=="undefined",(b||p>y)&&(s[d]=y,l.push(d,y),a[d]=c))}if(typeof i!="undefined"&&typeof s[i]=="undefined"){var w=["Could not find a path from ",o," to ",i,"."].join("");throw new Error(w)}return a},extract_shortest_path_from_predecessor_list:function(n,o){for(var i=[],a=o;a;)i.push(a),n[a],a=n[a];return i.reverse(),i},find_path:function(n,o,i){var a=t.single_source_shortest_paths(n,o,i);return t.extract_shortest_path_from_predecessor_list(a,i)},PriorityQueue:{make:function(n){var o=t.PriorityQueue,i={},a;n=n||{};for(a in o)o.hasOwnProperty(a)&&(i[a]=o[a]);return i.queue=[],i.sorter=n.sorter||o.default_sorter,i},default_sorter:function(n,o){return n.cost-o.cost},push:function(n,o){var i={value:n,cost:o};this.queue.push(i),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};e.exports=t})(Ba);(function(e){const t=Ne,n=M_,o=D_,i=G_,a=Y_,s=Se,l=le,u=Ba.exports;function c(w){return unescape(encodeURIComponent(w)).length}function d(w,h,v){const S=[];let _;for(;(_=w.exec(v))!==null;)S.push({data:_[0],index:_.index,mode:h,length:_[0].length});return S}function m(w){const h=d(s.NUMERIC,t.NUMERIC,w),v=d(s.ALPHANUMERIC,t.ALPHANUMERIC,w);let S,_;return l.isKanjiModeEnabled()?(S=d(s.BYTE,t.BYTE,w),_=d(s.KANJI,t.KANJI,w)):(S=d(s.BYTE_KANJI,t.BYTE,w),_=[]),h.concat(v,S,_).sort(function(A,T){return A.index-T.index}).map(function(A){return{data:A.data,mode:A.mode,length:A.length}})}function f(w,h){switch(h){case t.NUMERIC:return n.getBitsLength(w);case t.ALPHANUMERIC:return o.getBitsLength(w);case t.KANJI:return a.getBitsLength(w);case t.BYTE:return i.getBitsLength(w)}}function g(w){return w.reduce(function(h,v){const S=h.length-1>=0?h[h.length-1]:null;return S&&S.mode===v.mode?(h[h.length-1].data+=v.data,h):(h.push(v),h)},[])}function y(w){const h=[];for(let v=0;v<w.length;v++){const S=w[v];switch(S.mode){case t.NUMERIC:h.push([S,{data:S.data,mode:t.ALPHANUMERIC,length:S.length},{data:S.data,mode:t.BYTE,length:S.length}]);break;case t.ALPHANUMERIC:h.push([S,{data:S.data,mode:t.BYTE,length:S.length}]);break;case t.KANJI:h.push([S,{data:S.data,mode:t.BYTE,length:c(S.data)}]);break;case t.BYTE:h.push([{data:S.data,mode:t.BYTE,length:c(S.data)}])}}return h}function p(w,h){const v={},S={start:{}};let _=["start"];for(let C=0;C<w.length;C++){const A=w[C],T=[];for(let I=0;I<A.length;I++){const x=A[I],k=""+C+I;T.push(k),v[k]={node:x,lastCount:0},S[k]={};for(let $=0;$<_.length;$++){const O=_[$];v[O]&&v[O].node.mode===x.mode?(S[O][k]=f(v[O].lastCount+x.length,x.mode)-f(v[O].lastCount,x.mode),v[O].lastCount+=x.length):(v[O]&&(v[O].lastCount=x.length),S[O][k]=f(x.length,x.mode)+4+t.getCharCountIndicator(x.mode,h))}}_=T}for(let C=0;C<_.length;C++)S[_[C]].end=0;return{map:S,table:v}}function b(w,h){let v;const S=t.getBestModeForData(w);if(v=t.from(h,S),v!==t.BYTE&&v.bit<S.bit)throw new Error('"'+w+'" cannot be encoded with mode '+t.toString(v)+`.
35
35
  Suggested mode is: `+t.toString(S));switch(v===t.KANJI&&!l.isKanjiModeEnabled()&&(v=t.BYTE),v){case t.NUMERIC:return new n(w);case t.ALPHANUMERIC:return new o(w);case t.KANJI:return new a(w);case t.BYTE:return new i(w)}}e.fromArray=function(h){return h.reduce(function(v,S){return typeof S=="string"?v.push(b(S,null)):S.data&&v.push(b(S.data,S.mode)),v},[])},e.fromString=function(h,v){const S=m(h,l.isKanjiModeEnabled()),_=y(S),C=p(_,v),A=u.find_path(C.map,"start","end"),T=[];for(let I=1;I<A.length-1;I++)T.push(C.table[A[I]].node);return e.fromArray(g(T))},e.rawSplit=function(h){return e.fromArray(m(h,l.isKanjiModeEnabled()))}})(Ua);const bn=le,Rn=wn,K_=I_,q_=P_,J_=Ta,Z_=Ia,rr=Pa,or=Sn,Q_=N_,Zt=xa,X_=Oa,eb=Ne,Un=Ua;function tb(e,t){const n=e.size,o=Z_.getPositions(t);for(let i=0;i<o.length;i++){const a=o[i][0],s=o[i][1];for(let l=-1;l<=7;l++)if(!(a+l<=-1||n<=a+l))for(let u=-1;u<=7;u++)s+u<=-1||n<=s+u||(l>=0&&l<=6&&(u===0||u===6)||u>=0&&u<=6&&(l===0||l===6)||l>=2&&l<=4&&u>=2&&u<=4?e.set(a+l,s+u,!0,!0):e.set(a+l,s+u,!1,!0))}}function nb(e){const t=e.size;for(let n=8;n<t-8;n++){const o=n%2===0;e.set(n,6,o,!0),e.set(6,n,o,!0)}}function rb(e,t){const n=J_.getPositions(t);for(let o=0;o<n.length;o++){const i=n[o][0],a=n[o][1];for(let s=-2;s<=2;s++)for(let l=-2;l<=2;l++)s===-2||s===2||l===-2||l===2||s===0&&l===0?e.set(i+s,a+l,!0,!0):e.set(i+s,a+l,!1,!0)}}function ob(e,t){const n=e.size,o=Zt.getEncodedBits(t);let i,a,s;for(let l=0;l<18;l++)i=Math.floor(l/3),a=l%3+n-8-3,s=(o>>l&1)===1,e.set(i,a,s,!0),e.set(a,i,s,!0)}function Bn(e,t,n){const o=e.size,i=X_.getEncodedBits(t,n);let a,s;for(a=0;a<15;a++)s=(i>>a&1)===1,a<6?e.set(a,8,s,!0):a<8?e.set(a+1,8,s,!0):e.set(o-15+a,8,s,!0),a<8?e.set(8,o-a-1,s,!0):a<9?e.set(8,15-a-1+1,s,!0):e.set(8,15-a-1,s,!0);e.set(o-8,8,1,!0)}function ib(e,t){const n=e.size;let o=-1,i=n-1,a=7,s=0;for(let l=n-1;l>0;l-=2)for(l===6&&l--;;){for(let u=0;u<2;u++)if(!e.isReserved(i,l-u)){let c=!1;s<t.length&&(c=(t[s]>>>a&1)===1),e.set(i,l-u,c),a--,a===-1&&(s++,a=7)}if(i+=o,i<0||n<=i){i-=o,o=-o;break}}}function ab(e,t,n){const o=new K_;n.forEach(function(u){o.put(u.mode.bit,4),o.put(u.getLength(),eb.getCharCountIndicator(u.mode,e)),u.write(o)});const i=bn.getSymbolTotalCodewords(e),a=or.getTotalCodewordsCount(e,t),s=(i-a)*8;for(o.getLengthInBits()+4<=s&&o.put(0,4);o.getLengthInBits()%8!==0;)o.putBit(0);const l=(s-o.getLengthInBits())/8;for(let u=0;u<l;u++)o.put(u%2?17:236,8);return sb(o,e,t)}function sb(e,t,n){const o=bn.getSymbolTotalCodewords(t),i=or.getTotalCodewordsCount(t,n),a=o-i,s=or.getBlocksCount(t,n),l=o%s,u=s-l,c=Math.floor(o/s),d=Math.floor(a/s),m=d+1,f=c-d,g=new Q_(f);let y=0;const p=new Array(s),b=new Array(s);let w=0;const h=new Uint8Array(e.buffer);for(let A=0;A<s;A++){const T=A<u?d:m;p[A]=h.slice(y,y+T),b[A]=g.encode(p[A]),y+=T,w=Math.max(w,T)}const v=new Uint8Array(o);let S=0,_,C;for(_=0;_<w;_++)for(C=0;C<s;C++)_<p[C].length&&(v[S++]=p[C][_]);for(_=0;_<f;_++)for(C=0;C<s;C++)v[S++]=b[C][_];return v}function lb(e,t,n,o){let i;if(Array.isArray(e))i=Un.fromArray(e);else if(typeof e=="string"){let c=t;if(!c){const d=Un.rawSplit(e);c=Zt.getBestVersionForData(d,n)}i=Un.fromString(e,c||40)}else throw new Error("Invalid data");const a=Zt.getBestVersionForData(i,n);if(!a)throw new Error("The amount of data is too big to be stored in a QR Code");if(!t)t=a;else if(t<a)throw new Error(`