PageSourceSearch

https://colorize.design/_nuxt/iQqBGzu6.js

js colorize.design collected 2026-10-02 00:36:49 UTC 7,310 bytes, 12 lines download raw bytes

1import{aE as u,aF as n,aG as d,aD as j,b8 as z,aZ as Y,aL as w,aX as $,a$ as H,aU as Z,aY as G,aJ as l,aI as a,aP as _,aK as g,aO as O,aM as T,aH as B}from"./BG-N6m6B.js";import{_ as k}from"./BKWlDV1M.js";import{_ as L}from"./6qLj-A2x.js";import{_ as A}from"./B-gjD2NV.js";import{S as J}from"./Cpob8lfB.js";import{_ as M}from"./B-0suzdd.js";import{_ as N}from"./CMUXeFXf.js";import{_ as K}from"./DhT-GmtU.js";import{_ as W}from"./mWTcujDP.js";import{t as x}from"./DJOCqQhR.js";import{u as X}from"./DbYc6fld.js";import{r as Q}from"./Cj35aU-p.js";import{r as ee}from"./yo6MAVuC.js";import"./C_kJGE1D.js";import"./DhTbjJlp.js";import"./C68PLvyD.js";import"./Cycp7d1Q.js";(function(){try{var c=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},i=new c.Error().stack;i&&(c._sentryDebugIds=c._sentryDebugIds||{},c._sentryDebugIds[i]="5f981c00-4e09-4da7-8177-333942b074b0",c._sentryDebugIdIdentifier="sentry-dbid-5f981c00-4e09-4da7-8177-333942b074b0")}catch{}})();function se(c,i){return n(),u("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[d("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M9 12.75 11.25 15 15 9.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"})])}const ae={class:"mb-6 text-center"},te={class:"flex justify-center"},re={key:0,class:"flex flex-col items-center gap-2 text-center",role:"status"},oe={key:1,class:"space-y-4 text-center",role:"alert"},le={key:2,class:"space-y-4 text-center",role:"status"},ne={key:0,class:"mt-2 text-xs text-red-400"},ie={key:1,class:"mt-2 text-xs text-emerald-400"},ue={key:0,class:"text-sm text-red-400",role:"alert"},Ve={__name:"reset-password",setup(c){j({script:[{innerHTML:`
2        window.$crisp=[];
3        window.CRISP_WEBSITE_ID="30d15fe3-fa17-4d3d-8eb6-f58560094f9f";
4        (function(){
5          d=document;
6          s=d.createElement("script");
7          s.src="https://client.crisp.chat/l.js";
8          s.async=1;
9          d.getElementsByTagName("head")[0].appendChild(s);
10        })();
11      `,type:"text/javascript"}]});const i=X(),b=z(),v=Y(),t=w(""),o=w(""),r=w(""),y=w(!1),P=w(!1),f=w(!1),p=w(!0),R=$(()=>({length:t.value.length>=8,uppercase:/[A-Z]/.test(t.value),lowercase:/[a-z]/.test(t.value),number:/\d/.test(t.value)})),S=$(()=>Object.values(R.value).every(s=>s));H([t,o],()=>{r.value&&(r.value="")}
11),Z(async()=>{var s;try{console.log("Route query params:",v.query),console.log("Route hash:",v.hash);const e=new URLSearchParams(((s=v.hash)==null?void 0:s.substring(1))||""),m=v.query.access_token||e.get("access_token"),h=v.query.refresh_token||e.get("refresh_token"),q=v.query.type||e.get("type");if(console.log("Found tokens:",{accessToken:!!m,refreshToken:!!h,type:q}),!m||!h||q!=="recovery"){console.error("Missing required reset parameters");const{data:{session:F}}=await i.auth.getSession();if(F){console.log("User already has valid session, allowing password reset"),f.value=!0,p.value=!1;return}console.error("No valid session and no reset tokens found"),f.value=!1,p.value=!1;return}console.log("Setting session with reset tokens...");const{data:U,error:E}=await i.auth.setSession({access_token:m,refresh_token:h});if(E||!U.session){console.error("Failed to set session with reset tokens:",E),f.value=!1,p.value=!1;return}console.log("Successfully set session from reset tokens");const{data:{user:C},error:I}=await i.auth.getUser();if(I||!C){console.error("Failed to get user after setting session:",I),f.value=!1,p.value=!1;return}console.log("Reset session validated successfully for user:",C.email),f.value=!0,p.value=!1;try{x("Password Reset Link Validated")}catch{}}catch(e){console.error("Error verifying reset session:",e),f.value=!1,p.value=!1}});async function D(){if(!S.value){r.value="Please ensure your password meets all requirements.";return}if(t.value!==o.value){r.value="Passwords do not match.";return}y.value=!0,r.value="";try{const{error:s}=await i.auth.updateUser({password:t.value});if(s)throw s.message.includes("same as the old password")?new Error("New password must be different from your current password."):s;console.log("Password updated successfully"),P.value=!0;try{x("Password Reset Successful")}catch{}}catch(s){console.error("Password reset error:",s),s.message.includes("invalid")||s.message.includes("expired")?r.value="Your reset session has expired. Please request a new password reset link.":s.message.includes("same as the old password")?r.value=s.message:r.value="Failed to reset password. Please try again or request a new reset link.";try{x("Password Reset Failed",{error:s.message})}catch{}}finally{y.value=!1}}function V(){b.push("/login")}return(s,e)=>(n(),G(W,null,{default:l(()=>[d("div",ae,[d("div",te,[a(A,{tone:"neutral",size:"lg"},{default:l(()=>[a(_(Q),{class:"size-6"})]),_:1})]),a(L,{as:"h1",size:"headline",class:"mt-4"},{default:l(()=>e[2]||(e[2]=[g("Reset Password")])),_:1}),e[3]||(e[3]=d("p",{class:"mt-2 text-gray-400"},"Enter your new password below",-1))]),p.value?(n(),u("div",re,[a(J,{class:"h-8 w-8 text-white"}),e[4]||(e[4]=d("p",{class:"text-gray-400"},"Verifying reset link...",-1))])):f.value?P.value?(n(),u("div",le,[a(_(se),{class:"mx-auto h-12 w-12 text-emerald-400","aria-hidden":"true"}),a(L,{size:"section"},{default:l(()=>e[8]||(e[8]=[g("Password reset successful!")])),_:1}),e[10]||(e[10]=d("p",{class:"text-gray-400"},"Your password has been updated. You can now use your new password to sign in.",-1)),a(k,{class:"w-full",onClick:V},{default:l(()=>e[9]||(e[9]=[g("Go to Login")])),_:1})])):(n(),u("form",{key:3,class:"space-y-4",onSubmit:O(D,["prevent"])},[a(N,{label:"New Password","label-for":"new-password"},{after:l(()=>[a(K,{checks:R.value},null,8,["checks"])]),default:l(()=>[a(M,{id:"new-password",modelValue:t.value,"onUpdate:modelValue":e[0]||(e[0]=m=>t.value=m),type:"password",autocomplete:"new-password",required:"",minlength:"8",placeholder:"••••••••",invalid:r.value!==""},null,8,["modelValue","invalid"])]),_:1}),a(N,{label:"Confirm Password","label-for":"confirm-password"},{after:l(()=>[o.value&&t.value!==o.value?(n(),u("p",ne," Passwords do not match ")):o.value&&t.value===o.value?(n(),u("p",ie," Passwords match ✓ ")):T("",!0)]),default:l(()=>[a(M,{id:"confirm-password",modelValue:o.value,"onUpdate:modelValue":e[1]||(e[1]=m=>o.value=m),type:"password",autocomplete:"new-password",required:"",minlength:"8",placeholder:"••••••••",invalid:r.value!==""||!!(o.value&&t.value!==o.value)}
11,null,8,["modelValue","invalid"])]),_:1}),r.value?(n(),u("p",ue,B(r.value),1)):T("",!0),a(k,{type:"submit",class:"w-full",disabled:y.value||!S.value||t.value!==o.value},{default:l(()=>[g(B(y.value?"Resetting password...":"Reset Password"),1)]),_:1},8,["disabled"])],32)):(n(),u("div",oe,[a(_(ee),{class:"mx-auto h-12 w-12 text-red-400","aria-hidden":"true"}),e[6]||(e[6]=d("h2",{class:"text-lg font-bold text-red-400"},"Invalid Reset Link",-1)),e[7]||(e[7]=d("p",{class:"text-gray-400"},"This password reset link is invalid, expired, or has already been used. Please request a new password reset link.",-1)),a(k,{class:"w-full",onClick:V},{default:l(()=>e[5]||(e[5]=[g("Back to Login")])),_:1})]))]),_:1}))}};export{Ve as default};
12//# sourceMappingURL=iQqBGzu6.js.map

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.