Build 582977stable
Module 38785
3,792 characters · in 8dc8560fdcb7ea7b.js, 8e1d37646019a6b6.jsDependencies
Source Raw
function(e,t,n){n.d(t,{T_:()=>y,Ed:()=>p});var r=n(627968),l=n(64700),i=n(503698),o=n.n(i),u=n(683071),s=n(725836);n(321073);var a=n(525723),c=n(901930),d=n(316915),E=n(900730),C=n(426398),h=n(375708),S=n(580133),_=n(480642),I=n(848584);n(652215);var f=n(327105),A=n(639563);function p(e){let{className:t,shouldShowUnifiedHeader:n,headerBadgeConfig:l}=e;return(0,r.jsxs)(r.Fragment,{children:[n?(0,r.jsx)(s.UY,{children:(0,r.jsx)(S.f,{headerBadgeConfig:l})}):null,(0,r.jsx)(_.DJ,{className:o()(A.g4,t)})]})}function m(e){return null!=e&&"object"==typeof e&&"message"in e&&"type"in e?(0,r.jsx)(u.w,{type:e.type,hidden:e.hidden,children:e.message},e.key):(0,r.jsx)(l.Fragment,{children:e.directContent},e.key)}function g(e){return null==e||""===e}function T(e){let{children:t,showUpperNoticesAboveGlobalNotices:n=!1}=e,{errorMessage:i,warningMessage:o,richNotices:s}=function(){let e,{errorMessage:t}=(0,c.j)({}),n=(e=(0,d.t4)(e=>e.selectedSkuId),(0,a.vw)({skuId:e})?h.intl.format(h.t.fsOXXO,{}):null),i=function(){let e=(0,d.t4)(e=>e.paymentSourceId),t=(0,C.kc)(),{relocationCountry:n,relocationCurrencyCode:i,willForfeitGiftCardBalance:o}=l.useMemo(()=>{let n=null!=e?t.find(t=>t.id===e):null;return{relocationCountry:n?.relocationCountry??null,relocationCurrencyCode:n?.relocationCurrencyCode??null,willForfeitGiftCardBalance:n?.willForfeitGiftCardBalance??!1}},[t,e]);return l.useMemo(()=>null==n?null:{directContent:(0,r.jsx)(E.c,{relocationCountry:n,relocationCurrencyCode:i,willForfeitGiftCardBalance:o}),key:"store-relocation-notice"},[n,i,o])}();return{errorMessage:t,warningMessage:n,richNotices:l.useMemo(()=>{let e=[];return null!=i&&e.push(i),e},[i])}}(),S=l.useRef(null);return l.useEffect(()=>{g(i)||null==S.current||S.current.scrollIntoView({behavior:"smooth"})},[i]),l.useMemo(()=>{if(!(!g(i)||!g(o)||s.length>0||null!=t))return null;let e=(0,r.jsxs)(r.Fragment,{children:[g(i)?null:(0,r.jsx)(u.w,{type:"critical",children:i}),g(o)?null:(0,r.jsx)(u.w,{type:"warning",children:o}),s.map(m)]});return(0,r.jsx)("div",{ref:S,className:A.dD,children:n?(0,r.jsxs)(r.Fragment,{children:[t,e]}):(0,r.jsxs)(r.Fragment,{children:[e,t]})})},[i,o,s,t,n])}function N(e){return l.useMemo(()=>null==e?null:Array.isArray(e)?0===e.length?null:(0,r.jsx)(r.Fragment,{children:e.map(e=>m(e))}):null!=e?m(e):null,[e])}function P(e){let{upperInlineNoticeProps:t,shouldShowGlobalNotices:n,showUpperNoticesAboveGlobalNotices:i}=e,o=N(t);return l.useMemo(()=>null!=o||n?n?null!=o?(0,r.jsx)(T,{showUpperNoticesAboveGlobalNotices:i,children:o}):(0,r.jsx)(T,{}):(0,r.jsx)("div",{className:A.dD,children:o}):null,[n,o,i])}function y(e){let{upperInlineNoticeProps:t,planSelectContent:n,purchaseItemContent:l,subscriptionDetailsContent:i,isStepLoading:u,paymentMethodContent:a,invoiceSummaryContent:c,promotionalNoticeContent:d,legalContent:E,invoiceTotalDueLabel:C=h.intl.string(f.default.R0cZsM),invoiceTotalDueValue:_,shouldShowGlobalNotices:m,showUpperNoticesAboveGlobalNotices:g,footerInlineNoticeProps:T,headerBadgeConfig:y,className:R}=e,O=N(T);return u?(0,r.jsx)(p,{className:R,shouldShowUnifiedHeader:!0}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:o()(R,{[A.pg]:null==c}),children:[(0,r.jsx)(P,{upperInlineNoticeProps:t,shouldShowGlobalNotices:m,showUpperNoticesAboveGlobalNotices:g}),n,null!=n&&null!=l&&(0,r.jsx)("div",{className:A.ls}),l,null!=i&&(0,r.jsx)("div",{className:A.P3,children:i}),(0,r.jsx)("div",{className:A.Jv,children:a}),null!=c&&(0,r.jsx)("div",{className:A.ZF,children:c})]}),(0,r.jsx)(s.UY,{children:(0,r.jsx)(S.f,{headerBadgeConfig:y})}),(0,r.jsxs)(s.bx,{children:[null!=C&&null!=_&&(0,r.jsx)(I.Qf,{className:A.NR,label:C,value:_}),null!=d?(0,r.jsx)("div",{className:A.uh,children:d}):null,E,null!=O?(0,r.jsx)("div",{className:A.Uu,children:O}):null]})]})}}