PageSourceSearch

https://textiaa.com/chunk-H5ODDMZM.js

js textiaa.com collected 2026-10-02 00:08:30 UTC 6,049 bytes, 1 lines download raw bytes

1import{a as z,b as ie}from"./chunk-274OYHOQ.js";import"./chunk-DFPAUOHB.js";import{A as Q,C as X,c as G,k as K,p as J}from"./chunk-PXI4RNCT.js";import{a as y,b as te}from"./chunk-KXNDLGYE.js";import{f as w,h as O,i as V,m as H,n as W}from"./chunk-MJC7NEL7.js";import"./chunk-G7CCAZ6K.js";import{b as F,c as q,e as Y,f as j}from"./chunk-P2NB64WX.js";import{G as D,M as ee}from"./chunk-H3JKYH2Z.js";import{Da as $,Dc as C,Ec as E,Fc as k,H as B,Jc as N,Ob as c,Pb as m,Pc as r,Qc as l,Rc as R,Ub as U,Vb as a,Wb as n,_ as x,cc as T,ea as M,fa as f,gc as L,hb as t,ic as g,lb as v,mb as S,qa as u,uc as P,ud as A,vb as I,xc as s,yc as p,zc as h}from"./chunk-6ZKZEUGL.js";import{e as Z}from"./chunk-J6LPXIX4.js";function re(i,b){i&1&&(a(0,"div",2),s(1),r(2,"translate"),n()),i&2&&(t(),h(" ",l(2,1,"UNSUB.LOADING")," "))}function oe(i,b){if(i&1&&(a(0,"div",2)(1,"h1",4),s(2),r(3,"translate"),n(),a(4,"p",5),s(5),n()()),i&2){let e=g();t(2),p(l(3,2,"UNSUB.ERROR_TITLE")),t(3),p(e.errorMsg())}}function se(i,b){i&1&&(a(0,"div",8),s(1),r(2,"translate"),n()),i&2&&(t(),h(" ",l(2,1,"UNSUB.ALREADY")," "))}function le(i,b){i&1&&(a(0,"p",14),s(1),r(2,"translate"),n()),i&2&&(t(),h(" ",R(2,1,"UNSUB.REASON_MIN",N(4,ne))," "))}function de(i,b){i&1&&(a(0,"p",15),s(1),r(2,"translate"),n()),i&2&&(t(),h(" ",l(2,1,"UNSUB.REASON_HINT")," "))}function pe(i,b){if(i&1){let e=T();a(0,"div",2)(1,"h1",6),s(2),r(3,"translate"),n(),a(4,"p",7),s(5),r(6,"translate"),n(),c(7,se,3,3,"div",8),a(8,"div",9)(9,"label",10),s(10),r(11,"translate"),n(),a(12,"div",11)(13,"input",12),r(14,"translate"),k("ngModelChange",function(o){M(e);let _=g();return E(_.email,o)||(_.email=o),f(o)}),n(),v(),n()(),a(15,"div",9)(16,"label",10),s(17),r(18,"translate"),n(),a(19,"div",11)(20,"textarea",13),r(21,"translate"),k("ngModelChange",function(o){M(e);let _=g();return E(_.reason,o)||(_.reason=o),f(o)}),n(),v(),n(),c(22,le,3,5,"p",14),c(23,de,3,3,"p",15),n(),a(24,"div",16)(25,"button",17),L("click",function(){M(e);let o=g();return f(o.confirm())}),s(26),r(27,"translate"),n()()()}if(i&2){let e=g();t(2),p(l(3,17,"UNSUB.TITLE")),t(3),p(l(6,19,"UNSUB.INTRO")),t(2),m(e.alreadyUnsub()?7:-1),t(3),p(l(11,21,"UNSUB.EMAIL")),t(3),C("ngModel",e.email),U("placeholder",l(14,23,"UNSUB.EMAIL_PLACEHOLDER"))("disabled",e.alreadyUnsub()||e.submitting()),S(),t(4),p(l(18,25,"UNSUB.REASON")),t(3),C("ngModel",e.reason),U("placeholder",l(21,27,"UNSUB.REASON_PLACEHOLDER"))("disabled",e.alreadyUnsub()||e.submitting()),S(),t(2),m(!e.alreadyUnsub()&&e.reasonTouched()&&!e.isReasonValid(e.reason)?22:-1),t(),m(e.alreadyUnsub()?-1:23),t(2),P("is-loading",e.submitting()),U("disabled",e.alreadyUnsub()||e.submitting()||!e.isEmailValid(e.email)||!e.isReasonValid(e.reason)),t(),h(" ",l(27,29,"UNSUB.CONFIRM")," ")}}function ce(i,b){if(i&1&&(a(0,"div",3)(1,"h1",6),s(2),r(3,"translate"),n(),a(4,"p",7),s(5),n(),a(6,"a",18),r(7,"langLink"),s(8),r(9,"translate"),n()()),i&2){let e=g();t(2),p(l(3,4,"UNSUB.DONE_TITLE")),t(3),p(e.doneMsg()),t(),U("routerLink",l(7,6,N(10,ae))),t(2),p(l(9,8,"UNSUB.BACK_HOME"))}}var ne,ae,Ne,me=Z(()=>{A();W();ee();X();j();$();te();ie();A();W();X();j();ne=()=>({min:10}),ae=()=>[];Ne=(()=>{class i{route=x(w);router=x(O);http=x(D);i18n=x(F);state=u("loading");submitting=u(!1);alreadyUnsub=u(!1);errorMsg=u("");doneMsg=u("");reasonTouched=u(!1);token="";email="";reason="";ngOnInit(){if(this.token=this.route.snapshot.queryParamMap.get("token")||"",this.token||(this.token=sessionStorage.getItem("unsub_token")||""),!this.token){this.state.set("error"),this.errorMsg.set("Missing token");return}sessionStorage.setItem("unsub_token",this.token),this.router.navigate([],{relativeTo:this.route,queryParams:{},replaceUrl:!0}),this.http.get(`${y.apiUrl}/api/v1/marketing/unsubscribe/prefill`,{params:{token:this.token}}).subscribe({next:e=>{e?.locale&&this.i18n.use(e.locale),this.email=e.email||"",this.alreadyUnsub.set(!!e.already_unsub),this.state.set("form"),this.alreadyUnsub()&&(this.reason="")},error:e=>{this.state.set("error"),this.errorMsg.set(e?.error?.detail?.message||"Invalid token")}})}isEmailValid(e){let d=(e||"").trim();return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(d)}isReasonValid(e){return(e||"").trim().length>=10}confirm(){if(this.reasonTouched.set(!0),this.alreadyUnsub()||!this.isEmailValid(this.email)||!this.isReasonValid(this.reason))return;this.submitting.set(!0);let e={token:this.token,email:(this.email||"").trim(),reason:(this.reason||"").trim()};this.http.post(`${y.apiUrl}/api/v1/marketing/unsubscribe/confirm`,e).pipe(B(()=>this.submitting.set(!1))).subscribe({next:d=>{this.state.set("done"),this.doneMsg.set(d?.already_unsub?this.i18n.instant("UNSUB.DONE_ALREADY"):this.i18n.instant("UNSUB.DONE_SUCCESS"))},error:d=>{this.state.set("error"),d?.error?.detail?.code==="EMAIL_MISMATCH"?this.errorMsg.set(this.i18n.instant("UNSUB.EMAIL_MISMATCH")):this.errorMsg.set(d?.error?.detail?.message||"Error")}})}static \u0275fac=function(d){return new(d||i)};static \u0275cmp=I({type:i,selectors:[["app-marketing-unsubscribe-page"]],decls:6,vars:4,consts:[[1,"section"],[1,"container",2,"max-width","520px"],[1,"box"],[1,"box","has-text-centered"],[1,"title","is-5","mb
1-2"],[1,"has-text-grey"],[1,"title","is-4","mb-2"],[1,"has-text-grey","mb-4"],[1,"notification","is-warning","is-light"],[1,"field"],[1,"label"],[1,"control"],["type","email","autocomplete","email",1,"input",3,"ngModelChange","ngModel","placeholder","disabled"],["rows","4",1,"textarea",3,"ngModelChange","ngModel","placeholder","disabled"],[1,"help","is-danger"],[1,"help"],[1,"buttons","is-right"],[1,"button","is-link",3,"click","disabled"],[1,"button","is-light",3,"routerLink"]],template:function(d,o){d&1&&(a(0,"section",0)(1,"div",1),c(2,re,3,3,"div",2),c(3,oe,6,4,"div",2),c(4,pe,28,31,"div",2),c(5,ce,10,11,"div",3),n()()),d&2&&(t(2),m(o.state()==="loading"?2:-1),t(),m(o.state()==="error"?3:-1),t(),m(o.state()==="form"?4:-1),t(),m(o.state()==="done"?5:-1))},dependencies:[H,V,Q,G,K,J,Y,q,z],encapsulation:2,changeDetection:1})}return i})()});me();export{Ne as MarketingUnsubscribePage};

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.