@juspay/shooter 1.4.0 → 1.5.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.
- package/.claude/hooks/notifier.cjs +15 -1
- package/README.md +109 -17
- package/bin/shooter.cjs +30 -12
- package/build/client/_app/immutable/chunks/{BN1NjBrw.js → BIaXC2t9.js} +1 -1
- package/build/client/_app/immutable/chunks/BIaXC2t9.js.br +0 -0
- package/build/client/_app/immutable/chunks/BIaXC2t9.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{CF4lQ45j.js → CRbaG9cv.js} +1 -1
- package/build/client/_app/immutable/chunks/CRbaG9cv.js.br +0 -0
- package/build/client/_app/immutable/chunks/CRbaG9cv.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{CDVSripB.js → CiF38mQq.js} +1 -1
- package/build/client/_app/immutable/chunks/CiF38mQq.js.br +0 -0
- package/build/client/_app/immutable/chunks/CiF38mQq.js.gz +0 -0
- package/build/client/_app/immutable/entry/{app.DwWiuoEC.js → app.CU7KVZja.js} +2 -2
- package/build/client/_app/immutable/entry/app.CU7KVZja.js.br +0 -0
- package/build/client/_app/immutable/entry/app.CU7KVZja.js.gz +0 -0
- package/build/client/_app/immutable/entry/start.RAMZY19t.js +1 -0
- package/build/client/_app/immutable/entry/start.RAMZY19t.js.br +2 -0
- package/build/client/_app/immutable/entry/start.RAMZY19t.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{0.ejabgzDQ.js → 0.Bi3XYMSu.js} +1 -1
- package/build/client/_app/immutable/nodes/0.Bi3XYMSu.js.br +0 -0
- package/build/client/_app/immutable/nodes/0.Bi3XYMSu.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{1.BFK7Ubrr.js → 1.DTmfBFmm.js} +1 -1
- package/build/client/_app/immutable/nodes/1.DTmfBFmm.js.br +0 -0
- package/build/client/_app/immutable/nodes/1.DTmfBFmm.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{2.DV3saFiY.js → 2.Cm269yzt.js} +1 -1
- package/build/client/_app/immutable/nodes/2.Cm269yzt.js.br +0 -0
- package/build/client/_app/immutable/nodes/2.Cm269yzt.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{4.D6NIf10D.js → 4.C25c5hMg.js} +1 -1
- package/build/client/_app/immutable/nodes/4.C25c5hMg.js.br +0 -0
- package/build/client/_app/immutable/nodes/4.C25c5hMg.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{5.g3R-QfIW.js → 5.DIkXVP4q.js} +1 -1
- package/build/client/_app/immutable/nodes/5.DIkXVP4q.js.br +0 -0
- package/build/client/_app/immutable/nodes/5.DIkXVP4q.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{6.DSpd_nYK.js → 6.BPL-HzUX.js} +1 -1
- package/build/client/_app/immutable/nodes/6.BPL-HzUX.js.br +0 -0
- package/build/client/_app/immutable/nodes/6.BPL-HzUX.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{7.F9WBFTz2.js → 7.IgEqce53.js} +1 -1
- package/build/client/_app/immutable/nodes/7.IgEqce53.js.br +0 -0
- package/build/client/_app/immutable/nodes/7.IgEqce53.js.gz +0 -0
- package/build/client/_app/version.json +1 -1
- package/build/client/_app/version.json.br +0 -0
- package/build/client/_app/version.json.gz +0 -0
- package/build/server/chunks/{0-ePgrkfG9.js → 0-DiORznXb.js} +2 -2
- package/build/server/chunks/{0-ePgrkfG9.js.map → 0-DiORznXb.js.map} +1 -1
- package/build/server/chunks/{1-BV7u1xGo.js → 1-D0N7vVhH.js} +2 -2
- package/build/server/chunks/{1-BV7u1xGo.js.map → 1-D0N7vVhH.js.map} +1 -1
- package/build/server/chunks/{2-3p1kyvjQ.js → 2-DfSav7a7.js} +2 -2
- package/build/server/chunks/{2-3p1kyvjQ.js.map → 2-DfSav7a7.js.map} +1 -1
- package/build/server/chunks/{4-ChFYfo_S.js → 4-DV5MZUz_.js} +2 -2
- package/build/server/chunks/{4-ChFYfo_S.js.map → 4-DV5MZUz_.js.map} +1 -1
- package/build/server/chunks/{5-q-tQLBBu.js → 5-DJhoAjb0.js} +2 -2
- package/build/server/chunks/{5-q-tQLBBu.js.map → 5-DJhoAjb0.js.map} +1 -1
- package/build/server/chunks/{6-BIaAbm8b.js → 6-Cp8CzYbr.js} +2 -2
- package/build/server/chunks/{6-BIaAbm8b.js.map → 6-Cp8CzYbr.js.map} +1 -1
- package/build/server/chunks/{7--TmbCgrH.js → 7-BA4xzUj3.js} +2 -2
- package/build/server/chunks/{7--TmbCgrH.js.map → 7-BA4xzUj3.js.map} +1 -1
- package/build/server/index.js +1 -1
- package/build/server/index.js.map +1 -1
- package/build/server/manifest.js +8 -8
- package/build/server/manifest.js.map +1 -1
- package/package.json +5 -2
- package/scripts/install.sh +122 -70
- package/scripts/setup.cjs +242 -241
- package/build/client/_app/immutable/chunks/BN1NjBrw.js.br +0 -0
- package/build/client/_app/immutable/chunks/BN1NjBrw.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CDVSripB.js.br +0 -0
- package/build/client/_app/immutable/chunks/CDVSripB.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CF4lQ45j.js.br +0 -0
- package/build/client/_app/immutable/chunks/CF4lQ45j.js.gz +0 -0
- package/build/client/_app/immutable/entry/app.DwWiuoEC.js.br +0 -0
- package/build/client/_app/immutable/entry/app.DwWiuoEC.js.gz +0 -0
- package/build/client/_app/immutable/entry/start.DG8BMhrh.js +0 -1
- package/build/client/_app/immutable/entry/start.DG8BMhrh.js.br +0 -0
- package/build/client/_app/immutable/entry/start.DG8BMhrh.js.gz +0 -0
- package/build/client/_app/immutable/nodes/0.ejabgzDQ.js.br +0 -0
- package/build/client/_app/immutable/nodes/0.ejabgzDQ.js.gz +0 -0
- package/build/client/_app/immutable/nodes/1.BFK7Ubrr.js.br +0 -0
- package/build/client/_app/immutable/nodes/1.BFK7Ubrr.js.gz +0 -0
- package/build/client/_app/immutable/nodes/2.DV3saFiY.js.br +0 -0
- package/build/client/_app/immutable/nodes/2.DV3saFiY.js.gz +0 -0
- package/build/client/_app/immutable/nodes/4.D6NIf10D.js.br +0 -0
- package/build/client/_app/immutable/nodes/4.D6NIf10D.js.gz +0 -0
- package/build/client/_app/immutable/nodes/5.g3R-QfIW.js.br +0 -0
- package/build/client/_app/immutable/nodes/5.g3R-QfIW.js.gz +0 -0
- package/build/client/_app/immutable/nodes/6.DSpd_nYK.js.br +0 -0
- package/build/client/_app/immutable/nodes/6.DSpd_nYK.js.gz +0 -0
- package/build/client/_app/immutable/nodes/7.F9WBFTz2.js.br +0 -0
- package/build/client/_app/immutable/nodes/7.F9WBFTz2.js.gz +0 -0
|
@@ -39,6 +39,20 @@ const LOCAL_BASE_URL = `http://localhost:${LOCAL_PORT}`;
|
|
|
39
39
|
const BASE_URL = USE_LOCAL ? LOCAL_BASE_URL : REMOTE_BASE_URL;
|
|
40
40
|
const API_URL = `${BASE_URL}/api/notify`;
|
|
41
41
|
|
|
42
|
+
// Read API_KEY from ~/.shooter/.env if not in environment
|
|
43
|
+
if (!process.env.API_KEY && !process.env.SHOOTER_API_KEY) {
|
|
44
|
+
const envPath = path.join(require('os').homedir(), '.shooter', '.env');
|
|
45
|
+
try {
|
|
46
|
+
const envContent = fs.readFileSync(envPath, 'utf-8');
|
|
47
|
+
const match = envContent.match(/^API_KEY=["']?([^"'\n]+)["']?$/m);
|
|
48
|
+
if (match) {
|
|
49
|
+
process.env.API_KEY = match[1];
|
|
50
|
+
}
|
|
51
|
+
} catch {
|
|
52
|
+
// .env file doesn't exist — API_KEY must be in environment
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
42
56
|
// Authentication
|
|
43
57
|
const API_KEY = process.env.API_KEY || process.env.SHOOTER_API_KEY;
|
|
44
58
|
const DEVICE_TOKEN = process.env.SHOOTER_DEVICE_TOKEN || null;
|
|
@@ -1467,7 +1481,7 @@ const OpenCodePlugin = async (ctx) => {
|
|
|
1467
1481
|
},
|
|
1468
1482
|
|
|
1469
1483
|
// Specific hook: After tool execution
|
|
1470
|
-
'tool.execute.after': async (input,
|
|
1484
|
+
'tool.execute.after': async (input, _output) => {
|
|
1471
1485
|
const commonEvent = adaptOpenCodeEvent('tool.execute.after', {
|
|
1472
1486
|
tool: input?.tool || 'unknown',
|
|
1473
1487
|
});
|
package/README.md
CHANGED
|
@@ -71,19 +71,23 @@ Open [http://localhost:54007](http://localhost:54007) in your browser. Visit `/c
|
|
|
71
71
|
git clone https://github.com/juspay/shooter.git
|
|
72
72
|
cd shooter
|
|
73
73
|
pnpm install
|
|
74
|
-
|
|
75
|
-
# Edit .env with your values (at minimum, set API_KEY)
|
|
76
|
-
pnpm build
|
|
74
|
+
pnpm setup # generates ~/.shooter/.env with API key, builds the project
|
|
77
75
|
pnpm start
|
|
78
76
|
```
|
|
79
77
|
|
|
80
|
-
|
|
78
|
+
Or without the wizard:
|
|
81
79
|
|
|
82
80
|
```bash
|
|
83
|
-
|
|
84
|
-
|
|
81
|
+
git clone https://github.com/juspay/shooter.git
|
|
82
|
+
cd shooter
|
|
83
|
+
pnpm install
|
|
84
|
+
mkdir -p ~/.shooter && echo "API_KEY=$(openssl rand -hex 32)" > ~/.shooter/.env
|
|
85
|
+
pnpm build
|
|
86
|
+
pnpm start
|
|
85
87
|
```
|
|
86
88
|
|
|
89
|
+
> **Note:** Configuration lives in `~/.shooter/.env` (not the repo root). The hook notifier reads `API_KEY` from this file automatically.
|
|
90
|
+
|
|
87
91
|
---
|
|
88
92
|
|
|
89
93
|
## Architecture
|
|
@@ -131,7 +135,7 @@ source ~/.zshrc
|
|
|
131
135
|
|
|
132
136
|
## Configuration
|
|
133
137
|
|
|
134
|
-
|
|
138
|
+
Configuration is stored in `~/.shooter/.env`. The `pnpm setup` wizard generates this file interactively. Only `API_KEY` is required to start -- push notification config can be added later with `shooter setup --push`.
|
|
135
139
|
|
|
136
140
|
| Variable | Required | Default | Description |
|
|
137
141
|
| ---------------------- | -------- | ------- | ---------------------------------------------------------------- |
|
|
@@ -279,11 +283,17 @@ The `PermissionRequest` hook has a 180-second timeout in `.claude/settings.json`
|
|
|
279
283
|
### Quick Start
|
|
280
284
|
|
|
281
285
|
```bash
|
|
282
|
-
|
|
283
|
-
|
|
286
|
+
# Minimal — just set API_KEY:
|
|
287
|
+
echo "API_KEY=$(openssl rand -hex 32)" > .env
|
|
284
288
|
docker compose up -d
|
|
285
289
|
```
|
|
286
290
|
|
|
291
|
+
Or with a Cloudflare Tunnel for remote access:
|
|
292
|
+
|
|
293
|
+
```bash
|
|
294
|
+
docker compose --profile tunnel up -d
|
|
295
|
+
```
|
|
296
|
+
|
|
287
297
|
### Manual Build and Run
|
|
288
298
|
|
|
289
299
|
```bash
|
|
@@ -291,14 +301,16 @@ docker build -t shooter .
|
|
|
291
301
|
|
|
292
302
|
docker run -d \
|
|
293
303
|
--name shooter \
|
|
294
|
-
|
|
304
|
+
-e API_KEY=your-secret-key-here \
|
|
295
305
|
-p 54007:54007 \
|
|
296
306
|
-v shooter-data:/root/.shooter \
|
|
297
307
|
--restart unless-stopped \
|
|
298
308
|
shooter
|
|
299
309
|
```
|
|
300
310
|
|
|
301
|
-
|
|
311
|
+
> **Required:** Set `API_KEY` either via `-e API_KEY=...`, `--env-file .env`, or in `docker-compose.yml`. Without it, all authenticated endpoints return 401.
|
|
312
|
+
|
|
313
|
+
The multi-stage Dockerfile uses `node:20-slim` with native addon binaries copied from the build stage (no build tools in the production image). SQLite data is persisted in the `shooter-data` volume. The `.env` file is injected at runtime and never baked into the image.
|
|
302
314
|
|
|
303
315
|
A separate `Dockerfile.test` is provided for verifying the fresh-user install experience in an isolated container.
|
|
304
316
|
|
|
@@ -311,11 +323,26 @@ services:
|
|
|
311
323
|
ports:
|
|
312
324
|
- '54007:54007'
|
|
313
325
|
env_file:
|
|
314
|
-
- .env
|
|
326
|
+
- path: .env
|
|
327
|
+
required: false
|
|
328
|
+
# Set API_KEY in .env or uncomment below:
|
|
329
|
+
# environment:
|
|
330
|
+
# - API_KEY=your-secret-key-here
|
|
315
331
|
volumes:
|
|
316
332
|
- shooter-data:/root/.shooter
|
|
317
333
|
restart: unless-stopped
|
|
318
334
|
|
|
335
|
+
# Optional: Cloudflare Tunnel for remote access
|
|
336
|
+
# Start with: docker compose --profile tunnel up -d
|
|
337
|
+
tunnel:
|
|
338
|
+
image: cloudflare/cloudflared:latest
|
|
339
|
+
command: tunnel --no-autoupdate --url http://shooter:54007
|
|
340
|
+
depends_on:
|
|
341
|
+
- shooter
|
|
342
|
+
restart: unless-stopped
|
|
343
|
+
profiles:
|
|
344
|
+
- tunnel
|
|
345
|
+
|
|
319
346
|
volumes:
|
|
320
347
|
shooter-data:
|
|
321
348
|
```
|
|
@@ -404,7 +431,7 @@ The `shooter` command (via `bin/shooter.cjs` or the global `shooter` symlink) su
|
|
|
404
431
|
| `shooter autostart on` | Enable autostart on login (LaunchAgent on macOS, systemd on Linux) |
|
|
405
432
|
| `shooter autostart off` | Disable autostart and remove the service definition |
|
|
406
433
|
| `shooter logs` | Tail server logs (log file on macOS, journalctl on Linux) |
|
|
407
|
-
| `shooter setup` |
|
|
434
|
+
| `shooter setup` | Quick setup (~60s): API key + build. `--auto` for non-interactive, `--push` for push config |
|
|
408
435
|
| `shooter version` | Print version number |
|
|
409
436
|
| `shooter help` | Show all available commands |
|
|
410
437
|
|
|
@@ -483,6 +510,70 @@ shooter/
|
|
|
483
510
|
|
|
484
511
|
---
|
|
485
512
|
|
|
513
|
+
## Updating
|
|
514
|
+
|
|
515
|
+
If you installed via the one-command installer:
|
|
516
|
+
|
|
517
|
+
```bash
|
|
518
|
+
cd ~/.shooter/repo
|
|
519
|
+
git pull origin release
|
|
520
|
+
pnpm install
|
|
521
|
+
pnpm build
|
|
522
|
+
shooter stop && shooter start -d
|
|
523
|
+
```
|
|
524
|
+
|
|
525
|
+
Or re-run the installer -- it detects the existing installation and offers to update:
|
|
526
|
+
|
|
527
|
+
```bash
|
|
528
|
+
curl -fsSL https://raw.githubusercontent.com/juspay/shooter/release/scripts/install.sh | sh
|
|
529
|
+
```
|
|
530
|
+
|
|
531
|
+
If you installed via npm:
|
|
532
|
+
|
|
533
|
+
```bash
|
|
534
|
+
npm update -g @juspay/shooter
|
|
535
|
+
```
|
|
536
|
+
|
|
537
|
+
---
|
|
538
|
+
|
|
539
|
+
## Uninstall
|
|
540
|
+
|
|
541
|
+
```bash
|
|
542
|
+
# 1. Stop the server and disable autostart
|
|
543
|
+
shooter stop
|
|
544
|
+
shooter autostart off
|
|
545
|
+
|
|
546
|
+
# 2. Remove the data directory (config, logs, SQLite database)
|
|
547
|
+
rm -rf ~/.shooter
|
|
548
|
+
|
|
549
|
+
# 3. Remove the global command symlink
|
|
550
|
+
rm -f ~/.local/bin/shooter
|
|
551
|
+
|
|
552
|
+
# 4. Remove the repo (if installed via one-command installer)
|
|
553
|
+
rm -rf ~/.shooter/repo
|
|
554
|
+
```
|
|
555
|
+
|
|
556
|
+
If you installed via npm: `npm uninstall -g @juspay/shooter`
|
|
557
|
+
|
|
558
|
+
To also remove Claude Code hooks, delete the `hooks` section from `.claude/settings.json` in each project that uses Shooter.
|
|
559
|
+
|
|
560
|
+
---
|
|
561
|
+
|
|
562
|
+
## Reset
|
|
563
|
+
|
|
564
|
+
To reset Shooter to a clean state without reinstalling:
|
|
565
|
+
|
|
566
|
+
```bash
|
|
567
|
+
shooter stop
|
|
568
|
+
rm ~/.shooter/.env # Remove config (re-run shooter setup to regenerate)
|
|
569
|
+
rm ~/.shooter/shooter.db # Remove terminal history database
|
|
570
|
+
rm -rf ~/.shooter/logs # Remove log files
|
|
571
|
+
shooter setup # Regenerate config
|
|
572
|
+
shooter start -d # Restart
|
|
573
|
+
```
|
|
574
|
+
|
|
575
|
+
---
|
|
576
|
+
|
|
486
577
|
## Troubleshooting
|
|
487
578
|
|
|
488
579
|
### Server does not start
|
|
@@ -509,9 +600,9 @@ shooter/
|
|
|
509
600
|
|
|
510
601
|
### Hooks not sending notifications
|
|
511
602
|
|
|
512
|
-
- `API_KEY`
|
|
603
|
+
- The notifier reads `API_KEY` from `~/.shooter/.env` automatically. If that file is missing or empty, run `shooter setup`.
|
|
513
604
|
- Verify the hooks are configured in `.claude/settings.json`
|
|
514
|
-
- Test connectivity: `curl -H "Authorization: Bearer $API_KEY" http://localhost:54007/api/health`
|
|
605
|
+
- Test connectivity: `curl -H "Authorization: Bearer $(grep API_KEY ~/.shooter/.env | cut -d= -f2 | tr -d '\"')" http://localhost:54007/api/health`
|
|
515
606
|
|
|
516
607
|
### Terminal sessions lost after restart
|
|
517
608
|
|
|
@@ -526,8 +617,9 @@ shooter/
|
|
|
526
617
|
|
|
527
618
|
### Port already in use
|
|
528
619
|
|
|
529
|
-
-
|
|
530
|
-
-
|
|
620
|
+
- `shooter start` detects port conflicts automatically and prints a clear error
|
|
621
|
+
- Default port is 54007. Set `PORT=<number>` in `~/.shooter/.env` to use a different port
|
|
622
|
+
- To find what's using the port: `lsof -i :54007` (macOS) or `ss -tlnp | grep 54007` (Linux)
|
|
531
623
|
|
|
532
624
|
---
|
|
533
625
|
|
package/bin/shooter.cjs
CHANGED
|
@@ -187,6 +187,18 @@ function startServer() {
|
|
|
187
187
|
const noTunnel = hasFlag('--no-tunnel');
|
|
188
188
|
const port = resolvePort();
|
|
189
189
|
|
|
190
|
+
// Check if port is already in use (no external tools needed)
|
|
191
|
+
try {
|
|
192
|
+
execSync(
|
|
193
|
+
`"${process.execPath}" -e "const s=require('net').createServer();s.listen(${parseInt(port, 10)},()=>s.close());s.on('error',e=>{if(e.code==='EADDRINUSE')process.exit(1)})"`,
|
|
194
|
+
{ stdio: 'ignore', timeout: 2000 }
|
|
195
|
+
);
|
|
196
|
+
} catch {
|
|
197
|
+
console.error(`Error: Port ${port} is already in use.`);
|
|
198
|
+
console.error('Stop the existing process or set a different PORT in ~/.shooter/.env');
|
|
199
|
+
process.exit(1);
|
|
200
|
+
}
|
|
201
|
+
|
|
190
202
|
if (daemon) {
|
|
191
203
|
// ── Daemon mode: detach, redirect to log file ──
|
|
192
204
|
fs.mkdirSync(LOG_DIR, { recursive: true });
|
|
@@ -226,22 +238,23 @@ function startServer() {
|
|
|
226
238
|
console.log(` URL: http://localhost:${port}`);
|
|
227
239
|
console.log(` Logs: ${LOG_FILE}`);
|
|
228
240
|
|
|
229
|
-
//
|
|
241
|
+
// Start tunnel in background if available; it writes URL to ~/.shooter/.tunnel_url
|
|
230
242
|
if (!noTunnel && isCloudflaredAvailable()) {
|
|
231
243
|
setTimeout(() => {
|
|
232
244
|
startTunnel(port);
|
|
233
245
|
}, 3000);
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
} else {
|
|
237
|
-
if (!noTunnel && !isCloudflaredAvailable()) {
|
|
238
|
-
console.log(' (cloudflared not found — no tunnel. Install: brew install cloudflared)');
|
|
239
|
-
}
|
|
240
|
-
process.exit(0);
|
|
246
|
+
} else if (!noTunnel && !isCloudflaredAvailable()) {
|
|
247
|
+
console.log(' (cloudflared not found — no tunnel. Install: brew install cloudflared)');
|
|
241
248
|
}
|
|
249
|
+
// Exit immediately — daemon is running, tunnel starts async
|
|
250
|
+
process.exit(0);
|
|
242
251
|
} else {
|
|
243
252
|
// ── Foreground mode: inherit stdio ──
|
|
244
|
-
const
|
|
253
|
+
const tsxLoader = path.join(PKG_ROOT, 'node_modules', 'tsx', 'dist', 'loader.mjs');
|
|
254
|
+
const nodeArgs = fs.existsSync(tsxLoader)
|
|
255
|
+
? ['--import', `file://${tsxLoader}`, serverEntry]
|
|
256
|
+
: ['--import', 'tsx', serverEntry];
|
|
257
|
+
const child = spawn(process.execPath, nodeArgs, {
|
|
245
258
|
cwd: PKG_ROOT,
|
|
246
259
|
stdio: 'inherit',
|
|
247
260
|
env: {
|
|
@@ -253,6 +266,9 @@ function startServer() {
|
|
|
253
266
|
|
|
254
267
|
writePid(child.pid);
|
|
255
268
|
|
|
269
|
+
// Clean up any stale tunnel from previous run (important for LaunchAgent restart)
|
|
270
|
+
stopTunnel();
|
|
271
|
+
|
|
256
272
|
// Start tunnel in foreground mode too (unless --no-tunnel)
|
|
257
273
|
let tunnelStarted = false;
|
|
258
274
|
if (!noTunnel && isCloudflaredAvailable()) {
|
|
@@ -448,7 +464,7 @@ function enableLaunchAgent() {
|
|
|
448
464
|
<key>EnvironmentVariables</key>
|
|
449
465
|
<dict>
|
|
450
466
|
<key>PATH</key>
|
|
451
|
-
<string>${path.dirname(nodeBin)}:/usr/local/bin:/usr/bin:/bin</string>
|
|
467
|
+
<string>${path.dirname(nodeBin)}:/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin</string>
|
|
452
468
|
<key>SHOOTER_HOME</key>
|
|
453
469
|
<string>${SHOOTER_HOME}</string>
|
|
454
470
|
</dict>
|
|
@@ -630,7 +646,8 @@ Commands:
|
|
|
630
646
|
autostart on Start automatically on login (macOS/Linux)
|
|
631
647
|
autostart off Disable autostart
|
|
632
648
|
logs Tail server logs
|
|
633
|
-
setup
|
|
649
|
+
setup Quick setup (API key + build, ~60 seconds)
|
|
650
|
+
setup --push Add/reconfigure push notifications
|
|
634
651
|
version Show version number
|
|
635
652
|
help Show this help message
|
|
636
653
|
|
|
@@ -645,7 +662,8 @@ Examples:
|
|
|
645
662
|
shooter status Check status and tunnel URL
|
|
646
663
|
shooter autostart on Enable autostart on login
|
|
647
664
|
shooter logs Follow server logs
|
|
648
|
-
shooter setup
|
|
665
|
+
shooter setup Quick setup (~60s, push deferred)
|
|
666
|
+
shooter setup --push Add iOS/Android push notifications
|
|
649
667
|
`.trim()
|
|
650
668
|
);
|
|
651
669
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{bq as Se,u as ze,o as U,z as A,y as T,aa as te,br as _t}from"./CZHsSL_X.js";class Re{constructor(t,n){this.status=t,typeof n=="string"?this.body={message:n}:n?this.body=n:this.body={message:`Error: ${t}`}}toString(){return JSON.stringify(this.body)}}class xe{constructor(t,n){this.status=t,this.location=n}}class Le extends Error{constructor(t,n,r){super(r),this.status=t,this.text=n}}new URL("sveltekit-internal://");function mt(e,t){return e==="/"||t==="ignore"?e:t==="never"?e.endsWith("/")?e.slice(0,-1):e:t==="always"&&!e.endsWith("/")?e+"/":e}function wt(e){return e.split("%25").map(decodeURI).join("%25")}function vt(e){for(const t in e)e[t]=decodeURIComponent(e[t]);return e}function ge({href:e}){return e.split("#")[0]}function yt(...e){let t=5381;for(const n of e)if(typeof n=="string"){let r=n.length;for(;r;)t=t*33^n.charCodeAt(--r)}else if(ArrayBuffer.isView(n)){const r=new Uint8Array(n.buffer,n.byteOffset,n.byteLength);let a=r.length;for(;a;)t=t*33^r[--a]}else throw new TypeError("value must be a string or TypedArray");return(t>>>0).toString(36)}new TextEncoder;new TextDecoder;function bt(e){const t=atob(e),n=new Uint8Array(t.length);for(let r=0;r<t.length;r++)n[r]=t.charCodeAt(r);return n}const kt=window.fetch;window.fetch=(e,t)=>((e instanceof Request?e.method:t?.method||"GET")!=="GET"&&G.delete(Ue(e)),kt(e,t));const G=new Map;function Et(e,t){const n=Ue(e,t),r=document.querySelector(n);if(r?.textContent){r.remove();let{body:a,...i}=JSON.parse(r.textContent);const o=r.getAttribute("data-ttl");return o&&G.set(n,{body:a,init:i,ttl:1e3*Number(o)}),r.getAttribute("data-b64")!==null&&(a=bt(a)),Promise.resolve(new Response(a,i))}return window.fetch(e,t)}function St(e,t,n){if(G.size>0){const r=Ue(e,n),a=G.get(r);if(a){if(performance.now()<a.ttl&&["default","force-cache","only-if-cached",void 0].includes(n?.cache))return new Response(a.body,a.init);G.delete(r)}}return window.fetch(t,n)}function Ue(e,t){let r=`script[data-sveltekit-fetched][data-url=${JSON.stringify(e instanceof Request?e.url:e)}]`;if(t?.headers||t?.body){const a=[];t.headers&&a.push([...new Headers(t.headers)].join(",")),t.body&&(typeof t.body=="string"||ArrayBuffer.isView(t.body))&&a.push(t.body),r+=`[data-hash="${yt(...a)}"]`}return r}const Rt=/^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/;function xt(e){const t=[];return{pattern:e==="/"?/^\/$/:new RegExp(`^${Ut(e).map(r=>{const a=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(r);if(a)return t.push({name:a[1],matcher:a[2],optional:!1,rest:!0,chained:!0}),"(?:/([^]*))?";const i=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(r);if(i)return t.push({name:i[1],matcher:i[2],optional:!0,rest:!1,chained:!0}),"(?:/([^/]+))?";if(!r)return;const o=r.split(/\[(.+?)\](?!\])/);return"/"+o.map((l,c)=>{if(c%2){if(l.startsWith("x+"))return _e(String.fromCharCode(parseInt(l.slice(2),16)));if(l.startsWith("u+"))return _e(String.fromCharCode(...l.slice(2).split("-").map(_=>parseInt(_,16))));const f=Rt.exec(l),[,p,w,h,u]=f;return t.push({name:h,matcher:u,optional:!!p,rest:!!w,chained:w?c===1&&o[0]==="":!1}),w?"([^]*?)":p?"([^/]*)?":"([^/]+?)"}return _e(l)}).join("")}).join("")}/?$`),params:t}}function Lt(e){return e!==""&&!/^\([^)]+\)$/.test(e)}function Ut(e){return e.slice(1).split("/").filter(Lt)}function At(e,t,n){const r={},a=e.slice(1),i=a.filter(s=>s!==void 0);let o=0;for(let s=0;s<t.length;s+=1){const l=t[s];let c=a[s-o];if(l.chained&&l.rest&&o&&(c=a.slice(s-o,s+1).filter(f=>f).join("/"),o=0),c===void 0)if(l.rest)c="";else continue;if(!l.matcher||n[l.matcher](c)){r[l.name]=c;const f=t[s+1],p=a[s+1];f&&!f.rest&&f.optional&&p&&l.chained&&(o=0),!f&&!p&&Object.keys(r).length===i.length&&(o=0);continue}if(l.optional&&l.chained){o++;continue}return}if(!o)return r}function _e(e){return e.normalize().replace(/[[\]]/g,"\\$&").replace(/%/g,"%25").replace(/\//g,"%2[Ff]").replace(/\?/g,"%3[Ff]").replace(/#/g,"%23").replace(/[.*+?^${}()|\\]/g,"\\$&")}function Tt({nodes:e,server_loads:t,dictionary:n,matchers:r}){const a=new Set(t);return Object.entries(n).map(([s,[l,c,f]])=>{const{pattern:p,params:w}=xt(s),h={id:s,exec:u=>{const _=p.exec(u);if(_)return At(_,w,r)},errors:[1,...f||[]].map(u=>e[u]),layouts:[0,...c||[]].map(o),leaf:i(l)};return h.errors.length=h.layouts.length=Math.max(h.errors.length,h.layouts.length),h});function i(s){const l=s<0;return l&&(s=~s),[l,e[s]]}function o(s){return s===void 0?s:[a.has(s),e[s]]}}function Ye(e,t=JSON.parse){try{return t(sessionStorage[e])}catch{}}function De(e,t,n=JSON.stringify){const r=n(t);try{sessionStorage[e]=r}catch{}}const x=globalThis.__sveltekit_10z9zqw?.base??"",It=globalThis.__sveltekit_10z9zqw?.assets??x??"",Ot="1775159415510",He="sveltekit:snapshot",Je="sveltekit:scroll",Xe="sveltekit:states",Pt="sveltekit:pageurl",D="sveltekit:history",Y="sveltekit:navigation",j={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},ue=location.origin;function Ae(e){if(e instanceof URL)return e;let t=document.baseURI;if(!t){const n=document.getElementsByTagName("base");t=n.length?n[0].href:document.URL}return new URL(e,t)}function q(){return{x:pageXOffset,y:pageYOffset}}function z(e,t){return e.getAttribute(`data-sveltekit-${t}`)}const Ve={...j,"":j.hover};function Qe(e){let t=e.assignedSlot??e.parentNode;return t?.nodeType===11&&(t=t.host),t}function Ze(e,t){for(;e&&e!==t;){if(e.nodeName.toUpperCase()==="A"&&e.hasAttribute("href"))return e;e=Qe(e)}}function ve(e,t,n){let r;try{if(r=new URL(e instanceof SVGAElement?e.href.baseVal:e.href,document.baseURI),n&&r.hash.match(/^#[^/]/)){const s=location.hash.split("#")[1]||"/";r.hash=`#${s}${r.hash}`}}catch{}const a=e instanceof SVGAElement?e.target.baseVal:e.target,i=!r||!!a||fe(r,t,n)||(e.getAttribute("rel")||"").split(/\s+/).includes("external"),o=r?.origin===ue&&e.hasAttribute("download");return{url:r,external:i,target:a,download:o}}function ne(e){let t=null,n=null,r=null,a=null,i=null,o=null,s=e;for(;s&&s!==document.documentElement;)r===null&&(r=z(s,"preload-code")),a===null&&(a=z(s,"preload-data")),t===null&&(t=z(s,"keepfocus")),n===null&&(n=z(s,"noscroll")),i===null&&(i=z(s,"reload")),o===null&&(o=z(s,"replacestate")),s=Qe(s);function l(c){switch(c){case"":case"true":return!0;case"off":case"false":return!1;default:return}}return{preload_code:Ve[r??"off"],preload_data:Ve[a??"off"],keepfocus:l(t),noscroll:l(n),reload:l(i),replace_state:l(o)}}function Be(e){const t=Se(e);let n=!0;function r(){n=!0,t.update(o=>o)}function a(o){n=!1,t.set(o)}function i(o){let s;return t.subscribe(l=>{(s===void 0||n&&l!==s)&&o(s=l)})}return{notify:r,set:a,subscribe:i}}const et={v:()=>{}};function $t(){const{set:e,subscribe:t}=Se(!1);let n;async function r(){clearTimeout(n);try{const a=await fetch(`${It}/_app/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(!a.ok)return!1;const o=(await a.json()).version!==Ot;return o&&(e(!0),et.v(),clearTimeout(n)),o}catch{return!1}}return{subscribe:t,check:r}}function fe(e,t,n){return e.origin!==ue||!e.pathname.startsWith(t)?!0:n?e.pathname!==location.pathname:!1}function sn(e){}const tt=new Set(["load","prerender","csr","ssr","trailingSlash","config"]);[...tt];const Ct=new Set([...tt]);[...Ct];function jt(e){return e.filter(t=>t!=null)}function Te(e){return e instanceof Re||e instanceof Le?e.status:500}function Nt(e){return e instanceof Le?e.text:"Internal Error"}let k,H,me;const qt=ze.toString().includes("$$")||/function \w+\(\) \{\}/.test(ze.toString()),Ke="a:";qt?(k={data:{},form:null,error:null,params:{},route:{id:null},state:{},status:-1,url:new URL(Ke)},H={current:null},me={current:!1}):(k=new class{#e=U({});get data(){return A(this.#e)}set data(t){T(this.#e,t)}#t=U(null);get form(){return A(this.#t)}set form(t){T(this.#t,t)}#n=U(null);get error(){return A(this.#n)}set error(t){T(this.#n,t)}#r=U({});get params(){return A(this.#r)}set params(t){T(this.#r,t)}#a=U({id:null});get route(){return A(this.#a)}set route(t){T(this.#a,t)}#o=U({});get state(){return A(this.#o)}set state(t){T(this.#o,t)}#s=U(-1);get status(){return A(this.#s)}set status(t){T(this.#s,t)}#i=U(new URL(Ke));get url(){return A(this.#i)}set url(t){T(this.#i,t)}},H=new class{#e=U(null);get current(){return A(this.#e)}set current(t){T(this.#e,t)}},me=new class{#e=U(!1);get current(){return A(this.#e)}set current(t){T(this.#e,t)}},et.v=()=>me.current=!0);function zt(e){Object.assign(k,e)}const Dt=new Set(["icon","shortcut icon","apple-touch-icon"]);let M=null;const C=Ye(Je)??{},J=Ye(He)??{},$={url:Be({}),page:Be({}),navigating:Se(null),updated:$t()};function Ie(e){C[e]=q()}function Vt(e,t){let n=e+1;for(;C[n];)delete C[n],n+=1;for(n=t+1;J[n];)delete J[n],n+=1}function X(e,t=!1){return t?location.replace(e.href):location.href=e.href,new Promise(()=>{})}async function nt(){if("serviceWorker"in navigator){const e=await navigator.serviceWorker.getRegistration(x||"/");e&&await e.update()}}function Me(){}let Oe,ye,re,I,be,y;const ae=[],oe=[];let L=null;function ke(){L?.fork?.then(e=>e?.discard()),L=null}const ee=new Map,rt=new Set,Bt=new Set,W=new Set;let m={branch:[],error:null,url:null},at=!1,se=!1,Fe=!0,Q=!1,F=!1,ot=!1,Pe=!1,st,v,R,N;const ie=new Set,Ge=new Map;async function fn(e,t,n){globalThis.__sveltekit_10z9zqw?.data&&globalThis.__sveltekit_10z9zqw.data,document.URL!==location.href&&(location.href=location.href),y=e,await e.hooks.init?.(),Oe=Tt(e),I=document.documentElement,be=t,ye=e.nodes[0],re=e.nodes[1],ye(),re(),v=history.state?.[D],R=history.state?.[Y],v||(v=R=Date.now(),history.replaceState({...history.state,[D]:v,[Y]:R},""));const r=C[v];function a(){r&&(history.scrollRestoration="manual",scrollTo(r.x,r.y))}n?(a(),await tn(be,n)):(await V({type:"enter",url:Ae(y.hash?an(new URL(location.href)):location.href),replace_state:!0}),a()),en()}function Kt(){ae.length=0,Pe=!1}function it(e){oe.some(t=>t?.snapshot)&&(J[e]=oe.map(t=>t?.snapshot?.capture()))}function lt(e){J[e]?.forEach((t,n)=>{oe[n]?.snapshot?.restore(t)})}function We(){Ie(v),De(Je,C),it(R),De(He,J)}async function ct(e,t,n,r){let a;t.invalidateAll&&ke(),await V({type:"goto",url:Ae(e),keepfocus:t.keepFocus,noscroll:t.noScroll,replace_state:t.replaceState,state:t.state,redirect_count:n,nav_token:r,accept:()=>{t.invalidateAll&&(Pe=!0,a=[...Ge.keys()]),t.invalidate&&t.invalidate.forEach(Zt)}}),t.invalidateAll&&te().then(te).then(()=>{Ge.forEach(({resource:i},o)=>{a?.includes(o)&&i.refresh?.()})})}async function Mt(e){if(e.id!==L?.id){ke();const t={};ie.add(t),L={id:e.id,token:t,promise:ft({...e,preload:t}).then(n=>(ie.delete(t),n.type==="loaded"&&n.state.error&&ke(),n)),fork:null}}return L.promise}async function we(e){const t=(await de(e,!1))?.route;t&&await Promise.all([...t.layouts,t.leaf].filter(Boolean).map(n=>n[1]()))}async function ut(e,t,n){const r={params:m.params,route:{id:m.route?.id??null},url:new URL(location.href)};m={...e.state,nav:r};const a=document.querySelector("style[data-sveltekit]");if(a&&a.remove(),Object.assign(k,e.props.page),st=new y.root({target:t,props:{...e.props,stores:$,components:oe},hydrate:n,sync:!1,transformError:void 0}),await Promise.resolve(),lt(R),n){const i={from:null,to:{...r,scroll:C[v]??q()},willUnload:!1,type:"enter",complete:Promise.resolve()};W.forEach(o=>o(i))}se=!0}async function le({url:e,params:t,branch:n,errors:r,status:a,error:i,route:o,form:s}){let l="never";if(x&&(e.pathname===x||e.pathname===x+"/"))l="always";else for(const u of n)u?.slash!==void 0&&(l=u.slash);e.pathname=mt(e.pathname,l),e.search=e.search;const c={type:"loaded",state:{url:e,params:t,branch:n,error:i,route:o},props:{constructors:jt(n).map(u=>u.node.component),page:qe(k)}};s!==void 0&&(c.props.form=s);let f={},p=!k,w=0;for(let u=0;u<Math.max(n.length,m.branch.length);u+=1){const _=n[u],g=m.branch[u];_?.data!==g?.data&&(p=!0),_&&(f={...f,..._.data},p&&(c.props[`data_${w}`]=f),w+=1)}return(!m.url||e.href!==m.url.href||m.error!==i||s!==void 0&&s!==k.form||p)&&(c.props.page={error:i,params:t,route:{id:o?.id??null},state:{},status:a,url:new URL(e),form:s??null,data:p?f:k.data}),c}async function $e({loader:e,parent:t,url:n,params:r,route:a,server_data_node:i}){let o=null;const s={dependencies:new Set,params:new Set,parent:!1,route:!1,url:!1,search_params:new Set},l=await e();return{node:l,loader:e,server:i,universal:l.universal?.load?{type:"data",data:o,uses:s}:null,data:o??i?.data??null,slash:l.universal?.trailingSlash??i?.slash}}function Ft(e,t,n){let r=e instanceof Request?e.url:e;const a=new URL(r,n);a.origin===n.origin&&(r=a.href.slice(n.origin.length));const i=se?St(r,a.href,t):Et(r,t);return{resolved:a,promise:i}}function Gt(e,t,n,r,a,i){if(Pe)return!0;if(!a)return!1;if(a.parent&&e||a.route&&t||a.url&&n)return!0;for(const o of a.search_params)if(r.has(o))return!0;for(const o of a.params)if(i[o]!==m.params[o])return!0;for(const o of a.dependencies)if(ae.some(s=>s(new URL(o))))return!0;return!1}function Ce(e,t){return e?.type==="data"?e:e?.type==="skip"?t??null:null}function Wt(e,t){if(!e)return new Set(t.searchParams.keys());const n=new Set([...e.searchParams.keys(),...t.searchParams.keys()]);for(const r of n){const a=e.searchParams.getAll(r),i=t.searchParams.getAll(r);a.every(o=>i.includes(o))&&i.every(o=>a.includes(o))&&n.delete(r)}return n}function Yt({error:e,url:t,route:n,params:r}){return{type:"loaded",state:{error:e,url:t,route:n,params:r,branch:[]},props:{page:qe(k),constructors:[]}}}async function ft({id:e,invalidating:t,url:n,params:r,route:a,preload:i}){if(L?.id===e)return ie.delete(L.token),L.promise;const{errors:o,layouts:s,leaf:l}=a,c=[...s,l];o.forEach(g=>g?.().catch(()=>{})),c.forEach(g=>g?.[1]().catch(()=>{}));const f=m.url?e!==ce(m.url):!1,p=m.route?a.id!==m.route.id:!1,w=Wt(m.url,n);let h=!1;const u=c.map(async(g,d)=>{if(!g)return;const E=m.branch[d];return g[1]===E?.loader&&!Gt(h,p,f,w,E.universal?.uses,r)?E:(h=!0,$e({loader:g[1],url:n,params:r,route:a,parent:async()=>{const O={};for(let P=0;P<d;P+=1)Object.assign(O,(await u[P])?.data);return O},server_data_node:Ce(g[0]?{type:"skip"}:null,g[0]?E?.server:void 0)}))});for(const g of u)g.catch(()=>{});const _=[];for(let g=0;g<c.length;g+=1)if(c[g])try{_.push(await u[g])}catch(d){if(d instanceof xe)return{type:"redirect",location:d.location};if(ie.has(i))return Yt({error:await Z(d,{params:r,url:n,route:{id:a.id}}),url:n,params:r,route:a});let E=Te(d),S;if(d instanceof Re)S=d.body;else{if(await $.updated.check())return await nt(),await X(n);S=await Z(d,{params:r,url:n,route:{id:a.id}})}const O=await Ht(g,_,o);return O?le({url:n,params:r,branch:_.slice(0,O.idx).concat(O.node),errors:o,status:E,error:S,route:a}):await ht(n,{id:a.id},S,E)}else _.push(void 0);return le({url:n,params:r,branch:_,errors:o,status:200,error:null,route:a,form:t?void 0:null})}async function Ht(e,t,n){for(;e--;)if(n[e]){let r=e;for(;!t[r];)r-=1;try{return{idx:r+1,node:{node:await n[e](),loader:n[e],data:{},server:null,universal:null}}}catch{continue}}}async function je({status:e,error:t,url:n,route:r}){const a={};let i=null;try{const o=await $e({loader:ye,url:n,params:a,route:r,parent:()=>Promise.resolve({}),server_data_node:Ce(i)}),s={node:await re(),loader:re,universal:null,server:null,data:null};return le({url:n,params:a,branch:[o,s],status:e,error:t,errors:[],route:null})}catch(o){if(o instanceof xe)return ct(new URL(o.location,location.href),{},0);throw o}}async function Jt(e){const t=e.href;if(ee.has(t))return ee.get(t);let n;try{const r=(async()=>{let a=await y.hooks.reroute({url:new URL(e),fetch:async(i,o)=>Ft(i,o,e).promise})??e;if(typeof a=="string"){const i=new URL(e);y.hash?i.hash=a:i.pathname=a,a=i}return a})();ee.set(t,r),n=await r}catch{ee.delete(t);return}return n}async function de(e,t){if(e&&!fe(e,x,y.hash)){const n=await Jt(e);if(!n)return;const r=Xt(n);for(const a of Oe){const i=a.exec(r);if(i)return{id:ce(e),invalidating:t,route:a,params:vt(i),url:e}}}}function Xt(e){return wt(y.hash?e.hash.replace(/^#/,"").replace(/[?#].+/,""):e.pathname.slice(x.length))||"/"}function ce(e){return(y.hash?e.hash.replace(/^#/,""):e.pathname)+e.search}function dt({url:e,type:t,intent:n,delta:r,event:a,scroll:i}){let o=!1;const s=Ne(m,n,e,t,i??null);r!==void 0&&(s.navigation.delta=r),a!==void 0&&(s.navigation.event=a);const l={...s.navigation,cancel:()=>{o=!0,s.reject(new Error("navigation cancelled"))}};return Q||rt.forEach(c=>c(l)),o?null:s}async function V({type:e,url:t,popped:n,keepfocus:r,noscroll:a,replace_state:i,state:o={},redirect_count:s=0,nav_token:l={},accept:c=Me,block:f=Me,event:p}){const w=N;N=l;const h=await de(t,!1),u=e==="enter"?Ne(m,h,t,e):dt({url:t,type:e,delta:n?.delta,intent:h,scroll:n?.scroll,event:p});if(!u){f(),N===l&&(N=w);return}const _=v,g=R;c(),Q=!0,se&&u.navigation.type!=="enter"&&$.navigating.set(H.current=u.navigation);let d=h&&await ft(h);if(!d){if(fe(t,x,y.hash))return await X(t,i);d=await ht(t,{id:null},await Z(new Le(404,"Not Found",`Not found: ${t.pathname}`),{url:t,params:{},route:{id:null}}),404,i)}if(t=h?.url||t,N!==l)return u.reject(new Error("navigation aborted")),!1;if(d.type==="redirect"){if(s<20){await V({type:e,url:new URL(d.location,t),popped:n,keepfocus:r,noscroll:a,replace_state:i,state:o,redirect_count:s+1,nav_token:l}),u.fulfil(void 0);return}d=await je({status:500,error:await Z(new Error("Redirect loop"),{url:t,params:{},route:{id:null}}),url:t,route:{id:null}})}else d.props.page.status>=400&&await $.updated.check()&&(await nt(),await X(t,i));if(Kt(),Ie(_),it(g),d.props.page.url.pathname!==t.pathname&&(t.pathname=d.props.page.url.pathname),o=n?n.state:o,!n){const b=i?0:1,B={[D]:v+=b,[Y]:R+=b,[Xe]:o};(i?history.replaceState:history.pushState).call(history,B,"",t),i||Vt(v,R)}const E=h&&L?.id===h.id?L.fork:null;L=null,d.props.page.state=o;let S;if(se){const b=(await Promise.all(Array.from(Bt,K=>K(u.navigation)))).filter(K=>typeof K=="function");if(b.length>0){let K=function(){b.forEach(pe=>{W.delete(pe)})};b.push(K),b.forEach(pe=>{W.add(pe)})}const B=u.navigation.to;m={...d.state,nav:{params:B.params,route:B.route,url:B.url}},d.props.page&&(d.props.page.url=t);const he=E&&await E;he?S=he.commit():(M=null,st.$set(d.props),M&&Object.assign(d.props.page,M),zt(d.props.page),S=_t?.()),ot=!0}else await ut(d,be,!1);const{activeElement:O}=document;await S,await te(),await te();let P=null;if(Fe){const b=n?n.scroll:a?q():null;b?scrollTo(b.x,b.y):(P=t.hash&&document.getElementById(pt(t)))?P.scrollIntoView():scrollTo(0,0)}const gt=document.activeElement!==O&&document.activeElement!==document.body;!r&&!gt&&rn(t,!P),Fe=!0,d.props.page&&(M&&Object.assign(d.props.page,M),Object.assign(k,d.props.page)),Q=!1,e==="popstate"&<(R),u.fulfil(void 0),u.navigation.to&&(u.navigation.to.scroll=q()),W.forEach(b=>b(u.navigation)),$.navigating.set(H.current=null)}async function ht(e,t,n,r,a){return e.origin===ue&&e.pathname===location.pathname&&!at?await je({status:r,error:n,url:e,route:t}):await X(e,a)}function Qt(){let e,t={element:void 0,href:void 0},n;I.addEventListener("mousemove",s=>{const l=s.target;clearTimeout(e),e=setTimeout(()=>{i(l,j.hover)},20)});function r(s){s.defaultPrevented||i(s.composedPath()[0],j.tap)}I.addEventListener("mousedown",r),I.addEventListener("touchstart",r,{passive:!0});const a=new IntersectionObserver(s=>{for(const l of s)l.isIntersecting&&(we(new URL(l.target.href)),a.unobserve(l.target))},{threshold:0});async function i(s,l){const c=Ze(s,I),f=c===t.element&&c?.href===t.href&&l>=n;if(!c||f)return;const{url:p,external:w,download:h}=ve(c,x,y.hash);if(w||h)return;const u=ne(c),_=p&&ce(m.url)===ce(p);if(!(u.reload||_))if(l<=u.preload_data){t={element:c,href:c.href},n=j.tap;const g=await de(p,!1);if(!g)return;Mt(g)}else l<=u.preload_code&&(t={element:c,href:c.href},n=l,we(p))}function o(){a.disconnect();for(const s of I.querySelectorAll("a")){const{url:l,external:c,download:f}=ve(s,x,y.hash);if(c||f)continue;const p=ne(s);p.reload||(p.preload_code===j.viewport&&a.observe(s),p.preload_code===j.eager&&we(l))}}W.add(o),o()}function Z(e,t){if(e instanceof Re)return e.body;const n=Te(e),r=Nt(e);return y.hooks.handleError({error:e,event:t,status:n,message:r})??{message:r}}function dn(e,t={}){return e=new URL(Ae(e)),e.origin!==ue?Promise.reject(new Error("goto: invalid URL")):ct(e,t,0)}function Zt(e){if(typeof e=="function")ae.push(e);else{const{href:t}=new URL(e,location.href);ae.push(n=>n.href===t)}}function en(){history.scrollRestoration="manual",addEventListener("beforeunload",t=>{let n=!1;if(We(),!Q){const r=Ne(m,void 0,null,"leave"),a={...r.navigation,cancel:()=>{n=!0,r.reject(new Error("navigation cancelled"))}};rt.forEach(i=>i(a))}n?(t.preventDefault(),t.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&We()}),navigator.connection?.saveData||Qt(),I.addEventListener("click",async t=>{if(t.button||t.which!==1||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.defaultPrevented)return;const n=Ze(t.composedPath()[0],I);if(!n)return;const{url:r,external:a,target:i,download:o}=ve(n,x,y.hash);if(!r)return;if(i==="_parent"||i==="_top"){if(window.parent!==window)return}else if(i&&i!=="_self")return;const s=ne(n);if(!(n instanceof SVGAElement)&&r.protocol!==location.protocol&&!(r.protocol==="https:"||r.protocol==="http:")||o)return;const[c,f]=(y.hash?r.hash.replace(/^#/,""):r.href).split("#"),p=c===ge(location);if(a||s.reload&&(!p||!f)){dt({url:r,type:"link",event:t})?Q=!0:t.preventDefault();return}if(f!==void 0&&p){const[,w]=m.url.href.split("#");if(w===f){if(t.preventDefault(),f===""||f==="top"&&n.ownerDocument.getElementById("top")===null)scrollTo({top:0});else{const h=n.ownerDocument.getElementById(decodeURIComponent(f));h&&(h.scrollIntoView(),h.focus())}return}if(F=!0,Ie(v),e(r),!s.replace_state)return;F=!1}t.preventDefault(),await new Promise(w=>{requestAnimationFrame(()=>{setTimeout(w,0)}),setTimeout(w,100)}),await V({type:"link",url:r,keepfocus:s.keepfocus,noscroll:s.noscroll,replace_state:s.replace_state??r.href===location.href,event:t})}),I.addEventListener("submit",t=>{if(t.defaultPrevented)return;const n=HTMLFormElement.prototype.cloneNode.call(t.target),r=t.submitter;if((r?.formTarget||n.target)==="_blank"||(r?.formMethod||n.method)!=="get")return;const o=new URL(r?.hasAttribute("formaction")&&r?.formAction||n.action);if(fe(o,x,!1))return;const s=t.target,l=ne(s);if(l.reload)return;t.preventDefault(),t.stopPropagation();const c=new FormData(s,r);o.search=new URLSearchParams(c).toString(),V({type:"form",url:o,keepfocus:l.keepfocus,noscroll:l.noscroll,replace_state:l.replace_state??o.href===location.href,event:t})}),addEventListener("popstate",async t=>{if(!Ee){if(t.state?.[D]){const n=t.state[D];if(N={},n===v)return;const r=C[n],a=t.state[Xe]??{},i=new URL(t.state[Pt]??location.href),o=t.state[Y],s=m.url?ge(location)===ge(m.url):!1;if(o===R&&(ot||s)){a!==k.state&&(k.state=a),e(i),C[v]=q(),r&&scrollTo(r.x,r.y),v=n;return}const c=n-v;await V({type:"popstate",url:i,popped:{state:a,scroll:r,delta:c},accept:()=>{v=n,R=o},block:()=>{history.go(-c)},nav_token:N,event:t})}else if(!F){const n=new URL(location.href);e(n),y.hash&&location.reload()}}}),addEventListener("hashchange",()=>{F&&(F=!1,history.replaceState({...history.state,[D]:++v,[Y]:R},"",location.href))});for(const t of document.querySelectorAll("link"))Dt.has(t.rel)&&(t.href=t.href);addEventListener("pageshow",t=>{t.persisted&&$.navigating.set(H.current=null)});function e(t){m.url=k.url=t,$.page.set(qe(k)),$.page.notify()}}async function tn(e,{status:t=200,error:n,node_ids:r,params:a,route:i,server_route:o,data:s,form:l}){at=!0;const c=new URL(location.href);let f;({params:a={},route:i={id:null}}=await de(c,!1)||{}),f=Oe.find(({id:h})=>h===i.id);let p,w=!0;try{const h=r.map(async(_,g)=>{const d=s[g];return d?.uses&&(d.uses=nn(d.uses)),$e({loader:y.nodes[_],url:c,params:a,route:i,parent:async()=>{const E={};for(let S=0;S<g;S+=1)Object.assign(E,(await h[S]).data);return E},server_data_node:Ce(d)})}),u=await Promise.all(h);if(f){const _=f.layouts;for(let g=0;g<_.length;g++)_[g]||u.splice(g,0,void 0)}p=await le({url:c,params:a,branch:u,status:t,error:n,errors:f?.errors,form:l,route:f??null})}catch(h){if(h instanceof xe){await X(new URL(h.location,location.href));return}p=await je({status:Te(h),error:await Z(h,{url:c,params:a,route:i}),url:c,route:i}),e.textContent="",w=!1}p.props.page&&(p.props.page.state={}),await ut(p,e,w)}function nn(e){return{dependencies:new Set(e?.dependencies??[]),params:new Set(e?.params??[]),parent:!!e?.parent,route:!!e?.route,url:!!e?.url,search_params:new Set(e?.search_params??[])}}let Ee=!1;function rn(e,t=!0){const n=document.querySelector("[autofocus]");if(n)n.focus();else{const r=pt(e);if(r&&document.getElementById(r)){const{x:i,y:o}=q();setTimeout(()=>{const s=history.state;Ee=!0,location.replace(new URL(`#${r}`,location.href)),history.replaceState(s,"",e),t&&scrollTo(i,o),Ee=!1})}else{const i=document.body,o=i.getAttribute("tabindex");i.tabIndex=-1,i.focus({preventScroll:!0,focusVisible:!1}),o!==null?i.setAttribute("tabindex",o):i.removeAttribute("tabindex")}const a=getSelection();if(a&&a.type!=="None"){const i=[];for(let o=0;o<a.rangeCount;o+=1)i.push(a.getRangeAt(o));setTimeout(()=>{if(a.rangeCount===i.length){for(let o=0;o<a.rangeCount;o+=1){const s=i[o],l=a.getRangeAt(o);if(s.commonAncestorContainer!==l.commonAncestorContainer||s.startContainer!==l.startContainer||s.endContainer!==l.endContainer||s.startOffset!==l.startOffset||s.endOffset!==l.endOffset)return}a.removeAllRanges()}})}}}function Ne(e,t,n,r,a=null){let i,o;const s=new Promise((c,f)=>{i=c,o=f});return s.catch(()=>{}),{navigation:{from:{params:e.params,route:{id:e.route?.id??null},url:e.url,scroll:q()},to:n&&{params:t?.params??null,route:{id:t?.route?.id??null},url:n,scroll:a},willUnload:!t,type:r,complete:s},fulfil:i,reject:o}}function qe(e){return{data:e.data,error:e.error,form:e.form,params:e.params,route:e.route,state:e.state,status:e.status,url:e.url}}function an(e){const t=new URL(e);return t.hash=decodeURIComponent(e.hash),t}function pt(e){let t;if(y.hash){const[,,n]=e.hash.split("#",3);t=n??""}else t=e.hash.slice(1);return decodeURIComponent(t)}export{fn as a,dn as g,sn as l,k as p,$ as s};
|
|
1
|
+
import{bq as Se,u as De,o as U,z as A,y as T,aa as te,br as _t}from"./CZHsSL_X.js";class Re{constructor(t,n){this.status=t,typeof n=="string"?this.body={message:n}:n?this.body=n:this.body={message:`Error: ${t}`}}toString(){return JSON.stringify(this.body)}}class xe{constructor(t,n){this.status=t,this.location=n}}class Le extends Error{constructor(t,n,r){super(r),this.status=t,this.text=n}}new URL("sveltekit-internal://");function mt(e,t){return e==="/"||t==="ignore"?e:t==="never"?e.endsWith("/")?e.slice(0,-1):e:t==="always"&&!e.endsWith("/")?e+"/":e}function vt(e){return e.split("%25").map(decodeURI).join("%25")}function wt(e){for(const t in e)e[t]=decodeURIComponent(e[t]);return e}function ge({href:e}){return e.split("#")[0]}function yt(...e){let t=5381;for(const n of e)if(typeof n=="string"){let r=n.length;for(;r;)t=t*33^n.charCodeAt(--r)}else if(ArrayBuffer.isView(n)){const r=new Uint8Array(n.buffer,n.byteOffset,n.byteLength);let a=r.length;for(;a;)t=t*33^r[--a]}else throw new TypeError("value must be a string or TypedArray");return(t>>>0).toString(36)}new TextEncoder;new TextDecoder;function bt(e){const t=atob(e),n=new Uint8Array(t.length);for(let r=0;r<t.length;r++)n[r]=t.charCodeAt(r);return n}const kt=window.fetch;window.fetch=(e,t)=>((e instanceof Request?e.method:t?.method||"GET")!=="GET"&&W.delete(Ue(e)),kt(e,t));const W=new Map;function Et(e,t){const n=Ue(e,t),r=document.querySelector(n);if(r?.textContent){r.remove();let{body:a,...i}=JSON.parse(r.textContent);const o=r.getAttribute("data-ttl");return o&&W.set(n,{body:a,init:i,ttl:1e3*Number(o)}),r.getAttribute("data-b64")!==null&&(a=bt(a)),Promise.resolve(new Response(a,i))}return window.fetch(e,t)}function St(e,t,n){if(W.size>0){const r=Ue(e,n),a=W.get(r);if(a){if(performance.now()<a.ttl&&["default","force-cache","only-if-cached",void 0].includes(n?.cache))return new Response(a.body,a.init);W.delete(r)}}return window.fetch(t,n)}function Ue(e,t){let r=`script[data-sveltekit-fetched][data-url=${JSON.stringify(e instanceof Request?e.url:e)}]`;if(t?.headers||t?.body){const a=[];t.headers&&a.push([...new Headers(t.headers)].join(",")),t.body&&(typeof t.body=="string"||ArrayBuffer.isView(t.body))&&a.push(t.body),r+=`[data-hash="${yt(...a)}"]`}return r}const Rt=/^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/;function xt(e){const t=[];return{pattern:e==="/"?/^\/$/:new RegExp(`^${Ut(e).map(r=>{const a=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(r);if(a)return t.push({name:a[1],matcher:a[2],optional:!1,rest:!0,chained:!0}),"(?:/([^]*))?";const i=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(r);if(i)return t.push({name:i[1],matcher:i[2],optional:!0,rest:!1,chained:!0}),"(?:/([^/]+))?";if(!r)return;const o=r.split(/\[(.+?)\](?!\])/);return"/"+o.map((l,c)=>{if(c%2){if(l.startsWith("x+"))return _e(String.fromCharCode(parseInt(l.slice(2),16)));if(l.startsWith("u+"))return _e(String.fromCharCode(...l.slice(2).split("-").map(_=>parseInt(_,16))));const f=Rt.exec(l),[,p,v,h,u]=f;return t.push({name:h,matcher:u,optional:!!p,rest:!!v,chained:v?c===1&&o[0]==="":!1}),v?"([^]*?)":p?"([^/]*)?":"([^/]+?)"}return _e(l)}).join("")}).join("")}/?$`),params:t}}function Lt(e){return e!==""&&!/^\([^)]+\)$/.test(e)}function Ut(e){return e.slice(1).split("/").filter(Lt)}function At(e,t,n){const r={},a=e.slice(1),i=a.filter(s=>s!==void 0);let o=0;for(let s=0;s<t.length;s+=1){const l=t[s];let c=a[s-o];if(l.chained&&l.rest&&o&&(c=a.slice(s-o,s+1).filter(f=>f).join("/"),o=0),c===void 0)if(l.rest)c="";else continue;if(!l.matcher||n[l.matcher](c)){r[l.name]=c;const f=t[s+1],p=a[s+1];f&&!f.rest&&f.optional&&p&&l.chained&&(o=0),!f&&!p&&Object.keys(r).length===i.length&&(o=0);continue}if(l.optional&&l.chained){o++;continue}return}if(!o)return r}function _e(e){return e.normalize().replace(/[[\]]/g,"\\$&").replace(/%/g,"%25").replace(/\//g,"%2[Ff]").replace(/\?/g,"%3[Ff]").replace(/#/g,"%23").replace(/[.*+?^${}()|\\]/g,"\\$&")}function Tt({nodes:e,server_loads:t,dictionary:n,matchers:r}){const a=new Set(t);return Object.entries(n).map(([s,[l,c,f]])=>{const{pattern:p,params:v}=xt(s),h={id:s,exec:u=>{const _=p.exec(u);if(_)return At(_,v,r)},errors:[1,...f||[]].map(u=>e[u]),layouts:[0,...c||[]].map(o),leaf:i(l)};return h.errors.length=h.layouts.length=Math.max(h.errors.length,h.layouts.length),h});function i(s){const l=s<0;return l&&(s=~s),[l,e[s]]}function o(s){return s===void 0?s:[a.has(s),e[s]]}}function Ye(e,t=JSON.parse){try{return t(sessionStorage[e])}catch{}}function Ve(e,t,n=JSON.stringify){const r=n(t);try{sessionStorage[e]=r}catch{}}const x=globalThis.__sveltekit_18grtec?.base??"",It=globalThis.__sveltekit_18grtec?.assets??x??"",Ot="1775205676306",He="sveltekit:snapshot",Je="sveltekit:scroll",Xe="sveltekit:states",Pt="sveltekit:pageurl",V="sveltekit:history",Y="sveltekit:navigation",j={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},ue=location.origin;function Ae(e){if(e instanceof URL)return e;let t=document.baseURI;if(!t){const n=document.getElementsByTagName("base");t=n.length?n[0].href:document.URL}return new URL(e,t)}function q(){return{x:pageXOffset,y:pageYOffset}}function D(e,t){return e.getAttribute(`data-sveltekit-${t}`)}const Be={...j,"":j.hover};function Qe(e){let t=e.assignedSlot??e.parentNode;return t?.nodeType===11&&(t=t.host),t}function Ze(e,t){for(;e&&e!==t;){if(e.nodeName.toUpperCase()==="A"&&e.hasAttribute("href"))return e;e=Qe(e)}}function we(e,t,n){let r;try{if(r=new URL(e instanceof SVGAElement?e.href.baseVal:e.href,document.baseURI),n&&r.hash.match(/^#[^/]/)){const s=location.hash.split("#")[1]||"/";r.hash=`#${s}${r.hash}`}}catch{}const a=e instanceof SVGAElement?e.target.baseVal:e.target,i=!r||!!a||fe(r,t,n)||(e.getAttribute("rel")||"").split(/\s+/).includes("external"),o=r?.origin===ue&&e.hasAttribute("download");return{url:r,external:i,target:a,download:o}}function ne(e){let t=null,n=null,r=null,a=null,i=null,o=null,s=e;for(;s&&s!==document.documentElement;)r===null&&(r=D(s,"preload-code")),a===null&&(a=D(s,"preload-data")),t===null&&(t=D(s,"keepfocus")),n===null&&(n=D(s,"noscroll")),i===null&&(i=D(s,"reload")),o===null&&(o=D(s,"replacestate")),s=Qe(s);function l(c){switch(c){case"":case"true":return!0;case"off":case"false":return!1;default:return}}return{preload_code:Be[r??"off"],preload_data:Be[a??"off"],keepfocus:l(t),noscroll:l(n),reload:l(i),replace_state:l(o)}}function Ke(e){const t=Se(e);let n=!0;function r(){n=!0,t.update(o=>o)}function a(o){n=!1,t.set(o)}function i(o){let s;return t.subscribe(l=>{(s===void 0||n&&l!==s)&&o(s=l)})}return{notify:r,set:a,subscribe:i}}const et={v:()=>{}};function $t(){const{set:e,subscribe:t}=Se(!1);let n;async function r(){clearTimeout(n);try{const a=await fetch(`${It}/_app/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(!a.ok)return!1;const o=(await a.json()).version!==Ot;return o&&(e(!0),et.v(),clearTimeout(n)),o}catch{return!1}}return{subscribe:t,check:r}}function fe(e,t,n){return e.origin!==ue||!e.pathname.startsWith(t)?!0:n?e.pathname!==location.pathname:!1}function sn(e){}const tt=new Set(["load","prerender","csr","ssr","trailingSlash","config"]);[...tt];const Ct=new Set([...tt]);[...Ct];function jt(e){return e.filter(t=>t!=null)}function Te(e){return e instanceof Re||e instanceof Le?e.status:500}function Nt(e){return e instanceof Le?e.text:"Internal Error"}let k,H,me;const qt=De.toString().includes("$$")||/function \w+\(\) \{\}/.test(De.toString()),Me="a:";qt?(k={data:{},form:null,error:null,params:{},route:{id:null},state:{},status:-1,url:new URL(Me)},H={current:null},me={current:!1}):(k=new class{#e=U({});get data(){return A(this.#e)}set data(t){T(this.#e,t)}#t=U(null);get form(){return A(this.#t)}set form(t){T(this.#t,t)}#n=U(null);get error(){return A(this.#n)}set error(t){T(this.#n,t)}#r=U({});get params(){return A(this.#r)}set params(t){T(this.#r,t)}#a=U({id:null});get route(){return A(this.#a)}set route(t){T(this.#a,t)}#o=U({});get state(){return A(this.#o)}set state(t){T(this.#o,t)}#s=U(-1);get status(){return A(this.#s)}set status(t){T(this.#s,t)}#i=U(new URL(Me));get url(){return A(this.#i)}set url(t){T(this.#i,t)}},H=new class{#e=U(null);get current(){return A(this.#e)}set current(t){T(this.#e,t)}},me=new class{#e=U(!1);get current(){return A(this.#e)}set current(t){T(this.#e,t)}},et.v=()=>me.current=!0);function Dt(e){Object.assign(k,e)}const Vt=new Set(["icon","shortcut icon","apple-touch-icon"]);let F=null;const C=Ye(Je)??{},J=Ye(He)??{},$={url:Ke({}),page:Ke({}),navigating:Se(null),updated:$t()};function Ie(e){C[e]=q()}function Bt(e,t){let n=e+1;for(;C[n];)delete C[n],n+=1;for(n=t+1;J[n];)delete J[n],n+=1}function X(e,t=!1){return t?location.replace(e.href):location.href=e.href,new Promise(()=>{})}async function nt(){if("serviceWorker"in navigator){const e=await navigator.serviceWorker.getRegistration(x||"/");e&&await e.update()}}function Fe(){}let Oe,ye,re,I,be,y;const ae=[],oe=[];let L=null;function ke(){L?.fork?.then(e=>e?.discard()),L=null}const ee=new Map,rt=new Set,Kt=new Set,z=new Set;let m={branch:[],error:null,url:null},at=!1,se=!1,Ge=!0,Q=!1,G=!1,ot=!1,Pe=!1,st,w,R,N;const ie=new Set,We=new Map;async function fn(e,t,n){globalThis.__sveltekit_18grtec?.data&&globalThis.__sveltekit_18grtec.data,document.URL!==location.href&&(location.href=location.href),y=e,await e.hooks.init?.(),Oe=Tt(e),I=document.documentElement,be=t,ye=e.nodes[0],re=e.nodes[1],ye(),re(),w=history.state?.[V],R=history.state?.[Y],w||(w=R=Date.now(),history.replaceState({...history.state,[V]:w,[Y]:R},""));const r=C[w];function a(){r&&(history.scrollRestoration="manual",scrollTo(r.x,r.y))}n?(a(),await tn(be,n)):(await B({type:"enter",url:Ae(y.hash?an(new URL(location.href)):location.href),replace_state:!0}),a()),en()}function Mt(){ae.length=0,Pe=!1}function it(e){oe.some(t=>t?.snapshot)&&(J[e]=oe.map(t=>t?.snapshot?.capture()))}function lt(e){J[e]?.forEach((t,n)=>{oe[n]?.snapshot?.restore(t)})}function ze(){Ie(w),Ve(Je,C),it(R),Ve(He,J)}async function ct(e,t,n,r){let a;t.invalidateAll&&ke(),await B({type:"goto",url:Ae(e),keepfocus:t.keepFocus,noscroll:t.noScroll,replace_state:t.replaceState,state:t.state,redirect_count:n,nav_token:r,accept:()=>{t.invalidateAll&&(Pe=!0,a=[...We.keys()]),t.invalidate&&t.invalidate.forEach(Zt)}}),t.invalidateAll&&te().then(te).then(()=>{We.forEach(({resource:i},o)=>{a?.includes(o)&&i.refresh?.()})})}async function Ft(e){if(e.id!==L?.id){ke();const t={};ie.add(t),L={id:e.id,token:t,promise:ft({...e,preload:t}).then(n=>(ie.delete(t),n.type==="loaded"&&n.state.error&&ke(),n)),fork:null}}return L.promise}async function ve(e){const t=(await de(e,!1))?.route;t&&await Promise.all([...t.layouts,t.leaf].filter(Boolean).map(n=>n[1]()))}async function ut(e,t,n){const r={params:m.params,route:{id:m.route?.id??null},url:new URL(location.href)};m={...e.state,nav:r};const a=document.querySelector("style[data-sveltekit]");if(a&&a.remove(),Object.assign(k,e.props.page),st=new y.root({target:t,props:{...e.props,stores:$,components:oe},hydrate:n,sync:!1,transformError:void 0}),await Promise.resolve(),lt(R),n){const i={from:null,to:{...r,scroll:C[w]??q()},willUnload:!1,type:"enter",complete:Promise.resolve()};z.forEach(o=>o(i))}se=!0}async function le({url:e,params:t,branch:n,errors:r,status:a,error:i,route:o,form:s}){let l="never";if(x&&(e.pathname===x||e.pathname===x+"/"))l="always";else for(const u of n)u?.slash!==void 0&&(l=u.slash);e.pathname=mt(e.pathname,l),e.search=e.search;const c={type:"loaded",state:{url:e,params:t,branch:n,error:i,route:o},props:{constructors:jt(n).map(u=>u.node.component),page:qe(k)}};s!==void 0&&(c.props.form=s);let f={},p=!k,v=0;for(let u=0;u<Math.max(n.length,m.branch.length);u+=1){const _=n[u],g=m.branch[u];_?.data!==g?.data&&(p=!0),_&&(f={...f,..._.data},p&&(c.props[`data_${v}`]=f),v+=1)}return(!m.url||e.href!==m.url.href||m.error!==i||s!==void 0&&s!==k.form||p)&&(c.props.page={error:i,params:t,route:{id:o?.id??null},state:{},status:a,url:new URL(e),form:s??null,data:p?f:k.data}),c}async function $e({loader:e,parent:t,url:n,params:r,route:a,server_data_node:i}){let o=null;const s={dependencies:new Set,params:new Set,parent:!1,route:!1,url:!1,search_params:new Set},l=await e();return{node:l,loader:e,server:i,universal:l.universal?.load?{type:"data",data:o,uses:s}:null,data:o??i?.data??null,slash:l.universal?.trailingSlash??i?.slash}}function Gt(e,t,n){let r=e instanceof Request?e.url:e;const a=new URL(r,n);a.origin===n.origin&&(r=a.href.slice(n.origin.length));const i=se?St(r,a.href,t):Et(r,t);return{resolved:a,promise:i}}function Wt(e,t,n,r,a,i){if(Pe)return!0;if(!a)return!1;if(a.parent&&e||a.route&&t||a.url&&n)return!0;for(const o of a.search_params)if(r.has(o))return!0;for(const o of a.params)if(i[o]!==m.params[o])return!0;for(const o of a.dependencies)if(ae.some(s=>s(new URL(o))))return!0;return!1}function Ce(e,t){return e?.type==="data"?e:e?.type==="skip"?t??null:null}function zt(e,t){if(!e)return new Set(t.searchParams.keys());const n=new Set([...e.searchParams.keys(),...t.searchParams.keys()]);for(const r of n){const a=e.searchParams.getAll(r),i=t.searchParams.getAll(r);a.every(o=>i.includes(o))&&i.every(o=>a.includes(o))&&n.delete(r)}return n}function Yt({error:e,url:t,route:n,params:r}){return{type:"loaded",state:{error:e,url:t,route:n,params:r,branch:[]},props:{page:qe(k),constructors:[]}}}async function ft({id:e,invalidating:t,url:n,params:r,route:a,preload:i}){if(L?.id===e)return ie.delete(L.token),L.promise;const{errors:o,layouts:s,leaf:l}=a,c=[...s,l];o.forEach(g=>g?.().catch(()=>{})),c.forEach(g=>g?.[1]().catch(()=>{}));const f=m.url?e!==ce(m.url):!1,p=m.route?a.id!==m.route.id:!1,v=zt(m.url,n);let h=!1;const u=c.map(async(g,d)=>{if(!g)return;const E=m.branch[d];return g[1]===E?.loader&&!Wt(h,p,f,v,E.universal?.uses,r)?E:(h=!0,$e({loader:g[1],url:n,params:r,route:a,parent:async()=>{const O={};for(let P=0;P<d;P+=1)Object.assign(O,(await u[P])?.data);return O},server_data_node:Ce(g[0]?{type:"skip"}:null,g[0]?E?.server:void 0)}))});for(const g of u)g.catch(()=>{});const _=[];for(let g=0;g<c.length;g+=1)if(c[g])try{_.push(await u[g])}catch(d){if(d instanceof xe)return{type:"redirect",location:d.location};if(ie.has(i))return Yt({error:await Z(d,{params:r,url:n,route:{id:a.id}}),url:n,params:r,route:a});let E=Te(d),S;if(d instanceof Re)S=d.body;else{if(await $.updated.check())return await nt(),await X(n);S=await Z(d,{params:r,url:n,route:{id:a.id}})}const O=await Ht(g,_,o);return O?le({url:n,params:r,branch:_.slice(0,O.idx).concat(O.node),errors:o,status:E,error:S,route:a}):await ht(n,{id:a.id},S,E)}else _.push(void 0);return le({url:n,params:r,branch:_,errors:o,status:200,error:null,route:a,form:t?void 0:null})}async function Ht(e,t,n){for(;e--;)if(n[e]){let r=e;for(;!t[r];)r-=1;try{return{idx:r+1,node:{node:await n[e](),loader:n[e],data:{},server:null,universal:null}}}catch{continue}}}async function je({status:e,error:t,url:n,route:r}){const a={};let i=null;try{const o=await $e({loader:ye,url:n,params:a,route:r,parent:()=>Promise.resolve({}),server_data_node:Ce(i)}),s={node:await re(),loader:re,universal:null,server:null,data:null};return le({url:n,params:a,branch:[o,s],status:e,error:t,errors:[],route:null})}catch(o){if(o instanceof xe)return ct(new URL(o.location,location.href),{},0);throw o}}async function Jt(e){const t=e.href;if(ee.has(t))return ee.get(t);let n;try{const r=(async()=>{let a=await y.hooks.reroute({url:new URL(e),fetch:async(i,o)=>Gt(i,o,e).promise})??e;if(typeof a=="string"){const i=new URL(e);y.hash?i.hash=a:i.pathname=a,a=i}return a})();ee.set(t,r),n=await r}catch{ee.delete(t);return}return n}async function de(e,t){if(e&&!fe(e,x,y.hash)){const n=await Jt(e);if(!n)return;const r=Xt(n);for(const a of Oe){const i=a.exec(r);if(i)return{id:ce(e),invalidating:t,route:a,params:wt(i),url:e}}}}function Xt(e){return vt(y.hash?e.hash.replace(/^#/,"").replace(/[?#].+/,""):e.pathname.slice(x.length))||"/"}function ce(e){return(y.hash?e.hash.replace(/^#/,""):e.pathname)+e.search}function dt({url:e,type:t,intent:n,delta:r,event:a,scroll:i}){let o=!1;const s=Ne(m,n,e,t,i??null);r!==void 0&&(s.navigation.delta=r),a!==void 0&&(s.navigation.event=a);const l={...s.navigation,cancel:()=>{o=!0,s.reject(new Error("navigation cancelled"))}};return Q||rt.forEach(c=>c(l)),o?null:s}async function B({type:e,url:t,popped:n,keepfocus:r,noscroll:a,replace_state:i,state:o={},redirect_count:s=0,nav_token:l={},accept:c=Fe,block:f=Fe,event:p}){const v=N;N=l;const h=await de(t,!1),u=e==="enter"?Ne(m,h,t,e):dt({url:t,type:e,delta:n?.delta,intent:h,scroll:n?.scroll,event:p});if(!u){f(),N===l&&(N=v);return}const _=w,g=R;c(),Q=!0,se&&u.navigation.type!=="enter"&&$.navigating.set(H.current=u.navigation);let d=h&&await ft(h);if(!d){if(fe(t,x,y.hash))return await X(t,i);d=await ht(t,{id:null},await Z(new Le(404,"Not Found",`Not found: ${t.pathname}`),{url:t,params:{},route:{id:null}}),404,i)}if(t=h?.url||t,N!==l)return u.reject(new Error("navigation aborted")),!1;if(d.type==="redirect"){if(s<20){await B({type:e,url:new URL(d.location,t),popped:n,keepfocus:r,noscroll:a,replace_state:i,state:o,redirect_count:s+1,nav_token:l}),u.fulfil(void 0);return}d=await je({status:500,error:await Z(new Error("Redirect loop"),{url:t,params:{},route:{id:null}}),url:t,route:{id:null}})}else d.props.page.status>=400&&await $.updated.check()&&(await nt(),await X(t,i));if(Mt(),Ie(_),it(g),d.props.page.url.pathname!==t.pathname&&(t.pathname=d.props.page.url.pathname),o=n?n.state:o,!n){const b=i?0:1,K={[V]:w+=b,[Y]:R+=b,[Xe]:o};(i?history.replaceState:history.pushState).call(history,K,"",t),i||Bt(w,R)}const E=h&&L?.id===h.id?L.fork:null;L=null,d.props.page.state=o;let S;if(se){const b=(await Promise.all(Array.from(Kt,M=>M(u.navigation)))).filter(M=>typeof M=="function");if(b.length>0){let M=function(){b.forEach(pe=>{z.delete(pe)})};b.push(M),b.forEach(pe=>{z.add(pe)})}const K=u.navigation.to;m={...d.state,nav:{params:K.params,route:K.route,url:K.url}},d.props.page&&(d.props.page.url=t);const he=E&&await E;he?S=he.commit():(F=null,st.$set(d.props),F&&Object.assign(d.props.page,F),Dt(d.props.page),S=_t?.()),ot=!0}else await ut(d,be,!1);const{activeElement:O}=document;await S,await te(),await te();let P=null;if(Ge){const b=n?n.scroll:a?q():null;b?scrollTo(b.x,b.y):(P=t.hash&&document.getElementById(pt(t)))?P.scrollIntoView():scrollTo(0,0)}const gt=document.activeElement!==O&&document.activeElement!==document.body;!r&&!gt&&rn(t,!P),Ge=!0,d.props.page&&(F&&Object.assign(d.props.page,F),Object.assign(k,d.props.page)),Q=!1,e==="popstate"&<(R),u.fulfil(void 0),u.navigation.to&&(u.navigation.to.scroll=q()),z.forEach(b=>b(u.navigation)),$.navigating.set(H.current=null)}async function ht(e,t,n,r,a){return e.origin===ue&&e.pathname===location.pathname&&!at?await je({status:r,error:n,url:e,route:t}):await X(e,a)}function Qt(){let e,t={element:void 0,href:void 0},n;I.addEventListener("mousemove",s=>{const l=s.target;clearTimeout(e),e=setTimeout(()=>{i(l,j.hover)},20)});function r(s){s.defaultPrevented||i(s.composedPath()[0],j.tap)}I.addEventListener("mousedown",r),I.addEventListener("touchstart",r,{passive:!0});const a=new IntersectionObserver(s=>{for(const l of s)l.isIntersecting&&(ve(new URL(l.target.href)),a.unobserve(l.target))},{threshold:0});async function i(s,l){const c=Ze(s,I),f=c===t.element&&c?.href===t.href&&l>=n;if(!c||f)return;const{url:p,external:v,download:h}=we(c,x,y.hash);if(v||h)return;const u=ne(c),_=p&&ce(m.url)===ce(p);if(!(u.reload||_))if(l<=u.preload_data){t={element:c,href:c.href},n=j.tap;const g=await de(p,!1);if(!g)return;Ft(g)}else l<=u.preload_code&&(t={element:c,href:c.href},n=l,ve(p))}function o(){a.disconnect();for(const s of I.querySelectorAll("a")){const{url:l,external:c,download:f}=we(s,x,y.hash);if(c||f)continue;const p=ne(s);p.reload||(p.preload_code===j.viewport&&a.observe(s),p.preload_code===j.eager&&ve(l))}}z.add(o),o()}function Z(e,t){if(e instanceof Re)return e.body;const n=Te(e),r=Nt(e);return y.hooks.handleError({error:e,event:t,status:n,message:r})??{message:r}}function dn(e,t={}){return e=new URL(Ae(e)),e.origin!==ue?Promise.reject(new Error("goto: invalid URL")):ct(e,t,0)}function Zt(e){if(typeof e=="function")ae.push(e);else{const{href:t}=new URL(e,location.href);ae.push(n=>n.href===t)}}function en(){history.scrollRestoration="manual",addEventListener("beforeunload",t=>{let n=!1;if(ze(),!Q){const r=Ne(m,void 0,null,"leave"),a={...r.navigation,cancel:()=>{n=!0,r.reject(new Error("navigation cancelled"))}};rt.forEach(i=>i(a))}n?(t.preventDefault(),t.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&ze()}),navigator.connection?.saveData||Qt(),I.addEventListener("click",async t=>{if(t.button||t.which!==1||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.defaultPrevented)return;const n=Ze(t.composedPath()[0],I);if(!n)return;const{url:r,external:a,target:i,download:o}=we(n,x,y.hash);if(!r)return;if(i==="_parent"||i==="_top"){if(window.parent!==window)return}else if(i&&i!=="_self")return;const s=ne(n);if(!(n instanceof SVGAElement)&&r.protocol!==location.protocol&&!(r.protocol==="https:"||r.protocol==="http:")||o)return;const[c,f]=(y.hash?r.hash.replace(/^#/,""):r.href).split("#"),p=c===ge(location);if(a||s.reload&&(!p||!f)){dt({url:r,type:"link",event:t})?Q=!0:t.preventDefault();return}if(f!==void 0&&p){const[,v]=m.url.href.split("#");if(v===f){if(t.preventDefault(),f===""||f==="top"&&n.ownerDocument.getElementById("top")===null)scrollTo({top:0});else{const h=n.ownerDocument.getElementById(decodeURIComponent(f));h&&(h.scrollIntoView(),h.focus())}return}if(G=!0,Ie(w),e(r),!s.replace_state)return;G=!1}t.preventDefault(),await new Promise(v=>{requestAnimationFrame(()=>{setTimeout(v,0)}),setTimeout(v,100)}),await B({type:"link",url:r,keepfocus:s.keepfocus,noscroll:s.noscroll,replace_state:s.replace_state??r.href===location.href,event:t})}),I.addEventListener("submit",t=>{if(t.defaultPrevented)return;const n=HTMLFormElement.prototype.cloneNode.call(t.target),r=t.submitter;if((r?.formTarget||n.target)==="_blank"||(r?.formMethod||n.method)!=="get")return;const o=new URL(r?.hasAttribute("formaction")&&r?.formAction||n.action);if(fe(o,x,!1))return;const s=t.target,l=ne(s);if(l.reload)return;t.preventDefault(),t.stopPropagation();const c=new FormData(s,r);o.search=new URLSearchParams(c).toString(),B({type:"form",url:o,keepfocus:l.keepfocus,noscroll:l.noscroll,replace_state:l.replace_state??o.href===location.href,event:t})}),addEventListener("popstate",async t=>{if(!Ee){if(t.state?.[V]){const n=t.state[V];if(N={},n===w)return;const r=C[n],a=t.state[Xe]??{},i=new URL(t.state[Pt]??location.href),o=t.state[Y],s=m.url?ge(location)===ge(m.url):!1;if(o===R&&(ot||s)){a!==k.state&&(k.state=a),e(i),C[w]=q(),r&&scrollTo(r.x,r.y),w=n;return}const c=n-w;await B({type:"popstate",url:i,popped:{state:a,scroll:r,delta:c},accept:()=>{w=n,R=o},block:()=>{history.go(-c)},nav_token:N,event:t})}else if(!G){const n=new URL(location.href);e(n),y.hash&&location.reload()}}}),addEventListener("hashchange",()=>{G&&(G=!1,history.replaceState({...history.state,[V]:++w,[Y]:R},"",location.href))});for(const t of document.querySelectorAll("link"))Vt.has(t.rel)&&(t.href=t.href);addEventListener("pageshow",t=>{t.persisted&&$.navigating.set(H.current=null)});function e(t){m.url=k.url=t,$.page.set(qe(k)),$.page.notify()}}async function tn(e,{status:t=200,error:n,node_ids:r,params:a,route:i,server_route:o,data:s,form:l}){at=!0;const c=new URL(location.href);let f;({params:a={},route:i={id:null}}=await de(c,!1)||{}),f=Oe.find(({id:h})=>h===i.id);let p,v=!0;try{const h=r.map(async(_,g)=>{const d=s[g];return d?.uses&&(d.uses=nn(d.uses)),$e({loader:y.nodes[_],url:c,params:a,route:i,parent:async()=>{const E={};for(let S=0;S<g;S+=1)Object.assign(E,(await h[S]).data);return E},server_data_node:Ce(d)})}),u=await Promise.all(h);if(f){const _=f.layouts;for(let g=0;g<_.length;g++)_[g]||u.splice(g,0,void 0)}p=await le({url:c,params:a,branch:u,status:t,error:n,errors:f?.errors,form:l,route:f??null})}catch(h){if(h instanceof xe){await X(new URL(h.location,location.href));return}p=await je({status:Te(h),error:await Z(h,{url:c,params:a,route:i}),url:c,route:i}),e.textContent="",v=!1}p.props.page&&(p.props.page.state={}),await ut(p,e,v)}function nn(e){return{dependencies:new Set(e?.dependencies??[]),params:new Set(e?.params??[]),parent:!!e?.parent,route:!!e?.route,url:!!e?.url,search_params:new Set(e?.search_params??[])}}let Ee=!1;function rn(e,t=!0){const n=document.querySelector("[autofocus]");if(n)n.focus();else{const r=pt(e);if(r&&document.getElementById(r)){const{x:i,y:o}=q();setTimeout(()=>{const s=history.state;Ee=!0,location.replace(new URL(`#${r}`,location.href)),history.replaceState(s,"",e),t&&scrollTo(i,o),Ee=!1})}else{const i=document.body,o=i.getAttribute("tabindex");i.tabIndex=-1,i.focus({preventScroll:!0,focusVisible:!1}),o!==null?i.setAttribute("tabindex",o):i.removeAttribute("tabindex")}const a=getSelection();if(a&&a.type!=="None"){const i=[];for(let o=0;o<a.rangeCount;o+=1)i.push(a.getRangeAt(o));setTimeout(()=>{if(a.rangeCount===i.length){for(let o=0;o<a.rangeCount;o+=1){const s=i[o],l=a.getRangeAt(o);if(s.commonAncestorContainer!==l.commonAncestorContainer||s.startContainer!==l.startContainer||s.endContainer!==l.endContainer||s.startOffset!==l.startOffset||s.endOffset!==l.endOffset)return}a.removeAllRanges()}})}}}function Ne(e,t,n,r,a=null){let i,o;const s=new Promise((c,f)=>{i=c,o=f});return s.catch(()=>{}),{navigation:{from:{params:e.params,route:{id:e.route?.id??null},url:e.url,scroll:q()},to:n&&{params:t?.params??null,route:{id:t?.route?.id??null},url:n,scroll:a},willUnload:!t,type:r,complete:s},fulfil:i,reject:o}}function qe(e){return{data:e.data,error:e.error,form:e.form,params:e.params,route:e.route,state:e.state,status:e.status,url:e.url}}function an(e){const t=new URL(e);return t.hash=decodeURIComponent(e.hash),t}function pt(e){let t;if(y.hash){const[,,n]=e.hash.split("#",3);t=n??""}else t=e.hash.slice(1);return decodeURIComponent(t)}export{fn as a,dn as g,sn as l,k as p,$ as s};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s as r,p as e}from"./
|
|
1
|
+
import{s as r,p as e}from"./BIaXC2t9.js";const a={get params(){return e.params},get url(){return e.url}};r.updated.check;const s=a;export{s as p};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s as e}from"./
|
|
1
|
+
import{s as e}from"./BIaXC2t9.js";const r=()=>{const s=e;return{page:{subscribe:s.page.subscribe},navigating:{subscribe:s.navigating.subscribe},updated:s.updated}},b={subscribe(s){return r().page.subscribe(s)}};export{b as p};
|
|
Binary file
|
|
Binary file
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../nodes/0.
|
|
2
|
-
import{_}from"../chunks/PPVm8Dsz.js";import{h as j,k as G,b as H,l as q,m as J,n as K,e as Q,d as k,ab as U,i as W,y as R,Y as X,z as u,ac as Z,ad as $,ae as tt,p as et,_ as rt,a0 as at,u as st,aa as ot,f as b,s as nt,w as it,o as O,c as ct,r as ut,t as _t,B as p}from"../chunks/CZHsSL_X.js";import{B as mt,j as dt,m as lt,u as ft,a as v,c as T,f as w,t as ht,s as vt}from"../chunks/r0JawsZc.js";import{i as A}from"../chunks/B8XegpSE.js";import{p as x,b as D}from"../chunks/Bu1aqm5j.js";function I(s,t,a){var n;j&&(n=W,G());var o=new mt(s);H(()=>{var e=t()??null;if(j){var r=J(n),c=r===U,P=e!==null;if(c!==P){var g=K();Q(g),o.anchor=g,k(!1),o.ensure(e,e&&(f=>a(f,e))),k(!0);return}}o.ensure(e,e&&(f=>a(f,e)))},q)}function gt(s){return class extends yt{constructor(t){super({component:s,...t})}}}class yt{#e;#t;constructor(t){var a=new Map,n=(e,r)=>{var c=tt(r,!1,!1);return a.set(e,c),c};const o=new Proxy({...t.props||{},$$events:{}},{get(e,r){return u(a.get(r)??n(r,Reflect.get(e,r)))},has(e,r){return r===X?!0:(u(a.get(r)??n(r,Reflect.get(e,r))),Reflect.has(e,r))},set(e,r,c){return R(a.get(r)??n(r,c),c),Reflect.set(e,r,c)}});this.#t=(t.hydrate?dt:lt)(t.component,{target:t.target,anchor:t.anchor,props:o,context:t.context,intro:t.intro??!1,recover:t.recover,transformError:t.transformError}),(!t?.props?.$$host||t.sync===!1)&&Z(),this.#e=o.$$events;for(const e of Object.keys(this.#t))e==="$set"||e==="$destroy"||e==="$on"||$(this,e,{get(){return this.#t[e]},set(r){this.#t[e]=r},enumerable:!0});this.#t.$set=e=>{Object.assign(o,e)},this.#t.$destroy=()=>{ft(this.#t)}}$set(t){this.#t.$set(t)}$on(t,a){this.#e[t]=this.#e[t]||[];const n=(...o)=>a.call(this,...o);return this.#e[t].push(n),()=>{this.#e[t]=this.#e[t].filter(o=>o!==n)}}$destroy(){this.#t.$destroy()}}const It={};var Et=w('<div id="svelte-announcer" aria-live="assertive" aria-atomic="true" style="position: absolute; left: 0; top: 0; clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden; white-space: nowrap; width: 1px; height: 1px"><!></div>'),bt=w("<!> <!>",1);function Rt(s,t){et(t,!0);let a=x(t,"components",23,()=>[]),n=x(t,"data_0",3,null),o=x(t,"data_1",3,null);rt(()=>t.stores.page.set(t.page)),at(()=>{t.stores,t.page,t.constructors,a(),t.form,n(),o(),t.stores.page.notify()});let e=O(!1),r=O(!1),c=O(null);st(()=>{const i=t.stores.page.subscribe(()=>{u(e)&&(R(r,!0),ot().then(()=>{R(c,document.title||"untitled page",!0)}))});return R(e,!0),i});const P=p(()=>t.constructors[1]);var g=bt(),f=b(g);{var C=i=>{const m=p(()=>t.constructors[0]);var d=T(),y=b(d);I(y,()=>u(m),(l,h)=>{D(h(l,{get data(){return n()},get form(){return t.form},get params(){return t.page.params},children:(E,Ot)=>{var L=T(),N=b(L);I(N,()=>u(P),(Y,F)=>{D(F(Y,{get data(){return o()},get form(){return t.form},get params(){return t.page.params}}),z=>a()[1]=z,()=>a()?.[1])}),v(E,L)},$$slots:{default:!0}}),E=>a()[0]=E,()=>a()?.[0])}),v(i,d)},S=i=>{const m=p(()=>t.constructors[0]);var d=T(),y=b(d);I(y,()=>u(m),(l,h)=>{D(h(l,{get data(){return n()},get form(){return t.form},get params(){return t.page.params}}),E=>a()[0]=E,()=>a()?.[0])}),v(i,d)};A(f,i=>{t.constructors[1]?i(C):i(S,-1)})}var B=nt(f,2);{var M=i=>{var m=Et(),d=ct(m);{var y=l=>{var h=ht();_t(()=>vt(h,u(c))),v(l,h)};A(d,l=>{u(r)&&l(y)})}ut(m),v(i,m)};A(B,i=>{u(e)&&i(M)})}v(s,g),it()}const Lt=gt(Rt),jt=[()=>_(()=>import("../nodes/0.
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../nodes/0.Bi3XYMSu.js","../chunks/r0JawsZc.js","../chunks/CZHsSL_X.js","../chunks/CQjSATpv.js","../assets/markdown.Dc-OSJWY.css","../chunks/BIaXC2t9.js","../chunks/CiF38mQq.js","../assets/0.BhZOCxO4.css","../nodes/1.DTmfBFmm.js","../chunks/B8XegpSE.js","../chunks/BOYo8yTr.js","../assets/1.BYutk3aU.css","../nodes/2.Cm269yzt.js","../chunks/B5NAKyil.js","../chunks/Bu1aqm5j.js","../assets/Phone.FQEfwCX2.css","../chunks/UJOiqIYE.js","../chunks/DSU1n5N_.js","../chunks/CSoRdFvv.js","../chunks/DjsDGxCa.js","../chunks/BLszSzTT.js","../assets/2.CAShZ7lQ.css","../nodes/3.3yohCM25.js","../assets/3.DGDHCVnW.css","../nodes/4.C25c5hMg.js","../chunks/CRbaG9cv.js","../assets/4.BFUut--w.css","../nodes/5.DIkXVP4q.js","../chunks/DVkn4r72.js","../assets/ChatView.CwWbzIL-.css","../assets/5.BTOx7yt7.css","../nodes/6.BPL-HzUX.js","../assets/6.eZGZN-BF.css","../nodes/7.IgEqce53.js","../chunks/PPVm8Dsz.js","../assets/7.DwS5ZHBh.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_}from"../chunks/PPVm8Dsz.js";import{h as j,k as G,b as H,l as q,m as J,n as K,e as Q,d as k,ab as U,i as W,y as R,Y as X,z as u,ac as Z,ad as $,ae as tt,p as et,_ as rt,a0 as at,u as st,aa as ot,f as b,s as nt,w as it,o as O,c as ct,r as ut,t as _t,B as p}from"../chunks/CZHsSL_X.js";import{B as mt,j as dt,m as lt,u as ft,a as v,c as T,f as w,t as ht,s as vt}from"../chunks/r0JawsZc.js";import{i as A}from"../chunks/B8XegpSE.js";import{p as x,b as D}from"../chunks/Bu1aqm5j.js";function I(s,t,a){var n;j&&(n=W,G());var o=new mt(s);H(()=>{var e=t()??null;if(j){var r=J(n),c=r===U,P=e!==null;if(c!==P){var g=K();Q(g),o.anchor=g,k(!1),o.ensure(e,e&&(f=>a(f,e))),k(!0);return}}o.ensure(e,e&&(f=>a(f,e)))},q)}function gt(s){return class extends yt{constructor(t){super({component:s,...t})}}}class yt{#e;#t;constructor(t){var a=new Map,n=(e,r)=>{var c=tt(r,!1,!1);return a.set(e,c),c};const o=new Proxy({...t.props||{},$$events:{}},{get(e,r){return u(a.get(r)??n(r,Reflect.get(e,r)))},has(e,r){return r===X?!0:(u(a.get(r)??n(r,Reflect.get(e,r))),Reflect.has(e,r))},set(e,r,c){return R(a.get(r)??n(r,c),c),Reflect.set(e,r,c)}});this.#t=(t.hydrate?dt:lt)(t.component,{target:t.target,anchor:t.anchor,props:o,context:t.context,intro:t.intro??!1,recover:t.recover,transformError:t.transformError}),(!t?.props?.$$host||t.sync===!1)&&Z(),this.#e=o.$$events;for(const e of Object.keys(this.#t))e==="$set"||e==="$destroy"||e==="$on"||$(this,e,{get(){return this.#t[e]},set(r){this.#t[e]=r},enumerable:!0});this.#t.$set=e=>{Object.assign(o,e)},this.#t.$destroy=()=>{ft(this.#t)}}$set(t){this.#t.$set(t)}$on(t,a){this.#e[t]=this.#e[t]||[];const n=(...o)=>a.call(this,...o);return this.#e[t].push(n),()=>{this.#e[t]=this.#e[t].filter(o=>o!==n)}}$destroy(){this.#t.$destroy()}}const It={};var Et=w('<div id="svelte-announcer" aria-live="assertive" aria-atomic="true" style="position: absolute; left: 0; top: 0; clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden; white-space: nowrap; width: 1px; height: 1px"><!></div>'),bt=w("<!> <!>",1);function Rt(s,t){et(t,!0);let a=x(t,"components",23,()=>[]),n=x(t,"data_0",3,null),o=x(t,"data_1",3,null);rt(()=>t.stores.page.set(t.page)),at(()=>{t.stores,t.page,t.constructors,a(),t.form,n(),o(),t.stores.page.notify()});let e=O(!1),r=O(!1),c=O(null);st(()=>{const i=t.stores.page.subscribe(()=>{u(e)&&(R(r,!0),ot().then(()=>{R(c,document.title||"untitled page",!0)}))});return R(e,!0),i});const P=p(()=>t.constructors[1]);var g=bt(),f=b(g);{var C=i=>{const m=p(()=>t.constructors[0]);var d=T(),y=b(d);I(y,()=>u(m),(l,h)=>{D(h(l,{get data(){return n()},get form(){return t.form},get params(){return t.page.params},children:(E,Ot)=>{var L=T(),N=b(L);I(N,()=>u(P),(Y,F)=>{D(F(Y,{get data(){return o()},get form(){return t.form},get params(){return t.page.params}}),z=>a()[1]=z,()=>a()?.[1])}),v(E,L)},$$slots:{default:!0}}),E=>a()[0]=E,()=>a()?.[0])}),v(i,d)},S=i=>{const m=p(()=>t.constructors[0]);var d=T(),y=b(d);I(y,()=>u(m),(l,h)=>{D(h(l,{get data(){return n()},get form(){return t.form},get params(){return t.page.params}}),E=>a()[0]=E,()=>a()?.[0])}),v(i,d)};A(f,i=>{t.constructors[1]?i(C):i(S,-1)})}var B=nt(f,2);{var M=i=>{var m=Et(),d=ct(m);{var y=l=>{var h=ht();_t(()=>vt(h,u(c))),v(l,h)};A(d,l=>{u(r)&&l(y)})}ut(m),v(i,m)};A(B,i=>{u(e)&&i(M)})}v(s,g),it()}const Lt=gt(Rt),jt=[()=>_(()=>import("../nodes/0.Bi3XYMSu.js"),__vite__mapDeps([0,1,2,3,4,5,6,7]),import.meta.url),()=>_(()=>import("../nodes/1.DTmfBFmm.js"),__vite__mapDeps([8,1,2,9,10,5,6,11]),import.meta.url),()=>_(()=>import("../nodes/2.Cm269yzt.js"),__vite__mapDeps([12,1,2,9,13,3,4,14,15,10,5,16,17,18,19,20,21]),import.meta.url),()=>_(()=>import("../nodes/3.3yohCM25.js"),__vite__mapDeps([22,1,2,9,10,13,3,4,14,15,17,19,23]),import.meta.url),()=>_(()=>import("../nodes/4.C25c5hMg.js"),__vite__mapDeps([24,1,2,9,13,3,4,14,15,10,5,25,16,17,18,19,20,26]),import.meta.url),()=>_(()=>import("../nodes/5.DIkXVP4q.js"),__vite__mapDeps([27,1,2,9,10,13,3,4,14,15,25,5,16,28,29,30]),import.meta.url),()=>_(()=>import("../nodes/6.BPL-HzUX.js"),__vite__mapDeps([31,1,2,9,13,3,4,14,15,10,5,16,17,18,19,20,32]),import.meta.url),()=>_(()=>import("../nodes/7.IgEqce53.js"),__vite__mapDeps([33,34,1,2,9,10,13,3,4,14,15,5,6,18,19,28,29,35]),import.meta.url)],kt=[],wt={"/":[2],"/config":[3],"/project":[4],"/session/[id]":[5],"/terminals":[6],"/terminals/[id]":[7]},V={handleError:(({error:s})=>{console.error(s)}),reroute:(()=>{}),transport:{}},Pt=Object.fromEntries(Object.entries(V.transport).map(([s,t])=>[s,t.decode])),Vt=Object.fromEntries(Object.entries(V.transport).map(([s,t])=>[s,t.encode])),Ct=!1,St=(s,t)=>Pt[s](t);export{St as decode,Pt as decoders,wt as dictionary,Vt as encoders,Ct as hash,V as hooks,It as matchers,jt as nodes,Lt as root,kt as server_loads};
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{l as o,a as r}from"../chunks/BIaXC2t9.js";export{o as load_css,r as start};
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as j,f as A,s as z,d as H,b as M,g as V,h as W}from"../chunks/r0JawsZc.js";import{t as C,s as i,c as t,r as e,p as I,u as O,w as D,y as f,z as L,o as P}from"../chunks/CZHsSL_X.js";import{a as v,s as T}from"../chunks/CQjSATpv.js";import{g as E}from"../chunks/
|
|
1
|
+
import{a as j,f as A,s as z,d as H,b as M,g as V,h as W}from"../chunks/r0JawsZc.js";import{t as C,s as i,c as t,r as e,p as I,u as O,w as D,y as f,z as L,o as P}from"../chunks/CZHsSL_X.js";import{a as v,s as T}from"../chunks/CQjSATpv.js";import{g as E}from"../chunks/BIaXC2t9.js";import{p as F}from"../chunks/CiF38mQq.js";var G=A('<div><span class="status-dot"></span> <span> </span></div>');function J(u,c){function s(a){switch(a){case"degraded":return"Degraded";case"error":return"Offline";case"healthy":return"Online";default:return"Checking"}}function p(a){switch(a){case"degraded":return"degraded";case"error":return"offline";case"healthy":return"online";default:return""}}var n=G(),r=i(t(n),2),d=t(r,!0);e(r),e(n),C((a,h)=>{v(n,1,`status-badge ${a??""}`),z(d,h)},[()=>p(c.status),()=>s(c.status)]),j(u,n)}var K=A('<div class="app"><header class="header"><div class="header-content"><a href="/" class="logo"><img src="/app-icon.png" alt="Shooter" class="logo-icon" width="24" height="24"/> <span class="logo-text">Shooter</span></a> <div class="nav-right svelte-12qhfyh"><!> <button aria-label="Settings"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="3"></circle><path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06A1.65 1.65 0 0 0 4.68 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06A1.65 1.65 0 0 0 9 4.68a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06A1.65 1.65 0 0 0 19.4 9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"></path></svg></button></div></div></header> <div class="content-area svelte-12qhfyh"><!></div> <nav class="bottom-tabs svelte-12qhfyh"><div class="bottom-tabs-inner svelte-12qhfyh"><a href="/"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"></path></svg> <span>Projects</span></a> <a href="/terminals"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><polyline points="4 17 10 11 4 5"></polyline><line x1="12" y1="19" x2="20" y2="19"></line></svg> <span>Terminals</span></a></div></nav></div>');function Y(u,c){I(c,!0);const s=()=>W(F,"$page",p),[p,n]=V();let r=P("unknown");O(()=>{d();const o=setInterval(()=>{d()},3e4);return()=>{clearInterval(o)}});async function d(){try{const o=await fetch("/api/health");if(!o.ok){f(r,"error");return}const l=await o.json();f(r,l.status==="healthy"||l.status==="degraded"||l.status==="error"?l.status:"unknown",!0)}catch{f(r,"error")}}var a=K(),h=t(a),m=t(h),y=i(t(m),2),k=t(y);J(k,{get status(){return L(r)}});var b=i(k,2);e(y),e(m),e(h);var g=i(h,2),$=t(g);T($,()=>c.children),e(g);var w=i(g,2),_=t(w),x=t(_);let S;var B=i(x,2);let q;e(_),e(w),e(a),C((o,l)=>{v(b,1,`btn-gear ${s().url.pathname==="/config"?"btn-gear-active":""}`,"svelte-12qhfyh"),S=v(x,1,"tab-item svelte-12qhfyh",null,S,o),q=v(B,1,"tab-item svelte-12qhfyh",null,q,l)},[()=>({active:s().url.pathname==="/"||s().url.pathname.startsWith("/project")||s().url.pathname.startsWith("/session")}),()=>({active:s().url.pathname.startsWith("/terminals")})]),M("click",b,()=>E("/config")),j(u,a),D(),n()}H(["click"]);export{Y as component};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as P,b as x,a as i,g as V,f as q,s as w,h as C,t as d}from"../chunks/r0JawsZc.js";import{F as D,_ as J,a0 as k,I as K,a1 as j,a2 as L,z as S,a3 as M,V as N,a4 as O,p as Q,t as y,w as R,c as f,s as g,x as U,$ as W,r as v}from"../chunks/CZHsSL_X.js";import{i as $}from"../chunks/B8XegpSE.js";import{h as X}from"../chunks/BOYo8yTr.js";import{g as Y}from"../chunks/
|
|
1
|
+
import{d as P,b as x,a as i,g as V,f as q,s as w,h as C,t as d}from"../chunks/r0JawsZc.js";import{F as D,_ as J,a0 as k,I as K,a1 as j,a2 as L,z as S,a3 as M,V as N,a4 as O,p as Q,t as y,w as R,c as f,s as g,x as U,$ as W,r as v}from"../chunks/CZHsSL_X.js";import{i as $}from"../chunks/B8XegpSE.js";import{h as X}from"../chunks/BOYo8yTr.js";import{g as Y}from"../chunks/BIaXC2t9.js";import{p as Z}from"../chunks/CiF38mQq.js";function ee(n=!1){const s=D,t=s.l.u;if(!t)return;let p=()=>M(s.s);if(n){let l=0,a={};const m=N(()=>{let c=!1;const u=s.s;for(const o in u)u[o]!==a[o]&&(a[o]=u[o],c=!0);return c&&l++,l});p=()=>S(m)}t.b.length&&J(()=>{G(s,p),j(t.b)}),k(()=>{const l=K(()=>t.m.map(L));return()=>{for(const a of l)typeof a=="function"&&a()}}),t.a.length&&k(()=>{G(s,p),j(t.a)})}function G(n,s){if(n.l.s)for(const t of n.l.s)S(t);s()}O();var te=q('<main class="error-page svelte-1j96wlh"><div class="error-content svelte-1j96wlh"><div class="error-code svelte-1j96wlh"> </div> <h1 class="error-title svelte-1j96wlh"><!></h1> <p class="error-message svelte-1j96wlh"><!></p> <div class="error-actions svelte-1j96wlh"><button class="error-btn svelte-1j96wlh">Go Home</button> <button class="error-btn error-btn-secondary svelte-1j96wlh">Go Back</button></div></div></main>');function ce(n,s){Q(s,!1);const t=()=>C(Z,"$page",p),[p,l]=V();ee();var a=te();X("1j96wlh",e=>{U(()=>{W.title="Error - Shooter"})});var m=f(a),c=f(m),u=f(c,!0);v(c);var o=g(c,2),T=f(o);{var z=e=>{var r=d("Page not found");i(e,r)},A=e=>{var r=d("Something went wrong");i(e,r)};$(T,e=>{t().status===404?e(z):e(A,-1)})}v(o);var h=g(o,2),B=f(h);{var E=e=>{var r=d();y(()=>w(r,t().error.message)),i(e,r)},F=e=>{var r=d("The page you're looking for doesn't exist or has been moved.");i(e,r)},H=e=>{var r=d("An unexpected error occurred. Try refreshing or going back.");i(e,r)};$(B,e=>{t().error?.message?e(E):t().status===404?e(F,1):e(H,-1)})}v(h);var _=g(h,2),b=f(_),I=g(b,2);v(_),v(m),v(a),y(()=>w(u,t().status)),x("click",b,()=>Y("/")),x("click",I,()=>{history.back()}),i(n,a),R(),l()}P(["click"]);export{ce as component};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as f,f as u,s as S}from"../chunks/r0JawsZc.js";import{p as ue,o as g,q as pe,u as he,v as me,w as ge,x as _e,y as r,z as s,$ as ye,c as o,s as d,f as F,A as Ce,r as t,B as q,t as xe}from"../chunks/CZHsSL_X.js";import{i as E}from"../chunks/B8XegpSE.js";import{B as L,a as Se,e as J,i as be,P as Pe,s as $e}from"../chunks/B5NAKyil.js";import{h as je}from"../chunks/BOYo8yTr.js";import{g as Ie}from"../chunks/
|
|
1
|
+
import{a as f,f as u,s as S}from"../chunks/r0JawsZc.js";import{p as ue,o as g,q as pe,u as he,v as me,w as ge,x as _e,y as r,z as s,$ as ye,c as o,s as d,f as F,A as Ce,r as t,B as q,t as xe}from"../chunks/CZHsSL_X.js";import{i as E}from"../chunks/B8XegpSE.js";import{B as L,a as Se,e as J,i as be,P as Pe,s as $e}from"../chunks/B5NAKyil.js";import{h as je}from"../chunks/BOYo8yTr.js";import{g as Ie}from"../chunks/BIaXC2t9.js";import{g as ke,s as we,c as Ae,S as Ee}from"../chunks/UJOiqIYE.js";import{i as Le}from"../chunks/DSU1n5N_.js";import{E as D}from"../chunks/CSoRdFvv.js";import{I as Me}from"../chunks/DjsDGxCa.js";import"../chunks/CQjSATpv.js";import{f as Te}from"../chunks/BLszSzTT.js";var Be=u('<meta name="description" content="Claude Code sessions across all projects"/>'),Re=u("<!> Refresh",1),Ke=u('<div class="loading-container"></div>'),Ne=u('<a class="session-card"><div class="session-card-header"><div><h3 class="session-card-title"> </h3> <div class="session-card-subtitle"> </div></div> <!></div> <div class="session-stats"><span><strong> </strong> </span></div></a>'),Oe=u('<div style="text-align: center; padding: 1rem;"><!></div>'),ze=u('<div class="projects-container svelte-1uha8ag"></div> <!>',1),Fe=u('<main class="main"><div class="page-header svelte-1uha8ag"><div class="page-header-content svelte-1uha8ag"><div><h1 class="page-title svelte-1uha8ag">Projects</h1> <p class="page-description svelte-1uha8ag">Claude Code sessions across all projects</p></div> <div class="page-actions svelte-1uha8ag"><!></div></div></div> <!> <!></main>');function es(G,H){ue(H,!0);const V=1e4,M=20;let n=g(pe([])),p=g(!1),b=!1,h=g(null),C=null,_=g(null),T=g(!1),P=g(0);he(()=>{Z();const e=ke("shooter_projects");e&&(r(n,e,!0),r(p,!1)),x(),C=setInterval(()=>{s(h)?.apiKey&&s(P)<=M&&x()},V)}),me(()=>{C&&(clearInterval(C),C=null)});function Z(){try{const e=localStorage.getItem("shooter_config");if(e){const a=JSON.parse(e);Le(a)?r(h,a,!0):(localStorage.removeItem("shooter_config"),r(h,null))}}catch{}}async function x(e=!1,a=!1){if(!s(h)?.apiKey||b)return;b=!0,s(n).length===0&&r(p,!0);const l=e?s(P):0;try{const y=await fetch(`${a?"/api/sessions?refresh=true&":"/api/sessions?"}limit=${M}&offset=${l}`,{headers:{Authorization:`Bearer ${s(h).apiKey}`}});if(!y.ok){r(_,`Failed to load projects (HTTP ${y.status})`);return}r(_,null);const i=await y.json();e?r(n,[...s(n),...i.projects],!0):r(n,i.projects,!0),r(P,s(n).length,!0),r(T,i.total!==void 0?s(n).length<i.total:!1,!0),we("shooter_projects",s(n))}catch(v){r(_,"Failed to load projects"),console.error("Failed to fetch sessions:",v)}finally{r(p,!1),b=!1}}async function Q(){await x(!0)}async function U(){r(p,!0),Ae("shooter_projects"),await x(!1,!0)}function W(){Ie("/config")}function X(){return s(n).reduce((e,a)=>e+a.sessionCount,0)}var $=Fe();je("1uha8ag",e=>{var a=Be();_e(()=>{ye.title="Projects - Shooter"}),f(e,a)});var j=o($),B=o(j),R=d(o(B),2),Y=o(R);L(Y,{classes:"btn-secondary",onclick:U,get disabled(){return s(p)},children:(e,a)=>{var l=Re(),v=F(l);Me(v,{name:"refresh",size:14}),Ce(),f(e,l)},$$slots:{default:!0}}),t(R),t(B),t(j);var K=d(j,2);{var ee=e=>{Se(e,{get text(){return s(_)},classes:"banner-error"})};E(K,e=>{s(_)&&e(ee)})}var se=d(K,2);{var ae=e=>{var a=Ke();J(a,20,()=>Array(5),be,(l,v)=>{Ee(l,{classes:"shimmer-card"})}),t(a),f(e,a)},te=e=>{D(e,{icon:"settings",title:"Configuration Required",description:"Set up your API credentials to start tracking sessions",children:(a,l)=>{L(a,{classes:"btn-primary",onclick:W,text:"Configure Settings"})}})},re=e=>{D(e,{icon:"bell",title:"No sessions yet",description:"Claude Code sessions will appear here once JSONL files are found"})},oe=q(()=>X()===0),ie=e=>{var a=ze(),l=F(a);J(l,21,()=>s(n),i=>i.id,(i,c)=>{var m=Ne(),I=o(m),k=o(I),w=o(k),ne=o(w,!0);t(w);var N=d(w,2),le=o(N,!0);t(N),t(k);var ce=d(k,2);{let fe=q(()=>Te(s(c).lastModified));Pe(ce,{get text(){return`Last updated ${s(fe)??""}`},classes:"pill-session-time"})}t(I);var O=d(I,2),z=o(O),A=o(z),de=o(A,!0);t(A);var ve=d(A);t(z),t(O),t(m),xe(()=>{$e(m,"href",`/project?id=${s(c).id??""}`),S(ne,s(c).name),S(le,s(c).fullPath),S(de,s(c).sessionCount),S(ve,` ${s(c).sessionCount===1?"session":"sessions"}`)}),f(i,m)}),t(l);var v=d(l,2);{var y=i=>{var c=Oe(),m=o(c);L(m,{classes:"btn-secondary",onclick:Q,text:"Load More"}),t(c),f(i,c)};E(v,i=>{s(T)&&i(y)})}f(e,a)};E(se,e=>{s(p)&&s(n).length===0?e(ae):s(h)?.apiKey?s(oe)?e(re,2):e(ie,-1):e(te,1)})}t($),f(G,$),ge()}export{es as component};
|