PageSourceSearch

https://www.base.be/etc/designs/aff-telenetgroup/ng/dist/telenetgroup-app/chunk-C6WLWSDI.js

js base.be collected 2026-10-01 11:45:38 UTC 70,895 bytes, 1 lines download raw bytes

1import{a as ge}from"/etc/designs/aff-telenetgroup/ng/dist/telenetgroup-app/chunk-3WYJQLST.js";import{j as Q,n as _e}from"/etc/designs/aff-telenetgroup/ng/dist/telenetgroup-app/chunk-JZCC7AZA.js";import{f as Se}from"/etc/designs/aff-telenetgroup/ng/dist/telenetgroup-app/chunk-I7JKRBOI.js";import"/etc/designs/aff-telenetgroup/ng/dist/telenetgroup-app/chunk-XFFUT5HO.js";import"/etc/designs/aff-telenetgroup/ng/dist/telenetgroup-app/chunk-ES2GOXLD.js";import"/etc/designs/aff-telenetgroup/ng/dist/telenetgroup-app/chunk-MEANCS2Z.js";import{c as ue,q as U}from"/etc/designs/aff-telenetgroup/ng/dist/telenetgroup-app/chunk-DPA6SFDP.js";import"/etc/designs/aff-telenetgroup/ng/dist/telenetgroup-app/chunk-L5RR2V3K.js";import"/etc/designs/aff-telenetgroup/ng/dist/telenetgroup-app/chunk-M43TLWPF.js";import"/etc/designs/aff-telenetgroup/ng/dist/telenetgroup-app/chunk-BVF44KUV.js";import"/etc/designs/aff-telenetgroup/ng/dist/telenetgroup-app/chunk-UN4I5ARV.js";import"/etc/designs/aff-telenetgroup/ng/dist/telenetgroup-app/chunk-II6HY24G.js";import"/etc/designs/aff-telenetgroup/ng/dist/telenetgroup-app/chunk-7KS57OA2.js";import"/etc/designs/aff-telenetgroup/ng/dist/telenetgroup-app/chunk-SNQA2H4L.js";import"/etc/designs/aff-telenetgroup/ng/dist/telenetgroup-app/chunk-2CVC5BBX.js";import"/etc/designs/aff-telenetgroup/ng/dist/telenetgroup-app/chunk-VM6WTIWS.js";import"/etc/designs/aff-telenetgroup/ng/dist/telenetgroup-app/chunk-SRR7BYAK.js";import"/etc/designs/aff-telenetgroup/ng/dist/telenetgroup-app/chunk-RA6BOML4.js";import"/etc/designs/aff-telenetgroup/ng/dist/telenetgroup-app/chunk-XKZAHTSE.js";import{a as y}from"/etc/designs/aff-telenetgroup/ng/dist/telenetgroup-app/chunk-AGJCFL6D.js";import{j as de}from"/etc/designs/aff-telenetgroup/ng/dist/telenetgroup-app/chunk-X5RNINAL.js";import"/etc/designs/aff-telenetgroup/ng/dist/telenetgroup-app/chunk-GM7QTX3Q.js";import"/etc/designs/aff-telenetgroup/ng/dist/telenetgroup-app/chunk-3VE4T5X3.js";import"/etc/designs/aff-telenetgroup/ng/dist/telenetgroup-app/chunk-WB5FSQCV.js";import"/etc/designs/aff-telenetgroup/ng/dist/telenetgroup-app/chunk-NA7KRUKM.js";import"/etc/designs/aff-telenetgroup/ng/dist/telenetgroup-app/chunk-W5YER7AF.js";import"/etc/designs/aff-telenetgroup/ng/dist/telenetgroup-app/chunk-IGZIRJQN.js";import{q as j}from"/etc/designs/aff-telenetgroup/ng/dist/telenetgroup-app/chunk-JH7E5ALJ.js";import"/etc/designs/aff-telenetgroup/ng/dist/telenetgroup-app/chunk-VDTBCEHH.js";import"/etc/designs/aff-telenetgroup/ng/dist/telenetgroup-app/chunk-GUJRV77H.js";import"/etc/designs/aff-telenetgroup/ng/dist/telenetgroup-app/chunk-OAFWGKHG.js";import"/etc/designs/aff-telenetgroup/ng/dist/telenetgroup-app/chunk-R6ATEHOJ.js";import"/etc/designs/aff-telenetgroup/ng/dist/telenetgroup-app/chunk-TMQTKFW7.js";import"/etc/designs/aff-telenetgroup/ng/dist/telenetgroup-app/chunk-ME6OOKIW.js";import"/etc/designs/aff-telenetgroup/ng/dist/telenetgroup-app/chunk-TZWBTES7.js";import{K as C,g as me}from"/etc/designs/aff-telenetgroup/ng/dist/telenetgroup-app/chunk-LXVF7CF2.js";import{a as A}from"/etc/designs/aff-telenetgroup/ng/dist/telenetgroup-app/chunk-MXMRLGMX.js";import"/etc/designs/aff-telenetgroup/ng/dist/telenetgroup-app/chunk-55LBUOLS.js";import"/etc/designs/aff-telenetgroup/ng/dist/telenetgroup-app/chunk-2IMUUWJB.js";import"/etc/designs/aff-telenetgroup/ng/dist/telenetgroup-app/chunk-VXK3FO45.js";import"/etc/designs/aff-telenetgroup/ng/dist/telenetgroup-app/chunk-ASPNFSTE.js";import{a as M}from"/etc/designs/aff-telenetgroup/ng/dist/telenetgroup-app/chunk-OTH5IOCH.js";import"/etc/designs/aff-telenetgroup/ng/dist/telenetgroup-app/chunk-5FXY6EHC.js";import"/etc/designs/aff-telenetgroup/ng/dist/telenetgroup-app/chunk-UYV7J5M3.js";import{a as le}from"/etc/designs/aff-telenetgroup/ng/dist/telenetgroup-app/chunk-FJVWFSSK.js";import"/etc/designs/aff-telenetgroup/ng/dist/telenetgroup-app/chunk-WSQHVBSB.js";import"/etc/designs/aff-telenetgroup/ng/dist/telenetgroup-app/chunk-KHZYCMEO.js";import"/etc/designs/aff-telenetgroup/ng/dist/telenetgroup-app/chunk-LUVC62E7.js";import"/etc/designs/aff-telenetgroup/ng/dist/telenetgroup-app/chunk-ZOQH4BRJ.js";import{I as B,a as ce,aa as pe}from"/etc/designs/aff-telenetgroup/ng/dist/telenetgroup-app/chunk-GWKWBQ3P.js";import"/etc/designs/aff-telenetgroup/ng/dist/telenetgroup-app/chunk-3KHHOKR7.js";import"/etc/designs/aff-telenetgroup/ng/dist/telenetgroup-app/chunk-NJNVRHKN.js";import"/etc/designs/aff-telenetgroup/ng/dist/telenetgroup-app/chunk-DKZN7K64.js";import"/etc/designs/aff-telenetgroup/ng/dist/telenetgroup-app/chunk-BYG2IWSB.js";import{j as x,p as re,r as ae,s as oe}from"/etc/designs/aff-telenetgroup/ng/dist/telenetgroup-app/chunk-DKUNSAXA.js";import{A as I,B as F,C as D,E as O,H as k,J as se}from"/etc/designs/aff-telenetgroup/ng/dist/telenetgroup-app/chunk-LBCPBUBK.js";import{Ba as ne}from"/etc/designs/aff-telenetgroup/ng/dist/telenetgroup-app/chunk-VLHNUVO3.js";import{e as h}from"/etc/designs/aff-telenetgroup/ng/dist/telenetgroup-app/chunk-KFW34AI3.js";import"/etc/designs/aff-telenetgroup/ng/dist/telenetgroup-app/chunk-G3XYAJPK.js";import"/etc/designs/aff-telenetgroup/ng/dist/telenetgroup-app/chunk-WXUJ2XVZ.js";import"@angular/core";import{CommonModule as Wt}from"@angular/common";import{TranslateModule as Yt}from"@ngx-translate/core";import{LoginComponent as qt}from"@telenet/ng-lib-ocapi";import"@angular/core";import"@angular/core";import{OcapiCallConfig as Z}from"@telenet/ng-lib-ocapi";import"@angular/core";import*as Ee from"@angular/core";var fe=(()=>{class i{toModel(e,t){return A().hasActiveSubscription(e.hasActiveSubscription).monthlyPrice(e.monthlyPrice).expiryDate(e.expiryDate).planType(e.planType).build()}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275prov=Ee.\u0275\u0275defineInjectable({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();import"@angular/core";import*as ve from"@angular/core";var he=(()=>{class i{toModel(e,t){return A().redirectURL(e.redirectURL).tokenExpiryDate(e.tokenExpiryDate).build()}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275prov=ve.\u0275\u0275defineInjectable({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();import*as P from"@angular/core";import*as Ie from"@telenet/ng-lib-ocapi";var Ce=(()=>{class i{constructor(e,t,a){this.ocapiService=e,this.netflixSubscriptionResponseMapper=t,this.recoverNetflixSubscriptionResponseMapper=a,this.ENDPOINT=M.PRODUCT_SERVICE_PREFIX+"v1/netflix-subscriptions"}getSubscriptionStatus(e){let t=new Z(e,this.ENDPOINT,this.netflixSubscriptionResponseMapper);return this.ocapiService.doGet(t)}cancelSubscription(e){let t=new Z(e,this.ENDPOINT,this.netflixSubscriptionResponseMapper);return this.ocapiService.doDelete(t)}recoverSubscription(e,t){let a={redirectURL:t},p=new Z(e,this.ENDPOINT+"/recover",this.recoverNetflixSubscriptionResponseMapper,a);return this.ocapiService.doPost(p)}static{this.\u0275fac=function(t){return new(t||i)(P.\u0275\u0275inject(Ie.OcapiService),P.\u0275\u0275inject(fe),P.\u0275\u0275inject(he))}}static{this.\u0275prov=P.\u0275\u0275defineInjectable({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var E=(function(i){return i.MESSAGE_GROUP_NAME="manage-netflix",i.ACTIVE="ACTIVE",i.NETFLIX="Netflix",i.SUBSCRIPTION_NOT_ALLOWED_STATUS="ACTIVE|ACTIVATION_PASSED_PONR|MODIFICATION_PASSED_PONR",i.PRODUCT_STATUS_PENDING="ACTIVATION_IN_PROGRESS",i})(E||{});import*as n from"@angular/core";import*as Ne from"@angular/common";import*as Re from"@telenet/ng-lib-ocapi";import*as Ae from"@ngx-translate/core";function st(i,m){if(i&1){let e=n.\u0275\u0275getCurrentView();n.\u0275\u0275elementStart(0,"div",3),n.\u0275\u0275element(1,"div",4),n.\u0275\u0275elementStart(2,"div",5)(3,"div",6)(4,"div",7)(5,"div",8),n.\u0275\u0275listener("click",function(){n.\u0275\u0275restoreView(e);let a=n.\u0275\u0275nextContext();
1return n.\u0275\u0275resetView(a.onDiscardCancelSubscription())}),n.\u0275\u0275elementEnd()(),n.\u0275\u0275elementStart(6,"div",9),n.\u0275\u0275text(7),n.\u0275\u0275pipe(8,"translate"),n.\u0275\u0275elementEnd(),n.\u0275\u0275element(9,"div",10),n.\u0275\u0275pipe(10,"translate"),n.\u0275\u0275elementStart(11,"div",11)(12,"a",12),n.\u0275\u0275listener("click",function(){n.\u0275\u0275restoreView(e);let a=n.\u0275\u0275nextContext();return n.\u0275\u0275resetView(a.onDiscardCancelSubscription())}),n.\u0275\u0275text(13),n.\u0275\u0275pipe(14,"translate"),n.\u0275\u0275elementEnd(),n.\u0275\u0275elementStart(15,"a",13),n.\u0275\u0275listener("click",function(){n.\u0275\u0275restoreView(e);let a=n.\u0275\u0275nextContext();return n.\u0275\u0275resetView(a.onConfirmCancelSubscription())}),n.\u0275\u0275text(16),n.\u0275\u0275pipe(17,"translate"),n.\u0275\u0275elementEnd()()()()()}i&2&&(n.\u0275\u0275advance(7),n.\u0275\u0275textInterpolate(n.\u0275\u0275pipeBind1(8,4,"ng.manage-netflix.overlay.cancel-confirmation.title")),n.\u0275\u0275advance(2),n.\u0275\u0275property("innerHTML",n.\u0275\u0275pipeBind1(10,6,"ng.manage-netflix.overlay.cancel-confirmation.description"),n.\u0275\u0275sanitizeHtml),n.\u0275\u0275advance(4),n.\u0275\u0275textInterpolate(n.\u0275\u0275pipeBind1(14,8,"ng.manage-netflix.overlay.cancel-confirmation.btn.close")),n.\u0275\u0275advance(3),n.\u0275\u0275textInterpolate(n.\u0275\u0275pipeBind1(17,10,"ng.manage-netflix.overlay.cancel-confirmation.btn.confirm")))}function ct(i,m){i&1&&(n.\u0275\u0275elementStart(0,"div")(1,"div",14)(2,"div",15)(3,"div"),n.\u0275\u0275element(4,"div",16),n.\u0275\u0275pipe(5,"translate"),n.\u0275\u0275elementEnd(),n.\u0275\u0275elementStart(6,"span",17),n.\u0275\u0275text(7),n.\u0275\u0275pipe(8,"translate"),n.\u0275\u0275elementEnd()()()()),i&2&&(n.\u0275\u0275advance(4),n.\u0275\u0275property("innerHTML",n.\u0275\u0275pipeBind1(5,2,"ng.manage-netflix.info.subscription-not-active"),n.\u0275\u0275sanitizeHtml),n.\u0275\u0275advance(3),n.\u0275\u0275textInterpolate(n.\u0275\u0275pipeBind1(8,4,"ng.manage-netflix.lbl.inactive")))}function pt(i,m){if(i&1){let e=n.\u0275\u0275getCurrentView();n.\u0275\u0275elementStart(0,"div"),n.\u0275\u0275element(1,"app-message",18),n.\u0275\u0275elementStart(2,"div",14)(3,"div",15)(4,"div")(5,"div",19),n.\u0275\u0275text(6),n.\u0275\u0275pipe(7,"translate"),n.\u0275\u0275elementStart(8,"span",20),n.\u0275\u0275text(9),n.\u0275\u0275elementEnd()(),n.\u0275\u0275elementStart(10,"div",21),n.\u0275\u0275text(11),n.\u0275\u0275pipe(12,"translate"),n.\u0275\u0275elementStart(13,"div",22)(14,"span"),n.\u0275\u0275text(15,"\u20AC"),n.\u0275\u0275elementEnd(),n.\u0275\u0275elementStart(16,"span"),n.\u0275\u0275text(17),n.\u0275\u0275elementEnd()()(),n.\u0275\u0275elementStart(18,"div",21),n.\u0275\u0275text(19),n.\u0275\u0275pipe(20,"translate"),n.\u0275\u0275elementStart(21,"div",22),n.\u0275\u0275text(22),n.\u0275\u0275elementEnd()()(),n.\u0275\u0275elementStart(23,"span",23),n.\u0275\u0275text(24),n.\u0275\u0275pipe(25,"translate"),n.\u0275\u0275elementEnd()()(),n.\u0275\u0275element(26,"br"),n.\u0275\u0275elementStart(27,"div",24)(28,"div",25)(29,"div",26)(30,"h3"),n.\u0275\u0275text(31),n.\u0275\u0275pipe(32,"translate"),n.\u0275\u0275elementEnd(),n.\u0275\u0275elementStart(33,"p"),n.\u0275\u0275text(34),n.\u0275\u0275pipe(35,"translate"),n.\u0275\u0275elementStart(36,"a",27),n.\u0275\u0275listener("click",function(){n.\u0275\u0275restoreView(e);let a=n.\u0275\u0275nextContext();return n.\u0275\u0275resetView(a.onRecoverAccountClick())}),n.\u0275\u0275elementStart(37,"span"),n.\u0275\u0275text(38),n.\u0275\u0275pipe(39,"translate"),n.\u0275\u0275elementEnd()()()()(),n.\u0275\u0275elementStart(40,"div",28)(41,"div",26)(42,"h3"),n.\u0275\u0275text(43),n.\u0275\u0275pipe(44,"translate"),n.\u0275\u0275elementEnd(),n.\u0275\u0275element(45,"p",29),n.\u0275\u0275pipe(46,"translate"),n.\u0275\u0275elementStart(47,"ul"),n.\u0275\u0275text(48,"- "),n.\u0275\u0275elementStart(49,"a",27),n.\u0275\u0275listener("click",function(){n.\u0275\u0275restoreView(e);let a=n.\u0275\u0275nextContext();
1return n.\u0275\u0275resetView(a.onCancelAccountClick())}),n.\u0275\u0275elementStart(50,"span"),n.\u0275\u0275text(51),n.\u0275\u0275pipe(52,"translate"),n.\u0275\u0275elementEnd()()()()()()()}if(i&2){let e=n.\u0275\u0275nextContext();n.\u0275\u0275advance(6),n.\u0275\u0275textInterpolate1("",n.\u0275\u0275pipeBind1(7,13,"ng.manage-netflix.lbl.plan-type")," "),n.\u0275\u0275advance(3),n.\u0275\u0275textInterpolate(e.netflixSusbscriptionStatus.planType),n.\u0275\u0275advance(2),n.\u0275\u0275textInterpolate1(" ",n.\u0275\u0275pipeBind1(12,15,"ng.manage-netflix.lbl.monthly-payment")," "),n.\u0275\u0275advance(6),n.\u0275\u0275textInterpolate(e.netflixSusbscriptionStatus.monthlyPrice),n.\u0275\u0275advance(2),n.\u0275\u0275textInterpolate1(" ",n.\u0275\u0275pipeBind1(20,17,"ng.manage-netflix.lbl.expiry-date")," "),n.\u0275\u0275advance(3),n.\u0275\u0275textInterpolate1(" ",e.netflixSusbscriptionStatus.expiryDate," "),n.\u0275\u0275advance(2),n.\u0275\u0275textInterpolate(n.\u0275\u0275pipeBind1(25,19,"ng.manage-netflix.lbl.active")),n.\u0275\u0275advance(7),n.\u0275\u0275textInterpolate1("",n.\u0275\u0275pipeBind1(32,21,"ng.manage-netflix.title.recover-account")," "),n.\u0275\u0275advance(3),n.\u0275\u0275textInterpolate1("",n.\u0275\u0275pipeBind1(35,23,"ng.manage-netflix.details.recover-account")," "),n.\u0275\u0275advance(4),n.\u0275\u0275textInterpolate(n.\u0275\u0275pipeBind1(39,25,"ng.manage-netflix.lnk.recover-account")),n.\u0275\u0275advance(5),n.\u0275\u0275textInterpolate1("",n.\u0275\u0275pipeBind1(44,27,"ng.manage-netflix.title.cancel-account")," "),n.\u0275\u0275advance(2),n.\u0275\u0275property("innerHTML",n.\u0275\u0275pipeBind1(46,29,"ng.manage-netflix.details.cancel-account"),n.\u0275\u0275sanitizeHtml),n.\u0275\u0275advance(6),n.\u0275\u0275textInterpolate(n.\u0275\u0275pipeBind1(52,31,"ng.manage-netflix.lnk.cancel-account"))}}var be=(()=>{class i{constructor(e,t,a,p){this.loader=e,this.netflixSubscriptionManagementService=t,this.urlService=a,this.messageService=p,this.REQUIRED_SCOPES=["productholding"]}initAfterLoggedIn(){this.loader.start(),this.netflixSubscriptionManagementService.getSubscriptionStatus(E.MESSAGE_GROUP_NAME).subscribe(e=>{this.loader.stop(),this.netflixSusbscriptionStatus=e})}onRecoverAccountClick(){this.loader.start(),this.netflixSubscriptionManagementService.recoverSubscription(E.MESSAGE_GROUP_NAME,this.redirectionUrl).subscribe(e=>{this.loader.stop(),this.urlService.redirectTo(e.redirectURL)})}onCancelAccountClick(){this.cancelClicked=!0}isSubscriptionActive(){return this.netflixSusbscriptionStatus?.hasActiveSubscription}onDiscardCancelSubscription(){this.cancelClicked=!1}onConfirmCancelSubscription(){this.cancelClicked=!1,this.loader.start(),this.messageService.clearMessages(E.MESSAGE_GROUP_NAME),this.netflixSubscriptionManagementService.cancelSubscription(E.MESSAGE_GROUP_NAME).subscribe(e=>{this.loader.stop(),this.messageService.addMessage(new k(E.MESSAGE_GROUP_NAME,E.MESSAGE_GROUP_NAME+".response-success-cancel-subscription"))})}static{this.\u0275fac=function(t){return new(t||i)(n.\u0275\u0275directiveInject(ae),n.\u0275\u0275directiveInject(Ce),n.\u0275\u0275directiveInject(x),n.\u0275\u0275directiveInject(I))}}static{this.\u0275cmp=n.\u0275\u0275defineComponent({type:i,selectors:[["tg-manage-netflix-subscription"]],inputs:{redirectionUrl:"redirectionUrl",enableLoader:"enableLoader",enableMask:"enableMask",pageType:"pageType"},standalone:!1,decls:4,vars:4,consts:[["messageGroupName","manage-netflix",3,"componentCanRender","scopes"],["class","overlay",4,"ngIf"],[4,"ngIf"],[1,"overlay"],[1,"overlay__mask","overlay__mask--backdrop","backdrop-filter--3","animation--fade-in"],[1,"overlay__section","py--g--sm","py--l","py--xxxg--md"],[1,"overlay__section__content--wrapper","animation--slide-down-to-screen"],[1,"overlay__section__content__close"],[1,"icon","icon-cross",3,"click"],[1,"overlay__section__content__sub-title"],[1,"overlay__section__content__description",3,"innerHTML"],[1,"overlay__section__content__action"],["href","javascript:void(0)",1,"button","button--secondary",3,"click"],["href","javascript:void(0)",1,"button","button--primary",3,"click"],[1,"Container--grey","Container--partitioned--xs--full-width","p--xl","border-radius--all--m","background-shade_12"],[1,"display--flex","justify-content--between","align-items--center"],[1,"color-white_24",3,"innerHTML"],[1,"badge","badge--expired"],["messageGroupName","manage-netflix"],[1,"color-white_24"],[1,"text--l","text-weight--m","color-streamz-white_04","color-white"],[1,"color-white_24","text--m"],[1,"display--inline-flex","text-weight--m"],[1,"badge","badge--active"],[1,"border--all--r","border-width--all--r","border-style--all--solid","border-color--all--mid-grey"],[1,"Container--partitioned--partition","Container--partitioned--partition--first-item"],[1,"Container"],["href","javascript:void(0)",1,"link",3,"click"],[1,"Container--partitioned--partition","border--t--r","border-width--t--r","border-style--t--solid","border-color--t--mi
1d-grey","Container--partitioned--partition--last-item"],[3,"innerHTML"]],template:function(t,a){t&1&&(n.\u0275\u0275elementStart(0,"tg-login",0),n.\u0275\u0275listener("componentCanRender",function(){return a.initAfterLoggedIn()}),n.\u0275\u0275template(1,st,18,12,"div",1)(2,ct,9,6,"div",2)(3,pt,53,33,"div",2),n.\u0275\u0275elementEnd()),t&2&&(n.\u0275\u0275property("scopes",a.REQUIRED_SCOPES),n.\u0275\u0275advance(),n.\u0275\u0275property("ngIf",a.cancelClicked),n.\u0275\u0275advance(),n.\u0275\u0275property("ngIf",!a.isSubscriptionActive()),n.\u0275\u0275advance(),n.\u0275\u0275property("ngIf",a.isSubscriptionActive()))},dependencies:[Ne.NgIf,Re.LoginComponent,F,Ae.TranslatePipe],encapsulation:2})}}return i})();import"@angular/core";import"@ngxs/store";import{switchMap as Dt,take as Mt}from"rxjs";import"@telenet/ng-lib-ocapi";var c=(function(i){return i.MESSAGE_GROUP_NAME="manage-streaming-options",i.MESSAGE_GROUP_NAME_VALIDATION_DIALOG="user-validation-dialog",i.WARNING_NO_CUSTOMER_PRODUCTS="no-customer-products",i.ACTIVATE_STEPS_TO_ACTIVATE="-steps-to-activate",i.DISNEY="DISNEY",i.NETFLIX="NETFLIX",i.ACTIVE="ACTIVE",i.ACTIVATION_HEADER="-activation-header",i.STANDALONE="streaming-standalones",i.RESET_PASSWORD="reset-password",i.ACTIVATION_BUTTON="-activation-button",i.RESET_PASSWORD_BUTTON="-reset-password-button",i.NO_ACCESS_TO_PAGE="no-access-to-page",i.ACTIVE_GUIDELINES="-active-guidelines",i.ACTIVE_TITLE="-active-title",i.SUBSCRIPTION_NOT_ACTIVE_STATUS="subscription-not-active-status",i.SUBSCRIPTION_ACTIVE_STATUS="subscription-active-status",i.RECOVER_NETFLIX_SUBSCRIPTION_NAME="NETFLIX",i.SUCCESS="SUCCESS",i.ACTIVATION_SUCCESS_MESSAGE_KEY=".netflix-activation",i.INVALID_SMS_CODE_JWT_ERRORCODE="JWT_RED_110",i.THREE_CODES_ALREADY_GENERATED_JWT_ERRORCODE="JWT_RED_102",i.TRIED_THREE_CODES_IN_FIVE_MINUTES_JWT_ERROCODE="JWT_RED_109",i.ACTIVATE_STREAMING_OCAPI_ERR_CODES="OCAPI-ERR-STRM401|OCAPI-ERR-STRM402|OCAPI-ERR-STRM403|OCAPI-ERR-STRM404|OCAPI-ERR-STRM405|OCAPI-ERR-STRM406|OCAPI-ERR-STRM407|OCAPI-ERR-STRM408|OCAPI-ERR-STRM409|JWT_RED_102|JWT_RED_110|JWT_RED_109|OCAPI-ERR-STRM400",i.ACTIVATE_STREAMING_UNAUTHORIZED="2FA_REQUIRED",i.FRAUD_PREVENTION_JWT_ERRORCODES="JWT_RED_102|JWT_RED_110|JWT_RED_109",i.SUBSRIPTION_ALREADY_ACTIVE_ERRORCODE="OCAPI-ERR-STRM404",i.SUBSCRIPTION_ALREADY_ACTIVE_KEY="subscription-is-already-active",i.NOT_ACTIVE="ACTIVATION_PASSED_PONR|MODIFICATION_PASSED_PONR|ACTIVATION_IN_PROGRESS",i.STREAMING_PRODUCT_PREFIX="STRM",i.ACTIVATE_OPTION_CARD="activate-card",i.RECOVER_OPTION_CARD="recover-card",i.PRODUCT_STATUS_PENDING="ACTIVATION_IN_PROGRESS",i.USERAGENT_SAFARI="safari",i.IOS_PLATFORM="iphone",i.INTERNET_LINE="internet_line",i.INTERNET="internet",i.THREE_CODES_ALREADY_GENERATED="three.codes.already.generated",i.TRIED_THREE_CODES_IN_FIVE_MINUTES="three.codes.in.five.min",i.INVALID_SMS_CODE="form-input-error.Invalid SMS code",i.GENERIC_ERROR="fraud.prevention.generic.error",i})(c||{}),_=(()=>{class i{static{this.PAGE_ID_FRAUD_PREVENTION_STEP_ONE="customerzone/manage-streaming-options##fraud-prevention-1"}static{this.EVENT_NAME_SELF_SERVICE_FLOW_STARTED="Self-service flow started"}static{this.EVENT_NAME_SELF_SERVICE_FLOW_ENDED="Self-service flow ended"}static{this.EVENT_PRIMARY_CATEGORY_SELF_SERVICE="self-service"}static{this.EVENT_NAME_SELF_SERVICE_LINK_CLICKED="link clicked"}static{this.EVENT_ITEM_NAME_NUMBER_NOT_IN_LIST="number not present"}static{this.INTENT_FRAUD_PREVENTION="fraud prevention"}static{this.FLOWTYPE_SELF_SERVICE="self-service"}static{this.PAGE_ID_FRAUD_PREVENTION_STEP_TWO_SEND_SMS="customerzone/manage-streaming-options##fraud-prevention-2-sms"}static{this.EVENT_RESEND_SMS="resend sms"}static{this.EVENT_CLOSE_BUTTON_CLICKED="close"}static{this.PAGE_ID_AUTHENTICATION_NOT_POSSIBLE="customerzone/manage-streaming-options##authentication not possible"}static{this.EVENT_ITEM_NAME_RESET_CREDENTIALS="reset credentials"}static{this.EVENT_ITEM_NAME_ACTIVATE_STREAMING="activate"}static{this.PAGE_ID_MANAGE_STREAMING_OPTIONS="customerzone/manage-streaming-options"}}return i})();import"@angular/core";import{throwError as ye}from"rxjs";import{OcapiCallConfig as V}from"@telenet/ng-lib-ocapi";import"@angular/core";import*as Oe from"@angular/core";var xe=(()=>{class i{toModel(e,t){return A().statusCode(e.statusCode).statusDescription(e.statusDescription).tokenActivationUrl(e.tokenActivationUrl).build()}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275prov=Oe.\u0275\u0275defineInjectable({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();import"@angular/core";import*as De from"@angular/core";var Me=(()=>{class i{toModel(e,t){return A().statusCode(e.statusCode).statusDescription(e.statusDescription).accountRecoveryUrl(e.accountRecoveryUrl).expiryDate(e.expiryDate).extReferenceId(e.extReferenceId).build()}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275prov=De.\u0275\u0275defineInjectable({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();import*as R from"@angular/core";import*as W from"@telenet/ng-lib-ocapi";var L=(()=>{class i{constructor(e,t,a,p,S,g){this.ocapiService=e,this.activateStreamingMapper=t,this.recoverStreamingMapper=a,this.messageService=p,this.loginService=S,this.responseStatusMapper=g,this.SALES_SERVICE_ENDPOINT=me.SALES_SERVICE_PREFIX+"v1/streaming-subscriptions",this.ENTERTAINMENT_MANAGEMENT_ENDPOINT="/public/api/customer-web-account-entertainment-management-cs/v1"}activateStreaming(e,t){let a=new V(e,this.SALES_SERVICE_ENDPOINT+"/activation-url",this.activateStreamingMapper,t);return a.errorHandler=this.handleActivateStreamingErrorResponse.bind(this),this.ocapiService.doPost(a)}recoverStreaming(e,t){let a=new V(e,this.SALES_SERVICE_ENDPOINT+"/account-recovery-url",this.recoverStreamingMapper,t);return this.ocapiService.doPost(a)}validateActivation(e,t){let a=`?productIdentifier=${t}`,p=this.SALES_SERVICE_ENDPOINT+"/validate-activation"+a,S=new V(e,p,this.responseStatusMapper);return S.observeAsResponse=!0,S.errorHandler=this.handleActivateStreamingErrorResponse.bind(this),this.ocapiService.doGet(S)}activateStreamingOption(e,t){let a=this.ENTERTAINMENT_MANAGEMENT_ENDPOINT+"/streaming-subscriptions/account-activation-url",p=this.ENTERTAINMENT_MANAGEMENT_ENDPOINT+"/streaming-subscriptions/account-activation-url-redirect",S=new V(e,a,void 0,t),g=new URLSearchParams(Object.entries(t)),N=`/ocapi${p}?${g.toString()}`;return S.observeAsResponse=!0,S.errorHandler=this.handleNewActivateStreamingErrorResponse(N).bind(this),this.ocapiService.doPost(S)}recoverStreamingOption(e,t){let a=new V(e,this.ENTERTAINMENT_MANAGEMENT_ENDPOINT+"/streaming-subscriptions/account-recovery-url",void 0,t);return this.ocapiService.doPost(a)}getSmsValidationCode(e,t){let a=this.SALES_SERVICE_ENDPOINT+"/start-activation",p=new V(e,a,this.responseStatusMapper,t);return p.errorHandler=this.handleActivateStreamingErrorResponse.bind(this),this.ocapiService.doPost(p)}handleActivateStreamingErrorResponse(e,t){return this.handleJWTErrorResponse(e,t),c.ACTIVATE_STREAMING_OCAPI_ERR_CODES.match(e.error.code)&&(e.error.code===c.SUBSRIPTION_ALREADY_ACTIVE_E
1RRORCODE?this.messageService.addMessage(new O(t.messageGroupName,c.MESSAGE_GROUP_NAME.concat(".").concat(c.SUBSCRIPTION_ALREADY_ACTIVE_KEY))):this.messageService.addMessage(new O(t.messageGroupName,c.MESSAGE_GROUP_NAME.concat(".").concat(c.GENERIC_ERROR)))),ye(()=>e)}handleJWTErrorResponse(e,t){let a=this.extractValueFromError(e.error.cause,"description"),p=a?a.trim():"",g=(e?.error.cause).split("[")[1]?.split("]")[0]?.match(/code\s*:\s*(\w+)/);if(g&&(c.ACTIVATE_STREAMING_OCAPI_ERR_CODES.match(g[1]?.toString())||c.FRAUD_PREVENTION_JWT_ERRORCODES.match(g[1]?.toString()))){let N=this.generateErrorMessage(p,g[1]),G=c.FRAUD_PREVENTION_JWT_ERRORCODES.match(g[1]?.toString())?{value:t.data.mobileNumber}:null;if(this.messageService.addMessage(new O(t.messageGroupName,N,G)),G?.value)throw new Error(e.error.cause)}}extractValueFromError(e,t){let a=e?.split(",");for(let p of a){let[S,g]=p?.split(":").map(N=>N.trim());if(S===t)return g}}generateErrorMessage(e,t){return t===c.THREE_CODES_ALREADY_GENERATED_JWT_ERRORCODE?"manage-streaming-options".concat(".").concat(c.THREE_CODES_ALREADY_GENERATED):t===c.TRIED_THREE_CODES_IN_FIVE_MINUTES_JWT_ERROCODE?"manage-streaming-options".concat(".").concat(c.TRIED_THREE_CODES_IN_FIVE_MINUTES):"manage-streaming-options".concat(".").concat(c.GENERIC_ERROR)}handleNewActivateStreamingErrorResponse(e){return(t,a)=>(c.ACTIVATE_STREAMING_UNAUTHORIZED.match(t.error.code)?this.loginService.loginWithStepUpAuthentication(e,"2fa"):this.messageService.addMessage(new O(a.messageGroupName,c.MESSAGE_GROUP_NAME.concat(".").concat(c.GENERIC_ERROR))),ye(()=>t))}static{this.\u0275fac=function(t){return new(t||i)(R.\u0275\u0275inject(W.OcapiService),R.\u0275\u0275inject(xe),R.\u0275\u0275inject(Me),R.\u0275\u0275inject(I),R.\u0275\u0275inject(W.LoginService),R.\u0275\u0275inject(le))}}static{this.\u0275prov=R.\u0275\u0275defineInjectable({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var f=class{static mapActivateStreamingRequest(m,e){let t={},a={};return t.alias=m?.affiliateSubscriptionId,a.affiliateSubscriptionId=m?.businessId,t.subscriptions=[a],t.productIdentifier=e,t}static mapRecoverStreamingRequest(m,e){let t={name:m.category};return e&&(t.affiliateSubscriptionId=m.businessId),{recoverOttAccountVo:{alias:m?.affiliateSubscriptionId},recoverSubscriptionVo:t}}static checkForShowCard(m,e){return m&&m.flatMap(t=>t.options).filter(t=>this.isOptionEligibleForCardView(t,e)).filter(t=>this.isNetflixOption(t))}static isOptionEligibleForCardView(m,e){return!!(this.isValidStatusForActivationCard(m.status,e)||this.isValidStatusForRecoverCard(m.status,e))}static isNetflixOption(m){return m.productInfo.externalProductCode.startsWith(c.STREAMING_PRODUCT_PREFIX)}static isValidStatusForActivationCard(m,e){return c.NOT_ACTIVE.match(m)&&c.ACTIVATE_OPTION_CARD===e}static isValidStatusForRecoverCard(m,e){return c.ACTIVE===m&&c.RECOVER_OPTION_CARD===e}static mapStartActivationRequest(m){return{mobileNumber:m}}};import"@angular/material/dialog";import"@angular/core";import{MAT_DIALOG_DATA as It}from"@angular/material/dialog";import{FormControl as Ct,FormGroup as Tt}from"@angular/forms";import"@angular/core";import{AnalyticsConstants as Pe,EventNameEnum as Ve,EventStatusEnum as dt,EventTypeEnum as Y}from"@telenet/ng-lib-datalayer";import{AttributeBuilder as ut}from"@telenet/ng-lib-udl";import*as q from"@angular/core";import*as Le from"@telenet/ng-lib-datalayer";var w=(()=>{class i{constructor(e){this.dataLayerService=e,this.messageGroups=[c.MESSAGE_GROUP_NAME]}createBaseEventInfo(e,t){let a=this.dataLayerService.createEventInfo(e,t,this.messageGroups);return a.setEventStatus(dt.EVENT_STATUS_SUCCESS),a}sendClickEvent(e,t){let a=this.createBaseEventInfo(e,Y.EVENT_TYPE_CLICK),p=this.getAttributes(t);this.addEvent(a,p)}sendFlowEndEvent(e){let t=this.createBaseEventInfo(e,Y.EVENT_TYPE_SELF_SERVICE_FLOW_END),a=this.getAttributes();this.addEvent(t,a)}sendActivateOrRecoverButtonClickEvent(e,t,a){let p=this.createBaseEventInfo(Ve.EVENT_NAME_BUTTON_CLICKED,Y.EVENT_TYPE_CLICK);this.addEvent(p,this.getActivateButtonEventAttributes(e,t,a))}sendFlowStartEvent(){let e=this.createBaseEventInfo(_.EVENT_NAME_SELF_SERVICE_FLOW_STARTED,Y.EVENT_TYPE_SELF_SERVICE_FLOW_STARTED);this.addEvent(e,this.getAttributes())}sendNumberIsNotInTheListClickEvent(){this.sendClickEvent(_.EVENT_NAME_SELF_SERVICE_LINK_CLICKED,_.EVENT_ITEM_NAME_NUMBER_NOT_IN_
1LIST)}sendResendSmsClickEvent(){this.sendClickEvent(_.EVENT_NAME_SELF_SERVICE_LINK_CLICKED,_.EVENT_RESEND_SMS)}sendSmsValidationSuccessEvent(){this.sendFlowEndEvent(_.EVENT_NAME_SELF_SERVICE_FLOW_ENDED)}sendSmsValidationClickCloseEvent(){this.sendClickEvent(Ve.EVENT_NAME_BUTTON_CLICKED,_.EVENT_CLOSE_BUTTON_CLICKED)}addPageIdEvent(e){let t={};t[Pe.ATTRIBUTES_FLOW_TYPE]=_.FLOWTYPE_SELF_SERVICE,t[Pe.ATTRIBUTES_INTENT]=_.INTENT_FRAUD_PREVENTION,this.dataLayerService.addPageEvent(e,t)}getAttributes(e){let t={intent:_.INTENT_FRAUD_PREVENTION,flowType:_.FLOWTYPE_SELF_SERVICE};return e&&(t.itemName=e),t}getActivateButtonEventAttributes(e,t,a){return new ut().withAttribute("itemName",e).withAttribute("itemData",t).withAttribute("itemGroup",a).build()}get category(){return this.dataLayerService.createCategory(_.EVENT_PRIMARY_CATEGORY_SELF_SERVICE)}addEvent(e,t){this.dataLayerService.addEvent(e,t,this.category)}static{this.\u0275fac=function(t){return new(t||i)(q.\u0275\u0275inject(Le.DataLayerService))}}static{this.\u0275prov=q.\u0275\u0275defineInjectable({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();import*as r from"@angular/core";import*as Ge from"@angular/material/dialog";import*as z from"@angular/common";import*as v from"@angular/forms";import{EventEmitter as St}from"@angular/core";import{FormControl as _t,FormGroup as gt,Validators as ie}from"@angular/forms";import{provideNgxMask as Et}from"ngx-mask";import*as s from"@angular/core";import*as J from"@angular/common";import*as T from"@angular/forms";import*as we from"@ngx-translate/core";function ft(i,m){if(i&1){let e=s.\u0275\u0275getCurrentView();s.\u0275\u0275elementStart(0,"tg-form-input",13),s.\u0275\u0275listener("paste",function(a){s.\u0275\u0275restoreView(e);let p=s.\u0275\u0275nextContext();return s.\u0275\u0275resetView(p.onPaste(a))})("keyup",function(a){s.\u0275\u0275restoreView(e);let p=s.\u0275\u0275nextContext();return s.\u0275\u0275resetView(p.onKeyUp(a))})("click",function(){s.\u0275\u0275restoreView(e);let a=s.\u0275\u0275nextContext();return s.\u0275\u0275resetView(a.reset())}),s.\u0275\u0275elementEnd()}if(i&2){let e=m.$implicit,t=s.\u0275\u0275nextContext();s.\u0275\u0275property("formControlName",s.\u0275\u0275interpolate1("smsCodeValue",e))("error",t.wrongCode)("hideLabel",!0)("showError",!1)("showPlaceHolder",!1)}}function vt(i,m){i&1&&(s.\u0275\u0275elementStart(0,"div",14),s.\u0275\u0275text(1),s.\u0275\u0275pipe(2,"translate"),s.\u0275\u0275elementEnd()),i&2&&(s.\u0275\u0275advance(),s.\u0275\u0275textInterpolate(s.\u0275\u0275pipeBind1(2,1,"ng.manage-streaming-options.form-input-error.wrong.code")))}var Ue=(()=>{class i{constructor(e,t,a){this.manageStreamingOptionService=e,this.manageStreamingOptionsDatalayerService=t,this.messageService=a,this.activateStatusResponse=new St,this.isStepCompleted=!1,this.messageGroupName=c.MESSAGE_GROUP_NAME_VALIDATION_DIALOG,this.wrongCode=!1}ngOnInit(){this.pins=[...Array(6).keys()],this.smsCodeForm=new gt({}),this.maskedPhoneNumber=this.maskPhoneNumber(this.selectedPhoneNumber),this.pins.forEach(e=>{this.smsCodeForm.addControl(`smsCodeValue${e}`,new _t(void 0,[ie.required,ie.maxLength(1),ie.pattern(ce.NUMBER_ONLY_REGEX)]))}),this.manageStreamingOptionsDatalayerService.addPageIdEvent(_.PAGE_ID_FRAUD_PREVENTION_STEP_TWO_SEND_SMS),this.smsCodeForm.valueChanges.subscribe(e=>{this.smsCodeForm.valid&&(this.otpCode="",Object.values(e).forEach(t=>{t&&(this.otpCode+=t.toString())}))})}onKeyUp(e){let t,a=Number.parseInt(e.target.id.charAt(e.target.id.length-1)),p=a+1<=5?a+1:a,S=a-1>=0?a-1:a;isFinite(e.key)?t=document.querySelector(`#smsCodeValue${p}`):e.code==="Backspace"&&(t=document.querySelector(`#smsCodeValue${S}
1`)),t&&t.focus(),this.smsCodeForm.invalid?this.isStepCompleted=!1:this.isStepCompleted=!0}onPaste(e){e.preventDefault();let a=e.clipboardData.getData("text/plain"),p=[];a&&(a.split("").some(S=>{p.length!==6&&(Number.isNaN(S)||p.push(S))}),this.smsCodeForm.reset(),Object.keys(this.smsCodeForm.controls).forEach((S,g)=>{this.smsCodeForm.controls[S].setValue(p[g]||void 0)}))}resendSmsCode(){let e=f.mapStartActivationRequest(this.selectedPhoneNumber);this.manageStreamingOptionService.getSmsValidationCode(this.messageGroupName,e).subscribe({})}onSubmit(){if(this.smsCodeForm.invalid)this.isStepCompleted=!1;else{this.wrongCode=!1;let e=f.mapActivateStreamingRequest(this.option,this.productIdentifier);e.mobileNumber=this.selectedPhoneNumber,e.accessCode=this.otpCode,this.isStepCompleted=!1,this.manageStreamingOptionService.activateStreaming(this.messageGroupName,e).subscribe({next:t=>{this.activateStatusResponse.emit(t),this.isStepCompleted=!0,this.manageStreamingOptionsDatalayerService.sendSmsValidationSuccessEvent()},error:t=>{let p=t.toString().split("[")[1].split("]")[0].match(/code\s*:\s*(\w+)/);this.wrongCode=!0,this.isStepCompleted=!1,p&&p.toString().match(c.INVALID_SMS_CODE_JWT_ERRORCODE)&&this.messageService.clearMessages(this.messageGroupName)}})}}maskPhoneNumber(e){let t="*".repeat(8),a=e?.substring(8);return t+a}onInput(e,t){let p=e.target.value;p.length>1&&t.setValue(p.charAt(0))}reset(){this.wrongCode&&(this.wrongCode=!1,this.smsCodeForm.reset())}static{this.\u0275fac=function(t){return new(t||i)(s.\u0275\u0275directiveInject(L),s.\u0275\u0275directiveInject(w),s.\u0275\u0275directiveInject(I))}}static{this.\u0275cmp=s.\u0275\u0275defineComponent({type:i,selectors:[["app-generate-sms-code"]],inputs:{selectedPhoneNumber:"selectedPhoneNumber",productIdentifier:"productIdentifier",option:"option"},outputs:{activateStatusResponse:"activateStatusResponse"},standalone:!1,features:[s.\u0275\u0275ProvidersFeature([Et()])],decls:25,vars:17,consts:[[1,"form-view","mb--xxl"],[1,"pid-profile__form-container","mobile-verification"],[1,"description","display--flex","justify-content--left"],[1,"note","display--flex","justify-content--left"],["tgGridRow","",1,"p--n","m--n",3,"formGroup"],[1,"form-group__changePinCode"],["class","form__input--single-number","required","true","type","number","maxLength","1",3,"error","hideLabel","showError","formControlName","showPlaceHolder","paste","keyup","click",4,"ngFor","ngForOf"],["class","formErrorInput ml--xxxs",4,"ngIf"],[1,"overlay__section__content__action","display--flex","justify-content--between"],[1,"text-weight--g","underline","cur-pointer","text-align--left",3,"click"],[1,"icon","icon-swap"],[1,"ml--s"],[1,"button","button--primary",3,"click","disabled"],["required","true","type","number","maxLength","1",1,"form__input--single-number",3,"paste","keyup","click","error","hideLabel","showError","formControlName","showPlaceHolder"],[1,"formErrorInput","ml--xxxs"]],template:function(t,a){t&1&&(s.\u0275\u0275elementStart(0,"div",0)(1,"div",1)(2,"div",2)(3,"p"),s.\u0275\u0275text(4),s.\u0275\u0275pipe(5,"translate"),s.\u0275\u0275elementEnd()(),s.\u0275\u0275elementStart(6,"div",3)(7,"p"),s.\u0275\u0275text(8),s.\u0275\u0275pipe(9,"translate"),s.\u0275\u0275elementEnd()(),s.\u0275\u0275elementStart(10,"div",4)(11,"div",5),s.\u0275\u0275template(12,ft,1,6,"tg-form-input",6),s.\u0275\u0275elementEnd()(),s.\u0275\u0275template(13,vt,3,3,"div",7),s.\u0275\u0275elementEnd()(),s.\u0275\u0275elementStart(14,"div",8)(15,"div",9),s.\u0275\u0275listener("click",function(){return a.resendSmsCode()}),s.\u0275\u0275element(16,"i",10),s.\u0275\u0275elementStart(17,"span",11),s.\u0275\u0275text(18),s.\u0275\u0275pipe(19,"translate"),s.\u0275\u0275elementEnd()(),s.\u0275\u0275elementStart(20,"div")(21,"button",12),s.\u0275\u0275listener("click",function(){return a.onSubmit()}),s.\u0275\u0275elementStart(22,"span"),s.\u0275\u0275text(23),s.\u0275\u0275pipe(24,"translate"),s.\u0275\u0275elementEnd()()()()),t&2&&(s.\u0275\u0275advance(4),s.\u0275\u0275textInterpolate(s.\u0275\u0275pipeBind1(5,9,"ng.manage-streaming-options.validate-sms-code
1-description")),s.\u0275\u0275advance(4),s.\u0275\u0275textInterpolate2("",s.\u0275\u0275pipeBind1(9,11,"ng.manage-streaming-options.validate-sms-code-note"),"",a.maskedPhoneNumber),s.\u0275\u0275advance(2),s.\u0275\u0275property("formGroup",a.smsCodeForm),s.\u0275\u0275advance(2),s.\u0275\u0275property("ngForOf",a.pins),s.\u0275\u0275advance(),s.\u0275\u0275property("ngIf",a.wrongCode),s.\u0275\u0275advance(5),s.\u0275\u0275textInterpolate(s.\u0275\u0275pipeBind1(19,13,"ng.manage-streaming-options.resend.sms")),s.\u0275\u0275advance(3),s.\u0275\u0275property("disabled",!a.isStepCompleted),s.\u0275\u0275advance(2),s.\u0275\u0275textInterpolate(s.\u0275\u0275pipeBind1(24,15,"ng.manage-streaming-options.send")))},dependencies:[J.NgForOf,J.NgIf,T.NgControlStatus,T.NgControlStatusGroup,T.RequiredValidator,T.FormGroupDirective,T.FormControlName,B,pe,we.TranslatePipe],encapsulation:2})}}return i})();import*as Fe from"@ngx-translate/core";function Nt(i,m){i&1&&(r.\u0275\u0275elementStart(0,"div")(1,"div")(2,"b",9),r.\u0275\u0275text(3),r.\u0275\u0275pipe(4,"translate"),r.\u0275\u0275elementEnd(),r.\u0275\u0275elementStart(5,"div",10)(6,"p",11),r.\u0275\u0275text(7),r.\u0275\u0275pipe(8,"translate"),r.\u0275\u0275elementEnd(),r.\u0275\u0275elementStart(9,"div",12)(10,"b"),r.\u0275\u0275text(11),r.\u0275\u0275pipe(12,"translate"),r.\u0275\u0275elementEnd()(),r.\u0275\u0275elementStart(13,"ol"),r.\u0275\u0275element(14,"div",13),r.\u0275\u0275pipe(15,"translate"),r.\u0275\u0275elementEnd(),r.\u0275\u0275elementStart(16,"p",14),r.\u0275\u0275text(17),r.\u0275\u0275pipe(18,"translate"),r.\u0275\u0275elementEnd()()()()),i&2&&(r.\u0275\u0275advance(3),r.\u0275\u0275textInterpolate1(" ",r.\u0275\u0275pipeBind1(4,5,"ng.manage-streaming-options.info.title")," "),r.\u0275\u0275advance(4),r.\u0275\u0275textInterpolate1(" ",r.\u0275\u0275pipeBind1(8,7,"ng.manage-streaming-options.info.body")," "),r.\u0275\u0275advance(4),r.\u0275\u0275textInterpolate(r.\u0275\u0275pipeBind1(12,9,"ng.manage-streaming-options.how.to.activate")),r.\u0275\u0275advance(3),r.\u0275\u0275property("innerHTML",r.\u0275\u0275pipeBind1(15,11,"ng.manage-streaming-options.activation.guide"),r.\u0275\u0275sanitizeHtml),r.\u0275\u0275advance(3),r.\u0275\u0275textInterpolate(r.\u0275\u0275pipeBind1(18,13,"ng.manage-streaming-options.enjoy.watching")))}function Rt(i,m){if(i&1&&(r.\u0275\u0275elementStart(0,"div")(1,"div",23)(2,"div",24),r.\u0275\u0275element(3,"input",25)(4,"label",26),r.\u0275\u0275elementEnd(),r.\u0275\u0275elementStart(5,"label",27),r.\u0275\u0275text(6),r.\u0275\u0275elementEnd()()()),i&2){let e=m.$implicit;r.\u0275\u0275advance(3),r.\u0275\u0275property("id",r.\u0275\u0275interpolate1("radio-",e.id))("value",e.identifier),r.\u0275\u0275advance(),r.\u0275\u0275property("for",r.\u0275\u0275interpolate1("radio-",e.id)),r.\u0275\u0275advance(),r.\u0275\u0275property("for",r.\u0275\u0275interpolate1("radio-",e.id)),r.\u0275\u0275advance(),r.\u0275\u0275textInterpolate(e.identifier)}}function At(i,m){if(i&1){let e=r.\u0275\u0275getCurrentView();r.\u0275\u0275elementStart(0,"div")(1,"b",15)(2,"strong",16),r.\u0275\u0275text(3),r.\u0275\u0275pipe(4,"translate"),r.\u0275\u0275elementEnd()(),r.\u0275\u0275elementStart(5,"div",17),r.\u0275\u0275text(6),r.\u0275\u0275pipe(7,"translate"),r.\u0275\u0275elementEnd(),r.\u0275\u0275elementStart(8,"div",18)(9,"strong",16),r.\u0275\u0275text(10),r.\u0275\u0275pipe(11,"translate"),r.\u0275\u0275elementEnd()(),r.\u0275\u0275elementStart(12,"form",19),r.\u0275\u0275template(13,Rt,7,8,"div",20),r.\u0275\u0275elementEnd(),r.\u0275\u0275elementStart(14,"div",21)(15,"span",22),r.\u0275\u0275listener("click",function(){r.\u0275\u0275restoreView(e);let a=r.\u0275\u0275nextContext(2);return r.\u0275\u0275resetView(a.toggleAuthenticationPossible())}),r.\u0275\u0275elementStart(16,"a"),r.\u0275\u0275text(17),r.\u0275\u0275pipe(18,"translate"),r.\u0275\u0275elementEnd()()()()}if(i&2){let e=r.\u0275\u0275nextContext(2);r.\u0275\u0275advance(3),r.\u0275\u0275textInterpolate1(" ",r.\u0275\u0275pipeBind1(4,6,"ng.manage-streaming-options.title.authentification")," "),r.\u0275\u0275advance(3),r.\u0275\u0275textInterpolate1(" ",r.\u0275\u0275pipeBind1(7,8,"ng.manage-streaming-options.information")," "),r.\u0275\u0275advance(4),r.\u0275\u0275textInterpolate1(" ",r.\u0275\u0275pipeBind1(11,10,"ng.manage-streaming-options.choose.number")," "),r.\u0275\u0275advance(2),r.\u0275\u0275property("formGroup",e.mobileNumberFormGroup),r.\u0275\u0275advance(),r.\u0275\u0275property("ngForOf",e.mobileLines),r.\u0275\u0275advance(4),r.\u0275\u0275textInterpolate1("",r.\u0275\u0275pipeBind1(18,12,"ng.manage-streaming-options.number.not.foun
1d")," ")}}function bt(i,m){if(i&1&&(r.\u0275\u0275elementStart(0,"div"),r.\u0275\u0275template(1,Nt,19,15,"div",7)(2,At,19,14,"div",7),r.\u0275\u0275elementEnd()),i&2){let e=r.\u0275\u0275nextContext();r.\u0275\u0275advance(),r.\u0275\u0275property("ngIf",!e.authenticationPossible||!(e.mobileLines!=null&&e.mobileLines.length)&&!e.showSmsValidation),r.\u0275\u0275advance(),r.\u0275\u0275property("ngIf",e.authenticationPossible&&e.mobileLines.length&&!e.showSmsValidation)}}function Ot(i,m){if(i&1){let e=r.\u0275\u0275getCurrentView();r.\u0275\u0275elementStart(0,"div")(1,"app-generate-sms-code",28),r.\u0275\u0275listener("activateStatusResponse",function(a){r.\u0275\u0275restoreView(e);let p=r.\u0275\u0275nextContext();return r.\u0275\u0275resetView(p.closeDialogWithResult(a))}),r.\u0275\u0275elementEnd()()}if(i&2){let e=r.\u0275\u0275nextContext();r.\u0275\u0275advance(),r.\u0275\u0275property("productIdentifier",e.data.productIdentifier)("selectedPhoneNumber",e.selectedPhoneNumber)("option",e.data.option)}}function xt(i,m){if(i&1){let e=r.\u0275\u0275getCurrentView();r.\u0275\u0275elementStart(0,"div")(1,"button",29),r.\u0275\u0275listener("click",function(){r.\u0275\u0275restoreView(e);let a=r.\u0275\u0275nextContext();return r.\u0275\u0275resetView(a.onSubmit())}),r.\u0275\u0275elementStart(2,"span"),r.\u0275\u0275text(3),r.\u0275\u0275pipe(4,"translate"),r.\u0275\u0275elementEnd()()()}if(i&2){let e=r.\u0275\u0275nextContext();r.\u0275\u0275advance(),r.\u0275\u0275property("disabled",!e.stepCompleted),r.\u0275\u0275advance(2),r.\u0275\u0275textInterpolate1(" ",r.\u0275\u0275pipeBind1(4,2,"ng.manage-streaming-options.send.sms")," ")}}var ke=(()=>{class i{constructor(e,t,a,p,S,g,N){this.data=e,this.dialogRef=t,this.urlService=a,this.productService=p,this.messageService=S,this.manageStreamingOptionService=g,this.manageStreamingOptionsDatalayerService=N,this.mobileLines=[],this.stepCompleted=!0,this.messageGroupName=c.MESSAGE_GROUP_NAME_VALIDATION_DIALOG,this.authenticationPossible=!0,this.showSmsValidation=!1,this.mobileNumberFormGroup=new Tt({mobileNumber:new Ct})}ngOnInit(){this.currentStep=1,this.loadMobileLines()}loadMobileLines(){this.productService.getProductLinesByType(this.messageGroupName,j.PRODUCT_TYPE_MOBILE,"").subscribe(e=>{setTimeout(()=>{this.mobileLines=e.filter(t=>!t.isDataOnlyPlan),this.mobileLines&&this.mobileLines.length>0&&(this.manageStreamingOptionsDatalayerService.sendFlowStartEvent(),this.manageStreamingOptionsDatalayerService.addPageIdEvent(_.PAGE_ID_FRAUD_PREVENTION_STEP_ONE),this.mobileNumberFormGroup.setValue({mobileNumber:this.mobileLines[0].identifier}),this.selectedPhoneNumber=this.mobileNumberFormGroup.value.mobileNumber)},0)})}onSubmit(){this.selectedPhoneNumber=this.mobileNumberFormGroup.value.mobileNumber;let e=f.mapStartActivationRequest(this.selectedPhoneNumber);this.manageStreamingOptionService.getSmsValidationCode(this.messageGroupName,e).subscribe({complete:()=>{this.currentStep++,this.messageService.clearMessages(this.messageGroupName)},error:t=>{}})}toggleAuthenticationPossible(){this.manageStreamingOptionsDatalayerService.sendNumberIsNotInTheListClickEvent(),this.authenticationPossible=!this.authenticationPossible,this.manageStreamingOptionsDatalayerService.addPageIdEvent(_.PAGE_ID_AUTHENTICATION_NOT_POSSIBLE)}isStepCompleted(e){this.stepCompleted=e}closeDialogWithResult(e){this.dialogRef.close(e)}closeDialog(){this.dialogRef.close(),this.manageStreamingOptionsDatalayerService.sendSmsValidationClickCloseEvent()}static{this.\u0275fac=function(t){return new(t||i)(r.\u0275\u0275directiveInject(It),r.\u0275\u0275directiveInject(Ge.MatDialogRef),r.\u0275\u0275directiveInject(x),r.\u0275\u0275directiveInject(C),r.\u0275\u0275directiveInject(I),r.\u0275\u0275directiveInject(L),r.\u0275\u0275directiveInject(w))}}static{this.\u0275cmp=r.\u0275\u0275defineComponent({type:i,selectors:[["tg-user-validation-dialog"]],inputs:{mobileLines:"mobileLines",isBehindModem:"isBehindModem"},standalone:!1,decls:11,vars:4,consts:[[1,"overlay"],[1,"overlay__mask","overlay__mask--backdrop","backdrop-filter--3","animation--fade-in"],[1,"overlay__section","overlay__section--align-top","py--g--sm","py--l","py--xxxg--md"],[1,"overlay__section__content--wrapper","animation--slide-down-to-screen"],[1,"overlay__section__content__close"],[1,"icon","icon-cross",3,"click"],[3,"messageGroupName"],[4,"ngIf"],[1,"overlay__section__content__action","display--flex","justify-content--end"],[1,"text--l"],[1,"text--xm"],[1,"my--m"],[1,"mb--s"],[3,"innerHTML"],[1,"mt--l"],[1,"text-align--left","text--xl--sm","mb--xxs"],[1,"font-weight-bold"],[1,"text-align--left","text--xm--sm","text--m","mb--xl","mt--s"],[1,"text-align--left","text--xm--sm","text--m","mb--m"],[1,"mb--l",3,"formGroup"],[4,"ngFor","ngForOf"],[1,"text-align--left","text--xm--sm","text--m","mb--s"],[2,"text-decoration","underline",3,"click"],[1,"radio-checkbox","mb--m"],[1,"radio","form__radio",2,"--animation-delay","0"],["type","radio","formControlName","mobileNumber","checked","checked",1,"form__radio__input",3,"value","id"],[1,"form__radio__label",3,"for"],[1,"label--large",3,"for"],[3,"activateStatusResponse","productIdentifier","selectedPhoneNumber","option"],[1,"button","button--primary",3,"click","disabled"]],template:function(t,a){t&1&&(r.\u0275\u0275elementStart(0,"div",0),r.\u0275\u0275element(1,"div",1),r.\u0275\u0275elementStart(2,"div",2)(3,"div",3)(4,"div",4)(5,"div",5),r.\u0275\u0275listener("click",function(){return a.closeDialog()}),r.\u0275\u0275elementEnd()(),r.\u0275\u0275element(6,"app-message-flow",6),r.\u0275\u0275template(7,bt,3,2,"div",7)(8,Ot,2,3,"div",7),r.\u0275\u0275elementStart(9,"div",8),r.\u0275\u0275template(10,xt,5,4,"div",7),r.\u0275\u0275elementEnd()()()()),t&2&&(r.\u0275\u0275advance(6),r.\u0275\u0275property("messageGroupName",a.messageGroupName),r.\u0275\u0275advance(),r.\u0275\u0275property("ngIf",a.currentStep===1),r.\u0275\u0275advance(),r.\u0275\u0275property("ngIf",a.currentStep===2),r.\u0275\u0275advance(2),r.\u0275\u0275property("ngIf",a.authenticationPossible&&a.currentStep===1&&a.mobileLines.length))},dependencies:[z.NgForOf,z.NgIf,D,v.\u0275NgNoValidate,v.DefaultValueAccessor,v.RadioControlValueAccessor,v.NgControlStatus,v.NgControlStatusGroup,v.FormGroupDirective,v.FormControlName,Ue,Fe.TranslatePipe],encapsulation:2})}}return i})();import*as o from"@angular/core";import*as Be from"@ngxs/store";import*as X from"@telenet/ng-lib-ocapi";import*as je from"@angular/material/dialog";import*as b from"@angular/common";import*as He from"@ngx-translate/core";var yt=(i,m,e,t)=>({optionLabel:i,activeStatus:m,productId:e,category:t});function Pt(i,m){if(i&1&&(o.\u0275\u0275elementContainerStart(0),o.\u0275\u0275elementStart(1,"div",5)(2,"span",6),o.\u0275\u0275text(3),o.\u0275\u0275pipe(4,"translate"),o.\u0275\u0275elementEnd(),o.\u0275\u0275elementStart(5,"a",7),o.\u
10275\u0275text(6),o.\u0275\u0275pipe(7,"translate"),o.\u0275\u0275elementEnd()(),o.\u0275\u0275elementContainerEnd()),i&2){let e=o.\u0275\u0275nextContext();o.\u0275\u0275advance(3),o.\u0275\u0275textInterpolate(o.\u0275\u0275pipeBind1(4,4,"ng.general-login.lbl.not-logged-in")),o.\u0275\u0275advance(2),o.\u0275\u0275property("href",o.\u0275\u0275interpolate(e.loginRedirectUrl),o.\u0275\u0275sanitizeUrl),o.\u0275\u0275advance(),o.\u0275\u0275textInterpolate(o.\u0275\u0275pipeBind1(7,6,"ng.general-login.btn.not-logged-in"))}}function Vt(i,m){if(i&1&&(o.\u0275\u0275elementContainerStart(0),o.\u0275\u0275elementStart(1,"div",9),o.\u0275\u0275elementContainer(2,10),o.\u0275\u0275elementEnd(),o.\u0275\u0275elementContainerEnd()),i&2){let e=m.$implicit;o.\u0275\u0275nextContext(2);let t=o.\u0275\u0275reference(6);o.\u0275\u0275advance(2),o.\u0275\u0275property("ngTemplateOutlet",t)("ngTemplateOutletContext",o.\u0275\u0275pureFunction4(2,yt,e.label,e.status,e.productId,e.category))}}function Lt(i,m){if(i&1&&(o.\u0275\u0275elementContainerStart(0),o.\u0275\u0275template(1,Vt,3,7,"ng-container",8),o.\u0275\u0275elementContainerEnd()),i&2){let e=o.\u0275\u0275nextContext();o.\u0275\u0275advance(),o.\u0275\u0275property("ngForOf",e.sortedStreamingOptions)}}function wt(i,m){i&1&&(o.\u0275\u0275elementStart(0,"h5"),o.\u0275\u0275text(1),o.\u0275\u0275pipe(2,"translate"),o.\u0275\u0275elementEnd()),i&2&&(o.\u0275\u0275advance(),o.\u0275\u0275textInterpolate(o.\u0275\u0275pipeBind1(2,1,"ng.manage-streaming-options.account-activation")))}function Ut(i,m){i&1&&o.\u0275\u0275element(0,"i",27)}function Gt(i,m){if(i&1&&(o.\u0275\u0275elementStart(0,"span",28)(1,"p"),o.\u0275\u0275text(2),o.\u0275\u0275pipe(3,"translate"),o.\u0275\u0275elementEnd(),o.\u0275\u0275elementStart(4,"strong",29),o.\u0275\u0275text(5),o.\u0275\u0275elementEnd()()),i&2){let e=o.\u0275\u0275nextContext(2);o.\u0275\u0275advance(2),o.\u0275\u0275textInterpolate(o.\u0275\u0275pipeBind1(3,2,"ng.manage-streaming-options.recover-disney-id")),o.\u0275\u0275advance(3),o.\u0275\u0275textInterpolate(e.disneyReferenceId)}}function Ft(i,m){if(i&1){let e=o.\u0275\u0275getCurrentView();o.\u0275\u0275elementStart(0,"div",11),o.\u0275\u0275element(1,"h2",12),o.\u0275\u0275pipe(2,"translate"),o.\u0275\u0275elementStart(3,"div",13),o.\u0275\u0275element(4,"span",14),o.\u0275\u0275pipe(5,"translate"),o.\u0275\u0275elementEnd()(),o.\u0275\u0275element(6,"div",15)(7,"h3",16),o.\u0275\u0275pipe(8,"translate"),o.\u0275\u0275elementStart(9,"div",17)(10,"div",18)(11,"div",19),o.\u0275\u0275template(12,wt,3,3,"h5",4),o.\u0275\u0275element(13,"p",20),o.\u0275\u0275pipe(14,"translate"),o.\u0275\u0275elementStart(15,"a",21),o.\u0275\u0275listener("click",function(){let a=o.\u0275\u0275restoreView(e).productId,p=o.\u0275\u0275nextContext();return o.\u0275\u0275resetView(p.goToActivateOrRecoverStreaming(a))}),o.\u0275\u0275element(16,"span",22),o.\u0275\u0275pipe(17,"translate"),o.\u0275\u0275template(18,Ut,1,0,"i",23),o.\u0275\u0275elementEnd()()(),o.\u0275\u0275elementStart(19,"div",24),o.\u0275\u0275element(20,"span",25),o.\u0275\u0275pipe(21,"translate"),o.\u0275\u0275template(22,Gt,6,4,"span",26),o.\u0275\u0275elementEnd()()}if(i&2){let e=m.optionLabel,t=m.activeStatus,a=m.category,p=o.\u0275\u0275nextContext();o.\u0275\u0275advance(),o.\u0275\u0275property("innerHTML",o.\u0275\u0275pipeBind1(2,10,e),o.\u0275\u0275sanitizeHtml),o.\u0275\u0275advance(3),o.\u0275\u0275property("ngClass",p.isStatusInactive(t)?"status-indicator--negative":"status-indicator--positive")("innerHTML",o.\u0275\u0275pipeBind1(5,12,p.getStatusLabelKey(t)),o.\u0275\u0275sanitizeHtml),o.\u0275\u0275advance(3),o.\u0275\u0275property("innerHTML",o.\u0275\u0275pipeBind1(8,14,p.getServiceHeader(t,e)),o.\u0275\u0275sanitizeHtml),o.\u0275\u0275advance(5),o.\u0275\u0275property("ngIf",p.isStatusInactive(t)),o.\u0275\u0275advance(),o.\u0275\u0275property("innerHTML",o.\u0275\u0275pipeBind1(14,16,p.getParagraph(t,e)),o.\u0275\u0275sanitizeHtml),o.\u0275\u0275advance(3),o.\u0275\u0275property("innerHTML",o.\u0275\u0275pipeBind1(17,18,p.getServiceButtonText(t,e)),o.\u
10275\u0275sanitizeHtml),o.\u0275\u0275advance(2),o.\u0275\u0275property("ngIf",p.isStatusInactive(t)),o.\u0275\u0275advance(2),o.\u0275\u0275property("innerHtml",o.\u0275\u0275pipeBind1(21,20,p.getInformationMessage(t,e)),o.\u0275\u0275sanitizeHtml),o.\u0275\u0275advance(2),o.\u0275\u0275property("ngIf",p.disneyReferenceId&&p.isDisney(a))}}var kt=[Q],We=(()=>{class i extends re{constructor(e,t,a,p,S,g,N,G,nt){super(),this.store=e,this.urlService=t,this.messageService=a,this.translationService=p,this.loginService=S,this.manageStreamingOptionService=g,this.productService=N,this.manageStreamingOptionsDatalayerService=G,this.dialog=nt,this.customerProducts$=this.store.select(U.customerProductHoldings),this.messageGroupName=c.MESSAGE_GROUP_NAME,this.scopes=["productholding","manageproductholding"],this.streamingServiceDetails=[],this.isUserConnect=void 0}initAfterLoggedIn(){this.messageService.clearMessages(c.MESSAGE_GROUP_NAME),this.loginService.getLoginDetails().subscribe(e=>{this.isValidUser=e&&(e.isManager()||e.isContractHolder()),this.isValidUser&&(this.loadCustomerProductsHolding(),this.populateStreamingServiceDetails())}),this.productService.getProductLinesByType(this.messageGroupName,j.PRODUCT_TYPE_MOBILE,"").subscribe(e=>{this.mobileLines=e.filter(t=>t.isDataOnlyPlan===!1)})}loadCustomerProductsHolding(){let e=M.PRODUCT_STATUS_ACTIVE.concat(",").concat(M.PRODUCT_STATUS_PENDING),t={messageGroupName:c.MESSAGE_GROUP_NAME,status:e};this.store.dispatch(new ue(t)).pipe(Dt(()=>this.store.select(U.customerProductHoldings).pipe(Mt(1)))).subscribe(a=>{h(a)&&this.messageService.addMessage(new se(c.MESSAGE_GROUP_NAME,c.WARNING_NO_CUSTOMER_PRODUCTS))})}get sortedStreamingServiceDetails(){return this.streamingServiceDetails.sort(this.compareStreamingServiceDetails())}populateStreamingServiceDetails(){this.customerProducts$.subscribe(e=>{(this.isFraudPreventionEnabled||this.enableNewActivationFlow)&&this.setProductIdentifier(e?.find(t=>t.lineLevelProducts?.find(a=>a.category===c.INTERNET))),e.forEach(t=>{t.options.forEach(a=>{let p=c.NOT_ACTIVE.match(a.status),S=this.isReadyForRecover(a);(p||S)&&this.isOttServicePresent(a.productInfo.productId)&&!this.isActiveYoutube(a.status,a.productInfo.productId)&&this.addStreamingOption(this.mapStreamingOptions(a,t.identifier))})}),this.sortedStreamingOptions=this.sortedStreamingServiceDetails})}setProductIdentifier(e){e!==void 0&&e.productInfo!==void 0&&(this.productIdentifier=e.identifier,this.setDeviceStatus())}isReadyForRecover(e){return e.status===c.ACTIVE&&(!kt.includes(e.productInfo.productId)||this.isGenericRecoverFlowEnabled)}mapStreamingOptions(e,t){let a={};return a.status=e.status,a.affiliateSubscriptionId=t,a.businessId=e.chars?.businessId,a.category=this.getStreamingCategory(e),a.productId=e.productInfo.productId,a.label=this.getLocalisedName(e,this.translationService.getLocale()),a}getStreamingCategory(e){return e.productInfo.categories?.includes(c.STANDALONE)?(e.productInfo.subCategory?.name?.toUpperCase()||"").includes(c.DISNEY)?c.DISNEY:c.NETFLIX:""}goToActivateOrRecoverStreaming(e){this.messageService.clearMessages(c.MESSAGE_GROUP_NAME),this.messageService.clearMessages(c.MESSAGE_GROUP_NAME_VALIDATION_DIALOG),this.manageStreamingOptionsDatalayerService.addPageIdEvent(_.PAGE_ID_MANAGE_STREAMING_OPTIONS);let t=this.streamingServiceDetails.find(a=>a.productId===e);c.NOT_ACTIVE.match(t.status)?(this.sendButtonClickedEvent(t.label,_.EVENT_ITEM_NAME_ACTIVATE_STREAMING,t.productId),this.enableNewActivationFlow?this.triggerActivateStreaming(t):!this.isUserConnect&&this.isFraudPreventionEnabled?this.openUserValidationDialogComponent(t):this.triggerActivateStreaming(t)):t.status===M.PRODUCT_STATUS_ACTIVE&&(this.sendButtonClickedEvent(t.label,_.EVENT_ITEM_NAME_RESET_CREDENTIALS,t.productId),this.triggerRecoverStreaming(t))}triggerActivateStreaming(e){if(this.enableNewActivationFlow){let t={productIdentifier:this.productIdentifier,affiliateSubscriptionId:e.businessId,alias:e.affiliateSubscriptionId};this.obs(this.manageStreamingOptionService.activateStreamingOption(c.MESSAGE_GROUP_NAME,t)).subscribe(a=>this.navigateToStreamingUrl(a.body.tokenActivationUrl))}else{let t=f.mapActivateStreamingRequest(e,this.productIdentifier);this.obs(this.manageStreamingOptionService.activateStreaming(c.MESSAGE_GROUP_NAME,t)).subscribe(a=>{this.redirectToActivationUrl(a)})}}redirectToActivationUrl(e){e!==null&&e.statusDescription===c.SUCCESS&&this.navigateToStreamingUrl(e.tokenActivationUrl)}triggerRecoverStreaming(e){if(this.enableNewActivationFlow){let t={alias:e.affiliateSubscriptionId,affiliateSubscriptionId:e.businessId,name:e.category};this.obs(this.manageStreamingOptionService.recoverStreamingOption(c.MESSAGE_GROUP_NAME,t)).subscribe(a=>this.navigateToStreamingUrl(a.accountRecoveryUrl))}else{let t=f.mapRecoverStreamingRequest(e,this.isGenericRecoverFlowEnabled);this.obs(this.manageStreamingOptionService.recoverStreaming(c.MESSAGE_GROUP_NAME,t)).subscribe({next:a=>{e.category!==c.RECOVER_NETFLIX_SUBSCRIPTION_NAME?this.setDisneyReferenceId(a):this.redirectToRecoverUrl(a)},error:a=>{this.messageService.addMessage(new O(this.messageGroupName,`${this.messageGroupName}.${a.code}`))}})}}setDisneyReferenceId(e){e.extReferenceId&&(this.disneyReferenceId=e.extReferenceId)}redirectToRecoverUrl(e){e!==null&&e.statusDescription===c.SUCCESS&&this.navigateToStreamingUrl(e.accountRecoveryUrl)}openResponsePageUrl(e){this.urlService.redirectTo(e)}navigateToStreamingUrl(e){this.messageService.addMessage(new k(this.messageGroupName,this.messageGroupName+c.ACTIVATION_SUCCESS_MESSAGE_KEY)),this.openResponsePageUrl(e)}addStreamingOption(e){this.streamingServiceDetails.push(e)}isOttServicePresent(e){return ne(this.ottServiceProductsAllowed,",").some(a=>a===e)}getText(e){return this.translationService.getText(c.MESSAGE_GROUP_NAME,e)}getInformationMessage(e,t){return e===c.ACTIVE?this.getText(this.formatOptionLabel(t)+c.ACTIVE_GUIDELINES):this.getText(this.formatOptionLabel(t)+c.ACTIVATE_STEPS_TO_ACTIVATE)}getServiceHeader(e,t){return e===c.ACTIVE?this.getText(this.formatOptionLabel(t)+c.ACTIVE_TITLE):this.getText(this.formatOptionLabel(t)+c.ACTIVATION_HEADER)}getServiceButtonText(e,t){return e===c.ACTIVE?this.getText(this.formatOptionLabel(t)+c.RESET_PASSWORD_BUTTON):this.getText(this.formatOptionLabel(t)+c.ACTIVATION_BUTTON)}getParagraph(e,t){if(e===c.ACTIVE)return this.getText(c.RESET_PASSWORD)}formatOptionLabel(e){return e.toLowerCase().replace("+","-plus").split(" ")[0]}getStatusLabelKey(e){return e===c.ACTIVE?this.getText(c.SUBSCRIPTION_ACTIVE_STATUS):this.getText(c.SUBSCRIPTION_NOT_ACTIVE_STATUS)}isStatusInactive(e){return!c.ACTIVE.match(e)}getLocalisedName(e,t){let a=(e.productInfo?.localizedContent||[]).find(p=>p.locale===t);return a?a.name:e.label}compareStreamingServiceDetails(){return(e,t)=>e.status===c.ACTIVE&&t.status!==c.ACTIVE?1:e.status!==c.ACTIVE&&t.status===c.ACTIVE?-1:e.productId===Q?1:-1}setDeviceStatus(){this.manageStreamingOptionService.validateActivation(c.MESSAGE_GROUP_NAME,this.productIdentifier).subscribe({next:e=>{this.isUserConnect=e.status===200}})}openUserValidationDialogComponent(e){this.dialog.open(ke,{data:{productIdentifier:this.productIdentifier,selectedTelephoneNumber:this.selectedTelephoneNumber,option:e}}).afterClosed().subscribe(a=>{a!==void 0&&this.redirectToActivationUrl(a)})}handlePhoneNumberSelected(e){this.selectedTelephoneNumber=e}sendButtonClickedEvent(e,t,a){this.manageStreamingOptionsDatalayerService.sendActivateOrRecoverButtonClickEvent(t,e,a)}trackByProductId(e,t){return t.productId}isDisney(e){return e===c.DISNEY}isActiveYoutube(e,t){return e===c.ACTIVE&&_e.includes(t)}static{this.\u0275fac=function(t){return new(t||i)(o.\u0275\u0275directiveInject(Be.Store),o.\u0275\u0275directiveInject(x),o.\u0275\u0275directiveInject(I),o.\u0275\u0275directiveInject(ge),o.\u0275\u0275directiveInject(X.LoginService),o.\u0275\u0275directiveInject(L),o.\u
10275\u0275directiveInject(C),o.\u0275\u0275directiveInject(w),o.\u0275\u0275directiveInject(je.MatDialog))}}static{this.\u0275cmp=o.\u0275\u0275defineComponent({type:i,selectors:[["tg-manage-streaming-options"]],inputs:{ottServiceProductsAllowed:"ottServiceProductsAllowed",loginRedirectUrl:"loginRedirectUrl",pageType:"pageType",enableLoader:"enableLoader",enableMask:"enableMask",isFraudPreventionEnabled:"isFraudPreventionEnabled",isGenericRecoverFlowEnabled:"isGenericRecoverFlowEnabled",enableNewActivationFlow:"enableNewActivationFlow"},standalone:!1,features:[o.\u0275\u0275InheritDefinitionFeature],decls:7,vars:6,consts:[["optionElement",""],[3,"componentCanRender","messageGroupName","scopes"],[3,"messageGroupName"],[3,"pageType"],[4,"ngIf"],[1,"notification","notification--warning"],[1,"icon","icon-error-shape","warn"],[1,"button","button--primary","cta-secondary",3,"href"],[4,"ngFor","ngForOf"],[1,"p--m","content-section","mb-40"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"display--flex","align-items--center","pb--m"],[1,"heading--nomargin",3,"innerHTML"],[1,"ml--s"],[1,"status-indicator",3,"ngClass","innerHTML"],[1,"divider","divider--s__light-grey"],[1,"my--m",3,"innerHTML"],[1,"row","m--n","p--n"],[1,"col-12","col-md-4","mb\u2014m"],[1,"background-shade_08","p--xl","section","display--flex","flex-direction--column"],[1,"mt--xs",3,"innerHTML"],["href","javascript:void(0)",1,"button","button__icon--position-right","mt--xxl","button--width-auto",3,"click"],[1,"text--m",3,"innerHTML"],["class","icon-md icon icon-external-link mb--xxs",4,"ngIf"],[1,"col-12","col-md-8"],[3,"innerHtml"],["class","m--n mt--l ml--m background-shade_08 p--m section display--flex col-12 col-md-9",4,"ngIf"],[1,"icon-md","icon","icon-external-link","mb--xxs"],[1,"m--n","mt--l","ml--m","background-shade_08","p--m","section","display--flex","col-12","col-md-9"],[1,"ml--xxs"]],template:function(t,a){if(t&1){let p=o.\u0275\u0275getCurrentView();o.\u0275\u0275elementStart(0,"tg-login",1),o.\u0275\u0275listener("componentCanRender",function(){return o.\u0275\u0275restoreView(p),o.\u0275\u0275resetView(a.initAfterLoggedIn())}),o.\u0275\u0275element(1,"app-message-flow",2)(2,"app-loader",3),o.\u0275\u0275template(3,Pt,8,8,"ng-container",4)(4,Lt,2,1,"ng-container",4)(5,Ft,23,22,"ng-template",null,0,o.\u0275\u0275templateRefExtractor),o.\u0275\u0275elementEnd()}t&2&&(o.\u0275\u0275property("messageGroupName",a.messageGroupName)("scopes",a.scopes),o.\u0275\u0275advance(),o.\u0275\u0275property("messageGroupName",a.messageGroupName),o.\u0275\u0275advance(),o.\u0275\u0275property("pageType",a.pageType),o.\u0275\u0275advance(),o.\u0275\u0275property("ngIf",!a.isValidUser),o.\u0275\u0275advance(),o.\u0275\u0275property("ngIf",a.isValidUser))},dependencies:[b.NgClass,b.NgForOf,b.NgIf,b.NgTemplateOutlet,X.LoginComponent,oe,D,He.TranslatePipe],encapsulation:2})}}return i})();import{provideStates as Jt}from"@ngxs/store";import"@angular/core";import*as l from"@angular/core";import*as Ye from"@angular/common";import*as qe from"@telenet/ng-lib-ocapi";import*as Je from"@ngx-translate/core";function Bt(i,m){i&1&&(l.\u0275\u0275elementStart(0,"div")(1,"div",2),l.\u0275\u0275element(2,"i",3),l.\u0275\u0275elementStart(3,"div",4)(4,"div",5),l.\u0275\u0275text(5),l.\u0275\u0275pipe(6,"translate"),l.\u0275\u0275elementEnd()()()()),i&2&&(l.\u0275\u0275advance(5),l.\u0275\u0275textInterpolate1(" ",l.\u0275\u0275pipeBind1(6,1,"ng.activate-streaming-options.service-not-available")," "))}var Ke=(()=>{class i extends y{constructor(e,t){super(t),this.productService=e,this.requiredScope=["manageproductholding"],this.messageGroupName=c.MESSAGE_GROUP_NAME,this.showCard=!1}ngOnInit(){this.onLoadData()}onLoadData(){let e=c.ACTIVE.concat(",").concat(c.PRODUCT_STATUS_PENDING);this.productService.getAllProducts(this.messageGroupName,e,!0).subscribe({next:t=>this.populateActivateCardDetails(t),error:t=>{this.showErrorCard=!0}})}populateActivateCardDetails(e){this.streamingOptions=!h(e)&&f.checkForShowCard(e,c.ACTIVATE_OPTION_CARD),this.updateActivateCardDetails(this.streamingOptions)}
1updateActivateCardDetails(e){h(e)?(this.showCard=!1,this.hideCard()):(this.showCard=!0,this.showSimpleCard(),this.updateCardTarget(this.manageStreamingOptionsLink))}static{this.\u0275fac=function(t){return new(t||i)(l.\u0275\u0275directiveInject(C),l.\u0275\u0275directiveInject(l.ElementRef))}}static{this.\u0275cmp=l.\u0275\u0275defineComponent({type:i,selectors:[["app-activate-streaming-options-card"]],inputs:{manageStreamingOptionsLink:"manageStreamingOptionsLink"},standalone:!1,features:[l.\u0275\u0275InheritDefinitionFeature],decls:2,vars:3,consts:[[3,"messageGroupName","scopes"],[4,"ngIf"],[1,"notification--card"],[1,"icon","icon-error-shape"],[1,"notification--card__message","js-hide-card-skeleton-identifier"],[1,"notification--card__message__description"]],template:function(t,a){t&1&&(l.\u0275\u0275elementStart(0,"tg-login",0),l.\u0275\u0275template(1,Bt,7,3,"div",1),l.\u0275\u0275elementEnd()),t&2&&(l.\u0275\u0275property("messageGroupName",a.messageGroupName)("scopes",a.requiredScope),l.\u0275\u0275advance(),l.\u0275\u0275property("ngIf",a.showErrorCard&&a.showCard))},dependencies:[Ye.NgIf,qe.LoginComponent,Je.TranslatePipe],encapsulation:2})}}return i})();import"@angular/core";import*as d from"@angular/core";import*as ze from"@angular/common";import*as Xe from"@telenet/ng-lib-ocapi";import*as $e from"@ngx-translate/core";function jt(i,m){i&1&&(d.\u0275\u0275elementStart(0,"div")(1,"div",2),d.\u0275\u0275element(2,"i",3),d.\u0275\u0275elementStart(3,"div",4)(4,"div",5),d.\u0275\u0275text(5),d.\u0275\u0275pipe(6,"translate"),d.\u0275\u0275elementEnd()()()()),i&2&&(d.\u0275\u0275advance(5),d.\u0275\u0275textInterpolate1(" ",d.\u0275\u0275pipeBind1(6,1,"ng.recover-streaming-options.service-not-available")," "))}var Qe=(()=>{class i extends y{constructor(e,t){super(t),this.productService=e,this.requiredScope=["manageproductholding"],this.messageGroupName=c.MESSAGE_GROUP_NAME,this.showCard=!1}ngOnInit(){this.onLoadData()}onLoadData(){let e=c.ACTIVE;this.productService.getAllProducts(this.messageGroupName,e,!0).subscribe({next:t=>this.populateRecoverCardDetails(t),error:t=>{this.showErrorCard=!0}})}populateRecoverCardDetails(e){let t=!h(e)&&f.checkForShowCard(e,c.RECOVER_OPTION_CARD);this.updateRecoverCardDetails(!h(t))}updateRecoverCardDetails(e){this.showCard=e,e?(this.showSimpleCard(),this.updateCardTarget(this.manageStreamingOptionsLink)):this.hideCard()}static{this.\u0275fac=function(t){return new(t||i)(d.\u0275\u0275directiveInject(C),d.\u0275\u0275directiveInject(d.ElementRef))}}static{this.\u0275cmp=d.\u0275\u0275defineComponent({type:i,selectors:[["app-recover-streaming-options-card"]],inputs:{manageStreamingOptionsLink:"manageStreamingOptionsLink"},standalone:!1,features:[d.\u0275\u0275InheritDefinitionFeature],decls:2,vars:3,consts:[[3,"messageGroupName","scopes"],[4,"ngIf"],[1,"notification--card"],[1,"icon","icon-error-shape"],[1,"notification--card__message","js-hide-card-skeleton-identifier"],[1,"notification--card__message__description"]],template:function(t,a){t&1&&(d.\u0275\u0275elementStart(0,"tg-login",0),d.\u0275\u0275template(1,jt,7,3,"div",1),d.\u0275\u0275elementEnd()),t&2&&(d.\u0275\u0275property("messageGroupName",a.messageGroupName)("scopes",a.requiredScope),d.\u0275\u0275advance(),d.\u0275\u0275property("ngIf",a.showErrorCard&&a.showCard))},dependencies:[ze.NgIf,Xe.LoginComponent,$e.TranslatePipe],encapsulation:2})}}return i})();import"@angular/core";import*as u from"@angular/core";import*as Ze from"@angular/common";import*as et from"@telenet/ng-lib-ocapi";import*as tt from"@ngx-translate/core";function Ht(i,m){i&1&&(u.\u0275\u0275elementStart(0,"div")(1,"div",2),u.\u0275\u0275element(2,"i",3),u.\u0275\u0275elementStart(3,"div",4)(4,"div",5),u.\u0275\u0275text(5),u.\u0275\u0275pipe(6,"translate"),u.\u0275\u0275elementEnd()()()()),i&2&&(u.\u0275\u0275advance(5),u.\u0275\u0275textInterpolate1(" ",u.\u0275\u0275pipeBind1(6,1,"ng.manage-netflix.service-not-available")," "))}var it=(()=>{class i extends y{constructor(e,t){super(t),this.productService=e,this.requiredScope=["manageproductholding"],this.showErrorCard=!1,this.messageGroupName=E.MESSAGE_GROUP_NAME,this.showCard=!1}ngOnInit(){this.onLoadData()}onLoadData(){let e=E.ACTIVE.concat(",").concat(E.PRODUCT_STATUS_PENDING);this.productService.getAllProducts(this.messageGroupName,e,!0).subscribe({next:t=>t&&this.initSubscriptionCard(t),error:()=>{this.showErrorCard=!0,this.showCard=!0}})}initSubscriptionCard(e){this.netflixProducts=!h(e)&&this.checkForShowCard(e),this.updateSubscriptionCardDetail
1s(this.netflixProducts)}checkForShowCard(e){return!h(e)&&e.flatMap(t=>t.options).filter(t=>this.isNetflixOption(t))}isNetflixOption(e){return!!(e.productInfo.subCategory.name===E.NETFLIX&&E.SUBSCRIPTION_NOT_ALLOWED_STATUS.match(e.status))}updateSubscriptionCardDetails(e){h(e)?(this.showCard=!0,this.showSimpleCard(),this.updateCardTarget(this.manageNetflixSubscriptionLink)):(this.showCard=!1,this.hideCard())}static{this.\u0275fac=function(t){return new(t||i)(u.\u0275\u0275directiveInject(C),u.\u0275\u0275directiveInject(u.ElementRef))}}static{this.\u0275cmp=u.\u0275\u0275defineComponent({type:i,selectors:[["tg-manage-netflix-subscription-card"]],inputs:{manageNetflixSubscriptionLink:"manageNetflixSubscriptionLink"},standalone:!1,features:[u.\u0275\u0275InheritDefinitionFeature],decls:2,vars:3,consts:[[3,"messageGroupName","scopes"],[4,"ngIf"],[1,"notification--card"],[1,"icon","icon-error-shape"],[1,"notification--card__message","js-hide-card-skeleton-identifier"],[1,"notification--card__message__description"]],template:function(t,a){t&1&&(u.\u0275\u0275elementStart(0,"tg-login",0),u.\u0275\u0275template(1,Ht,7,3,"div",1),u.\u0275\u0275elementEnd()),t&2&&(u.\u0275\u0275property("messageGroupName",a.messageGroupName)("scopes",a.requiredScope),u.\u0275\u0275advance(),u.\u0275\u0275property("ngIf",a.showErrorCard&&a.showCard))},dependencies:[Ze.NgIf,et.LoginComponent,tt.TranslatePipe],encapsulation:2})}}return i})();import{FormsModule as Kt,ReactiveFormsModule as zt}from"@angular/forms";import{provideHttpClient as Xt}from"@angular/common/http";import{provideEnvironmentNgxMask as $t}from"ngx-mask";import*as $ from"@angular/core";var _a=(()=>{class i{static{this.components={"tg-manage-netflix-subscription":be,"tg-manage-streaming-options":We,"app-activate-streaming-options-card":Ke,"app-recover-streaming-options-card":Qe,"tg-manage-netflix-subscription-card":it}}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275mod=$.\u0275\u0275defineNgModule({type:i})}static{this.\u0275inj=$.\u0275\u0275defineInjector({providers:[$t(),Xt(),Jt([U])],imports:[Wt,Yt,qt,de,D,Se,zt,Kt,B,F]})}}return i})();export{_a as CareOttSubscriptionsModule};

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.