@aws-amplify/ui-vue 4.0.0 → 4.0.1
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 +1 -1
- package/dist/index.js +1 -1
- package/dist/style.css +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.d.ts.map +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -16,7 +16,7 @@ PERFORMANCE OF THIS SOFTWARE.
|
|
|
16
16
|
Event: `).concat(JSON.stringify(f.data)));return o.scheduler.schedule(function(){o.forward(f);var p=o._nextState(f);o.update(p,f)}),o._state},this.sendTo=function(d,m,f){var p=o.parent&&(m===Ie.Parent||o.parent.id===m),h=p?o.parent:M(m)?m===Ie.Internal?o:o.children.get(m)||nt.get(m):bc(m)?m:void 0;if(!h){if(!p)throw new Error("Unable to send event to child '".concat(m,"' from service '").concat(o.id,"'."));return}if("machine"in h){if(o.status!==Y.Stopped||o.parent!==h||o.state.done){var v=b(b({},d),{name:d.name===cr?"".concat(Be(o.id)):d.name,origin:o.sessionId});!f&&o.machine.config.predictableActionArguments?o._outgoingQueue.push([h,v]):h.send(v)}}else!f&&o.machine.config.predictableActionArguments?o._outgoingQueue.push([h,d.data]):h.send(d.data)},this._exec=function(d,m,f,p){p===void 0&&(p=o.machine.options.actions);var h=d.exec||jt(d.type,p),v=D(h)?h:h?h.exec:d.exec;if(v)try{return v(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 He:{var S=d;o.defer(S);break}case wt:var g=d;if(typeof g.delay=="number"){o.defer(g);return}else g.to?o.sendTo(g._event,g.to,f===xe):o.send(g._event);break;case sr:o.cancel(d.sendId);break;case Vt:{if(o.status!==Y.Running)return;var w=d.activity;if(!o.machine.config.predictableActionArguments&&!o.state.activities[w.id||w.type])break;if(w.type===V.Invoke){var y=ui(w.src),_=o.machine.options.services?o.machine.options.services[y.type]:void 0,C=w.id,A=w.data,E="autoForward"in w?w.autoForward:!!w.forward;if(!_)return;var T=A?zt(A,m,f):void 0;if(typeof _=="string")return;var N=D(_)?_(m,f.data,{data:T,src:y,meta:w.meta}):_;if(!N)return;var k=void 0;Ve(N)&&(N=T?N.withContext(T):N,k={autoForward:E}),o.spawn(N,C,k)}else o.spawnActivity(w);break}case Xt:{o.stopChild(d.activity.id);break}case tn:var I=d,x=I.label,R=I.value;x?o.logger(x,R):o.logger(R);break}};var i=b(b({},e.defaultOptions),n),a=i.clock,s=i.logger,c=i.parent,l=i.id,u=l!==void 0?l:t.id;this.id=u,this.logger=s,this.clock=a,this.parent=c,this.options=i,this.scheduler=new no({deferEvents:this.options.deferEvents}),this.sessionId=nt.bookId()}return Object.defineProperty(e.prototype,"initialState",{get:function(){var t=this;return this._initialState?this._initialState:Me(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=O(t.actions),s=a.next();!s.done;s=a.next()){var c=s.value;this.exec(c,t,n)}}catch(l){o={error:l}}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,c,l,u,d,m=this;if(t._sessionid=this.sessionId,this._state=t,(!this.machine.config.predictableActionArguments||n===xe)&&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(N){m.state.children[N.id]=N}),this.devTools&&this.devTools.send(n.data,t),t.event)try{for(var p=O(this.eventListeners),h=p.next();!h.done;h=p.next()){var v=h.value;v(t.event)}}catch(N){o={error:N}}finally{try{h&&!h.done&&(i=p.return)&&i.call(p)}finally{if(o)throw o.error}}try{for(var S=O(this.listeners),g=S.next();!g.done;g=S.next()){var v=g.value;v(t,t.event)}}catch(N){a={error:N}}finally{try{g&&!g.done&&(s=S.return)&&s.call(S)}finally{if(a)throw a.error}}try{for(var w=O(this.contextListeners),y=w.next();!y.done;y=w.next()){var _=y.value;_(this.state.context,this.state.history?this.state.history.context:void 0)}}catch(N){c={error:N}}finally{try{y&&!y.done&&(l=w.return)&&l.call(w)}finally{if(c)throw c.error}}if(this.state.done){var C=t.configuration.find(function(N){return N.type==="final"&&N.parent===m.machine}),A=C&&C.doneData?zt(C.doneData,t.context,n):void 0;this._doneEvent=dt(this.id,A);try{for(var E=O(this.doneListeners),T=E.next();!T.done;T=E.next()){var v=T.value;v(this._doneEvent)}}catch(N){u={error:N}}finally{try{T&&!T.done&&(d=E.return)&&d.call(E)}finally{if(u)throw u.error}}this._stop(),this._stopChildren(),nt.free(this.sessionId)}},e.prototype.onTransition=function(t){return this.listeners.add(t),this.status===Y.Running&&t(this.state,this.state.event),this},e.prototype.subscribe=function(t,n,o){var i=this,a=Mt(t,n,o);this.listeners.add(a.next),this.status!==Y.NotStarted&&a.next(this.state);var s=function(){i.doneListeners.delete(s),i.stopListeners.delete(s),a.complete()};return this.status===Y.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===Y.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===Y.Running)return this;this.machine._init(),nt.register(this.sessionId,this),this.initialized=!0,this.status=Y.Running;var o=t===void 0?this.initialState:Me(this,function(){return jc(t)?n.machine.resolveState(t):n.machine.resolveState(le.from(t,n.machine.context))});return this.options.devTools&&this.attachDev(),this.scheduler.initialize(function(){n.update(o,xe)}),this},e.prototype._stopChildren=function(){this.children.forEach(function(t){D(t.stop)&&t.stop()}),this.children.clear()},e.prototype._stop=function(){var t,n,o,i,a,s,c,l,u,d;try{for(var m=O(this.listeners),f=m.next();!f.done;f=m.next()){var p=f.value;this.listeners.delete(p)}}catch(E){t={error:E}}finally{try{f&&!f.done&&(n=m.return)&&n.call(m)}finally{if(t)throw t.error}}try{for(var h=O(this.stopListeners),v=h.next();!v.done;v=h.next()){var p=v.value;p(),this.stopListeners.delete(p)}}catch(E){o={error:E}}finally{try{v&&!v.done&&(i=h.return)&&i.call(h)}finally{if(o)throw o.error}}try{for(var S=O(this.contextListeners),g=S.next();!g.done;g=S.next()){var p=g.value;this.contextListeners.delete(p)}}catch(E){a={error:E}}finally{try{g&&!g.done&&(s=S.return)&&s.call(S)}finally{if(a)throw a.error}}try{for(var w=O(this.doneListeners),y=w.next();!y.done;y=w.next()){var p=y.value;this.doneListeners.delete(p)}}catch(E){c={error:E}}finally{try{y&&!y.done&&(l=w.return)&&l.call(w)}finally{if(c)throw c.error}}if(!this.initialized)return this;this.initialized=!1,this.status=Y.Stopped,this._initialState=void 0;try{for(var _=O(Object.keys(this.delayedEventsMap)),C=_.next();!C.done;C=_.next()){var A=C.value;this.clock.clearTimeout(this.delayedEventsMap[A])}}catch(E){u={error:E}}finally{try{C&&!C.done&&(d=_.return)&&d.call(_)}finally{if(u)throw u.error}}this.scheduler.clear(),this.scheduler=new no({deferEvents:this.options.deferEvents})},e.prototype.stop=function(){var t=this,n=this.scheduler;return this._stop(),n.schedule(function(){var o=q({type:"xstate.stop"}),i=Me(t,function(){var a=j(G([],F(t.state.configuration),!1).sort(function(d,m){return m.order-d.order}).map(function(d){return we(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),c=s[0],l=s[1],u=new le({value:t.state.value,context:l,_event:o,_sessionid:t.sessionId,historyValue:void 0,history:t.state,actions:c.filter(function(d){return!Ln(d)}),activities:{},events:[],configuration:[],transitions:[],children:{},done:t.state.done,tags:t.state.tags,machine:t.machine});return u.changed=!0,u});t.update(i,o),t._stopChildren(),nt.free(t.sessionId)}),this},e.prototype.batch=function(t){var n=this;if(this.status===Y.NotStarted&&this.options.deferEvents)mt||Vn(!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.
|
|
17
17
|
Event: `).concat(JSON.stringify(event)));else if(this.status!==Y.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,c=!1,l=[],u=function(p){var h=q(p);n.forward(h),s=Me(n,function(){return n.machine.transition(s,h,void 0,o||void 0)}),l.push.apply(l,G([],F(n.machine.config.predictableActionArguments?s.actions:s.actions.map(function(v){return Wc(v,s)})),!1)),c=c||!!s.changed};try{for(var d=O(t),m=d.next();!m.done;m=d.next()){var f=m.value;u(f)}}catch(p){i={error:p}}finally{try{m&&!m.done&&(a=d.return)&&a.call(d)}finally{if(i)throw i.error}}s.changed=c,s.actions=l,n.update(s,q(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=q(t);if(i.name.indexOf(Dn)===0&&!this.state.nextEvents.some(function(s){return s.indexOf(Dn)===0}))throw i.data.data;var a=Me(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=O(this.forwardTo),a=i.next();!a.done;a=i.next()){var s=a.value,c=this.children.get(s);if(!c)throw new Error("Unable to forward event '".concat(t,"' from interpreter '").concat(this.id,"' to nonexistant child '").concat(s,"'."));c.send(t)}}catch(l){n={error:l}}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),D(n.stop)&&n.stop())},e.prototype.spawn=function(t,n,o){if(this.status!==Y.Running)return dr(t,n);if(Xr(t))return this.spawnPromise(Promise.resolve(t),n);if(D(t))return this.spawnCallback(t,n);if(Bc(t))return this.spawnActor(t,n);if(Cc(t))return this.spawnObservable(t,n);if(Ve(t))return this.spawnMachine(t,b(b({},o),{id:n}));if(wc(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,b(b({},this.options),{parent:this,id:n.id||t.id})),a=b(b({},zn),n);a.sync&&i.onTransition(function(c){o.send(nn,{state:c,id:i.id})});var s=i;return this.children.set(i.id,s),a.autoForward&&this.forwardTo.add(i.id),i.onDone(function(c){o.removeChild(i.id),o.send(q(c,{origin:i.id}))}).start(),s},e.prototype.spawnBehavior=function(t,n){var o=Jc(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(l){a||(s=l,i.removeChild(n),i.send(q(dt(n,l),{origin:n})))},function(l){if(!a){i.removeChild(n);var u=Be(n,l);try{i.send(q(u,{origin:n}))}catch(d){Ic(l,d,n),i.devTools&&i.devTools.send(u,i.state),i.machine.strict&&i.stop()}}});var c=(o={id:n,send:function(){},subscribe:function(l,u,d){var m=Mt(l,u,d),f=!1;return t.then(function(p){f||(m.next(p),!f&&m.complete())},function(p){f||m.error(p)}),{unsubscribe:function(){return f=!0}}},stop:function(){a=!0},toJSON:function(){return{id:n}},getSnapshot:function(){return s}},o[be]=function(){return this},o);return this.children.set(n,c),c},e.prototype.spawnCallback=function(t,n){var o,i=this,a=!1,s=new Set,c=new Set,l,u=function(f){l=f,c.forEach(function(p){return p(f)}),!a&&i.send(q(f,{origin:n}))},d;try{d=t(u,function(f){s.add(f)})}catch(f){this.send(Be(n,f))}if(Xr(d))return this.spawnPromise(d,n);var m=(o={id:n,send:function(f){return s.forEach(function(p){return p(f)})},subscribe:function(f){var p=Mt(f);return c.add(p.next),{unsubscribe:function(){c.delete(p.next)}}},stop:function(){a=!0,D(d)&&d()},toJSON:function(){return{id:n}},getSnapshot:function(){return l}},o[be]=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(l){a=l,i.send(q(l,{origin:n}))},function(l){i.removeChild(n),i.send(q(Be(n,l),{origin:n}))},function(){i.removeChild(n),i.send(q(dt(n),{origin:n}))}),c=(o={id:n,send:function(){},subscribe:function(l,u,d){return t.subscribe(l,u,d)},stop:function(){return s.unsubscribe()},getSnapshot:function(){return a},toJSON:function(){return{id:n}}},o[be]=function(){return this},o);return this.children.set(n,c),c},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||Vn(!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[be]=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(b(b({name:this.id,autoPause:!0,stateSanitizer:function(o){return{value:o.value,context:o.context,actions:o.actions}}},n),{features:b({jump:!1,skip:!1},n?n.features:void 0)}),this.machine),this.devTools.init(this.state)}qc(this)}},e.prototype.toJSON=function(){return{id:this.id}},e.prototype[be]=function(){return this},e.prototype.getSnapshot=function(){return this.status===Y.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=Pi,e}(),Qc=function(e){return M(e)?b(b({},zn),{name:e}):b(b(b({},zn),{name:Ac()}),e)};function rt(e,t){var n=Qc(t);return Fc(function(o){return o?o.spawn(e,n.name,n):dr(e,n.name)})}function Pi(e,t){var n=new Zc(e,t);return n}function Xc(e){if(typeof e=="string"){var t={type:e};return t.toString=function(){return e},t}return e}function Tt(e){return b(b({type:Lt},e),{toJSON:function(){e.onDone,e.onError;var t=ar(e,["onDone","onError"]);return b(b({},t),{type:Lt,src:Xc(e.src)})}})}var Nt="",jn="#",Tn="*",Fe={},De=function(e){return e[0]===jn},el=function(){return{actions:{},guards:{},services:{},activities:{},delays:{}}},tl=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(el(),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:oi),this.id=this.config.id||G([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?at(this.config.states,function(u,d){var m,f=new e(u,{},void 0,{parent:a,key:d});return Object.assign(a.idMap,b((m={},m[f.id]=f,m),f.idMap)),f}):Fe;var c=0;function l(u){var d,m;u.order=c++;try{for(var f=O(Ei(u)),p=f.next();!p.done;p=f.next()){var h=p.value;l(h)}}catch(v){d={error:v}}finally{try{p&&!p.done&&(m=f.return)&&m.call(f)}finally{if(d)throw d.error}}}l(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(u){var d=u.event;return d===Nt}):Nt in this.config.on:!1),this.strict=!!this.config.strict,this.onEntry=se(this.config.entry||this.config.onEntry).map(function(u){return Le(u)}),this.onExit=se(this.config.exit||this.config.onExit).map(function(u){return Le(u)}),this.meta=this.config.meta,this.doneData=this.type==="final"?this.config.data:void 0,this.invoke=se(this.config.invoke).map(function(u,d){var m,f;if(Ve(u)){var p=It(a.id,d);return a.machine.options.services=b((m={},m[p]=u,m),a.machine.options.services),Tt({src:p,id:p})}else if(M(u.src)){var p=u.id||It(a.id,d);return Tt(b(b({},u),{id:p,src:u.src}))}else if(Ve(u.src)||D(u.src)){var p=u.id||It(a.id,d);return a.machine.options.services=b((f={},f[p]=u.src,f),a.machine.options.services),Tt(b(b({id:p},u),{src:p}))}else{var h=u.src;return Tt(b(b({id:It(a.id,d)},u),{src:h}))}}),this.activities=se(this.config.activities).concat(this.invoke).map(function(u){return on(u)}),this.transition=this.transition.bind(this),this.tags=se(this.config.tags)}return e.prototype._init=function(){this.__cache.transitions||Ii(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,c=o.services,l=o.delays;return new e(this.config,{actions:b(b({},i),t.actions),activities:b(b({},a),t.activities),guards:b(b({},s),t.guards),services:b(b({},c),t.services),delays:b(b({},l),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 D(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:at(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===Nt,o=this.transitions.filter(function(i){var a=i.eventType===t;return n?a:a||i.eventType===Tn});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 c=D(a)?"".concat(t.id,":delay[").concat(s,"]"):a,l=Si(c,t.id);return t.onEntry.push(Ke(l,{delay:a})),t.onExit.push(hi(l)),l},i=Ye(n)?n.map(function(a,s){var c=o(a.delay,s);return b(b({},a),{event:c})}):j(Object.keys(n).map(function(a,s){var c=n[a],l=M(c)?{target:c}:c,u=isNaN(+a)?a:+a,d=o(u,s);return se(l).map(function(m){return b(b({},m),{event:d,delay:u})})}));return i.map(function(a){var s=a.delay;return b(b({},t.formatTransition(a)),{delay:s})})},e.prototype.getStateNodes=function(t){var n,o=this;if(!t)return[];var i=t instanceof le?t.value:ut(t,this.delimiter);if(M(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),c=[this];return c.push.apply(c,G([],F(j(s.map(function(l){return o.getStateNode(l).getStateNodes(i[l])}))),!1)),c},e.prototype.handles=function(t){var n=ii(t);return this.events.includes(n)},e.prototype.resolveState=function(t){var n=t instanceof le?t:le.create(t),o=Array.from(ct([],this.getStateNodes(n.value)));return new le(b(b({},n),{value:this.resolve(n.value),configuration:o,done:Bt(o,this),tags:to(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 c=O(Object.keys(t)),l=c.next();!l.done;l=c.next()){var u=l.value,d=t[u];if(!!d){var m=this.getStateNode(u),f=m._transition(d,n,o);f&&(s[u]=f)}}}catch(g){i={error:g}}finally{try{l&&!l.done&&(a=c.return)&&a.call(c)}finally{if(i)throw i.error}}var p=Object.keys(s).map(function(g){return s[g]}),h=j(p.map(function(g){return g.transitions})),v=p.some(function(g){return g.transitions.length>0});if(!v)return this.next(n,o);var S=j(Object.keys(s).map(function(g){return s[g].configuration}));return{transitions:h,exitSet:j(p.map(function(g){return g.exitSet})),configuration:S,source:n,actions:j(Object.keys(s).map(function(g){return s[g].actions}))}},e.prototype._transition=function(t,n,o){return M(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,q(n))},e.prototype.next=function(t,n){var o,i,a=this,s=n.name,c=[],l=[],u;try{for(var d=O(this.getCandidates(s)),m=d.next();!m.done;m=d.next()){var f=m.value,p=f.cond,h=f.in,v=t.context,S=h?M(h)&&De(h)?t.matches(ut(this.getStateNodeById(h).path,this.delimiter)):lr(ut(h,this.delimiter),hc(this.path.slice(0,-2))(t.value)):!0,g=!1;try{g=!p||li(this.machine,p,v,n,t)}catch(_){throw new Error("Unable to evaluate guard '".concat(p.name||p.type,"' in transition for event '").concat(s,"' in state node '").concat(this.id,`':
|
|
18
18
|
`).concat(_.message))}if(g&&S){f.target!==void 0&&(l=f.target),c.push.apply(c,G([],F(f.actions),!1)),u=f;break}}}catch(_){o={error:_}}finally{try{m&&!m.done&&(i=d.return)&&i.call(d)}finally{if(o)throw o.error}}if(!!u){if(!l.length)return{transitions:[u],exitSet:[],configuration:t.value?[this]:[],source:t,actions:c};var w=j(l.map(function(_){return a.getRelativeStateNodes(_,t.historyValue)})),y=!!u.internal;return{transitions:[u],exitSet:y?[]:j(l.map(function(_){return a.getPotentiallyReenteringNodes(_)})),configuration:w,source:t,actions:c}}},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,c){var l,u,d,m,f=this,p=s?ct([],this.getStateNodes(s.value)):[],h=new Set;try{for(var v=O(Array.from(t).sort(function(I,x){return I.order-x.order})),S=v.next();!S.done;S=v.next()){var g=S.value;(!lt(p,g)||lt(o.exitSet,g)||g.parent&&h.has(g.parent))&&h.add(g)}}catch(I){l={error:I}}finally{try{S&&!S.done&&(u=v.return)&&u.call(v)}finally{if(l)throw l.error}}try{for(var w=O(p),y=w.next();!y.done;y=w.next()){var g=y.value;(!lt(t,g)||lt(o.exitSet,g.parent))&&o.exitSet.push(g)}}catch(I){d={error:I}}finally{try{y&&!y.done&&(m=w.return)&&m.call(w)}finally{if(d)throw d.error}}o.exitSet.sort(function(I,x){return x.order-I.order});var _=Array.from(h).sort(function(I,x){return I.order-x.order}),C=new Set(o.exitSet),A=j(_.map(function(I){var x=[];if(I.type!=="final")return x;var R=I.parent;if(!R.parent)return x;x.push(st(I.id,I.doneData),st(R.id,I.doneData?zt(I.doneData,i,a):void 0));var W=R.parent;return W.type==="parallel"&&ht(W).every(function(oe){return Bt(o.configuration,oe)})&&x.push(st(W.id)),x})),E=_.map(function(I){var x=I.onEntry,R=I.activities.map(function(W){return yi(W)});return{type:"entry",actions:we(c?G(G([],F(x),!1),F(R),!1):G(G([],F(R),!1),F(x),!1),f.machine.options.actions)}}).concat({type:"state_done",actions:A.map(function(I){return di(I)})}),T=Array.from(C).map(function(I){return{type:"exit",actions:we(G(G([],F(I.onExit),!1),F(I.activities.map(function(x){return vi(x)})),!1),f.machine.options.actions)}}),N=T.concat({type:"transition",actions:we(o.actions,this.machine.options.actions)}).concat(E);if(n){var k=we(j(G([],F(t),!1).sort(function(I,x){return x.order-I.order}).map(function(I){return I.onExit})),this.machine.options.actions).filter(function(I){return!Ln(I)});return N.concat({type:"stop",actions:k})}return N},e.prototype.transition=function(t,n,o,i){t===void 0&&(t=this.initialState);var a=q(n),s;if(t instanceof le)s=o===void 0?t:this.resolveState(le.from(t,o));else{var c=M(t)?this.resolve(Gt(this.getResolvedPath(t))):this.resolve(t),l=o!=null?o:this.machine.context;s=this.resolveState(le.from(c,l))}if(this.strict&&!this.events.includes(a.name)&&!vc(a.name))throw new Error("Machine '".concat(this.id,"' does not accept event '").concat(a.name,"'"));var u=this._transition(s.value,s,a)||{transitions:[],configuration:[],exitSet:[],source:s,actions:[]},d=ct([],this.getStateNodes(s.value)),m=u.configuration.length?ct(d,u.configuration):d;return u.configuration=G([],F(m),!1),this.resolveTransition(u,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,G([],F(s),!1)),t},e.prototype.resolveTransition=function(t,n,o,i,a){var s,c,l,u,d=this;a===void 0&&(a=xe);var m=t.configuration,f=!n||t.transitions.length>0,p=f?t.configuration:n?n.configuration:[],h=Bt(p,this),v=f?Lc(this.machine,m):void 0,S=n?n.historyValue?n.historyValue:t.source?this.machine.historyValue(n.value):void 0:void 0,g=this.getActions(new Set(p),h,t,o,a,n,i),w=n?b({},n.activities):{};try{for(var y=O(g),_=y.next();!_.done;_=y.next()){var C=_.value;try{for(var A=(l=void 0,O(C.actions)),E=A.next();!E.done;E=A.next()){var T=E.value;T.type===Vt?w[T.activity.id||T.activity.type]=T:T.type===Xt&&(w[T.activity.id||T.activity.type]=!1)}}catch(X){l={error:X}}finally{try{E&&!E.done&&(u=A.return)&&u.call(A)}finally{if(l)throw l.error}}}}catch(X){s={error:X}}finally{try{_&&!_.done&&(c=y.return)&&c.call(y)}finally{if(s)throw s.error}}var N=F(gt(this,n,o,a,g,i,this.machine.config.predictableActionArguments||this.machine.config.preserveActionOrder),2),k=N[0],I=N[1],x=F(_c(k,Ln),2),R=x[0],W=x[1],oe=k.filter(function(X){var Ce;return X.type===Vt&&((Ce=X.activity)===null||Ce===void 0?void 0:Ce.type)===Lt}),ie=oe.reduce(function(X,Ce){return X[Ce.activity.id]=Dc(Ce.activity,d.machine,I,a),X},n?b({},n.children):{}),K=new le({value:v||n.value,context:I,_event:a,_sessionid:n?n._sessionid:null,historyValue:v?S?Sc(S,v):void 0:n?n.historyValue:void 0,history:!v||t.source?n:void 0,actions:v?W:[],activities:v?w:n?n.activities:{},events:[],configuration:p,transitions:t.transitions,children:ie,done:h,tags:to(p),machine:this}),ae=o!==I;K.changed=a.name===nn||ae;var ce=K.history;ce&&delete ce.history;var Re=!h&&(this._transient||m.some(function(X){return X._transient}));if(!f&&(!Re||a.name===Nt))return K;var te=K;if(!h)for(Re&&(te=this.resolveRaisedTransition(te,{type:ei},a,i));R.length;){var U=R.shift();te=this.resolveRaisedTransition(te,U._event,a,i)}var Yr=te.changed||(ce?!!te.actions.length||ae||typeof ce.value!=typeof te.value||!Ni(te.value,ce.value):void 0);return te.changed=Yr,te.history=ce,te},e.prototype.getStateNode=function(t){if(De(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=De(t)?t.slice(jn.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"&&De(t))try{return this.getStateNodeById(t.slice(1))}catch{}for(var n=Bn(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||Fe;switch(this.type){case"parallel":return at(this.initialStateValue,function(a,s){return a?o.getStateNode(s).resolve(t[s]||a):Fe});case"compound":if(M(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?at(t,function(a,s){return a?o.getStateNode(s).resolve(a):Fe}):this.initialStateValue||{};default:return t||Fe}},e.prototype.getResolvedPath=function(t){if(De(t)){var n=this.machine.idMap[t.slice(jn.length)];if(!n)throw new Error("Unable to find state node '".concat(t,"'"));return n.path}return Bn(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=Qr(this.states,function(o){return o.initialStateValue||Fe},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=Ht(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;M(n.target)?t=De(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(Ht(this))return[this];if(this.type==="compound"&&!this.initial)return[this];var n=Dt(this.initialStateValue);return j(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:Qr(this.states,function(n,o){if(!t)return n.historyValue();var i=M(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?j(Dt(i).map(function(s){return o.getFromRelativePath(s)})):o.initialStateNodes}var a=yc(o.path,"states")(t).current;return M(a)?[o.getStateNode(a)]:j(Dt(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=j(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 c=O(Object.keys(a)),l=c.next();!l.done;l=c.next()){var u=l.value,d=a[u];if(d.states)try{for(var m=(o=void 0,O(d.events)),f=m.next();!f.done;f=m.next()){var p=f.value;s.add("".concat(p))}}catch(h){o={error:h}}finally{try{f&&!f.done&&(i=m.return)&&i.call(m)}finally{if(o)throw o.error}}}}catch(h){t={error:h}}finally{try{l&&!l.done&&(n=c.return)&&n.call(c)}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(!M(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(c){throw new Error("Invalid transition definition for state node '".concat(n.id,`':
|
|
19
|
-
`).concat(c.message))}else return n.getStateNodeByPath(a)})},e.prototype.formatTransition=function(t){var n=this,o=Ec(t.target),i="internal"in t?t.internal:o?o.some(function(l){return M(l)&&l[0]===n.delimiter}):!0,a=this.machine.options.guards,s=this.resolveTarget(o),c=b(b({},t),{actions:we(se(t.actions)),cond:ci(t.cond,a),target:s,source:this,internal:i,eventType:t.event,toJSON:function(){return b(b({},c),{target:c.target?c.target.map(function(l){return"#".concat(l.id)}):void 0,source:"#".concat(n.id)})}});return c},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=Tn,c=a[s],l=c===void 0?[]:c,u=ar(a,[typeof s=="symbol"?s:s+""]);i=j(Object.keys(u).map(function(w){var y=Oe(w,u[w]);return y}).concat(Oe(Tn,l)))}var d=this.config.always?Oe("",this.config.always):[],m=this.config.onDone?Oe(String(st(this.id)),this.config.onDone):[],f=j(this.invoke.map(function(w){var y=[];return w.onDone&&y.push.apply(y,G([],F(Oe(String(dt(w.id)),w.onDone)),!1)),w.onError&&y.push.apply(y,G([],F(Oe(String(Be(w.id)),w.onError)),!1)),y})),p=this.after,h=j(G(G(G(G([],F(m),!1),F(f),!1),F(i),!1),F(d),!1).map(function(w){return se(w).map(function(y){return o.formatTransition(y)})}));try{for(var v=O(p),S=v.next();!S.done;S=v.next()){var g=S.value;h.push(g)}}catch(w){t={error:w}}finally{try{S&&!S.done&&(n=v.return)&&n.call(v)}finally{if(t)throw t.error}}return h},e}(),ro=!1;function qe(e,t){return!mt&&!("predictableActionArguments"in e)&&!ro&&(ro=!0,console.warn("It is highly recommended to set `predictableActionArguments` to `true` when using `createMachine`. https://xstate.js.org/docs/guides/actions.html")),new tl(e,t)}var ve=_i,an=mi,nl=Ci,Pt=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function rl(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 ki=rl;function ol(){this.__data__=[],this.size=0}var il=ol;function al(e,t){return e===t||e!==e&&t!==t}var _t=al,sl=_t;function cl(e,t){for(var n=e.length;n--;)if(sl(e[n][0],t))return n;return-1}var sn=cl,ll=sn,ul=Array.prototype,dl=ul.splice;function fl(e){var t=this.__data__,n=ll(t,e);if(n<0)return!1;var o=t.length-1;return n==o?t.pop():dl.call(t,n,1),--this.size,!0}var pl=fl,ml=sn;function gl(e){var t=this.__data__,n=ml(t,e);return n<0?void 0:t[n][1]}var hl=gl,yl=sn;function vl(e){return yl(this.__data__,e)>-1}var wl=vl,_l=sn;function Sl(e,t){var n=this.__data__,o=_l(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}var Cl=Sl,bl=il,Al=pl,El=hl,Il=wl,Tl=Cl;function Je(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])}}Je.prototype.clear=bl;Je.prototype.delete=Al;Je.prototype.get=El;Je.prototype.has=Il;Je.prototype.set=Tl;var cn=Je,Nl=cn;function Pl(){this.__data__=new Nl,this.size=0}var kl=Pl;function xl(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}var Ul=xl;function $l(e){return this.__data__.get(e)}var Rl=$l;function Ol(e){return this.__data__.has(e)}var Fl=Ol,Dl=typeof Pt=="object"&&Pt&&Pt.Object===Object&&Pt,xi=Dl,Ml=xi,Bl=typeof self=="object"&&self&&self.Object===Object&&self,Vl=Ml||Bl||Function("return this")(),pe=Vl,Ll=pe,Gl=Ll.Symbol,ln=Gl,oo=ln,Ui=Object.prototype,zl=Ui.hasOwnProperty,jl=Ui.toString,ot=oo?oo.toStringTag:void 0;function Wl(e){var t=zl.call(e,ot),n=e[ot];try{e[ot]=void 0;var o=!0}catch{}var i=jl.call(e);return o&&(t?e[ot]=n:delete e[ot]),i}var Hl=Wl,Yl=Object.prototype,Kl=Yl.toString;function ql(e){return Kl.call(e)}var Jl=ql,io=ln,Zl=Hl,Ql=Jl,Xl="[object Null]",eu="[object Undefined]",ao=io?io.toStringTag:void 0;function tu(e){return e==null?e===void 0?eu:Xl:ao&&ao in Object(e)?Zl(e):Ql(e)}var Ze=tu;function nu(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var _e=nu,ru=Ze,ou=_e,iu="[object AsyncFunction]",au="[object Function]",su="[object GeneratorFunction]",cu="[object Proxy]";function lu(e){if(!ou(e))return!1;var t=ru(e);return t==au||t==su||t==iu||t==cu}var pr=lu,uu=pe,du=uu["__core-js_shared__"],fu=du,Nn=fu,so=function(){var e=/[^.]+$/.exec(Nn&&Nn.keys&&Nn.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function pu(e){return!!so&&so in e}var mu=pu,gu=Function.prototype,hu=gu.toString;function yu(e){if(e!=null){try{return hu.call(e)}catch{}try{return e+""}catch{}}return""}var $i=yu,vu=pr,wu=mu,_u=_e,Su=$i,Cu=/[\\^$.*+?()[\]{}|]/g,bu=/^\[object .+?Constructor\]$/,Au=Function.prototype,Eu=Object.prototype,Iu=Au.toString,Tu=Eu.hasOwnProperty,Nu=RegExp("^"+Iu.call(Tu).replace(Cu,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Pu(e){if(!_u(e)||wu(e))return!1;var t=vu(e)?Nu:bu;return t.test(Su(e))}var ku=Pu;function xu(e,t){return e==null?void 0:e[t]}var Uu=xu,$u=ku,Ru=Uu;function Ou(e,t){var n=Ru(e,t);return $u(n)?n:void 0}var Ue=Ou,Fu=Ue,Du=pe,Mu=Fu(Du,"Map"),mr=Mu,Bu=Ue,Vu=Bu(Object,"create"),un=Vu,co=un;function Lu(){this.__data__=co?co(null):{},this.size=0}var Gu=Lu;function zu(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var ju=zu,Wu=un,Hu="__lodash_hash_undefined__",Yu=Object.prototype,Ku=Yu.hasOwnProperty;function qu(e){var t=this.__data__;if(Wu){var n=t[e];return n===Hu?void 0:n}return Ku.call(t,e)?t[e]:void 0}var Ju=qu,Zu=un,Qu=Object.prototype,Xu=Qu.hasOwnProperty;function ed(e){var t=this.__data__;return Zu?t[e]!==void 0:Xu.call(t,e)}var td=ed,nd=un,rd="__lodash_hash_undefined__";function od(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=nd&&t===void 0?rd:t,this}var id=od,ad=Gu,sd=ju,cd=Ju,ld=td,ud=id;function Qe(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])}}Qe.prototype.clear=ad;Qe.prototype.delete=sd;Qe.prototype.get=cd;Qe.prototype.has=ld;Qe.prototype.set=ud;var dd=Qe,lo=dd,fd=cn,pd=mr;function md(){this.size=0,this.__data__={hash:new lo,map:new(pd||fd),string:new lo}}var gd=md;function hd(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var yd=hd,vd=yd;function wd(e,t){var n=e.__data__;return vd(t)?n[typeof t=="string"?"string":"hash"]:n.map}var dn=wd,_d=dn;function Sd(e){var t=_d(this,e).delete(e);return this.size-=t?1:0,t}var Cd=Sd,bd=dn;function Ad(e){return bd(this,e).get(e)}var Ed=Ad,Id=dn;function Td(e){return Id(this,e).has(e)}var Nd=Td,Pd=dn;function kd(e,t){var n=Pd(this,e),o=n.size;return n.set(e,t),this.size+=n.size==o?0:1,this}var xd=kd,Ud=gd,$d=Cd,Rd=Ed,Od=Nd,Fd=xd;function Xe(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])}}Xe.prototype.clear=Ud;Xe.prototype.delete=$d;Xe.prototype.get=Rd;Xe.prototype.has=Od;Xe.prototype.set=Fd;var gr=Xe,Dd=cn,Md=mr,Bd=gr,Vd=200;function Ld(e,t){var n=this.__data__;if(n instanceof Dd){var o=n.__data__;if(!Md||o.length<Vd-1)return o.push([e,t]),this.size=++n.size,this;n=this.__data__=new Bd(o)}return n.set(e,t),this.size=n.size,this}var Gd=Ld,zd=cn,jd=kl,Wd=Ul,Hd=Rl,Yd=Fl,Kd=Gd;function et(e){var t=this.__data__=new zd(e);this.size=t.size}et.prototype.clear=jd;et.prototype.delete=Wd;et.prototype.get=Hd;et.prototype.has=Yd;et.prototype.set=Kd;var hr=et,qd="__lodash_hash_undefined__";function Jd(e){return this.__data__.set(e,qd),this}var Zd=Jd;function Qd(e){return this.__data__.has(e)}var Xd=Qd,ef=gr,tf=Zd,nf=Xd;function Yt(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new ef;++t<n;)this.add(e[t])}Yt.prototype.add=Yt.prototype.push=tf;Yt.prototype.has=nf;var rf=Yt;function of(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 af=of;function sf(e,t){return e.has(t)}var cf=sf,lf=rf,uf=af,df=cf,ff=1,pf=2;function mf(e,t,n,o,i,a){var s=n&ff,c=e.length,l=t.length;if(c!=l&&!(s&&l>c))return!1;var u=a.get(e),d=a.get(t);if(u&&d)return u==t&&d==e;var m=-1,f=!0,p=n&pf?new lf:void 0;for(a.set(e,t),a.set(t,e);++m<c;){var h=e[m],v=t[m];if(o)var S=s?o(v,h,m,t,e,a):o(h,v,m,e,t,a);if(S!==void 0){if(S)continue;f=!1;break}if(p){if(!uf(t,function(g,w){if(!df(p,w)&&(h===g||i(h,g,n,o,a)))return p.push(w)})){f=!1;break}}else if(!(h===v||i(h,v,n,o,a))){f=!1;break}}return a.delete(e),a.delete(t),f}var Ri=mf,gf=pe,hf=gf.Uint8Array,Oi=hf;function yf(e){var t=-1,n=Array(e.size);return e.forEach(function(o,i){n[++t]=[i,o]}),n}var vf=yf;function wf(e){var t=-1,n=Array(e.size);return e.forEach(function(o){n[++t]=o}),n}var _f=wf,uo=ln,fo=Oi,Sf=_t,Cf=Ri,bf=vf,Af=_f,Ef=1,If=2,Tf="[object Boolean]",Nf="[object Date]",Pf="[object Error]",kf="[object Map]",xf="[object Number]",Uf="[object RegExp]",$f="[object Set]",Rf="[object String]",Of="[object Symbol]",Ff="[object ArrayBuffer]",Df="[object DataView]",po=uo?uo.prototype:void 0,Pn=po?po.valueOf:void 0;function Mf(e,t,n,o,i,a,s){switch(n){case Df:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Ff:return!(e.byteLength!=t.byteLength||!a(new fo(e),new fo(t)));case Tf:case Nf:case xf:return Sf(+e,+t);case Pf:return e.name==t.name&&e.message==t.message;case Uf:case Rf:return e==t+"";case kf:var c=bf;case $f:var l=o&Ef;if(c||(c=Af),e.size!=t.size&&!l)return!1;var u=s.get(e);if(u)return u==t;o|=If,s.set(e,t);var d=Cf(c(e),c(t),o,i,a,s);return s.delete(e),d;case Of:if(Pn)return Pn.call(e)==Pn.call(t)}return!1}var Bf=Mf;function Vf(e,t){for(var n=-1,o=t.length,i=e.length;++n<o;)e[i+n]=t[n];return e}var Fi=Vf,Lf=Array.isArray,Se=Lf,Gf=Fi,zf=Se;function jf(e,t,n){var o=t(e);return zf(e)?o:Gf(o,n(e))}var Di=jf;function Wf(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 Hf=Wf;function Yf(){return[]}var Mi=Yf,Kf=Hf,qf=Mi,Jf=Object.prototype,Zf=Jf.propertyIsEnumerable,mo=Object.getOwnPropertySymbols,Qf=mo?function(e){return e==null?[]:(e=Object(e),Kf(mo(e),function(t){return Zf.call(e,t)}))}:qf,Bi=Qf;function Xf(e,t){for(var n=-1,o=Array(e);++n<e;)o[n]=t(n);return o}var ep=Xf;function tp(e){return e!=null&&typeof e=="object"}var $e=tp,np=Ze,rp=$e,op="[object Arguments]";function ip(e){return rp(e)&&np(e)==op}var ap=ip,go=ap,sp=$e,Vi=Object.prototype,cp=Vi.hasOwnProperty,lp=Vi.propertyIsEnumerable,up=go(function(){return arguments}())?go:function(e){return sp(e)&&cp.call(e,"callee")&&!lp.call(e,"callee")},yr=up,yt={exports:{}};function dp(){return!1}var fp=dp;(function(e,t){var n=pe,o=fp,i=t&&!t.nodeType&&t,a=i&&!0&&e&&!e.nodeType&&e,s=a&&a.exports===i,c=s?n.Buffer:void 0,l=c?c.isBuffer:void 0,u=l||o;e.exports=u})(yt,yt.exports);var pp=9007199254740991,mp=/^(?:0|[1-9]\d*)$/;function gp(e,t){var n=typeof e;return t=t==null?pp:t,!!t&&(n=="number"||n!="symbol"&&mp.test(e))&&e>-1&&e%1==0&&e<t}var fn=gp,hp=9007199254740991;function yp(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=hp}var vr=yp,vp=Ze,wp=vr,_p=$e,Sp="[object Arguments]",Cp="[object Array]",bp="[object Boolean]",Ap="[object Date]",Ep="[object Error]",Ip="[object Function]",Tp="[object Map]",Np="[object Number]",Pp="[object Object]",kp="[object RegExp]",xp="[object Set]",Up="[object String]",$p="[object WeakMap]",Rp="[object ArrayBuffer]",Op="[object DataView]",Fp="[object Float32Array]",Dp="[object Float64Array]",Mp="[object Int8Array]",Bp="[object Int16Array]",Vp="[object Int32Array]",Lp="[object Uint8Array]",Gp="[object Uint8ClampedArray]",zp="[object Uint16Array]",jp="[object Uint32Array]",z={};z[Fp]=z[Dp]=z[Mp]=z[Bp]=z[Vp]=z[Lp]=z[Gp]=z[zp]=z[jp]=!0;z[Sp]=z[Cp]=z[Rp]=z[bp]=z[Op]=z[Ap]=z[Ep]=z[Ip]=z[Tp]=z[Np]=z[Pp]=z[kp]=z[xp]=z[Up]=z[$p]=!1;function Wp(e){return _p(e)&&wp(e.length)&&!!z[vp(e)]}var Hp=Wp;function Yp(e){return function(t){return e(t)}}var Kp=Yp,Wn={exports:{}};(function(e,t){var n=xi,o=t&&!t.nodeType&&t,i=o&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===o,s=a&&n.process,c=function(){try{var l=i&&i.require&&i.require("util").types;return l||s&&s.binding&&s.binding("util")}catch{}}();e.exports=c})(Wn,Wn.exports);var qp=Hp,Jp=Kp,ho=Wn.exports,yo=ho&&ho.isTypedArray,Zp=yo?Jp(yo):qp,wr=Zp,Qp=ep,Xp=yr,em=Se,tm=yt.exports,nm=fn,rm=wr,om=Object.prototype,im=om.hasOwnProperty;function am(e,t){var n=em(e),o=!n&&Xp(e),i=!n&&!o&&tm(e),a=!n&&!o&&!i&&rm(e),s=n||o||i||a,c=s?Qp(e.length,String):[],l=c.length;for(var u in e)(t||im.call(e,u))&&!(s&&(u=="length"||i&&(u=="offset"||u=="parent")||a&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||nm(u,l)))&&c.push(u);return c}var Li=am,sm=Object.prototype;function cm(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||sm;return e===n}var _r=cm;function lm(e,t){return function(n){return e(t(n))}}var Gi=lm,um=Gi,dm=um(Object.keys,Object),fm=dm,pm=_r,mm=fm,gm=Object.prototype,hm=gm.hasOwnProperty;function ym(e){if(!pm(e))return mm(e);var t=[];for(var n in Object(e))hm.call(e,n)&&n!="constructor"&&t.push(n);return t}var vm=ym,wm=pr,_m=vr;function Sm(e){return e!=null&&_m(e.length)&&!wm(e)}var pn=Sm,Cm=Li,bm=vm,Am=pn;function Em(e){return Am(e)?Cm(e):bm(e)}var zi=Em,Im=Di,Tm=Bi,Nm=zi;function Pm(e){return Im(e,Nm,Tm)}var km=Pm,vo=km,xm=1,Um=Object.prototype,$m=Um.hasOwnProperty;function Rm(e,t,n,o,i,a){var s=n&xm,c=vo(e),l=c.length,u=vo(t),d=u.length;if(l!=d&&!s)return!1;for(var m=l;m--;){var f=c[m];if(!(s?f in t:$m.call(t,f)))return!1}var p=a.get(e),h=a.get(t);if(p&&h)return p==t&&h==e;var v=!0;a.set(e,t),a.set(t,e);for(var S=s;++m<l;){f=c[m];var g=e[f],w=t[f];if(o)var y=s?o(w,g,f,t,e,a):o(g,w,f,e,t,a);if(!(y===void 0?g===w||i(g,w,n,o,a):y)){v=!1;break}S||(S=f=="constructor")}if(v&&!S){var _=e.constructor,C=t.constructor;_!=C&&"constructor"in e&&"constructor"in t&&!(typeof _=="function"&&_ instanceof _&&typeof C=="function"&&C instanceof C)&&(v=!1)}return a.delete(e),a.delete(t),v}var Om=Rm,Fm=Ue,Dm=pe,Mm=Fm(Dm,"DataView"),Bm=Mm,Vm=Ue,Lm=pe,Gm=Vm(Lm,"Promise"),zm=Gm,jm=Ue,Wm=pe,Hm=jm(Wm,"Set"),Ym=Hm,Km=Ue,qm=pe,Jm=Km(qm,"WeakMap"),Zm=Jm,Hn=Bm,Yn=mr,Kn=zm,qn=Ym,Jn=Zm,ji=Ze,tt=$i,wo="[object Map]",Qm="[object Object]",_o="[object Promise]",So="[object Set]",Co="[object WeakMap]",bo="[object DataView]",Xm=tt(Hn),eg=tt(Yn),tg=tt(Kn),ng=tt(qn),rg=tt(Jn),ke=ji;(Hn&&ke(new Hn(new ArrayBuffer(1)))!=bo||Yn&&ke(new Yn)!=wo||Kn&&ke(Kn.resolve())!=_o||qn&&ke(new qn)!=So||Jn&&ke(new Jn)!=Co)&&(ke=function(e){var t=ji(e),n=t==Qm?e.constructor:void 0,o=n?tt(n):"";if(o)switch(o){case Xm:return bo;case eg:return wo;case tg:return _o;case ng:return So;case rg:return Co}return t});var og=ke,kn=hr,ig=Ri,ag=Bf,sg=Om,Ao=og,Eo=Se,Io=yt.exports,cg=wr,lg=1,To="[object Arguments]",No="[object Array]",kt="[object Object]",ug=Object.prototype,Po=ug.hasOwnProperty;function dg(e,t,n,o,i,a){var s=Eo(e),c=Eo(t),l=s?No:Ao(e),u=c?No:Ao(t);l=l==To?kt:l,u=u==To?kt:u;var d=l==kt,m=u==kt,f=l==u;if(f&&Io(e)){if(!Io(t))return!1;s=!0,d=!1}if(f&&!d)return a||(a=new kn),s||cg(e)?ig(e,t,n,o,i,a):ag(e,t,l,n,o,i,a);if(!(n&lg)){var p=d&&Po.call(e,"__wrapped__"),h=m&&Po.call(t,"__wrapped__");if(p||h){var v=p?e.value():e,S=h?t.value():t;return a||(a=new kn),i(v,S,n,o,a)}}return f?(a||(a=new kn),sg(e,t,n,o,i,a)):!1}var fg=dg,pg=fg,ko=$e;function Wi(e,t,n,o,i){return e===t?!0:e==null||t==null||!ko(e)&&!ko(t)?e!==e&&t!==t:pg(e,t,n,o,Wi,i)}var Hi=Wi,mg=hr,gg=Hi,hg=1,yg=2;function vg(e,t,n,o){var i=n.length,a=i,s=!o;if(e==null)return!a;for(e=Object(e);i--;){var c=n[i];if(s&&c[2]?c[1]!==e[c[0]]:!(c[0]in e))return!1}for(;++i<a;){c=n[i];var l=c[0],u=e[l],d=c[1];if(s&&c[2]){if(u===void 0&&!(l in e))return!1}else{var m=new mg;if(o)var f=o(u,d,l,e,t,m);if(!(f===void 0?gg(d,u,hg|yg,o,m):f))return!1}}return!0}var wg=vg,_g=_e;function Sg(e){return e===e&&!_g(e)}var Yi=Sg,Cg=Yi,bg=zi;function Ag(e){for(var t=bg(e),n=t.length;n--;){var o=t[n],i=e[o];t[n]=[o,i,Cg(i)]}return t}var Eg=Ag;function Ig(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}var Ki=Ig,Tg=wg,Ng=Eg,Pg=Ki;function kg(e){var t=Ng(e);return t.length==1&&t[0][2]?Pg(t[0][0],t[0][1]):function(n){return n===e||Tg(n,e,t)}}var xg=kg,Ug=Ze,$g=$e,Rg="[object Symbol]";function Og(e){return typeof e=="symbol"||$g(e)&&Ug(e)==Rg}var Sr=Og,Fg=Se,Dg=Sr,Mg=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Bg=/^\w*$/;function Vg(e,t){if(Fg(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||Dg(e)?!0:Bg.test(e)||!Mg.test(e)||t!=null&&e in Object(t)}var Cr=Vg,qi=gr,Lg="Expected a function";function br(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(Lg);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(br.Cache||qi),n}br.Cache=qi;var Gg=br,zg=Gg,jg=500;function Wg(e){var t=zg(e,function(o){return n.size===jg&&n.clear(),o}),n=t.cache;return t}var Hg=Wg,Yg=Hg,Kg=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,qg=/\\(\\)?/g,Jg=Yg(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(Kg,function(n,o,i,a){t.push(i?a.replace(qg,"$1"):o||n)}),t}),Zg=Jg,xo=ln,Qg=ki,Xg=Se,eh=Sr,th=1/0,Uo=xo?xo.prototype:void 0,$o=Uo?Uo.toString:void 0;function Ji(e){if(typeof e=="string")return e;if(Xg(e))return Qg(e,Ji)+"";if(eh(e))return $o?$o.call(e):"";var t=e+"";return t=="0"&&1/e==-th?"-0":t}var nh=Ji,rh=nh;function oh(e){return e==null?"":rh(e)}var ih=oh,ah=Se,sh=Cr,ch=Zg,lh=ih;function uh(e,t){return ah(e)?e:sh(e,t)?[e]:ch(lh(e))}var mn=uh,dh=Sr,fh=1/0;function ph(e){if(typeof e=="string"||dh(e))return e;var t=e+"";return t=="0"&&1/e==-fh?"-0":t}var St=ph,mh=mn,gh=St;function hh(e,t){t=mh(t,e);for(var n=0,o=t.length;e!=null&&n<o;)e=e[gh(t[n++])];return n&&n==o?e:void 0}var Ar=hh,yh=Ar;function vh(e,t,n){var o=e==null?void 0:yh(e,t);return o===void 0?n:o}var wh=vh;function _h(e,t){return e!=null&&t in Object(e)}var Sh=_h,Ch=mn,bh=yr,Ah=Se,Eh=fn,Ih=vr,Th=St;function Nh(e,t,n){t=Ch(t,e);for(var o=-1,i=t.length,a=!1;++o<i;){var s=Th(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&&Ih(i)&&Eh(s,i)&&(Ah(e)||bh(e)))}var Ph=Nh,kh=Sh,xh=Ph;function Uh(e,t){return e!=null&&xh(e,t,kh)}var $h=Uh,Rh=Hi,Oh=wh,Fh=$h,Dh=Cr,Mh=Yi,Bh=Ki,Vh=St,Lh=1,Gh=2;function zh(e,t){return Dh(e)&&Mh(t)?Bh(Vh(e),t):function(n){var o=Oh(n,e);return o===void 0&&o===t?Fh(n,e):Rh(t,o,Lh|Gh)}}var jh=zh;function Wh(e){return e}var Er=Wh;function Hh(e){return function(t){return t==null?void 0:t[e]}}var Yh=Hh,Kh=Ar;function qh(e){return function(t){return Kh(t,e)}}var Jh=qh,Zh=Yh,Qh=Jh,Xh=Cr,ey=St;function ty(e){return Xh(e)?Zh(ey(e)):Qh(e)}var ny=ty,ry=xg,oy=jh,iy=Er,ay=Se,sy=ny;function cy(e){return typeof e=="function"?e:e==null?iy:typeof e=="object"?ay(e)?oy(e[0],e[1]):ry(e):sy(e)}var ly=cy,uy=Ue,dy=function(){try{var e=uy(Object,"defineProperty");return e({},"",{}),e}catch{}}(),Zi=dy,Ro=Zi;function fy(e,t,n){t=="__proto__"&&Ro?Ro(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var Ir=fy,py=Ir,my=_t,gy=Object.prototype,hy=gy.hasOwnProperty;function yy(e,t,n){var o=e[t];(!(hy.call(e,t)&&my(o,n))||n===void 0&&!(t in e))&&py(e,t,n)}var Qi=yy,vy=Qi,wy=mn,_y=fn,Oo=_e,Sy=St;function Cy(e,t,n,o){if(!Oo(e))return e;t=wy(t,e);for(var i=-1,a=t.length,s=a-1,c=e;c!=null&&++i<a;){var l=Sy(t[i]),u=n;if(l==="__proto__"||l==="constructor"||l==="prototype")return e;if(i!=s){var d=c[l];u=o?o(d,l,c):void 0,u===void 0&&(u=Oo(d)?d:_y(t[i+1])?[]:{})}vy(c,l,u),c=c[l]}return e}var by=Cy,Ay=Ar,Ey=by,Iy=mn;function Ty(e,t,n){for(var o=-1,i=t.length,a={};++o<i;){var s=t[o],c=Ay(e,s);n(c,s)&&Ey(a,Iy(s,e),c)}return a}var Ny=Ty,Py=Gi,ky=Py(Object.getPrototypeOf,Object),Tr=ky,xy=Fi,Uy=Tr,$y=Bi,Ry=Mi,Oy=Object.getOwnPropertySymbols,Fy=Oy?function(e){for(var t=[];e;)xy(t,$y(e)),e=Uy(e);return t}:Ry,Dy=Fy;function My(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var By=My,Vy=_e,Ly=_r,Gy=By,zy=Object.prototype,jy=zy.hasOwnProperty;function Wy(e){if(!Vy(e))return Gy(e);var t=Ly(e),n=[];for(var o in e)o=="constructor"&&(t||!jy.call(e,o))||n.push(o);return n}var Hy=Wy,Yy=Li,Ky=Hy,qy=pn;function Jy(e){return qy(e)?Yy(e,!0):Ky(e)}var Nr=Jy,Zy=Di,Qy=Dy,Xy=Nr;function ev(e){return Zy(e,Xy,Qy)}var tv=ev,nv=ki,rv=ly,ov=Ny,iv=tv;function av(e,t){if(e==null)return{};var n=nv(iv(e),function(o){return[o]});return t=rv(t),ov(e,n,function(o,i){return t(o,i[0])})}var sv=av;const cv=!0,gn=(e,t)=>`${e}${t}`.replace(/[^A-Z0-9+]/gi,""),lv=(e,t)=>{switch(t){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 t.startsWith("custom:")}},uv=e=>{const{phone_number:t,...n}=sv(e,lv);if(qo(t)){const{country_code:o}=e;return{...n,phone_number:gn(o,t)}}return n},dv=(e,t,n)=>{const{password:o,...i}=t,a=uv(i),s={autoSignIn:cv,userAttributes:{...n==="phone_number"?{...a,phone_number:e}:a}};return{username:e,password:o,options:s}},fv=({formValues:e,loginMechanisms:t})=>{const n=t[0];if(n==="phone_number"){const{country_code:o,phone_number:i}=e;return gn(o,i)}return e[n]},{assign:B}=bi,pv=B({actorDoneData:void 0}),mv=B({challengeName:void 0}),gv=B({missingAttributes:void 0}),hv=B({remoteError:void 0}),yv=B({formValues:{}}),vv=B({touched:{}}),wv=B({user:void 0}),_v=B({validationError:{}}),Sv=B({totpSecretCode:(e,{data:t})=>{var o,i;const{sharedSecret:n}=(i=(o=t.nextStep)==null?void 0:o.totpSetupDetails)!=null?i:{};return n}}),Cv=B({step:"SIGN_IN"}),bv=B({step:"SHOULD_CONFIRM_USER_ATTRIBUTE"}),Av=B({step:"CONFIRM_ATTRIBUTE_COMPLETE"}),Ev=B({challengeName:(e,{data:t})=>{const{signInStep:n}=t.nextStep;return n==="CONFIRM_SIGN_IN_WITH_SMS_CODE"?"SMS_MFA":n==="CONFIRM_SIGN_IN_WITH_TOTP_CODE"?"SOFTWARE_TOKEN_MFA":void 0}}),Iv=B({username:({formValues:e,loginMechanisms:t})=>{const n=t[0],{username:o,country_code:i}=e;return n==="phone_number"?gn(i,o):o}}),Tv=B({username:fv}),Nv=B({username:({formValues:e,loginMechanisms:t})=>{const n=t[0],{username:o,country_code:i}=e;return n==="phone_number"?gn(i,o):o}}),Pv=B({step:(e,{data:t})=>t.nextStep.signInStep==="DONE"?"SIGN_IN_COMPLETE":t.nextStep.signInStep}),kv=B({step:(e,{data:t})=>t.nextStep.signUpStep==="DONE"?"SIGN_UP_COMPLETE":t.nextStep.signUpStep}),xv=B({step:(e,{data:t})=>t.nextStep.resetPasswordStep==="DONE"?"RESET_PASSWORD_COMPLETE":t.nextStep.resetPasswordStep}),Uv=B({missingAttributes:(e,{data:t})=>{var n;return(n=t.nextStep)==null?void 0:n.missingAttributes}}),$v=B({validationError:(e,{data:t})=>t}),Rv=B({remoteError:(e,{data:t})=>t.name==="NoUserPoolError"?"Configuration error (see console) \u2013 please contact the administrator":(t==null?void 0:t.message)||t}),Ov=B({user:(e,{data:t})=>t}),Fo=e=>({Destination:e.destination,DeliveryMedium:e.deliveryMedium,AttributeName:e.attributName}),Fv=B({codeDeliveryDetails:(e,{data:t})=>{var n;return(n=t==null?void 0:t.nextStep)!=null&&n.codeDeliveryDetails?Fo(t.nextStep.codeDeliveryDetails):Fo(t)}}),Dv=B({formValues:(e,{data:t})=>{const{name:n,value:o}=t;return{...e.formValues,[n]:o}}}),Mv=B({formValues:(e,{data:t})=>is({...e.formValues,...t},"password")}),Bv=B({touched:(e,{data:t})=>({...e.touched,[t.name]:!0})}),Vv=B({unverifiedUserAttributes:(e,{data:t})=>{const{email:n,phone_number:o}=t;return{...n&&{email:n},...o&&{phone_number:o}}}}),Lv=B({selectedUserAttribute:void 0}),Gv=B({selectedUserAttribute:e=>{var t;return(t=e.formValues)==null?void 0:t.unverifiedAttr}}),zv=B({step:"CONFIRM_SIGN_UP"}),Ct={clearActorDoneData:pv,clearChallengeName:mv,clearError:hv,clearFormValues:yv,clearMissingAttributes:gv,clearSelectedUserAttribute:Lv,clearTouched:vv,clearUser:wv,clearValidationError:_v,handleBlur:Bv,handleInput:Dv,handleSubmit:Mv,setChallengeName:Ev,setCodeDeliveryDetails:Fv,setFieldErrors:$v,setMissingAttributes:Uv,setNextResetPasswordStep:xv,setNextSignInStep:Pv,setNextSignUpStep:kv,setRemoteError:Rv,setConfirmAttributeCompleteStep:Av,setConfirmSignUpSignUpStep:zv,setShouldVerifyUserAttributeStep:bv,setSelectedUserAttribute:Gv,setSignInStep:Cv,setTotpSecretCode:Sv,setUser:Ov,setUnverifiedUserAttributes:Vv,setUsernameForgotPassword:Iv,setUsernameSignIn:Nv,setUsernameSignUp:Tv},jv=["CONFIRM_SIGN_IN_WITH_SMS_CODE","CONFIRM_SIGN_IN_WITH_TOTP_CODE"],Wv=(e,{data:t})=>(t==null?void 0:t.nextStep.signInStep)==="CONFIRM_SIGN_IN_WITH_NEW_PASSWORD_REQUIRED",Hv=(e,{data:t})=>{var n;return((n=t==null?void 0:t.nextStep)==null?void 0:n.signInStep)==="RESET_PASSWORD"},Yv=(e,{data:t})=>(t==null?void 0:t.nextStep.signInStep)==="CONFIRM_SIGN_UP",Kv=(e,{data:t})=>(t==null?void 0:t.nextStep.signUpStep)==="COMPLETE_AUTO_SIGN_IN",qv=(e,{data:t})=>(t==null?void 0:t.nextStep.signInStep)==="DONE",Jv=(e,{data:t})=>(t==null?void 0:t.nextStep.signUpStep)==="DONE",Zv=(e,{data:t})=>(t==null?void 0:t.nextStep.resetPasswordStep)==="DONE",Qv=(e,{data:t})=>(t==null?void 0:t.step)==="CONFIRM_ATTRIBUTE_COMPLETE",Xv=(e,{data:t})=>(t==null?void 0:t.step)==="CONFIRM_ATTRIBUTE_WITH_CODE",ew=(e,{data:t})=>(t==null?void 0:t.step)==="SHOULD_CONFIRM_USER_ATTRIBUTE",tw=(e,{data:t})=>(t==null?void 0:t.step)==="RESET_PASSWORD",nw=(e,{data:t})=>(t==null?void 0:t.step)==="CONFIRM_SIGN_UP",rw=({step:e})=>jv.includes(e),ow=({step:e})=>e==="CONTINUE_SIGN_IN_WITH_TOTP_SETUP",iw=({step:e})=>e==="RESET_PASSWORD",aw=({step:e})=>e==="CONFIRM_RESET_PASSWORD_WITH_CODE",sw=({step:e})=>e==="CONFIRM_SIGN_UP",cw=(e,{data:t})=>{const{phone_number_verified:n,email_verified:o}=t;return(o===void 0||o==="false")&&(n===void 0||n==="false")},lw=(e,{data:t})=>t.message==="User is already confirmed.",hn={hasCompletedAttributeConfirmation:Qv,hasCompletedResetPassword:Zv,hasCompletedSignIn:qv,hasCompletedSignUp:Jv,isConfirmSignUpStep:nw,isConfirmUserAttributeStep:Xv,isResetPasswordStep:tw,isShouldConfirmUserAttributeStep:ew,isUserAlreadyConfirmed:lw,shouldAutoSignIn:Kv,shouldConfirmResetPassword:aw,shouldConfirmSignIn:rw,shouldConfirmSignInWithNewPassword:Wv,shouldConfirmSignUp:sw,shouldConfirmSignUpFromSignIn:Yv,shouldResetPassword:iw,shouldResetPasswordFromSignIn:Hv,shouldSetupTotp:ow,shouldVerifyAttribute:cw};var uw=Ir,dw=_t;function fw(e,t,n){(n!==void 0&&!dw(e[t],n)||n===void 0&&!(t in e))&&uw(e,t,n)}var Xi=fw;function pw(e){return function(t,n,o){for(var i=-1,a=Object(t),s=o(t),c=s.length;c--;){var l=s[e?c:++i];if(n(a[l],l,a)===!1)break}return t}}var mw=pw,gw=mw,hw=gw(),yw=hw,Zn={exports:{}};(function(e,t){var n=pe,o=t&&!t.nodeType&&t,i=o&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===o,s=a?n.Buffer:void 0,c=s?s.allocUnsafe:void 0;function l(u,d){if(d)return u.slice();var m=u.length,f=c?c(m):new u.constructor(m);return u.copy(f),f}e.exports=l})(Zn,Zn.exports);var Do=Oi;function vw(e){var t=new e.constructor(e.byteLength);return new Do(t).set(new Do(e)),t}var ww=vw,_w=ww;function Sw(e,t){var n=t?_w(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var Cw=Sw;function bw(e,t){var n=-1,o=e.length;for(t||(t=Array(o));++n<o;)t[n]=e[n];return t}var Aw=bw,Ew=_e,Mo=Object.create,Iw=function(){function e(){}return function(t){if(!Ew(t))return{};if(Mo)return Mo(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}(),Tw=Iw,Nw=Tw,Pw=Tr,kw=_r;function xw(e){return typeof e.constructor=="function"&&!kw(e)?Nw(Pw(e)):{}}var Uw=xw,$w=pn,Rw=$e;function Ow(e){return Rw(e)&&$w(e)}var Fw=Ow,Dw=Ze,Mw=Tr,Bw=$e,Vw="[object Object]",Lw=Function.prototype,Gw=Object.prototype,ea=Lw.toString,zw=Gw.hasOwnProperty,jw=ea.call(Object);function Ww(e){if(!Bw(e)||Dw(e)!=Vw)return!1;var t=Mw(e);if(t===null)return!0;var n=zw.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&ea.call(n)==jw}var Hw=Ww;function Yw(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var ta=Yw,Kw=Qi,qw=Ir;function Jw(e,t,n,o){var i=!n;n||(n={});for(var a=-1,s=t.length;++a<s;){var c=t[a],l=o?o(n[c],e[c],c,n,e):void 0;l===void 0&&(l=e[c]),i?qw(n,c,l):Kw(n,c,l)}return n}var Zw=Jw,Qw=Zw,Xw=Nr;function e_(e){return Qw(e,Xw(e))}var t_=e_,Bo=Xi,n_=Zn.exports,r_=Cw,o_=Aw,i_=Uw,Vo=yr,Lo=Se,a_=Fw,s_=yt.exports,c_=pr,l_=_e,u_=Hw,d_=wr,Go=ta,f_=t_;function p_(e,t,n,o,i,a,s){var c=Go(e,n),l=Go(t,n),u=s.get(l);if(u){Bo(e,n,u);return}var d=a?a(c,l,n+"",e,t,s):void 0,m=d===void 0;if(m){var f=Lo(l),p=!f&&s_(l),h=!f&&!p&&d_(l);d=l,f||p||h?Lo(c)?d=c:a_(c)?d=o_(c):p?(m=!1,d=n_(l,!0)):h?(m=!1,d=r_(l,!0)):d=[]:u_(l)||Vo(l)?(d=c,Vo(c)?d=f_(c):(!l_(c)||c_(c))&&(d=i_(l))):m=!1}m&&(s.set(l,d),i(d,l,o,a,s),s.delete(l)),Bo(e,n,d)}var m_=p_,g_=hr,h_=Xi,y_=yw,v_=m_,w_=_e,__=Nr,S_=ta;function na(e,t,n,o,i){e!==t&&y_(t,function(a,s){if(i||(i=new g_),w_(a))v_(e,t,s,n,na,o,i);else{var c=o?o(S_(e,s),a,s+"",e,t,i):void 0;c===void 0&&(c=a),h_(e,s,c)}},__)}var C_=na;function b_(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 A_=b_,E_=A_,zo=Math.max;function I_(e,t,n){return t=zo(t===void 0?e.length-1:t,0),function(){for(var o=arguments,i=-1,a=zo(o.length-t,0),s=Array(a);++i<a;)s[i]=o[t+i];i=-1;for(var c=Array(t+1);++i<t;)c[i]=o[i];return c[t]=n(s),E_(e,this,c)}}var T_=I_;function N_(e){return function(){return e}}var P_=N_,k_=P_,jo=Zi,x_=Er,U_=jo?function(e,t){return jo(e,"toString",{configurable:!0,enumerable:!1,value:k_(t),writable:!0})}:x_,$_=U_,R_=800,O_=16,F_=Date.now;function D_(e){var t=0,n=0;return function(){var o=F_(),i=O_-(o-n);if(n=o,i>0){if(++t>=R_)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var M_=D_,B_=$_,V_=M_,L_=V_(B_),G_=L_,z_=Er,j_=T_,W_=G_;function H_(e,t){return W_(j_(e,t,z_),e+"")}var Y_=H_,K_=_t,q_=pn,J_=fn,Z_=_e;function Q_(e,t,n){if(!Z_(n))return!1;var o=typeof t;return(o=="number"?q_(n)&&J_(t,n.length):o=="string"&&t in n)?K_(n[t],e):!1}var X_=Q_,eS=Y_,tS=X_;function nS(e){return eS(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&&tS(n[0],n[1],s)&&(a=i<3?void 0:a,i=1),t=Object(t);++o<i;){var c=n[o];c&&e(t,c,o,a)}return t})}var rS=nS,oS=C_,iS=rS,aS=iS(function(e,t,n){oS(e,t,n)}),sS=aS;const yn=async(e,t,n,o)=>{const i=await Promise.all(o.map(s=>s(e,t,n))),a=sS({},...i);return Jo(a)?Promise.resolve():Promise.reject(a)},cS=8,Te={async getAmplifyConfig(){var c,l,u,d,m;const e=Pa.Amplify.getConfig(),t=(c=e.Auth)==null?void 0:c.Cognito,{loginWith:n,userAttributes:o}=(u=(l=e.Auth)==null?void 0:l.Cognito)!=null?u:{},i=n?Object.entries(n).filter(([f,p])=>f!=="oauth").filter(([f,p])=>!!p).map(f=>f[0]==="phone"?"phone_number":f[0]):void 0,a=o?Object.entries(o).map(([f,p])=>Object.keys(p)[0]):void 0,s=(d=n==null?void 0:n.oauth)!=null&&d.providers?(m=n.oauth.providers)==null?void 0:m.map(f=>f.toString().toLowerCase()):void 0;return{...t,loginMechanisms:i,signUpAttributes:a,socialProviders:s}},getCurrentUser:H.getCurrentUser,handleSignIn:H.signIn,handleSignUp:H.signUp,handleConfirmSignIn:H.confirmSignIn,handleConfirmSignUp:H.confirmSignUp,handleForgotPasswordSubmit:H.confirmResetPassword,handleForgotPassword:H.resetPassword,async validateCustomSignUp(e,t){},async validateFormPassword(e,t,n){var c;const{password:o}=e,{password:i}=t;if(!i||!n)return null;const a=[],s=(c=n.minLength)!=null?c:cS;return o.length<s&&a.push(`Password must have at least ${s} characters`),n.requireLowercase&&!/[a-z]/.test(o)&&a.push("Password must have lower case letters"),n.requireUppercase&&!/[A-Z]/.test(o)&&a.push("Password must have upper case letters"),n.requireNumbers&&!/[0-9]/.test(o)&&a.push("Password must have numbers"),n.requireSpecialCharacters&&!rs(o)&&a.push("Password must have special characters"),a.length!==0?{password:a}:null},async validateConfirmPassword(e,t){const{password:n,confirm_password:o}=e,{confirm_password:i,password:a}=t;if(!n&&!o)return null;if((n||o)&&n!==o&&(i&&a||(n==null?void 0:n.length)>=6&&(o==null?void 0:o.length)>=6))return{confirm_password:"Your passwords must match"}},async validatePreferredUsername(e,t){}};function lS({services:e}){return qe({id:"forgotPasswordActor",initial:"init",predictableActionArguments:!0,states:{init:{always:[{cond:"shouldResetPassword",target:"confirmResetPassword"},{cond:"shouldConfirmResetPassword",target:"confirmResetPassword"},{target:"forgotPassword"}]},forgotPassword:{initial:"edit",entry:"sendUpdate",exit:["clearError","clearTouched"],states:{edit:{entry:"sendUpdate",on:{SUBMIT:{actions:"handleSubmit",target:"submit"},CHANGE:{actions:"handleInput"},BLUR:{actions:"handleBlur"}}},submit:{tags:"pending",entry:["sendUpdate","clearError","setUsernameForgotPassword"],invoke:{src:"handleResetPassword",onDone:{actions:["setCodeDeliveryDetails","setNextResetPasswordStep"],target:"#forgotPasswordActor.confirmResetPassword"},onError:{actions:"setRemoteError",target:"edit"}}}}},confirmResetPassword:{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:{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:"handleConfirmResetPassword",onDone:[{cond:"hasCompletedResetPassword",actions:"setNextResetPasswordStep",target:"#forgotPasswordActor.resolved"},{actions:"setSignInStep",target:"#forgotPasswordActor.resolved"}],onError:{actions:"setRemoteError",target:"idle"}}}}}}},resolved:{type:"final",data:({step:t})=>({step:t})}}},{actions:{...Ct,sendUpdate:an()},guards:hn,services:{handleResetPassword({username:t}){return e.handleForgotPassword({username:t})},handleConfirmResetPassword({formValues:t,username:n}){const{confirmation_code:o,password:i}=t;return e.handleForgotPasswordSubmit({confirmationCode:o,newPassword:i,username:n})},validateFields(t){return yn(t.formValues,t.touched,t.passwordSettings,[Te.validateFormPassword,Te.validateConfirmPassword])}}})}const xt={onDone:[{cond:"hasCompletedSignIn",actions:"setNextSignInStep",target:"#signInActor.fetchUserAttributes"},{cond:"shouldConfirmSignInWithNewPassword",actions:["setMissingAttributes","setNextSignInStep"],target:"#signInActor.forceChangePassword"},{cond:"shouldResetPasswordFromSignIn",actions:"setNextSignInStep",target:"#signInActor.resetPassword"},{cond:"shouldConfirmSignUpFromSignIn",actions:"setNextSignInStep",target:"#signInActor.resendSignUpCode"},{actions:["setChallengeName","setMissingAttributes","setNextSignInStep","setTotpSecretCode"],target:"#signInActor.init"}],onError:{actions:"setRemoteError",target:"edit"}},uS={onDone:[{cond:"shouldVerifyAttribute",actions:["setShouldVerifyUserAttributeStep","setUnverifiedUserAttributes"],target:"#signInActor.resolved"},{actions:"setConfirmAttributeCompleteStep",target:"#signInActor.resolved"}],onError:{actions:"setConfirmAttributeCompleteStep",target:"#signInActor.resolved"}};function dS({services:e}){return qe({id:"signInActor",initial:"init",predictableActionArguments:!0,states:{init:{always:[{cond:"shouldConfirmSignIn",target:"confirmSignIn"},{cond:"shouldSetupTotp",target:"setupTotp"},{cond:({step:t})=>t==="CONFIRM_SIGN_IN_WITH_NEW_PASSWORD_REQUIRED",actions:"setActorDoneData",target:"forceChangePassword"},{target:"signIn"}]},federatedSignIn:{entry:["sendUpdate","clearError"],invoke:{src:"signInWithRedirect",onError:{actions:"setRemoteError"}}},fetchUserAttributes:{invoke:{src:"fetchUserAttributes",...uS}},resendSignUpCode:{invoke:{src:"handleResendSignUpCode",onDone:{actions:"setCodeDeliveryDetails",target:"#signInActor.resolved"},onError:{actions:"setRemoteError",target:"#signInActor.signIn"}}},resetPassword:{invoke:{src:"resetPassword",onDone:[{actions:"setCodeDeliveryDetails",target:"#signInActor.resolved"}],onError:{actions:["setRemoteError","sendUpdate"]}}},signIn:{initial:"edit",exit:"clearTouched",states:{edit:{entry:"sendUpdate",on:{CHANGE:{actions:"handleInput"},FEDERATED_SIGN_IN:{target:"#signInActor.federatedSignIn"},SUBMIT:{actions:"handleSubmit",target:"submit"}}},submit:{tags:"pending",entry:["clearError","sendUpdate","setUsernameSignIn"],exit:"clearFormValues",invoke:{src:"handleSignIn",...xt}}}},confirmSignIn:{initial:"edit",exit:["clearChallengeName","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",...xt}}}},forceChangePassword:{entry:"sendUpdate",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:{actions:"setSignInStep",target:"#signInActor.resolved"},CHANGE:{actions:"handleInput",target:".pending"},BLUR:{actions:"handleBlur",target:".pending"}}},submit:{initial:"edit",entry:"clearError",states:{edit:{entry:"sendUpdate",on:{SUBMIT:{actions:"handleSubmit",target:"validate"}}},validate:{entry:"sendUpdate",invoke:{src:"validateFields",onDone:{actions:"clearValidationError",target:"pending"},onError:{actions:"setFieldErrors",target:"edit"}}},pending:{tags:"pending",entry:["sendUpdate","clearError"],invoke:{src:"handleForceChangePassword",...xt}}}}}},setupTotp:{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:["sendUpdate","clearError"],invoke:{src:"confirmSignIn",...xt}}}},resolved:{type:"final",data:t=>({codeDeliveryDetails:t.codeDeliveryDetails,remoteError:t.remoteError,step:t.step,unverifiedUserAttributes:t.unverifiedUserAttributes,username:t.username})}}},{actions:{...Ct,sendUpdate:an()},guards:hn,services:{async fetchUserAttributes(){return H.fetchUserAttributes()},resetPassword({username:t}){return H.resetPassword({username:t})},handleResendSignUpCode({username:t}){return H.resendSignUpCode({username:t})},handleSignIn({formValues:t,username:n}){const{password:o}=t;return e.handleSignIn({username:n,password:o})},confirmSignIn({formValues:t}){const{confirmation_code:n}=t;return e.handleConfirmSignIn({challengeResponse:n})},async handleForceChangePassword({formValues:t}){let{password:n,phone_number:o,country_code:i,confirm_password:a,...s}=t,c;o&&(c=`${i}${o}`.replace(/[^A-Z0-9+]/gi,""),s={...s,phone_number:c});const l={challengeResponse:n,options:{userAttributes:s}};return H.confirmSignIn(l)},signInWithRedirect(t,{data:n}){return H.signInWithRedirect(n)},async validateFields(t){return yn(t.formValues,t.touched,t.passwordSettings,[Te.validateFormPassword,Te.validateConfirmPassword])}}})}const fS={onDone:[{actions:"setCodeDeliveryDetails",target:"#signUpActor.resolved"}],onError:{actions:["setRemoteError","sendUpdate"]}},pS={onDone:[{cond:"hasCompletedSignIn",actions:"setNextSignInStep",target:"#signUpActor.fetchUserAttributes"},{cond:"shouldConfirmSignInWithNewPassword",actions:"setNextSignInStep",target:"#signUpActor.resolved"},{cond:"shouldResetPasswordFromSignIn",actions:"setNextSignInStep",target:"#signUpActor.resetPassword"},{cond:"shouldConfirmSignUpFromSignIn",actions:"setNextSignInStep",target:"#signUpActor.resendSignUpCode"},{actions:["setNextSignInStep","setChallengeName","setMissingAttributes","setTotpSecretCode"],target:"#signUpActor.resolved"}],onError:{actions:"setRemoteError",target:"#signUpActor.resolved"}},mS={onDone:[{cond:"shouldVerifyAttribute",actions:["setShouldVerifyUserAttributeStep","setUnverifiedUserAttributes"],target:"#signUpActor.resolved"},{actions:"setConfirmAttributeCompleteStep",target:"#signUpActor.resolved"}],onError:{actions:"setConfirmAttributeCompleteStep",target:"#signUpActor.resolved"}};function gS({services:e}){return qe({id:"signUpActor",initial:"init",predictableActionArguments:!0,states:{init:{always:[{cond:"shouldConfirmSignUp",target:"confirmSignUp"},{target:"signUp"}]},autoSignIn:{tags:"pending",invoke:{src:"autoSignIn",...pS}},fetchUserAttributes:{invoke:{src:"fetchUserAttributes",...mS}},resetPassword:{invoke:{src:"resetPassword",...fS}},resendSignUpCode:{tags:"pending",entry:"sendUpdate",exit:"sendUpdate",invoke:{src:"resendSignUpCode",onDone:{actions:["setCodeDeliveryDetails","sendUpdate"],target:"#signUpActor.confirmSignUp"},onError:[{cond:"isUserAlreadyConfirmed",target:"#signUpActor.resolved"},{actions:["setRemoteError","sendUpdate"]}]}},signUp:{type:"parallel",exit:"clearTouched",states:{validation:{initial:"pending",states:{pending:{invoke:{src:"validateSignUp",onDone:{actions:"clearValidationError",target:"valid"},onError:{actions:"setFieldErrors",target:"invalid"}}},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:{entry:["sendUpdate","clearError"],invoke:{src:"federatedSignIn",onError:{actions:"setRemoteError"}}},validate:{entry:"sendUpdate",invoke:{src:"validateSignUp",onDone:{target:"signUp",actions:"clearValidationError"},onError:{actions:"setFieldErrors",target:"idle"}}},signUp:{tags:"pending",entry:["setUsernameSignUp","clearError"],exit:"sendUpdate",invoke:{src:"handleSignUp",onDone:[{cond:"hasCompletedSignUp",actions:"setNextSignUpStep",target:"#signUpActor.resolved"},{cond:"shouldAutoSignIn",actions:"setNextSignUpStep",target:"#signUpActor.autoSignIn"},{actions:["setCodeDeliveryDetails","setNextSignUpStep"],target:"#signUpActor.init"}],onError:{actions:["sendUpdate","setRemoteError"],target:"idle"}}}}}}},confirmSignUp:{initial:"edit",entry:"sendUpdate",states:{edit:{on:{SUBMIT:{actions:"handleSubmit",target:"submit"},CHANGE:{actions:"handleInput"},BLUR:{actions:"handleBlur"},RESEND:"#signUpActor.resendSignUpCode"}},submit:{tags:"pending",entry:["clearError","sendUpdate"],invoke:{src:"confirmSignUp",onDone:[{cond:"shouldAutoSignIn",actions:["setNextSignUpStep","clearFormValues"],target:"#signUpActor.autoSignIn"},{actions:"setNextSignUpStep",target:"#signUpActor.init"}],onError:{actions:["setRemoteError","sendUpdate"],target:"edit"}}}}},resolved:{type:"final",data:t=>({challengeName:t.challengeName,missingAttributes:t.missingAttributes,remoteError:t.remoteError,step:t.step,totpSecretCode:t.totpSecretCode,unverifiedUserAttributes:t.unverifiedUserAttributes})}}},{actions:{...Ct,sendUpdate:an()},guards:hn,services:{autoSignIn(){return H.autoSignIn()},async fetchUserAttributes(){return H.fetchUserAttributes()},confirmSignUp({formValues:t,username:n}){const{confirmation_code:o}=t,i={username:n,confirmationCode:o};return e.handleConfirmSignUp(i)},resendSignUpCode({username:t}){return H.resendSignUpCode({username:t})},async federatedSignIn(t,{data:n}){return H.signInWithRedirect(n)},async handleSignUp(t,n){const{formValues:o,loginMechanisms:i,username:a}=t,s=i[0],c=dv(a,o,s);return e.handleSignUp(c)},async validateSignUp(t,n){return yn(t.formValues,t.touched,t.passwordSettings,[e.validateFormPassword,e.validateConfirmPassword,e.validatePreferredUsername,e.validateCustomSignUp])}}})}const hS=()=>qe({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:()=>H.signOut()}});function yS(){return qe({id:"verifyUserAttributesActor",initial:"selectUserAttributes",predictableActionArguments:!0,states:{selectUserAttributes:{initial:"edit",exit:["clearError","clearTouched","sendUpdate"],states:{edit:{entry:"sendUpdate",on:{SUBMIT:{actions:"handleSubmit",target:"submit"},SKIP:{target:"#verifyUserAttributesActor.resolved"},CHANGE:{actions:"handleInput"}}},submit:{tags:"pending",entry:["clearError","sendUpdate"],invoke:{src:"sendUserAttributeVerificationCode",onDone:{actions:["setSelectedUserAttribute","setCodeDeliveryDetails"],target:"#verifyUserAttributesActor.confirmVerifyUserAttribute"},onError:{actions:"setRemoteError",target:"edit"}}}}},confirmVerifyUserAttribute:{initial:"edit",exit:["clearError","clearFormValues","clearTouched"],states:{edit:{entry:"sendUpdate",on:{SUBMIT:{actions:"handleSubmit",target:"submit"},SKIP:"#verifyUserAttributesActor.resolved",CHANGE:{actions:"handleInput"}}},submit:{tags:"pending",entry:["clearError","sendUpdate"],invoke:{src:"confirmVerifyUserAttribute",onDone:{actions:["setConfirmAttributeCompleteStep","clearSelectedUserAttribute"],target:"#verifyUserAttributesActor.resolved"},onError:{actions:"setRemoteError",target:"edit"}}}}},resolved:{type:"final",data:({step:e})=>({step:e})}}},{actions:{...Ct,sendUpdate:an()},services:{sendUserAttributeVerificationCode({formValues:{unverifiedAttr:e}}){const t={userAttributeKey:e};return H.sendUserAttributeVerificationCode(t)},async confirmVerifyUserAttribute({formValues:{confirmation_code:e},selectedUserAttribute:t}){const n={confirmationCode:e,userAttributeKey:t};return H.confirmUserAttribute(n)},async validateFields(e){return yn(e.formValues,e.touched,e.passwordSettings,[Te.validateFormPassword,Te.validateConfirmPassword])}}})}const Ut=(e,t)=>{var n,o,i,a,s,c,l;return{...e.actorDoneData,step:(o=(n=e==null?void 0:e.actorDoneData)==null?void 0:n.step)!=null?o:t,formValues:{},touched:{},validationError:{},formFields:(i=e.config)==null?void 0:i.formFields,loginMechanisms:(a=e.config)==null?void 0:a.loginMechanisms,passwordSettings:(s=e.config)==null?void 0:s.passwordSettings,signUpAttributes:(c=e.config)==null?void 0:c.signUpAttributes,socialProviders:(l=e.config)==null?void 0:l.socialProviders}},{choose:vS,stop:wS}=bi,it=e=>wS(e),_S={on:{INIT:{actions:["configure"],target:"getConfig"}}},SS={always:{actions:["configure"],target:"getConfig"}};function CS(e){const{useNextWaitConfig:t,...n}=e!=null?e:{};return qe({id:"authenticator",initial:"idle",context:{user:void 0,config:{},services:Te,actorRef:void 0,hasSetup:!1},predictableActionArguments:!0,states:{idle:{invoke:{src:"handleGetCurrentUser",onDone:{actions:"setUser",target:"authenticated"},onError:{target:"setup"}}},setup:{initial:"initConfig",states:{initConfig:t?SS:_S,getConfig:{invoke:{src:"getAmplifyConfig",onDone:{actions:["applyAmplifyConfig","setHasSetup"],target:"goToInitialState"}}},goToInitialState:{always:[{cond:"isInitialStateSignUp",target:"#authenticator.signUpActor"},{cond:"isInitialStateResetPassword",target:"#authenticator.forgotPasswordActor"},{target:"#authenticator.signInActor"}]}}},getCurrentUser:{invoke:{src:"handleGetCurrentUser",onDone:{actions:"setUser",target:"#authenticator.authenticated"},onError:{target:"#authenticator.setup"}}},signInActor:{initial:"spawnActor",states:{spawnActor:{always:{actions:"spawnSignInActor",target:"runActor"}},runActor:{entry:"clearActorDoneData",exit:it("signInActor")}},on:{FORGOT_PASSWORD:"forgotPasswordActor",SIGN_IN:"signInActor",SIGN_UP:"signUpActor","done.invoke.signInActor":[{cond:"hasCompletedAttributeConfirmation",target:"#authenticator.getCurrentUser"},{cond:"isShouldConfirmUserAttributeStep",actions:"setActorDoneData",target:"#authenticator.verifyUserAttributesActor"},{cond:"isResetPasswordStep",actions:"setActorDoneData",target:"#authenticator.forgotPasswordActor"},{cond:"isConfirmSignUpStep",actions:"setActorDoneData",target:"#authenticator.signUpActor"}]}},signUpActor:{initial:"spawnActor",states:{spawnActor:{always:{actions:"spawnSignUpActor",target:"runActor"}},runActor:{entry:"clearActorDoneData",exit:it("signUpActor")}},on:{SIGN_IN:"signInActor","done.invoke.signUpActor":[{cond:"hasCompletedAttributeConfirmation",target:"#authenticator.getCurrentUser"},{cond:"isConfirmUserAttributeStep",target:"#authenticator.verifyUserAttributesActor"},{actions:"setActorDoneData",target:"#authenticator.signInActor"}]}},forgotPasswordActor:{initial:"spawnActor",states:{spawnActor:{always:{actions:"spawnForgotPasswordActor",target:"runActor"}},runActor:{entry:"clearActorDoneData",exit:it("forgotPasswordActor")}},on:{SIGN_IN:"signInActor","done.invoke.forgotPasswordActor":[{target:"#authenticator.signInActor"}]}},verifyUserAttributesActor:{initial:"spawnActor",states:{spawnActor:{always:{actions:"spawnVerifyUserAttributesActor",target:"runActor"}},runActor:{entry:"clearActorDoneData",exit:it("verifyUserAttributesActor")}},on:{"done.invoke.verifyUserAttributesActor":[{actions:"setActorDoneData",target:"#authenticator.getCurrentUser"}]}},authenticated:{initial:"idle",states:{idle:{on:{TOKEN_REFRESH:"refreshUser"}},refreshUser:{invoke:{src:"#authenticator.getCurrentUser",onDone:{actions:"setUser",target:"idle"},onError:{target:"#authenticator.signOut"}}}},on:{SIGN_OUT:"signOut"}},signOut:{initial:"spawnActor",states:{spawnActor:{always:{actions:"spawnSignOutActor",target:"runActor"}},runActor:{entry:"clearActorDoneData",exit:it("signOutActor")}},on:{"done.invoke.signOutActor":{actions:"clearUser",target:"setup.getConfig"}}}},on:{SIGN_IN_WITH_REDIRECT:{target:"#authenticator.getCurrentUser"},CHANGE:{actions:"forwardToActor"},BLUR:{actions:"forwardToActor"},SUBMIT:{actions:"forwardToActor"},FEDERATED_SIGN_IN:{actions:"forwardToActor"},RESEND:{actions:"forwardToActor"},SIGN_IN:{actions:"forwardToActor"},SKIP:{actions:"forwardToActor"}}},{actions:{...Ct,forwardToActor:vS([{cond:"hasActor",actions:nl(({actorRef:i})=>i)}]),setActorDoneData:ve({actorDoneData:(i,a)=>({codeDeliveryDetails:a.data.codeDeliveryDetails,missingAttributes:a.data.missingAttributes,remoteError:a.data.remoteError,username:a.data.username,step:a.data.step,totpSecretCode:a.data.totpSecretCode,unverifiedUserAttributes:a.data.unverifiedUserAttributes})}),applyAmplifyConfig:ve({config(i,{data:a}){var p,h,v,S,g;const{loginMechanisms:s=(p=a.loginMechanisms)!=null?p:[],signUpAttributes:c=(h=a.signUpAttributes)!=null?h:[],socialProviders:l=(v=a.socialProviders)!=null?v:[],initialState:u,formFields:d,passwordSettings:m=(S=a.passwordFormat)!=null?S:{}}=i.config;return s.length===0&&s.push("username"),{formFields:(g=bS(d))!=null?g:{},initialState:u,loginMechanisms:s,passwordSettings:m,signUpAttributes:c,socialProviders:l}}}),spawnSignInActor:ve({actorRef:(i,a)=>{const{services:s}=i,c=dS({services:s}).withContext(Ut(i,"SIGN_IN"));return rt(c,{name:"signInActor"})}}),spawnSignUpActor:ve({actorRef:(i,a)=>{const{services:s}=i,c=gS({services:s}).withContext(Ut(i,"SIGN_UP"));return rt(c,{name:"signUpActor"})}}),spawnForgotPasswordActor:ve({actorRef:(i,a)=>{const{services:s}=i,c=lS({services:s}).withContext(Ut(i,"FORGOT_PASSWORD"));return rt(c,{name:"forgotPasswordActor"})}}),spawnVerifyUserAttributesActor:ve({actorRef:i=>{const a=yS().withContext(Ut(i));return rt(a,{name:"verifyUserAttributesActor"})}}),spawnSignOutActor:ve({actorRef:i=>{const a=hS().withContext({user:i==null?void 0:i.user});return rt(a,{name:"signOutActor"})}}),configure:ve((i,a)=>{const{services:s,...c}=La(n)?a.data:n;return{services:{...Te,...s},config:c}}),setHasSetup:ve({hasSetup:!0})},guards:{...hn,hasActor:({actorRef:i})=>!!i,isInitialStateSignUp:({config:i})=>i.initialState==="signUp",isInitialStateResetPassword:({config:i})=>i.initialState==="forgotPassword",shouldSetup:({hasSetup:i})=>!i},services:{getAmplifyConfig:({services:i})=>i.getAmplifyConfig(),handleGetCurrentUser:({services:i})=>i.getCurrentUser()}})}function bS(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 J={Accordion:"amplify-accordion",AccordionItem:"amplify-accordion__item",AccordionItemTrigger:"amplify-accordion__item__trigger",AccordionItemContent:"amplify-accordion__item__content",AccordionItemIcon:"amplify-accordion__item__icon",Alert:"amplify-alert",AlertIcon:"amplify-alert__icon",AlertHeading:"amplify-alert__heading",AlertBody:"amplify-alert__body",AlertDismiss:"amplify-alert__dismiss",Autocomplete:"amplify-autocomplete",AutocompleteMenu:"amplify-autocomplete__menu",AutocompleteMenuEmpty:"amplify-autocomplete__menu--empty",AutocompleteMenuFooter:"amplify-autocomplete__menu__footer",AutocompleteMenuHeader:"amplify-autocomplete__menu__header",AutocompleteMenuLoading:"amplify-autocomplete__menu--loading",AutocompleteMenuOption:"amplify-autocomplete__menu__option",AutocompleteMenuOptions:"amplify-autocomplete__menu__options",Badge:"amplify-badge",Breadcrumbs:"amplify-breadcrumbs",BreadcrumbsList:"amplify-breadcrumbs__list",BreadcrumbsItem:"amplify-breadcrumbs__item",BreadcrumbsSeparator:"amplify-breadcrumbs__separator",BreadcrumbsLink:"amplify-breadcrumbs__link",Button:"amplify-button",ButtonGroup:"amplify-buttongroup",ButtonLoaderWrapper:"amplify-button__loader-wrapper",Card:"amplify-card",Checkbox:"amplify-checkbox",CheckboxButton:"amplify-checkbox__button",CheckboxIcon:"amplify-checkbox__icon",CheckboxInput:"amplify-checkbox__input",CheckboxLabel:"amplify-checkbox__label",CheckboxField:"amplify-checkboxfield",Collection:"amplify-collection",CollectionItems:"amplify-collection-items",CollectionSearch:"amplify-collection-search",CollectionPagination:"amplify-collection-pagination",CountryCodeSelect:"amplify-countrycodeselect",DialCodeSelect:"amplify-dialcodeselect",Divider:"amplify-divider",DividerLabel:"amplify-divider--label",DropZone:"amplify-dropzone",Field:"amplify-field",FieldDescription:"amplify-field__description",FieldErrorMessage:"amplify-field__error-message",FieldGroup:"amplify-field-group",FieldGroupControl:"amplify-field-group__control",FieldGroupOuterEnd:"amplify-field-group__outer-end",FieldGroupOuterStart:"amplify-field-group__outer-start",FieldGroupInnerEnd:"amplify-field-group__inner-end",FieldGroupInnerStart:"amplify-field-group__inner-start",FieldGroupIcon:"amplify-field-group__icon",FieldGroupIconButton:"amplify-field-group__icon-button",FieldGroupHasInnerEnd:"amplify-field-group--has-inner-end",FieldGroupHasInnerStart:"amplify-field-group--has-inner-start",FieldShowPassword:"amplify-field__show-password",FieldGroupFieldWrapper:"amplify-field-group__field-wrapper",Fieldset:"amplify-fieldset",FieldsetLegend:"amplify-fieldset__legend",Flex:"amplify-flex",Grid:"amplify-grid",Heading:"amplify-heading",HighlightMatch:"amplify-highlightmatch",HighlightMatchHighlighted:"amplify-highlightmatch__highlighted",Icon:"amplify-icon",Image:"amplify-image",Input:"amplify-input",Label:"amplify-label",Link:"amplify-link",Loader:"amplify-loader",LoaderLabel:"amplify-loader__label",MenuContent:"amplify-menu__content",MenuItem:"amplify-menu__content__item",MenuTrigger:"amplify-menu__trigger",MenuWrapper:"amplify-menu__wrapper",Message:"amplify-message",MessageIcon:"amplify-message__icon",MessageHeading:"amplify-message__heading",MessageBody:"amplify-message__body",MessageContent:"amplify-message__content",MessageDismiss:"amplify-message__dismiss",Pagination:"amplify-pagination",PaginationItem:"amplify-pagination__item",PasswordField:"amplify-passwordfield",PhoneNumberField:"amplify-phonenumberfield",Placeholder:"amplify-placeholder",Radio:"amplify-radio",RadioButton:"amplify-radio__button",RadioInput:"amplify-radio__input",RadioLabel:"amplify-radio__label",RadioGroupField:"amplify-radiogroupfield",RadioGroup:"amplify-radiogroup",Rating:"amplify-rating",RatingItem:"amplify-rating__item",RatingIcon:"amplify-rating__icon",RatingLabel:"amplify-rating__label",ScrollView:"amplify-scrollview",SearchField:"amplify-searchfield",SearchFieldClear:"amplify-searchfield__clear",SearchFieldSearch:"amplify-searchfield__search",Select:"amplify-select",SelectField:"amplify-selectfield",SelectWrapper:"amplify-select__wrapper",SelectIcon:"amplify-select__icon",SliderField:"amplify-sliderfield",SliderFieldGroup:"amplify-sliderfield__group",SliderFieldLabel:"amplify-sliderfield__label",SliderFieldRange:"amplify-sliderfield__range",SliderFieldRoot:"amplify-sliderfield__root",SliderFieldThumb:"amplify-sliderfield__thumb",SliderFieldTrack:"amplify-sliderfield__track",StepperField:"amplify-stepperfield",StepperFieldButtonDecrease:"amplify-stepperfield__button--decrease",StepperFieldButtonIncrease:"amplify-stepperfield__button--increase",StepperFieldInput:"amplify-stepperfield__input",StorageImage:"amplify-storageimage",StorageManager:"amplify-storagemanager",StorageManagerDropZone:"amplify-storagemanager__dropzone",StorageManagerDropZoneIcon:"amplify-storagemanager__dropzone__icon",StorageManagerDropZoneText:"amplify-storagemanager__dropzone__text",StorageManagerFilePicker:"amplify-storagemanager__file__picker",StorageManagerFile:"amplify-storagemanager__file",StorageManagerFileWrapper:"amplify-storagemanager__file__wrapper",StorageManagerFileList:"amplify-storagemanager__file__list",StorageManagerFileName:"amplify-storagemanager__file__name",StorageManagerFileSize:"amplify-storagemanager__file__size",StorageManagerFileInfo:"amplify-storagemanager__file__info",StorageManagerFileImage:"amplify-storagemanager__file__image",StorageManagerFileMain:"amplify-storagemanager__file__main",StorageManagerFileStatus:"amplify-storagemanager__file__status",StorageManagerLoader:"amplify-storagemanager__loader",StorageManagerPreviewer:"amplify-storagemanager__previewer",StorageManagerPreviewerText:"amplify-storagemanager__previewer__text",StorageManagerPreviewerActions:"amplify-storagemanager__previewer__actions",StorageManagerPreviewerFooter:"amplify-storagemanager__previewer__footer",SwitchField:"amplify-switchfield",SwitchLabel:"amplify-switch__label",SwitchThumb:"amplify-switch__thumb",SwitchTrack:"amplify-switch__track",SwitchWrapper:"amplify-switch__wrapper",Table:"amplify-table",TableCaption:"amplify-table__caption",TableBody:"amplify-table__body",TableTd:"amplify-table__td",TableTh:"amplify-table__th",TableFoot:"amplify-table__foot",TableHead:"amplify-table__head",TableRow:"amplify-table__row",Tabs:"amplify-tabs",TabsList:"amplify-tabs__list",TabsItem:"amplify-tabs__item",TabsPanel:"amplify-tabs__panel",Text:"amplify-text",Textarea:"amplify-textarea",TextAreaField:"amplify-textareafield",TextField:"amplify-textfield",ToggleButton:"amplify-togglebutton",ToggleButtonGroup:"amplify-togglebuttongroup",VisuallyHidden:"amplify-visually-hidden"},AS=({componentName:e,packageName:t,version:n})=>{const o=[`ui-${t}`,n];switch(e){case"Authenticator":{L.setCustomUserAgent({...Ra,additionalDetails:[[e],o]});break}case"ChangePassword":case"DeleteUser":{L.setCustomUserAgent({...$a,additionalDetails:[["AccountSettings"],o]});break}case"InAppMessaging":{L.setCustomUserAgent({...Oa,additionalDetails:[[e],o]});break}case"LocationSearch":{L.setCustomUserAgent({...Fa,additionalDetails:[[e],o]});break}case"MapView":{L.setCustomUserAgent({...Da,additionalDetails:[[e],o]});break}case"StorageManager":{L.setCustomUserAgent({...Ma,additionalDetails:[[e],o]});break}}return za},ES={key:0,class:"amplify-flex amplify-alert amplify-alert--error amplify-authenticator__base","data-variation":"error",role:"alert"},IS={class:"amplify-flex amplify-authenticator__icon-wrapper"},TS=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),NS=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),me={__name:"base-alert",setup(e){const t=r.ref(!0),n=P("Dismiss alert");function o(){t.value=!1}return(i,a)=>{const s=ee;return t.value?(r.openBlock(),r.createElementBlock("div",ES,[r.createElementVNode("div",IS,[TS,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(()=>[NS]),_:1},8,["aria-label"])])):r.createCommentVNode("",!0)}}},ge=r.defineComponent({__name:"base-field-set",setup(e){const 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 PS(e){return r.getCurrentScope()?(r.onScopeDispose(e),!0):!1}function ra(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))),PS(i),n)}function kS(e){return"state"in e}var Wo=function(){};function xS(e){return"getSnapshot"in e?e.getSnapshot():kS(e)?e.state:void 0}function US(e,t){t===void 0&&(t=xS);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,c){o.value=t(a);var l=a.subscribe({next:function(u){return o.value=u},error:Wo,complete:Wo}).unsubscribe;c(function(){return l()})},{immediate:!0}),{state:o,send:i}}const $S=e=>{var t,n,o;return{...(o=(n=(t=or(e))==null?void 0:t.formFields)==null?void 0:n.setupTotp)==null?void 0:o.QR}},Pr=ra(()=>{const e=CS(),t=Pi(e).start(),n=r.ref("configuring"),{state:o,send:i}=US(t),a=()=>{n.value="authenticated"},s=()=>{n.value="unauthenticated"},c=Wa(t,async(l,u)=>{await Zo(l,u,{onSignIn:a,onSignOut:s})});return H.getCurrentUser().then(()=>{n.value="authenticated"}).catch(()=>{n.value="unauthenticated"}),r.onScopeDispose(()=>{c()}),{authStatus:n,service:t,send:i,state:o}}),Q=ra(()=>{const{authStatus:e,state:t,send:n}=Pr(),o=r.reactive({});return r.watchEffect(()=>{const i=Za({send:n,state:t.value});for(const s of Object.keys(i))o[s]=i[s];const a=i.route==="setupTotp"?$S(t.value):null;o.QRFields=a,o.authStatus=e.value,o.send=n,o.state=t}),o});let RS=(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 vn=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))}}),OS={},FS={"data-amplify-label":""};function DS(e,t){return r.openBlock(),r.createElementBlock("label",FS,[r.renderSlot(e.$slots,"default")])}var wn=Jt(OS,[["render",DS]]);const MS=["aria-label","aria-checked"],BS=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),VS=[BS],LS=r.createElementVNode("path",{d:"M0 0h24v24H0zm0 0h24v24H0zm0 0h24v24H0zm0 0h24v24H0z",fill:"none"},null,-1),GS=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),zS=[LS,GS],jS={inheritAttrs:!1},kr=r.defineComponent({...jS,__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 w;const t=e,n=P("Show password"),o=P("Hide password"),i=r.ref("password"),a=r.ref(n),s=Math.floor(Math.random()*999999),{name:c,label:l,autocomplete:u,hasError:d,labelHidden:m,placeholder:f,required:p}=r.toRefs(t),h=r.ref("");function v(){a.value=a.value===n?o:n,i.value=i.value==="password"?"text":"password"}const S=P((w=f==null?void 0:f.value)!=null?w:l.value),g=P(l.value);return(y,_)=>{const C=wn,A=vn,E=Z;return r.openBlock(),r.createBlock(E,{class:r.normalizeClass([r.unref(J).Flex,r.unref(J).Field,r.unref(J).TextField,r.unref(J).PasswordField])},{default:r.withCtx(()=>[r.createVNode(C,{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(g)),1)]),_:1},8,["class","for"]),r.createVNode(E,{class:r.normalizeClass([r.unref(J).Flex,r.unref(J).FieldGroup])},{default:r.withCtx(()=>[r.createVNode(E,{class:r.normalizeClass(r.unref(J).FieldGroupFieldWrapper)},{default:r.withCtx(()=>{var T;return[r.createVNode(A,r.mergeProps(y.$attrs,{modelValue:h.value,"onUpdate:modelValue":_[0]||(_[0]=N=>h.value=N),class:[r.unref(J).Input,r.unref(J).FieldGroupControl],id:"amplify-field-"+r.unref(s),"data-amplify-password":"true",name:r.unref(c),autocomplete:r.unref(u),required:(T=r.unref(p))!=null?T:!0,placeholder:r.unref(S),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(E,{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:v},[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)},VS,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)},zS,2))],10,MS)]),_:1},8,["class"])]),_:1},8,["class"])]),_:1},8,["class"])}}}),WS=["value","selected"],HS=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,c)=>(r.openBlock(),r.createElementBlock("select",{onChange:c[0]||(c[0]=l=>a(l))},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(o),(l,u)=>(r.openBlock(),r.createElementBlock("option",{key:u,value:l,selected:l==r.unref(i)?!0:void 0},r.toDisplayString(l),9,WS))),128))],32))}}),YS=r.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24",class:"amplify-icon"},[r.createElementVNode("path",{d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})],-1),KS=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:c,dialCode:l,dialCodeList:u}=r.toRefs(t),d=Math.floor(Math.random()*999999),m=Math.floor(Math.random()*999999);return(f,p)=>{const h=wn,v=HS,S=Z,g=vn;return r.openBlock(),r.createBlock(S,{class:"amplify-flex amplify-field amplify-textfield amplify-phonenumberfield"},{default:r.withCtx(()=>[r.createVNode(h,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(S,{class:"amplify-flex amplify-field-group"},{default:r.withCtx(()=>[r.createVNode(S,{class:"amplify-field-group__outer-start"},{default:r.withCtx(()=>[e.type==="tel"?(r.openBlock(),r.createBlock(S,{key:0,class:"amplify-flex amplify-field amplify-selectfield amplify-countrycodeselect amplify-dialcodeselect amplify-authenticator__column"},{default:r.withCtx(()=>[r.createVNode(h,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(S,{class:"amplify-select__wrapper"},{default:r.withCtx(()=>[r.createVNode(v,{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(u),"select-value":r.unref(l)},null,8,["id","options","select-value"]),r.createVNode(S,{class:"amplify-flex amplify-select__icon"},{default:r.withCtx(()=>[YS]),_:1})]),_:1})]),_:1})):r.createCommentVNode("",!0)]),_:1}),r.createVNode(S,{class:"amplify-field-group__field-wrapper"},{default:r.withCtx(()=>{var w;return[r.createVNode(g,{class:"amplify-input amplify-field-group__control",id:"amplify-field-"+r.unref(d),autocomplete:r.unref(a),name:r.unref(o),required:(w=r.unref(c))!=null?w:!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})}}}),qS=["id"],oa=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(Q()),{type:a}=o.value,s=a==="password",c=RS(12),l=r.computed(()=>ns(i.value[n.value])),u=r.computed(()=>{var m;return((m=l.value)==null?void 0:m.length)>0}),d=r.computed(()=>u.value?c:void 0);return(m,f)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[s?(r.openBlock(),r.createBlock(kr,{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(u),describedBy:r.unref(d)},null,8,["name","label","placeholder","required","label-hidden","autocomplete","hasError","describedBy"])):(r.openBlock(),r.createBlock(KS,{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(u),describedBy:r.unref(d)},null,8,["name","label","placeholder","required","label-hidden","autocomplete","dial-code","dial-code-list","type","hasError","describedBy"])),r.unref(u)?(r.openBlock(),r.createElementBlock("div",{key:2,id:r.unref(d)},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(l),(p,h)=>(r.openBlock(),r.createElementBlock("p",{key:h,role:"alert","data-variation":"error",class:"amplify-text amplify-text--error"},r.toDisplayString(r.unref(P)(p)),1))),128))],8,qS)):r.createCommentVNode("",!0)],64))}}),he=r.defineComponent({__name:"base-form-fields",props:{route:null},setup(e){const t=e,{route:n}=r.toRefs(t),{state:o}=Pr();let i=[];return r.onBeforeMount(()=>{i=oc(n.value,o.value)}),(a,s)=>(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(i),([c,l])=>(r.openBlock(),r.createBlock(oa,{name:c,key:c,formField:l},null,8,["name","formField"]))),128))}}),$t=r.defineComponent({__name:"federated-sign-in-button",props:{provider:null},setup(e){const t=e,{provider:n}=r.toRefs(t),{toFederatedSignIn:o}=Q(),i=()=>{o({provider:n.value})};return(a,s)=>{const c=ee;return r.openBlock(),r.createBlock(c,{class:"amplify-authenticator__federated-button",type:"button",onClick:i},{default:r.withCtx(()=>[r.renderSlot(a.$slots,"default")]),_:3})}}}),JS=r.createElementVNode("svg",{"aria-label":"Amazon icon",class:"amplify-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),ZS={class:"amplify-text"},QS=r.createElementVNode("svg",{"aria-label":"Apple icon",class:"amplify-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),XS={class:"amplify-text"},eC=r.createElementVNode("svg",{"aria-label":"Facebook icon",class:"amplify-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),tC={class:"amplify-text"},nC=r.createElementVNode("svg",{"aria-label":"Google icon",class:"amplify-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),rC={class:"amplify-text"},oC=["data-label"],_n=r.defineComponent({__name:"federated-sign-in",setup(e){const t=Q(),{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"),c=o==null?void 0:o.includes("google"),l=s||c||i||a,{getSignInWithFederationText:u,getOrText:d}=re,m=r.computed(()=>Fn),f=r.computed(()=>u(n,"amazon")),p=r.computed(()=>u(n,"apple")),h=r.computed(()=>u(n,"facebook")),v=r.computed(()=>u(n,"google")),S=r.computed(()=>d());return(g,w)=>{const y=Z;return r.unref(l)?(r.openBlock(),r.createBlock(y,{key:0,class:"amplify-flex amplify-authenticator__federated-buttons"},{default:r.withCtx(()=>[r.unref(i)?(r.openBlock(),r.createBlock($t,{key:0,provider:r.unref(m).Amazon},{default:r.withCtx(()=>[JS,r.createElementVNode("span",ZS,r.toDisplayString(r.unref(f)),1)]),_:1},8,["provider"])):r.createCommentVNode("",!0),r.unref(a)?(r.openBlock(),r.createBlock($t,{key:1,provider:r.unref(m).Apple},{default:r.withCtx(()=>[QS,r.createElementVNode("span",XS,r.toDisplayString(r.unref(p)),1)]),_:1},8,["provider"])):r.createCommentVNode("",!0),r.unref(s)?(r.openBlock(),r.createBlock($t,{key:2,provider:r.unref(m).Facebook},{default:r.withCtx(()=>[eC,r.createElementVNode("span",tC,r.toDisplayString(r.unref(h)),1)]),_:1},8,["provider"])):r.createCommentVNode("",!0),r.unref(c)?(r.openBlock(),r.createBlock($t,{key:3,provider:r.unref(m).Google},{default:r.withCtx(()=>[nC,r.createElementVNode("span",rC,r.toDisplayString(r.unref(v)),1)]),_:1},8,["provider"])):r.createCommentVNode("",!0),r.createElementVNode("hr",{class:"amplify-divider amplify-divider--horizontal amplify-divider--small","aria-orientation":"horizontal","data-label":r.unref(S)},null,8,oC)]),_:1})):r.createCommentVNode("",!0)}}}),iC=r.createElementVNode("legend",{class:"amplify-visually-hidden"},"Sign in",-1),aC={"data-amplify-footer":""},xr=r.defineComponent({__name:"sign-in",setup(e){const t=Q(),{submitForm:n,updateForm:o,toForgotPassword:i}=t,{error:a,isPending:s}=r.toRefs(t),{getForgotPasswordText:c,getSignInText:l,getSigningInText:u}=re,d=r.computed(()=>c()),m=r.computed(()=>l()),f=r.computed(()=>u()),p=S=>{const{name:g,value:w}=S.target;o({name:g,value:w})},h=S=>{n(fe(S))},v=()=>{i()};return(S,g)=>{const w=ge,y=me,_=ee,C=Z,A=de,E=ue;return r.renderSlot(S.$slots,"signInSlotI",r.normalizeProps(r.guardReactiveProps(S.$attrs)),()=>[r.renderSlot(S.$slots,"header"),r.createVNode(C,r.normalizeProps(r.guardReactiveProps(S.$attrs)),{default:r.withCtx(()=>[r.createVNode(A,{"data-amplify-authenticator-signin":"",onInput:p,onSubmit:r.withModifiers(h,["prevent"]),method:"post"},{formt:r.withCtx(({slotData:T})=>[r.renderSlot(S.$slots,"form",{info:T,onSignInSubmit:h,onInput:p,onForgotPasswordClicked:v})]),default:r.withCtx(()=>[r.createVNode(_n),r.createVNode(C,{class:"amplify-flex amplify-authenticator__column"},{default:r.withCtx(()=>[r.createVNode(w,{disabled:r.unref(s),class:"amplify-flex amplify-authenticator__column"},{fieldSetI:r.withCtx(({slotData:T})=>[r.renderSlot(S.$slots,"signin-fields",{info:T})]),default:r.withCtx(()=>[iC,r.createVNode(he,{route:"signIn"})]),_:3},8,["disabled"]),r.unref(a)?(r.openBlock(),r.createBlock(y,{key:0},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(P)(r.unref(a))),1)]),_:1})):r.createCommentVNode("",!0),r.createVNode(_,{disabled:r.unref(s),class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!0,loading:!1,variation:"primary"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(s)?r.unref(f):r.unref(m)),1)]),_:1},8,["disabled"])]),_:3})]),_:3},8,["onSubmit"])]),_:3},16),r.createVNode(E,null,{default:r.withCtx(()=>[r.renderSlot(S.$slots,"footer",{},()=>[r.createElementVNode("div",aC,[r.createVNode(_,{onClick:v,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(d)),1)]),_:1})])])]),_:3})])}}}),Ur=r.defineComponent({__name:"authenticator-sign-up-form-fields",setup(e){return(t,n)=>(r.openBlock(),r.createBlock(he,{route:"signUp"}))}}),$r=r.defineComponent({__name:"sign-up",setup(e){const t=Q(),{submitForm:n,updateBlur:o,updateForm:i}=t,{error:a,hasValidationErrors:s,isPending:c}=r.toRefs(t),{getCreateAccountText:l}=re,u=r.computed(()=>l()),d=p=>{const{checked:h,name:v,type:S,value:g}=p.target;i({name:v,value:S==="checkbox"&&!h?void 0:g})};function m(p){const{name:h}=p.target;o({name:h})}const f=p=>{n(fe(p))};return(p,h)=>{const v=ge,S=me,g=ee,w=Z,y=de,_=ue;return r.renderSlot(p.$slots,"signUpSlotI",r.normalizeProps(r.guardReactiveProps(p.$attrs)),()=>[r.renderSlot(p.$slots,"header"),r.createVNode(w,r.normalizeProps(r.guardReactiveProps(p.$attrs)),{default:r.withCtx(()=>[r.createVNode(y,{onInput:d,onBlurCapture:m,onSubmit:r.withModifiers(f,["prevent"])},{default:r.withCtx(()=>[r.createVNode(_n),r.createVNode(w,{class:"amplify-flex amplify-authenticator__column"},{default:r.withCtx(()=>[r.createVNode(v,{class:"amplify-flex amplify-authenticator__column",disabled:r.unref(c)},{fieldSetI:r.withCtx(({slotData:C})=>[r.renderSlot(p.$slots,"signup-fields",{info:C})]),default:r.withCtx(()=>[r.createVNode(Ur)]),_:3},8,["disabled"]),r.unref(a)?(r.openBlock(),r.createBlock(S,{key:0},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(P)(r.unref(a))),1)]),_:1})):r.createCommentVNode("",!0),r.createVNode(g,{class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!0,loading:!1,variation:"primary",style:{"border-radius":"0px","font-weight":"normal"},disabled:r.unref(c)||r.unref(s)},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(u)),1)]),_:1},8,["disabled"])]),_:3})]),_:3},8,["onSubmit"])]),_:3},16),r.createVNode(_,null,{default:r.withCtx(()=>[r.renderSlot(p.$slots,"footer")]),_:3})])}}}),sC={};function cC(e,t){const n=Z;return r.openBlock(),r.createBlock(n,{tabindex:"0","aria-orientation":"horizontal","data-orientation":"horizontal",class:"amplify-authenticator__tabs amplify-tabs"},{default:r.withCtx(()=>[r.createVNode(n,{class:"amplify-tabs__list amplify-tabs__list--top amplify-tabs__list--equal amplify-authenticator__tabs-wrapper",role:"tablist"},{default:r.withCtx(()=>[r.renderSlot(e.$slots,"default")]),_:3})]),_:3})}var lC=Jt(sC,[["render",cC]]);const uC=["tabindex","aria-selected","id","aria-controls"],dC=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)=>(r.openBlock(),r.createElementBlock("button",{tabindex:r.unref(n)?0:-1,"aria-selected":r.unref(n)?"true":"false",class:r.normalizeClass([{"amplify-tabs__item--active":r.unref(n)},"amplify-tabs__item"]),id:`${r.unref(o)}-tab`,"aria-controls":`${r.unref(o)}-panel`,role:"tab"},r.toDisplayString(r.unref(i)),11,uC))}}),fC="3.1.29",pC={};function mC(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 ia=Jt(pC,[["render",mC]]);const Ne=r.defineComponent({props:{level:{type:Number,default:1}},inheritAttrs:!1,setup(e,{slots:t,attrs:n}){var s,c;const o=t.default?t.default():[],i=t.headingI?t.headingI():[],a=`${n.class||""} amplify-heading--${e.level}`;if(((c=(s=i[0])==null?void 0:s.children)==null?void 0:c.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}}),Rr=r.defineComponent({__name:"confirm-sign-up",setup(e){const t=Q(),{codeDeliveryDetails:n,error:o,isPending:i}=r.toRefs(t),{resendCode:a,submitForm:s,updateForm:c}=t,{getDeliveryMethodText:l,getDeliveryMessageText:u,getResendCodeText:d,getConfirmText:m}=re,f=r.computed(()=>l(n.value)),p=r.computed(()=>d()),h=r.computed(()=>m()),v=r.computed(()=>u(n.value)),S=_=>{const{name:C,value:A}=_.target;c({name:C,value:A})},g=_=>{w(_)},w=_=>{s(fe(_))},y=()=>{a()};return(_,C)=>{const A=Ne,E=ia,T=ge,N=me,k=ee,I=ue,x=Z,R=de;return r.renderSlot(_.$slots,"confirmSignUpSlotI",r.normalizeProps(r.guardReactiveProps(_.$attrs)),()=>[r.createVNode(x,r.normalizeProps(r.guardReactiveProps(_.$attrs)),{default:r.withCtx(()=>[r.createVNode(R,{onInput:S,onSubmit:r.withModifiers(g,["prevent"])},{default:r.withCtx(()=>[r.createVNode(x,{class:"amplify-flex amplify-authenticator__column"},{default:r.withCtx(()=>[r.renderSlot(_.$slots,"header",{},()=>[r.createVNode(A,{class:"amplify-heading amplify-authenticator__heading",level:3},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(f)),1)]),_:1})]),r.createVNode(E,{class:"amplify-authenticator__subtitle"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(v)),1)]),_:1}),r.createVNode(T,{class:"amplify-flex amplify-authenticator__column",disabled:r.unref(i)},{default:r.withCtx(()=>[r.createVNode(he,{route:"confirmSignUp"})]),_:1},8,["disabled"]),r.createVNode(I,{class:"amplify-flex amplify-authenticator__column"},{default:r.withCtx(()=>[r.unref(o)?(r.openBlock(),r.createBlock(N,{key:0},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(P)(r.unref(o))),1)]),_:1})):r.createCommentVNode("",!0),r.createVNode(k,{class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!1,loading:!1,variation:"primary",type:"submit",disabled:r.unref(i)},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(h)),1)]),_:1},8,["disabled"]),r.createVNode(k,{class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!1,variation:"default",style:{"font-weight":"normal"},type:"button",onClick:r.withModifiers(y,["prevent"])},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(p)),1)]),_:1},8,["onClick"]),r.renderSlot(_.$slots,"footer")]),_:3})]),_:3})]),_:3},8,["onSubmit"])]),_:3},16)])}}}),Or=r.defineComponent({__name:"confirm-sign-in",setup(e){const t=Q(),{submitForm:n,toSignIn:o,updateForm:i}=t,{error:a,isPending:s,challengeName:c}=r.toRefs(t),l=r.computed(()=>c.value),{getBackToSignInText:u,getConfirmText:d,getChallengeText:m}=re,f=r.computed(()=>m(l.value)),p=r.computed(()=>u()),h=r.computed(()=>d()),v=w=>{const{name:y,value:_}=w.target;i({name:y,value:_})},S=w=>{n(fe(w))},g=()=>{o()};return(w,y)=>{const _=Ne,C=Z,A=me,E=ee,T=ue,N=ge,k=de;return r.renderSlot(w.$slots,"confirmSignInSlotI",r.normalizeProps(r.guardReactiveProps(w.$attrs)),()=>[r.createVNode(C,r.normalizeProps(r.guardReactiveProps(w.$attrs)),{default:r.withCtx(()=>[r.createVNode(k,{"data-amplify-authenticator-confirmsignin":"",onInput:v,onSubmit:r.withModifiers(S,["prevent"])},{default:r.withCtx(()=>[r.createVNode(N,{class:"amplify-flex amplify-authenticator__column",disabled:r.unref(s)},{default:r.withCtx(()=>[r.renderSlot(w.$slots,"header",{},()=>[r.createVNode(_,{level:3,class:"amplify-heading"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(f)),1)]),_:1})]),r.createVNode(C,{class:"amplify-flex amplify-authenticator__column"},{default:r.withCtx(()=>[r.createVNode(he,{route:"confirmSignIn"})]),_:1}),r.createVNode(T,{class:"amplify-flex amplify-authenticator__column"},{default:r.withCtx(()=>[r.unref(a)?(r.openBlock(),r.createBlock(A,{key:0},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(P)(r.unref(a))),1)]),_:1})):r.createCommentVNode("",!0),r.createVNode(E,{class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!1,loading:!1,variation:"primary",style:{"font-weight":"normal"},disabled:r.unref(s)},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(h)),1)]),_:1},8,["disabled"]),r.createVNode(E,{class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!1,size:"small",variation:"link",style:{"font-weight":"normal"},type:"button",onClick:r.withModifiers(g,["prevent"])},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(p)),1)]),_:1},8,["onClick"]),r.renderSlot(w.$slots,"footer")]),_:3})]),_:3},8,["disabled"])]),_:3},8,["onSubmit"])]),_:3},16)])}}});var bt={},gC=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then},aa={},ne={};let Fr;const hC=[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];ne.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};ne.getSymbolTotalCodewords=function(t){return hC[t]};ne.getBCHDigit=function(e){let t=0;for(;e!==0;)t++,e>>>=1;return t};ne.setToSJISFunction=function(t){if(typeof t!="function")throw new Error('"toSJISFunc" is not a valid function.');Fr=t};ne.isKanjiModeEnabled=function(){return typeof Fr!="undefined"};ne.toSJIS=function(t){return Fr(t)};var Sn={};(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}}})(Sn);function sa(){this.buffer=[],this.length=0}sa.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 yC=sa;function At(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)}At.prototype.set=function(e,t,n,o){const i=e*this.size+t;this.data[i]=n,o&&(this.reservedBit[i]=!0)};At.prototype.get=function(e,t){return this.data[e*this.size+t]};At.prototype.xor=function(e,t,n){this.data[e*this.size+t]^=n};At.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]};var vC=At,ca={};(function(e){const t=ne.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,c=[a-7];for(let l=1;l<i-1;l++)c[l]=c[l-1]-s;return c.push(6),c.reverse()},e.getPositions=function(o){const i=[],a=e.getRowColCoords(o),s=a.length;for(let c=0;c<s;c++)for(let l=0;l<s;l++)c===0&&l===0||c===0&&l===s-1||c===s-1&&l===0||i.push([a[c],a[l]]);return i}})(ca);var la={};const wC=ne.getSymbolSize,Ho=7;la.getPositions=function(t){const n=wC(t);return[[0,0],[n-Ho,0],[0,n-Ho]]};var ua={};(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,c=0,l=0,u=null,d=null;for(let m=0;m<a;m++){c=l=0,u=d=null;for(let f=0;f<a;f++){let p=i.get(m,f);p===u?c++:(c>=5&&(s+=t.N1+(c-5)),u=p,c=1),p=i.get(f,m),p===d?l++:(l>=5&&(s+=t.N1+(l-5)),d=p,l=1)}c>=5&&(s+=t.N1+(c-5)),l>=5&&(s+=t.N1+(l-5))}return s},e.getPenaltyN2=function(i){const a=i.size;let s=0;for(let c=0;c<a-1;c++)for(let l=0;l<a-1;l++){const u=i.get(c,l)+i.get(c,l+1)+i.get(c+1,l)+i.get(c+1,l+1);(u===4||u===0)&&s++}return s*t.N2},e.getPenaltyN3=function(i){const a=i.size;let s=0,c=0,l=0;for(let u=0;u<a;u++){c=l=0;for(let d=0;d<a;d++)c=c<<1&2047|i.get(u,d),d>=10&&(c===1488||c===93)&&s++,l=l<<1&2047|i.get(d,u),d>=10&&(l===1488||l===93)&&s++}return s*t.N3},e.getPenaltyN4=function(i){let a=0;const s=i.data.length;for(let l=0;l<s;l++)a+=i.data[l];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 c=0;c<s;c++)for(let l=0;l<s;l++)a.isReserved(l,c)||a.xor(l,c,n(i,l,c))},e.getBestMask=function(i,a){const s=Object.keys(e.Patterns).length;let c=0,l=1/0;for(let u=0;u<s;u++){a(u),e.applyMask(u,i);const d=e.getPenaltyN1(i)+e.getPenaltyN2(i)+e.getPenaltyN3(i)+e.getPenaltyN4(i);e.applyMask(u,i),d<l&&(l=d,c=u)}return c}})(ua);var Cn={};const Ae=Sn,Rt=[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],Ot=[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];Cn.getBlocksCount=function(t,n){switch(n){case Ae.L:return Rt[(t-1)*4+0];case Ae.M:return Rt[(t-1)*4+1];case Ae.Q:return Rt[(t-1)*4+2];case Ae.H:return Rt[(t-1)*4+3];default:return}};Cn.getTotalCodewordsCount=function(t,n){switch(n){case Ae.L:return Ot[(t-1)*4+0];case Ae.M:return Ot[(t-1)*4+1];case Ae.Q:return Ot[(t-1)*4+2];case Ae.H:return Ot[(t-1)*4+3];default:return}};var da={},bn={};const ft=new Uint8Array(512),Kt=new Uint8Array(256);(function(){let t=1;for(let n=0;n<255;n++)ft[n]=t,Kt[t]=n,t<<=1,t&256&&(t^=285);for(let n=255;n<512;n++)ft[n]=ft[n-255]})();bn.log=function(t){if(t<1)throw new Error("log("+t+")");return Kt[t]};bn.exp=function(t){return ft[t]};bn.mul=function(t,n){return t===0||n===0?0:ft[Kt[t]+Kt[n]]};(function(e){const t=bn;e.mul=function(o,i){const a=new Uint8Array(o.length+i.length-1);for(let s=0;s<o.length;s++)for(let c=0;c<i.length;c++)a[s+c]^=t.mul(o[s],i[c]);return a},e.mod=function(o,i){let a=new Uint8Array(o);for(;a.length-i.length>=0;){const s=a[0];for(let l=0;l<i.length;l++)a[l]^=t.mul(i[l],s);let c=0;for(;c<a.length&&a[c]===0;)c++;a=a.slice(c)}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}})(da);const fa=da;function Dr(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}Dr.prototype.initialize=function(t){this.degree=t,this.genPoly=fa.generateECPolynomial(this.degree)};Dr.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=fa.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 _C=Dr,pa={},Pe={},Mr={};Mr.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40};var ye={};const ma="[0-9]+",SC="[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 CC="(?:(?![A-Z0-9 $%*+\\-./:]|"+vt+`)(?:.|[\r
|
|
19
|
+
`).concat(c.message))}else return n.getStateNodeByPath(a)})},e.prototype.formatTransition=function(t){var n=this,o=Ec(t.target),i="internal"in t?t.internal:o?o.some(function(l){return M(l)&&l[0]===n.delimiter}):!0,a=this.machine.options.guards,s=this.resolveTarget(o),c=b(b({},t),{actions:we(se(t.actions)),cond:ci(t.cond,a),target:s,source:this,internal:i,eventType:t.event,toJSON:function(){return b(b({},c),{target:c.target?c.target.map(function(l){return"#".concat(l.id)}):void 0,source:"#".concat(n.id)})}});return c},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=Tn,c=a[s],l=c===void 0?[]:c,u=ar(a,[typeof s=="symbol"?s:s+""]);i=j(Object.keys(u).map(function(w){var y=Oe(w,u[w]);return y}).concat(Oe(Tn,l)))}var d=this.config.always?Oe("",this.config.always):[],m=this.config.onDone?Oe(String(st(this.id)),this.config.onDone):[],f=j(this.invoke.map(function(w){var y=[];return w.onDone&&y.push.apply(y,G([],F(Oe(String(dt(w.id)),w.onDone)),!1)),w.onError&&y.push.apply(y,G([],F(Oe(String(Be(w.id)),w.onError)),!1)),y})),p=this.after,h=j(G(G(G(G([],F(m),!1),F(f),!1),F(i),!1),F(d),!1).map(function(w){return se(w).map(function(y){return o.formatTransition(y)})}));try{for(var v=O(p),S=v.next();!S.done;S=v.next()){var g=S.value;h.push(g)}}catch(w){t={error:w}}finally{try{S&&!S.done&&(n=v.return)&&n.call(v)}finally{if(t)throw t.error}}return h},e}(),ro=!1;function qe(e,t){return!mt&&!("predictableActionArguments"in e)&&!ro&&(ro=!0,console.warn("It is highly recommended to set `predictableActionArguments` to `true` when using `createMachine`. https://xstate.js.org/docs/guides/actions.html")),new tl(e,t)}var ve=_i,an=mi,nl=Ci,Pt=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function rl(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 ki=rl;function ol(){this.__data__=[],this.size=0}var il=ol;function al(e,t){return e===t||e!==e&&t!==t}var _t=al,sl=_t;function cl(e,t){for(var n=e.length;n--;)if(sl(e[n][0],t))return n;return-1}var sn=cl,ll=sn,ul=Array.prototype,dl=ul.splice;function fl(e){var t=this.__data__,n=ll(t,e);if(n<0)return!1;var o=t.length-1;return n==o?t.pop():dl.call(t,n,1),--this.size,!0}var pl=fl,ml=sn;function gl(e){var t=this.__data__,n=ml(t,e);return n<0?void 0:t[n][1]}var hl=gl,yl=sn;function vl(e){return yl(this.__data__,e)>-1}var wl=vl,_l=sn;function Sl(e,t){var n=this.__data__,o=_l(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}var Cl=Sl,bl=il,Al=pl,El=hl,Il=wl,Tl=Cl;function Je(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])}}Je.prototype.clear=bl;Je.prototype.delete=Al;Je.prototype.get=El;Je.prototype.has=Il;Je.prototype.set=Tl;var cn=Je,Nl=cn;function Pl(){this.__data__=new Nl,this.size=0}var kl=Pl;function xl(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}var Ul=xl;function $l(e){return this.__data__.get(e)}var Rl=$l;function Ol(e){return this.__data__.has(e)}var Fl=Ol,Dl=typeof Pt=="object"&&Pt&&Pt.Object===Object&&Pt,xi=Dl,Ml=xi,Bl=typeof self=="object"&&self&&self.Object===Object&&self,Vl=Ml||Bl||Function("return this")(),pe=Vl,Ll=pe,Gl=Ll.Symbol,ln=Gl,oo=ln,Ui=Object.prototype,zl=Ui.hasOwnProperty,jl=Ui.toString,ot=oo?oo.toStringTag:void 0;function Wl(e){var t=zl.call(e,ot),n=e[ot];try{e[ot]=void 0;var o=!0}catch{}var i=jl.call(e);return o&&(t?e[ot]=n:delete e[ot]),i}var Hl=Wl,Yl=Object.prototype,Kl=Yl.toString;function ql(e){return Kl.call(e)}var Jl=ql,io=ln,Zl=Hl,Ql=Jl,Xl="[object Null]",eu="[object Undefined]",ao=io?io.toStringTag:void 0;function tu(e){return e==null?e===void 0?eu:Xl:ao&&ao in Object(e)?Zl(e):Ql(e)}var Ze=tu;function nu(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var _e=nu,ru=Ze,ou=_e,iu="[object AsyncFunction]",au="[object Function]",su="[object GeneratorFunction]",cu="[object Proxy]";function lu(e){if(!ou(e))return!1;var t=ru(e);return t==au||t==su||t==iu||t==cu}var pr=lu,uu=pe,du=uu["__core-js_shared__"],fu=du,Nn=fu,so=function(){var e=/[^.]+$/.exec(Nn&&Nn.keys&&Nn.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function pu(e){return!!so&&so in e}var mu=pu,gu=Function.prototype,hu=gu.toString;function yu(e){if(e!=null){try{return hu.call(e)}catch{}try{return e+""}catch{}}return""}var $i=yu,vu=pr,wu=mu,_u=_e,Su=$i,Cu=/[\\^$.*+?()[\]{}|]/g,bu=/^\[object .+?Constructor\]$/,Au=Function.prototype,Eu=Object.prototype,Iu=Au.toString,Tu=Eu.hasOwnProperty,Nu=RegExp("^"+Iu.call(Tu).replace(Cu,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Pu(e){if(!_u(e)||wu(e))return!1;var t=vu(e)?Nu:bu;return t.test(Su(e))}var ku=Pu;function xu(e,t){return e==null?void 0:e[t]}var Uu=xu,$u=ku,Ru=Uu;function Ou(e,t){var n=Ru(e,t);return $u(n)?n:void 0}var Ue=Ou,Fu=Ue,Du=pe,Mu=Fu(Du,"Map"),mr=Mu,Bu=Ue,Vu=Bu(Object,"create"),un=Vu,co=un;function Lu(){this.__data__=co?co(null):{},this.size=0}var Gu=Lu;function zu(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var ju=zu,Wu=un,Hu="__lodash_hash_undefined__",Yu=Object.prototype,Ku=Yu.hasOwnProperty;function qu(e){var t=this.__data__;if(Wu){var n=t[e];return n===Hu?void 0:n}return Ku.call(t,e)?t[e]:void 0}var Ju=qu,Zu=un,Qu=Object.prototype,Xu=Qu.hasOwnProperty;function ed(e){var t=this.__data__;return Zu?t[e]!==void 0:Xu.call(t,e)}var td=ed,nd=un,rd="__lodash_hash_undefined__";function od(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=nd&&t===void 0?rd:t,this}var id=od,ad=Gu,sd=ju,cd=Ju,ld=td,ud=id;function Qe(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])}}Qe.prototype.clear=ad;Qe.prototype.delete=sd;Qe.prototype.get=cd;Qe.prototype.has=ld;Qe.prototype.set=ud;var dd=Qe,lo=dd,fd=cn,pd=mr;function md(){this.size=0,this.__data__={hash:new lo,map:new(pd||fd),string:new lo}}var gd=md;function hd(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var yd=hd,vd=yd;function wd(e,t){var n=e.__data__;return vd(t)?n[typeof t=="string"?"string":"hash"]:n.map}var dn=wd,_d=dn;function Sd(e){var t=_d(this,e).delete(e);return this.size-=t?1:0,t}var Cd=Sd,bd=dn;function Ad(e){return bd(this,e).get(e)}var Ed=Ad,Id=dn;function Td(e){return Id(this,e).has(e)}var Nd=Td,Pd=dn;function kd(e,t){var n=Pd(this,e),o=n.size;return n.set(e,t),this.size+=n.size==o?0:1,this}var xd=kd,Ud=gd,$d=Cd,Rd=Ed,Od=Nd,Fd=xd;function Xe(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])}}Xe.prototype.clear=Ud;Xe.prototype.delete=$d;Xe.prototype.get=Rd;Xe.prototype.has=Od;Xe.prototype.set=Fd;var gr=Xe,Dd=cn,Md=mr,Bd=gr,Vd=200;function Ld(e,t){var n=this.__data__;if(n instanceof Dd){var o=n.__data__;if(!Md||o.length<Vd-1)return o.push([e,t]),this.size=++n.size,this;n=this.__data__=new Bd(o)}return n.set(e,t),this.size=n.size,this}var Gd=Ld,zd=cn,jd=kl,Wd=Ul,Hd=Rl,Yd=Fl,Kd=Gd;function et(e){var t=this.__data__=new zd(e);this.size=t.size}et.prototype.clear=jd;et.prototype.delete=Wd;et.prototype.get=Hd;et.prototype.has=Yd;et.prototype.set=Kd;var hr=et,qd="__lodash_hash_undefined__";function Jd(e){return this.__data__.set(e,qd),this}var Zd=Jd;function Qd(e){return this.__data__.has(e)}var Xd=Qd,ef=gr,tf=Zd,nf=Xd;function Yt(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new ef;++t<n;)this.add(e[t])}Yt.prototype.add=Yt.prototype.push=tf;Yt.prototype.has=nf;var rf=Yt;function of(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 af=of;function sf(e,t){return e.has(t)}var cf=sf,lf=rf,uf=af,df=cf,ff=1,pf=2;function mf(e,t,n,o,i,a){var s=n&ff,c=e.length,l=t.length;if(c!=l&&!(s&&l>c))return!1;var u=a.get(e),d=a.get(t);if(u&&d)return u==t&&d==e;var m=-1,f=!0,p=n&pf?new lf:void 0;for(a.set(e,t),a.set(t,e);++m<c;){var h=e[m],v=t[m];if(o)var S=s?o(v,h,m,t,e,a):o(h,v,m,e,t,a);if(S!==void 0){if(S)continue;f=!1;break}if(p){if(!uf(t,function(g,w){if(!df(p,w)&&(h===g||i(h,g,n,o,a)))return p.push(w)})){f=!1;break}}else if(!(h===v||i(h,v,n,o,a))){f=!1;break}}return a.delete(e),a.delete(t),f}var Ri=mf,gf=pe,hf=gf.Uint8Array,Oi=hf;function yf(e){var t=-1,n=Array(e.size);return e.forEach(function(o,i){n[++t]=[i,o]}),n}var vf=yf;function wf(e){var t=-1,n=Array(e.size);return e.forEach(function(o){n[++t]=o}),n}var _f=wf,uo=ln,fo=Oi,Sf=_t,Cf=Ri,bf=vf,Af=_f,Ef=1,If=2,Tf="[object Boolean]",Nf="[object Date]",Pf="[object Error]",kf="[object Map]",xf="[object Number]",Uf="[object RegExp]",$f="[object Set]",Rf="[object String]",Of="[object Symbol]",Ff="[object ArrayBuffer]",Df="[object DataView]",po=uo?uo.prototype:void 0,Pn=po?po.valueOf:void 0;function Mf(e,t,n,o,i,a,s){switch(n){case Df:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Ff:return!(e.byteLength!=t.byteLength||!a(new fo(e),new fo(t)));case Tf:case Nf:case xf:return Sf(+e,+t);case Pf:return e.name==t.name&&e.message==t.message;case Uf:case Rf:return e==t+"";case kf:var c=bf;case $f:var l=o&Ef;if(c||(c=Af),e.size!=t.size&&!l)return!1;var u=s.get(e);if(u)return u==t;o|=If,s.set(e,t);var d=Cf(c(e),c(t),o,i,a,s);return s.delete(e),d;case Of:if(Pn)return Pn.call(e)==Pn.call(t)}return!1}var Bf=Mf;function Vf(e,t){for(var n=-1,o=t.length,i=e.length;++n<o;)e[i+n]=t[n];return e}var Fi=Vf,Lf=Array.isArray,Se=Lf,Gf=Fi,zf=Se;function jf(e,t,n){var o=t(e);return zf(e)?o:Gf(o,n(e))}var Di=jf;function Wf(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 Hf=Wf;function Yf(){return[]}var Mi=Yf,Kf=Hf,qf=Mi,Jf=Object.prototype,Zf=Jf.propertyIsEnumerable,mo=Object.getOwnPropertySymbols,Qf=mo?function(e){return e==null?[]:(e=Object(e),Kf(mo(e),function(t){return Zf.call(e,t)}))}:qf,Bi=Qf;function Xf(e,t){for(var n=-1,o=Array(e);++n<e;)o[n]=t(n);return o}var ep=Xf;function tp(e){return e!=null&&typeof e=="object"}var $e=tp,np=Ze,rp=$e,op="[object Arguments]";function ip(e){return rp(e)&&np(e)==op}var ap=ip,go=ap,sp=$e,Vi=Object.prototype,cp=Vi.hasOwnProperty,lp=Vi.propertyIsEnumerable,up=go(function(){return arguments}())?go:function(e){return sp(e)&&cp.call(e,"callee")&&!lp.call(e,"callee")},yr=up,yt={exports:{}};function dp(){return!1}var fp=dp;(function(e,t){var n=pe,o=fp,i=t&&!t.nodeType&&t,a=i&&!0&&e&&!e.nodeType&&e,s=a&&a.exports===i,c=s?n.Buffer:void 0,l=c?c.isBuffer:void 0,u=l||o;e.exports=u})(yt,yt.exports);var pp=9007199254740991,mp=/^(?:0|[1-9]\d*)$/;function gp(e,t){var n=typeof e;return t=t==null?pp:t,!!t&&(n=="number"||n!="symbol"&&mp.test(e))&&e>-1&&e%1==0&&e<t}var fn=gp,hp=9007199254740991;function yp(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=hp}var vr=yp,vp=Ze,wp=vr,_p=$e,Sp="[object Arguments]",Cp="[object Array]",bp="[object Boolean]",Ap="[object Date]",Ep="[object Error]",Ip="[object Function]",Tp="[object Map]",Np="[object Number]",Pp="[object Object]",kp="[object RegExp]",xp="[object Set]",Up="[object String]",$p="[object WeakMap]",Rp="[object ArrayBuffer]",Op="[object DataView]",Fp="[object Float32Array]",Dp="[object Float64Array]",Mp="[object Int8Array]",Bp="[object Int16Array]",Vp="[object Int32Array]",Lp="[object Uint8Array]",Gp="[object Uint8ClampedArray]",zp="[object Uint16Array]",jp="[object Uint32Array]",z={};z[Fp]=z[Dp]=z[Mp]=z[Bp]=z[Vp]=z[Lp]=z[Gp]=z[zp]=z[jp]=!0;z[Sp]=z[Cp]=z[Rp]=z[bp]=z[Op]=z[Ap]=z[Ep]=z[Ip]=z[Tp]=z[Np]=z[Pp]=z[kp]=z[xp]=z[Up]=z[$p]=!1;function Wp(e){return _p(e)&&wp(e.length)&&!!z[vp(e)]}var Hp=Wp;function Yp(e){return function(t){return e(t)}}var Kp=Yp,Wn={exports:{}};(function(e,t){var n=xi,o=t&&!t.nodeType&&t,i=o&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===o,s=a&&n.process,c=function(){try{var l=i&&i.require&&i.require("util").types;return l||s&&s.binding&&s.binding("util")}catch{}}();e.exports=c})(Wn,Wn.exports);var qp=Hp,Jp=Kp,ho=Wn.exports,yo=ho&&ho.isTypedArray,Zp=yo?Jp(yo):qp,wr=Zp,Qp=ep,Xp=yr,em=Se,tm=yt.exports,nm=fn,rm=wr,om=Object.prototype,im=om.hasOwnProperty;function am(e,t){var n=em(e),o=!n&&Xp(e),i=!n&&!o&&tm(e),a=!n&&!o&&!i&&rm(e),s=n||o||i||a,c=s?Qp(e.length,String):[],l=c.length;for(var u in e)(t||im.call(e,u))&&!(s&&(u=="length"||i&&(u=="offset"||u=="parent")||a&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||nm(u,l)))&&c.push(u);return c}var Li=am,sm=Object.prototype;function cm(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||sm;return e===n}var _r=cm;function lm(e,t){return function(n){return e(t(n))}}var Gi=lm,um=Gi,dm=um(Object.keys,Object),fm=dm,pm=_r,mm=fm,gm=Object.prototype,hm=gm.hasOwnProperty;function ym(e){if(!pm(e))return mm(e);var t=[];for(var n in Object(e))hm.call(e,n)&&n!="constructor"&&t.push(n);return t}var vm=ym,wm=pr,_m=vr;function Sm(e){return e!=null&&_m(e.length)&&!wm(e)}var pn=Sm,Cm=Li,bm=vm,Am=pn;function Em(e){return Am(e)?Cm(e):bm(e)}var zi=Em,Im=Di,Tm=Bi,Nm=zi;function Pm(e){return Im(e,Nm,Tm)}var km=Pm,vo=km,xm=1,Um=Object.prototype,$m=Um.hasOwnProperty;function Rm(e,t,n,o,i,a){var s=n&xm,c=vo(e),l=c.length,u=vo(t),d=u.length;if(l!=d&&!s)return!1;for(var m=l;m--;){var f=c[m];if(!(s?f in t:$m.call(t,f)))return!1}var p=a.get(e),h=a.get(t);if(p&&h)return p==t&&h==e;var v=!0;a.set(e,t),a.set(t,e);for(var S=s;++m<l;){f=c[m];var g=e[f],w=t[f];if(o)var y=s?o(w,g,f,t,e,a):o(g,w,f,e,t,a);if(!(y===void 0?g===w||i(g,w,n,o,a):y)){v=!1;break}S||(S=f=="constructor")}if(v&&!S){var _=e.constructor,C=t.constructor;_!=C&&"constructor"in e&&"constructor"in t&&!(typeof _=="function"&&_ instanceof _&&typeof C=="function"&&C instanceof C)&&(v=!1)}return a.delete(e),a.delete(t),v}var Om=Rm,Fm=Ue,Dm=pe,Mm=Fm(Dm,"DataView"),Bm=Mm,Vm=Ue,Lm=pe,Gm=Vm(Lm,"Promise"),zm=Gm,jm=Ue,Wm=pe,Hm=jm(Wm,"Set"),Ym=Hm,Km=Ue,qm=pe,Jm=Km(qm,"WeakMap"),Zm=Jm,Hn=Bm,Yn=mr,Kn=zm,qn=Ym,Jn=Zm,ji=Ze,tt=$i,wo="[object Map]",Qm="[object Object]",_o="[object Promise]",So="[object Set]",Co="[object WeakMap]",bo="[object DataView]",Xm=tt(Hn),eg=tt(Yn),tg=tt(Kn),ng=tt(qn),rg=tt(Jn),ke=ji;(Hn&&ke(new Hn(new ArrayBuffer(1)))!=bo||Yn&&ke(new Yn)!=wo||Kn&&ke(Kn.resolve())!=_o||qn&&ke(new qn)!=So||Jn&&ke(new Jn)!=Co)&&(ke=function(e){var t=ji(e),n=t==Qm?e.constructor:void 0,o=n?tt(n):"";if(o)switch(o){case Xm:return bo;case eg:return wo;case tg:return _o;case ng:return So;case rg:return Co}return t});var og=ke,kn=hr,ig=Ri,ag=Bf,sg=Om,Ao=og,Eo=Se,Io=yt.exports,cg=wr,lg=1,To="[object Arguments]",No="[object Array]",kt="[object Object]",ug=Object.prototype,Po=ug.hasOwnProperty;function dg(e,t,n,o,i,a){var s=Eo(e),c=Eo(t),l=s?No:Ao(e),u=c?No:Ao(t);l=l==To?kt:l,u=u==To?kt:u;var d=l==kt,m=u==kt,f=l==u;if(f&&Io(e)){if(!Io(t))return!1;s=!0,d=!1}if(f&&!d)return a||(a=new kn),s||cg(e)?ig(e,t,n,o,i,a):ag(e,t,l,n,o,i,a);if(!(n&lg)){var p=d&&Po.call(e,"__wrapped__"),h=m&&Po.call(t,"__wrapped__");if(p||h){var v=p?e.value():e,S=h?t.value():t;return a||(a=new kn),i(v,S,n,o,a)}}return f?(a||(a=new kn),sg(e,t,n,o,i,a)):!1}var fg=dg,pg=fg,ko=$e;function Wi(e,t,n,o,i){return e===t?!0:e==null||t==null||!ko(e)&&!ko(t)?e!==e&&t!==t:pg(e,t,n,o,Wi,i)}var Hi=Wi,mg=hr,gg=Hi,hg=1,yg=2;function vg(e,t,n,o){var i=n.length,a=i,s=!o;if(e==null)return!a;for(e=Object(e);i--;){var c=n[i];if(s&&c[2]?c[1]!==e[c[0]]:!(c[0]in e))return!1}for(;++i<a;){c=n[i];var l=c[0],u=e[l],d=c[1];if(s&&c[2]){if(u===void 0&&!(l in e))return!1}else{var m=new mg;if(o)var f=o(u,d,l,e,t,m);if(!(f===void 0?gg(d,u,hg|yg,o,m):f))return!1}}return!0}var wg=vg,_g=_e;function Sg(e){return e===e&&!_g(e)}var Yi=Sg,Cg=Yi,bg=zi;function Ag(e){for(var t=bg(e),n=t.length;n--;){var o=t[n],i=e[o];t[n]=[o,i,Cg(i)]}return t}var Eg=Ag;function Ig(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}var Ki=Ig,Tg=wg,Ng=Eg,Pg=Ki;function kg(e){var t=Ng(e);return t.length==1&&t[0][2]?Pg(t[0][0],t[0][1]):function(n){return n===e||Tg(n,e,t)}}var xg=kg,Ug=Ze,$g=$e,Rg="[object Symbol]";function Og(e){return typeof e=="symbol"||$g(e)&&Ug(e)==Rg}var Sr=Og,Fg=Se,Dg=Sr,Mg=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Bg=/^\w*$/;function Vg(e,t){if(Fg(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||Dg(e)?!0:Bg.test(e)||!Mg.test(e)||t!=null&&e in Object(t)}var Cr=Vg,qi=gr,Lg="Expected a function";function br(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(Lg);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(br.Cache||qi),n}br.Cache=qi;var Gg=br,zg=Gg,jg=500;function Wg(e){var t=zg(e,function(o){return n.size===jg&&n.clear(),o}),n=t.cache;return t}var Hg=Wg,Yg=Hg,Kg=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,qg=/\\(\\)?/g,Jg=Yg(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(Kg,function(n,o,i,a){t.push(i?a.replace(qg,"$1"):o||n)}),t}),Zg=Jg,xo=ln,Qg=ki,Xg=Se,eh=Sr,th=1/0,Uo=xo?xo.prototype:void 0,$o=Uo?Uo.toString:void 0;function Ji(e){if(typeof e=="string")return e;if(Xg(e))return Qg(e,Ji)+"";if(eh(e))return $o?$o.call(e):"";var t=e+"";return t=="0"&&1/e==-th?"-0":t}var nh=Ji,rh=nh;function oh(e){return e==null?"":rh(e)}var ih=oh,ah=Se,sh=Cr,ch=Zg,lh=ih;function uh(e,t){return ah(e)?e:sh(e,t)?[e]:ch(lh(e))}var mn=uh,dh=Sr,fh=1/0;function ph(e){if(typeof e=="string"||dh(e))return e;var t=e+"";return t=="0"&&1/e==-fh?"-0":t}var St=ph,mh=mn,gh=St;function hh(e,t){t=mh(t,e);for(var n=0,o=t.length;e!=null&&n<o;)e=e[gh(t[n++])];return n&&n==o?e:void 0}var Ar=hh,yh=Ar;function vh(e,t,n){var o=e==null?void 0:yh(e,t);return o===void 0?n:o}var wh=vh;function _h(e,t){return e!=null&&t in Object(e)}var Sh=_h,Ch=mn,bh=yr,Ah=Se,Eh=fn,Ih=vr,Th=St;function Nh(e,t,n){t=Ch(t,e);for(var o=-1,i=t.length,a=!1;++o<i;){var s=Th(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&&Ih(i)&&Eh(s,i)&&(Ah(e)||bh(e)))}var Ph=Nh,kh=Sh,xh=Ph;function Uh(e,t){return e!=null&&xh(e,t,kh)}var $h=Uh,Rh=Hi,Oh=wh,Fh=$h,Dh=Cr,Mh=Yi,Bh=Ki,Vh=St,Lh=1,Gh=2;function zh(e,t){return Dh(e)&&Mh(t)?Bh(Vh(e),t):function(n){var o=Oh(n,e);return o===void 0&&o===t?Fh(n,e):Rh(t,o,Lh|Gh)}}var jh=zh;function Wh(e){return e}var Er=Wh;function Hh(e){return function(t){return t==null?void 0:t[e]}}var Yh=Hh,Kh=Ar;function qh(e){return function(t){return Kh(t,e)}}var Jh=qh,Zh=Yh,Qh=Jh,Xh=Cr,ey=St;function ty(e){return Xh(e)?Zh(ey(e)):Qh(e)}var ny=ty,ry=xg,oy=jh,iy=Er,ay=Se,sy=ny;function cy(e){return typeof e=="function"?e:e==null?iy:typeof e=="object"?ay(e)?oy(e[0],e[1]):ry(e):sy(e)}var ly=cy,uy=Ue,dy=function(){try{var e=uy(Object,"defineProperty");return e({},"",{}),e}catch{}}(),Zi=dy,Ro=Zi;function fy(e,t,n){t=="__proto__"&&Ro?Ro(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var Ir=fy,py=Ir,my=_t,gy=Object.prototype,hy=gy.hasOwnProperty;function yy(e,t,n){var o=e[t];(!(hy.call(e,t)&&my(o,n))||n===void 0&&!(t in e))&&py(e,t,n)}var Qi=yy,vy=Qi,wy=mn,_y=fn,Oo=_e,Sy=St;function Cy(e,t,n,o){if(!Oo(e))return e;t=wy(t,e);for(var i=-1,a=t.length,s=a-1,c=e;c!=null&&++i<a;){var l=Sy(t[i]),u=n;if(l==="__proto__"||l==="constructor"||l==="prototype")return e;if(i!=s){var d=c[l];u=o?o(d,l,c):void 0,u===void 0&&(u=Oo(d)?d:_y(t[i+1])?[]:{})}vy(c,l,u),c=c[l]}return e}var by=Cy,Ay=Ar,Ey=by,Iy=mn;function Ty(e,t,n){for(var o=-1,i=t.length,a={};++o<i;){var s=t[o],c=Ay(e,s);n(c,s)&&Ey(a,Iy(s,e),c)}return a}var Ny=Ty,Py=Gi,ky=Py(Object.getPrototypeOf,Object),Tr=ky,xy=Fi,Uy=Tr,$y=Bi,Ry=Mi,Oy=Object.getOwnPropertySymbols,Fy=Oy?function(e){for(var t=[];e;)xy(t,$y(e)),e=Uy(e);return t}:Ry,Dy=Fy;function My(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var By=My,Vy=_e,Ly=_r,Gy=By,zy=Object.prototype,jy=zy.hasOwnProperty;function Wy(e){if(!Vy(e))return Gy(e);var t=Ly(e),n=[];for(var o in e)o=="constructor"&&(t||!jy.call(e,o))||n.push(o);return n}var Hy=Wy,Yy=Li,Ky=Hy,qy=pn;function Jy(e){return qy(e)?Yy(e,!0):Ky(e)}var Nr=Jy,Zy=Di,Qy=Dy,Xy=Nr;function ev(e){return Zy(e,Xy,Qy)}var tv=ev,nv=ki,rv=ly,ov=Ny,iv=tv;function av(e,t){if(e==null)return{};var n=nv(iv(e),function(o){return[o]});return t=rv(t),ov(e,n,function(o,i){return t(o,i[0])})}var sv=av;const cv=!0,gn=(e,t)=>`${e}${t}`.replace(/[^A-Z0-9+]/gi,""),lv=(e,t)=>{switch(t){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 t.startsWith("custom:")}},uv=e=>{const{phone_number:t,...n}=sv(e,lv);if(qo(t)){const{country_code:o}=e;return{...n,phone_number:gn(o,t)}}return n},dv=(e,t,n)=>{const{password:o,...i}=t,a=uv(i),s={autoSignIn:cv,userAttributes:{...n==="phone_number"?{...a,phone_number:e}:a}};return{username:e,password:o,options:s}},fv=({formValues:e,loginMechanisms:t})=>{const n=t[0];if(n==="phone_number"){const{country_code:o,phone_number:i}=e;return gn(o,i)}return e[n]},{assign:B}=bi,pv=B({actorDoneData:void 0}),mv=B({challengeName:void 0}),gv=B({missingAttributes:void 0}),hv=B({remoteError:void 0}),yv=B({formValues:{}}),vv=B({touched:{}}),wv=B({user:void 0}),_v=B({validationError:{}}),Sv=B({totpSecretCode:(e,{data:t})=>{var o,i;const{sharedSecret:n}=(i=(o=t.nextStep)==null?void 0:o.totpSetupDetails)!=null?i:{};return n}}),Cv=B({step:"SIGN_IN"}),bv=B({step:"SHOULD_CONFIRM_USER_ATTRIBUTE"}),Av=B({step:"CONFIRM_ATTRIBUTE_COMPLETE"}),Ev=B({challengeName:(e,{data:t})=>{const{signInStep:n}=t.nextStep;return n==="CONFIRM_SIGN_IN_WITH_SMS_CODE"?"SMS_MFA":n==="CONFIRM_SIGN_IN_WITH_TOTP_CODE"?"SOFTWARE_TOKEN_MFA":void 0}}),Iv=B({username:({formValues:e,loginMechanisms:t})=>{const n=t[0],{username:o,country_code:i}=e;return n==="phone_number"?gn(i,o):o}}),Tv=B({username:fv}),Nv=B({username:({formValues:e,loginMechanisms:t})=>{const n=t[0],{username:o,country_code:i}=e;return n==="phone_number"?gn(i,o):o}}),Pv=B({step:(e,{data:t})=>t.nextStep.signInStep==="DONE"?"SIGN_IN_COMPLETE":t.nextStep.signInStep}),kv=B({step:(e,{data:t})=>t.nextStep.signUpStep==="DONE"?"SIGN_UP_COMPLETE":t.nextStep.signUpStep}),xv=B({step:(e,{data:t})=>t.nextStep.resetPasswordStep==="DONE"?"RESET_PASSWORD_COMPLETE":t.nextStep.resetPasswordStep}),Uv=B({missingAttributes:(e,{data:t})=>{var n;return(n=t.nextStep)==null?void 0:n.missingAttributes}}),$v=B({validationError:(e,{data:t})=>t}),Rv=B({remoteError:(e,{data:t})=>t.name==="NoUserPoolError"?"Configuration error (see console) \u2013 please contact the administrator":(t==null?void 0:t.message)||t}),Ov=B({user:(e,{data:t})=>t}),Fo=e=>({Destination:e.destination,DeliveryMedium:e.deliveryMedium,AttributeName:e.attributName}),Fv=B({codeDeliveryDetails:(e,{data:t})=>{var n;return(n=t==null?void 0:t.nextStep)!=null&&n.codeDeliveryDetails?Fo(t.nextStep.codeDeliveryDetails):Fo(t)}}),Dv=B({formValues:(e,{data:t})=>{const{name:n,value:o}=t;return{...e.formValues,[n]:o}}}),Mv=B({formValues:(e,{data:t})=>is({...e.formValues,...t},"password")}),Bv=B({touched:(e,{data:t})=>({...e.touched,[t.name]:!0})}),Vv=B({unverifiedUserAttributes:(e,{data:t})=>{const{email:n,phone_number:o}=t;return{...n&&{email:n},...o&&{phone_number:o}}}}),Lv=B({selectedUserAttribute:void 0}),Gv=B({selectedUserAttribute:e=>{var t;return(t=e.formValues)==null?void 0:t.unverifiedAttr}}),zv=B({step:"CONFIRM_SIGN_UP"}),Ct={clearActorDoneData:pv,clearChallengeName:mv,clearError:hv,clearFormValues:yv,clearMissingAttributes:gv,clearSelectedUserAttribute:Lv,clearTouched:vv,clearUser:wv,clearValidationError:_v,handleBlur:Bv,handleInput:Dv,handleSubmit:Mv,setChallengeName:Ev,setCodeDeliveryDetails:Fv,setFieldErrors:$v,setMissingAttributes:Uv,setNextResetPasswordStep:xv,setNextSignInStep:Pv,setNextSignUpStep:kv,setRemoteError:Rv,setConfirmAttributeCompleteStep:Av,setConfirmSignUpSignUpStep:zv,setShouldVerifyUserAttributeStep:bv,setSelectedUserAttribute:Gv,setSignInStep:Cv,setTotpSecretCode:Sv,setUser:Ov,setUnverifiedUserAttributes:Vv,setUsernameForgotPassword:Iv,setUsernameSignIn:Nv,setUsernameSignUp:Tv},jv=["CONFIRM_SIGN_IN_WITH_SMS_CODE","CONFIRM_SIGN_IN_WITH_TOTP_CODE"],Wv=(e,{data:t})=>(t==null?void 0:t.nextStep.signInStep)==="CONFIRM_SIGN_IN_WITH_NEW_PASSWORD_REQUIRED",Hv=(e,{data:t})=>{var n;return((n=t==null?void 0:t.nextStep)==null?void 0:n.signInStep)==="RESET_PASSWORD"},Yv=(e,{data:t})=>(t==null?void 0:t.nextStep.signInStep)==="CONFIRM_SIGN_UP",Kv=(e,{data:t})=>(t==null?void 0:t.nextStep.signUpStep)==="COMPLETE_AUTO_SIGN_IN",qv=(e,{data:t})=>(t==null?void 0:t.nextStep.signInStep)==="DONE",Jv=(e,{data:t})=>(t==null?void 0:t.nextStep.signUpStep)==="DONE",Zv=(e,{data:t})=>(t==null?void 0:t.nextStep.resetPasswordStep)==="DONE",Qv=(e,{data:t})=>(t==null?void 0:t.step)==="CONFIRM_ATTRIBUTE_COMPLETE",Xv=(e,{data:t})=>(t==null?void 0:t.step)==="CONFIRM_ATTRIBUTE_WITH_CODE",ew=(e,{data:t})=>(t==null?void 0:t.step)==="SHOULD_CONFIRM_USER_ATTRIBUTE",tw=(e,{data:t})=>(t==null?void 0:t.step)==="RESET_PASSWORD",nw=(e,{data:t})=>(t==null?void 0:t.step)==="CONFIRM_SIGN_UP",rw=({step:e})=>jv.includes(e),ow=({step:e})=>e==="CONTINUE_SIGN_IN_WITH_TOTP_SETUP",iw=({step:e})=>e==="RESET_PASSWORD",aw=({step:e})=>e==="CONFIRM_RESET_PASSWORD_WITH_CODE",sw=({step:e})=>e==="CONFIRM_SIGN_UP",cw=(e,{data:t})=>{const{phone_number_verified:n,email_verified:o}=t;return(o===void 0||o==="false")&&(n===void 0||n==="false")},lw=(e,{data:t})=>t.message==="User is already confirmed.",hn={hasCompletedAttributeConfirmation:Qv,hasCompletedResetPassword:Zv,hasCompletedSignIn:qv,hasCompletedSignUp:Jv,isConfirmSignUpStep:nw,isConfirmUserAttributeStep:Xv,isResetPasswordStep:tw,isShouldConfirmUserAttributeStep:ew,isUserAlreadyConfirmed:lw,shouldAutoSignIn:Kv,shouldConfirmResetPassword:aw,shouldConfirmSignIn:rw,shouldConfirmSignInWithNewPassword:Wv,shouldConfirmSignUp:sw,shouldConfirmSignUpFromSignIn:Yv,shouldResetPassword:iw,shouldResetPasswordFromSignIn:Hv,shouldSetupTotp:ow,shouldVerifyAttribute:cw};var uw=Ir,dw=_t;function fw(e,t,n){(n!==void 0&&!dw(e[t],n)||n===void 0&&!(t in e))&&uw(e,t,n)}var Xi=fw;function pw(e){return function(t,n,o){for(var i=-1,a=Object(t),s=o(t),c=s.length;c--;){var l=s[e?c:++i];if(n(a[l],l,a)===!1)break}return t}}var mw=pw,gw=mw,hw=gw(),yw=hw,Zn={exports:{}};(function(e,t){var n=pe,o=t&&!t.nodeType&&t,i=o&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===o,s=a?n.Buffer:void 0,c=s?s.allocUnsafe:void 0;function l(u,d){if(d)return u.slice();var m=u.length,f=c?c(m):new u.constructor(m);return u.copy(f),f}e.exports=l})(Zn,Zn.exports);var Do=Oi;function vw(e){var t=new e.constructor(e.byteLength);return new Do(t).set(new Do(e)),t}var ww=vw,_w=ww;function Sw(e,t){var n=t?_w(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var Cw=Sw;function bw(e,t){var n=-1,o=e.length;for(t||(t=Array(o));++n<o;)t[n]=e[n];return t}var Aw=bw,Ew=_e,Mo=Object.create,Iw=function(){function e(){}return function(t){if(!Ew(t))return{};if(Mo)return Mo(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}(),Tw=Iw,Nw=Tw,Pw=Tr,kw=_r;function xw(e){return typeof e.constructor=="function"&&!kw(e)?Nw(Pw(e)):{}}var Uw=xw,$w=pn,Rw=$e;function Ow(e){return Rw(e)&&$w(e)}var Fw=Ow,Dw=Ze,Mw=Tr,Bw=$e,Vw="[object Object]",Lw=Function.prototype,Gw=Object.prototype,ea=Lw.toString,zw=Gw.hasOwnProperty,jw=ea.call(Object);function Ww(e){if(!Bw(e)||Dw(e)!=Vw)return!1;var t=Mw(e);if(t===null)return!0;var n=zw.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&ea.call(n)==jw}var Hw=Ww;function Yw(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var ta=Yw,Kw=Qi,qw=Ir;function Jw(e,t,n,o){var i=!n;n||(n={});for(var a=-1,s=t.length;++a<s;){var c=t[a],l=o?o(n[c],e[c],c,n,e):void 0;l===void 0&&(l=e[c]),i?qw(n,c,l):Kw(n,c,l)}return n}var Zw=Jw,Qw=Zw,Xw=Nr;function e_(e){return Qw(e,Xw(e))}var t_=e_,Bo=Xi,n_=Zn.exports,r_=Cw,o_=Aw,i_=Uw,Vo=yr,Lo=Se,a_=Fw,s_=yt.exports,c_=pr,l_=_e,u_=Hw,d_=wr,Go=ta,f_=t_;function p_(e,t,n,o,i,a,s){var c=Go(e,n),l=Go(t,n),u=s.get(l);if(u){Bo(e,n,u);return}var d=a?a(c,l,n+"",e,t,s):void 0,m=d===void 0;if(m){var f=Lo(l),p=!f&&s_(l),h=!f&&!p&&d_(l);d=l,f||p||h?Lo(c)?d=c:a_(c)?d=o_(c):p?(m=!1,d=n_(l,!0)):h?(m=!1,d=r_(l,!0)):d=[]:u_(l)||Vo(l)?(d=c,Vo(c)?d=f_(c):(!l_(c)||c_(c))&&(d=i_(l))):m=!1}m&&(s.set(l,d),i(d,l,o,a,s),s.delete(l)),Bo(e,n,d)}var m_=p_,g_=hr,h_=Xi,y_=yw,v_=m_,w_=_e,__=Nr,S_=ta;function na(e,t,n,o,i){e!==t&&y_(t,function(a,s){if(i||(i=new g_),w_(a))v_(e,t,s,n,na,o,i);else{var c=o?o(S_(e,s),a,s+"",e,t,i):void 0;c===void 0&&(c=a),h_(e,s,c)}},__)}var C_=na;function b_(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 A_=b_,E_=A_,zo=Math.max;function I_(e,t,n){return t=zo(t===void 0?e.length-1:t,0),function(){for(var o=arguments,i=-1,a=zo(o.length-t,0),s=Array(a);++i<a;)s[i]=o[t+i];i=-1;for(var c=Array(t+1);++i<t;)c[i]=o[i];return c[t]=n(s),E_(e,this,c)}}var T_=I_;function N_(e){return function(){return e}}var P_=N_,k_=P_,jo=Zi,x_=Er,U_=jo?function(e,t){return jo(e,"toString",{configurable:!0,enumerable:!1,value:k_(t),writable:!0})}:x_,$_=U_,R_=800,O_=16,F_=Date.now;function D_(e){var t=0,n=0;return function(){var o=F_(),i=O_-(o-n);if(n=o,i>0){if(++t>=R_)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var M_=D_,B_=$_,V_=M_,L_=V_(B_),G_=L_,z_=Er,j_=T_,W_=G_;function H_(e,t){return W_(j_(e,t,z_),e+"")}var Y_=H_,K_=_t,q_=pn,J_=fn,Z_=_e;function Q_(e,t,n){if(!Z_(n))return!1;var o=typeof t;return(o=="number"?q_(n)&&J_(t,n.length):o=="string"&&t in n)?K_(n[t],e):!1}var X_=Q_,eS=Y_,tS=X_;function nS(e){return eS(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&&tS(n[0],n[1],s)&&(a=i<3?void 0:a,i=1),t=Object(t);++o<i;){var c=n[o];c&&e(t,c,o,a)}return t})}var rS=nS,oS=C_,iS=rS,aS=iS(function(e,t,n){oS(e,t,n)}),sS=aS;const yn=async(e,t,n,o)=>{const i=await Promise.all(o.map(s=>s(e,t,n))),a=sS({},...i);return Jo(a)?Promise.resolve():Promise.reject(a)},cS=8,Te={async getAmplifyConfig(){var c,l,u,d,m;const e=Pa.Amplify.getConfig(),t=(c=e.Auth)==null?void 0:c.Cognito,{loginWith:n,userAttributes:o}=(u=(l=e.Auth)==null?void 0:l.Cognito)!=null?u:{},i=n?Object.entries(n).filter(([f,p])=>f!=="oauth").filter(([f,p])=>!!p).map(f=>f[0]==="phone"?"phone_number":f[0]):void 0,a=o?Object.entries(o).map(([f,p])=>Object.keys(p)[0]):void 0,s=(d=n==null?void 0:n.oauth)!=null&&d.providers?(m=n.oauth.providers)==null?void 0:m.map(f=>f.toString().toLowerCase()):void 0;return{...t,loginMechanisms:i,signUpAttributes:a,socialProviders:s}},getCurrentUser:H.getCurrentUser,handleSignIn:H.signIn,handleSignUp:H.signUp,handleConfirmSignIn:H.confirmSignIn,handleConfirmSignUp:H.confirmSignUp,handleForgotPasswordSubmit:H.confirmResetPassword,handleForgotPassword:H.resetPassword,async validateCustomSignUp(e,t){},async validateFormPassword(e,t,n){var c;const{password:o}=e,{password:i}=t;if(!i||!n)return null;const a=[],s=(c=n.minLength)!=null?c:cS;return o.length<s&&a.push(`Password must have at least ${s} characters`),n.requireLowercase&&!/[a-z]/.test(o)&&a.push("Password must have lower case letters"),n.requireUppercase&&!/[A-Z]/.test(o)&&a.push("Password must have upper case letters"),n.requireNumbers&&!/[0-9]/.test(o)&&a.push("Password must have numbers"),n.requireSpecialCharacters&&!rs(o)&&a.push("Password must have special characters"),a.length!==0?{password:a}:null},async validateConfirmPassword(e,t){const{password:n,confirm_password:o}=e,{confirm_password:i,password:a}=t;if(!n&&!o)return null;if((n||o)&&n!==o&&(i&&a||(n==null?void 0:n.length)>=6&&(o==null?void 0:o.length)>=6))return{confirm_password:"Your passwords must match"}},async validatePreferredUsername(e,t){}};function lS({services:e}){return qe({id:"forgotPasswordActor",initial:"init",predictableActionArguments:!0,states:{init:{always:[{cond:"shouldResetPassword",target:"confirmResetPassword"},{cond:"shouldConfirmResetPassword",target:"confirmResetPassword"},{target:"forgotPassword"}]},forgotPassword:{initial:"edit",entry:"sendUpdate",exit:["clearError","clearTouched"],states:{edit:{entry:"sendUpdate",on:{SUBMIT:{actions:"handleSubmit",target:"submit"},CHANGE:{actions:"handleInput"},BLUR:{actions:"handleBlur"}}},submit:{tags:"pending",entry:["sendUpdate","clearError","setUsernameForgotPassword"],invoke:{src:"handleResetPassword",onDone:{actions:["setCodeDeliveryDetails","setNextResetPasswordStep"],target:"#forgotPasswordActor.confirmResetPassword"},onError:{actions:"setRemoteError",target:"edit"}}}}},confirmResetPassword:{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:{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:"handleConfirmResetPassword",onDone:[{cond:"hasCompletedResetPassword",actions:"setNextResetPasswordStep",target:"#forgotPasswordActor.resolved"},{actions:"setSignInStep",target:"#forgotPasswordActor.resolved"}],onError:{actions:"setRemoteError",target:"idle"}}}}}}},resolved:{type:"final",data:({step:t})=>({step:t})}}},{actions:{...Ct,sendUpdate:an()},guards:hn,services:{handleResetPassword({username:t}){return e.handleForgotPassword({username:t})},handleConfirmResetPassword({formValues:t,username:n}){const{confirmation_code:o,password:i}=t;return e.handleForgotPasswordSubmit({confirmationCode:o,newPassword:i,username:n})},validateFields(t){return yn(t.formValues,t.touched,t.passwordSettings,[Te.validateFormPassword,Te.validateConfirmPassword])}}})}const xt={onDone:[{cond:"hasCompletedSignIn",actions:"setNextSignInStep",target:"#signInActor.fetchUserAttributes"},{cond:"shouldConfirmSignInWithNewPassword",actions:["setMissingAttributes","setNextSignInStep"],target:"#signInActor.forceChangePassword"},{cond:"shouldResetPasswordFromSignIn",actions:"setNextSignInStep",target:"#signInActor.resetPassword"},{cond:"shouldConfirmSignUpFromSignIn",actions:"setNextSignInStep",target:"#signInActor.resendSignUpCode"},{actions:["setChallengeName","setMissingAttributes","setNextSignInStep","setTotpSecretCode"],target:"#signInActor.init"}],onError:{actions:"setRemoteError",target:"edit"}},uS={onDone:[{cond:"shouldVerifyAttribute",actions:["setShouldVerifyUserAttributeStep","setUnverifiedUserAttributes"],target:"#signInActor.resolved"},{actions:"setConfirmAttributeCompleteStep",target:"#signInActor.resolved"}],onError:{actions:"setConfirmAttributeCompleteStep",target:"#signInActor.resolved"}};function dS({services:e}){return qe({id:"signInActor",initial:"init",predictableActionArguments:!0,states:{init:{always:[{cond:"shouldConfirmSignIn",target:"confirmSignIn"},{cond:"shouldSetupTotp",target:"setupTotp"},{cond:({step:t})=>t==="CONFIRM_SIGN_IN_WITH_NEW_PASSWORD_REQUIRED",actions:"setActorDoneData",target:"forceChangePassword"},{target:"signIn"}]},federatedSignIn:{entry:["sendUpdate","clearError"],invoke:{src:"signInWithRedirect",onError:{actions:"setRemoteError"}}},fetchUserAttributes:{invoke:{src:"fetchUserAttributes",...uS}},resendSignUpCode:{invoke:{src:"handleResendSignUpCode",onDone:{actions:"setCodeDeliveryDetails",target:"#signInActor.resolved"},onError:{actions:"setRemoteError",target:"#signInActor.signIn"}}},resetPassword:{invoke:{src:"resetPassword",onDone:[{actions:"setCodeDeliveryDetails",target:"#signInActor.resolved"}],onError:{actions:["setRemoteError","sendUpdate"]}}},signIn:{initial:"edit",exit:"clearTouched",states:{edit:{entry:"sendUpdate",on:{CHANGE:{actions:"handleInput"},FEDERATED_SIGN_IN:{target:"#signInActor.federatedSignIn"},SUBMIT:{actions:"handleSubmit",target:"submit"}}},submit:{tags:"pending",entry:["clearError","sendUpdate","setUsernameSignIn"],exit:"clearFormValues",invoke:{src:"handleSignIn",...xt}}}},confirmSignIn:{initial:"edit",exit:["clearChallengeName","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",...xt}}}},forceChangePassword:{entry:"sendUpdate",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:{actions:"setSignInStep",target:"#signInActor.resolved"},CHANGE:{actions:"handleInput",target:".pending"},BLUR:{actions:"handleBlur",target:".pending"}}},submit:{initial:"edit",entry:"clearError",states:{edit:{entry:"sendUpdate",on:{SUBMIT:{actions:"handleSubmit",target:"validate"}}},validate:{entry:"sendUpdate",invoke:{src:"validateFields",onDone:{actions:"clearValidationError",target:"pending"},onError:{actions:"setFieldErrors",target:"edit"}}},pending:{tags:"pending",entry:["sendUpdate","clearError"],invoke:{src:"handleForceChangePassword",...xt}}}}}},setupTotp:{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:["sendUpdate","clearError"],invoke:{src:"confirmSignIn",...xt}}}},resolved:{type:"final",data:t=>({codeDeliveryDetails:t.codeDeliveryDetails,remoteError:t.remoteError,step:t.step,unverifiedUserAttributes:t.unverifiedUserAttributes,username:t.username})}}},{actions:{...Ct,sendUpdate:an()},guards:hn,services:{async fetchUserAttributes(){return H.fetchUserAttributes()},resetPassword({username:t}){return H.resetPassword({username:t})},handleResendSignUpCode({username:t}){return H.resendSignUpCode({username:t})},handleSignIn({formValues:t,username:n}){const{password:o}=t;return e.handleSignIn({username:n,password:o})},confirmSignIn({formValues:t}){const{confirmation_code:n}=t;return e.handleConfirmSignIn({challengeResponse:n})},async handleForceChangePassword({formValues:t}){let{password:n,phone_number:o,country_code:i,confirm_password:a,...s}=t,c;o&&(c=`${i}${o}`.replace(/[^A-Z0-9+]/gi,""),s={...s,phone_number:c});const l={challengeResponse:n,options:{userAttributes:s}};return H.confirmSignIn(l)},signInWithRedirect(t,{data:n}){return H.signInWithRedirect(n)},async validateFields(t){return yn(t.formValues,t.touched,t.passwordSettings,[Te.validateFormPassword,Te.validateConfirmPassword])}}})}const fS={onDone:[{actions:"setCodeDeliveryDetails",target:"#signUpActor.resolved"}],onError:{actions:["setRemoteError","sendUpdate"]}},pS={onDone:[{cond:"hasCompletedSignIn",actions:"setNextSignInStep",target:"#signUpActor.fetchUserAttributes"},{cond:"shouldConfirmSignInWithNewPassword",actions:"setNextSignInStep",target:"#signUpActor.resolved"},{cond:"shouldResetPasswordFromSignIn",actions:"setNextSignInStep",target:"#signUpActor.resetPassword"},{cond:"shouldConfirmSignUpFromSignIn",actions:"setNextSignInStep",target:"#signUpActor.resendSignUpCode"},{actions:["setNextSignInStep","setChallengeName","setMissingAttributes","setTotpSecretCode"],target:"#signUpActor.resolved"}],onError:{actions:"setRemoteError",target:"#signUpActor.resolved"}},mS={onDone:[{cond:"shouldVerifyAttribute",actions:["setShouldVerifyUserAttributeStep","setUnverifiedUserAttributes"],target:"#signUpActor.resolved"},{actions:"setConfirmAttributeCompleteStep",target:"#signUpActor.resolved"}],onError:{actions:"setConfirmAttributeCompleteStep",target:"#signUpActor.resolved"}};function gS({services:e}){return qe({id:"signUpActor",initial:"init",predictableActionArguments:!0,states:{init:{always:[{cond:"shouldConfirmSignUp",target:"confirmSignUp"},{target:"signUp"}]},autoSignIn:{tags:"pending",invoke:{src:"autoSignIn",...pS}},fetchUserAttributes:{invoke:{src:"fetchUserAttributes",...mS}},resetPassword:{invoke:{src:"resetPassword",...fS}},resendSignUpCode:{tags:"pending",entry:"sendUpdate",exit:"sendUpdate",invoke:{src:"resendSignUpCode",onDone:{actions:["setCodeDeliveryDetails","sendUpdate"],target:"#signUpActor.confirmSignUp"},onError:[{cond:"isUserAlreadyConfirmed",target:"#signUpActor.resolved"},{actions:["setRemoteError","sendUpdate"]}]}},signUp:{type:"parallel",exit:"clearTouched",states:{validation:{initial:"pending",states:{pending:{invoke:{src:"validateSignUp",onDone:{actions:"clearValidationError",target:"valid"},onError:{actions:"setFieldErrors",target:"invalid"}}},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:{entry:["sendUpdate","clearError"],invoke:{src:"federatedSignIn",onError:{actions:"setRemoteError"}}},validate:{entry:"sendUpdate",invoke:{src:"validateSignUp",onDone:{target:"signUp",actions:"clearValidationError"},onError:{actions:"setFieldErrors",target:"idle"}}},signUp:{tags:"pending",entry:["setUsernameSignUp","clearError"],exit:"sendUpdate",invoke:{src:"handleSignUp",onDone:[{cond:"hasCompletedSignUp",actions:"setNextSignUpStep",target:"#signUpActor.resolved"},{cond:"shouldAutoSignIn",actions:"setNextSignUpStep",target:"#signUpActor.autoSignIn"},{actions:["setCodeDeliveryDetails","setNextSignUpStep"],target:"#signUpActor.init"}],onError:{actions:["sendUpdate","setRemoteError"],target:"idle"}}}}}}},confirmSignUp:{initial:"edit",entry:"sendUpdate",states:{edit:{on:{SUBMIT:{actions:"handleSubmit",target:"submit"},CHANGE:{actions:"handleInput"},BLUR:{actions:"handleBlur"},RESEND:"#signUpActor.resendSignUpCode"}},submit:{tags:"pending",entry:["clearError","sendUpdate"],invoke:{src:"confirmSignUp",onDone:[{cond:"shouldAutoSignIn",actions:["setNextSignUpStep","clearFormValues"],target:"#signUpActor.autoSignIn"},{actions:"setNextSignUpStep",target:"#signUpActor.init"}],onError:{actions:["setRemoteError","sendUpdate"],target:"edit"}}}}},resolved:{type:"final",data:t=>({challengeName:t.challengeName,missingAttributes:t.missingAttributes,remoteError:t.remoteError,step:t.step,totpSecretCode:t.totpSecretCode,unverifiedUserAttributes:t.unverifiedUserAttributes})}}},{actions:{...Ct,sendUpdate:an()},guards:hn,services:{autoSignIn(){return H.autoSignIn()},async fetchUserAttributes(){return H.fetchUserAttributes()},confirmSignUp({formValues:t,username:n}){const{confirmation_code:o}=t,i={username:n,confirmationCode:o};return e.handleConfirmSignUp(i)},resendSignUpCode({username:t}){return H.resendSignUpCode({username:t})},async federatedSignIn(t,{data:n}){return H.signInWithRedirect(n)},async handleSignUp(t,n){const{formValues:o,loginMechanisms:i,username:a}=t,s=i[0],c=dv(a,o,s);return e.handleSignUp(c)},async validateSignUp(t,n){return yn(t.formValues,t.touched,t.passwordSettings,[e.validateFormPassword,e.validateConfirmPassword,e.validatePreferredUsername,e.validateCustomSignUp])}}})}const hS=()=>qe({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:()=>H.signOut()}});function yS(){return qe({id:"verifyUserAttributesActor",initial:"selectUserAttributes",predictableActionArguments:!0,states:{selectUserAttributes:{initial:"edit",exit:["clearError","clearTouched","sendUpdate"],states:{edit:{entry:"sendUpdate",on:{SUBMIT:{actions:"handleSubmit",target:"submit"},SKIP:{target:"#verifyUserAttributesActor.resolved"},CHANGE:{actions:"handleInput"}}},submit:{tags:"pending",entry:["clearError","sendUpdate"],invoke:{src:"sendUserAttributeVerificationCode",onDone:{actions:["setSelectedUserAttribute","setCodeDeliveryDetails"],target:"#verifyUserAttributesActor.confirmVerifyUserAttribute"},onError:{actions:"setRemoteError",target:"edit"}}}}},confirmVerifyUserAttribute:{initial:"edit",exit:["clearError","clearFormValues","clearTouched"],states:{edit:{entry:"sendUpdate",on:{SUBMIT:{actions:"handleSubmit",target:"submit"},SKIP:"#verifyUserAttributesActor.resolved",CHANGE:{actions:"handleInput"}}},submit:{tags:"pending",entry:["clearError","sendUpdate"],invoke:{src:"confirmVerifyUserAttribute",onDone:{actions:["setConfirmAttributeCompleteStep","clearSelectedUserAttribute"],target:"#verifyUserAttributesActor.resolved"},onError:{actions:"setRemoteError",target:"edit"}}}}},resolved:{type:"final",data:({step:e})=>({step:e})}}},{actions:{...Ct,sendUpdate:an()},services:{sendUserAttributeVerificationCode({formValues:{unverifiedAttr:e}}){const t={userAttributeKey:e};return H.sendUserAttributeVerificationCode(t)},async confirmVerifyUserAttribute({formValues:{confirmation_code:e},selectedUserAttribute:t}){const n={confirmationCode:e,userAttributeKey:t};return H.confirmUserAttribute(n)},async validateFields(e){return yn(e.formValues,e.touched,e.passwordSettings,[Te.validateFormPassword,Te.validateConfirmPassword])}}})}const Ut=(e,t)=>{var n,o,i,a,s,c,l;return{...e.actorDoneData,step:(o=(n=e==null?void 0:e.actorDoneData)==null?void 0:n.step)!=null?o:t,formValues:{},touched:{},validationError:{},formFields:(i=e.config)==null?void 0:i.formFields,loginMechanisms:(a=e.config)==null?void 0:a.loginMechanisms,passwordSettings:(s=e.config)==null?void 0:s.passwordSettings,signUpAttributes:(c=e.config)==null?void 0:c.signUpAttributes,socialProviders:(l=e.config)==null?void 0:l.socialProviders}},{choose:vS,stop:wS}=bi,it=e=>wS(e),_S={on:{INIT:{actions:["configure"],target:"getConfig"}}},SS={always:{actions:["configure"],target:"getConfig"}};function CS(e){const{useNextWaitConfig:t,...n}=e!=null?e:{};return qe({id:"authenticator",initial:"idle",context:{user:void 0,config:{},services:Te,actorRef:void 0,hasSetup:!1},predictableActionArguments:!0,states:{idle:{invoke:{src:"handleGetCurrentUser",onDone:{actions:"setUser",target:"authenticated"},onError:{target:"setup"}}},setup:{initial:"initConfig",states:{initConfig:t?SS:_S,getConfig:{invoke:{src:"getAmplifyConfig",onDone:{actions:["applyAmplifyConfig","setHasSetup"],target:"goToInitialState"}}},goToInitialState:{always:[{cond:"isInitialStateSignUp",target:"#authenticator.signUpActor"},{cond:"isInitialStateResetPassword",target:"#authenticator.forgotPasswordActor"},{target:"#authenticator.signInActor"}]}}},getCurrentUser:{invoke:{src:"handleGetCurrentUser",onDone:{actions:"setUser",target:"#authenticator.authenticated"},onError:{target:"#authenticator.setup"}}},signInActor:{initial:"spawnActor",states:{spawnActor:{always:{actions:"spawnSignInActor",target:"runActor"}},runActor:{entry:"clearActorDoneData",exit:it("signInActor")}},on:{FORGOT_PASSWORD:"forgotPasswordActor",SIGN_IN:"signInActor",SIGN_UP:"signUpActor","done.invoke.signInActor":[{cond:"hasCompletedAttributeConfirmation",target:"#authenticator.getCurrentUser"},{cond:"isShouldConfirmUserAttributeStep",actions:"setActorDoneData",target:"#authenticator.verifyUserAttributesActor"},{cond:"isResetPasswordStep",actions:"setActorDoneData",target:"#authenticator.forgotPasswordActor"},{cond:"isConfirmSignUpStep",actions:"setActorDoneData",target:"#authenticator.signUpActor"}]}},signUpActor:{initial:"spawnActor",states:{spawnActor:{always:{actions:"spawnSignUpActor",target:"runActor"}},runActor:{entry:"clearActorDoneData",exit:it("signUpActor")}},on:{SIGN_IN:"signInActor","done.invoke.signUpActor":[{cond:"hasCompletedAttributeConfirmation",target:"#authenticator.getCurrentUser"},{cond:"isConfirmUserAttributeStep",target:"#authenticator.verifyUserAttributesActor"},{actions:"setActorDoneData",target:"#authenticator.signInActor"}]}},forgotPasswordActor:{initial:"spawnActor",states:{spawnActor:{always:{actions:"spawnForgotPasswordActor",target:"runActor"}},runActor:{entry:"clearActorDoneData",exit:it("forgotPasswordActor")}},on:{SIGN_IN:"signInActor","done.invoke.forgotPasswordActor":[{target:"#authenticator.signInActor"}]}},verifyUserAttributesActor:{initial:"spawnActor",states:{spawnActor:{always:{actions:"spawnVerifyUserAttributesActor",target:"runActor"}},runActor:{entry:"clearActorDoneData",exit:it("verifyUserAttributesActor")}},on:{"done.invoke.verifyUserAttributesActor":[{actions:"setActorDoneData",target:"#authenticator.getCurrentUser"}]}},authenticated:{initial:"idle",states:{idle:{on:{TOKEN_REFRESH:"refreshUser"}},refreshUser:{invoke:{src:"#authenticator.getCurrentUser",onDone:{actions:"setUser",target:"idle"},onError:{target:"#authenticator.signOut"}}}},on:{SIGN_OUT:"signOut"}},signOut:{initial:"spawnActor",states:{spawnActor:{always:{actions:"spawnSignOutActor",target:"runActor"}},runActor:{entry:"clearActorDoneData",exit:it("signOutActor")}},on:{"done.invoke.signOutActor":{actions:"clearUser",target:"setup.getConfig"}}}},on:{SIGN_IN_WITH_REDIRECT:{target:"#authenticator.getCurrentUser"},CHANGE:{actions:"forwardToActor"},BLUR:{actions:"forwardToActor"},SUBMIT:{actions:"forwardToActor"},FEDERATED_SIGN_IN:{actions:"forwardToActor"},RESEND:{actions:"forwardToActor"},SIGN_IN:{actions:"forwardToActor"},SKIP:{actions:"forwardToActor"}}},{actions:{...Ct,forwardToActor:vS([{cond:"hasActor",actions:nl(({actorRef:i})=>i)}]),setActorDoneData:ve({actorDoneData:(i,a)=>({codeDeliveryDetails:a.data.codeDeliveryDetails,missingAttributes:a.data.missingAttributes,remoteError:a.data.remoteError,username:a.data.username,step:a.data.step,totpSecretCode:a.data.totpSecretCode,unverifiedUserAttributes:a.data.unverifiedUserAttributes})}),applyAmplifyConfig:ve({config(i,{data:a}){var p,h,v,S,g;const{loginMechanisms:s=(p=a.loginMechanisms)!=null?p:[],signUpAttributes:c=(h=a.signUpAttributes)!=null?h:[],socialProviders:l=(v=a.socialProviders)!=null?v:[],initialState:u,formFields:d,passwordSettings:m=(S=a.passwordFormat)!=null?S:{}}=i.config;return s.length===0&&s.push("username"),{formFields:(g=bS(d))!=null?g:{},initialState:u,loginMechanisms:s,passwordSettings:m,signUpAttributes:c,socialProviders:l}}}),spawnSignInActor:ve({actorRef:(i,a)=>{const{services:s}=i,c=dS({services:s}).withContext(Ut(i,"SIGN_IN"));return rt(c,{name:"signInActor"})}}),spawnSignUpActor:ve({actorRef:(i,a)=>{const{services:s}=i,c=gS({services:s}).withContext(Ut(i,"SIGN_UP"));return rt(c,{name:"signUpActor"})}}),spawnForgotPasswordActor:ve({actorRef:(i,a)=>{const{services:s}=i,c=lS({services:s}).withContext(Ut(i,"FORGOT_PASSWORD"));return rt(c,{name:"forgotPasswordActor"})}}),spawnVerifyUserAttributesActor:ve({actorRef:i=>{const a=yS().withContext(Ut(i));return rt(a,{name:"verifyUserAttributesActor"})}}),spawnSignOutActor:ve({actorRef:i=>{const a=hS().withContext({user:i==null?void 0:i.user});return rt(a,{name:"signOutActor"})}}),configure:ve((i,a)=>{const{services:s,...c}=La(n)?a.data:n;return{services:{...Te,...s},config:c}}),setHasSetup:ve({hasSetup:!0})},guards:{...hn,hasActor:({actorRef:i})=>!!i,isInitialStateSignUp:({config:i})=>i.initialState==="signUp",isInitialStateResetPassword:({config:i})=>i.initialState==="forgotPassword",shouldSetup:({hasSetup:i})=>!i},services:{getAmplifyConfig:({services:i})=>i.getAmplifyConfig(),handleGetCurrentUser:({services:i})=>i.getCurrentUser()}})}function bS(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 J={Accordion:"amplify-accordion",AccordionItem:"amplify-accordion__item",AccordionItemTrigger:"amplify-accordion__item__trigger",AccordionItemContent:"amplify-accordion__item__content",AccordionItemIcon:"amplify-accordion__item__icon",Alert:"amplify-alert",AlertIcon:"amplify-alert__icon",AlertHeading:"amplify-alert__heading",AlertBody:"amplify-alert__body",AlertDismiss:"amplify-alert__dismiss",Autocomplete:"amplify-autocomplete",AutocompleteMenu:"amplify-autocomplete__menu",AutocompleteMenuEmpty:"amplify-autocomplete__menu--empty",AutocompleteMenuFooter:"amplify-autocomplete__menu__footer",AutocompleteMenuHeader:"amplify-autocomplete__menu__header",AutocompleteMenuLoading:"amplify-autocomplete__menu--loading",AutocompleteMenuOption:"amplify-autocomplete__menu__option",AutocompleteMenuOptions:"amplify-autocomplete__menu__options",Badge:"amplify-badge",Breadcrumbs:"amplify-breadcrumbs",BreadcrumbsList:"amplify-breadcrumbs__list",BreadcrumbsItem:"amplify-breadcrumbs__item",BreadcrumbsSeparator:"amplify-breadcrumbs__separator",BreadcrumbsLink:"amplify-breadcrumbs__link",Button:"amplify-button",ButtonGroup:"amplify-buttongroup",ButtonLoaderWrapper:"amplify-button__loader-wrapper",Card:"amplify-card",Checkbox:"amplify-checkbox",CheckboxButton:"amplify-checkbox__button",CheckboxIcon:"amplify-checkbox__icon",CheckboxInput:"amplify-checkbox__input",CheckboxLabel:"amplify-checkbox__label",CheckboxField:"amplify-checkboxfield",Collection:"amplify-collection",CollectionItems:"amplify-collection-items",CollectionSearch:"amplify-collection-search",CollectionPagination:"amplify-collection-pagination",CountryCodeSelect:"amplify-countrycodeselect",DialCodeSelect:"amplify-dialcodeselect",Divider:"amplify-divider",DividerLabel:"amplify-divider--label",DropZone:"amplify-dropzone",Field:"amplify-field",FieldDescription:"amplify-field__description",FieldErrorMessage:"amplify-field__error-message",FieldGroup:"amplify-field-group",FieldGroupControl:"amplify-field-group__control",FieldGroupOuterEnd:"amplify-field-group__outer-end",FieldGroupOuterStart:"amplify-field-group__outer-start",FieldGroupInnerEnd:"amplify-field-group__inner-end",FieldGroupInnerStart:"amplify-field-group__inner-start",FieldGroupIcon:"amplify-field-group__icon",FieldGroupIconButton:"amplify-field-group__icon-button",FieldGroupHasInnerEnd:"amplify-field-group--has-inner-end",FieldGroupHasInnerStart:"amplify-field-group--has-inner-start",FieldShowPassword:"amplify-field__show-password",FieldGroupFieldWrapper:"amplify-field-group__field-wrapper",Fieldset:"amplify-fieldset",FieldsetLegend:"amplify-fieldset__legend",Flex:"amplify-flex",Grid:"amplify-grid",Heading:"amplify-heading",HighlightMatch:"amplify-highlightmatch",HighlightMatchHighlighted:"amplify-highlightmatch__highlighted",Icon:"amplify-icon",Image:"amplify-image",Input:"amplify-input",Label:"amplify-label",Link:"amplify-link",Loader:"amplify-loader",LoaderLabel:"amplify-loader__label",MenuContent:"amplify-menu__content",MenuItem:"amplify-menu__content__item",MenuTrigger:"amplify-menu__trigger",MenuWrapper:"amplify-menu__wrapper",Message:"amplify-message",MessageIcon:"amplify-message__icon",MessageHeading:"amplify-message__heading",MessageBody:"amplify-message__body",MessageContent:"amplify-message__content",MessageDismiss:"amplify-message__dismiss",Pagination:"amplify-pagination",PaginationItem:"amplify-pagination__item",PasswordField:"amplify-passwordfield",PhoneNumberField:"amplify-phonenumberfield",Placeholder:"amplify-placeholder",Radio:"amplify-radio",RadioButton:"amplify-radio__button",RadioInput:"amplify-radio__input",RadioLabel:"amplify-radio__label",RadioGroupField:"amplify-radiogroupfield",RadioGroup:"amplify-radiogroup",Rating:"amplify-rating",RatingItem:"amplify-rating__item",RatingIcon:"amplify-rating__icon",RatingLabel:"amplify-rating__label",ScrollView:"amplify-scrollview",SearchField:"amplify-searchfield",SearchFieldClear:"amplify-searchfield__clear",SearchFieldSearch:"amplify-searchfield__search",Select:"amplify-select",SelectField:"amplify-selectfield",SelectWrapper:"amplify-select__wrapper",SelectIcon:"amplify-select__icon",SliderField:"amplify-sliderfield",SliderFieldGroup:"amplify-sliderfield__group",SliderFieldLabel:"amplify-sliderfield__label",SliderFieldRange:"amplify-sliderfield__range",SliderFieldRoot:"amplify-sliderfield__root",SliderFieldThumb:"amplify-sliderfield__thumb",SliderFieldTrack:"amplify-sliderfield__track",StepperField:"amplify-stepperfield",StepperFieldButtonDecrease:"amplify-stepperfield__button--decrease",StepperFieldButtonIncrease:"amplify-stepperfield__button--increase",StepperFieldInput:"amplify-stepperfield__input",StorageImage:"amplify-storageimage",StorageManager:"amplify-storagemanager",StorageManagerDropZone:"amplify-storagemanager__dropzone",StorageManagerDropZoneIcon:"amplify-storagemanager__dropzone__icon",StorageManagerDropZoneText:"amplify-storagemanager__dropzone__text",StorageManagerFilePicker:"amplify-storagemanager__file__picker",StorageManagerFile:"amplify-storagemanager__file",StorageManagerFileWrapper:"amplify-storagemanager__file__wrapper",StorageManagerFileList:"amplify-storagemanager__file__list",StorageManagerFileName:"amplify-storagemanager__file__name",StorageManagerFileSize:"amplify-storagemanager__file__size",StorageManagerFileInfo:"amplify-storagemanager__file__info",StorageManagerFileImage:"amplify-storagemanager__file__image",StorageManagerFileMain:"amplify-storagemanager__file__main",StorageManagerFileStatus:"amplify-storagemanager__file__status",StorageManagerLoader:"amplify-storagemanager__loader",StorageManagerPreviewer:"amplify-storagemanager__previewer",StorageManagerPreviewerText:"amplify-storagemanager__previewer__text",StorageManagerPreviewerActions:"amplify-storagemanager__previewer__actions",StorageManagerPreviewerFooter:"amplify-storagemanager__previewer__footer",SwitchField:"amplify-switchfield",SwitchLabel:"amplify-switch__label",SwitchThumb:"amplify-switch__thumb",SwitchTrack:"amplify-switch__track",SwitchWrapper:"amplify-switch__wrapper",Table:"amplify-table",TableCaption:"amplify-table__caption",TableBody:"amplify-table__body",TableTd:"amplify-table__td",TableTh:"amplify-table__th",TableFoot:"amplify-table__foot",TableHead:"amplify-table__head",TableRow:"amplify-table__row",Tabs:"amplify-tabs",TabsList:"amplify-tabs__list",TabsItem:"amplify-tabs__item",TabsPanel:"amplify-tabs__panel",Text:"amplify-text",Textarea:"amplify-textarea",TextAreaField:"amplify-textareafield",TextField:"amplify-textfield",ToggleButton:"amplify-togglebutton",ToggleButtonGroup:"amplify-togglebuttongroup",VisuallyHidden:"amplify-visually-hidden"},AS=({componentName:e,packageName:t,version:n})=>{const o=[`ui-${t}`,n];switch(e){case"Authenticator":{L.setCustomUserAgent({...Ra,additionalDetails:[[e],o]});break}case"ChangePassword":case"DeleteUser":{L.setCustomUserAgent({...$a,additionalDetails:[["AccountSettings"],o]});break}case"InAppMessaging":{L.setCustomUserAgent({...Oa,additionalDetails:[[e],o]});break}case"LocationSearch":{L.setCustomUserAgent({...Fa,additionalDetails:[[e],o]});break}case"MapView":{L.setCustomUserAgent({...Da,additionalDetails:[[e],o]});break}case"StorageManager":{L.setCustomUserAgent({...Ma,additionalDetails:[[e],o]});break}}return za},ES={key:0,class:"amplify-flex amplify-alert amplify-alert--error amplify-authenticator__base","data-variation":"error",role:"alert"},IS={class:"amplify-flex amplify-authenticator__icon-wrapper"},TS=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),NS=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),me={__name:"base-alert",setup(e){const t=r.ref(!0),n=P("Dismiss alert");function o(){t.value=!1}return(i,a)=>{const s=ee;return t.value?(r.openBlock(),r.createElementBlock("div",ES,[r.createElementVNode("div",IS,[TS,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(()=>[NS]),_:1},8,["aria-label"])])):r.createCommentVNode("",!0)}}},ge=r.defineComponent({__name:"base-field-set",setup(e){const 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 PS(e){return r.getCurrentScope()?(r.onScopeDispose(e),!0):!1}function ra(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))),PS(i),n)}function kS(e){return"state"in e}var Wo=function(){};function xS(e){return"getSnapshot"in e?e.getSnapshot():kS(e)?e.state:void 0}function US(e,t){t===void 0&&(t=xS);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,c){o.value=t(a);var l=a.subscribe({next:function(u){return o.value=u},error:Wo,complete:Wo}).unsubscribe;c(function(){return l()})},{immediate:!0}),{state:o,send:i}}const $S=e=>{var t,n,o;return{...(o=(n=(t=or(e))==null?void 0:t.formFields)==null?void 0:n.setupTotp)==null?void 0:o.QR}},Pr=ra(()=>{const e=CS(),t=Pi(e).start(),n=r.ref("configuring"),{state:o,send:i}=US(t),a=()=>{n.value="authenticated"},s=()=>{n.value="unauthenticated"},c=Wa(t,async(l,u)=>{await Zo(l,u,{onSignIn:a,onSignOut:s})});return H.getCurrentUser().then(()=>{n.value="authenticated"}).catch(()=>{n.value="unauthenticated"}),r.onScopeDispose(()=>{c()}),{authStatus:n,service:t,send:i,state:o}}),Q=ra(()=>{const{authStatus:e,state:t,send:n}=Pr(),o=r.reactive({});return r.watchEffect(()=>{const i=Za({send:n,state:t.value});for(const s of Object.keys(i))o[s]=i[s];const a=i.route==="setupTotp"?$S(t.value):null;o.QRFields=a,o.authStatus=e.value,o.send=n,o.state=t}),o});let RS=(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 vn=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))}}),OS={},FS={"data-amplify-label":""};function DS(e,t){return r.openBlock(),r.createElementBlock("label",FS,[r.renderSlot(e.$slots,"default")])}var wn=Jt(OS,[["render",DS]]);const MS=["aria-label","aria-checked"],BS=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),VS=[BS],LS=r.createElementVNode("path",{d:"M0 0h24v24H0zm0 0h24v24H0zm0 0h24v24H0zm0 0h24v24H0z",fill:"none"},null,-1),GS=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),zS=[LS,GS],jS={inheritAttrs:!1},kr=r.defineComponent({...jS,__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 w;const t=e,n=P("Show password"),o=P("Hide password"),i=r.ref("password"),a=r.ref(n),s=Math.floor(Math.random()*999999),{name:c,label:l,autocomplete:u,hasError:d,labelHidden:m,placeholder:f,required:p}=r.toRefs(t),h=r.ref("");function v(){a.value=a.value===n?o:n,i.value=i.value==="password"?"text":"password"}const S=P((w=f==null?void 0:f.value)!=null?w:l.value),g=P(l.value);return(y,_)=>{const C=wn,A=vn,E=Z;return r.openBlock(),r.createBlock(E,{class:r.normalizeClass([r.unref(J).Flex,r.unref(J).Field,r.unref(J).TextField,r.unref(J).PasswordField])},{default:r.withCtx(()=>[r.createVNode(C,{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(g)),1)]),_:1},8,["class","for"]),r.createVNode(E,{class:r.normalizeClass([r.unref(J).Flex,r.unref(J).FieldGroup])},{default:r.withCtx(()=>[r.createVNode(E,{class:r.normalizeClass(r.unref(J).FieldGroupFieldWrapper)},{default:r.withCtx(()=>{var T;return[r.createVNode(A,r.mergeProps(y.$attrs,{modelValue:h.value,"onUpdate:modelValue":_[0]||(_[0]=N=>h.value=N),class:[r.unref(J).Input,r.unref(J).FieldGroupControl],id:"amplify-field-"+r.unref(s),"data-amplify-password":"true",name:r.unref(c),autocomplete:r.unref(u),required:(T=r.unref(p))!=null?T:!0,placeholder:r.unref(S),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(E,{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:v},[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)},VS,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)},zS,2))],10,MS)]),_:1},8,["class"])]),_:1},8,["class"])]),_:1},8,["class"])}}}),WS=["value","selected"],HS=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,c)=>(r.openBlock(),r.createElementBlock("select",{onChange:c[0]||(c[0]=l=>a(l))},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(o),(l,u)=>(r.openBlock(),r.createElementBlock("option",{key:u,value:l,selected:l==r.unref(i)?!0:void 0},r.toDisplayString(l),9,WS))),128))],32))}}),YS=r.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24",class:"amplify-icon"},[r.createElementVNode("path",{d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})],-1),KS=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:c,dialCode:l,dialCodeList:u}=r.toRefs(t),d=Math.floor(Math.random()*999999),m=Math.floor(Math.random()*999999);return(f,p)=>{const h=wn,v=HS,S=Z,g=vn;return r.openBlock(),r.createBlock(S,{class:"amplify-flex amplify-field amplify-textfield amplify-phonenumberfield"},{default:r.withCtx(()=>[r.createVNode(h,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(S,{class:"amplify-flex amplify-field-group"},{default:r.withCtx(()=>[r.createVNode(S,{class:"amplify-field-group__outer-start"},{default:r.withCtx(()=>[e.type==="tel"?(r.openBlock(),r.createBlock(S,{key:0,class:"amplify-flex amplify-field amplify-selectfield amplify-countrycodeselect amplify-dialcodeselect amplify-authenticator__column"},{default:r.withCtx(()=>[r.createVNode(h,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(S,{class:"amplify-select__wrapper"},{default:r.withCtx(()=>[r.createVNode(v,{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(u),"select-value":r.unref(l)},null,8,["id","options","select-value"]),r.createVNode(S,{class:"amplify-flex amplify-select__icon"},{default:r.withCtx(()=>[YS]),_:1})]),_:1})]),_:1})):r.createCommentVNode("",!0)]),_:1}),r.createVNode(S,{class:"amplify-field-group__field-wrapper"},{default:r.withCtx(()=>{var w;return[r.createVNode(g,{class:"amplify-input amplify-field-group__control",id:"amplify-field-"+r.unref(d),autocomplete:r.unref(a),name:r.unref(o),required:(w=r.unref(c))!=null?w:!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})}}}),qS=["id"],oa=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(Q()),{type:a}=o.value,s=a==="password",c=RS(12),l=r.computed(()=>ns(i.value[n.value])),u=r.computed(()=>{var m;return((m=l.value)==null?void 0:m.length)>0}),d=r.computed(()=>u.value?c:void 0);return(m,f)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[s?(r.openBlock(),r.createBlock(kr,{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(u),describedBy:r.unref(d)},null,8,["name","label","placeholder","required","label-hidden","autocomplete","hasError","describedBy"])):(r.openBlock(),r.createBlock(KS,{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(u),describedBy:r.unref(d)},null,8,["name","label","placeholder","required","label-hidden","autocomplete","dial-code","dial-code-list","type","hasError","describedBy"])),r.unref(u)?(r.openBlock(),r.createElementBlock("div",{key:2,id:r.unref(d)},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(l),(p,h)=>(r.openBlock(),r.createElementBlock("p",{key:h,role:"alert","data-variation":"error",class:"amplify-text amplify-text--error"},r.toDisplayString(r.unref(P)(p)),1))),128))],8,qS)):r.createCommentVNode("",!0)],64))}}),he=r.defineComponent({__name:"base-form-fields",props:{route:null},setup(e){const t=e,{route:n}=r.toRefs(t),{state:o}=Pr();let i=[];return r.onBeforeMount(()=>{i=oc(n.value,o.value)}),(a,s)=>(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(i),([c,l])=>(r.openBlock(),r.createBlock(oa,{name:c,key:c,formField:l},null,8,["name","formField"]))),128))}}),$t=r.defineComponent({__name:"federated-sign-in-button",props:{provider:null},setup(e){const t=e,{provider:n}=r.toRefs(t),{toFederatedSignIn:o}=Q(),i=()=>{o({provider:n.value})};return(a,s)=>{const c=ee;return r.openBlock(),r.createBlock(c,{class:"amplify-authenticator__federated-button",type:"button",onClick:i},{default:r.withCtx(()=>[r.renderSlot(a.$slots,"default")]),_:3})}}}),JS=r.createElementVNode("svg",{"aria-label":"Amazon icon",class:"amplify-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),ZS={class:"amplify-text"},QS=r.createElementVNode("svg",{"aria-label":"Apple icon",class:"amplify-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),XS={class:"amplify-text"},eC=r.createElementVNode("svg",{"aria-label":"Facebook icon",class:"amplify-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),tC={class:"amplify-text"},nC=r.createElementVNode("svg",{"aria-label":"Google icon",class:"amplify-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),rC={class:"amplify-text"},oC=["data-label"],_n=r.defineComponent({__name:"federated-sign-in",setup(e){const t=Q(),{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"),c=o==null?void 0:o.includes("google"),l=s||c||i||a,{getSignInWithFederationText:u,getOrText:d}=re,m=r.computed(()=>Fn),f=r.computed(()=>u(n,"amazon")),p=r.computed(()=>u(n,"apple")),h=r.computed(()=>u(n,"facebook")),v=r.computed(()=>u(n,"google")),S=r.computed(()=>d());return(g,w)=>{const y=Z;return r.unref(l)?(r.openBlock(),r.createBlock(y,{key:0,class:"amplify-flex amplify-authenticator__federated-buttons"},{default:r.withCtx(()=>[r.unref(i)?(r.openBlock(),r.createBlock($t,{key:0,provider:r.unref(m).Amazon},{default:r.withCtx(()=>[JS,r.createElementVNode("span",ZS,r.toDisplayString(r.unref(f)),1)]),_:1},8,["provider"])):r.createCommentVNode("",!0),r.unref(a)?(r.openBlock(),r.createBlock($t,{key:1,provider:r.unref(m).Apple},{default:r.withCtx(()=>[QS,r.createElementVNode("span",XS,r.toDisplayString(r.unref(p)),1)]),_:1},8,["provider"])):r.createCommentVNode("",!0),r.unref(s)?(r.openBlock(),r.createBlock($t,{key:2,provider:r.unref(m).Facebook},{default:r.withCtx(()=>[eC,r.createElementVNode("span",tC,r.toDisplayString(r.unref(h)),1)]),_:1},8,["provider"])):r.createCommentVNode("",!0),r.unref(c)?(r.openBlock(),r.createBlock($t,{key:3,provider:r.unref(m).Google},{default:r.withCtx(()=>[nC,r.createElementVNode("span",rC,r.toDisplayString(r.unref(v)),1)]),_:1},8,["provider"])):r.createCommentVNode("",!0),r.createElementVNode("hr",{class:"amplify-divider amplify-divider--horizontal amplify-divider--small","aria-orientation":"horizontal","data-label":r.unref(S)},null,8,oC)]),_:1})):r.createCommentVNode("",!0)}}}),iC=r.createElementVNode("legend",{class:"amplify-visually-hidden"},"Sign in",-1),aC={"data-amplify-footer":""},xr=r.defineComponent({__name:"sign-in",setup(e){const t=Q(),{submitForm:n,updateForm:o,toForgotPassword:i}=t,{error:a,isPending:s}=r.toRefs(t),{getForgotPasswordText:c,getSignInText:l,getSigningInText:u}=re,d=r.computed(()=>c()),m=r.computed(()=>l()),f=r.computed(()=>u()),p=S=>{const{name:g,value:w}=S.target;o({name:g,value:w})},h=S=>{n(fe(S))},v=()=>{i()};return(S,g)=>{const w=ge,y=me,_=ee,C=Z,A=de,E=ue;return r.renderSlot(S.$slots,"signInSlotI",r.normalizeProps(r.guardReactiveProps(S.$attrs)),()=>[r.renderSlot(S.$slots,"header"),r.createVNode(C,r.normalizeProps(r.guardReactiveProps(S.$attrs)),{default:r.withCtx(()=>[r.createVNode(A,{"data-amplify-authenticator-signin":"",onInput:p,onSubmit:r.withModifiers(h,["prevent"]),method:"post"},{formt:r.withCtx(({slotData:T})=>[r.renderSlot(S.$slots,"form",{info:T,onSignInSubmit:h,onInput:p,onForgotPasswordClicked:v})]),default:r.withCtx(()=>[r.createVNode(_n),r.createVNode(C,{class:"amplify-flex amplify-authenticator__column"},{default:r.withCtx(()=>[r.createVNode(w,{disabled:r.unref(s),class:"amplify-flex amplify-authenticator__column"},{fieldSetI:r.withCtx(({slotData:T})=>[r.renderSlot(S.$slots,"signin-fields",{info:T})]),default:r.withCtx(()=>[iC,r.createVNode(he,{route:"signIn"})]),_:3},8,["disabled"]),r.unref(a)?(r.openBlock(),r.createBlock(y,{key:0},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(P)(r.unref(a))),1)]),_:1})):r.createCommentVNode("",!0),r.createVNode(_,{disabled:r.unref(s),class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!0,loading:!1,variation:"primary"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(s)?r.unref(f):r.unref(m)),1)]),_:1},8,["disabled"])]),_:3})]),_:3},8,["onSubmit"])]),_:3},16),r.createVNode(E,null,{default:r.withCtx(()=>[r.renderSlot(S.$slots,"footer",{},()=>[r.createElementVNode("div",aC,[r.createVNode(_,{onClick:v,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(d)),1)]),_:1})])])]),_:3})])}}}),Ur=r.defineComponent({__name:"authenticator-sign-up-form-fields",setup(e){return(t,n)=>(r.openBlock(),r.createBlock(he,{route:"signUp"}))}}),$r=r.defineComponent({__name:"sign-up",setup(e){const t=Q(),{submitForm:n,updateBlur:o,updateForm:i}=t,{error:a,hasValidationErrors:s,isPending:c}=r.toRefs(t),{getCreateAccountText:l}=re,u=r.computed(()=>l()),d=p=>{const{checked:h,name:v,type:S,value:g}=p.target;i({name:v,value:S==="checkbox"&&!h?void 0:g})};function m(p){const{name:h}=p.target;o({name:h})}const f=p=>{n(fe(p))};return(p,h)=>{const v=ge,S=me,g=ee,w=Z,y=de,_=ue;return r.renderSlot(p.$slots,"signUpSlotI",r.normalizeProps(r.guardReactiveProps(p.$attrs)),()=>[r.renderSlot(p.$slots,"header"),r.createVNode(w,r.normalizeProps(r.guardReactiveProps(p.$attrs)),{default:r.withCtx(()=>[r.createVNode(y,{onInput:d,onBlurCapture:m,onSubmit:r.withModifiers(f,["prevent"])},{default:r.withCtx(()=>[r.createVNode(_n),r.createVNode(w,{class:"amplify-flex amplify-authenticator__column"},{default:r.withCtx(()=>[r.createVNode(v,{class:"amplify-flex amplify-authenticator__column",disabled:r.unref(c)},{fieldSetI:r.withCtx(({slotData:C})=>[r.renderSlot(p.$slots,"signup-fields",{info:C})]),default:r.withCtx(()=>[r.createVNode(Ur)]),_:3},8,["disabled"]),r.unref(a)?(r.openBlock(),r.createBlock(S,{key:0},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(P)(r.unref(a))),1)]),_:1})):r.createCommentVNode("",!0),r.createVNode(g,{class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!0,loading:!1,variation:"primary",style:{"border-radius":"0px","font-weight":"normal"},disabled:r.unref(c)||r.unref(s)},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(u)),1)]),_:1},8,["disabled"])]),_:3})]),_:3},8,["onSubmit"])]),_:3},16),r.createVNode(_,null,{default:r.withCtx(()=>[r.renderSlot(p.$slots,"footer")]),_:3})])}}}),sC={};function cC(e,t){const n=Z;return r.openBlock(),r.createBlock(n,{tabindex:"0","aria-orientation":"horizontal","data-orientation":"horizontal",class:"amplify-authenticator__tabs amplify-tabs"},{default:r.withCtx(()=>[r.createVNode(n,{class:"amplify-tabs__list amplify-tabs__list--top amplify-tabs__list--equal amplify-authenticator__tabs-wrapper",role:"tablist"},{default:r.withCtx(()=>[r.renderSlot(e.$slots,"default")]),_:3})]),_:3})}var lC=Jt(sC,[["render",cC]]);const uC=["tabindex","aria-selected","id","aria-controls"],dC=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)=>(r.openBlock(),r.createElementBlock("button",{tabindex:r.unref(n)?0:-1,"aria-selected":r.unref(n)?"true":"false",class:r.normalizeClass([{"amplify-tabs__item--active":r.unref(n)},"amplify-tabs__item"]),id:`${r.unref(o)}-tab`,"aria-controls":`${r.unref(o)}-panel`,role:"tab"},r.toDisplayString(r.unref(i)),11,uC))}}),fC="4.0.1",pC={};function mC(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 ia=Jt(pC,[["render",mC]]);const Ne=r.defineComponent({props:{level:{type:Number,default:1}},inheritAttrs:!1,setup(e,{slots:t,attrs:n}){var s,c;const o=t.default?t.default():[],i=t.headingI?t.headingI():[],a=`${n.class||""} amplify-heading--${e.level}`;if(((c=(s=i[0])==null?void 0:s.children)==null?void 0:c.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}}),Rr=r.defineComponent({__name:"confirm-sign-up",setup(e){const t=Q(),{codeDeliveryDetails:n,error:o,isPending:i}=r.toRefs(t),{resendCode:a,submitForm:s,updateForm:c}=t,{getDeliveryMethodText:l,getDeliveryMessageText:u,getResendCodeText:d,getConfirmText:m}=re,f=r.computed(()=>l(n.value)),p=r.computed(()=>d()),h=r.computed(()=>m()),v=r.computed(()=>u(n.value)),S=_=>{const{name:C,value:A}=_.target;c({name:C,value:A})},g=_=>{w(_)},w=_=>{s(fe(_))},y=()=>{a()};return(_,C)=>{const A=Ne,E=ia,T=ge,N=me,k=ee,I=ue,x=Z,R=de;return r.renderSlot(_.$slots,"confirmSignUpSlotI",r.normalizeProps(r.guardReactiveProps(_.$attrs)),()=>[r.createVNode(x,r.normalizeProps(r.guardReactiveProps(_.$attrs)),{default:r.withCtx(()=>[r.createVNode(R,{onInput:S,onSubmit:r.withModifiers(g,["prevent"])},{default:r.withCtx(()=>[r.createVNode(x,{class:"amplify-flex amplify-authenticator__column"},{default:r.withCtx(()=>[r.renderSlot(_.$slots,"header",{},()=>[r.createVNode(A,{class:"amplify-heading amplify-authenticator__heading",level:3},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(f)),1)]),_:1})]),r.createVNode(E,{class:"amplify-authenticator__subtitle"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(v)),1)]),_:1}),r.createVNode(T,{class:"amplify-flex amplify-authenticator__column",disabled:r.unref(i)},{default:r.withCtx(()=>[r.createVNode(he,{route:"confirmSignUp"})]),_:1},8,["disabled"]),r.createVNode(I,{class:"amplify-flex amplify-authenticator__column"},{default:r.withCtx(()=>[r.unref(o)?(r.openBlock(),r.createBlock(N,{key:0},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(P)(r.unref(o))),1)]),_:1})):r.createCommentVNode("",!0),r.createVNode(k,{class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!1,loading:!1,variation:"primary",type:"submit",disabled:r.unref(i)},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(h)),1)]),_:1},8,["disabled"]),r.createVNode(k,{class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!1,variation:"default",style:{"font-weight":"normal"},type:"button",onClick:r.withModifiers(y,["prevent"])},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(p)),1)]),_:1},8,["onClick"]),r.renderSlot(_.$slots,"footer")]),_:3})]),_:3})]),_:3},8,["onSubmit"])]),_:3},16)])}}}),Or=r.defineComponent({__name:"confirm-sign-in",setup(e){const t=Q(),{submitForm:n,toSignIn:o,updateForm:i}=t,{error:a,isPending:s,challengeName:c}=r.toRefs(t),l=r.computed(()=>c.value),{getBackToSignInText:u,getConfirmText:d,getChallengeText:m}=re,f=r.computed(()=>m(l.value)),p=r.computed(()=>u()),h=r.computed(()=>d()),v=w=>{const{name:y,value:_}=w.target;i({name:y,value:_})},S=w=>{n(fe(w))},g=()=>{o()};return(w,y)=>{const _=Ne,C=Z,A=me,E=ee,T=ue,N=ge,k=de;return r.renderSlot(w.$slots,"confirmSignInSlotI",r.normalizeProps(r.guardReactiveProps(w.$attrs)),()=>[r.createVNode(C,r.normalizeProps(r.guardReactiveProps(w.$attrs)),{default:r.withCtx(()=>[r.createVNode(k,{"data-amplify-authenticator-confirmsignin":"",onInput:v,onSubmit:r.withModifiers(S,["prevent"])},{default:r.withCtx(()=>[r.createVNode(N,{class:"amplify-flex amplify-authenticator__column",disabled:r.unref(s)},{default:r.withCtx(()=>[r.renderSlot(w.$slots,"header",{},()=>[r.createVNode(_,{level:3,class:"amplify-heading"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(f)),1)]),_:1})]),r.createVNode(C,{class:"amplify-flex amplify-authenticator__column"},{default:r.withCtx(()=>[r.createVNode(he,{route:"confirmSignIn"})]),_:1}),r.createVNode(T,{class:"amplify-flex amplify-authenticator__column"},{default:r.withCtx(()=>[r.unref(a)?(r.openBlock(),r.createBlock(A,{key:0},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(P)(r.unref(a))),1)]),_:1})):r.createCommentVNode("",!0),r.createVNode(E,{class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!1,loading:!1,variation:"primary",style:{"font-weight":"normal"},disabled:r.unref(s)},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(h)),1)]),_:1},8,["disabled"]),r.createVNode(E,{class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!1,size:"small",variation:"link",style:{"font-weight":"normal"},type:"button",onClick:r.withModifiers(g,["prevent"])},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(p)),1)]),_:1},8,["onClick"]),r.renderSlot(w.$slots,"footer")]),_:3})]),_:3},8,["disabled"])]),_:3},8,["onSubmit"])]),_:3},16)])}}});var bt={},gC=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then},aa={},ne={};let Fr;const hC=[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];ne.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};ne.getSymbolTotalCodewords=function(t){return hC[t]};ne.getBCHDigit=function(e){let t=0;for(;e!==0;)t++,e>>>=1;return t};ne.setToSJISFunction=function(t){if(typeof t!="function")throw new Error('"toSJISFunc" is not a valid function.');Fr=t};ne.isKanjiModeEnabled=function(){return typeof Fr!="undefined"};ne.toSJIS=function(t){return Fr(t)};var Sn={};(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}}})(Sn);function sa(){this.buffer=[],this.length=0}sa.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 yC=sa;function At(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)}At.prototype.set=function(e,t,n,o){const i=e*this.size+t;this.data[i]=n,o&&(this.reservedBit[i]=!0)};At.prototype.get=function(e,t){return this.data[e*this.size+t]};At.prototype.xor=function(e,t,n){this.data[e*this.size+t]^=n};At.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]};var vC=At,ca={};(function(e){const t=ne.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,c=[a-7];for(let l=1;l<i-1;l++)c[l]=c[l-1]-s;return c.push(6),c.reverse()},e.getPositions=function(o){const i=[],a=e.getRowColCoords(o),s=a.length;for(let c=0;c<s;c++)for(let l=0;l<s;l++)c===0&&l===0||c===0&&l===s-1||c===s-1&&l===0||i.push([a[c],a[l]]);return i}})(ca);var la={};const wC=ne.getSymbolSize,Ho=7;la.getPositions=function(t){const n=wC(t);return[[0,0],[n-Ho,0],[0,n-Ho]]};var ua={};(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,c=0,l=0,u=null,d=null;for(let m=0;m<a;m++){c=l=0,u=d=null;for(let f=0;f<a;f++){let p=i.get(m,f);p===u?c++:(c>=5&&(s+=t.N1+(c-5)),u=p,c=1),p=i.get(f,m),p===d?l++:(l>=5&&(s+=t.N1+(l-5)),d=p,l=1)}c>=5&&(s+=t.N1+(c-5)),l>=5&&(s+=t.N1+(l-5))}return s},e.getPenaltyN2=function(i){const a=i.size;let s=0;for(let c=0;c<a-1;c++)for(let l=0;l<a-1;l++){const u=i.get(c,l)+i.get(c,l+1)+i.get(c+1,l)+i.get(c+1,l+1);(u===4||u===0)&&s++}return s*t.N2},e.getPenaltyN3=function(i){const a=i.size;let s=0,c=0,l=0;for(let u=0;u<a;u++){c=l=0;for(let d=0;d<a;d++)c=c<<1&2047|i.get(u,d),d>=10&&(c===1488||c===93)&&s++,l=l<<1&2047|i.get(d,u),d>=10&&(l===1488||l===93)&&s++}return s*t.N3},e.getPenaltyN4=function(i){let a=0;const s=i.data.length;for(let l=0;l<s;l++)a+=i.data[l];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 c=0;c<s;c++)for(let l=0;l<s;l++)a.isReserved(l,c)||a.xor(l,c,n(i,l,c))},e.getBestMask=function(i,a){const s=Object.keys(e.Patterns).length;let c=0,l=1/0;for(let u=0;u<s;u++){a(u),e.applyMask(u,i);const d=e.getPenaltyN1(i)+e.getPenaltyN2(i)+e.getPenaltyN3(i)+e.getPenaltyN4(i);e.applyMask(u,i),d<l&&(l=d,c=u)}return c}})(ua);var Cn={};const Ae=Sn,Rt=[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],Ot=[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];Cn.getBlocksCount=function(t,n){switch(n){case Ae.L:return Rt[(t-1)*4+0];case Ae.M:return Rt[(t-1)*4+1];case Ae.Q:return Rt[(t-1)*4+2];case Ae.H:return Rt[(t-1)*4+3];default:return}};Cn.getTotalCodewordsCount=function(t,n){switch(n){case Ae.L:return Ot[(t-1)*4+0];case Ae.M:return Ot[(t-1)*4+1];case Ae.Q:return Ot[(t-1)*4+2];case Ae.H:return Ot[(t-1)*4+3];default:return}};var da={},bn={};const ft=new Uint8Array(512),Kt=new Uint8Array(256);(function(){let t=1;for(let n=0;n<255;n++)ft[n]=t,Kt[t]=n,t<<=1,t&256&&(t^=285);for(let n=255;n<512;n++)ft[n]=ft[n-255]})();bn.log=function(t){if(t<1)throw new Error("log("+t+")");return Kt[t]};bn.exp=function(t){return ft[t]};bn.mul=function(t,n){return t===0||n===0?0:ft[Kt[t]+Kt[n]]};(function(e){const t=bn;e.mul=function(o,i){const a=new Uint8Array(o.length+i.length-1);for(let s=0;s<o.length;s++)for(let c=0;c<i.length;c++)a[s+c]^=t.mul(o[s],i[c]);return a},e.mod=function(o,i){let a=new Uint8Array(o);for(;a.length-i.length>=0;){const s=a[0];for(let l=0;l<i.length;l++)a[l]^=t.mul(i[l],s);let c=0;for(;c<a.length&&a[c]===0;)c++;a=a.slice(c)}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}})(da);const fa=da;function Dr(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}Dr.prototype.initialize=function(t){this.degree=t,this.genPoly=fa.generateECPolynomial(this.degree)};Dr.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=fa.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 _C=Dr,pa={},Pe={},Mr={};Mr.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40};var ye={};const ma="[0-9]+",SC="[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 CC="(?:(?![A-Z0-9 $%*+\\-./:]|"+vt+`)(?:.|[\r
|
|
20
20
|
]))+`;ye.KANJI=new RegExp(vt,"g");ye.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");ye.BYTE=new RegExp(CC,"g");ye.NUMERIC=new RegExp(ma,"g");ye.ALPHANUMERIC=new RegExp(SC,"g");const bC=new RegExp("^"+vt+"$"),AC=new RegExp("^"+ma+"$"),EC=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");ye.testKanji=function(t){return bC.test(t)};ye.testNumeric=function(t){return AC.test(t)};ye.testAlphanumeric=function(t){return EC.test(t)};(function(e){const t=Mr,n=ye;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}}})(Pe);(function(e){const t=ne,n=Cn,o=Sn,i=Pe,a=Mr,s=1<<12|1<<11|1<<10|1<<9|1<<8|1<<5|1<<2|1<<0,c=t.getBCHDigit(s);function l(f,p,h){for(let v=1;v<=40;v++)if(p<=e.getCapacity(v,h,f))return v}function u(f,p){return i.getCharCountIndicator(f,p)+4}function d(f,p){let h=0;return f.forEach(function(v){h+=u(v.mode,p)+v.getBitsLength()}),h}function m(f,p){for(let h=1;h<=40;h++)if(d(f,h)<=e.getCapacity(h,p,i.MIXED))return h}e.from=function(p,h){return a.isValid(p)?parseInt(p,10):h},e.getCapacity=function(p,h,v){if(!a.isValid(p))throw new Error("Invalid QR Code version");typeof v=="undefined"&&(v=i.BYTE);const S=t.getSymbolTotalCodewords(p),g=n.getTotalCodewordsCount(p,h),w=(S-g)*8;if(v===i.MIXED)return w;const y=w-u(v,p);switch(v){case i.NUMERIC:return Math.floor(y/10*3);case i.ALPHANUMERIC:return Math.floor(y/11*2);case i.KANJI:return Math.floor(y/13);case i.BYTE:default:return Math.floor(y/8)}},e.getBestVersionForData=function(p,h){let v;const S=o.from(h,o.M);if(Array.isArray(p)){if(p.length>1)return m(p,S);if(p.length===0)return 1;v=p[0]}else v=p;return l(v.mode,v.getLength(),S)},e.getEncodedBits=function(p){if(!a.isValid(p)||p<7)throw new Error("Invalid QR Code version");let h=p<<12;for(;t.getBCHDigit(h)-c>=0;)h^=s<<t.getBCHDigit(h)-c;return p<<12|h}})(pa);var ga={};const Qn=ne,ha=1<<10|1<<8|1<<5|1<<4|1<<2|1<<1|1<<0,IC=1<<14|1<<12|1<<10|1<<4|1<<1,Yo=Qn.getBCHDigit(ha);ga.getEncodedBits=function(t,n){const o=t.bit<<3|n;let i=o<<10;for(;Qn.getBCHDigit(i)-Yo>=0;)i^=ha<<Qn.getBCHDigit(i)-Yo;return(o<<10|i)^IC};var ya={};const TC=Pe;function Ge(e){this.mode=TC.NUMERIC,this.data=e.toString()}Ge.getBitsLength=function(t){return 10*Math.floor(t/3)+(t%3?t%3*3+1:0)};Ge.prototype.getLength=function(){return this.data.length};Ge.prototype.getBitsLength=function(){return Ge.getBitsLength(this.data.length)};Ge.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 NC=Ge;const PC=Pe,xn=["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 ze(e){this.mode=PC.ALPHANUMERIC,this.data=e}ze.getBitsLength=function(t){return 11*Math.floor(t/2)+6*(t%2)};ze.prototype.getLength=function(){return this.data.length};ze.prototype.getBitsLength=function(){return ze.getBitsLength(this.data.length)};ze.prototype.write=function(t){let n;for(n=0;n+2<=this.data.length;n+=2){let o=xn.indexOf(this.data[n])*45;o+=xn.indexOf(this.data[n+1]),t.put(o,11)}this.data.length%2&&t.put(xn.indexOf(this.data[n]),6)};var kC=ze,xC=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 UC=xC,$C=Pe;function je(e){this.mode=$C.BYTE,this.data=new Uint8Array(UC(e))}je.getBitsLength=function(t){return t*8};je.prototype.getLength=function(){return this.data.length};je.prototype.getBitsLength=function(){return je.getBitsLength(this.data.length)};je.prototype.write=function(e){for(let t=0,n=this.data.length;t<n;t++)e.put(this.data[t],8)};var RC=je;const OC=Pe,FC=ne;function We(e){this.mode=OC.KANJI,this.data=e}We.getBitsLength=function(t){return t*13};We.prototype.getLength=function(){return this.data.length};We.prototype.getBitsLength=function(){return We.getBitsLength(this.data.length)};We.prototype.write=function(e){let t;for(t=0;t<this.data.length;t++){let n=FC.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]+`
|
|
21
21
|
Make sure your charset is UTF-8`);n=(n>>>8&255)*192+(n&255),e.put(n,13)}};var DC=We,va={exports:{}};(function(e){var t={single_source_shortest_paths:function(n,o,i){var a={},s={};s[o]=0;var c=t.PriorityQueue.make();c.push(o,0);for(var l,u,d,m,f,p,h,v,S;!c.empty();){l=c.pop(),u=l.value,m=l.cost,f=n[u]||{};for(d in f)f.hasOwnProperty(d)&&(p=f[d],h=m+p,v=s[d],S=typeof s[d]=="undefined",(S||v>h)&&(s[d]=h,c.push(d,h),a[d]=u))}if(typeof i!="undefined"&&typeof s[i]=="undefined"){var g=["Could not find a path from ",o," to ",i,"."].join("");throw new Error(g)}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})(va);(function(e){const t=Pe,n=NC,o=kC,i=RC,a=DC,s=ye,c=ne,l=va.exports;function u(g){return unescape(encodeURIComponent(g)).length}function d(g,w,y){const _=[];let C;for(;(C=g.exec(y))!==null;)_.push({data:C[0],index:C.index,mode:w,length:C[0].length});return _}function m(g){const w=d(s.NUMERIC,t.NUMERIC,g),y=d(s.ALPHANUMERIC,t.ALPHANUMERIC,g);let _,C;return c.isKanjiModeEnabled()?(_=d(s.BYTE,t.BYTE,g),C=d(s.KANJI,t.KANJI,g)):(_=d(s.BYTE_KANJI,t.BYTE,g),C=[]),w.concat(y,_,C).sort(function(E,T){return E.index-T.index}).map(function(E){return{data:E.data,mode:E.mode,length:E.length}})}function f(g,w){switch(w){case t.NUMERIC:return n.getBitsLength(g);case t.ALPHANUMERIC:return o.getBitsLength(g);case t.KANJI:return a.getBitsLength(g);case t.BYTE:return i.getBitsLength(g)}}function p(g){return g.reduce(function(w,y){const _=w.length-1>=0?w[w.length-1]:null;return _&&_.mode===y.mode?(w[w.length-1].data+=y.data,w):(w.push(y),w)},[])}function h(g){const w=[];for(let y=0;y<g.length;y++){const _=g[y];switch(_.mode){case t.NUMERIC:w.push([_,{data:_.data,mode:t.ALPHANUMERIC,length:_.length},{data:_.data,mode:t.BYTE,length:_.length}]);break;case t.ALPHANUMERIC:w.push([_,{data:_.data,mode:t.BYTE,length:_.length}]);break;case t.KANJI:w.push([_,{data:_.data,mode:t.BYTE,length:u(_.data)}]);break;case t.BYTE:w.push([{data:_.data,mode:t.BYTE,length:u(_.data)}])}}return w}function v(g,w){const y={},_={start:{}};let C=["start"];for(let A=0;A<g.length;A++){const E=g[A],T=[];for(let N=0;N<E.length;N++){const k=E[N],I=""+A+N;T.push(I),y[I]={node:k,lastCount:0},_[I]={};for(let x=0;x<C.length;x++){const R=C[x];y[R]&&y[R].node.mode===k.mode?(_[R][I]=f(y[R].lastCount+k.length,k.mode)-f(y[R].lastCount,k.mode),y[R].lastCount+=k.length):(y[R]&&(y[R].lastCount=k.length),_[R][I]=f(k.length,k.mode)+4+t.getCharCountIndicator(k.mode,w))}}C=T}for(let A=0;A<C.length;A++)_[C[A]].end=0;return{map:_,table:y}}function S(g,w){let y;const _=t.getBestModeForData(g);if(y=t.from(w,_),y!==t.BYTE&&y.bit<_.bit)throw new Error('"'+g+'" cannot be encoded with mode '+t.toString(y)+`.
|
|
22
22
|
Suggested mode is: `+t.toString(_));switch(y===t.KANJI&&!c.isKanjiModeEnabled()&&(y=t.BYTE),y){case t.NUMERIC:return new n(g);case t.ALPHANUMERIC:return new o(g);case t.KANJI:return new a(g);case t.BYTE:return new i(g)}}e.fromArray=function(w){return w.reduce(function(y,_){return typeof _=="string"?y.push(S(_,null)):_.data&&y.push(S(_.data,_.mode)),y},[])},e.fromString=function(w,y){const _=m(w,c.isKanjiModeEnabled()),C=h(_),A=v(C,y),E=l.find_path(A.map,"start","end"),T=[];for(let N=1;N<E.length-1;N++)T.push(A.table[E[N]].node);return e.fromArray(p(T))},e.rawSplit=function(w){return e.fromArray(m(w,c.isKanjiModeEnabled()))}})(ya);const An=ne,Un=Sn,MC=yC,BC=vC,VC=ca,LC=la,Xn=ua,er=Cn,GC=_C,qt=pa,zC=ga,jC=Pe,$n=ya;function WC(e,t){const n=e.size,o=LC.getPositions(t);for(let i=0;i<o.length;i++){const a=o[i][0],s=o[i][1];for(let c=-1;c<=7;c++)if(!(a+c<=-1||n<=a+c))for(let l=-1;l<=7;l++)s+l<=-1||n<=s+l||(c>=0&&c<=6&&(l===0||l===6)||l>=0&&l<=6&&(c===0||c===6)||c>=2&&c<=4&&l>=2&&l<=4?e.set(a+c,s+l,!0,!0):e.set(a+c,s+l,!1,!0))}}function HC(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 YC(e,t){const n=VC.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 c=-2;c<=2;c++)s===-2||s===2||c===-2||c===2||s===0&&c===0?e.set(i+s,a+c,!0,!0):e.set(i+s,a+c,!1,!0)}}function KC(e,t){const n=e.size,o=qt.getEncodedBits(t);let i,a,s;for(let c=0;c<18;c++)i=Math.floor(c/3),a=c%3+n-8-3,s=(o>>c&1)===1,e.set(i,a,s,!0),e.set(a,i,s,!0)}function Rn(e,t,n){const o=e.size,i=zC.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 qC(e,t){const n=e.size;let o=-1,i=n-1,a=7,s=0;for(let c=n-1;c>0;c-=2)for(c===6&&c--;;){for(let l=0;l<2;l++)if(!e.isReserved(i,c-l)){let u=!1;s<t.length&&(u=(t[s]>>>a&1)===1),e.set(i,c-l,u),a--,a===-1&&(s++,a=7)}if(i+=o,i<0||n<=i){i-=o,o=-o;break}}}function JC(e,t,n){const o=new MC;n.forEach(function(l){o.put(l.mode.bit,4),o.put(l.getLength(),jC.getCharCountIndicator(l.mode,e)),l.write(o)});const i=An.getSymbolTotalCodewords(e),a=er.getTotalCodewordsCount(e,t),s=(i-a)*8;for(o.getLengthInBits()+4<=s&&o.put(0,4);o.getLengthInBits()%8!==0;)o.putBit(0);const c=(s-o.getLengthInBits())/8;for(let l=0;l<c;l++)o.put(l%2?17:236,8);return ZC(o,e,t)}function ZC(e,t,n){const o=An.getSymbolTotalCodewords(t),i=er.getTotalCodewordsCount(t,n),a=o-i,s=er.getBlocksCount(t,n),c=o%s,l=s-c,u=Math.floor(o/s),d=Math.floor(a/s),m=d+1,f=u-d,p=new GC(f);let h=0;const v=new Array(s),S=new Array(s);let g=0;const w=new Uint8Array(e.buffer);for(let E=0;E<s;E++){const T=E<l?d:m;v[E]=w.slice(h,h+T),S[E]=p.encode(v[E]),h+=T,g=Math.max(g,T)}const y=new Uint8Array(o);let _=0,C,A;for(C=0;C<g;C++)for(A=0;A<s;A++)C<v[A].length&&(y[_++]=v[A][C]);for(C=0;C<f;C++)for(A=0;A<s;A++)y[_++]=S[A][C];return y}function QC(e,t,n,o){let i;if(Array.isArray(e))i=$n.fromArray(e);else if(typeof e=="string"){let u=t;if(!u){const d=$n.rawSplit(e);u=qt.getBestVersionForData(d,n)}i=$n.fromString(e,u||40)}else throw new Error("Invalid data");const a=qt.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(`
|