PageSourceSearch

https://app.block8.ai/chunk-IKDK6QD4.js

js block8.ai collected 2026-10-04 08:00:18 UTC 5,441 bytes, 1 lines download raw bytes

1import{m as w,n as b}from"./chunk-DFBXD4EB.js";import"./chunk-DEPMULF4.js";import"./chunk-D6TDBMOL.js";import"./chunk-7LP3Q4GZ.js";import"./chunk-4AIZZX5V.js";import"./chunk-OV4QHEK7.js";import"./chunk-6LC4PAQM.js";import{a as P,b as O}from"./chunk-USEFTKO2.js";import{b as C}from"./chunk-OB7V24K6.js";import"./chunk-F6A7KAIC.js";import"./chunk-JMMX3YFQ.js";import{a as I,b as A}from"./chunk-LG4KMTJV.js";import{a as V}from"./chunk-Y7JEYTBH.js";import{b as x}from"./chunk-XQUQOZUQ.js";import"./chunk-TJBMJ7BS.js";import"./chunk-ZM36TSXV.js";import{U as T}from"./chunk-VJSE6XD3.js";import"./chunk-JVPGR4LL.js";import{h as k,j as L}from"./chunk-UMIZEZZ3.js";import{Ba as h,Ha as m,Ic as _,Kc as M,Na as d,Q as o,Ta as v,Ya as a,Za as c,_a as f,cc as E,eb as y,ha as s,ma as g,qa as l,sc as S,tb as p}from"./chunk-FNZEYWFL.js";import"./chunk-KWVBUA6T.js";import"./chunk-7ACP62DS.js";function R(r,H){r&1&&(a(0,"div",5)(1,"div",6),f(2,"img",7),a(3,"h1",8),p(4,"Verifying Email"),c(),a(5,"p",9),p(6,"Please wait while we verify your email address"),c()()()),r&2&&(l(2),d("src","/assets/logo/B8_Shield-Magenta.svg",g))}function j(r,H){r&1&&(a(0,"div",4)(1,"div",10),f(2,"p-progressSpinner"),a(3,"p",11),p(4," Verifying your email... "),c()()())}var u={TOKEN_HASH:"token-hash",TYPE:"type",EMAIL:"email"},ie=(()=>{class r{route=o(_);router=o(M);supabase=o(L);authService=o(C);redirectService=o(k);isLoading=s(!0);errorMessage=s("");showExpiredMessage=s(!1);verificationType=s("invite");resendLoading=s(!1);resendSuccess=s(!1);userEmail=s(null);queryParams=x(this.route.queryParams,{initialValue:{}});verifiedTokenHash=null;constructor(){E(()=>{let e=this.queryParams();if(!e)return;let t=e[u.TOKEN_HASH],i=e[u.TYPE],n=e[u.EMAIL];n&&b(n)?this.userEmail.set(n):this.userEmail.set(null),this.verificationType.set(i?.toLowerCase()==="recovery"?"recovery":"invite"),t?this.verifiedTokenHash!==t&&(this.verifiedTokenHash=t,this.verifyToken(t,i)):(this.isLoading.set(!1),this.errorMessage.set("Missing verification token. Please check your email and try again."))})}async verifyToken(e,t){this.isLoading.set(!0),this.errorMessage.set(""),this.showExpiredMessage.set(!1);try{let{data:i,error:n}=await this.supabase.client.auth.verifyOtp({token_hash:e,type:"email"});if(n)throw n;if(!i.session)throw new Error("Failed to establish session");this.redirectService.toSetup()}catch(i){this.handleVerificationError(i)}finally{this.isLoading.set(!1)}}handleVerificationError(e){let t=this.getErrorMessage(e).toLowerCase();this.isExpiredOrInvalidError(t)?(this.showExpiredMessage.set(!0),this.errorMessage.set(this.getExpiredErrorMessage())):this.errorMessage.set("Failed to verify your email. Please try again or contact support.")}isExpiredOrInvalidError(e){return e.includes("expired")||e.includes("invalid")||e.includes("not found")}getExpiredErrorMessage(){return this.verificationType()==="recovery"?"This password reset link has expired or is invalid.":"This invitation link has expired or is invalid."}getErrorMessage(e){return e instanceof Error?e.message:String(e)}async resendLink(){let e=this.userEmail();if(!e){this.errorMessage.set("Email address not found. Please request a new link from the sender.");return}this.resendLoading.set(!0),this.resendSuccess.set(!1);try{this.verificationType()==="recovery"?await this.authService.resetPassword(e):await this.authService.resendVerificationLink(e)}catch{}finally{this.errorMessage.set(""),this.resendSuccess.set(!0),this.resendLoading.set(!1)}}navigateToLogin(){this.redirectService.toLogin()}static \u0275fac=function(t){return new(t||r)};static \u0275cmp=h({type:r,selectors:[["app-otp-verification"]],decls:6,vars:8,consts:[[1,"verify-container","flex","items-center","justify-center","min-h-screen","p-4"],[1,"w-full","max-w-md"],["pTemplate","header"],[3,"resendLink","navigateToLogin","errorMessage","showExpiredMessage","resendSuccess","resendLoading","userEmail","verificationType"],[1,"px-6","pb-6"],[1,"text-center","py-6","px-6"],[1,"flex","flex-col","items-center","mb-4"],["alt","B8 Client Portal",1,"h-12","w-auto","object-contain","mb-3",3,"src"],[1,"text-3xl","font-bold","mb-2"],[1,"text-gray-600","dark:text-gray-400"],[1,"flex","flex-col","items-center","justify-center","py-8"],[1,"text-center","text-gray-600","dark:text-gray-400","mt-4"]],template:function(t,i){t&1&&(a(0,"div",0)(1,"div",1)(2,"p-card"),m(3,R,7,1,"ng-template",2),a(4,"b8-otp-status-panel",3),y("resendLink",function(){return i.resendLink()})("navigateToLogin",function(){return i.navigateToLogin()}),c(),m(5,j,5,0,"div",4),c()()()),t&2&&(l(),d("@fadeIn",void 0),l(3),d("errorMessage",i.errorMessage())("showExpiredMessage",i.showExpiredMessage())("resendSuccess",i.resendSuccess())("resendLoading",i.resendLoading())("userEmail",i.userEmail())("verificationType",i.verificationType()),l(),v(i.isLoading()?5:-1))},dependencies:[S,O,P,T,A,I,w],styles:['.verify-container[_ngcontent-%COMP%]{background-image:url(/assets/images/background/login-background.jpg);background-size:cover;background-position:center;background-repeat:no-repeat;position:relative}.verify-container[_ngcontent-%COMP%]:before{content:"";position:absolute;inset:0;background-color:#0006;z-index:0}.verify-container[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{position:relative;z-index:1}@keyframes _ngcontent-%COMP%_fadeIn{0%{opacity:0}
1to{opacity:1}}'],data:{animation:[V]},changeDetection:0})}return r})();export{ie as OtpVerificationComponent};

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.