PageSourceSearch

https://geeksofcolor.co/_next/static/chunks/app/culture-grid/page-dfe3b65447b20b0a.js

js geeksofcolor.co collected 2026-10-02 11:28:37 UTC 7,855 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3635],{57055:function(e,t,r){Promise.resolve().then(r.bind(r,16954))},16954:function(e,t,r){"use strict";r.d(t,{default:function(){return i}});var n=r(57437),a=r(2265);let o={1:{border:"#c4a35a",bg:"rgba(196, 163, 90, 0.12)",label:"Warm-up"},2:{border:"#af804f",bg:"rgba(175, 128, 79, 0.14)",label:"Solid"},3:{border:"#7a5c3d",bg:"rgba(122, 92, 61, 0.16)",label:"Tricky"},4:{border:"#c41e23",bg:"rgba(196, 30, 35, 0.14)",label:"Devious"}};function i(e){let{puzzle:t}=e,r=(0,a.useMemo)(()=>(function(e){let t=e.groups.flatMap(e=>e.items),r=0;for(let t=0;t<e.date.length;t++)r=31*r+e.date.charCodeAt(t)|0;return function(e,t){let r=[...e],n=r.length,a=t;for(;n;){let e=(a=(16807*a+0)%2147483647)%n--;[r[n],r[e]]=[r[e],r[n]]}return r}(t,Math.abs(r))})(t),[t]),[i,l]=(0,a.useState)(new Set),[s,d]=(0,a.useState)([]),[c,u]=(0,a.useState)(0),[f,g]=(0,a.useState)(!1),[p,m]=(0,a.useState)(null),[b,h]=(0,a.useState)(!1),[x,y]=(0,a.useState)(null),[v,S]=(0,a.useState)("playing"),[k,j]=(0,a.useState)([]),w=(0,a.useMemo)(()=>new Set(s.flatMap(e=>e.items)),[s]),z=(0,a.useMemo)(()=>r.filter(e=>!w.has(e)),[r,w]),C=(0,a.useCallback)(e=>{"playing"===v&&(l(t=>{let r=new Set(t);return r.has(e)?r.delete(e):r.size<4&&r.add(e),r}),p&&m(null))},[v,p]),D=(0,a.useCallback)(()=>l(new Set),[]),W=(0,a.useCallback)(()=>{if(4!==i.size||"playing"!==v)return;let e=Array.from(i);j(t=>[...t,e]);let r=t.groups.find(e=>!s.some(t=>t.name===e.name)&&e.items.every(e=>i.has(e)));if(r)y(e),setTimeout(()=>{d(e=>{let t=[...e,{...r,solvedOrder:e.length}];return 4===t.length&&S("won"),t}),l(new Set),y(null)},600);else{h(!0);let e=c+1;u(e),setTimeout(()=>{if(h(!1),l(new Set),e>=4){S("lost");let e=t.groups.filter(e=>!s.some(t=>t.name===e.name));d(t=>[...t,...e.map((e,r)=>({...e,solvedOrder:t.length+r}))])}},500)}},[i,v,t.groups,s,c]),F=(0,a.useCallback)(()=>{if(f||"playing"!==v)return;let e=t.groups.filter(e=>!s.some(t=>t.name===e.name)).sort((e,t)=>t.difficulty-e.difficulty);if(0===e.length)return;let r=e[0],n=z.filter(e=>!r.items.includes(e));n.length>0&&(m(n[0]),g(!0))},[f,v,t.groups,s,z]);return(0,n.jsxs)("div",{style:{maxWidth:480,margin:"0 auto",padding:"24px 16px 100px",fontFamily:"var(--font-body)"},children:[(0,n.jsxs)("div",{style:{textAlign:"center",marginBottom:24},children:[(0,n.jsx)("h1",{style:{fontFamily:"var(--font-display)",fontSize:28,fontWeight:900,letterSpacing:"-0.02em",color:"var(--surface-text)",margin:"0 0 4px"},children:"Culture Grid"}),(0,n.jsx)("p",{style:{fontSize:13,color:"var(--surface-text-light)",margin:0},children:"Sort 16 items into 4 groups of 4"})]}),(0,n.jsxs)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",gap:8,marginBottom:20},children:[(0,n.jsx)("span",{style:{fontSize:12,fontWeight:600,letterSpacing:"0.06em",textTransform:"uppercase",color:"var(--surface-text-light)"},children:"Strikes"}),(0,n.jsx)("div",{style:{display:"flex",gap:4},children:Array.from({length:4}).map((e,t)=>(0,n.jsx)("div",{style:{width:12,height:12,borderRadius:"50%",background:t<c?"#c41e23":"var(--surface-border)",transition:"background 200ms var(--ease-goc)"}},t))})]}),s.map(e=>{let t=o[e.difficulty];return(0,n.jsxs)("div",{style:{marginBottom:8,padding:"14px 16px",borderRadius:8,background:t.bg,border:"2px solid ".concat(t.border),animation:"gridGroupReveal 400ms var(--ease-out)"},children:[(0,n.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:6},children:[(0,n.jsx)("span",{style:{fontFamily:"var(--font-display)",fontWeight:700,fontSize:15,color:t.border},children:e.name}),(0,n.jsx)("span",{style:{fontSize:10,fontWeight:600,letterSpacing:"0.08em",textTransform:"uppercase",color:t.border,opacity:.7},children:t.label})]}),(0,n.jsx)("div",{style:{fontSize:13,color:"var(--surface-text-mid)"},children:e.items.join(" \xb7 ")})]},e.name)}),"playing"===v&&z.length>0&&(0,n.jsx)("div",{style:{display:"grid",gridTemplateColumns:"repeat(4, 1fr)",gap:6,marginBottom:20,animation:b?"gridShake 400ms var(--ease-goc)":void 0},children:z.map(e=>{let t=i.has(e),r=p===e,a=null==x?void 0:x.includes(e);return(0,n.jsx)("button",{onClick:()=>C(e),style:{position:"relative",padding:"14px 6px",minHeight:56,borderRadius:6,border:t?"2px solid var(--beige-brown)":r?"2px dashed #c41e23":"2px s
1olid var(--surface-border)",background:a?"rgba(175, 128, 79, 0.25)":t?"rgba(175, 128, 79, 0.12)":r?"rgba(196, 30, 35, 0.08)":"var(--card-black)",color:r?"#c41e23":"var(--surface-text)",fontFamily:"var(--font-body)",fontSize:e.length>18?11:e.length>12?12:13,fontWeight:t?700:500,lineHeight:1.2,textAlign:"center",cursor:"pointer",transition:"all 150ms var(--ease-goc)",textDecoration:r?"line-through":"none",opacity:r?.5:1,WebkitTapHighlightColor:"transparent"},children:e},e)})}),"playing"===v&&(0,n.jsxs)("div",{style:{display:"flex",gap:10,justifyContent:"center",flexWrap:"wrap"},children:[(0,n.jsx)("button",{onClick:F,disabled:f,style:{padding:"10px 18px",borderRadius:6,border:"1px solid var(--surface-border)",background:f?"transparent":"var(--card-black)",color:f?"var(--surface-text-light)":"var(--beige-brown)",fontSize:13,fontWeight:600,cursor:f?"default":"pointer",opacity:f?.4:1,fontFamily:"var(--font-body)"},children:f?"Critic Used":"Ask the Critic"}),(0,n.jsx)("button",{onClick:D,disabled:0===i.size,style:{padding:"10px 18px",borderRadius:6,border:"1px solid var(--surface-border)",background:"transparent",color:"var(--surface-text-mid)",fontSize:13,fontWeight:600,cursor:0===i.size?"default":"pointer",opacity:0===i.size?.4:1,fontFamily:"var(--font-body)"},children:"Clear"}),(0,n.jsx)("button",{onClick:W,disabled:4!==i.size,style:{padding:"10px 24px",borderRadius:6,border:"none",background:4===i.size?"var(--beige-brown)":"var(--surface-border)",color:4===i.size?"#0a0a0f":"var(--surface-text-light)",fontSize:14,fontWeight:700,cursor:4===i.size?"pointer":"default",fontFamily:"var(--font-body)",transition:"background 150ms var(--ease-goc)"},children:"Submit"})]}),"playing"!==v&&(0,n.jsxs)("div",{style:{textAlign:"center",marginTop:32},children:[(0,n.jsx)("h2",{style:{fontFamily:"var(--font-display)",fontSize:24,fontWeight:800,color:"won"===v?"var(--beige-brown)":"#c41e23",marginBottom:8},children:"won"===v?"You got it.":"Better luck tomorrow."}),(0,n.jsx)("p",{style:{fontSize:14,color:"var(--surface-text-mid)",marginBottom:20},children:"won"===v?"Solved with ".concat(c," strike").concat(1!==c?"s":"","."):"All four groups revealed above."}),(0,n.jsx)("button",{onClick:()=>{let e=k.map(e=>e.map(e=>{let r=t.groups.find(t=>t.items.includes(e));if(!r)return"⬛";let n=r.difficulty;return 1===n?"\uD83D\uDFE8":2===n?"\uD83D\uDFE7":3===n?"\uD83D\uDFEB":"\uD83D\uDFE5"}).join("")).join("\n"),r="Culture Grid ".concat(t.date,"\n").concat("won"===v?"Solved in ".concat(s.length," groups, ").concat(c," strikes"):"Did not solve","\n\n").concat(e,"\n\nPlay at geeksofcolor.co/culture-grid");navigator.share?navigator.share({text:r}).catch(()=>{navigator.clipboard.writeText(r)}):navigator.clipboard.writeText(r)},style:{padding:"12px 28px",borderRadius:8,border:"none",background:"var(--beige-brown)",color:"#0a0a0f",fontSize:14,fontWeight:700,cursor:"pointer",fontFamily:"var(--font-body)"},children:"Share Results"})]}),(0,n.jsx)("style",{children:"\n        @keyframes gridShake {\n          0%, 100% { transform: translateX(0); }\n          20% { transform: translateX(-6px); }\n          40% { transform: translateX(6px); }\n          60% { transform: translateX(-4px); }\n          80% { transform: translateX(4px); }\n        }\n        @keyframes gridGroupReveal {\n          from { opacity: 0; transform: translateY(-8px); }\n          to { opacity: 1; transform: translateY(0); }\n        }\n      "})]})}}},function(e){e.O(0,[2971,6997,1744],function(){return e(e.s=57055)}),_N_E=e.O()}]);

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.