Build 555975stable
Module 680262
3,330 characters · in 41a1b5068a0e122b.jsDependencies
Source Raw
function(e,t,r){r.d(t,{B:()=>U});var n=r(627968),i=r(834730),l=r(64700),a=r(503698),s=r.n(a),o=r(993408),c=r(140735),u=r(580630),d=r(375708),m=r(252955);let R=e=>{let{price:{amount:t,currency:r},className:l,variant:a="heading-md/semibold"}=e,o=(0,u.RS)(t,r);return(0,n.jsxs)(i.E,{variant:a,className:s()(m.v,l),children:[(0,n.jsx)(c.A,{children:d.intl.format(d.t["2CEGln"],{price:o})}),(0,n.jsx)("span",{"aria-hidden":!0,children:o})]})};var N=r(219103),A=r(469215);function _(e){let{product:t,hasShopDiscount:r,discountSource:i,discount:l,className:a,discountOfferAmount:c,hideStrikethroughPrice:u=!1,discountIconDisplayMode:d,discountIconSize:m="md"}=e,_=(0,o.WD)(t,{hasShopDiscount:r,discount:l});if(null==_)return null;let{defaultPrice:h,showDefaultPriceOnly:E}=_;if(E)return(0,n.jsx)("div",{className:s()(A.kG,a),children:(0,n.jsx)(N.x,{priceAmount:h.amount,priceCurrency:h.currency})});let{showDiscountPrice:g,originalPrice:v,finalPrice:x}=_;return(0,n.jsxs)("div",{className:s()(A.kG,a),children:[u?null:(0,n.jsx)(R,{price:v,className:A.q9}),(0,n.jsx)(N.x,{priceAmount:x.amount,priceCurrency:x.currency,discount:l,className:s()({[A.q9]:null==c}),discountIconConfig:g&&null!=d?{displayMode:d,source:i??o.D0.NITRO,size:m}:void 0,discountOfferAmount:c})]})}var h=r(990078),E=r(403581),g=r(939249),v=r(688810),x=r(532794),p=r(758836),f=r(788868),T=r(447806);let b=e=>{let{text:t,onTrackClick:r}=e,{analyticsLocations:i}=(0,v.Ay)(),a=l.useRef(null);return(0,n.jsx)(g.D,{className:T.F,innerRef:a,onClick:()=>{r?.(p.sH.SUBSCRIBE_NOW),(0,x.A)({subscriptionTier:f.pe.TIER_2,analyticsLocations:i,returnRef:a})},children:t})};var C=r(652215),O=r(805961);function j(e){let{product:t,onTrackClick:r}=e,l=(0,o.yt)(t,C.lid.PREMIUM_TIER_2);if(null==l)return null;let a=(0,u.RS)(l.amount,l.currency);return(0,n.jsxs)("div",{className:O.k,children:[(0,n.jsx)(h.m,{text:d.intl.string(d.t.MPFyJ5),"aria-label":d.intl.string(d.t.X3Ekj8),children:(0,n.jsx)(E.t,{size:"md",color:"currentColor",className:O.o})}),(0,n.jsx)(i.E,{variant:"text-xs/medium",children:d.intl.format(d.t.Sv8iic,{price:a,subscribeNowHook:e=>(0,n.jsx)(b,{text:e,onTrackClick:r})})})]})}var B=r(818348),S=r(752274);function k(e){let{orbPrice:t,isProductDisabled:r,hasSufficientOrbs:l}=e,a=r?d.intl.string(d.t.wu4gyV):d.intl.string(d.t.eFNRzU),s=r||!l;return(0,n.jsxs)("div",{className:S.eg,children:[(0,n.jsx)("div",{className:S.zR,children:(0,n.jsx)(i.E,{variant:"text-xs/normal",className:s?S.r9:void 0,children:a})}),(0,n.jsx)(N.x,{priceAmount:t.amount,priceCurrency:t.currency,className:s?S.r9:void 0})]})}function U(e){let{prices:t,hasShopDiscount:r,discountSource:i,discount:l,product:a,hasSufficientOrbs:s,onTrackClick:o,isProductDisabled:c,discountOfferAmount:u}=e,d=null!=u;return 0===t.length?null:t[0].currency===B.Yr.DISCORD_ORB?(0,n.jsx)(k,{orbPrice:t[0],isProductDisabled:c,hasSufficientOrbs:s}):(0,n.jsxs)("div",{className:S.eg,children:[(0,n.jsxs)("div",{className:S.pw,children:[(0,n.jsx)(_,{product:a,discount:l,hasShopDiscount:r,discountSource:i,hideStrikethroughPrice:!r||d,discountIconDisplayMode:"tooltip",discountIconSize:"xs",discountOfferAmount:u}),r||d?null:(0,n.jsx)(j,{product:a,onTrackClick:o})]}),t.length>1&&t[1].currency===B.Yr.DISCORD_ORB&&(0,n.jsx)(N.x,{priceAmount:t[1].amount,priceCurrency:t[1].currency,className:c||!s?S.r9:void 0})]})}}