Repository navigation
Expand file tree
/
Copy path13.html
More file actions
584 lines (550 loc) · 23.7 KB
/
Copy path13.html
File metadata and controls
584 lines (550 loc) · 23.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
<!DOCTYPE html>
<html class="light" lang="en"><head>
<meta charset="utf-8"/>
<meta content="width=device-width, initial-scale=1.0" name="viewport"/>
<title>CHANGEMEPLS Dashboard</title>
<!-- Material Symbols -->
<link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:wght,FILL@100..700,0..1&display=swap" rel="stylesheet"/>
<!-- Google Fonts -->
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Space+Grotesk:wght@300;400;500;600;700&display=swap" rel="stylesheet"/>
<link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:wght,FILL@100..700,0..1&display=swap" rel="stylesheet"/>
<!-- Tailwind CSS -->
<script src="https://cdn.tailwindcss.com?plugins=forms,container-queries"></script>
<script id="tailwind-config">
tailwind.config = {
darkMode: "class",
theme: {
extend: {
colors: {
"secondary-fixed-dim": "#adc7ff",
"inverse-on-surface": "#eaf1ff",
"surface-variant": "#d3e4fe",
"outline-variant": "#bbcbb9",
"surface-container-low": "#eff4ff",
"primary-container": "#00d166",
"on-secondary": "#ffffff",
"outline": "#6c7b6c",
"surface-container-high": "#dce9ff",
"secondary-container": "#0070ea",
"on-primary-container": "#005324",
"on-background": "#0b1c30",
"background": "#f8f9ff",
"on-error-container": "#93000a",
"inverse-primary": "#30e375",
"surface-tint": "#006d32",
"on-tertiary-fixed": "#131b2e",
"on-secondary-container": "#fefcff",
"secondary": "#0059bb",
"on-primary-fixed-variant": "#005224",
"surface-dim": "#cbdbf5",
"tertiary-fixed-dim": "#bec6e0",
"primary-fixed": "#64ff92",
"on-primary-fixed": "#00210b",
"primary": "#006d32",
"on-surface": "#0b1c30",
"error-container": "#ffdad6",
"primary-fixed-dim": "#30e375",
"surface-container-lowest": "#ffffff",
"secondary-fixed": "#d8e2ff",
"surface-container-highest": "#d3e4fe",
"on-tertiary": "#ffffff",
"error": "#ba1a1a",
"surface": "#f8f9ff",
"tertiary-container": "#aeb5cf",
"on-primary": "#ffffff",
"on-surface-variant": "#3c4a3d",
"on-secondary-fixed-variant": "#004493",
"on-tertiary-container": "#3f475c",
"surface-container": "#e5eeff",
"surface-bright": "#f8f9ff",
"tertiary": "#565e74",
"on-error": "#ffffff",
"tertiary-fixed": "#dae2fd",
"inverse-surface": "#213145",
"on-secondary-fixed": "#001a41",
"on-tertiary-fixed-variant": "#3f465c"
},
fontFamily: {
"headline": ["Space Grotesk"],
"body": ["Inter"],
"label": ["Inter"]
},
borderRadius: {"DEFAULT": "0.25rem", "lg": "0.5rem", "xl": "0.75rem", "full": "9999px"},
},
},
}
</script>
<style>
.material-symbols-outlined {
font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
vertical-align: middle;
}
.glass-card {
background: rgba(255, 255, 255, 0.7);
backdrop-filter: blur(12px);
-webkit-backdrop-filter: blur(12px);
}
.circular-progress {
background: conic-gradient(from 0deg, var(--tw-color-primary) 72%, transparent 72%);
}
/* Custom hide scrollbar */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }
</style>
<style>
body {
min-height: max(884px, 100dvh);
}
</style>
<style id="impossible-captcha-style">
.impossible-captcha-modal,
.impossible-captcha-modal * {
box-sizing: border-box;
}
.impossible-captcha-modal {
position: fixed;
inset: 0;
z-index: 9999;
display: none;
align-items: center;
justify-content: center;
padding: 24px;
background: rgba(0, 0, 0, 0.68);
-webkit-backdrop-filter: blur(18px);
backdrop-filter: blur(18px);
}
.impossible-captcha-modal.is-open {
display: flex;
}
.impossible-captcha-panel {
position: relative;
width: min(100%, 420px);
max-height: calc(100svh - 48px);
overflow: auto;
border: 1px solid rgba(255, 255, 255, 0.14);
border-radius: 12px;
background: #191a1f;
color: #fff;
box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
font-family: Inter, Manrope, "Plus Jakarta Sans", Arial, sans-serif;
}
.impossible-captcha-close {
position: absolute;
z-index: 2;
top: 16px;
right: 16px;
width: 36px;
height: 36px;
display: grid;
place-items: center;
border: 0;
border-radius: 999px;
background: rgba(255, 255, 255, 0.12);
color: #fff;
cursor: pointer;
font: inherit;
font-size: 22px;
line-height: 1;
}
.impossible-captcha-close:hover,
.impossible-captcha-tool:hover {
background: rgba(255, 255, 255, 0.18);
}
.impossible-captcha-header {
margin: 16px 16px 12px;
padding: 16px 56px 16px 16px;
background: #2563eb;
color: #fff;
}
.impossible-captcha-header span {
display: block;
opacity: 0.82;
font-size: 14px;
line-height: 1.4;
}
.impossible-captcha-header strong {
display: block;
margin-top: 4px;
font-size: 20px;
line-height: 1.2;
font-weight: 700;
}
.impossible-captcha-grid {
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 4px;
padding: 0 16px 16px;
}
.impossible-captcha-tile {
position: relative;
aspect-ratio: 1;
overflow: hidden;
border: 2px solid transparent;
border-radius: 0;
background:
linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent 40%),
var(--tile-bg, #24262d);
cursor: pointer;
font: inherit;
}
.impossible-captcha-tile:nth-child(1) { --tile-bg: radial-gradient(circle at 70% 25%, #9ca3af, #111827 58%); }
.impossible-captcha-tile:nth-child(2) { --tile-bg: conic-gradient(from 45deg, #1d4ed8, #111827, #7c3aed, #1d4ed8); }
.impossible-captcha-tile:nth-child(3) { --tile-bg: linear-gradient(45deg, #27272a, #0f172a 45%, #f8fafc 46%, #111827 54%); }
.impossible-captcha-tile:nth-child(4) { --tile-bg: repeating-linear-gradient(60deg, #334155 0 8px, #020617 8px 16px); }
.impossible-captcha-tile:nth-child(5) { --tile-bg: radial-gradient(circle at 50% 50%, #c084fc, #1e1b4b 42%, #030712 70%); }
.impossible-captcha-tile:nth-child(6) { --tile-bg: linear-gradient(120deg, #0f766e, #111827 46%, #475569); }
.impossible-captcha-tile:nth-child(7) { --tile-bg: conic-gradient(from 90deg, #111827, #64748b, #020617, #94a3b8, #111827); }
.impossible-captcha-tile:nth-child(8) { --tile-bg: radial-gradient(circle at 20% 80%, #f8fafc, #1f2937 34%, #020617); }
.impossible-captcha-tile:nth-child(9) { --tile-bg: repeating-conic-gradient(from 18deg, #1f2937 0 10deg, #4b5563 10deg 20deg); }
.impossible-captcha-tile.is-selected {
border-color: #60a5fa;
box-shadow: inset 0 0 0 2px rgba(96, 165, 250, 0.45);
}
.impossible-captcha-tile.is-selected::after {
content: "check";
position: absolute;
top: 6px;
right: 6px;
width: 22px;
height: 22px;
display: grid;
place-items: center;
border-radius: 999px;
background: #2563eb;
color: #fff;
font-family: "Material Symbols Outlined";
font-size: 16px;
}
.impossible-captcha-actions {
display: flex;
align-items: center;
justify-content: space-between;
gap: 16px;
margin: 0 16px;
padding: 14px 0 16px;
border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.impossible-captcha-tools {
display: flex;
gap: 10px;
color: #c4c7c8;
}
.impossible-captcha-tool {
width: 32px;
height: 32px;
display: grid;
place-items: center;
border: 0;
border-radius: 6px;
background: transparent;
color: inherit;
cursor: pointer;
font: inherit;
}
.impossible-captcha-verify {
min-width: 96px;
min-height: 36px;
padding: 0 20px;
border: 0;
border-radius: 4px;
background: #2563eb;
color: #fff;
cursor: pointer;
font: inherit;
font-weight: 700;
}
.impossible-captcha-verify:hover {
background: #1d4ed8;
}
.impossible-captcha-error {
min-height: 28px;
padding: 0 16px 18px;
color: #ffb4ab;
font-size: 14px;
line-height: 1.35;
text-align: center;
visibility: hidden;
}
.impossible-captcha-error.is-visible {
visibility: visible;
}
@media (max-width: 480px) {
.impossible-captcha-modal {
padding: 16px;
}
.impossible-captcha-panel {
width: 100%;
}
}
</style>
</head>
<body class="bg-background text-on-background font-body antialiased min-h-screen pb-24">
<!-- TopAppBar -->
<header class="sticky top-0 z-50 flex items-center justify-between px-6 py-4 bg-surface/80 backdrop-blur-md">
<div class="flex items-center gap-3">
<div class="w-10 h-10 rounded-full bg-surface-container flex items-center justify-center overflow-hidden">
<img alt="User Profile" class="w-full h-full object-cover" data-alt="User profile avatar icon placeholder" src="https://lh3.googleusercontent.com/aida-public/AB6AXuBjxMOnCACfRz2yL9-MeupUG2jc3soaE1lMMF0X1j54ZanW6JW8cLcHhOkSV5VKMrKgIN89XvBG1mbIAVyEHKl5Wzc1lZeXPWa9ddm3Chlk7EjZk176UR8AMqBqeS47TWRODGtA3rKIKL8j0_lCIS7I3pZb19a0A74fZ19qfRdj6nfY3Ho04BaPY7xxMz1SQzqqhgfPhIEPYn_UKl20kCOGv5iOOoJ11OpRmYeJHywfmWBO8lsRpo1XoVE9dM6S8E3BIsH520HkDOmH"/>
</div>
<span class="font-headline font-bold text-xl tracking-tight text-on-surface">CHANGEMEPLS</span>
</div>
<button class="w-10 h-10 flex items-center justify-center rounded-full hover:bg-surface-container transition-colors">
<span class="material-symbols-outlined text-on-surface">notifications</span>
</button>
</header>
<main class="max-w-5xl mx-auto px-6 pt-8 space-y-12">
<!-- Centerpiece: Luminous Engine Dial -->
<section class="flex flex-col items-center">
<div class="relative w-72 h-72 md:w-80 md:h-80 flex items-center justify-center">
<!-- Shadow Glow -->
<div class="absolute inset-0 rounded-full bg-primary/5 blur-3xl"></div>
<!-- Outer Ring: Energy (primary) -->
<svg class="absolute w-full h-full -rotate-90 transform" viewbox="0 0 100 100">
<circle class="text-surface-container" cx="50" cy="50" fill="transparent" r="45" stroke="currentColor" stroke-width="6"></circle>
<circle class="text-primary-container" cx="50" cy="50" fill="transparent" r="45" stroke="currentColor" stroke-dasharray="282.7" stroke-dashoffset="70" stroke-linecap="round" stroke-width="6"></circle>
</svg>
<!-- Inner Ring: Water (secondary) -->
<svg class="absolute w-3/4 h-3/4 -rotate-90 transform" viewbox="0 0 100 100">
<circle class="text-surface-container-high" cx="50" cy="50" fill="transparent" r="45" stroke="currentColor" stroke-width="8"></circle>
<circle class="text-secondary" cx="50" cy="50" fill="transparent" r="45" stroke="currentColor" stroke-dasharray="282.7" stroke-dashoffset="120" stroke-linecap="round" stroke-width="8"></circle>
</svg>
<!-- Central Content -->
<div class="z-10 text-center">
<div class="font-headline text-5xl md:text-6xl font-bold text-on-surface">12.4</div>
<div class="text-label-md font-medium text-outline uppercase tracking-widest mt-1">kWh Today</div>
<div class="mt-4 flex items-center justify-center gap-2 text-secondary font-semibold">
<span class="material-symbols-outlined text-sm">water_drop</span>
<span class="font-headline text-xl">240L</span>
</div>
</div>
</div>
<!-- Stats Metadata Asymmetry -->
<div class="grid grid-cols-2 gap-8 mt-10 w-full max-w-md">
<div class="space-y-1">
<span class="text-xs font-bold uppercase tracking-tighter text-outline">Energy Efficiency</span>
<div class="flex items-baseline gap-1">
<span class="font-headline text-2xl font-bold text-primary">88%</span>
<span class="material-symbols-outlined text-primary text-sm">trending_up</span>
</div>
</div>
<div class="space-y-1 text-right">
<span class="text-xs font-bold uppercase tracking-tighter text-outline">Resource Health</span>
<div class="flex items-baseline justify-end gap-1">
<span class="font-headline text-2xl font-bold text-on-surface">Optimal</span>
</div>
</div>
</div>
</section>
<!-- Active Appliances Section -->
<section class="space-y-6">
<div class="flex items-end justify-between px-2">
<div>
<h2 class="font-headline text-2xl font-bold tracking-tight text-on-surface">Active Appliances</h2>
<p class="text-body-sm text-outline">3 systems drawing power</p>
</div>
<button class="text-primary font-semibold text-sm hover:underline">View All</button>
</div>
<!-- Horizontal Scroll Cards -->
<div class="flex gap-6 overflow-x-auto no-scrollbar pb-6 snap-x">
<!-- HVAC Card -->
<div class="snap-start flex-shrink-0 w-64 p-6 rounded-xl bg-surface-container-low shadow-sm transition-all hover:bg-surface-container-high">
<div class="flex justify-between items-start mb-8">
<div class="p-3 rounded-lg bg-primary-container/20 text-primary">
<span class="material-symbols-outlined">ac_unit</span>
</div>
<label class="relative inline-flex items-center cursor-pointer">
<input checked="" class="sr-only peer" type="checkbox"/>
<div class="w-11 h-6 bg-surface-container-highest rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-0.5 after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-primary"></div>
</label>
</div>
<h3 class="font-headline text-lg font-bold text-on-surface">HVAC</h3>
<div class="mt-2 space-y-1">
<div class="flex justify-between text-sm">
<span class="text-outline">Current Draw</span>
<span class="font-headline font-bold text-on-surface">1.2 kW</span>
</div>
<div class="w-full bg-surface-container-highest h-1.5 rounded-full overflow-hidden">
<div class="bg-primary h-full w-2/3"></div>
</div>
</div>
</div>
<!-- EV Charger Card -->
<div class="snap-start flex-shrink-0 w-64 p-6 rounded-xl bg-surface-container-low shadow-sm transition-all hover:bg-surface-container-high">
<div class="flex justify-between items-start mb-8">
<div class="p-3 rounded-lg bg-primary-container/20 text-primary">
<span class="material-symbols-outlined">ev_station</span>
</div>
<label class="relative inline-flex items-center cursor-pointer">
<input checked="" class="sr-only peer" type="checkbox"/>
<div class="w-11 h-6 bg-surface-container-highest rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-0.5 after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-primary"></div>
</label>
</div>
<h3 class="font-headline text-lg font-bold text-on-surface">EV Charger</h3>
<div class="mt-2 space-y-1">
<div class="flex justify-between text-sm">
<span class="text-outline">Current Draw</span>
<span class="font-headline font-bold text-on-surface">7.4 kW</span>
</div>
<div class="w-full bg-surface-container-highest h-1.5 rounded-full overflow-hidden">
<div class="bg-primary h-full w-[85%]"></div>
</div>
</div>
</div>
<!-- Smart Sprinkler Card -->
<div class="snap-start flex-shrink-0 w-64 p-6 rounded-xl bg-surface-container-low shadow-sm transition-all hover:bg-surface-container-high">
<div class="flex justify-between items-start mb-8">
<div class="p-3 rounded-lg bg-secondary-container/10 text-secondary">
<span class="material-symbols-outlined">sprinkler</span>
</div>
<label class="relative inline-flex items-center cursor-pointer">
<input class="sr-only peer" type="checkbox"/>
<div class="w-11 h-6 bg-surface-container-highest rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-0.5 after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-secondary"></div>
</label>
</div>
<h3 class="font-headline text-lg font-bold text-on-surface">Smart Sprinkler</h3>
<div class="mt-2 space-y-1">
<div class="flex justify-between text-sm">
<span class="text-outline">Water Flow</span>
<span class="font-headline font-bold text-on-surface">0 L/m</span>
</div>
<div class="w-full bg-surface-container-highest h-1.5 rounded-full overflow-hidden">
<div class="bg-secondary h-full w-0"></div>
</div>
</div>
</div>
</div>
</section>
<!-- Bento Grid Insights -->
<section class="grid grid-cols-1 md:grid-cols-3 gap-6">
<div class="md:col-span-2 p-8 rounded-2xl bg-surface-container-lowest border-outline-variant/10 shadow-sm relative overflow-hidden group">
<div class="relative z-10">
<h4 class="font-headline text-xl font-bold text-on-surface">Peak Saving Window</h4>
<p class="text-body-sm text-outline mt-2 max-w-xs">Lower rates available between 11 PM and 5 AM. Schedule your EV charge now.</p>
<button class="mt-6 px-6 py-2.5 bg-primary text-on-primary font-semibold rounded-lg hover:opacity-90 transition-opacity">Schedule Now</button>
</div>
<div class="absolute right-0 bottom-0 opacity-10 group-hover:scale-110 transition-transform">
<span class="material-symbols-outlined text-[160px] translate-x-12 translate-y-12">bolt</span>
</div>
</div>
<div class="p-8 rounded-2xl bg-secondary text-on-secondary flex flex-col justify-between">
<div>
<span class="material-symbols-outlined text-3xl">water_drop</span>
<h4 class="font-headline text-lg font-bold mt-4">Water Leak Alert</h4>
</div>
<p class="text-sm opacity-90 mt-2">No abnormal flow detected in the main line today.</p>
<div class="mt-6 font-headline text-2xl font-bold">Secure</div>
</div>
</section>
</main>
<!-- BottomNavBar -->
<nav class="fixed bottom-0 left-0 right-0 z-50 bg-surface/90 backdrop-blur-xl px-6 py-3 border-t border-outline-variant/10">
<div class="max-w-md mx-auto flex items-center justify-between">
<a class="flex flex-col items-center gap-1 text-primary" href="#">
<span class="material-symbols-outlined" style="font-variation-settings: 'FILL' 1;">dashboard</span>
<span class="text-[10px] font-bold uppercase tracking-widest">Dashboard</span>
</a>
<a class="flex flex-col items-center gap-1 text-outline hover:text-on-surface transition-colors" href="#">
<span class="material-symbols-outlined">bar_chart</span>
<span class="text-[10px] font-medium uppercase tracking-widest">Usage</span>
</a>
<a class="flex flex-col items-center gap-1 text-outline hover:text-on-surface transition-colors" href="#">
<span class="material-symbols-outlined">settings_input_component</span>
<span class="text-[10px] font-medium uppercase tracking-widest">Automations</span>
</a>
<a class="flex flex-col items-center gap-1 text-outline hover:text-on-surface transition-colors" href="#">
<span class="material-symbols-outlined">settings</span>
<span class="text-[10px] font-medium uppercase tracking-widest">Settings</span>
</a>
</div>
</nav>
<div class="impossible-captcha-modal" id="impossibleCaptchaModal" role="dialog" aria-modal="true" aria-hidden="true" aria-labelledby="impossibleCaptchaTitle">
<div class="impossible-captcha-panel" role="document">
<button class="impossible-captcha-close" id="impossibleCaptchaClose" type="button" aria-label="Close">×</button>
<div class="impossible-captcha-header">
<span>Select all images with</span>
<strong id="impossibleCaptchaTitle">a 4-dimensional object</strong>
</div>
<div class="impossible-captcha-grid" id="impossibleCaptchaGrid">
<button class="impossible-captcha-tile" type="button" aria-label="Captcha tile 1"></button>
<button class="impossible-captcha-tile" type="button" aria-label="Captcha tile 2"></button>
<button class="impossible-captcha-tile" type="button" aria-label="Captcha tile 3"></button>
<button class="impossible-captcha-tile" type="button" aria-label="Captcha tile 4"></button>
<button class="impossible-captcha-tile" type="button" aria-label="Captcha tile 5"></button>
<button class="impossible-captcha-tile" type="button" aria-label="Captcha tile 6"></button>
<button class="impossible-captcha-tile" type="button" aria-label="Captcha tile 7"></button>
<button class="impossible-captcha-tile" type="button" aria-label="Captcha tile 8"></button>
<button class="impossible-captcha-tile" type="button" aria-label="Captcha tile 9"></button>
</div>
<div class="impossible-captcha-actions">
<div class="impossible-captcha-tools">
<button class="impossible-captcha-tool" id="impossibleCaptchaRefresh" type="button" aria-label="Refresh challenge">
<span class="material-symbols-outlined text-lg">refresh</span>
</button>
<button class="impossible-captcha-tool" type="button" aria-label="Play audio challenge">
<span class="material-symbols-outlined text-lg">volume_up</span>
</button>
<button class="impossible-captcha-tool" type="button" aria-label="Captcha information">
<span class="material-symbols-outlined text-lg">info</span>
</button>
</div>
<button class="impossible-captcha-verify" id="impossibleCaptchaVerify" type="button">Verify</button>
</div>
<div class="impossible-captcha-error" id="impossibleCaptchaError" aria-live="polite">Verification failed. Please select every impossible object and try again.</div>
</div>
</div>
<script id="impossible-captcha-script">
(() => {
const modal = document.getElementById("impossibleCaptchaModal");
const closeButton = document.getElementById("impossibleCaptchaClose");
const refreshButton = document.getElementById("impossibleCaptchaRefresh");
const verifyButton = document.getElementById("impossibleCaptchaVerify");
const error = document.getElementById("impossibleCaptchaError");
const tiles = [...document.querySelectorAll(".impossible-captcha-tile")];
const triggerSelector = "button, a[href], [role='button'], .cursor-pointer";
const triggers = [...document.querySelectorAll(triggerSelector)].filter((trigger) => !trigger.closest("#impossibleCaptchaModal"));
const resetChallenge = (hideError = true) => {
tiles.forEach((tile) => tile.classList.remove("is-selected"));
if (hideError) {
error.classList.remove("is-visible");
}
};
const openCaptcha = (event) => {
if (event) {
event.preventDefault();
event.stopPropagation();
}
resetChallenge();
modal.classList.add("is-open");
modal.setAttribute("aria-hidden", "false");
verifyButton.focus({ preventScroll: true });
};
const closeCaptcha = () => {
modal.classList.remove("is-open");
modal.setAttribute("aria-hidden", "true");
};
triggers.forEach((trigger) => {
trigger.addEventListener("click", openCaptcha);
});
tiles.forEach((tile) => {
tile.addEventListener("click", () => {
tile.classList.toggle("is-selected");
});
});
refreshButton.addEventListener("click", () => resetChallenge());
closeButton.addEventListener("click", closeCaptcha);
verifyButton.addEventListener("click", () => {
error.classList.add("is-visible");
window.setTimeout(() => resetChallenge(false), 900);
});
modal.addEventListener("click", (event) => {
if (event.target === modal) {
closeCaptcha();
}
});
document.addEventListener("keydown", (event) => {
if (event.key === "Escape" && modal.classList.contains("is-open")) {
closeCaptcha();
}
});
})();
</script>
</body></html>