1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6823],{16823:function(e,t,r){r.r(t);var i=r(73235),s=r(52322),l=r(10081),a=r(85697),n=r(2784),d=r(71901),c=r(62261),o=r(77165),m=r(37106);function h(){let e=(0,i._)(["\n query getCompetitionDetails($id: Int!, $siteId: Int!, $limit: Int = 10) {\n competition: Competition(id: $id, siteId: $siteId) {\n id\n leaderboard(limit: $limit)\n }\n }\n"]);return h=function(){return e},e}let x=(0,l.gql)(h()),u=e=>{let{children:t,className:r}=e;return(0,s.jsx)("div",{className:"overflow-x-auto overflow-y-hidden rounded-lg border-b border-gray-100",children:(0,s.jsxs)("table",{className:"min-w-full divide-y divide-gray-100",children:[(0,s.jsx)("thead",{style:{backgroundColor:(0,o.Z)("colors.loyalty.gold")},children:(0,s.jsxs)("tr",{children:[(0,s.jsx)("th",{className:"p-4 text-left font-bold text-white sm:text-md",children:"Frequent Foodie"}),(0,s.jsx)("th",{className:"p-4 text-right font-medium text-white sm:text-md",children:"Entries"})]})}),(0,s.jsx)("tbody",{className:(0,c.cn)(r,"divide-y divide-gray-100"),children:t})]})})};function g(e,t){return Math.floor(Math.random()*(t-e+1))+e}t.default=e=>{let{competitionId:t,limit:r}=e,{data:i,loading:l,error:c}=(0,a.aM)(x,{variables:{siteId:Number("2"),id:t,limit:r}}),o=(0,n.useMemo)(()=>Array.from({length:r},()=>({nameWidth:g(40,120),pointsWidth:g(20,60)})),[r]);if(l)return(0,s.jsx)(u,{className:"animate-pulse",children:o.map((e,t)=>(0,s.jsxs)("tr",{className:"",children:[(0,s.jsx)("td",{className:"border-l border-gray-100 px-4 py-3",children:(0,s.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,s.jsx)("div",{className:"size-8 rounded-full bg-gray-300 md:size-9"}),(0,s.jsx)("div",{className:"rounded bg-gray-300",style:{width:"".concat(e.nameWidth,"px"),height:"1rem"}})]})}),(0,s.jsx)("td",{className:"border-r border-gray-100 px-4 py-3 text-right",children:(0,s.jsx)("div",{className:"inline-block rounded bg-gray-300",style:{width:"".concat(e.pointsWidth,"px"),height:"1rem"}})})]},t))});if(c)return(0,s.jsx)(m.q,{error:c});let{leaderboard:h}=i.competition;return(0,s.jsx)(u,{children:h.map(e=>(0,s.jsxs)("tr",{className:"transition-colors hover:bg-gray-50 hover:transition-none",children:[(0,s.jsx)("td",{className:"border-l border-gray-100 px-4 py-3",children:(0,s.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,s.jsx)("div",{className:"relative size-8 md:size-9",children:(0,s.jsxs)("div",{className:"relative size-lg sm:size-[36px]",children:[e.avatarURL&&(0,s.jsx)("img",{src:"".concat(e.avatarURL.replace(/=36/gim,"=100").replace(/36x36/,"100x100")),alt:e.name,width:36,height:36,className:"absolute left-0 top-0 z-10 size-full rounded-full bg-cover",loading:"lazy",crossOrigin:"anonymous",onError:e=>{e.target.className="hidden"}}),(0,s.jsx)(d.Z,{color:"grayscale.300",width:["32px","36px"],height:["32px","36px"],position:"absolute"})]})}),(0,s.jsx)("span",{className:"text-sm font-semibold text-gray-900",children:e.name})]})}),(0,s.jsx)("td",{className:"border-r border-gray-100 px-4 py-3 text-right text-sm text-gray-700",children:e.points.toLocaleString()})]},e.id))})}},71901:function(e,t,r){r.d(t,{Z:function(){return g}});var i,s,l,a=r(52322),n=r(2784),d=r(13980),c=r.n(d),o=r(63356),m=r(68054);function h(){return(h=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)({}).hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e}).apply(null,arguments)}let x=(0,o.ZP)(function(e){return n.createElement("svg",h({width:56,height:56,viewBox:"0 0 56 56",xmlns:"http://www.w3.org/2000/svg"},e),i||(i=n.createElement("circle",{cx:28,cy:28,r:28,fill:"currentColor"})),s||(s=n.createElement("mask",{id:"a",maskUnits:"userSpaceOnUse",x:0,y:0,width:56,height:56},n.createElement("circle",{cx:28,cy:28,r:28,fill:"#fff"}))),l||(l=n.createElement("g",{mask:"url(#a)"},n.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M19.765 63.201c9.882-.996 27.882-14.54 18.176-39.241L42 18.183l-4.941 4.382 3-8.565-5.118 5.777c-2.47-2.79-9.388-7.45-17.294-3.785-4.938 2.862-7.15 8.686-8.394 11.958-.4 1.055-.7 1.845-.959 2.185-.128.168-.317.486-.573.917C5.847 34.203.369 43.41-11.118 44.676c-6.568 0-11.117-4.78-12.882-6.773 2.47 8.433 12.07 25.298 30.706 25.298l.243 1.363v.002c.639 3.572 1.713 9.581 2.227 13.65l2.471-14.417H15l2.294 13.62 2.47-14.218ZM.678 49.79c4.244 2.442 9.11 3.036 13.842 2.546-2.335 1.195-5.37 2.268-9.41 3.281 12.832 3.84 21.53.737 29.208-11.977 0 0-.165.072-.449.188-1.254.482-4.896 1.61-7.863
1-.19-4.374-2.654-5.698-5.918-5.698-5.918-3.8 7.702-13.08 11.546-19.63 12.07Zm25.616-25.233 4.059-5.577c-.706.132-2.153.637-3 1.593s-1.118 3.055-1.059 3.984Zm-8.117 53.46c.14 0 2.176.133 3.176.2l-.882 2.39-2.294-2.59Zm-.53.2L18 82l1.765-1.195-2.118-2.59Zm-2.294 2.589 1.765-2.59.176 3.586-1.941-.996Zm-2.647-2.191L12 80.606l-2.647-1.992h3.353Zm-1.059 2.19-2.294-1.593L9.529 82l2.118-1.195ZM9 79.013V82l-1.765-.598L9 79.012Z",fill:"#fff"}))))}).withConfig({componentId:"sc-9bf361-0"})(["vertical-align:middle;position:relative;",";",";",";",";"],m.$_,m.Dh,m.bf,m.Cb),u=e=>(0,a.jsx)(x,{...e});u.propTypes={color:c().string.isRequired,viewBox:c().string},u.defaultProps={viewBox:"0 0 56 56"},u.displayName="Avatar";var g=u}}]); 2//# sourceMappingURL=6823.a31066ab9910d26e.js.map
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.