PageSourceSearch

https://musicat.fm/static/js/4712.63287601.chunk.js

js musicat.fm collected 2026-10-09 23:07:23 UTC 86,140 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkweb=self.webpackChunkweb||[]).push([[4712],{13084:(e,t,i)=>{i.d(t,{HB:()=>c,Mh:()=>d,tH:()=>u});var o=i(9950),n=i(78249),l=i(61630),r=i(30013);const s=new Map,a=new Map,d=e=>e?s.get(e):void 0,c=e=>{const[t,i]=(0,o.useState)(()=>e?s.get(e):void 0);return(0,o.useEffect)(()=>{if(!e)return;const t=s.get(e);i(t),t||(0,n.wz)(e).then(t=>{let{data:o}=t;s.set(e,o),s.set(o.publicId,o),i(o)}).catch(e=>(0,l.Q9)(e))},[e]),t},u=(e,t)=>{const i=(0,r.A)().getKey("publicId")===(null===e||void 0===e?void 0:e.publicId),[s,d]=(0,o.useState)(()=>e?a.get(e.publicId):void 0);return(0,o.useEffect)(()=>{const o=e?a.get(e.publicId):void 0;d(o),e&&!i&&t&&!o&&(0,n.KX)(e.publicId).then(t=>{let{data:i}=t;a.set(e.publicId,i),d(i)}).catch(e=>(0,l.Q9)(e))},[null===e||void 0===e?void 0:e.publicId,t,i]),s}},20615:(e,t,i)=>{i.d(t,{A:()=>h});var o=i(89379),n=i(9950),l=i.t(n,2),r=i(12840),s=i(90647),a=i(59068);function d(e,t,i,o,l){const[s,a]=n.useState(()=>l&&i?i(e).matches:o?o(e).matches:t);return(0,r.A)(()=>{if(!i)return;const t=i(e),o=()=>{a(t.matches)};return o(),t.addEventListener("change",o),()=>{t.removeEventListener("change",o)}},[e,i]),s}const c=(0,o.A)({},l).useSyncExternalStore;function u(e,t,i,o,l){const r=n.useCallback(()=>t,[t]),s=n.useMemo(()=>{if(l&&i)return()=>i(e).matches;if(null!==o){const{matches:t}=o(e);return()=>t}return r},[r,e,o,l,i]),[a,d]=n.useMemo(()=>{if(null===i)return[r,()=>()=>{}];const t=i(e);return[()=>t.matches,e=>(t.addEventListener("change",e),()=>{t.removeEventListener("change",e)})]},[r,i,e]);return c(d,a,s)}function p(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{themeId:t}=e;return function(e){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=(0,a.A)();o&&t&&(o=o[t]||o);const n="undefined"!==typeof window&&"undefined"!==typeof window.matchMedia,{defaultMatches:l=!1,matchMedia:r=(n?window.matchMedia:null),ssrMatchMedia:p=null,noSsr:h=!1}=(0,s.A)({name:"MuiUseMediaQuery",props:i,theme:o});let v="function"===typeof e?e(o):e;v=v.replace(/^@media( ?)/m,""),v.includes("print")&&console.warn(["MUI: You have provided a `print` query to the `useMediaQuery` hook.","Using the print media query to modify print styles can lead to unexpected results.","Consider using the `displayPrint` field in the `sx` prop instead.","More information about `displayPrint` on our docs: https://mui.com/system/display/#display-in-print."].join("\n"));return(void 0!==c?u:d)(v,l,r,p,h)}}p();const h=p({themeId:i(43435).A})},38580:(e,t,i)=>{i.d(t,{Qe:()=>d,b2:()=>r,bn:()=>h,pI:()=>s,xM:()=>p,y5:()=>c});var o=i(9950),n=i(23210),l=i(44414);const r=[n.lm.DEFAULT.GOLD,n.lm.DEFAULT.PINK,n.lm.DEFAULT.RED_SOFT,n.lm.DEFAULT.ORANGE,n.lm.DEFAULT.LIME,n.lm.DEFAULT.GREEN_600,n.lm.DEFAULT.BLUE,n.lm.DEFAULT.PURPLE_500,n.lm.DEFAULT.BROWN,n.lm.DEFAULT.SILVER],s=n.lm.DEFAULT.GOLD,a=(0,o.createContext)(s),d=e=>{let{accent:t,children:i}=e;return(0,l.jsx)(a.Provider,{value:t||s,children:i})},c=()=>(0,o.useContext)(a),u=e=>{const t=e.replace("#",""),i=3===t.length?t.split("").map(e=>e+e).join(""):t,o=parseInt(i,16);return{r:o>>16&255,g:o>>8&255,b:255&o}},p=(e,t)=>{const{r:i,g:o,b:n}=u(e);return"rgba(".concat(i,", ").concat(o,", ").concat(n,", ").concat(t,")")},h=e=>{const{r:t,g:i,b:o}=u(e);return(299*t+587*i+114*o)/1e3>150?n.lm.DEFAULT.ALMOST_BLACK:n.lm.DEFAULT.WHITE}},43983:(e,t,i)=>{i.d(t,{QL:()=>n,Se:()=>u,VL:()=>d,_5:()=>c,ad:()=>r,en:()=>s,wT:()=>a,zA:()=>l});var o=i(61630);const n=(e,t)=>(0,o.nA)().put("/v1/chat/conversation",{publicUserIds:e,publicConversationId:t}),l=e=>(0,o.nA)().delete("/v1/chat/conversation",{params:{conversation:e}}),r=(e,t)=>(0,o.nA)().post("/v1/chat/conversation/participants",{publicConversationId:e,publicUserIds:t}),s=(e,t)=>(0,o.nA)().delete("/v1/chat/conversation/participants",{params:{conversation:e,participant:t}}),a=(e,t)=>(0,o.nA)().put("/v1/chat/conversation/name",{publicConversationId:e,name:t}),d=function(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return(0,o.nA)().get("/v1/chat/messages",{params:{conversation:e,page:t,before:i}})},c=e=>(0,o.nA)().get("/v1/chat/all",{params:{page:e}}),u=(e,t)=>
1(0,o.nA)().post("/v1/chat/media",e,{headers:{"Content-Type":"multipart/form-data"},params:{conversation:t}})},76918:(e,t,i)=>{i.d(t,{$U:()=>p,CY:()=>c,EP:()=>u,Yn:()=>l,_y:()=>d,bJ:()=>h,m2:()=>r,mR:()=>a,v$:()=>n,xI:()=>s});var o=i(61630);const n=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2?arguments[2]:void 0;return(0,o.nA)().get("/v2/favorites/board",{params:{user:e,minutes:t,board:i}})},l=(e,t)=>(0,o.nA)().post("/v2/favorites/board/tiles",e,{params:{board:t}}),r=(e,t)=>(0,o.nA)().patch("/v2/favorites/board/tiles/".concat(e),t),s=e=>(0,o.nA)().delete("/v2/favorites/board/tiles/".concat(e)),a=(e,t)=>(0,o.nA)().put("/v2/favorites/board/layout",{tiles:e},{params:{board:t}}),d=(e,t)=>(0,o.nA)().patch("/v2/favorites/board",e,{params:{board:t}}),c=e=>(0,o.nA)().post("/v2/favorites/board/media",e,{headers:{"Content-Type":"multipart/form-data"}}),u=e=>(0,o.nA)().post("/v2/favorites/boards",{title:e}),p=e=>(0,o.nA)().delete("/v2/favorites/boards/".concat(e)),h=e=>(0,o.nA)().put("/v2/favorites/boards/order",{boards:e})},78610:(e,t,i)=>{i.d(t,{u:()=>z});var o=i(9950),n=i(70155),l=i(59051),r=i.n(l),s=i(64989),a=i(58288),d=i(10827),c=i(70822),u=i(44414);const p=e=>{let{to:t,value:i,label:o}=e;return(0,u.jsx)(d.N_,{className:c.A.factLink,to:t,"aria-label":"".concat(i," ").concat(o),children:i})};var h=i(83708),v=i(68637),b=i(37735),g=i(13084),m=i(56077),x=i(75470),A=i(54545),f=i(11220),y=i(78249),w=i(33109),j=i(61630);const k=e=>{let{user:t}=e;const i=(0,d.Zp)(),[l,r]=(0,n.fp)(A.QI),[s,a]=(0,o.useState)(!1);return(0,o.useEffect)(()=>{if(t&&(t.viewerBlocked||t.userBlocked)){const e=setTimeout(()=>{i("/blocked/".concat(t.publicId),{replace:!0})},50);return()=>clearTimeout(e)}},[t]),(0,u.jsxs)("div",{children:[(0,u.jsx)(f.$,{groups:[{key:"user",label:(0,m.vE)("sections.dropdown.user"),actions:[!(null!==t&&void 0!==t&&t.isSelfViewing)&&{key:"report",title:(0,m.vE)("actions.report.button"),icon:"flag-outline",onClick:()=>a(!0)},{key:"ranking",title:l.byMinutes?(0,m.vE)("actions.changeToStreams"):(0,m.vE)("actions.changeToMinutes"),icon:l.byMinutes?"play-outline":"timer-outline",onClick:()=>{(0,A.$j)(r,{byMinutes:!l.byMinutes})}},!(null!==t&&void 0!==t&&t.isSelfViewing)&&{key:"block",title:(0,m.vE)("actions.blockUser"),icon:"person-remove-outline",destructive:!0,onClick:()=>{(null===t||void 0===t?void 0:t.publicId)&&(0,y.rn)(null===t||void 0===t?void 0:t.publicId).then(()=>{i("/blocked/".concat(t.publicId),{replace:!0})}).catch(j.Q9)}}]}]}),(0,u.jsx)(w.K,{publicId:null===t||void 0===t?void 0:t.publicId,openReportModal:s,setOpenReportModal:a,kind:"users",name:null===t||void 0===t?void 0:t.name,blockable:{publicId:null===t||void 0===t?void 0:t.publicId,name:null===t||void 0===t?void 0:t.name},onBlocked:()=>i("/blocked/".concat(null===t||void 0===t?void 0:t.publicId),{replace:!0})})]})};var E=i(43983),T=i(39569),L=i(53213),D=i(49972);const R=()=>(0,u.jsx)(d.N_,{to:"/settings",className:L.A.secondary,children:(0,m.vE)("actions.editProfile")}),C=e=>{let{publicUserId:t}=e;const i=(0,d.Zp)();return(0,u.jsx)("button",{type:"button",className:D.A.button,onClick:()=>{(0,E.QL)([t],null).then(e=>{let{data:t}=e;i("/chats/".concat(t.publicId))}).catch(e=>{(0,j.Q9)(e)})},"aria-label":(0,m.vE)("actions.startChat"),children:(0,u.jsx)(T.Q,{name:"mail-outline",color:"currentColor",size:18})})},I=e=>{let{user:t}=e;const[i,n]=(0,o.useState)(!1);return(0,o.useEffect)(()=>{t&&n((null===t||void 0===t?void 0:t.followedByViewer)||!1)},[t]),(0,u.jsx)("button",{type:"button",className:i?L.A.secondary:L.A.primary,onClick:()=>{null!==t&&void 0!==t&&t.publicId&&(i?(0,y.Qt)(null===t||void 0===t?void 0:t.publicId).then(()=>{n(!1)}).catch(j.Q9):(0,y.pV)(null===t||void 0===t?void 0:t.publicId).then(()=>{n(!0)}).catch(j.Q9))},children:i?(0,m.vE)("actions.unfollow"):null!==t&&void 0!==t&&t.followsViewer?(0,m.vE)("actions.followBack"):(0,m.vE)("actions.follow")})},S="UserShell_intro__lY4Uc",U="UserShell_description__La8Cd",F="UserShell_details__+XEdR",_="UserShell_link__sJ493",G="UserShell_followsYou__ECMiF",M=e=>{var t;let{user:i}=e;return(0,u.jsxs)("div",{className:S,children:[i.description&&(0,u.jsx)("p",{className:U,children:i.description}),(0,u.jsxs)("div",{className:F,children:[(0,u.jsx)("span",{children:(0,m.vE)("users.joined",{date:r()(i.joinedAt).format("MMMM YYYY")})}),null===(t=i.links)||void 0===t?void 0:t.map(e=>(0,u.jsx)("a",{className:_,href:e,rel:"nofollow ugc",children:e.replace(/^https?:\/\//,"")},e))]})]})},B=e=>{let{user:t}=e;return t.isSelfViewing?(0,u.jsx)(R,{}):(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(I,{user:t}),(0,u.jsx)(C,{publicUserId:t.publicId}),t.followsViewer&&(0,u.jsx)("span",{className:G,children:(0,m.vE)("info.followsYou")})]})},z=e=>{var t,i,o,l,r,d;let{user:c,selected:f,filters:y,children:w}=e;const[j]=(0,n.fp)(A.Ec),E=(0,g.tH)(c,j.jwt),T="/users/".concat(null===c||void 0===c?void 0:c.publicId),L=(e,t,i)=>{const o=(e=>null==e?void 0:String((0,x.qy)(e)))(e);return{value:o&&(0,u.jsx)(p,{to:i,value:o,label:t}),label:t}},D=[L(null===c||void 0===c||null===(t=c.followers)||void 0===t?void 0:t.followers,(0,m.vE)("users.facts.followers",{count:null!==(i=null===c||void 0===c||null===(o=c.followers)||void 0===o?void 0:o.followers)&&void 0!==i?i:0}),"".concat(T,"/followers")),L(null===c||void 0===c||null===(l=c.followers)||void 0===l?void 0:l.following,(0,m.vE)("users.facts.following",{count:null!==(r=null===c||void 0===c||null===(d=c.followers)||void 0===d?void 0:d.following)&&void 0!==r?r:0}),"".concat(T,"/following"))];null!==E&&void 0!==E&&E.compatibility&&D.push({value:"".concat(E.compatibility,"%"),label:(0,m.vE)("users.facts.compatibility")});const R=[["stats",(0,m.vE)("navigation.tabs.stats"),T],["favorites",(0,m.vE)("sections.favorites.title"),"".concat(T,"/favorites")],["achievements",(0,m.vE)("navigation.tabs.achievements"),"".concat(T,"/achievements")],["notes",(0,m.vE)("sections.notes"),"".concat(T,"/notes")],["reviews",(0,m.vE)("navigation.tabs.reviews"),"".concat(T,"/reviews")],["mentions",(0,m.vE)("navigation.tabs.mentions"),"".concat(T,"/mentions")]];return(0,u.jsx)(b.Pt,{coverUrl:(null===c||void 0===c?void 0:c.background)||(null===c||void 0===c?void 0:c.avatar),children:(0,u.jsx)(h.Dz,{hero:(0,u.jsx)(a.E,{cover:(null===c||void 0===c?void 0:c.avatar)||"/images/user-placeholder.png",round:!0,backdrop:(null===c||void 0===c?void 0:c.background)||(null===c||void 0===c?void 0:c.avatar)||void 0,photoBackdrop:!(null===c||void 0===c||!c.background),name:c?c.name||"musicat.user":void 0,badge:(0,u.jsx)(s.g,{accountType:null===c||void 0===c?void 0:c.accountType,size:22}),meta:null!==c&&void 0!==c&&c.profileUrl?"@".concat(c.profileUrl):void 0,about:c&&(0,u.jsx)(M,{user:c}),facts:D,actions:c&&(0,u.jsx)(B,{user:c})}),tabs:(0,u.jsx)(v.Y,{label:(0,m.vE)("navigation.pageSections"),children:R.map(e=>{let[t,i,o]=e;return(0,u.jsx)(v.F,{text:i,link:o,selected:f===t},t)})}),filters:y,actions:(0,u.jsx)(k,{user:c}),children:w})})}},97076:(e,t,i)=>{i.d(t,{T:()=>d});var o=i(89379),n=(i(9950),i(23210)),l=i(59262),r=i(56077),s=i(51761),a=i(44414);const d=e=>{let{open:t,title:i,body:o,confirmLabel:n,tone:l="danger",onConfirm:d,onClose:u}=e;return(0,a.jsx)(s.E,{open:t,onClose:u,maxWidth:380,title:i,children:(0,a.jsxs)("div",{style:c.body,children:[(0,a.jsx)("span",{style:c.text,children:o}),(0,a.jsxs)("div",{style:c.buttons,children:[(0,a.jsx)("button",{type:"button",style:c.cancel,onClick:u,children:(0,r.vE)("actions.cancel")}),(0,a.jsx)("button",{type:"button",style:"spend"===l?c.spend:c.confirm,onClick:()=>{d(),u()},children:n})]})]})})},c={body:{display:"flex",flexDirection:"column",gap:l.GI.XM},text:(0,o.A)((0,o.A)({},l.K4.REGULAR_MD),{},{color:n.lm.DEFAULT.GRAY_400}),buttons:{display:"flex",flexDirection:"row",justifyContent:"flex-end",gap:l.GI.MD},cancel:(0,o.A)((0,o.A)({},l.K4.BOLD_SM),{},{height:40,padding:"0 16px",borderRadius:10,border:"1px solid ".concat(n.lm.DEFAULT.GRAY_800),backgroundColor:"transparent",color:n.lm.DEFAULT.WHITE,cursor:"pointer"}),confirm:(0,o.A)((0,o.A)({},l.K4.BOLD_SM),{},{height:40,padding:"0 16px",borderRadius:10,border:"1px solid ".concat(n.lm.DEFAULT.RED_SOFT,"60"),backgroundColor:"".concat(n.lm.DEFAULT.RED_SOFT,"18"),color:n.lm.DEFAULT.RED_SOFT,cursor:"pointer"}),spend:(0,o.A)((0,o.A)({},l.K4.BOLD_SM),{},{height:40,padding:"0 16px",borderRadius:10,border:"1px solid ".concat(n.lm.DEFAULT.PURPLE_600,"60"),backgroundColor:"".concat(n.lm.DEFAULT.PURPLE_600,"18"),color:n.lm.DEFAULT.PURPLE_400,cursor:"pointer"})}},99986:(e,t,i)=>{i.r(t),i.d(t,{default:()=>zt});var o=i(80045),n=i(89379),l=i(9950),r=i(10827),s=i(20615),a=i(7356),d=i(70155),c=i(28490),u=i(23210),p=i(59262),h=i(56077);const v=["S","V","H","L","XL"],b={S:{columns:1,rows:1},V:{columns:1,rows:2},H:{columns:2,rows:1},L:{columns:2,rows:2},XL:{columns:3,rows:1}},g=["PUBLIC","FOLLOWERS","PRIVATE"],m={PUBLIC:"earth",FOLLOWERS:"people",PRIVATE:"lock-closed"},x=140,A={maxTiles:0,allowedKinds:[],sizesUnlocked:!1,configUnlocked:!1,themeUnlocked:!1,visibilityUnlocked:!1,maxBoards:1},f=e=>b[e].columns*b[e].rows>1,y=e=>f(e),w=e=>f(e),j=e=>{var t;return null===(t=e.track)||void 0===t?void 0:t.previewUrl},k=e=>!!e.config.showPreview&&w(e.size)&&!!j(e),E=e=>"V"===e.size||"H"===e.size&&k(e),T=e=>{const t=!!e.config.showStats&&y(e.size);return{showRating:!!e.config.showRating&&!(t&&E(e)),showStats:t}},L=(e,t)=>{return"autoplay"!==t&&(!("showStats"===t&&!y(e.size))&&(!!("showPreview"!==t||w(e.size)&&j(e))&&("NOTE"===e.kind?"showCaption"===t&&!(null===(i=e.note)||void 0===i||!i.cover)&&"S"!==e.size:("TRACK"!==e.kind&&"ALBUM"!==e.kind||"S"!==e.size)&&("showRating"!==t&&"showStats"!==t&&"showPreview"!==t||!!e.config.showCaption))));var i},D=p.GI.SM+3,R=768+2*D,C=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3;return Math.min(256,(e-D*(t-1))/t)},I=e=>{var t,i,o,n,l,r,s,a,d,c;const u=e.media;switch(e.kind){case"TRACK":return[(null===(t=e.track)||void 0===t||null===(i=t.thumbnails)||void 0===i?void 0:i.md)||(null===(o=e.track)||void 0===o?void 0:o.coverUrl)].filter(
1Boolean);case"ALBUM":return[(null===(n=e.album)||void 0===n||null===(l=n.thumbnails)||void 0===l?void 0:l.md)||(null===(r=e.album)||void 0===r?void 0:r.coverUrl)].filter(Boolean);case"ARTIST":return[(null===(s=e.artist)||void 0===s||null===(a=s.thumbnails)||void 0===a?void 0:a.md)||(null===(d=e.artist)||void 0===d?void 0:d.imageUrl)].filter(Boolean);case"NOTE":{var p,h;const t=e.note;return t?t.cover?[(null===(p=t.cover.thumbnails)||void 0===p?void 0:p.md)||t.cover.url]:(null!==(h=t.photos)&&void 0!==h?h:[]).map(e=>{var t;return(null===(t=e.thumbnails)||void 0===t?void 0:t.md)||e.url}):[]}case"GIF":return u?[u.url]:[];default:return u?[(null===(c=u.thumbnails)||void 0===c?void 0:c.lg)||u.url]:[]}},S=e=>Promise.all(e.map(e=>new Promise(t=>{const i=new Image;i.onload=()=>t(),i.onerror=()=>t(),i.src=e}))),U=(e,t,i)=>{const o=e.indexOf(t),n=e.indexOf(i);if(o<0||n<0||o===n)return e;const l=[...e],[r]=l.splice(o,1);return l.splice(n,0,r),l},F=()=>{const e=(0,l.useRef)(null),[t,i]=(0,l.useState)(0);return(0,l.useLayoutEffect)(()=>{const t=e.current;if(!t)return;const o=()=>i(C(t.clientWidth));o();const n=new ResizeObserver(o);return n.observe(t),window.addEventListener("resize",o),()=>{n.disconnect(),window.removeEventListener("resize",o)}},[]),{ref:e,cell:t}};var _=i(39569),G=i(54003),M=i(49972),B=i(86367),z=i(44414);const O=[{columns:2,rows:2},{columns:1,rows:2},{columns:1,rows:1},{columns:1,rows:1},{columns:1,rows:1},{columns:2,rows:1},{columns:1,rows:1}],Y=e=>void 0===e?O:Array.from({length:Math.max(1,e)},(e,t)=>O[t%O.length]),K=e=>{let{tiles:t}=e;const{ref:i,cell:o}=F();return(0,z.jsx)("div",{ref:i,style:(0,n.A)((0,n.A)({},H.board),{},{gridAutoRows:o}),children:Y(t).map((e,t)=>(0,z.jsx)(B.$K,{style:{borderRadius:"var(--radius-lg)",gridColumn:"span ".concat(e.columns),gridRow:"span ".concat(e.rows)}},"board-skeleton-".concat(t)))})},W=e=>{let{withActions:t=!1}=e;return(0,z.jsxs)("div",{style:H.container,children:[(0,z.jsxs)("div",{style:H.header,children:[(0,z.jsxs)("div",{style:H.headerLeft,children:[(0,z.jsx)(B.$K,{style:H.icon}),(0,z.jsx)(B.wB,{width:"6em"})]}),t&&(0,z.jsxs)("div",{style:H.headerLeft,children:[(0,z.jsx)(B.$K,{className:"".concat(M.A.button," ").concat(M.A.small)}),(0,z.jsx)(B.$K,{className:"".concat(M.A.button," ").concat(M.A.small)})]})]}),(0,z.jsx)(K,{})]})},H={container:{display:"flex",flexDirection:"column",gap:p.GI.MD,width:"100%"},header:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:p.GI.MD,font:"var(--type-section)"},headerLeft:{display:"flex",flexDirection:"row",alignItems:"center",gap:p.GI.SM},icon:{width:15,height:15,borderRadius:"var(--radius-xs)"},board:{display:"grid",width:"100%",maxWidth:R,gridTemplateColumns:"repeat(".concat(3,", 1fr)"),gridAutoFlow:"row dense",gap:D}};var Q=i(38580),P=i(85162),N=i(54545),X=i(75470);const V=e=>u.zR[Math.min(9,Math.max(0,Math.round(e)-1))],$=e=>{let{size:t,rating:i,publicNoteId:o,plays:l,showRating:s,showStats:a}=e;const[c]=(0,d.fp)(N.QI),p=s&&!!i,h=a&&!!l&&y(t);if(!p&&!h)return null;const v=p&&(0,z.jsxs)("span",{style:q.ratingPill,children:[(0,z.jsx)(_.Q,{name:"star",size:11,color:V(i)}),(0,z.jsx)("span",{style:(0,n.A)((0,n.A)({},q.ratingText),{},{color:V(i)}),children:i.toFixed(1)})]});return(0,z.jsxs)("div",{style:q.row,children:[p&&(o?(0,z.jsx)(r.N_,{to:"/notes/".concat(o),style:q.ratingLink,onClick:e=>e.stopPropagation(),children:v}):v),h&&(0,z.jsxs)("span",{style:(0,n.A)((0,n.A)({},q.playsGroup),p?q.playsGroupShrinks:{}),children:[(0,z.jsx)(_.Q,{name:c.byMinutes?"time":"play",size:11,color:u.lm.DEFAULT.GRAY_400}),(0,z.jsx)("span",{style:q.playsText,children:(0,X.NG)(l)})]})]})},q={row:{display:"flex",flexDirection:"row",alignItems:"center",gap:4,marginTop:3,overflow:"hidden",flexShrink:1,minWidth:0},ratingLink:{textDecoration:"none",display:"flex",flexShrink:0},ratingPill:{display:"flex",flexDirection:"row",alignItems:"center",gap:3,padding:"1px 5px",borderRadius:20,backgroundColor:u.lm.DEFAULT.GRAY_800},ratingText:(0,n.A)({},p.K4.BOLD_SM),playsGroup:{display:"flex",flexDirection:"row",alignItems:"center",gap:3},playsGroupShrinks:{flexShrink:1,minWidth:0},playsText:(0,n.A)((0,n.A)({},p.K4.BOLD_SM),{},{color:u.lm.DEFAULT.GRAY_400,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"})},Z={S:1,V:1,L:.6,H:1,XL:1},J={L:!0,XL:!0},ee=e=>{var t,i,o,l,r,s,a;let{tile:d,width:c,height:u}=e;const p=null!==(t=d.track)&&void 0!==t?t:d.album;if(!p)return null;const h="S"===(v=d.size)||"V"===v||"L"===v;var v;const b=null!==(i=Z[d.size])&&void 0!==i?i:Z.S,g=Math.round(((h?c:u)-16)*b),m="S"===d.size||!d.config.showCaption,x=(null===(o=p.thumbnails)||void 0===o?void 0:o.md)||p.coverUrl||"/images/placeholder.png",A=k(d)?null===(l=d.track)||void 0===l?void 0:l.previewUrl:void 0;return(0,z.jsxs)("div",{style:ie.container,children:[(0,z.jsx)("img",{src:x,alt:"",style:ie.wash,"aria-hidden":!0}),(0,z.jsx)("div",{style:ie.veil}),(0,z.jsxs)("div",{style:(0,n.A)((0,n.A)((0,n.A)({},ie.body),h?ie.bodyStacked:ie.bodyRow),m?ie.bodyCentered:{}),children:[(0,z.jsx)("img",{src:x,alt:p.name,style:(0,n.A)((0,n.A)({},ie.cover),{},{width:g,height:g}),onError:e=>{let{currentTarget:t}=e;t.src="/images/placeholder.png"}}),!m&&(0,z.jsxs)("div",{style:(0,n.A)((0,n.A)({},ie.caption),h?ie.captionStacked:ie.captionRow),children:[(0,z.jsxs)("div",{style:ie.names,children:[(0,z.jsx)("span",{style:(0,n.A)((0,n.A)({},J[d.size]?ie.nameLarge:ie.name),{},{WebkitLineClamp:h?2:1}),children:p.name}),!!p.artists&&(0,z.jsx)("span",{style:ie.artists,children:p.artists})]}),(0,z.jsxs)("div",{style:ie.footer,children:[(0,z.jsx)($,(0,n.A)({size:d.size,rating:null===(r=p.review)||void 0===r?void 0:r.rating,publicNoteId:null===(s=p.review)||void 0===s?void 0:s.publicNoteId,plays:null!==(a=p.streams)&&void 0!==a?a:p.minutes},T(d))),!!A&&(0,z.jsx)("span",{style:ie.preview,onClick:e=>e.stopPropagation(),children:(0,z.jsx)(P.KA,{url:A,size:26})})]})]})]}),(0,z.jsx)("div",{style:ie.topShade})]})},te={display:"-webkit-box",WebkitBoxOrient:"vertical",overflow:"hidden"},ie={container:{position:"relative",width:"100%",height:"100%",overflow:"hidden",borderRadius:12,backgroundColor:u.lm.DEFAULT.GRAY_900},wash:{position:"absolute",inset:0,width:"100%",height:"100%",objectFit:"cover",transform:"scale(1.4)",filter:"blur(22px)"},veil:{position:"absolute",inset:0,backgroundColor:"rgba(8,4,4,0.34)"},topShade:{position:"absolute",left:0,right:0,top:0,height:28,background:"linear-gradient(rgba(0,0,0,0.18), transparent)",pointerEvents:"none"},body:{position:"absolute",inset:0,display:"flex",padding:8,boxSizing:"border-box",gap:12},bodyStacked:{flexDirection:"column",alignItems:"flex-start"},bodyRow:{flexDirection:"row",alignItems:"stretch"},bodyCentered:{alignItems:"center",justifyContent:"center"},cover:{borderRadius:5,objectFit:"cover",flexShrink:0},caption:{display:"flex",flexDirection:"column",flex:1,minWidth:0,justifyContent:"center"},captionRow:{justifyContent:"space-between",padding:"".concat(12,"px 0")},captionStacked:{alignSelf:"stretch",justifyContent:"flex-end"},names:{display:"flex",flexDirection:"column",minWidth:0},name:(0,n.A)((0,n.A)((0,n.A)({},te),p.K4.BOLD_MD),{},{color:u.lm.DEFAULT.WHITE,lineHeight:"17px"}),nameLarge:(0,n.A)((0,n.A)((0,n.A)({},te),p.K4.BOLD_XM),{},{color:u.lm.DEFAULT.WHITE,lineHeight:"20px"}),artists:(0,n.A)((0,n.A)({},p.K4.REGULAR_SM),{},{color:"rgba(250,250,250,0.7)",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}),footer:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:4}
1,preview:{display:"flex",flexShrink:0}},oe=e=>{var t,i,o,l;let{tile:r}=e;const s=r.artist;if(!s)return null;const a=(null===(t=s.thumbnails)||void 0===t?void 0:t.md)||s.imageUrl||"/images/user-placeholder.png";return(0,z.jsxs)("div",{style:ne.container,children:[(0,z.jsx)("img",{src:a,alt:s.name,style:ne.photo,onError:e=>{let{currentTarget:t}=e;t.src="/images/user-placeholder.png"}}),(0,z.jsx)("div",{style:ne.gradient}),r.config.showCaption&&(0,z.jsxs)("div",{style:ne.overlay,children:[(0,z.jsx)("span",{style:ne.name,children:s.name}),(0,z.jsx)($,(0,n.A)({size:r.size,rating:null===(i=s.review)||void 0===i?void 0:i.rating,publicNoteId:null===(o=s.review)||void 0===o?void 0:o.publicNoteId,plays:null!==(l=s.streams)&&void 0!==l?l:s.minutes},T(r)))]})]})},ne={container:{position:"relative",width:"100%",height:"100%",overflow:"hidden",borderRadius:12,backgroundColor:u.lm.DEFAULT.GRAY_900,display:"flex",flexDirection:"column",justifyContent:"flex-end"},photo:{position:"absolute",inset:0,width:"100%",height:"100%",objectFit:"cover"},gradient:{position:"absolute",inset:0,background:"linear-gradient(transparent 0%, rgba(0,0,0,0.42) 45%, rgba(0,0,0,0.94) 100%)",pointerEvents:"none"},overlay:{position:"relative",display:"flex",flexDirection:"column",padding:9,gap:1,minWidth:0},name:(0,n.A)((0,n.A)({},p.K4.BOLD_MD),{},{color:u.lm.DEFAULT.WHITE,lineHeight:"18px",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:2,overflow:"hidden"})};var le=i(17928);const re={S:2,H:1,XL:1,V:6,L:5},se={S:.62,V:.86,L:.5},ae={H:2,XL:2,V:3,L:4},de=e=>{var t,i,o;let{tile:l,width:r,height:s}=e;const a=(0,Q.y5)(),d=l.note;if(!d)return null;const c=null!==(t=d.photos)&&void 0!==t?t:[];return d.cover?(0,z.jsx)(ue,{tile:l,note:d,width:r,height:s}):(0,z.jsxs)("div",{style:(0,n.A)((0,n.A)({},fe.noteContainer),c.length?{}:{backgroundColor:(0,Q.xM)(a,.1)}),children:[c.length>0&&(0,z.jsx)(pe,{photos:c}),!(null===(i=l.text)||void 0===i||!i.trim())&&(0,z.jsxs)("div",{style:fe.noteHeader,children:[(0,z.jsx)("div",{style:(0,n.A)((0,n.A)({},fe.noteDot),{},{backgroundColor:a})}),(0,z.jsx)("span",{style:fe.noteLabel,children:l.text})]}),(0,z.jsx)("div",{style:fe.noteBody,children:(0,z.jsx)("div",{style:(0,n.A)((0,n.A)({},fe.noteText),{},{WebkitLineClamp:null!==(o=re[l.size])&&void 0!==o?o:3}),children:(0,z.jsx)(le.h,{children:d.content})})}),(!!d.rating||!!d.subject)&&(0,z.jsxs)("div",{style:fe.noteFooter,children:[!!d.rating&&(0,z.jsx)(ce,{rating:d.rating}),!!d.subject&&(0,z.jsx)("span",{style:fe.noteSubject,children:d.subject})]}),(0,z.jsx)(ge,{accent:a})]})},ce=e=>{let{rating:t}=e;return(0,z.jsxs)("span",{style:fe.notePill,children:[(0,z.jsx)(_.Q,{name:"star",size:9,color:V(t)}),(0,z.jsx)("span",{style:(0,n.A)((0,n.A)({},fe.notePillText),{},{color:V(t)}),children:t.toFixed(1)})]})},ue=e=>{var t,i,o,l,r;let{tile:s,note:a,width:d,height:c}=e;const u=a.cover,p=(null===(t=u.thumbnails)||void 0===t?void 0:t.md)||u.url,h="S"===s.size||"V"===s.size||"L"===s.size,v="S"===s.size||!(null!==(i=a.content)&&void 0!==i&&i.trim()),b="S"!==s.size&&s.config.showCaption&&!!a.subject,g=h?d*(null!==(o=se[s.size])&&void 0!==o?o:.62):c-18;return(0,z.jsxs)("div",{style:fe.reviewContainer,children:[(0,z.jsx)("img",{src:p,alt:"",style:fe.reviewWash,"aria-hidden":!0}),(0,z.jsx)("div",{style:fe.reviewVeil}),(0,z.jsxs)("div",{style:(0,n.A)((0,n.A)((0,n.A)({},fe.reviewBody),h?fe.reviewStacked:fe.reviewRow),v?fe.reviewCentered:{}),children:[(0,z.jsx)("img",{src:p,alt:null!==(l=a.subject)&&void 0!==l?l:"",style:(0,n.A)((0,n.A)({},fe.reviewCover),{},{width:g,height:g})}),(0,z.jsxs)("div",{style:(0,n.A)((0,n.A)({},fe.reviewText),v?fe.reviewTextCentered:{}),children:[!!a.rating&&(0,z.jsx)("div",{style:fe.reviewRatingRow,children:(0,z.jsx)(ce,{rating:a.rating})}),b&&(0,z.jsx)("span",{style:(0,n.A)((0,n.A)({},fe.reviewSubject),{},{WebkitLineClamp:"L"===s.size?2:1}),children:a.subject}),!v&&(0,z.jsx)("div",{style:(0,n.A)((0,n.A)({},fe.reviewQuote),{},{WebkitLineClamp:null!==(r=ae[s.size])&&void 0!==r?r:2}),children:(0,z.jsx)(le.h,{children:a.content})})]})]})]})},pe=e=>{let{photos:t}=e;const[i,o]=(0,l.useState)(0),[r,s]=(0,l.useState)(!1),a=t.length>1;return(0,l.useEffect)(()=>
1{if(!a||r)return;const e=setInterval(()=>o(e=>(e+1)%t.length),4500);return()=>clearInterval(e)},[a,r,t.length]),(0,z.jsxs)("div",{style:fe.photosLayer,children:[t.map((e,t)=>{var o;return(0,z.jsx)("img",{src:(null===(o=e.thumbnails)||void 0===o?void 0:o.md)||e.url,alt:"","aria-hidden":!0,style:(0,n.A)((0,n.A)({},fe.photo),{},{opacity:t===i?1:0})},"".concat(t,"-").concat(e.url))}),(0,z.jsx)("div",{style:fe.photoScrim}),a&&(0,z.jsx)("div",{style:fe.dots,children:t.map((e,t)=>(0,z.jsx)("button",{type:"button",style:fe.dotTarget,"aria-label":"Photo ".concat(t+1),"aria-current":t===i,onClick:e=>{e.stopPropagation(),s(!0),o(t)},children:(0,z.jsx)("span",{style:(0,n.A)((0,n.A)({},fe.dot),t===i?fe.dotActive:{})})},"".concat(t,"-").concat(e.url)))})]})},he=e=>{var t,i;let{tile:o}=e;const n=o.media;if(!n)return null;const l="GIF"===o.kind?n.url:(null===(t=n.thumbnails)||void 0===t?void 0:t.lg)||n.url;return(0,z.jsxs)("div",{style:fe.mediaContainer,children:[(0,z.jsx)("img",{src:l,alt:null!==(i=o.text)&&void 0!==i?i:"",style:fe.mediaImage}),o.config.showCaption&&!!o.text&&(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)("div",{style:fe.mediaGradient}),(0,z.jsx)("div",{style:fe.mediaCaption,children:(0,z.jsx)("span",{style:fe.mediaCaptionText,children:o.text})})]})]})},ve=e=>{let{tile:t}=e;const i=(0,Q.y5)(),o="XL"===t.size||"L"===t.size,l=t.media;return(0,z.jsxs)("div",{style:(0,n.A)((0,n.A)({},fe.textContainer),l?{}:{backgroundColor:(0,Q.xM)(i,.12)}),children:[!!l&&(0,z.jsx)(me,{media:l}),(0,z.jsx)("span",{style:(0,n.A)((0,n.A)({},fe.quoteMark),{},{color:i}),children:"\u201e"}),(0,z.jsx)("span",{style:(0,n.A)((0,n.A)({},o?fe.quoteLarge:fe.quote),{},{WebkitLineClamp:o?4:5}),children:t.text}),(0,z.jsx)(ge,{accent:i})]})},be=e=>{let{tile:t}=e;const i=(0,Q.y5)(),o=t.media;return(0,z.jsxs)("div",{style:(0,n.A)((0,n.A)({},fe.interestContainer),o?{}:{backgroundColor:(0,Q.xM)(i,.12)}),children:[!!o&&(0,z.jsx)(me,{media:o}),!!t.glyph&&(0,z.jsx)("span",{style:fe.glyph,children:t.glyph}),(0,z.jsx)("span",{style:fe.interestLabel,children:t.text}),(0,z.jsx)(ge,{accent:i})]})},ge=e=>{let{accent:t}=e;return(0,z.jsx)("div",{"data-testid":"tile-border",style:(0,n.A)((0,n.A)({},fe.border),{},{borderColor:(0,Q.xM)(t,.4)})})},me=e=>{var t;let{media:i}=e;return(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)("img",{src:(null===(t=i.thumbnails)||void 0===t?void 0:t.lg)||i.url,alt:"","aria-hidden":!0,style:fe.backgroundImage}),(0,z.jsx)("div",{style:fe.backgroundScrim})]})},xe={display:"-webkit-box",WebkitBoxOrient:"vertical",overflow:"hidden"},Ae={position:"absolute",inset:0},fe={border:(0,n.A)((0,n.A)({},Ae),{},{borderRadius:12,borderWidth:1,borderStyle:"solid",pointerEvents:"none"}),backgroundImage:(0,n.A)((0,n.A)({},Ae),{},{width:"100%",height:"100%",objectFit:"cover"}),backgroundScrim:(0,n.A)((0,n.A)({},Ae),{},{backgroundColor:"rgba(8,4,4,0.52)"}),reviewContainer:{position:"relative",width:"100%",height:"100%",borderRadius:12,overflow:"hidden",backgroundColor:u.lm.DEFAULT.GRAY_900},reviewWash:(0,n.A)((0,n.A)({},Ae),{},{width:"100%",height:"100%",objectFit:"cover",filter:"blur(24px)",transform:"scale(1.4)"}),reviewVeil:(0,n.A)((0,n.A)({},Ae),{},{backgroundColor:"rgba(8,4,4,0.42)"}),reviewBody:(0,n.A)((0,n.A)({},Ae),{},{display:"flex",padding:9,boxSizing:"border-box",gap:8}),reviewStacked:{flexDirection:"column",alignItems:"flex-start"},reviewCentered:{alignItems:"center",justifyContent:"center",gap:6},reviewTextCentered:{flex:"0 0 auto",alignItems:"center"},reviewRow:{flexDirection:"row",alignItems:"stretch"},reviewCover:{borderRadius:5,objectFit:"cover",flexShrink:0},reviewText:{display:"flex",flexDirection:"column",flex:1,minWidth:0,justifyContent:"flex-end",gap:3},reviewRatingRow:{display:"flex",flexDirection:"row",alignItems:"center",gap:6},reviewSubject:(0,n.A)((0,n.A)((0,n.A)({},xe),p.K4.BOLD_SM),{},{color:u.lm.DEFAULT.WHITE,lineHeight:"15px"}),reviewQuote:(0,n.A)((0,n.A)((0,n.A)({},xe),p.K4.REGULAR_SM),{},{color:u.lm.DEFAULT.WHITE,lineHeight:"16px"}),noteContainer:{position:"relative",width:"100%",height:"100%",borderRadius:12,overflow:"hidden",boxSizing:"border-box",display:"flex",flexDirection:"column",padding:10,gap:6,backgroundColor:u.lm.DEFAULT.GRAY_900},noteHeader:{position:"relative",display:"flex",flexDirection:"row",alignItems:"center",gap:6,minWidth:0},noteDot:{width:14,height:14,borderRadius:14,flexShrink:0},noteLabel:(0,n.A)((0,n.A)({},p.K4.REGULAR_SM),{},{color:u.lm.DEFAULT.GRAY_400,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}),noteBody:{position:"relative",flex:1,minHeight:0,overflow:"hidden",pointerEvents:"none"},noteText:(0,n.A)((0,n.A)((0,n.A)({},xe),p.K4.REGULAR_MD),{},{color:u.lm.DEFAULT.WHITE,lineHeight:"19px"}),noteFooter:{position:"relative",display:"flex",flexDirection:"row",alignItems:"center",gap:6,minWidth:0},notePill:{display:"flex",flexDirection:"row",alignItems:"center",gap:3,padding:"1px 5px",borderRadius:20,backgroundColor:u.lm.DEFAULT.GRAY_800,flexShrink:0},notePillText:(0,n.A)({},p.K4.BOLD_XS),noteSubject:(0,n.A)((0,n.A)({},p.K4.BOLD_SM),{},{color:u.lm.DEFAULT.GRAY_500,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}
1),photosLayer:(0,n.A)({},Ae),photo:(0,n.A)((0,n.A)({},Ae),{},{width:"100%",height:"100%",objectFit:"cover",transition:"opacity 450ms ease"}),photoScrim:(0,n.A)((0,n.A)({},Ae),{},{backgroundColor:"rgba(8,4,4,0.62)"}),dots:{position:"absolute",bottom:2,left:0,right:0,display:"flex",flexDirection:"row",justifyContent:"center"},dotTarget:{padding:6,border:"none",background:"none",cursor:"pointer",lineHeight:0},dot:{display:"block",width:5,height:5,borderRadius:5,backgroundColor:"rgba(250,250,250,0.4)"},dotActive:{backgroundColor:"rgba(250,250,250,0.95)"},mediaContainer:{position:"relative",width:"100%",height:"100%",borderRadius:12,overflow:"hidden",backgroundColor:u.lm.DEFAULT.GRAY_900},mediaImage:(0,n.A)((0,n.A)({},Ae),{},{width:"100%",height:"100%",objectFit:"cover"}),mediaGradient:(0,n.A)((0,n.A)({},Ae),{},{background:"linear-gradient(transparent 50%, rgba(0,0,0,0.88) 100%)",pointerEvents:"none"}),mediaCaption:{position:"absolute",left:9,right:9,bottom:8},mediaCaptionText:(0,n.A)((0,n.A)((0,n.A)({},xe),p.K4.BOLD_MD),{},{color:u.lm.DEFAULT.WHITE,lineHeight:"18px",WebkitLineClamp:2}),textContainer:{position:"relative",width:"100%",height:"100%",boxSizing:"border-box",borderRadius:12,padding:11,display:"flex",flexDirection:"column",gap:4,justifyContent:"center",backgroundColor:u.lm.DEFAULT.GRAY_900,overflow:"hidden"},quoteMark:(0,n.A)((0,n.A)({},p.K4.BOLD_XL),{},{position:"relative",lineHeight:"16px",height:14}),quote:(0,n.A)((0,n.A)((0,n.A)({},xe),p.K4.REGULAR_MD),{},{position:"relative",color:u.lm.DEFAULT.WHITE,lineHeight:"20px"}),quoteLarge:(0,n.A)((0,n.A)((0,n.A)({},xe),p.K4.REGULAR_XM),{},{position:"relative",color:u.lm.DEFAULT.WHITE,lineHeight:"24px"}),interestContainer:{position:"relative",width:"100%",height:"100%",boxSizing:"border-box",borderRadius:12,padding:10,display:"flex",flexDirection:"column",gap:3,justifyContent:"flex-end",backgroundColor:u.lm.DEFAULT.GRAY_900,overflow:"hidden"},glyph:{position:"relative",fontSize:22,lineHeight:"26px"},interestLabel:(0,n.A)((0,n.A)((0,n.A)({},xe),p.K4.BOLD_MD),{},{position:"relative",color:u.lm.DEFAULT.WHITE,lineHeight:"18px",WebkitLineClamp:2})},ye=e=>{var t,i,o,n;const l=(null===(t=e.track)||void 0===t?void 0:t.name)||(null===(i=e.album)||void 0===i?void 0:i.name)||(null===(o=e.artist)||void 0===o?void 0:o.name)||e.text||(null===(n=e.note)||void 0===n?void 0:n.subject);return["Board tile",e.kind.toLowerCase(),l].filter(Boolean).join(", ")},we=e=>{let{tile:t,width:i,height:o}=e;switch(t.kind){case"TRACK":case"ALBUM":return(0,z.jsx)(ee,{tile:t,width:i,height:o});case"ARTIST":return(0,z.jsx)(oe,{tile:t});case"NOTE":return(0,z.jsx)(de,{tile:t,width:i,height:o});case"PHOTO":case"GIF":return(0,z.jsx)(he,{tile:t});case"TEXT":return(0,z.jsx)(ve,{tile:t});case"INTEREST":return(0,z.jsx)(be,{tile:t});default:return null}},je=e=>{var t,i,o,n,l,r,s,a,d;let{tile:c}=e;const p=(null===(t=c.track)||void 0===t||null===(i=t.thumbnails)||void 0===i?void 0:i.md)||(null===(o=c.album)||void 0===o||null===(n=o.thumbnails)||void 0===n?void 0:n.md)||(null===(l=c.artist)||void 0===l||null===(r=l.thumbnails)||void 0===r?void 0:r.md)||(null===(s=c.media)||void 0===s||null===(a=s.thumbnails)||void 0===a?void 0:a.md)||(null===(d=c.media)||void 0===d?void 0:d.url);return(0,z.jsxs)("div",{style:Le.locked,children:[!!p&&(0,z.jsx)("img",{src:p,alt:"","aria-hidden":!0,style:Le.lockedArtwork}),(0,z.jsx)("div",{style:Le.lockedVeil}),(0,z.jsx)("div",{style:Le.lockedBadge,children:(0,z.jsx)(_.Q,{name:"lock-closed",size:12,color:u.lm.DEFAULT.GOLD})})]})},ke=e=>{var t;let{tile:i,cell:o,editing:l,dragging:r,onSelect:s,onDragStart:a,onDragEnter:d,onDragEnd:c}=e;const u=(0,Q.y5)(),p=null!==(t=b[i.size])&&void 0!==t?t:b.S,h=p.columns*o+(p.columns-1)*D,v=p.rows*o+(p.rows-1)*D;return(0,z.jsx)("div",{className:["board-tile",l?"board-tile--editing":"",r?"board-tile--dragging":""].filter(Boolean).join(" "),style:(0,n.A)((0,n.A)({},Le.slot),{},{gridColumn:"span ".concat(p.columns),gridRow:"span ".concat(p.rows),cursor:l?"grab":"pointer"}),draggable:l,onDragStart:e=>{e.dataTransfer.setData("text/plain",i.publicId),e.dataTransfer.effectAllowed="move",a(i.publicId)},onDragEnter:()=>d(i.publicId),onDragOver:e=>e.preventDefault(),onDragEnd:c,onClick:()=>s(i),onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),s(i))},role:"button",tabIndex:0,"aria-label":ye(i),children:(0,z.jsxs)("div",{style:Le.body,children:[i.locked?(0,z.jsx)(je,{tile:i}):(0,z.jsx)(we,{tile:i,width:h,height:v}),l&&(0,z.jsx)("div",{style:(0,n.A)((0,n.A)({},Le.editOutline),{},{borderColor:(0,Q.xM)(u,.75)})})]})})},Ee=e=>{let{accent:t,onClick:i}=e;return(0,z.jsx)("button",{type:"button",onClick:i,"aria-label":"Add tile",style:(0,n.A)((0,n.A)({},Le.addTile),{},{borderColor:(0,Q.xM)(t,.55),color:t}),children:(0,z.jsx)(_.Q,{name:"add",size:26,color:t})})},Te=e=>{let{used:t,limit:i,onClick:o}=e;const l=t>=i;return(0,z.jsxs)("button",{type:"button",onClick:o,style:Le.counter,children:[(0,z.jsx)("span",{style:Le.counterLabel,children:"".concat(t,"/").concat(i)}),(0,z.jsx)("span",{style:Le.counterBar,children:(0,z.jsx)("span",{style:(0,n.A)((0,n.A)({},Le.counterFill),{},{width:"".concat(Math.min(100,t/Math.max(i,1)*100),"%")},l?Le.counterFillFull:{})})})]})},Le={slot:{position:"relative",minWidth:0},body:{position:"relative",width:"100%",height:"100%",borderRadius:12,overflow:"hidden"},editOutline:{position:"absolute",inset:0,borderRadius:12,borderWidth:1.5,borderStyle:"dashed",pointerEvents:"none"},locked:{position:"relative",width:"100%",height:"100%",borderRadius:12,overflow:"hidden",backgroundColor:u.lm.DEFAULT.GRAY_900,display:"flex",alignItems:"center",justifyContent:"center"},lockedArtwork:{position:"absolute",inset:0,width:"100%",height:"100%",objectFit:"cover",filter:"blur(16px)",transform:"scale(1.2)"}
1,lockedVeil:{position:"absolute",inset:0,backgroundColor:"rgba(8,4,4,0.45)"},lockedBadge:{position:"relative",width:26,height:26,borderRadius:26,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"rgba(255,195,18,0.16)",border:"1px solid rgba(255,195,18,0.5)"},addTile:{gridColumn:"1 / -1",height:64,borderRadius:12,borderWidth:1.5,borderStyle:"dashed",backgroundColor:"transparent",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer"},counter:{display:"flex",flexDirection:"row",alignItems:"center",gap:8,border:"none",background:"none",padding:0,cursor:"pointer"},counterLabel:(0,n.A)((0,n.A)({},p.K4.BOLD_XS),{},{color:u.lm.DEFAULT.GRAY_400}),counterBar:{display:"block",width:44,height:3,borderRadius:3,overflow:"hidden",backgroundColor:u.lm.DEFAULT.GRAY_800},counterFill:{display:"block",height:"100%",backgroundColor:u.lm.DEFAULT.GRAY_400},counterFillFull:{backgroundColor:u.lm.DEFAULT.GOLD}};var De=i(51761);const Re=["\ud83c\udfb5","\ud83c\udfb6","\ud83c\udfa7","\ud83c\udfa4","\ud83c\udfb8","\ud83c\udfb9","\ud83e\udd41","\ud83c\udfba","\ud83c\udfb7","\ud83c\udfbb","\ud83e\ude97","\ud83e\ude95","\ud83c\udfbc","\ud83d\udcfb","\ud83d\udcbf","\ud83d\udcc0","\ud83c\udfa8","\ud83d\udd8c\ufe0f","\ud83d\uddbc\ufe0f","\u270f\ufe0f","\ud83d\udd8d\ufe0f","\ud83d\udcd0","\u2702\ufe0f","\ud83e\uddf5","\ud83e\uddf6","\ud83e\udea1","\ud83c\udffa","\ud83e\ude86","\ud83d\udcf7","\ud83d\udcf8","\ud83c\udfac","\ud83c\udfad","\u26bd","\ud83c\udfc0","\ud83c\udfc8","\u26be","\ud83c\udfbe","\ud83c\udfd0","\ud83c\udfd3","\ud83c\udff8","\ud83e\udd4a","\ud83e\udd4b","\u26f3","\ud83c\udff9","\ud83c\udfa3","\ud83e\udd3f","\ud83d\udef9","\ud83d\udefc","\ud83c\udfc2","\ud83c\udfbf","\ud83c\udfc4","\ud83d\udeb4","\ud83e\uddd7","\ud83c\udfcb\ufe0f","\ud83e\uddd8","\ud83c\udfc3","\ud83c\udf3f","\ud83c\udf31","\ud83c\udf33","\ud83c\udf35","\ud83c\udf44","\ud83c\udf38","\ud83c\udf3b","\ud83c\udf41","\ud83c\udf0a","\ud83c\udfd4\ufe0f","\ud83c\udf0b","\ud83c\udfd5\ufe0f","\ud83c\udf19","\u2b50","\u2600\ufe0f","\u2744\ufe0f","\ud83d\udc08","\ud83d\udc15","\ud83d\udc26","\ud83e\udd8a","\ud83e\udd89","\ud83d\udc22","\ud83d\udc1d","\ud83e\udd8b","\ud83d\udc19","\ud83d\udc33","\ud83e\udd9c","\ud83d\udc3e","\u2615","\ud83c\udf75","\ud83c\udf7a","\ud83c\udf77","\ud83e\udd42","\ud83c\udf78","\ud83c\udf55","\ud83c\udf5c","\ud83c\udf63","\ud83c\udf2e","\ud83c\udf69","\ud83c\udf6b","\ud83e\uddc1","\ud83e\udd50","\ud83c\udf53","\ud83e\udd51","\u2708\ufe0f","\ud83d\ude82","\ud83d\ude97","\ud83c\udfcd\ufe0f","\u26f5","\ud83d\ude80","\ud83d\uddfa\ufe0f","\ud83e\udded","\ud83c\udf92","\ud83c\udfd6\ufe0f","\ud83d\uddfc","\ud83c\udfdb\ufe0f","\ud83d\udcbb","\u2328\ufe0f","\ud83d\udda5\ufe0f","\ud83d\udcf1","\ud83d\udd79\ufe0f","\ud83d\udcbe","\ud83d\udd2c","\ud83d\udd2d","\ud83e\uddea","\ud83e\uddec","\u2697\ufe0f","\ud83e\udd16","\ud83d\udef0\ufe0f","\u2699\ufe0f","\ud83d\udd27","\ud83c\udfae","\ud83c\udfb2","\u265f\ufe0f","\ud83c\udccf","\ud83e\udde9","\ud83d\udcda","\ud83d\udcd6","\ud83d\udcdd","\ud83c\udf9f\ufe0f","\ud83c\udf7f","\ud83d\udcfa","\ud83e\udde6","\ud83d\udc5f","\ud83c\udfe1","\ud83c\udf0d","\ud83d\udecf\ufe0f","\ud83e\uddf8","\ud83d\udc8c","\ud83d\udd70\ufe0f","\ud83d\udd2e","\ud83e\ude90","\ud83c\udf82","\ud83c\udf81","\ud83c\udf88","\ud83d\udd6f\ufe0f","\u2764\ufe0f","\ud83d\udcab","\u2728","\u26a1","\ud83c\udf08","\u262e\ufe0f","\u267e\ufe0f","\ud83c\udfaf","\ud83c\udfc6","\ud83d\udc8e","\ud83d\udd25","\ud83d\uddff"],Ce=Re[0],Ie=e=>{let{accent:t,value:i,onChange:o}=e;return(0,z.jsx)("div",{style:Se.grid,children:Re.map(e=>(0,z.jsx)("button",{type:"button",style:(0,n.A)((0,n.A)({},Se.glyph),i===e?{backgroundColor:(0,Q.xM)(t,.14),borderColor:(0,Q.xM)(t,.6)}:{}),onClick:()=>o(e),"aria-label":e,"aria-pressed":i===e,children:(0,z.jsx)("span",{style:Se.glyphText,children:e})},e))})},Se={grid:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(".concat(40,"px, 1fr))"),gap:p.GI.SM,maxHeight:220,overflowY:"auto"},glyph:{aspectRatio:"1",borderRadius:10,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:u.lm.DEFAULT.GRAY_950,border:"1px solid ".concat(u.lm.DEFAULT.GRAY_800),cursor:"pointer",padding:0},glyphText:{fontSize:21,lineHeight:"26px"}},Ue=[{kind:"TRACK",icon:"musical-notes",label:"sections.board.kinds.track"},{kind:"ALBUM",icon:"disc",label:"sections.board.kinds.album"},{kind:"ARTIST",icon:"person",label:"sections.board.kinds.artist"},{kind:"NOTE",icon:"create",label:"sections.board.kinds.note"},{kind:"PHOTO",icon:"image",label:"sections.board.kinds.photo"},{kind:"GIF",icon:"images",label:"sections.board.kinds.gif"},{kind:"TEXT",icon:"chatbox-ellipses",label:"sections.board.kinds.text"},{kind:"INTEREST",icon:"sparkles",label:"sections.board.kinds.interest"}],Fe=["TRACK","ALBUM","ARTIST","NOTE","PHOTO","GIF"],_e=e=>{let{open:t,accent:i,limits:o,onCreate:s,onHandoff:a,onClose:d}=e;const c=(0,r.Zp)(),[p,v]=(0,l.useState)(null),[b,g]=(0,l.useState)(""),[m,A]=(0,l.useState)(Ce),f=()=>
1{v(null),g(""),A(Ce)};(0,l.useEffect)(()=>{t&&f()},[t]);const y=()=>{f(),d()},w=e=>o.allowedKinds.includes(e)?Fe.includes(e)?(y(),void a(e)):void v(e):(y(),void c("/pricing")),j=!!b.trim();return(0,z.jsx)(De.E,{open:t,onClose:y,maxWidth:460,title:p?(0,z.jsxs)("span",{style:Ge.titleRow,children:[(0,z.jsx)("button",{type:"button",style:Ge.back,onClick:f,children:(0,z.jsx)(_.Q,{name:"chevron-back",size:16,color:u.lm.DEFAULT.WHITE})}),(0,h.vE)("TEXT"===p?"sections.board.compose.text":"sections.board.compose.interest")]}):(0,h.vE)("sections.board.add"),children:p?(0,z.jsxs)("div",{style:Ge.compose,children:[(0,z.jsx)("label",{style:Ge.label,children:(0,h.vE)("sections.board.text")}),"TEXT"===p?(0,z.jsx)("textarea",{autoFocus:!0,style:(0,n.A)((0,n.A)({},Ge.input),Ge.textArea),value:b,onChange:e=>g(e.target.value),maxLength:x,placeholder:(0,h.vE)("sections.board.compose.textPlaceholder")}):(0,z.jsx)("input",{style:Ge.input,value:b,onChange:e=>g(e.target.value),maxLength:x,placeholder:(0,h.vE)("sections.board.compose.interestPlaceholder")}),"INTEREST"===p&&(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)("label",{style:Ge.label,children:(0,h.vE)("sections.board.icon")}),(0,z.jsx)(Ie,{accent:i,value:m,onChange:A})]}),(0,z.jsx)("button",{type:"button",style:(0,n.A)((0,n.A)({},Ge.submit),{}
1,{backgroundColor:i,color:(0,Q.bn)(i)},j?{}:Ge.submitDisabled),onClick:()=>{const e=b.trim();e&&p&&(s({kind:p,text:e,glyph:"INTEREST"===p?m:void 0}),y())},disabled:!j,children:(0,h.vE)("sections.board.compose.add")})]}):(0,z.jsx)("div",{style:Ge.grid,children:Ue.map(e=>{let{kind:t,icon:i,label:l}=e;const r=!o.allowedKinds.includes(t);return(0,z.jsxs)("button",{type:"button",style:Ge.kind,onClick:()=>w(t),children:[(0,z.jsxs)("span",{style:Ge.kindIcon,children:[(0,z.jsx)(_.Q,{name:i,size:19,color:r?u.lm.DEFAULT.GRAY_600:u.lm.DEFAULT.WHITE}),r&&(0,z.jsx)("span",{style:Ge.kindLock,children:(0,z.jsx)(_.Q,{name:"lock-closed",size:8,color:u.lm.DEFAULT.GOLD})})]}),(0,z.jsx)("span",{style:(0,n.A)((0,n.A)({},Ge.kindLabel),r?Ge.kindLabelLocked:{}),children:(0,h.vE)(l)})]},t)})})})},Ge={titleRow:{display:"flex",flexDirection:"row",alignItems:"center",gap:p.GI.SM},back:{display:"flex",alignItems:"center",justifyContent:"center",width:26,height:26,borderRadius:26,border:"none",backgroundColor:u.lm.DEFAULT.GRAY_900,cursor:"pointer"},grid:{display:"grid",gridTemplateColumns:"repeat(4, 1fr)",gap:p.GI.MD},kind:{display:"flex",flexDirection:"column",alignItems:"center",gap:p.GI.SM,padding:"12px 4px",borderRadius:12,backgroundColor:u.lm.DEFAULT.GRAY_950,border:"1px solid ".concat(u.lm.DEFAULT.GRAY_800),cursor:"pointer"},kindIcon:{position:"relative",width:34,height:34,borderRadius:34,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:u.lm.DEFAULT.GRAY_900},kindLock:{position:"absolute",right:-2,bottom:-2,width:15,height:15,borderRadius:15,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:u.lm.DEFAULT.GRAY_900},kindLabel:(0,n.A)((0,n.A)({},p.K4.BOLD_SM),{},{color:u.lm.DEFAULT.WHITE,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%"}),kindLabelLocked:{color:u.lm.DEFAULT.GRAY_500},compose:{display:"flex",flexDirection:"column",gap:p.GI.MD},label:(0,n.A)((0,n.A)({},p.K4.BOLD_SM),{},{color:u.lm.DEFAULT.GRAY_400}),input:(0,n.A)((0,n.A)({},p.K4.REGULAR_XM),{},{backgroundColor:u.lm.DEFAULT.GRAY_950,border:"1px solid ".concat(u.lm.DEFAULT.GRAY_800),borderRadius:12,padding:"12px 14px",color:u.lm.DEFAULT.WHITE,outline:"none",boxSizing:"border-box",width:"100%"}),textArea:{minHeight:90,resize:"vertical"},submit:(0,n.A)({height:44,borderRadius:12,border:"none",cursor:"pointer"},p.K4.BOLD_XM),submitDisabled:{opacity:.4,cursor:"default"}};var Me=i(20816),Be=i(91066),ze=i(76918),Oe=i(61630),Ye=i(73749),Ke=i(60405),We=i(34457),He=i(66020);const Qe=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1500;const[t,i]=(0,l.useState)("idle"),o=(0,l.useRef)(0),n=(0,l.useRef)(null);(0,l.useEffect)(()=>()=>{n.current&&clearTimeout(n.current)},[]);return{status:t,track:(0,l.useCallback)(t=>(n.current&&(clearTimeout(n.current),n.current=null),o.current+=1,i("saving"),t.finally(()=>{o.current=Math.max(0,o.current-1),o.current>0||(i("saved"),n.current=setTimeout(()=>i("idle"),e))})),[e])}},Pe=e=>{let{status:t}=e;return"idle"===t?null:(0,z.jsxs)("span",{style:Ne.badge,children:["saving"===t?(0,z.jsx)(He.D,{size:11,notes:1,color:u.lm.DEFAULT.GRAY_300}):(0,z.jsx)(_.Q,{name:"checkmark-circle",color:u.lm.DEFAULT.GREEN_600,size:13}),(0,z.jsx)("span",{style:Ne.text,children:"saving"===t?(0,h.vE)("info.saving.body"):(0,h.vE)("info.saved.body")})]})},Ne={badge:{display:"flex",flexDirection:"row",alignItems:"center",gap:5},text:(0,n.A)((0,n.A)({},p.K4.BOLD_SM),{},{color:u.lm.DEFAULT.GRAY_400})},Xe={tracks:"TRACK",albums:"ALBUM",artists:"ARTIST"},Ve="pending",$e={tracks:Ye.XV,albums:Ke.jt,artists:We.BT},qe={tracks:Ye.Yw,albums:Ke._J,artists:We.Gp},Ze={tracks:"sections.topTracks",albums:"sections.topAlbums",artists:"sections.topArtists"},Je=e=>{let{open:t,kind:i,board:r,publicUserId:s,onClose:a,onChanged:c}=e;const[p]=(0,d.fp)(N.QI),[v,b]=(0,l.useState)(""),[g,m]=(0,l.useState)([]),[x,A]=(0,l.useState)(""),[f,y]=(0,l.useState)({}),[w,j]=(0,l.useState)([]),[k,E]=(0,l.useState)(!0),{status:T,track:L}=Qe(),D=(0,l.useRef)(null);(0,l.useEffect)(()=>{if(!t||!s)return;let e=!1;return b(""),m([]),A(""),E(!0),Promise.all([qe[i]({range:Be.kn,publicUserId:s,byMinutes:p.byMinutes,onlyPrimaryAuthors:!1,page:0}).catch(e=>((0,Oe.Q9)(e),{data:[]})),(0,ze.v$)(s,p.byMinutes,r).catch(e=>((0,Oe.Q9)(e),{data:void 0}))]).then(t=>{var o,n,l;let[r,s]=t;e||(j((null!==(o=null===r||void 0===r?void 0:r.data)&&void 0!==o?o:[]).map(e=>((e,t)=>{var i;return{publicId:e.publicId,primaryText:e.name,secondaryText:e.artists,imageUrl:(null===(i=e.thumbnails)||void 0===i?void 0:i.md)||e.coverUrl||e.imageUrl,kind:t}})(e,i))),y(((e,t)=>{const i=Xe[t],o={};
1return e.forEach(e=>{var t,n;if(e.kind!==i)return;const l=null!==(t=null!==(n=e.track)&&void 0!==n?n:e.album)&&void 0!==t?t:e.artist;null!==l&&void 0!==l&&l.publicId&&(o[l.publicId]=e.publicId)}),o})(null!==(n=null===s||void 0===s||null===(l=s.data)||void 0===l?void 0:l.tiles)&&void 0!==n?n:[],i)))}).finally(()=>{e||E(!1)}),()=>{e=!0}},[t,s,r,i,p.byMinutes]);const R="".concat(i,":").concat(v),C=v.length>0&&x!==R;(0,l.useEffect)(()=>{if(!t)return;if(0===v.length)return m([]),void A("");let e=!1;const o=setTimeout(()=>{$e[i](v,!0).then(t=>{let{data:i}=t;e||(m(i),A(R))}).catch(t=>{e||((0,Oe.Q9)(t),A(R))})},250);return()=>{e=!0,clearTimeout(o)}},[t,R]);const I=0===v.length,S=I?w:g,U=I?k:C;return(0,z.jsxs)(De.E,{open:t,onClose:a,maxWidth:460,height:560,title:(0,h.vE)("sections.board.kinds.".concat(i.slice(0,-1))),titleAccessory:(0,z.jsx)(Pe,{status:T}),bodyStyle:{flex:1,minHeight:0},children:[(0,z.jsxs)("div",{style:tt.inputContainer,children:[(0,z.jsx)("span",{style:tt.searchIcon,children:(0,z.jsx)(_.Q,{name:"search",color:u.lm.DEFAULT.GRAY_400,size:18})}),(0,z.jsx)("input",{ref:D,autoFocus:!0,style:tt.input,placeholder:(0,h.vE)("actions.search.".concat(i,".placeholder")),value:v,onChange:e=>b(e.target.value)}),v.length>0&&(0,z.jsx)("button",{type:"button",style:tt.clearButton,onClick:()=>b(""),"aria-label":(0,h.vE)("actions.close"),children:(0,z.jsx)(_.Q,{name:"close",color:u.lm.DEFAULT.GRAY_400,size:14})})]}),(0,z.jsxs)("div",{style:tt.list,children:[I&&!U&&S.length>0&&(0,z.jsx)("span",{style:tt.sectionLabel,children:(0,h.vE)(Ze[i])}),U?(0,z.jsx)("div",{style:tt.loadingRow,children:(0,z.jsx)(He.D,{size:20,color:u.lm.DEFAULT.GRAY_400})}):0===S.length?(0,z.jsx)("span",{style:tt.emptyText,children:(0,h.vE)("sections.favorites.noResults")}):S.map(e=>(0,z.jsx)(et,{row:e,kind:i,added:!!f[e.publicId],onSelect:()=>(e=>{const t=f[e];if(t!==Ve){if(t)return y(t=>{let{[e]:i}=t;return(0,o.A)(t,[e].map(Me.A))}),void L((0,ze.xI)(t)).then(()=>c()).catch(i=>{y(i=>(0,n.A)((0,n.A)({},i),{},{[e]:t})),(0,Oe.Q9)(i)});y(t=>(0,n.A)((0,n.A)({},t),{},{[e]:Ve})),L((0,ze.Yn)({kind:Xe[i],publicItemId:e},r)).then(t=>{let{data:i}=t;y(t=>t[e]===Ve?(0,n.A)((0,n.A)({},t),{},{[e]:i.tile}):t),c()}).catch(t=>{y(t=>{let{[e]:i}=t;return(0,o.A)(t,[e].map(Me.A))}),(0,Oe.Q9)(t)})}})(e.publicId)},"board-pick-".concat(e.publicId)))]})]})},et=e=>{let{row:t,kind:i,added:o,onSelect:l}=e;return(0,z.jsxs)("div",{style:tt.row,onClick:l,children:[(0,z.jsx)("img",{src:t.imageUrl||("artists"===i?"/images/user-placeholder.png":"/images/placeholder.png"),alt:t.primaryText,style:(0,n.A)((0,n.A)({},tt.rowImage),{},{borderRadius:"artists"===i?44:6}),onError:e=>{let{currentTarget:t}=e;t.src="artists"===i?"/images/user-placeholder.png":"/images/placeholder.png"}}),(0,z.jsxs)("div",{style:tt.rowText,children:[(0,z.jsx)("span",{style:tt.rowTitle,children:t.primaryText}),!!t.secondaryText&&(0,z.jsx)("span",{style:tt.rowSubtitle,children:t.secondaryText})]}),(0,z.jsx)("span",{style:(0,n.A)((0,n.A)({},tt.rowAction),o?tt.rowActionAdded:{}),children:(0,z.jsx)(_.Q,{name:o?"checkmark":"add",size:16,color:o?u.lm.DEFAULT.ALMOST_BLACK:u.lm.DEFAULT.WHITE})})]})},tt={inputContainer:{position:"relative",display:"flex",alignItems:"center"},searchIcon:{position:"absolute",left:12,display:"flex",pointerEvents:"none"},input:(0,n.A)((0,n.A)({},p.K4.REGULAR_MD),{},{width:"100%",height:44,borderRadius:12,border:"1px solid ".concat(u.lm.DEFAULT.GRAY_800),backgroundColor:u.lm.DEFAULT.GRAY_950,color:u.lm.DEFAULT.WHITE,padding:"0 40px",outline:"none",boxSizing:"border-box"}),clearButton:{position:"absolute",right:12,display:"flex",border:"none",background:"none",cursor:"pointer",padding:0},list:{display:"flex",flexDirection:"column",gap:p.GI.SM,overflowY:"auto",flex:1,minHeight:0,marginTop:p.GI.MD},sectionLabel:(0,n.A)((0,n.A)({},p.K4.BOLD_SM),{},{color:u.lm.DEFAULT.GRAY_400}),loadingRow:{display:"flex",justifyContent:"center",padding:p.GI.XM},emptyText:(0,n.A)((0,n.A)({},p.K4.REGULAR_SM),{},{color:u.lm.DEFAULT.GRAY_500,textAlign:"center",padding:p.GI.XM}),row:{display:"flex",flexDirection:"row",alignItems:"center",gap:p.GI.MD,cursor:"pointer",minWidth:0},rowImage:{width:44,height:44,objectFit:"cover",flexShrink:0},rowText:{display:"flex",flexDirection:"column",flex:1,minWidth:0},rowTitle:(0,n.A)((0,n.A)({},p.K4.BOLD_MD),{},{color:u.lm.DEFAULT.WHITE,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}),rowSubtitle:(0,n.A)((0,n.A)({},p.K4.REGULAR_SM),{},{color:u.lm.DEFAULT.GRAY_400,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}),rowAction:{width:30,height:30,borderRadius:30,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:u.lm.DEFAULT.GRAY_800,flexShrink:0},rowActionAdded:{backgroundColor:u.lm.DEFAULT.GREEN_600}};var it=i(35850),ot=i(97076);const nt=e=>{let{boards:t,selected:i,canAdd:o,editing:s,onSelect:a,onAdd:d,onReorder:c,onRemove:p,layout:v="row"}=e;const b=(0,r.Zp)(),g=(0,Q.y5)(),[m,x]=(0,l.useState)(null),[A,f]=(0,l.useState)(null),[y,w]=(0,l.useState)(null),j=m?m.map(e=>t.find(t=>t.publicId===e)).filter(e=>!!e):t,k=e=>{A&&e!==A&&x(t=>U(null!==t&&void 0!==t?t:j.map(e=>e.publicId),A,e))},E=()=>{const e=m;f(null),x(null),e&&c(e)},T=s&&(o||t.length>1);return t.length<2&&!T?null:(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(lt,{column:"column"===v,children:[j.map(e=>(0,z.jsx)(rt,{board:e,column:"column"===v,active:e.publicId===i,editing:s,dragging:A===e.publicId,onSelect:a,onRemove:p&&(()=>w(e)),onDragStart:f,onDragEnter:k,onDragEnd:E},e.publicId)),T&&(0,z.jsx)("button",{type:"button",style:(0,n.A)((0,n.A)({},st.add),o?{borderColor:(0,Q.xM)(g,.7)}:{}),onClick:()=>o?d():b("/pricing"),"aria-label":(0,h.vE)("sections.board.addBoard"),children:(0,z.jsx)(_.Q,{name:o?"add":"lock-closed",size:o?16:12,color:o?g:u.lm.DEFAULT.GOLD})})]}),!!p&&(0,z.jsx)(ot.T,{open:!!y,title:(0,h.vE)("sections.board.deleteBoard"),body:(0,h.vE)("sections.board.deleteBoardBody"),confirmLabel:(0,h.vE)("actions.delete"),onConfirm:()=>y&&p(y.publicId),onClose:()=>w(null)})]})},lt=e=>{let{column:t,children:i}=e;return t?(0,z.jsx)("div",{style:st.column,children:i}):(0,z.jsx)(it.o,{children:i})},rt=e=>{let{board:t,column:i=!1,active:o,editing:l,dragging:r,onSelect:s,onRemove:a,onDragStart:d,onDragEnter:c,onDragEnd:p}=e;const v=t.accentColor||Q.pI;return(0,z.jsxs)("div",{draggable:l,onDragStart:e=>{e.dataTransfer.setData("text/plain",t.publicId),e.dataTransfer.effectAllowed="move",d(t.publicId)},onDragEnter:()=>c(t.publicId),onDragOver:e=>e.preventDefault(),onDragEnd:p,onClick:()=>!o&&s(t.publicId),role:"tab","aria-selected":o,tabIndex:0,onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),o||s(t.publicId))},style:(0,n.A)((0,n.A)((0,n.A)((0,n.A)((0,n.A)({},st.chip),o?{backgroundColor:(0,Q.xM)(v,.16),borderColor:v}:{}),r?st.chipDragging:{}),i?st.chipColumn:{}),{},{cursor:l?"grab":"pointer"}),children:["PUBLIC"===t.visibility?(0,z.jsx)("span",{style:(0,n.A)((0,n.A)({},st.dot),{},{backgroundColor:v})}):(0,z.jsx)(_.Q,{name:m[t.visibility],size:11,color:v}),(0,z.jsx)("span",{style:(0,n.A)((0,n.A)((0,n.A)({},st.label),i?st.labelColumn:{}),o?st.labelActive:{}),title:t.title||(0,h.vE)("sections.board.untitled"),children:t.title||(0,h.vE)("sections.board.untitled")}),l&&a?(0,z.jsx)("button",{type:"button","data-testid":"board-delete",style:st.deleteButton,onClick:e=>{e.stopPropagation(),a()},"aria-label":(0,h.vE)("sections.board.deleteBoard"),children:(0,z.jsx)(_.Q,{name:"trash-outline",size:13,color:u.lm.DEFAULT.RED_SOFT})}):(0,z.jsx)("span",{style:(0,n.A)((0,n.A)({},st.count),i?st.countColumn:{}),children:t.tiles})]})}
1,st={chip:{display:"flex",flexDirection:"row",alignItems:"center",gap:6,padding:"7px 11px",borderRadius:20,border:"1px solid transparent",backgroundColor:u.lm.DEFAULT.GRAY_900,maxWidth:190,flexShrink:0,boxSizing:"border-box"},chipDragging:{opacity:.4},chipColumn:{maxWidth:"none",padding:"var(--space-3) var(--space-4)",borderRadius:"var(--radius-lg)",gap:"var(--space-3)"},column:{display:"grid",gap:"var(--space-2)"},dot:{display:"block",width:7,height:7,borderRadius:7,flexShrink:0},label:(0,n.A)((0,n.A)({},p.K4.BOLD_SM),{},{flex:1,color:u.lm.DEFAULT.GRAY_400,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}),labelColumn:{font:"var(--type-label)"},countColumn:{font:"var(--type-figure-sm)",color:"var(--text-muted)"},labelActive:{color:u.lm.DEFAULT.WHITE},count:(0,n.A)((0,n.A)({},p.K4.BOLD_XS),{},{color:u.lm.DEFAULT.GRAY_500}),deleteButton:{display:"flex",alignItems:"center",border:"none",background:"none",padding:0,cursor:"pointer",lineHeight:0},add:{width:32,height:32,borderRadius:32,display:"flex",alignItems:"center",justifyContent:"center",borderWidth:1.5,borderStyle:"dashed",borderColor:u.lm.DEFAULT.GRAY_600,backgroundColor:"transparent",cursor:"pointer",flexShrink:0}},at=e=>{let{title:t,accent:i,visibility:o,unlocked:s,onChange:a}=e;const d=(0,r.Zp)(),[c,p]=(0,l.useState)(null!==t&&void 0!==t?t:"");(0,l.useEffect)(()=>{p(null!==t&&void 0!==t?t:"")},[t]);const v=(0,l.useRef)({draft:c,title:t,onChange:a});v.current={draft:c,title:t,onChange:a},(0,l.useEffect)(()=>()=>{const{draft:e,title:t,onChange:i}=v.current,o=e.trim();o!==(null!==t&&void 0!==t?t:"")&&i({title:o})},[]);const b=i||Q.pI,x=()=>d("/pricing");return(0,z.jsxs)("div",{style:dt.container,children:[(0,z.jsxs)("div",{style:dt.titleRow,children:[(0,z.jsx)("input",{"data-testid":"board-title",style:dt.title,value:c,onChange:e=>p(e.target.value),onBlur:()=>{const e=c.trim();e!==(null!==t&&void 0!==t?t:"")&&a({title:e})},onKeyDown:e=>{"Enter"===e.key&&e.currentTarget.blur()},disabled:!s,maxLength:40,placeholder:(0,h.vE)("sections.board.titlePlaceholder")}),!s&&(0,z.jsx)("button",{type:"button",style:dt.lock,onClick:x,children:(0,z.jsx)(_.Q,{name:"lock-closed",size:11,color:u.lm.DEFAULT.GOLD})})]}),(0,z.jsx)("div",{style:dt.swatches,children:Q.b2.map(e=>(0,z.jsx)("button",{type:"button",onClick:()=>(e=>{if(!s)return x();e!==b&&a({accentColor:e})})(e),"aria-label":"Accent ".concat(e),"aria-pressed":e===b,style:(0,n.A)((0,n.A)({},dt.swatch),e===b?{borderColor:e,backgroundColor:(0,Q.xM)(e,.18)}:{}),children:(0,z.jsx)("span",{style:(0,n.A)((0,n.A)({},dt.dot),{},{backgroundColor:e})})},e))}),(0,z.jsx)("div",{style:dt.audience,children:g.map(e=>{const t=e===o;return(0,z.jsxs)("button",{type:"button",style:(0,n.A)((0,n.A)({},dt.audienceOption),t?{borderColor:b,backgroundColor:(0,Q.xM)(b,.16)}:{}),onClick:()=>{if(!s)return x();t||a({visibility:e})},"aria-pressed":t,children:[(0,z.jsx)(_.Q,{name:m[e],size:13,color:t?b:u.lm.DEFAULT.GRAY_400}),(0,z.jsx)("span",{style:(0,n.A)((0,n.A)({},dt.audienceLabel),t?{color:b}:{}),children:(0,h.vE)("sections.board.visibility.".concat(e.toLowerCase()))})]},e)})})]})},dt={container:{display:"flex",flexDirection:"column",gap:p.GI.MD,padding:p.GI.MD,borderRadius:14,backgroundColor:u.lm.DEFAULT.GRAY_950,border:"1px solid ".concat(u.lm.DEFAULT.GRAY_800),boxSizing:"border-box"},titleRow:{display:"flex",flexDirection:"row",alignItems:"center",gap:p.GI.SM},title:(0,n.A)((0,n.A)({},p.K4.BOLD_XM),{},{flex:1,minWidth:0,height:40,padding:"0 12px",borderRadius:10,border:"1px solid ".concat(u.lm.DEFAULT.GRAY_800),backgroundColor:u.lm.DEFAULT.GRAY_900,color:u.lm.DEFAULT.WHITE,outline:"none"}),lock:{width:28,height:28,borderRadius:28,display:"flex",alignItems:"center",justifyContent:"center",border:"none",backgroundColor:u.lm.DEFAULT.GRAY_900,cursor:"pointer",flexShrink:0},swatches:{display:"flex",flexDirection:"row",flexWrap:"wrap",gap:p.GI.SM},swatch:{width:30,height:30,borderRadius:30,display:"flex",alignItems:"center",justifyContent:"center",border:"1px solid transparent",backgroundColor:u.lm.DEFAULT.GRAY_900,cursor:"pointer",padding:0},dot:{display:"block",width:14,height:14,borderRadius:14},audience:{display:"flex",flexDirection:"row",gap:p.GI.SM},audienceOption:{flex:1,display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",gap:6,height:36,borderRadius:10,border:"1px solid ".concat(u.lm.DEFAULT.GRAY_800),backgroundColor:u.lm.DEFAULT.GRAY_900,cursor:"pointer"},audienceLabel:(0,n.A)((0,n.A)({},p.K4.BOLD_SM),{},{color:u.lm.DEFAULT.GRAY_400,whiteSpace:"nowrap"})};var ct=i(74930);const ut=e=>{let{open:t,publicUserId:i,onPick:o,onClose:n}=e;const[r,s]=(0,l.useState)([]),[a,d]=(0,l.useState)(!0),[c,p]=(0,l.useState)(""),v=(0,l.useRef)(0);return(0,l.useEffect)(()=>
1{if(!t||!i)return;const e=++v.current,o=setTimeout(()=>{d(!0),(0,ct.Sz)(c,{author:i}).then(t=>{let{data:i}=t;v.current===e&&s(null!==i&&void 0!==i?i:[])}).catch(e=>(0,Oe.Q9)(e)).finally(()=>{v.current===e&&d(!1)})},c?350:0);return()=>clearTimeout(o)},[t,i,c]),(0,l.useEffect)(()=>{t&&p("")},[t]),(0,z.jsxs)(De.E,{open:t,onClose:n,maxWidth:460,height:560,title:(0,h.vE)("sections.board.pickNote"),bodyStyle:{flex:1,minHeight:0},children:[(0,z.jsxs)("div",{style:ht.searchWrapper,children:[(0,z.jsx)("span",{style:ht.searchIcon,children:(0,z.jsx)(_.Q,{name:"search",size:15,color:u.lm.DEFAULT.GRAY_500})}),(0,z.jsx)("input",{autoFocus:!0,style:ht.search,value:c,onChange:e=>p(e.target.value),placeholder:(0,h.vE)("sections.board.searchNotes")})]}),(0,z.jsx)("div",{style:ht.list,children:a?(0,z.jsx)("div",{style:ht.loader,children:(0,z.jsx)(He.D,{size:20,color:u.lm.DEFAULT.GRAY_600})}):0===r.length?(0,z.jsx)("span",{style:ht.empty,children:(0,h.vE)(c?"sections.board.noNotesFound":"sections.board.noNotes")}):r.map((e,t)=>{var i;return(0,z.jsx)(pt,{note:e,onClick:()=>o(e)},null!==(i=null===e||void 0===e?void 0:e.publicId)&&void 0!==i?i:"board-note-".concat(t))})})]})},pt=e=>{var t,i,o,l,r;let{note:s,onClick:a}=e;const d=null===(t=s.review)||void 0===t?void 0:t.rating,c=(null===(i=s.review)||void 0===i||null===(o=i.album)||void 0===o?void 0:o.name)||(null===(l=s.review)||void 0===l||null===(r=l.track)||void 0===r?void 0:r.name);return(0,z.jsxs)("div",{style:ht.row,onClick:a,children:[s.content?(0,z.jsx)("div",{style:ht.rowText,children:(0,z.jsx)(le.h,{children:s.content})}):(0,z.jsx)("span",{style:(0,n.A)((0,n.A)({},ht.rowText),ht.rowPlaceholder),children:(0,h.vE)("sections.board.noteWithoutText")}),(!!d||!!c)&&(0,z.jsxs)("div",{style:ht.rowFooter,children:[!!d&&(0,z.jsxs)("span",{style:ht.ratingPill,children:[(0,z.jsx)(_.Q,{name:"star",size:9,color:V(d)}),(0,z.jsx)("span",{style:(0,n.A)((0,n.A)({},ht.ratingText),{},{color:V(d)}),children:d.toFixed(1)})]}),!!c&&(0,z.jsx)("span",{style:ht.rowSubject,children:c})]})]})},ht={searchWrapper:{position:"relative",display:"flex",alignItems:"center"},searchIcon:{position:"absolute",left:12,display:"flex",pointerEvents:"none"},search:(0,n.A)((0,n.A)({},p.K4.REGULAR_MD),{},{width:"100%",height:42,borderRadius:12,border:"1px solid ".concat(u.lm.DEFAULT.GRAY_800),backgroundColor:u.lm.DEFAULT.GRAY_950,color:u.lm.DEFAULT.WHITE,padding:"0 14px 0 36px",outline:"none",boxSizing:"border-box"}),list:{display:"flex",flexDirection:"column",gap:p.GI.MD,overflowY:"auto",flex:1,minHeight:0,marginTop:p.GI.MD},loader:{display:"flex",justifyContent:"center",padding:p.GI.XM},empty:(0,n.A)((0,n.A)({},p.K4.REGULAR_SM),{},{color:u.lm.DEFAULT.GRAY_500,textAlign:"center",padding:p.GI.XM}),row:{display:"flex",flexDirection:"column",gap:6,padding:12,borderRadius:12,backgroundColor:u.lm.DEFAULT.GRAY_950,border:"1px solid ".concat(u.lm.DEFAULT.GRAY_800),cursor:"pointer"},rowText:(0,n.A)((0,n.A)({},p.K4.REGULAR_MD),{},{color:u.lm.DEFAULT.WHITE,display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:3,overflow:"hidden",pointerEvents:"none"}),rowPlaceholder:{color:u.lm.DEFAULT.GRAY_500},rowFooter:{display:"flex",flexDirection:"row",alignItems:"center",gap:6,minWidth:0},ratingPill:{display:"flex",flexDirection:"row",alignItems:"center",gap:3,padding:"1px 5px",borderRadius:20,backgroundColor:u.lm.DEFAULT.GRAY_800,flexShrink:0},ratingText:(0,n.A)({},p.K4.BOLD_XS),rowSubject:(0,n.A)((0,n.A)({},p.K4.BOLD_SM),{},{color:u.lm.DEFAULT.GRAY_500,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"})},vt=()=>{const[e,t]=(0,l.useState)(void 0);return{uploading:!!e,pending:e,pickAndUpload:()=>new Promise(e=>{const i=document.createElement("input");i.type="file",i.accept="image/*",i.onchange=async()=>{var o;const n=null===(o=i.files)||void 0===o?void 0:o[0];if(!n)return e(void 0);const l=URL.createObjectURL(n);t(l);const r=new FormData;r.append("file",n);try{const{data:t}=await(0,ze.CY)(r);e(t.publicId)}catch(s){(0,Oe.Q9)(s),e(void 0)}finally{URL.revokeObjectURL(l),t(void 0)}},i.oncancel=()=>e(void 0),i.click()})}},bt=[{key:"showCaption",label:"sections.board.config.caption",hint:"sections.board.config.captionHint",kinds:["TRACK","ALBUM","ARTIST","NOTE"]},{key:"showPreview",label:"sections.board.config.preview",hint:"sections.board.config.previewHint",kinds:["TRACK"]},{key:"showRating",label:"sections.board.config.rating",hint:"sections.board.config.ratingHint",kinds:["TRACK","ALBUM","ARTIST"]},{key:"showStats",label:"sections.board.config.stats",hint:"sections.board.config.statsHint",kinds:["TRACK","ALBUM","ARTIST"]}],gt=e=>"TEXT"===(null===e||void 0===e?void 0:e.kind)||"INTEREST"===(null===e||void 0===e?void 0:e.kind),mt={S:"1\xd71",V:"1\xd72",H:"2\xd71",L:"2\xd72",XL:"3\xd71"},xt=e=>{var t,i;let{open:o,accent:s,tile:a,limits:d,onResize:c,onConfigure:p,onRewrite:g,onRemoveRequest:m,onClose:A}=e;const f=(0,r.Zp)(),{uploading:y,pickAndUpload:w}=vt(),[j,k]=(0,l.useState)("");(0,l.useEffect)(()=>{var e;k(null!==(e=null===a||void 0===a?void 0:a.text)&&void 0!==e?e:"")},[null===a||void 0===a?void 0:a.publicId,null===a||void 0===a?void 0:a.text]);const T=()=>{const e=j.trim();a&&e&&e!==a.text&&g(a,{text:e})},R=()=>{A(),f("/pricing")},I=(e=>e?bt.filter(t=>(!t.kinds||t.kinds.includes(e.kind))&&((e,t)=>{var i;return"autoplay"!==t&&("showPreview"===t?"TRACK"===e.kind:"NOTE"!==e.kind||"showCaption"===t&&!(null===(i=e.note)||void 0===i||!i.cover))})(e,t.key)):[])(a),S=((e,t)=>{const i=b[e],o=C(420),n=o*i.columns+D*(i.columns-1),l=o*i.rows+D*(i.rows-1),r=M
1ath.min(1,t/l);return{width:Math.round(n*r),height:Math.round(l*r)}})(null!==(t=null===a||void 0===a?void 0:a.size)&&void 0!==t?t:"S",210);return(0,z.jsx)(De.E,{open:o&&!!a,onClose:()=>{T(),A()},maxWidth:460,scrollBody:!0,contentStyle:{maxHeight:"85vh"},title:a?(0,h.vE)("sections.board.kinds.".concat(a.kind.toLowerCase())):void 0,children:a&&(0,z.jsx)(Q.Qe,{accent:s,children:(0,z.jsxs)("div",{style:wt.body,children:[(0,z.jsx)("div",{style:(0,n.A)((0,n.A)({},wt.preview),{},{height:210}),children:(0,z.jsx)("div",{style:(0,n.A)((0,n.A)({},wt.previewTile),{},{borderColor:(0,Q.xM)(s,.4),width:S.width,height:S.height}),children:(0,z.jsx)(we,{tile:a,width:S.width,height:S.height})})}),(0,z.jsx)(At,{label:(0,h.vE)("sections.board.size"),children:(0,z.jsx)("div",{style:wt.sizes,children:v.map(e=>(0,z.jsx)(ft,{accent:s,size:e,active:a.size===e,locked:!d.sizesUnlocked&&"S"!==e,onClick:()=>{if(!d.sizesUnlocked&&"S"!==e)return R();c(a,e)}},e))})}),gt(a)&&(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(At,{label:(0,h.vE)("sections.board.text"),children:"TEXT"===a.kind?(0,z.jsx)("textarea",{style:(0,n.A)((0,n.A)({},wt.input),wt.textArea),value:j,onChange:e=>k(e.target.value),onBlur:T,maxLength:x,placeholder:(0,h.vE)("sections.board.compose.textPlaceholder")}):(0,z.jsx)("input",{style:wt.input,value:j,onChange:e=>k(e.target.value),onBlur:T,maxLength:x,placeholder:(0,h.vE)("sections.board.compose.interestPlaceholder")})}),(0,z.jsx)(At,{label:(0,h.vE)("sections.board.background"),children:(0,z.jsxs)("div",{style:wt.backgroundRow,children:[(0,z.jsxs)("button",{type:"button",style:wt.backgroundButton,onClick:async()=>{const e=await w();e&&g(a,{publicAssetId:e})},children:[(0,z.jsx)(_.Q,{name:"image",size:15,color:u.lm.DEFAULT.WHITE}),(0,z.jsx)("span",{style:wt.backgroundText,children:(0,h.vE)(y?"sections.board.uploading":a.media?"sections.board.changeBackground":"sections.board.addBackground")})]}),!!a.media&&(0,z.jsx)("button",{type:"button",style:wt.backgroundClear,onClick:()=>g(a,{removeBackground:!0}),"aria-label":(0,h.vE)("actions.remove"),children:(0,z.jsx)(_.Q,{name:"close",size:15,color:u.lm.DEFAULT.GRAY_400})})]})})]}),"INTEREST"===a.kind&&(0,z.jsx)(At,{label:(0,h.vE)("sections.board.icon"),children:(0,z.jsx)(Ie,{accent:s,value:null!==(i=a.glyph)&&void 0!==i?i:"",onChange:e=>g(a,{glyph:e})})}),I.length>0&&(0,z.jsx)(At,{label:(0,h.vE)("sections.board.config.title"),children:(0,z.jsx)("div",{children:I.map((e,t)=>(0,z.jsx)(yt,{accent:s,label:(0,h.vE)(e.label),hint:(0,h.vE)(e.hint),value:a.config[e.key],locked:!d.configUnlocked,inert:!L(a,e.key),divided:t>0,onChange:t=>{if(!d.configUnlocked)return R();p(a,((e,t,i)=>{const o={[t]:i};if(!i)return o;const l=(0,n.A)((0,n.A)({},e),{},{config:(0,n.A)((0,n.A)({},e.config),o)});return E(l)&&l.config.showRating&&l.config.showStats?"showRating"===t?(0,n.A)((0,n.A)({},o),{},{showStats:!1}):(0,n.A)((0,n.A)({},o),{},{showRating:!1}):o})(a,e.key,t))}},e.key))})}),(0,z.jsxs)("button",{type:"button",style:wt.remove,onClick:()=>{k(""),m(a),A()},children:[(0,z.jsx)(_.Q,{name:"trash-outline",size:14,color:u.lm.DEFAULT.RED}),(0,z.jsx)("span",{style:wt.removeText,children:(0,h.vE)("sections.board.remove")})]})]})})})},At=e=>{let{label:t,children:i}=e;return(0,z.jsxs)("div",{style:wt.section,children:[(0,z.jsx)("span",{style:wt.sectionLabel,children:t}),i]})},ft=e=>{let{accent:t,size:i,active:o,locked:l,onClick:r}=e;const s=b[i];return(0,z.jsxs)("button",{type:"button",onClick:r,style:(0,n.A)((0,n.A)({},wt.sizeOption),o?{backgroundColor:(0,Q.xM)(t,.13),borderColor:(0,Q.xM)(t,.55)}:{}),"aria-pressed":o,children:[(0,z.jsx)("span",{style:wt.sizeGlyph,children:Array.from({length:s.rows}).map((e,i)=>(0,z.jsx)("span",{style:wt.sizeGlyphRow,children:Array.from({length:s.columns}).map((e,i)=>(0,z.jsx)("span",{style:(0,n.A)((0,n.A)({},wt.sizeCell),o?{backgroundColor:t}:{})},i))},i))}),(0,z.jsx)("span",{style:(0,n.A)((0,n.A)({},wt.sizeLabel),o?{color:t}:{}),children:mt[i]}),l&&(0,z.jsx)("span",{style:wt.sizeLock,children:(0,z.jsx)(_.Q,{name:"lock-closed",size:8,color:u.lm.DEFAULT.GOLD})})]})},yt=e=>{let{accent:t,label:i,hint:o,value:l,locked:r,inert:s,divided:a,onChange:d}=e;const c=l&&!s;return(0,z.jsxs)("div",{style:(0,n.A)((0,n.A)((0,n.A)({},wt.configRow),a?wt.configRowDivided:{}),s?wt.configRowInert:{}),children:[(0,z.jsxs)("div",{style:wt.configText,children:[(0,z.jsxs)("div",{style:wt.configLabelRow,children:[(0,z.jsx)("span",{style:wt.configLabel,children:i}),r&&(0,z.jsx)("span",{style:wt.configBadge,children:"PRO"})]}),(0,z.jsx)("span",{style:wt.configHint,children:o})]}),(0,z.jsx)("button",{type:"button",role:"switch","aria-checked":c,"aria-label":i,disabled:r||s,onClick:()=>d(!c),style:(0,n.A)((0,n.A)((0,n.A)({}
1,wt.toggle),c?{backgroundColor:t,borderColor:t}:{}),r||s?wt.toggleDisabled:{}),children:(0,z.jsx)("span",{style:(0,n.A)((0,n.A)({},wt.toggleKnob),{},{transform:c?"translateX(16px)":"translateX(0)"})})})]})},wt={body:{display:"flex",flexDirection:"column",gap:p.GI.XM},preview:{display:"flex",alignItems:"center",justifyContent:"center"},previewTile:{borderRadius:12,overflow:"hidden",borderWidth:1,borderStyle:"solid"},section:{display:"flex",flexDirection:"column",gap:p.GI.SM},sectionLabel:(0,n.A)((0,n.A)({},p.K4.BOLD_SM),{},{color:u.lm.DEFAULT.GRAY_400}),sizes:{display:"flex",flexDirection:"row",gap:p.GI.SM},sizeOption:{position:"relative",flex:1,display:"flex",flexDirection:"column",alignItems:"center",gap:p.GI.SM,padding:"10px 0",borderRadius:12,border:"1px solid ".concat(u.lm.DEFAULT.GRAY_800),backgroundColor:u.lm.DEFAULT.GRAY_950,cursor:"pointer"},sizeGlyph:{height:12,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:2},sizeGlyphRow:{display:"flex",flexDirection:"row",gap:2},sizeCell:{display:"block",width:5,height:5,borderRadius:1,backgroundColor:u.lm.DEFAULT.GRAY_500},sizeLabel:(0,n.A)((0,n.A)({},p.K4.BOLD_SM),{},{color:u.lm.DEFAULT.GRAY_400}),sizeLock:{position:"absolute",top:4,right:4,display:"flex"},input:(0,n.A)((0,n.A)({},p.K4.REGULAR_XM),{},{backgroundColor:u.lm.DEFAULT.GRAY_950,border:"1px solid ".concat(u.lm.DEFAULT.GRAY_800),borderRadius:12,padding:"12px 14px",color:u.lm.DEFAULT.WHITE,outline:"none",boxSizing:"border-box",width:"100%"}),textArea:{minHeight:90,resize:"vertical"},backgroundRow:{display:"flex",flexDirection:"row",alignItems:"center",gap:p.GI.SM},backgroundButton:{flex:1,display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",gap:7,height:44,borderRadius:12,border:"1px solid ".concat(u.lm.DEFAULT.GRAY_800),backgroundColor:u.lm.DEFAULT.GRAY_950,cursor:"pointer"},backgroundText:(0,n.A)((0,n.A)({},p.K4.BOLD_SM),{},{color:u.lm.DEFAULT.WHITE}),backgroundClear:{width:44,height:44,borderRadius:12,display:"flex",alignItems:"center",justifyContent:"center",border:"1px solid ".concat(u.lm.DEFAULT.GRAY_800),backgroundColor:u.lm.DEFAULT.GRAY_950,cursor:"pointer"},configRow:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:p.GI.MD,padding:"12px 0"},configRowDivided:{borderTop:"1px solid ".concat(u.lm.DEFAULT.GRAY_900)},configRowInert:{opacity:.45},configText:{display:"flex",flexDirection:"column",gap:2,minWidth:0},configLabelRow:{display:"flex",flexDirection:"row",alignItems:"center",gap:6},configLabel:(0,n.A)((0,n.A)({},p.K4.BOLD_SM),{},{color:u.lm.DEFAULT.WHITE}),configBadge:(0,n.A)((0,n.A)({},p.K4.BOLD_XS),{},{color:u.lm.DEFAULT.GOLD}),configHint:(0,n.A)((0,n.A)({},p.K4.REGULAR_XS),{},{color:u.lm.DEFAULT.GRAY_500}),toggle:{position:"relative",width:40,height:24,flexShrink:0,borderRadius:24,border:"1px solid ".concat(u.lm.DEFAULT.GRAY_700),backgroundColor:u.lm.DEFAULT.GRAY_800,cursor:"pointer",padding:2,transition:"background-color 140ms ease"},toggleDisabled:{cursor:"default"},toggleKnob:{display:"block",width:18,height:18,borderRadius:18,backgroundColor:u.lm.DEFAULT.WHITE,transition:"transform 140ms ease"},remove:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",gap:7,height:42,borderRadius:12,border:"1px solid ".concat(u.lm.DEFAULT.GRAY_800),backgroundColor:"transparent",cursor:"pointer"},removeText:(0,n.A)((0,n.A)({},p.K4.BOLD_SM),{},{color:u.lm.DEFAULT.RED})},jt={TRACK:"tracks",ALBUM:"albums",ARTIST:"artists"},kt=e=>(0,z.jsx)(Q.Qe,{accent:e.accentColor,children:(0,z.jsx)(Et,(0,n.A)({},e))}),Et=e=>{let{tiles:t,limits:i,title:o,accentColor:s,visibility:a,isSelfViewing:d,publicUserId:u,onResize:p,onConfigure:v,onRemove:b,onRewrite:g,onCreate:m,onTheme:x,onReorder:A,onRefresh:f,boards:y,selectedBoard:w,onSelectBoard:j,onAddBoard:k,onRemoveBoard:E,onReorderBoards:T,editing:L,onEditing:D,pending:R,showSwitcher:C=!0}=e;const I=(0,r.Zp)(),S=(0,Q.y5)(),{ref:B,cell:O}=F(),[Y,W]=(0,l.useState)(void 0),[H,P]=(0,l.useState)(void 0),[N,X]=(0,l.useState)(!1),[V,$]=(0,l.useState)(null),[q,Z]=(0,l.useState)(!1),[J,ee]=(0,l.useState)(!1),[te,ie]=(0,l.useState)(null),[oe,ne]=(0,l.useState)(null),{uploading:le,pickAndUpload:re}=vt(),se=y.find(e=>e.publicId===w),ae=((e,t)=>{if(!t)return e;const i=new Map(e.map(e=>[e.publicId,e])),o=t.map(e=>i.get(e)).filter(e=>!!e),n=new Set(t);return[...o,...e.filter(e=>!n.has(e.publicId))]})(t,te),de=t.length>=i.maxTiles,ce=e=>{ie(ae.map(e=>e.publicId)),ne(e)},ue=e=>{oe&&e!==oe&&ie(t=>U(null!==t&&void 0!==t?t:ae.map(e=>e.publicId),oe,e))},pe=()=>{const e=te;ne(null),ie(null),e&&A(e)},he=()=>{if(de)return I("/pricing");X(!0)},ve=e=>{if(e.locked)return I("/pricing");if(L&&d)return W(e);const t=(e=>{switch(e.kind){case"TRACK":return e.track?"/tracks/".concat(e.track.publicId):void 0;case"ALBUM":return e.album?"/albums/".concat(e.album.publicId):void 0;case"ARTIST":return e.artist?"/artists/".concat(e.artist.publicId):void 0;case"NOTE":return e.note?"/notes/".concat(e.note.publicId):void 0;default:return}})(e);t&&I(t)};return(0,z.jsxs)("div",{style:Tt.wrapper,children:[(0,z.jsxs)("div",{style:Tt.header,children:[(0,z.jsxs)("div",{style:Tt.headerLeft,children:[(0,z.jsx)(_.Q,{name:"grid",size:15,color:S}),(0,z.jsx)("span",{style:Tt.title,children:o||(0,h.vE)("sections.favorites.title")})]}),d&&(0,z.jsxs)("div",{style:Tt.headerRight,children:[!i.sizesUnlocked&&(0,z.jsx)(Te,{used:t.length,limit:i.maxTiles,onClick:()=>I("/pricing")}),(0,z.jsx)("button",{type:"button",className:"".concat(M.A.button," ").concat(M.A.small),onClick:he,"aria-label":(0,h.vE)("sections.board.compose.add"),children:(0,z.jsx)(_.Q,{name:"add",size:18,color:"currentColor"})}),(0,z.jsx)("button",{type:"button",className:"".concat(M.A.button," ").concat(M.A.small),style:L?{backgroundColor:S,borderColor:S}:void 0,onClick:()=>D(!L),"aria-label":(0,h.vE)("sections.board.edit"),"aria-pressed":L,children:(0,z.jsx)(_.Q,{name:L?"checkmark":"pencil",size:L?16:13,color:L?(0,Q.bn
1)(S):"currentColor"})})]})]}),C&&(0,z.jsx)(nt,{boards:y,selected:w,canAdd:i.themeUnlocked&&y.length<i.maxBoards,editing:!!L&&!!d,onSelect:j,onAdd:k,onReorder:T,onRemove:y.length>1?E:void 0}),L&&d&&(0,z.jsx)(at,{title:o,accent:s,visibility:a,unlocked:i.themeUnlocked,onChange:x}),R&&(0,z.jsx)(K,{tiles:null===se||void 0===se?void 0:se.tiles}),!R&&(0,z.jsxs)("div",{ref:B,style:(0,n.A)((0,n.A)({},Tt.board),{},{gridAutoRows:O}),children:[ae.map(e=>(0,z.jsx)(ke,{tile:e,cell:O,editing:!!L&&!!d,dragging:oe===e.publicId,onSelect:ve,onDragStart:ce,onDragEnter:ue,onDragEnd:pe},e.publicId)),L&&d&&(0,z.jsx)(Ee,{accent:S,onClick:he})]}),0===t.length&&!L&&!R&&(0,z.jsx)(c.kZ,{icon:"grid-outline",title:(0,h.vE)(d?"sections.board.emptyOwn":"sections.board.empty"),details:(0,h.vE)(d?"sections.board.emptyOwnDetails":"sections.board.emptyDetails")}),(0,z.jsx)(xt,{open:!!Y,accent:S,tile:Y?t.find(e=>e.publicId===Y.publicId):void 0,limits:i,onResize:p,onConfigure:v,onRewrite:g,onRemoveRequest:P,onClose:()=>W(void 0)}),(0,z.jsx)(ot.T,{open:!!H,title:(0,h.vE)("sections.board.remove"),body:(0,h.vE)("sections.board.removeBody"),confirmLabel:(0,h.vE)("actions.remove"),onConfirm:()=>H&&b(H),onClose:()=>P(void 0)}),(0,z.jsx)(_e,{open:N,accent:S,limits:i,onCreate:m,onHandoff:e=>{const t=jt[e];return t?$(t):"NOTE"===e?Z(!0):"GIF"===e?ee(!0):void(async()=>{const e=await re();e&&m({kind:"PHOTO",publicItemId:e})})()},onClose:()=>X(!1)}),!!V&&(0,z.jsx)(Je,{open:!0,kind:V,board:w,publicUserId:u,onChanged:f,onClose:()=>{$(null),f()}}),(0,z.jsx)(ut,{open:q,publicUserId:u,onPick:e=>{m({kind:"NOTE",publicItemId:e.publicId}),Z(!1)},onClose:()=>Z(!1)}),J&&(0,z.jsx)(G.w,{modalOpen:!0,setModalOpen:ee,setAssets:e=>{var t;const i=null!==(t="function"===typeof e?e([]):e)&&void 0!==t?t:[],o=i[i.length-1];null!==o&&void 0!==o&&o.name&&m({kind:"GIF",mediaUrl:o.name})}}),le&&(0,z.jsx)("div",{style:Tt.uploading,children:(0,h.vE)("sections.board.uploading")})]})},Tt={wrapper:{display:"flex",flexDirection:"column",gap:p.GI.MD,position:"relative",width:"100%"},header:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:p.GI.MD},headerLeft:{display:"flex",flexDirection:"row",alignItems:"center",gap:p.GI.SM,minWidth:0},headerRight:{display:"flex",flexDirection:"row",alignItems:"center",gap:p.GI.SM},title:{font:"var(--type-section)",color:"var(--text)",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},board:{display:"grid",width:"100%",maxWidth:R,gridTemplateColumns:"repeat(".concat(3,", 1fr)"),gridAutoFlow:"row dense",gap:D},uploading:(0,n.A)((0,n.A)({},p.K4.BOLD_SM),{},{position:"sticky",bottom:p.GI.MD,alignSelf:"center",padding:"8px 14px",borderRadius:20,backgroundColor:u.lm.DEFAULT.GRAY_900,border:"1px solid ".concat(u.lm.DEFAULT.GRAY_800),color:u.lm.DEFAULT.GRAY_300})};var Lt=i(35588),Dt=i(65313),Rt=i(30013),Ct=i(13084),It=i(78610),St=i(83708);const Ut="UserFavorites_artists__viSQM",Ft="UserFavorites_artist__REt8i",_t="UserFavorites_artistName__7PZYN",Gt=["publicAssetId","removeBackground"],Mt=e=>{let{artists:t}=e;return(0,z.jsx)("ul",{className:Ut,children:t.map(e=>{var t;return(0,z.jsx)("li",{children:(0,z.jsxs)(r.N_,{className:Ft,to:"/artists/".concat(e.publicId),children:[(0,z.jsx)("img",{src:(null===(t=e.thumbnails)||void 0===t?void 0:t.sm)||e.imageUrl||"/images/placeholder.png",alt:"",width:44,height:44,loading:"lazy"}),(0,z.jsx)("span",{className:_t,children:e.name})]})},e.publicId)})})},Bt={position:"fixed",left:"50%",bottom:"var(--space-6)",transform:"translateX(-50%)",padding:"var(--space-2) var(--space-4)",borderRadius:"var(--radius-pill)",backgroundColor:"var(--card)",border:"1px solid var(--line-strong)",zIndex:1200},zt=()=>{var e,t;const{id:i}=(0,r.g)(),[u]=(0,d.fp)(N.QI),p=(0,Ct.HB)(i),[v]=(0,d.fp)(N.Ec),b=(0,Ct.tH)(p,v.jwt),g=(0,s.A)((0,a.A)().breakpoints.up("md")),{status:m,track:x}=Qe(),[f,y]=(0,l.useState)([]),[w,j]=(0,l.useState)(A),[k,T]=(0,l.useState)({}),[L,D]=(0,l.useState)([]),[R,C]=(0,l.useState)(void 0),[U,F]=(0,l.useState)(!0),_=(0,l.useRef)(!1),[G,M]=(0,l.useState)(!1),B=(0,l.useRef)(!1),O=(0,l.useRef)(new Map),[Y,K]=(0,l.useState)(!1),[H,P]=(0,l.useState)(0),X=()=>P(e=>e+1),V=!(null===p||void 0===p||!p.publicId)&&(0,Rt.A)().getKey("publicId")===p.publicId;(0,l.useEffect)(()=>
1{if(null===p||void 0===p||!p.publicId)return;let e=!1;return _.current&&B.current?M(!0):_.current||F(!0),(0,ze.v$)(p.publicId,u.byMinutes,R).then(t=>{var i,o,n;let{data:l}=t;if(e)return;const r={title:null===l||void 0===l?void 0:l.title,accentColor:null===l||void 0===l?void 0:l.accentColor,visibility:null===l||void 0===l?void 0:l.visibility};var s,a;(y(null!==(i=null===l||void 0===l?void 0:l.tiles)&&void 0!==i?i:[]),j(null!==(o=null===l||void 0===l?void 0:l.limits)&&void 0!==o?o:A),D(null!==(n=null===l||void 0===l?void 0:l.boards)&&void 0!==n?n:[]),T(r),F(!1),M(!1),null!==l&&void 0!==l&&l.publicId)&&(O.current.set(l.publicId,{tiles:null!==(s=null===l||void 0===l?void 0:l.tiles)&&void 0!==s?s:[],limits:null!==(a=null===l||void 0===l?void 0:l.limits)&&void 0!==a?a:A,theme:r}),C(l.publicId))}).catch(t=>{(0,Oe.Q9)(t),e||(F(!1),M(!1))}).finally(()=>{e||(_.current=!0,B.current=!1)}),()=>{e=!0}},[null===p||void 0===p?void 0:p.publicId,u.byMinutes,R,H]),(0,l.useEffect)(()=>{if(null===p||void 0===p||!p.publicId||G)return;const e=L.filter(e=>!O.current.has(e.publicId));if(0===e.length)return;let t=!1,i=48;const o=setTimeout(async()=>{for(const r of e){if(t)return;if(!O.current.has(r.publicId))try{var o,n;const{data:e}=await(0,ze.v$)(p.publicId,u.byMinutes,r.publicId);if(t)return;if(null===e||void 0===e||!e.publicId)continue;const l=null!==(o=e.tiles)&&void 0!==o?o:[];O.current.set(e.publicId,{tiles:l,limits:null!==(n=e.limits)&&void 0!==n?n:A,theme:{title:e.title,accentColor:e.accentColor,visibility:e.visibility}});const s=l.flatMap(I).slice(0,i);if(i-=s.length,s.length>0&&await S(s),t)return}catch(l){return}}},600);return()=>{t=!0,clearTimeout(o)}},[null===p||void 0===p?void 0:p.publicId,u.byMinutes,L,G]);const $=e=>{if(e===R)return;R&&O.current.set(R,{tiles:f,limits:w,theme:k});const t=O.current.get(e);if(t)return B.current=!1,y(t.tiles),j(t.limits),T(t.theme),void C(e);B.current=!0;const i=L.find(t=>t.publicId===e);i&&T({title:i.title,accentColor:i.accentColor,visibility:i.visibility}),M(!0),C(e)},q=()=>{x((0,ze.EP)()).then(e=>{let{data:t}=e;return $(t.board)}).catch(e=>{(0,Oe.Q9)(e),X()})},Z=e=>{if(O.current.delete(e),D(t=>t.filter(t=>t.publicId!==e)),e===R){const t=L.find(t=>t.publicId!==e);B.current=!0,M(!0),y([]),C(null===t||void 0===t?void 0:t.publicId)}x((0,ze.$U)(e)).catch(e=>{(0,Oe.Q9)(e),X()})},J=e=>{D(t=>e.map(e=>t.find(t=>t.publicId===e)).filter(e=>!!e)),x((0,ze.bJ)(e)).catch(e=>{(0,Oe.Q9)(e),X()})},ee=w.themeUnlocked&&L.length<w.maxBoards,te=g&&((e,t,i)=>e.length>1||i&&t)(L,ee,Y&&V),ie=V?[]:null!==(e=null===b||void 0===b?void 0:b.artists)&&void 0!==e?e:[];return(0,z.jsxs)(It.u,{user:p,selected:"favorites",children:[(0,z.jsx)(Dt.l1,{title:(null===p||void 0===p?void 0:p.name)||"musicat.user",description:"Discover ".concat((null===p||void 0===p?void 0:p.name)||"user","'s favourite albums, tracks and artists."),image:null===p||void 0===p?void 0:p.avatar}),(0,z.jsx)(St.XR,{main:(0,z.jsxs)(St.TB,{children:[U&&(0,z.jsx)(W,{withActions:V}),!U&&(V||f.length>0||L.length>1)&&(0,z.jsx)(kt,{tiles:f,limits:w,title:k.title,accentColor:k.accentColor,visibility:null!==(t=k.visibility)&&void 0!==t?t:"PUBLIC",isSelfViewing:V,publicUserId:null===p||void 0===p?void 0:p.publicId,onResize:(e,t)=>
1{const i=((e,t)=>{const i=(0,n.A)((0,n.A)({},e),{},{size:t});return E(i)&&i.config.showRating&&i.config.showStats?{showRating:!1}:{}})(e,t),o=Object.keys(i).length?(0,n.A)((0,n.A)({},e.config),i):void 0;y(i=>i.map(i=>i.publicId===e.publicId?(0,n.A)((0,n.A)({},i),{},{size:t},o?{config:o}:{}):i)),x((0,ze.m2)(e.publicId,(0,n.A)({size:t},o?{config:o}:{}))).catch(e=>{(0,Oe.Q9)(e),X()})},onConfigure:(e,t)=>{const i=(0,n.A)((0,n.A)({},e.config),t);y(t=>t.map(t=>t.publicId===e.publicId?(0,n.A)((0,n.A)({},t),{},{config:i}):t)),x((0,ze.m2)(e.publicId,{config:i})).catch(e=>{(0,Oe.Q9)(e),X()})},onRemove:e=>{y(t=>t.filter(t=>t.publicId!==e.publicId)),x((0,ze.xI)(e.publicId)).catch(e=>(0,Oe.Q9)(e)).finally(X)},onRewrite:(e,t)=>{const{publicAssetId:i,removeBackground:l}=t,r=(0,o.A)(t,Gt);y(t=>t.map(t=>t.publicId===e.publicId?(0,n.A)((0,n.A)((0,n.A)({},t),r),l?{media:void 0}:{}):t)),x((0,ze.m2)(e.publicId,t)).catch(e=>{(0,Oe.Q9)(e),X()}).finally(()=>{i&&X()})},onCreate:e=>{x((0,ze.Yn)(e,R)).catch(e=>(0,Oe.Q9)(e)).finally(X)},onTheme:e=>{T(t=>(0,n.A)((0,n.A)({},t),e)),D(t=>t.map(t=>t.publicId===R?(0,n.A)((0,n.A)({},t),e):t)),x((0,ze._y)(e,R)).catch(e=>{(0,Oe.Q9)(e),X()})},onReorder:e=>{y(t=>{const i=new Map(t.map(e=>[e.publicId,e]));return e.map(e=>i.get(e)).filter(e=>!!e)}),x((0,ze.mR)(e,R)).catch(e=>{(0,Oe.Q9)(e),X()})},onRefresh:X,boards:L,showSwitcher:!g,selectedBoard:R,onSelectBoard:$,onAddBoard:q,onRemoveBoard:Z,onReorderBoards:J,editing:Y,onEditing:K,pending:G}),!U&&!!p&&!V&&0===f.length&&L.length<2&&(0,z.jsx)(c.kZ,{icon:"heart-outline",title:(0,h.vE)("info.noFavorites.title"),details:(0,h.vE)("info.noUserFavorites.body")})]}),aside:te||ie.length>0?(0,z.jsxs)(z.Fragment,{children:[te&&(0,z.jsxs)(St.TB,{children:[(0,z.jsx)(Lt._,{text:(0,h.vE)("sections.board.boards")}),(0,z.jsx)(Q.Qe,{accent:k.accentColor,children:(0,z.jsx)(nt,{layout:"column",boards:L,selected:R,canAdd:ee,editing:Y&&V,onSelect:$,onAdd:q,onReorder:J,onRemove:L.length>1?Z:void 0})})]}),ie.length>0&&(0,z.jsxs)(St.TB,{children:[(0,z.jsx)(Lt._,{text:(0,h.vE)("users.sharedArtists")}),(0,z.jsx)(Mt,{artists:ie})]})]}):void 0}),"idle"!==m&&(0,z.jsx)("div",{style:Bt,children:(0,z.jsx)(Pe,{status:m})})]})}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.