solorice/config/spicetify/Extracted/Raw/xpui/6409.js

2 lines
11 KiB
JavaScript
Executable File

"use strict";(("undefined"!=typeof self?self:global).webpackChunkclient_web=("undefined"!=typeof self?self:global).webpackChunkclient_web||[]).push([[6409],{79509:(e,n,a)=>{a.d(n,{w:()=>m});var i=a(30758),t=a(97500),o=a.n(t),s=a(43727),l=a(92107),r=a(96992),c=a(52708);const d="pvGZ831aNzHTQMZ8CA_u";var u=a(86070),m=(0,i.memo)((function(e){var n=e.onClick,a=void 0===n?function(){}:n,t=e.size,m=e.className,h=e.uri,v=e.sharingInfo,g=e.interactionData,x=e.ariaLabel,p=void 0===x?l.Ru.get("mwp.list.item.share"):x,f=e.condensedAll,b=e.placement,j=e.semanticColor,y=e.disableTooltip,k=(0,c.L)({sharingInfo:v,uri:h,interactionData:g}).onCopyLink,C=(0,i.useCallback)((function(){k(),a()}),[a,k]);return(0,u.jsx)(r.a,{ariaLabel:p,size:t,onClick:C,className:o()(d,m),icon:s.C,condensedAll:f,placement:b,condensed:!0,semanticColor:j,disableTooltip:y})}))},89537:(e,n,a)=>{a.d(n,{g:()=>p});var i=a(30758),t=a(97500),o=a.n(t),s=a(46496),l=a(13534),r=a(11854),c=a(93493),d=a(80366),u=a(65707),m=a(58114);const h="rFwxt8s8DYY8p1O7tYZW",v="sA2HogGQNi8R_zpCWei5",g="H92pPTuqDR5DcoTtjcb3";var x=a(86070),p=function(e){var n=e.cardHeaderText,a=e.buttonText,t=e.buttonTarget,p=e.className,f=(0,c.NC)(m._Nj),b=(0,i.useCallback)((function(e){e.stopPropagation()}),[]),j=(0,d.o_)(t).toURLPath(!0);return f?(0,x.jsxs)("div",{className:o()(h,p),onClick:b,children:[(0,x.jsxs)("div",{className:v,children:[(0,x.jsx)(s.p,{className:g,size:"small",semanticColor:"textBase"}),(0,x.jsx)(l.E,{as:"span",variant:"bodyMediumBold",semanticColor:"textBase",children:n})]}),(0,x.jsx)(r.$,{size:"small",colorSet:"invertedLight",component:u.v,href:j,children:a})]}):null}},88712:(e,n,a)=>{a.d(n,{k:()=>W});var i=a(52542),t=(a(7651),a(14551),a(30456),a(78551),a(47994),a(43379),a(82467),a(34192),a(88856),a(30758)),o=a(97500),s=a.n(o),l=a(44286),r=a(13534),c=a(38195),d=a(26173),u=a(66475),m=a(30749),h=a(96971),v=a(80366),g=a(92107),x=a(89537),p=a(34382),f=a(25293),b=a(79564),j=a(15317),y=a(79509),k=a(80021),C=a(53163),A=a(43023),N=a(54129),w=a(47795),D=a(63749),I=a(48133),T=a(87700),E=a(12574),B=a(7979),P=a(86070),R={intent:"share",type:"click",itemIdSuffix:"contextmenu/episode/share"},L=t.memo((function(e){var n=e.episodeUri,a=e.showUri,o=e.sharingInfo,l=e.size,r=e.canDownload,c=e.requestId,d=e.onMarkAsPlayed,u=e.onMoreButtonClick,m=e.name,h=e.fullyPlayed,v=e.index,x=(0,I.T)(n),L=(0,E.r)(p.d,{data:{uri:n,reason:c||"",position:v}}),S=L.spec,M=L.logger,z=l===w.E.LARGE?"medium":"small",U=(0,t.useMemo)((function(){return(0,P.jsx)(f.e,{uri:n,size:z,className:s()((0,i.A)({},B.A.visibleAction,(0,D.X)(x))),onClick:function(e,a){a===T.NV.ADD?M.logInteraction(S.downloadButtonFactory().hitDownload({itemToDownload:n})):T.NV.REMOVE&&M.logInteraction(S.downloadButtonFactory().hitRemoveDownload({itemToRemoveFromDownloads:n}))},canDownload:r,condensed:!0})}),[n,x,S,M,z,r]),_=(0,t.useMemo)((function(){return(0,P.jsx)(y.w,{uri:n,sharingInfo:o,interactionData:R,size:z,onClick:function(){M.logInteraction(S.copyLinkFactory().hitShare({entityToBeShared:n,shareId:(null==o?void 0:o.shareId)||""}))}})}),[n,o,S,M,z]),F=(0,t.useMemo)((function(){return(0,P.jsx)(j.b,{uri:n,size:z,className:B.A.visibleAction,onClick:function(e){e?M.logInteraction(S.saveToLibraryButtonFactory().hitLike({itemToBeLiked:n})):M.logInteraction(S.saveToLibraryButtonFactory().hitRemoveLike({itemNoLongerLiked:n}))},condensed:!0})}),[n,S,M,z]),G=(0,N.v)(n),H=(0,t.useMemo)((function(){return(0,P.jsx)(A.g,{size:z,uri:n,className:B.A.visibleAction})}),[n,z]),O=(0,t.useMemo)((function(){return(0,P.jsx)(k.b,{menu:(0,P.jsx)(C.b,{uri:n,showUri:a,isPlayed:h,onMarkAsPlayed:d}),children:(0,P.jsx)(b.e,{size:z,label:g.Ru.get("more.label.context",m),onClick:u})})}),[n,h,m,d,u,a,z]);return(0,P.jsxs)(P.Fragment,{children:[G?H:F,U,_,O]})})),S=a(93051),M=a(7889),z=a(99365),U=a(77736),_=a(18180),F=a(44113),G=a(16920),H=a(40454),O=a(24119),W=t.memo(t.forwardRef((function(e,n){var a,o,p=e.uri,f=e.name,b=e.showName,j=e.showUri,y=e.size,k=e.description,C=e.durationMs,A=e.images,N=e.badges,D=e.fullyPlayed,I=e.releaseDate,T=e.resumePositionMs,E=e.isCurrentlyPlaying,R=e.isPlaying,W=e.onContextMenu,Z=e.onTouchStart,Y=e.onTouchEnd,V=e.handlePlaybackClick,Q=e.draggable,J=e.handleDragStart,X=e.handleClick,q=e.position,K=e.index,$=e.isPlayable,ee=e.isPaywalled,ne=e.isUserSubscribed,ae=e.episodeSharingInfo,ie=e.playButtonWrapper,te=void 0===ie?null:ie,oe=e.highlightText,se=void 0===oe?function(e){return e}:oe,le=e.onMarkAsPlayed,re=e.contentInformation,ce=e.requestId,de=e.mediaTypes,ue=e.onMoreButtonClick,me=e.status,he=e.variant,ve=void 0===he?"default":he,ge=(0,l.Zp)(),xe=E&&R,pe=y===w.E.LARGE,fe=(0,v.o_)(p).toURLPath(!0),be=null===(a=(0,v.o_)(j))||void 0===a?void 0:a.toURLPath(!0),je=(0,M.hD)(p,I,T,D),ye=ee&&!ne,ke=null!==(o=null==de?void 0:de.includes(H.C.Video))&&void 0!==o&&o,Ce=(null==N?void 0:N.props.children.filter((function(e){return!1!==e})))||[],Ae=ye||$,Ne=g.Ru.get("tracklist.a11y.play",f,b),we=g.Ru.get("tracklist.a11y.pause",f,b),De=(0,t.useCallback)((function(e){e.stopPropagation(),e.preventDefault(),ge(fe),X&&X(e)}),[ge,fe,X]),Ie=(0,t.useCallback)((function(e){e.stopPropagation(),e.preventDefault(),be&&ge(be)}),[be,ge]),Te=(0,t.useCallback)((function(e){e.stopPropagation(),ye||V(e)}),[V,ye]),Ee=(0,P.jsx)(z.R,{size:"small",version:"next-best-episode"===ve?z.H.primary:z.H.secondary,onClick:Te,isPlaying:xe,disabled:!Ae,locked:ye,ariaPlayLabel:Ne,ariaPauseLabel:we}),Be=te?te(Ee):Ee,Pe=(0,P.jsx)(P.Fragment,{children:me&&(0,P.jsx)(r.E,{variant:"bodySmall",semanticColor:"textSubdued",paddingBottom:c.vw,children:me})}),Re=(0,P.jsxs)(d.d,{className:B.A.title,href:fe,onClick:De,lineClamp:2,children:[je&&(0,P.jsx)(M.Tc,{}),se(f)]}),Le=(0,P.jsxs)(u.j,{lineClamp:2,paddingBottom:pe?c.v4:void 0,children:[ke&&(0,P.jsx)(U.T,{className:B.A.videoLabel}),b&&be&&(0,P.jsx)(S.N,{to:be,onClick:Ie,children:(0,P.jsx)(r.E,{variant:"bodySmall",semanticColor:"textSubdued",children:se(b)})})]}),Se=(0,P.jsxs)("div",{className:B.A.showDetailsWithProgress,children:[(0,P.jsx)(m.v,{lineClamp:2,paddingBottom:pe?c.vw:void 0,children:se(null!=k?k:"")}),(0,P.jsxs)("div",{className:B.A.metadata,children:[Ce.length>0&&(0,P.jsx)("div",{className:B.A.badges,children:N}),(0,P.jsx)(O.j,{isPlaying:xe,fullyPlayed:D,durationMs:C,releaseDate:I,resumePositionMs:T,position:E?q:void 0})]})]}),Me=(0,P.jsxs)("div",{className:B.A.footer,children:[(0,P.jsx)("div",{onClick:function(e){e.stopPropagation()},className:B.A.actions,children:(0,P.jsx)(L,{episodeUri:p,showUri:null!=j?j:"",sharingInfo:ae,size:y,canDownload:!ee||ee&&ne,requestId:ce,index:K,name:f,fullyPlayed:D,onMarkAsPlayed:le,onMoreButtonClick:ue})}),(0,P.jsx)("div",{children:Be})]}),ze="default"===ve&&(0,P.jsx)("div",{className:B.A.imageContainer,children:(0,P.jsx)(_.b,{className:s()(B.A.showImage,(0,i.A)({},B.A.largeImage,pe)),type:G.c.EPISODE,size:function(e){switch(e){case w.E.LARGE:return F.Qe.SIZE_112;case w.E.MEDIUM:return F.Qe.SIZE_64;default:return F.Qe.SIZE_48}}(y),title:f,shape:_.u.ROUNDED_CORNERS,images:A})});return(0,P.jsxs)("div",{className:s()(B.A.episodeBlock,(0,i.A)((0,i.A)({},B.A.isActive,E),B.A.nextBestEpisode,"next-best-episode"===ve)),"data-testid":"episode-".concat(K),draggable:Q&&!!J,onDragStart:J,onClick:De,onContextMenu:W,onTouchStart:Z,onTouchEnd:Y,children:[re&&(0,P.jsx)(x.g,{className:B.A.contentInformationBanner,cardHeaderText:re.cardHeaderText,buttonText:re.buttonText,buttonTarget:re.buttonTarget}),(0,P.jsx)(h.v,{size:"xxl",ref:n,media:ze,title:Re,id:"episode-".concat(K),subtitle:b&&be?Le:Se,pretitle:Pe,body:b&&be?Se:void 0,variant:"naked",footer:Me,hoverBackgroundColor:"backgroundHighlight",layout:pe?"wide":"regular",horizontalGap:pe?c.lT:c.CJ,verticalGap:c.v4,paddingBlockStart:c.CD,paddingBlockEnd:c.CD})]})})))},64333:(e,n,a)=>{a.d(n,{f:()=>C});var i=a(13534),t=a(11854),o=a(2648),s=a(92107),l=a(87630),r=a(45940),c=a(85200),d=a(63957),u=a(62822),m=a(12341),h=a(93091),v=a.n(h),g=a(30758),x=a(10789);const p="a_fhw77sDAmUWT0DjcLz",f="IVCTj3T2ms7JvLUiF4hZ",b="_vX7nRSblUeXv4DTYkKu",j="ST9Bhw7AdmFCTZDIKw3n";var y=a(86070),k=function(e){var n=e.showUri,a=(0,l.Oj)(),r=function(e){var n=(0,x.T)(),a=(0,g.useState)(null),i=(0,m.A)(a,2),t=i[0],o=i[1];return(0,g.useEffect)((function(){function a(){return(a=(0,u.A)(v().mark((function a(){var i;return v().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.prev=0,a.next=3,n.getAccessInfo(e);case 3:i=a.sent,o(i),a.next=11;break;case 7:a.prev=7,a.t0=a.catch(0),console.error(a.t0),o(void 0);case 11:case"end":return a.stop()}}),a,null,[[0,7]])})))).apply(this,arguments)}!function(){a.apply(this,arguments)}()}),[n,e]),t}(n);if(null===r)return null;var d,h,k=(d=s.Ru.get("paywalls.modal-heading"),h=(0,y.jsxs)(y.Fragment,{children:[s.Ru.get("paywalls.modal-body-p1"),(0,y.jsx)("br",{}),(0,y.jsx)("br",{}),s.Ru.get("paywalls.modal-body-p2"),(0,y.jsx)("br",{}),(0,y.jsx)("br",{}),s.Ru.get("paywalls.modal-body-p3")]}),(0,y.jsxs)("div",{className:p,children:[(0,y.jsx)(i.E,{as:"div",variant:"bodyMediumBold",className:f,children:d}),(0,y.jsx)(i.E,{as:"div",variant:"bodySmall",className:b,children:h}),(0,y.jsx)("div",{className:j,children:(0,y.jsx)(o.H,{size:"small",semanticColor:"textBase",onClick:function(){a({type:"close"})},children:s.Ru.get("close")})})]}));return null!=r&&r.basic&&(k=function(e){var n=e.title,o=e.body;return(0,y.jsxs)("div",{className:p,children:[(0,y.jsx)(i.E,{as:"div",variant:"bodyMediumBold",className:f,children:n}),(0,y.jsx)(i.E,{as:"div",variant:"bodySmall",className:b,children:o}),(0,y.jsx)("div",{className:j,children:(0,y.jsx)(t.$,{size:"small",colorSet:"invertedLight",onClick:function(){a({type:"close"})},children:e.cta})})]})}(r.basic)),null!=r&&r.upsellLink&&(k=function(e){var n=e.title,l=e.body;return(0,y.jsxs)("div",{className:p,children:[(0,y.jsx)(i.E,{as:"div",variant:"bodyMediumBold",className:f,children:n}),(0,y.jsx)(i.E,{as:"div",variant:"bodySmall",className:b,children:l}),(0,y.jsxs)("div",{className:j,children:[(0,y.jsx)(o.H,{size:"small",semanticColor:"textBase",onClick:function(){a({type:"close"})},children:s.Ru.get("close")}),(0,y.jsx)(t.$,{size:"small",colorSet:"invertedLight",href:e.url,children:e.cta})]})]})}(r.upsellLink)),(0,y.jsx)(c.z,{children:k})},C=function(e){var n=e.children,a=e.enabled,i=e.showUri,t=e.renderInline,o=void 0===t||t;return a&&i?(0,y.jsx)(d.y,{trigger:"click",action:"toggle",offset:[-2,20],renderInline:o,content:(0,y.jsx)(k,{showUri:i}),children:n}):(0,r.d)(n)?n(!1,(function(){}),{current:null}):n}},57186:(e,n,a)=>{a.d(n,{y:()=>s});var i=a(92107),t=a(6305),o=a(86070),s=function(){return(0,o.jsx)(t.E,{ariaLabel:i.Ru.get("paid"),text:i.Ru.get("paid")})}},63749:(e,n,a)=>{a.d(n,{X:()=>t});a(78551),a(82467);var i=a(87700);function t(e){return[i.kw.YES,i.kw.DOWNLOADING,i.kw.WAITING].includes(e)}},7979:(e,n,a)=>{a.d(n,{A:()=>i});const i={episodeBlock:"T9iBYqbERZHdwDl0U2tC",isActive:"DS4BYgmEO7Wy5RutUt60",title:"N2Fkohxhgu1_QAWUDc4O",selected:"DaxWgzoBoBnOEj43bZAA",actions:"hGbRiYkIjjy4sJvor0A2",visibleAction:"OgaF7O4ER8AvZfFd6JdJ",metadata:"bdGDIiYj50H66Hx5uevz",imageContainer:"kiT5NMttSzIDbtqBKc1J",showImage:"TG1hsDPHeO5QUf4EQasO",largeImage:"_NdByrVnM0OS7aK_GfRn",videoLabel:"afJf_mGi7ghd5WYQwPLb",badges:"UpgTvLnGW6GFjAUfaPXH",footer:"kxVuYXZ4sVWn6XuJgFhX",showDetailsWithProgress:"UvdRnanMNuY384mjTf2l",contentInformationBanner:"fmu47VumZ84IoKgMK1yU",nextBestEpisode:"dUScIGoP9fWn5IVsztB7"}}}]);
//# sourceMappingURL=6409.js.map