dotfiles/.config/spicetify/Extracted/Raw/xpui/8677.js

2 lines
17 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([[8677,1005],{78677:(t,n,r)=>{r.d(n,{B:()=>B});var s=r(3802),o=r(54299),e=r(4882),i=r(90303),a=r(42006),c=r(40780),l=r(75252),h=r(75207),u=r(24952),f=r(96768),g=r(59496),p=r(56162),d=r(34058),m=r(1005);const b="z4popIk32AsyDKlV1o1v",w="_xxuonqkZEQ7pCffxlUD";var x=r(4637);const _=(0,g.memo)((function(t){const{src:n,description:r,...s}=t,[o,e]=(0,g.useState)("inherit");return(0,g.useEffect)((()=>{n&&async function(t){const{colorRaw:n}=await(0,m.extractColors)(t),{h:r,s,l:o}=n.hsl,i=`hsl(${360*r}, ${100*s}%, ${Math.min(100*o,30)}%)`;e(i)}(n)}),[n]),n?(0,x.jsx)("div",{className:b,style:{backgroundColor:o},"data-testid":"episode-fallback-image-container",children:(0,x.jsx)("div",{className:w,children:(0,x.jsx)(p.D,{as:"p",variant:"canon",children:r})})}):(0,x.jsx)(d.J,{...s,iconSize:64})}));var v=r(20920),M=r(88794),I=r(73769);const R="x1FErCk9Xh9VumpOLyfm",S="heeHk6hz8sAXLIU6P6an",A="Hhfi1xnYwoHoMP2rcltS",B=({description:t,isExplicit:n,images:r,name:g,uri:p,durationMilliseconds:d,releaseDate:m,resume_point:b,showImages:w,sharingInfo:B,is19PlusOnly:C,isHero:E,onClick:$,testId:y,index:G,requestId:H,color:k})=>{let L;const N=m?new Date(m):void 0,P=N&&!isNaN(N.getTime())&&!isNaN(d),j=(0,h.X)(w,{desiredSize:48}),F=(0,c.G3)(p,N?.toISOString(),b?.resume_position_ms,b?.fully_played);return L=E?(0,x.jsx)(v.Z,{index:G,onClick:$,headerText:g,featureIdentifier:"episode",uri:p,isPlayable:!1,isDownloadable:!0,hasNewEpisodeIndicator:F,renderCardImage:()=>(0,x.jsx)(f.x,{isHero:!0,images:r,color:k,FallbackComponent:n=>(0,x.jsx)(_,{...n,description:t,src:j&&j.url}),children:j&&(0,x.jsx)(a.E,{loading:"lazy",src:j.url,className:R,radius:4})}),renderSubHeaderContent:()=>(0,x.jsxs)(x.Fragment,{children:[n&&!C&&(0,x.jsx)(e.N,{className:S}),C&&(0,x.jsx)(i.X,{size:16,className:S}),P&&(0,x.jsxs)("span",{className:A,children:[N&&(0,l.rL)(N)," ·"," ",s.ag.get("episode.length",Math.ceil(d/6e4))]}),(0,x.jsx)(M.k,{children:s.ag.get("card.tag.episode")})]}),testId:y,requestId:H}):(0,x.jsx)(u.C,{index:G,onClick:$,headerText:g,featureIdentifier:"episode",uri:p,isPlayable:!1,isDownloadable:!0,hasNewEpisodeIndicator:F,renderCardImage:()=>(0,x.jsx)(f.x,{images:r,color:k,FallbackComponent:n=>(0,x.jsx)(_,{...n,description:t,src:j&&j.url}),children:j&&(0,x.jsx)(a.E,{loading:"lazy",src:j.url,className:R,radius:4,testid:"episode-card-show-image"})}),renderSubHeaderContent:()=>(0,x.jsxs)(x.Fragment,{children:[n&&!C&&(0,x.jsx)(e.N,{className:S}),C&&(0,x.jsx)(i.X,{size:16,className:S}),P&&(0,x.jsxs)("span",{className:A,children:[N&&(0,l.rL)(N)," ·"," ",s.ag.get("episode.length",Math.ceil(d/6e4))]})]}),testId:y,requestId:H}),(0,x.jsx)(o._,{menu:(0,x.jsx)(I.k,{uri:p,sharingInfo:B}),children:L})}},1005:(t,n,r)=>{r.d(n,{extractColors:()=>f});var s=r(84120);const o="https://local-image.spotify.com";let e=function(t){return t[t.ARRAY_BUFFER=0]="ARRAY_BUFFER",t[t.IMAGE_BITMAP=1]="IMAGE_BITMAP",t}({});var i=r(84624),a=r.n(i);var c=r(40332);const l=new function(){return a()('(()=>{"use strict";let t=function(t){return t[t.HEX=0]="HEX",t[t.HEXA=1]="HEXA",t[t.RGB=2]="RGB",t[t.RGBA=3]="RGBA",t[t.HSL=4]="HSL",t[t.HSLA=5]="HSLA",t}({});function n(t,n,r=1e-6){return Math.abs(t-n)<r}function r(t){return t.toString(16).padStart(2,"0")}function s(t){return`${parseFloat((100*t).toFixed(1))}%`}function o(t){t=t.replace(/^#?([a-f\\d])([a-f\\d])([a-f\\d])$/i,(function(t,n,r,s){return n+n+r+r+s+s}));const n=/^#?(?<r>[a-f\\d]{2})(?<g>[a-f\\d]{2})(?<b>[a-f\\d]{2})(?<a>[a-f\\d]{2})?$/i.exec(t),r=n?.groups?.r,s=n?.groups?.g,o=n?.groups?.b,i=n?.groups?.a;if(void 0===r||void 0===s||void 0===o)throw new Error(`Invalid hex color code "${t}"`);return{r,g:s,b:o,a:i}}function i(t){const{a:n}=o(t);if(!n)return 1;return function(t,n,r){const s=t.toLocaleString("en",{useGrouping:!1,minimumFractionDigits:n,maximumFractionDigits:r});return Number(s)}(parseInt(n,16)/255,0,2)}const e=.07,a=.02;function h(t){return t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)}function u({
//# sourceMappingURL=8677.js.map