1(()=>{(function(){try{var p=typeof window!="undefined"?window:typeof global!="undefined"?global:typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:{},m=new p.Error().stack;m&&(p._sentryDebugIds=p._sentryDebugIds||{},p._sentryDebugIds[m]="27ddb14f-97c5-4c34-a52f-14c3da218e34",p._sentryDebugIdIdentifier="sentry-dbid-27ddb14f-97c5-4c34-a52f-14c3da218e34")}catch(e){}})();(self.webpackChunkdice_web=self.webpackChunkdice_web||[]).push([[19961,40967,53777,58146],{25278:((p,m,e)=>{e.d(m,{LX:()=>l,qS:()=>d});var n=e(68407),y=e(21904),l;(function(s){s.MANAGE="MANAGE",s.UPGRADE="UPGRADE",s.DOWNGRADE="DOWNGRADE"})(l||(l={}));const D=s=>s.type===SubEventDetailsType.PARTICIPANTS,d=(s,f=l.MANAGE)=>{if(s&&y.QN[s]){const O=y.QN[s];switch(f){case l.UPGRADE:return{label:"upgradeSubscriptionStore",data:{store:O}};case l.DOWNGRADE:return{label:"downgradeSubscriptionStore",data:{store:O}};default:return{label:"manageSubscriptionStore",data:{store:O}}}}switch(f){case l.UPGRADE:return{label:"upgradeSubscriptionWeb"};case l.DOWNGRADE:return{label:"downgradeSubscriptionWeb"};default:return{label:"manageSubscriptionWeb"}}}}),26969:((p,m,e)=>{e.d(m,{Bm:()=>r,Hk:()=>F,J9:()=>C,QF:()=>K,St:()=>u,YI:()=>Q,fI:()=>j,fP:()=>H,l2:()=>ee,tV:()=>$});var n=e(85537),y=e(21904),l=e(84657),D=e(57320),d=e(12776),s=Object.defineProperty,f=Object.defineProperties,h=Object.getOwnPropertyDescriptors,O=Object.getOwnPropertySymbols,S=Object.prototype.hasOwnProperty,b=Object.prototype.propertyIsEnumerable,x=(t,o,a)=>o in t?s(t,o,{enumerable:!0,configurable:!0,writable:!0,value:a}):t[o]=a,W=(t,o)=>{for(var a in o||(o={}))S.call(o,a)&&x(t,a,o[a]);if(O)for(var a of O(o))b.call(o,a)&&x(t,a,o[a]);return t},R=(t,o)=>f(t,h(o));const g=t=>t.replace("/v2","/v4"),H=(t,o)=>t.get(`${g(t.baseUrl)}${d.U.GET_GIFTS}?countryCode=${o}`),$=(t,o)=>t.post(`${g(t.baseUrl)}${d.U.REDEEM_GIFT}/${o}`,{}),j=(t,o)=>t.get(`${g(t.baseUrl)}${d.U.REDEEM_GIFT}/${o}`),u=(t,o)=>t.post(d._.SET_PII,o),r=t=>t.get(g(t.baseUrl)+d.U.GET_BASKET),i=t=>t.delete(g(t.baseUrl)+d.U.GET_BASKET_CHANGES),C=async(t,{recipient:o,duration:a,message:T},A,M)=>(await i(M),await L(t,o,a,T,A,M)),L=(t,o,a,T="",A="",M)=>{const V={recipientEmail:o,note:T,options:a?{numberOfPeriods:{type:"INT_RANGE",value:a}}:{}};return M.post(`${g(M.baseUrl)}${d.U.ADD_GIFT_TO_BASKET}/${t}?countryCode=${A}`,V)},I=t=>{try{return(0,n.s)(t)}catch(o){return null}},K=async t=>{const o=localStorage.getItem(D.h0),a=I(o);return a?(a.isGuest=a.gue,a.loc=a.loc||a.lo2,a):G(t)},G=async t=>{try{const{authorisationToken:o,refreshToken:a}=await t.post("/login/guest/checkin",null,{useAuth:!1}),{sub:T,gue:A,rol:M,loc:z,lo2:V}=I(o),J={id:T,rol:M,isGuest:A,loc:z||V};return localStorage.setItem(D.h0,o),localStorage.setItem(D.US,a),J}catch(o){U()}},U=()=>{localStorage.removeItem(D.h0),localStorage.removeItem(D.US)},F=t=>{var o,a;const{options:T}=t,A=!Object.keys(T||{}).length,M=A?{type:l.bK.PPV,subscriptionPeriod:null}:{subscriptionPeriod:(o=T.period)==null?void 0:o.value,type:l.bK.SUBSCRIPTION};return{id:t.externalId,badge:null,description:t.description,name:t.name,amounts:[R(W({},t.itemPrice),{default:!0})],purchaseStrategy:M,type:A?l.bK.PPV:l.AV.STANDARD,defaultMarketingPricePeriod:A?null:(a=T.period)==null?void 0:a.value,status:null,managed:!0}},Q=t=>({id:t.externalId,badge:null,description:t.description,name:t.name,amounts:[R(W({},t.total),{default:!0})],type:null,defaultMarketingPricePeriod:null,status:null,managed:!0,purchaseStrategy:null}),ee=t=>{var o;return{basketItems:t.basketItems.map(te),paymentProvider:X((o=t.availablePaymentProviders)==null?void 0:o[0]),paymentProvidersList:t.availablePaymentProviders.map(X),tax:t.tax,totalDiscount:t.totalDiscount,discountedTotal:t.total,subTotal:t.totalExcTax,voucherItems:null,taxRateEstimated:t.taxRateEstimated}},X=t=>({providerId:null,name:t.name,providerType:t.paymentProviderType,paymentProviderGroupType:t.paymentProviderGroupType,paymentMethodType:t.paymentProviderGroupType===y.yS.CREDIT_CARD?y.eq.CARD:t.paymentProviderGroupType,targetPaymentProvider:t.targetPaymentProvider,details:t.details}),te=t=>({catalogPrice:t.catalogPrice.amount,currency:t.total.currency,description:t.description,name:t.name,scale:t.total.scale,tax:t.tax.amount,total:t.total.amount,subscriptionSetting:null,subTotal:null,taxInclusive:null,taxRate:null,sku:null})}),46748:((p,m,e)=>{e.r(m),e.d(m,{default:()=>ue});var n=e(96540),y=e(71468),l=e(76213),D=e(21904),d=e(32248),s=e(84657),f=e(58562),h=e(90953),O=e(63196),S=e(64759),b=e(19125),x=e(9087),W=e(20773),R=e(54946),g=e(59906),H=e(90634),$=e(74699),j=e(58146),u=e(59530),r=e(57611),i=e(16231),C=e(69866),L=e(79544),I=e(2275),K=e(16505);const G=async c=>await K.LV.get(`${(0,K.bL)(K.LV.baseUrl)}/payment-providers/available/licence/${c}`),U=(c,E)=>[c].reduce((P,N)=>{var ne,Y;const _=((Y=(ne=N.licenceFamilies)==null?void 0:ne[0])==null?void 0:Y.licences)||N.nonFamilyBasedLicences;if(P=_==null?void 0:_.find(se=>se.licence.id===Number(E)),P)return P;throw Error("no licence found")},{});var F=e(43797);
1const Q={colorRed:"#b60e0e",textSecondaryDarkMode:"#c5cad3",alertDarkMode:"#ff6b6b",textDarkModeColor:"#fff",darkGreyDarkModeColor:"#2a2a2a"};var ee=Object.defineProperty,X=Object.defineProperties,te=Object.getOwnPropertyDescriptors,t=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable,T=(c,E,P)=>E in c?ee(c,E,{enumerable:!0,configurable:!0,writable:!0,value:P}):c[E]=P,A=(c,E)=>{for(var P in E||(E={}))o.call(E,P)&&T(c,P,E[P]);if(t)for(var P of t(E))a.call(E,P)&&T(c,P,E[P]);return c},M=(c,E)=>X(c,te(E)),z=(c=>(c.SHOW_LICENCE="SHOW_LICENCE",c.CANCEL_LICENCE="CANCEL_LICENCE",c.PAYMENT_UPDATE="PAYMENT_UPDATE",c))(z||{});const V=()=>{var c,E,P;const{licenceId:N}=(0,l.g)(),Y=new URLSearchParams(window.location.search).get("from"),_=!(0,y.d4)(B=>B.services.app.previousLocation)&&!Y,Z=(0,O.SO)([i.pO])<=i.pO,[Ee,ve]=n.useState(!1),[v,me]=n.useState(null),[Pe,le]=n.useState(!1),[ye,re]=n.useState(null),[ce,w]=n.useState(Z&&_?"SHOW_LICENCE":"PAYMENT_UPDATE"),fe=(0,r.W)(),{settings:{CHECKOUT_PAGE_TEXT_COLOUR_SCHEME:Oe},checkoutFlow:De}=(0,h.U)(),{defaultMenuParams:ie}=n.useContext(u.P),{updatePaymentMethod:pe,cancel:ge}=(0,f.b0)(["updatePaymentMethod","cancel"]),Ce=D.nn.STREAMLINED_FLOW===De,Te=Oe===d.Bd.DARK;n.useEffect(()=>{le(null),re(null),Ae()},[]),n.useEffect(()=>{Z||w("PAYMENT_UPDATE")},[Z]);const Ae=async()=>{await Promise.all([(0,C.fC)(!0,[N]),G(N)]).then(([B,k])=>{const q=U(B.parsedData,N);me({providers:k.paymentProviders,licenceDetails:q})}).catch(B=>{Me(B)}).finally(()=>ve(!0))},Me=B=>{le(!0),B.messages[0]==="activeManagedPaymentEventNotFound"&&re("activeManagedPaymentEventNotFound")},oe=M(A({},v==null?void 0:v.licenceDetails),{licence:M(A({},(c=v==null?void 0:v.licenceDetails)==null?void 0:c.licence),{paymentProviderInfo:(E=v==null?void 0:v.licenceDetails)==null?void 0:E.paymentProviderInfo,licenceStatus:(P=v==null?void 0:v.licenceDetails)==null?void 0:P.licenceStatus})}),Le={licenceId:N,licenceProviders:v==null?void 0:v.providers,licenceDetails:oe,isPaymentUpdateFlow:!0,showPaymentUpdateLicence:_&&Z?()=>w("SHOW_LICENCE"):null},Ie=()=>{var B,k,q,de;const ae=(k=(B=v==null?void 0:v.licenceDetails)==null?void 0:B.paymentProviderInfo)==null?void 0:k.managed;if(ce==="CANCEL_LICENCE")return n.createElement(J,null,n.createElement($.k,{back:()=>w("SHOW_LICENCE"),activeLicence:oe.licence,confirm:()=>(0,I.mH)(Y||(ie==null?void 0:ie.to),fe),action:()=>(0,W.pU)(+N,oe.licence),description:ae?L.Kj:L.fd,buttonLabel:"yesCancel",buttonDisabled:!ae,isPaymentUpdateFlow:!0,isStreamlinedCheckoutFlow:Ce,isDarkMode:Te}));if(ce==="SHOW_LICENCE"){const he=v.licenceDetails.licence.type===s.AV.FREE,Se=((de=(q=v==null?void 0:v.licenceDetails)==null?void 0:q.licenceStatus)==null?void 0:de.autoRenewingStatus)===s.l$.AUTO_RENEWING,Re=ae&&!he&&Se,Ue={title:pe.value,action:()=>w("PAYMENT_UPDATE")},Ne={title:ge.value,action:()=>w("CANCEL_LICENCE")};return n.createElement(J,null,n.createElement(x.SignupPageTitle,{licenceDetails:v==null?void 0:v.licenceDetails}),n.createElement(g.I,{extraClasses:"licence-card--payment-update",avoidCollapse:!0,secondaryButton:Re&&Ne,licenceId:v.licenceDetails.licence.id,button:Ue,title:v.licenceDetails.licence.name},n.createElement(b.A,{source:v.licenceDetails.licence.description,customRenderers:(0,H.w)()})))}else return n.createElement(F.b,{value:Le},n.createElement(j.SignupWrapper,{didError:Pe,errorBoundaryLabelKey:ye}))};return n.createElement("div",{className:"payment-update"},Ee?Ie():n.createElement(S.A,{useRealmColor:!0}))},J=({children:c})=>{var E;const P=(0,l.zy)(),N=(0,r.W)();return n.createElement("div",{className:"payment-update--licence"},n.createElement(R.u,{location:P,history:N,logoSrc:window.APP_CONF.LOGO_WEB||((E=window.APP_CONF.settings)==null?void 0:E.LOGO_WEB)}),c)},ue=V}),53777:((p,m,e)=>{e.r(m),e.d(m,{Modal:()=>x});var n=e(96540),y=e(40961),l=e(94708),D=e.n(l),d=e(58562),s=e(13516),f=e(39908),h=e(72210),O=e(81956);const b="[data-fallback-focus]",x=W=>{const R=document.getElementById("dice-modal"),{children:g,className:H,isRtL:$,allowEventPropagation:j,handleClose:u,icon:r,backgroundImage:i,initialFocusRef:C}=W,L=(0,s.AH)("messages",H,$&&"modal--right-left"),{close:I}=(0,d.b0)(["close"]),K=(I==null?void 0:I.value)||"Close",G=n.useRef(null);return n.useEffect(()=>{if(!u)return;const U=F=>{F.key==="Escape"&&(F.preventDefault(),F.stopPropagation(),u())};
1return document.addEventListener("keydown",U),()=>document.removeEventListener("keydown",U)},[u]),R&&y.createPortal(n.createElement(O.Q,Object.assign({allowEventPropagation:j},i?{backgroundImage:i}:{}),n.createElement("div",{className:L},n.createElement(l.FocusTrap,{focusTrapOptions:{fallbackFocus:()=>G.current||b,initialFocus:()=>(C==null?void 0:C.current)||G.current||void 0,escapeDeactivates:!1,allowOutsideClick:U=>!!U.target.closest("#onetrust-consent-sdk")}},n.createElement("div",{className:"message","aria-modal":"true","aria-label":W.ariaLabel,"data-fallback-focus":!0,role:"dialog",ref:G,tabIndex:-1},g,r&&n.createElement("div",{className:"message__optional-icon"},r),u&&n.createElement(f.K0,{smallMode:!0,onClick:u,className:(0,s.AH)(f.k9.PRIMARY,"btn-close"),"aria-label":K},n.createElement(h.Close,{className:"btn-icon__icon"})))))),R)}}),58146:((p,m,e)=>{e.r(m),e.d(m,{SignupWrapper:()=>j});var n=e(96540),y=e(71468),l=e(82511),D=e(58562),d=e(53777),s=e(59530),f=e(57611),h=e(97963),O=e(85401),S=Object.defineProperty,b=Object.getOwnPropertySymbols,x=Object.prototype.hasOwnProperty,W=Object.prototype.propertyIsEnumerable,R=(u,r,i)=>r in u?S(u,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):u[r]=i,g=(u,r)=>{for(var i in r||(r={}))x.call(r,i)&&R(u,i,r[i]);if(b)for(var i of b(r))W.call(r,i)&&R(u,i,r[i]);return u};const H=n.lazy(()=>Promise.all([e.e(37817),e.e(9279),e.e(62747),e.e(47056),e.e(7988),e.e(39147),e.e(29979),e.e(96746),e.e(31865),e.e(43913),e.e(90137),e.e(84431),e.e(46879),e.e(11543),e.e(93262),e.e(5029),e.e(39088),e.e(92516),e.e(59906),e.e(40967)]).then(e.bind(e,9087))),$=u=>{const{outsideAllowedTerritories:r}=window.APP_CONF,{isChild:i}=u,C=i?"kidPurchasePermissionDenied":r?"signupGeoRestriction":"vpnErrorMessage",L=(0,D.b0)([C]),I=(0,y.d4)(Q=>Q.services.app.isRtL),{routes:K,defaultMenuParams:G}=n.useContext(s.P),U=(0,f.W)(),F=()=>(0,O.OS)(G,K,U);return n.createElement(d.Modal,{isRtL:I,handleClose:F},n.createElement(n.Fragment,null,L[C].value))},j=u=>{const{outsideAllowedTerritories:r,usingVpnOnDisallowingRealm:i}=window.APP_CONF,{type:C}=(0,h.sh)()||{},L=C===l.XE.CHILD;return r||i||L?n.createElement($,{isChild:L}):n.createElement(H,g({},u))}}),81956:((p,m,e)=>{e.d(m,{Q:()=>D});var n=e(96540);const y=d=>{const s=document.querySelector(d);s&&s.classList.add("no-scroll")},l=d=>{const s=document.querySelector(d);s&&s.classList.remove("no-scroll")},D=d=>{const{children:s,allowEventPropagation:f}=d;(0,n.useEffect)(()=>(y("body"),()=>l("body")),[]);const h=S=>{f||S.stopPropagation()},O=S=>{f||S.stopPropagation()};return n.createElement("div",{className:"full-screen-overlay","data-testid":"overlay",onTouchStart:h,onClick:O},n.createElement("div",{className:"full-screen-overlay--content"},s))}}),97966:((p,m,e)=>{e.d(m,{E:()=>y});var n=e(96540);const y=(0,n.createContext)(null)})}]);})(); 2 3//# sourceMappingURL=payment-update-page.0755036168a0a773b196.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.