PageSourceSearch

https://www.kits.io/_next/static/chunks/242-24a89967754eefc8.js

js kits.io collected 2026-10-04 22:16:06 UTC 25,232 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[242],{14556:function(e,t,i){"use strict";i.d(t,{PO:function(){return y},H5:function(){return I},lM:function(){return D},G7:function(){return X}});var r=i(52322),o=i(34873),n=i(20862),l=i(2784),a=i(56234),s=i(85346),d=i(78774),c=i(10714),u=i(73291),x=i(41395),p=i(33331),h=i(45438),g=i(99661),v=i(49448),m=i(16841);let j=e=>{let{tracksTabActivation:t}=e,{startDate:i,endDate:r}=t,o=new Date(i).valueOf(),n=new Date(r).valueOf(),l=Date.now();return n<l?{label:"CLOSED",variant:"disabled"}:o>l?{label:"UPCOMING"}:n-864e5<l?{label:"CLOSING SOON",variant:"warning"}:{label:"OPEN",variant:"success"}},f=e=>{let[t,i]=(0,l.useState)(j(e));return(0,l.useEffect)(()=>{let t=setInterval(()=>i(j(e)),1e3);return()=>clearInterval(t)},[e]),t},b=()=>{let{label:e,variant:t}=f((0,h.R)());return(0,r.jsx)(m.q3.Header,{variant:t,children:e})},k=()=>{let e=(0,h.R)(),t=null==e?void 0:e.tracksTabActivation;return(0,r.jsxs)(m.q3.Body,{children:[(0,r.jsx)(m.q3.Text,{variant:"title",children:"DESCRIPTION"}),(0,r.jsx)(m.q3.Text,{variant:"description",dangerouslySetInnerHTML:{__html:(null==t?void 0:t.description)||""}}),(0,r.jsx)(m.q3.Text,{variant:"title",children:"SUBMIT BY"}),(0,r.jsx)(m.q3.Text,{children:(0,s.B)(null==t?void 0:t.endDate).format("MMMM D, YYYY h:mm A")})]})},w=()=>{let e=(0,h.R)(),t=(0,l.useMemo)(()=>{let t=Date.now(),{tracksTabActivation:i}=e,{startDate:r,endDate:o}=i,n=new Date(r).valueOf(),l=new Date(o).valueOf();return n>t?(0,s.B)(n):(0,s.B)(l)},[e]);return(0,r.jsx)(m.q3.Footer,{children:(0,r.jsx)(x.IT,{until:t})})},C=e=>{if(!(null==e?void 0:e.tracksTabActivation))return!1;let{startDate:t,endDate:i}=e.tracksTabActivation;return!!t&&!!i},A=()=>C((0,h.R)())?(0,r.jsxs)(m.q3.CardRoot,{children:[(0,r.jsx)(b,{}),(0,r.jsx)(k,{}),(0,r.jsx)(w,{})]}):null,z=()=>{let e=(0,v.YV)();return e===v.Bq.LIVE_COMPETITION||e===v.Bq.PRE_COMPETITION?null:(0,r.jsx)(m.q3.CardRoot,{children:(0,r.jsxs)(m.q3.Body,{rounded:!0,children:[(0,r.jsx)(m.q3.Text,{variant:"title",children:"SUBMIT YOUR TRACK"}),(0,r.jsx)(m.q3.Text,{variant:"default",children:"Submit your track for approval by the artist for a commercial release."})]})})},T=(0,o.K_)(()=>{let{setShowAuthFlow:e}=(0,n.SX)();return(0,r.jsx)(m.q3.Button,{wide:!0,variant:"primaryInverted",onClick:()=>e(!0),children:"LOG IN TO CONTINUE"})}),I=()=>{let{isConnected:e}=(0,a.aC)(),t=(0,d.xl)(),i=(0,v.YV)(),{isTokenHolder:o,isLoading:n}=(0,g._n)(),s=(0,u.c)(),[x,h]=(0,l.useState)(!1);if(!e)return(0,r.jsx)(T,{});if(i===v.Bq.PRE_COMPETITION)return null;let j=!s&&!o&&!n;return(0,r.jsxs)(m.q3.Root,{children:[j&&(0,r.jsx)(m.q3.Text,{variant:"description",children:"You must hold a token to 
1submit."}),(0,r.jsx)(m.q3.Button,{wide:!0,variant:"primaryInverted",onClick:()=>{p.X.trackClick({button:"Publish Track",location:"Tracks Tab",pack:t.slug}),h(!0)},loading:n,disabled:j,children:"SUBMIT YOUR TRACK"}),(0,r.jsx)(c.t,{isOpen:x,onClose:()=>h(!1),mediaCollectionId:t.id})]})},y=()=>(0,r.jsxs)(m.q3.Root,{children:[(0,r.jsx)(A,{}),(0,r.jsx)(z,{}),(0,r.jsx)(I,{})]});var S=i(5632),R=i(10329),B=i(37519),L=i(71977),$=i.n(L),P=i(49650);let M=(0,o.zo)(o.PJ.K5,{transform:"rotate(90deg)"}),O=e=>{let{trackId:t}=e,{data:i,isLoading:n}=R.z.useTrack({id:t}),a=(0,S.useRouter)(),{trackId:s,...d}=a.query,c=(0,l.useRef)(null);return((0,l.useEffect)(()=>{var e;null===(e=c.current)||void 0===e||e.scrollIntoView({behavior:"smooth",block:"center"})},[]),i)?(0,r.jsxs)(o.xu,{column:!0,gap:"16",alignStretch:!0,ref:c,children:[(0,r.jsx)(o.xu,{children:(0,r.jsx)(o.zx,{prefixIcon:(0,r.jsx)(M,{}),variant:"ghostInverted",onClick:()=>{a.replace({query:{...d}},null,{scroll:!1,shallow:!0})},css:{fontWeight:500,...$().style,strokeWidth:"2px"},children:"BACK TO TRACKS"})}),(0,r.jsx)(P.G,{track:i}),(0,r.jsx)(o.xu,{column:!0,gap:"16",alignStretch:!0,children:(0,r.jsxs)(B.$.Root,{discussionId:i.discussionId,children:[(0,r.jsx)(B.$.CommentList,{}),(0,r.jsx)(B.$.CreateComment,{})]})})]}):(0,r.jsx)(o.xu,{row:!0,alignCenter:!0,justifyCenter:!0,mt:"16",mb:"16",ref:c,children:(0,r.jsx)(o.$j,{})})},D=()=>{let e=(0,v.zi)();return"number"!=typeof e?null:(0,r.jsx)(O,{trackId:e})};var F=i(88054),W=i(39097),q=i.n(W),E=i(18144),H=i(96666),N=i(92847),J=i(12211);let K=e=>{var t,i;let{track:n}=e,{setTrackId:l,handleOpen:s}=(0,J.rK)(),d=E.Hm.useMediaCollection({idOrSlug:n.mediaCollectionId}),{currentWalletAddress:c}=(0,a.aC)(),u=(null==n?void 0:null===(t=n.user)||void 0===t?void 0:t.walletAddress)===c,x=(null===(i=d.data)||void 0===i?void 0:i.requiresTrackPublishApproval)&&!n.isApproved;return n.hasCollection||u?(0,r.jsx)(o.zx,{loading:d.isLoading&&!n.hasCollection,rounded:"full",size:"sm",variant:"outlineDark",onClick:()=>{if(n.hasCollection)return window.open("https://oohlala.xyz/track/arpeggi/".concat(null==n?void 0:n.contractAddress),"_blank");d.isLoading||x||(l(n.id),s())},css:{marginRight:"12px"},disabled:x,children:n.hasCollection?"View Collection":d.isLoading?"Loading...":!d.data.requiresTrackPublishApproval||n.isApproved?"Launch Collection":"Requires Approval"}):null},_=e=>{let{track:t}=e,{shouldDisplayLikeCount:i,handleClick:n,isLoading:l}=(0,v.Dh)(t);return(0,r.jsxs)(m.oM.Like,{children:[i&&t.likeCount," ",(0,r.jsx)(o.hU,{disabled:l,onClick:n,variant:t.likedByUser?"ghostIndigo":"ghostInverted",icon:t.likedByUser?(0,r.jsx)(o.PJ.m9,{}):(0,r.jsx)(o.PJ.F8,{})})]})},Y=e=>{var t;let{track:i}=e,{currentWalletAddress:n,isAdmin:l,user:s}=(0,a.aC)(),d=o.FN.useToast(),c=R.z.useDeleteTrack({id:i.id}),u=R.z.useCreateApprovedTrack({id:i.id}),x=E.Hm.useMediaCollection({idOrSlug:i.mediaCollectionId}),p=n===i.user.walletAddress,h=l||(null==s?void 0:s.id)===(null===(t=x.data)||void 0===t?void 0:t.userId);return(0,r.jsxs)(o.Lt.Root,{dark:!0,children:[(0,r.jsx)(o.Lt.Trigger,{}),(0,r.jsx)(o.Lt.Portal,{children:(0,r.jsxs)(o.Lt.Content,{children:[h&&(0,r.jsx)(o.Lt.Item,{icon:(0,r.jsx)(o.PJ.Jr,{}),onClick:()=>{u.mutate(null,{onSuccess:()=>{d.create({title:"Track approved for publishing.",variant:"success",dismissable:!0})}})},disabled:u.isLoading||i.isApproved,children:i.isApproved?"Approved":"Approve Track"}),p&&(0,r.jsx)(o.Lt.Item,{icon:(0,r.jsx)(o.PJ.rF,{}),onClick:()=>c.mutate(null,{onSuccess:()=>{d.create({title:"Your track was deleted.",variant:"success",dismissable:!0})}}),disabled:c.isLoading,children:"Delete Track"}),(0,r.jsx)(o.Lt.Item,{onClick:()=>{navigator.clipboard.writeText("".concat(window.location.origin,"/tracks/").concat(i.mediaCollectionId,"/").concat(i.id)),d.create({title:"Copied track link!",variant:"success",ttl:5})},children:"Copy link"})]})})]})},G=e=>{let{track:t}=e,{title:i,coverImage:o,user:n}=t,[a,s]=(0,l.useState)(!0),d=(0,F.useFlags)(),c=null==o?void 0:o.url,u=n.displayName||n.walletAddress;return(0,r.jsxs)(m.oM.Header,{children:[(0,r.jsxs)(m.oM.Column,{row:!0,alignCenter:!0,children:[(0,r.jsx)(m.oM.CoverImageWrapper,{children:(0,r.jsx)(m.oM.CoverImage,{loading:a,alt:"track image",unoptimized:!0,src:c,width:56,height:56,onLoadingComplete:()=>s(!1)})}),(0,r.jsxs)(m.oM.Column,{children:[(0,r.jsx)(m.oM.Title,{children:i}),(0,r.jsx)(q(),{href:"/profile/".concat(n.walletAddress),children:(0,r.jsx)(m.oM.Subtitle,{children:u})})]})]}),(0,r.jsxs)(m.oM.Column,{row:!0,gap:"0",height:"fit",children:[d.trackCollectionPublisherModal&&(0,r.jsx)(K,{track:t}),(0,r.jsx)(_,{track:t}),(0,r.jsx)(Y,{track:t})]})]})},U=e=>{let{track:t}=e,{setCurrentlyPlaying:i,toggleIsPlaying:o,isPlaying:n,isCurrentlyPlaying:l}=(0,H.aG)(),a=(0,d.xl)(),{id:s,lossySoundFile:c,soundFile:u}=t,x=(null==c?void 0:c.url)||(null==u?void 0:u.url);return(0,r.jsx)(m.oM.Body,{children:(0,r.jsx)(N.BT,{onClick:()=>
1{if(n&&l(t,H.Ic.TRACK))return o();i({data:t,type:H.Ic.TRACK,mediaCollection:a}),n||o()},url:x,lineId:"track-".concat(s),soundWaveOverlayCSS:{background:"#181818"}})})},V=e=>{var t;let{track:i}=e,{user:n,description:l}=i,a=null===(t=n.profilePicture)||void 0===t?void 0:t.url;return(0,r.jsxs)(m.oM.Footer,{children:[(0,r.jsx)(m.oM.Avatar,{src:a}),(0,r.jsx)(m.oM.Description,{children:(0,r.jsx)(o.ML,{value:(0,o.cm)(l),children:(0,r.jsx)(o.Kf,{})})})]})},X=e=>{let{track:t,showPackLink:i}=e,n=(0,s.B)(t.createdAt).fromNow();return(0,r.jsxs)(m.oM.Root,{children:[(0,r.jsxs)(o.xu,{row:!0,justifyBetween:i,alignCenter:!0,children:[(0,r.jsx)(m.oM.Caption,{children:n}),i&&(0,r.jsx)(m.oM.Caption,{link:!0,as:q(),href:"/packs/".concat(t.mediaCollectionId),children:"View Kit"})]}),(0,r.jsxs)(m.oM.Content,{children:[(0,r.jsx)(G,{track:t}),(0,r.jsx)(U,{track:t}),(0,r.jsx)(V,{track:t})]})]})}},16841:function(e,t,i){"use strict";i.d(t,{q3:function(){return c},Wh:function(){return b},oM:function(){return O}});var r=i(34873),o=i(71977),n=i.n(o);let l=(0,r.zo)("div",{minWidth:0,display:"flex",flexDirection:"column",alignItems:"stretch",gap:"24px"}),a=(0,r.zo)("div",{minWidth:0,display:"flex",flexDirection:"column",alignItems:"stretch"}),s=(0,r.zo)("div",{padding:"16px",borderTopLeftRadius:"8px",borderTopRightRadius:"8px",fontSize:"18px",lineHeight:"18px",textTransform:"uppercase",fontWeight:500,...n().style,variants:{variant:{default:{background:"$whiteA100",color:"$white"},success:{background:"linear-gradient(90deg, #79F9FB 0%, #90FEAD 100%)",color:"$black"},warning:{background:"linear-gradient(90deg, #FFBE5E 0%, #E3CA46 100%)",color:"$black"},disabled:{background:"$whiteA200",color:"$whiteA800"}}},defaultVariants:{variant:"default"}}),d=(0,r.zo)("div",{padding:"16px",background:"$whiteA100",display:"flex",flexDirection:"column",alignItems:"stretch",gap:"8px",variants:{rounded:{true:{borderRadius:"8px"}}}}),c={Root:l,CardRoot:a,Header:s,Body:d,Footer:(0,r.zo)("div",{"& > div":{borderTopLeftRadius:"0",borderTopRightRadius:"0",borderBottomLeftRadius:"8px",borderBottomRightRadius:"8px"}}),Text:(0,r.zo)("div",{fontSize:"14px",lineHeight:"20px",fontWeight:400,color:"$whiteA500",variants:{variant:{description:{marginTop:"-14px",marginBottom:"-14px"},title:{fontWeight:900,color:"$white",...n().style},bigTitle:{fontSize:"18px",color:"$white",fontWeight:500,textAlign:"center",lineHeight:"24px",...n().style},default:{}}}}),Button:(0,r.zo)(r.zx,{fontWeight:500,text:"16",...n().style})};var u=i(73443);let x=(0,r.zo)(r.h2,{paddingTop:"32px",paddingBottom:"64px",minHeight:"40vh",display:"flex",flexDirection:"column",alignItems:"stretch",justifyContent:"center",gap:"32px","@tablet":{gap:"80px",paddingTop:"32px",paddingBottom:"64px",flexDirection:"row",alignItems:"stretch",justifyContent:"space-between"},variants:{center:{true:{justifyContent:"center"}}}}),p=(0,r.zo)("div",{variants:{layout:{one:{flex:1},two:{display:"flex",flexDirection:"column",alignItems:"stretch","@tablet":{flexBasis:"375px",flexShrink:1}}},center:{true:{flexBasis:"600px",alignItems:"center"}},hidden:{true:{display:"none"}}}}),h=(0,r.zo)("div",{marginTop:"32px",text:"20","@tablet":{text:"32"},fontWeight:500,...n().style}),g=(0,r.zo)("div",{text:"16",color:"$whiteA600",marginBottom:"24px","& *":{marginTop:"0"},"& h1, h2, h3, h4, h5":{fontWeight:500,letterSpacing:"-0.03em"},"& p":{color:"$whiteA600",fontWeight:400,text:"16",lineHeight:"24px"},variants:{center:{true:{textAlign:"center"}}}}),v=(0,r.zo)("div",{marginBottom:"24px"}),m=(0,r.zo)("div",{paddingTop:"32px",maxWidth:"700px",width:"100%",margin:"auto"}),j=(0,r.zo)(u.v.Root,{width:"100%",display:"flex",flexDirection:"column",overflow:"visible !important",alignItems:"stretch",gap:"24px"}),f=(0,r.zo)("div",{margin:"0 24px",gap:"16px"}),b={Tracks:m,Root:x,Title:h,Description:g,Activation:v,TrackListInfiniteScroll:j,Spinner:(0,r.zo)(u.v.Spinner),DiscussionContainer:f,Column:p};var k=i(96577),w=i.n(k);let C=(0,r.zo)("div",{}),A=(0,r.zo)("div",{borderColor:"$whiteA100",borderStyle:"solid",borderWidth:"1px",background:"$whiteA050",borderRadius:"12px",padding:"16px",display:"flex",flexDirection:"column",alignItems:"stretch",gap:"16px"}),z=(0,r.zo)("div",{display:"flex",justifyContent:"space-between"}),T=(0,r.zo)(r.xu,{gap:"16px",minWidth:"0"}),I=(0,r.zo)("div",{borderColor:"$whiteA100",borderStyle:"solid",borderWidth:"1px",width:"56px",height:"56px",borderRadius:"8px"}),y=(0,r.zo)(w(),{width:"100%",height:"100%",borderRadius:"9px",transition:"all 500ms ease",variants:{loading:{true:{opacity:0}
1}}}),S=(0,r.zo)("div",{text:"18",fontWeight:400,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",marginBottom:"4px"}),R=(0,r.zo)("div",{text:"16",fontWeight:400,color:"$whiteA600",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}),B=(0,r.zo)("div",{}),L=(0,r.zo)("div",{display:"flex",alignItems:"start",gap:"16px"}),$=(0,r.zo)(r.qE,{width:"32px",height:"32px",margin:"0px 12px",flexShrink:0}),P=(0,r.zo)("div",{color:"$whiteA600"}),M=(0,r.zo)("div",{display:"flex",gap:"4px",alignItems:"center",color:"$whiteA600",text:"14"}),O={Root:C,Caption:(0,r.zo)("div",{marginBottom:"8px",text:"12",fontWeight:500,color:"$whiteA600",variants:{link:{true:{color:"$indigo0500","&:hover":{textDecoration:"underline"}}}}}),Content:A,Header:z,Body:B,Footer:L,Column:T,Description:P,Avatar:$,CoverImage:y,Title:S,Subtitle:R,CoverImageWrapper:I,Like:M}},69123:function(e,t,i){"use strict";i.d(t,{w:function(){return s}});var r=i(52322),o=i(97729),n=i.n(o);let l={title:"Kits",description:"Own your sound.",previewImage:{data:{attributes:{url:"https://kits.io/seo-home.jpg",name:"",hash:"",mime:"",size:300,provider:"",folderPath:""}}},twitterHandle:"@kitsio_"},a=e=>{var t;return e?null===(t=e.data)||void 0===t?void 0:t.attributes.url:l.previewImage.data.attributes.url},s=e=>{let{meta:t}=e,{title:i,previewImage:o,description:s,twitterHandle:d}=t||{},c=a(o);return(0,r.jsxs)(n(),{children:[(0,r.jsx)("title",{children:i||l.title}),(0,r.jsx)("meta",{name:"description",content:s||l.description}),(0,r.jsx)("meta",{name:"twitter:card",content:"summary_large_image"}),(0,r.jsx)("meta",{name:"twitter:creator",content:d||l.twitterHandle}),(0,r.jsx)("meta",{property:"og:url",content:"https://kits.io"}),(0,r.jsx)("meta",{property:"og:title",content:i||l.title}),(0,r.jsx)("meta",{property:"og:description",content:s||l.description}),(0,r.jsx)("meta",{property:"og:image",content:c})]})}},49650:function(e,t,i){"use strict";i.d(t,{G:function(){return eA}});var r=i(52322),o=i(34873),n=i(85346),l=i(3456),a=i(48036),s=i(5632),d=i(2784),c=i(27121),u=i(18144),x=i(10329),p=i(56234),h=i(12211);let g=e=>{var t,i;let{user:r,isAdmin:o}=(0,p.aC)(),n=u.Hm.useMediaCollection({idOrSlug:e.mediaCollectionId}),l=(0,h.rK)(),a=(null===(t=n.data)||void 0===t?void 0:t.requiresTrackPublishApproval)&&!e.isApproved,s=(null==r?void 0:r.id)===e.userId,d=!a&&!e.hasCollection&&s,c=e.hasCollection;return{isApproved:a,isLoading:n.isLoading,showPublishButton:d,showCollectButton:c,onPublishClick:()=>{l.setTrackId(e.id),l.handleOpen()},onCollectClick:()=>window.open("https://oohlala.xyz/track/arpeggi/".concat(null==e?void 0:e.contractAddress),"_blank"),show:null===(i=n.data)||void 0===i?void 0:i.requiresTrackPublishApproval}};var v=i(20862),m=i(50678);let j=e=>{let{setShowAuthFlow:t}=(0,v.SX)(),{isConnected:i}=(0,p.aC)(),{likeCount:r,likedByUser:o,id:n}=e,l=x.z.useCreateTrackLike({trackId:n,options:{onSuccess:()=>{m.E.invalidateQueries(["tracks"])}}}),a=x.z.useDeleteTrackLike({trackId:n,options:{onSuccess:()=>{m.E.invalidateQueries(["tracks"])}}});return{shouldDisplayLikeCount:r>0,isLoading:l.isLoading||a.isLoading,handleClick:()=>i?o?a.mutate():l.mutate():t(!0)}};var f=i(71977),b=i.n(f);let k=(0,o.zo)(o.xv,{...b().style,fontSize:"12px",fontWeight:500,color:"$indigo0600"}),w=(0,o.zo)(o.xv,{...b().style,fontSize:"12px",fontWeight:500,color:"$whiteA500"}),C=(0,o.zo)("div",{padding:"1px",borderRadius:"8px","-webkit-border-radius":"8px","-moz-border-radius":"8px","-ms-border-radius":"8px",backgroundSize:"400% 400%"}),A=(0,o.zo)(C,{backgroundImage:"linear-gradient(to right, #79F9FB, #90FEAD)"}),z=(0,o.zo)(C,{backgroundImage:"linear-gradient(to right, #FFA1E580, #B982FF80)"}),T={...b().style,textTransform:"uppercase",fontSize:"$12",fontWeight:"$medium","-webkit-background-clip":"text","-webkit-text-fill-color":"transparent","& > button":{backgroundColor:"$whiteA050 !important"}},I={ApprovedText:k,RequiresApprovalText:w,PublishButtonContainer:A,CollectButtonContainer:z,PublishButtonText:(0,o.zo)(o.xv,{background:"linear-gradient(90deg, #79F9FB 0%, #90FEAD 100%)",...T}),CollectButtonText:(0,o.zo)(o.xv,{background:"linear-gradient(62.88deg, #FFA2E5 -11.49%, #B982FF 103.55%)",...T}),Button:(0,o.zo)(o.zx,{background:"#181818 !important"})},y=(0,o.F4)({"0%":{opacity:0,transform:"scale(0.9)"},"100%":{opacity:1,transform:"scale(1)"}}),S=(0,o.zo)("div",{animation:"".concat(y," 500ms cubic-bezier(0.16, 1, 0.3, 1)"),position:"relative"}),R=(0,o.zo)("div",{background:"$whiteA050",borderTopLeftRadius:"12px",borderTopRightRadius:"12px",padding:"16px",paddingBottom:"8px"}),B=(0,o.zo)(o.xu,{display:"flex",flexDirection:"row",justifyContent:"space-between",marginBottom:"8px",alignItems:"start",flexWrap:"wrap"}),L=(0,o.zo)("div",{background:"$whiteA050",padding:"8px 16px"}),$=(0,o.zo)("div",{background:"$whiteA050",borderBottomLeftRadius:"12px",borderBottomRightRadius:"12px"}),P=(0,o.zo)("div",{display:"flex",alignItems:"center",padding:"8px 16px",paddingTop:0,gap:"8px",justifyContent:"space-between"}),M=(0,o.zo)("button",{transition:"all 100ms ease",fontFamily:"inherit",outline:"none",border:"none",background:"transparent",curs
1or:"pointer",display:"flex",alignItems:"center",fontSize:"12px",lineHeight:"16px",color:"$whiteA600",padding:"6px 8px",borderRadius:"4px",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis","&:hover":{color:"$white",background:"$whiteA050"},gap:"4px",variants:{active:{true:{color:"$indigo0500","&:hover":{color:"$indigo400"}}}}}),O=(0,o.zo)("span",{}),D=(0,o.zo)("svg",{width:"16px",height:"16px",flexShrink:0}),F=(0,o.zo)("span",{fontWeight:500,color:"$white",lineHeight:"14px",borderRadius:"999px",background:"$whiteA100",padding:"1px 6px"}),W=((0,o.zo)("div",{}),(0,o.zo)("div",{minWidth:0,marginBottom:"0",variants:{variant:{title:{fontSize:"18px",lineHeight:"24px",fontWeight:900,color:"$white",marginBottom:"8px",...b().style},subtitle:{fontSize:"14px",lineHeight:"20px",fontWeight:500,color:"$whiteA600"},cap:{fontSize:"12px",lineHeight:"16px",color:"$whiteA300",whiteSpace:"nowrap",flexShrink:0},body:{fontSize:"14px",lineHeight:"20px",fontWeight:400,color:"$whiteA600"}},ellipsis:{true:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}}}})),q=(0,o.zo)("div",{minWidth:0,display:"flex",alignItems:"center",gap:"8px",cursor:"pointer"}),E=(0,o.zo)(o.qE,{width:"20px",height:"20px",flexShrink:0,background:"$whiteA100"}),H=((0,o.zo)("button",{outline:"none",borderStyle:"solid",borderWidth:"1px",borderColor:"$white",color:"$white",fontSize:"12px",lineHeight:"20px",fontWeight:500,padding:"12px",boxSizing:"border-box",...b().style}),{Root:S,Header:R,HeaderTop:B,Body:L,Footer:$,Actions:P,Action:M,Text:W,Artist:q,Avatar:E,ActionLabel:O,ActionIcon:D,ActionBadge:F});var N=i(96577),J=i.n(N),K=i(92847);let _=(0,o.zo)("div",{borderRadius:"8px",overflow:"hidden",position:"relative",background:"$whiteA050"}),Y=(0,o.zo)("div",{position:"absolute",top:0,left:0,right:0,bottom:0}),G=(0,o.zo)(J(),{filter:"blur(48px) brightness(0.8)",position:"absolute",top:0,left:0,right:0,bottom:0,objectFit:"cover",objectPosition:"center",transition:"all 1000ms ease",borderRadius:"inherit",variants:{loading:{true:{opacity:0}}}}),U=(0,o.zo)("div",{position:"relative",zIndex:1,display:"flex",alignItems:"center",gap:"8px",padding:"10px"}),V=(0,o.zo)(J(),{flexShrink:0,width:"64px",height:"64px",borderRadius:"4px",objectFit:"cover",objectPosition:"center",transition:"all 1000ms ease",variants:{loading:{true:{opacity:0}}}}),X=(0,o.zo)(K.BT,{flex:1}),Q=e=>{var t;let i=(0,s.useRouter)().query.slug,r=null===(t=window)||void 0===t?void 0:t.location.origin;return"".concat(r,"/packs/").concat(i,"/?tab=tracks&trackId=").concat(e.id)},Z=(0,o.zo)(o.PJ.fG,{transform:"rotate(90deg)"}),ee=e=>{let{track:t}=e,{likeCount:i,likedByUser:n}=t,{shouldDisplayLikeCount:l,isLoading:a,handleClick:s}=j(t),d=a?o.$j:n?o.PJ.m9:o.PJ.F8;return(0,r.jsxs)(H.Action,{disabled:a,active:n,onClick:s,children:[(0,r.jsx)(H.ActionIcon,{as:d}),(0,r.jsx)(H.ActionLabel,{children:"Like"}),l&&(0,r.jsx)(H.ActionBadge,{children:i})]})},et=e=>{var t;let{track:i}=e,n=Q(i),l=(0,s.useRouter)(),{discussionId:a}=i,{data:d}=c.B.useDiscussionComments({discussionId:a,params:{perPage:0}}),u=(null==d?void 0:null===(t=d.pages[0])||void 0===t?void 0:t.meta.total)||0;return(0,r.jsxs)(H.Action,{onClick:()=>l.push(n,null,{shallow:!0}),children:[(0,r.jsx)(H.ActionIcon,{as:o.PJ.sv}),(0,r.jsx)(H.ActionLabel,{children:"Comments"}),u>0&&(0,r.jsx)(H.ActionBadge,{children:u})]})},ei=e=>{var t;return null===(t=window)||void 0===t?void 0:t.navigator.clipboard.writeText(e)},er=e=>{let{track:t}=e,i=Q(t),[n,l]=(0,d.useState)(!1);return(0,r.jsxs)(H.Action,{onClick:()=>{ei(i),l(!0),setTimeout(()=>{l&&l(!1)},4e3)},active:n,children:[(0,r.jsx)(H.ActionIcon,{as:n?o.PJ.Jr:o.PJ.CK}),(0,r.jsx)(H.ActionLabel,{children:"Copy link"})]})},eo=e=>{var t;let{track:i}=e,{isAdmin:n,user:l}=(0,p.aC)(),a=o.FN.useToast(),s=x.z.useDeleteTrack({id:i.id}),d=x.z.useCreateApprovedTrack({id:i.id}),c=u.Hm.useMediaCollection({idOrSlug:i.mediaCollectionId});if(c.isLoading)return null;let h=(null==l?void 0:l.id)===i.userId,g=c.data.userId===(null==l?void 0:l.id),v=h||g||n,m=(null===(t=c.data)||void 0===t?void 0:t.requiresTrackPublishApproval)&&!i.isApproved;return h||n?(0,r.jsxs)(o.Lt.Root,{dark:!0,children:[(0,r.jsx)(o.Lt.Trigger,{children:(0,r.jsx)(H.Action,{children:(0,r.jsx)(H.ActionIcon,{as:Z})})}),(0,r.jsx)(o.Lt.Portal,{children:(0,r.jsxs)(o.Lt.Content,{children:[v&&(0,r.jsx)(o.Lt.Item,{icon:(0,r.jsx)(o.PJ.rF,{}),onClick:()=>s.mutate(null,{onSuccess:()=>{a.create({title:"Your track was deleted.",variant:"success",dismissable:!0})}}),disabled:s.isLoading,children:"Delete Track"}),g&&(0,r.jsx)(o.Lt.Item,{icon:(0,r.jsx)(o.PJ.Jr,{}),onClick:i.isApproved?null:()=>{d.mutate(null,{onSuccess:()=>{a.create({title:"Track approved for publishing.",variant:"success",dismissable:!0})}})},disabled:s.isLoading||i.isApproved,children:m?"Approve Track":"Approved"})]})})]}):null},en=e=>{let{track:t}=e;return(0,r.jsxs)(H.Actions,{children:[(0,r.jsxs)(o.xu,{row:!0,alignCenter:!0,children:[(0,r.jsx)(ee,{track:t}),(0,r.jsx)(et,{track:t}),(0,r.jsx)(er,{track:t})]}),(0,r.jsx)(o.xu,{row:!0,alignCenter:!0,children:(0,r.jsx)(eo,{track:t})})]})},{ApprovedText:el,RequiresApprovalText:ea,PublishButtonContainer:es,CollectButtonContainer:ed,PublishButtonText:ec,CollectButtonText:eu}=I,ex=e=>{let{onClick:t}=e;return(0,r.jsx)(es,{children:(0,r.jsx)(I.Button,{onClick:t,size:"sm",children:(0,r.jsx)(ec,{children:"Launch Collection"})})})}
1,ep=e=>{let{onClick:t}=e;return(0,r.jsx)(ed,{children:(0,r.jsx)(I.Button,{onClick:t,size:"sm",children:(0,r.jsx)(eu,{children:"Collect"})})})},eh=()=>(0,r.jsxs)(o.xu,{row:!0,alignCenter:!0,gap:"8",children:[(0,r.jsx)(o.PJ.kI,{}),(0,r.jsx)(ea,{children:"PENDING ARTIST APPROVAL"})]}),eg=()=>(0,r.jsx)(o.xu,{row:!0,alignCenter:!0,gap:"8",children:(0,r.jsx)(el,{children:"APPROVED"})}),ev=e=>{let{track:t}=e,{isLoading:i,isApproved:o,showPublishButton:n,showCollectButton:l,show:a,onPublishClick:s,onCollectClick:d}=g(t);return i||!a?null:(0,r.jsxs)(r.Fragment,{children:[o&&(0,r.jsx)(eh,{}),!o&&(0,r.jsx)(eg,{}),n&&(0,r.jsx)(ex,{onClick:s}),l&&(0,r.jsx)(ep,{onClick:d})]})};var em=i(78774),ej=i(96666);let ef=e=>{var t;let{track:i}=e,[o,n]=(0,d.useState)(!0),[l,a]=(0,d.useState)(!0),{setCurrentlyPlaying:s,toggleIsPlaying:c,isPlaying:u,isCurrentlyPlaying:x}=(0,ej.aG)(),p=(0,em.xl)(),{id:h,lossySoundFile:g,soundFile:v}=i,m=(null==g?void 0:g.url)||(null==v?void 0:v.url),j=null===(t=i.coverImage)||void 0===t?void 0:t.url;return(0,r.jsxs)(_,{children:[(0,r.jsx)(G,{fill:!0,src:j,alt:"backdrop",onLoadingComplete:()=>a(!1),loading:l}),(0,r.jsx)(Y,{}),(0,r.jsxs)(U,{children:[(0,r.jsx)(V,{width:128,height:128,src:j,alt:"cover art",onLoadingComplete:()=>n(!1),loading:o}),(0,r.jsx)(X,{onClick:()=>{if(u&&x(i,ej.Ic.TRACK))return c();s({data:i,type:ej.Ic.TRACK,mediaCollection:p}),u||c()},url:m,lineId:"track-".concat(h)})]})]})},eb=e=>{var t;let{user:i}=e;return(0,r.jsx)(l.C,{user:i,children:(0,r.jsxs)(H.Artist,{children:[(0,r.jsx)(H.Avatar,{src:null===(t=i.profilePicture)||void 0===t?void 0:t.url}),(0,r.jsx)(H.Text,{variant:"subtitle",ellipsis:!0,children:i.displayName||(0,a.R)(i.walletAddress)})]})})},ek=e=>{let{track:t}=e,{title:i,user:l,description:a}=t,s=(0,n.B)(t.createdAt).fromNow();return(0,r.jsxs)(H.Header,{children:[(0,r.jsxs)(H.HeaderTop,{children:[(0,r.jsx)(H.Text,{variant:"title",ellipsis:!0,children:i}),(0,r.jsx)(ev,{track:t})]}),(0,r.jsxs)(o.xu,{row:!0,alignCenter:!0,gap:"8",mb:"8",children:[(0,r.jsx)(eb,{user:l}),(0,r.jsx)(H.Text,{variant:"cap",children:s})]}),(0,r.jsx)(H.Text,{variant:"body",children:(0,r.jsx)(o.ML,{value:(0,o.cm)(a),children:(0,r.jsx)(o.Kf,{})})})]})},ew=e=>{let{track:t}=e;return(0,r.jsx)(H.Body,{children:(0,r.jsx)(ef,{track:t})})},eC=e=>{let{track:t}=e;return(0,r.jsx)(H.Footer,{children:(0,r.jsx)(en,{track:t})})},eA=e=>{let{track:t}=e;return(0,r.jsxs)(H.Root,{children:[(0,r.jsx)(ek,{track:t}),(0,r.jsx)(ew,{track:t}),(0,r.jsx)(eC,{track:t})]})}},97729:function(e,t,i){e.exports=i(68792)}}]);

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.