PageSourceSearch

https://www.colete-online.ro/chunk-KHN6GBIW.js

js colete-online.ro collected 2026-09-24 20:00:20 UTC 8,196 bytes, 1 lines download raw bytes

1import{a as b}from"./chunk-KLAIAL3S.js";import{b as ie}from"./chunk-WT5GHHAG.js";import{a as te}from"./chunk-FMNCR2E4.js";import{d as $,e as ee}from"./chunk-LXZTZ6A4.js";import"./chunk-CUM6AWQD.js";import{a as Z}from"./chunk-6TABHP4O.js";import{b as X,h as Y}from"./chunk-ODANYP7M.js";import"./chunk-7CLWGA3D.js";import{c as Q,e as W}from"./chunk-LE7K3GHI.js";import"./chunk-YRTY54OE.js";import"./chunk-ZX3ZYYTK.js";import"./chunk-6D4JGN6M.js";import{a as g}from"./chunk-4NNR5J5O.js";import{b as K}from"./chunk-PHAO6YSN.js";import"./chunk-BYXBJQAS.js";import"./chunk-F7IL47ET.js";import{d as G}from"./chunk-6GXMZG2I.js";import"./chunk-BZQJSSRO.js";import"./chunk-UDJHM3P4.js";import"./chunk-SLGZKKBM.js";import"./chunk-2WPGEEIE.js";import{a as J,b as L,c as H}from"./chunk-3DMLEZ62.js";import{F as q,c as F,e as _,h as D,i as R,l as z,n as B,q as U}from"./chunk-7PYU3A46.js";import{b as V}from"./chunk-WB43UHRF.js";import"./chunk-IZ4YHXTR.js";import"./chunk-VGZYRH5G.js";import"./chunk-KKTQX6AJ.js";import"./chunk-FF5ENLCG.js";import"./chunk-ZOHA6DHZ.js";import{n as j}from"./chunk-ADKLWNOB.js";import{E as k,l as A,z as T}from"./chunk-5MARSSKM.js";import{Bb as O,Hc as r,Ic as C,Jc as S,Qa as P,Wb as a,Xc as N,Yb as s,bc as u,cc as o,dc as i,ec as f,la as w,lb as n,lc as E,qc as I,sa as v,sc as d,ta as M,ub as p,ya as y}from"./chunk-N53UFIN2.js";import"./chunk-2BLP5COT.js";var oe=t=>({elementToFadeOut:t});function re(t,l){t&1&&(o(0,"mat-error"),r(1," Adresa de email nu este valida "),i())}function ae(t,l){t&1&&(o(0,"mat-error"),r(1," Adresa de email este obligatorie "),i())}function se(t,l){if(t&1){let e=E();o(0,"div",3)(1,"div",5)(2,"p",6)(3,"strong"),r(4,"Aboneaza-te la newsletter"),i()(),f(5,"br"),o(6,"p"),r(7,"Daca vreti sa aflati ultimele noutati, inregistrati-va la newsletter-ul Colete-Online! "),i()(),o(8,"div",7)(9,"form",8)(10,"mat-form-field",9),f(11,"input",10),a(12,re,2,0,"mat-error"),a(13,ae,2,0,"mat-error"),i(),o(14,"button",11),I("click",function(){v(e);let m=d(2);return M(m.subscribeNewsletter())}),r(15),i()()()()}if(t&2){let e=d(2);u("ngClass",N(6,oe,e.playAnimation===!0)),n(11),u("formControl",e.newsletterEmail),n(),s(!e.newsletterEmail.valid&&!e.newsletterEmail.hasError("required")?12:-1),n(),s(e.newsletterEmail.hasError("required")?13:-1),n(),u("disabled",e.disableButton()),n(),S("",e.subscribeMessage," ")}}function le(t,l){if(t&1&&(o(0,"app-notice",13)(1,"p",15),r(2),i()()),t&2){let e=d(3);n(2),C(e.message)}}function ce(t,l){if(t&1&&(o(0,"app-notice",14)(1,"p",15),r(2),i()()),t&2){let e=d(3);n(2),C(e.message)}}function de(t,l){t&1&&(f(0,"br"),o(1,"h2"),r(2,"Iti Multumim!"),i())}function me(t,l){if(t&1&&(o(0,"div",4)(1,"div",12),a(2,le,3,1,"app-notice",13)(3,ce,3,1,"app-notice",14),a(4,de,3,0),i()()),t&2){let e=d(2);n(2),s(e.success===!0?2:3),n(2),s(e.success===!0?4:-1)}}function pe(t,l){if(t&1&&(o(0,"section",0)(1,"div",1),f(2,"mat-icon",2),i(),a(3,se,16,8,"div",3),a(4,me,5,2,"div",4),i()),t&2){let e=d();n(3),s(e.justSubscribed===!1?3:-1),n(),s(e.justSubscribed===!0?4:-1)}}var Ue=(()=>{class t{userProvider;api;iconRegistry;sanitizer;platformId;destroyRef=w(y);newsletterEmail=new z("");isSubscribed=!1;justSubscribed=!1;playAnimation=!1;subscribeMessage="Aboneaza-te";message="";success=!1;constructor(e,c,m,x,h){this.userProvider=e,this.api=c,this.iconRegistry=m,this.sanitizer=x,this.platformId=h;let ne=K.bind(null,h);m.addSvgIcon("envelope",x.bypassSecurityTrustResourceUrl(ne("assets/svg/other/envelope.svg")))}ngOnInit(){k(this.platformId)&&(this.setValidatorsEmail(),this.userProvider.isLoggedAsync().pipe(g(this.destroyRef)).subscribe({next:e=>{e&&this.checkIfSubscribed()}}))}checkIfSubscribed(){this.api.auth().get("newsletter/subscription").pipe(g(this.destroyRef)).subscribe({next:e=>{this.isSubscribed=e.isSubscribed}})}setValidatorsEmail(){this.newsletterEmail.setValidators(_.compose([_.required,_.email])),this.newsletterEmail.setAsyncValidators(ie.createValidator(this.api)),this.newsletterEmail.updateValueAndValidity()}subscribeNewsletter(){if(!this.newsletterEmail.valid){this.newsletterEmail.markAsTouched();return}this.playAnimationJustSubscribed(),this.api.auth().post("newsletter/subscription",{email:this.newsletterEmail.value}).pipe(g(this.destroyRef)).subscribe({next:e=>{switch(e.status){case b.ACTIVE:this.message="Email-ul este deja inregistrat la newsletter-ul nostru";break;case b.INACTIVE:this.message="Te-ai abonat cu succes la newsletter-ul nostru!";break}this.success=e.success},error:()=>{this.message="Adresa de email nu a putut fi inregistrata. Verifica adresa si incearca din nou.",this.success=!1}})}playAnimationJustSubscribed(){this.playAnimation=!0,setTimeout(()=>{this.justSubscribed=!0},1e3)}disableButton(){return this.newsletterEmail.status==="PENDING"?(this.subscribeMessage="Se verifica...",!0):(this.subscribeMessage="Aboneaza-te",!this.newsletterEmail.valid)}static \u0275fac=function(c){return new(c||t)(p(G),p(V),p(J),p(j),p(P))};static \u0275cmp=O({type:t,selectors:[["app-newsletter"]],decls:1,vars:1,consts:[[1,"container"],[1,"icon-container"],["svgIcon","envelope"],[1,"subscribe-container",3,"ngClass"],[1,"info-container"],[1,"text-container"],[2,"font-size","22px"],[1,"newsletter-container"],[1,"newsletter-form"],["appearance","fill",1,"newsletter-form-field"],["matInput","","placeholder","Adresa de email","appPatternFormat","",3,"formControl"],["matButton","elevated",1,"newsletter-submit-button",3,"click","disabled"],[1,"elementToFa
1deIn"],["type","success"],["type","error"],[1,"mat-body-1"]],template:function(c,m){c&1&&a(0,pe,5,2,"section",0),c&2&&s(m.isSubscribed===!1?0:-1)},dependencies:[T,A,H,L,ee,$,Y,X,W,Q,te,Z,q,B,F,D,R,U],styles:[".container[_ngcontent-%COMP%]{background-color:var(--brand-surface);color:var(--brand-on-surface);display:flex;justify-content:space-around;padding:20px 0;margin:0 auto;max-width:1200px}.container[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{font-size:18px}.info-container[_ngcontent-%COMP%]{flex:50%;display:flex;flex-direction:column;justify-content:center;align-items:center;margin-top:20px;padding:0 20px;text-align:center}.subscribe-container[_ngcontent-%COMP%]{flex:50%;display:flex;flex-direction:column;justify-content:center;align-items:flex-start;margin-top:20px;padding:0 20px 0 100px}.icon-container[_ngcontent-%COMP%]{flex:50%;overflow:hidden;fill:#fff;opacity:1;text-overflow:ellipsis;text-align:center;max-width:fit-content}mat-icon[_ngcontent-%COMP%]{height:auto;width:auto}.newsletter-form[_ngcontent-%COMP%]{display:flex;align-items:center}.newsletter-form[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{background-color:#fff;color:#000;margin-left:20px;width:150px;height:46px}.newsletter-form[_ngcontent-%COMP%]   button[disabled][_ngcontent-%COMP%]{color:#fff;background-color:transparent;border:1px solid white}.newsletter-container[_ngcontent-%COMP%]{width:100%}mat-form-field[_ngcontent-%COMP%]{width:60%;margin-top:20px;color:#000}mat-form-field[_ngcontent-%COMP%]     .mat-form-field-flex{background-color:#fff;border-radius:5px}mat-form-field[_ngcontent-%COMP%]     .mat-form-field-infix{border:none}mat-form-field[_ngcontent-%COMP%]     .mat-form-field-outline, mat-form-field[_ngcontent-%COMP%]     .mat-form-field-outline-thick{display:none}.elementToFadeIn[_ngcontent-%COMP%]{opacity:1;animation:_ngcontent-%COMP%_fadeIn 1s linear}.elementToFadeOut[_ngcontent-%COMP%]{opacity:0;animation:_ngcontent-%COMP%_fadeOut 1s linear}@keyframes _ngcontent-%COMP%_fadeIn{0%{opacity:0}to{opacity:1;display:block}}@keyframes _ngcontent-%COMP%_fadeOut{0%{opacity:1}to{opacity:0;display:none}}@media screen and (max-width:950px){.container[_ngcontent-%COMP%]{flex-direction:column;align-items:center;justify-content:center;padding:0}.subscribe-container[_ngcontent-%COMP%]{padding-left:20px;padding-right:20px}mat-icon[_ngcontent-%COMP%]{height:100px;width:100px}}@media screen and (max-width:390px){mat-form-field[_ngcontent-%COMP%]{width:100%}.newsletter-form[_ngcontent-%COMP%]{display:grid;margin-bottom:10px}.newsletter-form[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{justify-self:center;margin:0}.subscribe-container[_ngcontent-%COMP%]{display:block}}"]})}return t})();export{Ue as NewsletterComponent};

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.