1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[883],{883:function(t,e,n){n.d(e,{Z:function(){return x}});var o,a,r=n(5893),i=n(7294),s=n(4814),l=n(9381),u=n(1163),d=n(9657),c=n(7494),_=n(1093),m=n(4317),p=n(6490),y=n(3365),I=n(8643),S=n(8029),A=n(3397);let T=async t=>{var e,n,o,a;let{payloadRetryPix:r,store:i,token:s}=t,l=await fetch(A.EP.ApiEndpoint,{method:"POST",headers:{Authorization:"Bearer ".concat(s),"Content-Type":"application/json",Store:i},body:r}),u=await l.json();return!l.ok||(null==u?void 0:null===(e=u.errors)||void 0===e?void 0:e.length)?Promise.reject(u):null==u?void 0:null===(n=u.data)||void 0===n?void 0:null===(o=n.createPaymentSession)||void 0===o?void 0:null===(a=o.paymentSession)||void 0===a?void 0:a.session_data},E=t=>{let{onSuccessCallback:e,onErrorCallback:n}=t;return(0,S.D)({mutationFn:t=>T(t),onSuccess:(t,n)=>{if(e)return e(t,n)},onError:t=>{if(n)return n(t)}})},v=async t=>{let{payloadRetryPix:e,token:n}=t,o=await fetch(A.EP.API_PIX_FLOW_CHANGE_PLAN_DISPATCHER,{method:"POST",headers:{Authorization:n,"Content-Type":"application/json","x-api-key":A.EP.BSS_API_KEY||""},body:e}),a=await o.json();return o.ok?a:Promise.reject({status:o.status,...a})},g=t=>{let{onSuccessCallback:e,onErrorCallback:n}=t;return(0,S.D)({mutationFn:t=>v(t),onSuccess:(t,n)=>{if(e)return e(t,n)},onError:t=>{if(n)return n(t)}})},h=async t=>{let{payloadRetryPix:e,token:n}=t,o=await fetch(A.EP.API_PIX_FLOW_SUBSCRIPTION_UPDATE_DISPATCHER,{method:"POST",headers:{Authorization:n,"Content-Type":"application/json","x-api-key":A.EP.BSS_API_KEY||""},body:e}),a=await o.json();return o.ok?a:Promise.reject({status:o.status,...a})},P=t=>{let{onSuccessCallback:e,onErrorCallback:n}=t;return(0,S.D)({mutationFn:t=>h(t),onSuccess:(t,n)=>{if(e)return e(t,n)},onError:t=>{if(n)return n(t)}})},O=async t=>{let{payloadRetryPix:e,token:n}=t,o=await fetch(A.EP.API_PIX_FLOW_UNPAID_INVOICES,{method:"POST",headers:{Authorization:n,"Content-Type":"application/json","x-api-key":A.EP.BSS_API_KEY||""},body:e}),a=await o.json();return o.ok?a:Promise.reject({status:o.status,...a})},N=t=>{let{onSuccessCallback:e,onErrorCallback:n}=t;return(0,S.D)({mutationFn:t=>O(t),onSuccess:(t,n)=>{if(e)return e(t,n)},onError:t=>{if(n)return n(t)}})};var M=n(9498),R=n(9071),f=n(3109),B=n(3069);(o=a||(a={})).SKYMAIS_ATTEMPT_LIMIT_BTN_1="skymais-attempt-limit-btn-1",o.SKYMAIS_ATTEMPT_LIMIT_BTN_2="skymais-attempt-limit-btn-2",o.SKYMAIS_PIX_TIMEOUT_BTN_1="skymais-pix-timeout-btn-1",o.SKYMAIS_PIX_TIMEOUT_BTN_2="skymais-pix-timeout-btn-2",o.SKYMAIS_PIX_BLOCK_BTN_1="skymais-pix-block-btn-1",o.SKYMAIS_RESEND_LIMIT_BTN_1="skymais-resend-limit-btn-1",o.SKYMAIS_RESEND_LIMIT_BTN_2="skymais-resend-limit-btn-2",o.SKYMAIS_PAYMENT_UPDATE_BTN_1="skymais-payment-update-btn-1",o.DGO_RESEND_LIMIT_BTN_1="dgo-resend-limit-btn-1",o.DGO_RESEND_LIMIT_BTN_2="dgo-resend-limit-btn-2",o.DGO_ATTEMPT_LIMIT_BTN_1="dgo-attempt-limit-btn-1",o.DGO_ATTEMPT_LIMIT_BTN_2="dgo-attempt-limit-btn-2",o.DGO_PAYMENT_UPDATE_BTN_1="dgo-payment-update-btn-1",o.DGO_MERCADOPAGO_ERROR_BTN_1="dgo-mercado-pago-return-btn-1",o.DGO_MERCADOPAGO_ERROR_BTN_2="dgo-mercado-pago-return-btn-2",o.DGO_SKYMAIS_MISSING_PLAN_BTN_1="dgo-skymais-missing-plan-btn-1",o.DGO_SKYMAIS_MULTIPLE_PLANS_BTN_1="dgo-skymais-multiple-plans-btn-1",o.DGO_SKYMAIS_500_BTN_1="dgo-skymais-500-btn-1",o.DGO_SKYMAIS_500_BTN_2="dgo-skymais-500-btn-2",o.DGO_SKYMAIS_404_BTN_1="dgo-skymais-404-btn-1";let C=()=>{let{market:t,locale:e}=(0,d.bU)(),n=(0,d.oR)(),o=(0,_.L)(t=>t.updateCartId),{showToast:r}=(0,m.E)(),{idToken:s,token:l,logout:S}=(0,c.a)(),A=(0,p.s)(),{dataLayerPush:T}=(0,M._0)(),[v,h]=(0,i.useState)(null),O=(0,u.useRouter)(),C=(0,B.kj)(),b=(0,I.q)(),k=sessionStorage.getItem(R.sO.STATUS_ACCOUNT),D=e=>{if((null==e?void 0:e.status)===429){A({market:t,pathKey:"ERROR",params:{id:R.jL.ERROR_PIX_BLOCK}});return}r(R.Je.TOAST_ERROR_PAYMENT)},{mutate:L}=E({onSuccessCallback:e=>{if((null==e?void 0:e.status)==="valid"){let n={type:null==Y?void 0:Y.type,originPage:null==Y?void 0:Y.originPage,paymentSessionPix:e,paymentAmount:null==Y?void 0:Y.paymentAmount,payloadRetryPix:null==Y?void 0:Y.payloadRetryPix};sessionStorage.setItem(R.sO.PIX_FLOW,JSON.stringify(n)),A({market:t,pathKey:"PAYMENT_PIX"});return}r(R.Je.TOAST_ERROR_PAYMENT)},onErrorCallback:()=>{r(R.Je.TOAST_ERROR_PAYMENT)}}),{mutate:x}=g({onSuccessCallback:e=>{var n,o,a,i;let s=null==e?void 0:null===(n=e.message)||void 0===n?void 0:null===(o=n.status)||void 0===o?void 0:o.toLowerCase().includes("successful");if(s){let n={type:"SF_CHANGE_PLAN",originPage:null==Y?void 0:Y.originPage,paymentSessionPix:{status:"val
1id",qrCodeBase64:null==e?void 0:null===(a=e.message)||void 0===a?void 0:a.qrCodeBase64,pixCopyPaste:null==e?void 0:null===(i=e.message)||void 0===i?void 0:i.pix},paymentAmount:null==Y?void 0:Y.paymentAmount,payloadRetryPix:null==Y?void 0:Y.payloadRetryPix};sessionStorage.setItem(R.sO.PIX_FLOW,JSON.stringify(n)),A({market:t,pathKey:"PAYMENT_PIX"});return}r(R.Je.TOAST_ERROR_PAYMENT)},onErrorCallback:t=>{D(t)}}),{mutate:w}=P({onSuccessCallback:e=>{var n,o,a,i;let s=null==e?void 0:null===(n=e.message)||void 0===n?void 0:null===(o=n.status)||void 0===o?void 0:o.toLowerCase().includes("successful");if(s){let n={type:"SF_ADD_ADDONS",originPage:null==Y?void 0:Y.originPage,paymentSessionPix:{status:"valid",qrCodeBase64:null==e?void 0:null===(a=e.message)||void 0===a?void 0:a.qrCodeBase64,pixCopyPaste:null==e?void 0:null===(i=e.message)||void 0===i?void 0:i.pix},paymentAmount:null==Y?void 0:Y.paymentAmount,payloadRetryPix:null==Y?void 0:Y.payloadRetryPix};sessionStorage.setItem(R.sO.PIX_FLOW,JSON.stringify(n)),A({market:t,pathKey:"PAYMENT_PIX"});return}r(R.Je.TOAST_ERROR_PAYMENT)},onErrorCallback:t=>{D(t)}}),{mutate:U}=N({onSuccessCallback:e=>{var n,o,a,i;let s=null==e?void 0:null===(n=e.message)||void 0===n?void 0:null===(o=n.status)||void 0===o?void 0:o.toLowerCase().includes("successful");if(s){let n={type:"SF_PENDING_INVOICE",originPage:null==Y?void 0:Y.originPage,paymentSessionPix:{status:"valid",qrCodeBase64:null==e?void 0:null===(a=e.message)||void 0===a?void 0:a.qrCodeBase64,pixCopyPaste:null==e?void 0:null===(i=e.message)||void 0===i?void 0:i.pix},paymentAmount:null==Y?void 0:Y.paymentAmount,payloadRetryPix:null==Y?void 0:Y.payloadRetryPix};sessionStorage.setItem(R.sO.PIX_FLOW,JSON.stringify(n)),A({market:t,pathKey:"PAYMENT_PIX"});return}r(R.Je.TOAST_ERROR_PAYMENT)},onErrorCallback:t=>{D(t)}}),{mutate:K,isPending:G}=(0,y.z)({onSuccessCallback:(e,n)=>{var a,r,i,s,l,u,d,c;h(null),(null==e?void 0:null===(a=e.reorderItems)||void 0===a?void 0:null===(r=a.cart)||void 0===r?void 0:r.id)&&
1(sessionStorage.setItem(R.sO.CART_ID,null==e?void 0:null===(l=e.reorderItems)||void 0===l?void 0:null===(u=l.cart)||void 0===u?void 0:u.id),o(null==e?void 0:null===(d=e.reorderItems)||void 0===d?void 0:null===(c=d.cart)||void 0===c?void 0:c.id)),sessionStorage.setItem(R.sO.ERROR_IN_PAYMENT_PAGE,R.Je.TOAST_ERROR_PAYMENT),(null==e?void 0:null===(i=e.summaryCart)||void 0===i?void 0:null===(s=i.items)||void 0===s?void 0:s.length)===0?A({market:t,pathKey:"PLANS"}):A({market:t,pathKey:"BILLING"})},onErrorCallback:t=>{h(null),r(R.Je.TOAST_ERROR_PAYMENT)}}),Y=(()=>{try{let t=sessionStorage.getItem(R.sO.PIX_FLOW);if(!t)return null;return JSON.parse(t)}catch(t){return null}})(),j=()=>!!Y,F=()=>{if(T({element:"intentar de nuevo",action:"click",location:e}),!Y){A({market:t,pathKey:"PAYMENT_PIX"});return}switch(Y.type){case"SF_CHANGE_PAYMENT_METHOD":L({payloadRetryPix:Y.payloadRetryPix,store:n,token:null!=l?l:""});break;case"SF_CHANGE_PLAN":x({payloadRetryPix:Y.payloadRetryPix,token:null!=s?s:""});break;case"SF_ADD_ADDONS":w({payloadRetryPix:Y.payloadRetryPix,token:null!=s?s:""});break;case"SF_PENDING_INVOICE":U({payloadRetryPix:Y.payloadRetryPix,token:null!=s?s:""});break;default:A({market:t,pathKey:"PAYMENT_PIX"})}},X=t=>{if(h(t),j()){sessionStorage.removeItem(R.sO.PIX_FLOW),window.location.href="/autoatendimento/pagamento/alterar";return}K({token:null!=l?l:"",idToken:null!=s?s:"",store:n})},z=o=>{switch(o){case a.SKYMAIS_ATTEMPT_LIMIT_BTN_1:(null==window?void 0:window.OverchatWidget)&&(null==window||window.OverchatWidget.setOptions({show:!0}));break;case a.SKYMAIS_ATTEMPT_LIMIT_BTN_2:S(),A({market:t,pathKey:"REGISTRATION"});break;case a.SKYMAIS_PIX_TIMEOUT_BTN_1:"0"==k?T({event:"pix_payment_retry",element:"intentar de nuevo",action:"click",location:e}):T({hash:f.z.HASHES.SELFCARE_ERROR_PAYMENT_PIX.TRY_AGAIN_BUTTON,event:f.z.EVENTS.INTERACTION,category:"settings:change-payment-error",action:"navigation",label:"try-again",...b}),F();break;case a.SKYMAIS_RESEND_LIMIT_BTN_1:A({market:t,pathKey:"OTP"});break;case a.SKYMAIS_RESEND_LIMIT_BTN_2:S(),A({market:t,pathKey:"REGISTRATION"});break;case a.SKYMAIS_PAYMENT_UPDATE_BTN_1:T({event:"payment_retry",action:"click",element:"Actualizar medio de pago"}),X(o);break;case a.SKYMAIS_PIX_BLOCK_BTN_1:case a.SKYMAIS_PIX_TIMEOUT_BTN_2:"0"==k?T({event:"pix_payment_retry",element:"actualizar medio de pago",action:"click",location:e}):T({hash:f.z.HASHES.SELFCARE_ERROR_PAYMENT_PIX.CHANGE_PAYMENT_BUTTON,event:f.z.EVENTS.INTERACTION,category:"settings:change-payment-error",action:"navigation",label:"change-payment",...b}),X(o);break;case a.DGO_RESEND_LIMIT_BTN_1:A({market:t,pathKey:"OTP"});break;case a.DGO_RESEND_LIMIT_BTN_2:S(),A({market:t,pathKey:"REGISTRATION"});break;case a.DGO_ATTEMPT_LIMIT_BTN_1:(null==window?void 0:window.OverchatWidget)&&(null==window||window.OverchatWidget.setOptions({show:!0}));break;case a.DGO_ATTEMPT_LIMIT_BTN_2:S(),A({market:t,pathKey:"REGISTRATION"});break;case a.DGO_PAYMENT_UPDATE_BTN_1:T({event:"payment_retry",action:"click",element:"Actualizar medio de pago"}),h(o),K({token:null!=l?l:"",idToken:null!=s?s:"",store:n});break;case a.DGO_MERCADOPAGO_ERROR_BTN_1:T({event:"payment_retry",element:"Intentar de nuevo",action:"click"}),h(o),K({token:null!=l?l:"",idToken:null!=s?s:"",store:n});break;case a.DGO_MERCADOPAGO_ERROR_BTN_2:T({event:"payment_retry",action:"click",element:"Actualizar medio de pago"}),h(o),K({token:null!=l?l:"",idToken:null!=s?s:"",store:n});break;case a.DGO_SKYMAIS_MISSING_PLAN_BTN_1:case a.DGO_SKYMAIS_MULTIPLE_PLANS_BTN_1:A({market:t,pathKey:"PLANS"});break;case a.DGO_SKYMAIS_500_BTN_1:O.push(C[C.length-1]);break;case a.DGO_SKYMAIS_500_BTN_2:case a.DGO_SKYMAIS_404_BTN_1:A({market:t,pathKey:"HOME"});break;default:console.warn("Button ID not mapped: ".concat(o))}};return{handleButtonClick:z,pendingButtonId:v}};var b=n(9576);let k={vrio:"vrio",sky:"sky",dtv:"dtv",dgo:"dtv",overlabs:"overlabs",np:"np"},D=t=>t?t.charAt(0).toLowerCase()+t.slice(1):"",L=function(t,e){var n,o;let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r={...t};if(t.imageIllustration&&(r.imageIllustration={iconName:t.imageIllustration.iconName,theme:D(t.imageIllustration.theme),project:D(k[t.imageIllustration.project]),textSize:t.imageIllustration.textSize}),t.iconIllustration&&(r.iconIllustration={...t.iconIllustration,iconName:t.iconIllustration.iconNameIllustration,project:D(t.iconIllustration.projectIllustration)},delete r.iconIllustration.iconNameIllustration,delete r.iconIllustration.projectIllustration),t.textBoxInfo&&t.textBoxInfo.text?(r.textBoxInfo={...t.textBoxInfo,textSize:D(t.textBoxInfo.textSizeTextBox),textColor:D(t.textBoxInfo.textColorTextBox),propsIcon:{iconName:t.textBoxInfo.propsIcon.iconNameProps}},delete r.textBoxInfo.textSizeTextBox,delete r.textBoxInfo.textColorTextBox,delete r.textBoxInfo.propsIcon.iconNameProps):delete r.textBoxInfo,t.primaryButton&&t.primaryButton.childrenBtn1){let o=null===(n=t.primaryButton)||void 0===n?void 0:n.onClickBtn1,i=o&&"string"==typeof o&&a===o;r.primaryButton={children:t.primaryButton.childrenBtn1,onClick:t=>{o&&"string"==typeof o?e(o):o&&"function"==typeof o&&o(t)},appearance:D(t.primaryButton.appearanceBtn1),size:D(t.primaryButton.sizeBtn1),icon:t.primaryButton.IconBtn1,iconPosition:D(t.primaryButton.iconPositionBtn1),disabled:t.primaryButton.disabledBtn1||i,loading:t.primaryButton.loadingBtn1||i}}else delete r.primaryButton;if(t.secondaryButton&&t.secondaryButton.childrenBtn2.length>0){let n=null===(o=t.secondaryButton)||void 0===o?void 0:o.onClickBtn2,i=n&&"string"==typeof n&&a===n;r.secondaryButton={children:t.secondaryButton.childrenBtn2,onClick:t=>{n&&"string"==typeof n?e(n):n&&"function"==typeof n&&n(t)},appearance:D(t.secondaryButton.appearanceBtn2),size:D(t.secondaryButton.sizeBtn2),icon:t.secondaryButton.iconBtn2,iconPosition:D(t.secondaryButton.iconPositionBtn2),disabled:t.secondaryButton.disabledBtn2||i,loading:t.secondaryButton.loadingBtn2||i}}else delete r.secondaryButton;return r};function x(t){let{liferayFields:e,renderInPlace:n=!1}=t,o=(0,i.useMemo)(()=>(0,b.e)(e),[e]),{handleButtonClick:a,pendingButtonId:u}=C(),d=(0,i.useMemo)(()=>L(o,a,u),[o,a,u]),c=(0,l.X)(t=>t.registerError);return((0,i.useEffect)(()=>{d.id&&c(d.id,d)},[d.id,d]),n)?(0,r.jsx)("div",{className:"result-feedback__wrapper",children:(0,r.jsx)("div",{className:"container-fixed",children:(0,r.jsx)("div",{className:"result-feedback__div",children:(0,r.jsx)(s.Z,{...d})})})}):(0,r.jsx)(r.Fragment,{})}},6490:function(t,e,n){n.d(e,{s:function(){return l}});var o=n(1163),a=n(7294),r=n(9657),i=n(5317),s=n(9071);let l=()=>{let{locale:t}=(0,r.bU)(),e=(0,o.useRouter)(),n=(0,a.useCallback)(n=>{let{market:o,pathKey:a,params:r,slug:l,replace:u=!1}=n,d=s.vf[o][a],c={...(0,i.W)(),...r},_=l?"/".concat(l):"",m=Object.keys(c).length>
10?"?".concat(new URLSearchParams(c).toString()):"";return u?e.replace("".concat(t,"/").concat(d).concat(_).concat(m),void 0,{locale:t}):e.push("".concat(t,"/").concat(d).concat(_).concat(m),void 0,{locale:t})},[t]);return n}},3365:function(t,e,n){n.d(e,{z:function(){return i}});var o=n(8029),a=n(3397);let r=async t=>{let{store:e,token:n,idToken:o}=t,r=await fetch("".concat(a.EP.KONG_BASE_URL_BUYFLOW,"/v1/order/reorder"),{method:"POST",headers:{store:e,Authorization:"Bearer ".concat(n),auth:"".concat(o)}});if(!r.ok){let t=await r.json();return Promise.reject(t)}return r.json()},i=t=>{let{onSuccessCallback:e,onErrorCallback:n}=t;return(0,o.D)({mutationFn:t=>r(t),onSuccess:(t,n)=>{if(console.log("Reorder success",t),e)return e(t,n.source)},onError:t=>{if(console.error("Reorder error",t),n)return n(t)}})}},5317:function(t,e,n){n.d(e,{W:function(){return m},n:function(){return p}});var o=n(9332),a=n(7294),r=n(9071);let i=[{urlKey:"dclid",storageKey:r.dA.DCLID,timestampKey:r.dA.DCLID_TIMESTAMP},{urlKey:"gclid",storageKey:r.dA.GCLID,timestampKey:r.dA.GCLID_TIMESTAMP}],s=()=>{try{if(null!==window.localStorage.getItem(r.dA.CAMPAIGN_PARAMS_TTL_OVERRIDE))return 1e4}catch(t){}return 2592e6},l=()=>String(Date.now()+s()),u=t=>{if(!t)return!1;let e=Number(t);return!Number.isNaN(e)&&Date.now()>e},d=(t,e)=>{window.localStorage.removeItem(t),window.localStorage.removeItem(e)},c=()=>{try{let t=window.localStorage.getItem(r.dA.UTM_PARAMS_TIMESTAMP);if(u(t))return d(r.dA.UTM_PARAMS,r.dA.UTM_PARAMS_TIMESTAMP),window.sessionStorage.removeItem(r.sO.UTM_PARAMS),{};let e=window.localStorage.getItem(r.dA.UTM_PARAMS);return e?JSON.parse(e):{}}catch(t){return console.error("Error reading UTM params from localStorage:",t),{}}},_=t=>{try{let e=window.localStorage.getItem(t.timestampKey);if(u(e)){d(t.storageKey,t.timestampKey);return}return window.localStorage.getItem(t.storageKey)||void 0}catch(e){console.error("Error reading ".concat(t.urlKey," from localStorage:"),e);return}},m=()=>{let t=c(),e={};return t.utm_source&&(e.utm_source=t.utm_source),t.utm_medium&&(e.utm_medium=t.utm_medium),t.utm_campaign&&(e.utm_campaign=t.utm_campaign),t.utm_content&&(e.utm_content=t.utm_content),t.utm_term&&(e.utm_term=t.utm_term),i.forEach(t=>{let n=_(t);n&&(e[t.urlKey]=n)}),e},p=()=>{let[t,e]=(0,a.useState)(c),[n,s]=(0,a.useState)(()=>Object.fromEntries(i.map(t=>[t.urlKey,_(t)]))),u=(0,o.useSearchParams)(),d=n=>{let o={...t,...n},a=JSON.stringify(o);try{window.localStorage.setItem(r.dA.UTM_PARAMS,a),window.localStorage.setItem(r.dA.UTM_PARAMS_TIMESTAMP,l()),window.sessionStorage.setItem(r.sO.UTM_PARAMS,a)}catch(t){console.error("Error saving UTM params to localStorage:",t)}e(o)},m=(t,e)=>{let n=i.find(e=>e.urlKey===t);if(n){try{window.localStorage.setItem(n.storageKey,e),window.localStorage.setItem(n.timestampKey,l())}catch(e){console.error("Error saving ".concat(t," to localStorage:"),e)}s(n=>({...n,[t]:e}))}},p=()=>{if(u.has("utm_source")){let t={utm_source:u.get("utm_source")||void 0,utm_medium:u.get("utm_medium")||void 0,utm_campaign:u.get("utm_campaign")||void 0,utm_content:u.get("utm_content")||void 0,utm_term:u.get("utm_term")||void 0},e=c(),n=Object.keys(t).some(n=>t[n]!==e[n]);n&&d(t)}i.forEach(t=>{if(!u.has(t.urlKey))return;let e=u.get(t.urlKey)||void 0,n=_(t);e&&e!==n&&m(t.urlKey,e)})};return(0,a.useEffect)(()=>{p()},[u]),{utmParams:t,singleParams:n,setUtmParam:d,setSingleParam:m,extractAndSetCampaignParams:p}}},8643:function(t,e,n){n.d(e,{q:function(){return c}});var o=n(9071);let a=["ssla-ott","br-ott","latam-ott","latam-dth"],r=["sky-dth","ssla-dth"];var i=n(9657);let s={ARGENTINA:"ar",BRAZIL:"br",CHILE:"cl",COLOMBIA:"co",ECUADOR:"ec",MEXICO:"mx",PERU:"pe",URUGUAY:"uy",PORTO_RICO:"pr"},l={ES:"es",PT:"pt"},u={[s.ARGENTINA]:l.ES,[s.BRAZIL]:l.PT,[s.CHILE]:l.ES,[s.COLOMBIA]:l.ES,[s.ECUADOR]:l.ES,[s.MEXICO]:l.ES,[s.PERU]:l.ES,[s.URUGUAY]:l.ES,[s.PORTO_RICO]:l.ES};var d=n(7494);let c=()=>{var t,e,n,s,c,_,m,p,y;let{user:I}=(0,d.a)(),S=function(){let{locale:t}=(0,i.bU)();return u[t]||l.ES}(),A=JSON.parse(sessionStorage.getItem(o.dA.SUBSCRIPTION_ENTITLEMENTS)||"{}"),T=sessionStorage.getItem(o.sO.STATUS_ACCOUNT),E=(null==A?void 0:null===(t=A.billingState)||void 0===t?void 0:t.toLowerCase())||("1"==T?"cancelled":"2"!=T?"newClient":"active"),v=I&&"businessUnit"in I?null==I?void 0:null===(e=I.businessUnit)||void 0===e?void 0:e.toLowerCase():null,g=JSON.parse(localStorage.getItem(o.dA.PROFILE)||"{}"),h=g&&"ageRating"in g?g.ageRating:"not-logged",P=g&&"isMainProfile"in g?g.isMainProfile.toString():"not-logged",O=g&&"id"in g?g.id:"not-logged",N=g&&"isNotRatedContentAllowed"in g?g.isNotRatedContentAllowed.toString():"not-logged",M=E?a.includes(E)?"ott
1-d2c":r.includes(E)?"tve":"ott-b2b2c":"not-logged",R=null!==(_=null==g?void 0:null===(n=g.interactivities)||void 0===n?void 0:null===(s=n.isBetAllowed)||void 0===s?void 0:s.toString())&&void 0!==_?_:"false",f={v_client_id:null!==(m=function(){let t=function(t){let e=t+"=",n=decodeURIComponent(document.cookie),o=n.split(";");for(let t=0;t<o.length;t++){let n=o[t];for(;" "==n.charAt(0);)n=n.substring(1);if(0==n.indexOf(e))return n.substring(e.length,n.length)}return""}(o.y$.GA_CLIENT_ID);return t?t.substring(6):null}())&&void 0!==m?m:"not-logged",v_user_id:null!==(p=null==I?void 0:I.uid)&&void 0!==p?p:"not-logged",v_billing_status:null!=E?E:"not-logged",v_profile_custom_age:h,v_mso:null!=v?v:"not-logged",v_language:S,v_admin_profile:P,v_profile_id:O,v_app_name:"".concat("skymais","-web"),v_profile_unrated_content:N,v_login_type:M,v_betting_enable:R,v_isocode:null!==(y=null==I?void 0:null===(c=I.iso2Code)||void 0===c?void 0:c.toLowerCase())&&void 0!==y?y:"not-logged"};return f}},9381:function(t,e,n){n.d(e,{X:function(){return a}});var o=n(4529);let a=(0,o.Ue)(t=>({errors:{},registerError:(e,n)=>t(t=>({errors:{...t.errors,[e]:n}}))}))},1093:function(t,e,n){n.d(e,{L:function(){return _}});var o=n(3513),a=n(4529),r=n(782),i=n(4838),s=n(9071);let l=t=>Object.fromEntries(Object.entries(t).filter(t=>{let[,e]=t;return null!=e&&""!==e})),u=(t,e)=>{let n={...t};return Object.keys(e).forEach(o=>{let a=e[o],r=t[o];"object"!=typeof a||null===a||Array.isArray(a)?n[o]=a:n[o]=u(r||{},a)}),n},d=()=>!0,c=()=>({country:null,personalInfo:{},billingAddress:{},paymentMethod:{hasCoupon:!1,hasCard:!1,totalCoveredByAccountBalance:!1,paymentData:{hasCard:!1}},meta:{cartId:d()&&sessionStorage.getItem(s.sO.CART_ID)?sessionStorage.getItem(s.sO.CART_ID):""},_hasHydrated:!1}),_=(0,a.Ue)()((0,r.tJ)((0,r.mW)((t,e)=>{var n,a,r,d,_,m,p;let y=i.k.getAuthFromStorage();return{...c(),country:["BR","AR"].includes(null!==(_=null===(n=y.user)||void 0===n?void 0:n.country)&&void 0!==_?_:"")?null===(a=y.user)||void 0===a?void 0:a.country:"SSLA",personalInfo:{firstname:null!==(m=null===(r=y.user)||void 0===r?void 0:r.givenName)&&void 0!==m?m:"",lastname:null!==(p=null===(d=y.user)||void 0===d?void 0:d.familyName)&&void 0!==p?p:""},setHasHydrated:e=>t({_hasHydrated:e}),setCountry:e=>t((0,o.Uy)(t=>{t.country=e,"AR"===e&&(t.paymentMethod.paymentData=u(t.paymentMethod.paymentData||{},{dni:{verifiedUserComplete:"false"}}))})),setPersonalInfo:e=>t((0,o.Uy)(t=>{t.personalInfo=u(t.personalInfo,l(e))})),setBillingAddress:e=>t((0,o.Uy)(t=>{t.billingAddress=u(t.billingAddress,l(e))})),setPaymentMethod:e=>t((0,o.Uy)(t=>{t.paymentMethod=u(t.paymentMethod,l(e))})),removePaymentMethod:()=>t((0,o.Uy)(t=>{t.paymentMethod={hasCard:!1,hasCoupon:!1,totalCoveredByAccountBalance:!1,paymentData:{hasCard:!1}}})),updateCartId:e=>t((0,o.Uy)(t=>{t.meta.cartId=e})),updateDocumentId:e=>t((0,o.Uy)(t=>{t.meta.documentId=e})),updateBirthDate:e=>t((0,o.Uy)(t=>{t.meta.birthDate=e})),setLyraData:e=>t((0,o.Uy)(t=>{t.paymentMethod.paymentData=u(t.paymentMethod.paymentData||{},l(e))})),setCheckoutData:e=>t((0,o.Uy)(t=>{t.paymentMethod.paymentData=u(t.paymentMethod.paymentData||{},l(e))})),getOrderPayload:()=>{let t=e(),n=null;if(!t.meta.cartId||"SSLA"!==t.country&&!t.meta.documentId)return null;try{let t=window.localStorage.getItem(s.dA.UTM_PARAMS);t&&(n=JSON.parse(t))}catch(t){console.error("Error reading UTM params from localStorage:",t)}return{...s.sx,cartId:t.meta.cartId,documentId:t.meta.documentId,setBillingAddressOnCart:{...t.personalInfo,...t.billingAddress},setPaymentMethodOnCart:{...t.paymentMethod,paymentData:{...t.paymentMethod.paymentData,...n?{utmCampaign:n.utm_campaign,utmContent:n.utm_content,utmMedium:n.utm_medium,utmSource:n.utm_source,utmTerm:n.utm_term}:{}}}}},reset:()=>t(c())}}),{name:"create-order-payload",storage:(0,r.FL)(()=>sessionStorage),onRehydrateStorage:()=>t=>{null==t||t.setHasHydrated(!0)}}))},4317:function(t,e,n){n.d(e,{E:function(){return a}});var o=n(4529);let a=(0,o.Ue)(t=>({active:null,showToast:e=>t({active:{id:e}}),hideToast:e=>t(t=>{var n;return{active:(null===(n=t.active)||void 0===n?void 0:n.id)===e?null:t.active}})}))},3109:function(t,e,n){n.d(e,{z:function(){return o}});let o={HASHES:{SELFCARE_SUBSCRIPTION:{PAGE_VIEW:"p-002.209.000.000.000.000",PLAN:"e-002.209.066.000.000.068",INVOICE:"e-002.209.091.000.000.256",DEVICES:"e-002.209.092.000.000.068",ADDITIONAL:"e-002.209.067.000.000.068",ADD_EXTRA:"e-002.209.093.000.000.278",ACTIVATE:"e-002.209.097.000.000.061",CHANGE_PLAN:"e-002.209.066.000.000.090",CANCEL_PLAN:"e-002.209.066.000.000.051",MENU_SUBSCRIPTION:"e-002.209.094.000.000.248",MENU_SETTINGS:"e-002.209.095.000.000.248",MENU_HELP:"e-002.209.096.000.000.248"},SELFCARE_RECURRING_PAYMENT_PIX:{PAGE_VIEW:"p-015.190.000.000.000.000"},SELFCARE_PENDING_INVOICE_PIX:{PAGE_VIEW:"p-015.189.000.000.000.000"},SELFCARE_ERROR_PAYMENT_PIX:{PAGE_VIEW:"p-041.023.000.000.000.000",TRY_AGAIN_BUTTON:"e-015.194.001.000.000.117",CHANGE_PAYMENT_BUTTON:"e-015.194.001.000.000.298"}},EVENTS:{PAGE:"page",INTERACTION:"interaction"}}},9576:function(t,e,n){n.d(e,{e:function(){return function t(e){return"object"!=typeof e||null===e?e:Array.isArray(e)?e.map(e=>"null"===e||""===e||"[]"===e?"":"true"===e||"false"!==e&&t(e)):Object.entries(e).reduce((e,n)=>{let[o,a]=n;switch(a){case"null":case"":e[o]="";break;case"[]":e[o]=[];break;case"true":e[o]=!0;break;case"false":e[o]=!1;break;default:e[o]="object"==typeof a?t(a):a}return e},{})}}})},8029:function(t,e,n){n.d(e,{D:function(){return d}});var o=n(202),a=n(7294),r=n(4139),i=n(7506),s=n(7037),l=n(9289),u=class extends i.l{#t;#e=void 0;#n;#o;constructor(t,e){super(),this.#t=t,this.setOptions(e),this.bindMethods(),this.#a()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){let e=this.options;this.options=this.#t.defaultMutationOptions(t),(0,r.VS)(this.options,e)||this.#t.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),e?.mutationKey&&this.options.mutationKey&&(0,r.Ym)(e.mutationKey)!==(0,r.Ym)(this.options.mutationKey)?this.reset():"pending"===this.#n?.state.status&&this.#n.setOptions(this.options)}onSubscribe(){1===this.listeners.size&&this.#n&&(this.#n.addObserver(this),this.#a())}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(t){this.#a(),this.#r(t)}getCurrentResult(){return this.#e}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#a(),this.#r()}mutate(t,e){return this.#o=e,this.#n?.removeObserver(this),this.#n=this.#t.getMutationCache().build(this.#t,this.options),this.#n.addObserver(this),this.#n.execute(t)}#a(){let t=this.#n?.state??(0,l.R)();this.#e={...t,isPending:"pending"===t.status,isSuccess:"success"===t.status,isError:"error"===t.status,isIdle:"idle"===t.status,mutate:this.mutate,reset:this.reset}}#r(t){s.Vr.batch(()=>
1{if(this.#o&&this.hasListeners()){let e=this.#e.variables,n=this.#e.context,o={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};if(t?.type==="success"){try{this.#o.onSuccess?.(t.data,e,n,o)}catch(t){Promise.reject(t)}try{this.#o.onSettled?.(t.data,null,e,n,o)}catch(t){Promise.reject(t)}}else if(t?.type==="error"){try{this.#o.onError?.(t.error,e,n,o)}catch(t){Promise.reject(t)}try{this.#o.onSettled?.(void 0,t.error,e,n,o)}catch(t){Promise.reject(t)}}}this.listeners.forEach(t=>{t(this.#e)})})}};function d(t,e){let n=(0,o.NL)(e),[i]=a.useState(()=>new u(n,t));a.useEffect(()=>{i.setOptions(t)},[i,t]);let l=a.useSyncExternalStore(a.useCallback(t=>i.subscribe(s.Vr.batchCalls(t)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),d=a.useCallback((...t)=>{i.mutate(t[0],t[1]).catch(r.ZT)},[i]);if(l.error&&(0,r.L3)(i.options.throwOnError,[l.error]))throw l.error;return{...l,mutate:d,mutateAsync:l.mutate}}}}]); 2//# sourceMappingURL=883.55ea8645af99c38f.js.map
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.