(globalThis.webpackChunk=globalThis.webpackChunk||[]).push([[9689],{859689(__unused_webpack_module,__webpack_exports__,__webpack_require__){(function(){if(!this.ST)return()=>{};with(this.ST)with(this.RH)with(this.G)return function(){"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{"default":()=>S});var e=__webpack_require__(860012);var t=__webpack_require__(48084);var a=__webpack_require__(107495);var r=__webpack_require__(556734);var s=__webpack_require__(789292);var i=__webpack_require__(568894);var n=__webpack_require__(126528);var l=__webpack_require__(466770);var o=__webpack_require__(779865);var u=__webpack_require__(423533);var d=__webpack_require__(917214);var c=__webpack_require__(709723);var f=__webpack_require__(518176);var p=__webpack_require__(836658);var v=__webpack_require__(277315);var g=__webpack_require__(480021);var y=__webpack_require__(959588);var m=__webpack_require__(79222);var h=__webpack_require__(507475);var w=__webpack_require__(880909);var P=__webpack_require__(682988);var k=__webpack_require__(667855);var b=__webpack_require__(749201);var C=__webpack_require__(649597);let E=5*w.Z2;function S(){let w=(0,a.Zp)();let S=(0,b.w)();let T=(0,C.B)();let _=(0,d.P)();let F=_((0,v.vn)());let{trackEvent:x,createEventBuilder:D}=(0,f.s)();let R=(0,t.d4)(k.NY0);let[Z,B]=(0,e.useState)("");let[O,L]=(0,e.useState)(!1);let[N,M]=(0,e.useState)(!1);(0,e.useEffect)(()=>()=>{(0,v.B0)()},[]),(0,e.useEffect)(()=>{!R&&w(u.XR,{replace:!0})},[R,w]);let V=()=>{B(""),(0,c.vv)(()=>w(u.XR,{replace:!0}))};let Y=async()=>{M(!0),L(!1);try{try{await (0,m.BEp)(Z)}catch{L(!0);return}let t=Date.now();let a={verification_method:"password"};x(D(P.gP.PasskeyTurnOff).addCategory(P.FZ.Settings).addProperties({...a,status:"started"}).build());try{await T(Z),await (0,m.hmH)(S),x(D(P.gP.PasskeyTurnOff).addCategory(P.FZ.Settings).addProperties({...a,status:"completed",duration_ms:Date.now()-t}).build()),h.oR.success(e.createElement(h.pi,{title:_("passkeyTurnedOff",[F])}),{duration:E}),x(D(P.gP.SettingsUpdated).addCategory(P.FZ.Settings).addProperties({settings_group:"security_privacy",settings_type:"passkey",old_value:!0,new_value:!1}).build()),V()}catch(i){let r=Date.now()-t;let s=(0,y.y2)(i);x(D(P.gP.PasskeyTurnOff).addCategory(P.FZ.Settings).addProperties({...a,status:"failed",duration_ms:r,reason:s}).build()),(0,g.Cp)((0,p.sV)("Passkey turn off in settings failed",i),{extra:{verificationMethod:"password",durationMs:r,errorCode:s}}),h.oR.error(e.createElement(h.pi,{title:_("turnOffPasskeyFailed",[F])}),{duration:E}),V()}}finally{M(!1)}};return!R?null:(0,e.createElement(n.a,{flexDirection:r.uV.Column,justifyContent:r.TE.Start,alignItems:r.RE.Stretch,gap:6,padding:4,className:"h-full min-h-0"},e.createElement(n.a,{flexDirection:r.uV.Column,gap:6,justifyContent:r.TE.Between,asChild:!0,className:"min-h-0 shrink-0"},e.createElement("form",{onSubmit:e=>{e.preventDefault(),Y()}},e.createElement(o.YJ,{id:"turn-off-passkey-current-password",label:_("enterPasswordCurrent"),textFieldProps:{type:o.ux.Password},size:o.dY.Lg,labelProps:{marginBottom:1},inputProps:{autoFocus:!0,"data-testid":"turn-off-passkey-password-input"},value:Z,error:O,helpText:O?_("unlockPageIncorrectPassword"):null,onChange:e=>{B(e.target.value),L(!1)}}),e.createElement(l.$,{type:"submit",variant:s.A.Primary,size:i.Mp.Lg,className:"w-full","data-testid":"turn-off-passkey-verify-continue-button",disabled:!Z||N||O,isLoading:N},_("continue"))))))}}}).call(__webpack_require__._LM_("$root$",{__webpack_require__,__webpack_exports__}))()}}]);