@juliantanx/aiusage 1.5.4 → 1.5.6

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/README.md CHANGED
@@ -173,6 +173,33 @@ Contributions are welcome. Read [CONTRIBUTING.md](./CONTRIBUTING.md), use the is
173
173
  - [Changelog](./CHANGELOG.md)
174
174
  - [Security policy](./SECURITY.md)
175
175
 
176
+ ## Contributors
177
+
178
+ Thanks to these wonderful people ([emoji key](https://allcontributors.org/en/reference/emoji-key)):
179
+
180
+ <!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
181
+ <!-- prettier-ignore-start -->
182
+ <!-- markdownlint-disable -->
183
+ <table>
184
+ <tbody>
185
+ <tr>
186
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/juliantanx"><img src="https://avatars.githubusercontent.com/u/59169896?v=4?s=100" width="100px;" alt="Julian"/><br /><sub><b>Julian</b></sub></a><br /><a href="https://github.com/juliantanx/aiusage/commits?author=juliantanx" title="Code">💻</a> <a href="https://github.com/juliantanx/aiusage/commits?author=juliantanx" title="Documentation">📖</a> <a href="#infra-juliantanx" title="Infrastructure">🚇</a> <a href="#maintenance-juliantanx" title="Maintenance">🔧</a></td>
187
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/Fiveo9"><img src="https://avatars.githubusercontent.com/u/57358895?v=4?s=100" width="100px;" alt="Fiveonine"/><br /><sub><b>Fiveonine</b></sub></a><br /><a href="https://github.com/juliantanx/aiusage/commits?author=Fiveo9" title="Code">💻</a></td>
188
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/joyshan1986"><img src="https://avatars.githubusercontent.com/u/105418356?v=4?s=100" width="100px;" alt="joyshan1986"/><br /><sub><b>joyshan1986</b></sub></a><br /><a href="https://github.com/juliantanx/aiusage/commits?author=joyshan1986" title="Code">💻</a></td>
189
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/zhaolu83949426-hub"><img src="https://avatars.githubusercontent.com/u/260552457?v=4?s=100" width="100px;" alt="zhaolu83949426-hub"/><br /><sub><b>zhaolu83949426-hub</b></sub></a><br /><a href="https://github.com/juliantanx/aiusage/commits?author=zhaolu83949426-hub" title="Code">💻</a></td>
190
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/Mnoisec"><img src="https://avatars.githubusercontent.com/u/28181883?v=4?s=100" width="100px;" alt="Mnoisec"/><br /><sub><b>Mnoisec</b></sub></a><br /><a href="https://github.com/juliantanx/aiusage/commits?author=Mnoisec" title="Code">💻</a></td>
191
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/jlxyfll"><img src="https://avatars.githubusercontent.com/u/16436887?v=4?s=100" width="100px;" alt="jlxyfll"/><br /><sub><b>jlxyfll</b></sub></a><br /><a href="https://github.com/juliantanx/aiusage/commits?author=jlxyfll" title="Code">💻</a></td>
192
+ </tr>
193
+ </tbody>
194
+ </table>
195
+
196
+ <!-- markdownlint-restore -->
197
+ <!-- prettier-ignore-end -->
198
+
199
+ <!-- ALL-CONTRIBUTORS-LIST:END -->
200
+
201
+ This project follows the [all-contributors](https://allcontributors.org) specification. Contributions of any kind welcome!
202
+
176
203
  ## Community
177
204
 
178
205
  - Bugs: [GitHub Issues](https://github.com/juliantanx/aiusage/issues/new?template=bug_report.md)
@@ -183,4 +210,4 @@ Contributions are welcome. Read [CONTRIBUTING.md](./CONTRIBUTING.md), use the is
183
210
 
184
211
  ## License
185
212
 
186
- [MIT](./LICENSE)
213
+ [MIT](./LICENSE) © [Julian](https://github.com/juliantanx)
package/dist/index.js CHANGED
@@ -13,7 +13,7 @@ import { execSync as execSync5 } from "child_process";
13
13
 
14
14
  // src/commands/serve.ts
15
15
  import http2 from "http";
16
- import { readFileSync as readFileSync9, existsSync as existsSync10, statSync as statSync3, writeFileSync as writeFileSync6, unlinkSync as unlinkSync3 } from "fs";
16
+ import { readFileSync as readFileSync9, existsSync as existsSync10, statSync as statSync3, writeFileSync as writeFileSync6, unlinkSync as unlinkSync4 } from "fs";
17
17
  import { join as join11, extname as extname2, dirname as dirname4 } from "path";
18
18
  import { fileURLToPath } from "url";
19
19
 
@@ -1416,8 +1416,8 @@ function defaultQoderDbPath() {
1416
1416
  return join3(home, "Library", "Application Support", "Qoder", "SharedClientCache", "cache", "db", "local.db");
1417
1417
  }
1418
1418
  if (plat === "win32") {
1419
- const localAppData = process.env.LOCALAPPDATA ?? join3(home, "AppData", "Local");
1420
- return join3(localAppData, "Qoder", "SharedClientCache", "cache", "db", "local.db");
1419
+ const appData = process.env.APPDATA ?? join3(home, "AppData", "Roaming");
1420
+ return join3(appData, "Qoder", "SharedClientCache", "cache", "db", "local.db");
1421
1421
  }
1422
1422
  const xdgDataHome = process.env.XDG_DATA_HOME ?? join3(home, ".local", "share");
1423
1423
  return join3(xdgDataHome, "Qoder", "SharedClientCache", "cache", "db", "local.db");
@@ -2709,7 +2709,7 @@ async function fetchLeaderboardStatus(serverUrl) {
2709
2709
 
2710
2710
  // src/db/index.ts
2711
2711
  import Database from "better-sqlite3";
2712
- import { mkdirSync as mkdirSync4 } from "fs";
2712
+ import { mkdirSync as mkdirSync4, unlinkSync as unlinkSync2 } from "fs";
2713
2713
  import { dirname as dirname3 } from "path";
2714
2714
 
2715
2715
  // src/db/schema.ts
@@ -3694,11 +3694,31 @@ function initializeDatabase(db) {
3694
3694
  runMigrations(db);
3695
3695
  loadPricingRuntime(db, loadConfig());
3696
3696
  }
3697
+ function removeCorruptedDb(path3) {
3698
+ for (const suffix of ["", "-shm", "-wal"]) {
3699
+ try {
3700
+ unlinkSync2(path3 + suffix);
3701
+ } catch {
3702
+ }
3703
+ }
3704
+ }
3697
3705
  function createDatabase(path3) {
3698
3706
  mkdirSync4(dirname3(path3), { recursive: true, mode: 448 });
3699
- const db = new Database(path3);
3700
- initializeDatabase(db);
3701
- return db;
3707
+ try {
3708
+ const db = new Database(path3);
3709
+ initializeDatabase(db);
3710
+ return db;
3711
+ } catch (err) {
3712
+ const code = err.code;
3713
+ if (code === "SQLITE_CORRUPT" || code === "SQLITE_NOTADB") {
3714
+ console.warn(`Database corrupted, recreating: ${path3}`);
3715
+ removeCorruptedDb(path3);
3716
+ const db = new Database(path3);
3717
+ initializeDatabase(db);
3718
+ return db;
3719
+ }
3720
+ throw err;
3721
+ }
3702
3722
  }
3703
3723
 
3704
3724
  // src/db/tool-calls.ts
@@ -7309,20 +7329,18 @@ async function runParse(db, filterTool, options) {
7309
7329
  const errors = [];
7310
7330
  const onProgress = options?.onProgress ?? (() => {
7311
7331
  });
7312
- const totalFiles = toolPaths.filter(({ tool }) => !filterTool || tool === filterTool).reduce((sum, { paths }) => sum + paths.length, 0);
7313
- let fileIndex = 0;
7314
- let currentTool;
7315
7332
  for (const { tool, paths } of toolPaths) {
7316
7333
  if (filterTool && tool !== filterTool) continue;
7317
- currentTool = tool;
7334
+ const toolTotal = paths.length;
7335
+ let toolIndex = 0;
7318
7336
  for (const filePath of paths) {
7319
- fileIndex++;
7337
+ toolIndex++;
7320
7338
  try {
7321
7339
  const stat2 = statSync2(filePath);
7322
7340
  const entry = wm.getEntry(tool, filePath);
7323
7341
  const offset = entry?.offset ?? 0;
7324
7342
  if (offset >= stat2.size) {
7325
- onProgress({ phase: "Parsing logs", tool, current: fileIndex, total: totalFiles, records: parsedCount, toolCalls: toolCallCount });
7343
+ onProgress({ phase: "Parsing logs", tool, current: toolIndex, total: toolTotal, records: parsedCount, toolCalls: toolCallCount });
7326
7344
  continue;
7327
7345
  }
7328
7346
  if ((tool === "roocode" || tool === "kilocode") && filePath.endsWith("ui_messages.json")) {
@@ -7346,7 +7364,7 @@ async function runParse(db, filterTool, options) {
7346
7364
  mtime: stat2.mtimeMs
7347
7365
  });
7348
7366
  wm.save();
7349
- onProgress({ phase: "Parsing logs", tool, current: fileIndex, total: totalFiles, records: parsedCount, toolCalls: toolCallCount });
7367
+ onProgress({ phase: "Parsing logs", tool, current: toolIndex, total: toolTotal, records: parsedCount, toolCalls: toolCallCount });
7350
7368
  continue;
7351
7369
  }
7352
7370
  if (tool === "kiro" && filePath.endsWith(".json")) {
@@ -7369,7 +7387,7 @@ async function runParse(db, filterTool, options) {
7369
7387
  mtime: stat2.mtimeMs
7370
7388
  });
7371
7389
  wm.save();
7372
- onProgress({ phase: "Parsing logs", tool, current: fileIndex, total: totalFiles, records: parsedCount, toolCalls: toolCallCount });
7390
+ onProgress({ phase: "Parsing logs", tool, current: toolIndex, total: toolTotal, records: parsedCount, toolCalls: toolCallCount });
7373
7391
  continue;
7374
7392
  }
7375
7393
  if (tool === "kelivo" && (filePath.endsWith("chats.json") || filePath.endsWith(".zip"))) {
@@ -7392,7 +7410,7 @@ async function runParse(db, filterTool, options) {
7392
7410
  mtime: stat2.mtimeMs
7393
7411
  });
7394
7412
  wm.save();
7395
- onProgress({ phase: "Parsing logs", tool, current: fileIndex, total: totalFiles, records: parsedCount, toolCalls: toolCallCount });
7413
+ onProgress({ phase: "Parsing logs", tool, current: toolIndex, total: toolTotal, records: parsedCount, toolCalls: toolCallCount });
7396
7414
  continue;
7397
7415
  }
7398
7416
  const content = readFileSync8(filePath, "utf-8");
@@ -7467,7 +7485,7 @@ async function runParse(db, filterTool, options) {
7467
7485
  mtime: stat2.mtimeMs
7468
7486
  });
7469
7487
  wm.save();
7470
- onProgress({ phase: "Parsing logs", tool, current: fileIndex, total: totalFiles, records: parsedCount, toolCalls: toolCallCount });
7488
+ onProgress({ phase: "Parsing logs", tool, current: toolIndex, total: toolTotal, records: parsedCount, toolCalls: toolCallCount });
7471
7489
  } catch (e) {
7472
7490
  errors.push(`${filePath}: ${e instanceof Error ? e.message : e}`);
7473
7491
  }
@@ -8874,7 +8892,7 @@ async function runSync(db, options) {
8874
8892
  }
8875
8893
 
8876
8894
  // src/commands/clean.ts
8877
- import { unlinkSync as unlinkSync2, existsSync as existsSync9 } from "fs";
8895
+ import { unlinkSync as unlinkSync3, existsSync as existsSync9 } from "fs";
8878
8896
  import { join as join10 } from "path";
8879
8897
  function cleanOldData(db, days) {
8880
8898
  const cutoff = Date.now() - days * 864e5;
@@ -8899,7 +8917,7 @@ function cleanAll(db) {
8899
8917
  const watermarkPath = join10(AIUSAGE_DIR, "watermark.json");
8900
8918
  let watermarkRemoved = false;
8901
8919
  if (existsSync9(watermarkPath)) {
8902
- unlinkSync2(watermarkPath);
8920
+ unlinkSync3(watermarkPath);
8903
8921
  watermarkRemoved = true;
8904
8922
  }
8905
8923
  return {
@@ -9316,7 +9334,10 @@ function serve(options) {
9316
9334
  onSyncScheduleChanged: (ts3) => syncRuntime.setNextSyncAt(ts3)
9317
9335
  });
9318
9336
  runtimeSettings.start();
9319
- runDbWrite(() => runParse(options.db)).catch((err) => {
9337
+ console.log("[serve] parsing logs...");
9338
+ runDbWrite(() => runParse(options.db)).then((result) => {
9339
+ console.log(`[serve] parsed ${result.parsedCount} records, ${result.toolCallCount} tool calls.`);
9340
+ }).catch((err) => {
9320
9341
  console.error("[serve] initial parse failed:", err);
9321
9342
  });
9322
9343
  const apiServer = createApiServer(options.db, {
@@ -9393,7 +9414,7 @@ function serve(options) {
9393
9414
  listenOnPort(options.port);
9394
9415
  const cleanup = () => {
9395
9416
  try {
9396
- unlinkSync3(PORT_FILE);
9417
+ unlinkSync4(PORT_FILE);
9397
9418
  } catch {
9398
9419
  }
9399
9420
  };
@@ -9685,15 +9706,40 @@ function formatBar(ratio, width = 20) {
9685
9706
  var ProgressReporter = class {
9686
9707
  lastWrite = 0;
9687
9708
  lastLine = "";
9709
+ lastInfo = null;
9710
+ currentTool;
9711
+ toolRecords = /* @__PURE__ */ new Map();
9712
+ recordsAtToolStart = 0;
9688
9713
  update(info) {
9689
9714
  if (!isTTY) return;
9715
+ if (info.tool && info.tool !== this.currentTool) {
9716
+ if (this.currentTool && this.lastInfo) {
9717
+ const toolRecordCount = this.lastInfo.records - this.recordsAtToolStart;
9718
+ this.toolRecords.set(this.currentTool, toolRecordCount);
9719
+ if (toolRecordCount > 0) {
9720
+ this.writeLine(this.lastInfo);
9721
+ process.stderr.write("\n");
9722
+ } else {
9723
+ process.stderr.write("\r\x1B[K");
9724
+ }
9725
+ this.lastLine = "";
9726
+ }
9727
+ this.currentTool = info.tool;
9728
+ this.recordsAtToolStart = info.records;
9729
+ }
9730
+ this.lastInfo = info;
9690
9731
  const now = Date.now();
9691
- if (now - this.lastWrite < MIN_INTERVAL_MS) return;
9732
+ const isComplete = info.total > 0 && info.current >= info.total;
9733
+ if (!isComplete && now - this.lastWrite < MIN_INTERVAL_MS) return;
9692
9734
  this.lastWrite = now;
9735
+ this.writeLine(info);
9736
+ }
9737
+ writeLine(info) {
9693
9738
  const pct = info.total > 0 ? info.current / info.total * 100 : 0;
9694
9739
  const bar = formatBar(info.total > 0 ? info.current / info.total : 0);
9695
9740
  const toolLabel = info.tool ? ` [${info.tool}]` : "";
9696
- const line = `\r${info.phase}${toolLabel} ${bar} ${pct.toFixed(1)}% ${info.current}/${info.total} records: ${info.records} calls: ${info.toolCalls} `;
9741
+ const toolRecordCount = info.records - this.recordsAtToolStart;
9742
+ const line = `\r${info.phase}${toolLabel} ${bar} ${pct.toFixed(1)}% ${info.current}/${info.total} records: ${toolRecordCount} `;
9697
9743
  if (line !== this.lastLine) {
9698
9744
  process.stderr.write(line);
9699
9745
  this.lastLine = line;
@@ -9701,7 +9747,16 @@ var ProgressReporter = class {
9701
9747
  }
9702
9748
  done() {
9703
9749
  if (!isTTY) return;
9704
- process.stderr.write("\r\x1B[K");
9750
+ if (this.lastInfo && this.currentTool) {
9751
+ const toolRecordCount = this.lastInfo.records - this.recordsAtToolStart;
9752
+ this.toolRecords.set(this.currentTool, toolRecordCount);
9753
+ if (toolRecordCount > 0) {
9754
+ this.writeLine(this.lastInfo);
9755
+ process.stderr.write("\n");
9756
+ } else {
9757
+ process.stderr.write("\r\x1B[K");
9758
+ }
9759
+ }
9705
9760
  }
9706
9761
  };
9707
9762
  var SPINNER_FRAMES = ["\u280B", "\u2819", "\u2839", "\u2838", "\u283C", "\u2834", "\u2826", "\u2827", "\u2807", "\u280F"];
@@ -10568,7 +10623,7 @@ ${dashboardStatusLine()}
10568
10623
  import { join as join15 } from "path";
10569
10624
  var DB_PATH2 = join15(AIUSAGE_DIR, "cache.db");
10570
10625
  var program = new Command();
10571
- program.name("aiusage").version(true ? "1.5.4" : "dev").description("CLI tool for AI usage statistics");
10626
+ program.name("aiusage").version(true ? "1.5.6" : "dev").description("CLI tool for AI usage statistics");
10572
10627
  program.action(() => {
10573
10628
  const unknownCommand = program.args.find((arg) => typeof arg === "string");
10574
10629
  if (unknownCommand) {
@@ -0,0 +1,3 @@
1
+ var mt=Object.defineProperty;var wt=(e,n,t)=>n in e?mt(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t;var P=(e,n,t)=>wt(e,typeof n!="symbol"?n+"":n,t);import{o as je,t as yt}from"./scheduler.DsWd5xup.js";import{w as ye}from"./index.m3oCcA6N.js";new URL("sveltekit-internal://");function _t(e,n){return e==="/"||n==="ignore"?e:n==="never"?e.endsWith("/")?e.slice(0,-1):e:n==="always"&&!e.endsWith("/")?e+"/":e}function vt(e){return e.split("%25").map(decodeURI).join("%25")}function bt(e){for(const n in e)e[n]=decodeURIComponent(e[n]);return e}function ue({href:e}){return e.split("#")[0]}function At(e,n,t,r=!1){const a=new URL(e);Object.defineProperty(a,"searchParams",{value:new Proxy(a.searchParams,{get(o,c){if(c==="get"||c==="getAll"||c==="has")return f=>(t(f),o[c](f));n();const i=Reflect.get(o,c);return typeof i=="function"?i.bind(o):i}}),enumerable:!0,configurable:!0});const s=["href","pathname","search","toString","toJSON"];r&&s.push("hash");for(const o of s)Object.defineProperty(a,o,{get(){return n(),e[o]},enumerable:!0,configurable:!0});return a}const Et="/__data.json",kt=".html__data.json";function St(e){return e.endsWith(".html")?e.replace(/\.html$/,kt):e.replace(/\/$/,"")+Et}function Rt(...e){let n=5381;for(const t of e)if(typeof t=="string"){let r=t.length;for(;r;)n=n*33^t.charCodeAt(--r)}else if(ArrayBuffer.isView(t)){const r=new Uint8Array(t.buffer,t.byteOffset,t.byteLength);let a=r.length;for(;a;)n=n*33^r[--a]}else throw new TypeError("value must be a string or TypedArray");return(n>>>0).toString(36)}function It(e){const n=atob(e),t=new Uint8Array(n.length);for(let r=0;r<n.length;r++)t[r]=n.charCodeAt(r);return t.buffer}const He=window.fetch;window.fetch=(e,n)=>((e instanceof Request?e.method:(n==null?void 0:n.method)||"GET")!=="GET"&&M.delete(_e(e)),He(e,n));const M=new Map;function Ut(e,n){const t=_e(e,n),r=document.querySelector(t);if(r!=null&&r.textContent){let{body:a,...s}=JSON.parse(r.textContent);const o=r.getAttribute("data-ttl");return o&&M.set(t,{body:a,init:s,ttl:1e3*Number(o)}),r.getAttribute("data-b64")!==null&&(a=It(a)),Promise.resolve(new Response(a,s))}return window.fetch(e,n)}function Tt(e,n,t){if(M.size>0){const r=_e(e,t),a=M.get(r);if(a){if(performance.now()<a.ttl&&["default","force-cache","only-if-cached",void 0].includes(t==null?void 0:t.cache))return new Response(a.body,a.init);M.delete(r)}}return window.fetch(n,t)}function _e(e,n){let r=`script[data-sveltekit-fetched][data-url=${JSON.stringify(e instanceof Request?e.url:e)}]`;if(n!=null&&n.headers||n!=null&&n.body){const a=[];n.headers&&a.push([...new Headers(n.headers)].join(",")),n.body&&(typeof n.body=="string"||ArrayBuffer.isView(n.body))&&a.push(n.body),r+=`[data-hash="${Rt(...a)}"]`}return r}const Lt=/^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/;function Pt(e){const n=[];return{pattern:e==="/"?/^\/$/:new RegExp(`^${jt(e).map(r=>{const a=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(r);if(a)return n.push({name:a[1],matcher:a[2],optional:!1,rest:!0,chained:!0}),"(?:/(.*))?";const s=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(r);if(s)return n.push({name:s[1],matcher:s[2],optional:!0,rest:!1,chained:!0}),"(?:/([^/]+))?";if(!r)return;const o=r.split(/\[(.+?)\](?!\])/);return"/"+o.map((i,f)=>{if(f%2){if(i.startsWith("x+"))return de(String.fromCharCode(parseInt(i.slice(2),16)));if(i.startsWith("u+"))return de(String.fromCharCode(...i.slice(2).split("-").map(l=>parseInt(l,16))));const h=Lt.exec(i),[,u,g,p,d]=h;return n.push({name:p,matcher:d,optional:!!u,rest:!!g,chained:g?f===1&&o[0]==="":!1}),g?"(.*?)":u?"([^/]*)?":"([^/]+?)"}return de(i)}).join("")}).join("")}/?$`),params:n}}function Ot(e){return!/^\([^)]+\)$/.test(e)}function jt(e){return e.slice(1).split("/").filter(Ot)}function Nt(e,n,t){const r={},a=e.slice(1),s=a.filter(c=>c!==void 0);let o=0;for(let c=0;c<n.length;c+=1){const i=n[c];let f=a[c-o];if(i.chained&&i.rest&&o&&(f=a.slice(c-o,c+1).filter(h=>h).join("/"),o=0),f===void 0){i.rest&&(r[i.name]="");continue}if(!i.matcher||t[i.matcher](f)){r[i.name]=f;const h=n[c+1],u=a[c+1];h&&!h.rest&&h.optional&&u&&i.chained&&(o=0),!h&&!u&&Object.keys(r).length===s.length&&(o=0);continue}if(i.optional&&i.chained){o++;continue}return}if(!o)return r}function de(e){return e.normalize().replace(/[[\]]/g,"\\$&").replace(/%/g,"%25").replace(/\//g,"%2[Ff]").replace(/\?/g,"%3[Ff]").replace(/#/g,"%23").replace(/[.*+?^${}()|\\]/g,"\\$&")}function $t({nodes:e,server_loads:n,dictionary:t,matchers:r}){const a=new Set(n);return Object.entries(t).map(([c,[i,f,h]])=>{const{pattern:u,params:g}=Pt(c),p={id:c,exec:d=>{const l=u.exec(d);if(l)return Nt(l,g,r)},errors:[1,...h||[]].map(d=>e[d]),layouts:[0,...f||[]].map(o),leaf:s(i)};return p.errors.length=p.layouts.length=Math.max(p.errors.length,p.layouts.length),p});function s(c){const i=c<0;return i&&(c=~c),[i,e[c]]}function o(c){return c===void 0?c:[a.has(c),e[c]]}}function Ke(e,n=JSON.parse){try{return n(sessionStorage[e])}catch{}}function Ne(e,n,t=JSON.stringify){const r=t(n);try{sessionStorage[e]=r}catch{}}var Me;const L=((Me=globalThis.__sveltekit_11701h9)==null?void 0:Me.base)??"";var qe;const xt=((qe=globalThis.__sveltekit_11701h9)==null?void 0:qe.assets)??L,Ct="1781680110786",We="sveltekit:snapshot",Ye="sveltekit:scroll",Je="sveltekit:states",Dt="sveltekit:pageurl",C="sveltekit:history",H="sveltekit:navigation",z={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},J=location.origin;function ze(e){if(e instanceof URL)return e;let n=document.baseURI;if(!n){const t=document.getElementsByTagName("base");n=t.length?t[0].href:document.URL}return new URL(e,n)}function ve(){return{x:pageXOffset,y:pageYOffset}}function x(e,n){return e.getAttribute(`data-sveltekit-${n}`)}const $e={...z,"":z.hover};function Xe(e){let n=e.assignedSlot??e.parentNode;return(n==null?void 0:n.nodeType)===11&&(n=n.host),n}function Ze(e,n){for(;e&&e!==n;){if(e.nodeName.toUpperCase()==="A"&&e.hasAttribute("href"))return e;e=Xe(e)}}function ge(e,n,t){let r;try{r=new URL(e instanceof SVGAElement?e.href.baseVal:e.href,document.baseURI)}catch{}const a=e instanceof SVGAElement?e.target.baseVal:e.target,s=!r||!!a||oe(r,n,t)||(e.getAttribute("rel")||"").split(/\s+/).includes("external"),o=(r==null?void 0:r.origin)===J&&e.hasAttribute("download");return{url:r,external:s,target:a,download:o}}function X(e){let n=null,t=null,r=null,a=null,s=null,o=null,c=e;for(;c&&c!==document.documentElement;)r===null&&(r=x(c,"preload-code")),a===null&&(a=x(c,"preload-data")),n===null&&(n=x(c,"keepfocus")),t===null&&(t=x(c,"noscroll")),s===null&&(s=x(c,"reload")),o===null&&(o=x(c,"replacestate")),c=Xe(c);function i(f){switch(f){case"":case"true":return!0;case"off":case"false":return!1;default:return}}return{preload_code:$e[r??"off"],preload_data:$e[a??"off"],keepfocus:i(n),noscroll:i(t),reload:i(s),replace_state:i(o)}}function xe(e){const n=ye(e);let t=!0;function r(){t=!0,n.update(o=>o)}function a(o){t=!1,n.set(o)}function s(o){let c;return n.subscribe(i=>{(c===void 0||t&&i!==c)&&o(c=i)})}return{notify:r,set:a,subscribe:s}}const Qe={v:()=>{}};function Bt(){const{set:e,subscribe:n}=ye(!1);let t;async function r(){clearTimeout(t);try{const a=await fetch(`${xt}/_app/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(!a.ok)return!1;const o=(await a.json()).version!==Ct;return o&&(e(!0),Qe.v(),clearTimeout(t)),o}catch{return!1}}return{subscribe:n,check:r}}function oe(e,n,t){return e.origin!==J||!e.pathname.startsWith(n)?!0:t?!(e.pathname===n+"/"||e.protocol==="file:"&&e.pathname.replace(/\/[^/]+\.html?$/,"")===n):!1}function Ft(e){return Uint8Array.fromBase64(e).buffer}function Vt(e){return Uint8Array.from(Buffer.from(e,"base64")).buffer}function Mt(e){const n=atob(e),t=n.length,r=new Uint8Array(t);for(let a=0;a<t;a++)r[a]=n.charCodeAt(a);return r.buffer}const qt=typeof Uint8Array.fromBase64=="function";var Ge;const Gt=typeof process=="object"&&((Ge=process.versions)==null?void 0:Ge.node)!==void 0,Ht=qt?Ft:Gt?Vt:Mt,Kt=-1,Wt=-2,Yt=-3,Jt=-4,zt=-5,Xt=-6,Zt=-7;function Qt(e,n){if(typeof e=="number")return s(e,!0);if(!Array.isArray(e)||e.length===0)throw new Error("Invalid input");const t=e,r=Array(t.length);let a=null;function s(o,c=!1){if(o===Kt)return;if(o===Yt)return NaN;if(o===Jt)return 1/0;if(o===zt)return-1/0;if(o===Xt)return-0;if(c||typeof o!="number")throw new Error("Invalid input");if(o in r)return r[o];const i=t[o];if(!i||typeof i!="object")r[o]=i;else if(Array.isArray(i))if(typeof i[0]=="string"){const f=i[0],h=n&&Object.hasOwn(n,f)?n[f]:void 0;if(h){let u=i[1];if(typeof u!="number"&&(u=t.push(i[1])-1),a??(a=new Set),a.has(u))throw new Error("Invalid circular reference");return a.add(u),r[o]=h(s(u)),a.delete(u),r[o]}switch(f){case"Date":r[o]=new Date(i[1]);break;case"Set":const u=new Set;r[o]=u;for(let d=1;d<i.length;d+=1)u.add(s(i[d]));break;case"Map":const g=new Map;r[o]=g;for(let d=1;d<i.length;d+=2)g.set(s(i[d]),s(i[d+1]));break;case"RegExp":r[o]=new RegExp(i[1],i[2]);break;case"Object":{const d=i[1];if(typeof t[d]=="object"&&t[d][0]!=="BigInt")throw new Error("Invalid input");r[o]=Object(s(d));break}case"BigInt":r[o]=BigInt(i[1]);break;case"null":const p=Object.create(null);r[o]=p;for(let d=1;d<i.length;d+=2){if(i[d]==="__proto__")throw new Error("Cannot parse an object with a `__proto__` property");p[i[d]]=s(i[d+1])}break;case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Float16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"BigInt64Array":case"BigUint64Array":case"DataView":{if(t[i[1]][0]!=="ArrayBuffer")throw new Error("Invalid data");const d=globalThis[f],l=s(i[1]);r[o]=i[2]!==void 0?new d(l,i[2],i[3]):new d(l);break}case"ArrayBuffer":{const d=i[1];if(typeof d!="string")throw new Error("Invalid ArrayBuffer encoding");const l=Ht(d);r[o]=l;break}case"Temporal.Duration":case"Temporal.Instant":case"Temporal.PlainDate":case"Temporal.PlainTime":case"Temporal.PlainDateTime":case"Temporal.PlainMonthDay":case"Temporal.PlainYearMonth":case"Temporal.ZonedDateTime":{const d=f.slice(9);r[o]=Temporal[d].from(i[1]);break}case"URL":{const d=new URL(i[1]);r[o]=d;break}case"URLSearchParams":{const d=new URLSearchParams(i[1]);r[o]=d;break}default:throw new Error(`Unknown type ${f}`)}}else if(i[0]===Zt){const f=i[1];if(!Number.isInteger(f)||f<0)throw new Error("Invalid input");const h=new Array(f);r[o]=h;for(let u=2;u<i.length;u+=2){const g=i[u];if(!Number.isInteger(g)||g<0||g>=f)throw new Error("Invalid input");h[g]=s(i[u+1])}}else{const f=new Array(i.length);r[o]=f;for(let h=0;h<i.length;h+=1){const u=i[h];u!==Wt&&(f[h]=s(u))}}else{const f={};r[o]=f;for(const h of Object.keys(i)){if(h==="__proto__")throw new Error("Cannot parse an object with a `__proto__` property");const u=i[h];f[h]=s(u)}}return r[o]}return s(0)}const et=new Set(["load","prerender","csr","ssr","trailingSlash","config"]);[...et];const en=new Set([...et]);[...en];function tn(e){return e.filter(n=>n!=null)}class se{constructor(n,t){this.status=n,typeof t=="string"?this.body={message:t}:t?this.body=t:this.body={message:`Error: ${n}`}}toString(){return JSON.stringify(this.body)}}class be{constructor(n,t){this.status=n,this.location=t}}class Ae extends Error{constructor(n,t,r){super(r),this.status=n,this.text=t}}const nn="x-sveltekit-invalidated",rn="x-sveltekit-trailing-slash";function Z(e){return e instanceof se||e instanceof Ae?e.status:500}function an(e){return e instanceof Ae?e.text:"Internal Error"}let I,K,he;const on=je.toString().includes("$$")||/function \w+\(\) \{\}/.test(je.toString());on?(I={data:{},form:null,error:null,params:{},route:{id:null},state:{},status:-1,url:new URL("https://example.com")},K={current:null},he={current:!1}):(I=new class{constructor(){P(this,"data",$state.raw({}));P(this,"form",$state.raw(null));P(this,"error",$state.raw(null));P(this,"params",$state.raw({}));P(this,"route",$state.raw({id:null}));P(this,"state",$state.raw({}));P(this,"status",$state.raw(-1));P(this,"url",$state.raw(new URL("https://example.com")))}},K=new class{constructor(){P(this,"current",$state.raw(null))}},he=new class{constructor(){P(this,"current",$state.raw(!1))}},Qe.v=()=>he.current=!0);function sn(e){Object.assign(I,e)}const cn=new Set(["icon","shortcut icon","apple-touch-icon"]),$=Ke(Ye)??{},W=Ke(We)??{},j={url:xe({}),page:xe({}),navigating:ye(null),updated:Bt()};function Ee(e){$[e]=ve()}function ln(e,n){let t=e+1;for(;$[t];)delete $[t],t+=1;for(t=n+1;W[t];)delete W[t],t+=1}function B(e){return location.href=e.href,new Promise(()=>{})}async function tt(){if("serviceWorker"in navigator){const e=await navigator.serviceWorker.getRegistration(L||"/");e&&await e.update()}}function Ce(){}let ie,me,Q,O,we,A;const nt=[],ee=[];let U=null;const rt=new Set,fn=new Set,q=new Set;let y={branch:[],error:null,url:null},ke=!1,te=!1,De=!0,Y=!1,F=!1,at=!1,Se=!1,ot,R,T,ne;const G=new Set;async function Rn(e,n,t){var a,s,o,c;document.URL!==location.href&&(location.href=location.href),A=e,await((s=(a=e.hooks).init)==null?void 0:s.call(a)),ie=$t(e),O=document.documentElement,we=n,me=e.nodes[0],Q=e.nodes[1],me(),Q(),R=(o=history.state)==null?void 0:o[C],T=(c=history.state)==null?void 0:c[H],R||(R=T=Date.now(),history.replaceState({...history.state,[C]:R,[H]:T},""));const r=$[R];r&&(history.scrollRestoration="manual",scrollTo(r.x,r.y)),t?await yn(we,t):mn(location.href,{replaceState:!0}),wn()}function un(){nt.length=0,Se=!1}function st(e){ee.some(n=>n==null?void 0:n.snapshot)&&(W[e]=ee.map(n=>{var t;return(t=n==null?void 0:n.snapshot)==null?void 0:t.capture()}))}function it(e){var n;(n=W[e])==null||n.forEach((t,r)=>{var a,s;(s=(a=ee[r])==null?void 0:a.snapshot)==null||s.restore(t)})}function Be(){Ee(R),Ne(Ye,$),st(T),Ne(We,W)}async function Re(e,n,t,r){return V({type:"goto",url:ze(e),keepfocus:n.keepFocus,noscroll:n.noScroll,replace_state:n.replaceState,state:n.state,redirect_count:t,nav_token:r,accept:()=>{n.invalidateAll&&(Se=!0)}})}async function dn(e){if(e.id!==(U==null?void 0:U.id)){const n={};G.add(n),U={id:e.id,token:n,promise:lt({...e,preload:n}).then(t=>(G.delete(n),t.type==="loaded"&&t.state.error&&(U=null),t))}}return U.promise}async function pe(e){const n=ie.find(t=>t.exec(ft(e)));n&&await Promise.all([...n.layouts,n.leaf].map(t=>t==null?void 0:t[1]()))}function ct(e,n,t){var s;y=e.state;const r=document.querySelector("style[data-sveltekit]");r&&r.remove(),Object.assign(I,e.props.page),ot=new A.root({target:n,props:{...e.props,stores:j,components:ee},hydrate:t,sync:!1}),it(T);const a={from:null,to:{params:y.params,route:{id:((s=y.route)==null?void 0:s.id)??null},url:new URL(location.href)},willUnload:!1,type:"enter",complete:Promise.resolve()};q.forEach(o=>o(a)),te=!0}function re({url:e,params:n,branch:t,status:r,error:a,route:s,form:o}){let c="never";if(L&&(e.pathname===L||e.pathname===L+"/"))c="always";else for(const p of t)(p==null?void 0:p.slash)!==void 0&&(c=p.slash);e.pathname=_t(e.pathname,c),e.search=e.search;const i={type:"loaded",state:{url:e,params:n,branch:t,error:a,route:s},props:{constructors:tn(t).map(p=>p.node.component),page:Le(I)}};o!==void 0&&(i.props.form=o);let f={},h=!I,u=0;for(let p=0;p<Math.max(t.length,y.branch.length);p+=1){const d=t[p],l=y.branch[p];(d==null?void 0:d.data)!==(l==null?void 0:l.data)&&(h=!0),d&&(f={...f,...d.data},h&&(i.props[`data_${u}`]=f),u+=1)}return(!y.url||e.href!==y.url.href||y.error!==a||o!==void 0&&o!==I.form||h)&&(i.props.page={error:a,params:n,route:{id:(s==null?void 0:s.id)??null},state:{},status:r,url:new URL(e),form:o??null,data:h?f:I.data}),i}async function Ie({loader:e,parent:n,url:t,params:r,route:a,server_data_node:s}){var h,u,g;let o=null,c=!0;const i={dependencies:new Set,params:new Set,parent:!1,route:!1,url:!1,search_params:new Set},f=await e();if((h=f.universal)!=null&&h.load){let p=function(...l){for(const m of l){const{href:b}=new URL(m,t);i.dependencies.add(b)}};const d={route:new Proxy(a,{get:(l,m)=>(c&&(i.route=!0),l[m])}),params:new Proxy(r,{get:(l,m)=>(c&&i.params.add(m),l[m])}),data:(s==null?void 0:s.data)??null,url:At(t,()=>{c&&(i.url=!0)},l=>{c&&i.search_params.add(l)},A.hash),async fetch(l,m){let b;l instanceof Request?(b=l.url,m={body:l.method==="GET"||l.method==="HEAD"?void 0:await l.blob(),cache:l.cache,credentials:l.credentials,headers:[...l.headers].length?l.headers:void 0,integrity:l.integrity,keepalive:l.keepalive,method:l.method,mode:l.mode,redirect:l.redirect,referrer:l.referrer,referrerPolicy:l.referrerPolicy,signal:l.signal,...m}):b=l;const k=new URL(b,t);return c&&p(k.href),k.origin===t.origin&&(b=k.href.slice(t.origin.length)),te?Tt(b,k.href,m):Ut(b,m)},setHeaders:()=>{},depends:p,parent(){return c&&(i.parent=!0),n()},untrack(l){c=!1;try{return l()}finally{c=!0}}};o=await f.universal.load.call(null,d)??null}return{node:f,loader:e,server:s,universal:(u=f.universal)!=null&&u.load?{type:"data",data:o,uses:i}:null,data:o??(s==null?void 0:s.data)??null,slash:((g=f.universal)==null?void 0:g.trailingSlash)??(s==null?void 0:s.slash)}}function Fe(e,n,t,r,a,s){if(Se)return!0;if(!a)return!1;if(a.parent&&e||a.route&&n||a.url&&t)return!0;for(const o of a.search_params)if(r.has(o))return!0;for(const o of a.params)if(s[o]!==y.params[o])return!0;for(const o of a.dependencies)if(nt.some(c=>c(new URL(o))))return!0;return!1}function Ue(e,n){return(e==null?void 0:e.type)==="data"?e:(e==null?void 0:e.type)==="skip"?n??null:null}function hn(e,n){if(!e)return new Set(n.searchParams.keys());const t=new Set([...e.searchParams.keys(),...n.searchParams.keys()]);for(const r of t){const a=e.searchParams.getAll(r),s=n.searchParams.getAll(r);a.every(o=>s.includes(o))&&s.every(o=>a.includes(o))&&t.delete(r)}return t}function Ve({error:e,url:n,route:t,params:r}){return{type:"loaded",state:{error:e,url:n,route:t,params:r,branch:[]},props:{page:Le(I),constructors:[]}}}async function lt({id:e,invalidating:n,url:t,params:r,route:a,preload:s}){if((U==null?void 0:U.id)===e)return G.delete(U.token),U.promise;const{errors:o,layouts:c,leaf:i}=a,f=[...c,i];o.forEach(w=>w==null?void 0:w().catch(()=>{})),f.forEach(w=>w==null?void 0:w[1]().catch(()=>{}));let h=null;const u=y.url?e!==ae(y.url):!1,g=y.route?a.id!==y.route.id:!1,p=hn(y.url,t);let d=!1;const l=f.map((w,_)=>{var N;const E=y.branch[_],S=!!(w!=null&&w[0])&&((E==null?void 0:E.loader)!==w[1]||Fe(d,g,u,p,(N=E.server)==null?void 0:N.uses,r));return S&&(d=!0),S});if(l.some(Boolean)){try{h=await ht(t,l)}catch(w){const _=await D(w,{url:t,params:r,route:{id:e}});return G.has(s)?Ve({error:_,url:t,params:r,route:a}):ce({status:Z(w),error:_,url:t,route:a})}if(h.type==="redirect")return h}const m=h==null?void 0:h.nodes;let b=!1;const k=f.map(async(w,_)=>{var le;if(!w)return;const E=y.branch[_],S=m==null?void 0:m[_];if((!S||S.type==="skip")&&w[1]===(E==null?void 0:E.loader)&&!Fe(b,g,u,p,(le=E.universal)==null?void 0:le.uses,r))return E;if(b=!0,(S==null?void 0:S.type)==="error")throw S;return Ie({loader:w[1],url:t,params:r,route:a,parent:async()=>{var Oe;const Pe={};for(let fe=0;fe<_;fe+=1)Object.assign(Pe,(Oe=await k[fe])==null?void 0:Oe.data);return Pe},server_data_node:Ue(S===void 0&&w[0]?{type:"skip"}:S??null,w[0]?E==null?void 0:E.server:void 0)})});for(const w of k)w.catch(()=>{});const v=[];for(let w=0;w<f.length;w+=1)if(f[w])try{v.push(await k[w])}catch(_){if(_ instanceof be)return{type:"redirect",location:_.location};if(G.has(s))return Ve({error:await D(_,{params:r,url:t,route:{id:a.id}}),url:t,params:r,route:a});let E=Z(_),S;if(m!=null&&m.includes(_))E=_.status??E,S=_.error;else if(_ instanceof se)S=_.body;else{if(await j.updated.check())return await tt(),await B(t);S=await D(_,{params:r,url:t,route:{id:a.id}})}const N=await pn(w,v,o);return N?re({url:t,params:r,branch:v.slice(0,N.idx).concat(N.node),status:E,error:S,route:a}):await dt(t,{id:a.id},S,E)}else v.push(void 0);return re({url:t,params:r,branch:v,status:200,error:null,route:a,form:n?void 0:null})}async function pn(e,n,t){for(;e--;)if(t[e]){let r=e;for(;!n[r];)r-=1;try{return{idx:r+1,node:{node:await t[e](),loader:t[e],data:{},server:null,universal:null}}}catch{continue}}}async function ce({status:e,error:n,url:t,route:r}){const a={};let s=null;if(A.server_loads[0]===0)try{const c=await ht(t,[!0]);if(c.type!=="data"||c.nodes[0]&&c.nodes[0].type!=="data")throw 0;s=c.nodes[0]??null}catch{(t.origin!==J||t.pathname!==location.pathname||ke)&&await B(t)}try{const c=await Ie({loader:me,url:t,params:a,route:r,parent:()=>Promise.resolve({}),server_data_node:Ue(s)}),i={node:await Q(),loader:Q,universal:null,server:null,data:null};return re({url:t,params:a,branch:[c,i],status:e,error:n,route:null})}catch(c){if(c instanceof be)return Re(new URL(c.location,location.href),{},0);throw c}}function Te(e,n){if(!e||oe(e,L,A.hash))return;let t;try{if(t=A.hooks.reroute({url:new URL(e)})??e,typeof t=="string"){const a=new URL(e);A.hash?a.hash=t:a.pathname=t,t=a}}catch{return}const r=ft(t);for(const a of ie){const s=a.exec(r);if(s)return{id:ae(e),invalidating:n,route:a,params:bt(s),url:e}}}function ft(e){return vt(A.hash?e.hash.replace(/^#/,"").replace(/[?#].+/,""):e.pathname.slice(L.length))||"/"}function ae(e){return(A.hash?e.hash.replace(/^#/,""):e.pathname)+e.search}function ut({url:e,type:n,intent:t,delta:r}){let a=!1;const s=gt(y,t,e,n);r!==void 0&&(s.navigation.delta=r);const o={...s.navigation,cancel:()=>{a=!0,s.reject(new Error("navigation cancelled"))}};return Y||rt.forEach(c=>c(o)),a?null:s}async function V({type:e,url:n,popped:t,keepfocus:r,noscroll:a,replace_state:s,state:o={},redirect_count:c=0,nav_token:i={},accept:f=Ce,block:h=Ce}){const u=Te(n,!1),g=ut({url:n,type:e,delta:t==null?void 0:t.delta,intent:u});if(!g){h();return}const p=R,d=T;f(),Y=!0,te&&j.navigating.set(K.current=g.navigation),ne=i;let l=u&&await lt(u);if(!l){if(oe(n,L,A.hash))return await B(n);l=await dt(n,{id:null},await D(new Ae(404,"Not Found",`Not found: ${n.pathname}`),{url:n,params:{},route:{id:null}}),404)}if(n=(u==null?void 0:u.url)||n,ne!==i)return g.reject(new Error("navigation aborted")),!1;if(l.type==="redirect")if(c>=20)l=await ce({status:500,error:await D(new Error("Redirect loop"),{url:n,params:{},route:{id:null}}),url:n,route:{id:null}});else return Re(new URL(l.location,n).href,{},c+1,i),!1;else l.props.page.status>=400&&await j.updated.check()&&(await tt(),await B(n));if(un(),Ee(p),st(d),l.props.page.url.pathname!==n.pathname&&(n.pathname=l.props.page.url.pathname),o=t?t.state:o,!t){const v=s?0:1,w={[C]:R+=v,[H]:T+=v,[Je]:o};(s?history.replaceState:history.pushState).call(history,w,"",n),s||ln(R,T)}if(U=null,l.props.page.state=o,te){y=l.state,l.props.page&&(l.props.page.url=n);const v=(await Promise.all(Array.from(fn,w=>w(g.navigation)))).filter(w=>typeof w=="function");if(v.length>0){let w=function(){v.forEach(_=>{q.delete(_)})};v.push(w),v.forEach(_=>{q.add(_)})}ot.$set(l.props),sn(l.props.page),at=!0}else ct(l,we,!1);const{activeElement:m}=document;await yt();const b=t?t.scroll:a?ve():null;if(De){const v=n.hash&&document.getElementById(decodeURIComponent(A.hash?n.hash.split("#")[2]??"":n.hash.slice(1)));b?scrollTo(b.x,b.y):v?v.scrollIntoView():scrollTo(0,0)}const k=document.activeElement!==m&&document.activeElement!==document.body;!r&&!k&&_n(),De=!0,l.props.page&&Object.assign(I,l.props.page),Y=!1,e==="popstate"&&it(T),g.fulfil(void 0),q.forEach(v=>v(g.navigation)),j.navigating.set(K.current=null)}async function dt(e,n,t,r){return e.origin===J&&e.pathname===location.pathname&&!ke?await ce({status:r,error:t,url:e,route:n}):await B(e)}function gn(){let e;O.addEventListener("mousemove",s=>{const o=s.target;clearTimeout(e),e=setTimeout(()=>{r(o,2)},20)});function n(s){s.defaultPrevented||r(s.composedPath()[0],1)}O.addEventListener("mousedown",n),O.addEventListener("touchstart",n,{passive:!0});const t=new IntersectionObserver(s=>{for(const o of s)o.isIntersecting&&(pe(new URL(o.target.href)),t.unobserve(o.target))},{threshold:0});function r(s,o){const c=Ze(s,O);if(!c)return;const{url:i,external:f,download:h}=ge(c,L,A.hash);if(f||h)return;const u=X(c),g=i&&ae(y.url)===ae(i);if(!u.reload&&!g)if(o<=u.preload_data){const p=Te(i,!1);p&&dn(p)}else o<=u.preload_code&&pe(i)}function a(){t.disconnect();for(const s of O.querySelectorAll("a")){const{url:o,external:c,download:i}=ge(s,L,A.hash);if(c||i)continue;const f=X(s);f.reload||(f.preload_code===z.viewport&&t.observe(s),f.preload_code===z.eager&&pe(o))}}q.add(a),a()}function D(e,n){if(e instanceof se)return e.body;const t=Z(e),r=an(e);return A.hooks.handleError({error:e,event:n,status:t,message:r})??{message:r}}function mn(e,n={}){return e=new URL(ze(e)),e.origin!==J?Promise.reject(new Error("goto: invalid URL")):Re(e,n,0)}function wn(){var n;history.scrollRestoration="manual",addEventListener("beforeunload",t=>{let r=!1;if(Be(),!Y){const a=gt(y,void 0,null,"leave"),s={...a.navigation,cancel:()=>{r=!0,a.reject(new Error("navigation cancelled"))}};rt.forEach(o=>o(s))}r?(t.preventDefault(),t.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&Be()}),(n=navigator.connection)!=null&&n.saveData||gn(),O.addEventListener("click",async t=>{if(t.button||t.which!==1||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.defaultPrevented)return;const r=Ze(t.composedPath()[0],O);if(!r)return;const{url:a,external:s,target:o,download:c}=ge(r,L,A.hash);if(!a)return;if(o==="_parent"||o==="_top"){if(window.parent!==window)return}else if(o&&o!=="_self")return;const i=X(r);if(!(r instanceof SVGAElement)&&a.protocol!==location.protocol&&!(a.protocol==="https:"||a.protocol==="http:")||c)return;const[h,u]=(A.hash?a.hash.replace(/^#/,""):a.href).split("#"),g=h===ue(location);if(s||i.reload&&(!g||!u)){ut({url:a,type:"link"})?Y=!0:t.preventDefault();return}if(u!==void 0&&g){const[,p]=y.url.href.split("#");if(p===u){if(t.preventDefault(),u===""||u==="top"&&r.ownerDocument.getElementById("top")===null)window.scrollTo({top:0});else{const d=r.ownerDocument.getElementById(decodeURIComponent(u));d&&(d.scrollIntoView(),d.focus())}return}if(F=!0,Ee(R),e(a),!i.replace_state)return;F=!1}t.preventDefault(),await new Promise(p=>{requestAnimationFrame(()=>{setTimeout(p,0)}),setTimeout(p,100)}),V({type:"link",url:a,keepfocus:i.keepfocus,noscroll:i.noscroll,replace_state:i.replace_state??a.href===location.href})}),O.addEventListener("submit",t=>{if(t.defaultPrevented)return;const r=HTMLFormElement.prototype.cloneNode.call(t.target),a=t.submitter;if(((a==null?void 0:a.formTarget)||r.target)==="_blank"||((a==null?void 0:a.formMethod)||r.method)!=="get")return;const c=new URL((a==null?void 0:a.hasAttribute("formaction"))&&(a==null?void 0:a.formAction)||r.action);if(oe(c,L,!1))return;const i=t.target,f=X(i);if(f.reload)return;t.preventDefault(),t.stopPropagation();const h=new FormData(i),u=a==null?void 0:a.getAttribute("name");u&&h.append(u,(a==null?void 0:a.getAttribute("value"))??""),c.search=new URLSearchParams(h).toString(),V({type:"form",url:c,keepfocus:f.keepfocus,noscroll:f.noscroll,replace_state:f.replace_state??c.href===location.href})}),addEventListener("popstate",async t=>{var r;if((r=t.state)!=null&&r[C]){const a=t.state[C];if(ne={},a===R)return;const s=$[a],o=t.state[Je]??{},c=new URL(t.state[Dt]??location.href),i=t.state[H],f=y.url?ue(location)===ue(y.url):!1;if(i===T&&(at||f)){o!==I.state&&(I.state=o),e(c),$[R]=ve(),s&&scrollTo(s.x,s.y),R=a;return}const u=a-R;await V({type:"popstate",url:c,popped:{state:o,scroll:s,delta:u},accept:()=>{R=a,T=i},block:()=>{history.go(-u)},nav_token:ne})}else if(!F){const a=new URL(location.href);e(a)}}),addEventListener("hashchange",()=>{F?(F=!1,history.replaceState({...history.state,[C]:++R,[H]:T},"",location.href)):A.hash&&y.url.hash===location.hash&&V({type:"goto",url:y.url})});for(const t of document.querySelectorAll("link"))cn.has(t.rel)&&(t.href=t.href);addEventListener("pageshow",t=>{t.persisted&&j.navigating.set(K.current=null)});function e(t){y.url=I.url=t,j.page.set(Le(I)),j.page.notify()}}async function yn(e,{status:n=200,error:t,node_ids:r,params:a,route:s,data:o,form:c}){ke=!0;const i=new URL(location.href);({params:a={},route:s={id:null}}=Te(i,!1)||{});let f,h=!0;try{const u=r.map(async(d,l)=>{const m=o[l];return m!=null&&m.uses&&(m.uses=pt(m.uses)),Ie({loader:A.nodes[d],url:i,params:a,route:s,parent:async()=>{const b={};for(let k=0;k<l;k+=1)Object.assign(b,(await u[k]).data);return b},server_data_node:Ue(m)})}),g=await Promise.all(u),p=ie.find(({id:d})=>d===s.id);if(p){const d=p.layouts;for(let l=0;l<d.length;l++)d[l]||g.splice(l,0,void 0)}f=re({url:i,params:a,branch:g,status:n,error:t,form:c,route:p??null})}catch(u){if(u instanceof be){await B(new URL(u.location,location.href));return}f=await ce({status:Z(u),error:await D(u,{url:i,params:a,route:s}),url:i,route:s}),e.textContent="",h=!1}f.props.page&&(f.props.page.state={}),ct(f,e,h)}async function ht(e,n){var a;const t=new URL(e);t.pathname=St(e.pathname),e.pathname.endsWith("/")&&t.searchParams.append(rn,"1"),t.searchParams.append(nn,n.map(s=>s?"1":"0").join(""));const r=await He(t.href);if(!r.ok){let s;throw(a=r.headers.get("content-type"))!=null&&a.includes("application/json")?s=await r.json():r.status===404?s="Not Found":r.status===500&&(s="Internal Error"),new se(r.status,s)}return new Promise(async s=>{var u;const o=new Map,c=r.body.getReader(),i=new TextDecoder;function f(g){return Qt(g,{...A.decoders,Promise:p=>new Promise((d,l)=>{o.set(p,{fulfil:d,reject:l})})})}let h="";for(;;){const{done:g,value:p}=await c.read();if(g&&!h)break;for(h+=!p&&h?`
2
+ `:i.decode(p,{stream:!0});;){const d=h.indexOf(`
3
+ `);if(d===-1)break;const l=JSON.parse(h.slice(0,d));if(h=h.slice(d+1),l.type==="redirect")return s(l);if(l.type==="data")(u=l.nodes)==null||u.forEach(m=>{(m==null?void 0:m.type)==="data"&&(m.uses=pt(m.uses),m.data=f(m.data))}),s(l);else if(l.type==="chunk"){const{id:m,data:b,error:k}=l,v=o.get(m);o.delete(m),k?v.reject(f(k)):v.fulfil(f(b))}}}})}function pt(e){return{dependencies:new Set((e==null?void 0:e.dependencies)??[]),params:new Set((e==null?void 0:e.params)??[]),parent:!!(e!=null&&e.parent),route:!!(e!=null&&e.route),url:!!(e!=null&&e.url),search_params:new Set((e==null?void 0:e.search_params)??[])}}function _n(){const e=document.querySelector("[autofocus]");if(e)e.focus();else{const n=document.body,t=n.getAttribute("tabindex");n.tabIndex=-1,n.focus({preventScroll:!0,focusVisible:!1}),t!==null?n.setAttribute("tabindex",t):n.removeAttribute("tabindex");const r=getSelection();if(r&&r.type!=="None"){const a=[];for(let s=0;s<r.rangeCount;s+=1)a.push(r.getRangeAt(s));setTimeout(()=>{if(r.rangeCount===a.length){for(let s=0;s<r.rangeCount;s+=1){const o=a[s],c=r.getRangeAt(s);if(o.commonAncestorContainer!==c.commonAncestorContainer||o.startContainer!==c.startContainer||o.endContainer!==c.endContainer||o.startOffset!==c.startOffset||o.endOffset!==c.endOffset)return}r.removeAllRanges()}})}}}function gt(e,n,t,r){var i,f;let a,s;const o=new Promise((h,u)=>{a=h,s=u});return o.catch(()=>{}),{navigation:{from:{params:e.params,route:{id:((i=e.route)==null?void 0:i.id)??null},url:e.url},to:t&&{params:(n==null?void 0:n.params)??null,route:{id:((f=n==null?void 0:n.route)==null?void 0:f.id)??null},url:t},willUnload:!n,type:r,complete:o},fulfil:a,reject:s}}function Le(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}}export{Rn as a,j as s};
@@ -1 +1 @@
1
- import{s as e}from"./entry.DhxonIJY.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};
1
+ import{s as e}from"./entry.PMcg7HQL.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};
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../nodes/0.DrwtEJ21.js","../chunks/scheduler.DsWd5xup.js","../chunks/index.BfJlbjrK.js","../chunks/api.DVLAklIn.js","../chunks/stores.BPMmgslX.js","../chunks/entry.DhxonIJY.js","../chunks/index.m3oCcA6N.js","../chunks/i18n.DApJIXOT.js","../chunks/stores.BSI_cVy6.js","../assets/0.BYjLgame.css","../nodes/1.DQwsmuSX.js","../nodes/2.CJH1Fs0K.js","../assets/2.GIkI4O03.css","../nodes/3.Chtgl9hh.js","../chunks/ToolSelector.0iI1cXVj.js","../assets/ToolSelector.BewzNVhC.css","../assets/3.H3-dDI9U.css","../nodes/4.BIau4H47.js","../assets/4.BOWlKC54.css","../nodes/5.DtYG5yJy.js","../assets/5.CLn2x9cs.css","../nodes/6.B-ud4zCO.js","../assets/6.C1lxHTyi.css","../nodes/7.7Fm6yzqA.js","../assets/7.CahA9iix.css","../nodes/8.Chp3dlzK.js","../assets/8.9jvt5Dym.css","../nodes/9.PMJrdCxq.js","../assets/9.DsmA__AV.css","../nodes/10.CnTuhaua.js","../assets/10.DpWloLoX.css","../nodes/11.B1soyRkK.js","../assets/11.4MyEKiO6.css","../nodes/12.BCT8Dv1G.js","../assets/12.C1f-IaHK.css","../nodes/13.Cu-n0wZ9.js","../assets/13.CAQKz1hf.css","../nodes/14.u96Ucsue.js","../assets/14.Bcofmxqa.css","../nodes/15.CMhy_NGl.js","../assets/15.F0aA4smG.css"])))=>i.map(i=>d[i]);
2
- import{s as C,h as N,o as B,t as U,b as T}from"../chunks/scheduler.DsWd5xup.js";import{S as F,i as G,d as h,l as E,m as g,F as I,G as D,a as k,g as H,r as w,j as W,H as R,k as L,u as O,n as A,q as y,o as V,x as d,c as z,e as J,h as K,s as Q,f as X,t as Y}from"../chunks/index.BfJlbjrK.js";const Z="modulepreload",M=function(s,e){return new URL(s,e).href},S={},u=function(e,n,i){let o=Promise.resolve();if(n&&n.length>0){const t=document.getElementsByTagName("link"),r=document.querySelector("meta[property=csp-nonce]"),l=(r==null?void 0:r.nonce)||(r==null?void 0:r.getAttribute("nonce"));o=Promise.allSettled(n.map(_=>{if(_=M(_,i),_ in S)return;S[_]=!0;const a=_.endsWith(".css"),m=a?'[rel="stylesheet"]':"";if(!!i)for(let b=t.length-1;b>=0;b--){const P=t[b];if(P.href===_&&(!a||P.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${_}"]${m}`))return;const p=document.createElement("link");if(p.rel=a?"stylesheet":Z,a||(p.as="script"),p.crossOrigin="",p.href=_,l&&p.setAttribute("nonce",l),document.head.appendChild(p),a)return new Promise((b,P)=>{p.addEventListener("load",b),p.addEventListener("error",()=>P(new Error(`Unable to preload CSS for ${_}`)))})}))}function f(t){const r=new Event("vite:preloadError",{cancelable:!0});if(r.payload=t,window.dispatchEvent(r),!r.defaultPrevented)throw t}return o.then(t=>{for(const r of t||[])r.status==="rejected"&&f(r.reason);return e().catch(f)})},ae={};function $(s){let e,n,i;var o=s[1][0];function f(t,r){return{props:{data:t[3],form:t[2]}}}return o&&(e=R(o,f(s)),s[12](e)),{c(){e&&O(e.$$.fragment),n=w()},l(t){e&&y(e.$$.fragment,t),n=w()},m(t,r){e&&A(e,t,r),k(t,n,r),i=!0},p(t,r){if(r&2&&o!==(o=t[1][0])){if(e){I();const l=e;E(l.$$.fragment,1,0,()=>{L(l,1)}),D()}o?(e=R(o,f(t)),t[12](e),O(e.$$.fragment),g(e.$$.fragment,1),A(e,n.parentNode,n)):e=null}else if(o){const l={};r&8&&(l.data=t[3]),r&4&&(l.form=t[2]),e.$set(l)}},i(t){i||(e&&g(e.$$.fragment,t),i=!0)},o(t){e&&E(e.$$.fragment,t),i=!1},d(t){t&&h(n),s[12](null),e&&L(e,t)}}}function x(s){let e,n,i;var o=s[1][0];function f(t,r){return{props:{data:t[3],$$slots:{default:[ee]},$$scope:{ctx:t}}}}return o&&(e=R(o,f(s)),s[11](e)),{c(){e&&O(e.$$.fragment),n=w()},l(t){e&&y(e.$$.fragment,t),n=w()},m(t,r){e&&A(e,t,r),k(t,n,r),i=!0},p(t,r){if(r&2&&o!==(o=t[1][0])){if(e){I();const l=e;E(l.$$.fragment,1,0,()=>{L(l,1)}),D()}o?(e=R(o,f(t)),t[11](e),O(e.$$.fragment),g(e.$$.fragment,1),A(e,n.parentNode,n)):e=null}else if(o){const l={};r&8&&(l.data=t[3]),r&8215&&(l.$$scope={dirty:r,ctx:t}),e.$set(l)}},i(t){i||(e&&g(e.$$.fragment,t),i=!0)},o(t){e&&E(e.$$.fragment,t),i=!1},d(t){t&&h(n),s[11](null),e&&L(e,t)}}}function ee(s){let e,n,i;var o=s[1][1];function f(t,r){return{props:{data:t[4],form:t[2]}}}return o&&(e=R(o,f(s)),s[10](e)),{c(){e&&O(e.$$.fragment),n=w()},l(t){e&&y(e.$$.fragment,t),n=w()},m(t,r){e&&A(e,t,r),k(t,n,r),i=!0},p(t,r){if(r&2&&o!==(o=t[1][1])){if(e){I();const l=e;E(l.$$.fragment,1,0,()=>{L(l,1)}),D()}o?(e=R(o,f(t)),t[10](e),O(e.$$.fragment),g(e.$$.fragment,1),A(e,n.parentNode,n)):e=null}else if(o){const l={};r&16&&(l.data=t[4]),r&4&&(l.form=t[2]),e.$set(l)}},i(t){i||(e&&g(e.$$.fragment,t),i=!0)},o(t){e&&E(e.$$.fragment,t),i=!1},d(t){t&&h(n),s[10](null),e&&L(e,t)}}}function j(s){let e,n=s[6]&&q(s);return{c(){e=K("div"),n&&n.c(),this.h()},l(i){e=z(i,"DIV",{id:!0,"aria-live":!0,"aria-atomic":!0,style:!0});var o=J(e);n&&n.l(o),o.forEach(h),this.h()},h(){V(e,"id","svelte-announcer"),V(e,"aria-live","assertive"),V(e,"aria-atomic","true"),d(e,"position","absolute"),d(e,"left","0"),d(e,"top","0"),d(e,"clip","rect(0 0 0 0)"),d(e,"clip-path","inset(50%)"),d(e,"overflow","hidden"),d(e,"white-space","nowrap"),d(e,"width","1px"),d(e,"height","1px")},m(i,o){k(i,e,o),n&&n.m(e,null)},p(i,o){i[6]?n?n.p(i,o):(n=q(i),n.c(),n.m(e,null)):n&&(n.d(1),n=null)},d(i){i&&h(e),n&&n.d()}}}function q(s){let e;return{c(){e=Y(s[7])},l(n){e=X(n,s[7])},m(n,i){k(n,e,i)},p(n,i){i&128&&Q(e,n[7])},d(n){n&&h(e)}}}function te(s){let e,n,i,o,f;const t=[x,$],r=[];function l(a,m){return a[1][1]?0:1}e=l(s),n=r[e]=t[e](s);let _=s[5]&&j(s);return{c(){n.c(),i=W(),_&&_.c(),o=w()},l(a){n.l(a),i=H(a),_&&_.l(a),o=w()},m(a,m){r[e].m(a,m),k(a,i,m),_&&_.m(a,m),k(a,o,m),f=!0},p(a,[m]){let v=e;e=l(a),e===v?r[e].p(a,m):(I(),E(r[v],1,1,()=>{r[v]=null}),D(),n=r[e],n?n.p(a,m):(n=r[e]=t[e](a),n.c()),g(n,1),n.m(i.parentNode,i)),a[5]?_?_.p(a,m):(_=j(a),_.c(),_.m(o.parentNode,o)):_&&(_.d(1),_=null)},i(a){f||(g(n),f=!0)},o(a){E(n),f=!1},d(a){a&&(h(i),h(o)),r[e].d(a),_&&_.d(a)}}}function ne(s,e,n){let{stores:i}=e,{page:o}=e,{constructors:f}=e,{components:t=[]}=e,{form:r}=e,{data_0:l=null}=e,{data_1:_=null}=e;N(i.page.notify);let a=!1,m=!1,v=null;B(()=>{const c=i.page.subscribe(()=>{a&&(n(6,m=!0),U().then(()=>{n(7,v=document.title||"untitled page")}))});return n(5,a=!0),c});function p(c){T[c?"unshift":"push"](()=>{t[1]=c,n(0,t)})}function b(c){T[c?"unshift":"push"](()=>{t[0]=c,n(0,t)})}function P(c){T[c?"unshift":"push"](()=>{t[0]=c,n(0,t)})}return s.$$set=c=>{"stores"in c&&n(8,i=c.stores),"page"in c&&n(9,o=c.page),"constructors"in c&&n(1,f=c.constructors),"components"in c&&n(0,t=c.components),"form"in c&&n(2,r=c.form),"data_0"in c&&n(3,l=c.data_0),"data_1"in c&&n(4,_=c.data_1)},s.$$.update=()=>{s.$$.dirty&768&&i.page.set(o)},[t,f,r,l,_,a,m,v,i,o,p,b,P]}class le extends F{constructor(e){super(),G(this,e,ne,te,C,{stores:8,page:9,constructors:1,components:0,form:2,data_0:3,data_1:4})}}const _e=[()=>u(()=>import("../nodes/0.DrwtEJ21.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9]),import.meta.url),()=>u(()=>import("../nodes/1.DQwsmuSX.js"),__vite__mapDeps([10,1,2,4,5,6]),import.meta.url),()=>u(()=>import("../nodes/2.CJH1Fs0K.js"),__vite__mapDeps([11,1,2,3,6,7,8,12]),import.meta.url),()=>u(()=>import("../nodes/3.Chtgl9hh.js"),__vite__mapDeps([13,1,2,3,8,6,7,14,15,16]),import.meta.url),()=>u(()=>import("../nodes/4.BIau4H47.js"),__vite__mapDeps([17,1,2,3,7,6,18]),import.meta.url),()=>u(()=>import("../nodes/5.DtYG5yJy.js"),__vite__mapDeps([19,1,2,3,8,6,7,14,15,20]),import.meta.url),()=>u(()=>import("../nodes/6.B-ud4zCO.js"),__vite__mapDeps([21,1,2,3,8,6,7,14,15,22]),import.meta.url),()=>u(()=>import("../nodes/7.7Fm6yzqA.js"),__vite__mapDeps([23,1,2,3,7,6,8,24]),import.meta.url),()=>u(()=>import("../nodes/8.Chp3dlzK.js"),__vite__mapDeps([25,1,2,3,8,6,7,14,15,26]),import.meta.url),()=>u(()=>import("../nodes/9.PMJrdCxq.js"),__vite__mapDeps([27,1,2,3,7,6,28]),import.meta.url),()=>u(()=>import("../nodes/10.CnTuhaua.js"),__vite__mapDeps([29,1,2,3,8,6,7,14,15,30]),import.meta.url),()=>u(()=>import("../nodes/11.B1soyRkK.js"),__vite__mapDeps([31,1,2,3,4,5,6,8,7,32]),import.meta.url),()=>u(()=>import("../nodes/12.BCT8Dv1G.js"),__vite__mapDeps([33,1,2,3,7,6,8,34]),import.meta.url),()=>u(()=>import("../nodes/13.Cu-n0wZ9.js"),__vite__mapDeps([35,1,2,7,6,36]),import.meta.url),()=>u(()=>import("../nodes/14.u96Ucsue.js"),__vite__mapDeps([37,1,2,3,8,6,7,14,15,38]),import.meta.url),()=>u(()=>import("../nodes/15.CMhy_NGl.js"),__vite__mapDeps([39,1,2,3,8,6,7,14,15,40]),import.meta.url)],ce=[],fe={"/":[2],"/cost":[3],"/leaderboard":[4],"/models":[5],"/overview":[6],"/pricing":[7],"/projects":[8],"/quotas":[9],"/sessions":[10],"/sessions/[sessionId]":[11],"/settings":[12],"/support":[13],"/tokens":[14],"/tool-calls":[15]},re={handleError:({error:s})=>{console.error(s)},reroute:()=>{},transport:{}},ie=Object.fromEntries(Object.entries(re.transport).map(([s,e])=>[s,e.decode])),ue=!1,me=(s,e)=>ie[s](e);export{me as decode,ie as decoders,fe as dictionary,ue as hash,re as hooks,ae as matchers,_e as nodes,le as root,ce as server_loads};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../nodes/0.dH2tW-7d.js","../chunks/scheduler.DsWd5xup.js","../chunks/index.BfJlbjrK.js","../chunks/api.DVLAklIn.js","../chunks/stores.DE60qEGb.js","../chunks/entry.PMcg7HQL.js","../chunks/index.m3oCcA6N.js","../chunks/i18n.DApJIXOT.js","../chunks/stores.BSI_cVy6.js","../assets/0.BYjLgame.css","../nodes/1.B8yHhyzy.js","../nodes/2.CJH1Fs0K.js","../assets/2.GIkI4O03.css","../nodes/3.Chtgl9hh.js","../chunks/ToolSelector.0iI1cXVj.js","../assets/ToolSelector.BewzNVhC.css","../assets/3.H3-dDI9U.css","../nodes/4.BIau4H47.js","../assets/4.BOWlKC54.css","../nodes/5.DtYG5yJy.js","../assets/5.CLn2x9cs.css","../nodes/6.B-ud4zCO.js","../assets/6.C1lxHTyi.css","../nodes/7.7Fm6yzqA.js","../assets/7.CahA9iix.css","../nodes/8.Chp3dlzK.js","../assets/8.9jvt5Dym.css","../nodes/9.PMJrdCxq.js","../assets/9.DsmA__AV.css","../nodes/10.CnTuhaua.js","../assets/10.DpWloLoX.css","../nodes/11.5p54X4Ps.js","../assets/11.4MyEKiO6.css","../nodes/12.BCT8Dv1G.js","../assets/12.C1f-IaHK.css","../nodes/13.Cu-n0wZ9.js","../assets/13.CAQKz1hf.css","../nodes/14.u96Ucsue.js","../assets/14.Bcofmxqa.css","../nodes/15.CMhy_NGl.js","../assets/15.F0aA4smG.css"])))=>i.map(i=>d[i]);
2
+ import{s as C,h as N,o as B,t as U,b as T}from"../chunks/scheduler.DsWd5xup.js";import{S as F,i as G,d as h,l as E,m as g,F as I,G as D,a as k,g as H,r as w,j as W,H as R,k as L,u as O,n as A,q as y,o as V,x as d,c as z,e as J,h as K,s as Q,f as X,t as Y}from"../chunks/index.BfJlbjrK.js";const Z="modulepreload",M=function(s,e){return new URL(s,e).href},S={},u=function(e,n,i){let o=Promise.resolve();if(n&&n.length>0){const t=document.getElementsByTagName("link"),r=document.querySelector("meta[property=csp-nonce]"),l=(r==null?void 0:r.nonce)||(r==null?void 0:r.getAttribute("nonce"));o=Promise.allSettled(n.map(_=>{if(_=M(_,i),_ in S)return;S[_]=!0;const a=_.endsWith(".css"),m=a?'[rel="stylesheet"]':"";if(!!i)for(let b=t.length-1;b>=0;b--){const P=t[b];if(P.href===_&&(!a||P.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${_}"]${m}`))return;const p=document.createElement("link");if(p.rel=a?"stylesheet":Z,a||(p.as="script"),p.crossOrigin="",p.href=_,l&&p.setAttribute("nonce",l),document.head.appendChild(p),a)return new Promise((b,P)=>{p.addEventListener("load",b),p.addEventListener("error",()=>P(new Error(`Unable to preload CSS for ${_}`)))})}))}function f(t){const r=new Event("vite:preloadError",{cancelable:!0});if(r.payload=t,window.dispatchEvent(r),!r.defaultPrevented)throw t}return o.then(t=>{for(const r of t||[])r.status==="rejected"&&f(r.reason);return e().catch(f)})},ae={};function $(s){let e,n,i;var o=s[1][0];function f(t,r){return{props:{data:t[3],form:t[2]}}}return o&&(e=R(o,f(s)),s[12](e)),{c(){e&&O(e.$$.fragment),n=w()},l(t){e&&y(e.$$.fragment,t),n=w()},m(t,r){e&&A(e,t,r),k(t,n,r),i=!0},p(t,r){if(r&2&&o!==(o=t[1][0])){if(e){I();const l=e;E(l.$$.fragment,1,0,()=>{L(l,1)}),D()}o?(e=R(o,f(t)),t[12](e),O(e.$$.fragment),g(e.$$.fragment,1),A(e,n.parentNode,n)):e=null}else if(o){const l={};r&8&&(l.data=t[3]),r&4&&(l.form=t[2]),e.$set(l)}},i(t){i||(e&&g(e.$$.fragment,t),i=!0)},o(t){e&&E(e.$$.fragment,t),i=!1},d(t){t&&h(n),s[12](null),e&&L(e,t)}}}function x(s){let e,n,i;var o=s[1][0];function f(t,r){return{props:{data:t[3],$$slots:{default:[ee]},$$scope:{ctx:t}}}}return o&&(e=R(o,f(s)),s[11](e)),{c(){e&&O(e.$$.fragment),n=w()},l(t){e&&y(e.$$.fragment,t),n=w()},m(t,r){e&&A(e,t,r),k(t,n,r),i=!0},p(t,r){if(r&2&&o!==(o=t[1][0])){if(e){I();const l=e;E(l.$$.fragment,1,0,()=>{L(l,1)}),D()}o?(e=R(o,f(t)),t[11](e),O(e.$$.fragment),g(e.$$.fragment,1),A(e,n.parentNode,n)):e=null}else if(o){const l={};r&8&&(l.data=t[3]),r&8215&&(l.$$scope={dirty:r,ctx:t}),e.$set(l)}},i(t){i||(e&&g(e.$$.fragment,t),i=!0)},o(t){e&&E(e.$$.fragment,t),i=!1},d(t){t&&h(n),s[11](null),e&&L(e,t)}}}function ee(s){let e,n,i;var o=s[1][1];function f(t,r){return{props:{data:t[4],form:t[2]}}}return o&&(e=R(o,f(s)),s[10](e)),{c(){e&&O(e.$$.fragment),n=w()},l(t){e&&y(e.$$.fragment,t),n=w()},m(t,r){e&&A(e,t,r),k(t,n,r),i=!0},p(t,r){if(r&2&&o!==(o=t[1][1])){if(e){I();const l=e;E(l.$$.fragment,1,0,()=>{L(l,1)}),D()}o?(e=R(o,f(t)),t[10](e),O(e.$$.fragment),g(e.$$.fragment,1),A(e,n.parentNode,n)):e=null}else if(o){const l={};r&16&&(l.data=t[4]),r&4&&(l.form=t[2]),e.$set(l)}},i(t){i||(e&&g(e.$$.fragment,t),i=!0)},o(t){e&&E(e.$$.fragment,t),i=!1},d(t){t&&h(n),s[10](null),e&&L(e,t)}}}function j(s){let e,n=s[6]&&q(s);return{c(){e=K("div"),n&&n.c(),this.h()},l(i){e=z(i,"DIV",{id:!0,"aria-live":!0,"aria-atomic":!0,style:!0});var o=J(e);n&&n.l(o),o.forEach(h),this.h()},h(){V(e,"id","svelte-announcer"),V(e,"aria-live","assertive"),V(e,"aria-atomic","true"),d(e,"position","absolute"),d(e,"left","0"),d(e,"top","0"),d(e,"clip","rect(0 0 0 0)"),d(e,"clip-path","inset(50%)"),d(e,"overflow","hidden"),d(e,"white-space","nowrap"),d(e,"width","1px"),d(e,"height","1px")},m(i,o){k(i,e,o),n&&n.m(e,null)},p(i,o){i[6]?n?n.p(i,o):(n=q(i),n.c(),n.m(e,null)):n&&(n.d(1),n=null)},d(i){i&&h(e),n&&n.d()}}}function q(s){let e;return{c(){e=Y(s[7])},l(n){e=X(n,s[7])},m(n,i){k(n,e,i)},p(n,i){i&128&&Q(e,n[7])},d(n){n&&h(e)}}}function te(s){let e,n,i,o,f;const t=[x,$],r=[];function l(a,m){return a[1][1]?0:1}e=l(s),n=r[e]=t[e](s);let _=s[5]&&j(s);return{c(){n.c(),i=W(),_&&_.c(),o=w()},l(a){n.l(a),i=H(a),_&&_.l(a),o=w()},m(a,m){r[e].m(a,m),k(a,i,m),_&&_.m(a,m),k(a,o,m),f=!0},p(a,[m]){let v=e;e=l(a),e===v?r[e].p(a,m):(I(),E(r[v],1,1,()=>{r[v]=null}),D(),n=r[e],n?n.p(a,m):(n=r[e]=t[e](a),n.c()),g(n,1),n.m(i.parentNode,i)),a[5]?_?_.p(a,m):(_=j(a),_.c(),_.m(o.parentNode,o)):_&&(_.d(1),_=null)},i(a){f||(g(n),f=!0)},o(a){E(n),f=!1},d(a){a&&(h(i),h(o)),r[e].d(a),_&&_.d(a)}}}function ne(s,e,n){let{stores:i}=e,{page:o}=e,{constructors:f}=e,{components:t=[]}=e,{form:r}=e,{data_0:l=null}=e,{data_1:_=null}=e;N(i.page.notify);let a=!1,m=!1,v=null;B(()=>{const c=i.page.subscribe(()=>{a&&(n(6,m=!0),U().then(()=>{n(7,v=document.title||"untitled page")}))});return n(5,a=!0),c});function p(c){T[c?"unshift":"push"](()=>{t[1]=c,n(0,t)})}function b(c){T[c?"unshift":"push"](()=>{t[0]=c,n(0,t)})}function P(c){T[c?"unshift":"push"](()=>{t[0]=c,n(0,t)})}return s.$$set=c=>{"stores"in c&&n(8,i=c.stores),"page"in c&&n(9,o=c.page),"constructors"in c&&n(1,f=c.constructors),"components"in c&&n(0,t=c.components),"form"in c&&n(2,r=c.form),"data_0"in c&&n(3,l=c.data_0),"data_1"in c&&n(4,_=c.data_1)},s.$$.update=()=>{s.$$.dirty&768&&i.page.set(o)},[t,f,r,l,_,a,m,v,i,o,p,b,P]}class le extends F{constructor(e){super(),G(this,e,ne,te,C,{stores:8,page:9,constructors:1,components:0,form:2,data_0:3,data_1:4})}}const _e=[()=>u(()=>import("../nodes/0.dH2tW-7d.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9]),import.meta.url),()=>u(()=>import("../nodes/1.B8yHhyzy.js"),__vite__mapDeps([10,1,2,4,5,6]),import.meta.url),()=>u(()=>import("../nodes/2.CJH1Fs0K.js"),__vite__mapDeps([11,1,2,3,6,7,8,12]),import.meta.url),()=>u(()=>import("../nodes/3.Chtgl9hh.js"),__vite__mapDeps([13,1,2,3,8,6,7,14,15,16]),import.meta.url),()=>u(()=>import("../nodes/4.BIau4H47.js"),__vite__mapDeps([17,1,2,3,7,6,18]),import.meta.url),()=>u(()=>import("../nodes/5.DtYG5yJy.js"),__vite__mapDeps([19,1,2,3,8,6,7,14,15,20]),import.meta.url),()=>u(()=>import("../nodes/6.B-ud4zCO.js"),__vite__mapDeps([21,1,2,3,8,6,7,14,15,22]),import.meta.url),()=>u(()=>import("../nodes/7.7Fm6yzqA.js"),__vite__mapDeps([23,1,2,3,7,6,8,24]),import.meta.url),()=>u(()=>import("../nodes/8.Chp3dlzK.js"),__vite__mapDeps([25,1,2,3,8,6,7,14,15,26]),import.meta.url),()=>u(()=>import("../nodes/9.PMJrdCxq.js"),__vite__mapDeps([27,1,2,3,7,6,28]),import.meta.url),()=>u(()=>import("../nodes/10.CnTuhaua.js"),__vite__mapDeps([29,1,2,3,8,6,7,14,15,30]),import.meta.url),()=>u(()=>import("../nodes/11.5p54X4Ps.js"),__vite__mapDeps([31,1,2,3,4,5,6,8,7,32]),import.meta.url),()=>u(()=>import("../nodes/12.BCT8Dv1G.js"),__vite__mapDeps([33,1,2,3,7,6,8,34]),import.meta.url),()=>u(()=>import("../nodes/13.Cu-n0wZ9.js"),__vite__mapDeps([35,1,2,7,6,36]),import.meta.url),()=>u(()=>import("../nodes/14.u96Ucsue.js"),__vite__mapDeps([37,1,2,3,8,6,7,14,15,38]),import.meta.url),()=>u(()=>import("../nodes/15.CMhy_NGl.js"),__vite__mapDeps([39,1,2,3,8,6,7,14,15,40]),import.meta.url)],ce=[],fe={"/":[2],"/cost":[3],"/leaderboard":[4],"/models":[5],"/overview":[6],"/pricing":[7],"/projects":[8],"/quotas":[9],"/sessions":[10],"/sessions/[sessionId]":[11],"/settings":[12],"/support":[13],"/tokens":[14],"/tool-calls":[15]},re={handleError:({error:s})=>{console.error(s)},reroute:()=>{},transport:{}},ie=Object.fromEntries(Object.entries(re.transport).map(([s,e])=>[s,e.decode])),ue=!1,me=(s,e)=>ie[s](e);export{me as decode,ie as decoders,fe as dictionary,ue as hash,re as hooks,ae as matchers,_e as nodes,le as root,ce as server_loads};
@@ -0,0 +1 @@
1
+ import{a as t}from"../chunks/entry.PMcg7HQL.js";export{t as start};
@@ -1,4 +1,4 @@
1
- import{s as x,z as ee,x as w,A as te,B as le,C as ne,D as Yt,E as I,c as ft,o as Nl,e as wl,n as lt,r as dt}from"../chunks/scheduler.DsWd5xup.js";import{S as se,i as ae,d as c,v as Mt,l as q,m as E,I as ct,a as Z,b as u,J as Me,e as v,r as Ue,K as Ae,k as j,n as R,q as J,u as F,G as Re,g as B,j as P,w as ke,o as r,c as k,h as N,s as ce,A as ht,E as gl,C as Ye,f as he,t as de,H as Xe,z as ye,F as Fe}from"../chunks/index.BfJlbjrK.js";import{e as xe,a as Gt,L as El,M as ql}from"../chunks/api.DVLAklIn.js";import{p as Ml}from"../chunks/stores.BPMmgslX.js";import{a as Et,t as Al,l as Sl}from"../chunks/i18n.DApJIXOT.js";import{w as pl}from"../chunks/index.m3oCcA6N.js";import{g as Tl,e as Kt}from"../chunks/stores.BSI_cVy6.js";const Cl=typeof window<"u"?window:typeof globalThis<"u"?globalThis:global;function oe(a,e){const s={},t={},n={$$scope:1};let l=a.length;for(;l--;){const o=a[l],i=e[l];if(i){for(const $ in o)$ in i||(t[$]=1);for(const $ in i)n[$]||(s[$]=i[$],n[$]=1);a[l]=i}else for(const $ in o)n[$]=1}for(const o in t)o in s||(s[o]=void 0);return s}function _e(a){return typeof a=="object"&&a!==null?a:{}}const vl="aiusage-theme";function qt(){return typeof window>"u"?"system":localStorage.getItem(vl)||"system"}function bl(){return typeof window>"u"?"light":window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}const At=pl(qt()),Il=pl(bl());function Zt(){At.update(a=>a==="system"?"dark":a==="dark"?"light":"system")}function Hl(){if(typeof window>"u")return;const a=window.matchMedia("(prefers-color-scheme: dark)");function e(s){const t=s==="system"?bl():s;document.documentElement.setAttribute("data-theme",t),Il.set(t)}e(qt()),At.subscribe(s=>{localStorage.setItem(vl,s),e(s)}),a.addEventListener("change",()=>{qt()==="system"&&e("system")})}function Dl({pathname:a,authEnabled:e,authenticated:s,authLoading:t}){const n=a==="/";return t?n?"public-home":"loading":!e||s?"shell":n?"public-home":"login-page"}/**
1
+ import{s as x,z as ee,x as w,A as te,B as le,C as ne,D as Yt,E as I,c as ft,o as Nl,e as wl,n as lt,r as dt}from"../chunks/scheduler.DsWd5xup.js";import{S as se,i as ae,d as c,v as Mt,l as q,m as E,I as ct,a as Z,b as u,J as Me,e as v,r as Ue,K as Ae,k as j,n as R,q as J,u as F,G as Re,g as B,j as P,w as ke,o as r,c as k,h as N,s as ce,A as ht,E as gl,C as Ye,f as he,t as de,H as Xe,z as ye,F as Fe}from"../chunks/index.BfJlbjrK.js";import{e as xe,a as Gt,L as El,M as ql}from"../chunks/api.DVLAklIn.js";import{p as Ml}from"../chunks/stores.DE60qEGb.js";import{a as Et,t as Al,l as Sl}from"../chunks/i18n.DApJIXOT.js";import{w as pl}from"../chunks/index.m3oCcA6N.js";import{g as Tl,e as Kt}from"../chunks/stores.BSI_cVy6.js";const Cl=typeof window<"u"?window:typeof globalThis<"u"?globalThis:global;function oe(a,e){const s={},t={},n={$$scope:1};let l=a.length;for(;l--;){const o=a[l],i=e[l];if(i){for(const $ in o)$ in i||(t[$]=1);for(const $ in i)n[$]||(s[$]=i[$],n[$]=1);a[l]=i}else for(const $ in o)n[$]=1}for(const o in t)o in s||(s[o]=void 0);return s}function _e(a){return typeof a=="object"&&a!==null?a:{}}const vl="aiusage-theme";function qt(){return typeof window>"u"?"system":localStorage.getItem(vl)||"system"}function bl(){return typeof window>"u"?"light":window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}const At=pl(qt()),Il=pl(bl());function Zt(){At.update(a=>a==="system"?"dark":a==="dark"?"light":"system")}function Hl(){if(typeof window>"u")return;const a=window.matchMedia("(prefers-color-scheme: dark)");function e(s){const t=s==="system"?bl():s;document.documentElement.setAttribute("data-theme",t),Il.set(t)}e(qt()),At.subscribe(s=>{localStorage.setItem(vl,s),e(s)}),a.addEventListener("change",()=>{qt()==="system"&&e("system")})}function Dl({pathname:a,authEnabled:e,authenticated:s,authLoading:t}){const n=a==="/";return t?n?"public-home":"loading":!e||s?"shell":n?"public-home":"login-page"}/**
2
2
  * @license lucide-svelte v1.0.1 - ISC
3
3
  *
4
4
  * ISC License
@@ -1 +1 @@
1
- import{s as x,n as u,c as S}from"../chunks/scheduler.DsWd5xup.js";import{S as j,i as q,d as c,s as h,a as _,b as d,c as v,e as g,f as b,g as y,h as E,t as $,j as C}from"../chunks/index.BfJlbjrK.js";import{p as H}from"../chunks/stores.BPMmgslX.js";function P(p){var f;let a,s=p[0].status+"",r,o,n,i=((f=p[0].error)==null?void 0:f.message)+"",m;return{c(){a=E("h1"),r=$(s),o=C(),n=E("p"),m=$(i)},l(e){a=v(e,"H1",{});var t=g(a);r=b(t,s),t.forEach(c),o=y(e),n=v(e,"P",{});var l=g(n);m=b(l,i),l.forEach(c)},m(e,t){_(e,a,t),d(a,r),_(e,o,t),_(e,n,t),d(n,m)},p(e,[t]){var l;t&1&&s!==(s=e[0].status+"")&&h(r,s),t&1&&i!==(i=((l=e[0].error)==null?void 0:l.message)+"")&&h(m,i)},i:u,o:u,d(e){e&&(c(a),c(o),c(n))}}}function k(p,a,s){let r;return S(p,H,o=>s(0,r=o)),[r]}class B extends j{constructor(a){super(),q(this,a,k,P,x,{})}}export{B as component};
1
+ import{s as x,n as u,c as S}from"../chunks/scheduler.DsWd5xup.js";import{S as j,i as q,d as c,s as h,a as _,b as d,c as v,e as g,f as b,g as y,h as E,t as $,j as C}from"../chunks/index.BfJlbjrK.js";import{p as H}from"../chunks/stores.DE60qEGb.js";function P(p){var f;let a,s=p[0].status+"",r,o,n,i=((f=p[0].error)==null?void 0:f.message)+"",m;return{c(){a=E("h1"),r=$(s),o=C(),n=E("p"),m=$(i)},l(e){a=v(e,"H1",{});var t=g(a);r=b(t,s),t.forEach(c),o=y(e),n=v(e,"P",{});var l=g(n);m=b(l,i),l.forEach(c)},m(e,t){_(e,a,t),d(a,r),_(e,o,t),_(e,n,t),d(n,m)},p(e,[t]){var l;t&1&&s!==(s=e[0].status+"")&&h(r,s),t&1&&i!==(i=((l=e[0].error)==null?void 0:l.message)+"")&&h(m,i)},i:u,o:u,d(e){e&&(c(a),c(o),c(n))}}}function k(p,a,s){let r;return S(p,H,o=>s(0,r=o)),[r]}class B extends j{constructor(a){super(),q(this,a,k,P,x,{})}}export{B as component};
@@ -1 +1 @@
1
- import{s as ml,n as ls,c as Zs,o as bl}from"../chunks/scheduler.DsWd5xup.js";import{S as kl,i as zl,d as n,s as I,a as W,b as s,o,p as ql,g as q,c as f,e as h,f as N,r as ys,j as E,h as v,t as S,v as rs,x as K,C as ts}from"../chunks/index.BfJlbjrK.js";import{z as El,e as Ke}from"../chunks/api.DVLAklIn.js";import{p as Tl}from"../chunks/stores.BPMmgslX.js";import{f as Ts,b as $}from"../chunks/stores.BSI_cVy6.js";import{t as gl}from"../chunks/i18n.DApJIXOT.js";function xs(a,e,t){const l=a.slice();l[16]=e[t],l[19]=t;const i=l[16].inputTokens+l[16].outputTokens+(l[16].cacheReadTokens||0)+(l[16].cacheWriteTokens||0)+(l[16].thinkingTokens||0);return l[17]=i,l}function el(a,e,t){const l=a.slice();return l[20]=e[t],l}function Pl(a,e,t){const l=a.slice();return l[6]=e[t],l}function Nl(a,e,t){const l=a.slice();return l[6]=e[t],l}function Sl(a,e,t){const l=a.slice();return l[6]=e[t],l}function Al(a){const e=a.slice(),t=e[0].session;e[13]=t;const l=e[0].records;e[14]=l;const i=e[13].inputTokens+e[13].outputTokens+(e[13].cacheReadTokens||0)+(e[13].cacheWriteTokens||0)+(e[13].thinkingTokens||0);return e[15]=i,e}function sl(a){let e,t,l,i,c=a[13].tool+"",r,_,p,u=a[13].model+"",k,P,b,m=pl(a[13].firstTs)+"",C,w,T,d,g,D=a[3]("sessions.detail.meta.sessionId")+"",O,ae,M=a[13].sessionId+"",H,Ne,pe,oe=_l(a[13].duration)+"",_e,Re,ie,y,J,re,Se=a[3]("sessions.detail.meta.cost")+"",ce,Ae,fe,me=Ts(a[13].cost)+"",We,Me,ne,ve,te=a[3]("sessions.detail.meta.totalTokens")+"",be,He,de,Ie=$(a[15])+"",De,B,j,F,U=a[3]("sessions.detail.meta.apiCalls")+"",G,A,R,ke=a[13].recordCount+"",he,Fe,ue,we,Le=a[3]("sessions.detail.meta.toolCalls")+"",Q,je,Ve,ze=a[13].toolCallCount+"",Ue,Oe,X,qe,Qe,as=a[3]("sessions.detail.meta.input")+"",cs,Ps,Xe,Ge,Ns,Ye,is=$(a[13].inputTokens)+"",fs,Ss,Ee,Ze,ns=a[3]("sessions.detail.meta.output")+"",vs,As,ye,Be,Is,xe,os=$(a[13].outputTokens)+"",ds,Ds,hs,us,ps,Te,x=a[13].cwd&&ll(a),ee=a[13].cacheReadTokens&&tl(a),se=a[13].cacheWriteTokens&&al(a),le=a[13].thinkingTokens&&il(a),Ce=Ke(a[14]),Y=[];for(let z=0;z<Ce.length;z+=1)Y[z]=ul(xs(a,Ce,z));let Z=null;return Ce.length||(Z=nl(a)),{c(){e=v("div"),t=v("div"),l=v("div"),i=v("span"),r=S(c),_=E(),p=v("span"),k=S(u),P=E(),b=v("div"),C=S(m),w=E(),x&&x.c(),T=E(),d=v("div"),g=v("span"),O=S(D),ae=S(": "),H=S(M),Ne=E(),pe=v("span"),_e=S(oe),Re=E(),ie=v("div"),y=v("div"),J=v("div"),re=v("span"),ce=S(Se),Ae=E(),fe=v("span"),We=S(me),Me=E(),ne=v("div"),ve=v("span"),be=S(te),He=E(),de=v("span"),De=S(Ie),B=E(),j=v("div"),F=v("span"),G=S(U),A=E(),R=v("span"),he=S(ke),Fe=E(),ue=v("div"),we=v("span"),Q=S(Le),je=E(),Ve=v("span"),Ue=S(ze),Oe=E(),X=v("div"),qe=v("div"),Qe=v("span"),cs=S(as),Ps=E(),Xe=v("span"),Ge=v("span"),Ns=E(),Ye=v("span"),fs=S(is),Ss=E(),Ee=v("div"),Ze=v("span"),vs=S(ns),As=E(),ye=v("span"),Be=v("span"),Is=E(),xe=v("span"),ds=S(os),Ds=E(),ee&&ee.c(),hs=E(),se&&se.c(),us=E(),le&&le.c(),ps=E(),Te=v("div");for(let z=0;z<Y.length;z+=1)Y[z].c();Z&&Z.c(),this.h()},l(z){e=f(z,"DIV",{class:!0});var V=h(e);t=f(V,"DIV",{class:!0});var L=h(t);l=f(L,"DIV",{class:!0});var Je=h(l);i=f(Je,"SPAN",{class:!0});var Cs=h(i);r=N(Cs,c),Cs.forEach(n),_=q(Je),p=f(Je,"SPAN",{class:!0});var Rs=h(p);k=N(Rs,u),Rs.forEach(n),Je.forEach(n),P=q(L),b=f(L,"DIV",{class:!0});var Ws=h(b);C=N(Ws,m),Ws.forEach(n),w=q(L),x&&x.l(L),T=q(L),d=f(L,"DIV",{class:!0});var _s=h(d);g=f(_s,"SPAN",{class:!0});var ms=h(g);O=N(ms,D),ae=N(ms,": "),H=N(ms,M),ms.forEach(n),Ne=q(_s),pe=f(_s,"SPAN",{class:!0});var Ms=h(pe);_e=N(Ms,oe),Ms.forEach(n),_s.forEach(n),L.forEach(n),Re=q(V),ie=f(V,"DIV",{class:!0});var bs=h(ie);y=f(bs,"DIV",{class:!0});var $e=h(y);J=f($e,"DIV",{class:!0});var ks=h(J);re=f(ks,"SPAN",{class:!0});var Hs=h(re);ce=N(Hs,Se),Hs.forEach(n),Ae=q(ks),fe=f(ks,"SPAN",{class:!0});var Ls=h(fe);We=N(Ls,me),Ls.forEach(n),ks.forEach(n),Me=q($e),ne=f($e,"DIV",{class:!0});var zs=h(ne);ve=f(zs,"SPAN",{class:!0});var js=h(ve);be=N(js,te),js.forEach(n),He=q(zs),de=f(zs,"SPAN",{class:!0});var $s=h(de);De=N($s,Ie),$s.forEach(n),zs.forEach(n),B=q($e),j=f($e,"DIV",{class:!0});var qs=h(j);F=f(qs,"SPAN",{class:!0});var Fs=h(F);G=N(Fs,U),Fs.forEach(n),A=q(qs),R=f(qs,"SPAN",{class:!0});var Us=h(R);he=N(Us,ke),Us.forEach(n),qs.forEach(n),Fe=q($e),ue=f($e,"DIV",{class:!0});var Es=h(ue);we=f(Es,"SPAN",{class:!0});var Gs=h(we);Q=N(Gs,Le),Gs.forEach(n),je=q(Es),Ve=f(Es,"SPAN",{class:!0});var Bs=h(Ve);Ue=N(Bs,ze),Bs.forEach(n),Es.forEach(n),$e.forEach(n),Oe=q(bs),X=f(bs,"DIV",{class:!0});var ge=h(X);qe=f(ge,"DIV",{class:!0});var es=h(qe);Qe=f(es,"SPAN",{class:!0});var Js=h(Qe);cs=N(Js,as),Js.forEach(n),Ps=q(es),Xe=f(es,"SPAN",{class:!0});var Ks=h(Xe);Ge=f(Ks,"SPAN",{class:!0,style:!0}),h(Ge).forEach(n),Ks.forEach(n),Ns=q(es),Ye=f(es,"SPAN",{class:!0});var Os=h(Ye);fs=N(Os,is),Os.forEach(n),es.forEach(n),Ss=q(ge),Ee=f(ge,"DIV",{class:!0});var ss=h(Ee);Ze=f(ss,"SPAN",{class:!0});var Qs=h(Ze);vs=N(Qs,ns),Qs.forEach(n),As=q(ss),ye=f(ss,"SPAN",{class:!0});var Xs=h(ye);Be=f(Xs,"SPAN",{class:!0,style:!0}),h(Be).forEach(n),Xs.forEach(n),Is=q(ss),xe=f(ss,"SPAN",{class:!0});var Ys=h(xe);ds=N(Ys,os),Ys.forEach(n),ss.forEach(n),Ds=q(ge),ee&&ee.l(ge),hs=q(ge),se&&se.l(ge),us=q(ge),le&&le.l(ge),ge.forEach(n),bs.forEach(n),V.forEach(n),ps=q(z),Te=f(z,"DIV",{class:!0});var ws=h(Te);for(let Vs=0;Vs<Y.length;Vs+=1)Y[Vs].l(ws);Z&&Z.l(ws),ws.forEach(n),this.h()},h(){o(i,"class","id-tool svelte-qlezb4"),o(p,"class","id-model mono svelte-qlezb4"),o(l,"class","id-row svelte-qlezb4"),o(b,"class","id-time mono svelte-qlezb4"),o(g,"class","id-session mono svelte-qlezb4"),o(pe,"class","id-duration mono svelte-qlezb4"),o(d,"class","id-footer svelte-qlezb4"),o(t,"class","identity card svelte-qlezb4"),o(re,"class","metric-label svelte-qlezb4"),o(fe,"class","metric-value mono accent svelte-qlezb4"),o(J,"class","metric-cell svelte-qlezb4"),o(ve,"class","metric-label svelte-qlezb4"),o(de,"class","metric-value mono svelte-qlezb4"),o(ne,"class","metric-cell svelte-qlezb4"),o(F,"class","metric-label svelte-qlezb4"),o(R,"class","metric-value mono svelte-qlezb4"),o(j,"class","metric-cell svelte-qlezb4"),o(we,"class","metric-label svelte-qlezb4"),o(Ve,"class","metric-value mono svelte-qlezb4"),o(ue,"class","metric-cell svelte-qlezb4"),o(y,"class","metrics-grid svelte-qlezb4"),o(Qe,"class","tb-label svelte-qlezb4"),o(Ge,"class","tb-fill tb-input svelte-qlezb4"),K(Ge,"width",Pe(a[13].inputTokens,a[15])+"%"),o(Xe,"class","tb-bar svelte-qlezb4"),o(Ye,"class","tb-value mono svelte-qlezb4"),o(qe,"class","tb-row svelte-qlezb4"),o(Ze,"class","tb-label svelte-qlezb4"),o(Be,"class","tb-fill tb-output svelte-qlezb4"),K(Be,"width",Pe(a[13].outputTokens,a[15])+"%"),o(ye,"class","tb-bar svelte-qlezb4"),o(xe,"class","tb-value mono svelte-qlezb4"),o(Ee,"class","tb-row svelte-qlezb4"),o(X,"class","token-breakdown svelte-qlezb4"),o(ie,"class","metrics card svelte-qlezb4"),o(e,"class","detail-header svelte-qlezb4"),o(Te,"class","timeline svelte-qlezb4")},m(z,V){W(z,e,V),s(e,t),s(t,l),s(l,i),s(i,r),s(l,_),s(l,p),s(p,k),s(t,P),s(t,b),s(b,C),s(t,w),x&&x.m(t,null),s(t,T),s(t,d),s(d,g),s(g,O),s(g,ae),s(g,H),s(d,Ne),s(d,pe),s(pe,_e),s(e,Re),s(e,ie),s(ie,y),s(y,J),s(J,re),s(re,ce),s(J,Ae),s(J,fe),s(fe,We),s(y,Me),s(y,ne),s(ne,ve),s(ve,be),s(ne,He),s(ne,de),s(de,De),s(y,B),s(y,j),s(j,F),s(F,G),s(j,A),s(j,R),s(R,he),s(y,Fe),s(y,ue),s(ue,we),s(we,Q),s(ue,je),s(ue,Ve),s(Ve,Ue),s(ie,Oe),s(ie,X),s(X,qe),s(qe,Qe),s(Qe,cs),s(qe,Ps),s(qe,Xe),s(Xe,Ge),s(qe,Ns),s(qe,Ye),s(Ye,fs),s(X,Ss),s(X,Ee),s(Ee,Ze),s(Ze,vs),s(Ee,As),s(Ee,ye),s(ye,Be),s(Ee,Is),s(Ee,xe),s(xe,ds),s(X,Ds),ee&&ee.m(X,null),s(X,hs),se&&se.m(X,null),s(X,us),le&&le.m(X,null),W(z,ps,V),W(z,Te,V);for(let L=0;L<Y.length;L+=1)Y[L]&&Y[L].m(Te,null);Z&&Z.m(Te,null)},p(z,V){if(V&1&&c!==(c=z[13].tool+"")&&I(r,c),V&1&&u!==(u=z[13].model+"")&&I(k,u),V&1&&m!==(m=pl(z[13].firstTs)+"")&&I(C,m),z[13].cwd?x?x.p(z,V):(x=ll(z),x.c(),x.m(t,T)):x&&(x.d(1),x=null),V&8&&D!==(D=z[3]("sessions.detail.meta.sessionId")+"")&&I(O,D),V&1&&M!==(M=z[13].sessionId+"")&&I(H,M),V&1&&oe!==(oe=_l(z[13].duration)+"")&&I(_e,oe),V&8&&Se!==(Se=z[3]("sessions.detail.meta.cost")+"")&&I(ce,Se),V&1&&me!==(me=Ts(z[13].cost)+"")&&I(We,me),V&8&&te!==(te=z[3]("sessions.detail.meta.totalTokens")+"")&&I(be,te),V&1&&Ie!==(Ie=$(z[15])+"")&&I(De,Ie),V&8&&U!==(U=z[3]("sessions.detail.meta.apiCalls")+"")&&I(G,U),V&1&&ke!==(ke=z[13].recordCount+"")&&I(he,ke),V&8&&Le!==(Le=z[3]("sessions.detail.meta.toolCalls")+"")&&I(Q,Le),V&1&&ze!==(ze=z[13].toolCallCount+"")&&I(Ue,ze),V&8&&as!==(as=z[3]("sessions.detail.meta.input")+"")&&I(cs,as),V&1&&K(Ge,"width",Pe(z[13].inputTokens,z[15])+"%"),V&1&&is!==(is=$(z[13].inputTokens)+"")&&I(fs,is),V&8&&ns!==(ns=z[3]("sessions.detail.meta.output")+"")&&I(vs,ns),V&1&&K(Be,"width",Pe(z[13].outputTokens,z[15])+"%"),V&1&&os!==(os=$(z[13].outputTokens)+"")&&I(ds,os),z[13].cacheReadTokens?ee?ee.p(z,V):(ee=tl(z),ee.c(),ee.m(X,hs)):ee&&(ee.d(1),ee=null),z[13].cacheWriteTokens?se?se.p(z,V):(se=al(z),se.c(),se.m(X,us)):se&&(se.d(1),se=null),z[13].thinkingTokens?le?le.p(z,V):(le=il(z),le.c(),le.m(X,null)):le&&(le.d(1),le=null),V&25){Ce=Ke(z[14]);let L;for(L=0;L<Ce.length;L+=1){const Je=xs(z,Ce,L);Y[L]?Y[L].p(Je,V):(Y[L]=ul(Je),Y[L].c(),Y[L].m(Te,null))}for(;L<Y.length;L+=1)Y[L].d(1);Y.length=Ce.length,!Ce.length&&Z?Z.p(z,V):Ce.length?Z&&(Z.d(1),Z=null):(Z=nl(z),Z.c(),Z.m(Te,null))}},d(z){z&&(n(e),n(ps),n(Te)),x&&x.d(),ee&&ee.d(),se&&se.d(),le&&le.d(),rs(Y,z),Z&&Z.d()}}}function Il(a){let e,t;return{c(){e=v("div"),t=S(a[1]),this.h()},l(l){e=f(l,"DIV",{class:!0});var i=h(e);t=N(i,a[1]),i.forEach(n),this.h()},h(){o(e,"class","state-msg error")},m(l,i){W(l,e,i),s(e,t)},p(l,i){i&2&&I(t,l[1])},d(l){l&&n(e)}}}function Dl(a){let e,t,l='<div class="ph-line ph-w40 svelte-qlezb4"></div> <div class="ph-line ph-w60 svelte-qlezb4"></div> <div class="ph-line ph-w80 svelte-qlezb4"></div> <div class="id-footer svelte-qlezb4" style="margin-top:auto; padding-top:0.5rem; border-top:1px solid var(--border-subtle);"><div class="ph-line ph-w50 svelte-qlezb4"></div> <div class="ph-line ph-w20 svelte-qlezb4"></div></div>',i,c,r,_,p,u,k,P=Ke([1,2,3,4]),b=[];for(let d=0;d<4;d+=1)b[d]=Cl(Sl(a,P,d));let m=Ke([1,2]),C=[];for(let d=0;d<2;d+=1)C[d]=Rl(Nl(a,m,d));let w=Ke([1,2,3]),T=[];for(let d=0;d<3;d+=1)T[d]=Wl(Pl(a,w,d));return{c(){e=v("div"),t=v("div"),t.innerHTML=l,i=E(),c=v("div"),r=v("div");for(let d=0;d<4;d+=1)b[d].c();_=E(),p=v("div");for(let d=0;d<2;d+=1)C[d].c();u=E(),k=v("div");for(let d=0;d<3;d+=1)T[d].c();this.h()},l(d){e=f(d,"DIV",{class:!0});var g=h(e);t=f(g,"DIV",{class:!0,"data-svelte-h":!0}),ts(t)!=="svelte-cj5h4s"&&(t.innerHTML=l),i=q(g),c=f(g,"DIV",{class:!0});var D=h(c);r=f(D,"DIV",{class:!0});var O=h(r);for(let H=0;H<4;H+=1)b[H].l(O);O.forEach(n),_=q(D),p=f(D,"DIV",{style:!0});var ae=h(p);for(let H=0;H<2;H+=1)C[H].l(ae);ae.forEach(n),D.forEach(n),g.forEach(n),u=q(d),k=f(d,"DIV",{class:!0});var M=h(k);for(let H=0;H<3;H+=1)T[H].l(M);M.forEach(n),this.h()},h(){o(t,"class","identity card svelte-qlezb4"),o(r,"class","metrics-grid svelte-qlezb4"),K(p,"padding-top","0.5rem"),K(p,"border-top","1px solid var(--border-subtle)"),K(p,"display","flex"),K(p,"flex-direction","column"),K(p,"gap","0.3rem"),o(c,"class","metrics card svelte-qlezb4"),o(e,"class","detail-header svelte-qlezb4"),o(k,"class","timeline svelte-qlezb4")},m(d,g){W(d,e,g),s(e,t),s(e,i),s(e,c),s(c,r);for(let D=0;D<4;D+=1)b[D]&&b[D].m(r,null);s(c,_),s(c,p);for(let D=0;D<2;D+=1)C[D]&&C[D].m(p,null);W(d,u,g),W(d,k,g);for(let D=0;D<3;D+=1)T[D]&&T[D].m(k,null)},p:ls,d(d){d&&(n(e),n(u),n(k)),rs(b,d),rs(C,d),rs(T,d)}}}function ll(a){let e,t=a[13].cwd+"",l,i;return{c(){e=v("div"),l=S(t),this.h()},l(c){e=f(c,"DIV",{class:!0,title:!0});var r=h(e);l=N(r,t),r.forEach(n),this.h()},h(){o(e,"class","id-path mono svelte-qlezb4"),o(e,"title",i=a[13].cwd)},m(c,r){W(c,e,r),s(e,l)},p(c,r){r&1&&t!==(t=c[13].cwd+"")&&I(l,t),r&1&&i!==(i=c[13].cwd)&&o(e,"title",i)},d(c){c&&n(e)}}}function tl(a){let e,t,l=a[3]("sessions.detail.meta.cacheRead")+"",i,c,r,_,p,u,k=$(a[13].cacheReadTokens)+"",P;return{c(){e=v("div"),t=v("span"),i=S(l),c=E(),r=v("span"),_=v("span"),p=E(),u=v("span"),P=S(k),this.h()},l(b){e=f(b,"DIV",{class:!0});var m=h(e);t=f(m,"SPAN",{class:!0});var C=h(t);i=N(C,l),C.forEach(n),c=q(m),r=f(m,"SPAN",{class:!0});var w=h(r);_=f(w,"SPAN",{class:!0,style:!0}),h(_).forEach(n),w.forEach(n),p=q(m),u=f(m,"SPAN",{class:!0});var T=h(u);P=N(T,k),T.forEach(n),m.forEach(n),this.h()},h(){o(t,"class","tb-label svelte-qlezb4"),o(_,"class","tb-fill tb-cache-read svelte-qlezb4"),K(_,"width",Pe(a[13].cacheReadTokens,a[15])+"%"),o(r,"class","tb-bar svelte-qlezb4"),o(u,"class","tb-value mono svelte-qlezb4"),o(e,"class","tb-row svelte-qlezb4")},m(b,m){W(b,e,m),s(e,t),s(t,i),s(e,c),s(e,r),s(r,_),s(e,p),s(e,u),s(u,P)},p(b,m){m&8&&l!==(l=b[3]("sessions.detail.meta.cacheRead")+"")&&I(i,l),m&1&&K(_,"width",Pe(b[13].cacheReadTokens,b[15])+"%"),m&1&&k!==(k=$(b[13].cacheReadTokens)+"")&&I(P,k)},d(b){b&&n(e)}}}function al(a){let e,t,l=a[3]("sessions.detail.meta.cacheWrite")+"",i,c,r,_,p,u,k=$(a[13].cacheWriteTokens)+"",P;return{c(){e=v("div"),t=v("span"),i=S(l),c=E(),r=v("span"),_=v("span"),p=E(),u=v("span"),P=S(k),this.h()},l(b){e=f(b,"DIV",{class:!0});var m=h(e);t=f(m,"SPAN",{class:!0});var C=h(t);i=N(C,l),C.forEach(n),c=q(m),r=f(m,"SPAN",{class:!0});var w=h(r);_=f(w,"SPAN",{class:!0,style:!0}),h(_).forEach(n),w.forEach(n),p=q(m),u=f(m,"SPAN",{class:!0});var T=h(u);P=N(T,k),T.forEach(n),m.forEach(n),this.h()},h(){o(t,"class","tb-label svelte-qlezb4"),o(_,"class","tb-fill tb-cache-write svelte-qlezb4"),K(_,"width",Pe(a[13].cacheWriteTokens,a[15])+"%"),o(r,"class","tb-bar svelte-qlezb4"),o(u,"class","tb-value mono svelte-qlezb4"),o(e,"class","tb-row svelte-qlezb4")},m(b,m){W(b,e,m),s(e,t),s(t,i),s(e,c),s(e,r),s(r,_),s(e,p),s(e,u),s(u,P)},p(b,m){m&8&&l!==(l=b[3]("sessions.detail.meta.cacheWrite")+"")&&I(i,l),m&1&&K(_,"width",Pe(b[13].cacheWriteTokens,b[15])+"%"),m&1&&k!==(k=$(b[13].cacheWriteTokens)+"")&&I(P,k)},d(b){b&&n(e)}}}function il(a){let e,t,l=a[3]("sessions.detail.meta.thinking")+"",i,c,r,_,p,u,k=$(a[13].thinkingTokens)+"",P;return{c(){e=v("div"),t=v("span"),i=S(l),c=E(),r=v("span"),_=v("span"),p=E(),u=v("span"),P=S(k),this.h()},l(b){e=f(b,"DIV",{class:!0});var m=h(e);t=f(m,"SPAN",{class:!0});var C=h(t);i=N(C,l),C.forEach(n),c=q(m),r=f(m,"SPAN",{class:!0});var w=h(r);_=f(w,"SPAN",{class:!0,style:!0}),h(_).forEach(n),w.forEach(n),p=q(m),u=f(m,"SPAN",{class:!0});var T=h(u);P=N(T,k),T.forEach(n),m.forEach(n),this.h()},h(){o(t,"class","tb-label svelte-qlezb4"),o(_,"class","tb-fill tb-thinking svelte-qlezb4"),K(_,"width",Pe(a[13].thinkingTokens,a[15])+"%"),o(r,"class","tb-bar svelte-qlezb4"),o(u,"class","tb-value mono svelte-qlezb4"),o(e,"class","tb-row svelte-qlezb4")},m(b,m){W(b,e,m),s(e,t),s(t,i),s(e,c),s(e,r),s(r,_),s(e,p),s(e,u),s(u,P)},p(b,m){m&8&&l!==(l=b[3]("sessions.detail.meta.thinking")+"")&&I(i,l),m&1&&K(_,"width",Pe(b[13].thinkingTokens,b[15])+"%"),m&1&&k!==(k=$(b[13].thinkingTokens)+"")&&I(P,k)},d(b){b&&n(e)}}}function nl(a){let e,t,l=a[3]("sessions.noData")+"",i,c,r,_=a[3]("sessions.noDataHint")+"",p,u;return{c(){e=v("div"),t=v("h2"),i=S(l),c=E(),r=v("p"),p=S(_),u=E(),this.h()},l(k){e=f(k,"DIV",{class:!0});var P=h(e);t=f(P,"H2",{});var b=h(t);i=N(b,l),b.forEach(n),c=q(P),r=f(P,"P",{});var m=h(r);p=N(m,_),m.forEach(n),u=q(P),P.forEach(n),this.h()},h(){o(e,"class","state-msg")},m(k,P){W(k,e,P),s(e,t),s(t,i),s(e,c),s(e,r),s(r,p),s(e,u)},p(k,P){P&8&&l!==(l=k[3]("sessions.noData")+"")&&I(i,l),P&8&&_!==(_=k[3]("sessions.noDataHint")+"")&&I(p,_)},d(k){k&&n(e)}}}function ol(a){let e,t,l=a[4](a[16].ts-a[14][a[19]-1].ts)+"",i;return{c(){e=v("div"),t=v("span"),i=S(l),this.h()},l(c){e=f(c,"DIV",{class:!0});var r=h(e);t=f(r,"SPAN",{class:!0});var _=h(t);i=N(_,l),_.forEach(n),r.forEach(n),this.h()},h(){o(t,"class","gap-text svelte-qlezb4"),o(e,"class","gap-divider svelte-qlezb4")},m(c,r){W(c,e,r),s(e,t),s(t,i)},p(c,r){r&1&&l!==(l=c[4](c[16].ts-c[14][c[19]-1].ts)+"")&&I(i,l)},d(c){c&&n(e)}}}function rl(a){let e,t,l,i,c=$(a[16].cacheReadTokens)+"",r,_;return{c(){e=v("span"),t=v("span"),l=E(),i=v("span"),r=S(c),this.h()},l(p){e=f(p,"SPAN",{class:!0,title:!0});var u=h(e);t=f(u,"SPAN",{class:!0}),h(t).forEach(n),l=q(u),i=f(u,"SPAN",{class:!0});var k=h(i);r=N(k,c),k.forEach(n),u.forEach(n),this.h()},h(){o(t,"class","rt-dot rt-cache-read svelte-qlezb4"),o(i,"class","rt-val mono svelte-qlezb4"),o(e,"class","rt-item svelte-qlezb4"),o(e,"title",_=a[3]("sessions.detail.meta.cacheRead"))},m(p,u){W(p,e,u),s(e,t),s(e,l),s(e,i),s(i,r)},p(p,u){u&1&&c!==(c=$(p[16].cacheReadTokens)+"")&&I(r,c),u&8&&_!==(_=p[3]("sessions.detail.meta.cacheRead"))&&o(e,"title",_)},d(p){p&&n(e)}}}function cl(a){let e,t,l,i,c=$(a[16].cacheWriteTokens)+"",r,_;return{c(){e=v("span"),t=v("span"),l=E(),i=v("span"),r=S(c),this.h()},l(p){e=f(p,"SPAN",{class:!0,title:!0});var u=h(e);t=f(u,"SPAN",{class:!0}),h(t).forEach(n),l=q(u),i=f(u,"SPAN",{class:!0});var k=h(i);r=N(k,c),k.forEach(n),u.forEach(n),this.h()},h(){o(t,"class","rt-dot rt-cache-write svelte-qlezb4"),o(i,"class","rt-val mono svelte-qlezb4"),o(e,"class","rt-item svelte-qlezb4"),o(e,"title",_=a[3]("sessions.detail.meta.cacheWrite"))},m(p,u){W(p,e,u),s(e,t),s(e,l),s(e,i),s(i,r)},p(p,u){u&1&&c!==(c=$(p[16].cacheWriteTokens)+"")&&I(r,c),u&8&&_!==(_=p[3]("sessions.detail.meta.cacheWrite"))&&o(e,"title",_)},d(p){p&&n(e)}}}function fl(a){let e,t,l,i,c=$(a[16].thinkingTokens)+"",r,_;return{c(){e=v("span"),t=v("span"),l=E(),i=v("span"),r=S(c),this.h()},l(p){e=f(p,"SPAN",{class:!0,title:!0});var u=h(e);t=f(u,"SPAN",{class:!0}),h(t).forEach(n),l=q(u),i=f(u,"SPAN",{class:!0});var k=h(i);r=N(k,c),k.forEach(n),u.forEach(n),this.h()},h(){o(t,"class","rt-dot rt-thinking svelte-qlezb4"),o(i,"class","rt-val mono svelte-qlezb4"),o(e,"class","rt-item svelte-qlezb4"),o(e,"title",_=a[3]("sessions.detail.meta.thinking"))},m(p,u){W(p,e,u),s(e,t),s(e,l),s(e,i),s(i,r)},p(p,u){u&1&&c!==(c=$(p[16].thinkingTokens)+"")&&I(r,c),u&8&&_!==(_=p[3]("sessions.detail.meta.thinking"))&&o(e,"title",_)},d(p){p&&n(e)}}}function vl(a){let e,t=Ke(a[16].toolCalls),l=[];for(let i=0;i<t.length;i+=1)l[i]=hl(el(a,t,i));return{c(){e=v("div");for(let i=0;i<l.length;i+=1)l[i].c();this.h()},l(i){e=f(i,"DIV",{class:!0});var c=h(e);for(let r=0;r<l.length;r+=1)l[r].l(c);c.forEach(n),this.h()},h(){o(e,"class","tool-calls svelte-qlezb4")},m(i,c){W(i,e,c);for(let r=0;r<l.length;r+=1)l[r]&&l[r].m(e,null)},p(i,c){if(c&1){t=Ke(i[16].toolCalls);let r;for(r=0;r<t.length;r+=1){const _=el(i,t,r);l[r]?l[r].p(_,c):(l[r]=hl(_),l[r].c(),l[r].m(e,null))}for(;r<l.length;r+=1)l[r].d(1);l.length=t.length}},d(i){i&&n(e),rs(l,i)}}}function dl(a){let e,t=gs(a[20].ts-a[16].ts)+"",l;return{c(){e=v("span"),l=S(t),this.h()},l(i){e=f(i,"SPAN",{class:!0});var c=h(e);l=N(c,t),c.forEach(n),this.h()},h(){o(e,"class","tc-offset mono muted svelte-qlezb4")},m(i,c){W(i,e,c),s(e,l)},p(i,c){c&1&&t!==(t=gs(i[20].ts-i[16].ts)+"")&&I(l,t)},d(i){i&&n(e)}}}function wl(a){let e,t="skill";return{c(){e=v("span"),e.textContent=t,this.h()},l(l){e=f(l,"SPAN",{class:!0,"data-svelte-h":!0}),ts(e)!=="svelte-slxz3u"&&(e.textContent=t),this.h()},h(){o(e,"class","badge badge-skill svelte-qlezb4")},m(l,i){W(l,e,i)},d(l){l&&n(e)}}}function Vl(a){let e,t="mcp";return{c(){e=v("span"),e.textContent=t,this.h()},l(l){e=f(l,"SPAN",{class:!0,"data-svelte-h":!0}),ts(e)!=="svelte-uwmdxw"&&(e.textContent=t),this.h()},h(){o(e,"class","badge badge-mcp svelte-qlezb4")},m(l,i){W(l,e,i)},d(l){l&&n(e)}}}function hl(a){let e,t,l,i=a[20].callIndex+1+"",c,r,_,p=a[20].displayName+"",u,k,P,b,m=a[20].ts!=null&&dl(a);function C(d,g){if(d[20].type==="mcp")return Vl;if(d[20].type==="skill")return wl}let w=C(a),T=w&&w(a);return{c(){e=v("div"),t=v("span"),l=S("#"),c=S(i),r=E(),_=v("span"),u=S(p),k=E(),m&&m.c(),P=E(),T&&T.c(),b=E(),this.h()},l(d){e=f(d,"DIV",{class:!0});var g=h(e);t=f(g,"SPAN",{class:!0});var D=h(t);l=N(D,"#"),c=N(D,i),D.forEach(n),r=q(g),_=f(g,"SPAN",{class:!0});var O=h(_);u=N(O,p),O.forEach(n),k=q(g),m&&m.l(g),P=q(g),T&&T.l(g),b=q(g),g.forEach(n),this.h()},h(){o(t,"class","tc-index mono muted svelte-qlezb4"),o(_,"class","tc-name mono svelte-qlezb4"),o(e,"class","tool-call svelte-qlezb4")},m(d,g){W(d,e,g),s(e,t),s(t,l),s(t,c),s(e,r),s(e,_),s(_,u),s(e,k),m&&m.m(e,null),s(e,P),T&&T.m(e,null),s(e,b)},p(d,g){g&1&&i!==(i=d[20].callIndex+1+"")&&I(c,i),g&1&&p!==(p=d[20].displayName+"")&&I(u,p),d[20].ts!=null?m?m.p(d,g):(m=dl(d),m.c(),m.m(e,P)):m&&(m.d(1),m=null),w!==(w=C(d))&&(T&&T.d(1),T=w&&w(d),T&&(T.c(),T.m(e,b)))},d(d){d&&n(e),m&&m.d(),T&&T.d()}}}function ul(a){let e,t,l,i,c,r,_=a[19]+1+"",p,u,k,P=gs(a[16].ts-a[13].firstTs)+"",b,m,C,w=a[16].model+"",T,d,g,D=Ts(a[16].cost)+"",O,ae,M,H,Ne,pe,oe,_e=$(a[16].inputTokens)+"",Re,ie,y,J,re,Se,ce,Ae=$(a[16].outputTokens)+"",fe,me,We,Me,ne,ve,te,be=$(a[17])+"",He,de,Ie,De,B=a[19]>0&&a[16].ts-a[14][a[19]-1].ts>1e3&&ol(a),j=a[16].cacheReadTokens&&rl(a),F=a[16].cacheWriteTokens&&cl(a),U=a[16].thinkingTokens&&fl(a),G=a[16].toolCalls&&a[16].toolCalls.length>0&&vl(a);return{c(){B&&B.c(),e=E(),t=v("div"),l=v("div"),i=v("div"),c=v("span"),r=S("#"),p=S(_),u=E(),k=v("span"),b=S(P),m=E(),C=v("span"),T=S(w),d=E(),g=v("span"),O=S(D),ae=E(),M=v("div"),H=v("span"),Ne=v("span"),pe=E(),oe=v("span"),Re=S(_e),y=E(),J=v("span"),re=v("span"),Se=E(),ce=v("span"),fe=S(Ae),We=E(),j&&j.c(),Me=E(),F&&F.c(),ne=E(),U&&U.c(),ve=E(),te=v("span"),He=S(be),Ie=E(),G&&G.c(),De=E(),this.h()},l(A){B&&B.l(A),e=q(A),t=f(A,"DIV",{class:!0});var R=h(t);l=f(R,"DIV",{class:!0});var ke=h(l);i=f(ke,"DIV",{class:!0});var he=h(i);c=f(he,"SPAN",{class:!0});var Fe=h(c);r=N(Fe,"#"),p=N(Fe,_),Fe.forEach(n),u=q(he),k=f(he,"SPAN",{class:!0});var ue=h(k);b=N(ue,P),ue.forEach(n),m=q(he),C=f(he,"SPAN",{class:!0});var we=h(C);T=N(we,w),we.forEach(n),he.forEach(n),d=q(ke),g=f(ke,"SPAN",{class:!0});var Le=h(g);O=N(Le,D),Le.forEach(n),ke.forEach(n),ae=q(R),M=f(R,"DIV",{class:!0});var Q=h(M);H=f(Q,"SPAN",{class:!0,title:!0});var je=h(H);Ne=f(je,"SPAN",{class:!0}),h(Ne).forEach(n),pe=q(je),oe=f(je,"SPAN",{class:!0});var Ve=h(oe);Re=N(Ve,_e),Ve.forEach(n),je.forEach(n),y=q(Q),J=f(Q,"SPAN",{class:!0,title:!0});var ze=h(J);re=f(ze,"SPAN",{class:!0}),h(re).forEach(n),Se=q(ze),ce=f(ze,"SPAN",{class:!0});var Ue=h(ce);fe=N(Ue,Ae),Ue.forEach(n),ze.forEach(n),We=q(Q),j&&j.l(Q),Me=q(Q),F&&F.l(Q),ne=q(Q),U&&U.l(Q),ve=q(Q),te=f(Q,"SPAN",{class:!0,title:!0});var Oe=h(te);He=N(Oe,be),Oe.forEach(n),Q.forEach(n),Ie=q(R),G&&G.l(R),De=q(R),R.forEach(n),this.h()},h(){o(c,"class","record-index mono svelte-qlezb4"),o(k,"class","record-relts mono muted svelte-qlezb4"),o(C,"class","record-model mono svelte-qlezb4"),o(i,"class","record-meta-left svelte-qlezb4"),o(g,"class","record-cost mono accent svelte-qlezb4"),o(l,"class","record-header svelte-qlezb4"),o(Ne,"class","rt-dot rt-input svelte-qlezb4"),o(oe,"class","rt-val mono svelte-qlezb4"),o(H,"class","rt-item svelte-qlezb4"),o(H,"title",ie=a[3]("sessions.detail.meta.input")),o(re,"class","rt-dot rt-output svelte-qlezb4"),o(ce,"class","rt-val mono svelte-qlezb4"),o(J,"class","rt-item svelte-qlezb4"),o(J,"title",me=a[3]("sessions.detail.meta.output")),o(te,"class","rt-total mono muted svelte-qlezb4"),o(te,"title",de=a[3]("sessions.detail.meta.totalTokens")),o(M,"class","record-tokens svelte-qlezb4"),o(t,"class","record-card card svelte-qlezb4")},m(A,R){B&&B.m(A,R),W(A,e,R),W(A,t,R),s(t,l),s(l,i),s(i,c),s(c,r),s(c,p),s(i,u),s(i,k),s(k,b),s(i,m),s(i,C),s(C,T),s(l,d),s(l,g),s(g,O),s(t,ae),s(t,M),s(M,H),s(H,Ne),s(H,pe),s(H,oe),s(oe,Re),s(M,y),s(M,J),s(J,re),s(J,Se),s(J,ce),s(ce,fe),s(M,We),j&&j.m(M,null),s(M,Me),F&&F.m(M,null),s(M,ne),U&&U.m(M,null),s(M,ve),s(M,te),s(te,He),s(t,Ie),G&&G.m(t,null),s(t,De)},p(A,R){A[19]>0&&A[16].ts-A[14][A[19]-1].ts>1e3?B?B.p(A,R):(B=ol(A),B.c(),B.m(e.parentNode,e)):B&&(B.d(1),B=null),R&1&&P!==(P=gs(A[16].ts-A[13].firstTs)+"")&&I(b,P),R&1&&w!==(w=A[16].model+"")&&I(T,w),R&1&&D!==(D=Ts(A[16].cost)+"")&&I(O,D),R&1&&_e!==(_e=$(A[16].inputTokens)+"")&&I(Re,_e),R&8&&ie!==(ie=A[3]("sessions.detail.meta.input"))&&o(H,"title",ie),R&1&&Ae!==(Ae=$(A[16].outputTokens)+"")&&I(fe,Ae),R&8&&me!==(me=A[3]("sessions.detail.meta.output"))&&o(J,"title",me),A[16].cacheReadTokens?j?j.p(A,R):(j=rl(A),j.c(),j.m(M,Me)):j&&(j.d(1),j=null),A[16].cacheWriteTokens?F?F.p(A,R):(F=cl(A),F.c(),F.m(M,ne)):F&&(F.d(1),F=null),A[16].thinkingTokens?U?U.p(A,R):(U=fl(A),U.c(),U.m(M,ve)):U&&(U.d(1),U=null),R&1&&be!==(be=$(A[17])+"")&&I(He,be),R&8&&de!==(de=A[3]("sessions.detail.meta.totalTokens"))&&o(te,"title",de),A[16].toolCalls&&A[16].toolCalls.length>0?G?G.p(A,R):(G=vl(A),G.c(),G.m(t,De)):G&&(G.d(1),G=null)},d(A){A&&(n(e),n(t)),B&&B.d(A),j&&j.d(),F&&F.d(),U&&U.d(),G&&G.d()}}}function Cl(a){let e,t='<div class="ph-line ph-w60 svelte-qlezb4" style="height:0.5rem;margin-bottom:0.25rem"></div> <div class="ph-line ph-w40 svelte-qlezb4" style="height:0.85rem"></div> ';return{c(){e=v("div"),e.innerHTML=t,this.h()},l(l){e=f(l,"DIV",{class:!0,"data-svelte-h":!0}),ts(e)!=="svelte-sj1wh2"&&(e.innerHTML=t),this.h()},h(){o(e,"class","metric-cell svelte-qlezb4")},m(l,i){W(l,e,i)},p:ls,d(l){l&&n(e)}}}function Rl(a){let e,t='<div class="ph-line ph-w60 svelte-qlezb4" style="height:0.5rem"></div> <div class="ph-line svelte-qlezb4" style="height:6px;border-radius:3px"></div> <div class="ph-line ph-w50 svelte-qlezb4" style="height:0.5rem"></div> ';return{c(){e=v("div"),e.innerHTML=t,this.h()},l(l){e=f(l,"DIV",{style:!0,"data-svelte-h":!0}),ts(e)!=="svelte-1h640di"&&(e.innerHTML=t),this.h()},h(){K(e,"display","grid"),K(e,"grid-template-columns","5.5rem 1fr 4.5rem"),K(e,"gap","0.5rem"),K(e,"align-items","center")},m(l,i){W(l,e,i)},p:ls,d(l){l&&n(e)}}}function Wl(a){let e,t='<div style="display:flex;justify-content:space-between;margin-bottom:0.375rem"><div class="ph-line ph-w40 svelte-qlezb4"></div> <div class="ph-line ph-w20 svelte-qlezb4"></div></div> <div style="display:flex;gap:0.75rem;margin-bottom:0.375rem"><div class="ph-line ph-w20 svelte-qlezb4"></div> <div class="ph-line ph-w20 svelte-qlezb4"></div></div> ';return{c(){e=v("div"),e.innerHTML=t,this.h()},l(l){e=f(l,"DIV",{class:!0,"data-svelte-h":!0}),ts(e)!=="svelte-8o0mhs"&&(e.innerHTML=t),this.h()},h(){o(e,"class","record-card card svelte-qlezb4")},m(l,i){W(l,e,i)},p:ls,d(l){l&&n(e)}}}function Ml(a){let e,t,l,i,c=a[3]("sessions.detail.back")+"",r,_,p,u=a[3]("sessions.detail.title")+"",k,P,b;document.title=e=a[3]("sessions.detail.title")+" — AIUsage";function m(d,g){if(d[2])return Dl;if(d[1])return Il;if(d[0])return sl}function C(d,g){return g===sl?Al(d):d}let w=m(a),T=w&&w(C(a,w));return{c(){t=E(),l=v("div"),i=v("a"),r=S(c),_=E(),p=v("h1"),k=S(u),P=E(),T&&T.c(),b=ys(),this.h()},l(d){ql("svelte-11yx7zf",document.head).forEach(n),t=q(d),l=f(d,"DIV",{class:!0});var D=h(l);i=f(D,"A",{class:!0,href:!0});var O=h(i);r=N(O,c),O.forEach(n),_=q(D),p=f(D,"H1",{});var ae=h(p);k=N(ae,u),ae.forEach(n),D.forEach(n),P=q(d),T&&T.l(d),b=ys(),this.h()},h(){o(i,"class","back-link svelte-qlezb4"),o(i,"href","/sessions"),o(l,"class","page-header")},m(d,g){W(d,t,g),W(d,l,g),s(l,i),s(i,r),s(l,_),s(l,p),s(p,k),W(d,P,g),T&&T.m(d,g),W(d,b,g)},p(d,[g]){g&8&&e!==(e=d[3]("sessions.detail.title")+" — AIUsage")&&(document.title=e),g&8&&c!==(c=d[3]("sessions.detail.back")+"")&&I(r,c),g&8&&u!==(u=d[3]("sessions.detail.title")+"")&&I(k,u),w===(w=m(d))&&T?T.p(C(d,w),g):(T&&T.d(1),T=w&&w(C(d,w)),T&&(T.c(),T.m(b.parentNode,b)))},i:ls,o:ls,d(d){d&&(n(t),n(l),n(P),n(b)),T&&T.d(d)}}}function pl(a){return new Date(a).toLocaleString()}function _l(a){if(!a||a<1e3)return"< 1s";const e=Math.floor(a/1e3),t=Math.floor(e/60),l=Math.floor(t/60);return l>0?`${l}h ${t%60}m ${e%60}s`:t===0?`${e}s`:`${t}m ${e%60}s`}function gs(a){if(a<=0)return"+0ms";if(a<1e3)return`+${a}ms`;const e=a/1e3;return`+${e%1===0?e.toFixed(0):e.toFixed(1)}s`}function Pe(a,e){return!e||!a?0:Math.round(a/e*1e3)/10}function Hl(a,e,t){let l,i;Zs(a,Tl,u=>t(5,l=u)),Zs(a,gl,u=>t(3,i=u));let c=null,r=null,_=!0;function p(u){return`— ${Math.round(u/1e3)}s ${i("sessions.detail.gap")} —`}return bl(async()=>{const u=l.params.sessionId,k=l.url.searchParams.get("tool")||"",P=l.url.searchParams.get("device")||"";try{t(0,c=await El(u,{tool:k,device:P}))}catch(b){t(1,r=b instanceof Error?b.message:"Failed to load session")}finally{t(2,_=!1)}}),[c,r,_,i,p]}class Bl extends kl{constructor(e){super(),zl(this,e,Hl,Ml,ml,{})}}export{Bl as component};
1
+ import{s as ml,n as ls,c as Zs,o as bl}from"../chunks/scheduler.DsWd5xup.js";import{S as kl,i as zl,d as n,s as I,a as W,b as s,o,p as ql,g as q,c as f,e as h,f as N,r as ys,j as E,h as v,t as S,v as rs,x as K,C as ts}from"../chunks/index.BfJlbjrK.js";import{z as El,e as Ke}from"../chunks/api.DVLAklIn.js";import{p as Tl}from"../chunks/stores.DE60qEGb.js";import{f as Ts,b as $}from"../chunks/stores.BSI_cVy6.js";import{t as gl}from"../chunks/i18n.DApJIXOT.js";function xs(a,e,t){const l=a.slice();l[16]=e[t],l[19]=t;const i=l[16].inputTokens+l[16].outputTokens+(l[16].cacheReadTokens||0)+(l[16].cacheWriteTokens||0)+(l[16].thinkingTokens||0);return l[17]=i,l}function el(a,e,t){const l=a.slice();return l[20]=e[t],l}function Pl(a,e,t){const l=a.slice();return l[6]=e[t],l}function Nl(a,e,t){const l=a.slice();return l[6]=e[t],l}function Sl(a,e,t){const l=a.slice();return l[6]=e[t],l}function Al(a){const e=a.slice(),t=e[0].session;e[13]=t;const l=e[0].records;e[14]=l;const i=e[13].inputTokens+e[13].outputTokens+(e[13].cacheReadTokens||0)+(e[13].cacheWriteTokens||0)+(e[13].thinkingTokens||0);return e[15]=i,e}function sl(a){let e,t,l,i,c=a[13].tool+"",r,_,p,u=a[13].model+"",k,P,b,m=pl(a[13].firstTs)+"",C,w,T,d,g,D=a[3]("sessions.detail.meta.sessionId")+"",O,ae,M=a[13].sessionId+"",H,Ne,pe,oe=_l(a[13].duration)+"",_e,Re,ie,y,J,re,Se=a[3]("sessions.detail.meta.cost")+"",ce,Ae,fe,me=Ts(a[13].cost)+"",We,Me,ne,ve,te=a[3]("sessions.detail.meta.totalTokens")+"",be,He,de,Ie=$(a[15])+"",De,B,j,F,U=a[3]("sessions.detail.meta.apiCalls")+"",G,A,R,ke=a[13].recordCount+"",he,Fe,ue,we,Le=a[3]("sessions.detail.meta.toolCalls")+"",Q,je,Ve,ze=a[13].toolCallCount+"",Ue,Oe,X,qe,Qe,as=a[3]("sessions.detail.meta.input")+"",cs,Ps,Xe,Ge,Ns,Ye,is=$(a[13].inputTokens)+"",fs,Ss,Ee,Ze,ns=a[3]("sessions.detail.meta.output")+"",vs,As,ye,Be,Is,xe,os=$(a[13].outputTokens)+"",ds,Ds,hs,us,ps,Te,x=a[13].cwd&&ll(a),ee=a[13].cacheReadTokens&&tl(a),se=a[13].cacheWriteTokens&&al(a),le=a[13].thinkingTokens&&il(a),Ce=Ke(a[14]),Y=[];for(let z=0;z<Ce.length;z+=1)Y[z]=ul(xs(a,Ce,z));let Z=null;return Ce.length||(Z=nl(a)),{c(){e=v("div"),t=v("div"),l=v("div"),i=v("span"),r=S(c),_=E(),p=v("span"),k=S(u),P=E(),b=v("div"),C=S(m),w=E(),x&&x.c(),T=E(),d=v("div"),g=v("span"),O=S(D),ae=S(": "),H=S(M),Ne=E(),pe=v("span"),_e=S(oe),Re=E(),ie=v("div"),y=v("div"),J=v("div"),re=v("span"),ce=S(Se),Ae=E(),fe=v("span"),We=S(me),Me=E(),ne=v("div"),ve=v("span"),be=S(te),He=E(),de=v("span"),De=S(Ie),B=E(),j=v("div"),F=v("span"),G=S(U),A=E(),R=v("span"),he=S(ke),Fe=E(),ue=v("div"),we=v("span"),Q=S(Le),je=E(),Ve=v("span"),Ue=S(ze),Oe=E(),X=v("div"),qe=v("div"),Qe=v("span"),cs=S(as),Ps=E(),Xe=v("span"),Ge=v("span"),Ns=E(),Ye=v("span"),fs=S(is),Ss=E(),Ee=v("div"),Ze=v("span"),vs=S(ns),As=E(),ye=v("span"),Be=v("span"),Is=E(),xe=v("span"),ds=S(os),Ds=E(),ee&&ee.c(),hs=E(),se&&se.c(),us=E(),le&&le.c(),ps=E(),Te=v("div");for(let z=0;z<Y.length;z+=1)Y[z].c();Z&&Z.c(),this.h()},l(z){e=f(z,"DIV",{class:!0});var V=h(e);t=f(V,"DIV",{class:!0});var L=h(t);l=f(L,"DIV",{class:!0});var Je=h(l);i=f(Je,"SPAN",{class:!0});var Cs=h(i);r=N(Cs,c),Cs.forEach(n),_=q(Je),p=f(Je,"SPAN",{class:!0});var Rs=h(p);k=N(Rs,u),Rs.forEach(n),Je.forEach(n),P=q(L),b=f(L,"DIV",{class:!0});var Ws=h(b);C=N(Ws,m),Ws.forEach(n),w=q(L),x&&x.l(L),T=q(L),d=f(L,"DIV",{class:!0});var _s=h(d);g=f(_s,"SPAN",{class:!0});var ms=h(g);O=N(ms,D),ae=N(ms,": "),H=N(ms,M),ms.forEach(n),Ne=q(_s),pe=f(_s,"SPAN",{class:!0});var Ms=h(pe);_e=N(Ms,oe),Ms.forEach(n),_s.forEach(n),L.forEach(n),Re=q(V),ie=f(V,"DIV",{class:!0});var bs=h(ie);y=f(bs,"DIV",{class:!0});var $e=h(y);J=f($e,"DIV",{class:!0});var ks=h(J);re=f(ks,"SPAN",{class:!0});var Hs=h(re);ce=N(Hs,Se),Hs.forEach(n),Ae=q(ks),fe=f(ks,"SPAN",{class:!0});var Ls=h(fe);We=N(Ls,me),Ls.forEach(n),ks.forEach(n),Me=q($e),ne=f($e,"DIV",{class:!0});var zs=h(ne);ve=f(zs,"SPAN",{class:!0});var js=h(ve);be=N(js,te),js.forEach(n),He=q(zs),de=f(zs,"SPAN",{class:!0});var $s=h(de);De=N($s,Ie),$s.forEach(n),zs.forEach(n),B=q($e),j=f($e,"DIV",{class:!0});var qs=h(j);F=f(qs,"SPAN",{class:!0});var Fs=h(F);G=N(Fs,U),Fs.forEach(n),A=q(qs),R=f(qs,"SPAN",{class:!0});var Us=h(R);he=N(Us,ke),Us.forEach(n),qs.forEach(n),Fe=q($e),ue=f($e,"DIV",{class:!0});var Es=h(ue);we=f(Es,"SPAN",{class:!0});var Gs=h(we);Q=N(Gs,Le),Gs.forEach(n),je=q(Es),Ve=f(Es,"SPAN",{class:!0});var Bs=h(Ve);Ue=N(Bs,ze),Bs.forEach(n),Es.forEach(n),$e.forEach(n),Oe=q(bs),X=f(bs,"DIV",{class:!0});var ge=h(X);qe=f(ge,"DIV",{class:!0});var es=h(qe);Qe=f(es,"SPAN",{class:!0});var Js=h(Qe);cs=N(Js,as),Js.forEach(n),Ps=q(es),Xe=f(es,"SPAN",{class:!0});var Ks=h(Xe);Ge=f(Ks,"SPAN",{class:!0,style:!0}),h(Ge).forEach(n),Ks.forEach(n),Ns=q(es),Ye=f(es,"SPAN",{class:!0});var Os=h(Ye);fs=N(Os,is),Os.forEach(n),es.forEach(n),Ss=q(ge),Ee=f(ge,"DIV",{class:!0});var ss=h(Ee);Ze=f(ss,"SPAN",{class:!0});var Qs=h(Ze);vs=N(Qs,ns),Qs.forEach(n),As=q(ss),ye=f(ss,"SPAN",{class:!0});var Xs=h(ye);Be=f(Xs,"SPAN",{class:!0,style:!0}),h(Be).forEach(n),Xs.forEach(n),Is=q(ss),xe=f(ss,"SPAN",{class:!0});var Ys=h(xe);ds=N(Ys,os),Ys.forEach(n),ss.forEach(n),Ds=q(ge),ee&&ee.l(ge),hs=q(ge),se&&se.l(ge),us=q(ge),le&&le.l(ge),ge.forEach(n),bs.forEach(n),V.forEach(n),ps=q(z),Te=f(z,"DIV",{class:!0});var ws=h(Te);for(let Vs=0;Vs<Y.length;Vs+=1)Y[Vs].l(ws);Z&&Z.l(ws),ws.forEach(n),this.h()},h(){o(i,"class","id-tool svelte-qlezb4"),o(p,"class","id-model mono svelte-qlezb4"),o(l,"class","id-row svelte-qlezb4"),o(b,"class","id-time mono svelte-qlezb4"),o(g,"class","id-session mono svelte-qlezb4"),o(pe,"class","id-duration mono svelte-qlezb4"),o(d,"class","id-footer svelte-qlezb4"),o(t,"class","identity card svelte-qlezb4"),o(re,"class","metric-label svelte-qlezb4"),o(fe,"class","metric-value mono accent svelte-qlezb4"),o(J,"class","metric-cell svelte-qlezb4"),o(ve,"class","metric-label svelte-qlezb4"),o(de,"class","metric-value mono svelte-qlezb4"),o(ne,"class","metric-cell svelte-qlezb4"),o(F,"class","metric-label svelte-qlezb4"),o(R,"class","metric-value mono svelte-qlezb4"),o(j,"class","metric-cell svelte-qlezb4"),o(we,"class","metric-label svelte-qlezb4"),o(Ve,"class","metric-value mono svelte-qlezb4"),o(ue,"class","metric-cell svelte-qlezb4"),o(y,"class","metrics-grid svelte-qlezb4"),o(Qe,"class","tb-label svelte-qlezb4"),o(Ge,"class","tb-fill tb-input svelte-qlezb4"),K(Ge,"width",Pe(a[13].inputTokens,a[15])+"%"),o(Xe,"class","tb-bar svelte-qlezb4"),o(Ye,"class","tb-value mono svelte-qlezb4"),o(qe,"class","tb-row svelte-qlezb4"),o(Ze,"class","tb-label svelte-qlezb4"),o(Be,"class","tb-fill tb-output svelte-qlezb4"),K(Be,"width",Pe(a[13].outputTokens,a[15])+"%"),o(ye,"class","tb-bar svelte-qlezb4"),o(xe,"class","tb-value mono svelte-qlezb4"),o(Ee,"class","tb-row svelte-qlezb4"),o(X,"class","token-breakdown svelte-qlezb4"),o(ie,"class","metrics card svelte-qlezb4"),o(e,"class","detail-header svelte-qlezb4"),o(Te,"class","timeline svelte-qlezb4")},m(z,V){W(z,e,V),s(e,t),s(t,l),s(l,i),s(i,r),s(l,_),s(l,p),s(p,k),s(t,P),s(t,b),s(b,C),s(t,w),x&&x.m(t,null),s(t,T),s(t,d),s(d,g),s(g,O),s(g,ae),s(g,H),s(d,Ne),s(d,pe),s(pe,_e),s(e,Re),s(e,ie),s(ie,y),s(y,J),s(J,re),s(re,ce),s(J,Ae),s(J,fe),s(fe,We),s(y,Me),s(y,ne),s(ne,ve),s(ve,be),s(ne,He),s(ne,de),s(de,De),s(y,B),s(y,j),s(j,F),s(F,G),s(j,A),s(j,R),s(R,he),s(y,Fe),s(y,ue),s(ue,we),s(we,Q),s(ue,je),s(ue,Ve),s(Ve,Ue),s(ie,Oe),s(ie,X),s(X,qe),s(qe,Qe),s(Qe,cs),s(qe,Ps),s(qe,Xe),s(Xe,Ge),s(qe,Ns),s(qe,Ye),s(Ye,fs),s(X,Ss),s(X,Ee),s(Ee,Ze),s(Ze,vs),s(Ee,As),s(Ee,ye),s(ye,Be),s(Ee,Is),s(Ee,xe),s(xe,ds),s(X,Ds),ee&&ee.m(X,null),s(X,hs),se&&se.m(X,null),s(X,us),le&&le.m(X,null),W(z,ps,V),W(z,Te,V);for(let L=0;L<Y.length;L+=1)Y[L]&&Y[L].m(Te,null);Z&&Z.m(Te,null)},p(z,V){if(V&1&&c!==(c=z[13].tool+"")&&I(r,c),V&1&&u!==(u=z[13].model+"")&&I(k,u),V&1&&m!==(m=pl(z[13].firstTs)+"")&&I(C,m),z[13].cwd?x?x.p(z,V):(x=ll(z),x.c(),x.m(t,T)):x&&(x.d(1),x=null),V&8&&D!==(D=z[3]("sessions.detail.meta.sessionId")+"")&&I(O,D),V&1&&M!==(M=z[13].sessionId+"")&&I(H,M),V&1&&oe!==(oe=_l(z[13].duration)+"")&&I(_e,oe),V&8&&Se!==(Se=z[3]("sessions.detail.meta.cost")+"")&&I(ce,Se),V&1&&me!==(me=Ts(z[13].cost)+"")&&I(We,me),V&8&&te!==(te=z[3]("sessions.detail.meta.totalTokens")+"")&&I(be,te),V&1&&Ie!==(Ie=$(z[15])+"")&&I(De,Ie),V&8&&U!==(U=z[3]("sessions.detail.meta.apiCalls")+"")&&I(G,U),V&1&&ke!==(ke=z[13].recordCount+"")&&I(he,ke),V&8&&Le!==(Le=z[3]("sessions.detail.meta.toolCalls")+"")&&I(Q,Le),V&1&&ze!==(ze=z[13].toolCallCount+"")&&I(Ue,ze),V&8&&as!==(as=z[3]("sessions.detail.meta.input")+"")&&I(cs,as),V&1&&K(Ge,"width",Pe(z[13].inputTokens,z[15])+"%"),V&1&&is!==(is=$(z[13].inputTokens)+"")&&I(fs,is),V&8&&ns!==(ns=z[3]("sessions.detail.meta.output")+"")&&I(vs,ns),V&1&&K(Be,"width",Pe(z[13].outputTokens,z[15])+"%"),V&1&&os!==(os=$(z[13].outputTokens)+"")&&I(ds,os),z[13].cacheReadTokens?ee?ee.p(z,V):(ee=tl(z),ee.c(),ee.m(X,hs)):ee&&(ee.d(1),ee=null),z[13].cacheWriteTokens?se?se.p(z,V):(se=al(z),se.c(),se.m(X,us)):se&&(se.d(1),se=null),z[13].thinkingTokens?le?le.p(z,V):(le=il(z),le.c(),le.m(X,null)):le&&(le.d(1),le=null),V&25){Ce=Ke(z[14]);let L;for(L=0;L<Ce.length;L+=1){const Je=xs(z,Ce,L);Y[L]?Y[L].p(Je,V):(Y[L]=ul(Je),Y[L].c(),Y[L].m(Te,null))}for(;L<Y.length;L+=1)Y[L].d(1);Y.length=Ce.length,!Ce.length&&Z?Z.p(z,V):Ce.length?Z&&(Z.d(1),Z=null):(Z=nl(z),Z.c(),Z.m(Te,null))}},d(z){z&&(n(e),n(ps),n(Te)),x&&x.d(),ee&&ee.d(),se&&se.d(),le&&le.d(),rs(Y,z),Z&&Z.d()}}}function Il(a){let e,t;return{c(){e=v("div"),t=S(a[1]),this.h()},l(l){e=f(l,"DIV",{class:!0});var i=h(e);t=N(i,a[1]),i.forEach(n),this.h()},h(){o(e,"class","state-msg error")},m(l,i){W(l,e,i),s(e,t)},p(l,i){i&2&&I(t,l[1])},d(l){l&&n(e)}}}function Dl(a){let e,t,l='<div class="ph-line ph-w40 svelte-qlezb4"></div> <div class="ph-line ph-w60 svelte-qlezb4"></div> <div class="ph-line ph-w80 svelte-qlezb4"></div> <div class="id-footer svelte-qlezb4" style="margin-top:auto; padding-top:0.5rem; border-top:1px solid var(--border-subtle);"><div class="ph-line ph-w50 svelte-qlezb4"></div> <div class="ph-line ph-w20 svelte-qlezb4"></div></div>',i,c,r,_,p,u,k,P=Ke([1,2,3,4]),b=[];for(let d=0;d<4;d+=1)b[d]=Cl(Sl(a,P,d));let m=Ke([1,2]),C=[];for(let d=0;d<2;d+=1)C[d]=Rl(Nl(a,m,d));let w=Ke([1,2,3]),T=[];for(let d=0;d<3;d+=1)T[d]=Wl(Pl(a,w,d));return{c(){e=v("div"),t=v("div"),t.innerHTML=l,i=E(),c=v("div"),r=v("div");for(let d=0;d<4;d+=1)b[d].c();_=E(),p=v("div");for(let d=0;d<2;d+=1)C[d].c();u=E(),k=v("div");for(let d=0;d<3;d+=1)T[d].c();this.h()},l(d){e=f(d,"DIV",{class:!0});var g=h(e);t=f(g,"DIV",{class:!0,"data-svelte-h":!0}),ts(t)!=="svelte-cj5h4s"&&(t.innerHTML=l),i=q(g),c=f(g,"DIV",{class:!0});var D=h(c);r=f(D,"DIV",{class:!0});var O=h(r);for(let H=0;H<4;H+=1)b[H].l(O);O.forEach(n),_=q(D),p=f(D,"DIV",{style:!0});var ae=h(p);for(let H=0;H<2;H+=1)C[H].l(ae);ae.forEach(n),D.forEach(n),g.forEach(n),u=q(d),k=f(d,"DIV",{class:!0});var M=h(k);for(let H=0;H<3;H+=1)T[H].l(M);M.forEach(n),this.h()},h(){o(t,"class","identity card svelte-qlezb4"),o(r,"class","metrics-grid svelte-qlezb4"),K(p,"padding-top","0.5rem"),K(p,"border-top","1px solid var(--border-subtle)"),K(p,"display","flex"),K(p,"flex-direction","column"),K(p,"gap","0.3rem"),o(c,"class","metrics card svelte-qlezb4"),o(e,"class","detail-header svelte-qlezb4"),o(k,"class","timeline svelte-qlezb4")},m(d,g){W(d,e,g),s(e,t),s(e,i),s(e,c),s(c,r);for(let D=0;D<4;D+=1)b[D]&&b[D].m(r,null);s(c,_),s(c,p);for(let D=0;D<2;D+=1)C[D]&&C[D].m(p,null);W(d,u,g),W(d,k,g);for(let D=0;D<3;D+=1)T[D]&&T[D].m(k,null)},p:ls,d(d){d&&(n(e),n(u),n(k)),rs(b,d),rs(C,d),rs(T,d)}}}function ll(a){let e,t=a[13].cwd+"",l,i;return{c(){e=v("div"),l=S(t),this.h()},l(c){e=f(c,"DIV",{class:!0,title:!0});var r=h(e);l=N(r,t),r.forEach(n),this.h()},h(){o(e,"class","id-path mono svelte-qlezb4"),o(e,"title",i=a[13].cwd)},m(c,r){W(c,e,r),s(e,l)},p(c,r){r&1&&t!==(t=c[13].cwd+"")&&I(l,t),r&1&&i!==(i=c[13].cwd)&&o(e,"title",i)},d(c){c&&n(e)}}}function tl(a){let e,t,l=a[3]("sessions.detail.meta.cacheRead")+"",i,c,r,_,p,u,k=$(a[13].cacheReadTokens)+"",P;return{c(){e=v("div"),t=v("span"),i=S(l),c=E(),r=v("span"),_=v("span"),p=E(),u=v("span"),P=S(k),this.h()},l(b){e=f(b,"DIV",{class:!0});var m=h(e);t=f(m,"SPAN",{class:!0});var C=h(t);i=N(C,l),C.forEach(n),c=q(m),r=f(m,"SPAN",{class:!0});var w=h(r);_=f(w,"SPAN",{class:!0,style:!0}),h(_).forEach(n),w.forEach(n),p=q(m),u=f(m,"SPAN",{class:!0});var T=h(u);P=N(T,k),T.forEach(n),m.forEach(n),this.h()},h(){o(t,"class","tb-label svelte-qlezb4"),o(_,"class","tb-fill tb-cache-read svelte-qlezb4"),K(_,"width",Pe(a[13].cacheReadTokens,a[15])+"%"),o(r,"class","tb-bar svelte-qlezb4"),o(u,"class","tb-value mono svelte-qlezb4"),o(e,"class","tb-row svelte-qlezb4")},m(b,m){W(b,e,m),s(e,t),s(t,i),s(e,c),s(e,r),s(r,_),s(e,p),s(e,u),s(u,P)},p(b,m){m&8&&l!==(l=b[3]("sessions.detail.meta.cacheRead")+"")&&I(i,l),m&1&&K(_,"width",Pe(b[13].cacheReadTokens,b[15])+"%"),m&1&&k!==(k=$(b[13].cacheReadTokens)+"")&&I(P,k)},d(b){b&&n(e)}}}function al(a){let e,t,l=a[3]("sessions.detail.meta.cacheWrite")+"",i,c,r,_,p,u,k=$(a[13].cacheWriteTokens)+"",P;return{c(){e=v("div"),t=v("span"),i=S(l),c=E(),r=v("span"),_=v("span"),p=E(),u=v("span"),P=S(k),this.h()},l(b){e=f(b,"DIV",{class:!0});var m=h(e);t=f(m,"SPAN",{class:!0});var C=h(t);i=N(C,l),C.forEach(n),c=q(m),r=f(m,"SPAN",{class:!0});var w=h(r);_=f(w,"SPAN",{class:!0,style:!0}),h(_).forEach(n),w.forEach(n),p=q(m),u=f(m,"SPAN",{class:!0});var T=h(u);P=N(T,k),T.forEach(n),m.forEach(n),this.h()},h(){o(t,"class","tb-label svelte-qlezb4"),o(_,"class","tb-fill tb-cache-write svelte-qlezb4"),K(_,"width",Pe(a[13].cacheWriteTokens,a[15])+"%"),o(r,"class","tb-bar svelte-qlezb4"),o(u,"class","tb-value mono svelte-qlezb4"),o(e,"class","tb-row svelte-qlezb4")},m(b,m){W(b,e,m),s(e,t),s(t,i),s(e,c),s(e,r),s(r,_),s(e,p),s(e,u),s(u,P)},p(b,m){m&8&&l!==(l=b[3]("sessions.detail.meta.cacheWrite")+"")&&I(i,l),m&1&&K(_,"width",Pe(b[13].cacheWriteTokens,b[15])+"%"),m&1&&k!==(k=$(b[13].cacheWriteTokens)+"")&&I(P,k)},d(b){b&&n(e)}}}function il(a){let e,t,l=a[3]("sessions.detail.meta.thinking")+"",i,c,r,_,p,u,k=$(a[13].thinkingTokens)+"",P;return{c(){e=v("div"),t=v("span"),i=S(l),c=E(),r=v("span"),_=v("span"),p=E(),u=v("span"),P=S(k),this.h()},l(b){e=f(b,"DIV",{class:!0});var m=h(e);t=f(m,"SPAN",{class:!0});var C=h(t);i=N(C,l),C.forEach(n),c=q(m),r=f(m,"SPAN",{class:!0});var w=h(r);_=f(w,"SPAN",{class:!0,style:!0}),h(_).forEach(n),w.forEach(n),p=q(m),u=f(m,"SPAN",{class:!0});var T=h(u);P=N(T,k),T.forEach(n),m.forEach(n),this.h()},h(){o(t,"class","tb-label svelte-qlezb4"),o(_,"class","tb-fill tb-thinking svelte-qlezb4"),K(_,"width",Pe(a[13].thinkingTokens,a[15])+"%"),o(r,"class","tb-bar svelte-qlezb4"),o(u,"class","tb-value mono svelte-qlezb4"),o(e,"class","tb-row svelte-qlezb4")},m(b,m){W(b,e,m),s(e,t),s(t,i),s(e,c),s(e,r),s(r,_),s(e,p),s(e,u),s(u,P)},p(b,m){m&8&&l!==(l=b[3]("sessions.detail.meta.thinking")+"")&&I(i,l),m&1&&K(_,"width",Pe(b[13].thinkingTokens,b[15])+"%"),m&1&&k!==(k=$(b[13].thinkingTokens)+"")&&I(P,k)},d(b){b&&n(e)}}}function nl(a){let e,t,l=a[3]("sessions.noData")+"",i,c,r,_=a[3]("sessions.noDataHint")+"",p,u;return{c(){e=v("div"),t=v("h2"),i=S(l),c=E(),r=v("p"),p=S(_),u=E(),this.h()},l(k){e=f(k,"DIV",{class:!0});var P=h(e);t=f(P,"H2",{});var b=h(t);i=N(b,l),b.forEach(n),c=q(P),r=f(P,"P",{});var m=h(r);p=N(m,_),m.forEach(n),u=q(P),P.forEach(n),this.h()},h(){o(e,"class","state-msg")},m(k,P){W(k,e,P),s(e,t),s(t,i),s(e,c),s(e,r),s(r,p),s(e,u)},p(k,P){P&8&&l!==(l=k[3]("sessions.noData")+"")&&I(i,l),P&8&&_!==(_=k[3]("sessions.noDataHint")+"")&&I(p,_)},d(k){k&&n(e)}}}function ol(a){let e,t,l=a[4](a[16].ts-a[14][a[19]-1].ts)+"",i;return{c(){e=v("div"),t=v("span"),i=S(l),this.h()},l(c){e=f(c,"DIV",{class:!0});var r=h(e);t=f(r,"SPAN",{class:!0});var _=h(t);i=N(_,l),_.forEach(n),r.forEach(n),this.h()},h(){o(t,"class","gap-text svelte-qlezb4"),o(e,"class","gap-divider svelte-qlezb4")},m(c,r){W(c,e,r),s(e,t),s(t,i)},p(c,r){r&1&&l!==(l=c[4](c[16].ts-c[14][c[19]-1].ts)+"")&&I(i,l)},d(c){c&&n(e)}}}function rl(a){let e,t,l,i,c=$(a[16].cacheReadTokens)+"",r,_;return{c(){e=v("span"),t=v("span"),l=E(),i=v("span"),r=S(c),this.h()},l(p){e=f(p,"SPAN",{class:!0,title:!0});var u=h(e);t=f(u,"SPAN",{class:!0}),h(t).forEach(n),l=q(u),i=f(u,"SPAN",{class:!0});var k=h(i);r=N(k,c),k.forEach(n),u.forEach(n),this.h()},h(){o(t,"class","rt-dot rt-cache-read svelte-qlezb4"),o(i,"class","rt-val mono svelte-qlezb4"),o(e,"class","rt-item svelte-qlezb4"),o(e,"title",_=a[3]("sessions.detail.meta.cacheRead"))},m(p,u){W(p,e,u),s(e,t),s(e,l),s(e,i),s(i,r)},p(p,u){u&1&&c!==(c=$(p[16].cacheReadTokens)+"")&&I(r,c),u&8&&_!==(_=p[3]("sessions.detail.meta.cacheRead"))&&o(e,"title",_)},d(p){p&&n(e)}}}function cl(a){let e,t,l,i,c=$(a[16].cacheWriteTokens)+"",r,_;return{c(){e=v("span"),t=v("span"),l=E(),i=v("span"),r=S(c),this.h()},l(p){e=f(p,"SPAN",{class:!0,title:!0});var u=h(e);t=f(u,"SPAN",{class:!0}),h(t).forEach(n),l=q(u),i=f(u,"SPAN",{class:!0});var k=h(i);r=N(k,c),k.forEach(n),u.forEach(n),this.h()},h(){o(t,"class","rt-dot rt-cache-write svelte-qlezb4"),o(i,"class","rt-val mono svelte-qlezb4"),o(e,"class","rt-item svelte-qlezb4"),o(e,"title",_=a[3]("sessions.detail.meta.cacheWrite"))},m(p,u){W(p,e,u),s(e,t),s(e,l),s(e,i),s(i,r)},p(p,u){u&1&&c!==(c=$(p[16].cacheWriteTokens)+"")&&I(r,c),u&8&&_!==(_=p[3]("sessions.detail.meta.cacheWrite"))&&o(e,"title",_)},d(p){p&&n(e)}}}function fl(a){let e,t,l,i,c=$(a[16].thinkingTokens)+"",r,_;return{c(){e=v("span"),t=v("span"),l=E(),i=v("span"),r=S(c),this.h()},l(p){e=f(p,"SPAN",{class:!0,title:!0});var u=h(e);t=f(u,"SPAN",{class:!0}),h(t).forEach(n),l=q(u),i=f(u,"SPAN",{class:!0});var k=h(i);r=N(k,c),k.forEach(n),u.forEach(n),this.h()},h(){o(t,"class","rt-dot rt-thinking svelte-qlezb4"),o(i,"class","rt-val mono svelte-qlezb4"),o(e,"class","rt-item svelte-qlezb4"),o(e,"title",_=a[3]("sessions.detail.meta.thinking"))},m(p,u){W(p,e,u),s(e,t),s(e,l),s(e,i),s(i,r)},p(p,u){u&1&&c!==(c=$(p[16].thinkingTokens)+"")&&I(r,c),u&8&&_!==(_=p[3]("sessions.detail.meta.thinking"))&&o(e,"title",_)},d(p){p&&n(e)}}}function vl(a){let e,t=Ke(a[16].toolCalls),l=[];for(let i=0;i<t.length;i+=1)l[i]=hl(el(a,t,i));return{c(){e=v("div");for(let i=0;i<l.length;i+=1)l[i].c();this.h()},l(i){e=f(i,"DIV",{class:!0});var c=h(e);for(let r=0;r<l.length;r+=1)l[r].l(c);c.forEach(n),this.h()},h(){o(e,"class","tool-calls svelte-qlezb4")},m(i,c){W(i,e,c);for(let r=0;r<l.length;r+=1)l[r]&&l[r].m(e,null)},p(i,c){if(c&1){t=Ke(i[16].toolCalls);let r;for(r=0;r<t.length;r+=1){const _=el(i,t,r);l[r]?l[r].p(_,c):(l[r]=hl(_),l[r].c(),l[r].m(e,null))}for(;r<l.length;r+=1)l[r].d(1);l.length=t.length}},d(i){i&&n(e),rs(l,i)}}}function dl(a){let e,t=gs(a[20].ts-a[16].ts)+"",l;return{c(){e=v("span"),l=S(t),this.h()},l(i){e=f(i,"SPAN",{class:!0});var c=h(e);l=N(c,t),c.forEach(n),this.h()},h(){o(e,"class","tc-offset mono muted svelte-qlezb4")},m(i,c){W(i,e,c),s(e,l)},p(i,c){c&1&&t!==(t=gs(i[20].ts-i[16].ts)+"")&&I(l,t)},d(i){i&&n(e)}}}function wl(a){let e,t="skill";return{c(){e=v("span"),e.textContent=t,this.h()},l(l){e=f(l,"SPAN",{class:!0,"data-svelte-h":!0}),ts(e)!=="svelte-slxz3u"&&(e.textContent=t),this.h()},h(){o(e,"class","badge badge-skill svelte-qlezb4")},m(l,i){W(l,e,i)},d(l){l&&n(e)}}}function Vl(a){let e,t="mcp";return{c(){e=v("span"),e.textContent=t,this.h()},l(l){e=f(l,"SPAN",{class:!0,"data-svelte-h":!0}),ts(e)!=="svelte-uwmdxw"&&(e.textContent=t),this.h()},h(){o(e,"class","badge badge-mcp svelte-qlezb4")},m(l,i){W(l,e,i)},d(l){l&&n(e)}}}function hl(a){let e,t,l,i=a[20].callIndex+1+"",c,r,_,p=a[20].displayName+"",u,k,P,b,m=a[20].ts!=null&&dl(a);function C(d,g){if(d[20].type==="mcp")return Vl;if(d[20].type==="skill")return wl}let w=C(a),T=w&&w(a);return{c(){e=v("div"),t=v("span"),l=S("#"),c=S(i),r=E(),_=v("span"),u=S(p),k=E(),m&&m.c(),P=E(),T&&T.c(),b=E(),this.h()},l(d){e=f(d,"DIV",{class:!0});var g=h(e);t=f(g,"SPAN",{class:!0});var D=h(t);l=N(D,"#"),c=N(D,i),D.forEach(n),r=q(g),_=f(g,"SPAN",{class:!0});var O=h(_);u=N(O,p),O.forEach(n),k=q(g),m&&m.l(g),P=q(g),T&&T.l(g),b=q(g),g.forEach(n),this.h()},h(){o(t,"class","tc-index mono muted svelte-qlezb4"),o(_,"class","tc-name mono svelte-qlezb4"),o(e,"class","tool-call svelte-qlezb4")},m(d,g){W(d,e,g),s(e,t),s(t,l),s(t,c),s(e,r),s(e,_),s(_,u),s(e,k),m&&m.m(e,null),s(e,P),T&&T.m(e,null),s(e,b)},p(d,g){g&1&&i!==(i=d[20].callIndex+1+"")&&I(c,i),g&1&&p!==(p=d[20].displayName+"")&&I(u,p),d[20].ts!=null?m?m.p(d,g):(m=dl(d),m.c(),m.m(e,P)):m&&(m.d(1),m=null),w!==(w=C(d))&&(T&&T.d(1),T=w&&w(d),T&&(T.c(),T.m(e,b)))},d(d){d&&n(e),m&&m.d(),T&&T.d()}}}function ul(a){let e,t,l,i,c,r,_=a[19]+1+"",p,u,k,P=gs(a[16].ts-a[13].firstTs)+"",b,m,C,w=a[16].model+"",T,d,g,D=Ts(a[16].cost)+"",O,ae,M,H,Ne,pe,oe,_e=$(a[16].inputTokens)+"",Re,ie,y,J,re,Se,ce,Ae=$(a[16].outputTokens)+"",fe,me,We,Me,ne,ve,te,be=$(a[17])+"",He,de,Ie,De,B=a[19]>0&&a[16].ts-a[14][a[19]-1].ts>1e3&&ol(a),j=a[16].cacheReadTokens&&rl(a),F=a[16].cacheWriteTokens&&cl(a),U=a[16].thinkingTokens&&fl(a),G=a[16].toolCalls&&a[16].toolCalls.length>0&&vl(a);return{c(){B&&B.c(),e=E(),t=v("div"),l=v("div"),i=v("div"),c=v("span"),r=S("#"),p=S(_),u=E(),k=v("span"),b=S(P),m=E(),C=v("span"),T=S(w),d=E(),g=v("span"),O=S(D),ae=E(),M=v("div"),H=v("span"),Ne=v("span"),pe=E(),oe=v("span"),Re=S(_e),y=E(),J=v("span"),re=v("span"),Se=E(),ce=v("span"),fe=S(Ae),We=E(),j&&j.c(),Me=E(),F&&F.c(),ne=E(),U&&U.c(),ve=E(),te=v("span"),He=S(be),Ie=E(),G&&G.c(),De=E(),this.h()},l(A){B&&B.l(A),e=q(A),t=f(A,"DIV",{class:!0});var R=h(t);l=f(R,"DIV",{class:!0});var ke=h(l);i=f(ke,"DIV",{class:!0});var he=h(i);c=f(he,"SPAN",{class:!0});var Fe=h(c);r=N(Fe,"#"),p=N(Fe,_),Fe.forEach(n),u=q(he),k=f(he,"SPAN",{class:!0});var ue=h(k);b=N(ue,P),ue.forEach(n),m=q(he),C=f(he,"SPAN",{class:!0});var we=h(C);T=N(we,w),we.forEach(n),he.forEach(n),d=q(ke),g=f(ke,"SPAN",{class:!0});var Le=h(g);O=N(Le,D),Le.forEach(n),ke.forEach(n),ae=q(R),M=f(R,"DIV",{class:!0});var Q=h(M);H=f(Q,"SPAN",{class:!0,title:!0});var je=h(H);Ne=f(je,"SPAN",{class:!0}),h(Ne).forEach(n),pe=q(je),oe=f(je,"SPAN",{class:!0});var Ve=h(oe);Re=N(Ve,_e),Ve.forEach(n),je.forEach(n),y=q(Q),J=f(Q,"SPAN",{class:!0,title:!0});var ze=h(J);re=f(ze,"SPAN",{class:!0}),h(re).forEach(n),Se=q(ze),ce=f(ze,"SPAN",{class:!0});var Ue=h(ce);fe=N(Ue,Ae),Ue.forEach(n),ze.forEach(n),We=q(Q),j&&j.l(Q),Me=q(Q),F&&F.l(Q),ne=q(Q),U&&U.l(Q),ve=q(Q),te=f(Q,"SPAN",{class:!0,title:!0});var Oe=h(te);He=N(Oe,be),Oe.forEach(n),Q.forEach(n),Ie=q(R),G&&G.l(R),De=q(R),R.forEach(n),this.h()},h(){o(c,"class","record-index mono svelte-qlezb4"),o(k,"class","record-relts mono muted svelte-qlezb4"),o(C,"class","record-model mono svelte-qlezb4"),o(i,"class","record-meta-left svelte-qlezb4"),o(g,"class","record-cost mono accent svelte-qlezb4"),o(l,"class","record-header svelte-qlezb4"),o(Ne,"class","rt-dot rt-input svelte-qlezb4"),o(oe,"class","rt-val mono svelte-qlezb4"),o(H,"class","rt-item svelte-qlezb4"),o(H,"title",ie=a[3]("sessions.detail.meta.input")),o(re,"class","rt-dot rt-output svelte-qlezb4"),o(ce,"class","rt-val mono svelte-qlezb4"),o(J,"class","rt-item svelte-qlezb4"),o(J,"title",me=a[3]("sessions.detail.meta.output")),o(te,"class","rt-total mono muted svelte-qlezb4"),o(te,"title",de=a[3]("sessions.detail.meta.totalTokens")),o(M,"class","record-tokens svelte-qlezb4"),o(t,"class","record-card card svelte-qlezb4")},m(A,R){B&&B.m(A,R),W(A,e,R),W(A,t,R),s(t,l),s(l,i),s(i,c),s(c,r),s(c,p),s(i,u),s(i,k),s(k,b),s(i,m),s(i,C),s(C,T),s(l,d),s(l,g),s(g,O),s(t,ae),s(t,M),s(M,H),s(H,Ne),s(H,pe),s(H,oe),s(oe,Re),s(M,y),s(M,J),s(J,re),s(J,Se),s(J,ce),s(ce,fe),s(M,We),j&&j.m(M,null),s(M,Me),F&&F.m(M,null),s(M,ne),U&&U.m(M,null),s(M,ve),s(M,te),s(te,He),s(t,Ie),G&&G.m(t,null),s(t,De)},p(A,R){A[19]>0&&A[16].ts-A[14][A[19]-1].ts>1e3?B?B.p(A,R):(B=ol(A),B.c(),B.m(e.parentNode,e)):B&&(B.d(1),B=null),R&1&&P!==(P=gs(A[16].ts-A[13].firstTs)+"")&&I(b,P),R&1&&w!==(w=A[16].model+"")&&I(T,w),R&1&&D!==(D=Ts(A[16].cost)+"")&&I(O,D),R&1&&_e!==(_e=$(A[16].inputTokens)+"")&&I(Re,_e),R&8&&ie!==(ie=A[3]("sessions.detail.meta.input"))&&o(H,"title",ie),R&1&&Ae!==(Ae=$(A[16].outputTokens)+"")&&I(fe,Ae),R&8&&me!==(me=A[3]("sessions.detail.meta.output"))&&o(J,"title",me),A[16].cacheReadTokens?j?j.p(A,R):(j=rl(A),j.c(),j.m(M,Me)):j&&(j.d(1),j=null),A[16].cacheWriteTokens?F?F.p(A,R):(F=cl(A),F.c(),F.m(M,ne)):F&&(F.d(1),F=null),A[16].thinkingTokens?U?U.p(A,R):(U=fl(A),U.c(),U.m(M,ve)):U&&(U.d(1),U=null),R&1&&be!==(be=$(A[17])+"")&&I(He,be),R&8&&de!==(de=A[3]("sessions.detail.meta.totalTokens"))&&o(te,"title",de),A[16].toolCalls&&A[16].toolCalls.length>0?G?G.p(A,R):(G=vl(A),G.c(),G.m(t,De)):G&&(G.d(1),G=null)},d(A){A&&(n(e),n(t)),B&&B.d(A),j&&j.d(),F&&F.d(),U&&U.d(),G&&G.d()}}}function Cl(a){let e,t='<div class="ph-line ph-w60 svelte-qlezb4" style="height:0.5rem;margin-bottom:0.25rem"></div> <div class="ph-line ph-w40 svelte-qlezb4" style="height:0.85rem"></div> ';return{c(){e=v("div"),e.innerHTML=t,this.h()},l(l){e=f(l,"DIV",{class:!0,"data-svelte-h":!0}),ts(e)!=="svelte-sj1wh2"&&(e.innerHTML=t),this.h()},h(){o(e,"class","metric-cell svelte-qlezb4")},m(l,i){W(l,e,i)},p:ls,d(l){l&&n(e)}}}function Rl(a){let e,t='<div class="ph-line ph-w60 svelte-qlezb4" style="height:0.5rem"></div> <div class="ph-line svelte-qlezb4" style="height:6px;border-radius:3px"></div> <div class="ph-line ph-w50 svelte-qlezb4" style="height:0.5rem"></div> ';return{c(){e=v("div"),e.innerHTML=t,this.h()},l(l){e=f(l,"DIV",{style:!0,"data-svelte-h":!0}),ts(e)!=="svelte-1h640di"&&(e.innerHTML=t),this.h()},h(){K(e,"display","grid"),K(e,"grid-template-columns","5.5rem 1fr 4.5rem"),K(e,"gap","0.5rem"),K(e,"align-items","center")},m(l,i){W(l,e,i)},p:ls,d(l){l&&n(e)}}}function Wl(a){let e,t='<div style="display:flex;justify-content:space-between;margin-bottom:0.375rem"><div class="ph-line ph-w40 svelte-qlezb4"></div> <div class="ph-line ph-w20 svelte-qlezb4"></div></div> <div style="display:flex;gap:0.75rem;margin-bottom:0.375rem"><div class="ph-line ph-w20 svelte-qlezb4"></div> <div class="ph-line ph-w20 svelte-qlezb4"></div></div> ';return{c(){e=v("div"),e.innerHTML=t,this.h()},l(l){e=f(l,"DIV",{class:!0,"data-svelte-h":!0}),ts(e)!=="svelte-8o0mhs"&&(e.innerHTML=t),this.h()},h(){o(e,"class","record-card card svelte-qlezb4")},m(l,i){W(l,e,i)},p:ls,d(l){l&&n(e)}}}function Ml(a){let e,t,l,i,c=a[3]("sessions.detail.back")+"",r,_,p,u=a[3]("sessions.detail.title")+"",k,P,b;document.title=e=a[3]("sessions.detail.title")+" — AIUsage";function m(d,g){if(d[2])return Dl;if(d[1])return Il;if(d[0])return sl}function C(d,g){return g===sl?Al(d):d}let w=m(a),T=w&&w(C(a,w));return{c(){t=E(),l=v("div"),i=v("a"),r=S(c),_=E(),p=v("h1"),k=S(u),P=E(),T&&T.c(),b=ys(),this.h()},l(d){ql("svelte-11yx7zf",document.head).forEach(n),t=q(d),l=f(d,"DIV",{class:!0});var D=h(l);i=f(D,"A",{class:!0,href:!0});var O=h(i);r=N(O,c),O.forEach(n),_=q(D),p=f(D,"H1",{});var ae=h(p);k=N(ae,u),ae.forEach(n),D.forEach(n),P=q(d),T&&T.l(d),b=ys(),this.h()},h(){o(i,"class","back-link svelte-qlezb4"),o(i,"href","/sessions"),o(l,"class","page-header")},m(d,g){W(d,t,g),W(d,l,g),s(l,i),s(i,r),s(l,_),s(l,p),s(p,k),W(d,P,g),T&&T.m(d,g),W(d,b,g)},p(d,[g]){g&8&&e!==(e=d[3]("sessions.detail.title")+" — AIUsage")&&(document.title=e),g&8&&c!==(c=d[3]("sessions.detail.back")+"")&&I(r,c),g&8&&u!==(u=d[3]("sessions.detail.title")+"")&&I(k,u),w===(w=m(d))&&T?T.p(C(d,w),g):(T&&T.d(1),T=w&&w(C(d,w)),T&&(T.c(),T.m(b.parentNode,b)))},i:ls,o:ls,d(d){d&&(n(t),n(l),n(P),n(b)),T&&T.d(d)}}}function pl(a){return new Date(a).toLocaleString()}function _l(a){if(!a||a<1e3)return"< 1s";const e=Math.floor(a/1e3),t=Math.floor(e/60),l=Math.floor(t/60);return l>0?`${l}h ${t%60}m ${e%60}s`:t===0?`${e}s`:`${t}m ${e%60}s`}function gs(a){if(a<=0)return"+0ms";if(a<1e3)return`+${a}ms`;const e=a/1e3;return`+${e%1===0?e.toFixed(0):e.toFixed(1)}s`}function Pe(a,e){return!e||!a?0:Math.round(a/e*1e3)/10}function Hl(a,e,t){let l,i;Zs(a,Tl,u=>t(5,l=u)),Zs(a,gl,u=>t(3,i=u));let c=null,r=null,_=!0;function p(u){return`— ${Math.round(u/1e3)}s ${i("sessions.detail.gap")} —`}return bl(async()=>{const u=l.params.sessionId,k=l.url.searchParams.get("tool")||"",P=l.url.searchParams.get("device")||"";try{t(0,c=await El(u,{tool:k,device:P}))}catch(b){t(1,r=b instanceof Error?b.message:"Failed to load session")}finally{t(2,_=!1)}}),[c,r,_,i,p]}class Bl extends kl{constructor(e){super(),zl(this,e,Hl,Ml,ml,{})}}export{Bl as component};
@@ -1 +1 @@
1
- {"version":"1781504553453"}
1
+ {"version":"1781680110786"}
@@ -19,26 +19,26 @@
19
19
  })();
20
20
  </script>
21
21
 
22
- <link rel="modulepreload" href="/_app/immutable/entry/start.CnOi0uqd.js">
23
- <link rel="modulepreload" href="/_app/immutable/chunks/entry.DhxonIJY.js">
22
+ <link rel="modulepreload" href="/_app/immutable/entry/start.DnwUvynt.js">
23
+ <link rel="modulepreload" href="/_app/immutable/chunks/entry.PMcg7HQL.js">
24
24
  <link rel="modulepreload" href="/_app/immutable/chunks/scheduler.DsWd5xup.js">
25
25
  <link rel="modulepreload" href="/_app/immutable/chunks/index.m3oCcA6N.js">
26
- <link rel="modulepreload" href="/_app/immutable/entry/app.0TSkMIPi.js">
26
+ <link rel="modulepreload" href="/_app/immutable/entry/app.CSiP_kAD.js">
27
27
  <link rel="modulepreload" href="/_app/immutable/chunks/index.BfJlbjrK.js">
28
28
  </head>
29
29
  <body data-sveltekit-preload-data="hover">
30
30
  <div style="display: contents">
31
31
  <script>
32
32
  {
33
- __sveltekit_dcz58a = {
33
+ __sveltekit_11701h9 = {
34
34
  base: ""
35
35
  };
36
36
 
37
37
  const element = document.currentScript.parentElement;
38
38
 
39
39
  Promise.all([
40
- import("/_app/immutable/entry/start.CnOi0uqd.js"),
41
- import("/_app/immutable/entry/app.0TSkMIPi.js")
40
+ import("/_app/immutable/entry/start.DnwUvynt.js"),
41
+ import("/_app/immutable/entry/app.CSiP_kAD.js")
42
42
  ]).then(([kit, app]) => {
43
43
  kit.start(app, element);
44
44
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@juliantanx/aiusage",
3
- "version": "1.5.4",
3
+ "version": "1.5.6",
4
4
  "type": "module",
5
5
  "description": "Track and analyze AI coding assistant usage across Claude Code, Codex, and more",
6
6
  "keywords": [
@@ -54,8 +54,8 @@
54
54
  "tsx": "^4.0.0",
55
55
  "typescript": "^5.7.0",
56
56
  "vitest": "^3.0.0",
57
- "@aiusage/core": "1.5.4",
58
- "@aiusage/web": "1.5.4"
57
+ "@aiusage/core": "1.5.6",
58
+ "@aiusage/web": "1.5.6"
59
59
  },
60
60
  "scripts": {
61
61
  "build": "tsup && node scripts/copy-web.js",
@@ -1,3 +0,0 @@
1
- var mt=Object.defineProperty;var wt=(e,n,t)=>n in e?mt(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t;var P=(e,n,t)=>wt(e,typeof n!="symbol"?n+"":n,t);import{o as je,t as yt}from"./scheduler.DsWd5xup.js";import{w as ye}from"./index.m3oCcA6N.js";new URL("sveltekit-internal://");function _t(e,n){return e==="/"||n==="ignore"?e:n==="never"?e.endsWith("/")?e.slice(0,-1):e:n==="always"&&!e.endsWith("/")?e+"/":e}function vt(e){return e.split("%25").map(decodeURI).join("%25")}function bt(e){for(const n in e)e[n]=decodeURIComponent(e[n]);return e}function ue({href:e}){return e.split("#")[0]}function At(e,n,t,r=!1){const a=new URL(e);Object.defineProperty(a,"searchParams",{value:new Proxy(a.searchParams,{get(o,c){if(c==="get"||c==="getAll"||c==="has")return f=>(t(f),o[c](f));n();const i=Reflect.get(o,c);return typeof i=="function"?i.bind(o):i}}),enumerable:!0,configurable:!0});const s=["href","pathname","search","toString","toJSON"];r&&s.push("hash");for(const o of s)Object.defineProperty(a,o,{get(){return n(),e[o]},enumerable:!0,configurable:!0});return a}const Et="/__data.json",kt=".html__data.json";function St(e){return e.endsWith(".html")?e.replace(/\.html$/,kt):e.replace(/\/$/,"")+Et}function Rt(...e){let n=5381;for(const t of e)if(typeof t=="string"){let r=t.length;for(;r;)n=n*33^t.charCodeAt(--r)}else if(ArrayBuffer.isView(t)){const r=new Uint8Array(t.buffer,t.byteOffset,t.byteLength);let a=r.length;for(;a;)n=n*33^r[--a]}else throw new TypeError("value must be a string or TypedArray");return(n>>>0).toString(36)}function It(e){const n=atob(e),t=new Uint8Array(n.length);for(let r=0;r<n.length;r++)t[r]=n.charCodeAt(r);return t.buffer}const He=window.fetch;window.fetch=(e,n)=>((e instanceof Request?e.method:(n==null?void 0:n.method)||"GET")!=="GET"&&M.delete(_e(e)),He(e,n));const M=new Map;function Ut(e,n){const t=_e(e,n),r=document.querySelector(t);if(r!=null&&r.textContent){let{body:a,...s}=JSON.parse(r.textContent);const o=r.getAttribute("data-ttl");return o&&M.set(t,{body:a,init:s,ttl:1e3*Number(o)}),r.getAttribute("data-b64")!==null&&(a=It(a)),Promise.resolve(new Response(a,s))}return window.fetch(e,n)}function Tt(e,n,t){if(M.size>0){const r=_e(e,t),a=M.get(r);if(a){if(performance.now()<a.ttl&&["default","force-cache","only-if-cached",void 0].includes(t==null?void 0:t.cache))return new Response(a.body,a.init);M.delete(r)}}return window.fetch(n,t)}function _e(e,n){let r=`script[data-sveltekit-fetched][data-url=${JSON.stringify(e instanceof Request?e.url:e)}]`;if(n!=null&&n.headers||n!=null&&n.body){const a=[];n.headers&&a.push([...new Headers(n.headers)].join(",")),n.body&&(typeof n.body=="string"||ArrayBuffer.isView(n.body))&&a.push(n.body),r+=`[data-hash="${Rt(...a)}"]`}return r}const Lt=/^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/;function Pt(e){const n=[];return{pattern:e==="/"?/^\/$/:new RegExp(`^${jt(e).map(r=>{const a=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(r);if(a)return n.push({name:a[1],matcher:a[2],optional:!1,rest:!0,chained:!0}),"(?:/(.*))?";const s=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(r);if(s)return n.push({name:s[1],matcher:s[2],optional:!0,rest:!1,chained:!0}),"(?:/([^/]+))?";if(!r)return;const o=r.split(/\[(.+?)\](?!\])/);return"/"+o.map((i,f)=>{if(f%2){if(i.startsWith("x+"))return de(String.fromCharCode(parseInt(i.slice(2),16)));if(i.startsWith("u+"))return de(String.fromCharCode(...i.slice(2).split("-").map(l=>parseInt(l,16))));const h=Lt.exec(i),[,u,g,p,d]=h;return n.push({name:p,matcher:d,optional:!!u,rest:!!g,chained:g?f===1&&o[0]==="":!1}),g?"(.*?)":u?"([^/]*)?":"([^/]+?)"}return de(i)}).join("")}).join("")}/?$`),params:n}}function Ot(e){return!/^\([^)]+\)$/.test(e)}function jt(e){return e.slice(1).split("/").filter(Ot)}function Nt(e,n,t){const r={},a=e.slice(1),s=a.filter(c=>c!==void 0);let o=0;for(let c=0;c<n.length;c+=1){const i=n[c];let f=a[c-o];if(i.chained&&i.rest&&o&&(f=a.slice(c-o,c+1).filter(h=>h).join("/"),o=0),f===void 0){i.rest&&(r[i.name]="");continue}if(!i.matcher||t[i.matcher](f)){r[i.name]=f;const h=n[c+1],u=a[c+1];h&&!h.rest&&h.optional&&u&&i.chained&&(o=0),!h&&!u&&Object.keys(r).length===s.length&&(o=0);continue}if(i.optional&&i.chained){o++;continue}return}if(!o)return r}function de(e){return e.normalize().replace(/[[\]]/g,"\\$&").replace(/%/g,"%25").replace(/\//g,"%2[Ff]").replace(/\?/g,"%3[Ff]").replace(/#/g,"%23").replace(/[.*+?^${}()|\\]/g,"\\$&")}function $t({nodes:e,server_loads:n,dictionary:t,matchers:r}){const a=new Set(n);return Object.entries(t).map(([c,[i,f,h]])=>{const{pattern:u,params:g}=Pt(c),p={id:c,exec:d=>{const l=u.exec(d);if(l)return Nt(l,g,r)},errors:[1,...h||[]].map(d=>e[d]),layouts:[0,...f||[]].map(o),leaf:s(i)};return p.errors.length=p.layouts.length=Math.max(p.errors.length,p.layouts.length),p});function s(c){const i=c<0;return i&&(c=~c),[i,e[c]]}function o(c){return c===void 0?c:[a.has(c),e[c]]}}function Ke(e,n=JSON.parse){try{return n(sessionStorage[e])}catch{}}function Ne(e,n,t=JSON.stringify){const r=t(n);try{sessionStorage[e]=r}catch{}}var Me;const L=((Me=globalThis.__sveltekit_dcz58a)==null?void 0:Me.base)??"";var qe;const xt=((qe=globalThis.__sveltekit_dcz58a)==null?void 0:qe.assets)??L,Ct="1781504553453",We="sveltekit:snapshot",Ye="sveltekit:scroll",ze="sveltekit:states",Dt="sveltekit:pageurl",C="sveltekit:history",H="sveltekit:navigation",J={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},z=location.origin;function Je(e){if(e instanceof URL)return e;let n=document.baseURI;if(!n){const t=document.getElementsByTagName("base");n=t.length?t[0].href:document.URL}return new URL(e,n)}function ve(){return{x:pageXOffset,y:pageYOffset}}function x(e,n){return e.getAttribute(`data-sveltekit-${n}`)}const $e={...J,"":J.hover};function Xe(e){let n=e.assignedSlot??e.parentNode;return(n==null?void 0:n.nodeType)===11&&(n=n.host),n}function Ze(e,n){for(;e&&e!==n;){if(e.nodeName.toUpperCase()==="A"&&e.hasAttribute("href"))return e;e=Xe(e)}}function ge(e,n,t){let r;try{r=new URL(e instanceof SVGAElement?e.href.baseVal:e.href,document.baseURI)}catch{}const a=e instanceof SVGAElement?e.target.baseVal:e.target,s=!r||!!a||oe(r,n,t)||(e.getAttribute("rel")||"").split(/\s+/).includes("external"),o=(r==null?void 0:r.origin)===z&&e.hasAttribute("download");return{url:r,external:s,target:a,download:o}}function X(e){let n=null,t=null,r=null,a=null,s=null,o=null,c=e;for(;c&&c!==document.documentElement;)r===null&&(r=x(c,"preload-code")),a===null&&(a=x(c,"preload-data")),n===null&&(n=x(c,"keepfocus")),t===null&&(t=x(c,"noscroll")),s===null&&(s=x(c,"reload")),o===null&&(o=x(c,"replacestate")),c=Xe(c);function i(f){switch(f){case"":case"true":return!0;case"off":case"false":return!1;default:return}}return{preload_code:$e[r??"off"],preload_data:$e[a??"off"],keepfocus:i(n),noscroll:i(t),reload:i(s),replace_state:i(o)}}function xe(e){const n=ye(e);let t=!0;function r(){t=!0,n.update(o=>o)}function a(o){t=!1,n.set(o)}function s(o){let c;return n.subscribe(i=>{(c===void 0||t&&i!==c)&&o(c=i)})}return{notify:r,set:a,subscribe:s}}const Qe={v:()=>{}};function Bt(){const{set:e,subscribe:n}=ye(!1);let t;async function r(){clearTimeout(t);try{const a=await fetch(`${xt}/_app/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(!a.ok)return!1;const o=(await a.json()).version!==Ct;return o&&(e(!0),Qe.v(),clearTimeout(t)),o}catch{return!1}}return{subscribe:n,check:r}}function oe(e,n,t){return e.origin!==z||!e.pathname.startsWith(n)?!0:t?!(e.pathname===n+"/"||e.protocol==="file:"&&e.pathname.replace(/\/[^/]+\.html?$/,"")===n):!1}function Ft(e){return Uint8Array.fromBase64(e).buffer}function Vt(e){return Uint8Array.from(Buffer.from(e,"base64")).buffer}function Mt(e){const n=atob(e),t=n.length,r=new Uint8Array(t);for(let a=0;a<t;a++)r[a]=n.charCodeAt(a);return r.buffer}const qt=typeof Uint8Array.fromBase64=="function";var Ge;const Gt=typeof process=="object"&&((Ge=process.versions)==null?void 0:Ge.node)!==void 0,Ht=qt?Ft:Gt?Vt:Mt,Kt=-1,Wt=-2,Yt=-3,zt=-4,Jt=-5,Xt=-6,Zt=-7;function Qt(e,n){if(typeof e=="number")return s(e,!0);if(!Array.isArray(e)||e.length===0)throw new Error("Invalid input");const t=e,r=Array(t.length);let a=null;function s(o,c=!1){if(o===Kt)return;if(o===Yt)return NaN;if(o===zt)return 1/0;if(o===Jt)return-1/0;if(o===Xt)return-0;if(c||typeof o!="number")throw new Error("Invalid input");if(o in r)return r[o];const i=t[o];if(!i||typeof i!="object")r[o]=i;else if(Array.isArray(i))if(typeof i[0]=="string"){const f=i[0],h=n&&Object.hasOwn(n,f)?n[f]:void 0;if(h){let u=i[1];if(typeof u!="number"&&(u=t.push(i[1])-1),a??(a=new Set),a.has(u))throw new Error("Invalid circular reference");return a.add(u),r[o]=h(s(u)),a.delete(u),r[o]}switch(f){case"Date":r[o]=new Date(i[1]);break;case"Set":const u=new Set;r[o]=u;for(let d=1;d<i.length;d+=1)u.add(s(i[d]));break;case"Map":const g=new Map;r[o]=g;for(let d=1;d<i.length;d+=2)g.set(s(i[d]),s(i[d+1]));break;case"RegExp":r[o]=new RegExp(i[1],i[2]);break;case"Object":{const d=i[1];if(typeof t[d]=="object"&&t[d][0]!=="BigInt")throw new Error("Invalid input");r[o]=Object(s(d));break}case"BigInt":r[o]=BigInt(i[1]);break;case"null":const p=Object.create(null);r[o]=p;for(let d=1;d<i.length;d+=2){if(i[d]==="__proto__")throw new Error("Cannot parse an object with a `__proto__` property");p[i[d]]=s(i[d+1])}break;case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Float16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"BigInt64Array":case"BigUint64Array":case"DataView":{if(t[i[1]][0]!=="ArrayBuffer")throw new Error("Invalid data");const d=globalThis[f],l=s(i[1]);r[o]=i[2]!==void 0?new d(l,i[2],i[3]):new d(l);break}case"ArrayBuffer":{const d=i[1];if(typeof d!="string")throw new Error("Invalid ArrayBuffer encoding");const l=Ht(d);r[o]=l;break}case"Temporal.Duration":case"Temporal.Instant":case"Temporal.PlainDate":case"Temporal.PlainTime":case"Temporal.PlainDateTime":case"Temporal.PlainMonthDay":case"Temporal.PlainYearMonth":case"Temporal.ZonedDateTime":{const d=f.slice(9);r[o]=Temporal[d].from(i[1]);break}case"URL":{const d=new URL(i[1]);r[o]=d;break}case"URLSearchParams":{const d=new URLSearchParams(i[1]);r[o]=d;break}default:throw new Error(`Unknown type ${f}`)}}else if(i[0]===Zt){const f=i[1];if(!Number.isInteger(f)||f<0)throw new Error("Invalid input");const h=new Array(f);r[o]=h;for(let u=2;u<i.length;u+=2){const g=i[u];if(!Number.isInteger(g)||g<0||g>=f)throw new Error("Invalid input");h[g]=s(i[u+1])}}else{const f=new Array(i.length);r[o]=f;for(let h=0;h<i.length;h+=1){const u=i[h];u!==Wt&&(f[h]=s(u))}}else{const f={};r[o]=f;for(const h of Object.keys(i)){if(h==="__proto__")throw new Error("Cannot parse an object with a `__proto__` property");const u=i[h];f[h]=s(u)}}return r[o]}return s(0)}const et=new Set(["load","prerender","csr","ssr","trailingSlash","config"]);[...et];const en=new Set([...et]);[...en];function tn(e){return e.filter(n=>n!=null)}class se{constructor(n,t){this.status=n,typeof t=="string"?this.body={message:t}:t?this.body=t:this.body={message:`Error: ${n}`}}toString(){return JSON.stringify(this.body)}}class be{constructor(n,t){this.status=n,this.location=t}}class Ae extends Error{constructor(n,t,r){super(r),this.status=n,this.text=t}}const nn="x-sveltekit-invalidated",rn="x-sveltekit-trailing-slash";function Z(e){return e instanceof se||e instanceof Ae?e.status:500}function an(e){return e instanceof Ae?e.text:"Internal Error"}let I,K,he;const on=je.toString().includes("$$")||/function \w+\(\) \{\}/.test(je.toString());on?(I={data:{},form:null,error:null,params:{},route:{id:null},state:{},status:-1,url:new URL("https://example.com")},K={current:null},he={current:!1}):(I=new class{constructor(){P(this,"data",$state.raw({}));P(this,"form",$state.raw(null));P(this,"error",$state.raw(null));P(this,"params",$state.raw({}));P(this,"route",$state.raw({id:null}));P(this,"state",$state.raw({}));P(this,"status",$state.raw(-1));P(this,"url",$state.raw(new URL("https://example.com")))}},K=new class{constructor(){P(this,"current",$state.raw(null))}},he=new class{constructor(){P(this,"current",$state.raw(!1))}},Qe.v=()=>he.current=!0);function sn(e){Object.assign(I,e)}const cn=new Set(["icon","shortcut icon","apple-touch-icon"]),$=Ke(Ye)??{},W=Ke(We)??{},j={url:xe({}),page:xe({}),navigating:ye(null),updated:Bt()};function Ee(e){$[e]=ve()}function ln(e,n){let t=e+1;for(;$[t];)delete $[t],t+=1;for(t=n+1;W[t];)delete W[t],t+=1}function B(e){return location.href=e.href,new Promise(()=>{})}async function tt(){if("serviceWorker"in navigator){const e=await navigator.serviceWorker.getRegistration(L||"/");e&&await e.update()}}function Ce(){}let ie,me,Q,O,we,A;const nt=[],ee=[];let U=null;const rt=new Set,fn=new Set,q=new Set;let y={branch:[],error:null,url:null},ke=!1,te=!1,De=!0,Y=!1,F=!1,at=!1,Se=!1,ot,R,T,ne;const G=new Set;async function Rn(e,n,t){var a,s,o,c;document.URL!==location.href&&(location.href=location.href),A=e,await((s=(a=e.hooks).init)==null?void 0:s.call(a)),ie=$t(e),O=document.documentElement,we=n,me=e.nodes[0],Q=e.nodes[1],me(),Q(),R=(o=history.state)==null?void 0:o[C],T=(c=history.state)==null?void 0:c[H],R||(R=T=Date.now(),history.replaceState({...history.state,[C]:R,[H]:T},""));const r=$[R];r&&(history.scrollRestoration="manual",scrollTo(r.x,r.y)),t?await yn(we,t):mn(location.href,{replaceState:!0}),wn()}function un(){nt.length=0,Se=!1}function st(e){ee.some(n=>n==null?void 0:n.snapshot)&&(W[e]=ee.map(n=>{var t;return(t=n==null?void 0:n.snapshot)==null?void 0:t.capture()}))}function it(e){var n;(n=W[e])==null||n.forEach((t,r)=>{var a,s;(s=(a=ee[r])==null?void 0:a.snapshot)==null||s.restore(t)})}function Be(){Ee(R),Ne(Ye,$),st(T),Ne(We,W)}async function Re(e,n,t,r){return V({type:"goto",url:Je(e),keepfocus:n.keepFocus,noscroll:n.noScroll,replace_state:n.replaceState,state:n.state,redirect_count:t,nav_token:r,accept:()=>{n.invalidateAll&&(Se=!0)}})}async function dn(e){if(e.id!==(U==null?void 0:U.id)){const n={};G.add(n),U={id:e.id,token:n,promise:lt({...e,preload:n}).then(t=>(G.delete(n),t.type==="loaded"&&t.state.error&&(U=null),t))}}return U.promise}async function pe(e){const n=ie.find(t=>t.exec(ft(e)));n&&await Promise.all([...n.layouts,n.leaf].map(t=>t==null?void 0:t[1]()))}function ct(e,n,t){var s;y=e.state;const r=document.querySelector("style[data-sveltekit]");r&&r.remove(),Object.assign(I,e.props.page),ot=new A.root({target:n,props:{...e.props,stores:j,components:ee},hydrate:t,sync:!1}),it(T);const a={from:null,to:{params:y.params,route:{id:((s=y.route)==null?void 0:s.id)??null},url:new URL(location.href)},willUnload:!1,type:"enter",complete:Promise.resolve()};q.forEach(o=>o(a)),te=!0}function re({url:e,params:n,branch:t,status:r,error:a,route:s,form:o}){let c="never";if(L&&(e.pathname===L||e.pathname===L+"/"))c="always";else for(const p of t)(p==null?void 0:p.slash)!==void 0&&(c=p.slash);e.pathname=_t(e.pathname,c),e.search=e.search;const i={type:"loaded",state:{url:e,params:n,branch:t,error:a,route:s},props:{constructors:tn(t).map(p=>p.node.component),page:Le(I)}};o!==void 0&&(i.props.form=o);let f={},h=!I,u=0;for(let p=0;p<Math.max(t.length,y.branch.length);p+=1){const d=t[p],l=y.branch[p];(d==null?void 0:d.data)!==(l==null?void 0:l.data)&&(h=!0),d&&(f={...f,...d.data},h&&(i.props[`data_${u}`]=f),u+=1)}return(!y.url||e.href!==y.url.href||y.error!==a||o!==void 0&&o!==I.form||h)&&(i.props.page={error:a,params:n,route:{id:(s==null?void 0:s.id)??null},state:{},status:r,url:new URL(e),form:o??null,data:h?f:I.data}),i}async function Ie({loader:e,parent:n,url:t,params:r,route:a,server_data_node:s}){var h,u,g;let o=null,c=!0;const i={dependencies:new Set,params:new Set,parent:!1,route:!1,url:!1,search_params:new Set},f=await e();if((h=f.universal)!=null&&h.load){let p=function(...l){for(const m of l){const{href:b}=new URL(m,t);i.dependencies.add(b)}};const d={route:new Proxy(a,{get:(l,m)=>(c&&(i.route=!0),l[m])}),params:new Proxy(r,{get:(l,m)=>(c&&i.params.add(m),l[m])}),data:(s==null?void 0:s.data)??null,url:At(t,()=>{c&&(i.url=!0)},l=>{c&&i.search_params.add(l)},A.hash),async fetch(l,m){let b;l instanceof Request?(b=l.url,m={body:l.method==="GET"||l.method==="HEAD"?void 0:await l.blob(),cache:l.cache,credentials:l.credentials,headers:[...l.headers].length?l.headers:void 0,integrity:l.integrity,keepalive:l.keepalive,method:l.method,mode:l.mode,redirect:l.redirect,referrer:l.referrer,referrerPolicy:l.referrerPolicy,signal:l.signal,...m}):b=l;const k=new URL(b,t);return c&&p(k.href),k.origin===t.origin&&(b=k.href.slice(t.origin.length)),te?Tt(b,k.href,m):Ut(b,m)},setHeaders:()=>{},depends:p,parent(){return c&&(i.parent=!0),n()},untrack(l){c=!1;try{return l()}finally{c=!0}}};o=await f.universal.load.call(null,d)??null}return{node:f,loader:e,server:s,universal:(u=f.universal)!=null&&u.load?{type:"data",data:o,uses:i}:null,data:o??(s==null?void 0:s.data)??null,slash:((g=f.universal)==null?void 0:g.trailingSlash)??(s==null?void 0:s.slash)}}function Fe(e,n,t,r,a,s){if(Se)return!0;if(!a)return!1;if(a.parent&&e||a.route&&n||a.url&&t)return!0;for(const o of a.search_params)if(r.has(o))return!0;for(const o of a.params)if(s[o]!==y.params[o])return!0;for(const o of a.dependencies)if(nt.some(c=>c(new URL(o))))return!0;return!1}function Ue(e,n){return(e==null?void 0:e.type)==="data"?e:(e==null?void 0:e.type)==="skip"?n??null:null}function hn(e,n){if(!e)return new Set(n.searchParams.keys());const t=new Set([...e.searchParams.keys(),...n.searchParams.keys()]);for(const r of t){const a=e.searchParams.getAll(r),s=n.searchParams.getAll(r);a.every(o=>s.includes(o))&&s.every(o=>a.includes(o))&&t.delete(r)}return t}function Ve({error:e,url:n,route:t,params:r}){return{type:"loaded",state:{error:e,url:n,route:t,params:r,branch:[]},props:{page:Le(I),constructors:[]}}}async function lt({id:e,invalidating:n,url:t,params:r,route:a,preload:s}){if((U==null?void 0:U.id)===e)return G.delete(U.token),U.promise;const{errors:o,layouts:c,leaf:i}=a,f=[...c,i];o.forEach(w=>w==null?void 0:w().catch(()=>{})),f.forEach(w=>w==null?void 0:w[1]().catch(()=>{}));let h=null;const u=y.url?e!==ae(y.url):!1,g=y.route?a.id!==y.route.id:!1,p=hn(y.url,t);let d=!1;const l=f.map((w,_)=>{var N;const E=y.branch[_],S=!!(w!=null&&w[0])&&((E==null?void 0:E.loader)!==w[1]||Fe(d,g,u,p,(N=E.server)==null?void 0:N.uses,r));return S&&(d=!0),S});if(l.some(Boolean)){try{h=await ht(t,l)}catch(w){const _=await D(w,{url:t,params:r,route:{id:e}});return G.has(s)?Ve({error:_,url:t,params:r,route:a}):ce({status:Z(w),error:_,url:t,route:a})}if(h.type==="redirect")return h}const m=h==null?void 0:h.nodes;let b=!1;const k=f.map(async(w,_)=>{var le;if(!w)return;const E=y.branch[_],S=m==null?void 0:m[_];if((!S||S.type==="skip")&&w[1]===(E==null?void 0:E.loader)&&!Fe(b,g,u,p,(le=E.universal)==null?void 0:le.uses,r))return E;if(b=!0,(S==null?void 0:S.type)==="error")throw S;return Ie({loader:w[1],url:t,params:r,route:a,parent:async()=>{var Oe;const Pe={};for(let fe=0;fe<_;fe+=1)Object.assign(Pe,(Oe=await k[fe])==null?void 0:Oe.data);return Pe},server_data_node:Ue(S===void 0&&w[0]?{type:"skip"}:S??null,w[0]?E==null?void 0:E.server:void 0)})});for(const w of k)w.catch(()=>{});const v=[];for(let w=0;w<f.length;w+=1)if(f[w])try{v.push(await k[w])}catch(_){if(_ instanceof be)return{type:"redirect",location:_.location};if(G.has(s))return Ve({error:await D(_,{params:r,url:t,route:{id:a.id}}),url:t,params:r,route:a});let E=Z(_),S;if(m!=null&&m.includes(_))E=_.status??E,S=_.error;else if(_ instanceof se)S=_.body;else{if(await j.updated.check())return await tt(),await B(t);S=await D(_,{params:r,url:t,route:{id:a.id}})}const N=await pn(w,v,o);return N?re({url:t,params:r,branch:v.slice(0,N.idx).concat(N.node),status:E,error:S,route:a}):await dt(t,{id:a.id},S,E)}else v.push(void 0);return re({url:t,params:r,branch:v,status:200,error:null,route:a,form:n?void 0:null})}async function pn(e,n,t){for(;e--;)if(t[e]){let r=e;for(;!n[r];)r-=1;try{return{idx:r+1,node:{node:await t[e](),loader:t[e],data:{},server:null,universal:null}}}catch{continue}}}async function ce({status:e,error:n,url:t,route:r}){const a={};let s=null;if(A.server_loads[0]===0)try{const c=await ht(t,[!0]);if(c.type!=="data"||c.nodes[0]&&c.nodes[0].type!=="data")throw 0;s=c.nodes[0]??null}catch{(t.origin!==z||t.pathname!==location.pathname||ke)&&await B(t)}try{const c=await Ie({loader:me,url:t,params:a,route:r,parent:()=>Promise.resolve({}),server_data_node:Ue(s)}),i={node:await Q(),loader:Q,universal:null,server:null,data:null};return re({url:t,params:a,branch:[c,i],status:e,error:n,route:null})}catch(c){if(c instanceof be)return Re(new URL(c.location,location.href),{},0);throw c}}function Te(e,n){if(!e||oe(e,L,A.hash))return;let t;try{if(t=A.hooks.reroute({url:new URL(e)})??e,typeof t=="string"){const a=new URL(e);A.hash?a.hash=t:a.pathname=t,t=a}}catch{return}const r=ft(t);for(const a of ie){const s=a.exec(r);if(s)return{id:ae(e),invalidating:n,route:a,params:bt(s),url:e}}}function ft(e){return vt(A.hash?e.hash.replace(/^#/,"").replace(/[?#].+/,""):e.pathname.slice(L.length))||"/"}function ae(e){return(A.hash?e.hash.replace(/^#/,""):e.pathname)+e.search}function ut({url:e,type:n,intent:t,delta:r}){let a=!1;const s=gt(y,t,e,n);r!==void 0&&(s.navigation.delta=r);const o={...s.navigation,cancel:()=>{a=!0,s.reject(new Error("navigation cancelled"))}};return Y||rt.forEach(c=>c(o)),a?null:s}async function V({type:e,url:n,popped:t,keepfocus:r,noscroll:a,replace_state:s,state:o={},redirect_count:c=0,nav_token:i={},accept:f=Ce,block:h=Ce}){const u=Te(n,!1),g=ut({url:n,type:e,delta:t==null?void 0:t.delta,intent:u});if(!g){h();return}const p=R,d=T;f(),Y=!0,te&&j.navigating.set(K.current=g.navigation),ne=i;let l=u&&await lt(u);if(!l){if(oe(n,L,A.hash))return await B(n);l=await dt(n,{id:null},await D(new Ae(404,"Not Found",`Not found: ${n.pathname}`),{url:n,params:{},route:{id:null}}),404)}if(n=(u==null?void 0:u.url)||n,ne!==i)return g.reject(new Error("navigation aborted")),!1;if(l.type==="redirect")if(c>=20)l=await ce({status:500,error:await D(new Error("Redirect loop"),{url:n,params:{},route:{id:null}}),url:n,route:{id:null}});else return Re(new URL(l.location,n).href,{},c+1,i),!1;else l.props.page.status>=400&&await j.updated.check()&&(await tt(),await B(n));if(un(),Ee(p),st(d),l.props.page.url.pathname!==n.pathname&&(n.pathname=l.props.page.url.pathname),o=t?t.state:o,!t){const v=s?0:1,w={[C]:R+=v,[H]:T+=v,[ze]:o};(s?history.replaceState:history.pushState).call(history,w,"",n),s||ln(R,T)}if(U=null,l.props.page.state=o,te){y=l.state,l.props.page&&(l.props.page.url=n);const v=(await Promise.all(Array.from(fn,w=>w(g.navigation)))).filter(w=>typeof w=="function");if(v.length>0){let w=function(){v.forEach(_=>{q.delete(_)})};v.push(w),v.forEach(_=>{q.add(_)})}ot.$set(l.props),sn(l.props.page),at=!0}else ct(l,we,!1);const{activeElement:m}=document;await yt();const b=t?t.scroll:a?ve():null;if(De){const v=n.hash&&document.getElementById(decodeURIComponent(A.hash?n.hash.split("#")[2]??"":n.hash.slice(1)));b?scrollTo(b.x,b.y):v?v.scrollIntoView():scrollTo(0,0)}const k=document.activeElement!==m&&document.activeElement!==document.body;!r&&!k&&_n(),De=!0,l.props.page&&Object.assign(I,l.props.page),Y=!1,e==="popstate"&&it(T),g.fulfil(void 0),q.forEach(v=>v(g.navigation)),j.navigating.set(K.current=null)}async function dt(e,n,t,r){return e.origin===z&&e.pathname===location.pathname&&!ke?await ce({status:r,error:t,url:e,route:n}):await B(e)}function gn(){let e;O.addEventListener("mousemove",s=>{const o=s.target;clearTimeout(e),e=setTimeout(()=>{r(o,2)},20)});function n(s){s.defaultPrevented||r(s.composedPath()[0],1)}O.addEventListener("mousedown",n),O.addEventListener("touchstart",n,{passive:!0});const t=new IntersectionObserver(s=>{for(const o of s)o.isIntersecting&&(pe(new URL(o.target.href)),t.unobserve(o.target))},{threshold:0});function r(s,o){const c=Ze(s,O);if(!c)return;const{url:i,external:f,download:h}=ge(c,L,A.hash);if(f||h)return;const u=X(c),g=i&&ae(y.url)===ae(i);if(!u.reload&&!g)if(o<=u.preload_data){const p=Te(i,!1);p&&dn(p)}else o<=u.preload_code&&pe(i)}function a(){t.disconnect();for(const s of O.querySelectorAll("a")){const{url:o,external:c,download:i}=ge(s,L,A.hash);if(c||i)continue;const f=X(s);f.reload||(f.preload_code===J.viewport&&t.observe(s),f.preload_code===J.eager&&pe(o))}}q.add(a),a()}function D(e,n){if(e instanceof se)return e.body;const t=Z(e),r=an(e);return A.hooks.handleError({error:e,event:n,status:t,message:r})??{message:r}}function mn(e,n={}){return e=new URL(Je(e)),e.origin!==z?Promise.reject(new Error("goto: invalid URL")):Re(e,n,0)}function wn(){var n;history.scrollRestoration="manual",addEventListener("beforeunload",t=>{let r=!1;if(Be(),!Y){const a=gt(y,void 0,null,"leave"),s={...a.navigation,cancel:()=>{r=!0,a.reject(new Error("navigation cancelled"))}};rt.forEach(o=>o(s))}r?(t.preventDefault(),t.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&Be()}),(n=navigator.connection)!=null&&n.saveData||gn(),O.addEventListener("click",async t=>{if(t.button||t.which!==1||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.defaultPrevented)return;const r=Ze(t.composedPath()[0],O);if(!r)return;const{url:a,external:s,target:o,download:c}=ge(r,L,A.hash);if(!a)return;if(o==="_parent"||o==="_top"){if(window.parent!==window)return}else if(o&&o!=="_self")return;const i=X(r);if(!(r instanceof SVGAElement)&&a.protocol!==location.protocol&&!(a.protocol==="https:"||a.protocol==="http:")||c)return;const[h,u]=(A.hash?a.hash.replace(/^#/,""):a.href).split("#"),g=h===ue(location);if(s||i.reload&&(!g||!u)){ut({url:a,type:"link"})?Y=!0:t.preventDefault();return}if(u!==void 0&&g){const[,p]=y.url.href.split("#");if(p===u){if(t.preventDefault(),u===""||u==="top"&&r.ownerDocument.getElementById("top")===null)window.scrollTo({top:0});else{const d=r.ownerDocument.getElementById(decodeURIComponent(u));d&&(d.scrollIntoView(),d.focus())}return}if(F=!0,Ee(R),e(a),!i.replace_state)return;F=!1}t.preventDefault(),await new Promise(p=>{requestAnimationFrame(()=>{setTimeout(p,0)}),setTimeout(p,100)}),V({type:"link",url:a,keepfocus:i.keepfocus,noscroll:i.noscroll,replace_state:i.replace_state??a.href===location.href})}),O.addEventListener("submit",t=>{if(t.defaultPrevented)return;const r=HTMLFormElement.prototype.cloneNode.call(t.target),a=t.submitter;if(((a==null?void 0:a.formTarget)||r.target)==="_blank"||((a==null?void 0:a.formMethod)||r.method)!=="get")return;const c=new URL((a==null?void 0:a.hasAttribute("formaction"))&&(a==null?void 0:a.formAction)||r.action);if(oe(c,L,!1))return;const i=t.target,f=X(i);if(f.reload)return;t.preventDefault(),t.stopPropagation();const h=new FormData(i),u=a==null?void 0:a.getAttribute("name");u&&h.append(u,(a==null?void 0:a.getAttribute("value"))??""),c.search=new URLSearchParams(h).toString(),V({type:"form",url:c,keepfocus:f.keepfocus,noscroll:f.noscroll,replace_state:f.replace_state??c.href===location.href})}),addEventListener("popstate",async t=>{var r;if((r=t.state)!=null&&r[C]){const a=t.state[C];if(ne={},a===R)return;const s=$[a],o=t.state[ze]??{},c=new URL(t.state[Dt]??location.href),i=t.state[H],f=y.url?ue(location)===ue(y.url):!1;if(i===T&&(at||f)){o!==I.state&&(I.state=o),e(c),$[R]=ve(),s&&scrollTo(s.x,s.y),R=a;return}const u=a-R;await V({type:"popstate",url:c,popped:{state:o,scroll:s,delta:u},accept:()=>{R=a,T=i},block:()=>{history.go(-u)},nav_token:ne})}else if(!F){const a=new URL(location.href);e(a)}}),addEventListener("hashchange",()=>{F?(F=!1,history.replaceState({...history.state,[C]:++R,[H]:T},"",location.href)):A.hash&&y.url.hash===location.hash&&V({type:"goto",url:y.url})});for(const t of document.querySelectorAll("link"))cn.has(t.rel)&&(t.href=t.href);addEventListener("pageshow",t=>{t.persisted&&j.navigating.set(K.current=null)});function e(t){y.url=I.url=t,j.page.set(Le(I)),j.page.notify()}}async function yn(e,{status:n=200,error:t,node_ids:r,params:a,route:s,data:o,form:c}){ke=!0;const i=new URL(location.href);({params:a={},route:s={id:null}}=Te(i,!1)||{});let f,h=!0;try{const u=r.map(async(d,l)=>{const m=o[l];return m!=null&&m.uses&&(m.uses=pt(m.uses)),Ie({loader:A.nodes[d],url:i,params:a,route:s,parent:async()=>{const b={};for(let k=0;k<l;k+=1)Object.assign(b,(await u[k]).data);return b},server_data_node:Ue(m)})}),g=await Promise.all(u),p=ie.find(({id:d})=>d===s.id);if(p){const d=p.layouts;for(let l=0;l<d.length;l++)d[l]||g.splice(l,0,void 0)}f=re({url:i,params:a,branch:g,status:n,error:t,form:c,route:p??null})}catch(u){if(u instanceof be){await B(new URL(u.location,location.href));return}f=await ce({status:Z(u),error:await D(u,{url:i,params:a,route:s}),url:i,route:s}),e.textContent="",h=!1}f.props.page&&(f.props.page.state={}),ct(f,e,h)}async function ht(e,n){var a;const t=new URL(e);t.pathname=St(e.pathname),e.pathname.endsWith("/")&&t.searchParams.append(rn,"1"),t.searchParams.append(nn,n.map(s=>s?"1":"0").join(""));const r=await He(t.href);if(!r.ok){let s;throw(a=r.headers.get("content-type"))!=null&&a.includes("application/json")?s=await r.json():r.status===404?s="Not Found":r.status===500&&(s="Internal Error"),new se(r.status,s)}return new Promise(async s=>{var u;const o=new Map,c=r.body.getReader(),i=new TextDecoder;function f(g){return Qt(g,{...A.decoders,Promise:p=>new Promise((d,l)=>{o.set(p,{fulfil:d,reject:l})})})}let h="";for(;;){const{done:g,value:p}=await c.read();if(g&&!h)break;for(h+=!p&&h?`
2
- `:i.decode(p,{stream:!0});;){const d=h.indexOf(`
3
- `);if(d===-1)break;const l=JSON.parse(h.slice(0,d));if(h=h.slice(d+1),l.type==="redirect")return s(l);if(l.type==="data")(u=l.nodes)==null||u.forEach(m=>{(m==null?void 0:m.type)==="data"&&(m.uses=pt(m.uses),m.data=f(m.data))}),s(l);else if(l.type==="chunk"){const{id:m,data:b,error:k}=l,v=o.get(m);o.delete(m),k?v.reject(f(k)):v.fulfil(f(b))}}}})}function pt(e){return{dependencies:new Set((e==null?void 0:e.dependencies)??[]),params:new Set((e==null?void 0:e.params)??[]),parent:!!(e!=null&&e.parent),route:!!(e!=null&&e.route),url:!!(e!=null&&e.url),search_params:new Set((e==null?void 0:e.search_params)??[])}}function _n(){const e=document.querySelector("[autofocus]");if(e)e.focus();else{const n=document.body,t=n.getAttribute("tabindex");n.tabIndex=-1,n.focus({preventScroll:!0,focusVisible:!1}),t!==null?n.setAttribute("tabindex",t):n.removeAttribute("tabindex");const r=getSelection();if(r&&r.type!=="None"){const a=[];for(let s=0;s<r.rangeCount;s+=1)a.push(r.getRangeAt(s));setTimeout(()=>{if(r.rangeCount===a.length){for(let s=0;s<r.rangeCount;s+=1){const o=a[s],c=r.getRangeAt(s);if(o.commonAncestorContainer!==c.commonAncestorContainer||o.startContainer!==c.startContainer||o.endContainer!==c.endContainer||o.startOffset!==c.startOffset||o.endOffset!==c.endOffset)return}r.removeAllRanges()}})}}}function gt(e,n,t,r){var i,f;let a,s;const o=new Promise((h,u)=>{a=h,s=u});return o.catch(()=>{}),{navigation:{from:{params:e.params,route:{id:((i=e.route)==null?void 0:i.id)??null},url:e.url},to:t&&{params:(n==null?void 0:n.params)??null,route:{id:((f=n==null?void 0:n.route)==null?void 0:f.id)??null},url:t},willUnload:!n,type:r,complete:o},fulfil:a,reject:s}}function Le(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}}export{Rn as a,j as s};
@@ -1 +0,0 @@
1
- import{a as t}from"../chunks/entry.DhxonIJY.js";export{t as start};