@joystyk/catalog 0.0.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/README.md +29 -2
  3. package/dist/advertise.d.ts +82 -0
  4. package/dist/advertise.js +203 -0
  5. package/dist/advertise.js.map +1 -0
  6. package/dist/categories.d.ts +12 -0
  7. package/dist/categories.js +45 -0
  8. package/dist/categories.js.map +1 -0
  9. package/dist/client.d.ts +1 -0
  10. package/dist/client.js +9 -0
  11. package/dist/client.js.map +1 -0
  12. package/dist/components/advertise.d.ts +4 -0
  13. package/dist/components/advertise.js +1304 -0
  14. package/dist/components/advertise.js.map +1 -0
  15. package/dist/components/app.d.ts +25 -0
  16. package/dist/components/app.js +106 -0
  17. package/dist/components/app.js.map +1 -0
  18. package/dist/components/leaving.d.ts +2 -0
  19. package/dist/components/leaving.js +104 -0
  20. package/dist/components/leaving.js.map +1 -0
  21. package/dist/components/views.d.ts +13 -0
  22. package/dist/components/views.js +1410 -0
  23. package/dist/components/views.js.map +1 -0
  24. package/dist/head.d.ts +6 -0
  25. package/dist/head.js +33 -0
  26. package/dist/head.js.map +1 -0
  27. package/dist/index.d.ts +11 -0
  28. package/dist/index.js +12 -0
  29. package/dist/labels.d.ts +10 -0
  30. package/dist/labels.js +27 -0
  31. package/dist/labels.js.map +1 -0
  32. package/dist/placeholders.d.ts +3 -0
  33. package/dist/placeholders.js +7 -0
  34. package/dist/placeholders.js.map +1 -0
  35. package/dist/registry.d.ts +46 -0
  36. package/dist/registry.js +106 -0
  37. package/dist/registry.js.map +1 -0
  38. package/dist/routes.d.ts +56 -0
  39. package/dist/routes.js +89 -0
  40. package/dist/routes.js.map +1 -0
  41. package/dist/seo.d.ts +31 -0
  42. package/dist/seo.js +174 -0
  43. package/dist/seo.js.map +1 -0
  44. package/dist/server.d.ts +50 -0
  45. package/dist/server.js +162 -0
  46. package/dist/server.js.map +1 -0
  47. package/dist/store.d.ts +202 -0
  48. package/dist/store.js +136 -0
  49. package/dist/store.js.map +1 -0
  50. package/dist/styles.css +1121 -0
  51. package/dist/wire.d.ts +108 -0
  52. package/dist/wire.js +74 -0
  53. package/dist/wire.js.map +1 -0
  54. package/package.json +63 -11
@@ -0,0 +1,1410 @@
1
+ import { MODE_LABELS, STATUS_LABELS, playersLabel, playersRange, rankLabel } from "../labels.js";
2
+ import { ADVERTISE_PATH, categoryPath, gamePath } from "../routes.js";
3
+ import { pageTitleOf } from "../seo.js";
4
+ import { advertiseView, policyView, sentView } from "./advertise.js";
5
+ import { leavingView } from "./leaving.js";
6
+ import { compiled } from "@gyral/core/compiled";
7
+ import { each, nothing } from "@gyral/core";
8
+ import "@joystyk/launcher";
9
+ import "@joystyk/ui/ad-slot";
10
+ //#region src/components/views.ts
11
+ var _gyral$t0 = {
12
+ "id": "1tqm5iftaot",
13
+ "html": "<ad-slot></ad-slot>",
14
+ "parts": [
15
+ [
16
+ 3,
17
+ [0],
18
+ "slot-id"
19
+ ],
20
+ [
21
+ 3,
22
+ [0],
23
+ "page"
24
+ ],
25
+ [
26
+ 3,
27
+ [0],
28
+ "game-id"
29
+ ],
30
+ [
31
+ 3,
32
+ [0],
33
+ "category"
34
+ ]
35
+ ],
36
+ "segments": [
37
+ {
38
+ "k": "open",
39
+ "tag": "ad-slot",
40
+ "html": "<ad-slot",
41
+ "attrs": []
42
+ },
43
+ {
44
+ "k": "attr",
45
+ "name": "slot-id"
46
+ },
47
+ {
48
+ "k": "attr",
49
+ "name": "page"
50
+ },
51
+ {
52
+ "k": "attr",
53
+ "name": "game-id"
54
+ },
55
+ {
56
+ "k": "attr",
57
+ "name": "category"
58
+ },
59
+ { "k": "openEnd" },
60
+ {
61
+ "k": "close",
62
+ "tag": "ad-slot"
63
+ }
64
+ ]
65
+ };
66
+ var _gyral$t1 = {
67
+ "id": "2crefdy4szm",
68
+ "html": "<li></li>",
69
+ "parts": [[1, [0]]],
70
+ "segments": [
71
+ "<li>",
72
+ {
73
+ "k": "child",
74
+ "in": "li"
75
+ },
76
+ "</li>"
77
+ ]
78
+ };
79
+ var _gyral$t2 = {
80
+ "id": "s5ipxmbpc0",
81
+ "html": "<ul class=\"badges\" aria-label=\"At a glance\"><li class=\"badge-status\"></li><li></li></ul>",
82
+ "parts": [
83
+ [
84
+ 3,
85
+ [0, 0],
86
+ "data-status"
87
+ ],
88
+ [1, [0, 0]],
89
+ [1, [0, 1]],
90
+ [0, [0]]
91
+ ],
92
+ "segments": [
93
+ "<ul class=\"badges\" aria-label=\"At a glance\"><li class=\"badge-status\"",
94
+ {
95
+ "k": "attr",
96
+ "name": "data-status"
97
+ },
98
+ ">",
99
+ {
100
+ "k": "child",
101
+ "in": "li"
102
+ },
103
+ "</li><li>",
104
+ {
105
+ "k": "child",
106
+ "in": "li"
107
+ },
108
+ "</li>",
109
+ {
110
+ "k": "child",
111
+ "in": "ul"
112
+ },
113
+ "</ul>"
114
+ ]
115
+ };
116
+ var _gyral$t3 = {
117
+ "id": "bqstfqqt5i",
118
+ "html": "<p class=\"card-summary\"></p><!----> <jy-offline-availability hidden></jy-offline-availability>",
119
+ "parts": [
120
+ [1, [0]],
121
+ [
122
+ 2,
123
+ [],
124
+ 1
125
+ ],
126
+ [
127
+ 3,
128
+ [3],
129
+ "game-id"
130
+ ]
131
+ ],
132
+ "segments": [
133
+ "<p class=\"card-summary\">",
134
+ {
135
+ "k": "child",
136
+ "in": "p"
137
+ },
138
+ "</p>",
139
+ { "k": "child" },
140
+ "<!----> ",
141
+ {
142
+ "k": "open",
143
+ "tag": "jy-offline-availability",
144
+ "html": "<jy-offline-availability hidden",
145
+ "attrs": [["hidden", ""]]
146
+ },
147
+ {
148
+ "k": "attr",
149
+ "name": "game-id"
150
+ },
151
+ { "k": "openEnd" },
152
+ {
153
+ "k": "close",
154
+ "tag": "jy-offline-availability"
155
+ }
156
+ ]
157
+ };
158
+ var _gyral$t4 = {
159
+ "id": "p76w4i0a2x",
160
+ "html": "<li><article class=\"game-card\"><h3><a></a></h3></article></li>",
161
+ "parts": [
162
+ [
163
+ 3,
164
+ [0, 0],
165
+ "data-category"
166
+ ],
167
+ [
168
+ 3,
169
+ [
170
+ 0,
171
+ 0,
172
+ 0,
173
+ 0
174
+ ],
175
+ "href"
176
+ ],
177
+ [1, [
178
+ 0,
179
+ 0,
180
+ 0,
181
+ 0
182
+ ]],
183
+ [0, [0, 0]]
184
+ ],
185
+ "segments": [
186
+ "<li><article class=\"game-card\"",
187
+ {
188
+ "k": "attr",
189
+ "name": "data-category"
190
+ },
191
+ "><h3><a",
192
+ {
193
+ "k": "attr",
194
+ "name": "href"
195
+ },
196
+ ">",
197
+ {
198
+ "k": "child",
199
+ "in": "a"
200
+ },
201
+ "</a></h3>",
202
+ {
203
+ "k": "child",
204
+ "in": "article"
205
+ },
206
+ "</article></li>"
207
+ ]
208
+ };
209
+ var _gyral$t5 = {
210
+ "id": "u1l6iemt31",
211
+ "html": "<li><article class=\"game-card\"><h2><a></a></h2></article></li>",
212
+ "parts": [
213
+ [
214
+ 3,
215
+ [0, 0],
216
+ "data-category"
217
+ ],
218
+ [
219
+ 3,
220
+ [
221
+ 0,
222
+ 0,
223
+ 0,
224
+ 0
225
+ ],
226
+ "href"
227
+ ],
228
+ [1, [
229
+ 0,
230
+ 0,
231
+ 0,
232
+ 0
233
+ ]],
234
+ [0, [0, 0]]
235
+ ],
236
+ "segments": [
237
+ "<li><article class=\"game-card\"",
238
+ {
239
+ "k": "attr",
240
+ "name": "data-category"
241
+ },
242
+ "><h2><a",
243
+ {
244
+ "k": "attr",
245
+ "name": "href"
246
+ },
247
+ ">",
248
+ {
249
+ "k": "child",
250
+ "in": "a"
251
+ },
252
+ "</a></h2>",
253
+ {
254
+ "k": "child",
255
+ "in": "article"
256
+ },
257
+ "</article></li>"
258
+ ]
259
+ };
260
+ var _gyral$t6 = {
261
+ "id": "1juk2b7here",
262
+ "html": "<ul class=\"game-grid\" role=\"list\"></ul>",
263
+ "parts": [[1, [0]]],
264
+ "segments": [
265
+ "<ul class=\"game-grid\" role=\"list\">",
266
+ {
267
+ "k": "child",
268
+ "in": "ul"
269
+ },
270
+ "</ul>"
271
+ ]
272
+ };
273
+ var _gyral$t7 = {
274
+ "id": "p4ocrg8ov9",
275
+ "html": "<p class=\"loading\"></p>",
276
+ "parts": [[
277
+ 3,
278
+ [0],
279
+ "aria-busy"
280
+ ], [1, [0]]],
281
+ "segments": [
282
+ "<p class=\"loading\"",
283
+ {
284
+ "k": "attr",
285
+ "name": "aria-busy"
286
+ },
287
+ ">",
288
+ {
289
+ "k": "child",
290
+ "in": "p"
291
+ },
292
+ "</p>"
293
+ ]
294
+ };
295
+ var _gyral$t8 = {
296
+ "id": "27e3mzjsfgn",
297
+ "html": "<li><a></a></li>",
298
+ "parts": [
299
+ [
300
+ 3,
301
+ [0, 0],
302
+ "href"
303
+ ],
304
+ [
305
+ 3,
306
+ [0, 0],
307
+ "aria-current"
308
+ ],
309
+ [1, [0, 0]]
310
+ ],
311
+ "segments": [
312
+ "<li><a",
313
+ {
314
+ "k": "attr",
315
+ "name": "href"
316
+ },
317
+ {
318
+ "k": "attr",
319
+ "name": "aria-current"
320
+ },
321
+ ">",
322
+ {
323
+ "k": "child",
324
+ "in": "a"
325
+ },
326
+ "</a></li>"
327
+ ]
328
+ };
329
+ var _gyral$t9 = {
330
+ "id": "2awpedwjhzz",
331
+ "html": "<nav class=\"crumbs\" aria-label=\"Breadcrumb\"><ol></ol></nav>",
332
+ "parts": [[1, [0, 0]]],
333
+ "segments": [
334
+ "<nav class=\"crumbs\" aria-label=\"Breadcrumb\"><ol>",
335
+ {
336
+ "k": "child",
337
+ "in": "ol"
338
+ },
339
+ "</ol></nav>"
340
+ ]
341
+ };
342
+ var _gyral$t10 = {
343
+ "id": "i60qnd1rff",
344
+ "html": "<section class=\"category-section\"><header class=\"section-head\"><h2><a></a></h2><p></p></header></section>",
345
+ "parts": [
346
+ [
347
+ 3,
348
+ [0],
349
+ "data-category"
350
+ ],
351
+ [
352
+ 4,
353
+ [0],
354
+ "aria-labelledby",
355
+ ["category-", ""]
356
+ ],
357
+ [
358
+ 4,
359
+ [
360
+ 0,
361
+ 0,
362
+ 0
363
+ ],
364
+ "id",
365
+ ["category-", ""]
366
+ ],
367
+ [
368
+ 3,
369
+ [
370
+ 0,
371
+ 0,
372
+ 0,
373
+ 0
374
+ ],
375
+ "href"
376
+ ],
377
+ [1, [
378
+ 0,
379
+ 0,
380
+ 0,
381
+ 0
382
+ ]],
383
+ [1, [
384
+ 0,
385
+ 0,
386
+ 1
387
+ ]],
388
+ [0, [0]]
389
+ ],
390
+ "segments": [
391
+ "<section class=\"category-section\"",
392
+ {
393
+ "k": "attr",
394
+ "name": "data-category"
395
+ },
396
+ {
397
+ "k": "attr",
398
+ "name": "aria-labelledby",
399
+ "strings": ["category-", ""]
400
+ },
401
+ "><header class=\"section-head\"><h2",
402
+ {
403
+ "k": "attr",
404
+ "name": "id",
405
+ "strings": ["category-", ""]
406
+ },
407
+ "><a",
408
+ {
409
+ "k": "attr",
410
+ "name": "href"
411
+ },
412
+ ">",
413
+ {
414
+ "k": "child",
415
+ "in": "a"
416
+ },
417
+ "</a></h2><p>",
418
+ {
419
+ "k": "child",
420
+ "in": "p"
421
+ },
422
+ "</p></header>",
423
+ {
424
+ "k": "child",
425
+ "in": "section"
426
+ },
427
+ "</section>"
428
+ ]
429
+ };
430
+ var _gyral$t11 = {
431
+ "id": "in1qar3kru",
432
+ "html": "<tr><td class=\"rank\"></td><th scope=\"row\"><a></a><jy-offline-availability hidden></jy-offline-availability></th><td></td><td class=\"num\"></td><td></td></tr>",
433
+ "parts": [
434
+ [1, [0, 0]],
435
+ [
436
+ 3,
437
+ [
438
+ 0,
439
+ 1,
440
+ 0
441
+ ],
442
+ "href"
443
+ ],
444
+ [1, [
445
+ 0,
446
+ 1,
447
+ 0
448
+ ]],
449
+ [
450
+ 3,
451
+ [
452
+ 0,
453
+ 1,
454
+ 1
455
+ ],
456
+ "game-id"
457
+ ],
458
+ [1, [0, 2]],
459
+ [1, [0, 3]],
460
+ [1, [0, 4]]
461
+ ],
462
+ "segments": [
463
+ "<tr><td class=\"rank\">",
464
+ {
465
+ "k": "child",
466
+ "in": "td"
467
+ },
468
+ "</td><th scope=\"row\"><a",
469
+ {
470
+ "k": "attr",
471
+ "name": "href"
472
+ },
473
+ ">",
474
+ {
475
+ "k": "child",
476
+ "in": "a"
477
+ },
478
+ "</a>",
479
+ {
480
+ "k": "open",
481
+ "tag": "jy-offline-availability",
482
+ "html": "<jy-offline-availability hidden",
483
+ "attrs": [["hidden", ""]]
484
+ },
485
+ {
486
+ "k": "attr",
487
+ "name": "game-id"
488
+ },
489
+ { "k": "openEnd" },
490
+ {
491
+ "k": "close",
492
+ "tag": "jy-offline-availability"
493
+ },
494
+ "</th><td>",
495
+ {
496
+ "k": "child",
497
+ "in": "td"
498
+ },
499
+ "</td><td class=\"num\">",
500
+ {
501
+ "k": "child",
502
+ "in": "td"
503
+ },
504
+ "</td><td>",
505
+ {
506
+ "k": "child",
507
+ "in": "td"
508
+ },
509
+ "</td></tr>"
510
+ ]
511
+ };
512
+ var _gyral$t12 = {
513
+ "id": "1hs1bvxfx6u",
514
+ "html": "<section class=\"lineup\" aria-labelledby=\"lineup-heading\"><h2 id=\"lineup-heading\">The lineup</h2><div class=\"score-screen\" role=\"region\" aria-labelledby=\"lineup-caption\" tabindex=\"0\"><table class=\"score-table\"><caption id=\"lineup-caption\">Every game on Joystyk, high-score style</caption><thead><tr><th scope=\"col\">No.</th><th scope=\"col\">Game</th><th scope=\"col\">Category</th><th scope=\"col\" class=\"num\">Players</th><th scope=\"col\">Status</th></tr></thead><tbody></tbody></table></div></section>",
515
+ "parts": [[1, [
516
+ 0,
517
+ 1,
518
+ 0,
519
+ 2
520
+ ]]],
521
+ "segments": [
522
+ "<section class=\"lineup\" aria-labelledby=\"lineup-heading\"><h2 id=\"lineup-heading\">The lineup</h2><div class=\"score-screen\" role=\"region\" aria-labelledby=\"lineup-caption\" tabindex=\"0\"><table class=\"score-table\"><caption id=\"lineup-caption\">Every game on Joystyk, high-score style</caption><thead><tr><th scope=\"col\">No.</th><th scope=\"col\">Game</th><th scope=\"col\">Category</th><th scope=\"col\" class=\"num\">Players</th><th scope=\"col\">Status</th></tr></thead><tbody>",
523
+ {
524
+ "k": "child",
525
+ "in": "tbody"
526
+ },
527
+ "</tbody></table></div></section>"
528
+ ]
529
+ };
530
+ var _gyral$t13 = {
531
+ "id": "pg9ygzu1f7",
532
+ "html": "<aside class=\"rail\" aria-label=\"Sponsor\"></aside>",
533
+ "parts": [[1, [0]]],
534
+ "segments": [
535
+ "<aside class=\"rail\" aria-label=\"Sponsor\">",
536
+ {
537
+ "k": "child",
538
+ "in": "aside"
539
+ },
540
+ "</aside>"
541
+ ]
542
+ };
543
+ var _gyral$t14 = {
544
+ "id": "2d468glq65o",
545
+ "html": "<div class=\"home\"><section class=\"hero\" aria-labelledby=\"hero-heading\"><div class=\"screen\"><p class=\"kicker\"><span class=\"blink\">Press start</span></p><h1 id=\"hero-heading\" tabindex=\"-1\">Free games for your browser. No quarters needed.</h1><p class=\"lede\">Arcade, card and dice games that start in one click: no sign-up, no download, safe for every age. Play alone, against the computer, or with friends.</p><p class=\"hero-actions\"><a class=\"cta\" href=\"#categories\" aria-label=\"Insert coin: browse the games\">Insert coin</a></p></div></section><div class=\"with-rail\"><div class=\"column\"></div></div></div>",
546
+ "parts": [[1, [
547
+ 0,
548
+ 1,
549
+ 0
550
+ ]], [0, [0, 1]]],
551
+ "segments": [
552
+ "<div class=\"home\"><section class=\"hero\" aria-labelledby=\"hero-heading\"><div class=\"screen\"><p class=\"kicker\"><span class=\"blink\">Press start</span></p><h1 id=\"hero-heading\" tabindex=\"-1\">Free games for your browser. No quarters needed.</h1><p class=\"lede\">Arcade, card and dice games that start in one click: no sign-up, no download, safe for every age. Play alone, against the computer, or with friends.</p><p class=\"hero-actions\"><a class=\"cta\" href=\"#categories\" aria-label=\"Insert coin: browse the games\">Insert coin</a></p></div></section><div class=\"with-rail\"><div class=\"column\">",
553
+ {
554
+ "k": "child",
555
+ "in": "div"
556
+ },
557
+ "</div>",
558
+ {
559
+ "k": "child",
560
+ "in": "div"
561
+ },
562
+ "</div></div>"
563
+ ]
564
+ };
565
+ var _gyral$t15 = {
566
+ "id": "1tq16ctykv1",
567
+ "html": "<section class=\"featured\" aria-labelledby=\"featured-heading\"><h2 id=\"featured-heading\">Featured</h2></section><div id=\"categories\" class=\"categories\"><!----> <!----> </div>",
568
+ "parts": [
569
+ [0, [0]],
570
+ [
571
+ 2,
572
+ [],
573
+ 1
574
+ ],
575
+ [
576
+ 2,
577
+ [1],
578
+ 0
579
+ ],
580
+ [
581
+ 2,
582
+ [1],
583
+ 2
584
+ ],
585
+ [0, [1]],
586
+ [0, []]
587
+ ],
588
+ "segments": [
589
+ "<section class=\"featured\" aria-labelledby=\"featured-heading\"><h2 id=\"featured-heading\">Featured</h2>",
590
+ {
591
+ "k": "child",
592
+ "in": "section"
593
+ },
594
+ "</section>",
595
+ { "k": "child" },
596
+ "<div id=\"categories\" class=\"categories\">",
597
+ {
598
+ "k": "child",
599
+ "in": "div"
600
+ },
601
+ "<!----> ",
602
+ {
603
+ "k": "child",
604
+ "in": "div"
605
+ },
606
+ "<!----> ",
607
+ {
608
+ "k": "child",
609
+ "in": "div"
610
+ },
611
+ "</div>",
612
+ { "k": "child" }
613
+ ]
614
+ };
615
+ var _gyral$t16 = {
616
+ "id": "7p87uv9ai6",
617
+ "html": "<li><a></a> <span class=\"count\">(<!---->)</span></li>",
618
+ "parts": [
619
+ [
620
+ 3,
621
+ [0, 0],
622
+ "href"
623
+ ],
624
+ [1, [0, 0]],
625
+ [
626
+ 2,
627
+ [0, 2],
628
+ 1
629
+ ]
630
+ ],
631
+ "segments": [
632
+ "<li><a",
633
+ {
634
+ "k": "attr",
635
+ "name": "href"
636
+ },
637
+ ">",
638
+ {
639
+ "k": "child",
640
+ "in": "a"
641
+ },
642
+ "</a> <span class=\"count\">(",
643
+ {
644
+ "k": "child",
645
+ "in": "span"
646
+ },
647
+ "<!---->)</span></li>"
648
+ ]
649
+ };
650
+ var _gyral$t17 = {
651
+ "id": "v08z5w709t",
652
+ "html": "<div class=\"category-page\"><header class=\"page-head\"><p class=\"kicker\">Category</p><h1 tabindex=\"-1\"><!----> games</h1><p class=\"lede\"></p></header><div class=\"with-rail\"><div class=\"column\"><nav class=\"more\" aria-labelledby=\"other-categories\"><h2 id=\"other-categories\">Other categories</h2><ul></ul></nav></div></div></div>",
653
+ "parts": [
654
+ [
655
+ 3,
656
+ [0],
657
+ "data-category"
658
+ ],
659
+ [
660
+ 2,
661
+ [0],
662
+ 0
663
+ ],
664
+ [
665
+ 2,
666
+ [
667
+ 0,
668
+ 0,
669
+ 1
670
+ ],
671
+ 0
672
+ ],
673
+ [1, [
674
+ 0,
675
+ 0,
676
+ 2
677
+ ]],
678
+ [
679
+ 2,
680
+ [
681
+ 0,
682
+ 1,
683
+ 0
684
+ ],
685
+ 0
686
+ ],
687
+ [1, [
688
+ 0,
689
+ 1,
690
+ 0,
691
+ 0,
692
+ 1
693
+ ]],
694
+ [0, [0, 1]]
695
+ ],
696
+ "segments": [
697
+ "<div class=\"category-page\"",
698
+ {
699
+ "k": "attr",
700
+ "name": "data-category"
701
+ },
702
+ ">",
703
+ {
704
+ "k": "child",
705
+ "in": "div"
706
+ },
707
+ "<header class=\"page-head\"><p class=\"kicker\">Category</p><h1 tabindex=\"-1\">",
708
+ {
709
+ "k": "child",
710
+ "in": "h1"
711
+ },
712
+ "<!----> games</h1><p class=\"lede\">",
713
+ {
714
+ "k": "child",
715
+ "in": "p"
716
+ },
717
+ "</p></header><div class=\"with-rail\"><div class=\"column\">",
718
+ {
719
+ "k": "child",
720
+ "in": "div"
721
+ },
722
+ "<nav class=\"more\" aria-labelledby=\"other-categories\"><h2 id=\"other-categories\">Other categories</h2><ul>",
723
+ {
724
+ "k": "child",
725
+ "in": "ul"
726
+ },
727
+ "</ul></nav></div>",
728
+ {
729
+ "k": "child",
730
+ "in": "div"
731
+ },
732
+ "</div></div>"
733
+ ]
734
+ };
735
+ var _gyral$t18 = {
736
+ "id": "wxfmp98um9",
737
+ "html": "<jy-offline-toggle></jy-offline-toggle>",
738
+ "parts": [
739
+ [
740
+ 3,
741
+ [0],
742
+ "game-id"
743
+ ],
744
+ [
745
+ 3,
746
+ [0],
747
+ "game-name"
748
+ ],
749
+ [
750
+ 3,
751
+ [0],
752
+ "assets"
753
+ ]
754
+ ],
755
+ "segments": [
756
+ {
757
+ "k": "open",
758
+ "tag": "jy-offline-toggle",
759
+ "html": "<jy-offline-toggle",
760
+ "attrs": []
761
+ },
762
+ {
763
+ "k": "attr",
764
+ "name": "game-id"
765
+ },
766
+ {
767
+ "k": "attr",
768
+ "name": "game-name"
769
+ },
770
+ {
771
+ "k": "attr",
772
+ "name": "assets"
773
+ },
774
+ { "k": "openEnd" },
775
+ {
776
+ "k": "close",
777
+ "tag": "jy-offline-toggle"
778
+ }
779
+ ]
780
+ };
781
+ var _gyral$t19 = {
782
+ "id": "1yty3t8zjth",
783
+ "html": "<li><a></a>: <!----> <jy-offline-availability hidden></jy-offline-availability></li>",
784
+ "parts": [
785
+ [
786
+ 3,
787
+ [0, 0],
788
+ "href"
789
+ ],
790
+ [1, [0, 0]],
791
+ [
792
+ 2,
793
+ [0],
794
+ 2
795
+ ],
796
+ [
797
+ 3,
798
+ [0, 4],
799
+ "game-id"
800
+ ]
801
+ ],
802
+ "segments": [
803
+ "<li><a",
804
+ {
805
+ "k": "attr",
806
+ "name": "href"
807
+ },
808
+ ">",
809
+ {
810
+ "k": "child",
811
+ "in": "a"
812
+ },
813
+ "</a>: ",
814
+ {
815
+ "k": "child",
816
+ "in": "li"
817
+ },
818
+ "<!----> ",
819
+ {
820
+ "k": "open",
821
+ "tag": "jy-offline-availability",
822
+ "html": "<jy-offline-availability hidden",
823
+ "attrs": [["hidden", ""]]
824
+ },
825
+ {
826
+ "k": "attr",
827
+ "name": "game-id"
828
+ },
829
+ { "k": "openEnd" },
830
+ {
831
+ "k": "close",
832
+ "tag": "jy-offline-availability"
833
+ },
834
+ "</li>"
835
+ ]
836
+ };
837
+ var _gyral$t20 = {
838
+ "id": "71ckvupvyc",
839
+ "html": "<article class=\"game-page\" aria-labelledby=\"game-title\"><header class=\"page-head\"><p class=\"kicker\"></p><h1 id=\"game-title\" tabindex=\"-1\"></h1><p class=\"lede\"></p><dl class=\"facts\"><div><dt>Status</dt><dd></dd></div><div><dt>Players</dt><dd></dd></div><div><dt>Modes</dt><dd></dd></div></dl></header><section class=\"cabinet\" aria-labelledby=\"play-heading\"><h2 id=\"play-heading\">Play </h2><jy-launcher></jy-launcher> </section><section aria-labelledby=\"about-heading\"><h2 id=\"about-heading\">About </h2><p></p></section><section aria-labelledby=\"rules-heading\"><h2 id=\"rules-heading\">How to play </h2><ol class=\"rules\"></ol></section></article>",
840
+ "parts": [
841
+ [
842
+ 3,
843
+ [0],
844
+ "data-category"
845
+ ],
846
+ [
847
+ 2,
848
+ [0],
849
+ 0
850
+ ],
851
+ [1, [
852
+ 0,
853
+ 0,
854
+ 0
855
+ ]],
856
+ [1, [
857
+ 0,
858
+ 0,
859
+ 1
860
+ ]],
861
+ [1, [
862
+ 0,
863
+ 0,
864
+ 2
865
+ ]],
866
+ [1, [
867
+ 0,
868
+ 0,
869
+ 3,
870
+ 0,
871
+ 1
872
+ ]],
873
+ [1, [
874
+ 0,
875
+ 0,
876
+ 3,
877
+ 1,
878
+ 1
879
+ ]],
880
+ [1, [
881
+ 0,
882
+ 0,
883
+ 3,
884
+ 2,
885
+ 1
886
+ ]],
887
+ [0, [
888
+ 0,
889
+ 0,
890
+ 3
891
+ ]],
892
+ [
893
+ 2,
894
+ [0],
895
+ 1
896
+ ],
897
+ [0, [
898
+ 0,
899
+ 1,
900
+ 0
901
+ ]],
902
+ [
903
+ 6,
904
+ [
905
+ 0,
906
+ 1,
907
+ 1
908
+ ],
909
+ "game"
910
+ ],
911
+ [0, [0, 1]],
912
+ [
913
+ 2,
914
+ [0],
915
+ 2
916
+ ],
917
+ [0, [
918
+ 0,
919
+ 2,
920
+ 0
921
+ ]],
922
+ [1, [
923
+ 0,
924
+ 2,
925
+ 1
926
+ ]],
927
+ [0, [0, 2]],
928
+ [0, [
929
+ 0,
930
+ 3,
931
+ 0
932
+ ]],
933
+ [
934
+ 2,
935
+ [0, 3],
936
+ 1
937
+ ],
938
+ [1, [
939
+ 0,
940
+ 3,
941
+ 1
942
+ ]],
943
+ [0, [0]]
944
+ ],
945
+ "segments": [
946
+ "<article class=\"game-page\" aria-labelledby=\"game-title\"",
947
+ {
948
+ "k": "attr",
949
+ "name": "data-category"
950
+ },
951
+ ">",
952
+ {
953
+ "k": "child",
954
+ "in": "article"
955
+ },
956
+ "<header class=\"page-head\"><p class=\"kicker\">",
957
+ {
958
+ "k": "child",
959
+ "in": "p"
960
+ },
961
+ "</p><h1 id=\"game-title\" tabindex=\"-1\">",
962
+ {
963
+ "k": "child",
964
+ "in": "h1"
965
+ },
966
+ "</h1><p class=\"lede\">",
967
+ {
968
+ "k": "child",
969
+ "in": "p"
970
+ },
971
+ "</p><dl class=\"facts\"><div><dt>Status</dt><dd>",
972
+ {
973
+ "k": "child",
974
+ "in": "dd"
975
+ },
976
+ "</dd></div><div><dt>Players</dt><dd>",
977
+ {
978
+ "k": "child",
979
+ "in": "dd"
980
+ },
981
+ "</dd></div><div><dt>Modes</dt><dd>",
982
+ {
983
+ "k": "child",
984
+ "in": "dd"
985
+ },
986
+ "</dd></div>",
987
+ {
988
+ "k": "child",
989
+ "in": "dl"
990
+ },
991
+ "</dl></header>",
992
+ {
993
+ "k": "child",
994
+ "in": "article"
995
+ },
996
+ "<section class=\"cabinet\" aria-labelledby=\"play-heading\"><h2 id=\"play-heading\">Play ",
997
+ {
998
+ "k": "child",
999
+ "in": "h2"
1000
+ },
1001
+ "</h2>",
1002
+ {
1003
+ "k": "open",
1004
+ "tag": "jy-launcher",
1005
+ "html": "<jy-launcher",
1006
+ "attrs": []
1007
+ },
1008
+ {
1009
+ "k": "prop",
1010
+ "name": "game"
1011
+ },
1012
+ { "k": "openEnd" },
1013
+ {
1014
+ "k": "close",
1015
+ "tag": "jy-launcher"
1016
+ },
1017
+ " ",
1018
+ {
1019
+ "k": "child",
1020
+ "in": "section"
1021
+ },
1022
+ "</section>",
1023
+ {
1024
+ "k": "child",
1025
+ "in": "article"
1026
+ },
1027
+ "<section aria-labelledby=\"about-heading\"><h2 id=\"about-heading\">About ",
1028
+ {
1029
+ "k": "child",
1030
+ "in": "h2"
1031
+ },
1032
+ "</h2><p>",
1033
+ {
1034
+ "k": "child",
1035
+ "in": "p"
1036
+ },
1037
+ "</p>",
1038
+ {
1039
+ "k": "child",
1040
+ "in": "section"
1041
+ },
1042
+ "</section><section aria-labelledby=\"rules-heading\"><h2 id=\"rules-heading\">How to play ",
1043
+ {
1044
+ "k": "child",
1045
+ "in": "h2"
1046
+ },
1047
+ "</h2>",
1048
+ {
1049
+ "k": "child",
1050
+ "in": "section"
1051
+ },
1052
+ "<ol class=\"rules\">",
1053
+ {
1054
+ "k": "child",
1055
+ "in": "ol"
1056
+ },
1057
+ "</ol></section>",
1058
+ {
1059
+ "k": "child",
1060
+ "in": "article"
1061
+ },
1062
+ "</article>"
1063
+ ]
1064
+ };
1065
+ var _gyral$t21 = {
1066
+ "id": "11tj6eol0s3",
1067
+ "html": "<div><dt>Computer players</dt><dd>Yes</dd></div>",
1068
+ "parts": [],
1069
+ "segments": ["<div><dt>Computer players</dt><dd>Yes</dd></div>"]
1070
+ };
1071
+ var _gyral$t22 = {
1072
+ "id": "himijul9us",
1073
+ "html": "<p class=\"credit\"><a target=\"_blank\" rel=\"noopener noreferrer external\"></a></p>",
1074
+ "parts": [[
1075
+ 3,
1076
+ [0, 0],
1077
+ "href"
1078
+ ], [1, [0, 0]]],
1079
+ "segments": [
1080
+ "<p class=\"credit\"><a target=\"_blank\" rel=\"noopener noreferrer external\"",
1081
+ {
1082
+ "k": "attr",
1083
+ "name": "href"
1084
+ },
1085
+ ">",
1086
+ {
1087
+ "k": "child",
1088
+ "in": "a"
1089
+ },
1090
+ "</a></p>"
1091
+ ]
1092
+ };
1093
+ var _gyral$t23 = {
1094
+ "id": "19j5uihbo9d",
1095
+ "html": "<p class=\"note\">A short summary for now. The full rules arrive with the game.</p>",
1096
+ "parts": [],
1097
+ "segments": ["<p class=\"note\">A short summary for now. The full rules arrive with the game.</p>"]
1098
+ };
1099
+ var _gyral$t24 = {
1100
+ "id": "7bwovwuh28",
1101
+ "html": "<nav class=\"more\" aria-labelledby=\"more-heading\"><h2 id=\"more-heading\">More games</h2><ul></ul></nav>",
1102
+ "parts": [[1, [0, 1]]],
1103
+ "segments": [
1104
+ "<nav class=\"more\" aria-labelledby=\"more-heading\"><h2 id=\"more-heading\">More games</h2><ul>",
1105
+ {
1106
+ "k": "child",
1107
+ "in": "ul"
1108
+ },
1109
+ "</ul></nav>"
1110
+ ]
1111
+ };
1112
+ var _gyral$t25 = {
1113
+ "id": "7qz3cg3sbn",
1114
+ "html": "<section class=\"not-found\" aria-labelledby=\"nf-heading\"><p class=\"kicker\">Game over</p><h1 id=\"nf-heading\" tabindex=\"-1\">Page not found</h1><p class=\"lede\">There is no page at this address. It may have moved, or the link may have a typo.</p><p class=\"continue\">Continue? <a href=\"/\">See all games</a></p></section>",
1115
+ "parts": [],
1116
+ "segments": ["<section class=\"not-found\" aria-labelledby=\"nf-heading\"><p class=\"kicker\">Game over</p><h1 id=\"nf-heading\" tabindex=\"-1\">Page not found</h1><p class=\"lede\">There is no page at this address. It may have moved, or the link may have a typo.</p><p class=\"continue\">Continue? <a href=\"/\">See all games</a></p></section>"]
1117
+ };
1118
+ var _gyral$t26 = {
1119
+ "id": "19gs1vkok05",
1120
+ "html": "<article class=\"policy\" aria-labelledby=\"licenses-title\"><h1 id=\"licenses-title\" tabindex=\"-1\">Source licenses and credits</h1><section><h2>Map data</h2><p>Made with Natural Earth. Map Guess uses Natural Earth vector data v5.1.2, with source checksums and a mechanical combination of default, ISO and national border views. The data is in the public domain.</p><p><a href=\"https://www.naturalearthdata.com/about/terms-of-use/\" target=\"_blank\" rel=\"noopener noreferrer\">Natural Earth terms of use</a> · <a href=\"https://www.naturalearthdata.com/about/disputed-boundaries-policy/\" target=\"_blank\" rel=\"noopener noreferrer\">Disputed boundaries policy</a></p></section><section><h2>Word lists</h2><p>Several games use derived SCOWL 2020.12.07 word lists. Copyright 2000–2018 Kevin Atkinson, with portions copyright by the source contributors. SCOWL combines word-list sources under permissive licenses; the full copyright notices are retained with each derived list in our repository.</p><p><a href=\"https://github.com/en-wl/wordlist/blob/5ef55f9/scowl/Copyright\" target=\"_blank\" rel=\"noopener noreferrer\">SCOWL license notices</a></p></section><section><h2>Fonts</h2><p>Letter Drop and Shift 23 use Zilla Slab, copyright 2017 The Mozilla Foundation, under the SIL Open Font License 1.1. The bundled font and full license are retained with each game.</p><p><a href=\"https://github.com/mozilla/zilla-slab\" target=\"_blank\" rel=\"noopener noreferrer\">Zilla Slab source and license</a></p></section><section><h2>All-ages word filters</h2><p>The curated filters draw on the English LDNOOBW list, copyright Shutterstock, Inc. and the LDNOOBW contributors, under Creative Commons Attribution 4.0 International. Our filters select entries, add inflected forms and stems, and include local additions.</p><p><a href=\"https://github.com/LDNOOBW/List-of-Dirty-Naughty-Obscene-and-Otherwise-Bad-Words\" target=\"_blank\" rel=\"noopener noreferrer\">Source list</a> · <a href=\"https://creativecommons.org/licenses/by/4.0/\" target=\"_blank\" rel=\"noopener noreferrer\">CC BY 4.0</a></p></section></article>",
1121
+ "parts": [],
1122
+ "segments": ["<article class=\"policy\" aria-labelledby=\"licenses-title\"><h1 id=\"licenses-title\" tabindex=\"-1\">Source licenses and credits</h1><section><h2>Map data</h2><p>Made with Natural Earth. Map Guess uses Natural Earth vector data v5.1.2, with source checksums and a mechanical combination of default, ISO and national border views. The data is in the public domain.</p><p><a href=\"https://www.naturalearthdata.com/about/terms-of-use/\" target=\"_blank\" rel=\"noopener noreferrer\">Natural Earth terms of use</a> · <a href=\"https://www.naturalearthdata.com/about/disputed-boundaries-policy/\" target=\"_blank\" rel=\"noopener noreferrer\">Disputed boundaries policy</a></p></section><section><h2>Word lists</h2><p>Several games use derived SCOWL 2020.12.07 word lists. Copyright 2000–2018 Kevin Atkinson, with portions copyright by the source contributors. SCOWL combines word-list sources under permissive licenses; the full copyright notices are retained with each derived list in our repository.</p><p><a href=\"https://github.com/en-wl/wordlist/blob/5ef55f9/scowl/Copyright\" target=\"_blank\" rel=\"noopener noreferrer\">SCOWL license notices</a></p></section><section><h2>Fonts</h2><p>Letter Drop and Shift 23 use Zilla Slab, copyright 2017 The Mozilla Foundation, under the SIL Open Font License 1.1. The bundled font and full license are retained with each game.</p><p><a href=\"https://github.com/mozilla/zilla-slab\" target=\"_blank\" rel=\"noopener noreferrer\">Zilla Slab source and license</a></p></section><section><h2>All-ages word filters</h2><p>The curated filters draw on the English LDNOOBW list, copyright Shutterstock, Inc. and the LDNOOBW contributors, under Creative Commons Attribution 4.0 International. Our filters select entries, add inflected forms and stems, and include local additions.</p><p><a href=\"https://github.com/LDNOOBW/List-of-Dirty-Naughty-Obscene-and-Otherwise-Bad-Words\" target=\"_blank\" rel=\"noopener noreferrer\">Source list</a> · <a href=\"https://creativecommons.org/licenses/by/4.0/\" target=\"_blank\" rel=\"noopener noreferrer\">CC BY 4.0</a></p></section></article>"]
1123
+ };
1124
+ var _gyral$t27 = {
1125
+ "id": "2g6buycd07h",
1126
+ "html": "<a class=\"skip-link\" href=\"#main\">Skip to content</a><header class=\"masthead\"><a class=\"brand\" href=\"/\"> <svg class=\"logo\" viewBox=\"0 0 32 32\" aria-hidden=\"true\" focusable=\"false\"><rect x=\"4\" y=\"22\" width=\"24\" height=\"6\" rx=\"1.5\" class=\"logo-base\"/><rect x=\"14.5\" y=\"8\" width=\"3\" height=\"15\" class=\"logo-stick\"/><circle cx=\"16\" cy=\"8\" r=\"5\" class=\"logo-ball\"/><circle cx=\"24\" cy=\"24.5\" r=\"1.6\" class=\"logo-button\"/></svg> <span class=\"wordmark\">Joystyk</span> </a><nav class=\"main-nav\" aria-label=\"Main\"><ul><li><a href=\"/\">All games</a></li></ul></nav></header>",
1127
+ "parts": [[
1128
+ 3,
1129
+ [
1130
+ 1,
1131
+ 1,
1132
+ 0,
1133
+ 0,
1134
+ 0
1135
+ ],
1136
+ "aria-current"
1137
+ ], [0, [
1138
+ 1,
1139
+ 1,
1140
+ 0
1141
+ ]]],
1142
+ "segments": [
1143
+ "<a class=\"skip-link\" href=\"#main\">Skip to content</a><header class=\"masthead\"><a class=\"brand\" href=\"/\"> <svg class=\"logo\" viewBox=\"0 0 32 32\" aria-hidden=\"true\" focusable=\"false\"><rect x=\"4\" y=\"22\" width=\"24\" height=\"6\" rx=\"1.5\" class=\"logo-base\"/><rect x=\"14.5\" y=\"8\" width=\"3\" height=\"15\" class=\"logo-stick\"/><circle cx=\"16\" cy=\"8\" r=\"5\" class=\"logo-ball\"/><circle cx=\"24\" cy=\"24.5\" r=\"1.6\" class=\"logo-button\"/></svg> <span class=\"wordmark\">Joystyk</span> </a><nav class=\"main-nav\" aria-label=\"Main\"><ul><li><a href=\"/\"",
1144
+ {
1145
+ "k": "attr",
1146
+ "name": "aria-current"
1147
+ },
1148
+ ">All games</a></li>",
1149
+ {
1150
+ "k": "child",
1151
+ "in": "ul"
1152
+ },
1153
+ "</ul></nav></header>"
1154
+ ]
1155
+ };
1156
+ var _gyral$t28 = {
1157
+ "id": "19mbu252kjh",
1158
+ "html": "<footer class=\"site-footer\"><p><span class=\"wordmark small\">Joystyk</span> Free games for every age. No sign-up, no download.</p><nav class=\"footer-nav\" aria-label=\"Footer\"><ul><li><a>Advertise with us</a></li><li><a href=\"/licenses\">Source licenses</a></li></ul></nav><p><small>Game listings marked “Coming soon” are previews while the platform is built.</small></p></footer>",
1159
+ "parts": [[
1160
+ 3,
1161
+ [
1162
+ 0,
1163
+ 1,
1164
+ 0,
1165
+ 0,
1166
+ 0
1167
+ ],
1168
+ "href"
1169
+ ]],
1170
+ "segments": [
1171
+ "<footer class=\"site-footer\"><p><span class=\"wordmark small\">Joystyk</span> Free games for every age. No sign-up, no download.</p><nav class=\"footer-nav\" aria-label=\"Footer\"><ul><li><a",
1172
+ {
1173
+ "k": "attr",
1174
+ "name": "href"
1175
+ },
1176
+ ">Advertise with us</a></li><li><a href=\"/licenses\">Source licenses</a></li></ul></nav><p><small>Game listings marked “Coming soon” are previews while the platform is built.</small></p></footer>"
1177
+ ]
1178
+ };
1179
+ /** A billboard slot; `<ad-slot>` reserves its box from the slot registry and fills it lazily. */
1180
+ var adSlot = (id, c) => compiled(_gyral$t0, [
1181
+ id,
1182
+ c.page,
1183
+ c.game,
1184
+ c.category
1185
+ ]);
1186
+ /** What the launcher needs from a game page's data. */
1187
+ var launcherGameOf = (g) => ({
1188
+ id: g.id,
1189
+ name: g.name,
1190
+ modes: g.modes,
1191
+ players: g.players,
1192
+ aiLevels: g.aiLevels,
1193
+ status: g.status,
1194
+ aiContent: g.aiContent,
1195
+ ...g.options === void 0 ? {} : { options: g.options }
1196
+ });
1197
+ var Badge = (text) => compiled(_gyral$t1, [text]);
1198
+ var badges = (g) => compiled(_gyral$t2, [
1199
+ g.status,
1200
+ STATUS_LABELS[g.status],
1201
+ playersLabel(g.players),
1202
+ each(g.modes, (m) => m, (m) => Badge(MODE_LABELS[m]))
1203
+ ]);
1204
+ var cardBody = (g) => compiled(_gyral$t3, [
1205
+ g.summary,
1206
+ badges(g),
1207
+ g.id
1208
+ ]);
1209
+ /** A game card under an h2 section heading. */
1210
+ var CardH3 = (g) => compiled(_gyral$t4, [
1211
+ g.category,
1212
+ gamePath(g.id),
1213
+ g.name,
1214
+ cardBody(g)
1215
+ ]);
1216
+ /** A game card directly under the page's h1. */
1217
+ var CardH2 = (g) => compiled(_gyral$t5, [
1218
+ g.category,
1219
+ gamePath(g.id),
1220
+ g.name,
1221
+ cardBody(g)
1222
+ ]);
1223
+ var grid = (games, card) => compiled(_gyral$t6, [each(games, (g) => g.id, card)]);
1224
+ var loading = (failed, what) => compiled(_gyral$t7, [failed ? "false" : "true", failed ? `The ${what} could not load. Reload the page to try again.` : `Loading ${what}…`]);
1225
+ var CrumbItem = (c, current) => compiled(_gyral$t8, [
1226
+ c.href,
1227
+ current ? "page" : null,
1228
+ c.name
1229
+ ]);
1230
+ var breadcrumbs = (crumbs) => {
1231
+ const last = crumbs.at(-1)?.href;
1232
+ return compiled(_gyral$t9, [each(crumbs, (c) => c.href, CrumbItem, (c) => c.href === last)]);
1233
+ };
1234
+ var categoryOf = (c, id) => c.categories.find((k) => k.id === id);
1235
+ var CategorySection = (k, games) => compiled(_gyral$t10, [
1236
+ k.id,
1237
+ k.id,
1238
+ k.id,
1239
+ categoryPath(k.id),
1240
+ k.name,
1241
+ k.description,
1242
+ grid(games, CardH3)
1243
+ ]);
1244
+ var LineupItem = (r) => compiled(_gyral$t11, [
1245
+ rankLabel(r.rank),
1246
+ gamePath(r.game.id),
1247
+ r.game.name,
1248
+ r.game.id,
1249
+ r.category,
1250
+ playersRange(r.game.players),
1251
+ STATUS_LABELS[r.game.status]
1252
+ ]);
1253
+ var lineup = (rows) => compiled(_gyral$t12, [each(rows, (r) => r.game.id, LineupItem)]);
1254
+ var rail = (c) => compiled(_gyral$t13, [adSlot("category-rail", c)]);
1255
+ var HOME = { page: "home" };
1256
+ function homeView(c) {
1257
+ const games = c.summaries;
1258
+ const featured = games?.filter((g) => g.featured) ?? [];
1259
+ const [first, ...rest] = c.categories;
1260
+ const section = (k) => CategorySection(k, games?.filter((g) => g.category === k.id) ?? []);
1261
+ return compiled(_gyral$t14, [games === null ? loading(c.summariesLoad === "failed", "games") : compiled(_gyral$t15, [
1262
+ grid(featured, CardH3),
1263
+ adSlot("index-hero", HOME),
1264
+ first === void 0 ? nothing : section(first),
1265
+ rest.length > 0 ? adSlot("index-inline", HOME) : nothing,
1266
+ rest.map(section),
1267
+ lineup(games.map((game, n) => ({
1268
+ rank: n + 1,
1269
+ game,
1270
+ category: categoryOf(c, game.category)?.name ?? game.category
1271
+ })))
1272
+ ]), rail(HOME)]);
1273
+ }
1274
+ var OtherCategory = (k) => compiled(_gyral$t16, [
1275
+ categoryPath(k.id),
1276
+ k.name,
1277
+ k.games
1278
+ ]);
1279
+ function categoryView(k, c) {
1280
+ const games = c.summaries?.filter((g) => g.category === k.id);
1281
+ return compiled(_gyral$t17, [
1282
+ k.id,
1283
+ breadcrumbs([{
1284
+ name: "Games",
1285
+ href: "/"
1286
+ }, {
1287
+ name: k.name,
1288
+ href: categoryPath(k.id)
1289
+ }]),
1290
+ k.name,
1291
+ k.description,
1292
+ games === void 0 ? loading(c.summariesLoad === "failed", "games") : grid(games, CardH2),
1293
+ each(c.categories.filter((o) => o.id !== k.id), (o) => o.id, OtherCategory),
1294
+ rail({
1295
+ page: "category",
1296
+ category: k.id
1297
+ })
1298
+ ]);
1299
+ }
1300
+ /**
1301
+ * The PWA's "Make available offline" control (@joystyk/pwa defines the element in the
1302
+ * browser). Server-rendered as an empty box; it fills in once a service worker is active.
1303
+ */
1304
+ var offlineToggle = (g) => compiled(_gyral$t18, [
1305
+ g.id,
1306
+ g.name,
1307
+ g.assets
1308
+ ]);
1309
+ var Rule = (rule) => compiled(_gyral$t1, [rule]);
1310
+ var OtherGame = (g) => compiled(_gyral$t19, [
1311
+ gamePath(g.id),
1312
+ g.name,
1313
+ g.summary,
1314
+ g.id
1315
+ ]);
1316
+ function gameView(g, c) {
1317
+ const k = categoryOf(c, g.category);
1318
+ const others = c.summaries?.filter((o) => o.id !== g.id) ?? [];
1319
+ return compiled(_gyral$t20, [
1320
+ g.category,
1321
+ breadcrumbs([
1322
+ {
1323
+ name: "Games",
1324
+ href: "/"
1325
+ },
1326
+ ...k === void 0 ? [] : [{
1327
+ name: k.name,
1328
+ href: categoryPath(k.id)
1329
+ }],
1330
+ {
1331
+ name: g.name,
1332
+ href: gamePath(g.id)
1333
+ }
1334
+ ]),
1335
+ k === void 0 ? "Game" : `${k.name} game`,
1336
+ pageTitleOf(g),
1337
+ g.summary,
1338
+ STATUS_LABELS[g.status],
1339
+ playersLabel(g.players),
1340
+ g.modes.map((m) => MODE_LABELS[m]).join(", "),
1341
+ g.aiLevels.length === 0 ? nothing : compiled(_gyral$t21, []),
1342
+ g.modes.includes("daily") ? adSlot("daily-presenting", {
1343
+ page: "daily",
1344
+ game: g.id,
1345
+ category: g.category
1346
+ }) : nothing,
1347
+ g.name,
1348
+ launcherGameOf(g),
1349
+ g.status === "available" ? offlineToggle(g) : nothing,
1350
+ adSlot("game-page", {
1351
+ page: "game",
1352
+ game: g.id,
1353
+ category: g.category
1354
+ }),
1355
+ g.name,
1356
+ g.description,
1357
+ g.attribution === void 0 ? nothing : compiled(_gyral$t22, [g.attribution.href, g.attribution.text]),
1358
+ g.name,
1359
+ g.placeholder ? compiled(_gyral$t23, []) : nothing,
1360
+ each(g.rules, (r) => r, Rule),
1361
+ others.length === 0 ? nothing : compiled(_gyral$t24, [each(others, (o) => o.id, OtherGame)])
1362
+ ]);
1363
+ }
1364
+ var notFoundView = () => compiled(_gyral$t25, []);
1365
+ /** True when the page's content (and so its h1) is on screen, rather than a loading line. */
1366
+ function isReady(page, c) {
1367
+ switch (page._tag) {
1368
+ case "Home": return c.summaries !== null;
1369
+ case "Category": return c.summaries !== null || !c.categories.some((k) => k.id === page.id);
1370
+ case "Game": return page.id in c.games || c.missing.includes(page.id);
1371
+ case "Advertise":
1372
+ case "Licenses":
1373
+ case "AdvertisePolicy":
1374
+ case "AdvertiseSent":
1375
+ case "LeavingSite":
1376
+ case "NotFound": return true;
1377
+ }
1378
+ }
1379
+ function mainView(page, c) {
1380
+ switch (page._tag) {
1381
+ case "Home": return homeView(c);
1382
+ case "NotFound": return notFoundView();
1383
+ case "Licenses": return compiled(_gyral$t26, []);
1384
+ case "Advertise": return advertiseView(c);
1385
+ case "AdvertisePolicy": return policyView();
1386
+ case "AdvertiseSent": return sentView();
1387
+ case "LeavingSite": return c.leaving?.id === page.id ? leavingView(c.leaving) : notFoundView();
1388
+ case "Category": {
1389
+ const k = categoryOf(c, page.id);
1390
+ return k === void 0 ? notFoundView() : categoryView(k, c);
1391
+ }
1392
+ case "Game": {
1393
+ const g = c.games[page.id];
1394
+ if (g !== void 0) return gameView(g, c);
1395
+ if (c.missing.includes(page.id)) return notFoundView();
1396
+ return loading(c.gameLoads[page.id] === "failed", "game");
1397
+ }
1398
+ }
1399
+ }
1400
+ var NavItem = (k, current) => compiled(_gyral$t8, [
1401
+ categoryPath(k.id),
1402
+ current ? "page" : null,
1403
+ k.name
1404
+ ]);
1405
+ var masthead = (page, c) => compiled(_gyral$t27, [page._tag === "Home" ? "page" : null, each(c.categories, (k) => k.id, NavItem, (k) => page._tag === "Category" && page.id === k.id)]);
1406
+ var footer = () => compiled(_gyral$t28, [ADVERTISE_PATH]);
1407
+ //#endregion
1408
+ export { footer, isReady, launcherGameOf, mainView, masthead };
1409
+
1410
+ //# sourceMappingURL=views.js.map