PageSourceSearch

https://www.masmovilpanama.com/3573.87b678cc056f9c4e.js

js masmovilpanama.com collected 2026-09-24 10:35:51 UTC 17,791 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkubc_consumer_main=self.webpackChunkubc_consumer_main||[]).push([[3573],{13573:(X,C,n)=>{n.r(C),n.d(C,{PaymentDetailsModule:()=>B});var p=n(60177),f=n(63318),I=n(89125),h=n(99227),y=n(73955),S=n(7901),P=n(98300),b=n(64818),k=n(93364),l=n(92427),v=n(96697),M=n(27876),A=n(78344),O=n(21462),e=n(54438),D=n(345),E=n(61624),N=n(2651),R=n(23545),L=n(93448);function x(c,T){if(1&c){const t=e.RV6();e.j41(0,"lla-dynamic-form",15),e.nI1(1,"translate"),e.nI1(2,"translate"),e.bIt("clickSubmitForm",function(a){e.eBV(t);const i=e.XpG();return e.Njj(i.onClickSubmitForm(a))}),e.k0s()}if(2&c){const t=e.XpG();e.Y8G("formConfiguration",t.formConfiguration)("modelTitle",e.bMT(1,3,"TERMS_AND_CONDITIONS.TERMS_TITLE"))("modelAcceptButtonText",e.bMT(2,5,"TERMS_AND_CONDITIONS.TERMS_BTN_TEXT"))}}function _(c,T){if(1&c){const t=e.RV6();e.j41(0,"div",16)(1,"span",17),e.bIt("click",function(){e.eBV(t);const a=e.XpG();return e.Njj(a.showOrderSummary())}),e.EFF(2),e.nI1(3,"translate"),e.k0s()()}2&c&&(e.R7$(2),e.SpI(" ",e.bMT(3,1,"SHOPPING_CART_SUMMARY.MOBILE_SHOW_SUMMARY_BUTTON")," "))}function F(c,T){if(1&c&&e.nrm(0,"iframe",18),2&c){const t=e.XpG();e.Y8G("srcdoc",t.redirectData,e.npT)}}const U=[{path:"",component:(()=>{class c{constructor(t,r,a,i,o,s,m,d,u,g,Y){this._renderer2=t,this._document=r,this.checkoutProgressService=a,this.checkoutService=i,this.marketConfigurationService=o,this.clickToCallService=s,this.paymentService=m,this.translateService=d,this.dataLayerService=u,this.sidePanelService=g,this.sanitizer=Y,this.secureImageDetails={},this.assetUrl="",this.iconUrlSecure="",this.iconUrlAtlantic="",this.showLoaderObj={isActive:!0,background:"opacity-50",text:"LOADER_MESSAGES.VALIDATING"},this.isDevicePresent=!1,this.isJamaica=!1,this.showIframe=!1}ngOnInit(){this.checkoutProgressService.updateCurrentStep(l.XHp.paymentDetails),this.checkoutService.updateCheckoutStep(l.XHp.paymentDetails),this.formConfigurations(),this.retrieveCart(),this.marketConfigurationService.getBrandMarket()==l.emF.JAMAICA&&(this.isJamaica=!0),this.marketConfigurationService.getBrandMarket()!==l.emF.JAMAICA&&this.checkoutService.sendCheckoutStepEvent(this.checkoutService.getCheckoutStepsDetails(l.XHp.paymentDetails)),this.secureImageDetails={assetUrl:JSON.parse(localStorage.getItem("assetURL")??"{}"),ssl_secure_image:this.translateService.getTranslation("ssl_secure_image"),atlantic_secure_image:this.translateService.getTranslation("atlantic_secure_image")},this.iconUrlSecure=this.secureImageDetails.ssl_secure_image?.filename_disk||"",this.iconUrlAtlantic=this.secureImageDetails.atlantic_secure_image?.filename_disk||""}formConfigurations(){this.formConfiguration=this.marketConfigurationService.getFormConfiguration(l.xhk.CHECKOUT_PAYMENT,l.t0f.PAYMENT_CONFIRMATION_FORM)}titleManuplation(){this.formattedPrice=this.cart?.totalPriceWithTax?.formattedValue.split(".")[0]??"";const t=this.formConfiguration?this.translateService.getTranslation("CHECKOUT_PAYMENT_FORM.PAYTITLE1"):"",r=this.formConfiguration?this.translateService.getTranslation("CHECKOUT_PAYMENT_FORM.PAYTITLE2"):"",a=this.formConfiguration?this.translateService.getTranslation("CHECKOUT_PAYMENT_FORM.PAYTITLE3"):"",i=this.user?.split(" ");i?.pop();const o=i?.join(" ");this.fullPaymentTitleStep3=t+" "+o+"! "+r+" $"+this.cart?.totalPriceWithTax?.value||this.cart.dueOnFirstBill+" "+a}retrieveCart(){this.checkoutService.retrieveCart().subscribe(t=>{this.checkoutProgressService.updateCurrentStep(l.XHp.paymentDetails);const r=localStorage.getItem("isPayment_inprogress")??"";if(this.cart=t,this.user=t.user?.name,this.titleManuplation(),t&&t.paymentInfo&&"true"===r)if(localStorage.removeItem("isPayment_inprogress"),localStorage.removeItem("uid"),localStorage.removeItem("payment_cartID"),localStorage.removeItem("payment_cartCode"),this.checkoutProgressService.updateCurrentStep(l.XHp.paymentDetails),this.marketConfigurationService.getBrandMarket()===l.emF.JAMAICA){const i=localStorage.getItem("savedCustomerData");if(console.log("[Jamaica Payment] savedCustomerData from localStorage:",i),i){const o=JSON.parse(i);console.log("[Jamaica Payment] parsed customerData:",o),o.address&&this.checkoutService.updateCustomerAddressDetail
1s(o.address),o.info&&this.checkoutService.updateCustomerInfoDetails(o.info),o.contact&&this.checkoutService.updateCustomerContactDetails(o.contact.rut||"",o.contact.phoneNumber||""),localStorage.removeItem("savedCustomerData")}this.completePayment()}else this.triggerDebtAndCreditCheck(t.guid??"");this.marketConfigurationService.getBrandMarket()===l.emF.JAMAICA&&window.location.href.includes("payment-details")&&(localStorage.getItem("triggeredPaymentEvent")||t&&t?.entries&&(localStorage.setItem("triggeredPaymentEvent",JSON.stringify(!0)),this.dataLayerService.addPaymentInfo(this.mapCartProducts(t.entries),this.marketConfigurationService.getConfig(),this.marketConfigurationService.getGlobalConfiguration().currency,this.marketConfigurationService.getGlobalConfiguration().leadEvent,t,0)));const{entries:a=[]}=t;this.isDevicePresent=!1,a.length>0&&a.forEach(i=>{i?.product?.baseCategory==l.R0E.DEVICE&&(this.isDevicePresent=!0)})})}mapCartProducts(t){return t.filter(r=>"e_bill"!==r?.product?.code).map(r=>{const a=r.product.categories.filter(s=>"root"!==s.code).map(s=>s.code).join("/"),i=r.product.categories[r.product.categories.length-1].code;let o="";return r.cartPrice.cartPrice.forEach(s=>{"RECURRING"==s.priceType&&(o=s.taxIncludedAmount.formattedValue),r.product.baseCategory==l.R0E.DEVICE&&(o=s.taxIncludedAmount.formattedValue)}),{totalPrice:o??r.totalPrice.formattedValue,price:r.totalPrice.value,numberOfLines:void 0,planCode:r.product.code,code:r.product.code,c2cProductName:void 0,name:r.product.name,quantity:r.quantity,isMultiline:r.product.isMultiLine,category1:a,category2:i,promoApplied:r.promoApplied,basePriceValue:r.basePrice.value,priceValue:r.totalPrice.value}})}onClickSubmitForm(t){const{cartId:r}=(0,h.qk3)(l.ZM_.CART_ID,{});localStorage.setItem("payment_cartID",r),localStorage.setItem("payment_cartCode",this.cart?.guid??this.cart?.code??""),localStorage.setItem("isPayment_inprogress","true"),localStorage.setItem("uid",this.cart?.user?.uid??""),this.marketConfigurationService.getBrandMarket()===l.emF.JAMAICA&&this.checkoutService.retrieveCustomer().pipe((0,v.s)(1)).subscribe(s=>{localStorage.setItem("savedCustomerData",JSON.stringify({address:s.customerAddress,info:s.customerInfo,contact:s.customerContact}))});const a=t?.paymentCardNumber?.toString().replace(/\s/g,"")||"",i=this.getCardType(t.paymentCardNumber);localStorage.setItem("savedCardType",i.charAt(0).toUpperCase()+i.slice(1)),localStorage.setItem("savedCardNumber","*".repeat(Math.max(0,a.length-4))+a.slice(-4)),this.clickToCallService.showLoader(this.showLoaderObj);const o=this.getCardInfo(t);this.paymentService.saveCardInfo(o).subscribe({next:s=>{s&&this.pay(o)},error:()=>{this.clickToCallService.hideLoader()}})}triggerDebtAndCreditCheck(t){const r={cartId:t,fields:l.LzN.FULL};this.clickToCallService.showLoader(this.showLoaderObj),this.clickToCallService.internalDebtCheck(r).subscribe({next:a=>{this.clickToCallService.hideLoader(),a&&!a.isDebtBalanceFlag?(this.clickToCallService.showLoader(this.showLoaderObj),this.clickToCallService.triggerCreditCheck(r).subscribe({next:i=>{this.clickToCallService.hideLoader(),this.callPlaceOrderAPI(!0)},error:()=>{this.clickToCallService.hideLoader(),this.callPlaceOrderAPI(!0)}})):this.callPlaceOrderAPI(!0)},error:()=>{this.clickToCallService.hideLoader(),this.callPlaceOrderAPI(!0)}})}getReqParamFac(t){const r=this.cart?.totalPriceWithTax?.value;return{cardCVV2:t?.cardCVC||"",cardExpiryDate:t?.expirationCardDate.toString().replace("/","")||"",cardNumber:t?.paymentCardNumber.toString().replace(/\s/g,"")||"",amount:r?.toString()+".00"||0,orderNumber:this.cart.code??"",userId:this.cart.user?.uid??""}}getCardInfo(t){return{customerUid:this.cart.user?.uid??"",cartId:this.cart.guid??this.cart.code??"",accountHolderName:t.paymentCardName||"",cardNumber:t?.paymentCardNumber.toString().replace(/\s/g,"")||"",cardType:{code:this.getCardType(t.paymentCardNumber).toUpperCase(),name:"card type"},cvv:t?.cardCVC,defaultPayment:!0,expiryMonth:t?.expirationCardDate.toString().split("/")[0],expiryYear:t?.expirationCardDate.toString().split("/")[1]}}getCardType(t){let r="";
1const a={visa:/^4\d{4}(?:\d{11})?/,master:/^5[1-5]\d{3}/,amex:/^3[47]\d{13}$/},i=t.replace(/\s+|-/g,""),s=[];["visa","master","amex"].map(m=>{s.push({regex:a[m],label:m})});for(const m of s)m.regex.test(i)&&(r=m.label);return r}createPayment(t){this.clickToCallService.showLoader(this.showLoaderObj),this.paymentService.createPayment(t).subscribe({next:r=>{this.clickToCallService.hideLoader(),this.postFacResToBrowser(r.data)},error:()=>{this.clickToCallService.hideLoader()}})}callPlaceOrderAPI(t){this.clickToCallService.showLoader(this.showLoaderObj),this.checkoutService.placeOrderRequest(t).pipe((0,v.s)(1)).subscribe({next:r=>{localStorage.removeItem(l.ZM_.CART_ID),console.log("remove cartId from file payment-details.component.ts callPlaceOrderAPI"),this.clickToCallService.hideLoader();const a=r.orderId??r.code;if(a){this.clickToCallService.showLoader(this.showLoaderObj),this.checkoutProgressService.continueToStep(this.isDevicePresent?l.XHp.MobileOrderConfirmation:this.checkoutService.getCheckoutStepsDetails(l.XHp.paymentDetails).nextStep),this.checkoutService.workflowLaunch(a).subscribe(u=>(this.clickToCallService.hideLoader(),u)),this.checkoutService.updateOrderNumber(a),this.checkoutService.updateCustomerContactDetails("",r?.phoneNumber||r?.customerProfile?.mobile||""),(r?.customerProfile||r?.user)&&this.checkoutService.updateCustomerInfoDetails({firstName:r.customerProfile?.firstName||r.user?.name?.split(" ")[0]||"",lastName:r.customerProfile?.lastName||r.user?.name?.split(" ").slice(1).join(" ")||"",email:r.customerProfile?.email||r.user?.email||"",dob:r.customerProfile?.dateOfBirth||""});const i=this.extractAddress(r);if(i){const u=[i.city,i.area,i.streetname,i.apartment||i.appartment].filter(
1Boolean);if(u.length>1){const g={city:"",streetName:"",streetCode:"",streetAdditionalInfo:u.join(", ")+".",region:"",country:"",externalId:0,locality:"",technology:""};this.checkoutService.updateCustomerAddressDetails(g)}this.checkoutService.addAddressDetailsAfterPayment(i)}const o=localStorage.getItem("savedCardType")||"",s=localStorage.getItem("savedCardNumber")||"",m={code:r.paymentInfo?.cardType?.code||o.toUpperCase(),name:r.paymentInfo?.cardType?.name||o},d={cardNumber:r.paymentInfo?.cardNumber||s,cardType:m,paymentStatus:r.paymentStatus||r.transactionHistory?.[0]?.transactionStatus||""};this.checkoutService.updatePaymentDetails(d),localStorage.removeItem("savedCardType"),localStorage.removeItem("savedCardNumber"),this.checkoutProgressService.updateStepFormData({step:l.XHp.MobilePlanCheckoutPayment,form:d}),this.clickToCallService.hideLoader()}},error:()=>{this.clickToCallService.hideLoader()}})}postFacResToBrowser(t){const r=this._renderer2.createElement("script"),a=this._renderer2.createElement("div");r.type="text/javascript";
1const o=(new DOMParser).parseFromString(t,"text/html"),s=(t=(t=(t=(t=t.replace("<HTML>","")).replace("<HTML>","")).replace("<BODY>","")).replace("<BODY>","")).split("<SCRIPT")[0],m=o.body.getElementsByTagName("script")[0].innerHTML;r.innerHTML=m,a.innerHTML=s,this._renderer2.appendChild(this._document.body,a),setTimeout(()=>{this._renderer2.appendChild(this._document.body,r)},100)}showOrderSummary(){const t=this.translateService.getTranslation("ORDER_SUMMARY.TITLE");this.sidePanelService.dispatchSidePanel({type:l.lms.ShoppingCartOrderSummaryModal,title:t,showDevider:!1,data:{}})}pay(t){const r=localStorage.getItem(l.ZM_.CALL_ME_BACK_FORM_KEY);let a={};r&&(a=JSON.parse(r||""));const i=a?.value?.email||"",o=a?.value?.mobilePhone||"";this.clickToCallService.showLoader(this.showLoaderObj),this.paymentService.initiate({amount:this.cart?.totalPriceWithTax?.value,pan:t.cardNumber,cvv:t.cvv,expiry:t.expiryYear+t.expiryMonth,name:t.accountHolderName||"",email:i,phoneNumber:this.formatPhone(o)}).subscribe(s=>{"SP4"===s.IsoResponseCode&&(this.redirectData=this.sanitizer.bypassSecurityTrustHtml(s.RedirectData),this.spiToken=s.SpiToken,sessionStorage.setItem("spiToken",this.spiToken),this.showIframe=!0,this.clickToCallService.hideLoader())},s=>{this.clickToCallService.hideLoader()})}completePayment(){this.paymentService.complete(sessionStorage.getItem("spiToken"),this.cart?.guid??this.cart?.code??"",this.cart?.user?.uid??"").subscribe(t=>{console.log("completePayment response",t),this.triggerDebtAndCreditCheck(this.cart.guid??""),sessionStorage.removeItem("spiToken")})}extractAddress(t){if(t.installationAddress)return t.installationAddress;if(t.deliveryAddress)return t.deliveryAddress;if(t.addresses?.length){const r=t.addresses.find(i=>"INSTALLATION"===i.type),a=t.addresses.find(i=>"DELIVERY"===i.type);return r||a||t.addresses[0]}return null}formatPhone(t){return t.replace(/\D/g,"").replace(/(\d{3})(\d{3})(\d{4})/,"$1-$2-$3")}ngOnDestroy(){localStorage.removeItem("triggeredPaymentEvent")}static{this.\u0275fac=function(r){return new(r||c)(e.rXU(e.sFG),e.rXU(p.qQ),e.rXU(O.p),e.rXU(M._),e.rXU(k.ey),e.rXU(f.ClickToCallService),e.rXU(A.W),e.rXU(h.vXy),e.rXU(h.hWh),e.rXU(b.J$),e.rXU(D.up))}}static{this.\u0275cmp=e.VBU({type:c,selectors:[["lla-payment-details"]],standalone:!1,decls:27,vars:26,consts:[[1,"terms-title","h4"],[1,"order-summary-for-payment-desktop"],[1,"llac-order-summary-card-table__header"],["summary-title","",1,"price-primary-title"],[3,"priceFont","secondaryListContent","price","secondaryListIcon"],[1,"llac-order-summary-card-table__header","noMarginBottom"],["summary-price","",1,"b3-bold"],[3,"formConfiguration","modelTitle","modelAcceptButtonText","clickSubmitForm",4,"ngIf"],[1,"secure-checkout"],[1,"b4-regular","secure-checkout__title"],[1,"secure-checkout__images"],["loading","lazy","alt","SSL",1,"ssl-image",3,"src"],["loading","lazy","alt","Atlantic",1,"atlantic-image",3,"src"],["class","show-mob-jam-order-summary",4,"ngIf"],["allow","local-network-access *","width","100%","height","500","frameborder","0",3,"srcdoc",4,"ngIf"],[3,"clickSubmitForm","formConfiguration","modelTitle","modelAcceptButtonText"],[1,"show-mob-jam-order-summary"],[3,"click"],["allow","local-network-access *","width","100%","height","500","frameborder","0",3,"srcdoc"]],template:function(r,a){1&r&&(e.j41(0,"h4",0),e.EFF(1),e.k0s(),e.j41(2,"div",1)(3,"lla-order-summary-table-header",2)(4,"span",3),e.
1EFF(5),e.nI1(6,"translate"),e.k0s()(),e.nrm(7,"lla-order-summary-table-list",4),e.nI1(8,"translate"),e.j41(9,"lla-order-summary-table-header",5)(10,"span",3),e.EFF(11),e.nI1(12,"translate"),e.k0s(),e.j41(13,"span",6),e.EFF(14),e.k0s()()(),e.DNE(15,x,3,7,"lla-dynamic-form",7),e.j41(16,"div",8)(17,"p",9),e.EFF(18),e.nI1(19,"translate"),e.k0s(),e.j41(20,"div",10),e.nrm(21,"img",11),e.nI1(22,"optimizeImage"),e.nrm(23,"img",12),e.nI1(24,"optimizeImage"),e.k0s()(),e.DNE(25,_,4,3,"div",13)(26,F,1,1,"iframe",14)),2&r&&(e.R7$(),e.JRh(a.fullPaymentTitleStep3),e.R7$(4),e.SpI(" ",e.bMT(6,14,"ORDER_SUMMARY.PAYMENT_ONETIME")," "),e.R7$(2),e.Y8G("priceFont","b4-regular")("secondaryListContent",e.bMT(8,16,"ORDER_SUMMARY.ONETIME_DEPOSIT"))("price",a.formattedPrice)("secondaryListIcon","file-tray-outline"),e.R7$(4),e.SpI(" ",e.bMT(12,18,"ORDER_SUMMARY.PAYMENT_TOTAL")," "),e.R7$(3),e.SpI(" ",a.formattedPrice," "),e.R7$(),e.Y8G("ngIf",a.formConfiguration&&!a.showIframe),e.R7$(3),e.SpI(" ",e.bMT(19,20,"CHECKOUT_PAYMENT_FORM.SECURE_TEXT")," "),e.R7$(3),e.FS9("src",e.bMT(22,22,a.secureImageDetails.assetUrl+a.iconUrlSecure),e.B4B),e.R7$(2),e.FS9("src",e.bMT(24,24,a.secureImageDetails.assetUrl+a.iconUrlAtlantic),e.B4B),e.R7$(2),e.Y8G("ngIf",a.isJamaica),e.R7$(),e.Y8G("ngIf",a.showIframe))},dependencies:[p.bT,E.f,N.x,R.Y,y.D9,L.Z],styles:[".order-summary-for-payment-desktop[_ngcontent-%COMP%]{display:none}@media only screen and (max-width: 768px){.order-summary-for-payment-desktop[_ngcontent-%COMP%]{display:block}}.secure-checkout[_ngcontent-%COMP%]{display:flex;justify-content:center;gap:8px;margin-top:20px;align-items:center}@media only screen and (max-width: 460px){.secure-checkout[_ngcontent-%COMP%]{flex-direction:column;margin:24px 0 8px}}.secure-checkout__title[_ngcontent-%COMP%]{display:flex;justify-content:center;padding-right:16px;margin:0}.secure-checkout__images[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;gap:8px}.terms-condition-button-position[_ngcontent-%COMP%]{display:flex;flex-direction:column}.terms-condition-button-position[_ngcontent-%COMP%]     .reactive-checkbox-element .mdc-list, .terms-condition-button-position[_ngcontent-%COMP%]     .checkbox-caption, .terms-condition-button-position[_ngcontent-%COMP%]     .label-fullwidth-checkbox, .terms-condition-button-position[_ngcontent-%COMP%]     .reactive-checkbox-element .mat-mdc-list-base .mdc-list-item__content{padding:0}.terms-condition-button-position[_ngcontent-%COMP%]     .reactive-checkbox-element .mat-mdc-list-base .mat-mdc-list-item{min-height:24px;max-height:100%}.terms-condition-button-position[_ngcontent-%COMP%]     .matlistleftpadding{padding-left:0!important}.terms-condition-button-position[_ngcontent-%COMP%]     .mdc-list-item{align-items:center;text-align:center}"]})}}return c})(),canActivate:[P.uk]}];let j=(()=>{class c{static{this.\u0275fac=function(r){return new(r||c)}}static{this.\u0275mod=e.$C({type:c})}static{this.\u0275inj=e.G2t({imports:[S.iI.forChild(U),S.iI]})}}return c})(),B=(()=>{class c{static{this.\u0275fac=function(r){return new(r||c)}}static{this.\u0275mod=e.$C({type:c})}static{this.\u0275inj=e.G2t({imports:[p.MD,j,f.DynamicFormModule,I.oW,y.h,h.LnB]})}}return c})()}}]);

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.