@aws-amplify/ui-vue 3.1.7 → 3.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -35,4 +35,4 @@ Make sure your charset is UTF-8`);n=(n>>>8&255)*192+(n&255),e.put(n,13)}};var ib
35
35
  The chosen QR Code version cannot contain this amount of data.
36
36
  Minimum version required to store current data is: `+a+`.
37
37
  `);const s=yb(t,n,i),u=Cn.getSymbolSize(t),c=new sb(u);return pb(c,t),mb(c),hb(c,t),Rn(c,n,0),t>=7&&gb(c,t),vb(c,s),isNaN(r)&&(r=rr.getBestMask(c,Rn.bind(null,c,n))),rr.applyMask(r,c),Rn(c,n,r),{modules:c,version:t,errorCorrectionLevel:n,maskPattern:r,segments:i}}Pa.create=function(t,n){if(typeof t=="undefined"||t==="")throw new Error("No input text");let r=On.M,i,a;return typeof n!="undefined"&&(r=On.from(n.errorCorrectionLevel,On.M),i=nn.from(n.version),a=rr.from(n.maskPattern),n.toSJISFunc&&Cn.setToSJISFunction(n.toSJISFunc)),Sb(t,i,r,a)};var La={},qr={};(function(e){function t(n){if(typeof n=="number"&&(n=n.toString()),typeof n!="string")throw new Error("Color should be defined as hex string");let r=n.slice().replace("#","").split("");if(r.length<3||r.length===5||r.length>8)throw new Error("Invalid hex color: "+n);(r.length===3||r.length===4)&&(r=Array.prototype.concat.apply([],r.map(function(a){return[a,a]}))),r.length===6&&r.push("F","F");const i=parseInt(r.join(""),16);return{r:i>>24&255,g:i>>16&255,b:i>>8&255,a:i&255,hex:"#"+r.slice(0,6).join("")}}e.getOptions=function(r){r||(r={}),r.color||(r.color={});const i=typeof r.margin=="undefined"||r.margin===null||r.margin<0?4:r.margin,a=r.width&&r.width>=21?r.width:void 0,s=r.scale||4;return{width:a,scale:a?4:s,margin:i,color:{dark:t(r.color.dark||"#000000ff"),light:t(r.color.light||"#ffffffff")},type:r.type,rendererOpts:r.rendererOpts||{}}},e.getScale=function(r,i){return i.width&&i.width>=r+i.margin*2?i.width/(r+i.margin*2):i.scale},e.getImageWidth=function(r,i){const a=e.getScale(r,i);return Math.floor((r+i.margin*2)*a)},e.qrToImageData=function(r,i,a){const s=i.modules.size,u=i.modules.data,c=e.getScale(s,a),l=Math.floor((s+a.margin*2)*c),d=a.margin*c,p=[a.color.light,a.color.dark];for(let f=0;f<l;f++)for(let m=0;m<l;m++){let v=(f*l+m)*4,y=a.color.light;if(f>=d&&m>=d&&f<l-d&&m<l-d){const w=Math.floor((f-d)/c),S=Math.floor((m-d)/c);y=p[u[w*s+S]?1:0]}r[v++]=y.r,r[v++]=y.g,r[v++]=y.b,r[v]=y.a}}})(qr);(function(e){const t=qr;function n(i,a,s){i.clearRect(0,0,a.width,a.height),a.style||(a.style={}),a.height=s,a.width=s,a.style.height=s+"px",a.style.width=s+"px"}function r(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}e.render=function(a,s,u){let c=u,l=s;typeof c=="undefined"&&(!s||!s.getContext)&&(c=s,s=void 0),s||(l=r()),c=t.getOptions(c);const d=t.getImageWidth(a.modules.size,c),p=l.getContext("2d"),f=p.createImageData(d,d);return t.qrToImageData(f.data,a,c),n(p,l,d),p.putImageData(f,0,0),l},e.renderToDataURL=function(a,s,u){let c=u;typeof c=="undefined"&&(!s||!s.getContext)&&(c=s,s=void 0),c||(c={});const l=e.render(a,s,c),d=c.type||"image/png",p=c.rendererOpts||{};return l.toDataURL(d,p.quality)}})(La);var za={};const _b=qr;function bi(e,t){const n=e.a/255,r=t+'="'+e.hex+'"';return n<1?r+" "+t+'-opacity="'+n.toFixed(2).slice(1)+'"':r}function Bn(e,t,n){let r=e+t;return typeof n!="undefined"&&(r+=" "+n),r}function bb(e,t,n){let r="",i=0,a=!1,s=0;for(let u=0;u<e.length;u++){const c=Math.floor(u%t),l=Math.floor(u/t);!c&&!a&&(a=!0),e[u]?(s++,u>0&&c>0&&e[u-1]||(r+=a?Bn("M",c+n,.5+l+n):Bn("m",i,0),i=0,a=!1),c+1<t&&e[u+1]||(r+=Bn("h",s),s=0)):i++}return r}za.render=function(t,n,r){const i=_b.getOptions(n),a=t.modules.size,s=t.modules.data,u=a+i.margin*2,c=i.color.light.a?"<path "+bi(i.color.light,"fill")+' d="M0 0h'+u+"v"+u+'H0z"/>':"",l="<path "+bi(i.color.dark,"stroke")+' d="'+bb(s,a,i.margin)+'"/>',d='viewBox="0 0 '+u+" "+u+'"',p=i.width?'width="'+i.width+'" height="'+i.width+'" ':"",f='<svg xmlns="http://www.w3.org/2000/svg" '+p+d+' shape-rendering="crispEdges">'+c+l+`</svg>
38
- `;return typeof r=="function"&&r(null,f),f};const Cb=V_,ir=Pa,Ga=La,Ab=za;function Jr(e,t,n,r,i){const a=[].slice.call(arguments,1),s=a.length,u=typeof a[s-1]=="function";if(!u&&!Cb())throw new Error("Callback required as last argument");if(u){if(s<2)throw new Error("Too few arguments provided");s===2?(i=n,n=t,t=r=void 0):s===3&&(t.getContext&&typeof i=="undefined"?(i=r,r=void 0):(i=r,r=n,n=t,t=void 0))}else{if(s<1)throw new Error("Too few arguments provided");return s===1?(n=t,t=r=void 0):s===2&&!t.getContext&&(r=n,n=t,t=void 0),new Promise(function(c,l){try{const d=ir.create(n,r);c(e(d,t,r))}catch(d){l(d)}})}try{const c=ir.create(n,r);i(null,e(c,t,r))}catch(c){i(c)}}It.create=ir.create;It.toCanvas=Jr.bind(null,Ga.render);It.toDataURL=Jr.bind(null,Ga.renderToDataURL);It.toString=Jr.bind(null,function(e,t,n){return Ab.render(e,n)});const Tb={key:0},Ib=["src"],Eb={"data-amplify-copy-tooltip":""},Pb=o.createElementVNode("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[o.createElementVNode("path",{d:"M16 1H4C2.9 1 2 1.9 2 3V17H4V3H16V1ZM15 5H8C6.9 5 6.01 5.9 6.01 7L6 21C6 22.1 6.89 23 7.99 23H19C20.1 23 21 22.1 21 21V11L15 5ZM8 21V7H14V12H19V21H8Z"})],-1),Nb=o.defineComponent({__name:"setup-totp",emits:["confirmSetupTOTPSubmit","backToSignInClicked"],setup(e,{emit:t}){var O,H,J;const n=new Y.Logger("SetupTOTP-logger"),i=he(le)(),a=o.useAttrs(),{state:s,send:u}=ge(),{value:{context:c}}=s,l=o.computed(()=>ue(s.value)),{totpSecretCode:d,user:p}=l.value.context,f=(H=(O=c==null?void 0:c.config)==null?void 0:O.formFields)==null?void 0:H.setupTOTP,{totpIssuer:m="AWSCognito",totpUsername:v=p==null?void 0:p.username}=(J=f==null?void 0:f.QR)!=null?J:{},y=typeof d=="string"&&typeof v=="string"?fw(m,v,d):null,w=o.reactive({qrCodeImageSource:"",isLoading:!0}),{getCopyText:S,getCopiedText:g,getBackToSignInText:h,getConfirmText:_}=me,b=o.ref(S());function C(){typeof d=="string"&&navigator.clipboard.writeText(d),b.value=g()}o.onMounted(async()=>{if(!(!p||!y))try{w.qrCodeImageSource=await It.toDataURL(y)}catch(Z){n.error(Z)}finally{w.isLoading=!1}});const A=o.computed(()=>h()),N=o.computed(()=>_()),k=Z=>{const{name:ae,value:se}=Z.target;u({type:"CHANGE",data:{name:ae,value:se}})},T=Z=>{a!=null&&a.onConfirmSetupTOTPSubmit?t("confirmSetupTOTPSubmit",Z):$(Z)},$=Z=>{i.submitForm(Ae(Z))},U=()=>{a!=null&&a.onBackToSignInClicked?t("backToSignInClicked"):u({type:"SIGN_IN"})};return(Z,ae)=>{const se=Be,ee=oe,ze=Te,ie=ce,dt=Ee,ft=_e,X=Ie;return o.renderSlot(Z.$slots,"confirmSetupTOTPI",o.normalizeProps(o.guardReactiveProps(Z.$attrs)),()=>[o.createVNode(ee,o.normalizeProps(o.guardReactiveProps(Z.$attrs)),{default:o.withCtx(()=>[o.createVNode(X,{"data-amplify-authenticator-setup-totp":"",onInput:k,onSubmit:o.withModifiers(T,["prevent"])},{default:o.withCtx(()=>[o.createVNode(ft,{class:"amplify-flex amplify-authenticator__column",disabled:o.unref(l).matches("confirmSignIn.pending")},{default:o.withCtx(()=>[o.createVNode(ee,{class:"amplify-flex amplify-authenticator__column"},{default:o.withCtx(()=>[o.renderSlot(Z.$slots,"header",{},()=>[o.createVNode(se,{class:"amplify-heading",level:3},{default:o.withCtx(()=>[o.createTextVNode(" Setup TOTP ")]),_:1})]),o.createVNode(ee,{class:"amplify-flex amplify-authenticator__column"},{default:o.withCtx(()=>[w.isLoading?(o.openBlock(),o.createElementBlock("p",Tb,"Loading...")):(o.openBlock(),o.createElementBlock("img",{key:1,class:"amplify-image","data-amplify-qrcode":"",src:w.qrCodeImageSource,alt:"qr code",width:"228",height:"228"},null,8,Ib)),o.createVNode(ee,{class:"amplify-flex","data-amplify-copy":""},{default:o.withCtx(()=>[o.createElementVNode("div",null,o.toDisplayString(o.unref(d)),1),o.createVNode(ee,{"data-amplify-copy-svg":"",onClick:C},{default:o.withCtx(()=>[o.createElementVNode("div",Eb,o.toDisplayString(b.value),1),Pb]),_:1})]),_:1}),o.createVNode(Pe,{route:"setupTOTP"})]),_:1}),o.createVNode(dt,{class:"amplify-flex amplify-authenticator__column"},{default:o.withCtx(()=>{var ve;return[(ve=o.unref(l).context)!=null&&ve.remoteError?(o.openBlock(),o.createBlock(ze,{key:0},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(x)(o.unref(l).context.remoteError)),1)]),_:1})):o.createCommentVNode("",!0),o.createVNode(ie,{class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!1,loading:!1,variation:"primary",type:"submit",disabled:o.unref(l).matches("confirmSignIn.pending")},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(N)),1)]),_:1},8,["disabled"]),o.createVNode(ie,{class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!1,size:"small",variation:"link",style:{"font-weight":"normal"},type:"button",onClick:o.withModifiers(U,["prevent"])},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(A)),1)]),_:1},8,["onClick"]),o.renderSlot(Z.$slots,"footer",{onBackToSignInClicked:U,onSetupTOTPSubmit:T})]}),_:3})]),_:3})]),_:3},8,["disabled"])]),_:3},8,["onSubmit"])]),_:3},16)])}}}),Zr=o.defineComponent({__name:"authenticator-force-new-password-form-fields",setup(e){return(t,n)=>(o.openBlock(),o.createBlock(Pe,{route:"forceNewPassword"}))}}),Qr=o.defineComponent({__name:"force-new-password",emits:["haveAccountClicked","forceNewPasswordSubmit"],setup(e,{emit:t}){const n=o.useAttrs(),{state:r,send:i}=ge(),s=he(le)(),u=o.computed(()=>ue(r.value)),{getChangePasswordText:c,getChangingText:l,getBackToSignInText:d}=me,p=o.computed(()=>c()),f=o.computed(()=>l()),m=o.computed(()=>d()),v=()=>{n!=null&&n.onHaveAccountClicked?t("haveAccountClicked"):i({type:"SIGN_IN"})},y=h=>{n!=null&&n.onForceNewPasswordSubmit?t("forceNewPasswordSubmit",h):w(h)},w=h=>{s.submitForm(Ae(h))},S=h=>{const{name:_,value:b}=h.target;i({type:"CHANGE",data:{name:_,value:b}})};function g(h){const{name:_}=h.target;s.updateBlur({name:_})}return(h,_)=>{const b=Be,C=oe,A=Te,N=ce,k=Ee,T=_e,$=Ie;return o.renderSlot(h.$slots,"forceNewPasswordI",o.normalizeProps(o.guardReactiveProps(h.$attrs)),()=>[o.createVNode(C,o.normalizeProps(o.guardReactiveProps(h.$attrs)),{default:o.withCtx(()=>[o.createVNode($,{"data-amplify-authenticator-forcenewpassword":"",onInput:S,onBlurCapture:g,onSubmit:o.withModifiers(y,["prevent"])},{default:o.withCtx(()=>[o.createVNode(T,{class:"amplify-flex amplify-authenticator__column",disabled:o.unref(u).matches("forceNewPassword.pending")},{default:o.withCtx(()=>[o.renderSlot(h.$slots,"header",{},()=>[o.createVNode(b,{level:3,class:"amplify-heading"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(p)),1)]),_:1})]),o.createVNode(C,{class:"amplify-flex amplify-authenticator__column"},{default:o.withCtx(()=>[o.renderSlot(h.$slots,"force-new-password-form-fields",{},()=>[o.createVNode(Zr)])]),_:3}),o.createVNode(k,{class:"amplify-flex amplify-authenticator__column"},{default:o.withCtx(()=>[o.unref(u).context.remoteError?(o.openBlock(),o.createBlock(A,{key:0,"data-ui-error":""},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(x)(o.unref(u).context.remoteError)),1)]),_:1})):o.createCommentVNode("",!0),o.createVNode(N,{class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!1,loading:!1,variation:"primary",style:{"font-weight":"normal"},disabled:o.unref(u).matches("signUp.submit")},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(u).matches("forceNewPassword.pending")?o.unref(f)+"\u2026":o.unref(p)),1)]),_:1},8,["disabled"]),o.createVNode(N,{class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!1,size:"small",variation:"link",style:{"font-weight":"normal"},type:"button",onClick:o.withModifiers(v,["prevent"])},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(m)),1)]),_:1},8,["onClick"]),o.renderSlot(h.$slots,"footer",{onHaveAccountClicked:v,onForceNewPasswordSubmit:y})]),_:3})]),_:3},8,["disabled"])]),_:3},8,["onSubmit"])]),_:3},16)])}}}),Xr=o.defineComponent({__name:"reset-password",emits:["resetPasswordSubmit","backToSignInClicked"],setup(e,{emit:t}){const n=o.useAttrs(),r=he(le),{send:i,submitForm:a}=r(),{error:s,isPending:u}=o.toRefs(r()),{getBackToSignInText:c,getResetYourPasswordText:l,getSendCodeText:d}=me,p=o.computed(()=>c()),f=o.computed(()=>l()),m=o.computed(()=>d()),v=g=>{n!=null&&n.onResetPasswordSubmit?t("resetPasswordSubmit",g):y(g)},y=g=>{a(Ae(g))},w=g=>{const{name:h,value:_}=g.target;i({type:"CHANGE",data:{name:h,value:_}})},S=()=>{n!=null&&n.onBackToSignInClicked?t("backToSignInClicked"):i({type:"SIGN_IN"})};return(g,h)=>{const _=Be,b=_e,C=Te,A=ce,N=Ee,k=oe,T=Ie;return o.renderSlot(g.$slots,"resetPasswordSlotI",o.normalizeProps(o.guardReactiveProps(g.$attrs)),()=>[o.createVNode(T,o.mergeProps(g.$attrs,{"data-amplify-authenticator-resetpassword":"",onInput:w,onSubmit:o.withModifiers(v,["prevent"])}),{default:o.withCtx(()=>[o.createVNode(k,{class:"amplify-flex amplify-authenticator__column"},{default:o.withCtx(()=>[o.renderSlot(g.$slots,"header",{},()=>[o.createVNode(_,{class:"amplify-heading",level:3},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(f)),1)]),_:1})]),o.createVNode(b,{class:"amplify-flex amplify-authenticator__column",disabled:o.unref(u)},{default:o.withCtx(()=>[o.createVNode(Pe,{route:"resetPassword"})]),_:1},8,["disabled"]),o.createVNode(N,{class:"amplify-flex amplify-authenticator__column"},{default:o.withCtx(()=>[o.unref(s)?(o.openBlock(),o.createBlock(C,{key:0},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(x)(o.unref(s))),1)]),_:1})):o.createCommentVNode("",!0),o.createVNode(A,{class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!1,variation:"primary",type:"submit",disabled:o.unref(u)},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(m)),1)]),_:1},8,["disabled"]),o.createVNode(A,{class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!1,size:"small",variation:"link",style:{"font-weight":"normal"},type:"button",onClick:o.withModifiers(S,["prevent"])},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(p)),1)]),_:1},8,["onClick"]),o.renderSlot(g.$slots,"footer",{onBackToSignInClicked:S,onResetPasswordSubmit:v})]),_:3})]),_:3})]),_:3},16,["onSubmit"])])}}}),eo=o.defineComponent({__name:"confirm-reset-password",emits:["confirmResetPasswordSubmit","backToSignInClicked"],setup(e,{emit:t}){const{state:n,send:r}=ge(),a=he(le)(),s=o.useAttrs(),u=o.computed(()=>ue(n.value)),{getResendCodeText:c,getResetYourPasswordText:l,getSubmitText:d}=me,p=o.computed(()=>c()),f=o.computed(()=>l()),m=o.computed(()=>d()),v=h=>{s!=null&&s.onConfirmResetPasswordSubmit?t("confirmResetPasswordSubmit",h):y(h)},y=h=>{a.submitForm(Ae(h))},w=()=>{r({type:"RESEND"})},S=h=>{const{name:_,value:b}=h.target;r({type:"CHANGE",data:{name:_,value:b}})};function g(h){const{name:_}=h.target;a.updateBlur({name:_})}return(h,_)=>{const b=Be,C=oe,A=Te,N=ce,k=Ee,T=_e,$=Ie;return o.renderSlot(h.$slots,"confirmResetPasswordSlotI",o.normalizeProps(o.guardReactiveProps(h.$attrs)),()=>[o.createVNode(C,o.normalizeProps(o.guardReactiveProps(h.$attrs)),{default:o.withCtx(()=>[o.createVNode($,{"data-amplify-authenticator-confirmResetpassword":"",onInput:S,onBlurCapture:g,onSubmit:o.withModifiers(v,["prevent"])},{default:o.withCtx(()=>[o.createVNode(T,{class:"amplify-flex amplify-authenticator__column",disabled:o.unref(u).matches("confirmResetPassword.pending")},{default:o.withCtx(()=>[o.renderSlot(h.$slots,"header",{},()=>[o.createVNode(b,{class:"amplify-heading",level:3},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(f)),1)]),_:1})]),o.createVNode(C,{class:"amplify-flex amplify-authenticator__column"},{default:o.withCtx(()=>[o.createVNode(Pe,{route:"confirmResetPassword"})]),_:1}),o.createVNode(k,{class:"amplify-flex amplify-authenticator__column"},{default:o.withCtx(()=>{var U,O;return[(O=(U=o.unref(u))==null?void 0:U.context)!=null&&O.remoteError?(o.openBlock(),o.createBlock(A,{key:0},{default:o.withCtx(()=>{var H,J;return[o.createTextVNode(o.toDisplayString(o.unref(x)((J=(H=o.unref(u))==null?void 0:H.context)==null?void 0:J.remoteError)),1)]}),_:1})):o.createCommentVNode("",!0),o.createVNode(N,{class:"amplify-field-group__control amplify-authenticator__font",variation:"primary",fullwidth:!1,type:"submit",disabled:o.unref(u).matches("confirmResetPassword.pending")},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(m)),1)]),_:1},8,["disabled"]),o.createVNode(N,{class:"amplify-field-group__control amplify-authenticator__font",variation:"link",fullwidth:!1,size:"small",type:"button",onClick:o.withModifiers(w,["prevent"])},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(p)),1)]),_:1},8,["onClick"]),o.renderSlot(h.$slots,"footer",{onConfirmResetPasswordSubmit:v,onLostYourCodeClicked:w})]}),_:3})]),_:3},8,["disabled"])]),_:3},8,["onSubmit"])]),_:3},16)])}}}),to=o.defineComponent({__name:"verify-user",emits:["verifyUserSubmit","skipClicked"],setup(e,{emit:t}){const r=he(le)(),i=o.useAttrs(),{state:a,send:s}=ge(),u=o.computed(()=>ue(a.value)),{unverifiedContactMethods:c}=u.value.context,{getAccountRecoveryInfoText:l,getSkipText:d,getVerifyText:p,getVerifyContactText:f}=me,m=o.computed(()=>l()),v=o.computed(()=>d()),y=o.computed(()=>p()),w=o.computed(()=>f()),S=b=>{const{name:C,value:A}=b.target;s({type:"CHANGE",data:{name:C,value:A}})},g=b=>{i!=null&&i.onVerifyUserSubmit?t("verifyUserSubmit",b):h(b)},h=b=>{r.submitForm(Ae(b))},_=()=>{i!=null&&i.onSkipClicked?t("skipClicked"):s("SKIP")};return(b,C)=>{const A=Be,N=yn,k=wn,T=Ea,$=oe,U=Te,O=ce,H=Ee,J=_e,Z=Ie;return o.renderSlot(b.$slots,"verifyUserSlotI",{},()=>[o.createVNode($,null,{default:o.withCtx(()=>[o.createVNode(Z,{onInput:S,onSubmit:o.withModifiers(g,["prevent"])},{default:o.withCtx(()=>[o.createVNode(J,{disabled:o.unref(u).matches("verifyUser.pending"),class:"amplify-flex amplify-authenticator__column"},{default:o.withCtx(()=>[o.renderSlot(b.$slots,"header",{},()=>[o.createVNode(A,{class:"amplify-heading",level:3},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(m)),1)]),_:1})]),o.createVNode($,{class:"amplify-flex amplify-field amplify-radiogroupfield amplify-authenticator__column"},{default:o.withCtx(()=>[o.createVNode(N,{class:"amplify-visually-hidden amplify-label",id:"amplify-field-493c"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(w)),1)]),_:1}),o.createVNode($,{class:"amplify-flex amplify-field amplify-radiogroupfield amplify-authenticator__column","aria-labelledby":"amplify-field-493c"},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(o.unref(c),(ae,se)=>(o.openBlock(),o.createBlock(N,{class:"amplify-flex amplify-radio","data-amplify-verify-label":"",id:"verify",key:ae},{default:o.withCtx(()=>[o.createVNode(k,{class:"amplify-input amplify-field-group__control amplify-visually-hidden amplify-radio__input","aria-invalid":"false","data-amplify-verify-input":"",id:"verify",name:"unverifiedAttr",type:"radio",value:se},null,8,["value"]),o.createVNode(T,{class:"amplify-flex amplify-radio__button","aria-hidden":"true"}),o.createVNode(T,{class:"amplify-text amplify-radio__label"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(mn)[se].label),1)]),_:2},1024)]),_:2},1024))),128))]),_:1})]),_:1}),o.createVNode(H,{class:"amplify-flex amplify-authenticator__column"},{default:o.withCtx(()=>{var ae,se;return[(se=(ae=o.unref(u))==null?void 0:ae.context)!=null&&se.remoteError?(o.openBlock(),o.createBlock(U,{key:0},{default:o.withCtx(()=>{var ee;return[o.createTextVNode(o.toDisplayString(o.unref(x)((ee=o.unref(u))==null?void 0:ee.context.remoteError)),1)]}),_:1})):o.createCommentVNode("",!0),o.createVNode(O,{class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!1,variation:"primary",type:"submit",disabled:o.unref(u).matches("verifyUser.pending")},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(y)),1)]),_:1},8,["disabled"]),o.createVNode(O,{class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!1,size:"small",variation:"link",style:{"font-weight":"normal"},type:"button",onClick:o.withModifiers(_,["prevent"])},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(v)),1)]),_:1},8,["onClick"]),o.renderSlot(b.$slots,"footer",{onSkipClicked:_,onVerifyUserSubmit:g})]}),_:3})]),_:3},8,["disabled"])]),_:3},8,["onSubmit"])]),_:3})])}}}),no=o.defineComponent({__name:"confirm-verify-user",emits:["confirmVerifyUserSubmit","skipClicked"],setup(e,{emit:t}){const r=he(le)(),i=o.useAttrs(),{state:a,send:s}=ge(),u=o.computed(()=>ue(a.value)),{getAccountRecoveryInfoText:c,getSkipText:l,getSubmitText:d}=me,p=o.computed(()=>c()),f=o.computed(()=>l()),m=o.computed(()=>d()),v=g=>{const{name:h,value:_}=g.target;s({type:"CHANGE",data:{name:h,value:_}})},y=g=>{i!=null&&i.onConfirmVerifyUserSubmit?t("confirmVerifyUserSubmit",g):w(g)},w=g=>{r.submitForm(Ae(g))},S=()=>{i!=null&&i.onSkipClicked?t("skipClicked"):s({type:"SKIP"})};return(g,h)=>{const _=Be,b=oe,C=Te,A=ce,N=Ee,k=_e,T=Ie;return o.renderSlot(g.$slots,"confirmVerifyUserSlotI",o.normalizeProps(o.guardReactiveProps(g.$attrs)),()=>[o.createVNode(b,o.normalizeProps(o.guardReactiveProps(g.$attrs)),{default:o.withCtx(()=>[o.createVNode(T,{onInput:v,onSubmit:o.withModifiers(y,["prevent"])},{default:o.withCtx(()=>[o.createVNode(k,{class:"amplify-flex amplify-authenticator__column",disabled:o.unref(u).matches("confirmVerifyUser.pending")},{default:o.withCtx(()=>[o.renderSlot(g.$slots,"header",{},()=>[o.createVNode(_,{level:3,class:"amplify-heading"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(p)),1)]),_:1})]),o.createVNode(b,{class:"amplify-flex amplify-authenticator__column"},{default:o.withCtx(()=>[o.createVNode(Pe,{route:"confirmVerifyUser"})]),_:1}),o.createVNode(N,{class:"amplify-flex amplify-authenticator__column"},{default:o.withCtx(()=>{var $,U;return[(U=($=o.unref(u))==null?void 0:$.context)!=null&&U.remoteError?(o.openBlock(),o.createBlock(C,{key:0},{default:o.withCtx(()=>{var O;return[o.createTextVNode(o.toDisplayString(o.unref(x)((O=o.unref(u))==null?void 0:O.context.remoteError)),1)]}),_:1})):o.createCommentVNode("",!0),o.createVNode(A,{class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!1,variation:"primary",type:"submit",disabled:o.unref(u).matches("confirmVerifyUser.pending")},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(m)),1)]),_:1},8,["disabled"]),o.createVNode(A,{class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!1,size:"small",variation:"link",style:{"font-weight":"normal"},type:"button",onClick:o.withModifiers(S,["prevent"])},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(f)),1)]),_:1},8,["onClick"]),o.renderSlot(g.$slots,"footer",{onSkipClicked:S,onConfirmVerifyUserSubmit:y})]}),_:3})]),_:3},8,["disabled"])]),_:3},8,["onSubmit"])]),_:3},16)])}}}),kb="3.1.7",xb=["data-variation"],$b={"data-amplify-container":""},Ob=["data-amplify-router-content"],Ub={key:1,"data-amplify-router-content":""},ja=o.defineComponent({__name:"authenticator",props:{hideSignUp:{type:Boolean},initialState:null,loginMechanisms:null,services:null,signUpAttributes:null,variation:{default:"default"},socialProviders:null,formFields:null},emits:["signInSubmit","confirmSignUpSubmit","resetPasswordSubmit","confirmResetPasswordSubmit","confirmSignInSubmit","mSetupTOTPSubmit","forceNewPasswordSubmit","signUpSubmit","verifyUserSubmit","confirmVerifyUserSubmit"],setup(e,{emit:t}){const n=e,r=o.useAttrs(),{initialState:i,loginMechanisms:a,variation:s,services:u,signUpAttributes:c,socialProviders:l,hideSignUp:d,formFields:p}=o.toRefs(n),f=GS(),m=e_(f);let v,y;const{state:w,send:S}=Aa(m);ge(m);const g=o.ref(!1);y=m.subscribe(P=>{P.matches("setup")&&!g.value&&(S({type:"INIT",data:{initialState:i==null?void 0:i.value,loginMechanisms:a==null?void 0:a.value,socialProviders:l==null?void 0:l.value,signUpAttributes:c==null?void 0:c.value,services:u==null?void 0:u.value,formFields:p==null?void 0:p.value}}),g.value=!0)}).unsubscribe,o.onMounted(()=>{v=lw(m),uw({packageName:"@aws-amplify/ui-vue",version:kb})}),o.onUnmounted(()=>{v&&v(),y&&y()});const h=o.computed(()=>ue(w.value)),_=o.ref(),b=o.ref(),C=o.ref(),A=o.ref(),N=o.ref(),k=o.ref(),T=o.ref(),$=o.ref(),U=o.ref(),O=o.ref(),{getSignInTabText:H,getSignUpTabText:J}=me,Z=o.computed(()=>H()),ae=o.computed(()=>J()),se=P=>{var fe;r!=null&&r.onSignInSubmit?t("signInSubmit",P):(fe=_.value)==null||fe.submit(P)},ee=P=>{r!=null&&r.onConfirmSignUpSubmit?t("confirmSignUpSubmit",P):C.value.submit(P)},ze=P=>{r!=null&&r.onResetPasswordSubmit?t("resetPasswordSubmit",P):T.value.submit(P)},ie=P=>{r!=null&&r.onConfirmResetPasswordSubmit?t("confirmResetPasswordSubmit",P):$.value.submit(P)},dt=P=>{r!=null&&r.onConfirmSignInSubmit?t("confirmSignInSubmit",P):A.value.submit(P)},ft=P=>{r!=null&&r.onForceNewPasswordSubmit?t("mSetupTOTPSubmit",P):N.value.submit(P)},X=P=>{r!=null&&r.onForceNewPasswordSubmit?t("forceNewPasswordSubmit",P):k.value.submit(P)},ve=P=>{r!=null&&r.onSignUpSubmit?t("signUpSubmit",P):b.value.submit()},Ka=P=>{r!=null&&r.onVerifyUserSubmit?t("verifyUserSubmit",P):U.value.submit(P)},qa=P=>{r!=null&&r.onConfirmVerifyUserSubmit?t("confirmVerifyUserSubmit",P):O.value.submit(P)},ro=o.ref(null),oo=o.ref();o.watch(()=>w.value.context,()=>{const{user:P,signOut:fe}=ea({send:S,state:w.value});ro.value=P,oo.value=fe});const An=o.computed(()=>{var P,fe;return((P=h.value)==null?void 0:P.matches("signIn"))||((fe=h.value)==null?void 0:fe.matches("signUp"))}),Ja=o.computed(()=>{var P;return!(w.value.matches("authenticated")||w.value.matches("idle")||w.value.matches("setup")||w.value.matches("signOut")||((P=h.value)==null?void 0:P.matches("autoSignIn")))});return(P,fe)=>{var ao,so,uo,co,lo,fo,po,mo,ho,go,vo,yo;const io=x_,Za=U_;return o.openBlock(),o.createElementBlock(o.Fragment,null,[o.unref(Ja)?(o.openBlock(),o.createElementBlock("div",o.mergeProps({key:0},P.$attrs,{"data-amplify-authenticator":"","data-variation":o.unref(s)}),[o.createElementVNode("div",$b,[o.renderSlot(P.$slots,"header"),o.createElementVNode("div",{"data-amplify-router":"","data-amplify-router-content":o.unref(An)?void 0:""},[o.unref(An)&&!o.unref(d)?(o.openBlock(),o.createBlock(Za,{key:0},{default:o.withCtx(()=>{var q,Q;return[o.createVNode(io,{active:(q=o.unref(h))==null?void 0:q.matches("signIn"),id:44472,label:o.unref(Z),onClick:fe[0]||(fe[0]=Tn=>o.unref(S)("SIGN_IN"))},null,8,["active","label"]),o.createVNode(io,{active:(Q=o.unref(h))==null?void 0:Q.matches("signUp"),id:44471,label:o.unref(ae),onClick:fe[1]||(fe[1]=Tn=>o.unref(S)("SIGN_UP"))},null,8,["active","label"])]}),_:1})):o.createCommentVNode("",!0),o.unref(An)?(o.openBlock(),o.createElementBlock("div",Ub,[(ao=o.unref(h))!=null&&ao.matches("signIn")?(o.openBlock(),o.createBlock(Lr,{key:0,onSignInSubmit:se,ref_key:"signInComponent",ref:_},{signInSlotI:o.withCtx(()=>[o.renderSlot(P.$slots,"sign-in")]),form:o.withCtx(({info:q,onSignInSubmit:Q,onForgotPasswordClicked:Tn,onInput:Qa})=>[o.renderSlot(P.$slots,"sign-in-form",{info:q,onInput:Qa,onSignInSubmit:Q,onForgotPasswordClicked:Tn})]),header:o.withCtx(()=>[o.renderSlot(P.$slots,"sign-in-header")]),footer:o.withCtx(()=>[o.renderSlot(P.$slots,"sign-in-footer")]),_:3},512)):o.createCommentVNode("",!0),((so=o.unref(h))==null?void 0:so.matches("signUp"))&&!o.unref(d)?(o.openBlock(),o.createBlock(Gr,{key:1,onSignUpSubmit:ve,ref_key:"signUpComponent",ref:b},{signUpSlotI:o.withCtx(()=>[o.renderSlot(P.$slots,"sign-up")]),header:o.withCtx(()=>[o.renderSlot(P.$slots,"sign-up-header")]),"signup-fields":o.withCtx(({info:q})=>[o.renderSlot(P.$slots,"sign-up-fields",{info:q})]),footer:o.withCtx(()=>[o.renderSlot(P.$slots,"sign-up-footer")]),_:3},512)):o.createCommentVNode("",!0)])):o.createCommentVNode("",!0),(uo=o.unref(h))!=null&&uo.matches("confirmSignUp")?(o.openBlock(),o.createBlock(jr,{key:2,onConfirmSignUpSubmit:ee,ref_key:"confirmSignUpComponent",ref:C},{confirmSignUpSlotI:o.withCtx(()=>[o.renderSlot(P.$slots,"confirm-sign-up")]),header:o.withCtx(()=>[o.renderSlot(P.$slots,"confirm-sign-up-header")]),footer:o.withCtx(({onConfirmSignUpSubmit:q,onLostCodeClicked:Q})=>[o.renderSlot(P.$slots,"confirm-sign-up-footer",{onConfirmSignUpSubmit:q,onLostCodeClicked:Q})]),_:3},512)):o.createCommentVNode("",!0),(co=o.unref(h))!=null&&co.matches("resetPassword")?(o.openBlock(),o.createBlock(Xr,{key:3,onResetPasswordSubmit:ze,ref_key:"resetPasswordComponent",ref:T},{resetPasswordSlotI:o.withCtx(()=>[o.renderSlot(P.$slots,"reset-password")]),header:o.withCtx(()=>[o.renderSlot(P.$slots,"reset-password-header")]),footer:o.withCtx(({onResetPasswordSubmit:q,onBackToSignInClicked:Q})=>[o.renderSlot(P.$slots,"reset-password-footer",{onResetPasswordSubmit:q,onBackToSignInClicked:Q})]),_:3},512)):o.createCommentVNode("",!0),(lo=o.unref(h))!=null&&lo.matches("confirmResetPassword")?(o.openBlock(),o.createBlock(eo,{key:4,onConfirmResetPasswordSubmit:ie,ref_key:"confirmResetPasswordComponent",ref:$},{confirmResetPasswordSlotI:o.withCtx(()=>[o.renderSlot(P.$slots,"confirm-reset-password")]),header:o.withCtx(()=>[o.renderSlot(P.$slots,"confirm-reset-password-header")]),footer:o.withCtx(({onConfirmResetPasswordSubmit:q,onLostYourCodeClicked:Q})=>[o.renderSlot(P.$slots,"confirm-reset-password-footer",{onConfirmResetPasswordSubmit:q,onLostYourCodeClicked:Q})]),_:3},512)):o.createCommentVNode("",!0),(fo=o.unref(h))!=null&&fo.matches("confirmSignIn")?(o.openBlock(),o.createBlock(Hr,{key:5,onConfirmSignInSubmit:dt,ref_key:"confirmSignInComponent",ref:A},{confirmSignInSlotI:o.withCtx(()=>[o.renderSlot(P.$slots,"confirm-sign-in")]),header:o.withCtx(()=>[o.renderSlot(P.$slots,"confirm-sign-in-header")]),footer:o.withCtx(({onConfirmSignInSubmit:q,onBackToSignInClicked:Q})=>[o.renderSlot(P.$slots,"confirm-sign-in-footer",{onConfirmSignInSubmit:q,onBackToSignInClicked:Q})]),_:3},512)):o.createCommentVNode("",!0),((po=o.unref(h))==null?void 0:po.matches("setupTOTP.edit"))||((mo=o.unref(h))==null?void 0:mo.matches("setupTOTP.submit"))?(o.openBlock(),o.createBlock(Nb,{key:6,onConfirmSetupTotpSubmit:ft,ref_key:"confirmSetupTOTPComponent",ref:N},{confirmSetupTOTPI:o.withCtx(()=>[o.renderSlot(P.$slots,"setup-totp")]),header:o.withCtx(()=>[o.renderSlot(P.$slots,"setup-totp-header")]),footer:o.withCtx(({onSetupTOTPSubmit:q,onBackToSignInClicked:Q})=>[o.renderSlot(P.$slots,"setup-totp-footer",{onSetupTOTPSubmit:q,onBackToSignInClicked:Q})]),_:3},512)):o.createCommentVNode("",!0),(ho=o.unref(h))!=null&&ho.matches("forceNewPassword")?(o.openBlock(),o.createBlock(Qr,{key:7,onForceNewPasswordSubmit:X,ref_key:"forceNewPasswordComponent",ref:k},{forceNewPasswordI:o.withCtx(()=>[o.renderSlot(P.$slots,"force-new-password")]),header:o.withCtx(()=>[o.renderSlot(P.$slots,"force-new-password-header")]),"force-new-password-form-fields":o.withCtx(()=>[o.renderSlot(P.$slots,"force-new-password-form-fields")]),footer:o.withCtx(({onHaveAccountClicked:q,onForceNewPasswordSubmit:Q})=>[o.renderSlot(P.$slots,"force-new-password-footer",{onForceNewPasswordSubmit:Q,onBackToSignInClicked:q})]),_:3},512)):o.createCommentVNode("",!0),(go=o.unref(h))!=null&&go.matches("verifyUser")?(o.openBlock(),o.createBlock(to,{key:8,onVerifyUserSubmit:Ka,ref_key:"verifyUserComponent",ref:U},{verifyUserSlotI:o.withCtx(()=>[o.renderSlot(P.$slots,"verify-user")]),header:o.withCtx(()=>[o.renderSlot(P.$slots,"verify-user-header")]),footer:o.withCtx(({onVerifyUserSubmit:q,onSkipClicked:Q})=>[o.renderSlot(P.$slots,"verify-user-footer",{onVerifyUserSubmit:q,onSkipClicked:Q})]),_:3},512)):o.createCommentVNode("",!0),(vo=o.unref(h))!=null&&vo.matches("confirmVerifyUser")?(o.openBlock(),o.createBlock(no,{key:9,onConfirmVerifyUserSubmit:qa,ref_key:"confirmVerifyUserComponent",ref:O},{confirmVerifyUserSlotI:o.withCtx(()=>[o.renderSlot(P.$slots,"confirm-verify-user")]),header:o.withCtx(()=>[o.renderSlot(P.$slots,"confirm-verify-user-header")]),footer:o.withCtx(({onConfirmVerifyUserSubmit:q,onSkipClicked:Q})=>[o.renderSlot(P.$slots,"confirm-verify-user-footer",{onConfirmVerifyUserSubmit:q,onSkipClicked:Q})]),_:3},512)):o.createCommentVNode("",!0)],8,Ob),o.renderSlot(P.$slots,"footer")])],16,xb)):o.createCommentVNode("",!0),(yo=o.unref(w))!=null&&yo.matches("authenticated")?o.renderSlot(P.$slots,"default",{key:1,user:ro.value,state:o.unref(w),signOut:oo.value,send:o.unref(S)}):o.createCommentVNode("",!0)],64)}}}),Ha=o.defineComponent({props:{info:{type:Object}},setup(e){return()=>e.info}}),Wa=o.defineComponent({__name:"amplify-text-field",props:{label:{default:""},id:{default:""},autocomplete:{default:""},placeholder:{default:""},required:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},name:{default:""},type:{default:"text"},hideLabel:{type:Boolean,default:!0}},setup(e){const t=e,{label:n,id:r,autocomplete:i,placeholder:a,required:s,name:u,type:c}=o.toRefs(t);return(l,d)=>{const p=yn,f=wn,m=oe;return o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createVNode(p,{class:o.normalizeClass(["amplify-label",{"amplify-visually-hidden":e.hideLabel}]),for:o.unref(r)},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(n)),1)]),_:1},8,["class","for"]),o.createVNode(m,{class:"amplify-field-group__field-wrapper"},{default:o.withCtx(()=>[o.createVNode(f,{class:"amplify-input amplify-field-group__control",id:o.unref(r),"aria-invalid":"false",autocomplete:o.unref(i),placeholder:o.unref(a),required:o.unref(s),name:o.unref(u),disabled:e.disabled,type:o.unref(c)},null,8,["id","autocomplete","placeholder","required","name","disabled","type"])]),_:1})],64)}}}),Rb={class:"amplify-flex amplify-field amplify-checkboxfield"},Bb={class:"amplify-flex amplify-checkbox"},Vb={class:"amplify-visually-hidden"},Fb=["data-error","data-checked"],Mb=["data-checked"],Db=o.createElementVNode("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"},null,-1),Lb=[Db],zb=o.createElementVNode("span",{class:"amplify-text amplify-checkbox__label"}," I agree with the Terms & Conditions",-1),Gb={key:0,class:"amplify-text amplify-field__error-message"},Ya=o.defineComponent({__name:"amplify-check-box",props:{errorMessage:{default:""}},setup(e){const t=e,n=o.ref(!1),{errorMessage:r}=o.toRefs(t);return(i,a)=>(o.openBlock(),o.createElementBlock("div",Rb,[o.createElementVNode("label",Bb,[o.createElementVNode("span",Vb,[o.createElementVNode("input",{onClick:a[0]||(a[0]=s=>n.value=!n.value),class:"amplify-input amplify-field-group__control amplify-checkbox__input","aria-invalid":"false",type:"checkbox",name:"acknowledgement",value:"yes"})]),o.createElementVNode("span",{class:o.normalizeClass(["amplify-flex amplify-checkbox__button",{"amplify-checkbox__button--error":!n.value}]),"aria-hidden":"true","data-focus":"false","data-error":!n.value,"data-checked":n.value},[(o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",class:o.normalizeClass(["amplify-icon amplify-checkbox__icon",{"amplify-checkbox__icon--checked":n.value}]),viewBox:"0 0 24 24",fill:"currentColor","data-checked":n.value},Lb,10,Mb))],10,Fb),zb]),n.value?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("p",Gb,o.toDisplayString(o.unref(r)),1))]))}});var jb={install:e=>{e.component("SignIn",Lr),e.component("SignUp",Gr),e.component("FederatedSignIn",vn),e.component("Authenticator",ja),e.component("RenderInfo",Ha),e.component("PasswordControl",Dr),e.component("ForceNewPassword",Qr),e.component("ResetPassword",Xr),e.component("ConfirmResetPassword",eo),e.component("ConfirmSignUp",jr),e.component("ConfirmSignIn",Hr),e.component("VerifyUser",to),e.component("ConfirmVerifyUser",no),e.component("AmplifyTextField",Wa),e.component("AmplifyCheckBox",Ya),e.component("AmplifyButton",ce),e.component("BaseFormField",Ia),e.component("BaseFormFields",Pe),e.component("AuthenticatorSignUpFormFields",zr),e.component("AuthenticatorForceNewPasswordFormFields",Zr)}};exports.AmplifyButton=ce;exports.AmplifyCheckBox=Ya;exports.AmplifyTextField=Wa;exports.Authenticator=ja;exports.AuthenticatorForceNewPasswordFormFields=Zr;exports.AuthenticatorSignUpFormFields=zr;exports.ConfirmResetPassword=eo;exports.ConfirmSignIn=Hr;exports.ConfirmSignUp=jr;exports.ConfirmVerifyUser=no;exports.FederatedSignIn=vn;exports.ForceNewPassword=Qr;exports.PasswordControl=Dr;exports.RenderInfo=Ha;exports.ResetPassword=Xr;exports.SignIn=Lr;exports.SignUp=Gr;exports.VerifyUser=to;exports.default=jb;exports.translations=nw;exports.useAuthenticator=le;
38
+ `;return typeof r=="function"&&r(null,f),f};const Cb=V_,ir=Pa,Ga=La,Ab=za;function Jr(e,t,n,r,i){const a=[].slice.call(arguments,1),s=a.length,u=typeof a[s-1]=="function";if(!u&&!Cb())throw new Error("Callback required as last argument");if(u){if(s<2)throw new Error("Too few arguments provided");s===2?(i=n,n=t,t=r=void 0):s===3&&(t.getContext&&typeof i=="undefined"?(i=r,r=void 0):(i=r,r=n,n=t,t=void 0))}else{if(s<1)throw new Error("Too few arguments provided");return s===1?(n=t,t=r=void 0):s===2&&!t.getContext&&(r=n,n=t,t=void 0),new Promise(function(c,l){try{const d=ir.create(n,r);c(e(d,t,r))}catch(d){l(d)}})}try{const c=ir.create(n,r);i(null,e(c,t,r))}catch(c){i(c)}}It.create=ir.create;It.toCanvas=Jr.bind(null,Ga.render);It.toDataURL=Jr.bind(null,Ga.renderToDataURL);It.toString=Jr.bind(null,function(e,t,n){return Ab.render(e,n)});const Tb={key:0},Ib=["src"],Eb={"data-amplify-copy-tooltip":""},Pb=o.createElementVNode("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[o.createElementVNode("path",{d:"M16 1H4C2.9 1 2 1.9 2 3V17H4V3H16V1ZM15 5H8C6.9 5 6.01 5.9 6.01 7L6 21C6 22.1 6.89 23 7.99 23H19C20.1 23 21 22.1 21 21V11L15 5ZM8 21V7H14V12H19V21H8Z"})],-1),Nb=o.defineComponent({__name:"setup-totp",emits:["confirmSetupTOTPSubmit","backToSignInClicked"],setup(e,{emit:t}){var O,H,J;const n=new Y.Logger("SetupTOTP-logger"),i=he(le)(),a=o.useAttrs(),{state:s,send:u}=ge(),{value:{context:c}}=s,l=o.computed(()=>ue(s.value)),{totpSecretCode:d,user:p}=l.value.context,f=(H=(O=c==null?void 0:c.config)==null?void 0:O.formFields)==null?void 0:H.setupTOTP,{totpIssuer:m="AWSCognito",totpUsername:v=p==null?void 0:p.username}=(J=f==null?void 0:f.QR)!=null?J:{},y=typeof d=="string"&&typeof v=="string"?fw(m,v,d):null,w=o.reactive({qrCodeImageSource:"",isLoading:!0}),{getCopyText:S,getCopiedText:g,getBackToSignInText:h,getConfirmText:_}=me,b=o.ref(S());function C(){typeof d=="string"&&navigator.clipboard.writeText(d),b.value=g()}o.onMounted(async()=>{if(!(!p||!y))try{w.qrCodeImageSource=await It.toDataURL(y)}catch(Z){n.error(Z)}finally{w.isLoading=!1}});const A=o.computed(()=>h()),N=o.computed(()=>_()),k=Z=>{const{name:ae,value:se}=Z.target;u({type:"CHANGE",data:{name:ae,value:se}})},T=Z=>{a!=null&&a.onConfirmSetupTOTPSubmit?t("confirmSetupTOTPSubmit",Z):$(Z)},$=Z=>{i.submitForm(Ae(Z))},U=()=>{a!=null&&a.onBackToSignInClicked?t("backToSignInClicked"):u({type:"SIGN_IN"})};return(Z,ae)=>{const se=Be,ee=oe,ze=Te,ie=ce,dt=Ee,ft=_e,X=Ie;return o.renderSlot(Z.$slots,"confirmSetupTOTPI",o.normalizeProps(o.guardReactiveProps(Z.$attrs)),()=>[o.createVNode(ee,o.normalizeProps(o.guardReactiveProps(Z.$attrs)),{default:o.withCtx(()=>[o.createVNode(X,{"data-amplify-authenticator-setup-totp":"",onInput:k,onSubmit:o.withModifiers(T,["prevent"])},{default:o.withCtx(()=>[o.createVNode(ft,{class:"amplify-flex amplify-authenticator__column",disabled:o.unref(l).matches("confirmSignIn.pending")},{default:o.withCtx(()=>[o.createVNode(ee,{class:"amplify-flex amplify-authenticator__column"},{default:o.withCtx(()=>[o.renderSlot(Z.$slots,"header",{},()=>[o.createVNode(se,{class:"amplify-heading",level:3},{default:o.withCtx(()=>[o.createTextVNode(" Setup TOTP ")]),_:1})]),o.createVNode(ee,{class:"amplify-flex amplify-authenticator__column"},{default:o.withCtx(()=>[w.isLoading?(o.openBlock(),o.createElementBlock("p",Tb,"Loading...")):(o.openBlock(),o.createElementBlock("img",{key:1,class:"amplify-image","data-amplify-qrcode":"",src:w.qrCodeImageSource,alt:"qr code",width:"228",height:"228"},null,8,Ib)),o.createVNode(ee,{class:"amplify-flex","data-amplify-copy":""},{default:o.withCtx(()=>[o.createElementVNode("div",null,o.toDisplayString(o.unref(d)),1),o.createVNode(ee,{"data-amplify-copy-svg":"",onClick:C},{default:o.withCtx(()=>[o.createElementVNode("div",Eb,o.toDisplayString(b.value),1),Pb]),_:1})]),_:1}),o.createVNode(Pe,{route:"setupTOTP"})]),_:1}),o.createVNode(dt,{class:"amplify-flex amplify-authenticator__column"},{default:o.withCtx(()=>{var ve;return[(ve=o.unref(l).context)!=null&&ve.remoteError?(o.openBlock(),o.createBlock(ze,{key:0},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(x)(o.unref(l).context.remoteError)),1)]),_:1})):o.createCommentVNode("",!0),o.createVNode(ie,{class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!1,loading:!1,variation:"primary",type:"submit",disabled:o.unref(l).matches("confirmSignIn.pending")},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(N)),1)]),_:1},8,["disabled"]),o.createVNode(ie,{class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!1,size:"small",variation:"link",style:{"font-weight":"normal"},type:"button",onClick:o.withModifiers(U,["prevent"])},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(A)),1)]),_:1},8,["onClick"]),o.renderSlot(Z.$slots,"footer",{onBackToSignInClicked:U,onSetupTOTPSubmit:T})]}),_:3})]),_:3})]),_:3},8,["disabled"])]),_:3},8,["onSubmit"])]),_:3},16)])}}}),Zr=o.defineComponent({__name:"authenticator-force-new-password-form-fields",setup(e){return(t,n)=>(o.openBlock(),o.createBlock(Pe,{route:"forceNewPassword"}))}}),Qr=o.defineComponent({__name:"force-new-password",emits:["haveAccountClicked","forceNewPasswordSubmit"],setup(e,{emit:t}){const n=o.useAttrs(),{state:r,send:i}=ge(),s=he(le)(),u=o.computed(()=>ue(r.value)),{getChangePasswordText:c,getChangingText:l,getBackToSignInText:d}=me,p=o.computed(()=>c()),f=o.computed(()=>l()),m=o.computed(()=>d()),v=()=>{n!=null&&n.onHaveAccountClicked?t("haveAccountClicked"):i({type:"SIGN_IN"})},y=h=>{n!=null&&n.onForceNewPasswordSubmit?t("forceNewPasswordSubmit",h):w(h)},w=h=>{s.submitForm(Ae(h))},S=h=>{const{name:_,value:b}=h.target;i({type:"CHANGE",data:{name:_,value:b}})};function g(h){const{name:_}=h.target;s.updateBlur({name:_})}return(h,_)=>{const b=Be,C=oe,A=Te,N=ce,k=Ee,T=_e,$=Ie;return o.renderSlot(h.$slots,"forceNewPasswordI",o.normalizeProps(o.guardReactiveProps(h.$attrs)),()=>[o.createVNode(C,o.normalizeProps(o.guardReactiveProps(h.$attrs)),{default:o.withCtx(()=>[o.createVNode($,{"data-amplify-authenticator-forcenewpassword":"",onInput:S,onBlurCapture:g,onSubmit:o.withModifiers(y,["prevent"])},{default:o.withCtx(()=>[o.createVNode(T,{class:"amplify-flex amplify-authenticator__column",disabled:o.unref(u).matches("forceNewPassword.pending")},{default:o.withCtx(()=>[o.renderSlot(h.$slots,"header",{},()=>[o.createVNode(b,{level:3,class:"amplify-heading"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(p)),1)]),_:1})]),o.createVNode(C,{class:"amplify-flex amplify-authenticator__column"},{default:o.withCtx(()=>[o.renderSlot(h.$slots,"force-new-password-form-fields",{},()=>[o.createVNode(Zr)])]),_:3}),o.createVNode(k,{class:"amplify-flex amplify-authenticator__column"},{default:o.withCtx(()=>[o.unref(u).context.remoteError?(o.openBlock(),o.createBlock(A,{key:0,"data-ui-error":""},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(x)(o.unref(u).context.remoteError)),1)]),_:1})):o.createCommentVNode("",!0),o.createVNode(N,{class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!1,loading:!1,variation:"primary",style:{"font-weight":"normal"},disabled:o.unref(u).matches("signUp.submit")},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(u).matches("forceNewPassword.pending")?o.unref(f)+"\u2026":o.unref(p)),1)]),_:1},8,["disabled"]),o.createVNode(N,{class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!1,size:"small",variation:"link",style:{"font-weight":"normal"},type:"button",onClick:o.withModifiers(v,["prevent"])},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(m)),1)]),_:1},8,["onClick"]),o.renderSlot(h.$slots,"footer",{onHaveAccountClicked:v,onForceNewPasswordSubmit:y})]),_:3})]),_:3},8,["disabled"])]),_:3},8,["onSubmit"])]),_:3},16)])}}}),Xr=o.defineComponent({__name:"reset-password",emits:["resetPasswordSubmit","backToSignInClicked"],setup(e,{emit:t}){const n=o.useAttrs(),r=he(le),{send:i,submitForm:a}=r(),{error:s,isPending:u}=o.toRefs(r()),{getBackToSignInText:c,getResetYourPasswordText:l,getSendCodeText:d}=me,p=o.computed(()=>c()),f=o.computed(()=>l()),m=o.computed(()=>d()),v=g=>{n!=null&&n.onResetPasswordSubmit?t("resetPasswordSubmit",g):y(g)},y=g=>{a(Ae(g))},w=g=>{const{name:h,value:_}=g.target;i({type:"CHANGE",data:{name:h,value:_}})},S=()=>{n!=null&&n.onBackToSignInClicked?t("backToSignInClicked"):i({type:"SIGN_IN"})};return(g,h)=>{const _=Be,b=_e,C=Te,A=ce,N=Ee,k=oe,T=Ie;return o.renderSlot(g.$slots,"resetPasswordSlotI",o.normalizeProps(o.guardReactiveProps(g.$attrs)),()=>[o.createVNode(T,o.mergeProps(g.$attrs,{"data-amplify-authenticator-resetpassword":"",onInput:w,onSubmit:o.withModifiers(v,["prevent"])}),{default:o.withCtx(()=>[o.createVNode(k,{class:"amplify-flex amplify-authenticator__column"},{default:o.withCtx(()=>[o.renderSlot(g.$slots,"header",{},()=>[o.createVNode(_,{class:"amplify-heading",level:3},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(f)),1)]),_:1})]),o.createVNode(b,{class:"amplify-flex amplify-authenticator__column",disabled:o.unref(u)},{default:o.withCtx(()=>[o.createVNode(Pe,{route:"resetPassword"})]),_:1},8,["disabled"]),o.createVNode(N,{class:"amplify-flex amplify-authenticator__column"},{default:o.withCtx(()=>[o.unref(s)?(o.openBlock(),o.createBlock(C,{key:0},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(x)(o.unref(s))),1)]),_:1})):o.createCommentVNode("",!0),o.createVNode(A,{class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!1,variation:"primary",type:"submit",disabled:o.unref(u)},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(m)),1)]),_:1},8,["disabled"]),o.createVNode(A,{class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!1,size:"small",variation:"link",style:{"font-weight":"normal"},type:"button",onClick:o.withModifiers(S,["prevent"])},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(p)),1)]),_:1},8,["onClick"]),o.renderSlot(g.$slots,"footer",{onBackToSignInClicked:S,onResetPasswordSubmit:v})]),_:3})]),_:3})]),_:3},16,["onSubmit"])])}}}),eo=o.defineComponent({__name:"confirm-reset-password",emits:["confirmResetPasswordSubmit","backToSignInClicked"],setup(e,{emit:t}){const{state:n,send:r}=ge(),a=he(le)(),s=o.useAttrs(),u=o.computed(()=>ue(n.value)),{getResendCodeText:c,getResetYourPasswordText:l,getSubmitText:d}=me,p=o.computed(()=>c()),f=o.computed(()=>l()),m=o.computed(()=>d()),v=h=>{s!=null&&s.onConfirmResetPasswordSubmit?t("confirmResetPasswordSubmit",h):y(h)},y=h=>{a.submitForm(Ae(h))},w=()=>{r({type:"RESEND"})},S=h=>{const{name:_,value:b}=h.target;r({type:"CHANGE",data:{name:_,value:b}})};function g(h){const{name:_}=h.target;a.updateBlur({name:_})}return(h,_)=>{const b=Be,C=oe,A=Te,N=ce,k=Ee,T=_e,$=Ie;return o.renderSlot(h.$slots,"confirmResetPasswordSlotI",o.normalizeProps(o.guardReactiveProps(h.$attrs)),()=>[o.createVNode(C,o.normalizeProps(o.guardReactiveProps(h.$attrs)),{default:o.withCtx(()=>[o.createVNode($,{"data-amplify-authenticator-confirmResetpassword":"",onInput:S,onBlurCapture:g,onSubmit:o.withModifiers(v,["prevent"])},{default:o.withCtx(()=>[o.createVNode(T,{class:"amplify-flex amplify-authenticator__column",disabled:o.unref(u).matches("confirmResetPassword.pending")},{default:o.withCtx(()=>[o.renderSlot(h.$slots,"header",{},()=>[o.createVNode(b,{class:"amplify-heading",level:3},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(f)),1)]),_:1})]),o.createVNode(C,{class:"amplify-flex amplify-authenticator__column"},{default:o.withCtx(()=>[o.createVNode(Pe,{route:"confirmResetPassword"})]),_:1}),o.createVNode(k,{class:"amplify-flex amplify-authenticator__column"},{default:o.withCtx(()=>{var U,O;return[(O=(U=o.unref(u))==null?void 0:U.context)!=null&&O.remoteError?(o.openBlock(),o.createBlock(A,{key:0},{default:o.withCtx(()=>{var H,J;return[o.createTextVNode(o.toDisplayString(o.unref(x)((J=(H=o.unref(u))==null?void 0:H.context)==null?void 0:J.remoteError)),1)]}),_:1})):o.createCommentVNode("",!0),o.createVNode(N,{class:"amplify-field-group__control amplify-authenticator__font",variation:"primary",fullwidth:!1,type:"submit",disabled:o.unref(u).matches("confirmResetPassword.pending")},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(m)),1)]),_:1},8,["disabled"]),o.createVNode(N,{class:"amplify-field-group__control amplify-authenticator__font",variation:"link",fullwidth:!1,size:"small",type:"button",onClick:o.withModifiers(w,["prevent"])},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(p)),1)]),_:1},8,["onClick"]),o.renderSlot(h.$slots,"footer",{onConfirmResetPasswordSubmit:v,onLostYourCodeClicked:w})]}),_:3})]),_:3},8,["disabled"])]),_:3},8,["onSubmit"])]),_:3},16)])}}}),to=o.defineComponent({__name:"verify-user",emits:["verifyUserSubmit","skipClicked"],setup(e,{emit:t}){const r=he(le)(),i=o.useAttrs(),{state:a,send:s}=ge(),u=o.computed(()=>ue(a.value)),{unverifiedContactMethods:c}=u.value.context,{getAccountRecoveryInfoText:l,getSkipText:d,getVerifyText:p,getVerifyContactText:f}=me,m=o.computed(()=>l()),v=o.computed(()=>d()),y=o.computed(()=>p()),w=o.computed(()=>f()),S=b=>{const{name:C,value:A}=b.target;s({type:"CHANGE",data:{name:C,value:A}})},g=b=>{i!=null&&i.onVerifyUserSubmit?t("verifyUserSubmit",b):h(b)},h=b=>{r.submitForm(Ae(b))},_=()=>{i!=null&&i.onSkipClicked?t("skipClicked"):s("SKIP")};return(b,C)=>{const A=Be,N=yn,k=wn,T=Ea,$=oe,U=Te,O=ce,H=Ee,J=_e,Z=Ie;return o.renderSlot(b.$slots,"verifyUserSlotI",{},()=>[o.createVNode($,null,{default:o.withCtx(()=>[o.createVNode(Z,{onInput:S,onSubmit:o.withModifiers(g,["prevent"])},{default:o.withCtx(()=>[o.createVNode(J,{disabled:o.unref(u).matches("verifyUser.pending"),class:"amplify-flex amplify-authenticator__column"},{default:o.withCtx(()=>[o.renderSlot(b.$slots,"header",{},()=>[o.createVNode(A,{class:"amplify-heading",level:3},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(m)),1)]),_:1})]),o.createVNode($,{class:"amplify-flex amplify-field amplify-radiogroupfield amplify-authenticator__column"},{default:o.withCtx(()=>[o.createVNode(N,{class:"amplify-visually-hidden amplify-label",id:"amplify-field-493c"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(w)),1)]),_:1}),o.createVNode($,{class:"amplify-flex amplify-field amplify-radiogroupfield amplify-authenticator__column","aria-labelledby":"amplify-field-493c"},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(o.unref(c),(ae,se)=>(o.openBlock(),o.createBlock(N,{class:"amplify-flex amplify-radio","data-amplify-verify-label":"",id:"verify",key:ae},{default:o.withCtx(()=>[o.createVNode(k,{class:"amplify-input amplify-field-group__control amplify-visually-hidden amplify-radio__input","aria-invalid":"false","data-amplify-verify-input":"",id:"verify",name:"unverifiedAttr",type:"radio",value:se},null,8,["value"]),o.createVNode(T,{class:"amplify-flex amplify-radio__button","aria-hidden":"true"}),o.createVNode(T,{class:"amplify-text amplify-radio__label"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(mn)[se].label),1)]),_:2},1024)]),_:2},1024))),128))]),_:1})]),_:1}),o.createVNode(H,{class:"amplify-flex amplify-authenticator__column"},{default:o.withCtx(()=>{var ae,se;return[(se=(ae=o.unref(u))==null?void 0:ae.context)!=null&&se.remoteError?(o.openBlock(),o.createBlock(U,{key:0},{default:o.withCtx(()=>{var ee;return[o.createTextVNode(o.toDisplayString(o.unref(x)((ee=o.unref(u))==null?void 0:ee.context.remoteError)),1)]}),_:1})):o.createCommentVNode("",!0),o.createVNode(O,{class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!1,variation:"primary",type:"submit",disabled:o.unref(u).matches("verifyUser.pending")},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(y)),1)]),_:1},8,["disabled"]),o.createVNode(O,{class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!1,size:"small",variation:"link",style:{"font-weight":"normal"},type:"button",onClick:o.withModifiers(_,["prevent"])},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(v)),1)]),_:1},8,["onClick"]),o.renderSlot(b.$slots,"footer",{onSkipClicked:_,onVerifyUserSubmit:g})]}),_:3})]),_:3},8,["disabled"])]),_:3},8,["onSubmit"])]),_:3})])}}}),no=o.defineComponent({__name:"confirm-verify-user",emits:["confirmVerifyUserSubmit","skipClicked"],setup(e,{emit:t}){const r=he(le)(),i=o.useAttrs(),{state:a,send:s}=ge(),u=o.computed(()=>ue(a.value)),{getAccountRecoveryInfoText:c,getSkipText:l,getSubmitText:d}=me,p=o.computed(()=>c()),f=o.computed(()=>l()),m=o.computed(()=>d()),v=g=>{const{name:h,value:_}=g.target;s({type:"CHANGE",data:{name:h,value:_}})},y=g=>{i!=null&&i.onConfirmVerifyUserSubmit?t("confirmVerifyUserSubmit",g):w(g)},w=g=>{r.submitForm(Ae(g))},S=()=>{i!=null&&i.onSkipClicked?t("skipClicked"):s({type:"SKIP"})};return(g,h)=>{const _=Be,b=oe,C=Te,A=ce,N=Ee,k=_e,T=Ie;return o.renderSlot(g.$slots,"confirmVerifyUserSlotI",o.normalizeProps(o.guardReactiveProps(g.$attrs)),()=>[o.createVNode(b,o.normalizeProps(o.guardReactiveProps(g.$attrs)),{default:o.withCtx(()=>[o.createVNode(T,{onInput:v,onSubmit:o.withModifiers(y,["prevent"])},{default:o.withCtx(()=>[o.createVNode(k,{class:"amplify-flex amplify-authenticator__column",disabled:o.unref(u).matches("confirmVerifyUser.pending")},{default:o.withCtx(()=>[o.renderSlot(g.$slots,"header",{},()=>[o.createVNode(_,{level:3,class:"amplify-heading"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(p)),1)]),_:1})]),o.createVNode(b,{class:"amplify-flex amplify-authenticator__column"},{default:o.withCtx(()=>[o.createVNode(Pe,{route:"confirmVerifyUser"})]),_:1}),o.createVNode(N,{class:"amplify-flex amplify-authenticator__column"},{default:o.withCtx(()=>{var $,U;return[(U=($=o.unref(u))==null?void 0:$.context)!=null&&U.remoteError?(o.openBlock(),o.createBlock(C,{key:0},{default:o.withCtx(()=>{var O;return[o.createTextVNode(o.toDisplayString(o.unref(x)((O=o.unref(u))==null?void 0:O.context.remoteError)),1)]}),_:1})):o.createCommentVNode("",!0),o.createVNode(A,{class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!1,variation:"primary",type:"submit",disabled:o.unref(u).matches("confirmVerifyUser.pending")},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(m)),1)]),_:1},8,["disabled"]),o.createVNode(A,{class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!1,size:"small",variation:"link",style:{"font-weight":"normal"},type:"button",onClick:o.withModifiers(S,["prevent"])},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(f)),1)]),_:1},8,["onClick"]),o.renderSlot(g.$slots,"footer",{onSkipClicked:S,onConfirmVerifyUserSubmit:y})]}),_:3})]),_:3},8,["disabled"])]),_:3},8,["onSubmit"])]),_:3},16)])}}}),kb="3.1.8",xb=["data-variation"],$b={"data-amplify-container":""},Ob=["data-amplify-router-content"],Ub={key:1,"data-amplify-router-content":""},ja=o.defineComponent({__name:"authenticator",props:{hideSignUp:{type:Boolean},initialState:null,loginMechanisms:null,services:null,signUpAttributes:null,variation:{default:"default"},socialProviders:null,formFields:null},emits:["signInSubmit","confirmSignUpSubmit","resetPasswordSubmit","confirmResetPasswordSubmit","confirmSignInSubmit","mSetupTOTPSubmit","forceNewPasswordSubmit","signUpSubmit","verifyUserSubmit","confirmVerifyUserSubmit"],setup(e,{emit:t}){const n=e,r=o.useAttrs(),{initialState:i,loginMechanisms:a,variation:s,services:u,signUpAttributes:c,socialProviders:l,hideSignUp:d,formFields:p}=o.toRefs(n),f=GS(),m=e_(f);let v,y;const{state:w,send:S}=Aa(m);ge(m);const g=o.ref(!1);y=m.subscribe(P=>{P.matches("setup")&&!g.value&&(S({type:"INIT",data:{initialState:i==null?void 0:i.value,loginMechanisms:a==null?void 0:a.value,socialProviders:l==null?void 0:l.value,signUpAttributes:c==null?void 0:c.value,services:u==null?void 0:u.value,formFields:p==null?void 0:p.value}}),g.value=!0)}).unsubscribe,o.onMounted(()=>{v=lw(m),uw({packageName:"@aws-amplify/ui-vue",version:kb})}),o.onUnmounted(()=>{v&&v(),y&&y()});const h=o.computed(()=>ue(w.value)),_=o.ref(),b=o.ref(),C=o.ref(),A=o.ref(),N=o.ref(),k=o.ref(),T=o.ref(),$=o.ref(),U=o.ref(),O=o.ref(),{getSignInTabText:H,getSignUpTabText:J}=me,Z=o.computed(()=>H()),ae=o.computed(()=>J()),se=P=>{var fe;r!=null&&r.onSignInSubmit?t("signInSubmit",P):(fe=_.value)==null||fe.submit(P)},ee=P=>{r!=null&&r.onConfirmSignUpSubmit?t("confirmSignUpSubmit",P):C.value.submit(P)},ze=P=>{r!=null&&r.onResetPasswordSubmit?t("resetPasswordSubmit",P):T.value.submit(P)},ie=P=>{r!=null&&r.onConfirmResetPasswordSubmit?t("confirmResetPasswordSubmit",P):$.value.submit(P)},dt=P=>{r!=null&&r.onConfirmSignInSubmit?t("confirmSignInSubmit",P):A.value.submit(P)},ft=P=>{r!=null&&r.onForceNewPasswordSubmit?t("mSetupTOTPSubmit",P):N.value.submit(P)},X=P=>{r!=null&&r.onForceNewPasswordSubmit?t("forceNewPasswordSubmit",P):k.value.submit(P)},ve=P=>{r!=null&&r.onSignUpSubmit?t("signUpSubmit",P):b.value.submit()},Ka=P=>{r!=null&&r.onVerifyUserSubmit?t("verifyUserSubmit",P):U.value.submit(P)},qa=P=>{r!=null&&r.onConfirmVerifyUserSubmit?t("confirmVerifyUserSubmit",P):O.value.submit(P)},ro=o.ref(null),oo=o.ref();o.watch(()=>w.value.context,()=>{const{user:P,signOut:fe}=ea({send:S,state:w.value});ro.value=P,oo.value=fe});const An=o.computed(()=>{var P,fe;return((P=h.value)==null?void 0:P.matches("signIn"))||((fe=h.value)==null?void 0:fe.matches("signUp"))}),Ja=o.computed(()=>{var P;return!(w.value.matches("authenticated")||w.value.matches("idle")||w.value.matches("setup")||w.value.matches("signOut")||((P=h.value)==null?void 0:P.matches("autoSignIn")))});return(P,fe)=>{var ao,so,uo,co,lo,fo,po,mo,ho,go,vo,yo;const io=x_,Za=U_;return o.openBlock(),o.createElementBlock(o.Fragment,null,[o.unref(Ja)?(o.openBlock(),o.createElementBlock("div",o.mergeProps({key:0},P.$attrs,{"data-amplify-authenticator":"","data-variation":o.unref(s)}),[o.createElementVNode("div",$b,[o.renderSlot(P.$slots,"header"),o.createElementVNode("div",{"data-amplify-router":"","data-amplify-router-content":o.unref(An)?void 0:""},[o.unref(An)&&!o.unref(d)?(o.openBlock(),o.createBlock(Za,{key:0},{default:o.withCtx(()=>{var q,Q;return[o.createVNode(io,{active:(q=o.unref(h))==null?void 0:q.matches("signIn"),id:44472,label:o.unref(Z),onClick:fe[0]||(fe[0]=Tn=>o.unref(S)("SIGN_IN"))},null,8,["active","label"]),o.createVNode(io,{active:(Q=o.unref(h))==null?void 0:Q.matches("signUp"),id:44471,label:o.unref(ae),onClick:fe[1]||(fe[1]=Tn=>o.unref(S)("SIGN_UP"))},null,8,["active","label"])]}),_:1})):o.createCommentVNode("",!0),o.unref(An)?(o.openBlock(),o.createElementBlock("div",Ub,[(ao=o.unref(h))!=null&&ao.matches("signIn")?(o.openBlock(),o.createBlock(Lr,{key:0,onSignInSubmit:se,ref_key:"signInComponent",ref:_},{signInSlotI:o.withCtx(()=>[o.renderSlot(P.$slots,"sign-in")]),form:o.withCtx(({info:q,onSignInSubmit:Q,onForgotPasswordClicked:Tn,onInput:Qa})=>[o.renderSlot(P.$slots,"sign-in-form",{info:q,onInput:Qa,onSignInSubmit:Q,onForgotPasswordClicked:Tn})]),header:o.withCtx(()=>[o.renderSlot(P.$slots,"sign-in-header")]),footer:o.withCtx(()=>[o.renderSlot(P.$slots,"sign-in-footer")]),_:3},512)):o.createCommentVNode("",!0),((so=o.unref(h))==null?void 0:so.matches("signUp"))&&!o.unref(d)?(o.openBlock(),o.createBlock(Gr,{key:1,onSignUpSubmit:ve,ref_key:"signUpComponent",ref:b},{signUpSlotI:o.withCtx(()=>[o.renderSlot(P.$slots,"sign-up")]),header:o.withCtx(()=>[o.renderSlot(P.$slots,"sign-up-header")]),"signup-fields":o.withCtx(({info:q})=>[o.renderSlot(P.$slots,"sign-up-fields",{info:q})]),footer:o.withCtx(()=>[o.renderSlot(P.$slots,"sign-up-footer")]),_:3},512)):o.createCommentVNode("",!0)])):o.createCommentVNode("",!0),(uo=o.unref(h))!=null&&uo.matches("confirmSignUp")?(o.openBlock(),o.createBlock(jr,{key:2,onConfirmSignUpSubmit:ee,ref_key:"confirmSignUpComponent",ref:C},{confirmSignUpSlotI:o.withCtx(()=>[o.renderSlot(P.$slots,"confirm-sign-up")]),header:o.withCtx(()=>[o.renderSlot(P.$slots,"confirm-sign-up-header")]),footer:o.withCtx(({onConfirmSignUpSubmit:q,onLostCodeClicked:Q})=>[o.renderSlot(P.$slots,"confirm-sign-up-footer",{onConfirmSignUpSubmit:q,onLostCodeClicked:Q})]),_:3},512)):o.createCommentVNode("",!0),(co=o.unref(h))!=null&&co.matches("resetPassword")?(o.openBlock(),o.createBlock(Xr,{key:3,onResetPasswordSubmit:ze,ref_key:"resetPasswordComponent",ref:T},{resetPasswordSlotI:o.withCtx(()=>[o.renderSlot(P.$slots,"reset-password")]),header:o.withCtx(()=>[o.renderSlot(P.$slots,"reset-password-header")]),footer:o.withCtx(({onResetPasswordSubmit:q,onBackToSignInClicked:Q})=>[o.renderSlot(P.$slots,"reset-password-footer",{onResetPasswordSubmit:q,onBackToSignInClicked:Q})]),_:3},512)):o.createCommentVNode("",!0),(lo=o.unref(h))!=null&&lo.matches("confirmResetPassword")?(o.openBlock(),o.createBlock(eo,{key:4,onConfirmResetPasswordSubmit:ie,ref_key:"confirmResetPasswordComponent",ref:$},{confirmResetPasswordSlotI:o.withCtx(()=>[o.renderSlot(P.$slots,"confirm-reset-password")]),header:o.withCtx(()=>[o.renderSlot(P.$slots,"confirm-reset-password-header")]),footer:o.withCtx(({onConfirmResetPasswordSubmit:q,onLostYourCodeClicked:Q})=>[o.renderSlot(P.$slots,"confirm-reset-password-footer",{onConfirmResetPasswordSubmit:q,onLostYourCodeClicked:Q})]),_:3},512)):o.createCommentVNode("",!0),(fo=o.unref(h))!=null&&fo.matches("confirmSignIn")?(o.openBlock(),o.createBlock(Hr,{key:5,onConfirmSignInSubmit:dt,ref_key:"confirmSignInComponent",ref:A},{confirmSignInSlotI:o.withCtx(()=>[o.renderSlot(P.$slots,"confirm-sign-in")]),header:o.withCtx(()=>[o.renderSlot(P.$slots,"confirm-sign-in-header")]),footer:o.withCtx(({onConfirmSignInSubmit:q,onBackToSignInClicked:Q})=>[o.renderSlot(P.$slots,"confirm-sign-in-footer",{onConfirmSignInSubmit:q,onBackToSignInClicked:Q})]),_:3},512)):o.createCommentVNode("",!0),((po=o.unref(h))==null?void 0:po.matches("setupTOTP.edit"))||((mo=o.unref(h))==null?void 0:mo.matches("setupTOTP.submit"))?(o.openBlock(),o.createBlock(Nb,{key:6,onConfirmSetupTotpSubmit:ft,ref_key:"confirmSetupTOTPComponent",ref:N},{confirmSetupTOTPI:o.withCtx(()=>[o.renderSlot(P.$slots,"setup-totp")]),header:o.withCtx(()=>[o.renderSlot(P.$slots,"setup-totp-header")]),footer:o.withCtx(({onSetupTOTPSubmit:q,onBackToSignInClicked:Q})=>[o.renderSlot(P.$slots,"setup-totp-footer",{onSetupTOTPSubmit:q,onBackToSignInClicked:Q})]),_:3},512)):o.createCommentVNode("",!0),(ho=o.unref(h))!=null&&ho.matches("forceNewPassword")?(o.openBlock(),o.createBlock(Qr,{key:7,onForceNewPasswordSubmit:X,ref_key:"forceNewPasswordComponent",ref:k},{forceNewPasswordI:o.withCtx(()=>[o.renderSlot(P.$slots,"force-new-password")]),header:o.withCtx(()=>[o.renderSlot(P.$slots,"force-new-password-header")]),"force-new-password-form-fields":o.withCtx(()=>[o.renderSlot(P.$slots,"force-new-password-form-fields")]),footer:o.withCtx(({onHaveAccountClicked:q,onForceNewPasswordSubmit:Q})=>[o.renderSlot(P.$slots,"force-new-password-footer",{onForceNewPasswordSubmit:Q,onBackToSignInClicked:q})]),_:3},512)):o.createCommentVNode("",!0),(go=o.unref(h))!=null&&go.matches("verifyUser")?(o.openBlock(),o.createBlock(to,{key:8,onVerifyUserSubmit:Ka,ref_key:"verifyUserComponent",ref:U},{verifyUserSlotI:o.withCtx(()=>[o.renderSlot(P.$slots,"verify-user")]),header:o.withCtx(()=>[o.renderSlot(P.$slots,"verify-user-header")]),footer:o.withCtx(({onVerifyUserSubmit:q,onSkipClicked:Q})=>[o.renderSlot(P.$slots,"verify-user-footer",{onVerifyUserSubmit:q,onSkipClicked:Q})]),_:3},512)):o.createCommentVNode("",!0),(vo=o.unref(h))!=null&&vo.matches("confirmVerifyUser")?(o.openBlock(),o.createBlock(no,{key:9,onConfirmVerifyUserSubmit:qa,ref_key:"confirmVerifyUserComponent",ref:O},{confirmVerifyUserSlotI:o.withCtx(()=>[o.renderSlot(P.$slots,"confirm-verify-user")]),header:o.withCtx(()=>[o.renderSlot(P.$slots,"confirm-verify-user-header")]),footer:o.withCtx(({onConfirmVerifyUserSubmit:q,onSkipClicked:Q})=>[o.renderSlot(P.$slots,"confirm-verify-user-footer",{onConfirmVerifyUserSubmit:q,onSkipClicked:Q})]),_:3},512)):o.createCommentVNode("",!0)],8,Ob),o.renderSlot(P.$slots,"footer")])],16,xb)):o.createCommentVNode("",!0),(yo=o.unref(w))!=null&&yo.matches("authenticated")?o.renderSlot(P.$slots,"default",{key:1,user:ro.value,state:o.unref(w),signOut:oo.value,send:o.unref(S)}):o.createCommentVNode("",!0)],64)}}}),Ha=o.defineComponent({props:{info:{type:Object}},setup(e){return()=>e.info}}),Wa=o.defineComponent({__name:"amplify-text-field",props:{label:{default:""},id:{default:""},autocomplete:{default:""},placeholder:{default:""},required:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},name:{default:""},type:{default:"text"},hideLabel:{type:Boolean,default:!0}},setup(e){const t=e,{label:n,id:r,autocomplete:i,placeholder:a,required:s,name:u,type:c}=o.toRefs(t);return(l,d)=>{const p=yn,f=wn,m=oe;return o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createVNode(p,{class:o.normalizeClass(["amplify-label",{"amplify-visually-hidden":e.hideLabel}]),for:o.unref(r)},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(n)),1)]),_:1},8,["class","for"]),o.createVNode(m,{class:"amplify-field-group__field-wrapper"},{default:o.withCtx(()=>[o.createVNode(f,{class:"amplify-input amplify-field-group__control",id:o.unref(r),"aria-invalid":"false",autocomplete:o.unref(i),placeholder:o.unref(a),required:o.unref(s),name:o.unref(u),disabled:e.disabled,type:o.unref(c)},null,8,["id","autocomplete","placeholder","required","name","disabled","type"])]),_:1})],64)}}}),Rb={class:"amplify-flex amplify-field amplify-checkboxfield"},Bb={class:"amplify-flex amplify-checkbox"},Vb={class:"amplify-visually-hidden"},Fb=["data-error","data-checked"],Mb=["data-checked"],Db=o.createElementVNode("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"},null,-1),Lb=[Db],zb=o.createElementVNode("span",{class:"amplify-text amplify-checkbox__label"}," I agree with the Terms & Conditions",-1),Gb={key:0,class:"amplify-text amplify-field__error-message"},Ya=o.defineComponent({__name:"amplify-check-box",props:{errorMessage:{default:""}},setup(e){const t=e,n=o.ref(!1),{errorMessage:r}=o.toRefs(t);return(i,a)=>(o.openBlock(),o.createElementBlock("div",Rb,[o.createElementVNode("label",Bb,[o.createElementVNode("span",Vb,[o.createElementVNode("input",{onClick:a[0]||(a[0]=s=>n.value=!n.value),class:"amplify-input amplify-field-group__control amplify-checkbox__input","aria-invalid":"false",type:"checkbox",name:"acknowledgement",value:"yes"})]),o.createElementVNode("span",{class:o.normalizeClass(["amplify-flex amplify-checkbox__button",{"amplify-checkbox__button--error":!n.value}]),"aria-hidden":"true","data-focus":"false","data-error":!n.value,"data-checked":n.value},[(o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",class:o.normalizeClass(["amplify-icon amplify-checkbox__icon",{"amplify-checkbox__icon--checked":n.value}]),viewBox:"0 0 24 24",fill:"currentColor","data-checked":n.value},Lb,10,Mb))],10,Fb),zb]),n.value?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("p",Gb,o.toDisplayString(o.unref(r)),1))]))}});var jb={install:e=>{e.component("SignIn",Lr),e.component("SignUp",Gr),e.component("FederatedSignIn",vn),e.component("Authenticator",ja),e.component("RenderInfo",Ha),e.component("PasswordControl",Dr),e.component("ForceNewPassword",Qr),e.component("ResetPassword",Xr),e.component("ConfirmResetPassword",eo),e.component("ConfirmSignUp",jr),e.component("ConfirmSignIn",Hr),e.component("VerifyUser",to),e.component("ConfirmVerifyUser",no),e.component("AmplifyTextField",Wa),e.component("AmplifyCheckBox",Ya),e.component("AmplifyButton",ce),e.component("BaseFormField",Ia),e.component("BaseFormFields",Pe),e.component("AuthenticatorSignUpFormFields",zr),e.component("AuthenticatorForceNewPasswordFormFields",Zr)}};exports.AmplifyButton=ce;exports.AmplifyCheckBox=Ya;exports.AmplifyTextField=Wa;exports.Authenticator=ja;exports.AuthenticatorForceNewPasswordFormFields=Zr;exports.AuthenticatorSignUpFormFields=zr;exports.ConfirmResetPassword=eo;exports.ConfirmSignIn=Hr;exports.ConfirmSignUp=jr;exports.ConfirmVerifyUser=no;exports.FederatedSignIn=vn;exports.ForceNewPassword=Qr;exports.PasswordControl=Dr;exports.RenderInfo=Ha;exports.ResetPassword=Xr;exports.SignIn=Lr;exports.SignUp=Gr;exports.VerifyUser=to;exports.default=jb;exports.translations=nw;exports.useAuthenticator=le;
package/dist/index.js CHANGED
@@ -11114,7 +11114,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
11114
11114
  };
11115
11115
  }
11116
11116
  });
11117
- const VERSION = "3.1.7";
11117
+ const VERSION = "3.1.8";
11118
11118
  const _hoisted_1$1 = ["data-variation"];
11119
11119
  const _hoisted_2$1 = { "data-amplify-container": "" };
11120
11120
  const _hoisted_3$1 = ["data-amplify-router-content"];
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "3.1.7";
1
+ export declare const VERSION = "3.1.8";
2
2
  //# sourceMappingURL=version.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-amplify/ui-vue",
3
- "version": "3.1.7",
3
+ "version": "3.1.8",
4
4
  "type": "module",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",
@@ -34,7 +34,7 @@
34
34
  "test:unit:watch": "jest --watch"
35
35
  },
36
36
  "dependencies": {
37
- "@aws-amplify/ui": "5.5.4",
37
+ "@aws-amplify/ui": "5.5.5",
38
38
  "@vue/tsconfig": "^0.1.3",
39
39
  "@vueuse/core": "7.5.5",
40
40
  "@xstate/vue": "0.8.1",