1import"../chunks/DsnmJJEf.js";import{s as p,e as Ye,d as Ue,o as Me,h as st}from"../chunks/BOOa181H.js";import{o as rt,y as it,av as ot,an as nt,a$ as lt,b0 as dt,p as Ne,Z as E,a1 as ae,f as N,d as n,s as r,r as i,t as se,k as e,b as C,c as De,Y as v,g as ct,a as pe,a0 as qe,A as $e,$ as vt}from"../chunks/YEsR6uFO.js";import{i as ne}from"../chunks/C7VAiwEf.js";import{e as me,i as Te,s as be}from"../chunks/JuV6_9Fc.js";import{s as ye,r as pt}from"../chunks/D1LHmu9n.js";import{b as mt}from"../chunks/CT0gFCUB.js";import{b as Oe}from"../chunks/x5owbScQ.js";import{e as f,N as Be,O as ut,P as Se,S as w,l as ft,i as Pe,m as ht,h as gt,U as _t,R as bt}from"../chunks/BX89j6Ey.js";import{s as Ve}from"../chunks/BOqzVGlu.js";import{A as Ie}from"../chunks/BnRXofNu.js";import{u as yt,i as xt}from"../chunks/CeMpAR9-.js";import{S as je}from"../chunks/w8qUT6hK.js";import"../chunks/DrYIpLXy.js";import{N as wt}from"../chunks/CTfSxlx9.js";import{p as kt}from"../chunks/CxSO0-5B.js";function We(o,s,d=!1){if(o.multiple){if(s==null)return;if(!nt(s))return lt();for(var l of o.options)l.selected=s.includes(ke(l));return}for(l of o.options){var u=ke(l);if(dt(u,s)){l.selected=!0;return}}(!d||s!==void 0)&&(o.selectedIndex=-1)}function Tt(o){var s=new MutationObserver(()=>{We(o,o.__value)});s.observe(o,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),ot(()=>{s.disconnect()})}function St(o,s,d=s){var l=!0;rt(o,"change",u=>{var m=u?"[selected]":":checked",k;if(o.multiple)k=[].map.call(o.querySelectorAll(m),ke);else{var g=o.querySelector(m)??o.querySelector("option:not([disabled])");k=g&&ke(g)}d(k)}),it(()=>{var u=s();if(We(o,u,l),l&&u===void 0){var m=o.querySelector(":checked");m!==null&&(u=ke(m),d(u))}o.__value=u,l=!1}),Tt(o)}function ke(o){return"__value"in o?o.__value:o.value}var Ct=(o,s)=>{(o.key==="Enter"||o.key===" ")&&s(o)},Et=(o,s)=>{Se(s.game)},At=(o,s)=>{(o.key==="Enter"||o.key===" ")&&Se(s.game)},It=(o,s,d)=>{o.stopPropagation(),s.tagClick(e(d))},Nt=N('<button class="tag svelte-te8s37"> </button>'),Dt=N('<div><button type="button" aria-label="Pin game" tabindex="0">â
</button> <div aria-label="Open game" tabindex="-1" role="link"><div class="card-bg svelte-te8s37"></div> <div class="card-shine svelte-te8s37"></div> <div class="card-content svelte-te8s37"><div class="content-inner svelte-te8s37"><h2 class="card-title svelte-te8s37"> </h2> <p class="small-text svelte-te8s37"> </p> <p class="card-description svelte-te8s37"> </p> <div class="card-tags svelte-te8s37"></div></div></div></div></div>');function Pt(o,s){Ne(s,!0);const{gameID:d,thumbPath:l,fName:u,description:m,tags:k,clicks:g,uploadedTimestamp:O,updatedTimestamp:B}=s.game;let j=`https://cdn.jsdelivr.net/gh/ccported/games@${s.commitHash}/${d}${l}`,M=E(ae(!!f.pinnedGames.includes(d))),h,y=E(!1);function z(_){_.stopPropagation(),f.pinnedGames.includes(d)?(v(M,!1),f.pinnedGames=f.pinnedGames.filter(b=>b!==d)):(v(M,!0),f.pinnedGames=[d,...f.pinnedGames])}let A=Date.now()-B<6048e5&&B&&B>0,D=Date.now()-O<6048e5&&O&&O>0,L=A&&!D?" (Updated)":D?" (New)":"";function ue(_){if(!h)return;const b=h.getBoundingClientRect(),x=_.clientX-b.left,F=_.clientY-b.top,V=b.width/2,ie=b.height/2,oe=(F-ie)/ie*-15,ve=(x-V)/V*15;h.style.transform=`perspective(1000px) rotateX(${oe}deg) rotateY(${ve}deg) translateZ(20px)`}function Q(){v(y,!0),h&&(h.style.transition="transform 0.1s ease-out")}function fe(){v(y,!1),h&&(h.style.transition="transform 0.6s cubic-bezier(0.23, 1, 0.320, 1)",h.style.transform="perspective(1000px) rotateX(0deg) rotateY(0deg) translateZ(0px)")}var W=Dt();let ee;var te=n(W);let K;te.__click=z,te.__keydown=[Ct,z];var P=r(te,2);let le;P.__click=[Et,s],P.__keydown=[At,s],P.__mousemove=ue;var H=n(P),de=r(H,4),Z=n(de),re=n(Z),he=n(re);i(re);var ce=r(re,2),ge=n(ce);i(ce);var R=r(ce,2),U=n(R,!0);i(R);var G=r(R,2);me(G,21,()=>k,Te,(_,b)=>{var x=Nt();x.__click=[It,s,b];var F=n(x,!0);i(x),se(V=>{ye(x,"data-tag",e(b)),p(F,V)},[()=>Be(e(b))]),C(_,x)}),i(G),i(Z),i(de),i(P),Oe(P,_=>h=_,()=>h),i(W),se((_,b,x,F)=>{ee=be(W,1,"card-wrapper svelte-te8s37",null,ee,_),Ve(W,`position: relative; animation-delay: ${s.i<25?s.i*75:1875}ms`),K=be(te,1,"star-icon svelte-te8s37",null,K,b),le=be(P,1,`card ${f.homeView??""}`,"svelte-te8s37",le,x),ye(P,"id",d),Ve(H,`background-image: url(${j})`),p(he,`${u??""}${L}`),p(ge,`${F??""} Plays`),p(U,m)},[()=>({new:D||A,starred:e(M)}),()=>({starred:e(M)}),()=>({hovered:e(y)}),()=>ut(g)??0]),Ye("mouseenter",P,Q),Ye("mouseleave",P,fe),C(o,W),De()}Ue(["click","keydown","mousemove"]);async function Lt(){if(!w.awsReady||!w.dynamoDBClient)throw new Error("AWS not initialized");const o=new je({TableName:"games_list",ProjectionExpression:"gameID, thumbPath, fName, description, tags, clicks, uploadedTimestamp, updatedTimestamp",FilterExpression:"isOnline = :trueVal",ExpressionAttributeValues:{":trueVal":{BOOL:!0}}}
1),s=await w.dynamoDBClient.send(o),d=s.Items?s.Items.map(l=>yt(l)):[];f.games=[];for(const l of d)l.gameID&&l.fName&&l.thumbPath&&f.games.push({gameID:l.gameID,thumbPath:l.thumbPath,fName:l.fName,description:l.description,tags:l.tags,clicks:l.clicks,uploadedTimestamp:l.uploadedTimestamp,updatedTimestamp:l.updatedTimestamp});return w.plays=f.games.reduce((l,u)=>l+u.clicks,0),f.games=f.games,f.games}var Rt=(o,s)=>{o.target===o.currentTarget&&s()},Gt=N('<li class="search-result-row svelte-1d0pp5m">No results found</li>'),$t=(o,s)=>Se(e(s).game),Ot=N('<span style="background: #eee; border-radius: 4px; padding: 2px 6px; margin-right: 4px; font-size: 0.8em;" class="svelte-1d0pp5m"> </span>'),Bt=N(' | <span class="svelte-1d0pp5m"></span>',1),Ut=N('<li><img class="svelte-1d0pp5m"/> <div style="flex: 1;" class="svelte-1d0pp5m"><div class="game-name svelte-1d0pp5m"> </div> <div class="game-description svelte-1d0pp5m"> </div> <div class="game-plays svelte-1d0pp5m"> <!></div></div></li>'),Mt=N('<div class="sidebar-ad left-sidebar svelte-1d0pp5m"><div class="xxx r svelte-1d0pp5m"><!></div></div>'),zt=(o,s)=>{const d=s();if(d.length>0){const l=d[Math.floor(Math.random()*d.length)];Se(l)}},Ht=(o,s)=>s(),Ft=N('<div class="load-shimmer svelte-1d0pp5m"> </div>'),Yt=N('<div class="inxxx agrid grid svelte-1d0pp5m"><!></div>'),qt=N('<div class="inxxx agrid grid svelte-1d0pp5m"><div style="text-align: center; font-size: 0.9rem; color: #555;width:100%;height:100%;display: flex;flex-direction: column;justify-content: center;align-items: center;" class="svelte-1d0pp5m"><p class="svelte-1d0pp5m">Contact <a href="mailto:[email protected]" class="svelte-1d0pp5m">[email protected]</a> to advertise in this slot</p></div></div>'),Vt=N("<!> <!> <!>",1),jt=N('<div class="sidebar-ad right-sidebar svelte-1d0pp5m"><div class="xxx r svelte-1d0pp5m"><!></div></div> <div class="footer-ad svelte-1d0pp5m"><!></div>',1),Wt=N('<div><div class="search svelte-1d0pp5m"><input id="search" type="text" placeholder="Search..." autocomplete="off" autocorrect="off" autosave="off" class="svelte-1d0pp5m"/> <div class="results-inner-container svelte-1d0pp5m"><ul class="results svelte-1d0pp5m"><!> <!></ul></div></div></div> <div class="main-content-wrapper svelte-1d0pp5m"><!> <div class="container svelte-1d0pp5m"><div class="sort-bar svelte-1d0pp5m"><select id="sort-select" class="svelte-1d0pp5m"><option class="svelte-1d0pp5m">Recommended</option><option class="svelte-1d0pp5m">A â Z</option><option class="svelte-1d0pp5m">Z â A</option><option class="svelte-1d0pp5m">Clicks â</option><option class="svelte-1d0pp5m">Clicks â</option><option class="svelte-1d0pp5m">Newest</option><option class="svelte-1d0pp5m">Oldest</option></select> <button class="choose-for-me svelte-1d0pp5m">Choose for me</button> <button class="search-button svelte-1d0pp5m" title="Search" aria-label="Search"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-search svelte-1d0pp5m"><circle cx="11" cy="11" r="8" class="svelte-1d0pp5m"></circle><line x1="21" y1="21" x2="16.65" y2="16.65" class="svelte-1d0pp5m"></line></svg></button></div> <div><!> <!></div></div> <!></div>',1);function Kt(o,s){Ne(s,!0);let d=E(!1),l=E(ae([])),u=E(!1),m=E(null),k=E("default");function g(){let t=[...e(l)];switch(e(k)){case"new":t.sort((a,c)=>c.uploadedTimestamp-a.uploadedTimestamp);break;case"old":t.sort((a,c)=>a.uploadedTimestamp-c.uploadedTimestamp);break;case"az":t.sort((a,c)=>a.fName.localeCompare(c.fName));break;case"za":t.sort((a,c)=>c.fName.localeCompare(a.fName));break;case"clicksAsc":t.sort((a,c)=>(a.clicks??0)-(c.clicks??0));break;case"clicksDesc":t.sort((a,c)=>(c.clicks??0)-(a.clicks??0));break;default:t.sort((a,c)=>{let T=f.pinnedGames.includes(a.gameID),$=f.pinnedGames.includes(c.gameID);if(T&&!$)return-1;if(!T&&$)return 1;let I=Date.now()-a.updatedTimestamp<6048e5&&a.updatedTimestamp&&a.updatedTimestamp>0,Y=Date.now()-a.uploadedTimestamp<6048e5&&a.uploadedTimestamp&&a.uploadedTimestamp>0,q=Date.now()-c.updatedTimestamp<6048e5&&c.updatedTimestamp&&c.updatedTimestamp>0,X=Date.now()-c.uploadedTimestamp<6048e5&&c.uploadedTimestamp&&c.uploadedTimestamp>0;if(Y&&!X)return-1;if(!Y&&X)return 1;if(I&&!q)return-1;if(!I&&q)return 1;const S=a.clicks??0;return(c.clicks??0)-S})}
1return console.log(`[R][CardGrid][getSortedGames] Sorted games by ${e(k)}, found ${t.length} games.`),t}function O(){const t=g();v(A,t.map(a=>({game:a,score:M(a,e(B))})).filter(({score:a})=>a>0).sort((a,c)=>c.score-a.score||c.game.clicks-a.game.clicks),!0)}let B=E("");function j(t){return t.toLowerCase()}function M(t,a){if(a=j(a),a==="")return 1;let c=0;for(const T of Object.keys(t)){const $=t[T];if(typeof $=="string"){const Y=j($).split(" "),q=a.split(" ");for(const X of q)Y.includes(X)?c+=1:Y.some(S=>S.startsWith(X))&&(c+=.5)}else if(Array.isArray($)){for(const I of $)if(typeof I=="string"){const q=j(Be(I)).split(" "),X=a.split(" ");for(const S of X)q.includes(S)?c+=1:q.some(J=>J.startsWith(S))&&(c+=.5)}}}return c}let h,y=E(0),z,A=E(ae([])),D=null,L=!0;function ue(t){const a=t.target;if(v(B,a.value,!0),D&&clearTimeout(D),L){L=!1,O(),v(y,0);return}D=setTimeout(()=>{O(),v(y,0)},150)}function Q(t){v(d,!e(d)),e(d)?(t&&v(B,t,!0),setTimeout(()=>{if(h.focus(),t){h.value=t;const a=new Event("input",{bubbles:!0});h.dispatchEvent(a)}},0)):(L=!0,v(B,""),O(),v(y,-1))}const fe=/[a-z0-9]/i;let W=E(!1),ee=E("");Me(async()=>{v(ee,await ft()||"",!0),await Pe(),v(l,await Lt(),!0),document.addEventListener("keydown",t=>{if(h)if(t.key.length==1&&fe.test(t.key.toLowerCase())&&!e(d)&&!t.metaKey&&!t.ctrlKey&&!t.altKey){t.preventDefault(),Q(),h.value+=t.key;const a=new Event("input",{bubbles:!0});h.dispatchEvent(a)}else e(d)&&(t.key==="ArrowDown"?(t.preventDefault(),e(A).length>0&&v(y,(e(y)+1)%e(A).length)):t.key==="ArrowUp"?(t.preventDefault(),e(A).length>0&&v(y,(e(y)-1+e(A).length)%e(A).length)):t.key==="Enter"&&e(y)>-1&&e(A)[e(y)]?(t.preventDefault(),Se(e(A)[e(y)].game)):t.key==="Escape"&&(t.preventDefault(),Q()))}),!w.ssr&&await(async t=>{v(W,t.adBlock,!0),v(u,t.adsEnabled,!0),v(m,t.adSlots,!0)})(await xt())}),ct(()=>{if(e(y)>-1&&z){const t=z.querySelector(".selected");t&&t.scrollIntoView({block:"nearest",behavior:"smooth"})}});var te=Wt(),K=pe(te);let P;K.__click=[Rt,Q];var le=n(K),H=n(le);pt(H),H.__input=ue,Oe(H,t=>h=t,()=>h);var de=r(H,2),Z=n(de),re=n(Z);{var he=t=>{var a=Gt();C(t,a)};ne(re,t=>{e(A).length===0&&t(he)})}var ce=r(re,2);me(ce,19,()=>e(A),t=>t.game.gameID,(t,a,c)=>{var T=Ut();let $;T.__click=[$t,a];var I=n(T),Y=r(I,2),q=n(Y),X=n(q,!0);i(q);var S=r(q,2),J=n(S,!0);i(S);var _e=r(S,2),Ee=n(_e),xe=r(Ee);{var Re=we=>{var Ae=Bt(),Fe=r(pe(Ae));me(Fe,21,()=>e(a).game.tags,Te,(et,tt)=>{var Ge=Ot(),at=n(Ge,!0);i(Ge),se(()=>p(at,e(tt))),C(et,Ge)}),i(Fe),C(we,Ae)};ne(xe,we=>{e(a).game.tags&&e(a).game.tags.length&&we(Re)})}i(_e),i(Y),i(T),se((we,Ae)=>{$=be(T,1,"search-result-row svelte-1d0pp5m",null,$,we),ye(I,"src",`https://cdn.jsdelivr.net/gh/ccported/games@${e(ee)}/${e(a).game.gameID}${e(a).game.thumbPath}`),ye(I,"alt",e(a).game.fName),p(X,e(a).game.fName),p(J,e(a).game.description),p(Ee,`Plays: ${Ae??""} `)},[()=>({selected:e(c)===e(y)}),()=>e(a).game.clicks.toLocaleString()??"0"]),C(t,T)}),i(Z),Oe(Z,t=>z=t,()=>z),i(de),i(le),i(K);var ge=r(K,2),R=n(ge);{var U=t=>{var a=Mt(),c=n(a),T=n(c);Ie(T,{get slotId(){return e(m).sidebar}}),i(c),i(a),C(t,a)};ne(R,t=>{e(u)&&e(m)&&t(U)})}var G=r(R,2),_=n(G),b=n(_),x=n(b);x.value=x.__value="default";var F=r(x);F.value=F.__value="az";var V=r(F);V.value=V.__value="za";var ie=r(V);ie.value=ie.__value="clicksAsc";var oe=r(ie);oe.value=oe.__value="clicksDesc";var ve=r(oe);ve.value=ve.__value="new";var Ce=r(ve);Ce.value=Ce.__value="old",i(b);var ze=r(b,2);ze.__click=[zt,g];var Ke=r(ze,2);Ke.__click=[Ht,Q],i(_);var Le=r(_,2),He=n(Le);{var Ze=t=>{var a=qe(),c=pe(a);me(c,16,()=>Array(12),Te,(T,$)=>{var I=Ft();C(T,I)}),C(t,a)};ne(He,t=>{e(l).length===0&&t(Ze)})}var Xe=r(He,2);me(Xe,19,g,t=>t.gameID,(t,a,c)=>{var T=Vt(),$=pe(T);Pt($,{get game(){return e(a)},get i(){return e(c)},get commitHash(){return e(ee)},tagClick:S=>{Q(Be(S))}});var I=r($,2);{var Y=S=>{var J=Yt(),_e=n(J);Ie(_e,{get slotId(){return e(m).grid}}),i(J),C(S,J)};ne(I,S=>{e(u)&&e(m)&&(e(c)+1)%10===0&&S(Y)})}var q=r(I,2);{var X=S=>{var J=qe(),_e=pe(J);{var Ee=xe=>{var Re=qt();C(xe,Re)};ne(_e,xe=>{(e(c)+1)%10===0&&xe(Ee)})}C(S,J)};ne(q,S=>{!e(W)&&!e(u)&&S(X)})}C(t,T)}),i(Le),i(G);var Je=r(G,2);{var Qe=t=>{var a=jt(),c=pe(a),T=n(c),$=n(T);Ie($,{get slotId(){return e(m).sidebar}}),i(T),i(c);var I=r(c,2),Y=n(I);Ie(Y,{get slotId(){return e(m).footer}}),i(I),C(t,a)};ne(Je,t=>{e(u)&&e(m)&&t(Qe)})}i(ge),se(t=>
1{P=be(K,1,"search-overlay svelte-1d0pp5m",null,P,t),be(Le,1,`card-grid ${f.homeView??""}`,"svelte-1d0pp5m")},[()=>({visible:e(d),hidden:!e(d)})]),mt(H,()=>e(B),t=>v(B,t)),St(b,()=>e(k),t=>v(k,t)),C(o,te),De()}Ue(["click","input"]);Ue(["click"]);var Zt=N("<tr><td> </td><td> </td><td> </td><td> </td></tr>"),Xt=N("<tr><td> </td><td> </td></tr>"),Jt=N('<div class="information svelte-jr6jxf"><b>Running Information:</b><br/> <br/> <br/> <br/> <br/> <br/> <br/> <table style="width:100%; margin: 10px 0; border-collapse: collapse; font-size: 12px;"><thead><tr><th style="border-bottom: 1px solid #ccc; text-align: left;">Server</th><th style="border-bottom: 1px solid #ccc; text-align: left;">Status</th><th style="border-bottom: 1px solid #ccc; text-align: left;">Ping (ms)</th><th style="border-bottom: 1px solid #ccc; text-align: left;">Check</th></tr></thead><tbody></tbody></table> <br/> <table style="width:100%; margin: 10px 0; border-collapse: collapse; font-size: 12px;"><thead><tr><th style="border-bottom: 1px solid #ccc; text-align: left;">AHost Hostname</th><th style="border-bottom: 1px solid #ccc; text-align: left;">ACode</th></tr></thead><tbody></tbody></table> <br/> <br/> <br/> <br/> <br/> <table style="width:100%; margin: 10px 0; border-collapse: collapse; font-size: 12px;"><thead><tr><th style="border-bottom: 1px solid #ccc; text-align: left;">AWS Ready</th><th style="border-bottom: 1px solid #ccc; text-align: left;">Identity ID</th><th style="border-bottom: 1px solid #ccc; text-align: left;">Access Key ID</th><th style="border-bottom: 1px solid #ccc; text-align: left;">Credentials Expires</th></tr></thead><tbody><tr><td> </td><td> </td><td> </td><td> </td></tr></tbody></table> <br/></div>');function Qt(o,s){Ne(s,!0);let d=E(ae(f)),l=E(ae(w)),u=E(ae(w.plays)),m=E("Fetching...");Me(async()=>{await Pe(),v(d,f,!0),v(l,w,!0),v(u,w.plays,!0);try{const R=await fetch("/version.txt",{method:"GET"});R.ok?v(m,(await R.text()).trim(),!0):v(m,"Error fetching version")}catch{v(m,"Error fetching version")}setTimeout(()=>{v(d,f,!0),v(l,w,!0),v(u,w.plays,!0)},5e3)});var k=Jt(),g=r(n(k),2),O=r(g,2),B=r(O,2),j=r(B,2),M=r(j,2),h=r(M,2),y=r(h,3),z=r(n(y));me(z,21,()=>e(l).serverResponses,Te,(R,U)=>{var G=Zt(),_=n(G),b=n(_,!0);i(_);var x=r(_),F=n(x,!0);i(x);var V=r(x),ie=n(V,!0);i(V);var oe=r(V),ve=n(oe,!0);i(oe),i(G),se(Ce=>{p(b,e(U).server.name),p(F,e(U).success?"Success":"Failed"),p(ie,Ce),p(ve,e(U).reason)},[()=>e(U).time.toFixed(2)]),C(R,G)}),i(z),i(y);var A=r(y),D=r(A,3),L=r(n(D));me(L,21,()=>f.aHosts,Te,(R,U)=>{var G=Xt(),_=n(G),b=n(_);i(_);var x=r(_),F=n(x,!0);i(x),i(G),se(()=>{p(b,`${e(U).hostname??""}${e(U).hostname&&ht&&e(U).hostname==kt.url.hostname?" (Active)":" (Inactive)"}`),p(F,e(U).acode)}),C(R,G)}),i(L),i(D);var ue=r(D,3),Q=r(ue,2),fe=r(Q,2),W=r(fe,2),ee=r(W,3),te=r(n(ee)),K=n(te),P=n(K),le=n(P,!0);i(P);var H=r(P),de=n(H,!0);i(H);var Z=r(H),re=n(Z,!0);i(Z);var he=r(Z),ce=n(he,!0);i(he),i(K),i(te),i(ee);var ge=r(ee);$e(),i(k),se((R,U,G,_,b,x)=>{p(g,` Browser: ${navigator.userAgent??""}`),p(O,` Host: ${window.location.hostname??""}`),p(B,` DevMode: ${e(l).devMode??""}`),p(j,` AdBlock Enabled: ${e(l).adBlockEnabled??""}`),p(M,` Ads Enabled: ${e(l).adsEnabled??""}`),p(h,` Current Server: ${e(d).currentServer.name??""} (Loaded ${e(d).servers.length??""})`),p(A,` AHost: ${R??""} (Loaded ${f.aHosts.length??""})`),p(ue,` Games Loaded: ${e(d).games.length??""} (${e(d).pinnedGames.length??""} pinned) - rendered ${e(d).homeView??""}`),p(Q,` Version: ${e(m)??""}`),p(fe,` Logged In: ${e(l).loggedIn??""}`),p(W,` SSR: ${e(l).ssr??""}`),p(le,e(l).awsReady?"Yes":"No"),ye(H,"title",e(l).credentials?.identityId||"-"),p(de,U),ye(Z,"title",e(l).credentials?.accessKeyId||"-"),p(re,G),p(ce,_),p(ge,` Plays: ${b??""} (${x??""} 2 local)`)},[()=>f.isAHost(),()=>e(l).credentials?.identityId.slice(0,10)+"..."||"-",()=>e(l).credentials?.accessKeyId.slice(0,6)+"..."||"-",()=>w.credentials?.expiration?.toLocaleTimeString()||"-",()=>e(u).toLocaleString(),()=>e(d).localPlays.toLocaleString()]),C(o,k),De()}async function ea(){const o="ccported_notifs",s=Date.now(),d=w.dynamoDBClient;(!d||!w.awsReady)&&await Pe();const l={TableName:o,FilterExpression:"expires > :now",ExpressionAttributeValues:{":now":{N:s.toString()}}},u=new je(l),m=await d?.send(u);if(m&&m.Items&&m.Items.length>0){const k=m.Items.map(g=>({notification_id:g.notification_id?.S||"",title:g.title?.S||"",body:g.body?.S||"",expires:parseInt(g.expires?.N||"0"),ctaText:g.cta_text?.S,ctaLink:g.cta_link?.S}));k.sort((g,O)=>g.expires-O.expires),ta(k)}}function ta(o){o.forEach(s=>{f.seenNotifications.includes(s.notification_id)||(f.seenNotifications.push(s.notification_id),aa(s.notification_id),gt({t
2itle:s.title,content:s.body,actions:[...s.ctaText&&s.ctaLink?[{label:s.ctaText,onClick:()=>window.open(s.ctaLink,"_blank")}]:[],{label:"Close",onClick:d=>d.close()}]}))})}function aa(o){const s={TableName:"ccported_notifs",Key:{notification_id:{S:o}},UpdateExpression:"ADD impressions :inc",ExpressionAttributeValues:{":inc":{N:"1"}},ReturnValues:bt.UPDATED_NEW},d=new _t(s);w.dynamoDBClient?.send(d).catch(console.error)}var sa=N('<meta name="description" content="Hundreds of games available to play instantly, for free, unblocked, in your browser."/>'),ra=N(`<div class="container"><div class="background"></div> <!> <!></div> <footer class="svelte-19uq3gh"><div class="left svelte-19uq3gh"><h3><b>Can't find what you're looking for? <a href="https://discord.gg/GDEFRBTT3Z">Join the discord</a></b></h3> <p>CCPorted is not affiliated with or endorsed by any game developers 3 or publishers. All games are property of their respective owners*</p> <p>DMCA Requests can be sent to <a href="mailto:[email protected]">[email protected]</a></p> <p> </p> <p><a href="/tos/privacy_policy">Privacy Policy</a> | <a href="/tos/terms_of_service">Terms of Service</a></p> <p>* BallZ, Nighttime Visitor, Tetris, Tic Tac Toe, Stack, and Reaction 4 Rush are all owned and protected by CCPorted.</p> <p>For complaints about ad content, please contact us at <a href="mailto:[email protected]">[email protected]</a> or through the discord (see link above and in the navigation).</p> <h3>CCPORTED</h3> <p>CCPorted is the greatest place to play video games. The CCPorted 5 team parses through hundreds of games and only adds the 6 highest-quality games to our library, ensuring a high quality gaming 7 experience for the users. Log in to get added to leaderboards and 8 compete with your friends. Play all kinds of games from nostalgic 9 classics to the latest hits. Our extensive ROM library also features 10 over 300 titles from the late 90s and early 2000s. Join the Discord 11 to get site updates and request games. New games are added each 12 week, and games are updated regularly to ensure a bug-free 13 experience.</p> <p>Join the discord to request the <i>Underground Document</i>, a 14 Google Doc with information on how to access other links for the 15 site.</p> <p>To view old notifications, visit the notifications page.</p> <h3>Partners</h3> <p>To become a partner, please contact us through the discord.</p></div> <div class="license svelte-19uq3gh"><h3>CCPORTED SOFTWARE LICENSE INFORMATION</h3> <p>This software is licensed under the GNU Affero General Public 16 License v3.0 (AGPL-3.0), with additional terms that restrict 17 commercial use as described below.</p> <h4>NONCOMMERCIAL CLAUSE</h4> <p>You may not use, modify, distribute, or otherwise exploit this 18 software, in whole or in part, for commercial purposes.</p> <p>"Commercial purposes" means any use that is intended for or directed 19 toward commercial advantage or monetary compensation, including but 20 not limited to: - Selling or licensing copies of the software, - 21 Hosting, operating, or distributing the software as part of a paid 22 service, - Using the software to generate revenue (advertising, 23 subscriptions, etc.), - Integrating the software into commercial 24 products or services.</p> <p>You may use, modify, and share this software freely for personal, 25 educational, research, or other noncommercial purposes, provided 26 that all modified versions and derivative works are distributed 27 under the same license and made publicly available.</p> <h4>AGPL v3 LICENSE TERMS</h4> <p>This program is free software: you can redistribute it and/or modify 28 it under the terms of the GNU Affero General Public License as 29 published by the Free Software Foundation, either version 3 of the 30 License, or (at your option) any later version.</p> <p>This program is distributed in the hope that it will be useful, but 31 WITHOUT ANY WARRANTY; without even the implied warranty of 32 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 33 Affero General Public License for more details.</p> <p>You should have received a copy of the GNU Affero General Public 34 License along with this program. If not, see <a href="https://www.gnu.org/licenses/">https://www.gnu.org/licenses/</a>.</p> <h4>LICENSE NOTICE</h4> <p>When redistributing this software or derivative works, you must 35 include this full license text, clearly indicating that it is 36 licensed under "AGPL v3 + NonCommercial Clause".</p></div> <div class="info svelte-19uq3gh"><!></div></footer> <div class="streaming-console svelte-19uq3gh"></div>`,1);function xa(o,s){Ne(s,!0);let d=E(ae(f.isAHost())),l=E(!0),u=E(ae(w.adBlockEnabled)),m=E(ae(w.adsEnabled));Me(async()=>{await Pe(),ea(),v(d,f.isAHost(),!0),v(l,w.devMode,!0),v(u,w.adBlockEnabled,!0),v(m,w.adsEnabled,!0);function D(){const L=document.createElement("script");L.type="text/javascript",L.async=!0,L.defer=!0,L.src="//pl27945770.effectivegatecpm.com/b0/88/ed/b
36088ed7c9240db179822a126a078b258.js",document.body.appendChild(L)}!e(d)&&!e(u)||w.devMode?(console.log("[R][LAYOUT][BASE] Bad Ads enabled"),D()):e(d)&&e(m)?console.log("[R][LAYOUT][BASE] Good ads enabled"):console.log("[R][LAYOUT][BASE] No ads")});var k=ra();st(D=>{var L=sa();vt.title="CCPorted",C(D,L)});var g=pe(k),O=r(n(g),2);wt(O,{});var B=r(O,2);Kt(B,{}),i(g);var j=r(g,2),M=n(j),h=r(n(M),6),y=n(h);i(h),$e(18),i(M);var z=r(M,4),A=n(z);Qt(A,{}),i(z),i(j),$e(2),se(D=>p(y,`Site, design, and development are protected under common law 37 copyright; © ${D??""} CCPorted`),[()=>new Date().getFullYear()]),C(o,k),De()}export{xa as component};
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.