dotfiles/.config/spicetify/Extracted/Themed/xpui/xpui-routes-collection-loca...

2 lines
7.4 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([[7379],{38440:(e,t,l)=>{l.d(t,{l:()=>S});var r=l(59496),s=l(3802),a=l(55477),i=l(29939),n=l(72502);const o={"custom-order":i.HI,title:{column:n.Q.TITLE,order:n.k.ASC},artist:{column:n.Q.TITLE,order:n.k.SECONDARY_ASC},"added-by":{column:n.Q.ADDED_BY,order:n.k.ASC},"added-at":{column:n.Q.ADDED_AT,order:n.k.ASC},duration:{column:n.Q.DURATION,order:n.k.ASC},album:{column:n.Q.ALBUM,order:n.k.ASC},"album-or-podcast":{column:n.Q.ALBUM_OR_PODCAST,order:n.k.ASC},"album-or-show":{column:n.Q.ALBUM_OR_SHOW,order:n.k.ASC}},u={title:n.Q.TITLE,artist:n.Q.TITLE,"added-by":n.Q.ADDED_BY,"added-at":n.Q.ADDED_AT,duration:n.Q.DURATION,album:n.Q.ALBUM,"album-or-podcast":n.Q.ALBUM_OR_PODCAST,"album-or-show":n.Q.ALBUM_OR_SHOW},d={[n.k.NONE]:n.k.NONE,[n.k.ASC]:n.k.DESC,[n.k.DESC]:n.k.ASC,[n.k.SECONDARY_ASC]:n.k.SECONDARY_DESC,[n.k.SECONDARY_DESC]:n.k.SECONDARY_ASC},c={[n.Q.INDEX]:{key:"custom-order",get value(){return s.ag.get("sort.custom-order")}},[n.Q.TITLE]:{key:"title",get value(){return s.ag.get("sort.title")}},[n.Q.ARTIST]:{key:"artist",get value(){return s.ag.get("sort.artist")}},[n.Q.ADDED_BY]:{key:"added-by",get value(){return s.ag.get("sort.added-by")}},[n.Q.ADDED_AT]:{key:"added-at",get value(){return s.ag.get("sort.date-added")}},[n.Q.DURATION]:{key:"duration",get value(){return s.ag.get("sort.duration")}},[n.Q.EVENT_DATE]:null,[n.Q.ALBUM]:{key:"album",get value(){return s.ag.get("sort.album")}},[n.Q.ALBUM_OR_PODCAST]:{key:"album-or-podcast",get value(){return s.ag.get("sort.album-or-podcast")}},[n.Q.ALBUM_OR_SHOW]:{key:"album-or-show",get value(){return s.ag.get("sort.album-or-show")}},[n.Q.PLAYS]:null,[n.Q.RELEASE_DATE]:null,[n.Q.ADD]:null,[n.Q.ACTIONS]:null};var g=l(53417),m=l(19281),x=l(4637);function A(e){return!!e}const S=({columns:e,disabled:t,onSort:l})=>{const S=[...e];S.splice(2,0,g.QD.ARTIST);const{sortState:k,setSortState:C}=(0,r.useContext)(i.Gb),h=function(e){return null===e.column?c[g.QD.INDEX]:(0,m.cB)(e.column,e.order)?c[g.QD.ARTIST]:c[e.column]}(k),D=(0,r.useCallback)((e=>{l?.(),C(((e,t,l)=>e?t!==u[e]||"artist"===e&&[n.k.ASC,n.k.DESC].includes(l)||"title"===e&&[n.k.SECONDARY_ASC,n.k.SECONDARY_DESC].includes(l)?o[e]:{column:u[e],order:d[l]}:i.HI)(e,k.column,k.order))}),[l,C,k.column,k.order]),b=(0,r.useCallback)((()=>null!==k.column),[k.column]),j=S.map((e=>c[e])).filter(A);return(0,x.jsx)(a.A,{options:j,onSelect:D,selected:h,isSelectionChanged:b,sortOrder:k.order,heading:s.ag.get("drop_down.sort_by"),disabled:t})}},72402:(e,t,l)=>{l.r(t),l.d(t,{default:()=>z});var r=l(59496),s=l(94041),a=l(88746),i=l(3802),n=l(4270),o=l(45911),u=l(41226),d=l(16743),c=l(73997),g=l(24256),m=l(23627),x=l(77312),A=l(19281),S=l(38440),k=l(66806),C=l(53417),h=l(29939),D=l(35725),b=l(13791),j=l(89039),y=l(39097),f=l(48607),E=l(54299),p=l(4882),T=l(98340),Q=l(94033),_=l(8646),I=l(7813),O=l(61108),v=l(61304),R=l(28106),P=l(4637);const N=r.memo((function({uri:e,uid:t,name:l,duration_ms:s,artists:a,album:n,is19PlusOnly:o,isExplicit:u,isPlayable:d,index:c,contextUri:g,imgUrl:m,usePlayContextItem:x}){const{filter:A}=(0,r.useContext)(k.fo),{isActive:S,isPlaying:C,triggerPlay:h,togglePlay:D}=x({uid:t,uri:e,index:c}),{badges:b,hasBadges:j}=(0,Q.r)({isExplicit:u}),y=a?.map((e=>e.name)).join(i.ag.getSeparator())||"";return(0,P.jsx)(T.ZP,{value:"row",index:c,children:(0,P.jsx)(E._,{menu:(0,P.jsx)(_.N,{uri:e,uid:t,contextUri:g}),children:(0,P.jsxs)(R.c,{uri:e,contextUri:g,isActive:S,index:c,onTriggerPlay:()=>{h()},ariaRowIndex:c+1,isPlayable:d,ageRestricted:o,dragMetadata:{name:l,createdBy:y},children:[(0,P.jsx)(O.Dd,{ariaColIndex:0,children:(0,P.jsx)(O.Du,{uri:e,playAriaLabel:i.ag.get("tracklist.a11y.play",l,y),isPlaying:C,isActive:S,onClick:()=>{D()},children:(0,P.jsx)(O.km,{children:c+1})})}),(0,P.jsxs)(O.vZ,{ariaColIndex:1,children:[(0,P.jsx)(O.lD,{src:m}),(0,P.jsxs)(O.vm,{children:[(0,P.jsx)(O.Wh,{titleText:l,children:(0,P.jsx)(I.o,{searchWords:[A],textToHighlight:l})}),j&&(0,P.jsx)(O.g3,{children:b.explicit?(0
//# sourceMappingURL=xpui-routes-collection-local-files.js.map