"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[397],{1409:function(e,t,s){s.d(t,{h:function(){return a}});var r=s(5893),n=s(7294),o=s(4210);function a(e){var t=e.player,s=e.col,a=e.row,i=(0,n.useState)(!1),c=i[0],l=i[1];return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("button",{onClick:function(){l(!0)},type:"button",className:"-my-1.5 inline-flex items-center rounded-lg border border-mid-grey/40 bg-off-white px-3 pb-1.5 pt-2 text-center text-xs font-medium text-black hover:border-gray-300 hover:bg-soft-grey focus:outline-none focus:ring-gray-100 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-gray-600 dark:border-gray-700 dark:bg-gray-600 dark:text-black dark:hover:bg-gray-700 dark:focus:ring-gray-800",children:[(0,r.jsx)("svg",{className:"mb-0.5 mr-2 h-4 w-4","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 940 1000",children:(0,r.jsx)("path",{d:"M532 90c113.333 0 209.667 40 289 120s119 176.667 119 290-39.667 210-119 290-175.667 120-289 120c-92 0-176-29.333-252-88l70-76c54.667 40 115.333 60 182 60 84 0 156-30 216-90s90-132 90-216c0-85.333-30-158-90-218s-132-90-216-90c-82.667 0-153.667 28.667-213 86s-90.333 127.333-93 210h142L184 694 0 488h124c2.667-110.667 43.667-204.667 123-282S421.333 90 532 90m-36 190h70v204l130 130-50 50-150-150V280"})}),"Undo"]}),(0,r.jsx)(o.T,{player:t,col:s,row:a,isOpen:c,closeModal:function(e){l(!1)}})]})}},1432:function(e,t,s){s.d(t,{N:function(){return a}});var r=s(6042),n=s(9396),o=s(5893);function a(e){return(0,o.jsx)("svg",(0,n.Z)((0,r.Z)({fill:"currentColor",viewBox:"0 0 16 16",height:"1em",width:"1em"},e),{children:(0,o.jsx)("path",{d:"M4 11H2v3h2v-3zm5-4H7v7h2V7zm5-5v12h-2V2h2zm-2-1a1 1 0 00-1 1v12a1 1 0 001 1h2a1 1 0 001-1V2a1 1 0 00-1-1h-2zM6 7a1 1 0 011-1h2a1 1 0 011 1v7a1 1 0 01-1 1H7a1 1 0 01-1-1V7zm-5 4a1 1 0 011-1h2a1 1 0 011 1v3a1 1 0 01-1 1H2a1 1 0 01-1-1v-3z"})}))}},36:function(e,t,s){s.d(t,{r:function(){return a}});var r=s(6042),n=s(9396),o=s(5893);function a(e){return(0,o.jsxs)("svg",(0,n.Z)((0,r.Z)({fill:"currentColor",viewBox:"0 0 16 16",height:"1em",width:"1em"},e),{children:[(0,o.jsx)("path",{d:"M8 15A7 7 0 118 1a7 7 0 010 14zm0 1A8 8 0 108 0a8 8 0 000 16z"}),(0,o.jsx)("path",{d:"M5.255 5.786a.237.237 0 00.241.247h.825c.138 0 .248-.113.266-.25.09-.656.54-1.134 1.342-1.134.686 0 1.314.343 1.314 1.168 0 .635-.374.927-.965 1.371-.673.489-1.206 1.06-1.168 1.987l.003.217a.25.25 0 00.25.246h.811a.25.25 0 00.25-.25v-.105c0-.718.273-.927 1.01-1.486.609-.463 1.244-.977 1.244-2.056 0-1.511-1.276-2.241-2.673-2.241-1.267 0-2.655.59-2.75 2.286zm1.557 5.763c0 .533.425.927 1.01.927.609 0 1.028-.394 1.028-.927 0-.552-.42-.94-1.029-.94-.584 0-1.009.388-1.009.94z"})]}))}},2494:function(e,t,s){s(5893)},5217:function(e,t,s){s.d(t,{v:function(){return h}});var r=s(6042),n=s(5893),o=s(9762),a=s(1927),i=s(4810),c=s(2507),l=s(8271),u=s(7294),d=s(1760),m=(0,u.forwardRef)((function(e,t){return(0,n.jsx)(d.Z,(0,r.Z)({ref:t,easing:{enter:"cubic-bezier(0,0.7,.15,.95)"}},e))})),f=(0,o.Z)({breakpoints:{values:{xs:!1,sm:!1,md:!1,lg:!1,xl:!1}}});function h(e){var t=e.isOpen,s=e.closeModal,r=e.modalTitle,o=e.modalBody,d=e.size,h=void 0===d?"xl":d,p=e.dark,g=void 0!==p&&p,v=(0,u.useRef)(null);return(0,u.useEffect)((function(){if(t){var e=v.current;null!==e&&e.focus()}}),[t]),(0,n.jsx)(a.Z,{theme:f,children:(0,n.jsx)(i.Z,{injectFirst:!0,children:(0,n.jsxs)(c.Z,{open:t,onClose:s,TransitionComponent:m,transitionDuration:{enter:500,exit:200},scroll:"body",fullWidth:!0,componentsProps:{backdrop:{style:{backgroundColor:"rgba(0, 0, 0, 0.25)"}}},"aria-labelledby":"scroll-dialog-title","aria-describedby":"scroll-dialog-description",sx:{"& .MuiDialog-container":{alignItems:"flex-start",margin:"0px",display:"block"}},PaperProps:{className:"max-w-[calc(100%_-_2rem)] overflow-hidden ".concat("md"==h?"sm:max-w-md":"lg"==h?"sm:max-w-lg":"sm:max-w-xl"," w-full m-4 sm:mx-6 md:mx-20"),sx:{margin:"0 auto",borderRadius:"0.75rem",overflowY:"hidden"}},children:[(0,n.jsxs)(l.Z,{id:"scroll-dialog-title",className:"".concat(g&&"dark"," p-4 text-center text-lg font-bold leading-tight"),sx:{fontFamily:"inherit",padding:0},children:[(0,n.jsx)(x,{clickCallback:s}),r]}),(0,n.jsx)("div",{className:"px-4 pb-4",children:o})]})})})}function x(e){var t=e.clickCallback;return(0,n.jsx)("button",{type:"button",className:"absolute right-1.5 -m-1.5 mr-2 rounded-full p-1.5 transition-colors duration-75 hover:bg-mid-grey/30 focus-visible:outline focus-visible:outline-2 focus-visible:outline-orange-400 dark:text-gray-200 dark:hover:bg-white/20",onClick:t,children:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor","aria-hidden":"true",className:"h-6 w-6",children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})}},6525:function(e,t,s){s.d(t,{i:function(){return n}});var r=s(5893);function n(){return(0,r.jsx)("div",{className:"mt-8 h-px sm:mt-12",style:{backgroundImage:"linear-gradient(270deg,hsl(0deg 0% 30% / 0%) 0,hsl(0deg 0% 20% / 17%) 50%,hsla(0,0%,30%,0))"}})}},5835:function(e,t,s){s.d(t,{ZZ:function(){return m}});var r=s(6042),n=s(9396),o=s(828),a=s(5893),i=s(5217),c=(s(1409),s(8918)),l=s(5957),u=(s(9823),s(1992),s(941)),d=s(7294);function m(e){var t=e.showGrids,s=void 0===t?null:t,r=(0,o.Z)((0,l.Z)((function(e){return[e.getLocalGridHistory]})),1)[0],n=(0,o.Z)((0,c.Z)((function(e){return[e.levelNumber]})),1)[0],i=(0,d.useState)(n),m=i[0],h=i[1],x=s||r();return(0,a.jsxs)("div",{className:"w-full space-y-1 text-center",children:[0==x.length&&(0,a.jsxs)("div",{className:"my-1 px-4 py-4 text-left text-sm leading-snug sm:mx-0 sm:px-3 sm:py-2.5",children:[(0,a.jsx)("p",{className:"mb-4",children:"Well done \u2013 you've completed all BikeGrids! \ud83d\udd25"}),(0,a.jsx)("p",{children:"Check back tomorrow for a new grid to play"})]}),x.map((function(e){return(0,a.jsxs)("a",{href:"/".concat(e.dateKey),onClick:function(){return h(e.level)},className:"".concat(e.level===m?"bg-orange-400":"hover:bg-soft-grey"," mx-2 flex select-none items-center justify-between rounded-xl px-3 py-3.5 text-sm leading-snug sm:mx-0 sm:px-3 sm:py-2.5\n            "),children:[(0,a.jsxs)("div",{className:"flex items-center justify-start",children:[(0,a.jsxs)("span",{className:"ml-2.5 font-medium",children:["BikeGrid #",e.level]}),(0,a.jsx)("span",{className:"ml-2 text-xxs text-black",children:"\u2022"}),(0,a.jsx)("span",{className:"ml-2 text-black",children:(0,u.p)(e.date,"MMM do")})]}),(0,a.jsx)("div",{className:"mr-2 flex items-center justify-center",children:(0,a.jsx)("div",{className:"ml-2 flex w-7 items-center justify-center\n                text-black",children:e.level===m&&(0,a.jsx)(f,{className:"-my-1 h-5 w-5 text-black"})})})]},e.level)}))]})}function f(e){return(0,a.jsxs)("svg",(0,n.Z)((0,r.Z)({fill:"none",viewBox:"0 0 24 24",height:"1em",width:"1em"},e),{children:[(0,a.jsx)("path",{fill:"currentColor",d:"M10.243 16.314L6 12.07l1.414-1.414 2.829 2.828 5.656-5.657 1.415 1.415-7.071 7.07z"}),(0,a.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M1 12C1 5.925 5.925 1 12 1s11 4.925 11 11-4.925 11-11 11S1 18.075 1 12zm11 9a9 9 0 110-18 9 9 0 010 18z",clipRule:"evenodd"})]}))}t.ZP=function(e){var t=(0,o.Z)((0,c.Z)((function(e){return[e.isGameHistoryOpen,e.setIsGameHistoryOpen]})),2),s=t[0],r=t[1];return(0,a.jsx)(i.v,{isOpen:s,closeModal:function(){r(!1)},size:"md",modalTitle:(0,a.jsx)("div",{className:"",children:(0,a.jsx)("div",{className:"text-center text-xl font-semibold dark:text-white",children:"Previous Week"})}),modalBody:(0,a.jsx)("div",{className:"pt-2",children:(0,a.jsx)(m,{})})})}},9605:function(e,t,s){s.d(t,{QV:function(){return n}});var r=s(5893);function n(e){var t=e.player,s=e.silhouette?"opacity-80 contrast-0":"";return t.photo_url?(0,r.jsx)("img",{src:t.photo_url,className:"w-full ".concat(s)}):(0,r.jsx)("img",{src:"/img/silhouette.png",className:"w-full ".concat(s)})}},47:function(e,t,s){var r=s(828),n=s(5893),o=s(5217),a=s(1409),i=s(8918),c=s(5957),l=s(2739);function u(){for(var e=function(e){for(var t=function(t){s[e-1][t-1].forEach((function(s){var r=(0,l.i)(s);a.push((0,n.jsx)(d,{col:t,row:e,player:r,correct:!1},"".concat(t,"-").concat(e,"-").concat(r.id)))}));var r=o[e-1][t-1];if(r){var i=(0,l.i)(r);a.push((0,n.jsx)(d,{col:t,row:e,player:i,correct:!0},"".concat(t,"-").concat(e,"-").concat(i.id)))}},r=1;r<=3;r++)t(r)},t=(0,r.Z)((0,c.Z)((function(e){return[e.incorrectGuesses,e.correctGuesses]})),2),s=t[0],o=t[1],a=[],i=1;i<=3;i++)e(i);return(0,n.jsx)("div",{className:"-mx-4 -mb-3",children:(0,n.jsx)("ul",{className:"z-50 border-t border-t-gray-100 px-2 py-2 text-sm text-black dark:bg-gray-700",children:a.length?a:(0,n.jsx)("li",{className:"cursor-default select-none items-center justify-between px-2 py-4 text-center font-medium leading-snug text-black\n            ",children:"No picks made yet today"})})})}function d(e){var t=e.col,s=e.row,o=e.player,i=e.correct,l=(0,r.Z)((0,c.Z)((function(e){return[e.undoUsed]})),1)[0];return(0,n.jsxs)("li",{className:"flex cursor-default select-none items-center justify-between px-2 py-2 font-medium leading-snug\n            ",children:[(0,n.jsxs)("div",{className:"flex items-center justify-start",children:[(0,n.jsx)("div",{className:"mr-3 w-7",children:(0,n.jsx)(m,{col:t,row:s,correct:i})}),(0,n.jsx)("div",{className:"mr-2 aspect-4/3 h-4",children:(0,n.jsx)("img",{src:"/img/flags/".concat(o.country,".svg")})}),(0,n.jsx)("span",{className:"".concat(i?"text-black":"text-red-600 dark:text-red-400"),children:o.name})]}),!l&&(0,n.jsx)(a.h,{player:o,row:s,col:t})]},"".concat(t,"-").concat(s,"-").concat(o.id))}function m(e){for(var t=e.col,s=e.row,r=e.correct,o=[],a=1;a<=3;a++)for(var i=1;i<=3;i++){var c=a!=s||i!=t?"bg-soft-grey group-[.user-row]:bg-orange-50":r?"bg-green-600":"bg-red-600";o.push((0,n.jsx)("div",{className:"aspect-square rounded-sm ".concat(c)},"".concat(t,"-").concat(s,"-").concat(a,"-").concat(i)))}return(0,n.jsx)("div",{className:"grid shrink grid-cols-3 gap-px",children:o})}t.Z=function(e){var t=(0,r.Z)((0,i.Z)((function(e){return[e.isPickHistoryOpen,e.setIsPickHistoryOpen,e.levelNumber]})),3),s=t[0],a=t[1],c=t[2];return(0,n.jsx)(o.v,{isOpen:s,closeModal:function(){a(!1)},modalTitle:(0,n.jsxs)("div",{className:"",children:[(0,n.jsx)("div",{className:"text-center text-2xl font-semibold uppercase dark:text-white",children:"Pick History"}),(0,n.jsxs)("div",{className:"text-center text-sm font-semibold uppercase text-dark-grey dark:text-gray-300",children:["BikeGrid Game ",c]})]}),modalBody:(0,n.jsx)(u,{})})}},4264:function(e,t,s){s.d(t,{_C:function(){return _},F5:function(){return S},j1:function(){return b},ey:function(){return N},cN:function(){return v},ZV:function(){return D}});var r=s(828),n=s(9815),o=s(5893),a=s(7294),i=s(5217),c=(s(1432),s(7857),s(8984)),l=s(8746),u=s(5957),d=s(8918),m=s(6248),f=(s(6525),s(2494),s(2739)),h=s(9605);function x(e){var t=e.selectionStats,s=(0,r.Z)((0,d.Z)((function(e){return[e.user]})),1)[0];return(0,r.Z)((0,u.Z)((function(e){return[e.guessesLeft]}),m.X),1)[0]<=0?(0,o.jsx)("div",{className:"-mx-3 -mb-3",children:(0,o.jsxs)("ul",{className:"z-50 space-y-1 border-t border-t-gray-100 px-2 py-2 text-sm text-black dark:bg-gray-700",children:[t.map((function(e,r){return(r<3||(null===s||void 0===s?void 0:s.subscriber))&&(0,o.jsx)(p,{playerId:e.playerId,count:e.count,pct:e.pct,maxPct:t[0].pct},e.playerId)})),!(null===s||void 0===s?void 0:s.subscriber)&&(0,o.jsx)(o.Fragment,{children:(0,o.jsx)("div",{className:"flex select-none items-center justify-between rounded-xl px-3 py-2.5 text-sm font-normal leading-snug ",children:(0,o.jsx)("div",{className:"flex items-center justify-start",children:(0,o.jsxs)("span",{children:["Become an"," ",(0,o.jsx)("a",{href:"https://escapecollective.com/join/",target:"_blank",className:"font-semibold text-orange-400 hover:underline",children:"Escape Collective member"})," ","and see all ",t.length," possible answers."]})})})})]})}):(0,o.jsx)("div",{className:"z-50 space-y-1 border-t border-t-gray-100 pb-6 pt-8 text-center text-sm text-black dark:bg-gray-700",children:"Play today's grid, then see the possible answers"})}function p(e){var t=e.playerId,s=(e.count,e.pct),r=(e.maxPct,(0,f.i)(t));return(0,o.jsx)("div",{children:(0,o.jsxs)("div",{className:"flex cursor-default select-none items-center justify-between rounded-lg px-3 py-2.5 font-medium leading-snug hover:bg-off-white",children:[(0,o.jsxs)("div",{className:"flex items-center justify-start",children:[(0,o.jsx)("div",{className:"mr-2 aspect-4/3 h-4",children:(0,o.jsx)("img",{src:"/img/flags/".concat(null===r||void 0===r?void 0:r.country,".svg")})}),(0,o.jsx)("span",{children:null===r||void 0===r?void 0:r.name})]}),!isNaN(s)&&(0,o.jsxs)("div",{className:"flex items-center justify-start",children:[(100*s).toFixed(1),"%"]})]})})}var g=function(e){var t=e.isOpen,s=e.closeModal,n=e.selectionStats,a=(0,r.Z)((0,d.Z)((function(e){return[e.user]})),1)[0];return(0,o.jsx)(i.v,{isOpen:t,closeModal:s,modalTitle:(0,o.jsx)("div",{className:"text-center text-xl font-semibold uppercase dark:text-white",children:(null===a||void 0===a?void 0:a.subscriber)?"Possible Answers":"Top Answers"}),modalBody:(0,o.jsx)(x,{selectionStats:n}),size:"md"})};function v(){var e,t=(0,r.Z)((0,d.Z)((function(e){return[e.globalStats]})),1)[0];if(!t)return null;var s=Math.max(t.completed,1),a=t.scoreMap,i=(e=Math).max.apply(e,(0,n.Z)(a));return(0,o.jsxs)("div",{className:"-m-2 rounded-xl bg-white p-4",children:[(0,o.jsxs)("div",{className:"mt-1 flex h-80",children:[(0,o.jsx)(y,{value:a[0],completed:s,mode:i}),(0,o.jsx)(y,{value:a[1],completed:s,mode:i}),(0,o.jsx)(y,{value:a[2],completed:s,mode:i}),(0,o.jsx)(y,{value:a[3],completed:s,mode:i}),(0,o.jsx)(y,{value:a[4],completed:s,mode:i}),(0,o.jsx)(y,{value:a[5],completed:s,mode:i}),(0,o.jsx)(y,{value:a[6],completed:s,mode:i}),(0,o.jsx)(y,{value:a[7],completed:s,mode:i}),(0,o.jsx)(y,{value:a[8],completed:s,mode:i}),(0,o.jsx)(y,{value:a[9],completed:s,mode:i})]}),(0,o.jsxs)("div",{className:"border-gray-150 mt-3 flex border-t pt-2 dark:border-gray-700",children:[(0,o.jsx)(j,{value:0}),(0,o.jsx)(j,{value:1}),(0,o.jsx)(j,{value:2}),(0,o.jsx)(j,{value:3}),(0,o.jsx)(j,{value:4}),(0,o.jsx)(j,{value:5}),(0,o.jsx)(j,{value:6}),(0,o.jsx)(j,{value:7}),(0,o.jsx)(j,{value:8}),(0,o.jsx)(j,{value:9})]}),(0,o.jsxs)("div",{className:"mt-2 flex justify-center text-sm font-semibold uppercase text-gray-700 dark:text-gray-400",children:[" ","Correct Squares"]})]})}function j(e){var t=e.value;return(0,o.jsx)("div",{className:"flex w-[10%] justify-center font-medium text-gray-700 dark:text-gray-200",children:t})}function y(e){var t=e.value,s=e.completed,r=e.mode,n=t/s*100,a=n.toFixed(n<10?1:0),i=(t/r*100).toFixed(2);return(0,o.jsxs)("div",{className:"flex h-full w-[10%] flex-col items-center justify-end",children:[(0,o.jsxs)("span",{className:"mb-1 text-xxs font-medium text-black dark:text-gray-300 sm:text-xs",children:[a,"%"]}),(0,o.jsx)("div",{className:"w-5 transform rounded bg-green-500 transition-all duration-500 ease-out",style:{height:"".concat(i,"%")}})]})}function b(){var e=(0,r.Z)((0,d.Z)((function(e){return[e.grid]})),1)[0];return e&&(0,o.jsx)("div",{className:"flex justify-center",children:(0,o.jsxs)("div",{children:[(0,o.jsxs)("div",{className:"flex",children:[(0,o.jsx)("div",{className:"-ml-4 w-24 sm:-ml-10 sm:w-32"}),(0,o.jsx)(T,{item:e.hItems[0]}),(0,o.jsx)(T,{item:e.hItems[1]}),(0,o.jsx)(T,{item:e.hItems[2]})]}),(0,o.jsxs)("div",{className:"flex items-center",children:[(0,o.jsxs)("div",{children:[(0,o.jsx)(Z,{item:e.vItems[0]}),(0,o.jsx)(Z,{item:e.vItems[1]}),(0,o.jsx)(Z,{item:e.vItems[2]})]}),(0,o.jsxs)("div",{className:"grid grid-cols-3 overflow-hidden rounded-xl border border-mid-grey/40 bg-white dark:border-gray-950 dark:bg-gray-800",children:[(0,o.jsx)(w,{row:0,col:0}),(0,o.jsx)(w,{row:0,col:1}),(0,o.jsx)(w,{row:0,col:2}),(0,o.jsx)(w,{row:1,col:0}),(0,o.jsx)(w,{row:1,col:1}),(0,o.jsx)(w,{row:1,col:2}),(0,o.jsx)(w,{row:2,col:0}),(0,o.jsx)(w,{row:2,col:1}),(0,o.jsx)(w,{row:2,col:2})]})]})]})})}function w(e){var t=e.row,s=e.col,n=(0,r.Z)((0,d.Z)((function(e){return[e.globalStats]})),1)[0],a=(0,r.Z)((0,u.Z)((function(e){return[e.guessesLeft]}),m.X),1)[0]<=0,i=s<2?"border-r":"",c=t<2?"border-b":"",l=Object.entries(n.correctAnswersPlayerMap[t][s]).sort((function(e,t){return t[1]-e[1]})).map((function(e){return{playerId:e[0],count:e[1],pct:e[1]/n.completed*100}}))[0],x=l.playerId,p=(l.count,l.pct),g=(0,f.i)(x);return(0,o.jsx)(o.Fragment,{children:(0,o.jsx)("div",{className:"flex h-22 w-22 items-center justify-center overflow-hidden border-slate-500 bg-cover bg-center ".concat(c," ").concat(i," bg-mid-grey text-gray-700 transition-colors duration-75 dark:border-gray-950 sm:h-28 sm:w-28 sm:text-2xl"),children:g&&(0,o.jsx)(o.Fragment,{children:(0,o.jsxs)("div",{className:"overflow group relative flex h-full w-full items-start justify-center",children:[(0,o.jsx)(h.QV,{player:g,silhouette:!a}),!isNaN(p)&&(0,o.jsxs)("div",{className:"absolute right-0 top-0 flex h-4 items-center rounded-bl-lg bg-black pl-1.5 pr-1 text-xxs text-white opacity-90 sm:h-5 sm:pr-1.5",children:[p<1?p.toFixed(1):p.toFixed(0),"%"]}),a&&(0,o.jsx)("div",{className:"absolute bottom-0 left-0 right-0",children:(0,o.jsx)("div",{className:"truncate whitespace-nowrap bg-black px-px py-px text-xxs text-white opacity-95",children:g.name.includes(" (")?g.name.substring(0,g.name.indexOf(" (")):g.name})})]})})})})}function N(){var e=(0,r.Z)((0,d.Z)((function(e){return[e.grid]})),1)[0];return e&&(0,o.jsx)("div",{className:"flex justify-center",children:(0,o.jsxs)("div",{children:[(0,o.jsxs)("div",{className:"flex",children:[(0,o.jsx)("div",{className:"-ml-4 w-24 sm:-ml-10 sm:w-32"}),(0,o.jsx)(T,{item:e.hItems[0]}),(0,o.jsx)(T,{item:e.hItems[1]}),(0,o.jsx)(T,{item:e.hItems[2]})]}),(0,o.jsxs)("div",{className:"flex items-center",children:[(0,o.jsxs)("div",{children:[(0,o.jsx)(Z,{item:e.vItems[0]}),(0,o.jsx)(Z,{item:e.vItems[1]}),(0,o.jsx)(Z,{item:e.vItems[2]})]}),(0,o.jsxs)("div",{className:"grid grid-cols-3 overflow-hidden rounded-xl border border-mid-grey/40 bg-white dark:border-gray-950 dark:bg-gray-800",children:[(0,o.jsx)(C,{row:0,col:0}),(0,o.jsx)(C,{row:0,col:1}),(0,o.jsx)(C,{row:0,col:2}),(0,o.jsx)(C,{row:1,col:0}),(0,o.jsx)(C,{row:1,col:1}),(0,o.jsx)(C,{row:1,col:2}),(0,o.jsx)(C,{row:2,col:0}),(0,o.jsx)(C,{row:2,col:1}),(0,o.jsx)(C,{row:2,col:2})]})]})]})})}function C(e){var t=e.row,s=e.col,n=(0,r.Z)((0,d.Z)((function(e){return[e.globalStats]})),1)[0],i=s<2?"border-r":"",c=t<2?"border-b":"",l=(0,a.useState)(!1),u=l[0],m=l[1],f=Object.entries(n.correctAnswersPlayerMap[t][s]).sort((function(e,t){return t[1]-e[1]})).map((function(e){return{playerId:e[0],count:e[1],pct:e[1]/n.completed}}));return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("div",{className:"flex h-22 w-22 flex-col items-center justify-center overflow-hidden ".concat(c," ").concat(i," font-semibold text-gray-700 transition-colors duration-75 dark:border-gray-950 sm:h-28 sm:w-28 sm:text-2xl"),children:[f.length,(0,o.jsxs)("div",{className:"text-xs font-medium sm:text-sm",children:["(",(0,o.jsx)("button",{onClick:function(){return m(!0)},target:"_blank",className:"text-orange-400 underline ",children:"Show"}),")"]})]}),(0,o.jsx)(g,{isOpen:u,closeModal:function(){m(!1)},selectionStats:f})]})}function _(){var e=(0,r.Z)((0,d.Z)((function(e){return[e.grid,e.globalStats]})),2),t=e[0];e[1];return t&&(0,o.jsx)("div",{className:"flex justify-center",children:(0,o.jsxs)("div",{children:[(0,o.jsxs)("div",{className:"flex",children:[(0,o.jsx)("div",{className:"-ml-4 w-24 sm:-ml-10 sm:w-32"}),(0,o.jsx)(T,{item:t.hItems[0]}),(0,o.jsx)(T,{item:t.hItems[1]}),(0,o.jsx)(T,{item:t.hItems[2]})]}),(0,o.jsxs)("div",{className:"flex items-center",children:[(0,o.jsxs)("div",{children:[(0,o.jsx)(Z,{item:t.vItems[0]}),(0,o.jsx)(Z,{item:t.vItems[1]}),(0,o.jsx)(Z,{item:t.vItems[2]})]}),(0,o.jsxs)("div",{className:"grid grid-cols-3 overflow-hidden rounded-xl border border-mid-grey/40 bg-white dark:border-gray-950 dark:bg-gray-800",children:[(0,o.jsx)(k,{row:0,col:0}),(0,o.jsx)(k,{row:0,col:1}),(0,o.jsx)(k,{row:0,col:2}),(0,o.jsx)(k,{row:1,col:0}),(0,o.jsx)(k,{row:1,col:1}),(0,o.jsx)(k,{row:1,col:2}),(0,o.jsx)(k,{row:2,col:0}),(0,o.jsx)(k,{row:2,col:1}),(0,o.jsx)(k,{row:2,col:2})]})]})]})})}function k(e){var t=e.row,s=e.col,n=(0,r.Z)((0,d.Z)((function(e){return[e.globalStats]})),1)[0],a=s<2?"border-r":"",i=t<2?"border-b":"";return(0,o.jsxs)("div",{className:"flex h-22 w-22 items-center justify-center overflow-hidden ".concat(i," ").concat(a," font-semibold text-gray-700 transition-colors duration-75 dark:border-gray-950 sm:h-28 sm:w-28 sm:text-2xl"),children:[Math.round(100*(0,c.lO)(n,t,s)),"%"]})}function T(e){var t=e.item,s=t.id.length>2?"award":"team";return(0,o.jsx)("div",{className:"flex h-20 w-22 items-center justify-center text-xs sm:h-20 sm:w-28 ",children:"award"==s?(0,o.jsx)(S,{item:t,pos:"col"}):(0,o.jsx)(D,{item:t})})}function Z(e){var t=e.item,s=t.id.length>2?"award":"team";return(0,o.jsx)("div",{className:"-ml-4 flex h-22 w-24 items-center justify-center text-xs sm:-ml-10 sm:h-28 sm:w-32",children:"award"==s?(0,o.jsx)(S,{item:t,pos:"row"}):(0,o.jsx)(D,{item:t})})}function D(e){var t=e.item,s=l.Z[t.id];return(0,o.jsx)("div",{children:(0,o.jsx)("img",{className:"h-11 w-11 rounded-full sm:h-14 sm:w-14",src:"/img/logos/512/".concat(s.logoId,".png"),alt:"".concat(s.full_name," colours")})})}function S(e){var t=e.item,s=e.pos;return(0,o.jsxs)("div",{className:"font-display flex h-20 flex-col items-center justify-center text-center text-xs font-bold leading-tight text-black dark:text-white sm:h-28 sm:text-sm ",children:[t.imgUrl&&"col"==s?(0,o.jsx)("img",{className:"mb-1 mt-1 max-h-10 object-contain px-2 sm:mb-1.5",src:t.imgUrl,alt:t.title}):t.imgUrl&&"row"==s?(0,o.jsx)("img",{className:"mb-1 mt-1 max-h-8 w-full object-contain px-1 sm:mb-1.5 sm:max-h-10",src:t.imgUrl,alt:t.title}):(0,o.jsx)("div",{className:"leading-tight",children:t.title}),(0,o.jsx)("div",{className:"text-xxs uppercase text-black dark:text-gray-400 sm:text-xs",children:t.subtitle})]})}},4634:function(e,t,s){s.d(t,{Z:function(){return c}});var r=s(5893),n=s(7294),o=s(7993),a=s(3926),i=s(36);function c(e){var t=e.title,s=e.iconClassName,c=e.placement,l=void 0===c?"top":c,u=(0,n.useState)(!1),d=u[0],m=u[1],f=function(){m(!1)};return(0,r.jsx)(a.Z,{onClickAway:f,children:(0,r.jsx)(o.Z,{className:"normal-case",PopperProps:{disablePortal:!0},componentsProps:{tooltip:{sx:{fontSize:"0.875rem",lineHeight:"1.3",fontWeight:400,fontFamily:"ABCSocial",padding:"0.75rem 1rem",textAlign:"left",bgcolor:"rgba(0, 0, 0, 0.9)","& .MuiTooltip-arrow":{color:"common.black"},textTransform:"none"}}},onClose:f,open:d,disableFocusListener:!0,disableHoverListener:!0,disableTouchListener:!0,placement:l,arrow:!0,title:t,children:(0,r.jsx)("button",{onClick:function(){m(!0)},children:(0,r.jsx)(i.r,{className:s})})})})}},4210:function(e,t,s){s.d(t,{T:function(){return f}});var r=s(7568),n=s(828),o=s(4051),a=s.n(o),i=s(5893),c=s(5217),l=s(5675),u=s.n(l),d={src:"/_next/static/media/secondshot.f843348e.png",height:450,width:450,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAIAAABLbSncAAAAyklEQVR42jWOvQqCYBiF3xuo+6j76hpqzqaIipaWGoK2iqAayv5ABMco8IdKP9HMNFG/MMIgvt6GDgcOPDzDAcZYGoZUURJCEpM8NC2NIoSAk5gm++eTplRVUQUqy3dB8Hj+Oh5bnY7Ocf5287RteLmuO50YtZrd65Fmw6hW/fUabbj0+85o5M5mt/k8kKRAFM12WysUwOp2jXrdW628Je8tFiiduTLa8KaUtFqHfG6fzewAsHqlghB+d+PYGQyOxeKpVHKGQ6SMsS9AIpZKRht0WgAAAABJRU5ErkJggg=="},m=s(5957);function f(e){var t=e.player,s=e.row,o=e.col,l=e.isOpen,u=e.closeModal,d=(0,n.Z)((0,m.Z)((function(e){return[e.undoGuess]})),1)[0];function f(){return(f=(0,r.Z)(a().mark((function e(){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,d(t,s,o);case 2:u(!0);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}return(0,i.jsx)(c.v,{isOpen:l,closeModal:u,modalTitle:"",modalBody:(0,i.jsx)(h,{handleConfirm:function(){return f.apply(this,arguments)},handleCancel:function(){u(!1)}}),size:"lg"})}function h(e){var t=e.handleConfirm,s=e.handleCancel;return(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)("div",{className:"text-center",children:[(0,i.jsx)("div",{className:"mx-auto mb-4 text-center",children:(0,i.jsx)(u(),{src:d,alt:"Second Chance",layout:"intrinsic",width:80,height:80})}),(0,i.jsx)("h3",{className:"mb-4 text-xl font-bold dark:text-gray-400",children:"Confirm Undo"}),(0,i.jsxs)("p",{className:"-mx-1.5 mb-8 text-md font-normal dark:text-gray-400",children:["Each day you get ",(0,i.jsx)("span",{className:"font-bold",children:"one chance"})," to undo a guess. Are you sure you want to use your daily undo?"]}),(0,i.jsxs)("div",{className:"mb-4 flex items-center justify-center space-x-4",children:[(0,i.jsx)("button",{onClick:s,"data-modal-hide":"popup-modal",type:"button",className:"rounded-lg border border-gray-300 bg-white px-5 py-2.5 text-sm font-medium text-gray-700 hover:bg-soft-grey hover:text-black focus:z-10 focus:outline-none focus:ring-2 focus:ring-gray-300 focus:ring-offset-2 dark:border-gray-500 dark:bg-gray-700 dark:text-gray-300 dark:hover:bg-gray-600 dark:hover:text-white dark:focus:ring-gray-600",children:"No, cancel"}),(0,i.jsx)("button",{onClick:t,"data-modal-hide":"popup-modal",type:"button",className:"inline-flex items-center rounded-lg bg-orange-400 px-5 py-2.5 text-center text-sm font-medium text-black hover:bg-orange-300 focus:outline-none focus:ring-2 focus:ring-orange-400 focus:ring-offset-2 dark:focus:ring-green-800",children:"Yes, undo"})]})]})})}},5397:function(e,t,s){s.d(t,{Z:function(){return te}});var r=s(7568),n=s(828),o=s(4051),a=s.n(o),i=s(5893),c=s(7294),l=s(5678),u=s(8918);s(5675);s(1664);function d(){return(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(m,{})})}function m(e){return(0,i.jsxs)("footer",{className:"footer mx-auto max-w-screen-lg ",children:[(0,i.jsxs)("div",{className:"footer__left",children:[(0,i.jsxs)("div",{className:"footer__left-top",children:[(0,i.jsxs)("div",{className:"footer__social-links",children:[(0,i.jsx)("a",{href:"https://www.facebook.com/escapecollectivecc","aria-label":"Facebook",children:(0,i.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"11",height:"20",fill:"none",role:"img",children:[(0,i.jsx)("title",{children:"Facebook"}),(0,i.jsx)("path",{fill:"#181818",d:"M6.774 20v-9.121h3.064l.459-3.555H6.778V5.052c0-1.03.286-1.732 1.761-1.732h1.885V.141A25.069 25.069 0 0 0 7.679 0C4.966 0 3.107 1.656 3.107 4.698v2.626H.037v3.555h3.07V20h3.667Z"})]})}),(0,i.jsx)("a",{href:"https://www.x.com/escapecycling/","aria-label":"X",children:(0,i.jsxs)("svg",{width:"24",height:"24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,i.jsx)("title",{children:"X"}),(0,i.jsx)("g",{clipPath:"url(#a)",children:(0,i.jsx)("path",{d:"M14.347 10.157 23.031 0h-2.058l-7.54 8.82L7.411 0H.464l9.107 13.336L.464 23.988h2.058l7.963-9.314 6.36 9.314h6.947l-9.445-13.83Zm-2.819 3.297-.922-1.328L3.264 1.559h3.16l5.926 8.528.923 1.328L20.974 22.5h-3.16l-6.286-9.046Z",fill:"#181818"})}),(0,i.jsx)("defs",{children:(0,i.jsx)("clipPath",{id:"a",children:(0,i.jsx)("path",{fill:"#fff",transform:"translate(.464)",d:"M0 0h23.327v24H0z"})})})]})}),(0,i.jsx)("a",{href:"https://www.instagram.com/escapecollective/","aria-label":"Instagram",children:(0,i.jsxs)("svg",{width:"25",height:"25",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,i.jsx)("title",{children:"Instagram"}),(0,i.jsx)("path",{d:"M7.466.502C3.63.502.5 3.632.5 7.47v10.067c0 3.837 3.13 6.966 6.966 6.966h10.068c3.836 0 6.966-3.13 6.966-6.966V7.47c0-3.837-3.13-6.967-6.966-6.967H7.466Zm0 1.847h10.068a5.105 5.105 0 0 1 5.12 5.12v10.067a5.105 5.105 0 0 1-5.12 5.12H7.466a5.105 5.105 0 0 1-5.12-5.12V7.47a5.105 5.105 0 0 1 5.12-5.12Zm11.957 1.846a1.385 1.385 0 1 0 0 2.77 1.385 1.385 0 0 0 0-2.77ZM12.5 6.04c-3.559 0-6.462 2.903-6.462 6.461 0 3.56 2.903 6.462 6.462 6.462 3.559 0 6.462-2.903 6.462-6.462 0-3.558-2.903-6.461-6.462-6.461Zm0 1.846a4.601 4.601 0 0 1 4.615 4.615 4.601 4.601 0 0 1-4.615 4.616 4.601 4.601 0 0 1-4.615-4.616A4.601 4.601 0 0 1 12.5 7.887Z",fill:"#181818"})]})}),(0,i.jsx)("a",{href:"https://www.tiktok.com/@escapecollective","aria-label":"Tiktok",children:(0,i.jsxs)("svg",{width:"21",height:"25",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,i.jsx)("title",{children:"Tiktok"}),(0,i.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.284.502C15.688 3.908 17.628 5.94 21 6.155v3.83c-1.954.187-3.666-.44-5.657-1.62v7.164c0 9.101-10.124 11.945-14.194 5.422C-1.466 16.753.135 9.388 8.525 9.092v4.04c-.639.1-1.322.259-1.947.468-1.866.619-2.924 1.778-2.63 3.823.566 3.917 7.898 5.076 7.288-2.578V.51h4.048V.502Z",fill:"#181818"})]})})]}),(0,i.jsxs)("nav",{role:"navigation","aria-label":"Footer menu",className:"hide-in-mobile",children:[(0,i.jsxs)("ul",{id:"menu-footer-menu-right",className:"footer__menu",children:[(0,i.jsx)("li",{id:"menu-item-486",className:"menu-item menu-item-type-post_type menu-item-object-page menu-item-486",children:(0,i.jsx)("a",{href:"https://escapecollective.com/about-us/",children:"About"})}),(0,i.jsx)("li",{id:"menu-item-490",className:"menu-item menu-item-type-post_type menu-item-object-page menu-item-490",children:(0,i.jsx)("a",{href:"https://escapecollective.com/founders-wall/",children:"Founders"})}),(0,i.jsx)("li",{id:"menu-item-491",className:"menu-item menu-item-type-post_type menu-item-object-page menu-item-491",children:(0,i.jsx)("a",{href:"https://escapecollective.com/team/",children:"Team"})}),(0,i.jsx)("li",{id:"menu-item-488",className:"menu-item menu-item-type-post_type menu-item-object-page menu-item-488",children:(0,i.jsx)("a",{href:"https://escapecollective.com/careers/",children:"Careers"})}),(0,i.jsx)("li",{id:"menu-item-489",className:"menu-item menu-item-type-post_type menu-item-object-page menu-item-489",children:(0,i.jsx)("a",{href:"https://escapecollective.com/faqs/",children:"FAQs"})}),(0,i.jsx)("li",{id:"menu-item-492",className:"menu-item menu-item-type-post_type menu-item-object-page menu-item-492",children:(0,i.jsx)("a",{href:"https://escapecollective.com/terms-and-conditions/",children:"T&Cs"})}),(0,i.jsx)("li",{id:"menu-item-485",className:"menu-item menu-item-type-post_type menu-item-object-page menu-item-privacy-policy menu-item-485",children:(0,i.jsx)("a",{rel:"privacy-policy",href:"https://escapecollective.com/privacy-policy/",children:"Policies"})}),(0,i.jsx)("li",{id:"menu-item-5262",className:"menu-item menu-item-type-post_type menu-item-object-page menu-item-5262",children:(0,i.jsx)("a",{href:"https://escapecollective.com/support/",children:"Support"})}),(0,i.jsx)("li",{id:"menu-item-28657",className:"menu-item menu-item-type-post_type menu-item-object-page menu-item-28657",children:(0,i.jsx)("a",{href:"https://escapecollective.com/our-story/",children:"Our story"})}),(0,i.jsx)("li",{id:"menu-item-86714",className:"menu-item menu-item-type-post_type menu-item-object-post menu-item-86714",children:(0,i.jsx)("a",{href:"https://escapecollective.com/the-2023-24-escape-collective-transparency-report/",children:"Transparency"})})]})," "]})]}),(0,i.jsxs)("div",{className:"footer__left-bottom notranslate",children:[(0,i.jsx)("img",{alt:"Escape Collective logo",width:"159",height:"402",src:"https://escapecollective.com/wp-content/uploads/2024/07/ESC_Symbol_Black.svg",loading:"lazy",className:"logo hide-in-desktop"}),(0,i.jsxs)("p",{className:"caption hide-in-mobile",children:["\xa92024 Escape Collective",(0,i.jsx)("br",{}),(0,i.jsx)("br",{}),(0,i.jsx)("a",{href:"https://poweruptech.com.au/",target:"_blank",className:"hover:underline",children:"BikeGrid Built by PowerUp Tech"})]})]})]}),(0,i.jsxs)("div",{className:"footer__right",children:[(0,i.jsx)("div",{className:"footer__right-top hide-in-desktop",children:(0,i.jsxs)("nav",{role:"navigation","aria-label":"Footer menu",children:[(0,i.jsxs)("ul",{id:"menu-footer-menu-right-1",className:"footer__menu",children:[(0,i.jsx)("li",{className:"menu-item menu-item-type-post_type menu-item-object-page menu-item-486",children:(0,i.jsx)("a",{href:"https://escapecollective.com/about-us/",children:"About"})}),(0,i.jsx)("li",{className:"menu-item menu-item-type-post_type menu-item-object-page menu-item-490",children:(0,i.jsx)("a",{href:"https://escapecollective.com/founders-wall/",children:"Founders"})}),(0,i.jsx)("li",{className:"menu-item menu-item-type-post_type menu-item-object-page menu-item-491",children:(0,i.jsx)("a",{href:"https://escapecollective.com/team/",children:"Team"})}),(0,i.jsx)("li",{className:"menu-item menu-item-type-post_type menu-item-object-page menu-item-488",children:(0,i.jsx)("a",{href:"https://escapecollective.com/careers/",children:"Careers"})}),(0,i.jsx)("li",{className:"menu-item menu-item-type-post_type menu-item-object-page menu-item-489",children:(0,i.jsx)("a",{href:"https://escapecollective.com/faqs/",children:"FAQs"})}),(0,i.jsx)("li",{className:"menu-item menu-item-type-post_type menu-item-object-page menu-item-492",children:(0,i.jsx)("a",{href:"https://escapecollective.com/terms-and-conditions/",children:"T&Cs"})}),(0,i.jsx)("li",{className:"menu-item menu-item-type-post_type menu-item-object-page menu-item-privacy-policy menu-item-485",children:(0,i.jsx)("a",{rel:"privacy-policy",href:"https://escapecollective.com/privacy-policy/",children:"Policies"})}),(0,i.jsx)("li",{className:"menu-item menu-item-type-post_type menu-item-object-page menu-item-5262",children:(0,i.jsx)("a",{href:"https://escapecollective.com/support/",children:"Support"})}),(0,i.jsx)("li",{className:"menu-item menu-item-type-post_type menu-item-object-page menu-item-28657",children:(0,i.jsx)("a",{href:"https://escapecollective.com/our-story/",children:"Our story"})}),(0,i.jsx)("li",{className:"menu-item menu-item-type-post_type menu-item-object-post menu-item-86714",children:(0,i.jsx)("a",{href:"https://escapecollective.com/the-2023-24-escape-collective-transparency-report/",children:"Transparency"})})]})," "]})}),(0,i.jsxs)("a",{href:"https://escapecollective.com","aria-label":"Escape Collective logo",children:[(0,i.jsx)("img",{alt:"Riding is Life",width:"141",height:"48",src:"https://escapecollective.com/wp-content/themes/escapecollective/assets/img/ESC_RIL_Black_Large.svg",loading:"lazy",className:"footer_ril"}),(0,i.jsx)("img",{alt:"Escape Collective logo",width:"194",height:"197",src:"https://escapecollective.com/wp-content/uploads/2024/07/ESC_Symbol_Black.svg",loading:"lazy",className:"logo hide-in-mobile"})]}),(0,i.jsxs)("p",{className:"caption hide-in-desktop",children:["\xa92024 Escape Collective",(0,i.jsx)("br",{}),(0,i.jsx)("a",{href:"https://poweruptech.com.au/",target:"_blank",className:"hover:underline",children:"BikeGrid Built by PowerUp Tech"})]})]})]})}var f=s(5957);function h(){var e=(0,n.Z)((0,f.Z)((function(e){return[e.cardMode,e.toggleCardMode]})),2),t=e[0],s=(e[1],(0,c.useState)(!1)),r=(s[0],s[1]);return(0,c.useEffect)((function(){r(!!t)}),[t]),(0,i.jsx)("div",{className:"w-screen bg-black p-2 px-0 text-center text-xs text-white sm:text-sm md:p-3",children:"Now includes riders from 2000 to 2024!"})}var x=s(6248),p=s(5518),g=s(5595),v=s(3267),j=(s(8746),s(8984)),y=s(7197);function b(){var e=u.Z.getState().levelNumber,t=(u.Z.getState().shareGameName,u.Z.getState().shareGameUrl,u.Z.getState().grid),s=u.Z.getState().globalStats,r=f.Z.getState().score,n=function(e,t,s,r,n,o,a,i){var c=k(e,s,r,i),l=9==n?"PERFECT!\n":"",u=(0,j.yx)(s,r);return"BikeGrid #".concat(t," - ").concat(n,"/9\n\n").concat(l).concat(c,"Rarity: ").concat(u,"\n\nPlay #BikeGrid by @EscapeCycling https://bikegrid.escapecollective.com")}(t,e,f.Z.getState().correctGuesses,s,r,0,0,f.Z.getState().cardMode);return n}function w(){return(w=(0,r.Z)(a().mark((function e(){var t,s,r,n,o,i,c,l;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=u.Z.getState().levelNumber,s=u.Z.getState().shareGameName,r=u.Z.getState().shareGameUrl,n=u.Z.getState().grid,o=u.Z.getState().globalStats,i=f.Z.getState().score,c=f.Z.getState().correctGuesses,l=f.Z.getState().cardMode,C({copy:N(n,t,c,o,i,s,r,l),levelNumber:t});case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function N(e,t,s,r,n,o,a,i){var c=k(e,s,r,i),l=9==n?"PERFECT!\n":"",u=(0,j.yx)(s,r),d="".concat(o," ").concat(t," - ").concat(n,"/9\n\n").concat(l).concat(c,"Rarity: ").concat(u,"\n\n").concat(a);return console.log(d),d}function C(e){return _.apply(this,arguments)}function _(){return(_=(0,r.Z)(a().mark((function e(t){var s,r,n;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(s=t.copy,r=t.levelNumber,!("share"in navigator)||!p.tq){e.next=14;break}return n={text:s},e.prev=3,e.next=6,navigator.share(n);case 6:(0,v.x8)({method:"Mobile",itemId:r}),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(3),console.log(e.t0);case 12:e.next=15;break;case 14:try{T(s),(0,v.x8)({method:"Copy",itemId:r})}catch(o){console.log(o)}case 15:case"end":return e.stop()}}),e,null,[[3,9]])})))).apply(this,arguments)}function k(e,t,s,r){var n="";return t.forEach((function(t,o){e.vItems[o];t.forEach((function(e,t){if(null==e)n+="\u2b1c";else if(r){var a=null===s||void 0===s?void 0:s.correctAnswersPlayerMap[o][t],i=a?a[e]/s.completed*100:.1,c=(0,y.y)(i);n+=c.emojiSquare}else n+="\ud83d\udfe9"})),n+="\n"})),n}function T(e){return navigator.clipboard.writeText(e)}var Z=function(){var e=(0,c.useState)(!1),t=e[0],s=e[1];return(0,i.jsxs)("button",{className:"relative mb-2 mr-2 inline-flex items-center rounded-lg bg-orange-400 px-5 py-2.5 text-center text-sm font-medium text-black hover:bg-orange-300 focus:outline-none focus:ring-4 focus:ring-orange-200 dark:border-gray-700 dark:bg-gray-800 dark:text-white dark:hover:bg-gray-700 dark:focus:ring-gray-600",onClick:function(){!function(){w.apply(this,arguments)}(),p.tq||(s(!0),setTimeout((function(){s(!1)}),3e3))},children:[p.tq?(0,i.jsxs)("svg",{"aria-hidden":"true",className:"-ml-1 mr-2 h-5 w-6",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[(0,i.jsx)("path",{fill:"none",d:"M0 0h24v24H0z"}),(0,i.jsx)("path",{d:"M13 14h-2a8.999 8.999 0 00-7.968 4.81A10.136 10.136 0 013 18C3 12.477 7.477 8 13 8V3l10 8-10 8v-5z"})]}):(0,i.jsx)("svg",{"aria-hidden":"true",className:"-ml-1 mr-2 h-5 w-6",viewBox:"0 0 1024 1024",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:(0,i.jsx)("path",{d:"M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM382 896h-.2L232 746.2v-.2h150v150z"})}),(0,i.jsxs)("span",{className:"hidden md:inline-block",children:[p.tq?"Share":"Copy"," Score"]}),(0,i.jsx)("span",{className:"md:hidden",children:p.tq?"Share":"Copy"}),(0,i.jsx)("span",{className:"transition-opacity duration-500 ".concat(t?"opacity-100":"opacity-0"," absolute left-1/2 top-full -translate-x-1/2 translate-y-1.5 text-xs text-orange-400"),children:"COPIED!"})]})},D=s(7857),S=s(9823);var G=function(){var e=b(),t="https://twitter.com/intent/tweet?text="+encodeURIComponent(e);return(0,i.jsxs)("a",{href:t,target:"_blank",onClick:function(){(0,v.x8)({method:"Twitter",itemId:S.vD})},className:"mb-2 mr-2 inline-flex items-center rounded-lg bg-[#0f1419] px-6 py-2.5 text-center text-sm font-medium text-off-white hover:bg-gray-800 focus:outline-none focus:ring-4 focus:ring-gray-200 dark:border-gray-700 dark:bg-gray-800 dark:text-white dark:hover:bg-gray-700 dark:focus:ring-gray-600",children:[(0,i.jsx)("svg",{"aria-hidden":"true",className:"-ml-1 mr-2 h-5 w-6",width:"1200",height:"1227",viewBox:"0 0 1200 1227",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,i.jsx)("path",{d:"M714.163 519.284L1160.89 0H1055.03L667.137 450.887L357.328 0H0L468.492 681.821L0 1226.37H105.866L515.491 750.218L842.672 1226.37H1200L714.137 519.284H714.163ZM569.165 687.828L521.697 619.934L144.011 79.6944H306.615L611.412 515.685L658.88 583.579L1055.08 1150.3H892.476L569.165 687.854V687.828Z",fill:"white"})}),(0,i.jsx)("span",{className:"hidden md:inline-block",children:"Share to X"}),(0,i.jsx)("span",{className:"md:hidden",children:"Post"})]})},M=s(4634),I=s(5217);s(4264);function U(e){var t=e.score,s=e.rarity,r=(e.footer,g.Fl[t]);return(0,i.jsxs)("div",{className:"-mb-4 mt-2 text-center",children:[(0,i.jsxs)("div",{children:[(0,i.jsxs)("div",{className:"flex justify-center",children:[(0,i.jsx)(L,{row:1,col:1}),(0,i.jsx)(L,{row:1,col:2}),(0,i.jsx)(L,{row:1,col:3})]}),(0,i.jsxs)("div",{className:"flex justify-center",children:[(0,i.jsx)(L,{row:2,col:1}),(0,i.jsx)(L,{row:2,col:2}),(0,i.jsx)(L,{row:2,col:3})]}),(0,i.jsxs)("div",{className:"flex justify-center",children:[(0,i.jsx)(L,{row:3,col:1}),(0,i.jsx)(L,{row:3,col:2}),(0,i.jsx)(L,{row:3,col:3})]})]}),(0,i.jsxs)("div",{className:"mt-4",children:[(0,i.jsxs)("div",{className:"flex items-center justify-center text-center text-sm sm:text-base",children:[(0,i.jsx)("span",{className:"font-semibold uppercase text-gray-700 dark:text-gray-200 ",children:"Rarity Score"}),(0,i.jsx)(M.Z,{title:"Rarity score is calculated as the sum of the percentages for each correct cell, plus 100 for each empty cell. A lower score means your answers are more rare. This score will change throughout the day as more games are completed.",iconClassName:"ml-1 h-4 w-4"})]}),(0,i.jsx)("div",{className:"text-center text-5xl font-semibold leading-tight tracking-tight",children:(0,i.jsx)(D.ZP,{decimals:s<100?1:0,end:s,useEasing:!1,duration:.4})})]}),(0,i.jsxs)("div",{className:"my-2 mt-2 border-solid border-slate-200 px-2.5",children:[(0,i.jsxs)("h2",{className:"mb-5 text-2xl font-medium uppercase leading-tight md:text-3xl",children:[r,"!"]}),(0,i.jsxs)("div",{className:"mt-6 flex items-center justify-center sm:mt-8",children:[(0,i.jsx)(G,{}),(0,i.jsx)(Z,{})]})]}),(0,i.jsxs)("div",{className:"-mx-6 mt-6 bg-soft-grey px-4 py-4 text-center",children:[(0,i.jsx)("p",{className:"font-bold ",children:"Want more?"}),(0,i.jsxs)("p",{children:["Visit"," ",(0,i.jsx)("a",{href:"https://escapecollective.com/?utm_source=bikegrid&utm_medium=affiliate&utm_campaign=results",target:"_blank",className:"font-bold text-orange-400",children:"Escape Collective"})," ","for the latest cycling news from around the world."]})]})]})}function L(e){var t=e.row,s=e.col,r=(0,n.Z)((0,f.Z)((function(e){return[e.correctGuesses,e.cardMode]})),2),o=r[0],a=r[1],c=(0,n.Z)((0,u.Z)((function(e){return[e.globalStats]})),1)[0],l=null===c||void 0===c?void 0:c.correctAnswersPlayerMap[t-1][s-1],d=o[t-1][s-1],m=l?l[d]/(null===c||void 0===c?void 0:c.completed)*100:.1,h=(0,y.y)(m),x=a?h.id+"-flat":"bg-[#59d185]";return(0,i.jsx)("div",{className:"bg-x-center m-0.5 h-8 w-8 rounded-lg md:h-12 md:w-12 ".concat(d?x:"bg-soft-grey dark:bg-gray-700"," ")})}var A=function(e){var t=(0,n.Z)((0,u.Z)((function(e){return[e.isResultOpen,e.setIsResultOpen,e.globalStats,e.levelNumber]})),4),s=t[0],r=t[1],o=t[2],a=t[3],c=(0,n.Z)((0,f.Z)((function(e){return[e.score,e.correctGuesses]})),2),l=c[0],d=c[1],m=(0,j.yx)(d,o);return(0,i.jsx)(I.v,{isOpen:s,closeModal:function(){r(!1)},modalTitle:(0,i.jsxs)("div",{className:"",children:[(0,i.jsx)("div",{className:"text-center text-2xl font-semibold uppercase dark:text-white",children:"Summary"}),(0,i.jsxs)("div",{className:"text-center text-sm font-semibold uppercase text-dark-grey dark:text-gray-300",children:["BikeGrid Game ",a]})]}),modalBody:(0,i.jsx)(U,{score:l,rarity:m,footer:e.footer})})},O=s(47);function H(){return(0,i.jsx)("div",{className:"my-2 px-2 pt-2 text-md sm:px-4",children:(0,i.jsxs)("ul",{className:"list-none space-y-5",children:[(0,i.jsx)(P,{afterText:(0,i.jsx)(i.Fragment,{children:"You have nine guesses to fill out the grid."})}),(0,i.jsx)(P,{afterText:(0,i.jsx)(i.Fragment,{children:"Select a past or present rider (2001 onwards) for each cell that meets the criteria for that cell's row and column."})}),(0,i.jsx)(P,{afterText:"A rider cannot be used more than once. A rarer pick will help you achieve a better score."}),(0,i.jsx)(P,{afterText:(0,i.jsx)(i.Fragment,{children:'You have one "daily undo" to correct a mistake or try to find a rarer pick. Use it wisely.'})}),(0,i.jsx)(P,{afterText:"Come back each day for a new grid!"}),(0,i.jsx)(P,{afterText:"Cycling's history is not straightforward, and our data classifies results as per the time they were held, rather than their current classification. Doping sanctions are reflected by stripped results, but riders that remain retain their original positions in the results sheet."}),(0,i.jsx)(P,{afterText:(0,i.jsxs)(i.Fragment,{children:["If you have any issues or feedback,"," ",(0,i.jsx)("a",{className:"font-medium text-orange-400",href:"mailto:bikegridsupport@escapecollective.com",children:"please get in touch"}),"."]})})]})})}function P(e){var t=e.bgColor,s=void 0===t?"":t,r=e.textColor,n=void 0===r?"":r,o=e.highlightText,a=void 0===o?"":o,c=e.afterText;return(0,i.jsxs)("li",{children:[""!==a&&(0,i.jsx)("span",{className:"".concat(s," ").concat(n," -m-0.5 inline-block rounded-sm px-1 py-0.5 font-medium"),children:a})," ",c]})}var B=function(e){var t=e.modalTitle,s=void 0===t?"How to Play BikeGrid":t,r=(0,n.Z)((0,u.Z)((function(e){return[e.isHelpOpen,e.setIsHelpOpen]})),2),o=r[0],a=r[1],c=(0,n.Z)((0,f.Z)((function(e){return[e.instructionsDismissed,e.saveInstructionsDismissed]})),2),l=c[0],d=c[1],m=o||!l;return(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(I.v,{isOpen:m,closeModal:function(){d(!0),a(!1)},modalTitle:s,modalBody:(0,i.jsx)(H,{}),size:"lg"})})};s(9734),s(6310);function R(){var e=(0,n.Z)((0,f.Z)((function(e){return[e.incorrectGuesses,e.correctGuesses]})),2);e[0],e[1];return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",{className:"p-2 text-sm text-gray-700 sm:text-md",children:"Play past grids with a free Escape Collective account!"}),(0,i.jsxs)("div",{className:"mt-2 space-y-3 p-2",children:[(0,i.jsx)("a",{href:"".concat("","/account/register?utm_content=past-grids"),className:"block w-full rounded-lg bg-orange-400 px-5 py-2.5 text-center text-md font-medium text-black hover:bg-orange-300 focus:outline-none focus:ring-2 focus:ring-orange-400 focus:ring-offset-2 ",children:"Create Account"}),(0,i.jsx)("a",{href:"".concat("","/account/login?utm_content=past-grids"),className:"block w-full rounded-lg bg-gray-200 px-5 py-2.5 text-center text-md font-medium text-black hover:bg-gray-300 focus:outline-none focus:ring-2 focus:ring-gray-300 focus:ring-offset-2 dark:bg-red-600 dark:hover:bg-red-700 dark:focus:ring-red-800",children:"Sign In"})]})]})}var F=function(e){var t=(0,n.Z)((0,u.Z)((function(e){return[e.isRegisterOpen,e.setIsRegisterOpen]})),2),s=t[0],r=t[1];return(0,i.jsx)(I.v,{isOpen:s,closeModal:function(){r(!1)},size:"md",modalTitle:(0,i.jsx)("div",{className:"",children:(0,i.jsx)("h1",{className:"pl-2 pt-1 text-left text-xl font-semibold leading-tight tracking-tight text-black dark:text-white md:text-2xl",children:"Unlock Past Grids"})}),modalBody:(0,i.jsx)(R,{})})};s(36);var E=function(e){var t=e.modalTitle,s=(0,n.Z)((0,f.Z)((function(e){return[e.saveInstructionsDismissed,e.history,e.guessesLeft]}),x.X),3),r=(s[0],s[1]),o=(s[2],(0,n.Z)((0,u.Z)((function(e){return[e.setIsHelpOpen]})),1)[0]),a=(0,c.useState)(!1),l=(a[0],a[1]);return(0,c.useEffect)((function(){l(!0)}),[]),Object.keys(r).length,(0,i.jsx)(i.Fragment,{children:(0,i.jsx)("button",{"aria-label":t,onClick:function(){o(!0),(0,v.L9)("how_to_play_button"),(0,v.N5)({contentType:"button",itemId:"how_to_play"})},className:"-my-2 mr-1 flex items-center justify-center p-2 text-xs font-bold text-black md:w-auto md:px-2 md:text-md",children:"How to Play"})})};var z=s(6042),V=s(9396),W=s(4995),q=s(1407),K=s(1163);s(2494);function X(e){return(0,i.jsxs)("svg",(0,V.Z)((0,z.Z)({viewBox:"0 0 24 24",fill:"currentColor",height:"1em",width:"1em"},e),{children:[(0,i.jsx)("path",{fill:"none",d:"M0 0h24v24H0z"}),(0,i.jsx)("path",{d:"M12 14v2a6 6 0 00-6 6H4a8 8 0 018-8zm0-1c-3.315 0-6-2.685-6-6s2.685-6 6-6 6 2.685 6 6-2.685 6-6 6zm0-2c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm9 6h1v5h-8v-5h1v-1a3 3 0 016 0v1zm-2 0v-1a1 1 0 00-2 0v1h2z"})]}))}function Q(){var e,t=(0,n.Z)((0,f.Z)((function(e){return[e.cardMode,e.toggleCardMode,e.darkMode,e.toggleDarkMode]})),4),s=(t[0],t[1],t[2],t[3],(0,n.Z)((0,u.Z)((function(e){return[e.user]})),1)[0]);(0,K.useRouter)();return(0,i.jsxs)(W.v,{as:"div",className:"relative -mb-1 inline-block text-left sm:mb-0",children:[(0,i.jsx)(W.v.Button,{className:"w-full text-sm font-medium text-gray-700 hover:bg-opacity-80 focus:outline-none focus-visible:ring-2 focus-visible:ring-white sm:py-0",children:(0,i.jsx)("div",{className:"relative inline-flex h-8 w-8 items-center justify-center overflow-hidden rounded-full dark:bg-gray-600 md:h-10 md:w-10",children:(0,i.jsx)("svg",{className:"w-5",width:"18",height:"24",viewBox:"0 0 18 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,i.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9 12C10.5913 12 12.1174 11.3679 13.2426 10.2426C14.3679 9.11742 15 7.5913 15 6C15 4.4087 14.3679 2.88258 13.2426 1.75736C12.1174 0.632141 10.5913 0 9 0C7.4087 0 5.88258 0.632141 4.75736 1.75736C3.63214 2.88258 3 4.4087 3 6C3 7.5913 3.63214 9.11742 4.75736 10.2426C5.88258 11.3679 7.4087 12 9 12ZM16.3005 24C17.241 24 18 23.31 18 22.4685C18 17.997 13.9695 15 9 15C4.029 15 0 17.9955 0 22.4685C0 23.313 0.7635 24 1.6995 24H16.3005Z",fill:"black"})})})}),(0,i.jsx)(q.u,{as:c.Fragment,enter:"transition ease-out duration-100",enterFrom:"transform opacity-0 scale-95",enterTo:"transform opacity-100 scale-100",leave:"transition ease-in duration-75",leaveFrom:"transform opacity-100 scale-100",leaveTo:"transform opacity-0 scale-95",children:(0,i.jsxs)(W.v.Items,{static:!0,className:"min-w absolute right-0 z-50 mt-1 w-56 min-w-max origin-top-right divide-y divide-gray-100 rounded-md bg-white shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none",children:[(0,i.jsx)("div",{className:"px-1 py-1 ",children:(0,i.jsx)("div",{children:(0,i.jsx)("div",{className:"text-black group flex w-full items-center rounded-md px-2 py-2 text-sm",children:(0,i.jsx)("div",{className:"flex flex-col items-start",children:(0,i.jsxs)("div",{className:"flex items-center justify-center truncate",children:[(0,i.jsx)("img",{className:"mr-3 h-6 w-6",src:"/img/flags/".concat(s.country.code,".svg"),alt:"".concat(s.country.name," flag")}),(0,i.jsxs)("div",{children:[(0,i.jsxs)("p",{className:"font-medium",children:[s.displayName," "]}),(0,i.jsx)("p",{className:"text-xs text-gray-500",children:s.email})]})]})})})})}),(null===s||void 0===s||null===(e=s.roles)||void 0===e?void 0:e.includes("ROLE_ADMIN"))&&(0,i.jsx)("div",{className:"px-1 py-1",children:(0,i.jsx)(W.v.Item,{children:function(e){var t=e.active;return(0,i.jsxs)("a",{href:"".concat("","/admin/grid"),className:"".concat(t?"bg-soft-grey text-black":"text-black"," group flex w-full items-center rounded-md px-2 py-2 text-sm"),children:[(0,i.jsx)("span",{className:"w-7",children:(0,i.jsx)(X,{className:"h-5 w-5"})}),"Admin Panel"]})}})}),(0,i.jsx)("div",{className:"px-1 py-1",children:(0,i.jsx)(W.v.Item,{children:function(e){var t=e.active;return(0,i.jsxs)("a",{href:"".concat("","/account/logout"),className:"".concat(t?"bg-soft-grey text-black":"text-black"," group flex w-full items-center rounded-md px-2 py-2 text-sm"),children:[(0,i.jsx)("span",{className:"w-7",children:(0,i.jsx)(Y,{className:"h-5 w-5","aria-hidden":"true"})}),"Logout"]})}})})]})})]})}function Y(e){return(0,i.jsx)("svg",(0,V.Z)((0,z.Z)({viewBox:"0 0 24 24",fill:"currentColor",height:"1em",width:"1em"},e),{children:(0,i.jsx)("path",{d:"M4 12a1 1 0 001 1h7.59l-2.3 2.29a1 1 0 000 1.42 1 1 0 001.42 0l4-4a1 1 0 00.21-.33 1 1 0 000-.76 1 1 0 00-.21-.33l-4-4a1 1 0 10-1.42 1.42l2.3 2.29H5a1 1 0 00-1 1zM17 2H7a3 3 0 00-3 3v3a1 1 0 002 0V5a1 1 0 011-1h10a1 1 0 011 1v14a1 1 0 01-1 1H7a1 1 0 01-1-1v-3a1 1 0 00-2 0v3a3 3 0 003 3h10a3 3 0 003-3V5a3 3 0 00-3-3z"})}))}var J=function(){var e=(0,n.Z)((0,u.Z)((function(e){return[e.user,e.isUserLoading,e.setIsRegisterOpen]}),x.X),3),t=e[0],s=e[1];return e[2],t?(0,i.jsx)(Q,{}):(0,i.jsx)("div",{className:"justify-cener flex items-center",children:(0,i.jsx)("a",{href:"".concat("","/account/login?utm_content=header"),className:"text-dark-gray inline-flex w-full items-center justify-center text-sm font-medium hover:bg-opacity-80 focus:outline-none focus-visible:ring-2 focus-visible:ring-white sm:py-0 ",children:(0,i.jsx)("div",{className:"relative inline-flex h-8 w-8 items-center justify-center overflow-hidden rounded-full dark:bg-gray-600 md:h-10 md:w-10",children:!s&&(0,i.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"24",fill:"none",children:[(0,i.jsx)("mask",{id:"a",fill:"#fff",children:(0,i.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9 12A6 6 0 1 0 9 0a6 6 0 0 0 0 12Zm7.3 12c.941 0 1.7-.69 1.7-1.532C18 17.996 13.97 15 9 15s-9 2.996-9 7.468C0 23.313.763 24 1.7 24h14.6Z"})}),(0,i.jsx)("path",{d:"M13 6a4 4 0 0 1-4 4v4a8 8 0 0 0 8-8h-4ZM9 2a4 4 0 0 1 4 4h4a8 8 0 0 0-8-8v4ZM5 6a4 4 0 0 1 4-4v-4a8 8 0 0 0-8 8h4Zm4 4a4 4 0 0 1-4-4H1a8 8 0 0 0 8 8v-4Zm7 12.468c0-.203.095-.342.162-.402.064-.058.119-.066.139-.066v4C18.15 26 20 24.6 20 22.468h-4ZM9 17c4.297 0 7 2.488 7 5.468h4C20 16.505 14.643 13 9 13v4Zm-7 5.468C2 19.488 4.703 17 9 17v-4c-5.643 0-11 3.505-11 9.468h4ZM1.7 22c.02 0 .074.008.138.065.066.06.162.2.162.403h-4C-2 24.608-.142 26 1.7 26v-4Zm14.6 0H1.7v4h14.6v-4Z",fill:"#181818",mask:"url(#a)"})]})})})})};function $(){var e=(0,n.Z)((0,f.Z)((function(e){return[e.history,e.guessesLeft]}),x.X),2),t=e[0],s=e[1],r=(0,n.Z)((0,u.Z)((function(e){return[e.user,e.isUserLoading]}),x.X),2),o=(r[0],r[1],Object.keys(t).length,(0,c.useState)(!1)),a=(o[0],o[1]);(0,c.useEffect)((function(){a(!0)}),[]);Object.keys(t).length;return(0,i.jsxs)("div",{className:"flex items-center",children:[(0,i.jsx)(E,{modalTitle:"How to Play BikeGrid"}),(0,i.jsx)(J,{})]})}s(993);var ee=s(5835);var te=function(e){var t=(0,n.Z)((0,u.Z)((function(e){return[e.initError,e.setupLevel]}),x.X),2),s=(t[0],t[1]),o=(0,c.useState)(!1),l=(o[0],o[1],function(){var e=(0,r.Z)(a().mark((function e(){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:s();case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}());return(0,c.useEffect)((0,r.Z)(a().mark((function e(){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,l();case 2:case"end":return e.stop()}}),e)}))),[]),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("div",{className:"relative bg-off-white",children:[(0,i.jsx)(h,{}),(0,i.jsx)("header",{className:"border-b border-orange-400 bg-orange-400 text-center",children:(0,i.jsxs)("div",{className:"mx-auto flex max-w-screen-lg items-center justify-between px-4 py-3 md:px-6 md:py-3",children:[(0,i.jsx)("h2",{className:"",children:(0,i.jsxs)("a",{className:"image-block-hack font-headline text-3xl sm:text-4xl",href:"/",children:[(0,i.jsx)("img",{src:"/img/ESC_BikeGrid_Logo_Black.svg",alt:"Escape Collective logo",className:"mt-0.5 h-5 sm:h-8"}),(0,i.jsx)("span",{className:"sr-only",children:"BikeGrid"})]})}),(0,i.jsx)($,{})]})}),e.children]}),(0,i.jsx)("div",{className:"relative bg-orange-400",children:(0,i.jsx)(d,{})}),(0,i.jsx)(A,{}),(0,i.jsx)(O.Z,{}),(0,i.jsx)(ee.ZP,{}),(0,i.jsx)(B,{}),(0,i.jsx)(F,{}),(0,i.jsx)(se,{})]})};function se(){return(0,i.jsx)(l.Ix,{bodyClassName:"font-sans text-sm text-black",autoClose:3e3})}},8918:function(e,t,s){s.d(t,{Z:function(){return m}});var r=s(7568),n=s(4051),o=s.n(n),a=s(2464),i=s(9823);function c(e){return l.apply(this,arguments)}function l(){return(l=(0,r.Z)(o().mark((function e(t){var s;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(t,{credentials:"include"});case 2:return e.next=4,e.sent.json();case 4:return s=e.sent,e.abrupt("return",s);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var u=s(5957),d=s(474),m=(0,a.F)((function(e,t){return{grid:null,setGrid:function(t){e({grid:t})},riders:null,setRiders:function(t){e({riders:t})},levelNumber:null,setLevelNumber:function(t){e({levelNumber:t})},initError:!1,setInitError:function(t){return e({initError:t})},globalStats:null,setGlobalStats:function(t){e({globalStats:t})},leaderboard:null,isWeekend:!1,setIsWeekend:function(t){return e((function(e){return{isWeekend:t}}))},user:null,isUserLoading:!0,setUser:function(t){return e({user:t})},currentUserId:null,setCurrentUserId:function(t){return e({currentUserId:t})},analyticsGameName:"",setAnalyticsGameName:function(t){return e({analyticsGameName:t})},shareGameName:"",setShareGameName:function(t){return e({shareGameName:t})},shareGameUrl:"",setShareGameUrl:function(t){return e({shareGameUrl:t})},isSilhouetteOpen:!1,setIsSilhouetteOpen:function(t){return e((function(e){return{isSilhouetteOpen:t}}))},isAnswerOpen:!1,setIsAnswerOpen:function(t){return e((function(e){return{isAnswerOpen:t}}))},selectedTab:"my",setSelectedTab:function(t){return e((function(e){return{selectedTab:t}}))},leaderboardTab:"members",setLeaderboardTab:function(t){return e((function(e){return{leaderboardTab:t}}))},noSpoilers:!1,toggleNoSpoilers:function(){return e((function(e){return{noSpoilers:!e.noSpoilers}}))},undoModeActive:!1,setUndoModeActive:function(t){return e((function(e){return{undoModeActive:t}}))},isResultOpen:!1,setIsResultOpen:function(t){return e((function(e){return{isResultOpen:t}}))},isRegisterOpen:!1,setIsRegisterOpen:function(t){return e((function(e){return{isRegisterOpen:t}}))},isHelpOpen:!1,setIsHelpOpen:function(t){return e((function(e){return{isHelpOpen:t}}))},isPickHistoryOpen:!1,setIsPickHistoryOpen:function(t){return e((function(e){return{isPickHistoryOpen:t}}))},isGameHistoryOpen:!1,setIsGameHistoryOpen:function(t){return e((function(e){return{isGameHistoryOpen:t}}))},fetchGame:(0,r.Z)(o().mark((function t(){var s;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,c("".concat("","/data/grids/").concat(i.wM,".json"));case 3:s=t.sent,e({globalStats:s,levelNumber:s.level,grid:{levelNumber:s.level,hItems:s.hItems,vItems:s.vItems,correctAnswersPlayerMap:s.correctAnswersPlayerMap}}),t.next=11;break;case 7:t.prev=7,t.t0=t.catch(0),console.log(t.t0.message),e({initError:!0});case 11:case"end":return t.stop()}}),t,null,[[0,7]])}))),fetchRiders:(0,r.Z)(o().mark((function t(){var s;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,c("".concat("","/data/riders/riders.json"));case 3:s=t.sent,e({riders:s}),t.next=11;break;case 7:t.prev=7,t.t0=t.catch(0),console.log(t.t0.message),e({initError:!0});case 11:case"end":return t.stop()}}),t,null,[[0,7]])}))),fetchUser:(0,r.Z)(o().mark((function s(){var r,n,a,l,m,f;return o().wrap((function(s){for(;;)switch(s.prev=s.next){case 0:return s.prev=0,s.next=3,c("".concat("","/api/user/score/").concat(i.wM));case 3:if(r=s.sent,console.log("User is",r.user),e({user:r.user,isUserLoading:!1}),!(n=t().user)){s.next=15;break}if(!r.attempt){s.next=14;break}return console.log("Found remote attempt, store and use locally"),s.next=12,u.Z.getState().mergeRemoteAttempt(r);case 12:s.next=15;break;case 14:console.log("Did not find a remote attempt"),console.log("Check if there is a local attempt that needs syncing"),l=u.Z.getState().userHistory,(f=null!==(m=null===l||void 0===l||null===(a=l[n.id])||void 0===a?void 0:a[i.wM])&&void 0!==m?m:null)&&0==f.guessesLeft?(console.log("Found completed attempt -> sync"),(0,d.i)({gridKey:i.wM,browserId:u.Z.getState().browserId,correctGuesses:f.correctGuesses,incorrectGuesses:f.incorrectGuesses||[[[],[],[]],[[],[],[]],[[],[],[]]],gaveUp:f.gaveUp,undoUsed:f.undoUsed})):f?console.log("Found partial attempt"):console.log("No user completed guesses to sync");case 15:u.Z.getState().setBoard(t().user),s.next=22;break;case 18:s.prev=18,s.t0=s.catch(0),console.log(s.t0.message),e({initError:!0});case 22:case"end":return s.stop()}}),s,null,[[0,18]])}))),fetchLeaders:(0,r.Z)(o().mark((function t(){var s;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,c("".concat("","/api/leaderboard/").concat(i.wM));case 3:s=t.sent,e({leaderboard:s}),console.log(s),t.next=11;break;case 8:t.prev=8,t.t0=t.catch(0),console.log(t.t0.message);case 11:case"end":return t.stop()}}),t,null,[[0,8]])}))),setupLevel:function(){t().fetchUser(),t().fetchRiders(),t().fetchGame(),t().setAnalyticsGameName("BikeGrid"),t().setShareGameName("BikeGrid"),t().setShareGameUrl("https://bikegrid.escapecollective.com/")},clearState:function(){console.log("clearing state"),e((function(e){return{target:null,players:[],isSilhouetteOpen:!1,isAnswerOpen:!1,isResultOpen:!1}}))}}}),Object.is)},5957:function(e,t,s){s.d(t,{Z:function(){return g}});var r=s(7568),n=s(4924),o=s(6042),a=s(4051),i=s.n(a),c=s(2464),l=s(782),u=s(9823),d=s(5595);var m=s(8918),f=s(474),h=s(3267),x=s(1992),p=(0,c.F)((0,l.tJ)((function(e,t){return{browserId:Array(11).join((Math.random().toString(36)+"00000000000000000").slice(2,18)).slice(0,10),lastPlayed:null,saveLastPlayed:function(t){return e((function(){return{lastPlayed:t}}))},history:{},userHistory:{},undoUsed:!1,setUndoUsed:function(t){return e((function(e){return{undoUsed:t}}))},submitted:!1,setSubmitted:function(t){return e((function(e){return{submitted:t}}))},cardMode:!1,toggleCardMode:function(){return e((function(e){return{cardMode:!e.cardMode}}))},darkMode:!1,toggleDarkMode:function(){return e((function(e){return{darkMode:!e.darkMode}}))},seenRarity:0,setSeenRarity:function(t){return e((function(e){return{seenRarity:t}}))},score:0,incorrectGuesses:[[[],[],[]],[[],[],[]],[[],[],[]]],correctGuesses:[[null,null,null],[null,null,null],[null,null,null]],setCorrectGuesses:function(t){return e((function(e){return{correctGuesses:t}}))},guessesLeft:d.wx,setGuessesLeft:function(t){return e((function(e){return{guessesLeft:t}}))},mergeRemoteAttempt:function(){var t=(0,r.Z)(i().mark((function t(s){var r,o,a;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=s.user,o=s.attempt,console.log({attempt:o}),a={level:o.gridId,guessesLeft:0,correctGuesses:o.answers,incorrectGuesses:o.incorrectGuesses||[[[],[],[]],[[],[],[]],[[],[],[]]],undoUsed:o.undoUsed,gaveUp:o.gaveUp,score:o.answers.flat().filter((function(e){return null!==e})).length},e((function(e){var t=Object.assign({},e.userHistory);return t[r.id]=Object.assign({},e.userHistory[r.id],(0,n.Z)({},u.wM,a)),{userHistory:t}}));case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),setBoard:function(s){console.log("Setting board...");var r=t().userHistory,a=t().history;if(s){console.log("Set board using userHistory");var i=r[s.id],c=i?i[u.wM]:null;if(c){console.log("Found user history for "+u.wM);var l={lastPlayed:u.wM,guessesLeft:c.guessesLeft,correctGuesses:c.correctGuesses,incorrectGuesses:c.incorrectGuesses||[[[],[],[]],[[],[],[]],[[],[],[]]],undoUsed:c.undoUsed,gaveUp:c.gaveUp,submitted:0==c.guessesLeft,score:c.score};e((function(e){return(0,o.Z)({},l)}))}else{console.log("No stored user attempt for "+u.wM);var m=a[u.wM];if(m){console.log("Found a local attempt, claiming as own"),t().updateUserHistory(s,(0,n.Z)({},u.wM,m)),t().deleteTodayFromLocalHistory();var h={lastPlayed:u.wM,guessesLeft:m.guessesLeft,correctGuesses:m.correctGuesses,incorrectGuesses:m.incorrectGuesses||[[[],[],[]],[[],[],[]],[[],[],[]]],undoUsed:m.undoUsed,gaveUp:m.gaveUp,submitted:0==m.guessesLeft,score:m.score};e((function(e){return(0,o.Z)({},h)})),0==m.guessesLeft?(console.log("Local attempt is complete -> Sync"),(0,f.i)({gridKey:u.wM,browserId:t().browserId,correctGuesses:m.correctGuesses,incorrectGuesses:m.incorrectGuesses||[[[],[],[]],[[],[],[]],[[],[],[]]],gaveUp:m.gaveUp,undoUsed:m.undoUsed})):console.log("Local was not complete -> don't sync")}}}else{console.log("No user, set board using anonymous history");var x=a[u.wM];if(x){console.log("Found anon history");var p={lastPlayed:u.wM,guessesLeft:x.guessesLeft,correctGuesses:x.correctGuesses,incorrectGuesses:x.incorrectGuesses||[[[],[],[]],[[],[],[]],[[],[],[]]],undoUsed:x.undoUsed,gaveUp:x.gaveUp,submitted:0==x.guessesLeft,score:x.score};e((function(e){return(0,o.Z)({},p)}))}else{console.log("No anon history found");var g={correctGuesses:[[null,null,null],[null,null,null],[null,null,null]],incorrectGuesses:[[[],[],[]],[[],[],[]],[[],[],[]]],guessesLeft:d.wx,score:0,undoUsed:!1,gaveUp:!1,submitted:!1};e((function(e){return(0,o.Z)({},g)}))}}},loadSubmission:function(e){},updateUserHistory:function(t,s){e((function(e){var r=Object.assign({},e.userHistory);return r[t.id]=Object.assign({},e.userHistory[t.id],s),{userHistory:r}}))},getLocalGridHistory:function(){for(var e=m.Z.getState().user,s=t().userHistory,r=t().history,n=[],o=0;o<7;o++){var a,i=new Date;if(i.setDate(i.getDate()-o),!(i<u.UX)||0!=i.getDay()&&6!=i.getDay()){var c=(0,x.yR)(i,u.ox);if(!(c<=198)){var l,d=(0,x.xI)(i),f=r[d],h=(null!==(l=null===s||void 0===s||null===(a=s[null===e||void 0===e?void 0:e.id])||void 0===a?void 0:a[d])&&void 0!==l?l:null)||f||null;n.push({level:c,dateKey:d,date:i,attempt:h})}}}return n},updateLocalHistory:function(t){e((function(e){return{history:Object.assign(e.history,t)}}))},deleteTodayFromLocalHistory:function(){e((function(e){var t=Object.assign({},e.history);return delete t[u.wM],{history:t}}))},undoGuess:function(){var s=(0,r.Z)(i().mark((function s(r,o,a){var c,l,d,f,x;return i().wrap((function(s){for(;;)switch(s.prev=s.next){case 0:c=t().correctGuesses,l=t().incorrectGuesses,d=m.Z.getState().grid,c[o-1][a-1]==r.id&&(c[o-1][a-1]=null),l[o-1][a-1]=l[o-1][a-1].filter((function(e){return e!==r.id})),(0,h.OP)({player:r,row:o,col:a,levelNumber:d.levelNumber}),f=(0,n.Z)({},u.wM,{level:d.levelNumber,score:c.flat().filter((function(e){return null!==e})).length,incorrectGuesses:l,correctGuesses:c,guessesLeft:t().guessesLeft+1,undoUsed:!0,gaveUp:t().gaveUp}),e((function(e){return{guessesLeft:e.guessesLeft+1,correctGuesses:c,incorrectGuesses:l,undoUsed:!0,gaveUp:e.gaveUp,submitted:e.submitted,score:c.flat().filter((function(e){return null!==e})).length}})),(x=m.Z.getState().user)?t().updateUserHistory(x,f):t().updateLocalHistory(f);case 10:case"end":return s.stop()}}),s)})));return function(e,t,r){return s.apply(this,arguments)}}(),persistGuess:function(s,r,o){var a=t().correctGuesses,i=t().incorrectGuesses,c=m.Z.getState().grid;Object.keys(c.correctAnswersPlayerMap[r-1][o-1]).map((function(e){return parseInt(e)})).includes(s.id)?a[r-1][o-1]=s.id:i[r-1][o-1].push(s.id);var l=u.wM,d=t().browserId,x=t().guessesLeft-1,p=t().submitted;x<=0&&(p||(0,h.yh)({gameName:m.Z.getState().analyticsGameName,levelNumber:c.levelNumber}),(0,f.i)({gridKey:l,browserId:d,correctGuesses:a,incorrectGuesses:i,gaveUp:t().gaveUp,undoUsed:t().undoUsed}));var g=(0,n.Z)({},u.wM,{level:c.levelNumber,score:a.flat().filter((function(e){return null!==e})).length,incorrectGuesses:i,correctGuesses:a,guessesLeft:x,undoUsed:t().undoUsed,gaveUp:t().gaveUp});e((function(e){return{lastPlayed:u.wM,guessesLeft:x,correctGuesses:a,incorrectGuesses:i,gaveUp:e.gaveUp,submitted:e.submitted,score:a.flat().filter((function(e){return null!==e})).length}}));var v=m.Z.getState().user;v?t().updateUserHistory(v,g):t().updateLocalHistory(g)},gaveUp:!1,setGaveUp:function(t){return e((function(e){return{gaveUp:t}}))},giveUp:function(){var s=t().correctGuesses,r=t().incorrectGuesses,o=m.Z.getState().grid,a=u.wM,i=t().browserId,c=t().guessesLeft,l=t().submitted;c<=6&&(l||((0,h.yh)({gameName:m.Z.getState().analyticsGameName,levelNumber:o.levelNumber}),(0,h.O7)({gameName:m.Z.getState().analyticsGameName,levelNumber:o.levelNumber})),(0,f.i)({gridKey:a,browserId:i,correctGuesses:s,incorrectGuesses:r,gaveUp:!0,undoUsed:t().undoUsed}));var d=(0,n.Z)({},u.wM,{level:o.levelNumber,score:s.flat().filter((function(e){return null!==e})).length,incorrectGuesses:r,correctGuesses:s,guessesLeft:0,undoUsed:t().undoUsed,gaveUp:!0});e((function(e){return{lastPlayed:u.wM,guessesLeft:0,correctGuesses:s,incorrectGuesses:r,gaveUp:!0,submitted:e.submitted,score:s.flat().filter((function(e){return null!==e})).length}}));var x=m.Z.getState().user;x?t().updateUserHistory(x,d):t().updateLocalHistory(d)},isTodaysTipsOpen:u.wM,setTodaysTipsOpen:function(){return e((function(e){return{isTodaysTipsOpen:u.wM}}))},instructionsDismissed:!1,saveInstructionsDismissed:function(t){return e((function(){return{instructionsDismissed:t}}))}}}),{name:"grid",merge:function(e,t){return e.lastPlayed!==u.wM&&(console.log("Level change ".concat(e.lastPlayed," -> ").concat(u.wM,", clearing guesses")),e.incorrectGuesses=[[[],[],[]],[[],[],[]],[[],[],[]]],e.correctGuesses=[[null,null,null],[null,null,null],[null,null,null]],e.guessesLeft=d.wx,e.score=0,e.undoUsed=!1,e.gaveUp=!1,e.submitted=!1),(0,o.Z)({},t,e)}}),Object.is),g=p},3267:function(e,t,s){function r(e){var t=e.method,s=e.itemId;window.gtag("event","share",{method:t,content_type:"text",item_id:s})}function n(e){var t=e.method;window.gtag("event","share",{method:t,content_type:"text",item_id:"code"})}function o(e){var t=e.contentType,s=e.itemId;window.gtag("event","select_content",{content_type:t,item_id:s})}function a(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};window.gtag("event",e,t)}function i(e){e.player;var t=e.row,s=e.col;e.levelNumber;window.gtag("event","undo_guess",{cell:"".concat(t,",").concat(s)})}function c(e){var t=e.gameName,s=e.levelNumber;window.gtag("event","level_start",{level_name:"".concat(t," ").concat(s)})}function l(e){var t=e.gameName,s=e.levelNumber;window.gtag("event","level_end",{level_name:"".concat(t," ").concat(s)})}function u(e){var t=e.gameName,s=e.levelNumber;window.gtag("event","give_up",{level_name:"".concat(t," ").concat(s)})}s.d(t,{K_:function(){return n},L9:function(){return a},N5:function(){return o},O7:function(){return u},OP:function(){return i},Op:function(){return c},x8:function(){return r},yh:function(){return l}})},8984:function(e,t,s){function r(e,t){var s=0;if(e)for(var r=0;r<3;r++)for(var n=0;n<3;n++){var o=e[r][n];o?(null===t||void 0===t?void 0:t.correctAnswersPlayerMap[r][n][o])&&(s+=(null===t||void 0===t?void 0:t.correctAnswersPlayerMap[r][n][o])/(null===t||void 0===t?void 0:t.completed)*100):s+=100}return s>=100?Math.round(s):Math.round(10*s)/10}function n(e,t,s){return e?e.correctGuesses[t][s]/Math.max(e.completed,1):0}s.d(t,{lO:function(){return n},yx:function(){return r}})},5595:function(e,t,s){s.d(t,{Fl:function(){return n},wx:function(){return r}});var r=9,n={0:"Bad Luck",1:"Room to improve",2:"Respectable",3:"Decent",4:"Nice Work",5:"Awesome",6:"Impressive",7:"Outstanding",8:"Magnificent",9:"PERFECT"}},1992:function(e,t,s){s.d(t,{Dr:function(){return i},E4:function(){return l},xI:function(){return o},yJ:function(){return a},yR:function(){return c}});var r=s(828),n=s(9823);function o(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=e||new Date,s=t.getFullYear(),r=String(t.getMonth()+1).padStart(2,"0"),n=String(t.getDate()).padStart(2,"0"),o="".concat(s,"-").concat(r,"-").concat(n);return o}function a(e){var t=(0,r.Z)(e.split("-").map(Number),3),s=t[0],n=t[1],o=t[2];return new Date(s,n-1,o)}function i(e){return e.setHours(0),e.setMinutes(0),e.setSeconds(0),e.setMilliseconds(0),e}function c(e,t){for(var s=0,r=new Date(t);r<=e;){var o=r.getDay();(r>n.UX||0!==o&&6!==o)&&s++,r.setDate(r.getDate()+1)}return s}function l(e,t){var s=new Date(e);return s.setDate(e.getDate()+t),s}},9823:function(e,t,s){s.d(t,{CK:function(){return f},UX:function(){return l},ei:function(){return x},ox:function(){return i},vD:function(){return u},wM:function(){return d}});var r,n,o=s(1992),a=new Date("Mar 5 2024"),i=(0,o.Dr)(a),c=(0,o.Dr)(new Date),l=new Date("2024-04-11"),u=(0,o.yR)(c,i),d=null!==(n=null!==(r=x())&&void 0!==r?r:h("preview"))&&void 0!==n?n:(0,o.xI)(),m=(0,o.yJ)(d);h("weekend")||0===m.getDay()||m.getDay();function f(e){var t=(0,o.E4)(i,e-1);return(0,o.xI)(t)}function h(e){return new URLSearchParams(window.location.search).get(e)}function x(){var e=window.location.pathname.match(/\/(\d{4}-\d{2}-\d{2})/);return e&&e[1]?e[1]:null}},2739:function(e,t,s){s.d(t,{i:function(){return n}});var r=s(8918);function n(e){var t=r.Z.getState().riders,s=parseInt(e);return null===t||void 0===t?void 0:t.find((function(e){return e.id===s}))}},941:function(e,t,s){s.d(t,{p:function(){return i}});var r=s(1578),n=s(8726),o={en:n.en};function a(e){var t=(navigator.language||"en-US").split("-")[0];window.__localeId__=t}function i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"PP";return window.__localeId__||a(),(0,r.WU)(e,t,{locale:o[window.__localeId__||n.en]})}},7197:function(e,t,s){function r(e){return e<=.1?{id:"unique",level:9,class:"unique dark",word:"Unique",emoji:"\ud83d\udd2e",toolTip:null,dark:!0,emojiSquare:"\ud83d\udd2e"}:e<=2?{id:"legendary",level:7,class:"legendary",word:"Legendary",emoji:"\u2728",toolTip:"Selected by less than 2% of BikeGrid players.",dark:!0,emojiSquare:"\ud83d\udfea"}:e<=5?{id:"epic",level:5,class:"epic",word:"Epic",emoji:"\u2728",toolTip:"Selected by between 2-5% of BikeGrid players.",dark:!1,emojiSquare:"\ud83d\udfe6"}:e<=10?{id:"rare",level:3,class:"rare",word:"Rare",emoji:"\u2728",toolTip:"Selected by between 5-10% of BikeGrid players.",dark:!1,emojiSquare:"\ud83d\udfe8"}:{id:"common",level:1,class:"common",word:"Common",emoji:null,toolTip:null,dark:!1,emojiSquare:"\ud83d\udfe9"}}s.d(t,{y:function(){return r}})},474:function(e,t,s){s.d(t,{i:function(){return i}});var r=s(8918),n=s(5957),o=s(9734),a=s(9823);function i(e){var t=e.gridKey,s=e.browserId,i=e.correctGuesses,c=e.incorrectGuesses,l=e.undoUsed,u=void 0!==l&&l,d=e.gaveUp,m=void 0!==d&&d,f="".concat("","/api/submit"),h={gridKey:t,browserId:s,correctAnswers:i,incorrectGuesses:c,undoUsed:u,gaveUp:m};console.log(h),fetch(f,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify(h)}).then((function(e){if(!e.ok)throw new Error("Submission response was not ok.");return e.json()})).then((function(e){console.log("Response:",e),r.Z.getState().setGlobalStats(e),n.Z.getState().setSubmitted(!0),(0,o.JG)("/api/leaderboard/"+a.wM)}))}},8746:function(e,t){t.Z={AD:{id:10,logoId:1,emoji:"\ud83d\udc26\u200d\u2b1b",full_name:"Adelaide Crows",name:"Adelaide Crows",short_name:"ADE",close:["CD_T10","CD_T110"],colors:["red","yellow","blue"],state:"SA"},BB:{id:20,logoId:2,emoji:"\ud83d\udc28",full_name:"Brisbane Bears",name:"Brisbane Bears",short_name:"BRI",close:["CD_T20","CD_T1000"],colors:["maroon","yellow"],state:"QLD"},BL:{id:20,logoId:2,emoji:"\ud83e\udd81",full_name:"Brisbane Lions",name:"Brisbane Lions",short_name:"BRL",close:["CD_T20","CD_T1000"],colors:["maroon","yellow","blue"],state:"QLD"},CA:{id:30,logoId:3,emoji:"\ud83d\udd35",full_name:"Carlton",name:"Carlton",short_name:"CAR",close:["CD_T30","CD_T40","CD_T50","CD_T70","CD_T80","CD_T90","CD_T100","CD_T120","CD_T130","CD_T140"],colors:["blue"],state:"VIC"},CW:{id:40,logoId:4,emoji:"\ud83e\udd67",full_name:"Collingwood",name:"Collingwood",short_name:"COL",close:["CD_T30","CD_T40","CD_T50","CD_T70","CD_T80","CD_T90","CD_T100","CD_T120","CD_T130","CD_T140"],colors:["black","white"],state:"VIC"},ES:{id:50,logoId:5,emoji:"\ud83d\udee9\ufe0f",full_name:"Essendon",name:"Essendon",short_name:"ESS",close:["CD_T30","CD_T40","CD_T50","CD_T70","CD_T80","CD_T90","CD_T100","CD_T120","CD_T130","CD_T140"],colors:["red","black"],state:"VIC"},FI:{id:60,logoId:100,emoji:"\ud83e\udd81",full_name:"Fitzroy Lions",name:"Fitzroy",short_name:"FITZ",colors:["red","blue","yellow"],state:"VIC"},FR:{id:60,logoId:6,emoji:"\u2693",full_name:"Fremantle",name:"Fremantle",short_name:"FRE",close:["CD_T60","CD_T150"],colors:["purple","white"],state:"WA"},GE:{id:70,logoId:8,emoji:"\ud83d\udc31",full_name:"Geelong Cats",name:"Geelong Cats",short_name:"GEE",close:["CD_T30","CD_T40","CD_T50","CD_T70","CD_T80","CD_T90","CD_T100","CD_T120","CD_T130","CD_T140"],colors:["white","blue"],state:"VIC"},GC:{id:1e3,logoId:7,emoji:"\u2600\ufe0f",full_name:"Gold Coast Suns",name:"Gold Coast Suns",short_name:"GCS",close:["CD_T20","CD_T1000"],colors:["red","yellow"],state:"QLD"},GW:{id:1010,logoId:9,emoji:"\ud83d\udfe0",full_name:"GWS Giants",name:"GWS Giants",short_name:"GWS",close:["CD_T1010","CD_T160"],colors:["grey","orange","white"],state:"NSW"},HW:{id:80,logoId:10,emoji:"\ud83d\udfe4",full_name:"Hawthorn",name:"Hawthorn",short_name:"HAW",close:["CD_T30","CD_T40","CD_T50","CD_T70","CD_T80","CD_T90","CD_T100","CD_T120","CD_T130","CD_T140"],colors:["brown","yellow"],state:"VIC"},ME:{id:90,logoId:11,emoji:"\ud83d\udc79",full_name:"Melbourne",name:"Melbourne",short_name:"MEL",close:["CD_T30","CD_T40","CD_T50","CD_T70","CD_T80","CD_T90","CD_T100","CD_T120","CD_T130","CD_T140"],colors:["red","blue"],state:"VIC"},KA:{id:100,logoId:12,emoji:"\ud83e\udd98",full_name:"North Melbourne",name:"North Melbourne",short_name:"NTH",close:["CD_T30","CD_T40","CD_T50","CD_T70","CD_T80","CD_T90","CD_T100","CD_T120","CD_T130","CD_T140"],colors:["white","blue"],state:"VIC"},PA:{id:110,logoId:13,emoji:"\u26a1",full_name:"Port Adelaide",name:"Port Adelaide",short_name:"PTA",close:["CD_T10","CD_T110"],colors:["black","white","teal"],state:"SA"},RI:{id:120,logoId:14,emoji:"\ud83d\udc2f",full_name:"Richmond",name:"Richmond",short_name:"RIC",close:["CD_T30","CD_T40","CD_T50","CD_T70","CD_T80","CD_T90","CD_T100","CD_T120","CD_T130","CD_T140"],colors:["yellow","black"],state:"VIC"},SK:{id:130,logoId:15,emoji:"\ud83d\ude07",full_name:"St Kilda",name:"St Kilda",short_name:"STK",close:["CD_T30","CD_T40","CD_T50","CD_T70","CD_T80","CD_T90","CD_T100","CD_T120","CD_T130","CD_T140"],colors:["red","white","black"],state:"VIC"},SY:{id:160,logoId:16,emoji:"\ud83e\udda2",full_name:"Sydney Swans",name:"Sydney Swans",short_name:"SYD",close:["CD_T1010","CD_T160"],colors:["red","white"],state:"NSW"},WC:{id:150,logoId:18,emoji:"\ud83e\udd85",full_name:"West Coast Eagles",name:"West Coast Eagles",short_name:"WCE",close:["CD_T60","CD_T150"],colors:["yellow","blue"],state:"WA"},WB:{id:140,logoId:17,emoji:"\ud83d\udc36",full_name:"Western Bulldogs",name:"Western Bulldogs",short_name:"WBD",close:["CD_T30","CD_T40","CD_T50","CD_T70","CD_T80","CD_T90","CD_T100","CD_T120","CD_T130","CD_T140"],colors:["red","white","blue"],state:"VIC"}}}}]);
//# sourceMappingURL=397-84f29c1e5158c875.js.map