1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[98],{32098:function(e,l,t){"use strict";t.d(l,{g:function(){return M},h:function(){return E}});var s=t(52322),i=t(56957),a=t(76138),o=t(72779),n=t.n(o),r=t(70024),d=t(11163),c=t(2784),u=t(18017),m=t(74705),_=t(48184),v=t(53190),x=t(41664),h=t.n(x),w=t(62696),j=t(98850),S=t(10788),g=t(68713),f=t(83655),b=t(57023),N=t(32146),p=t(62134),C=t(83383),y=t(88426),R=t(10994),L=t(57636),k=t(98273),P=t.n(k);let z=e=>{var l,t,i,o,n,u;let{set:m}=e,x=(0,d.useRouter)(),{notEnoughBalance:k}=(0,f.t)(),z=(0,r.b9)(L.Uo),[D,I]=(0,c.useState)(!1),F=(0,r.b9)(v.PP),{followedSets:M}=(0,w.N)(),{user:A}=(0,g.J)(),E=Number(m.id),q=(0,r.b9)(N.DV),{items:B}=(0,S.a)(null!==(o=m.slug)&&void 0!==o?o:"",1),{followSet:H,unfollowSet:O,loading:K}=(0,j.S)(),T=(null==m?void 0:null===(l=m.creators)||void 0===l?void 0:l[0])?(0,b.gA)(null==m?void 0:null===(t=m.creators)||void 0===t?void 0:t[0]):"",V=M.has(m.id),G=(0,c.useMemo)(()=>(0,_.P_)(m.collections),[m]);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:P().row,children:[(0,s.jsx)(a.xRv,{className:P().image,source:B.length>0?B[0].image:null,size:a.bBY.SMALL}),(0,s.jsxs)("div",{className:P().info,children:[(0,s.jsxs)("div",{className:P().titleRow,children:[(0,s.jsxs)("div",{className:P().setName,children:[(0,s.jsx)(h(),{href:"/sets/".concat(m.slug),children:(0,s.jsx)(a.xBc,{id:"set-row-".concat(m.id),text:m.name})}),(0,s.jsx)(R.q,{id:"set-verified-".concat(m.slug),isVerified:!!m.isVerified})]}),(0,s.jsx)("div",{className:P().infoItem,children:"ã» Created by ".concat(m.owned?"you":T)}),m.createdDate!==m.lastModified&&(0,s.jsx)("div",{className:P().infoItem,children:"ã» Last updated ".concat((0,a.T54)(m.lastModified))}),(0,s.jsx)("div",{className:P().infoItem,children:"ã» ".concat((0,a.T54)(m.createdDate))})]}),(0,s.jsx)(p.g,{text:m.description}),(0,s.jsxs)("div",{className:P().metadataRow,children:[(0,s.jsx)(C.B,{id:m.id,className:P().collections,collections:G}),(0,s.jsx)(y.A,{className:P().tags,tags:null!==(n=null==m?void 0:null===(i=m.tags)||void 0===i?void 0:i.map(e=>{let{id:l,value:t}=e;return{value:l,label:t}}))&&void 0!==n?n:[],tagSize:"small",onTagClick:e=>{F(l=>l.includes(e.label)?l:[...l,e.label])}})]})]}),(0,s.jsxs)("div",{className:P().actions,children:[m.isPublic?(0,s.jsxs)("div",{className:P().followers,children:[(0,s.jsx)(a.t0Z,{color:a.Ilk.NeutralGrey800,width:14,height:14}),"".concat(null!==(u=m.followersCount)&&void 0!==u?u:0," ").concat(1===m.followersCount?"Follower":"Followers")]}):(0,s.jsxs)("div",{className:P().privateSetLabel,children:[(0,s.jsx)(a.lM3,{color:a.Ilk.NeutralGrey700,width:14,height:14}),"Private Set"]}),(0,s.jsx)("div",{className:"verticalDivider"}),m.owned?(0,s.jsx)(a.ZPD,{className:P().button,variant:"secondary",size:"small",label:"Edit",onClick:()=>{z(),x.push("/sets/edit/".concat(m.slug))}}):V?(0,s.jsx)(a.zxk,{className:P().button,variant:"secondary",size:"small",label:"Following",disabled:K,onClick:()=>{O(E)}}):(0,s.jsx)(a.zxk,{className:P().button,variant:"primary",size:"small",label:"Follow",leftIcon:a.dtP,disabled:K,onClick:()=>{if(!A){q(!0);return}if(k()){I(!0);return}H(E)}})]})]}),D&&(0,s.jsx)(a.VqE,{layout:"prompt",isOpen:!0,onClose:()=>I(!1),closeOnClickOutside:!0,children:(0,s.jsxs)("div",{className:P().modalContent,children:[(0,s.jsx)(a.zMQ,{color:a.Ilk.PrimaryPurple800,width:60,height:60}),(0,s.jsx)("div",{className:P().message,children:"Only wallets with an ETH balance can follow Sets."})]})})]})},D=()=>(0,s.jsxs)("div",{className:P().row,children:[(0,s.jsx)(a.xRv,{className:n()(P().image,"shimmer"),source:null,size:a.bBY.SMALL}),(0,s.jsxs)("div",{className:P().info,children:[(0,s.jsx)("div",{className:n()(P().titleRow,"shimmer")}),(0,s.jsx)(p.g,{text:"",isLoading:!0}),(0,s.jsx)("div",{className:n()(P().metadataRow,"shimmer")})]}),(0,s.jsxs)("div",{className:P().actions,children:[(0,s.jsx)("div",{className:n()(P().followers,"shimmer")}),(0,s.jsx)("div",{className:"verticalDivider"}),(0,s.jsx)("div",{className:n()(P().shimmerButton,"shimmer")})]})]});var I=t(95890),F=t.n(I);let M=e=>{let{id:l,image:t,name:i}=e;return(0,s.jsxs)("div",{style:{alignItems:"center",gap:"8px",minWidth:"0"},children:[(0,s.jsx)(a.xRv,{style:{width:"24px",height:"24px",overflow:"hidden",borderRadius:"4px"},source:t,size:a.bBY.SMALLEST},l),(0,s.jsx)(a.xBc,{id:"collection-suggestion-".concat(l),text:i})]})},A=[{value:"mostFollowed",label:"Most followed"},{value:"newest",label:"Newest"}],E=()=>{var e;let l=(0,d.useRouter)(),[t,o]=(0,r.KO)(v.aM),[x,h]=(0,r.KO)(v.Dk),[w,j]=(0,r.KO)(v.PP),{sets:S,totalCount:g,loading:f,fetchMore:b}=(0,m.u)({collectionId:t?Number(t.value):void 0}
1),N=(0,i.t3)(b),[p]=(0,u.KD)();(0,c.useEffect)(()=>{v.q6.includes(l.query.sort)&&l.query.sort!==x&&h(String(l.query.sort))},[l.query.sort,x,h]);let C=(0,c.useCallback)(async e=>{let{data:l}=await p({variables:{searchTerm:e}});return(0,_.P_)(null==l?void 0:l.collections).map(e=>{let{id:l,image:t,name:i}=e;return{value:l,label:(0,s.jsx)(M,{id:l,image:t,name:i})}})},[p]),y=f&&0===S.length;return(0,s.jsxs)("div",{className:n()(F().listContainer,{[F().shimmer]:y}),children:[(0,s.jsxs)("div",{className:F().listHeader,children:[(0,s.jsx)("div",{className:F().totals,children:y?"Loading sets...":"".concat((0,a.khM)(null!=g?g:0)," ").concat(1===g?"Set":"Sets")}),(0,s.jsxs)("div",{className:F().viewControls,children:[(0,s.jsx)("div",{className:F().collectionSelector,children:(0,s.jsx)(a.qbS,{id:"set-list-filter-by-collection",placeholder:"Select a collection",loadOptions:C,onChange:e=>{var l;o((null==e?void 0:e.value)?{value:null!==(l=e.value)&&void 0!==l?l:"",label:e.label}:null)},value:t})}),(0,s.jsx)("div",{className:F().orderBy,children:(0,s.jsx)(a.PhF,{id:"set-list-sort-by",options:A,value:null!==(e=A.find(e=>{let{value:l}=e;return l===x}))&&void 0!==e?e:null,onChange:e=>{e&&(h(e.value),l.replace({pathname:l.pathname,query:{...l.query,sort:e.value}}))}})})]})]}),(0,s.jsx)("div",{className:F().appliedFilters,children:w.length>0&&(0,s.jsxs)(s.Fragment,{children:[w.map(e=>(0,s.jsx)(a.Vp9,{label:e,isRemovable:!0,onRemove:()=>j(l=>l.filter(l=>l!==e))},e)),(0,s.jsx)(a.zxk,{variant:"secondary",size:"small",label:"Clear all",onClick:()=>j([])})]})}),(0,s.jsxs)("div",{ref:N,className:F().listContent,children:[y&&Array.from(Array(50),(e,l)=>(0,s.jsx)(D,{},l)),S.map(e=>(0,s.jsx)(z,{set:e},e.id)),(0,s.jsx)(a.TFA,{isLoading:f,size:"small"})]})]})}},74705:function(e,l,t){"use strict";t.d(l,{u:function(){return m}});var s=t(1644),i=t(56957),a=t(70024),o=t(2784),n=t(18017),r=t(53190),d=t(68713),c=t(48184);let u=()=>{let e=(0,a.Dv)(r.Dk),l={mostFollowed:{field:n.lH.FollowersCount,order:n.Sk.Desc},newest:{field:n.lH.CreatedDate,order:n.Sk.Desc}};return l[null!=e?e:"mostFollowed"]},m=e=>{var l,t;let{collectionId:m,first:_,onlySingleCollection:v}=null!=e?e:{},x=(0,i.tm)(),{user:h,userId:w,isLoading:j}=(0,d.J)(),S=(0,a.Dv)(r.PP),g=u(),{data:f,loading:b,networkStatus:N,fetchMore:p}=(0,n.wP)({variables:{userId:w,collectionId:m,tags:S.length>0?S:void 0,sortBy:g,first:_,onlySingleCollection:v},skip:!x||j,notifyOnNetworkStatusChange:!0,fetchPolicy:"cache-and-network"}),{hasNextPage:C=!1}=null!==(l=null==f?void 0:f.sets.pageInfo)&&void 0!==l?l:{},{totalCount:y=0}=null!==(t=null==f?void 0:f.sets)&&void 0!==t?t:{},R=(0,o.useMemo)(()=>(0,c.P_)(null==f?void 0:f.sets).map(e=>({...e,owned:e.creators.some(e=>{let{id:l}=e;return l===(null==h?void 0:h.id)})})),[f,h]),L=b||N===s.I.fetchMore;return{loading:L,totalCount:y,sets:R,fetchMore:()=>{C&&!L&&p({variables:{after:null==f?void 0:f.sets.pageInfo.endCursor}})}}}},95890:function(e){e.exports={listContainer:"SetList_listContainer__egEiH",shimmer:"SetList_shimmer__pA_yN",zeroStateContainer:"SetList_zeroStateContainer__P_IX1 SetList_listContainer__egEiH",listHeader:"SetList_listHeader__2P0HM",appliedFilters:"SetList_appliedFilters__WGrqM",totals:"SetList_totals__GnhFZ headline4",viewControls:"SetList_viewControls__A4s0D",collectionSelector:"SetList_collectionSelector__I5AtK",orderBy:"SetList_orderBy__4Dp2E",listContent:"SetList_listContent__IHS9i",zeroState:"SetList_zeroState__JAyFa",box:"SetList_box__vbpul",text:"SetList_text__l65Xg",title:"SetList_title__YzuWK headline4",message:"SetList_message__nvg9r body2"}},98273:function(e){e.exports={modalContent:"SetRow_modalContent__fxRDj",message:"SetRow_message__9QxIx",row:"SetRow_row__43P7N",image:"SetRow_image__tKWhx",info:"SetRow_info__tA_gt",titleRow:"SetRow_titleRow__C3c4S",setName:"SetRow_setName__E_ZE1 headline5",infoItem:"SetRow_infoItem__k7DEU label1",metadataRow:"SetRow_metadataRow__s0tyC",collections:"SetRow_collections__rd2jP",tags:"SetRow_tags__gN3zd",actions:"SetRow_actions__VCfyu",followers:"SetRow_followers__8CDru label1",privateSetLabel:"SetRow_privateSetLabel__LqC63 label1",button:"SetRow_button__ZbXQQ",shimmerButton:"SetRow_shimmerButton__joSIG"}}}]);
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.