mirror of
https://github.com/kristoferssolo/solorice.git
synced 2025-10-21 20:10:34 +00:00
2 lines
9.7 KiB
JavaScript
Executable File
2 lines
9.7 KiB
JavaScript
Executable File
"use strict";(("undefined"!=typeof self?self:global).webpackChunkclient_web=("undefined"!=typeof self?self:global).webpackChunkclient_web||[]).push([[3838],{60275:(e,n,t)=>{t.r(n),t.d(n,{CulturalMomentHub:()=>ie,REDIRECT_BASE:()=>ne,default:()=>le});var i=t(52542),l=(t(7651),t(83234),t(30456),t(26701),t(37417),t(11737),t(51691),t(702),t(5672),t(43379),t(34192),t(88856),t(51565),t(18316),t(93493)),o=t(30758),r=t(97500),u=t.n(r),a=t(45004),s=t(92107),d=t(867),c=t(45625),v=t(44206),m=(t(24302),t(57149),t(49166),t(23100)),p=t(9754),f=t(33598),h=t(17067),g=t(85925),b=t(88420),x=t(14546),y=t(86070),j=function(e){var n,t,i=e.image,l=e.color,o=void 0===l?m.vyq:l,r=e.title,u=void 0===i?p.K.SMALL:p.K.DEFAULT,a=null!==(n=null==i||null===(t=i.custom)||void 0===t||null===(t=t.sizes)||void 0===t?void 0:t.flatMap((function(e){return e.uri?[{url:e.uri,width:e.width,height:e.height}]:[]})))&&void 0!==n?n:null!=i&&i.uri?[{url:null==i?void 0:i.uri}]:[];return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsxs)(p.z,{backgroundImages:a,backgroundColor:o,size:u,children:[(0,y.jsx)(h.h,{children:r?(0,y.jsx)(g.X,{text:r}):null}),(0,y.jsx)(f.Y,{children:r?(0,y.jsx)(b.mm,{children:r}):null})]}),(0,y.jsx)(x.f,{color:o})]})},w=(t(25550),t(15342),t(80366)),A=t(36085),O=(t(14551),t(60184),t(68216),t(37936)),k=t(26314),_=function(e){return"number"==typeof e?new Date(1e3*e).toISOString():null};var D=function(e,n,t){var i,l,o,r,u,a;if(void 0===e.id)return null;var s=n.map((function(e,n){return function(e,n){var t,i,l,o,r,u,a,s,d,c,v,m,p,f,h,g,b,x=null===(t=e.component)||void 0===t?void 0:t.id,j=e.id;if(void 0===x||void 0===j)return null;var w,A=null===(i=e.events)||void 0===i||null===(i=i.click)||void 0===i||null===(i=i.data)||void 0===i?void 0:i.uri,D=null===(l=e.images)||void 0===l||null===(l=l.main)||void 0===l?void 0:l.uri,N=D?[{url:D}]:[];switch(x){case"culturalmoments:mediumEpisodeCard":case"culturalmoments:episodeCardActionsMedium":return void 0===A?null:(0,y.jsx)(O.U,{uri:A,name:null!==(o=null===(r=e.text)||void 0===r?void 0:r.title)&&void 0!==o?o:"",images:N,showImages:N,description:null!==(u=null!==(a=null===(s=e.text)||void 0===s?void 0:s.description)&&void 0!==a?a:null===(d=e.text)||void 0===d?void 0:d.subtitle)&&void 0!==u?u:"",durationMilliseconds:(w=null===(c=e.custom)||void 0===c?void 0:c.duration,"number"==typeof w?w:0),releaseDate:_(null===(v=e.custom)||void 0===v?void 0:v.releaseDate),resume_point:null,isExplicit:!1,is19PlusOnly:!1,sharingInfo:null,index:n},A);case"culturalmoments:playlistCard":case"culturalmoments:playlistCardActionsMedium":return void 0===A?null:(0,y.jsx)(k.B,{uri:A,name:null!==(m=null===(p=e.text)||void 0===p?void 0:p.title)&&void 0!==m?m:"",images:N,description:null!==(f=null===(h=e.text)||void 0===h?void 0:h.description)&&void 0!==f?f:"",authorName:null!==(g=null===(b=e.text)||void 0===b?void 0:b.subtitle)&&void 0!==g?g:"",index:n},A);default:return null}}(e,n)})).flatMap((function(e){return e?[e]:[]}));if(0===s.length)return null;var d=null===(i=(0,w.o_)(null!==(l=null===(o=e.events)||void 0===o||null===(o=o.click)||void 0===o||null===(o=o.data)||void 0===o?void 0:o.uri)&&void 0!==l?l:""))||void 0===i?void 0:i.toURLPath(!0);return(0,y.jsx)(A.p,{title:null!==(r=null===(u=e.text)||void 0===u?void 0:u.title)&&void 0!==r?r:"",total:s.length,seeAllUri:d,index:t,id:e.id,seeAllLabel:null===(a=e.text)||void 0===a?void 0:a.accessory,children:s})},N=function(e){var n=function(e){var n=Array(),t=void 0,i=Array();return e.forEach((function(e){var l;if("culturalmoments:sectionHeaderWithAction"===(null===(l=e.component)||void 0===l?void 0:l.id))t&&0!==i.length&&n.push({heading:t,components:i}),t=e,i=Array();else if(t){var o,r,u;"culturalmoments:carousel"===(null===(o=e.component)||void 0===o?void 0:o.id)||"glue2:carousel"===(null===(r=e.component)||void 0===r?void 0:r.id)?null===(u=e.children)||void 0===u||u.forEach((function(e){i.push(e)})):i.push(e)}})),t&&0!==i.length&&n.push({heading:t,components:i}),n}(e);return(0,y.jsx)(y.Fragment,{children:n.map((function(e,n){return D(e.heading,e.components,n)}))})},I=t(44407),R=t(13534),E=t(38195),S=t(43772),C=t(93051),P=t(26298),M=t(70566),z=t(60256);const T="MT6jAR25XYfoarcSqHDd",H="IYZA3J2VTMydirxq_bdg",F="t6RJK1eND2uPmFYOi32l";var B=function(e){return e.ANDROID="https://play.google.com/store/apps/details?id=com.spotify.music",e.IOS="https://apps.apple.com/app/spotify-music/id324684580",e}(B||{}),L=function(e){var n=e.spec,t=s.Ru.getLocaleForTranslation(),i=(0,M.s)(),l=(0,z.t)(n),o=function(e){if(e===B.ANDROID){var t=n.googleBadgeFactory().hitNavigateToWebviewUri({destination:e});i.logInteraction(t)}else{var l=n.appleBadgeFactory().hitNavigateToWebviewUri({destination:e});i.logInteraction(l)}};return(0,y.jsxs)(I.a,{variant:"tinted",style:{width:600},ref:l,children:[(0,y.jsx)(R.E,{as:"p",variant:"bodyMediumBold",style:{marginBottom:E.v4},children:s.Ru.get("web-player.cultural-moments.unsupportedHeading")}),(0,y.jsx)(R.E,{as:"p",variant:"bodySmall",style:{marginBottom:E.CD},children:s.Ru.get("web-player.cultural-moments.unsupportedDescription")}),(0,y.jsxs)("div",{className:u()(F),children:[(0,y.jsx)(C.N,{to:B.IOS,target:"_blank",onClick:function(){return o(B.IOS)},children:(0,y.jsx)("img",{src:(0,S.b)((0,P.f)(t)),alt:s.Ru.get("web-player.cultural-moments.unsupported.appleAppStoreAlt"),className:T})}),(0,y.jsx)(C.N,{to:B.ANDROID,target:"_blank",onClick:function(){return o(B.ANDROID)},children:(0,y.jsx)("img",{src:(0,S.b)((0,P.A)(t)),alt:s.Ru.get("web-player.cultural-moments.unsupported.googlePlayStoreAlt"),className:u()(T,H)})})]})]})},V=t(38392),U=t(82316),Z=function(e,n){var t,i=new Intl.DateTimeFormat;return e.build().withHost(U.LG).withPath("/hub").withQueryParameters({id:n,userHasRiF:!1,clientTimezone:null!==(t=i.resolvedOptions().timeZone)&&void 0!==t?t:""}).withoutMarket().withEndpointIdentifier("cultural-moment/hub").send()},W=t(12988),q=t(12574);const Q="B9Q1L66F7wl4eUMgp4Lg",Y="gtqpWbwIV4PTEp8Q0ZW4",K="edYsLe1QCBdzPglEiROZ";const J=function(e){var n,t,i,l,r,m,p=e.uri,f=e.id,h=(0,W.Z)(Z,[f]),g=h.data,b=h.error,x=h.loading,w=(0,q.r)(a.j,{data:{identifier:p,uri:p}}),A=w.spec,O=w.UBIFragment,k=(0,o.useMemo)((function(){return A.shelvesFactory()}),[A]),_=(0,o.useMemo)((function(){return A.mobilePromptFactory()}),[A]),D=null==g||null===(n=g.body.hubViewData)||void 0===n?void 0:n.body,I=null==g||null===(t=g.body.hubViewData)||void 0===t?void 0:t.header;if(null===g||void 0===D||void 0===I||x||null!==b)return(0,y.jsx)(v.LoadingPage,{hasError:null!==b,errorMessage:s.Ru.get("error.generic")});var R=null===(i=g.body.hubViewData)||void 0===i?void 0:i.title,E=null==I||null===(l=I.text)||void 0===l?void 0:l.title;return(0,y.jsxs)(O,{spec:A,children:[(0,y.jsx)(c.Q,{children:null!=R?R:""}),E?(0,y.jsx)("div",{className:Q,children:(0,y.jsx)(j,{title:null==I||null===(r=I.text)||void 0===r?void 0:r.title,image:null===(m=I.images)||void 0===m?void 0:m.background})}):null,(0,y.jsx)(O,{spec:k,children:(0,y.jsxs)("div",{className:K,children:[E&&(0,y.jsx)(d.K,{}),(0,y.jsx)("div",{className:u()("contentSpacing",Y),children:(0,y.jsxs)(V._,{children:[(0,y.jsx)(L,{spec:_}),D?N(D):null]})})]})})]})};var X=t(45497),G=t(86429),$=t(58114);function ee(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}var ne="https://accounts.spotify.com/login",te=function(){var e=window.location.href;return window.location.href="".concat(ne,"?continue=").concat(encodeURIComponent(e)),null},ie=function(e){var n=(0,G.V)(),t=(0,l.NC)($.Be8,{loadingValue:!1});return n?(0,y.jsx)(te,{}):t?(0,y.jsx)(J,function(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ee(Object(t),!0).forEach((function(n){(0,i.A)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ee(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}({},e)):(0,y.jsx)(X.$,{to:"/"})};const le=ie},38392:(e,n,t)=>{t.d(n,{_:()=>c});var i=t(52542),l=t(30758),o=t(57574),r=t(97500),u=t.n(r);const a="eqw9lvuoZHrkWMTdyTpY",s="lb08f71wES9AQnKx6e0R";var d=t(86070),c=l.memo((function(e){var n=e.triggerOnInitialLoad,t=void 0!==n&&n,r=e.onReachBottom,c=e.showScrollbar,v=void 0===c||c,m=e.horizontalScroll,p=void 0!==m&&m,f=e.className,h=(0,o.Wx)({initialInView:t}),g=h.ref,b=h.inView;return(0,l.useEffect)((function(){b&&r&&r()}),[b,r]),(0,d.jsxs)("div",{className:u()((0,i.A)((0,i.A)({},s,!v),a,p),f),"data-testid":"infinite-scroll-list",children:[e.children,(0,d.jsx)("div",{ref:g})]})}))},14546:(e,n,t)=>{t.d(n,{f:()=>u,z:()=>r});var i=t(30758),l=t(23100),o=t(19424);function r(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.l0o,t=(0,o.as)();return(0,i.useEffect)((function(){return e&&t((0,o.Mo)(e)),function(){t((0,o.Hf)())}}),[e,t]),e||n}var u=function(e){return r(e.color,e.fallbackColor),null}},26298:(e,n,t)=>{t.d(n,{A:()=>r,f:()=>o});t(78551);var i=["ar","az","bg","cs_CZ","da","de","ee","el","en","es","es_mx","fi","fp","fr","fr_ca","he","hu","id","it","ja","ko","lt","lv","ms","mt","nb","nl","pl","pt","pt_br","ro","ru","sk","sl","sv","th_TH","tr","vi_VN","zh_HANS","zh_HANT"],l=["af","ar","am","az","be","bg","bn","bs","ca","cr","cs_CZ","da","de","el","en","es","es_419","et","eu","fa","fi","fp","fr","fr_ca","gl","gu","he","hi","hr","hu","hy","id","is","it","ja","ka","kk","km","kn","ko","ky","lo","lt","lv","mk","ml","mn","mr","ms","my","nb","ne","nl","pa","pl","pt","pt_br","ro","ru","si","sk","sl","sq","sr","sv","sw","ta","te","th_TH","tr","ua","ur","uz","vi_VN","zh_HANS","zh_HANT","zh_hk","zu"],o=function(e){var n=i.includes(e)?e:"int";return"images/download-badges/apple/".concat(n,".svg")},r=function(e){var n=l.includes(e)?e:"int";return"images/download-badges/google/".concat(n,".svg")}}}]);
|
|
//# sourceMappingURL=xpui-routes-cultural-moment-hub.js.map
|