(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,658045,e=>{"use strict";var l=e.i(651681);let t={name:"rotate-ccw",size:24,node:[["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"}]]};t.node;let s=(0,l.f)(t);e.s(["f",0,s],658045)},265716,e=>{"use strict";e.s(["f",0,function(e,l,t){return null===e&&null===l?0:null===e?1:null===l?-1:"ascending"===t?e-l:l-e}])},640645,e=>{"use strict";var l=e.i(659350),t=e.i(663456),s=e.i(136562),r=e.i(196991),o=e.i(169798),a=e.i(914571);let i=o.default.env.NEXT_PUBLIC_MODEL_ASSETS_CDN_BASE,n=[a.O.production,a.O.local,a.O.local.replace("127.0.0.1","localhost")].flatMap(e=>{let l=(0,a.o)(e);return void 0===l?[]:[l]});function d(e){let o,d,c=(0,t.c)(11),{src:m,title:u,className:x}=e;if(!function(e,l=i){if(!URL.canParse(e))return!1;let t=new URL(e);return""===t.username&&""===t.password&&(function(e=i){let l=(0,a.o)(e);return void 0===l?n:[...n,l]})(l).some(e=>t.origin===e.origin&&t.pathname.startsWith(e.pathPrefix))}(m)){let e,t,o;return c[0]!==x?(e=(0,s.f)("flex items-center justify-center","bg-muted text-muted-foreground text-sm",x),c[0]=x,c[1]=e):e=c[1],c[2]===Symbol.for("react.memo_cache_sentinel")?(t=(0,l.jsx)(r.T,{children:"Game source is not on the model-assets CDN"}),c[2]=t):t=c[2],c[3]!==e?(o=(0,l.jsx)("div",{role:"alert",className:e,children:t}),c[3]=e,c[4]=o):o=c[4],o}return c[5]!==x?(o=(0,s.f)("block border-0 bg-black",x),c[5]=x,c[6]=o):o=c[6],c[7]!==m||c[8]!==o||c[9]!==u?(d=(0,l.jsx)("iframe",{src:m,title:u,sandbox:"allow-scripts allow-pointer-lock",referrerPolicy:"no-referrer",loading:"lazy",allow:"accelerometer 'none'; camera 'none'; geolocation 'none'; microphone 'none'; payment 'none'",className:o}),c[7]=m,c[8]=o,c[9]=u,c[10]=d):d=c[10],d}var c=e.i(139697),m=e.i(894868),u=e.i(960773),x=e.i(138257);e.i(707060);var h=e.i(288265),f=e.i(527993),p=e.i(502704),g=e.i(658045),b=e.i(96659),j=e.i(16043);e.i(406201);var v=e.i(967605),y=e.i(714170),_=e.i(575639),N=e.i(387086),k=e.i(265716);let S=["cost","time"],w={cost:(0,N.b)("Cost"),time:(0,N.b)("Generation time")},U={cost:"asc",time:"asc"},C={cost:e=>e.costUsd,time:e=>e.generationTimeMs};var T=e.i(80676),z=e.i(647402),M=e.i(612927),B=e.i(536960),L=e.i(700009);function E(e){let s,o,a,i,n,m,u,f,p,b,v,_,N,k,S,w,U,C,E,A,O,R,G,I,K=(0,t.c)(59),{entry:D,prompt:J,open:Q,onClose:X,onRestart:q}=e,F=(0,h.f)(),H=(0,x.useLocale)(),[W,Y]=(0,j.useState)(0);K[0]!==q?(s=()=>{Y(P),q()},K[0]=q,K[1]=s):s=K[1];let V=s;K[2]!==X?(o=e=>{e||X()},K[2]=X,K[3]=o):o=K[3],K[4]!==D.model.name||K[5]!==F?(a=F("{model} game",{model:D.model.name}),K[4]=D.model.name,K[5]=F,K[6]=a):a=K[6];let Z=D.model,$=D.provider;K[7]!==F?(i=F("Close"),K[7]=F,K[8]=i):i=K[8],K[9]===Symbol.for("react.memo_cache_sentinel")?(n=(0,l.jsx)(M.X,{className:"size-4"}),K[9]=n):n=K[9],K[10]!==X||K[11]!==i?(m=(0,l.jsx)(c.Button,{variant:"outline",size:"icon",onClick:X,"aria-label":i,className:"shrink-0",children:n}),K[10]=X,K[11]=i,K[12]=m):m=K[12],K[13]!==D.model||K[14]!==D.provider||K[15]!==m?(u=(0,l.jsx)(L.H,{model:Z,provider:$,actions:m}),K[13]=D.model,K[14]=D.provider,K[15]=m,K[16]=u):u=K[16];let ee=D.documentUrl;return K[17]!==D.model.name||K[18]!==F?(f=F("{model} game",{model:D.model.name}),K[17]=D.model.name,K[18]=F,K[19]=f):f=K[19],K[20]!==D.documentUrl||K[21]!==W||K[22]!==f?(p=(0,l.jsx)("div",{className:"relative min-h-0 flex-1 overflow-hidden rounded-md bg-black",children:(0,l.jsx)(d,{src:ee,title:f,className:"absolute inset-0 size-full"},W)}),K[20]=D.documentUrl,K[21]=W,K[22]=f,K[23]=p):p=K[23],K[24]===Symbol.for("react.memo_cache_sentinel")?(b=(0,l.jsx)("p",{className:"text-overline text-muted-foreground md:hidden",children:(0,l.jsx)(r.T,{children:"For the best experience, play this game in a desktop browser."})}),K[24]=b):b=K[24],K[25]===Symbol.for("react.memo_cache_sentinel")?(v=(0,l.jsxs)("span",{className:"text-muted-foreground",children:[(0,l.jsx)(r.T,{children:"Cost"})," "]}),K[25]=v):v=K[25],K[26]!==D.costUsd||K[27]!==H?(_=(0,y.J)(H,D.costUsd),K[26]=D.costUsd,K[27]=H,K[28]=_):_=K[28],K[29]!==_?(N=(0,l.jsxs)("span",{children:[v,_]}),K[29]=_,K[30]=N):N=K[30],K[31]===Symbol.for("react.memo_cache_sentinel")?(k=(0,l.jsx)(z.f,{className:"text-muted-foreground/40"}),K[31]=k):k=K[31],K[32]===Symbol.for("react.memo_cache_sentinel")?(S=(0,l.jsxs)("span",{className:"text-muted-foreground",children:[(0,l.jsx)(r.T,{children:"Generation time"})," "]}),K[32]=S):S=K[32],K[33]!==D.generationTimeMs||K[34]!==F||K[35]!==H?(w=(0,B.f)(F,H,D.generationTimeMs),K[33]=D.generationTimeMs,K[34]=F,K[35]=H,K[36]=w):w=K[36],K[37]!==w?(U=(0,l.jsxs)("span",{className:"flex items-center gap-3",children:[k,(0,l.jsxs)("span",{children:[S,w]})]}),K[37]=w,K[38]=U):U=K[38],K[39]===Symbol.for("react.memo_cache_sentinel")?(C=(0,l.jsx)(g.f,{className:"size-4"}),E=(0,l.jsx)(r.T,{children:"Restart"}),K[39]=C,K[40]=E):(C=K[39],E=K[40]),K[41]!==V?(A=(0,l.jsxs)(c.Button,{variant:"outline",size:"sm",onClick:V,className:"ml-auto",children:[C,E]}),K[41]=V,K[42]=A):A=K[42],K[43]!==N||K[44]!==U||K[45]!==A?(O=(0,l.jsxs)(L.d,{children:[N,U,A]}),K[43]=N,K[44]=U,K[45]=A,K[46]=O):O=K[46],K[47]!==J?(R=(0,l.jsx)("p",{tabIndex:0,className:"max-h-[3lh] min-w-0 shrink-0 overflow-y-auto whitespace-pre-wrap border-t border-border pt-3 text-body leading-relaxed text-muted-foreground focus-visible:border-focus-border focus-visible:shadow-focus focus-visible:outline-none",children:J}),K[47]=J,K[48]=R):R=K[48],K[49]!==p||K[50]!==O||K[51]!==R||K[52]!==a||K[53]!==u?(G=(0,l.jsxs)(T.d,{"aria-label":a,showCloseButton:!1,keepMounted:!1,className:"flex h-[calc(100dvh-2rem)] w-[calc(100vw-2rem)] max-w-none flex-col gap-3 rounded-xl p-4",children:[u,p,b,O,R]}),K[49]=p,K[50]=O,K[51]=R,K[52]=a,K[53]=u,K[54]=G):G=K[54],K[55]!==Q||K[56]!==o||K[57]!==G?(I=(0,l.jsx)(T.N,{open:Q,onOpenChange:o,children:G}),K[55]=Q,K[56]=o,K[57]=G,K[58]=I):I=K[58],I}function P(e){return e+1}var A=e.i(381084),O=e.i(9251),R=e.i(33706);function G(e){let s,r,o,a,i,n,d,c,m,x,f=(0,t.c)(44),{scenario:p,activeEntryId:g,onActiveEntryChange:b}=e,v=(0,u.Q)(),y=(0,h.f)();f[0]===Symbol.for("react.memo_cache_sentinel")?(s={key:"cost",dir:U.cost},f[0]=s):s=f[0];let[N,T]=(0,j.useState)(s);f[1]!==v||f[2]!==N.dir||f[3]!==N.key?(r=e=>{let l="asc"===N.dir?"desc":"asc",t=e===N.key?l:U[e];T({key:e,dir:t}),v.capture("click_benchmark_explore_sort",{modality:"game",sort_key:e,sort_dir:t})},f[1]=v,f[2]=N.dir,f[3]=N.key,f[4]=r):r=f[4];let z=r;f[5]!==v||f[6]!==p.id?(o=()=>{v.capture("copy_benchmark_explore_prompt",{modality:"game",scenario:p.id})},f[5]=v,f[6]=p.id,f[7]=o):o=f[7];let M=o;if(f[8]!==g||f[9]!==y||f[10]!==b||f[11]!==M||f[12]!==z||f[13]!==p.entries||f[14]!==p.prompt||f[15]!==N){var B;let e,t,s,r,o=(B=p.entries,s=C[N.key],r="asc"===N.dir?"ascending":"descending",[...B].sort((e,l)=>(0,k.f)(s(e),s(l),r)));n="flex flex-col gap-4",f[21]!==M||f[22]!==p.prompt?(d=(0,l.jsx)(R.f,{prompt:p.prompt,onCopy:M}),f[21]=M,f[22]=p.prompt,f[23]=d):d=f[23],f[24]!==y?(e=y("Sort games"),f[24]=y,f[25]=e):e=f[25],f[26]!==z||f[27]!==N.dir||f[28]!==N.key||f[29]!==e?(c=(0,l.jsx)(_.f,{ariaLabel:e,keys:S,labels:w,sortKey:N.key,dir:N.dir,onSort:z}),f[26]=z,f[27]=N.dir,f[28]=N.key,f[29]=e,f[30]=c):c=f[30],a="grid grid-cols-1 items-start gap-4 lg:grid-cols-2",f[31]!==g||f[32]!==b||f[33]!==p.prompt||f[34]!==N.key?(t=e=>(0,l.jsx)(I,{entry:e,prompt:p.prompt,sortKey:N.key,isActive:g===e.id,onActiveEntryChange:b},e.id),f[31]=g,f[32]=b,f[33]=p.prompt,f[34]=N.key,f[35]=t):t=f[35],i=o.map(t),f[8]=g,f[9]=y,f[10]=b,f[11]=M,f[12]=z,f[13]=p.entries,f[14]=p.prompt,f[15]=N,f[16]=a,f[17]=i,f[18]=n,f[19]=d,f[20]=c}else a=f[16],i=f[17],n=f[18],d=f[19],c=f[20];return f[36]!==a||f[37]!==i?(m=(0,l.jsx)("ul",{className:a,children:i}),f[36]=a,f[37]=i,f[38]=m):m=f[38],f[39]!==n||f[40]!==d||f[41]!==c||f[42]!==m?(x=(0,l.jsxs)("div",{className:n,children:[d,c,m]}),f[39]=n,f[40]=d,f[41]=c,f[42]=m,f[43]=x):x=f[43],x}function I(e){let o,a,i,n,_,N,k,S,w,U,C,T,z,M,L,P,R,G,I,J,Q,X,q,F,H,W,Y,V,Z=(0,t.c)(92),{entry:$,prompt:ee,sortKey:el,isActive:et,onActiveEntryChange:es}=e,er=(0,u.Q)(),eo=(0,h.f)(),ea=(0,x.useLocale)(),[ei,en]=(0,j.useState)(0),[ed,ec]=(0,j.useState)(!1);Z[0]!==$.model?(o=(0,O.Y)($.model),Z[0]=$.model,Z[1]=o):o=Z[1];let em=o;Z[2]!==$.id||Z[3]!==$.model.id||Z[4]!==et||Z[5]!==es||Z[6]!==er?(a=()=>{er.capture("play_benchmark_explore_game",{model:$.model.id,restart:et,expanded:!1}),en(K),es($.id)},Z[2]=$.id,Z[3]=$.model.id,Z[4]=et,Z[5]=es,Z[6]=er,Z[7]=a):a=Z[7];let eu=a;Z[8]!==$.model.id||Z[9]!==es||Z[10]!==er?(i=()=>{er.capture("play_benchmark_explore_game",{model:$.model.id,restart:!1,expanded:!0}),es(null),ec(!0)},Z[8]=$.model.id,Z[9]=es,Z[10]=er,Z[11]=i):i=Z[11];let ex=i;Z[12]!==$.model.id||Z[13]!==er?(n=()=>{er.capture("play_benchmark_explore_game",{model:$.model.id,restart:!0,expanded:!0})},Z[12]=$.model.id,Z[13]=er,Z[14]=n):n=Z[14];let eh=n;Z[15]!==$.model.author||Z[16]!==$.model.id?(_=(0,l.jsx)(m.f,{author:$.model.author,permaslug:$.model.id,frame:!0,className:"size-5 shrink-0"}),Z[15]=$.model.author,Z[16]=$.model.id,Z[17]=_):_=Z[17],Z[18]!==$.model?(N=(0,A.f)($.model),Z[18]=$.model,Z[19]=N):N=Z[19],Z[20]!==$.model.name||Z[21]!==em||Z[22]!==N?(k=(0,l.jsx)(v.Link,{href:N,title:$.model.name,className:"truncate text-body font-medium text-foreground hover:underline",children:em}),Z[20]=$.model.name,Z[21]=em,Z[22]=N,Z[23]=k):k=Z[23],Z[24]!==eo||Z[25]!==em?(S=eo("Expand {label}",{label:em}),Z[24]=eo,Z[25]=em,Z[26]=S):S=Z[26],Z[27]===Symbol.for("react.memo_cache_sentinel")?(w=(0,l.jsx)(f.f,{className:"size-4"}),Z[27]=w):w=Z[27],Z[28]!==ex||Z[29]!==S?(U=(0,l.jsx)(c.Button,{variant:"ghost",size:"icon-sm",tone:"subdued",onClick:ex,"aria-label":S,className:"ml-auto shrink-0",children:w}),Z[28]=ex,Z[29]=S,Z[30]=U):U=Z[30],Z[31]!==U||Z[32]!==_||Z[33]!==k?(C=(0,l.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[_,k,U]}),Z[31]=U,Z[32]=_,Z[33]=k,Z[34]=C):C=Z[34],Z[35]!==$.provider?(T=null!==$.provider&&(0,l.jsx)("span",{className:"-mt-2 truncate text-overline leading-snug text-muted-foreground",children:$.provider}),Z[35]=$.provider,Z[36]=T):T=Z[36],Z[37]===Symbol.for("react.memo_cache_sentinel")?(z=()=>ec(!1),Z[37]=z):z=Z[37],Z[38]!==$||Z[39]!==ed||Z[40]!==eh||Z[41]!==ee?(M=(0,l.jsx)(E,{entry:$,prompt:ee,open:ed,onClose:z,onRestart:eh}),Z[38]=$,Z[39]=ed,Z[40]=eh,Z[41]=ee,Z[42]=M):M=Z[42],Z[43]!==$.documentUrl||Z[44]!==$.model.name||Z[45]!==$.thumbnailUrl||Z[46]!==eo||Z[47]!==et||Z[48]!==em||Z[49]!==ei||Z[50]!==eu?(L=(0,l.jsx)("div",{className:"relative aspect-4/3 overflow-hidden rounded-md bg-black",children:et?(0,l.jsx)(d,{src:$.documentUrl,title:eo("{model} game",{model:$.model.name}),className:"absolute inset-0 size-full"},ei):(0,l.jsxs)("div",{className:"absolute inset-0 flex items-center justify-center",children:[null!==$.thumbnailUrl&&(0,l.jsx)(b.default,{src:$.thumbnailUrl,alt:eo("Still from the {model} game",{model:$.model.name}),fill:!0,sizes:"(min-width: 1024px) 50vw, 100vw",loading:"lazy",className:"object-cover"}),(0,l.jsxs)(c.Button,{variant:"outline",onClick:eu,"aria-label":eo("Play {label}",{label:em}),className:"relative",children:[(0,l.jsx)(p.f,{className:"size-4"}),(0,l.jsx)(r.T,{children:"Play"})]})]})}),Z[43]=$.documentUrl,Z[44]=$.model.name,Z[45]=$.thumbnailUrl,Z[46]=eo,Z[47]=et,Z[48]=em,Z[49]=ei,Z[50]=eu,Z[51]=L):L=Z[51],Z[52]!==eo?(P=eo("Cost"),Z[52]=eo,Z[53]=P):P=Z[53];let ef="cost"===el;Z[54]!==$.costUsd||Z[55]!==ea?(R=(0,y.J)(ea,$.costUsd),Z[54]=$.costUsd,Z[55]=ea,Z[56]=R):R=Z[56],Z[57]!==P||Z[58]!==ef||Z[59]!==R?(G=(0,l.jsx)(D,{label:P,active:ef,children:R}),Z[57]=P,Z[58]=ef,Z[59]=R,Z[60]=G):G=Z[60],Z[61]!==eo?(I=eo("Generation time"),Z[61]=eo,Z[62]=I):I=Z[62];let ep="time"===el;Z[63]!==$.generationTimeMs||Z[64]!==eo||Z[65]!==ea?(J=(0,B.f)(eo,ea,$.generationTimeMs),Z[63]=$.generationTimeMs,Z[64]=eo,Z[65]=ea,Z[66]=J):J=Z[66],Z[67]!==I||Z[68]!==ep||Z[69]!==J?(Q=(0,l.jsx)(D,{label:I,active:ep,children:J}),Z[67]=I,Z[68]=ep,Z[69]=J,Z[70]=Q):Q=Z[70];let eg=!et&&"invisible";Z[71]!==eg?(X=(0,s.f)("flex justify-end",eg),Z[71]=eg,Z[72]=X):X=Z[72];let eb=!et,ej=et?void 0:-1;return Z[73]===Symbol.for("react.memo_cache_sentinel")?(q=(0,l.jsx)(g.f,{className:"size-4"}),F=(0,l.jsx)(r.T,{children:"Restart"}),Z[73]=q,Z[74]=F):(q=Z[73],F=Z[74]),Z[75]!==eu||Z[76]!==eb||Z[77]!==ej?(H=(0,l.jsxs)(c.Button,{variant:"ghost",size:"sm",onClick:eu,"aria-hidden":eb,tabIndex:ej,children:[q,F]}),Z[75]=eu,Z[76]=eb,Z[77]=ej,Z[78]=H):H=Z[78],Z[79]!==X||Z[80]!==H?(W=(0,l.jsx)("div",{className:X,children:H}),Z[79]=X,Z[80]=H,Z[81]=W):W=Z[81],Z[82]!==G||Z[83]!==Q||Z[84]!==W?(Y=(0,l.jsxs)("div",{className:"grid grid-cols-3 items-end gap-x-3",children:[G,Q,W]}),Z[82]=G,Z[83]=Q,Z[84]=W,Z[85]=Y):Y=Z[85],Z[86]!==C||Z[87]!==T||Z[88]!==M||Z[89]!==L||Z[90]!==Y?(V=(0,l.jsxs)("li",{className:"flex flex-col gap-3 rounded-lg border border-border bg-card p-4",children:[C,T,M,L,Y]}),Z[86]=C,Z[87]=T,Z[88]=M,Z[89]=L,Z[90]=Y,Z[91]=V):V=Z[91],V}function K(e){return e+1}function D(e){let r,o,a,i,n=(0,t.c)(10),{label:d,active:c,children:m}=e;n[0]!==d?(r=(0,l.jsx)("span",{className:"text-muted-foreground",children:d}),n[0]=d,n[1]=r):r=n[1];let u=c?"text-foreground":"text-muted-foreground";return n[2]!==u?(o=(0,s.f)("text-body tabular-nums",u),n[2]=u,n[3]=o):o=n[3],n[4]!==m||n[5]!==o?(a=(0,l.jsx)("span",{className:o,children:m}),n[4]=m,n[5]=o,n[6]=a):a=n[6],n[7]!==r||n[8]!==a?(i=(0,l.jsxs)("div",{className:"flex flex-col gap-0.5",children:[r,a]}),n[7]=r,n[8]=a,n[9]=i):i=n[9],i}e.s(["GameScenarioSections",0,function(e){let s,r,o=(0,t.c)(9),{scenarios:a,scenarioHeading:i}=e,[n,d]=(0,j.useState)(null);if(o[0]!==i||o[1]!==n||o[2]!==a){let e;o[4]!==i||o[5]!==n?(e=e=>(0,l.jsxs)("section",{className:"flex flex-col gap-4",children:[null!==i&&(0,l.jsx)(i,{className:"text-heading font-medium tracking-tight",children:e.heading}),(0,l.jsx)(G,{scenario:e,activeEntryId:n,onActiveEntryChange:d})]},e.id),o[4]=i,o[5]=n,o[6]=e):e=o[6],s=a.map(e),o[0]=i,o[1]=n,o[2]=a,o[3]=s}else s=o[3];return o[7]!==s?(r=(0,l.jsx)("div",{className:"flex flex-col gap-8",children:s}),o[7]=s,o[8]=r):r=o[8],r}],640645)}]); //# sourceMappingURL=1t-19g6baydv3.js.map