PageSourceSearch

https://open.marblework.app/_nuxt/xh7IVbem.js

js marblework.app collected 2026-10-02 00:26:35 UTC 3,840 bytes, 1 lines download raw bytes

1import{z as I,u as A,ad as M,a9 as D,A as L,o as m,b as w,d as i,t as d,g as t,e as a,f as R,h as y,w as r,s as T,F as j,c as z,C as E,v as N,D as G,a5 as H,x as n,G as O}from"./B0mNtK3X.js";import{_ as J}from"./B1cd7YQN.js";import{_ as K}from"./BrVOXIBz.js";import{_ as Q}from"./B6ftWAWB.js";import{_ as W}from"./D0jBudSu.js";import"./B2iP2pzw.js";import"./h8CpXX5r.js";import"./32Bqtcn_.js";import"./AvbMIwz1.js";import"./fITo8g8I.js";import"./CYkDGJwY.js";import"./Dp3dgQIK.js";import"./BEP62XWZ.js";const X={class:"text-lg font-semibold mb-4"},Y={key:0,class:"flex items-center gap-2 text-sm text-secondary-500 font-semibold py-4"},Z={key:1},ee={class:"flex items-center gap-1.5 justify-between w-full"},te={class:"shrink-0"},se={class:"mt-4 text-center text-sm"},ye={__name:"index",setup(ae){const x=I(),{t:h}=A(),v=M(),b=D(),g=n(!1),u=n(""),c=n(""),p=n(""),_=n(!1),f=n(!1),$=n(!1),k=n(!1),V=n(!1);L(async()=>{const e=b.query.token_hash,s=b.query.code;if(!(!e&&!s)){k.value=!0;try{if(e){const{error:o}=await v.auth.verifyOtp({type:String(b.query.type||"recovery"),token_hash:String(e)});if(o)throw o}else if(s){const{error:o}=await v.auth.exchangeCodeForSession(String(s));if(o)throw o}}catch{V.value=!0}finally{k.value=!1}}});async function q(){if(!$.value){u.value=h("auth.password_strength.title");return}if(c.value!==p.value){u.value=h("auth.reset_password.passwords_mismatch");return}g.value=!0,u.value="";try{const{error:e}=await v.auth.updateUser({password:c.value});if(e)throw e;O("/")}catch(e){u.value=e.code==="same_password"?h("auth.reset_password.same_password"):e.message}finally{g.value=!1}}return(e,s)=>{const o=R,S=J,C=T,B=K,P=Q,U=W,F=H;return m(),w("div",null,[i("h2",X,d(e.$t("auth.reset_password.set_title")),1),t(k)?(m(),w("div",Y,[a(o,{name:"i-lucide-loader-circle",class:"w-5 h-5 animate-spin"}),y(" "+d(e.$t("auth.reset_password.verifying")),1)])):t(V)?(m(),w("div",Z,[a(S,{color:"primary",title:e.$t("auth.reset_password.link_invalid"),class:"mb-4"},null,8,["title"]),a(C,{to:t(x)("auth-login"),color:"secondary",block:""},{default:r(()=>[y(d(e.$t("auth.reset_password.back_link")),1)]),_:1},8,["to"])])):(m(),w(j,{key:2},[t(u)?(m(),z(S,{key:0,color:"primary",title:t(u),class:"mb-4"},null,8,["title"])):E("",!0),i("form",{class:"space-y-4",onSubmit:G(q,["prevent"])},[a(U,{class:"mo-label-full"},{label:r(()=>[i("p",ee,[i("span",te,d(e.$t("auth.reset_password.new_password_label")),1),a(B,{password:t(c),onValid:s[0]||(s[0]=l=>$.value=l)},null,8,["password"])])]),default:r(()=>[a(P,{modelValue:t(c),"onUpdate:modelValue":s[2]||(s[2]=l=>N(c)?c.value=l:null),type:t(_)?"text":"password",required:"",class:"w-full mo-pw-input"},{trailing:r(()=>[i("button",{type:"button",tabindex:"-1",class:"flex items-center px-1 text-secondary-500 hover:text-secondary-600",onClick:s[1]||(s[1]=l=>_.value=!t(_))},[a(o,{name:t(_)?"mosy:eye-closed":"mosy:eye",class:"w-5 h-5"},null,8,["name"])])]),_:1},8,["modelValue","type"])]),_:1}),a(U,{label:e.$t("auth.reset_password.confirm_password_label")},{default:r(()=>[a(P,{modelValue:t(p),"onUpdate:modelValue":s[4]||(s[4]=l=>N(p)?p.value=l:null),type:t(f)?"text":"password",required:"",class:"w-full mo-pw-input"},{trailing:r(()=>[i("button",{type:"button",tabindex:"-1",class:"flex items-center px-1 text-secondary-500 hover:text-secondary-600",onClick:s[3]||(s[3]=l=>f.value=!t(f))},[a(o,{name:t(f)?"mosy:eye-closed":"mosy:eye",class:"w-5 h-5"},null,8,["name"])])]),_:1},8,["modelValue","type"])]),_:1},8,["label"]),a(C,{type:"submit",color:"secondary",block:"",loading:t(g)},{default:r(()=>[y(d(e.$t("auth.reset_password.set_submit")),1)]),_:1},8,["loading"])],32),i("div",se,[a(F,{to:t(x)("auth-login"),class:"text-secondary-500 font-semibold hover:underline"},{default:r(()=>[y(d(e.$t("auth.reset_password.back_link")),1)]),_:1},8,["to"])])],64))])}}};export{ye as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.