1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5995],{34154:(e,t,n)=>{n.d(t,{Ay:()=>p,Ih:()=>x,KV:()=>g,Kr:()=>u,LN:()=>f,h$:()=>h,i6:()=>m,rU:()=>y});var a=n(95155),l=n(52619),s=n.n(l),i=n(20063),c=n(44026),r=n(3188),o=n(70195),d=n(67011);function u(e){var t;let{game:n,eager:l=!1,className:s}=e;return(0,a.jsx)("div",{className:(0,d.cx)("flex items-center justify-center overflow-hidden bg-line/50",s),children:n.cover_url?(0,a.jsx)("img",{src:n.cover_url,alt:"",loading:l?"eager":"lazy",decoding:"async",fetchPriority:l?"high":void 0,width:320,height:320,className:"h-full w-full object-cover",style:{objectPosition:"50% ".concat(null!=(t=n.cover_offset_y)?t:50,"%")}}):(0,a.jsx)(c.A,{className:"h-1/3 w-1/3 text-ink-subtle","aria-hidden":"true"})})}function h(e){let{href:t,className:n,children:l}=e,c=(0,i.useRouter)(),r=()=>c.prefetch(t);return(0,a.jsx)(s(),{href:t,prefetch:!1,onPointerDown:r,onMouseEnter:r,onFocus:r,className:n,children:l})}let m='outline-none after:absolute after:inset-0 after:z-0 after:rounded-card after:content-[""] focus-visible:after:outline focus-visible:after:outline-2 focus-visible:after:outline-offset-2 focus-visible:after:outline-focus';function p(e){var t,n,l,s;let{game:i,index:c=0,href:r,onOpen:o,slot:p,footerSlot:f}=e,g="ready"===i.status,j=null!=r?r:g?"/game/".concat(i.id):void 0,w=null!=(t=i.document_count)?t:1;return(0,a.jsxs)("article",{"data-game-card":!0,className:"relative flex h-full flex-col rounded-card bg-raised text-ink shadow-raised",children:[(0,a.jsx)(u,{game:i,eager:c<4,className:"aspect-square w-full rounded-t-card"}),(0,a.jsxs)("div",{className:"flex flex-1 flex-col gap-2 p-3",children:[(0,a.jsx)("p",{className:"line-clamp-2 min-h-[2.5em] font-display text-[19px] font-extrabold leading-tight tracking-tight text-brand-accent",children:j?o&&!r?(0,a.jsx)("button",{type:"button",onClick:()=>o(i.id),className:(0,d.cx)(m,"text-left"),children:i.title}):(0,a.jsx)(h,{href:j,className:m,children:i.title}):i.title}),(0,a.jsxs)("div",{className:"mt-auto flex min-h-6 flex-wrap items-center gap-x-3 gap-y-1 text-meta text-ink-muted",children:[(0,a.jsx)(x,{status:i.status,coachConfidence:null!=(n=i.coach_confidence)?n:null}),g&&(0,a.jsx)(y,{consensus:null!=(l=i.community_consensus)?l:null,payload:null!=(s=i.community_player_counts)?s:null}),w>1&&(0,a.jsxs)("span",{children:[w," docs"]})]}),f&&(0,a.jsx)("div",{className:"relative z-10",children:f})]}),p&&(0,a.jsx)("div",{className:"absolute right-2 top-2 z-10",children:p})]})}function x(e){let{status:t,coachConfidence:n}=e;return"processing"===t?(0,a.jsx)(o.ak,{kind:"info",label:"Processing"}):"quarantined"===t?(0,a.jsx)(o.ak,{kind:"info",label:"Waiting for review"}):"rejected"===t?(0,a.jsx)(o.ak,{kind:"neutral",label:"Removed"}):"ready"!==t?(0,a.jsx)(o.ak,{kind:"fail",label:"Couldn't read it"}):(0,a.jsx)(f,{score:n})}function f(e){let{score:t}=e,n="number"==typeof t,l=n?({3:"text-conf-high-ink",2:"text-conf-medium-ink",1:"text-conf-low-ink"})[(0,r.QP)(t)]:"text-ink-subtle";return(0,a.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:[(0,a.jsx)(r.pg,{score:n?t:null,size:"sm"}),(0,a.jsx)("span",{"aria-hidden":"true",className:n?"font-mono font-semibold ".concat(l):l,children:n?Math.round(t):"Not rated"})]})}function g(e,t){if(!e||!e.confident)return null;let n="range";if(null!==e.best_at&&t){var a,l;let s=t.counts.reduce((e,t)=>{var n;return e+(null!=(n=t.best)?n:0)},0),i=null!=(l=null==(a=t.counts.find(t=>"number"==typeof t.players&&t.players===e.best_at))?void 0:a.best)?l:0;s>0&&i/s>=.6&&(n="best")}if("best"===n&&null!==e.best_at){let t=e.best_at;return{text:"BGG: best at ".concat(t),spoken:"BoardGameGeek voters: best with ".concat(t," ").concat(1===t?"player":"players")}}if(e.recommended_range){let[t,n]=e.recommended_range;return t===n?{text:"BGG: good at ".concat(t),spoken:"BoardGameGeek voters: good with ".concat(t," ").concat(1===t?"player":"players")}:{text:"BGG: good at ".concat(t,"-").concat(n),spoken:"BoardGameGeek voters: good with ".concat(t," to ").concat(n," players")}}return null}
1function y(e){let{consensus:t,payload:n}=e,l=g(t,n);return l?(0,a.jsxs)("span",{className:"whitespace-nowrap text-ink-muted","data-bgg-poll":!0,children:[(0,a.jsx)("span",{"aria-hidden":"true",children:l.text}),(0,a.jsx)("span",{className:"sr-only",children:l.spoken})]}):null}},36608:(e,t,n)=>{n.d(t,{Kg:()=>i,S5:()=>r,dO:()=>c,ti:()=>s});var a=n(90960),l=n(45431);async function s(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=function(e){let t=new URLSearchParams;return e.players&&t.set("players",String(e.players)),e.minutes&&t.set("minutes",String(e.minutes)),e.weight&&t.set("weight",e.weight),e.fresh&&t.set("fresh","true"),t.toString()}(e),l=await (0,a.gVs)("".concat(a.tEC,"/shelf/fits").concat(n?"?".concat(n):""),{cache:"no-store",signal:t.signal});if(!l.ok)throw await (0,a.pbO)(l,"That didn't load. Check your connection and try again.");return l.json()}let i={light:"Light",medium:"Medium",heavy:"Heavy"};function c(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new Date,a=[],s=(0,l.gS)(e.min_players,e.max_players);s&&a.push(e.with_expansions?"".concat(s," with expansions"):s);let c=(0,l.BI)(e.play_time_minutes);return c&&a.push(c),t.weight&&"fits"===e.fit.weight&&a.push(i[t.weight]),a.push(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Date;if(!e)return"Not played yet";let n=new Date("".concat(e.slice(0,10),"T00:00:00"));if(Number.isNaN(n.getTime()))return"Not played yet";if(61>Math.floor((t.getTime()-n.getTime())/864e5))return"Played ".concat(n.toLocaleDateString("en-US",{month:"short",day:"numeric"}));let a=n.getFullYear()===t.getFullYear();return"Not played since ".concat(n.toLocaleDateString("en-US",a?{month:"long"}:{month:"long",year:"numeric"}))}(e.last_played_on,n)),a.join(" \xb7 ")}function r(e,t){let n=[];if(t.players&&"unknown"===e.fit.players&&n.push("players"),t.minutes&&"unknown"===e.fit.time&&n.push("length"),t.weight&&"unknown"===e.fit.weight&&n.push("weight"),0===n.length)return null;let a=1===n.length?n[0]:"".concat(n.slice(0,-1).join(", ")," and ").concat(n.at(-1));return"No ".concat(a," on record")}},44026:(e,t,n)=>{n.d(t,{A:()=>a});let a=(0,n(5121).A)("dice-5",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["path",{d:"M16 8h.01",key:"cr5u4v"}],["path",{d:"M8 8h.01",key:"1e4136"}],["path",{d:"M8 16h.01",key:"18s6g9"}],["path",{d:"M16 16h.01",key:"1f9h7w"}],["path",{d:"M12 12h.01",key:"1mp3jc"}]])},48314:(e,t,n)=>{n.d(t,{A:()=>a});let a=(0,n(5121).A)("rotate-ccw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]])},85995:(e,t,n)=>{n.d(t,{A:()=>p});var a=n(95155),l=n(12115),s=n(7125),i=n(6191),c=n(48314),r=n(45431),o=n(36608),d=n(34154),u=n(98500);let h=[30,45,60,90,120,180],m=[null,"light","medium","heavy"];function p(e){let{initial:t,load:n,action:p,intro:x,empty:f,version:g=0,anyMinutes:y=null}=e,[j,w]=(0,l.useState)(Math.min(Math.max(t.players,1),12)),[b,v]=(0,l.useState)(t.minutes),[N,k]=(0,l.useState)(null),[_,S]=(0,l.useState)(null),[A,M]=(0,l.useState)(null),[C,G]=(0,l.useState)(0),T=(0,l.useId)(),B=Array.from(new Set([...h,...t.minutes?[t.minutes]:[]])).sort((e,t)=>e-t),E=null!=b?b:y,K="".concat(j,"|").concat(E,"|").concat(N);(0,l.useEffect)(()=>{let e=new AbortController;M(null);let t=setTimeout(()=>{n({players:j,minutes:E,weight:N},e.signal).then(e=>S(e)).catch(t=>{e.signal.aborted||M(t instanceof Error?t.message:"That didn't load.")})},200);return()=>{clearTimeout(t),e.abort()}},[K,C,g]);let P=null!==_&&"".concat(_.players,"|").concat(_.minutes,"|").concat(_.weight)!==K;return(0,a.jsxs)("div",{className:"space-y-5","data-pool-picker":!0,children:[(0,a.jsxs)("fieldset",{className:"space-y-2",children:[(0,a.jsx)("legend",{id:T,className:"text-small font-semibold text-ink",children:"How many people?"}),(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)(u.K0,{"aria-label":"One fewer player",variant:"secondary",disabled:j<=1,onClick:()=>w(e=>Math.max(1,e-1)),children:(0,a.jsx)(s.A,{className:"h-5 w-5"})}),(0,a.jsxs)("output",{"aria-labelledby":T,"aria-live":"polite",className:"min-w-[6.5rem] text-center text-body text-ink","data-
1pool-players":!0,children:[(0,a.jsx)("span",{className:"num font-mono text-h3 font-bold",children:j})," ",1===j?"player":"players"]}),(0,a.jsx)(u.K0,{"aria-label":"One more player",variant:"secondary",disabled:j>=12,onClick:()=>w(e=>Math.min(12,e+1)),children:(0,a.jsx)(i.A,{className:"h-5 w-5"})})]})]}),(0,a.jsxs)("fieldset",{className:"space-y-2",children:[(0,a.jsx)("legend",{className:"text-small font-semibold text-ink",children:"How long have you got?"}),(0,a.jsxs)("div",{className:"flex flex-wrap gap-2",role:"group","aria-label":"Time available",children:[B.map(e=>{var t;return(0,a.jsx)(u.vu,{selected:b===e,onClick:()=>v(e),className:"min-w-target justify-center px-3",children:90===e?"90 min":null!=(t=(0,r.BI)(e))?t:"".concat(e," min")},e)}),(0,a.jsx)(u.vu,{selected:null===b,onClick:()=>v(null),className:"min-w-target justify-center px-3",children:"Any"})]})]}),(0,a.jsxs)("fieldset",{className:"space-y-2",children:[(0,a.jsx)("legend",{className:"text-small font-semibold text-ink",children:"How heavy?"}),(0,a.jsx)("div",{className:"flex flex-wrap gap-2",role:"group","aria-label":"Weight",children:m.map(e=>(0,a.jsx)(u.vu,{selected:N===e,onClick:()=>k(e),className:"min-w-target justify-center px-3",children:e?o.Kg[e]:"Any"},null!=e?e:"any"))})]}),(0,a.jsxs)("section",{"aria-label":"Games that fit","aria-busy":null===_||P,className:"space-y-3 border-t border-line pt-4",children:[null==x?void 0:x(_),A?(0,a.jsx)(u.lZ,{kind:"fail",title:"That didn't load",action:(0,a.jsx)(u.$n,{variant:"secondary",icon:(0,a.jsx)(c.A,{className:"h-4 w-4"}),onClick:()=>G(e=>e+1),children:"Try again"}),children:A}):null===_?(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)(u.EA,{label:"Finding games",className:"h-16 w-full"}),(0,a.jsx)(u.EA,{className:"h-16 w-full"})]}):0===_.items.length?(0,a.jsxs)("div",{className:"py-4 text-center","data-pool-empty":!0,children:[(0,a.jsx)("p",{className:"font-semibold text-ink",children:"Nothing fits that"}),(0,a.jsx)("p",{className:"mt-1 text-small text-ink-muted",children:f})]}):(0,a.jsxs)("div",{className:(0,u.cx)("space-y-2 transition-opacity",P&&"opacity-60"),children:[(0,a.jsxs)("p",{className:"text-small text-ink-muted","aria-live":"polite","data-pool-count":!0,children:[1===_.count?"1 game fits":"".concat(_.count," games fit"),_.count>_.items.length?". The best ".concat(_.items.length,":"):", best first:"]}),(0,a.jsx)("ol",{className:"divide-y divide-line rounded-control border border-line",children:_.items.map(e=>(0,a.jsxs)("li",{className:"flex min-h-target-lg items-center gap-3 px-3 py-2","data-pool-item":e.title,children:[(0,a.jsx)(d.Kr,{game:{id:e.key,title:e.title,status:"ready",cover_url:e.cover_url},className:"h-14 w-14 shrink-0 rounded-control"}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("p",{className:"text-small font-semibold text-ink",children:e.title}),(0,a.jsx)("p",{className:"text-meta text-ink-muted",children:function(e,t){let n=[],a=(0,r.gS)(e.min_players,e.max_players);a&&n.push(e.with_expansions?"".concat(a," with expansions"):a);let l=(0,r.BI)(e.play_time_minutes);return l&&n.push(l),t&&"fits"===e.fit.weight&&n.push(o.Kg[t]),n.join(" \xb7 ")||"No details on record"}(e,N)}),(0,a.jsx)("p",{className:"text-meta text-ink-muted","data-pool-owners":!0,children:function(e){var t,n;let a=[...e.yours?["You"]:[],...e.owners.filter(e=>"You"!==e)],l=e.owner_count-a.length;if(0===a.length)return"".concat(e.owner_count," ").concat(1===e.owner_count?"person owns":"people own"," it");l>0&&a.push("".concat(l," more"));let s=1===a.length&&"You"!==a[0];return"".concat((t=a).length<=1?null!=(n=t[0])?n:"":"".concat(t.slice(0,-1).join(", ")," and ").concat(t[t.length-1])," ").concat(s?"owns":"own"," it")}(e)})]}),(0,a.jsx)("div",{className:"shrink-0",children:p(e,_)})]},e.key))})]})]})]})}}}]);
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.