dotfiles/.config/spicetify/Extracted/Themed/xpui/5037.js

2 lines
19 KiB
JavaScript
Raw Normal View History

2024-07-11 00:01:49 +05:30
"use strict";(("undefined"!=typeof self?self:global).webpackChunkopen=("undefined"!=typeof self?self:global).webpackChunkopen||[]).push([[5037,1005],{9686:(t,n,r)=>{r.r(n),r.d(n,{EPISODE_SPONSOR_NOW_PLAYING_BAR_HAT_CALL_TO_ACTION_BUTTON_TEST_ID:()=>e,EpisodeSponsorNowPlayingBarHatButtonWrapper:()=>i,default:()=>c});var o=r(3715),s=r(36320),a=r(4637);const e="episode-sponsor-now-playing-bar-hat-call-to-action-button";function i({postClickEvent:t,clickUrl:n,adEvent:r}){return(0,a.jsx)("div",{className:s.Z.buttonWrapper,children:(0,a.jsx)(o.K,{to:n,"data-testid":e,onClick:t,crossPromoVariant:"buttonAction"in r.ad.metadata?r.ad.metadata:void 0,children:r.ad.metadata.buttonMessage})})}const c=i},35037:(t,n,r)=>{r.r(n),r.d(n,{EPISODE_SPONSOR_NOW_PLAYING_BAR_HAT_CALL_TO_ACTION_BUTTON_TEST_ID:()=>f.EPISODE_SPONSOR_NOW_PLAYING_BAR_HAT_CALL_TO_ACTION_BUTTON_TEST_ID,EPISODE_SPONSOR_NOW_PLAYING_BAR_HAT_WRAPPER_TEST_ID:()=>g,EpisodeSponsorNowPlayingBarHatWrapper:()=>b,default:()=>w});var o=r(59496),s=r(84875),a=r.n(s),e=r(50346),i=r(58706),c=r(84120),u=r(1005);function l({adEvent:t,ad:n}){const r=function({adEvent:t,ad:n}){return(0,o.useMemo)((()=>(("true"===t?.ad.metadata.useAdvertiserImage?t?.ad.cover_art?.find((({url:t})=>t)):void 0)||n?.images.find((({url:t})=>t)))?.url),[t,n])}({adEvent:t,ad:n}),[s,a]=(0,o.useState)(),e=(0,o.useMemo)((()=>s instanceof Error?i.fwM:s?.colorDark.toCSS(c.jT.RGB)),[s]);return(0,o.useEffect)((function(){a(void 0),r&&(0,u.extractColors)(r).then(a).catch((()=>a(new Error("color not extracted successfully for episode NPB hat"))))}),[r]),{extractedColor:e}}var h=r(95535),d=r(36320),p=r(4637),f=r(9686);const g="episode-sponsor-now-playing-bar-hat-wrapper",m=(0,o.lazy)((()=>Promise.resolve().then(r.bind(r,9686))));function b({adEvent:t,hidingHat:n,ad:r,postClickEvent:s}){const{extractedColor:i}=l({adEvent:t,ad:r}),{tagline:c,buttonMessage:u}=t.ad.metadata,f="true"===t.ad.metadata.useClickURL?(0,e.EC)(t.ad.click_url)?.toURLPath(!0)||t.ad.click_url:void 0;return(0,p.jsx)("div",{className:d.Z.wrapperBackground,children:(0,p.jsxs)("div",{className:a()(i?d.Z.wrapperWithColorExtracted:d.Z.wrapper,{[d.Z.hidingHat]:n}),style:{backgroundColor:i},"data-testid":g,children:[(0,p.jsx)(h.S,{className:d.Z.tagline,children:c}),u&&f&&(0,p.jsx)(o.Suspense,{fallback:!0,children:(0,p.jsx)(m,{postClickEvent:s,clickUrl:f,adEvent:t})})]})})}const w=b},3715:(t,n,r)=>{r.d(n,{K:()=>d});var o=r(59496),s=r(84875),a=r.n(s),e=r(7695),i=r(97401),c=r(71619);const u={podcastSponsorCallToActionButton:"WI4OWZsbabgCus7t7tbe"};var l=r(4637);const h=(0,o.lazy)((()=>r.e(5503).then(r.bind(r,5503))));function d({children:t,"data-testid":n,className:r,crossPromoVariant:s,...d}){const p=(0,o.useMemo)((()=>(0,l.jsx)(i.x,{..."to"in d?{to:d.to}:void 0,children:(0,l.jsx)(e.PodcastSponsorCallToActionButtonBase,{children:t,...d})})),[t,d]);return(0,l.jsx)("div",{className:a()(u.podcastSponsorCallToActionButton,r),"data-testid":n,children:s&&s.buttonAction!==c.kI?(0,l.jsx)(o.Suspense,{fallback:p,children:(0,l.jsx)("div",{children:(0,l.jsx)(h,{crossPromoVariant:s,children:t,potentiallyMalformedUri:"to"in d?d.to:void 0,...d})})}):p})}},7695:(t,n,r)=>{r.r(n),r.d(n,{PodcastSponsorCallToActionButtonBase:()=>e,default:()=>i});var o=r(79475),s=r(56162),a=r(4637);function e({children:t,...n}){return(0,a.jsx)(o.D,{as:"div",...n,buttonSize:n.buttonSize||o.D.sm,children:(0,a.jsx)(s.D,{variant:"mestoBold",children:t})})}const i=e},97401:(t,n,r)=>{r.d(n,{x:()=>e});var o=r(59496),s=r(4637);const a=(0,o.lazy)((()=>Promise.resolve().then(r.bind(r,63120))));function e(t){return"to"in t?(0,s.jsx)(a,{...t}):(0,s.jsx)("div",{...t})}},95535:(t,n,r)=>{r.d(n,{S:()=>c});var o=r(84875),s=r.n(o),a=r(56162);const e={podcastSponsorWrapper:"J5CRaPNhkzTtun81ix4_",podcastSponsor:"Ydj9D6hTaRL_zq6TPLQi",podcastSponsorExternalLink:"X77gJ8bX8tndSN1hTjWR",podcastSponsorImage:"eHZ28TWANGnQvU01g2oY",podcastSponsorCaption:"v2F4iVnwnrHtPu5GC9HB",podcastSponsorAdvertiser:"DHBG_yrmCz0kKTXhkmbE",podcastSponsorButtonMessage:"wChs0Q3HkTdKiBoQ33bT",podcastSponsorCtaButtonWrapper:"gUwjluEACtt5LCUu5sxp
//# sourceMappingURL=5037.js.map