PageSourceSearch

https://settervc.com/chunk-ZSGB7T2Q.js

js settervc.com collected 2026-10-04 23:24:25 UTC 3,333 bytes, 1 lines download raw bytes

1import{a as h}from"./chunk-6J5JTFV2.js";import{a as v}from"./chunk-2ANG7TAT.js";import{a as p}from"./chunk-G6I2D373.js";import{a as k}from"./chunk-JVBUAMIJ.js";import{g}from"./chunk-NUG4NLCC.js";import{b as f}from"./chunk-QXJRVASH.js";import{$ as o,C as a,V as m,l as i,p as d,q as s}from"./chunk-NFC623GS.js";import{a as n,f as c}from"./chunk-2JUNNXD7.js";var w="currentUserObject",F=(()=>{let r=class r{constructor(){this.ssrService=o(k),this.http=o(f),this.transferState=o(g),this.toastService=o(v),this.user=new h,this.urlApi=this.ssrService.generateAPIURL("/auth")}isLoggedIn(){return c(this,null,function*(){return this.user=yield d(this.getCurrentUser()),!!this.user._id.length})}getCurrentUser(t=!0){return this.user._id?.length?i(this.user):this.ssrService.isFrontEnd()&&t?(this.user=this.transferState.get(w,this.user),i(this.user)):this.http.get(`${this.urlApi}/user`).pipe(s(e=>(this.user=e.data.user,this.ssrService.isBackEnd()&&this.transferState.set(w,this.user),this.user)),a(e=>(console.error("[Error user request]"),i(new h))))}authenticateUser(t,e){return this.http.post(`${this.urlApi}/login`,{email:t,password:e}).pipe(s(l=>(l.data?.messages?.length||this.toastService.showToast("You are successfully logged in"),l.data?.messages??[])))}sendPasswordlessCode(t){return this.http.post(`${this.urlApi}/passwordless/send-code`,{email:t}).pipe(s(e=>(e.status===p.success&&this.toastService.showToast("Login code sent, check your email!"),e)))}verifyPasswordlessCode(t){return this.http.post(`${this.urlApi}/passwordless/verify-code`,n({},t)).pipe(s(e=>(e.data?.messages?.length||this.toastService.showToast("You are successfully logged in"),e.data?.messages??[])))}getLinkedEmails(){return this.http.get(`${this.urlApi}/linked-emails`).pipe(s(t=>t.data?.linked_emails??[]))}addLinkedEmail(t){return this.http.post(`${this.urlApi}/linked-emails/add`,{email:t}).pipe(s(e=>e.data?.messages??[]))}confirmLinkedEmail(t){return this.http.post(`${this.urlApi}/linked-emails/confirm`,n({},t)).pipe(s(e=>e.data?.messages??[]))}removeLinkedEmail(t){return this.http.post(`${this.urlApi}/linked-emails/remove`,{email:t})}logout(){return this.http.post(`${this.urlApi}/logout`,{}).pipe(s(t=>(this.toastService.showToast("You are successfully logged out"),window.location.href="/",t.data)))}sendResetPasswordLink(t){return this.http.post(`${this.urlApi}/send-reset-email`,{email:t}).pipe(s(e=>e.status===p.success?(this.toastService.showToast("Email link successfully sent!"),[]):e.data?.messages??[]),a(()=>i(["We could not reach the server. Please check your connection and try again."])))}updateUserPassword(t){return this.http.post(`${this.urlApi}/update-user-password`,n({},t)).pipe(s(e=>({action:e?.data?.action??"failed",messages:e?.data?.messages??[]})),a(()=>i({action:"failed",messages:["We could not reach the server. Please check your connection and try again."]})))}getResetPassStatusLink(t){return this.http.post(`${this.urlApi}/reset-password-link-status`,{hash:t}).pipe(s(e=>e.data?.link_status?.length?e.data:{first_name:"",link_status:"expired"}),a(()=>i({first_name:"",link_status:"unreachable"})))}visit(){return this.http.get(`${this.urlApi}/visit`).pipe(s(t=>t))}};r.\u0275fac=function(e){return new(e||r)},r.\u0275prov=m({token:r,factory:r.\u0275fac,providedIn:"root"});let u=r;return u})();export{F as a};

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.