@devness/useai 0.6.22 → 0.6.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. package/LICENSE +661 -21
  2. package/README.md +1 -1
  3. package/dist/index.js +438 -105
  4. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -684,7 +684,7 @@ var VERSION;
684
684
  var init_version = __esm({
685
685
  "../shared/dist/constants/version.js"() {
686
686
  "use strict";
687
- VERSION = "0.6.22";
687
+ VERSION = "0.6.24";
688
688
  }
689
689
  });
690
690
 
@@ -707,13 +707,36 @@ var init_clients = __esm({
707
707
  });
708
708
 
709
709
  // ../shared/dist/constants/defaults.js
710
- var DEFAULT_CONFIG, DEFAULT_SYNC_INTERVAL_HOURS, GENESIS_HASH;
710
+ var DEFAULT_CAPTURE_CONFIG, DEFAULT_SYNC_INCLUDE_CONFIG, DEFAULT_SYNC_CONFIG, DEFAULT_CONFIG, DEFAULT_SYNC_INTERVAL_HOURS, GENESIS_HASH;
711
711
  var init_defaults = __esm({
712
712
  "../shared/dist/constants/defaults.js"() {
713
713
  "use strict";
714
+ DEFAULT_CAPTURE_CONFIG = {
715
+ prompt: true,
716
+ prompt_images: true,
717
+ evaluation: true,
718
+ evaluation_reasons: "all",
719
+ milestones: true
720
+ };
721
+ DEFAULT_SYNC_INCLUDE_CONFIG = {
722
+ sessions: true,
723
+ evaluations: true,
724
+ evaluation_reasons: "all",
725
+ milestones: true,
726
+ prompts: false,
727
+ private_titles: false,
728
+ projects: false,
729
+ model: true,
730
+ languages: true
731
+ };
732
+ DEFAULT_SYNC_CONFIG = {
733
+ enabled: false,
734
+ interval_hours: 24,
735
+ include: { ...DEFAULT_SYNC_INCLUDE_CONFIG }
736
+ };
714
737
  DEFAULT_CONFIG = {
715
- milestone_tracking: true,
716
- auto_sync: true,
738
+ capture: { ...DEFAULT_CAPTURE_CONFIG },
739
+ sync: { ...DEFAULT_SYNC_CONFIG },
717
740
  evaluation_framework: "space"
718
741
  };
719
742
  DEFAULT_SYNC_INTERVAL_HOURS = 24;
@@ -891,7 +914,7 @@ var init_tools = __esm({
891
914
  roo: svg('<path fill="currentColor" d="M12 2C8.13 2 5 5.13 5 9c0 2.38 1.19 4.47 3 5.74V17h2v5h4v-5h2v-2.26c1.81-1.27 3-3.36 3-5.74 0-3.87-3.13-7-7-7zm-2 7.5a1 1 0 11-2 0 1 1 0 012 0zm6 0a1 1 0 11-2 0 1 1 0 012 0z"/>'),
892
915
  "roo-code": svg('<path fill="currentColor" d="M12 2C8.13 2 5 5.13 5 9c0 2.38 1.19 4.47 3 5.74V17h2v5h4v-5h2v-2.26c1.81-1.27 3-3.36 3-5.74 0-3.87-3.13-7-7-7zm-2 7.5a1 1 0 11-2 0 1 1 0 012 0zm6 0a1 1 0 11-2 0 1 1 0 012 0z"/>'),
893
916
  /* ---- OpenCode ---- */
894
- opencode: `data:image/svg+xml,${encodeURIComponent("<svg width='240' height='300' viewBox='0 0 240 300' fill='none' xmlns='http://www.w3.org/2000/svg'><g clip-path='url(#clip0_1401_86274)'><mask id='mask0_1401_86274' style='mask-type:luminance' maskUnits='userSpaceOnUse' x='0' y='0' width='240' height='300'><path d='M240 0H0V300H240V0Z' fill='white'/></mask><g mask='url(#mask0_1401_86274)'><path d='M180 240H60V120H180V240Z' fill='#CFCECD'/><path d='M180 60H60V240H180V60ZM240 300H0V0H240V300Z' fill='#211E1E'/></g></g><defs><clipPath id='clip0_1401_86274'><rect width='240' height='300' fill='white'/></clipPath></defs></svg>")}`,
917
+ opencode: `data:image/svg+xml,${encodeURIComponent('<svg viewBox="6 4.5 12 15" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" clip-rule="evenodd" fill-rule="evenodd" d="M18 19.5H6V4.5H18V19.5ZM15 7.5H9V16.5H15V7.5Z"/></svg>')}`,
895
918
  "kilo-code": `data:image/svg+xml,${encodeURIComponent('<svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="M0,0v100h100V0H0ZM92.5925926,92.5925926H7.4074074V7.4074074h85.1851852v85.1851852ZM61.1111044,71.9096084h9.2592593v7.4074074h-11.6402116l-5.026455-5.026455v-11.6402116h7.4074074v9.2592593ZM77.7777711,71.9096084h-7.4074074v-9.2592593h-9.2592593v-7.4074074h11.6402116l5.026455,5.026455v11.6402116ZM46.2962963,61.1114207h-7.4074074v-7.4074074h7.4074074v7.4074074ZM22.2222222,53.7040133h7.4074074v16.6666667h16.6666667v7.4074074h-19.047619l-5.026455-5.026455v-19.047619ZM77.7777711,38.8888889v7.4074074h-24.0740741v-7.4074074h8.2781918v-9.2592593h-8.2781918v-7.4074074h10.6591442l5.026455,5.026455v11.6402116h8.3884749ZM29.6296296,30.5555556h9.2592593l7.4074074,7.4074074v8.3333333h-7.4074074v-8.3333333h-9.2592593v8.3333333h-7.4074074v-24.0740741h7.4074074v8.3333333ZM46.2962963,30.5555556h-7.4074074v-8.3333333h7.4074074v8.3333333Z"/></svg>')}`,
896
919
  crush: svg('<path fill="currentColor" d="M12 1.6l8.1 4.7v9.4L12 20.4 3.9 15.7V6.3L12 1.6zm0 3.1l-5.4 3.1v6.3l5.4 3.1 5.4-3.1V7.8L12 4.7zm-2.1 4.1h4.2v6.4H9.9V8.8z"/>'),
897
920
  /* ---- Antigravity ---- */
@@ -5518,6 +5541,122 @@ var init_id = __esm({
5518
5541
  }
5519
5542
  });
5520
5543
 
5544
+ // ../shared/dist/utils/config-migrate.js
5545
+ function migrateConfig(raw) {
5546
+ const config2 = { ...raw };
5547
+ if (!config2.capture || typeof config2.capture !== "object") {
5548
+ config2.capture = { ...DEFAULT_CAPTURE_CONFIG };
5549
+ if (typeof raw["milestone_tracking"] === "boolean") {
5550
+ config2.capture.milestones = raw["milestone_tracking"];
5551
+ }
5552
+ } else {
5553
+ const c = config2.capture;
5554
+ config2.capture = {
5555
+ prompt: c.prompt ?? DEFAULT_CAPTURE_CONFIG.prompt,
5556
+ prompt_images: c.prompt_images ?? DEFAULT_CAPTURE_CONFIG.prompt_images,
5557
+ evaluation: c.evaluation ?? DEFAULT_CAPTURE_CONFIG.evaluation,
5558
+ evaluation_reasons: c.evaluation_reasons ?? DEFAULT_CAPTURE_CONFIG.evaluation_reasons,
5559
+ milestones: c.milestones ?? DEFAULT_CAPTURE_CONFIG.milestones
5560
+ };
5561
+ }
5562
+ if (!config2.sync || typeof config2.sync !== "object") {
5563
+ config2.sync = { ...DEFAULT_SYNC_CONFIG, include: { ...DEFAULT_SYNC_INCLUDE_CONFIG } };
5564
+ if (typeof raw["auto_sync"] === "boolean") {
5565
+ config2.sync.enabled = raw["auto_sync"];
5566
+ }
5567
+ if (typeof raw["sync_interval_hours"] === "number") {
5568
+ config2.sync.interval_hours = raw["sync_interval_hours"];
5569
+ }
5570
+ } else {
5571
+ const s = config2.sync;
5572
+ const include = s.include ?? {};
5573
+ config2.sync = {
5574
+ enabled: s.enabled ?? DEFAULT_SYNC_CONFIG.enabled,
5575
+ interval_hours: s.interval_hours ?? DEFAULT_SYNC_CONFIG.interval_hours,
5576
+ include: {
5577
+ sessions: include.sessions ?? DEFAULT_SYNC_INCLUDE_CONFIG.sessions,
5578
+ evaluations: include.evaluations ?? DEFAULT_SYNC_INCLUDE_CONFIG.evaluations,
5579
+ evaluation_reasons: include.evaluation_reasons ?? DEFAULT_SYNC_INCLUDE_CONFIG.evaluation_reasons,
5580
+ milestones: include.milestones ?? DEFAULT_SYNC_INCLUDE_CONFIG.milestones,
5581
+ prompts: include.prompts ?? DEFAULT_SYNC_INCLUDE_CONFIG.prompts,
5582
+ private_titles: include.private_titles ?? DEFAULT_SYNC_INCLUDE_CONFIG.private_titles,
5583
+ projects: include.projects ?? DEFAULT_SYNC_INCLUDE_CONFIG.projects,
5584
+ model: include.model ?? DEFAULT_SYNC_INCLUDE_CONFIG.model,
5585
+ languages: include.languages ?? DEFAULT_SYNC_INCLUDE_CONFIG.languages
5586
+ }
5587
+ };
5588
+ }
5589
+ if (!config2.evaluation_framework) {
5590
+ config2.evaluation_framework = "space";
5591
+ }
5592
+ return config2;
5593
+ }
5594
+ var init_config_migrate = __esm({
5595
+ "../shared/dist/utils/config-migrate.js"() {
5596
+ "use strict";
5597
+ init_defaults();
5598
+ }
5599
+ });
5600
+
5601
+ // ../shared/dist/utils/sync-sanitize.js
5602
+ function filterEvaluationReasons(evaluation, level) {
5603
+ const ev = evaluation;
5604
+ const reasonKeys = [
5605
+ "prompt_quality_reason",
5606
+ "context_provided_reason",
5607
+ "independence_level_reason",
5608
+ "scope_quality_reason"
5609
+ ];
5610
+ if (level === "none") {
5611
+ for (const key of reasonKeys) {
5612
+ delete ev[key];
5613
+ }
5614
+ delete ev.task_outcome_reason;
5615
+ } else if (level === "below_perfect") {
5616
+ const scoreMap = {
5617
+ prompt_quality_reason: "prompt_quality",
5618
+ context_provided_reason: "context_provided",
5619
+ independence_level_reason: "independence_level",
5620
+ scope_quality_reason: "scope_quality"
5621
+ };
5622
+ for (const [reasonKey, scoreKey] of Object.entries(scoreMap)) {
5623
+ if (ev[scoreKey] === 5) {
5624
+ delete ev[reasonKey];
5625
+ }
5626
+ }
5627
+ if (evaluation.task_outcome === "completed") {
5628
+ delete ev.task_outcome_reason;
5629
+ }
5630
+ }
5631
+ }
5632
+ function sanitizeSealForSync(seal, include) {
5633
+ const s = { ...seal };
5634
+ if (!include.prompts)
5635
+ delete s.prompt;
5636
+ if (!include.private_titles)
5637
+ delete s.private_title;
5638
+ if (!include.projects)
5639
+ delete s.project;
5640
+ if (!include.model)
5641
+ delete s.model;
5642
+ if (!include.languages)
5643
+ s.languages = [];
5644
+ if (!include.evaluations) {
5645
+ delete s.evaluation;
5646
+ delete s.session_score;
5647
+ delete s.evaluation_framework;
5648
+ } else if (s.evaluation && include.evaluation_reasons !== "all") {
5649
+ s.evaluation = { ...s.evaluation };
5650
+ filterEvaluationReasons(s.evaluation, include.evaluation_reasons);
5651
+ }
5652
+ return s;
5653
+ }
5654
+ var init_sync_sanitize = __esm({
5655
+ "../shared/dist/utils/sync-sanitize.js"() {
5656
+ "use strict";
5657
+ }
5658
+ });
5659
+
5521
5660
  // ../shared/dist/utils/index.js
5522
5661
  var init_utils = __esm({
5523
5662
  "../shared/dist/utils/index.js"() {
@@ -5526,6 +5665,8 @@ var init_utils = __esm({
5526
5665
  init_format();
5527
5666
  init_detect_client();
5528
5667
  init_id();
5668
+ init_config_migrate();
5669
+ init_sync_sanitize();
5529
5670
  }
5530
5671
  });
5531
5672
 
@@ -6232,7 +6373,7 @@ process.stdin.on('end', () => {
6232
6373
  if (ends >= starts) process.exit(0);
6233
6374
  process.stdout.write(JSON.stringify({
6234
6375
  decision: 'block',
6235
- reason: 'Before ending, call useai_end with milestones (generic descriptions of accomplishments), languages used, and files_touched_count.'
6376
+ reason: 'Before ending, call useai_end with milestones (each with generic title, private_title for details, and category), languages used, and files_touched_count.'
6236
6377
  }));
6237
6378
  } catch { process.exit(0); }
6238
6379
  });
@@ -6344,8 +6485,20 @@ var init_raw = __esm({
6344
6485
  const { prompt_quality, context_provided, independence_level, scope_quality } = evaluation;
6345
6486
  return (prompt_quality + context_provided + independence_level + scope_quality) / 20 * 100;
6346
6487
  },
6347
- getInstructionText() {
6348
- return "- At the END of every response, call `useai_end` with languages used, files_touched_count, milestones (generic descriptions only \u2014 no project names, file paths, or company names), and an `evaluation` object honestly assessing: prompt_quality (1-5), context_provided (1-5), task_outcome, iteration_count, independence_level (1-5), scope_quality (1-5), tools_leveraged count.";
6488
+ getInstructionText(opts) {
6489
+ const reasonsLevel = opts?.evaluationReasons ?? "all";
6490
+ const lines = [
6491
+ "- At the END of every response, call `useai_end` with languages used, files_touched_count, milestones, and an `evaluation` object honestly assessing: prompt_quality (1-5), context_provided (1-5), task_outcome, iteration_count, independence_level (1-5), scope_quality (1-5), tools_leveraged count.",
6492
+ ' - **milestones**: Array of objects, each with required `title` (string, generic \u2014 no project/file names), `category` (string), and optional `private_title` (string, detailed \u2014 can include project names and specifics). Example: `[{"title": "Implemented auth flow", "private_title": "Added OAuth2 to UserService in acme-api", "category": "feature"}]`',
6493
+ " - **milestone category values**: feature, bugfix, refactor, test, docs, setup, deployment, fix, analysis, research, investigation, performance, cleanup, chore, security, migration, design, devops, config, other",
6494
+ " - **task_type values**: coding, debugging, testing, planning, reviewing, documenting, learning, deployment, devops, research, migration, design, data, security, configuration, code_review, investigation, infrastructure, analysis, ops, setup, refactoring, other"
6495
+ ];
6496
+ if (reasonsLevel === "all") {
6497
+ lines.push("- For EVERY scored metric, you MUST provide a *_reason field explaining the score. For < 5: what was lacking + tip to improve. For 5: what the user did well. Always provide task_outcome_reason.");
6498
+ } else if (reasonsLevel === "below_perfect") {
6499
+ lines.push('- For any scored metric < 5, you MUST provide a *_reason field explaining what was lacking and a tip to improve. Only skip *_reason for a perfect 5. Always provide task_outcome_reason if outcome is not "completed".');
6500
+ }
6501
+ return lines.join("\n");
6349
6502
  }
6350
6503
  };
6351
6504
  }
@@ -6420,17 +6573,26 @@ var init_space = __esm({
6420
6573
  const { prompt_quality, context_provided, independence_level, scope_quality } = evaluation;
6421
6574
  return (prompt_quality / 5 * 0.3 + context_provided / 5 * 0.25 + independence_level / 5 * 0.25 + scope_quality / 5 * 0.2) * 100;
6422
6575
  },
6423
- getInstructionText() {
6424
- return [
6425
- "- At the END of every response, call `useai_end` with languages used, files_touched_count, milestones (generic descriptions only \u2014 no project names, file paths, or company names), and an `evaluation` object.",
6576
+ getInstructionText(opts) {
6577
+ const reasonsLevel = opts?.evaluationReasons ?? "all";
6578
+ const lines = [
6579
+ "- At the END of every response, call `useai_end` with languages used, files_touched_count, milestones, and an `evaluation` object.",
6580
+ ' - **milestones**: Array of objects, each with required `title` (string, generic \u2014 no project/file names), `category` (string), and optional `private_title` (string, detailed \u2014 can include project names and specifics). Example: `[{"title": "Implemented auth flow", "private_title": "Added OAuth2 to UserService in acme-api", "category": "feature"}]`',
6581
+ " - **milestone category values**: feature, bugfix, refactor, test, docs, setup, deployment, fix, analysis, research, investigation, performance, cleanup, chore, security, migration, design, devops, config, other",
6582
+ " - **task_type values**: coding, debugging, testing, planning, reviewing, documenting, learning, deployment, devops, research, migration, design, data, security, configuration, code_review, investigation, infrastructure, analysis, ops, setup, refactoring, other",
6426
6583
  "- **Evaluation rubric (SPACE framework):** Score each metric 1-5 using these criteria:",
6427
6584
  " - **prompt_quality** (Communication, weight 0.30): 1=vague/no goal, 3=clear goal but missing edge cases, 5=crystal clear with acceptance criteria",
6428
6585
  " - **context_provided** (Communication, weight 0.25): 1=no context, 3=some files/errors but incomplete, 5=comprehensive with constraints",
6429
6586
  " - **independence_level** (Efficiency, weight 0.25): 1=constant guidance needed, 3=some back-and-forth, 5=clear spec with autonomous execution",
6430
6587
  " - **scope_quality** (Performance, weight 0.20): 1=vague/impossibly broad, 3=reasonable with ambiguity, 5=precise and well-decomposed",
6431
- "- Also include: task_outcome (completed/partial/abandoned/blocked), iteration_count, tools_leveraged count.",
6432
- "- For any scored metric < 5 or non-completed outcome, you MUST provide a *_reason field with a concrete tip to improve."
6433
- ].join("\n");
6588
+ "- Also include: task_outcome (completed/partial/abandoned/blocked), iteration_count, tools_leveraged count."
6589
+ ];
6590
+ if (reasonsLevel === "all") {
6591
+ lines.push("- For EVERY scored metric, you MUST provide a *_reason field explaining the score. For < 5: what was lacking + tip to improve. For 5: what the user did well. Always provide task_outcome_reason.");
6592
+ } else if (reasonsLevel === "below_perfect") {
6593
+ lines.push('- For any scored metric < 5, you MUST provide a *_reason field explaining what was lacking and a tip to improve. Only skip *_reason for a perfect 5. Always provide task_outcome_reason if outcome is not "completed".');
6594
+ }
6595
+ return lines.join("\n");
6434
6596
  }
6435
6597
  };
6436
6598
  }
@@ -6446,14 +6608,19 @@ function getFramework(id) {
6446
6608
  function getFrameworkIds() {
6447
6609
  return Object.keys(frameworks);
6448
6610
  }
6449
- function buildInstructionsText(frameworkId) {
6611
+ function buildInstructionsText(frameworkId, opts) {
6450
6612
  const framework = getFramework(frameworkId);
6613
+ const frameworkOpts = {
6614
+ evaluationReasons: opts?.evaluationReasons
6615
+ };
6616
+ const promptInstruction = opts?.capturePrompt !== false ? ", `prompt` (the user's full verbatim prompt text)" : "";
6451
6617
  return [
6452
6618
  "## UseAI Session Tracking",
6453
- "- At the START of every response to a **user message**, call `useai_start` with the appropriate task_type. Also generate a short session `title` (generic, no project names) and `private_title` (detailed, can include specifics) from the user's prompt.",
6619
+ `- At the START of every response to a **user message**, call \`useai_start\` with the appropriate task_type${promptInstruction}. Also generate a short session \`title\` (generic, no project names) and \`private_title\` (detailed, can include specifics) from the user's prompt.`,
6620
+ " - **task_type values**: coding, debugging, testing, planning, reviewing, documenting, learning, deployment, devops, research, migration, design, data, security, configuration, code_review, investigation, infrastructure, analysis, ops, setup, refactoring, other",
6454
6621
  "- To group multiple prompts in the same conversation, pass the `conversation_id` from the previous `useai_start` response (returned as `conversation_id=<value>`). Omit it for the first message or a new conversation.",
6455
6622
  "- For LONG sessions (15+ min), call `useai_heartbeat` periodically.",
6456
- framework.getInstructionText()
6623
+ framework.getInstructionText(frameworkOpts)
6457
6624
  ].join("\n");
6458
6625
  }
6459
6626
  var frameworks;
@@ -6596,7 +6763,10 @@ __export(dist_exports, {
6596
6763
  DAEMON_PID_FILE: () => DAEMON_PID_FILE,
6597
6764
  DAEMON_PORT: () => DAEMON_PORT,
6598
6765
  DATA_DIR: () => DATA_DIR,
6766
+ DEFAULT_CAPTURE_CONFIG: () => DEFAULT_CAPTURE_CONFIG,
6599
6767
  DEFAULT_CONFIG: () => DEFAULT_CONFIG,
6768
+ DEFAULT_SYNC_CONFIG: () => DEFAULT_SYNC_CONFIG,
6769
+ DEFAULT_SYNC_INCLUDE_CONFIG: () => DEFAULT_SYNC_INCLUDE_CONFIG,
6600
6770
  DEFAULT_SYNC_INTERVAL_HOURS: () => DEFAULT_SYNC_INTERVAL_HOURS,
6601
6771
  GENESIS_HASH: () => GENESIS_HASH,
6602
6772
  KEYSTORE_FILE: () => KEYSTORE_FILE,
@@ -6635,6 +6805,7 @@ __export(dist_exports, {
6635
6805
  exceedsMaxDailyHours: () => exceedsMaxDailyHours,
6636
6806
  fetchDaemonHealth: () => fetchDaemonHealth,
6637
6807
  fetchLatestVersion: () => fetchLatestVersion,
6808
+ filterEvaluationReasons: () => filterEvaluationReasons,
6638
6809
  findPidsByPort: () => findPidsByPort,
6639
6810
  formatDuration: () => formatDuration,
6640
6811
  generateKeystore: () => generateKeystore,
@@ -6651,6 +6822,7 @@ __export(dist_exports, {
6651
6822
  isProcessRunning: () => isProcessRunning,
6652
6823
  isSpikeFromAverage: () => isSpikeFromAverage,
6653
6824
  killDaemon: () => killDaemon,
6825
+ migrateConfig: () => migrateConfig,
6654
6826
  milestoneCategorySchema: () => milestoneCategorySchema,
6655
6827
  milestoneInputSchema: () => milestoneInputSchema,
6656
6828
  normalizeMcpClientName: () => normalizeMcpClientName,
@@ -6663,6 +6835,7 @@ __export(dist_exports, {
6663
6835
  removeClaudeCodeHooks: () => removeClaudeCodeHooks,
6664
6836
  resolveClient: () => resolveClient,
6665
6837
  resolveNpxPath: () => resolveNpxPath,
6838
+ sanitizeSealForSync: () => sanitizeSealForSync,
6666
6839
  signHash: () => signHash,
6667
6840
  spaceFramework: () => spaceFramework,
6668
6841
  syncPayloadSchema: () => syncPayloadSchema,
@@ -14076,12 +14249,11 @@ import { hasBinary, readJsonFile, writeJsonFile, injectInstructions, removeInstr
14076
14249
  import { join as join4 } from "path";
14077
14250
  import { homedir as homedir4 } from "os";
14078
14251
  function getInstructionsText() {
14079
- const config2 = readJson(CONFIG_FILE, {
14080
- milestone_tracking: true,
14081
- auto_sync: true,
14082
- evaluation_framework: "raw"
14252
+ const config2 = migrateConfig(readJson(CONFIG_FILE, {}));
14253
+ return buildInstructionsText(config2.evaluation_framework, {
14254
+ evaluationReasons: config2.capture.evaluation_reasons,
14255
+ capturePrompt: config2.capture.prompt
14083
14256
  });
14084
- return buildInstructionsText(config2.evaluation_framework);
14085
14257
  }
14086
14258
  function getInstructions() {
14087
14259
  return {
@@ -14208,9 +14380,13 @@ var init_tools2 = __esm({
14208
14380
  USEAI_INSTRUCTIONS_TEXT = [
14209
14381
  "## UseAI Session Tracking",
14210
14382
  "- At the START of every response to a **user message**, call `useai_start` with the appropriate task_type. Also generate a short session `title` (generic, no project names) and `private_title` (detailed, can include specifics) from the user's prompt.",
14383
+ " - **task_type values**: coding, debugging, testing, planning, reviewing, documenting, learning, deployment, devops, research, migration, design, data, security, configuration, code_review, investigation, infrastructure, analysis, ops, setup, refactoring, other",
14211
14384
  "- To group multiple prompts in the same conversation, pass the `conversation_id` from the previous `useai_start` response. Omit it for the first message or a new conversation.",
14212
14385
  "- For LONG sessions (15+ min), call `useai_heartbeat` periodically.",
14213
- "- At the END of every response, call `useai_end` with languages used, files_touched_count, milestones (generic descriptions only \u2014 no project names, file paths, or company names), and an `evaluation` object honestly assessing: prompt_quality (1-5), context_provided (1-5), task_outcome, iteration_count, independence_level (1-5), scope_quality (1-5), tools_leveraged count."
14386
+ "- At the END of every response, call `useai_end` with languages used, files_touched_count, milestones, and an `evaluation` object honestly assessing: prompt_quality (1-5), context_provided (1-5), task_outcome, iteration_count, independence_level (1-5), scope_quality (1-5), tools_leveraged count.",
14387
+ ' - **milestones**: Array of objects, each with required `title` (string, generic \u2014 no project/file names), `category` (string), and optional `private_title` (string, detailed \u2014 can include project names and specifics). Example: `[{"title": "Implemented auth flow", "private_title": "Added OAuth2 to UserService in acme-api", "category": "feature"}]`',
14388
+ " - **milestone category values**: feature, bugfix, refactor, test, docs, setup, deployment, fix, analysis, research, investigation, performance, cleanup, chore, security, migration, design, devops, config, other",
14389
+ " - **task_type values**: coding, debugging, testing, planning, reviewing, documenting, learning, deployment, devops, research, migration, design, data, security, configuration, code_review, investigation, infrastructure, analysis, ops, setup, refactoring, other"
14214
14390
  ].join("\n");
14215
14391
  MCP_HTTP_URL = DAEMON_MCP_URL;
14216
14392
  MCP_HTTP_ENTRY = { type: "http", url: MCP_HTTP_URL };
@@ -14400,11 +14576,7 @@ async function singleSelect(message, choices) {
14400
14576
  }
14401
14577
  }
14402
14578
  async function selectFramework(autoYes) {
14403
- const config2 = readJson(CONFIG_FILE, {
14404
- milestone_tracking: true,
14405
- auto_sync: true,
14406
- evaluation_framework: "space"
14407
- });
14579
+ const config2 = migrateConfig(readJson(CONFIG_FILE, {}));
14408
14580
  const currentId = config2.evaluation_framework ?? "space";
14409
14581
  if (autoYes) {
14410
14582
  return currentId;
@@ -14765,6 +14937,7 @@ var init_setup = __esm({
14765
14937
  "use strict";
14766
14938
  init_source();
14767
14939
  init_dist();
14940
+ init_dist();
14768
14941
  init_tools2();
14769
14942
  SPINNER_FRAMES = ["\u280B", "\u2819", "\u2839", "\u2838", "\u283C", "\u2834", "\u2826", "\u2827", "\u2807", "\u280F"];
14770
14943
  }
@@ -33704,6 +33877,8 @@ var init_session_state = __esm({
33704
33877
  sessionTitle;
33705
33878
  sessionPrivateTitle;
33706
33879
  sessionPromptWordCount;
33880
+ sessionPrompt;
33881
+ sessionPromptImageCount;
33707
33882
  project;
33708
33883
  chainTipHash;
33709
33884
  signingKey;
@@ -33751,6 +33926,8 @@ var init_session_state = __esm({
33751
33926
  this.sessionTitle = null;
33752
33927
  this.sessionPrivateTitle = null;
33753
33928
  this.sessionPromptWordCount = null;
33929
+ this.sessionPrompt = null;
33930
+ this.sessionPromptImageCount = 0;
33754
33931
  this.project = null;
33755
33932
  this.chainTipHash = GENESIS_HASH;
33756
33933
  this.signingKey = null;
@@ -33769,6 +33946,8 @@ var init_session_state = __esm({
33769
33946
  this.sessionTitle = null;
33770
33947
  this.sessionPrivateTitle = null;
33771
33948
  this.sessionPromptWordCount = null;
33949
+ this.sessionPrompt = null;
33950
+ this.sessionPromptImageCount = 0;
33772
33951
  this.modelId = null;
33773
33952
  this.startCallTokensEst = null;
33774
33953
  this.inProgress = false;
@@ -33796,6 +33975,12 @@ var init_session_state = __esm({
33796
33975
  setPromptWordCount(count) {
33797
33976
  this.sessionPromptWordCount = count;
33798
33977
  }
33978
+ setPrompt(text) {
33979
+ this.sessionPrompt = text;
33980
+ }
33981
+ setPromptImageCount(count) {
33982
+ this.sessionPromptImageCount = count;
33983
+ }
33799
33984
  setModel(id) {
33800
33985
  this.modelId = id;
33801
33986
  }
@@ -33837,6 +34022,8 @@ var init_session_state = __esm({
33837
34022
  sessionTitle: this.sessionTitle,
33838
34023
  sessionPrivateTitle: this.sessionPrivateTitle,
33839
34024
  sessionPromptWordCount: this.sessionPromptWordCount,
34025
+ sessionPrompt: this.sessionPrompt,
34026
+ sessionPromptImageCount: this.sessionPromptImageCount,
33840
34027
  project: this.project,
33841
34028
  modelId: this.modelId,
33842
34029
  startCallTokensEst: this.startCallTokensEst,
@@ -33864,6 +34051,8 @@ var init_session_state = __esm({
33864
34051
  this.sessionTitle = p.sessionTitle;
33865
34052
  this.sessionPrivateTitle = p.sessionPrivateTitle;
33866
34053
  this.sessionPromptWordCount = p.sessionPromptWordCount;
34054
+ this.sessionPrompt = p.sessionPrompt;
34055
+ this.sessionPromptImageCount = p.sessionPromptImageCount;
33867
34056
  this.project = p.project;
33868
34057
  this.modelId = p.modelId;
33869
34058
  this.startCallTokensEst = p.startCallTokensEst;
@@ -33934,7 +34123,7 @@ __export(register_tools_exports, {
33934
34123
  registerTools: () => registerTools
33935
34124
  });
33936
34125
  import { createHash as createHash3, randomUUID as randomUUID3 } from "crypto";
33937
- import { existsSync as existsSync8, readFileSync as readFileSync5, renameSync as renameSync2 } from "fs";
34126
+ import { existsSync as existsSync8, mkdirSync as mkdirSync5, readFileSync as readFileSync5, readdirSync, renameSync as renameSync2, writeFileSync as writeFileSync5 } from "fs";
33938
34127
  import { join as join7 } from "path";
33939
34128
  function coerceJsonString(schema) {
33940
34129
  return external_exports.preprocess((val) => {
@@ -33949,10 +34138,8 @@ function coerceJsonString(schema) {
33949
34138
  }, schema);
33950
34139
  }
33951
34140
  function getConfig() {
33952
- return readJson(CONFIG_FILE, {
33953
- milestone_tracking: true,
33954
- auto_sync: true
33955
- });
34141
+ const raw = readJson(CONFIG_FILE, {});
34142
+ return migrateConfig(raw);
33956
34143
  }
33957
34144
  function getSessions() {
33958
34145
  return readJson(SESSIONS_FILE, []);
@@ -34011,7 +34198,7 @@ function enrichAutoSealedSession(sealedSessionId, session2, args) {
34011
34198
  let milestoneCount = 0;
34012
34199
  if (args.milestones && args.milestones.length > 0) {
34013
34200
  const config2 = getConfig();
34014
- if (config2.milestone_tracking) {
34201
+ if (config2.capture.milestones) {
34015
34202
  const durationMinutes = Math.round(duration3 / 60);
34016
34203
  const allMilestones = getMilestones();
34017
34204
  for (const m of args.milestones) {
@@ -34096,16 +34283,21 @@ function enrichAutoSealedSession(sealedSessionId, session2, args) {
34096
34283
  function registerTools(server2, session2, opts) {
34097
34284
  server2.tool(
34098
34285
  "useai_start",
34099
- `Start tracking an AI coding session. Call this at the beginning of every response. Generate a session title from the user's prompt: a generic public "title" (no project/file names) and a detailed "private_title" (can include specifics).`,
34286
+ `Start tracking an AI coding session. Call this at the beginning of every response. Generate a session title from the user's prompt: a generic public "title" (no project/file names) and a detailed "private_title" (can include specifics). task_type must be one of: coding, debugging, testing, planning, reviewing, documenting, learning, deployment, devops, research, migration, design, data, security, configuration, code_review, code-review, investigation, infrastructure, analysis, ops, setup, refactoring, other.`,
34100
34287
  {
34101
34288
  task_type: taskTypeSchema.optional().describe("What kind of task is the developer working on?"),
34102
34289
  title: external_exports.string().optional().describe(`Short public session title derived from the user's prompt. No project names, file paths, or identifying details. Example: "Fix authentication bug"`),
34103
34290
  private_title: external_exports.string().optional().describe('Detailed session title for private records. Can include project names and specifics. Example: "Fix JWT refresh in UseAI login flow"'),
34104
34291
  project: external_exports.string().optional().describe('Project name for this session. Typically the root directory name of the codebase being worked on. Example: "goodpass", "useai"'),
34292
+ prompt: external_exports.string().optional().describe("The user's full verbatim prompt text. Stored locally for self-review. Only synced if explicitly enabled in config."),
34293
+ prompt_images: coerceJsonString(external_exports.array(external_exports.object({
34294
+ type: external_exports.literal("image"),
34295
+ description: external_exports.string().describe("AI-generated description of the image")
34296
+ }))).optional().describe("Metadata for images attached to the prompt (description only, no binary data)."),
34105
34297
  model: external_exports.string().optional().describe('The AI model ID running this session. Example: "claude-opus-4-6", "claude-sonnet-4-6"'),
34106
34298
  conversation_id: external_exports.string().optional().describe('Pass the conversation_id value from the previous useai_start response to group multiple prompts in the same conversation. The value is returned as "conversation_id=<uuid>" in the response. Omit for a new conversation.')
34107
34299
  },
34108
- async ({ task_type, title, private_title, project, model, conversation_id }) => {
34300
+ async ({ task_type, title, private_title, prompt, prompt_images, project, model, conversation_id }) => {
34109
34301
  const prevConvId = session2.conversationId;
34110
34302
  const isChildSession = session2.inProgress && session2.sessionRecordCount > 0;
34111
34303
  const parentSessionId = isChildSession ? session2.sessionId : null;
@@ -34135,6 +34327,14 @@ function registerTools(server2, session2, opts) {
34135
34327
  session2.setTaskType(task_type ?? "coding");
34136
34328
  session2.setTitle(title ?? null);
34137
34329
  session2.setPrivateTitle(private_title ?? null);
34330
+ const config2 = getConfig();
34331
+ if (config2.capture.prompt && prompt) {
34332
+ session2.setPrompt(prompt);
34333
+ session2.setPromptWordCount(prompt.split(/\s+/).filter(Boolean).length);
34334
+ }
34335
+ if (config2.capture.prompt_images && prompt_images && prompt_images.length > 0) {
34336
+ session2.setPromptImageCount(prompt_images.length);
34337
+ }
34138
34338
  const chainData = {
34139
34339
  client: session2.clientName,
34140
34340
  task_type: session2.sessionTaskType,
@@ -34147,6 +34347,8 @@ function registerTools(server2, session2, opts) {
34147
34347
  if (private_title) chainData.private_title = private_title;
34148
34348
  if (model) chainData.model = model;
34149
34349
  if (parentSessionId) chainData.parent_session_id = parentSessionId;
34350
+ if (session2.sessionPrompt) chainData.prompt = session2.sessionPrompt;
34351
+ if (session2.sessionPromptImageCount > 0) chainData.prompt_image_count = session2.sessionPromptImageCount;
34150
34352
  const record2 = session2.appendToChain("session_start", chainData);
34151
34353
  session2.inProgress = true;
34152
34354
  session2.inProgressSince = Date.now();
@@ -34194,7 +34396,7 @@ function registerTools(server2, session2, opts) {
34194
34396
  );
34195
34397
  server2.tool(
34196
34398
  "useai_end",
34197
- 'End the current AI coding session and record milestones. Each milestone is an object with required fields: "title" (generic, no project names), "category" (e.g. "feature", "bugfix", "investigation", "analysis", "refactor", "test", "docs"), and optional "private_title" and "complexity". Example: [{"title": "Implemented auth flow", "category": "feature"}]. Also provide an `evaluation` object assessing the session: prompt_quality (1-5), context_provided (1-5), task_outcome (completed/partial/abandoned/blocked), iteration_count, independence_level (1-5), scope_quality (1-5), and tools_leveraged count. Score honestly based on the actual interaction. For any scored metric < 5 or non-completed outcome, you MUST provide a *_reason field explaining what was lacking and a concrete tip for the user to improve next time. Only skip *_reason for a perfect 5.',
34399
+ 'End the current AI coding session and record milestones. Each milestone is an object with required "title" (generic, no project/file names) and "category", plus optional "private_title" (detailed, can include project names and specifics) and "complexity" (simple/medium/complex). milestone category must be one of: feature, bugfix, refactor, test, docs, setup, deployment, fix, bug_fix, testing, documentation, config, configuration, analysis, research, investigation, performance, cleanup, chore, security, migration, design, devops, other. task_type must be one of: coding, debugging, testing, planning, reviewing, documenting, learning, deployment, devops, research, migration, design, data, security, configuration, code_review, code-review, investigation, infrastructure, analysis, ops, setup, refactoring, other. Example milestones: [{"title": "Implemented auth flow", "private_title": "Added OAuth2 to UserService in acme-api", "category": "feature"}, {"title": "Fixed race condition", "category": "bugfix"}]. Also provide an `evaluation` object assessing the session: prompt_quality (1-5), context_provided (1-5), task_outcome (completed/partial/abandoned/blocked), iteration_count, independence_level (1-5), scope_quality (1-5), and tools_leveraged count. Score honestly based on the actual interaction. For EVERY scored metric, you MUST provide a *_reason field explaining the score. For scores < 5, explain what was lacking and give a concrete tip to improve. For a perfect 5, explain what the user did well. Same for task_outcome: always provide task_outcome_reason.',
34198
34400
  {
34199
34401
  session_id: external_exports.string().optional().describe("Session ID to end. If omitted, ends the current active session. Pass the session_id from your useai_start response to explicitly target your own session (important when subagents may have started their own sessions on the same connection)."),
34200
34402
  task_type: taskTypeSchema.optional().describe("What kind of task was the developer working on?"),
@@ -34205,19 +34407,19 @@ function registerTools(server2, session2, opts) {
34205
34407
  private_title: external_exports.string().optional().describe("Detailed description for the user's private records. CAN include project names and specifics."),
34206
34408
  category: milestoneCategorySchema.describe("Required. Type of work: feature, bugfix, refactor, test, docs, investigation, analysis, research, setup, deployment, performance, cleanup, chore, security, migration, design, devops, config, other"),
34207
34409
  complexity: complexitySchema.optional().describe("Optional. simple, medium, or complex. Defaults to medium.")
34208
- }))).optional().describe('Array of milestone objects. Each MUST have "title" (string) and "category" (string). Example: [{"title": "Implemented auth flow", "category": "feature"}, {"title": "Fixed race condition", "category": "bugfix"}]'),
34410
+ }))).optional().describe('Array of milestone objects. Each MUST have "title" (generic, no project names) and "category". Optional: "private_title" (detailed, can include project names). Example: [{"title": "Implemented auth flow", "private_title": "Added OAuth2 to UserService in acme-api", "category": "feature"}]'),
34209
34411
  evaluation: coerceJsonString(external_exports.object({
34210
34412
  prompt_quality: external_exports.number().min(1).max(5).describe("How clear, specific, and complete was the initial prompt? 1=vague/ambiguous, 5=crystal clear with acceptance criteria"),
34211
- prompt_quality_reason: external_exports.string().optional().describe("Required if prompt_quality < 5. Explain what was vague/missing and how the user could phrase it better next time."),
34413
+ prompt_quality_reason: external_exports.string().optional().describe("Always provide. Explain the score: what was clear/vague and how the user could phrase it better."),
34212
34414
  context_provided: external_exports.number().min(1).max(5).describe("Did the user provide relevant context (files, errors, constraints)? 1=no context, 5=comprehensive context"),
34213
- context_provided_reason: external_exports.string().optional().describe("Required if context_provided < 5. What context was missing (files, error logs, constraints) that would have helped?"),
34415
+ context_provided_reason: external_exports.string().optional().describe("Always provide. Explain what context was given or missing (files, error logs, constraints)."),
34214
34416
  task_outcome: external_exports.enum(["completed", "partial", "abandoned", "blocked"]).describe("Was the primary task achieved?"),
34215
- task_outcome_reason: external_exports.string().optional().describe('Required if task_outcome is not "completed". Explain why the task was not fully completed and what blocked progress.'),
34417
+ task_outcome_reason: external_exports.string().optional().describe("Always provide. Explain the outcome: what was accomplished, or what blocked progress if not completed."),
34216
34418
  iteration_count: external_exports.number().min(1).describe("Number of user-to-AI turns in this session"),
34217
34419
  independence_level: external_exports.number().min(1).max(5).describe("How self-directed was the user? 1=needed constant guidance, 5=gave clear spec and let AI execute"),
34218
- independence_level_reason: external_exports.string().optional().describe("Required if independence_level < 5. What decisions needed constant back-and-forth that could have been specified upfront?"),
34420
+ independence_level_reason: external_exports.string().optional().describe("Always provide. Explain the level of autonomy: what the user specified well or what needed back-and-forth."),
34219
34421
  scope_quality: external_exports.number().min(1).max(5).describe("Was the task well-scoped? 1=vague or impossibly broad, 5=precise and achievable"),
34220
- scope_quality_reason: external_exports.string().optional().describe("Required if scope_quality < 5. How was the scope too broad/vague and how could it be better defined?"),
34422
+ scope_quality_reason: external_exports.string().optional().describe("Always provide. Explain the scope: what was well-defined or what was too broad/vague."),
34221
34423
  tools_leveraged: external_exports.number().min(0).describe("Count of distinct AI capabilities used (code gen, debugging, refactoring, testing, docs, etc.)")
34222
34424
  })).optional().describe("AI-assessed evaluation of this session. Score honestly based on the actual interaction.")
34223
34425
  },
@@ -34314,10 +34516,10 @@ function registerTools(server2, session2, opts) {
34314
34516
  const now = (/* @__PURE__ */ new Date()).toISOString();
34315
34517
  const finalTaskType = task_type ?? session2.sessionTaskType;
34316
34518
  const chainStartHash = session2.chainTipHash === "GENESIS" ? "GENESIS" : session2.chainTipHash;
34519
+ const endConfig = getConfig();
34317
34520
  let milestoneCount = 0;
34318
34521
  if (milestonesInput && milestonesInput.length > 0) {
34319
- const config2 = getConfig();
34320
- if (config2.milestone_tracking) {
34522
+ if (endConfig.capture.milestones) {
34321
34523
  const durationMinutes = Math.round(duration3 / 60);
34322
34524
  const allMilestones = getMilestones();
34323
34525
  for (const m of milestonesInput) {
@@ -34354,10 +34556,13 @@ function registerTools(server2, session2, opts) {
34354
34556
  let sessionScore;
34355
34557
  let frameworkId;
34356
34558
  if (evaluation) {
34357
- const config2 = getConfig();
34358
- const framework = getFramework(config2.evaluation_framework);
34559
+ const framework = getFramework(endConfig.evaluation_framework);
34359
34560
  sessionScore = Math.round(framework.computeSessionScore(evaluation));
34360
34561
  frameworkId = framework.id;
34562
+ const captureReasons = endConfig.capture.evaluation_reasons;
34563
+ if (captureReasons !== "all") {
34564
+ filterEvaluationReasons(evaluation, captureReasons);
34565
+ }
34361
34566
  }
34362
34567
  const endParamsJson = JSON.stringify({ task_type, languages, files_touched_count, milestones: milestonesInput, evaluation });
34363
34568
  const endOutputTokensEst = Math.ceil(endParamsJson.length / 4);
@@ -34386,6 +34591,8 @@ function registerTools(server2, session2, opts) {
34386
34591
  project: session2.project,
34387
34592
  title: session2.sessionTitle ?? void 0,
34388
34593
  private_title: session2.sessionPrivateTitle ?? void 0,
34594
+ prompt: session2.sessionPrompt ?? void 0,
34595
+ prompt_image_count: session2.sessionPromptImageCount || void 0,
34389
34596
  prompt_word_count: session2.sessionPromptWordCount ?? void 0,
34390
34597
  model: session2.modelId ?? void 0,
34391
34598
  evaluation: evaluation ?? void 0,
@@ -34438,6 +34645,8 @@ function registerTools(server2, session2, opts) {
34438
34645
  project: session2.project ?? void 0,
34439
34646
  title: session2.sessionTitle ?? void 0,
34440
34647
  private_title: session2.sessionPrivateTitle ?? void 0,
34648
+ prompt: session2.sessionPrompt ?? void 0,
34649
+ prompt_image_count: session2.sessionPromptImageCount || void 0,
34441
34650
  prompt_word_count: session2.sessionPromptWordCount ?? void 0,
34442
34651
  model: session2.modelId ?? void 0,
34443
34652
  evaluation: evaluation ?? void 0,
@@ -34470,6 +34679,88 @@ function registerTools(server2, session2, opts) {
34470
34679
  };
34471
34680
  }
34472
34681
  );
34682
+ server2.tool(
34683
+ "useai_backup",
34684
+ "Export UseAI session data (sealed sessions, milestones) as a JSON backup. Does NOT include auth tokens or encryption keys for security.",
34685
+ {},
34686
+ async () => {
34687
+ try {
34688
+ const sessions2 = getSessions();
34689
+ const milestones = getMilestones();
34690
+ const sealedChains = {};
34691
+ if (existsSync8(SEALED_DIR)) {
34692
+ const files = readdirSync(SEALED_DIR).filter((f) => f.endsWith(".jsonl"));
34693
+ for (const file of files) {
34694
+ sealedChains[file] = readFileSync5(join7(SEALED_DIR, file), "utf-8");
34695
+ }
34696
+ }
34697
+ const backup = {
34698
+ version: 1,
34699
+ exported_at: (/* @__PURE__ */ new Date()).toISOString(),
34700
+ sessions: sessions2,
34701
+ milestones,
34702
+ sealed_chains: sealedChains
34703
+ };
34704
+ return {
34705
+ content: [{ type: "text", text: JSON.stringify(backup) }]
34706
+ };
34707
+ } catch (err) {
34708
+ const message = err instanceof Error ? err.message : String(err);
34709
+ return {
34710
+ content: [{ type: "text", text: JSON.stringify({ success: false, error: message }) }]
34711
+ };
34712
+ }
34713
+ }
34714
+ );
34715
+ server2.tool(
34716
+ "useai_restore",
34717
+ "Import UseAI session data from a JSON backup. Merges sessions and milestones (deduplicates by ID). Writes sealed chain files that do not already exist.",
34718
+ {
34719
+ backup_json: external_exports.string().describe("JSON string from a previous useai_backup export")
34720
+ },
34721
+ async ({ backup_json }) => {
34722
+ try {
34723
+ const backup = JSON.parse(backup_json);
34724
+ let restored = 0;
34725
+ if (backup.sessions && backup.sessions.length > 0) {
34726
+ const existing = getSessions();
34727
+ const existingIds = new Set(existing.map((s) => s.session_id));
34728
+ const newSessions = backup.sessions.filter((s) => !existingIds.has(s.session_id));
34729
+ if (newSessions.length > 0) {
34730
+ writeJson(SESSIONS_FILE, [...existing, ...newSessions]);
34731
+ restored += newSessions.length;
34732
+ }
34733
+ }
34734
+ if (backup.milestones && backup.milestones.length > 0) {
34735
+ const existing = getMilestones();
34736
+ const existingIds = new Set(existing.map((m) => m.id));
34737
+ const newMilestones = backup.milestones.filter((m) => !existingIds.has(m.id));
34738
+ if (newMilestones.length > 0) {
34739
+ writeJson(MILESTONES_FILE, [...existing, ...newMilestones]);
34740
+ restored += newMilestones.length;
34741
+ }
34742
+ }
34743
+ if (backup.sealed_chains) {
34744
+ mkdirSync5(SEALED_DIR, { recursive: true });
34745
+ for (const [filename, content] of Object.entries(backup.sealed_chains)) {
34746
+ const filePath = join7(SEALED_DIR, filename);
34747
+ if (!existsSync8(filePath)) {
34748
+ writeFileSync5(filePath, content, "utf-8");
34749
+ restored++;
34750
+ }
34751
+ }
34752
+ }
34753
+ return {
34754
+ content: [{ type: "text", text: JSON.stringify({ success: true, restored }) }]
34755
+ };
34756
+ } catch (err) {
34757
+ const message = err instanceof Error ? err.message : String(err);
34758
+ return {
34759
+ content: [{ type: "text", text: JSON.stringify({ success: false, error: message }) }]
34760
+ };
34761
+ }
34762
+ }
34763
+ );
34473
34764
  }
34474
34765
  var init_register_tools = __esm({
34475
34766
  "src/register-tools.ts"() {
@@ -34477,6 +34768,7 @@ var init_register_tools = __esm({
34477
34768
  init_zod();
34478
34769
  init_dist();
34479
34770
  init_dist();
34771
+ init_dist();
34480
34772
  init_mcp_map();
34481
34773
  }
34482
34774
  });
@@ -34489,7 +34781,7 @@ function getDashboardHtml() {
34489
34781
  <meta charset="UTF-8" />
34490
34782
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
34491
34783
  <title>UseAI \u2014 Local Dashboard</title>
34492
- <script type="module" crossorigin>function e(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}!function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const e of document.querySelectorAll('link[rel="modulepreload"]'))t(e);new MutationObserver(e=>{for(const n of e)if("childList"===n.type)for(const e of n.addedNodes)"LINK"===e.tagName&&"modulepreload"===e.rel&&t(e)}).observe(document,{childList:!0,subtree:!0})}function t(e){if(e.ep)return;e.ep=!0;const t=function(e){const t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),"use-credentials"===e.crossOrigin?t.credentials="include":"anonymous"===e.crossOrigin?t.credentials="omit":t.credentials="same-origin",t}(e);fetch(e.href,t)}}();var t,n,r={exports:{}},a={};var i,s,o=(n||(n=1,r.exports=function(){if(t)return a;t=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function r(t,n,r){var a=null;if(void 0!==r&&(a=""+r),void 0!==n.key&&(a=""+n.key),"key"in n)for(var i in r={},n)"key"!==i&&(r[i]=n[i]);else r=n;return n=r.ref,{$$typeof:e,type:t,key:a,ref:void 0!==n?n:null,props:r}}return a.Fragment=n,a.jsx=r,a.jsxs=r,a}()),r.exports),l={exports:{}},c={};function u(){if(i)return c;i=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),o=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),h=Symbol.for("react.activity"),p=Symbol.iterator;var m={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,y={};function v(e,t,n){this.props=e,this.context=t,this.refs=y,this.updater=n||m}function x(){}function b(e,t,n){this.props=e,this.context=t,this.refs=y,this.updater=n||m}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},x.prototype=v.prototype;var w=b.prototype=new x;w.constructor=b,g(w,v.prototype),w.isPureReactComponent=!0;var k=Array.isArray;function S(){}var j={H:null,A:null,T:null,S:null},C=Object.prototype.hasOwnProperty;function N(t,n,r){var a=r.ref;return{$$typeof:e,type:t,key:n,ref:void 0!==a?a:null,props:r}}function T(t){return"object"==typeof t&&null!==t&&t.$$typeof===e}var E=/\\/+/g;function M(e,t){return"object"==typeof e&&null!==e&&null!=e.key?(n=""+e.key,r={"=":"=0",":":"=2"},"$"+n.replace(/[=:]/g,function(e){return r[e]})):t.toString(36);var n,r}function P(n,r,a,i,s){var o=typeof n;"undefined"!==o&&"boolean"!==o||(n=null);var l,c,u=!1;if(null===n)u=!0;else switch(o){case"bigint":case"string":case"number":u=!0;break;case"object":switch(n.$$typeof){case e:case t:u=!0;break;case f:return P((u=n._init)(n._payload),r,a,i,s)}}if(u)return s=s(n),u=""===i?"."+M(n,0):i,k(s)?(a="",null!=u&&(a=u.replace(E,"$&/")+"/"),P(s,r,a,"",function(e){return e})):null!=s&&(T(s)&&(l=s,c=a+(null==s.key||n&&n.key===s.key?"":(""+s.key).replace(E,"$&/")+"/")+u,s=N(l.type,c,l.props)),r.push(s)),1;u=0;var d,h=""===i?".":i+":";if(k(n))for(var m=0;m<n.length;m++)u+=P(i=n[m],r,a,o=h+M(i,m),s);else if("function"==typeof(m=null===(d=n)||"object"!=typeof d?null:"function"==typeof(d=p&&d[p]||d["@@iterator"])?d:null))for(n=m.call(n),m=0;!(i=n.next()).done;)u+=P(i=i.value,r,a,o=h+M(i,m++),s);else if("object"===o){if("function"==typeof n.then)return P(function(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch("string"==typeof e.status?e.then(S,S):(e.status="pending",e.then(function(t){"pending"===e.status&&(e.status="fulfilled",e.value=t)},function(t){"pending"===e.status&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}(n),r,a,i,s);throw r=String(n),Error("Objects are not valid as a React child (found: "+("[object Object]"===r?"object with keys {"+Object.keys(n).join(", ")+"}":r)+"). If you meant to render a collection of children, use an array instead.")}return u}function L(e,t,n){if(null==e)return e;var r=[],a=0;return P(e,r,"","",function(e){return t.call(n,e,a++)}),r}function D(e){if(-1===e._status){var t=e._result;(t=t()).then(function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)},function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)}),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var A="function"==typeof reportError?reportError:function(e){if("object"==typeof window&&"function"==typeof window.ErrorEvent){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:"object"==typeof e&&null!==e&&"string"==typeof e.message?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if("object"==typeof process&&"function"==typeof process.emit)return void process.emit("uncaughtException",e);console.error(e)},_={map:L,forEach:function(e,t,n){L(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return L(e,function(){t++}),t},toArray:function(e){return L(e,function(e){return e})||[]},only:function(e){if(!T(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};return c.Activity=h,c.Children=_,c.Component=v,c.Fragment=n,c.Profiler=a,c.PureComponent=b,c.StrictMode=r,c.Suspense=u,c.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=j,c.__COMPILER_RUNTIME={__proto__:null,c:function(e){return j.H.useMemoCache(e)}},c.cache=function(e){return function(){return e.apply(null,arguments)}},c.cacheSignal=function(){return null},c.cloneElement=function(e,t,n){if(null==e)throw Error("The argument must be a React element, but you passed "+e+".");var r=g({},e.props),a=e.key;if(null!=t)for(i in void 0!==t.key&&(a=""+t.key),t)!C.call(t,i)||"key"===i||"__self"===i||"__source"===i||"ref"===i&&void 0===t.ref||(r[i]=t[i]);var i=arguments.length-2;if(1===i)r.children=n;else if(1<i){for(var s=Array(i),o=0;o<i;o++)s[o]=arguments[o+2];r.children=s}return N(e.type,a,r)},c.createContext=function(e){return(e={$$typeof:o,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider=e,e.Consumer={$$typeof:s,_context:e},e},c.createElement=function(e,t,n){var r,a={},i=null;if(null!=t)for(r in void 0!==t.key&&(i=""+t.key),t)C.call(t,r)&&"key"!==r&&"__self"!==r&&"__source"!==r&&(a[r]=t[r]);var s=arguments.length-2;if(1===s)a.children=n;else if(1<s){for(var o=Array(s),l=0;l<s;l++)o[l]=arguments[l+2];a.children=o}if(e&&e.defaultProps)for(r in s=e.defaultProps)void 0===a[r]&&(a[r]=s[r]);return N(e,i,a)},c.createRef=function(){return{current:null}},c.forwardRef=function(e){return{$$typeof:l,render:e}},c.isValidElement=T,c.lazy=function(e){return{$$typeof:f,_payload:{_status:-1,_result:e},_init:D}},c.memo=function(e,t){return{$$typeof:d,type:e,compare:void 0===t?null:t}},c.startTransition=function(e){var t=j.T,n={};j.T=n;try{var r=e(),a=j.S;null!==a&&a(n,r),"object"==typeof r&&null!==r&&"function"==typeof r.then&&r.then(S,A)}catch(i){A(i)}finally{null!==t&&null!==n.types&&(t.types=n.types),j.T=t}},c.unstable_useCacheRefresh=function(){return j.H.useCacheRefresh()},c.use=function(e){return j.H.use(e)},c.useActionState=function(e,t,n){return j.H.useActionState(e,t,n)},c.useCallback=function(e,t){return j.H.useCallback(e,t)},c.useContext=function(e){return j.H.useContext(e)},c.useDebugValue=function(){},c.useDeferredValue=function(e,t){return j.H.useDeferredValue(e,t)},c.useEffect=function(e,t){return j.H.useEffect(e,t)},c.useEffectEvent=function(e){return j.H.useEffectEvent(e)},c.useId=function(){return j.H.useId()},c.useImperativeHandle=function(e,t,n){return j.H.useImperativeHandle(e,t,n)},c.useInsertionEffect=function(e,t){return j.H.useInsertionEffect(e,t)},c.useLayoutEffect=function(e,t){return j.H.useLayoutEffect(e,t)},c.useMemo=function(e,t){return j.H.useMemo(e,t)},c.useOptimistic=function(e,t){return j.H.useOptimistic(e,t)},c.useReducer=function(e,t,n){return j.H.useReducer(e,t,n)},c.useRef=function(e){return j.H.useRef(e)},c.useState=function(e){return j.H.useState(e)},c.useSyncExternalStore=function(e,t,n){return j.H.useSyncExternalStore(e,t,n)},c.useTransition=function(){return j.H.useTransition()},c.version="19.2.4",c}function d(){return s||(s=1,l.exports=u()),l.exports}var f=d();const h=e(f);var p,m,g={exports:{}},y={},v={exports:{}},x={};function b(){return m||(m=1,v.exports=(p||(p=1,function(e){function t(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,i=e[r];if(!(0<a(i,t)))break e;e[r]=t,e[n]=i,n=r}}function n(e){return 0===e.length?null:e[0]}function r(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,i=e.length,s=i>>>1;r<s;){var o=2*(r+1)-1,l=e[o],c=o+1,u=e[c];if(0>a(l,n))c<i&&0>a(u,l)?(e[r]=u,e[c]=n,r=c):(e[r]=l,e[o]=n,r=o);else{if(!(c<i&&0>a(u,n)))break e;e[r]=u,e[c]=n,r=c}}}return t}function a(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if(e.unstable_now=void 0,"object"==typeof performance&&"function"==typeof performance.now){var i=performance;e.unstable_now=function(){return i.now()}}else{var s=Date,o=s.now();e.unstable_now=function(){return s.now()-o}}var l=[],c=[],u=1,d=null,f=3,h=!1,p=!1,m=!1,g=!1,y="function"==typeof setTimeout?setTimeout:null,v="function"==typeof clearTimeout?clearTimeout:null,x="undefined"!=typeof setImmediate?setImmediate:null;function b(e){for(var a=n(c);null!==a;){if(null===a.callback)r(c);else{if(!(a.startTime<=e))break;r(c),a.sortIndex=a.expirationTime,t(l,a)}a=n(c)}}function w(e){if(m=!1,b(e),!p)if(null!==n(l))p=!0,S||(S=!0,k());else{var t=n(c);null!==t&&L(w,t.startTime-e)}}var k,S=!1,j=-1,C=5,N=-1;function T(){return!(!g&&e.unstable_now()-N<C)}function E(){if(g=!1,S){var t=e.unstable_now();N=t;var a=!0;try{e:{p=!1,m&&(m=!1,v(j),j=-1),h=!0;var i=f;try{t:{for(b(t),d=n(l);null!==d&&!(d.expirationTime>t&&T());){var s=d.callback;if("function"==typeof s){d.callback=null,f=d.priorityLevel;var o=s(d.expirationTime<=t);if(t=e.unstable_now(),"function"==typeof o){d.callback=o,b(t),a=!0;break t}d===n(l)&&r(l),b(t)}else r(l);d=n(l)}if(null!==d)a=!0;else{var u=n(c);null!==u&&L(w,u.startTime-t),a=!1}}break e}finally{d=null,f=i,h=!1}a=void 0}}finally{a?k():S=!1}}}if("function"==typeof x)k=function(){x(E)};else if("undefined"!=typeof MessageChannel){var M=new MessageChannel,P=M.port2;M.port1.onmessage=E,k=function(){P.postMessage(null)}}else k=function(){y(E,0)};function L(t,n){j=y(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):C=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,a,i){var s=e.unstable_now();switch(i="object"==typeof i&&null!==i&&"number"==typeof(i=i.delay)&&0<i?s+i:s,r){case 1:var o=-1;break;case 2:o=250;break;case 5:o=1073741823;break;case 4:o=1e4;break;default:o=5e3}return r={id:u++,callback:a,priorityLevel:r,startTime:i,expirationTime:o=i+o,sortIndex:-1},i>s?(r.sortIndex=i,t(c,r),null===n(l)&&r===n(c)&&(m?(v(j),j=-1):m=!0,L(w,i-s))):(r.sortIndex=o,t(l,r),p||h||(p=!0,S||(S=!0,k()))),r},e.unstable_shouldYield=T,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}}(x)),x)),v.exports}var w,k,S,j,C={exports:{}},N={};function T(){if(w)return N;w=1;var e=d();function t(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var r={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},a=Symbol.for("react.portal");var i=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function s(e,t){return"font"===e?"":"string"==typeof t?"use-credentials"===t?t:"":void 0}return N.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,N.createPortal=function(e,n){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!n||1!==n.nodeType&&9!==n.nodeType&&11!==n.nodeType)throw Error(t(299));return function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:a,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,n,null,r)},N.flushSync=function(e){var t=i.T,n=r.p;try{if(i.T=null,r.p=2,e)return e()}finally{i.T=t,r.p=n,r.d.f()}},N.preconnect=function(e,t){"string"==typeof e&&(t?t="string"==typeof(t=t.crossOrigin)?"use-credentials"===t?t:"":void 0:t=null,r.d.C(e,t))},N.prefetchDNS=function(e){"string"==typeof e&&r.d.D(e)},N.preinit=function(e,t){if("string"==typeof e&&t&&"string"==typeof t.as){var n=t.as,a=s(n,t.crossOrigin),i="string"==typeof t.integrity?t.integrity:void 0,o="string"==typeof t.fetchPriority?t.fetchPriority:void 0;"style"===n?r.d.S(e,"string"==typeof t.precedence?t.precedence:void 0,{crossOrigin:a,integrity:i,fetchPriority:o}):"script"===n&&r.d.X(e,{crossOrigin:a,integrity:i,fetchPriority:o,nonce:"string"==typeof t.nonce?t.nonce:void 0})}},N.preinitModule=function(e,t){if("string"==typeof e)if("object"==typeof t&&null!==t){if(null==t.as||"script"===t.as){var n=s(t.as,t.crossOrigin);r.d.M(e,{crossOrigin:n,integrity:"string"==typeof t.integrity?t.integrity:void 0,nonce:"string"==typeof t.nonce?t.nonce:void 0})}}else null==t&&r.d.M(e)},N.preload=function(e,t){if("string"==typeof e&&"object"==typeof t&&null!==t&&"string"==typeof t.as){var n=t.as,a=s(n,t.crossOrigin);r.d.L(e,n,{crossOrigin:a,integrity:"string"==typeof t.integrity?t.integrity:void 0,nonce:"string"==typeof t.nonce?t.nonce:void 0,type:"string"==typeof t.type?t.type:void 0,fetchPriority:"string"==typeof t.fetchPriority?t.fetchPriority:void 0,referrerPolicy:"string"==typeof t.referrerPolicy?t.referrerPolicy:void 0,imageSrcSet:"string"==typeof t.imageSrcSet?t.imageSrcSet:void 0,imageSizes:"string"==typeof t.imageSizes?t.imageSizes:void 0,media:"string"==typeof t.media?t.media:void 0})}},N.preloadModule=function(e,t){if("string"==typeof e)if(t){var n=s(t.as,t.crossOrigin);r.d.m(e,{as:"string"==typeof t.as&&"script"!==t.as?t.as:void 0,crossOrigin:n,integrity:"string"==typeof t.integrity?t.integrity:void 0})}else r.d.m(e)},N.requestFormReset=function(e){r.d.r(e)},N.unstable_batchedUpdates=function(e,t){return e(t)},N.useFormState=function(e,t,n){return i.H.useFormState(e,t,n)},N.useFormStatus=function(){return i.H.useHostTransitionStatus()},N.version="19.2.4",N}function E(){if(k)return C.exports;return k=1,function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),C.exports=T(),C.exports}
34784
+ <script type="module" crossorigin>function e(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}!function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const e of document.querySelectorAll('link[rel="modulepreload"]'))t(e);new MutationObserver(e=>{for(const n of e)if("childList"===n.type)for(const e of n.addedNodes)"LINK"===e.tagName&&"modulepreload"===e.rel&&t(e)}).observe(document,{childList:!0,subtree:!0})}function t(e){if(e.ep)return;e.ep=!0;const t=function(e){const t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),"use-credentials"===e.crossOrigin?t.credentials="include":"anonymous"===e.crossOrigin?t.credentials="omit":t.credentials="same-origin",t}(e);fetch(e.href,t)}}();var t,n,r={exports:{}},a={};var s,i,o=(n||(n=1,r.exports=function(){if(t)return a;t=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function r(t,n,r){var a=null;if(void 0!==r&&(a=""+r),void 0!==n.key&&(a=""+n.key),"key"in n)for(var s in r={},n)"key"!==s&&(r[s]=n[s]);else r=n;return n=r.ref,{$$typeof:e,type:t,key:a,ref:void 0!==n?n:null,props:r}}return a.Fragment=n,a.jsx=r,a.jsxs=r,a}()),r.exports),l={exports:{}},c={};function u(){if(s)return c;s=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),o=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),f=Symbol.for("react.activity"),p=Symbol.iterator;var m={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,y={};function v(e,t,n){this.props=e,this.context=t,this.refs=y,this.updater=n||m}function x(){}function b(e,t,n){this.props=e,this.context=t,this.refs=y,this.updater=n||m}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},x.prototype=v.prototype;var w=b.prototype=new x;w.constructor=b,g(w,v.prototype),w.isPureReactComponent=!0;var k=Array.isArray;function S(){}var j={H:null,A:null,T:null,S:null},C=Object.prototype.hasOwnProperty;function N(t,n,r){var a=r.ref;return{$$typeof:e,type:t,key:n,ref:void 0!==a?a:null,props:r}}function T(t){return"object"==typeof t&&null!==t&&t.$$typeof===e}var E=/\\/+/g;function M(e,t){return"object"==typeof e&&null!==e&&null!=e.key?(n=""+e.key,r={"=":"=0",":":"=2"},"$"+n.replace(/[=:]/g,function(e){return r[e]})):t.toString(36);var n,r}function P(n,r,a,s,i){var o=typeof n;"undefined"!==o&&"boolean"!==o||(n=null);var l,c,u=!1;if(null===n)u=!0;else switch(o){case"bigint":case"string":case"number":u=!0;break;case"object":switch(n.$$typeof){case e:case t:u=!0;break;case h:return P((u=n._init)(n._payload),r,a,s,i)}}if(u)return i=i(n),u=""===s?"."+M(n,0):s,k(i)?(a="",null!=u&&(a=u.replace(E,"$&/")+"/"),P(i,r,a,"",function(e){return e})):null!=i&&(T(i)&&(l=i,c=a+(null==i.key||n&&n.key===i.key?"":(""+i.key).replace(E,"$&/")+"/")+u,i=N(l.type,c,l.props)),r.push(i)),1;u=0;var d,f=""===s?".":s+":";if(k(n))for(var m=0;m<n.length;m++)u+=P(s=n[m],r,a,o=f+M(s,m),i);else if("function"==typeof(m=null===(d=n)||"object"!=typeof d?null:"function"==typeof(d=p&&d[p]||d["@@iterator"])?d:null))for(n=m.call(n),m=0;!(s=n.next()).done;)u+=P(s=s.value,r,a,o=f+M(s,m++),i);else if("object"===o){if("function"==typeof n.then)return P(function(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch("string"==typeof e.status?e.then(S,S):(e.status="pending",e.then(function(t){"pending"===e.status&&(e.status="fulfilled",e.value=t)},function(t){"pending"===e.status&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}(n),r,a,s,i);throw r=String(n),Error("Objects are not valid as a React child (found: "+("[object Object]"===r?"object with keys {"+Object.keys(n).join(", ")+"}":r)+"). If you meant to render a collection of children, use an array instead.")}return u}function L(e,t,n){if(null==e)return e;var r=[],a=0;return P(e,r,"","",function(e){return t.call(n,e,a++)}),r}function D(e){if(-1===e._status){var t=e._result;(t=t()).then(function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)},function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)}),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var A="function"==typeof reportError?reportError:function(e){if("object"==typeof window&&"function"==typeof window.ErrorEvent){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:"object"==typeof e&&null!==e&&"string"==typeof e.message?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if("object"==typeof process&&"function"==typeof process.emit)return void process.emit("uncaughtException",e);console.error(e)},_={map:L,forEach:function(e,t,n){L(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return L(e,function(){t++}),t},toArray:function(e){return L(e,function(e){return e})||[]},only:function(e){if(!T(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};return c.Activity=f,c.Children=_,c.Component=v,c.Fragment=n,c.Profiler=a,c.PureComponent=b,c.StrictMode=r,c.Suspense=u,c.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=j,c.__COMPILER_RUNTIME={__proto__:null,c:function(e){return j.H.useMemoCache(e)}},c.cache=function(e){return function(){return e.apply(null,arguments)}},c.cacheSignal=function(){return null},c.cloneElement=function(e,t,n){if(null==e)throw Error("The argument must be a React element, but you passed "+e+".");var r=g({},e.props),a=e.key;if(null!=t)for(s in void 0!==t.key&&(a=""+t.key),t)!C.call(t,s)||"key"===s||"__self"===s||"__source"===s||"ref"===s&&void 0===t.ref||(r[s]=t[s]);var s=arguments.length-2;if(1===s)r.children=n;else if(1<s){for(var i=Array(s),o=0;o<s;o++)i[o]=arguments[o+2];r.children=i}return N(e.type,a,r)},c.createContext=function(e){return(e={$$typeof:o,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider=e,e.Consumer={$$typeof:i,_context:e},e},c.createElement=function(e,t,n){var r,a={},s=null;if(null!=t)for(r in void 0!==t.key&&(s=""+t.key),t)C.call(t,r)&&"key"!==r&&"__self"!==r&&"__source"!==r&&(a[r]=t[r]);var i=arguments.length-2;if(1===i)a.children=n;else if(1<i){for(var o=Array(i),l=0;l<i;l++)o[l]=arguments[l+2];a.children=o}if(e&&e.defaultProps)for(r in i=e.defaultProps)void 0===a[r]&&(a[r]=i[r]);return N(e,s,a)},c.createRef=function(){return{current:null}},c.forwardRef=function(e){return{$$typeof:l,render:e}},c.isValidElement=T,c.lazy=function(e){return{$$typeof:h,_payload:{_status:-1,_result:e},_init:D}},c.memo=function(e,t){return{$$typeof:d,type:e,compare:void 0===t?null:t}},c.startTransition=function(e){var t=j.T,n={};j.T=n;try{var r=e(),a=j.S;null!==a&&a(n,r),"object"==typeof r&&null!==r&&"function"==typeof r.then&&r.then(S,A)}catch(s){A(s)}finally{null!==t&&null!==n.types&&(t.types=n.types),j.T=t}},c.unstable_useCacheRefresh=function(){return j.H.useCacheRefresh()},c.use=function(e){return j.H.use(e)},c.useActionState=function(e,t,n){return j.H.useActionState(e,t,n)},c.useCallback=function(e,t){return j.H.useCallback(e,t)},c.useContext=function(e){return j.H.useContext(e)},c.useDebugValue=function(){},c.useDeferredValue=function(e,t){return j.H.useDeferredValue(e,t)},c.useEffect=function(e,t){return j.H.useEffect(e,t)},c.useEffectEvent=function(e){return j.H.useEffectEvent(e)},c.useId=function(){return j.H.useId()},c.useImperativeHandle=function(e,t,n){return j.H.useImperativeHandle(e,t,n)},c.useInsertionEffect=function(e,t){return j.H.useInsertionEffect(e,t)},c.useLayoutEffect=function(e,t){return j.H.useLayoutEffect(e,t)},c.useMemo=function(e,t){return j.H.useMemo(e,t)},c.useOptimistic=function(e,t){return j.H.useOptimistic(e,t)},c.useReducer=function(e,t,n){return j.H.useReducer(e,t,n)},c.useRef=function(e){return j.H.useRef(e)},c.useState=function(e){return j.H.useState(e)},c.useSyncExternalStore=function(e,t,n){return j.H.useSyncExternalStore(e,t,n)},c.useTransition=function(){return j.H.useTransition()},c.version="19.2.4",c}function d(){return i||(i=1,l.exports=u()),l.exports}var h=d();const f=e(h);var p,m,g={exports:{}},y={},v={exports:{}},x={};function b(){return m||(m=1,v.exports=(p||(p=1,function(e){function t(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,s=e[r];if(!(0<a(s,t)))break e;e[r]=t,e[n]=s,n=r}}function n(e){return 0===e.length?null:e[0]}function r(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,s=e.length,i=s>>>1;r<i;){var o=2*(r+1)-1,l=e[o],c=o+1,u=e[c];if(0>a(l,n))c<s&&0>a(u,l)?(e[r]=u,e[c]=n,r=c):(e[r]=l,e[o]=n,r=o);else{if(!(c<s&&0>a(u,n)))break e;e[r]=u,e[c]=n,r=c}}}return t}function a(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if(e.unstable_now=void 0,"object"==typeof performance&&"function"==typeof performance.now){var s=performance;e.unstable_now=function(){return s.now()}}else{var i=Date,o=i.now();e.unstable_now=function(){return i.now()-o}}var l=[],c=[],u=1,d=null,h=3,f=!1,p=!1,m=!1,g=!1,y="function"==typeof setTimeout?setTimeout:null,v="function"==typeof clearTimeout?clearTimeout:null,x="undefined"!=typeof setImmediate?setImmediate:null;function b(e){for(var a=n(c);null!==a;){if(null===a.callback)r(c);else{if(!(a.startTime<=e))break;r(c),a.sortIndex=a.expirationTime,t(l,a)}a=n(c)}}function w(e){if(m=!1,b(e),!p)if(null!==n(l))p=!0,S||(S=!0,k());else{var t=n(c);null!==t&&L(w,t.startTime-e)}}var k,S=!1,j=-1,C=5,N=-1;function T(){return!(!g&&e.unstable_now()-N<C)}function E(){if(g=!1,S){var t=e.unstable_now();N=t;var a=!0;try{e:{p=!1,m&&(m=!1,v(j),j=-1),f=!0;var s=h;try{t:{for(b(t),d=n(l);null!==d&&!(d.expirationTime>t&&T());){var i=d.callback;if("function"==typeof i){d.callback=null,h=d.priorityLevel;var o=i(d.expirationTime<=t);if(t=e.unstable_now(),"function"==typeof o){d.callback=o,b(t),a=!0;break t}d===n(l)&&r(l),b(t)}else r(l);d=n(l)}if(null!==d)a=!0;else{var u=n(c);null!==u&&L(w,u.startTime-t),a=!1}}break e}finally{d=null,h=s,f=!1}a=void 0}}finally{a?k():S=!1}}}if("function"==typeof x)k=function(){x(E)};else if("undefined"!=typeof MessageChannel){var M=new MessageChannel,P=M.port2;M.port1.onmessage=E,k=function(){P.postMessage(null)}}else k=function(){y(E,0)};function L(t,n){j=y(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):C=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return h},e.unstable_next=function(e){switch(h){case 1:case 2:case 3:var t=3;break;default:t=h}var n=h;h=t;try{return e()}finally{h=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=h;h=e;try{return t()}finally{h=n}},e.unstable_scheduleCallback=function(r,a,s){var i=e.unstable_now();switch(s="object"==typeof s&&null!==s&&"number"==typeof(s=s.delay)&&0<s?i+s:i,r){case 1:var o=-1;break;case 2:o=250;break;case 5:o=1073741823;break;case 4:o=1e4;break;default:o=5e3}return r={id:u++,callback:a,priorityLevel:r,startTime:s,expirationTime:o=s+o,sortIndex:-1},s>i?(r.sortIndex=s,t(c,r),null===n(l)&&r===n(c)&&(m?(v(j),j=-1):m=!0,L(w,s-i))):(r.sortIndex=o,t(l,r),p||f||(p=!0,S||(S=!0,k()))),r},e.unstable_shouldYield=T,e.unstable_wrapCallback=function(e){var t=h;return function(){var n=h;h=t;try{return e.apply(this,arguments)}finally{h=n}}}}(x)),x)),v.exports}var w,k,S,j,C={exports:{}},N={};function T(){if(w)return N;w=1;var e=d();function t(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var r={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},a=Symbol.for("react.portal");var s=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function i(e,t){return"font"===e?"":"string"==typeof t?"use-credentials"===t?t:"":void 0}return N.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,N.createPortal=function(e,n){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!n||1!==n.nodeType&&9!==n.nodeType&&11!==n.nodeType)throw Error(t(299));return function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:a,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,n,null,r)},N.flushSync=function(e){var t=s.T,n=r.p;try{if(s.T=null,r.p=2,e)return e()}finally{s.T=t,r.p=n,r.d.f()}},N.preconnect=function(e,t){"string"==typeof e&&(t?t="string"==typeof(t=t.crossOrigin)?"use-credentials"===t?t:"":void 0:t=null,r.d.C(e,t))},N.prefetchDNS=function(e){"string"==typeof e&&r.d.D(e)},N.preinit=function(e,t){if("string"==typeof e&&t&&"string"==typeof t.as){var n=t.as,a=i(n,t.crossOrigin),s="string"==typeof t.integrity?t.integrity:void 0,o="string"==typeof t.fetchPriority?t.fetchPriority:void 0;"style"===n?r.d.S(e,"string"==typeof t.precedence?t.precedence:void 0,{crossOrigin:a,integrity:s,fetchPriority:o}):"script"===n&&r.d.X(e,{crossOrigin:a,integrity:s,fetchPriority:o,nonce:"string"==typeof t.nonce?t.nonce:void 0})}},N.preinitModule=function(e,t){if("string"==typeof e)if("object"==typeof t&&null!==t){if(null==t.as||"script"===t.as){var n=i(t.as,t.crossOrigin);r.d.M(e,{crossOrigin:n,integrity:"string"==typeof t.integrity?t.integrity:void 0,nonce:"string"==typeof t.nonce?t.nonce:void 0})}}else null==t&&r.d.M(e)},N.preload=function(e,t){if("string"==typeof e&&"object"==typeof t&&null!==t&&"string"==typeof t.as){var n=t.as,a=i(n,t.crossOrigin);r.d.L(e,n,{crossOrigin:a,integrity:"string"==typeof t.integrity?t.integrity:void 0,nonce:"string"==typeof t.nonce?t.nonce:void 0,type:"string"==typeof t.type?t.type:void 0,fetchPriority:"string"==typeof t.fetchPriority?t.fetchPriority:void 0,referrerPolicy:"string"==typeof t.referrerPolicy?t.referrerPolicy:void 0,imageSrcSet:"string"==typeof t.imageSrcSet?t.imageSrcSet:void 0,imageSizes:"string"==typeof t.imageSizes?t.imageSizes:void 0,media:"string"==typeof t.media?t.media:void 0})}},N.preloadModule=function(e,t){if("string"==typeof e)if(t){var n=i(t.as,t.crossOrigin);r.d.m(e,{as:"string"==typeof t.as&&"script"!==t.as?t.as:void 0,crossOrigin:n,integrity:"string"==typeof t.integrity?t.integrity:void 0})}else r.d.m(e)},N.requestFormReset=function(e){r.d.r(e)},N.unstable_batchedUpdates=function(e,t){return e(t)},N.useFormState=function(e,t,n){return s.H.useFormState(e,t,n)},N.useFormStatus=function(){return s.H.useHostTransitionStatus()},N.version="19.2.4",N}function E(){if(k)return C.exports;return k=1,function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),C.exports=T(),C.exports}
34493
34785
  /**
34494
34786
  * @license React
34495
34787
  * react-dom-client.production.js
@@ -34498,7 +34790,7 @@ function getDashboardHtml() {
34498
34790
  *
34499
34791
  * This source code is licensed under the MIT license found in the
34500
34792
  * LICENSE file in the root directory of this source tree.
34501
- */function M(){if(S)return y;S=1;var e=b(),t=d(),n=E();function r(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function a(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function i(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{!!(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function s(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function o(e){if(31===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function l(e){if(i(e)!==e)throw Error(r(188))}function c(e){var t=e.tag;if(5===t||26===t||27===t||6===t)return e;for(e=e.child;null!==e;){if(null!==(t=c(e)))return t;e=e.sibling}return null}var u=Object.assign,f=Symbol.for("react.element"),h=Symbol.for("react.transitional.element"),p=Symbol.for("react.portal"),m=Symbol.for("react.fragment"),g=Symbol.for("react.strict_mode"),v=Symbol.for("react.profiler"),x=Symbol.for("react.consumer"),w=Symbol.for("react.context"),k=Symbol.for("react.forward_ref"),j=Symbol.for("react.suspense"),C=Symbol.for("react.suspense_list"),N=Symbol.for("react.memo"),T=Symbol.for("react.lazy"),M=Symbol.for("react.activity"),P=Symbol.for("react.memo_cache_sentinel"),L=Symbol.iterator;function D(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=L&&e[L]||e["@@iterator"])?e:null}var A=Symbol.for("react.client.reference");function _(e){if(null==e)return null;if("function"==typeof e)return e.$$typeof===A?null:e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case m:return"Fragment";case v:return"Profiler";case g:return"StrictMode";case j:return"Suspense";case C:return"SuspenseList";case M:return"Activity"}if("object"==typeof e)switch(e.$$typeof){case p:return"Portal";case w:return e.displayName||"Context";case x:return(e._context.displayName||"Context")+".Consumer";case k:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case N:return null!==(t=e.displayName||null)?t:_(e.type)||"Memo";case T:t=e._payload,e=e._init;try{return _(e(t))}catch(n){}}return null}var z=Array.isArray,R=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,V={pending:!1,data:null,method:null,action:null},O=[],I=-1;function $(e){return{current:e}}function B(e){0>I||(e.current=O[I],O[I]=null,I--)}function H(e,t){I++,O[I]=e.current,e.current=t}var U,W,q=$(null),Y=$(null),K=$(null),Q=$(null);function X(e,t){switch(H(K,t),H(Y,e),H(q,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?xd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)e=bd(t=xd(t),e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}B(q),H(q,e)}function G(){B(q),B(Y),B(K)}function Z(e){null!==e.memoizedState&&H(Q,e);var t=q.current,n=bd(t,e.type);t!==n&&(H(Y,e),H(q,n))}function J(e){Y.current===e&&(B(q),B(Y)),Q.current===e&&(B(Q),hf._currentValue=V)}function ee(e){if(void 0===U)try{throw Error()}catch(n){var t=n.stack.trim().match(/\\n( *(at )?)/);U=t&&t[1]||"",W=-1<n.stack.indexOf("\\n at")?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return"\\n"+U+e+W}var te=!1;function ne(e,t){if(!e||te)return"";te=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(n,[])}catch(a){var r=a}Reflect.construct(e,[],n)}else{try{n.call()}catch(i){r=i}e.call(n.prototype)}}else{try{throw Error()}catch(s){r=s}(n=e())&&"function"==typeof n.catch&&n.catch(function(){})}}catch(o){if(o&&r&&"string"==typeof o.stack)return[o.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var a=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,"name");a&&a.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var i=r.DetermineComponentFrameRoot(),s=i[0],o=i[1];if(s&&o){var l=s.split("\\n"),c=o.split("\\n");for(a=r=0;r<l.length&&!l[r].includes("DetermineComponentFrameRoot");)r++;for(;a<c.length&&!c[a].includes("DetermineComponentFrameRoot");)a++;if(r===l.length||a===c.length)for(r=l.length-1,a=c.length-1;1<=r&&0<=a&&l[r]!==c[a];)a--;for(;1<=r&&0<=a;r--,a--)if(l[r]!==c[a]){if(1!==r||1!==a)do{if(r--,0>--a||l[r]!==c[a]){var u="\\n"+l[r].replace(" at new "," at ");return e.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",e.displayName)),u}}while(1<=r&&0<=a);break}}}finally{te=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?ee(n):""}function re(e,t){switch(e.tag){case 26:case 27:case 5:return ee(e.type);case 16:return ee("Lazy");case 13:return e.child!==t&&null!==t?ee("Suspense Fallback"):ee("Suspense");case 19:return ee("SuspenseList");case 0:case 15:return ne(e.type,!1);case 11:return ne(e.type.render,!1);case 1:return ne(e.type,!0);case 31:return ee("Activity");default:return""}}function ae(e){try{var t="",n=null;do{t+=re(e,n),n=e,e=e.return}while(e);return t}catch(r){return"\\nError generating stack: "+r.message+"\\n"+r.stack}}var ie=Object.prototype.hasOwnProperty,se=e.unstable_scheduleCallback,oe=e.unstable_cancelCallback,le=e.unstable_shouldYield,ce=e.unstable_requestPaint,ue=e.unstable_now,de=e.unstable_getCurrentPriorityLevel,fe=e.unstable_ImmediatePriority,he=e.unstable_UserBlockingPriority,pe=e.unstable_NormalPriority,me=e.unstable_LowPriority,ge=e.unstable_IdlePriority,ye=e.log,ve=e.unstable_setDisableYieldValue,xe=null,be=null;function we(e){if("function"==typeof ye&&ve(e),be&&"function"==typeof be.setStrictMode)try{be.setStrictMode(xe,e)}catch(t){}}var ke=Math.clz32?Math.clz32:function(e){return 0===(e>>>=0)?32:31-(Se(e)/je|0)|0},Se=Math.log,je=Math.LN2;var Ce=256,Ne=262144,Te=4194304;function Ee(e){var t=42&e;if(0!==t)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return 261888&e;case 262144:case 524288:case 1048576:case 2097152:return 3932160&e;case 4194304:case 8388608:case 16777216:case 33554432:return 62914560&e;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Me(e,t,n){var r=e.pendingLanes;if(0===r)return 0;var a=0,i=e.suspendedLanes,s=e.pingedLanes;e=e.warmLanes;var o=134217727&r;return 0!==o?0!==(r=o&~i)?a=Ee(r):0!==(s&=o)?a=Ee(s):n||0!==(n=o&~e)&&(a=Ee(n)):0!==(o=r&~i)?a=Ee(o):0!==s?a=Ee(s):n||0!==(n=r&~e)&&(a=Ee(n)),0===a?0:0!==t&&t!==a&&0===(t&i)&&((i=a&-a)>=(n=t&-t)||32===i&&4194048&n)?t:a}function Pe(e,t){return 0===(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)}function Le(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;default:return-1}}function De(){var e=Te;return!(62914560&(Te<<=1))&&(Te=4194304),e}function Ae(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function _e(e,t){e.pendingLanes|=t,268435456!==t&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function ze(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-ke(t);e.entangledLanes|=t,e.entanglements[r]=1073741824|e.entanglements[r]|261930&n}function Re(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-ke(n),a=1<<r;a&t|e[r]&t&&(e[r]|=t),n&=~a}}function Fe(e,t){var n=t&-t;return 0!==((n=42&n?1:Ve(n))&(e.suspendedLanes|t))?0:n}function Ve(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Oe(e){return 2<(e&=-e)?8<e?134217727&e?32:268435456:8:2}function Ie(){var e=F.p;return 0!==e?e:void 0===(e=window.event)?32:Mf(e.type)}function $e(e,t){var n=F.p;try{return F.p=e,t()}finally{F.p=n}}var Be=Math.random().toString(36).slice(2),He="__reactFiber$"+Be,Ue="__reactProps$"+Be,We="__reactContainer$"+Be,qe="__reactEvents$"+Be,Ye="__reactListeners$"+Be,Ke="__reactHandles$"+Be,Qe="__reactResources$"+Be,Xe="__reactMarker$"+Be;function Ge(e){delete e[He],delete e[Ue],delete e[qe],delete e[Ye],delete e[Ke]}function Ze(e){var t=e[He];if(t)return t;for(var n=e.parentNode;n;){if(t=n[We]||n[He]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=Vd(e);null!==e;){if(n=e[He])return n;e=Vd(e)}return t}n=(e=n).parentNode}return null}function Je(e){if(e=e[He]||e[We]){var t=e.tag;if(5===t||6===t||13===t||31===t||26===t||27===t||3===t)return e}return null}function et(e){var t=e.tag;if(5===t||26===t||27===t||6===t)return e.stateNode;throw Error(r(33))}function tt(e){var t=e[Qe];return t||(t=e[Qe]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function nt(e){e[Xe]=!0}var rt=new Set,at={};function it(e,t){st(e,t),st(e+"Capture",t)}function st(e,t){for(at[e]=t,e=0;e<t.length;e++)rt.add(t[e])}var ot=RegExp("^[:A-Z_a-z\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD][:A-Z_a-z\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD\\\\-.0-9\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040]*$"),lt={},ct={};function ut(e,t,n){if(a=t,ie.call(ct,a)||!ie.call(lt,a)&&(ot.test(a)?ct[a]=!0:(lt[a]=!0,0)))if(null===n)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":return void e.removeAttribute(t);case"boolean":var r=t.toLowerCase().slice(0,5);if("data-"!==r&&"aria-"!==r)return void e.removeAttribute(t)}e.setAttribute(t,""+n)}var a}function dt(e,t,n){if(null===n)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":return void e.removeAttribute(t)}e.setAttribute(t,""+n)}}function ft(e,t,n,r){if(null===r)e.removeAttribute(n);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":return void e.removeAttribute(n)}e.setAttributeNS(t,n,""+r)}}function ht(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function pt(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function mt(e){if(!e._valueTracker){var t=pt(e)?"checked":"value";e._valueTracker=function(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&void 0!==r&&"function"==typeof r.get&&"function"==typeof r.set){var a=r.get,i=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return a.call(this)},set:function(e){n=""+e,i.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e,t,""+e[t])}}function gt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=pt(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function yt(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}var vt=/[\\n"\\\\]/g;function xt(e){return e.replace(vt,function(e){return"\\\\"+e.charCodeAt(0).toString(16)+" "})}function bt(e,t,n,r,a,i,s,o){e.name="",null!=s&&"function"!=typeof s&&"symbol"!=typeof s&&"boolean"!=typeof s?e.type=s:e.removeAttribute("type"),null!=t?"number"===s?(0===t&&""===e.value||e.value!=t)&&(e.value=""+ht(t)):e.value!==""+ht(t)&&(e.value=""+ht(t)):"submit"!==s&&"reset"!==s||e.removeAttribute("value"),null!=t?kt(e,s,ht(t)):null!=n?kt(e,s,ht(n)):null!=r&&e.removeAttribute("value"),null==a&&null!=i&&(e.defaultChecked=!!i),null!=a&&(e.checked=a&&"function"!=typeof a&&"symbol"!=typeof a),null!=o&&"function"!=typeof o&&"symbol"!=typeof o&&"boolean"!=typeof o?e.name=""+ht(o):e.removeAttribute("name")}function wt(e,t,n,r,a,i,s,o){if(null!=i&&"function"!=typeof i&&"symbol"!=typeof i&&"boolean"!=typeof i&&(e.type=i),null!=t||null!=n){if(("submit"===i||"reset"===i)&&null==t)return void mt(e);n=null!=n?""+ht(n):"",t=null!=t?""+ht(t):n,o||t===e.value||(e.value=t),e.defaultValue=t}r="function"!=typeof(r=null!=r?r:a)&&"symbol"!=typeof r&&!!r,e.checked=o?e.checked:!!r,e.defaultChecked=!!r,null!=s&&"function"!=typeof s&&"symbol"!=typeof s&&"boolean"!=typeof s&&(e.name=s),mt(e)}function kt(e,t,n){"number"===t&&yt(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function St(e,t,n,r){if(e=e.options,t){t={};for(var a=0;a<n.length;a++)t["$"+n[a]]=!0;for(n=0;n<e.length;n++)a=t.hasOwnProperty("$"+e[n].value),e[n].selected!==a&&(e[n].selected=a),a&&r&&(e[n].defaultSelected=!0)}else{for(n=""+ht(n),t=null,a=0;a<e.length;a++){if(e[a].value===n)return e[a].selected=!0,void(r&&(e[a].defaultSelected=!0));null!==t||e[a].disabled||(t=e[a])}null!==t&&(t.selected=!0)}}function jt(e,t,n){null==t||((t=""+ht(t))!==e.value&&(e.value=t),null!=n)?e.defaultValue=null!=n?""+ht(n):"":e.defaultValue!==t&&(e.defaultValue=t)}function Ct(e,t,n,a){if(null==t){if(null!=a){if(null!=n)throw Error(r(92));if(z(a)){if(1<a.length)throw Error(r(93));a=a[0]}n=a}null==n&&(n=""),t=n}n=ht(t),e.defaultValue=n,(a=e.textContent)===n&&""!==a&&null!==a&&(e.value=a),mt(e)}function Nt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var Tt=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Et(e,t,n){var r=0===t.indexOf("--");null==n||"boolean"==typeof n||""===n?r?e.setProperty(t,""):"float"===t?e.cssFloat="":e[t]="":r?e.setProperty(t,n):"number"!=typeof n||0===n||Tt.has(t)?"float"===t?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function Mt(e,t,n){if(null!=t&&"object"!=typeof t)throw Error(r(62));if(e=e.style,null!=n){for(var a in n)!n.hasOwnProperty(a)||null!=t&&t.hasOwnProperty(a)||(0===a.indexOf("--")?e.setProperty(a,""):"float"===a?e.cssFloat="":e[a]="");for(var i in t)a=t[i],t.hasOwnProperty(i)&&n[i]!==a&&Et(e,i,a)}else for(var s in t)t.hasOwnProperty(s)&&Et(e,s,t[s])}function Pt(e){if(-1===e.indexOf("-"))return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Lt=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Dt=/^[\\u0000-\\u001F ]*j[\\r\\n\\t]*a[\\r\\n\\t]*v[\\r\\n\\t]*a[\\r\\n\\t]*s[\\r\\n\\t]*c[\\r\\n\\t]*r[\\r\\n\\t]*i[\\r\\n\\t]*p[\\r\\n\\t]*t[\\r\\n\\t]*:/i;function At(e){return Dt.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function _t(){}var zt=null;function Rt(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Ft=null,Vt=null;function Ot(e){var t=Je(e);if(t&&(e=t.stateNode)){var n=e[Ue]||null;e:switch(e=t.stateNode,t.type){case"input":if(bt(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+xt(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var a=n[t];if(a!==e&&a.form===e.form){var i=a[Ue]||null;if(!i)throw Error(r(90));bt(a,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name)}}for(t=0;t<n.length;t++)(a=n[t]).form===e.form&&gt(a)}break e;case"textarea":jt(e,n.value,n.defaultValue);break e;case"select":null!=(t=n.value)&&St(e,!!n.multiple,t,!1)}}}var It=!1;function $t(e,t,n){if(It)return e(t,n);It=!0;try{return e(t)}finally{if(It=!1,(null!==Ft||null!==Vt)&&(tu(),Ft&&(t=Ft,e=Vt,Vt=Ft=null,Ot(t),e)))for(t=0;t<e.length;t++)Ot(e[t])}}function Bt(e,t){var n=e.stateNode;if(null===n)return null;var a=n[Ue]||null;if(null===a)return null;n=a[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(a=!a.disabled)||(a=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!a;break e;default:e=!1}if(e)return null;if(n&&"function"!=typeof n)throw Error(r(231,t,typeof n));return n}var Ht=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),Ut=!1;if(Ht)try{var Wt={};Object.defineProperty(Wt,"passive",{get:function(){Ut=!0}}),window.addEventListener("test",Wt,Wt),window.removeEventListener("test",Wt,Wt)}catch(eh){Ut=!1}var qt=null,Yt=null,Kt=null;function Qt(){if(Kt)return Kt;var e,t,n=Yt,r=n.length,a="value"in qt?qt.value:qt.textContent,i=a.length;for(e=0;e<r&&n[e]===a[e];e++);var s=r-e;for(t=1;t<=s&&n[r-t]===a[i-t];t++);return Kt=a.slice(e,1<t?1-t:void 0)}function Xt(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function Gt(){return!0}function Zt(){return!1}function Jt(e){function t(t,n,r,a,i){for(var s in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=a,this.target=i,this.currentTarget=null,e)e.hasOwnProperty(s)&&(t=e[s],this[s]=t?t(a):a[s]);return this.isDefaultPrevented=(null!=a.defaultPrevented?a.defaultPrevented:!1===a.returnValue)?Gt:Zt,this.isPropagationStopped=Zt,this}return u(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=Gt)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=Gt)},persist:function(){},isPersistent:Gt}),t}var en,tn,nn,rn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},an=Jt(rn),sn=u({},rn,{view:0,detail:0}),on=Jt(sn),ln=u({},sn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:xn,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==nn&&(nn&&"mousemove"===e.type?(en=e.screenX-nn.screenX,tn=e.screenY-nn.screenY):tn=en=0,nn=e),en)},movementY:function(e){return"movementY"in e?e.movementY:tn}}),cn=Jt(ln),un=Jt(u({},ln,{dataTransfer:0})),dn=Jt(u({},sn,{relatedTarget:0})),fn=Jt(u({},rn,{animationName:0,elapsedTime:0,pseudoElement:0})),hn=Jt(u({},rn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}})),pn=Jt(u({},rn,{data:0})),mn={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},gn={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},yn={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function vn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=yn[e])&&!!t[e]}function xn(){return vn}var bn=Jt(u({},sn,{key:function(e){if(e.key){var t=mn[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=Xt(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?gn[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:xn,charCode:function(e){return"keypress"===e.type?Xt(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?Xt(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}})),wn=Jt(u({},ln,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),kn=Jt(u({},sn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:xn})),Sn=Jt(u({},rn,{propertyName:0,elapsedTime:0,pseudoElement:0})),jn=Jt(u({},ln,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),Cn=Jt(u({},rn,{newState:0,oldState:0})),Nn=[9,13,27,32],Tn=Ht&&"CompositionEvent"in window,En=null;Ht&&"documentMode"in document&&(En=document.documentMode);var Mn=Ht&&"TextEvent"in window&&!En,Pn=Ht&&(!Tn||En&&8<En&&11>=En),Ln=String.fromCharCode(32),Dn=!1;function An(e,t){switch(e){case"keyup":return-1!==Nn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function _n(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var zn=!1;var Rn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Fn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Rn[e.type]:"textarea"===t}function Vn(e,t,n,r){Ft?Vt?Vt.push(r):Vt=[r]:Ft=r,0<(t=id(t,"onChange")).length&&(n=new an("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var On=null,In=null;function $n(e){Gu(e,0)}function Bn(e){if(gt(et(e)))return e}function Hn(e,t){if("change"===e)return t}var Un=!1;if(Ht){var Wn;if(Ht){var qn="oninput"in document;if(!qn){var Yn=document.createElement("div");Yn.setAttribute("oninput","return;"),qn="function"==typeof Yn.oninput}Wn=qn}else Wn=!1;Un=Wn&&(!document.documentMode||9<document.documentMode)}function Kn(){On&&(On.detachEvent("onpropertychange",Qn),In=On=null)}function Qn(e){if("value"===e.propertyName&&Bn(In)){var t=[];Vn(t,In,e,Rt(e)),$t($n,t)}}function Xn(e,t,n){"focusin"===e?(Kn(),In=n,(On=t).attachEvent("onpropertychange",Qn)):"focusout"===e&&Kn()}function Gn(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Bn(In)}function Zn(e,t){if("click"===e)return Bn(t)}function Jn(e,t){if("input"===e||"change"===e)return Bn(t)}var er="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t};function tr(e,t){if(er(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var a=n[r];if(!ie.call(t,a)||!er(e[a],t[a]))return!1}return!0}function nr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function rr(e,t){var n,r=nr(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=nr(r)}}function ar(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?ar(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function ir(e){for(var t=yt((e=null!=e&&null!=e.ownerDocument&&null!=e.ownerDocument.defaultView?e.ownerDocument.defaultView:window).document);t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(r){n=!1}if(!n)break;t=yt((e=t.contentWindow).document)}return t}function sr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var or=Ht&&"documentMode"in document&&11>=document.documentMode,lr=null,cr=null,ur=null,dr=!1;function fr(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;dr||null==lr||lr!==yt(r)||("selectionStart"in(r=lr)&&sr(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},ur&&tr(ur,r)||(ur=r,0<(r=id(cr,"onSelect")).length&&(t=new an("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=lr)))}function hr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var pr={animationend:hr("Animation","AnimationEnd"),animationiteration:hr("Animation","AnimationIteration"),animationstart:hr("Animation","AnimationStart"),transitionrun:hr("Transition","TransitionRun"),transitionstart:hr("Transition","TransitionStart"),transitioncancel:hr("Transition","TransitionCancel"),transitionend:hr("Transition","TransitionEnd")},mr={},gr={};function yr(e){if(mr[e])return mr[e];if(!pr[e])return e;var t,n=pr[e];for(t in n)if(n.hasOwnProperty(t)&&t in gr)return mr[e]=n[t];return e}Ht&&(gr=document.createElement("div").style,"AnimationEvent"in window||(delete pr.animationend.animation,delete pr.animationiteration.animation,delete pr.animationstart.animation),"TransitionEvent"in window||delete pr.transitionend.transition);var vr=yr("animationend"),xr=yr("animationiteration"),br=yr("animationstart"),wr=yr("transitionrun"),kr=yr("transitionstart"),Sr=yr("transitioncancel"),jr=yr("transitionend"),Cr=new Map,Nr="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Tr(e,t){Cr.set(e,t),it(t,[e])}Nr.push("scrollEnd");var Er="function"==typeof reportError?reportError:function(e){if("object"==typeof window&&"function"==typeof window.ErrorEvent){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:"object"==typeof e&&null!==e&&"string"==typeof e.message?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if("object"==typeof process&&"function"==typeof process.emit)return void process.emit("uncaughtException",e);console.error(e)},Mr=[],Pr=0,Lr=0;function Dr(){for(var e=Pr,t=Lr=Pr=0;t<e;){var n=Mr[t];Mr[t++]=null;var r=Mr[t];Mr[t++]=null;var a=Mr[t];Mr[t++]=null;var i=Mr[t];if(Mr[t++]=null,null!==r&&null!==a){var s=r.pending;null===s?a.next=a:(a.next=s.next,s.next=a),r.pending=a}0!==i&&Rr(n,a,i)}}function Ar(e,t,n,r){Mr[Pr++]=e,Mr[Pr++]=t,Mr[Pr++]=n,Mr[Pr++]=r,Lr|=r,e.lanes|=r,null!==(e=e.alternate)&&(e.lanes|=r)}function _r(e,t,n,r){return Ar(e,t,n,r),Fr(e)}function zr(e,t){return Ar(e,null,null,t),Fr(e)}function Rr(e,t,n){e.lanes|=n;var r=e.alternate;null!==r&&(r.lanes|=n);for(var a=!1,i=e.return;null!==i;)i.childLanes|=n,null!==(r=i.alternate)&&(r.childLanes|=n),22===i.tag&&(null===(e=i.stateNode)||1&e._visibility||(a=!0)),e=i,i=i.return;return 3===e.tag?(i=e.stateNode,a&&null!==t&&(a=31-ke(n),null===(r=(e=i.hiddenUpdates)[a])?e[a]=[t]:r.push(t),t.lane=536870912|n),i):null}function Fr(e){if(50<qc)throw qc=0,Yc=null,Error(r(185));for(var t=e.return;null!==t;)t=(e=t).return;return 3===e.tag?e.stateNode:null}var Vr={};function Or(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ir(e,t,n,r){return new Or(e,t,n,r)}function $r(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Br(e,t){var n=e.alternate;return null===n?((n=Ir(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=65011712&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function Hr(e,t){e.flags&=65011714;var n=e.alternate;return null===n?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Ur(e,t,n,a,i,s){var o=0;if(a=e,"function"==typeof e)$r(e)&&(o=1);else if("string"==typeof e)o=function(e,t,n){if(1===n||null!=t.itemProp)return!1;switch(e){case"meta":case"title":return!0;case"style":if("string"!=typeof t.precedence||"string"!=typeof t.href||""===t.href)break;return!0;case"link":if("string"!=typeof t.rel||"string"!=typeof t.href||""===t.href||t.onLoad||t.onError)break;return"stylesheet"!==t.rel||(e=t.disabled,"string"==typeof t.precedence&&null==e);case"script":if(t.async&&"function"!=typeof t.async&&"symbol"!=typeof t.async&&!t.onLoad&&!t.onError&&t.src&&"string"==typeof t.src)return!0}return!1}(e,n,q.current)?26:"html"===e||"head"===e||"body"===e?27:5;else e:switch(e){case M:return(e=Ir(31,n,t,i)).elementType=M,e.lanes=s,e;case m:return Wr(n.children,i,s,t);case g:o=8,i|=24;break;case v:return(e=Ir(12,n,t,2|i)).elementType=v,e.lanes=s,e;case j:return(e=Ir(13,n,t,i)).elementType=j,e.lanes=s,e;case C:return(e=Ir(19,n,t,i)).elementType=C,e.lanes=s,e;default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case w:o=10;break e;case x:o=9;break e;case k:o=11;break e;case N:o=14;break e;case T:o=16,a=null;break e}o=29,n=Error(r(130,null===e?"null":typeof e,"")),a=null}return(t=Ir(o,n,t,i)).elementType=e,t.type=a,t.lanes=s,t}function Wr(e,t,n,r){return(e=Ir(7,e,r,t)).lanes=n,e}function qr(e,t,n){return(e=Ir(6,e,null,t)).lanes=n,e}function Yr(e){var t=Ir(18,null,null,0);return t.stateNode=e,t}function Kr(e,t,n){return(t=Ir(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Qr=new WeakMap;function Xr(e,t){if("object"==typeof e&&null!==e){var n=Qr.get(e);return void 0!==n?n:(t={value:e,source:t,stack:ae(t)},Qr.set(e,t),t)}return{value:e,source:t,stack:ae(t)}}var Gr=[],Zr=0,Jr=null,ea=0,ta=[],na=0,ra=null,aa=1,ia="";function sa(e,t){Gr[Zr++]=ea,Gr[Zr++]=Jr,Jr=e,ea=t}function oa(e,t,n){ta[na++]=aa,ta[na++]=ia,ta[na++]=ra,ra=e;var r=aa;e=ia;var a=32-ke(r)-1;r&=~(1<<a),n+=1;var i=32-ke(t)+a;if(30<i){var s=a-a%5;i=(r&(1<<s)-1).toString(32),r>>=s,a-=s,aa=1<<32-ke(t)+a|n<<a|r,ia=i+e}else aa=1<<i|n<<a|r,ia=e}function la(e){null!==e.return&&(sa(e,1),oa(e,1,0))}function ca(e){for(;e===Jr;)Jr=Gr[--Zr],Gr[Zr]=null,ea=Gr[--Zr],Gr[Zr]=null;for(;e===ra;)ra=ta[--na],ta[na]=null,ia=ta[--na],ta[na]=null,aa=ta[--na],ta[na]=null}function ua(e,t){ta[na++]=aa,ta[na++]=ia,ta[na++]=ra,aa=t.id,ia=t.overflow,ra=e}var da=null,fa=null,ha=!1,pa=null,ma=!1,ga=Error(r(519));function ya(e){throw Sa(Xr(Error(r(418,1<arguments.length&&void 0!==arguments[1]&&arguments[1]?"text":"HTML","")),e)),ga}function va(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[He]=e,t[Ue]=r,n){case"dialog":Zu("cancel",t),Zu("close",t);break;case"iframe":case"object":case"embed":Zu("load",t);break;case"video":case"audio":for(n=0;n<Qu.length;n++)Zu(Qu[n],t);break;case"source":Zu("error",t);break;case"img":case"image":case"link":Zu("error",t),Zu("load",t);break;case"details":Zu("toggle",t);break;case"input":Zu("invalid",t),wt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case"select":Zu("invalid",t);break;case"textarea":Zu("invalid",t),Ct(t,r.value,r.defaultValue,r.children)}"string"!=typeof(n=r.children)&&"number"!=typeof n&&"bigint"!=typeof n||t.textContent===""+n||!0===r.suppressHydrationWarning||dd(t.textContent,n)?(null!=r.popover&&(Zu("beforetoggle",t),Zu("toggle",t)),null!=r.onScroll&&Zu("scroll",t),null!=r.onScrollEnd&&Zu("scrollend",t),null!=r.onClick&&(t.onclick=_t),t=!0):t=!1,t||ya(e,!0)}function xa(e){for(da=e.return;da;)switch(da.tag){case 5:case 31:case 13:return void(ma=!1);case 27:case 3:return void(ma=!0);default:da=da.return}}function ba(e){if(e!==da)return!1;if(!ha)return xa(e),ha=!0,!1;var t,n=e.tag;if((t=3!==n&&27!==n)&&((t=5===n)&&(t=!("form"!==(t=e.type)&&"button"!==t)||wd(e.type,e.memoizedProps)),t=!t),t&&fa&&ya(e),xa(e),13===n){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(r(317));fa=Fd(e)}else if(31===n){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(r(317));fa=Fd(e)}else 27===n?(n=fa,Ed(e.type)?(e=Rd,Rd=null,fa=e):fa=n):fa=da?zd(e.stateNode.nextSibling):null;return!0}function wa(){fa=da=null,ha=!1}function ka(){var e=pa;return null!==e&&(null===Dc?Dc=e:Dc.push.apply(Dc,e),pa=null),e}function Sa(e){null===pa?pa=[e]:pa.push(e)}var ja=$(null),Ca=null,Na=null;function Ta(e,t,n){H(ja,t._currentValue),t._currentValue=n}function Ea(e){e._currentValue=ja.current,B(ja)}function Ma(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Pa(e,t,n,a){var i=e.child;for(null!==i&&(i.return=e);null!==i;){var s=i.dependencies;if(null!==s){var o=i.child;s=s.firstContext;e:for(;null!==s;){var l=s;s=i;for(var c=0;c<t.length;c++)if(l.context===t[c]){s.lanes|=n,null!==(l=s.alternate)&&(l.lanes|=n),Ma(s.return,n,e),a||(o=null);break e}s=l.next}}else if(18===i.tag){if(null===(o=i.return))throw Error(r(341));o.lanes|=n,null!==(s=o.alternate)&&(s.lanes|=n),Ma(o,n,e),o=null}else o=i.child;if(null!==o)o.return=i;else for(o=i;null!==o;){if(o===e){o=null;break}if(null!==(i=o.sibling)){i.return=o.return,o=i;break}o=o.return}i=o}}function La(e,t,n,a){e=null;for(var i=t,s=!1;null!==i;){if(!s)if(524288&i.flags)s=!0;else if(262144&i.flags)break;if(10===i.tag){var o=i.alternate;if(null===o)throw Error(r(387));if(null!==(o=o.memoizedProps)){var l=i.type;er(i.pendingProps.value,o.value)||(null!==e?e.push(l):e=[l])}}else if(i===Q.current){if(null===(o=i.alternate))throw Error(r(387));o.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(null!==e?e.push(hf):e=[hf])}i=i.return}null!==e&&Pa(t,e,n,a),t.flags|=262144}function Da(e){for(e=e.firstContext;null!==e;){if(!er(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Aa(e){Ca=e,Na=null,null!==(e=e.dependencies)&&(e.firstContext=null)}function _a(e){return Ra(Ca,e)}function za(e,t){return null===Ca&&Aa(e),Ra(e,t)}function Ra(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},null===Na){if(null===e)throw Error(r(308));Na=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Na=Na.next=t;return n}var Fa="undefined"!=typeof AbortController?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},Va=e.unstable_scheduleCallback,Oa=e.unstable_NormalPriority,Ia={$$typeof:w,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function $a(){return{controller:new Fa,data:new Map,refCount:0}}function Ba(e){e.refCount--,0===e.refCount&&Va(Oa,function(){e.controller.abort()})}var Ha=null,Ua=0,Wa=0,qa=null;function Ya(){if(0===--Ua&&null!==Ha){null!==qa&&(qa.status="fulfilled");var e=Ha;Ha=null,Wa=0,qa=null;for(var t=0;t<e.length;t++)(0,e[t])()}}var Ka=R.S;R.S=function(e,t){zc=ue(),"object"==typeof t&&null!==t&&"function"==typeof t.then&&function(e,t){if(null===Ha){var n=Ha=[];Ua=0,Wa=Uu(),qa={status:"pending",value:void 0,then:function(e){n.push(e)}}}Ua++,t.then(Ya,Ya)}(0,t),null!==Ka&&Ka(e,t)};var Qa=$(null);function Xa(){var e=Qa.current;return null!==e?e:gc.pooledCache}function Ga(e,t){H(Qa,null===t?Qa.current:t.pool)}function Za(){var e=Xa();return null===e?null:{parent:Ia._currentValue,pool:e}}var Ja=Error(r(460)),ei=Error(r(474)),ti=Error(r(542)),ni={then:function(){}};function ri(e){return"fulfilled"===(e=e.status)||"rejected"===e}function ai(e,t,n){switch(void 0===(n=e[n])?e.push(t):n!==t&&(t.then(_t,_t),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw li(e=t.reason),e;default:if("string"==typeof t.status)t.then(_t,_t);else{if(null!==(e=gc)&&100<e.shellSuspendCounter)throw Error(r(482));(e=t).status="pending",e.then(function(e){if("pending"===t.status){var n=t;n.status="fulfilled",n.value=e}},function(e){if("pending"===t.status){var n=t;n.status="rejected",n.reason=e}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw li(e=t.reason),e}throw si=t,Ja}}function ii(e){try{return(0,e._init)(e._payload)}catch(t){if(null!==t&&"object"==typeof t&&"function"==typeof t.then)throw si=t,Ja;throw t}}var si=null;function oi(){if(null===si)throw Error(r(459));var e=si;return si=null,e}function li(e){if(e===Ja||e===ti)throw Error(r(483))}var ci=null,ui=0;function di(e){var t=ui;return ui+=1,null===ci&&(ci=[]),ai(ci,e,t)}function fi(e,t){t=t.props.ref,e.ref=void 0!==t?t:null}function hi(e,t){if(t.$$typeof===f)throw Error(r(525));throw e=Object.prototype.toString.call(t),Error(r(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function pi(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function a(e){for(var t=new Map;null!==e;)null!==e.key?t.set(e.key,e):t.set(e.index,e),e=e.sibling;return t}function i(e,t){return(e=Br(e,t)).index=0,e.sibling=null,e}function s(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags|=67108866,n):r:(t.flags|=67108866,n):(t.flags|=1048576,n)}function o(t){return e&&null===t.alternate&&(t.flags|=67108866),t}function l(e,t,n,r){return null===t||6!==t.tag?((t=qr(n,e.mode,r)).return=e,t):((t=i(t,n)).return=e,t)}function c(e,t,n,r){var a=n.type;return a===m?d(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===a||"object"==typeof a&&null!==a&&a.$$typeof===T&&ii(a)===t.type)?(fi(t=i(t,n.props),n),t.return=e,t):(fi(t=Ur(n.type,n.key,n.props,null,e.mode,r),n),t.return=e,t)}function u(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Kr(n,e.mode,r)).return=e,t):((t=i(t,n.children||[])).return=e,t)}function d(e,t,n,r,a){return null===t||7!==t.tag?((t=Wr(n,e.mode,r,a)).return=e,t):((t=i(t,n)).return=e,t)}function f(e,t,n){if("string"==typeof t&&""!==t||"number"==typeof t||"bigint"==typeof t)return(t=qr(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case h:return fi(n=Ur(t.type,t.key,t.props,null,e.mode,n),t),n.return=e,n;case p:return(t=Kr(t,e.mode,n)).return=e,t;case T:return f(e,t=ii(t),n)}if(z(t)||D(t))return(t=Wr(t,e.mode,n,null)).return=e,t;if("function"==typeof t.then)return f(e,di(t),n);if(t.$$typeof===w)return f(e,za(e,t),n);hi(e,t)}return null}function g(e,t,n,r){var a=null!==t?t.key:null;if("string"==typeof n&&""!==n||"number"==typeof n||"bigint"==typeof n)return null!==a?null:l(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case h:return n.key===a?c(e,t,n,r):null;case p:return n.key===a?u(e,t,n,r):null;case T:return g(e,t,n=ii(n),r)}if(z(n)||D(n))return null!==a?null:d(e,t,n,r,null);if("function"==typeof n.then)return g(e,t,di(n),r);if(n.$$typeof===w)return g(e,t,za(e,n),r);hi(e,n)}return null}function y(e,t,n,r,a){if("string"==typeof r&&""!==r||"number"==typeof r||"bigint"==typeof r)return l(t,e=e.get(n)||null,""+r,a);if("object"==typeof r&&null!==r){switch(r.$$typeof){case h:return c(t,e=e.get(null===r.key?n:r.key)||null,r,a);case p:return u(t,e=e.get(null===r.key?n:r.key)||null,r,a);case T:return y(e,t,n,r=ii(r),a)}if(z(r)||D(r))return d(t,e=e.get(n)||null,r,a,null);if("function"==typeof r.then)return y(e,t,n,di(r),a);if(r.$$typeof===w)return y(e,t,n,za(t,r),a);hi(t,r)}return null}function v(l,c,u,d){if("object"==typeof u&&null!==u&&u.type===m&&null===u.key&&(u=u.props.children),"object"==typeof u&&null!==u){switch(u.$$typeof){case h:e:{for(var x=u.key;null!==c;){if(c.key===x){if((x=u.type)===m){if(7===c.tag){n(l,c.sibling),(d=i(c,u.props.children)).return=l,l=d;break e}}else if(c.elementType===x||"object"==typeof x&&null!==x&&x.$$typeof===T&&ii(x)===c.type){n(l,c.sibling),fi(d=i(c,u.props),u),d.return=l,l=d;break e}n(l,c);break}t(l,c),c=c.sibling}u.type===m?((d=Wr(u.props.children,l.mode,d,u.key)).return=l,l=d):(fi(d=Ur(u.type,u.key,u.props,null,l.mode,d),u),d.return=l,l=d)}return o(l);case p:e:{for(x=u.key;null!==c;){if(c.key===x){if(4===c.tag&&c.stateNode.containerInfo===u.containerInfo&&c.stateNode.implementation===u.implementation){n(l,c.sibling),(d=i(c,u.children||[])).return=l,l=d;break e}n(l,c);break}t(l,c),c=c.sibling}(d=Kr(u,l.mode,d)).return=l,l=d}return o(l);case T:return v(l,c,u=ii(u),d)}if(z(u))return function(r,i,o,l){for(var c=null,u=null,d=i,h=i=0,p=null;null!==d&&h<o.length;h++){d.index>h?(p=d,d=null):p=d.sibling;var m=g(r,d,o[h],l);if(null===m){null===d&&(d=p);break}e&&d&&null===m.alternate&&t(r,d),i=s(m,i,h),null===u?c=m:u.sibling=m,u=m,d=p}if(h===o.length)return n(r,d),ha&&sa(r,h),c;if(null===d){for(;h<o.length;h++)null!==(d=f(r,o[h],l))&&(i=s(d,i,h),null===u?c=d:u.sibling=d,u=d);return ha&&sa(r,h),c}for(d=a(d);h<o.length;h++)null!==(p=y(d,r,h,o[h],l))&&(e&&null!==p.alternate&&d.delete(null===p.key?h:p.key),i=s(p,i,h),null===u?c=p:u.sibling=p,u=p);return e&&d.forEach(function(e){return t(r,e)}),ha&&sa(r,h),c}(l,c,u,d);if(D(u)){if("function"!=typeof(x=D(u)))throw Error(r(150));return function(i,o,l,c){if(null==l)throw Error(r(151));for(var u=null,d=null,h=o,p=o=0,m=null,v=l.next();null!==h&&!v.done;p++,v=l.next()){h.index>p?(m=h,h=null):m=h.sibling;var x=g(i,h,v.value,c);if(null===x){null===h&&(h=m);break}e&&h&&null===x.alternate&&t(i,h),o=s(x,o,p),null===d?u=x:d.sibling=x,d=x,h=m}if(v.done)return n(i,h),ha&&sa(i,p),u;if(null===h){for(;!v.done;p++,v=l.next())null!==(v=f(i,v.value,c))&&(o=s(v,o,p),null===d?u=v:d.sibling=v,d=v);return ha&&sa(i,p),u}for(h=a(h);!v.done;p++,v=l.next())null!==(v=y(h,i,p,v.value,c))&&(e&&null!==v.alternate&&h.delete(null===v.key?p:v.key),o=s(v,o,p),null===d?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(i,e)}),ha&&sa(i,p),u}(l,c,u=x.call(u),d)}if("function"==typeof u.then)return v(l,c,di(u),d);if(u.$$typeof===w)return v(l,c,za(l,u),d);hi(l,u)}return"string"==typeof u&&""!==u||"number"==typeof u||"bigint"==typeof u?(u=""+u,null!==c&&6===c.tag?(n(l,c.sibling),(d=i(c,u)).return=l,l=d):(n(l,c),(d=qr(u,l.mode,d)).return=l,l=d),o(l)):n(l,c)}return function(e,t,n,r){try{ui=0;var a=v(e,t,n,r);return ci=null,a}catch(s){if(s===Ja||s===ti)throw s;var i=Ir(29,s,null,e.mode);return i.lanes=r,i.return=e,i}}}var mi=pi(!0),gi=pi(!1),yi=!1;function vi(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function xi(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function bi(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function wi(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,2&mc){var a=r.pending;return null===a?t.next=t:(t.next=a.next,a.next=t),r.pending=t,t=Fr(e),Rr(e,null,n),t}return Ar(e,r,t,n),Fr(e)}function ki(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,4194048&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,Re(e,n)}}function Si(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var a=null,i=null;if(null!==(n=n.firstBaseUpdate)){do{var s={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};null===i?a=i=s:i=i.next=s,n=n.next}while(null!==n);null===i?a=i=t:i=i.next=t}else a=i=t;return n={baseState:r.baseState,firstBaseUpdate:a,lastBaseUpdate:i,shared:r.shared,callbacks:r.callbacks},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var ji=!1;function Ci(){if(ji){if(null!==qa)throw qa}}function Ni(e,t,n,r){ji=!1;var a=e.updateQueue;yi=!1;var i=a.firstBaseUpdate,s=a.lastBaseUpdate,o=a.shared.pending;if(null!==o){a.shared.pending=null;var l=o,c=l.next;l.next=null,null===s?i=c:s.next=c,s=l;var d=e.alternate;null!==d&&((o=(d=d.updateQueue).lastBaseUpdate)!==s&&(null===o?d.firstBaseUpdate=c:o.next=c,d.lastBaseUpdate=l))}if(null!==i){var f=a.baseState;for(s=0,d=c=l=null,o=i;;){var h=-536870913&o.lane,p=h!==o.lane;if(p?(vc&h)===h:(r&h)===h){0!==h&&h===Wa&&(ji=!0),null!==d&&(d=d.next={lane:0,tag:o.tag,payload:o.payload,callback:null,next:null});e:{var m=e,g=o;h=t;var y=n;switch(g.tag){case 1:if("function"==typeof(m=g.payload)){f=m.call(y,f,h);break e}f=m;break e;case 3:m.flags=-65537&m.flags|128;case 0:if(null==(h="function"==typeof(m=g.payload)?m.call(y,f,h):m))break e;f=u({},f,h);break e;case 2:yi=!0}}null!==(h=o.callback)&&(e.flags|=64,p&&(e.flags|=8192),null===(p=a.callbacks)?a.callbacks=[h]:p.push(h))}else p={lane:h,tag:o.tag,payload:o.payload,callback:o.callback,next:null},null===d?(c=d=p,l=f):d=d.next=p,s|=h;if(null===(o=o.next)){if(null===(o=a.shared.pending))break;o=(p=o).next,p.next=null,a.lastBaseUpdate=p,a.shared.pending=null}}null===d&&(l=f),a.baseState=l,a.firstBaseUpdate=c,a.lastBaseUpdate=d,null===i&&(a.shared.lanes=0),Nc|=s,e.lanes=s,e.memoizedState=f}}function Ti(e,t){if("function"!=typeof e)throw Error(r(191,e));e.call(t)}function Ei(e,t){var n=e.callbacks;if(null!==n)for(e.callbacks=null,e=0;e<n.length;e++)Ti(n[e],t)}var Mi=$(null),Pi=$(0);function Li(e,t){H(Pi,e=jc),H(Mi,t),jc=e|t.baseLanes}function Di(){H(Pi,jc),H(Mi,Mi.current)}function Ai(){jc=Pi.current,B(Mi),B(Pi)}var _i=$(null),zi=null;function Ri(e){var t=e.alternate;H($i,1&$i.current),H(_i,e),null===zi&&(null===t||null!==Mi.current||null!==t.memoizedState)&&(zi=e)}function Fi(e){H($i,$i.current),H(_i,e),null===zi&&(zi=e)}function Vi(e){22===e.tag?(H($i,$i.current),H(_i,e),null===zi&&(zi=e)):Oi()}function Oi(){H($i,$i.current),H(_i,_i.current)}function Ii(e){B(_i),zi===e&&(zi=null),B($i)}var $i=$(0);function Bi(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||Ad(n)||_d(n)))return t}else if(19!==t.tag||"forwards"!==t.memoizedProps.revealOrder&&"backwards"!==t.memoizedProps.revealOrder&&"unstable_legacy-backwards"!==t.memoizedProps.revealOrder&&"together"!==t.memoizedProps.revealOrder){if(null!==t.child){t.child.return=t,t=t.child;continue}}else if(128&t.flags)return t;if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Hi=0,Ui=null,Wi=null,qi=null,Yi=!1,Ki=!1,Qi=!1,Xi=0,Gi=0,Zi=null,Ji=0;function es(){throw Error(r(321))}function ts(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!er(e[n],t[n]))return!1;return!0}function ns(e,t,n,r,a,i){return Hi=i,Ui=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,R.H=null===e||null===e.memoizedState?vo:xo,Qi=!1,i=n(r,a),Qi=!1,Ki&&(i=as(t,n,r,a)),rs(e),i}function rs(e){R.H=yo;var t=null!==Wi&&null!==Wi.next;if(Hi=0,qi=Wi=Ui=null,Yi=!1,Gi=0,Zi=null,t)throw Error(r(300));null===e||zo||null!==(e=e.dependencies)&&Da(e)&&(zo=!0)}function as(e,t,n,a){Ui=e;var i=0;do{if(Ki&&(Zi=null),Gi=0,Ki=!1,25<=i)throw Error(r(301));if(i+=1,qi=Wi=null,null!=e.updateQueue){var s=e.updateQueue;s.lastEffect=null,s.events=null,s.stores=null,null!=s.memoCache&&(s.memoCache.index=0)}R.H=bo,s=t(n,a)}while(Ki);return s}function is(){var e=R.H,t=e.useState()[0];return t="function"==typeof t.then?ds(t):t,e=e.useState()[0],(null!==Wi?Wi.memoizedState:null)!==e&&(Ui.flags|=1024),t}function ss(){var e=0!==Xi;return Xi=0,e}function os(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function ls(e){if(Yi){for(e=e.memoizedState;null!==e;){var t=e.queue;null!==t&&(t.pending=null),e=e.next}Yi=!1}Hi=0,qi=Wi=Ui=null,Ki=!1,Gi=Xi=0,Zi=null}function cs(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===qi?Ui.memoizedState=qi=e:qi=qi.next=e,qi}function us(){if(null===Wi){var e=Ui.alternate;e=null!==e?e.memoizedState:null}else e=Wi.next;var t=null===qi?Ui.memoizedState:qi.next;if(null!==t)qi=t,Wi=e;else{if(null===e){if(null===Ui.alternate)throw Error(r(467));throw Error(r(310))}e={memoizedState:(Wi=e).memoizedState,baseState:Wi.baseState,baseQueue:Wi.baseQueue,queue:Wi.queue,next:null},null===qi?Ui.memoizedState=qi=e:qi=qi.next=e}return qi}function ds(e){var t=Gi;return Gi+=1,null===Zi&&(Zi=[]),e=ai(Zi,e,t),t=Ui,null===(null===qi?t.memoizedState:qi.next)&&(t=t.alternate,R.H=null===t||null===t.memoizedState?vo:xo),e}function fs(e){if(null!==e&&"object"==typeof e){if("function"==typeof e.then)return ds(e);if(e.$$typeof===w)return _a(e)}throw Error(r(438,String(e)))}function hs(e){var t=null,n=Ui.updateQueue;if(null!==n&&(t=n.memoCache),null==t){var r=Ui.alternate;null!==r&&(null!==(r=r.updateQueue)&&(null!=(r=r.memoCache)&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(null==t&&(t={data:[],index:0}),null===n&&(n={lastEffect:null,events:null,stores:null,memoCache:null},Ui.updateQueue=n),n.memoCache=t,void 0===(n=t.data[t.index]))for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=P;return t.index++,n}function ps(e,t){return"function"==typeof t?t(e):t}function ms(e){return gs(us(),Wi,e)}function gs(e,t,n){var a=e.queue;if(null===a)throw Error(r(311));a.lastRenderedReducer=n;var i=e.baseQueue,s=a.pending;if(null!==s){if(null!==i){var o=i.next;i.next=s.next,s.next=o}t.baseQueue=i=s,a.pending=null}if(s=e.baseState,null===i)e.memoizedState=s;else{var l=o=null,c=null,u=t=i.next,d=!1;do{var f=-536870913&u.lane;if(f!==u.lane?(vc&f)===f:(Hi&f)===f){var h=u.revertLane;if(0===h)null!==c&&(c=c.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===Wa&&(d=!0);else{if((Hi&h)===h){u=u.next,h===Wa&&(d=!0);continue}f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},null===c?(l=c=f,o=s):c=c.next=f,Ui.lanes|=h,Nc|=h}f=u.action,Qi&&n(s,f),s=u.hasEagerState?u.eagerState:n(s,f)}else h={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},null===c?(l=c=h,o=s):c=c.next=h,Ui.lanes|=f,Nc|=f;u=u.next}while(null!==u&&u!==t);if(null===c?o=s:c.next=l,!er(s,e.memoizedState)&&(zo=!0,d&&null!==(n=qa)))throw n;e.memoizedState=s,e.baseState=o,e.baseQueue=c,a.lastRenderedState=s}return null===i&&(a.lanes=0),[e.memoizedState,a.dispatch]}function ys(e){var t=us(),n=t.queue;if(null===n)throw Error(r(311));n.lastRenderedReducer=e;var a=n.dispatch,i=n.pending,s=t.memoizedState;if(null!==i){n.pending=null;var o=i=i.next;do{s=e(s,o.action),o=o.next}while(o!==i);er(s,t.memoizedState)||(zo=!0),t.memoizedState=s,null===t.baseQueue&&(t.baseState=s),n.lastRenderedState=s}return[s,a]}function vs(e,t,n){var a=Ui,i=us(),s=ha;if(s){if(void 0===n)throw Error(r(407));n=n()}else n=t();var o=!er((Wi||i).memoizedState,n);if(o&&(i.memoizedState=n,zo=!0),i=i.queue,Hs(ws.bind(null,a,i,e),[e]),i.getSnapshot!==t||o||null!==qi&&1&qi.memoizedState.tag){if(a.flags|=2048,Vs(9,{destroy:void 0},bs.bind(null,a,i,n,t),null),null===gc)throw Error(r(349));s||127&Hi||xs(a,t,n)}return n}function xs(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=Ui.updateQueue)?(t={lastEffect:null,events:null,stores:null,memoCache:null},Ui.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function bs(e,t,n,r){t.value=n,t.getSnapshot=r,ks(t)&&Ss(e)}function ws(e,t,n){return n(function(){ks(t)&&Ss(e)})}function ks(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!er(e,n)}catch(r){return!0}}function Ss(e){var t=zr(e,2);null!==t&&Xc(t,e,2)}function js(e){var t=cs();if("function"==typeof e){var n=e;if(e=n(),Qi){we(!0);try{n()}finally{we(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ps,lastRenderedState:e},t}function Cs(e,t,n,r){return e.baseState=n,gs(e,Wi,"function"==typeof r?r:ps)}function Ns(e,t,n,a,i){if(po(e))throw Error(r(485));if(null!==(e=t.action)){var s={payload:i,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(e){s.listeners.push(e)}};null!==R.T?n(!0):s.isTransition=!1,a(s),null===(n=t.pending)?(s.next=t.pending=s,Ts(t,s)):(s.next=n.next,t.pending=n.next=s)}}function Ts(e,t){var n=t.action,r=t.payload,a=e.state;if(t.isTransition){var i=R.T,s={};R.T=s;try{var o=n(a,r),l=R.S;null!==l&&l(s,o),Es(e,t,o)}catch(c){Ps(e,t,c)}finally{null!==i&&null!==s.types&&(i.types=s.types),R.T=i}}else try{Es(e,t,i=n(a,r))}catch(u){Ps(e,t,u)}}function Es(e,t,n){null!==n&&"object"==typeof n&&"function"==typeof n.then?n.then(function(n){Ms(e,t,n)},function(n){return Ps(e,t,n)}):Ms(e,t,n)}function Ms(e,t,n){t.status="fulfilled",t.value=n,Ls(t),e.state=n,null!==(t=e.pending)&&((n=t.next)===t?e.pending=null:(n=n.next,t.next=n,Ts(e,n)))}function Ps(e,t,n){var r=e.pending;if(e.pending=null,null!==r){r=r.next;do{t.status="rejected",t.reason=n,Ls(t),t=t.next}while(t!==r)}e.action=null}function Ls(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Ds(e,t){return t}function As(e,t){if(ha){var n=gc.formState;if(null!==n){e:{var r=Ui;if(ha){if(fa){t:{for(var a=fa,i=ma;8!==a.nodeType;){if(!i){a=null;break t}if(null===(a=zd(a.nextSibling))){a=null;break t}}a="F!"===(i=a.data)||"F"===i?a:null}if(a){fa=zd(a.nextSibling),r="F!"===a.data;break e}}ya(r)}r=!1}r&&(t=n[0])}}return(n=cs()).memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ds,lastRenderedState:t},n.queue=r,n=uo.bind(null,Ui,r),r.dispatch=n,r=js(!1),i=ho.bind(null,Ui,!1,r.queue),a={state:t,dispatch:null,action:e,pending:null},(r=cs()).queue=a,n=Ns.bind(null,Ui,a,i,n),a.dispatch=n,r.memoizedState=e,[t,n,!1]}function _s(e){return zs(us(),Wi,e)}function zs(e,t,n){if(t=gs(e,t,Ds)[0],e=ms(ps)[0],"object"==typeof t&&null!==t&&"function"==typeof t.then)try{var r=ds(t)}catch(s){if(s===Ja)throw ti;throw s}else r=t;var a=(t=us()).queue,i=a.dispatch;return n!==t.memoizedState&&(Ui.flags|=2048,Vs(9,{destroy:void 0},Rs.bind(null,a,n),null)),[r,i,e]}function Rs(e,t){e.action=t}function Fs(e){var t=us(),n=Wi;if(null!==n)return zs(t,n,e);us(),t=t.memoizedState;var r=(n=us()).queue.dispatch;return n.memoizedState=e,[t,r,!1]}function Vs(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},null===(t=Ui.updateQueue)&&(t={lastEffect:null,events:null,stores:null,memoCache:null},Ui.updateQueue=t),null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Os(){return us().memoizedState}function Is(e,t,n,r){var a=cs();Ui.flags|=e,a.memoizedState=Vs(1|t,{destroy:void 0},n,void 0===r?null:r)}function $s(e,t,n,r){var a=us();r=void 0===r?null:r;var i=a.memoizedState.inst;null!==Wi&&null!==r&&ts(r,Wi.memoizedState.deps)?a.memoizedState=Vs(t,i,n,r):(Ui.flags|=e,a.memoizedState=Vs(1|t,i,n,r))}function Bs(e,t){Is(8390656,8,e,t)}function Hs(e,t){$s(2048,8,e,t)}function Us(e){var t=us().memoizedState;return function(e){Ui.flags|=4;var t=Ui.updateQueue;if(null===t)t={lastEffect:null,events:null,stores:null,memoCache:null},Ui.updateQueue=t,t.events=[e];else{var n=t.events;null===n?t.events=[e]:n.push(e)}}({ref:t,nextImpl:e}),function(){if(2&mc)throw Error(r(440));return t.impl.apply(void 0,arguments)}}function Ws(e,t){return $s(4,2,e,t)}function qs(e,t){return $s(4,4,e,t)}function Ys(e,t){if("function"==typeof t){e=e();var n=t(e);return function(){"function"==typeof n?n():t(null)}}if(null!=t)return e=e(),t.current=e,function(){t.current=null}}function Ks(e,t,n){n=null!=n?n.concat([e]):null,$s(4,4,Ys.bind(null,t,e),n)}function Qs(){}function Xs(e,t){var n=us();t=void 0===t?null:t;var r=n.memoizedState;return null!==t&&ts(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Gs(e,t){var n=us();t=void 0===t?null:t;var r=n.memoizedState;if(null!==t&&ts(t,r[1]))return r[0];if(r=e(),Qi){we(!0);try{e()}finally{we(!1)}}return n.memoizedState=[r,t],r}function Zs(e,t,n){return void 0===n||1073741824&Hi&&!(261930&vc)?e.memoizedState=t:(e.memoizedState=n,e=Qc(),Ui.lanes|=e,Nc|=e,n)}function Js(e,t,n,r){return er(n,t)?n:null!==Mi.current?(e=Zs(e,n,r),er(e,t)||(zo=!0),e):42&Hi&&(!(1073741824&Hi)||261930&vc)?(e=Qc(),Ui.lanes|=e,Nc|=e,t):(zo=!0,e.memoizedState=n)}function eo(e,t,n,r,a){var i=F.p;F.p=0!==i&&8>i?i:8;var s,o,l,c=R.T,u={};R.T=u,ho(e,!1,t,n);try{var d=a(),f=R.S;if(null!==f&&f(u,d),null!==d&&"object"==typeof d&&"function"==typeof d.then)fo(e,t,(s=r,o=[],l={status:"pending",value:null,reason:null,then:function(e){o.push(e)}},d.then(function(){l.status="fulfilled",l.value=s;for(var e=0;e<o.length;e++)(0,o[e])(s)},function(e){for(l.status="rejected",l.reason=e,e=0;e<o.length;e++)(0,o[e])(void 0)}),l),Kc());else fo(e,t,r,Kc())}catch(h){fo(e,t,{then:function(){},status:"rejected",reason:h},Kc())}finally{F.p=i,null!==c&&null!==u.types&&(c.types=u.types),R.T=c}}function to(){}function no(e,t,n,a){if(5!==e.tag)throw Error(r(476));var i=ro(e).queue;eo(e,i,t,V,null===n?to:function(){return ao(e),n(a)})}function ro(e){var t=e.memoizedState;if(null!==t)return t;var n={};return(t={memoizedState:V,baseState:V,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ps,lastRenderedState:V},next:null}).next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ps,lastRenderedState:n},next:null},e.memoizedState=t,null!==(e=e.alternate)&&(e.memoizedState=t),t}function ao(e){var t=ro(e);null===t.next&&(t=e.alternate.memoizedState),fo(e,t.next.queue,{},Kc())}function io(){return _a(hf)}function so(){return us().memoizedState}function oo(){return us().memoizedState}function lo(e){for(var t=e.return;null!==t;){switch(t.tag){case 24:case 3:var n=Kc(),r=wi(t,e=bi(n),n);return null!==r&&(Xc(r,t,n),ki(r,t,n)),t={cache:$a()},void(e.payload=t)}t=t.return}}function co(e,t,n){var r=Kc();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},po(e)?mo(t,n):null!==(n=_r(e,t,n,r))&&(Xc(n,e,r),go(n,t,r))}function uo(e,t,n){fo(e,t,n,Kc())}function fo(e,t,n,r){var a={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(po(e))mo(t,a);else{var i=e.alternate;if(0===e.lanes&&(null===i||0===i.lanes)&&null!==(i=t.lastRenderedReducer))try{var s=t.lastRenderedState,o=i(s,n);if(a.hasEagerState=!0,a.eagerState=o,er(o,s))return Ar(e,t,a,0),null===gc&&Dr(),!1}catch(l){}if(null!==(n=_r(e,t,a,r)))return Xc(n,e,r),go(n,t,r),!0}return!1}function ho(e,t,n,a){if(a={lane:2,revertLane:Uu(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},po(e)){if(t)throw Error(r(479))}else null!==(t=_r(e,n,a,2))&&Xc(t,e,2)}function po(e){var t=e.alternate;return e===Ui||null!==t&&t===Ui}function mo(e,t){Ki=Yi=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function go(e,t,n){if(4194048&n){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,Re(e,n)}}var yo={readContext:_a,use:fs,useCallback:es,useContext:es,useEffect:es,useImperativeHandle:es,useLayoutEffect:es,useInsertionEffect:es,useMemo:es,useReducer:es,useRef:es,useState:es,useDebugValue:es,useDeferredValue:es,useTransition:es,useSyncExternalStore:es,useId:es,useHostTransitionStatus:es,useFormState:es,useActionState:es,useOptimistic:es,useMemoCache:es,useCacheRefresh:es};yo.useEffectEvent=es;var vo={readContext:_a,use:fs,useCallback:function(e,t){return cs().memoizedState=[e,void 0===t?null:t],e},useContext:_a,useEffect:Bs,useImperativeHandle:function(e,t,n){n=null!=n?n.concat([e]):null,Is(4194308,4,Ys.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Is(4194308,4,e,t)},useInsertionEffect:function(e,t){Is(4,2,e,t)},useMemo:function(e,t){var n=cs();t=void 0===t?null:t;var r=e();if(Qi){we(!0);try{e()}finally{we(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=cs();if(void 0!==n){var a=n(t);if(Qi){we(!0);try{n(t)}finally{we(!1)}}}else a=t;return r.memoizedState=r.baseState=a,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:a},r.queue=e,e=e.dispatch=co.bind(null,Ui,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},cs().memoizedState=e},useState:function(e){var t=(e=js(e)).queue,n=uo.bind(null,Ui,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Qs,useDeferredValue:function(e,t){return Zs(cs(),e,t)},useTransition:function(){var e=js(!1);return e=eo.bind(null,Ui,e.queue,!0,!1),cs().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var a=Ui,i=cs();if(ha){if(void 0===n)throw Error(r(407));n=n()}else{if(n=t(),null===gc)throw Error(r(349));127&vc||xs(a,t,n)}i.memoizedState=n;var s={value:n,getSnapshot:t};return i.queue=s,Bs(ws.bind(null,a,s,e),[e]),a.flags|=2048,Vs(9,{destroy:void 0},bs.bind(null,a,s,n,t),null),n},useId:function(){var e=cs(),t=gc.identifierPrefix;if(ha){var n=ia;t="_"+t+"R_"+(n=(aa&~(1<<32-ke(aa)-1)).toString(32)+n),0<(n=Xi++)&&(t+="H"+n.toString(32)),t+="_"}else t="_"+t+"r_"+(n=Ji++).toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:io,useFormState:As,useActionState:As,useOptimistic:function(e){var t=cs();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=ho.bind(null,Ui,!0,n),n.dispatch=t,[e,t]},useMemoCache:hs,useCacheRefresh:function(){return cs().memoizedState=lo.bind(null,Ui)},useEffectEvent:function(e){var t=cs(),n={impl:e};return t.memoizedState=n,function(){if(2&mc)throw Error(r(440));return n.impl.apply(void 0,arguments)}}},xo={readContext:_a,use:fs,useCallback:Xs,useContext:_a,useEffect:Hs,useImperativeHandle:Ks,useInsertionEffect:Ws,useLayoutEffect:qs,useMemo:Gs,useReducer:ms,useRef:Os,useState:function(){return ms(ps)},useDebugValue:Qs,useDeferredValue:function(e,t){return Js(us(),Wi.memoizedState,e,t)},useTransition:function(){var e=ms(ps)[0],t=us().memoizedState;return["boolean"==typeof e?e:ds(e),t]},useSyncExternalStore:vs,useId:so,useHostTransitionStatus:io,useFormState:_s,useActionState:_s,useOptimistic:function(e,t){return Cs(us(),0,e,t)},useMemoCache:hs,useCacheRefresh:oo};xo.useEffectEvent=Us;var bo={readContext:_a,use:fs,useCallback:Xs,useContext:_a,useEffect:Hs,useImperativeHandle:Ks,useInsertionEffect:Ws,useLayoutEffect:qs,useMemo:Gs,useReducer:ys,useRef:Os,useState:function(){return ys(ps)},useDebugValue:Qs,useDeferredValue:function(e,t){var n=us();return null===Wi?Zs(n,e,t):Js(n,Wi.memoizedState,e,t)},useTransition:function(){var e=ys(ps)[0],t=us().memoizedState;return["boolean"==typeof e?e:ds(e),t]},useSyncExternalStore:vs,useId:so,useHostTransitionStatus:io,useFormState:Fs,useActionState:Fs,useOptimistic:function(e,t){var n=us();return null!==Wi?Cs(n,0,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:hs,useCacheRefresh:oo};function wo(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:u({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}bo.useEffectEvent=Us;var ko={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Kc(),a=bi(r);a.payload=t,null!=n&&(a.callback=n),null!==(t=wi(e,a,r))&&(Xc(t,e,r),ki(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Kc(),a=bi(r);a.tag=1,a.payload=t,null!=n&&(a.callback=n),null!==(t=wi(e,a,r))&&(Xc(t,e,r),ki(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Kc(),r=bi(n);r.tag=2,null!=t&&(r.callback=t),null!==(t=wi(e,r,n))&&(Xc(t,e,n),ki(t,e,n))}};function So(e,t,n,r,a,i,s){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,i,s):!t.prototype||!t.prototype.isPureReactComponent||(!tr(n,r)||!tr(a,i))}function jo(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&ko.enqueueReplaceState(t,t.state,null)}function Co(e,t){var n=t;if("ref"in t)for(var r in n={},t)"ref"!==r&&(n[r]=t[r]);if(e=e.defaultProps)for(var a in n===t&&(n=u({},n)),e)void 0===n[a]&&(n[a]=e[a]);return n}function No(e){Er(e)}function To(e){console.error(e)}function Eo(e){Er(e)}function Mo(e,t){try{(0,e.onUncaughtError)(t.value,{componentStack:t.stack})}catch(n){setTimeout(function(){throw n})}}function Po(e,t,n){try{(0,e.onCaughtError)(n.value,{componentStack:n.stack,errorBoundary:1===t.tag?t.stateNode:null})}catch(r){setTimeout(function(){throw r})}}function Lo(e,t,n){return(n=bi(n)).tag=3,n.payload={element:null},n.callback=function(){Mo(e,t)},n}function Do(e){return(e=bi(e)).tag=3,e}function Ao(e,t,n,r){var a=n.type.getDerivedStateFromError;if("function"==typeof a){var i=r.value;e.payload=function(){return a(i)},e.callback=function(){Po(t,n,r)}}var s=n.stateNode;null!==s&&"function"==typeof s.componentDidCatch&&(e.callback=function(){Po(t,n,r),"function"!=typeof a&&(null===Vc?Vc=new Set([this]):Vc.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:null!==e?e:""})})}var _o=Error(r(461)),zo=!1;function Ro(e,t,n,r){t.child=null===e?gi(t,null,n,r):mi(t,e.child,n,r)}function Fo(e,t,n,r,a){n=n.render;var i=t.ref;if("ref"in r){var s={};for(var o in r)"ref"!==o&&(s[o]=r[o])}else s=r;return Aa(t),r=ns(e,t,n,s,i,a),o=ss(),null===e||zo?(ha&&o&&la(t),t.flags|=1,Ro(e,t,r,a),t.child):(os(e,t,a),sl(e,t,a))}function Vo(e,t,n,r,a){if(null===e){var i=n.type;return"function"!=typeof i||$r(i)||void 0!==i.defaultProps||null!==n.compare?((e=Ur(n.type,null,r,t,t.mode,a)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=i,Oo(e,t,i,r,a))}if(i=e.child,!ol(e,a)){var s=i.memoizedProps;if((n=null!==(n=n.compare)?n:tr)(s,r)&&e.ref===t.ref)return sl(e,t,a)}return t.flags|=1,(e=Br(i,r)).ref=t.ref,e.return=t,t.child=e}function Oo(e,t,n,r,a){if(null!==e){var i=e.memoizedProps;if(tr(i,r)&&e.ref===t.ref){if(zo=!1,t.pendingProps=r=i,!ol(e,a))return t.lanes=e.lanes,sl(e,t,a);131072&e.flags&&(zo=!0)}}return qo(e,t,n,r,a)}function Io(e,t,n,r){var a=r.children,i=null!==e?e.memoizedState:null;if(null===e&&null===t.stateNode&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),"hidden"===r.mode){if(128&t.flags){if(i=null!==i?i.baseLanes|n:n,null!==e){for(r=t.child=e.child,a=0;null!==r;)a=a|r.lanes|r.childLanes,r=r.sibling;r=a&~i}else r=0,t.child=null;return Bo(e,t,i,n,r)}if(!(536870912&n))return r=t.lanes=536870912,Bo(e,t,null!==i?i.baseLanes|n:n,n,r);t.memoizedState={baseLanes:0,cachePool:null},null!==e&&Ga(0,null!==i?i.cachePool:null),null!==i?Li(t,i):Di(),Vi(t)}else null!==i?(Ga(0,i.cachePool),Li(t,i),Oi(),t.memoizedState=null):(null!==e&&Ga(0,null),Di(),Oi());return Ro(e,t,a,n),t.child}function $o(e,t){return null!==e&&22===e.tag||null!==t.stateNode||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Bo(e,t,n,r,a){var i=Xa();return i=null===i?null:{parent:Ia._currentValue,pool:i},t.memoizedState={baseLanes:n,cachePool:i},null!==e&&Ga(0,null),Di(),Vi(t),null!==e&&La(e,t,r,!0),t.childLanes=a,null}function Ho(e,t){return(t=tl({mode:t.mode,children:t.children},e.mode)).ref=e.ref,e.child=t,t.return=e,t}function Uo(e,t,n){return mi(t,e.child,null,n),(e=Ho(t,t.pendingProps)).flags|=2,Ii(t),t.memoizedState=null,e}function Wo(e,t){var n=t.ref;if(null===n)null!==e&&null!==e.ref&&(t.flags|=4194816);else{if("function"!=typeof n&&"object"!=typeof n)throw Error(r(284));null!==e&&e.ref===n||(t.flags|=4194816)}}function qo(e,t,n,r,a){return Aa(t),n=ns(e,t,n,r,void 0,a),r=ss(),null===e||zo?(ha&&r&&la(t),t.flags|=1,Ro(e,t,n,a),t.child):(os(e,t,a),sl(e,t,a))}function Yo(e,t,n,r,a,i){return Aa(t),t.updateQueue=null,n=as(t,r,n,a),rs(e),r=ss(),null===e||zo?(ha&&r&&la(t),t.flags|=1,Ro(e,t,n,i),t.child):(os(e,t,i),sl(e,t,i))}function Ko(e,t,n,r,a){if(Aa(t),null===t.stateNode){var i=Vr,s=n.contextType;"object"==typeof s&&null!==s&&(i=_a(s)),i=new n(r,i),t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,i.updater=ko,t.stateNode=i,i._reactInternals=t,(i=t.stateNode).props=r,i.state=t.memoizedState,i.refs={},vi(t),s=n.contextType,i.context="object"==typeof s&&null!==s?_a(s):Vr,i.state=t.memoizedState,"function"==typeof(s=n.getDerivedStateFromProps)&&(wo(t,n,s,r),i.state=t.memoizedState),"function"==typeof n.getDerivedStateFromProps||"function"==typeof i.getSnapshotBeforeUpdate||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||(s=i.state,"function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),s!==i.state&&ko.enqueueReplaceState(i,i.state,null),Ni(t,r,i,a),Ci(),i.state=t.memoizedState),"function"==typeof i.componentDidMount&&(t.flags|=4194308),r=!0}else if(null===e){i=t.stateNode;var o=t.memoizedProps,l=Co(n,o);i.props=l;var c=i.context,u=n.contextType;s=Vr,"object"==typeof u&&null!==u&&(s=_a(u));var d=n.getDerivedStateFromProps;u="function"==typeof d||"function"==typeof i.getSnapshotBeforeUpdate,o=t.pendingProps!==o,u||"function"!=typeof i.UNSAFE_componentWillReceiveProps&&"function"!=typeof i.componentWillReceiveProps||(o||c!==s)&&jo(t,i,r,s),yi=!1;var f=t.memoizedState;i.state=f,Ni(t,r,i,a),Ci(),c=t.memoizedState,o||f!==c||yi?("function"==typeof d&&(wo(t,n,d,r),c=t.memoizedState),(l=yi||So(t,n,l,r,f,c,s))?(u||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||("function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount()),"function"==typeof i.componentDidMount&&(t.flags|=4194308)):("function"==typeof i.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),i.props=r,i.state=c,i.context=s,r=l):("function"==typeof i.componentDidMount&&(t.flags|=4194308),r=!1)}else{i=t.stateNode,xi(e,t),u=Co(n,s=t.memoizedProps),i.props=u,d=t.pendingProps,f=i.context,c=n.contextType,l=Vr,"object"==typeof c&&null!==c&&(l=_a(c)),(c="function"==typeof(o=n.getDerivedStateFromProps)||"function"==typeof i.getSnapshotBeforeUpdate)||"function"!=typeof i.UNSAFE_componentWillReceiveProps&&"function"!=typeof i.componentWillReceiveProps||(s!==d||f!==l)&&jo(t,i,r,l),yi=!1,f=t.memoizedState,i.state=f,Ni(t,r,i,a),Ci();var h=t.memoizedState;s!==d||f!==h||yi||null!==e&&null!==e.dependencies&&Da(e.dependencies)?("function"==typeof o&&(wo(t,n,o,r),h=t.memoizedState),(u=yi||So(t,n,u,r,f,h,l)||null!==e&&null!==e.dependencies&&Da(e.dependencies))?(c||"function"!=typeof i.UNSAFE_componentWillUpdate&&"function"!=typeof i.componentWillUpdate||("function"==typeof i.componentWillUpdate&&i.componentWillUpdate(r,h,l),"function"==typeof i.UNSAFE_componentWillUpdate&&i.UNSAFE_componentWillUpdate(r,h,l)),"function"==typeof i.componentDidUpdate&&(t.flags|=4),"function"==typeof i.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof i.componentDidUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!=typeof i.getSnapshotBeforeUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=h),i.props=r,i.state=h,i.context=l,r=u):("function"!=typeof i.componentDidUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!=typeof i.getSnapshotBeforeUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return i=r,Wo(e,t),r=!!(128&t.flags),i||r?(i=t.stateNode,n=r&&"function"!=typeof n.getDerivedStateFromError?null:i.render(),t.flags|=1,null!==e&&r?(t.child=mi(t,e.child,null,a),t.child=mi(t,null,n,a)):Ro(e,t,n,a),t.memoizedState=i.state,e=t.child):e=sl(e,t,a),e}function Qo(e,t,n,r){return wa(),t.flags|=256,Ro(e,t,n,r),t.child}var Xo={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Go(e){return{baseLanes:e,cachePool:Za()}}function Zo(e,t,n){return e=null!==e?e.childLanes&~n:0,t&&(e|=Mc),e}function Jo(e,t,n){var a,i=t.pendingProps,s=!1,o=!!(128&t.flags);if((a=o)||(a=(null===e||null!==e.memoizedState)&&!!(2&$i.current)),a&&(s=!0,t.flags&=-129),a=!!(32&t.flags),t.flags&=-33,null===e){if(ha){if(s?Ri(t):Oi(),(e=fa)?null!==(e=null!==(e=Dd(e,ma))&&"&"!==e.data?e:null)&&(t.memoizedState={dehydrated:e,treeContext:null!==ra?{id:aa,overflow:ia}:null,retryLane:536870912,hydrationErrors:null},(n=Yr(e)).return=t,t.child=n,da=t,fa=null):e=null,null===e)throw ya(t);return _d(e)?t.lanes=32:t.lanes=536870912,null}var l=i.children;return i=i.fallback,s?(Oi(),l=tl({mode:"hidden",children:l},s=t.mode),i=Wr(i,s,n,null),l.return=t,i.return=t,l.sibling=i,t.child=l,(i=t.child).memoizedState=Go(n),i.childLanes=Zo(e,a,n),t.memoizedState=Xo,$o(null,i)):(Ri(t),el(t,l))}var c=e.memoizedState;if(null!==c&&null!==(l=c.dehydrated)){if(o)256&t.flags?(Ri(t),t.flags&=-257,t=nl(e,t,n)):null!==t.memoizedState?(Oi(),t.child=e.child,t.flags|=128,t=null):(Oi(),l=i.fallback,s=t.mode,i=tl({mode:"visible",children:i.children},s),(l=Wr(l,s,n,null)).flags|=2,i.return=t,l.return=t,i.sibling=l,t.child=i,mi(t,e.child,null,n),(i=t.child).memoizedState=Go(n),i.childLanes=Zo(e,a,n),t.memoizedState=Xo,t=$o(null,i));else if(Ri(t),_d(l)){if(a=l.nextSibling&&l.nextSibling.dataset)var u=a.dgst;a=u,(i=Error(r(419))).stack="",i.digest=a,Sa({value:i,source:null,stack:null}),t=nl(e,t,n)}else if(zo||La(e,t,n,!1),a=0!==(n&e.childLanes),zo||a){if(null!==(a=gc)&&(0!==(i=Fe(a,n))&&i!==c.retryLane))throw c.retryLane=i,zr(e,i),Xc(a,e,i),_o;Ad(l)||lu(),t=nl(e,t,n)}else Ad(l)?(t.flags|=192,t.child=e.child,t=null):(e=c.treeContext,fa=zd(l.nextSibling),da=t,ha=!0,pa=null,ma=!1,null!==e&&ua(t,e),(t=el(t,i.children)).flags|=4096);return t}return s?(Oi(),l=i.fallback,s=t.mode,u=(c=e.child).sibling,(i=Br(c,{mode:"hidden",children:i.children})).subtreeFlags=65011712&c.subtreeFlags,null!==u?l=Br(u,l):(l=Wr(l,s,n,null)).flags|=2,l.return=t,i.return=t,i.sibling=l,t.child=i,$o(null,i),i=t.child,null===(l=e.child.memoizedState)?l=Go(n):(null!==(s=l.cachePool)?(c=Ia._currentValue,s=s.parent!==c?{parent:c,pool:c}:s):s=Za(),l={baseLanes:l.baseLanes|n,cachePool:s}),i.memoizedState=l,i.childLanes=Zo(e,a,n),t.memoizedState=Xo,$o(e.child,i)):(Ri(t),e=(n=e.child).sibling,(n=Br(n,{mode:"visible",children:i.children})).return=t,n.sibling=null,null!==e&&(null===(a=t.deletions)?(t.deletions=[e],t.flags|=16):a.push(e)),t.child=n,t.memoizedState=null,n)}function el(e,t){return(t=tl({mode:"visible",children:t},e.mode)).return=e,e.child=t}function tl(e,t){return(e=Ir(22,e,null,t)).lanes=0,e}function nl(e,t,n){return mi(t,e.child,null,n),(e=el(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function rl(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),Ma(e.return,t,n)}function al(e,t,n,r,a,i){var s=e.memoizedState;null===s?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:a,treeForkCount:i}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=r,s.tail=n,s.tailMode=a,s.treeForkCount=i)}function il(e,t,n){var r=t.pendingProps,a=r.revealOrder,i=r.tail;r=r.children;var s=$i.current,o=!!(2&s);if(o?(s=1&s|2,t.flags|=128):s&=1,H($i,s),Ro(e,t,r,n),r=ha?ea:0,!o&&null!==e&&128&e.flags)e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&rl(e,n,t);else if(19===e.tag)rl(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(a){case"forwards":for(n=t.child,a=null;null!==n;)null!==(e=n.alternate)&&null===Bi(e)&&(a=n),n=n.sibling;null===(n=a)?(a=t.child,t.child=null):(a=n.sibling,n.sibling=null),al(t,!1,a,n,i,r);break;case"backwards":case"unstable_legacy-backwards":for(n=null,a=t.child,t.child=null;null!==a;){if(null!==(e=a.alternate)&&null===Bi(e)){t.child=a;break}e=a.sibling,a.sibling=n,n=a,a=e}al(t,!0,n,null,i,r);break;case"together":al(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function sl(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Nc|=t.lanes,0===(n&t.childLanes)){if(null===e)return null;if(La(e,t,n,!1),0===(n&t.childLanes))return null}if(null!==e&&t.child!==e.child)throw Error(r(153));if(null!==t.child){for(n=Br(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Br(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function ol(e,t){return 0!==(e.lanes&t)||!(null===(e=e.dependencies)||!Da(e))}function ll(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps)zo=!0;else{if(!(ol(e,n)||128&t.flags))return zo=!1,function(e,t,n){switch(t.tag){case 3:X(t,t.stateNode.containerInfo),Ta(0,Ia,e.memoizedState.cache),wa();break;case 27:case 5:Z(t);break;case 4:X(t,t.stateNode.containerInfo);break;case 10:Ta(0,t.type,t.memoizedProps.value);break;case 31:if(null!==t.memoizedState)return t.flags|=128,Fi(t),null;break;case 13:var r=t.memoizedState;if(null!==r)return null!==r.dehydrated?(Ri(t),t.flags|=128,null):0!==(n&t.child.childLanes)?Jo(e,t,n):(Ri(t),null!==(e=sl(e,t,n))?e.sibling:null);Ri(t);break;case 19:var a=!!(128&e.flags);if((r=0!==(n&t.childLanes))||(La(e,t,n,!1),r=0!==(n&t.childLanes)),a){if(r)return il(e,t,n);t.flags|=128}if(null!==(a=t.memoizedState)&&(a.rendering=null,a.tail=null,a.lastEffect=null),H($i,$i.current),r)break;return null;case 22:return t.lanes=0,Io(e,t,n,t.pendingProps);case 24:Ta(0,Ia,e.memoizedState.cache)}return sl(e,t,n)}(e,t,n);zo=!!(131072&e.flags)}else zo=!1,ha&&1048576&t.flags&&oa(t,ea,t.index);switch(t.lanes=0,t.tag){case 16:e:{var a=t.pendingProps;if(e=ii(t.elementType),t.type=e,"function"!=typeof e){if(null!=e){var i=e.$$typeof;if(i===k){t.tag=11,t=Fo(null,t,e,a,n);break e}if(i===N){t.tag=14,t=Vo(null,t,e,a,n);break e}}throw t=_(e)||e,Error(r(306,t,""))}$r(e)?(a=Co(e,a),t.tag=1,t=Ko(null,t,e,a,n)):(t.tag=0,t=qo(null,t,e,a,n))}return t;case 0:return qo(e,t,t.type,t.pendingProps,n);case 1:return Ko(e,t,a=t.type,i=Co(a,t.pendingProps),n);case 3:e:{if(X(t,t.stateNode.containerInfo),null===e)throw Error(r(387));a=t.pendingProps;var s=t.memoizedState;i=s.element,xi(e,t),Ni(t,a,null,n);var o=t.memoizedState;if(a=o.cache,Ta(0,Ia,a),a!==s.cache&&Pa(t,[Ia],n,!0),Ci(),a=o.element,s.isDehydrated){if(s={element:a,isDehydrated:!1,cache:o.cache},t.updateQueue.baseState=s,t.memoizedState=s,256&t.flags){t=Qo(e,t,a,n);break e}if(a!==i){Sa(i=Xr(Error(r(424)),t)),t=Qo(e,t,a,n);break e}if(9===(e=t.stateNode.containerInfo).nodeType)e=e.body;else e="HTML"===e.nodeName?e.ownerDocument.body:e;for(fa=zd(e.firstChild),da=t,ha=!0,pa=null,ma=!0,n=gi(t,null,a,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(wa(),a===i){t=sl(e,t,n);break e}Ro(e,t,a,n)}t=t.child}return t;case 26:return Wo(e,t),null===e?(n=Yd(t.type,null,t.pendingProps,null))?t.memoizedState=n:ha||(n=t.type,e=t.pendingProps,(a=vd(K.current).createElement(n))[He]=t,a[Ue]=e,pd(a,n,e),nt(a),t.stateNode=a):t.memoizedState=Yd(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Z(t),null===e&&ha&&(a=t.stateNode=Od(t.type,t.pendingProps,K.current),da=t,ma=!0,i=fa,Ed(t.type)?(Rd=i,fa=zd(a.firstChild)):fa=i),Ro(e,t,t.pendingProps.children,n),Wo(e,t),null===e&&(t.flags|=4194304),t.child;case 5:return null===e&&ha&&((i=a=fa)&&(null!==(a=function(e,t,n,r){for(;1===e.nodeType;){var a=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&("INPUT"!==e.nodeName||"hidden"!==e.type))break}else if(r){if(!e[Xe])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if("stylesheet"===(i=e.getAttribute("rel"))&&e.hasAttribute("data-precedence"))break;if(i!==a.rel||e.getAttribute("href")!==(null==a.href||""===a.href?null:a.href)||e.getAttribute("crossorigin")!==(null==a.crossOrigin?null:a.crossOrigin)||e.getAttribute("title")!==(null==a.title?null:a.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(((i=e.getAttribute("src"))!==(null==a.src?null:a.src)||e.getAttribute("type")!==(null==a.type?null:a.type)||e.getAttribute("crossorigin")!==(null==a.crossOrigin?null:a.crossOrigin))&&i&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else{if("input"!==t||"hidden"!==e.type)return e;var i=null==a.name?null:""+a.name;if("hidden"===a.type&&e.getAttribute("name")===i)return e}if(null===(e=zd(e.nextSibling)))break}return null}(a,t.type,t.pendingProps,ma))?(t.stateNode=a,da=t,fa=zd(a.firstChild),ma=!1,i=!0):i=!1),i||ya(t)),Z(t),i=t.type,s=t.pendingProps,o=null!==e?e.memoizedProps:null,a=s.children,wd(i,s)?a=null:null!==o&&wd(i,o)&&(t.flags|=32),null!==t.memoizedState&&(i=ns(e,t,is,null,null,n),hf._currentValue=i),Wo(e,t),Ro(e,t,a,n),t.child;case 6:return null===e&&ha&&((e=n=fa)&&(null!==(n=function(e,t,n){if(""===t)return null;for(;3!==e.nodeType;){if((1!==e.nodeType||"INPUT"!==e.nodeName||"hidden"!==e.type)&&!n)return null;if(null===(e=zd(e.nextSibling)))return null}return e}(n,t.pendingProps,ma))?(t.stateNode=n,da=t,fa=null,e=!0):e=!1),e||ya(t)),null;case 13:return Jo(e,t,n);case 4:return X(t,t.stateNode.containerInfo),a=t.pendingProps,null===e?t.child=mi(t,null,a,n):Ro(e,t,a,n),t.child;case 11:return Fo(e,t,t.type,t.pendingProps,n);case 7:return Ro(e,t,t.pendingProps,n),t.child;case 8:case 12:return Ro(e,t,t.pendingProps.children,n),t.child;case 10:return a=t.pendingProps,Ta(0,t.type,a.value),Ro(e,t,a.children,n),t.child;case 9:return i=t.type._context,a=t.pendingProps.children,Aa(t),a=a(i=_a(i)),t.flags|=1,Ro(e,t,a,n),t.child;case 14:return Vo(e,t,t.type,t.pendingProps,n);case 15:return Oo(e,t,t.type,t.pendingProps,n);case 19:return il(e,t,n);case 31:return function(e,t,n){var a=t.pendingProps,i=!!(128&t.flags);if(t.flags&=-129,null===e){if(ha){if("hidden"===a.mode)return e=Ho(t,a),t.lanes=536870912,$o(null,e);if(Fi(t),(e=fa)?null!==(e=null!==(e=Dd(e,ma))&&"&"===e.data?e:null)&&(t.memoizedState={dehydrated:e,treeContext:null!==ra?{id:aa,overflow:ia}:null,retryLane:536870912,hydrationErrors:null},(n=Yr(e)).return=t,t.child=n,da=t,fa=null):e=null,null===e)throw ya(t);return t.lanes=536870912,null}return Ho(t,a)}var s=e.memoizedState;if(null!==s){var o=s.dehydrated;if(Fi(t),i)if(256&t.flags)t.flags&=-257,t=Uo(e,t,n);else{if(null===t.memoizedState)throw Error(r(558));t.child=e.child,t.flags|=128,t=null}else if(zo||La(e,t,n,!1),i=0!==(n&e.childLanes),zo||i){if(null!==(a=gc)&&0!==(o=Fe(a,n))&&o!==s.retryLane)throw s.retryLane=o,zr(e,o),Xc(a,e,o),_o;lu(),t=Uo(e,t,n)}else e=s.treeContext,fa=zd(o.nextSibling),da=t,ha=!0,pa=null,ma=!1,null!==e&&ua(t,e),(t=Ho(t,a)).flags|=4096;return t}return(e=Br(e.child,{mode:a.mode,children:a.children})).ref=t.ref,t.child=e,e.return=t,e}(e,t,n);case 22:return Io(e,t,n,t.pendingProps);case 24:return Aa(t),a=_a(Ia),null===e?(null===(i=Xa())&&(i=gc,s=$a(),i.pooledCache=s,s.refCount++,null!==s&&(i.pooledCacheLanes|=n),i=s),t.memoizedState={parent:a,cache:i},vi(t),Ta(0,Ia,i)):(0!==(e.lanes&n)&&(xi(e,t),Ni(t,null,null,n),Ci()),i=e.memoizedState,s=t.memoizedState,i.parent!==a?(i={parent:a,cache:a},t.memoizedState=i,0===t.lanes&&(t.memoizedState=t.updateQueue.baseState=i),Ta(0,Ia,a)):(a=s.cache,Ta(0,Ia,a),a!==i.cache&&Pa(t,[Ia],n,!0))),Ro(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(r(156,t.tag))}function cl(e){e.flags|=4}function ul(e,t,n,r,a){if((t=!!(32&e.mode))&&(t=!1),t){if(e.flags|=16777216,(335544128&a)===a)if(e.stateNode.complete)e.flags|=8192;else{if(!iu())throw si=ni,ei;e.flags|=8192}}else e.flags&=-16777217}function dl(e,t){if("stylesheet"!==t.type||4&t.state.loading)e.flags&=-16777217;else if(e.flags|=16777216,!of(t)){if(!iu())throw si=ni,ei;e.flags|=8192}}function fl(e,t){null!==t&&(e.flags|=4),16384&e.flags&&(t=22!==e.tag?De():536870912,e.lanes|=t,Pc|=t)}function hl(e,t){if(!ha)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function pl(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var a=e.child;null!==a;)n|=a.lanes|a.childLanes,r|=65011712&a.subtreeFlags,r|=65011712&a.flags,a.return=e,a=a.sibling;else for(a=e.child;null!==a;)n|=a.lanes|a.childLanes,r|=a.subtreeFlags,r|=a.flags,a.return=e,a=a.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function ml(e,t,n){var a=t.pendingProps;switch(ca(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:case 1:return pl(t),null;case 3:return n=t.stateNode,a=null,null!==e&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),Ea(Ia),G(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),null!==e&&null!==e.child||(ba(t)?cl(t):null===e||e.memoizedState.isDehydrated&&!(256&t.flags)||(t.flags|=1024,ka())),pl(t),null;case 26:var i=t.type,s=t.memoizedState;return null===e?(cl(t),null!==s?(pl(t),dl(t,s)):(pl(t),ul(t,i,0,0,n))):s?s!==e.memoizedState?(cl(t),pl(t),dl(t,s)):(pl(t),t.flags&=-16777217):((e=e.memoizedProps)!==a&&cl(t),pl(t),ul(t,i,0,0,n)),null;case 27:if(J(t),n=K.current,i=t.type,null!==e&&null!=t.stateNode)e.memoizedProps!==a&&cl(t);else{if(!a){if(null===t.stateNode)throw Error(r(166));return pl(t),null}e=q.current,ba(t)?va(t):(e=Od(i,a,n),t.stateNode=e,cl(t))}return pl(t),null;case 5:if(J(t),i=t.type,null!==e&&null!=t.stateNode)e.memoizedProps!==a&&cl(t);else{if(!a){if(null===t.stateNode)throw Error(r(166));return pl(t),null}if(s=q.current,ba(t))va(t);else{var o=vd(K.current);switch(s){case 1:s=o.createElementNS("http://www.w3.org/2000/svg",i);break;case 2:s=o.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;default:switch(i){case"svg":s=o.createElementNS("http://www.w3.org/2000/svg",i);break;case"math":s=o.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;case"script":(s=o.createElement("div")).innerHTML="<script><\\/script>",s=s.removeChild(s.firstChild);break;case"select":s="string"==typeof a.is?o.createElement("select",{is:a.is}):o.createElement("select"),a.multiple?s.multiple=!0:a.size&&(s.size=a.size);break;default:s="string"==typeof a.is?o.createElement(i,{is:a.is}):o.createElement(i)}}s[He]=t,s[Ue]=a;e:for(o=t.child;null!==o;){if(5===o.tag||6===o.tag)s.appendChild(o.stateNode);else if(4!==o.tag&&27!==o.tag&&null!==o.child){o.child.return=o,o=o.child;continue}if(o===t)break e;for(;null===o.sibling;){if(null===o.return||o.return===t)break e;o=o.return}o.sibling.return=o.return,o=o.sibling}t.stateNode=s;e:switch(pd(s,i,a),i){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break e;case"img":a=!0;break e;default:a=!1}a&&cl(t)}}return pl(t),ul(t,t.type,null===e||e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&null!=t.stateNode)e.memoizedProps!==a&&cl(t);else{if("string"!=typeof a&&null===t.stateNode)throw Error(r(166));if(e=K.current,ba(t)){if(e=t.stateNode,n=t.memoizedProps,a=null,null!==(i=da))switch(i.tag){case 27:case 5:a=i.memoizedProps}e[He]=t,(e=!!(e.nodeValue===n||null!==a&&!0===a.suppressHydrationWarning||dd(e.nodeValue,n)))||ya(t,!0)}else(e=vd(e).createTextNode(a))[He]=t,t.stateNode=e}return pl(t),null;case 31:if(n=t.memoizedState,null===e||null!==e.memoizedState){if(a=ba(t),null!==n){if(null===e){if(!a)throw Error(r(318));if(!(e=null!==(e=t.memoizedState)?e.dehydrated:null))throw Error(r(557));e[He]=t}else wa(),!(128&t.flags)&&(t.memoizedState=null),t.flags|=4;pl(t),e=!1}else n=ka(),null!==e&&null!==e.memoizedState&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return 256&t.flags?(Ii(t),t):(Ii(t),null);if(128&t.flags)throw Error(r(558))}return pl(t),null;case 13:if(a=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(i=ba(t),null!==a&&null!==a.dehydrated){if(null===e){if(!i)throw Error(r(318));if(!(i=null!==(i=t.memoizedState)?i.dehydrated:null))throw Error(r(317));i[He]=t}else wa(),!(128&t.flags)&&(t.memoizedState=null),t.flags|=4;pl(t),i=!1}else i=ka(),null!==e&&null!==e.memoizedState&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return 256&t.flags?(Ii(t),t):(Ii(t),null)}return Ii(t),128&t.flags?(t.lanes=n,t):(n=null!==a,e=null!==e&&null!==e.memoizedState,n&&(i=null,null!==(a=t.child).alternate&&null!==a.alternate.memoizedState&&null!==a.alternate.memoizedState.cachePool&&(i=a.alternate.memoizedState.cachePool.pool),s=null,null!==a.memoizedState&&null!==a.memoizedState.cachePool&&(s=a.memoizedState.cachePool.pool),s!==i&&(a.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),fl(t,t.updateQueue),pl(t),null);case 4:return G(),null===e&&td(t.stateNode.containerInfo),pl(t),null;case 10:return Ea(t.type),pl(t),null;case 19:if(B($i),null===(a=t.memoizedState))return pl(t),null;if(i=!!(128&t.flags),null===(s=a.rendering))if(i)hl(a,!1);else{if(0!==Cc||null!==e&&128&e.flags)for(e=t.child;null!==e;){if(null!==(s=Bi(e))){for(t.flags|=128,hl(a,!1),e=s.updateQueue,t.updateQueue=e,fl(t,e),t.subtreeFlags=0,e=n,n=t.child;null!==n;)Hr(n,e),n=n.sibling;return H($i,1&$i.current|2),ha&&sa(t,a.treeForkCount),t.child}e=e.sibling}null!==a.tail&&ue()>Rc&&(t.flags|=128,i=!0,hl(a,!1),t.lanes=4194304)}else{if(!i)if(null!==(e=Bi(s))){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,fl(t,e),hl(a,!0),null===a.tail&&"hidden"===a.tailMode&&!s.alternate&&!ha)return pl(t),null}else 2*ue()-a.renderingStartTime>Rc&&536870912!==n&&(t.flags|=128,i=!0,hl(a,!1),t.lanes=4194304);a.isBackwards?(s.sibling=t.child,t.child=s):(null!==(e=a.last)?e.sibling=s:t.child=s,a.last=s)}return null!==a.tail?(e=a.tail,a.rendering=e,a.tail=e.sibling,a.renderingStartTime=ue(),e.sibling=null,n=$i.current,H($i,i?1&n|2:1&n),ha&&sa(t,a.treeForkCount),e):(pl(t),null);case 22:case 23:return Ii(t),Ai(),a=null!==t.memoizedState,null!==e?null!==e.memoizedState!==a&&(t.flags|=8192):a&&(t.flags|=8192),a?!!(536870912&n)&&!(128&t.flags)&&(pl(t),6&t.subtreeFlags&&(t.flags|=8192)):pl(t),null!==(n=t.updateQueue)&&fl(t,n.retryQueue),n=null,null!==e&&null!==e.memoizedState&&null!==e.memoizedState.cachePool&&(n=e.memoizedState.cachePool.pool),a=null,null!==t.memoizedState&&null!==t.memoizedState.cachePool&&(a=t.memoizedState.cachePool.pool),a!==n&&(t.flags|=2048),null!==e&&B(Qa),null;case 24:return n=null,null!==e&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Ea(Ia),pl(t),null;case 25:case 30:return null}throw Error(r(156,t.tag))}function gl(e,t){switch(ca(t),t.tag){case 1:return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return Ea(Ia),G(),65536&(e=t.flags)&&!(128&e)?(t.flags=-65537&e|128,t):null;case 26:case 27:case 5:return J(t),null;case 31:if(null!==t.memoizedState){if(Ii(t),null===t.alternate)throw Error(r(340));wa()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 13:if(Ii(t),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(r(340));wa()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return B($i),null;case 4:return G(),null;case 10:return Ea(t.type),null;case 22:case 23:return Ii(t),Ai(),null!==e&&B(Qa),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 24:return Ea(Ia),null;default:return null}}function yl(e,t){switch(ca(t),t.tag){case 3:Ea(Ia),G();break;case 26:case 27:case 5:J(t);break;case 4:G();break;case 31:null!==t.memoizedState&&Ii(t);break;case 13:Ii(t);break;case 19:B($i);break;case 10:Ea(t.type);break;case 22:case 23:Ii(t),Ai(),null!==e&&B(Qa);break;case 24:Ea(Ia)}}function vl(e,t){try{var n=t.updateQueue,r=null!==n?n.lastEffect:null;if(null!==r){var a=r.next;n=a;do{if((n.tag&e)===e){r=void 0;var i=n.create,s=n.inst;r=i(),s.destroy=r}n=n.next}while(n!==a)}}catch(o){Cu(t,t.return,o)}}function xl(e,t,n){try{var r=t.updateQueue,a=null!==r?r.lastEffect:null;if(null!==a){var i=a.next;r=i;do{if((r.tag&e)===e){var s=r.inst,o=s.destroy;if(void 0!==o){s.destroy=void 0,a=t;var l=n,c=o;try{c()}catch(u){Cu(a,l,u)}}}r=r.next}while(r!==i)}}catch(u){Cu(t,t.return,u)}}function bl(e){var t=e.updateQueue;if(null!==t){var n=e.stateNode;try{Ei(t,n)}catch(r){Cu(e,e.return,r)}}}function wl(e,t,n){n.props=Co(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(r){Cu(e,t,r)}}function kl(e,t){try{var n=e.ref;if(null!==n){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;default:r=e.stateNode}"function"==typeof n?e.refCleanup=n(r):n.current=r}}catch(a){Cu(e,t,a)}}function Sl(e,t){var n=e.ref,r=e.refCleanup;if(null!==n)if("function"==typeof r)try{r()}catch(a){Cu(e,t,a)}finally{e.refCleanup=null,null!=(e=e.alternate)&&(e.refCleanup=null)}else if("function"==typeof n)try{n(null)}catch(i){Cu(e,t,i)}else n.current=null}function jl(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&r.focus();break e;case"img":n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(a){Cu(e,e.return,a)}}function Cl(e,t,n){try{var a=e.stateNode;!function(e,t,n,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var i=null,s=null,o=null,l=null,c=null,u=null,d=null;for(p in n){var f=n[p];if(n.hasOwnProperty(p)&&null!=f)switch(p){case"checked":case"value":break;case"defaultValue":c=f;default:a.hasOwnProperty(p)||fd(e,t,p,null,a,f)}}for(var h in a){var p=a[h];if(f=n[h],a.hasOwnProperty(h)&&(null!=p||null!=f))switch(h){case"type":s=p;break;case"name":i=p;break;case"checked":u=p;break;case"defaultChecked":d=p;break;case"value":o=p;break;case"defaultValue":l=p;break;case"children":case"dangerouslySetInnerHTML":if(null!=p)throw Error(r(137,t));break;default:p!==f&&fd(e,t,h,p,a,f)}}return void bt(e,o,l,c,u,d,s,i);case"select":for(s in p=o=l=h=null,n)if(c=n[s],n.hasOwnProperty(s)&&null!=c)switch(s){case"value":break;case"multiple":p=c;default:a.hasOwnProperty(s)||fd(e,t,s,null,a,c)}for(i in a)if(s=a[i],c=n[i],a.hasOwnProperty(i)&&(null!=s||null!=c))switch(i){case"value":h=s;break;case"defaultValue":l=s;break;case"multiple":o=s;default:s!==c&&fd(e,t,i,s,a,c)}return t=l,n=o,a=p,void(null!=h?St(e,!!n,h,!1):!!a!=!!n&&(null!=t?St(e,!!n,t,!0):St(e,!!n,n?[]:"",!1)));case"textarea":for(l in p=h=null,n)if(i=n[l],n.hasOwnProperty(l)&&null!=i&&!a.hasOwnProperty(l))switch(l){case"value":case"children":break;default:fd(e,t,l,null,a,i)}for(o in a)if(i=a[o],s=n[o],a.hasOwnProperty(o)&&(null!=i||null!=s))switch(o){case"value":h=i;break;case"defaultValue":p=i;break;case"children":break;case"dangerouslySetInnerHTML":if(null!=i)throw Error(r(91));break;default:i!==s&&fd(e,t,o,i,a,s)}return void jt(e,h,p);case"option":for(var m in n)if(h=n[m],n.hasOwnProperty(m)&&null!=h&&!a.hasOwnProperty(m))if("selected"===m)e.selected=!1;else fd(e,t,m,null,a,h);for(c in a)if(h=a[c],p=n[c],a.hasOwnProperty(c)&&h!==p&&(null!=h||null!=p))if("selected"===c)e.selected=h&&"function"!=typeof h&&"symbol"!=typeof h;else fd(e,t,c,h,a,p);return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var g in n)h=n[g],n.hasOwnProperty(g)&&null!=h&&!a.hasOwnProperty(g)&&fd(e,t,g,null,a,h);for(u in a)if(h=a[u],p=n[u],a.hasOwnProperty(u)&&h!==p&&(null!=h||null!=p))switch(u){case"children":case"dangerouslySetInnerHTML":if(null!=h)throw Error(r(137,t));break;default:fd(e,t,u,h,a,p)}return;default:if(Pt(t)){for(var y in n)h=n[y],n.hasOwnProperty(y)&&void 0!==h&&!a.hasOwnProperty(y)&&hd(e,t,y,void 0,a,h);for(d in a)h=a[d],p=n[d],!a.hasOwnProperty(d)||h===p||void 0===h&&void 0===p||hd(e,t,d,h,a,p);return}}for(var v in n)h=n[v],n.hasOwnProperty(v)&&null!=h&&!a.hasOwnProperty(v)&&fd(e,t,v,null,a,h);for(f in a)h=a[f],p=n[f],!a.hasOwnProperty(f)||h===p||null==h&&null==p||fd(e,t,f,h,a,p)}(a,e.type,n,t),a[Ue]=t}catch(i){Cu(e,e.return,i)}}function Nl(e){return 5===e.tag||3===e.tag||26===e.tag||27===e.tag&&Ed(e.type)||4===e.tag}function Tl(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||Nl(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(27===e.tag&&Ed(e.type))continue e;if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function El(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?(9===n.nodeType?n.body:"HTML"===n.nodeName?n.ownerDocument.body:n).insertBefore(e,t):((t=9===n.nodeType?n.body:"HTML"===n.nodeName?n.ownerDocument.body:n).appendChild(e),null!=(n=n._reactRootContainer)||null!==t.onclick||(t.onclick=_t));else if(4!==r&&(27===r&&Ed(e.type)&&(n=e.stateNode,t=null),null!==(e=e.child)))for(El(e,t,n),e=e.sibling;null!==e;)El(e,t,n),e=e.sibling}function Ml(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&(27===r&&Ed(e.type)&&(n=e.stateNode),null!==(e=e.child)))for(Ml(e,t,n),e=e.sibling;null!==e;)Ml(e,t,n),e=e.sibling}function Pl(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,a=t.attributes;a.length;)t.removeAttributeNode(a[0]);pd(t,r,n),t[He]=e,t[Ue]=n}catch(i){Cu(e,e.return,i)}}var Ll=!1,Dl=!1,Al=!1,_l="function"==typeof WeakSet?WeakSet:Set,zl=null;function Rl(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Xl(e,n),4&r&&vl(5,n);break;case 1:if(Xl(e,n),4&r)if(e=n.stateNode,null===t)try{e.componentDidMount()}catch(s){Cu(n,n.return,s)}else{var a=Co(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(a,t,e.__reactInternalSnapshotBeforeUpdate)}catch(o){Cu(n,n.return,o)}}64&r&&bl(n),512&r&&kl(n,n.return);break;case 3:if(Xl(e,n),64&r&&null!==(e=n.updateQueue)){if(t=null,null!==n.child)switch(n.child.tag){case 27:case 5:case 1:t=n.child.stateNode}try{Ei(e,t)}catch(s){Cu(n,n.return,s)}}break;case 27:null===t&&4&r&&Pl(n);case 26:case 5:Xl(e,n),null===t&&4&r&&jl(n),512&r&&kl(n,n.return);break;case 12:Xl(e,n);break;case 31:Xl(e,n),4&r&&Bl(e,n);break;case 13:Xl(e,n),4&r&&Hl(e,n),64&r&&(null!==(e=n.memoizedState)&&(null!==(e=e.dehydrated)&&function(e,t){var n=e.ownerDocument;if("$~"===e.data)e._reactRetry=t;else if("$?"!==e.data||"loading"!==n.readyState)t();else{var r=function(){t(),n.removeEventListener("DOMContentLoaded",r)};n.addEventListener("DOMContentLoaded",r),e._reactRetry=r}}(e,n=Mu.bind(null,n))));break;case 22:if(!(r=null!==n.memoizedState||Ll)){t=null!==t&&null!==t.memoizedState||Dl,a=Ll;var i=Dl;Ll=r,(Dl=t)&&!i?Zl(e,n,!!(8772&n.subtreeFlags)):Xl(e,n),Ll=a,Dl=i}break;case 30:break;default:Xl(e,n)}}function Fl(e){var t=e.alternate;null!==t&&(e.alternate=null,Fl(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&Ge(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Vl=null,Ol=!1;function Il(e,t,n){for(n=n.child;null!==n;)$l(e,t,n),n=n.sibling}function $l(e,t,n){if(be&&"function"==typeof be.onCommitFiberUnmount)try{be.onCommitFiberUnmount(xe,n)}catch(i){}switch(n.tag){case 26:Dl||Sl(n,t),Il(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode).parentNode.removeChild(n);break;case 27:Dl||Sl(n,t);var r=Vl,a=Ol;Ed(n.type)&&(Vl=n.stateNode,Ol=!1),Il(e,t,n),Id(n.stateNode),Vl=r,Ol=a;break;case 5:Dl||Sl(n,t);case 6:if(r=Vl,a=Ol,Vl=null,Il(e,t,n),Ol=a,null!==(Vl=r))if(Ol)try{(9===Vl.nodeType?Vl.body:"HTML"===Vl.nodeName?Vl.ownerDocument.body:Vl).removeChild(n.stateNode)}catch(s){Cu(n,t,s)}else try{Vl.removeChild(n.stateNode)}catch(s){Cu(n,t,s)}break;case 18:null!==Vl&&(Ol?(Md(9===(e=Vl).nodeType?e.body:"HTML"===e.nodeName?e.ownerDocument.body:e,n.stateNode),Yf(e)):Md(Vl,n.stateNode));break;case 4:r=Vl,a=Ol,Vl=n.stateNode.containerInfo,Ol=!0,Il(e,t,n),Vl=r,Ol=a;break;case 0:case 11:case 14:case 15:xl(2,n,t),Dl||xl(4,n,t),Il(e,t,n);break;case 1:Dl||(Sl(n,t),"function"==typeof(r=n.stateNode).componentWillUnmount&&wl(n,t,r)),Il(e,t,n);break;case 21:Il(e,t,n);break;case 22:Dl=(r=Dl)||null!==n.memoizedState,Il(e,t,n),Dl=r;break;default:Il(e,t,n)}}function Bl(e,t){if(null===t.memoizedState&&(null!==(e=t.alternate)&&null!==(e=e.memoizedState))){e=e.dehydrated;try{Yf(e)}catch(n){Cu(t,t.return,n)}}}function Hl(e,t){if(null===t.memoizedState&&(null!==(e=t.alternate)&&(null!==(e=e.memoizedState)&&null!==(e=e.dehydrated))))try{Yf(e)}catch(n){Cu(t,t.return,n)}}function Ul(e,t){var n=function(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return null===t&&(t=e.stateNode=new _l),t;case 22:return null===(t=(e=e.stateNode)._retryCache)&&(t=e._retryCache=new _l),t;default:throw Error(r(435,e.tag))}}(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Pu.bind(null,e,t);t.then(r,r)}})}function Wl(e,t){var n=t.deletions;if(null!==n)for(var a=0;a<n.length;a++){var i=n[a],s=e,o=t,l=o;e:for(;null!==l;){switch(l.tag){case 27:if(Ed(l.type)){Vl=l.stateNode,Ol=!1;break e}break;case 5:Vl=l.stateNode,Ol=!1;break e;case 3:case 4:Vl=l.stateNode.containerInfo,Ol=!0;break e}l=l.return}if(null===Vl)throw Error(r(160));$l(s,o,i),Vl=null,Ol=!1,null!==(s=i.alternate)&&(s.return=null),i.return=null}if(13886&t.subtreeFlags)for(t=t.child;null!==t;)Yl(t,e),t=t.sibling}var ql=null;function Yl(e,t){var n=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Wl(t,e),Kl(e),4&a&&(xl(3,e,e.return),vl(3,e),xl(5,e,e.return));break;case 1:Wl(t,e),Kl(e),512&a&&(Dl||null===n||Sl(n,n.return)),64&a&&Ll&&(null!==(e=e.updateQueue)&&(null!==(a=e.callbacks)&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=null===n?a:n.concat(a))));break;case 26:var i=ql;if(Wl(t,e),Kl(e),512&a&&(Dl||null===n||Sl(n,n.return)),4&a){var s=null!==n?n.memoizedState:null;if(a=e.memoizedState,null===n)if(null===a)if(null===e.stateNode){e:{a=e.type,n=e.memoizedProps,i=i.ownerDocument||i;t:switch(a){case"title":(!(s=i.getElementsByTagName("title")[0])||s[Xe]||s[He]||"http://www.w3.org/2000/svg"===s.namespaceURI||s.hasAttribute("itemprop"))&&(s=i.createElement(a),i.head.insertBefore(s,i.querySelector("head > title"))),pd(s,a,n),s[He]=e,nt(s),a=s;break e;case"link":var o=af("link","href",i).get(a+(n.href||""));if(o)for(var l=0;l<o.length;l++)if((s=o[l]).getAttribute("href")===(null==n.href||""===n.href?null:n.href)&&s.getAttribute("rel")===(null==n.rel?null:n.rel)&&s.getAttribute("title")===(null==n.title?null:n.title)&&s.getAttribute("crossorigin")===(null==n.crossOrigin?null:n.crossOrigin)){o.splice(l,1);break t}pd(s=i.createElement(a),a,n),i.head.appendChild(s);break;case"meta":if(o=af("meta","content",i).get(a+(n.content||"")))for(l=0;l<o.length;l++)if((s=o[l]).getAttribute("content")===(null==n.content?null:""+n.content)&&s.getAttribute("name")===(null==n.name?null:n.name)&&s.getAttribute("property")===(null==n.property?null:n.property)&&s.getAttribute("http-equiv")===(null==n.httpEquiv?null:n.httpEquiv)&&s.getAttribute("charset")===(null==n.charSet?null:n.charSet)){o.splice(l,1);break t}pd(s=i.createElement(a),a,n),i.head.appendChild(s);break;default:throw Error(r(468,a))}s[He]=e,nt(s),a=s}e.stateNode=a}else sf(i,e.type,e.stateNode);else e.stateNode=Jd(i,a,e.memoizedProps);else s!==a?(null===s?null!==n.stateNode&&(n=n.stateNode).parentNode.removeChild(n):s.count--,null===a?sf(i,e.type,e.stateNode):Jd(i,a,e.memoizedProps)):null===a&&null!==e.stateNode&&Cl(e,e.memoizedProps,n.memoizedProps)}break;case 27:Wl(t,e),Kl(e),512&a&&(Dl||null===n||Sl(n,n.return)),null!==n&&4&a&&Cl(e,e.memoizedProps,n.memoizedProps);break;case 5:if(Wl(t,e),Kl(e),512&a&&(Dl||null===n||Sl(n,n.return)),32&e.flags){i=e.stateNode;try{Nt(i,"")}catch(m){Cu(e,e.return,m)}}4&a&&null!=e.stateNode&&Cl(e,i=e.memoizedProps,null!==n?n.memoizedProps:i),1024&a&&(Al=!0);break;case 6:if(Wl(t,e),Kl(e),4&a){if(null===e.stateNode)throw Error(r(162));a=e.memoizedProps,n=e.stateNode;try{n.nodeValue=a}catch(m){Cu(e,e.return,m)}}break;case 3:if(rf=null,i=ql,ql=Hd(t.containerInfo),Wl(t,e),ql=i,Kl(e),4&a&&null!==n&&n.memoizedState.isDehydrated)try{Yf(t.containerInfo)}catch(m){Cu(e,e.return,m)}Al&&(Al=!1,Ql(e));break;case 4:a=ql,ql=Hd(e.stateNode.containerInfo),Wl(t,e),Kl(e),ql=a;break;case 12:default:Wl(t,e),Kl(e);break;case 31:case 19:Wl(t,e),Kl(e),4&a&&(null!==(a=e.updateQueue)&&(e.updateQueue=null,Ul(e,a)));break;case 13:Wl(t,e),Kl(e),8192&e.child.flags&&null!==e.memoizedState!=(null!==n&&null!==n.memoizedState)&&(_c=ue()),4&a&&(null!==(a=e.updateQueue)&&(e.updateQueue=null,Ul(e,a)));break;case 22:i=null!==e.memoizedState;var c=null!==n&&null!==n.memoizedState,u=Ll,d=Dl;if(Ll=u||i,Dl=d||c,Wl(t,e),Dl=d,Ll=u,Kl(e),8192&a)e:for(t=e.stateNode,t._visibility=i?-2&t._visibility:1|t._visibility,i&&(null===n||c||Ll||Dl||Gl(e)),n=null,t=e;;){if(5===t.tag||26===t.tag){if(null===n){c=n=t;try{if(s=c.stateNode,i)"function"==typeof(o=s.style).setProperty?o.setProperty("display","none","important"):o.display="none";else{l=c.stateNode;var f=c.memoizedProps.style,h=null!=f&&f.hasOwnProperty("display")?f.display:null;l.style.display=null==h||"boolean"==typeof h?"":(""+h).trim()}}catch(m){Cu(c,c.return,m)}}}else if(6===t.tag){if(null===n){c=t;try{c.stateNode.nodeValue=i?"":c.memoizedProps}catch(m){Cu(c,c.return,m)}}}else if(18===t.tag){if(null===n){c=t;try{var p=c.stateNode;i?Pd(p,!0):Pd(c.stateNode,!1)}catch(m){Cu(c,c.return,m)}}}else if((22!==t.tag&&23!==t.tag||null===t.memoizedState||t===e)&&null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;null===t.sibling;){if(null===t.return||t.return===e)break e;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}4&a&&(null!==(a=e.updateQueue)&&(null!==(n=a.retryQueue)&&(a.retryQueue=null,Ul(e,n))));case 30:case 21:}}function Kl(e){var t=e.flags;if(2&t){try{for(var n,a=e.return;null!==a;){if(Nl(a)){n=a;break}a=a.return}if(null==n)throw Error(r(160));switch(n.tag){case 27:var i=n.stateNode;Ml(e,Tl(e),i);break;case 5:var s=n.stateNode;32&n.flags&&(Nt(s,""),n.flags&=-33),Ml(e,Tl(e),s);break;case 3:case 4:var o=n.stateNode.containerInfo;El(e,Tl(e),o);break;default:throw Error(r(161))}}catch(l){Cu(e,e.return,l)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function Ql(e){if(1024&e.subtreeFlags)for(e=e.child;null!==e;){var t=e;Ql(t),5===t.tag&&1024&t.flags&&t.stateNode.reset(),e=e.sibling}}function Xl(e,t){if(8772&t.subtreeFlags)for(t=t.child;null!==t;)Rl(e,t.alternate,t),t=t.sibling}function Gl(e){for(e=e.child;null!==e;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:xl(4,t,t.return),Gl(t);break;case 1:Sl(t,t.return);var n=t.stateNode;"function"==typeof n.componentWillUnmount&&wl(t,t.return,n),Gl(t);break;case 27:Id(t.stateNode);case 26:case 5:Sl(t,t.return),Gl(t);break;case 22:null===t.memoizedState&&Gl(t);break;default:Gl(t)}e=e.sibling}}function Zl(e,t,n){for(n=n&&!!(8772&t.subtreeFlags),t=t.child;null!==t;){var r=t.alternate,a=e,i=t,s=i.flags;switch(i.tag){case 0:case 11:case 15:Zl(a,i,n),vl(4,i);break;case 1:if(Zl(a,i,n),"function"==typeof(a=(r=i).stateNode).componentDidMount)try{a.componentDidMount()}catch(c){Cu(r,r.return,c)}if(null!==(a=(r=i).updateQueue)){var o=r.stateNode;try{var l=a.shared.hiddenCallbacks;if(null!==l)for(a.shared.hiddenCallbacks=null,a=0;a<l.length;a++)Ti(l[a],o)}catch(c){Cu(r,r.return,c)}}n&&64&s&&bl(i),kl(i,i.return);break;case 27:Pl(i);case 26:case 5:Zl(a,i,n),n&&null===r&&4&s&&jl(i),kl(i,i.return);break;case 12:Zl(a,i,n);break;case 31:Zl(a,i,n),n&&4&s&&Bl(a,i);break;case 13:Zl(a,i,n),n&&4&s&&Hl(a,i);break;case 22:null===i.memoizedState&&Zl(a,i,n),kl(i,i.return);break;case 30:break;default:Zl(a,i,n)}t=t.sibling}}function Jl(e,t){var n=null;null!==e&&null!==e.memoizedState&&null!==e.memoizedState.cachePool&&(n=e.memoizedState.cachePool.pool),e=null,null!==t.memoizedState&&null!==t.memoizedState.cachePool&&(e=t.memoizedState.cachePool.pool),e!==n&&(null!=e&&e.refCount++,null!=n&&Ba(n))}function ec(e,t){e=null,null!==t.alternate&&(e=t.alternate.memoizedState.cache),(t=t.memoizedState.cache)!==e&&(t.refCount++,null!=e&&Ba(e))}function tc(e,t,n,r){if(10256&t.subtreeFlags)for(t=t.child;null!==t;)nc(e,t,n,r),t=t.sibling}function nc(e,t,n,r){var a=t.flags;switch(t.tag){case 0:case 11:case 15:tc(e,t,n,r),2048&a&&vl(9,t);break;case 1:case 31:case 13:default:tc(e,t,n,r);break;case 3:tc(e,t,n,r),2048&a&&(e=null,null!==t.alternate&&(e=t.alternate.memoizedState.cache),(t=t.memoizedState.cache)!==e&&(t.refCount++,null!=e&&Ba(e)));break;case 12:if(2048&a){tc(e,t,n,r),e=t.stateNode;try{var i=t.memoizedProps,s=i.id,o=i.onPostCommit;"function"==typeof o&&o(s,null===t.alternate?"mount":"update",e.passiveEffectDuration,-0)}catch(l){Cu(t,t.return,l)}}else tc(e,t,n,r);break;case 23:break;case 22:i=t.stateNode,s=t.alternate,null!==t.memoizedState?2&i._visibility?tc(e,t,n,r):ac(e,t):2&i._visibility?tc(e,t,n,r):(i._visibility|=2,rc(e,t,n,r,!!(10256&t.subtreeFlags)||!1)),2048&a&&Jl(s,t);break;case 24:tc(e,t,n,r),2048&a&&ec(t.alternate,t)}}function rc(e,t,n,r,a){for(a=a&&(!!(10256&t.subtreeFlags)||!1),t=t.child;null!==t;){var i=e,s=t,o=n,l=r,c=s.flags;switch(s.tag){case 0:case 11:case 15:rc(i,s,o,l,a),vl(8,s);break;case 23:break;case 22:var u=s.stateNode;null!==s.memoizedState?2&u._visibility?rc(i,s,o,l,a):ac(i,s):(u._visibility|=2,rc(i,s,o,l,a)),a&&2048&c&&Jl(s.alternate,s);break;case 24:rc(i,s,o,l,a),a&&2048&c&&ec(s.alternate,s);break;default:rc(i,s,o,l,a)}t=t.sibling}}function ac(e,t){if(10256&t.subtreeFlags)for(t=t.child;null!==t;){var n=e,r=t,a=r.flags;switch(r.tag){case 22:ac(n,r),2048&a&&Jl(r.alternate,r);break;case 24:ac(n,r),2048&a&&ec(r.alternate,r);break;default:ac(n,r)}t=t.sibling}}var ic=8192;function sc(e,t,n){if(e.subtreeFlags&ic)for(e=e.child;null!==e;)oc(e,t,n),e=e.sibling}function oc(e,t,n){switch(e.tag){case 26:sc(e,t,n),e.flags&ic&&null!==e.memoizedState&&function(e,t,n,r){if(!("stylesheet"!==n.type||"string"==typeof r.media&&!1===matchMedia(r.media).matches||4&n.state.loading)){if(null===n.instance){var a=Kd(r.href),i=t.querySelector(Qd(a));if(i)return null!==(t=i._p)&&"object"==typeof t&&"function"==typeof t.then&&(e.count++,e=cf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=i,void nt(i);i=t.ownerDocument||t,r=Xd(r),(a=$d.get(a))&&tf(r,a),nt(i=i.createElement("link"));var s=i;s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),pd(i,"link",r),n.instance=i}null===e.stylesheets&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(3&n.state.loading)&&(e.count++,n=cf.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}(n,ql,e.memoizedState,e.memoizedProps);break;case 5:default:sc(e,t,n);break;case 3:case 4:var r=ql;ql=Hd(e.stateNode.containerInfo),sc(e,t,n),ql=r;break;case 22:null===e.memoizedState&&(null!==(r=e.alternate)&&null!==r.memoizedState?(r=ic,ic=16777216,sc(e,t,n),ic=r):sc(e,t,n))}}function lc(e){var t=e.alternate;if(null!==t&&null!==(e=t.child)){t.child=null;do{t=e.sibling,e.sibling=null,e=t}while(null!==e)}}function cc(e){var t=e.deletions;if(16&e.flags){if(null!==t)for(var n=0;n<t.length;n++){var r=t[n];zl=r,fc(r,e)}lc(e)}if(10256&e.subtreeFlags)for(e=e.child;null!==e;)uc(e),e=e.sibling}function uc(e){switch(e.tag){case 0:case 11:case 15:cc(e),2048&e.flags&&xl(9,e,e.return);break;case 3:case 12:default:cc(e);break;case 22:var t=e.stateNode;null!==e.memoizedState&&2&t._visibility&&(null===e.return||13!==e.return.tag)?(t._visibility&=-3,dc(e)):cc(e)}}function dc(e){var t=e.deletions;if(16&e.flags){if(null!==t)for(var n=0;n<t.length;n++){var r=t[n];zl=r,fc(r,e)}lc(e)}for(e=e.child;null!==e;){switch((t=e).tag){case 0:case 11:case 15:xl(8,t,t.return),dc(t);break;case 22:2&(n=t.stateNode)._visibility&&(n._visibility&=-3,dc(t));break;default:dc(t)}e=e.sibling}}function fc(e,t){for(;null!==zl;){var n=zl;switch(n.tag){case 0:case 11:case 15:xl(8,n,t);break;case 23:case 22:if(null!==n.memoizedState&&null!==n.memoizedState.cachePool){var r=n.memoizedState.cachePool.pool;null!=r&&r.refCount++}break;case 24:Ba(n.memoizedState.cache)}if(null!==(r=n.child))r.return=n,zl=r;else e:for(n=e;null!==zl;){var a=(r=zl).sibling,i=r.return;if(Fl(r),r===n){zl=null;break e}if(null!==a){a.return=i,zl=a;break e}zl=i}}}var hc={getCacheForType:function(e){var t=_a(Ia),n=t.data.get(e);return void 0===n&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return _a(Ia).controller.signal}},pc="function"==typeof WeakMap?WeakMap:Map,mc=0,gc=null,yc=null,vc=0,xc=0,bc=null,wc=!1,kc=!1,Sc=!1,jc=0,Cc=0,Nc=0,Tc=0,Ec=0,Mc=0,Pc=0,Lc=null,Dc=null,Ac=!1,_c=0,zc=0,Rc=1/0,Fc=null,Vc=null,Oc=0,Ic=null,$c=null,Bc=0,Hc=0,Uc=null,Wc=null,qc=0,Yc=null;function Kc(){return 2&mc&&0!==vc?vc&-vc:null!==R.T?Uu():Ie()}function Qc(){if(0===Mc)if(536870912&vc&&!ha)Mc=536870912;else{var e=Ne;!(3932160&(Ne<<=1))&&(Ne=262144),Mc=e}return null!==(e=_i.current)&&(e.flags|=32),Mc}function Xc(e,t,n){(e!==gc||2!==xc&&9!==xc)&&null===e.cancelPendingCommit||(ru(e,0),eu(e,vc,Mc,!1)),_e(e,n),2&mc&&e===gc||(e===gc&&(!(2&mc)&&(Tc|=n),4===Cc&&eu(e,vc,Mc,!1)),Fu(e))}function Gc(e,t,n){if(6&mc)throw Error(r(327));for(var a=!n&&!(127&t)&&0===(t&e.expiredLanes)||Pe(e,t),i=a?function(e,t){var n=mc;mc|=2;var a=su(),i=ou();gc!==e||vc!==t?(Fc=null,Rc=ue()+500,ru(e,t)):kc=Pe(e,t);e:for(;;)try{if(0!==xc&&null!==yc){t=yc;var s=bc;t:switch(xc){case 1:xc=0,bc=null,pu(e,t,s,1);break;case 2:case 9:if(ri(s)){xc=0,bc=null,hu(t);break}t=function(){2!==xc&&9!==xc||gc!==e||(xc=7),Fu(e)},s.then(t,t);break e;case 3:xc=7;break e;case 4:xc=5;break e;case 7:ri(s)?(xc=0,bc=null,hu(t)):(xc=0,bc=null,pu(e,t,s,7));break;case 5:var o=null;switch(yc.tag){case 26:o=yc.memoizedState;case 5:case 27:var l=yc;if(o?of(o):l.stateNode.complete){xc=0,bc=null;var c=l.sibling;if(null!==c)yc=c;else{var u=l.return;null!==u?(yc=u,mu(u)):yc=null}break t}}xc=0,bc=null,pu(e,t,s,5);break;case 6:xc=0,bc=null,pu(e,t,s,6);break;case 8:nu(),Cc=6;break e;default:throw Error(r(462))}}du();break}catch(d){au(e,d)}return Na=Ca=null,R.H=a,R.A=i,mc=n,null!==yc?0:(gc=null,vc=0,Dr(),Cc)}(e,t):cu(e,t,!0),s=a;;){if(0===i){kc&&!a&&eu(e,t,0,!1);break}if(n=e.current.alternate,!s||Jc(n)){if(2===i){if(s=t,e.errorRecoveryDisabledLanes&s)var o=0;else o=0!==(o=-536870913&e.pendingLanes)?o:536870912&o?536870912:0;if(0!==o){t=o;e:{var l=e;i=Lc;var c=l.current.memoizedState.isDehydrated;if(c&&(ru(l,o).flags|=256),2!==(o=cu(l,o,!1))){if(Sc&&!c){l.errorRecoveryDisabledLanes|=s,Tc|=s,i=4;break e}s=Dc,Dc=i,null!==s&&(null===Dc?Dc=s:Dc.push.apply(Dc,s))}i=o}if(s=!1,2!==i)continue}}if(1===i){ru(e,0),eu(e,t,0,!0);break}e:{switch(a=e,s=i){case 0:case 1:throw Error(r(345));case 4:if((4194048&t)!==t)break;case 6:eu(a,t,Mc,!wc);break e;case 2:Dc=null;break;case 3:case 5:break;default:throw Error(r(329))}if((62914560&t)===t&&10<(i=_c+300-ue())){if(eu(a,t,Mc,!wc),0!==Me(a,0,!0))break e;Bc=t,a.timeoutHandle=Sd(Zc.bind(null,a,n,Dc,Fc,Ac,t,Mc,Tc,Pc,wc,s,"Throttled",-0,0),i)}else Zc(a,n,Dc,Fc,Ac,t,Mc,Tc,Pc,wc,s,null,-0,0)}break}i=cu(e,t,!1),s=!1}Fu(e)}function Zc(e,t,n,r,a,i,s,o,l,c,u,d,f,h){if(e.timeoutHandle=-1,8192&(d=t.subtreeFlags)||!(16785408&~d)){oc(t,i,d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:_t});var p=(62914560&i)===i?_c-ue():(4194048&i)===i?zc-ue():0;if(null!==(p=function(e,t){return e.stylesheets&&0===e.count&&df(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&df(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&0===lf&&(lf=62500*function(){if("function"==typeof performance.getEntriesByType){for(var e=0,t=0,n=performance.getEntriesByType("resource"),r=0;r<n.length;r++){var a=n[r],i=a.transferSize,s=a.initiatorType,o=a.duration;if(i&&o&&md(s)){for(s=0,o=a.responseEnd,r+=1;r<n.length;r++){var l=n[r],c=l.startTime;if(c>o)break;var u=l.transferSize,d=l.initiatorType;u&&md(d)&&(s+=u*((l=l.responseEnd)<o?1:(o-c)/(l-c)))}if(--r,t+=8*(i+s)/(a.duration/1e3),10<++e)break}}if(0<e)return t/e/1e6}return navigator.connection&&"number"==typeof(e=navigator.connection.downlink)?e:5}());var a=setTimeout(function(){if(e.waitingForImages=!1,0===e.count&&(e.stylesheets&&df(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>lf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(a)}}:null}(d,p)))return Bc=i,e.cancelPendingCommit=p(yu.bind(null,e,t,i,n,r,a,s,o,l,u,d,null,f,h)),void eu(e,i,s,!c)}yu(e,t,i,n,r,a,s,o,l)}function Jc(e){for(var t=e;;){var n=t.tag;if((0===n||11===n||15===n)&&16384&t.flags&&(null!==(n=t.updateQueue)&&null!==(n=n.stores)))for(var r=0;r<n.length;r++){var a=n[r],i=a.getSnapshot;a=a.value;try{if(!er(i(),a))return!1}catch(s){return!1}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function eu(e,t,n,r){t&=~Ec,t&=~Tc,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var a=t;0<a;){var i=31-ke(a),s=1<<i;r[i]=-1,a&=~s}0!==n&&ze(e,n,t)}function tu(){return!!(6&mc)||(Vu(0),!1)}function nu(){if(null!==yc){if(0===xc)var e=yc.return;else Na=Ca=null,ls(e=yc),ci=null,ui=0,e=yc;for(;null!==e;)yl(e.alternate,e),e=e.return;yc=null}}function ru(e,t){var n=e.timeoutHandle;-1!==n&&(e.timeoutHandle=-1,jd(n)),null!==(n=e.cancelPendingCommit)&&(e.cancelPendingCommit=null,n()),Bc=0,nu(),gc=e,yc=n=Br(e.current,null),vc=t,xc=0,bc=null,wc=!1,kc=Pe(e,t),Sc=!1,Pc=Mc=Ec=Tc=Nc=Cc=0,Dc=Lc=null,Ac=!1,8&t&&(t|=32&t);var r=e.entangledLanes;if(0!==r)for(e=e.entanglements,r&=t;0<r;){var a=31-ke(r),i=1<<a;t|=e[a],r&=~i}return jc=t,Dr(),n}function au(e,t){Ui=null,R.H=yo,t===Ja||t===ti?(t=oi(),xc=3):t===ei?(t=oi(),xc=4):xc=t===_o?8:null!==t&&"object"==typeof t&&"function"==typeof t.then?6:1,bc=t,null===yc&&(Cc=1,Mo(e,Xr(t,e.current)))}function iu(){var e=_i.current;return null===e||((4194048&vc)===vc?null===zi:!!((62914560&vc)===vc||536870912&vc)&&e===zi)}function su(){var e=R.H;return R.H=yo,null===e?yo:e}function ou(){var e=R.A;return R.A=hc,e}function lu(){Cc=4,wc||(4194048&vc)!==vc&&null!==_i.current||(kc=!0),!(134217727&Nc)&&!(134217727&Tc)||null===gc||eu(gc,vc,Mc,!1)}function cu(e,t,n){var r=mc;mc|=2;var a=su(),i=ou();gc===e&&vc===t||(Fc=null,ru(e,t)),t=!1;var s=Cc;e:for(;;)try{if(0!==xc&&null!==yc){var o=yc,l=bc;switch(xc){case 8:nu(),s=6;break e;case 3:case 2:case 9:case 6:null===_i.current&&(t=!0);var c=xc;if(xc=0,bc=null,pu(e,o,l,c),n&&kc){s=0;break e}break;default:c=xc,xc=0,bc=null,pu(e,o,l,c)}}uu(),s=Cc;break}catch(u){au(e,u)}return t&&e.shellSuspendCounter++,Na=Ca=null,mc=r,R.H=a,R.A=i,null===yc&&(gc=null,vc=0,Dr()),s}function uu(){for(;null!==yc;)fu(yc)}function du(){for(;null!==yc&&!le();)fu(yc)}function fu(e){var t=ll(e.alternate,e,jc);e.memoizedProps=e.pendingProps,null===t?mu(e):yc=t}function hu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Yo(n,t,t.pendingProps,t.type,void 0,vc);break;case 11:t=Yo(n,t,t.pendingProps,t.type.render,t.ref,vc);break;case 5:ls(t);default:yl(n,t),t=ll(n,t=yc=Hr(t,jc),jc)}e.memoizedProps=e.pendingProps,null===t?mu(e):yc=t}function pu(e,t,n,a){Na=Ca=null,ls(t),ci=null,ui=0;var i=t.return;try{if(function(e,t,n,a,i){if(n.flags|=32768,null!==a&&"object"==typeof a&&"function"==typeof a.then){if(null!==(t=n.alternate)&&La(t,n,i,!0),null!==(n=_i.current)){switch(n.tag){case 31:case 13:return null===zi?lu():null===n.alternate&&0===Cc&&(Cc=3),n.flags&=-257,n.flags|=65536,n.lanes=i,a===ni?n.flags|=16384:(null===(t=n.updateQueue)?n.updateQueue=new Set([a]):t.add(a),Nu(e,a,i)),!1;case 22:return n.flags|=65536,a===ni?n.flags|=16384:(null===(t=n.updateQueue)?(t={transitions:null,markerInstances:null,retryQueue:new Set([a])},n.updateQueue=t):null===(n=t.retryQueue)?t.retryQueue=new Set([a]):n.add(a),Nu(e,a,i)),!1}throw Error(r(435,n.tag))}return Nu(e,a,i),lu(),!1}if(ha)return null!==(t=_i.current)?(!(65536&t.flags)&&(t.flags|=256),t.flags|=65536,t.lanes=i,a!==ga&&Sa(Xr(e=Error(r(422),{cause:a}),n))):(a!==ga&&Sa(Xr(t=Error(r(423),{cause:a}),n)),(e=e.current.alternate).flags|=65536,i&=-i,e.lanes|=i,a=Xr(a,n),Si(e,i=Lo(e.stateNode,a,i)),4!==Cc&&(Cc=2)),!1;var s=Error(r(520),{cause:a});if(s=Xr(s,n),null===Lc?Lc=[s]:Lc.push(s),4!==Cc&&(Cc=2),null===t)return!0;a=Xr(a,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=i&-i,n.lanes|=e,Si(n,e=Lo(n.stateNode,a,e)),!1;case 1:if(t=n.type,s=n.stateNode,!(128&n.flags||"function"!=typeof t.getDerivedStateFromError&&(null===s||"function"!=typeof s.componentDidCatch||null!==Vc&&Vc.has(s))))return n.flags|=65536,i&=-i,n.lanes|=i,Ao(i=Do(i),e,n,a),Si(n,i),!1}n=n.return}while(null!==n);return!1}(e,i,t,n,vc))return Cc=1,Mo(e,Xr(n,e.current)),void(yc=null)}catch(s){if(null!==i)throw yc=i,s;return Cc=1,Mo(e,Xr(n,e.current)),void(yc=null)}32768&t.flags?(ha||1===a?e=!0:kc||536870912&vc?e=!1:(wc=e=!0,(2===a||9===a||3===a||6===a)&&(null!==(a=_i.current)&&13===a.tag&&(a.flags|=16384))),gu(t,e)):mu(t)}function mu(e){var t=e;do{if(32768&t.flags)return void gu(t,wc);e=t.return;var n=ml(t.alternate,t,jc);if(null!==n)return void(yc=n);if(null!==(t=t.sibling))return void(yc=t);yc=t=e}while(null!==t);0===Cc&&(Cc=5)}function gu(e,t){do{var n=gl(e.alternate,e);if(null!==n)return n.flags&=32767,void(yc=n);if(null!==(n=e.return)&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&null!==(e=e.sibling))return void(yc=e);yc=e=n}while(null!==e);Cc=6,yc=null}function yu(e,t,n,a,i,s,o,l,c){e.cancelPendingCommit=null;do{ku()}while(0!==Oc);if(6&mc)throw Error(r(327));if(null!==t){if(t===e.current)throw Error(r(177));if(s=t.lanes|t.childLanes,function(e,t,n,r,a,i){var s=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var o=e.entanglements,l=e.expirationTimes,c=e.hiddenUpdates;for(n=s&~n;0<n;){var u=31-ke(n),d=1<<u;o[u]=0,l[u]=-1;var f=c[u];if(null!==f)for(c[u]=null,u=0;u<f.length;u++){var h=f[u];null!==h&&(h.lane&=-536870913)}n&=~d}0!==r&&ze(e,r,0),0!==i&&0===a&&0!==e.tag&&(e.suspendedLanes|=i&~(s&~t))}(e,n,s|=Lr,o,l,c),e===gc&&(yc=gc=null,vc=0),$c=t,Ic=e,Bc=n,Hc=s,Uc=i,Wc=a,10256&t.subtreeFlags||10256&t.flags?(e.callbackNode=null,e.callbackPriority=0,se(pe,function(){return Su(),null})):(e.callbackNode=null,e.callbackPriority=0),a=!!(13878&t.flags),13878&t.subtreeFlags||a){a=R.T,R.T=null,i=F.p,F.p=2,o=mc,mc|=4;try{!function(e,t){if(e=e.containerInfo,gd=kf,sr(e=ir(e))){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{var a=(n=(n=e.ownerDocument)&&n.defaultView||window).getSelection&&n.getSelection();if(a&&0!==a.rangeCount){n=a.anchorNode;var i=a.anchorOffset,s=a.focusNode;a=a.focusOffset;try{n.nodeType,s.nodeType}catch(g){n=null;break e}var o=0,l=-1,c=-1,u=0,d=0,f=e,h=null;t:for(;;){for(var p;f!==n||0!==i&&3!==f.nodeType||(l=o+i),f!==s||0!==a&&3!==f.nodeType||(c=o+a),3===f.nodeType&&(o+=f.nodeValue.length),null!==(p=f.firstChild);)h=f,f=p;for(;;){if(f===e)break t;if(h===n&&++u===i&&(l=o),h===s&&++d===a&&(c=o),null!==(p=f.nextSibling))break;h=(f=h).parentNode}f=p}n=-1===l||-1===c?null:{start:l,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(yd={focusedElem:e,selectionRange:n},kf=!1,zl=t;null!==zl;)if(e=(t=zl).child,1028&t.subtreeFlags&&null!==e)e.return=t,zl=e;else for(;null!==zl;){switch(s=(t=zl).alternate,e=t.flags,t.tag){case 0:if(4&e&&null!==(e=null!==(e=t.updateQueue)?e.events:null))for(n=0;n<e.length;n++)(i=e[n]).ref.impl=i.nextImpl;break;case 11:case 15:case 5:case 26:case 27:case 6:case 4:case 17:break;case 1:if(1024&e&&null!==s){e=void 0,n=t,i=s.memoizedProps,s=s.memoizedState,a=n.stateNode;try{var m=Co(n.type,i);e=a.getSnapshotBeforeUpdate(m,s),a.__reactInternalSnapshotBeforeUpdate=e}catch(y){Cu(n,n.return,y)}}break;case 3:if(1024&e)if(9===(n=(e=t.stateNode.containerInfo).nodeType))Ld(e);else if(1===n)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Ld(e);break;default:e.textContent=""}break;default:if(1024&e)throw Error(r(163))}if(null!==(e=t.sibling)){e.return=t.return,zl=e;break}zl=t.return}}(e,t)}finally{mc=o,F.p=i,R.T=a}}Oc=1,vu(),xu(),bu()}}function vu(){if(1===Oc){Oc=0;var e=Ic,t=$c,n=!!(13878&t.flags);if(13878&t.subtreeFlags||n){n=R.T,R.T=null;var r=F.p;F.p=2;var a=mc;mc|=4;try{Yl(t,e);var i=yd,s=ir(e.containerInfo),o=i.focusedElem,l=i.selectionRange;if(s!==o&&o&&o.ownerDocument&&ar(o.ownerDocument.documentElement,o)){if(null!==l&&sr(o)){var c=l.start,u=l.end;if(void 0===u&&(u=c),"selectionStart"in o)o.selectionStart=c,o.selectionEnd=Math.min(u,o.value.length);else{var d=o.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var h=f.getSelection(),p=o.textContent.length,m=Math.min(l.start,p),g=void 0===l.end?m:Math.min(l.end,p);!h.extend&&m>g&&(s=g,g=m,m=s);var y=rr(o,m),v=rr(o,g);if(y&&v&&(1!==h.rangeCount||h.anchorNode!==y.node||h.anchorOffset!==y.offset||h.focusNode!==v.node||h.focusOffset!==v.offset)){var x=d.createRange();x.setStart(y.node,y.offset),h.removeAllRanges(),m>g?(h.addRange(x),h.extend(v.node,v.offset)):(x.setEnd(v.node,v.offset),h.addRange(x))}}}}for(d=[],h=o;h=h.parentNode;)1===h.nodeType&&d.push({element:h,left:h.scrollLeft,top:h.scrollTop});for("function"==typeof o.focus&&o.focus(),o=0;o<d.length;o++){var b=d[o];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}kf=!!gd,yd=gd=null}finally{mc=a,F.p=r,R.T=n}}e.current=t,Oc=2}}function xu(){if(2===Oc){Oc=0;var e=Ic,t=$c,n=!!(8772&t.flags);if(8772&t.subtreeFlags||n){n=R.T,R.T=null;var r=F.p;F.p=2;var a=mc;mc|=4;try{Rl(e,t.alternate,t)}finally{mc=a,F.p=r,R.T=n}}Oc=3}}function bu(){if(4===Oc||3===Oc){Oc=0,ce();var e=Ic,t=$c,n=Bc,r=Wc;10256&t.subtreeFlags||10256&t.flags?Oc=5:(Oc=0,$c=Ic=null,wu(e,e.pendingLanes));var a=e.pendingLanes;if(0===a&&(Vc=null),Oe(n),t=t.stateNode,be&&"function"==typeof be.onCommitFiberRoot)try{be.onCommitFiberRoot(xe,t,void 0,!(128&~t.current.flags))}catch(l){}if(null!==r){t=R.T,a=F.p,F.p=2,R.T=null;try{for(var i=e.onRecoverableError,s=0;s<r.length;s++){var o=r[s];i(o.value,{componentStack:o.stack})}}finally{R.T=t,F.p=a}}3&Bc&&ku(),Fu(e),a=e.pendingLanes,261930&n&&42&a?e===Yc?qc++:(qc=0,Yc=e):qc=0,Vu(0)}}function wu(e,t){0===(e.pooledCacheLanes&=t)&&(null!=(t=e.pooledCache)&&(e.pooledCache=null,Ba(t)))}function ku(){return vu(),xu(),bu(),Su()}function Su(){if(5!==Oc)return!1;var e=Ic,t=Hc;Hc=0;var n=Oe(Bc),a=R.T,i=F.p;try{F.p=32>n?32:n,R.T=null,n=Uc,Uc=null;var s=Ic,o=Bc;if(Oc=0,$c=Ic=null,Bc=0,6&mc)throw Error(r(331));var l=mc;if(mc|=4,uc(s.current),nc(s,s.current,o,n),mc=l,Vu(0,!1),be&&"function"==typeof be.onPostCommitFiberRoot)try{be.onPostCommitFiberRoot(xe,s)}catch(c){}return!0}finally{F.p=i,R.T=a,wu(e,t)}}function ju(e,t,n){t=Xr(n,t),null!==(e=wi(e,t=Lo(e.stateNode,t,2),2))&&(_e(e,2),Fu(e))}function Cu(e,t,n){if(3===e.tag)ju(e,e,n);else for(;null!==t;){if(3===t.tag){ju(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===Vc||!Vc.has(r))){e=Xr(n,e),null!==(r=wi(t,n=Do(2),2))&&(Ao(n,r,t,e),_e(r,2),Fu(r));break}}t=t.return}}function Nu(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new pc;var a=new Set;r.set(t,a)}else void 0===(a=r.get(t))&&(a=new Set,r.set(t,a));a.has(n)||(Sc=!0,a.add(n),e=Tu.bind(null,e,t,n),t.then(e,e))}function Tu(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,gc===e&&(vc&n)===n&&(4===Cc||3===Cc&&(62914560&vc)===vc&&300>ue()-_c?!(2&mc)&&ru(e,0):Ec|=n,Pc===vc&&(Pc=0)),Fu(e)}function Eu(e,t){0===t&&(t=De()),null!==(e=zr(e,t))&&(_e(e,t),Fu(e))}function Mu(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),Eu(e,n)}function Pu(e,t){var n=0;switch(e.tag){case 31:case 13:var a=e.stateNode,i=e.memoizedState;null!==i&&(n=i.retryLane);break;case 19:a=e.stateNode;break;case 22:a=e.stateNode._retryCache;break;default:throw Error(r(314))}null!==a&&a.delete(t),Eu(e,n)}var Lu=null,Du=null,Au=!1,_u=!1,zu=!1,Ru=0;function Fu(e){e!==Du&&null===e.next&&(null===Du?Lu=Du=e:Du=Du.next=e),_u=!0,Au||(Au=!0,Nd(function(){6&mc?se(fe,Ou):Iu()}))}function Vu(e,t){if(!zu&&_u){zu=!0;do{for(var n=!1,r=Lu;null!==r;){if(0!==e){var a=r.pendingLanes;if(0===a)var i=0;else{var s=r.suspendedLanes,o=r.pingedLanes;i=(1<<31-ke(42|e)+1)-1,i=201326741&(i&=a&~(s&~o))?201326741&i|1:i?2|i:0}0!==i&&(n=!0,Hu(r,i))}else i=vc,!(3&(i=Me(r,r===gc?i:0,null!==r.cancelPendingCommit||-1!==r.timeoutHandle)))||Pe(r,i)||(n=!0,Hu(r,i));r=r.next}}while(n);zu=!1}}function Ou(){Iu()}function Iu(){_u=Au=!1;var e=0;0!==Ru&&function(){var e=window.event;if(e&&"popstate"===e.type)return e!==kd&&(kd=e,!0);return kd=null,!1}()&&(e=Ru);for(var t=ue(),n=null,r=Lu;null!==r;){var a=r.next,i=$u(r,t);0===i?(r.next=null,null===n?Lu=a:n.next=a,null===a&&(Du=n)):(n=r,(0!==e||3&i)&&(_u=!0)),r=a}0!==Oc&&5!==Oc||Vu(e),0!==Ru&&(Ru=0)}function $u(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,a=e.expirationTimes,i=-62914561&e.pendingLanes;0<i;){var s=31-ke(i),o=1<<s,l=a[s];-1===l?0!==(o&n)&&0===(o&r)||(a[s]=Le(o,t)):l<=t&&(e.expiredLanes|=o),i&=~o}if(n=vc,n=Me(e,e===(t=gc)?n:0,null!==e.cancelPendingCommit||-1!==e.timeoutHandle),r=e.callbackNode,0===n||e===t&&(2===xc||9===xc)||null!==e.cancelPendingCommit)return null!==r&&null!==r&&oe(r),e.callbackNode=null,e.callbackPriority=0;if(!(3&n)||Pe(e,n)){if((t=n&-n)===e.callbackPriority)return t;switch(null!==r&&oe(r),Oe(n)){case 2:case 8:n=he;break;case 32:default:n=pe;break;case 268435456:n=ge}return r=Bu.bind(null,e),n=se(n,r),e.callbackPriority=t,e.callbackNode=n,t}return null!==r&&null!==r&&oe(r),e.callbackPriority=2,e.callbackNode=null,2}function Bu(e,t){if(0!==Oc&&5!==Oc)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(ku()&&e.callbackNode!==n)return null;var r=vc;return 0===(r=Me(e,e===gc?r:0,null!==e.cancelPendingCommit||-1!==e.timeoutHandle))?null:(Gc(e,r,t),$u(e,ue()),null!=e.callbackNode&&e.callbackNode===n?Bu.bind(null,e):null)}function Hu(e,t){if(ku())return null;Gc(e,t,!0)}function Uu(){if(0===Ru){var e=Wa;0===e&&(e=Ce,!(261888&(Ce<<=1))&&(Ce=256)),Ru=e}return Ru}function Wu(e){return null==e||"symbol"==typeof e||"boolean"==typeof e?null:"function"==typeof e?e:At(""+e)}function qu(e,t){var n=t.ownerDocument.createElement("input");return n.name=t.name,n.value=t.value,e.id&&n.setAttribute("form",e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}for(var Yu=0;Yu<Nr.length;Yu++){var Ku=Nr[Yu];Tr(Ku.toLowerCase(),"on"+(Ku[0].toUpperCase()+Ku.slice(1)))}Tr(vr,"onAnimationEnd"),Tr(xr,"onAnimationIteration"),Tr(br,"onAnimationStart"),Tr("dblclick","onDoubleClick"),Tr("focusin","onFocus"),Tr("focusout","onBlur"),Tr(wr,"onTransitionRun"),Tr(kr,"onTransitionStart"),Tr(Sr,"onTransitionCancel"),Tr(jr,"onTransitionEnd"),st("onMouseEnter",["mouseout","mouseover"]),st("onMouseLeave",["mouseout","mouseover"]),st("onPointerEnter",["pointerout","pointerover"]),st("onPointerLeave",["pointerout","pointerover"]),it("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),it("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),it("onBeforeInput",["compositionend","keypress","textInput","paste"]),it("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),it("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),it("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Qu="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Xu=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Qu));function Gu(e,t){t=!!(4&t);for(var n=0;n<e.length;n++){var r=e[n],a=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var s=r.length-1;0<=s;s--){var o=r[s],l=o.instance,c=o.currentTarget;if(o=o.listener,l!==i&&a.isPropagationStopped())break e;i=o,a.currentTarget=c;try{i(a)}catch(u){Er(u)}a.currentTarget=null,i=l}else for(s=0;s<r.length;s++){if(l=(o=r[s]).instance,c=o.currentTarget,o=o.listener,l!==i&&a.isPropagationStopped())break e;i=o,a.currentTarget=c;try{i(a)}catch(u){Er(u)}a.currentTarget=null,i=l}}}}function Zu(e,t){var n=t[qe];void 0===n&&(n=t[qe]=new Set);var r=e+"__bubble";n.has(r)||(nd(t,e,2,!1),n.add(r))}function Ju(e,t,n){var r=0;t&&(r|=4),nd(n,e,r,t)}var ed="_reactListening"+Math.random().toString(36).slice(2);function td(e){if(!e[ed]){e[ed]=!0,rt.forEach(function(t){"selectionchange"!==t&&(Xu.has(t)||Ju(t,!1,e),Ju(t,!0,e))});var t=9===e.nodeType?e:e.ownerDocument;null===t||t[ed]||(t[ed]=!0,Ju("selectionchange",!1,t))}}function nd(e,t,n,r){switch(Mf(t)){case 2:var a=Sf;break;case 8:a=jf;break;default:a=Cf}n=a.bind(null,t,n,e),a=void 0,!Ut||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(a=!0),r?void 0!==a?e.addEventListener(t,n,{capture:!0,passive:a}):e.addEventListener(t,n,!0):void 0!==a?e.addEventListener(t,n,{passive:a}):e.addEventListener(t,n,!1)}function rd(e,t,n,r,a){var s=r;if(!(1&t||2&t||null===r))e:for(;;){if(null===r)return;var o=r.tag;if(3===o||4===o){var l=r.stateNode.containerInfo;if(l===a)break;if(4===o)for(o=r.return;null!==o;){var c=o.tag;if((3===c||4===c)&&o.stateNode.containerInfo===a)return;o=o.return}for(;null!==l;){if(null===(o=Ze(l)))return;if(5===(c=o.tag)||6===c||26===c||27===c){r=s=o;continue e}l=l.parentNode}}r=r.return}$t(function(){var r=s,a=Rt(n),o=[];e:{var l=Cr.get(e);if(void 0!==l){var c=an,u=e;switch(e){case"keypress":if(0===Xt(n))break e;case"keydown":case"keyup":c=bn;break;case"focusin":u="focus",c=dn;break;case"focusout":u="blur",c=dn;break;case"beforeblur":case"afterblur":c=dn;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":c=cn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":c=un;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":c=kn;break;case vr:case xr:case br:c=fn;break;case jr:c=Sn;break;case"scroll":case"scrollend":c=on;break;case"wheel":c=jn;break;case"copy":case"cut":case"paste":c=hn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":c=wn;break;case"toggle":case"beforetoggle":c=Cn}var d=!!(4&t),f=!d&&("scroll"===e||"scrollend"===e),h=d?null!==l?l+"Capture":null:l;d=[];for(var p,m=r;null!==m;){var g=m;if(p=g.stateNode,5!==(g=g.tag)&&26!==g&&27!==g||null===p||null===h||null!=(g=Bt(m,h))&&d.push(ad(m,g,p)),f)break;m=m.return}0<d.length&&(l=new c(l,u,null,n,a),o.push({event:l,listeners:d}))}}if(!(7&t)){if(c="mouseout"===e||"pointerout"===e,(!(l="mouseover"===e||"pointerover"===e)||n===zt||!(u=n.relatedTarget||n.fromElement)||!Ze(u)&&!u[We])&&(c||l)&&(l=a.window===a?a:(l=a.ownerDocument)?l.defaultView||l.parentWindow:window,c?(c=r,null!==(u=(u=n.relatedTarget||n.toElement)?Ze(u):null)&&(f=i(u),d=u.tag,u!==f||5!==d&&27!==d&&6!==d)&&(u=null)):(c=null,u=r),c!==u)){if(d=cn,g="onMouseLeave",h="onMouseEnter",m="mouse","pointerout"!==e&&"pointerover"!==e||(d=wn,g="onPointerLeave",h="onPointerEnter",m="pointer"),f=null==c?l:et(c),p=null==u?l:et(u),(l=new d(g,m+"leave",c,n,a)).target=f,l.relatedTarget=p,g=null,Ze(a)===r&&((d=new d(h,m+"enter",u,n,a)).target=p,d.relatedTarget=f,g=d),f=g,c&&u)e:{for(d=sd,m=u,p=0,g=h=c;g;g=d(g))p++;g=0;for(var y=m;y;y=d(y))g++;for(;0<p-g;)h=d(h),p--;for(;0<g-p;)m=d(m),g--;for(;p--;){if(h===m||null!==m&&h===m.alternate){d=h;break e}h=d(h),m=d(m)}d=null}else d=null;null!==c&&od(o,l,c,d,!1),null!==u&&null!==f&&od(o,f,u,d,!0)}if("select"===(c=(l=r?et(r):window).nodeName&&l.nodeName.toLowerCase())||"input"===c&&"file"===l.type)var v=Hn;else if(Fn(l))if(Un)v=Jn;else{v=Gn;var x=Xn}else!(c=l.nodeName)||"input"!==c.toLowerCase()||"checkbox"!==l.type&&"radio"!==l.type?r&&Pt(r.elementType)&&(v=Hn):v=Zn;switch(v&&(v=v(e,r))?Vn(o,v,n,a):(x&&x(e,l,r),"focusout"===e&&r&&"number"===l.type&&null!=r.memoizedProps.value&&kt(l,"number",l.value)),x=r?et(r):window,e){case"focusin":(Fn(x)||"true"===x.contentEditable)&&(lr=x,cr=r,ur=null);break;case"focusout":ur=cr=lr=null;break;case"mousedown":dr=!0;break;case"contextmenu":case"mouseup":case"dragend":dr=!1,fr(o,n,a);break;case"selectionchange":if(or)break;case"keydown":case"keyup":fr(o,n,a)}var b;if(Tn)e:{switch(e){case"compositionstart":var w="onCompositionStart";break e;case"compositionend":w="onCompositionEnd";break e;case"compositionupdate":w="onCompositionUpdate";break e}w=void 0}else zn?An(e,n)&&(w="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(w="onCompositionStart");w&&(Pn&&"ko"!==n.locale&&(zn||"onCompositionStart"!==w?"onCompositionEnd"===w&&zn&&(b=Qt()):(Yt="value"in(qt=a)?qt.value:qt.textContent,zn=!0)),0<(x=id(r,w)).length&&(w=new pn(w,e,null,n,a),o.push({event:w,listeners:x}),b?w.data=b:null!==(b=_n(n))&&(w.data=b))),(b=Mn?function(e,t){switch(e){case"compositionend":return _n(t);case"keypress":return 32!==t.which?null:(Dn=!0,Ln);case"textInput":return(e=t.data)===Ln&&Dn?null:e;default:return null}}(e,n):function(e,t){if(zn)return"compositionend"===e||!Tn&&An(e,t)?(e=Qt(),Kt=Yt=qt=null,zn=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Pn&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(w=id(r,"onBeforeInput")).length&&(x=new pn("onBeforeInput","beforeinput",null,n,a),o.push({event:x,listeners:w}),x.data=b)),function(e,t,n,r,a){if("submit"===t&&n&&n.stateNode===a){var i=Wu((a[Ue]||null).action),s=r.submitter;s&&null!==(t=(t=s[Ue]||null)?Wu(t.formAction):s.getAttribute("formAction"))&&(i=t,s=null);var o=new an("action","action",null,r,a);e.push({event:o,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(0!==Ru){var e=s?qu(a,s):new FormData(a);no(n,{pending:!0,data:e,method:a.method,action:i},null,e)}}else"function"==typeof i&&(o.preventDefault(),e=s?qu(a,s):new FormData(a),no(n,{pending:!0,data:e,method:a.method,action:i},i,e))},currentTarget:a}]})}}(o,e,r,n,a)}Gu(o,t)})}function ad(e,t,n){return{instance:e,listener:t,currentTarget:n}}function id(e,t){for(var n=t+"Capture",r=[];null!==e;){var a=e,i=a.stateNode;if(5!==(a=a.tag)&&26!==a&&27!==a||null===i||(null!=(a=Bt(e,n))&&r.unshift(ad(e,a,i)),null!=(a=Bt(e,t))&&r.push(ad(e,a,i))),3===e.tag)return r;e=e.return}return[]}function sd(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag&&27!==e.tag);return e||null}function od(e,t,n,r,a){for(var i=t._reactName,s=[];null!==n&&n!==r;){var o=n,l=o.alternate,c=o.stateNode;if(o=o.tag,null!==l&&l===r)break;5!==o&&26!==o&&27!==o||null===c||(l=c,a?null!=(c=Bt(n,i))&&s.unshift(ad(n,c,l)):a||null!=(c=Bt(n,i))&&s.push(ad(n,c,l))),n=n.return}0!==s.length&&e.push({event:t,listeners:s})}var ld=/\\r\\n?/g,cd=/\\u0000|\\uFFFD/g;function ud(e){return("string"==typeof e?e:""+e).replace(ld,"\\n").replace(cd,"")}function dd(e,t){return t=ud(t),ud(e)===t}function fd(e,t,n,a,i,s){switch(n){case"children":"string"==typeof a?"body"===t||"textarea"===t&&""===a||Nt(e,a):("number"==typeof a||"bigint"==typeof a)&&"body"!==t&&Nt(e,""+a);break;case"className":dt(e,"class",a);break;case"tabIndex":dt(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":dt(e,n,a);break;case"style":Mt(e,a,s);break;case"data":if("object"!==t){dt(e,"data",a);break}case"src":case"href":if(""===a&&("a"!==t||"href"!==n)){e.removeAttribute(n);break}if(null==a||"function"==typeof a||"symbol"==typeof a||"boolean"==typeof a){e.removeAttribute(n);break}a=At(""+a),e.setAttribute(n,a);break;case"action":case"formAction":if("function"==typeof a){e.setAttribute(n,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}if("function"==typeof s&&("formAction"===n?("input"!==t&&fd(e,t,"name",i.name,i,null),fd(e,t,"formEncType",i.formEncType,i,null),fd(e,t,"formMethod",i.formMethod,i,null),fd(e,t,"formTarget",i.formTarget,i,null)):(fd(e,t,"encType",i.encType,i,null),fd(e,t,"method",i.method,i,null),fd(e,t,"target",i.target,i,null))),null==a||"symbol"==typeof a||"boolean"==typeof a){e.removeAttribute(n);break}a=At(""+a),e.setAttribute(n,a);break;case"onClick":null!=a&&(e.onclick=_t);break;case"onScroll":null!=a&&Zu("scroll",e);break;case"onScrollEnd":null!=a&&Zu("scrollend",e);break;case"dangerouslySetInnerHTML":if(null!=a){if("object"!=typeof a||!("__html"in a))throw Error(r(61));if(null!=(n=a.__html)){if(null!=i.children)throw Error(r(60));e.innerHTML=n}}break;case"multiple":e.multiple=a&&"function"!=typeof a&&"symbol"!=typeof a;break;case"muted":e.muted=a&&"function"!=typeof a&&"symbol"!=typeof a;break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":case"autoFocus":break;case"xlinkHref":if(null==a||"function"==typeof a||"boolean"==typeof a||"symbol"==typeof a){e.removeAttribute("xlink:href");break}n=At(""+a),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":null!=a&&"function"!=typeof a&&"symbol"!=typeof a?e.setAttribute(n,""+a):e.removeAttribute(n);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":a&&"function"!=typeof a&&"symbol"!=typeof a?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":!0===a?e.setAttribute(n,""):!1!==a&&null!=a&&"function"!=typeof a&&"symbol"!=typeof a?e.setAttribute(n,a):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":null!=a&&"function"!=typeof a&&"symbol"!=typeof a&&!isNaN(a)&&1<=a?e.setAttribute(n,a):e.removeAttribute(n);break;case"rowSpan":case"start":null==a||"function"==typeof a||"symbol"==typeof a||isNaN(a)?e.removeAttribute(n):e.setAttribute(n,a);break;case"popover":Zu("beforetoggle",e),Zu("toggle",e),ut(e,"popover",a);break;case"xlinkActuate":ft(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":ft(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":ft(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":ft(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":ft(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":ft(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":ft(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":ft(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":ft(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":ut(e,"is",a);break;case"innerText":case"textContent":break;default:(!(2<n.length)||"o"!==n[0]&&"O"!==n[0]||"n"!==n[1]&&"N"!==n[1])&&ut(e,n=Lt.get(n)||n,a)}}function hd(e,t,n,a,i,s){switch(n){case"style":Mt(e,a,s);break;case"dangerouslySetInnerHTML":if(null!=a){if("object"!=typeof a||!("__html"in a))throw Error(r(61));if(null!=(n=a.__html)){if(null!=i.children)throw Error(r(60));e.innerHTML=n}}break;case"children":"string"==typeof a?Nt(e,a):("number"==typeof a||"bigint"==typeof a)&&Nt(e,""+a);break;case"onScroll":null!=a&&Zu("scroll",e);break;case"onScrollEnd":null!=a&&Zu("scrollend",e);break;case"onClick":null!=a&&(e.onclick=_t);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":case"innerText":case"textContent":break;default:at.hasOwnProperty(n)||("o"!==n[0]||"n"!==n[1]||(i=n.endsWith("Capture"),t=n.slice(2,i?n.length-7:void 0),"function"==typeof(s=null!=(s=e[Ue]||null)?s[n]:null)&&e.removeEventListener(t,s,i),"function"!=typeof a)?n in e?e[n]=a:!0===a?e.setAttribute(n,""):ut(e,n,a):("function"!=typeof s&&null!==s&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,a,i)))}}function pd(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Zu("error",e),Zu("load",e);var a,i=!1,s=!1;for(a in n)if(n.hasOwnProperty(a)){var o=n[a];if(null!=o)switch(a){case"src":i=!0;break;case"srcSet":s=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:fd(e,t,a,o,n,null)}}return s&&fd(e,t,"srcSet",n.srcSet,n,null),void(i&&fd(e,t,"src",n.src,n,null));case"input":Zu("invalid",e);var l=a=o=s=null,c=null,u=null;for(i in n)if(n.hasOwnProperty(i)){var d=n[i];if(null!=d)switch(i){case"name":s=d;break;case"type":o=d;break;case"checked":c=d;break;case"defaultChecked":u=d;break;case"value":a=d;break;case"defaultValue":l=d;break;case"children":case"dangerouslySetInnerHTML":if(null!=d)throw Error(r(137,t));break;default:fd(e,t,i,d,n,null)}}return void wt(e,a,l,c,u,o,s,!1);case"select":for(s in Zu("invalid",e),i=o=a=null,n)if(n.hasOwnProperty(s)&&null!=(l=n[s]))switch(s){case"value":a=l;break;case"defaultValue":o=l;break;case"multiple":i=l;default:fd(e,t,s,l,n,null)}return t=a,n=o,e.multiple=!!i,void(null!=t?St(e,!!i,t,!1):null!=n&&St(e,!!i,n,!0));case"textarea":for(o in Zu("invalid",e),a=s=i=null,n)if(n.hasOwnProperty(o)&&null!=(l=n[o]))switch(o){case"value":i=l;break;case"defaultValue":s=l;break;case"children":a=l;break;case"dangerouslySetInnerHTML":if(null!=l)throw Error(r(91));break;default:fd(e,t,o,l,n,null)}return void Ct(e,i,s,a);case"option":for(c in n)if(n.hasOwnProperty(c)&&null!=(i=n[c]))if("selected"===c)e.selected=i&&"function"!=typeof i&&"symbol"!=typeof i;else fd(e,t,c,i,n,null);return;case"dialog":Zu("beforetoggle",e),Zu("toggle",e),Zu("cancel",e),Zu("close",e);break;case"iframe":case"object":Zu("load",e);break;case"video":case"audio":for(i=0;i<Qu.length;i++)Zu(Qu[i],e);break;case"image":Zu("error",e),Zu("load",e);break;case"details":Zu("toggle",e);break;case"embed":case"source":case"link":Zu("error",e),Zu("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(u in n)if(n.hasOwnProperty(u)&&null!=(i=n[u]))switch(u){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:fd(e,t,u,i,n,null)}return;default:if(Pt(t)){for(d in n)n.hasOwnProperty(d)&&(void 0!==(i=n[d])&&hd(e,t,d,i,n,void 0));return}}for(l in n)n.hasOwnProperty(l)&&(null!=(i=n[l])&&fd(e,t,l,i,n,null))}function md(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}var gd=null,yd=null;function vd(e){return 9===e.nodeType?e:e.ownerDocument}function xd(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function bd(e,t){if(0===e)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return 1===e&&"foreignObject"===t?0:e}function wd(e,t){return"textarea"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"bigint"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var kd=null;var Sd="function"==typeof setTimeout?setTimeout:void 0,jd="function"==typeof clearTimeout?clearTimeout:void 0,Cd="function"==typeof Promise?Promise:void 0,Nd="function"==typeof queueMicrotask?queueMicrotask:void 0!==Cd?function(e){return Cd.resolve(null).then(e).catch(Td)}:Sd;function Td(e){setTimeout(function(){throw e})}function Ed(e){return"head"===e}function Md(e,t){var n=t,r=0;do{var a=n.nextSibling;if(e.removeChild(n),a&&8===a.nodeType)if("/$"===(n=a.data)||"/&"===n){if(0===r)return e.removeChild(a),void Yf(t);r--}else if("$"===n||"$?"===n||"$~"===n||"$!"===n||"&"===n)r++;else if("html"===n)Id(e.ownerDocument.documentElement);else if("head"===n){Id(n=e.ownerDocument.head);for(var i=n.firstChild;i;){var s=i.nextSibling,o=i.nodeName;i[Xe]||"SCRIPT"===o||"STYLE"===o||"LINK"===o&&"stylesheet"===i.rel.toLowerCase()||n.removeChild(i),i=s}}else"body"===n&&Id(e.ownerDocument.body);n=a}while(n);Yf(t)}function Pd(e,t){var n=e;e=0;do{var r=n.nextSibling;if(1===n.nodeType?t?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",""===n.getAttribute("style")&&n.removeAttribute("style")):3===n.nodeType&&(t?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),r&&8===r.nodeType)if("/$"===(n=r.data)){if(0===e)break;e--}else"$"!==n&&"$?"!==n&&"$~"!==n&&"$!"!==n||e++;n=r}while(n)}function Ld(e){var t=e.firstChild;for(t&&10===t.nodeType&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":Ld(n),Ge(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if("stylesheet"===n.rel.toLowerCase())continue}e.removeChild(n)}}function Dd(e,t){for(;8!==e.nodeType;){if((1!==e.nodeType||"INPUT"!==e.nodeName||"hidden"!==e.type)&&!t)return null;if(null===(e=zd(e.nextSibling)))return null}return e}function Ad(e){return"$?"===e.data||"$~"===e.data}function _d(e){return"$!"===e.data||"$?"===e.data&&"loading"!==e.ownerDocument.readyState}function zd(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t||"$~"===t||"&"===t||"F!"===t||"F"===t)break;if("/$"===t||"/&"===t)return null}}return e}var Rd=null;function Fd(e){e=e.nextSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n||"/&"===n){if(0===t)return zd(e.nextSibling);t--}else"$"!==n&&"$!"!==n&&"$?"!==n&&"$~"!==n&&"&"!==n||t++}e=e.nextSibling}return null}function Vd(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n||"$~"===n||"&"===n){if(0===t)return e;t--}else"/$"!==n&&"/&"!==n||t++}e=e.previousSibling}return null}function Od(e,t,n){switch(t=vd(n),e){case"html":if(!(e=t.documentElement))throw Error(r(452));return e;case"head":if(!(e=t.head))throw Error(r(453));return e;case"body":if(!(e=t.body))throw Error(r(454));return e;default:throw Error(r(451))}}function Id(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Ge(e)}var $d=new Map,Bd=new Set;function Hd(e){return"function"==typeof e.getRootNode?e.getRootNode():9===e.nodeType?e:e.ownerDocument}var Ud=F.d;F.d={f:function(){var e=Ud.f(),t=tu();return e||t},r:function(e){var t=Je(e);null!==t&&5===t.tag&&"form"===t.type?ao(t):Ud.r(e)},D:function(e){Ud.D(e),qd("dns-prefetch",e,null)},C:function(e,t){Ud.C(e,t),qd("preconnect",e,t)},L:function(e,t,n){Ud.L(e,t,n);var r=Wd;if(r&&e&&t){var a='link[rel="preload"][as="'+xt(t)+'"]';"image"===t&&n&&n.imageSrcSet?(a+='[imagesrcset="'+xt(n.imageSrcSet)+'"]',"string"==typeof n.imageSizes&&(a+='[imagesizes="'+xt(n.imageSizes)+'"]')):a+='[href="'+xt(e)+'"]';var i=a;switch(t){case"style":i=Kd(e);break;case"script":i=Gd(e)}$d.has(i)||(e=u({rel:"preload",href:"image"===t&&n&&n.imageSrcSet?void 0:e,as:t},n),$d.set(i,e),null!==r.querySelector(a)||"style"===t&&r.querySelector(Qd(i))||"script"===t&&r.querySelector(Zd(i))||(pd(t=r.createElement("link"),"link",e),nt(t),r.head.appendChild(t)))}},m:function(e,t){Ud.m(e,t);var n=Wd;if(n&&e){var r=t&&"string"==typeof t.as?t.as:"script",a='link[rel="modulepreload"][as="'+xt(r)+'"][href="'+xt(e)+'"]',i=a;switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=Gd(e)}if(!$d.has(i)&&(e=u({rel:"modulepreload",href:e},t),$d.set(i,e),null===n.querySelector(a))){switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(Zd(i)))return}pd(r=n.createElement("link"),"link",e),nt(r),n.head.appendChild(r)}}},X:function(e,t){Ud.X(e,t);var n=Wd;if(n&&e){var r=tt(n).hoistableScripts,a=Gd(e),i=r.get(a);i||((i=n.querySelector(Zd(a)))||(e=u({src:e,async:!0},t),(t=$d.get(a))&&nf(e,t),nt(i=n.createElement("script")),pd(i,"link",e),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},r.set(a,i))}},S:function(e,t,n){Ud.S(e,t,n);var r=Wd;if(r&&e){var a=tt(r).hoistableStyles,i=Kd(e);t=t||"default";var s=a.get(i);if(!s){var o={loading:0,preload:null};if(s=r.querySelector(Qd(i)))o.loading=5;else{e=u({rel:"stylesheet",href:e,"data-precedence":t},n),(n=$d.get(i))&&tf(e,n);var l=s=r.createElement("link");nt(l),pd(l,"link",e),l._p=new Promise(function(e,t){l.onload=e,l.onerror=t}),l.addEventListener("load",function(){o.loading|=1}),l.addEventListener("error",function(){o.loading|=2}),o.loading|=4,ef(s,t,r)}s={type:"stylesheet",instance:s,count:1,state:o},a.set(i,s)}}},M:function(e,t){Ud.M(e,t);var n=Wd;if(n&&e){var r=tt(n).hoistableScripts,a=Gd(e),i=r.get(a);i||((i=n.querySelector(Zd(a)))||(e=u({src:e,async:!0,type:"module"},t),(t=$d.get(a))&&nf(e,t),nt(i=n.createElement("script")),pd(i,"link",e),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},r.set(a,i))}}};var Wd="undefined"==typeof document?null:document;function qd(e,t,n){var r=Wd;if(r&&"string"==typeof t&&t){var a=xt(t);a='link[rel="'+e+'"][href="'+a+'"]',"string"==typeof n&&(a+='[crossorigin="'+n+'"]'),Bd.has(a)||(Bd.add(a),e={rel:e,crossOrigin:n,href:t},null===r.querySelector(a)&&(pd(t=r.createElement("link"),"link",e),nt(t),r.head.appendChild(t)))}}function Yd(e,t,n,a){var i,s,o,l,c=(c=K.current)?Hd(c):null;if(!c)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return"string"==typeof n.precedence&&"string"==typeof n.href?(t=Kd(n.href),(a=(n=tt(c).hoistableStyles).get(t))||(a={type:"style",instance:null,count:0,state:null},n.set(t,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if("stylesheet"===n.rel&&"string"==typeof n.href&&"string"==typeof n.precedence){e=Kd(n.href);var u=tt(c).hoistableStyles,d=u.get(e);if(d||(c=c.ownerDocument||c,d={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(e,d),(u=c.querySelector(Qd(e)))&&!u._p&&(d.instance=u,d.state.loading=5),$d.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},$d.set(e,n),u||(i=c,s=e,o=n,l=d.state,i.querySelector('link[rel="preload"][as="style"]['+s+"]")?l.loading=1:(s=i.createElement("link"),l.preload=s,s.addEventListener("load",function(){return l.loading|=1}),s.addEventListener("error",function(){return l.loading|=2}),pd(s,"link",o),nt(s),i.head.appendChild(s))))),t&&null===a)throw Error(r(528,""));return d}if(t&&null!==a)throw Error(r(529,""));return null;case"script":return t=n.async,"string"==typeof(n=n.src)&&t&&"function"!=typeof t&&"symbol"!=typeof t?(t=Gd(n),(a=(n=tt(c).hoistableScripts).get(t))||(a={type:"script",instance:null,count:0,state:null},n.set(t,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function Kd(e){return'href="'+xt(e)+'"'}function Qd(e){return'link[rel="stylesheet"]['+e+"]"}function Xd(e){return u({},e,{"data-precedence":e.precedence,precedence:null})}function Gd(e){return'[src="'+xt(e)+'"]'}function Zd(e){return"script[async]"+e}function Jd(e,t,n){if(t.count++,null===t.instance)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+xt(n.href)+'"]');if(a)return t.instance=a,nt(a),a;var i=u({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return nt(a=(e.ownerDocument||e).createElement("style")),pd(a,"style",i),ef(a,n.precedence,e),t.instance=a;case"stylesheet":i=Kd(n.href);var s=e.querySelector(Qd(i));if(s)return t.state.loading|=4,t.instance=s,nt(s),s;a=Xd(n),(i=$d.get(i))&&tf(a,i),nt(s=(e.ownerDocument||e).createElement("link"));var o=s;return o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),pd(s,"link",a),t.state.loading|=4,ef(s,n.precedence,e),t.instance=s;case"script":return s=Gd(n.src),(i=e.querySelector(Zd(s)))?(t.instance=i,nt(i),i):(a=n,(i=$d.get(s))&&nf(a=u({},n),i),nt(i=(e=e.ownerDocument||e).createElement("script")),pd(i,"link",a),e.head.appendChild(i),t.instance=i);case"void":return null;default:throw Error(r(443,t.type))}else"stylesheet"===t.type&&!(4&t.state.loading)&&(a=t.instance,t.state.loading|=4,ef(a,n.precedence,e));return t.instance}function ef(e,t,n){for(var r=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),a=r.length?r[r.length-1]:null,i=a,s=0;s<r.length;s++){var o=r[s];if(o.dataset.precedence===t)i=o;else if(i!==a)break}i?i.parentNode.insertBefore(e,i.nextSibling):(t=9===n.nodeType?n.head:n).insertBefore(e,t.firstChild)}function tf(e,t){null==e.crossOrigin&&(e.crossOrigin=t.crossOrigin),null==e.referrerPolicy&&(e.referrerPolicy=t.referrerPolicy),null==e.title&&(e.title=t.title)}function nf(e,t){null==e.crossOrigin&&(e.crossOrigin=t.crossOrigin),null==e.referrerPolicy&&(e.referrerPolicy=t.referrerPolicy),null==e.integrity&&(e.integrity=t.integrity)}var rf=null;function af(e,t,n){if(null===rf){var r=new Map,a=rf=new Map;a.set(n,r)}else(r=(a=rf).get(n))||(r=new Map,a.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),a=0;a<n.length;a++){var i=n[a];if(!(i[Xe]||i[He]||"link"===e&&"stylesheet"===i.getAttribute("rel"))&&"http://www.w3.org/2000/svg"!==i.namespaceURI){var s=i.getAttribute(t)||"";s=e+s;var o=r.get(s);o?o.push(i):r.set(s,[i])}}return r}function sf(e,t,n){(e=e.ownerDocument||e).head.insertBefore(n,"title"===t?e.querySelector("head > title"):null)}function of(e){return!!("stylesheet"!==e.type||3&e.state.loading)}var lf=0;function cf(){if(this.count--,0===this.count&&(0===this.imgCount||!this.waitingForImages))if(this.stylesheets)df(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}var uf=null;function df(e,t){e.stylesheets=null,null!==e.unsuspend&&(e.count++,uf=new Map,t.forEach(ff,e),uf=null,cf.call(e))}function ff(e,t){if(!(4&t.state.loading)){var n=uf.get(e);if(n)var r=n.get(null);else{n=new Map,uf.set(e,n);for(var a=e.querySelectorAll("link[data-precedence],style[data-precedence]"),i=0;i<a.length;i++){var s=a[i];"LINK"!==s.nodeName&&"not all"===s.getAttribute("media")||(n.set(s.dataset.precedence,s),r=s)}r&&n.set(null,r)}s=(a=t.instance).getAttribute("data-precedence"),(i=n.get(s)||r)===r&&n.set(null,a),n.set(s,a),this.count++,r=cf.bind(this),a.addEventListener("load",r),a.addEventListener("error",r),i?i.parentNode.insertBefore(a,i.nextSibling):(e=9===e.nodeType?e.head:e).insertBefore(a,e.firstChild),t.state.loading|=4}}var hf={$$typeof:w,Provider:null,Consumer:null,_currentValue:V,_currentValue2:V,_threadCount:0};function pf(e,t,n,r,a,i,s,o,l){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Ae(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ae(0),this.hiddenUpdates=Ae(null),this.identifierPrefix=r,this.onUncaughtError=a,this.onCaughtError=i,this.onRecoverableError=s,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=l,this.incompleteTransitions=new Map}function mf(e,t,n,r,a,i,s,o,l,c,u,d){return e=new pf(e,t,n,s,l,c,u,d,o),t=1,!0===i&&(t|=24),i=Ir(3,null,null,t),e.current=i,i.stateNode=e,(t=$a()).refCount++,e.pooledCache=t,t.refCount++,i.memoizedState={element:r,isDehydrated:n,cache:t},vi(i),e}function gf(e){return e?e=Vr:Vr}function yf(e,t,n,r,a,i){a=gf(a),null===r.context?r.context=a:r.pendingContext=a,(r=bi(t)).payload={element:n},null!==(i=void 0===i?null:i)&&(r.callback=i),null!==(n=wi(e,r,t))&&(Xc(n,0,t),ki(n,e,t))}function vf(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function xf(e,t){vf(e,t),(e=e.alternate)&&vf(e,t)}function bf(e){if(13===e.tag||31===e.tag){var t=zr(e,67108864);null!==t&&Xc(t,0,67108864),xf(e,67108864)}}function wf(e){if(13===e.tag||31===e.tag){var t=Kc(),n=zr(e,t=Ve(t));null!==n&&Xc(n,0,t),xf(e,t)}}var kf=!0;function Sf(e,t,n,r){var a=R.T;R.T=null;var i=F.p;try{F.p=2,Cf(e,t,n,r)}finally{F.p=i,R.T=a}}function jf(e,t,n,r){var a=R.T;R.T=null;var i=F.p;try{F.p=8,Cf(e,t,n,r)}finally{F.p=i,R.T=a}}function Cf(e,t,n,r){if(kf){var a=Nf(r);if(null===a)rd(e,t,r,Tf,n),Vf(e,r);else if(function(e,t,n,r,a){switch(t){case"focusin":return Lf=Of(Lf,e,t,n,r,a),!0;case"dragenter":return Df=Of(Df,e,t,n,r,a),!0;case"mouseover":return Af=Of(Af,e,t,n,r,a),!0;case"pointerover":var i=a.pointerId;return _f.set(i,Of(_f.get(i)||null,e,t,n,r,a)),!0;case"gotpointercapture":return i=a.pointerId,zf.set(i,Of(zf.get(i)||null,e,t,n,r,a)),!0}return!1}(a,e,t,n,r))r.stopPropagation();else if(Vf(e,r),4&t&&-1<Ff.indexOf(e)){for(;null!==a;){var i=Je(a);if(null!==i)switch(i.tag){case 3:if((i=i.stateNode).current.memoizedState.isDehydrated){var s=Ee(i.pendingLanes);if(0!==s){var o=i;for(o.pendingLanes|=2,o.entangledLanes|=2;s;){var l=1<<31-ke(s);o.entanglements[1]|=l,s&=~l}Fu(i),!(6&mc)&&(Rc=ue()+500,Vu(0))}}break;case 31:case 13:null!==(o=zr(i,2))&&Xc(o,0,2),tu(),xf(i,2)}if(null===(i=Nf(r))&&rd(e,t,r,Tf,n),i===a)break;a=i}null!==a&&r.stopPropagation()}else rd(e,t,r,null,n)}}function Nf(e){return Ef(e=Rt(e))}var Tf=null;function Ef(e){if(Tf=null,null!==(e=Ze(e))){var t=i(e);if(null===t)e=null;else{var n=t.tag;if(13===n){if(null!==(e=s(t)))return e;e=null}else if(31===n){if(null!==(e=o(t)))return e;e=null}else if(3===n){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Tf=e,null}function Mf(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(de()){case fe:return 2;case he:return 8;case pe:case me:return 32;case ge:return 268435456;default:return 32}default:return 32}}var Pf=!1,Lf=null,Df=null,Af=null,_f=new Map,zf=new Map,Rf=[],Ff="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function Vf(e,t){switch(e){case"focusin":case"focusout":Lf=null;break;case"dragenter":case"dragleave":Df=null;break;case"mouseover":case"mouseout":Af=null;break;case"pointerover":case"pointerout":_f.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":zf.delete(t.pointerId)}}function Of(e,t,n,r,a,i){return null===e||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[a]},null!==t&&(null!==(t=Je(t))&&bf(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==a&&-1===t.indexOf(a)&&t.push(a),e)}function If(e){var t=Ze(e.target);if(null!==t){var n=i(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=s(n)))return e.blockedOn=t,void $e(e.priority,function(){wf(n)})}else if(31===t){if(null!==(t=o(n)))return e.blockedOn=t,void $e(e.priority,function(){wf(n)})}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function $f(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=Nf(e.nativeEvent);if(null!==n)return null!==(t=Je(n))&&bf(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);zt=r,n.target.dispatchEvent(r),zt=null,t.shift()}return!0}function Bf(e,t,n){$f(e)&&n.delete(t)}function Hf(){Pf=!1,null!==Lf&&$f(Lf)&&(Lf=null),null!==Df&&$f(Df)&&(Df=null),null!==Af&&$f(Af)&&(Af=null),_f.forEach(Bf),zf.forEach(Bf)}function Uf(t,n){t.blockedOn===n&&(t.blockedOn=null,Pf||(Pf=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,Hf)))}var Wf=null;function qf(t){Wf!==t&&(Wf=t,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Wf===t&&(Wf=null);for(var e=0;e<t.length;e+=3){var n=t[e],r=t[e+1],a=t[e+2];if("function"!=typeof r){if(null===Ef(r||n))continue;break}var i=Je(n);null!==i&&(t.splice(e,3),e-=3,no(i,{pending:!0,data:a,method:n.method,action:r},r,a))}}))}function Yf(e){function t(t){return Uf(t,e)}null!==Lf&&Uf(Lf,e),null!==Df&&Uf(Df,e),null!==Af&&Uf(Af,e),_f.forEach(t),zf.forEach(t);for(var n=0;n<Rf.length;n++){var r=Rf[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Rf.length&&null===(n=Rf[0]).blockedOn;)If(n),null===n.blockedOn&&Rf.shift();if(null!=(n=(e.ownerDocument||e).$$reactFormReplay))for(r=0;r<n.length;r+=3){var a=n[r],i=n[r+1],s=a[Ue]||null;if("function"==typeof i)s||qf(n);else if(s){var o=null;if(i&&i.hasAttribute("formAction")){if(a=i,s=i[Ue]||null)o=s.formAction;else if(null!==Ef(a))continue}else o=s.action;"function"==typeof o?n[r+1]=o:(n.splice(r,3),r-=3),qf(n)}}}function Kf(){function e(e){e.canIntercept&&"react-transition"===e.info&&e.intercept({handler:function(){return new Promise(function(e){return a=e})},focusReset:"manual",scroll:"manual"})}function t(){null!==a&&(a(),a=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&null!=e.url&&navigation.navigate(e.url,{state:e.getState(),info:"react-transition",history:"replace"})}}if("object"==typeof navigation){var r=!1,a=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),null!==a&&(a(),a=null)}}}function Qf(e){this._internalRoot=e}function Xf(e){this._internalRoot=e}Xf.prototype.render=Qf.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(r(409));yf(t.current,Kc(),e,t,null,null)},Xf.prototype.unmount=Qf.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;yf(e.current,2,null,e,null,null),tu(),t[We]=null}},Xf.prototype.unstable_scheduleHydration=function(e){if(e){var t=Ie();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Rf.length&&0!==t&&t<Rf[n].priority;n++);Rf.splice(n,0,e),0===n&&If(e)}};var Gf=t.version;if("19.2.4"!==Gf)throw Error(r(527,Gf,"19.2.4"));F.findDOMNode=function(e){var t=e._reactInternals;if(void 0===t){if("function"==typeof e.render)throw Error(r(188));throw e=Object.keys(e).join(","),Error(r(268,e))}return e=function(e){var t=e.alternate;if(!t){if(null===(t=i(e)))throw Error(r(188));return t!==e?null:e}for(var n=e,a=t;;){var s=n.return;if(null===s)break;var o=s.alternate;if(null===o){if(null!==(a=s.return)){n=a;continue}break}if(s.child===o.child){for(o=s.child;o;){if(o===n)return l(s),e;if(o===a)return l(s),t;o=o.sibling}throw Error(r(188))}if(n.return!==a.return)n=s,a=o;else{for(var c=!1,u=s.child;u;){if(u===n){c=!0,n=s,a=o;break}if(u===a){c=!0,a=s,n=o;break}u=u.sibling}if(!c){for(u=o.child;u;){if(u===n){c=!0,n=o,a=s;break}if(u===a){c=!0,a=o,n=s;break}u=u.sibling}if(!c)throw Error(r(189))}}if(n.alternate!==a)throw Error(r(190))}if(3!==n.tag)throw Error(r(188));return n.stateNode.current===n?e:t}(t),e=null===(e=null!==e?c(e):null)?null:e.stateNode};var Zf={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:R,reconcilerVersion:"19.2.4"};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var Jf=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Jf.isDisabled&&Jf.supportsFiber)try{xe=Jf.inject(Zf),be=Jf}catch(th){}}return y.createRoot=function(e,t){if(!a(e))throw Error(r(299));var n=!1,i="",s=No,o=To,l=Eo;return null!=t&&(!0===t.unstable_strictMode&&(n=!0),void 0!==t.identifierPrefix&&(i=t.identifierPrefix),void 0!==t.onUncaughtError&&(s=t.onUncaughtError),void 0!==t.onCaughtError&&(o=t.onCaughtError),void 0!==t.onRecoverableError&&(l=t.onRecoverableError)),t=mf(e,1,!1,null,0,n,i,null,s,o,l,Kf),e[We]=t.current,td(e),new Qf(t)},y.hydrateRoot=function(e,t,n){if(!a(e))throw Error(r(299));var i=!1,s="",o=No,l=To,c=Eo,u=null;return null!=n&&(!0===n.unstable_strictMode&&(i=!0),void 0!==n.identifierPrefix&&(s=n.identifierPrefix),void 0!==n.onUncaughtError&&(o=n.onUncaughtError),void 0!==n.onCaughtError&&(l=n.onCaughtError),void 0!==n.onRecoverableError&&(c=n.onRecoverableError),void 0!==n.formState&&(u=n.formState)),(t=mf(e,1,!0,t,0,i,s,u,o,l,c,Kf)).context=gf(null),n=t.current,(s=bi(i=Ve(i=Kc()))).callback=null,wi(n,s,i),n=i,t.current.lanes=n,_e(t,n),Fu(t),e[We]=t.current,td(e),new Xf(t)},y.version="19.2.4",y}var P=(j||(j=1,function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),g.exports=M()),g.exports);const L=e=>{let t;const n=new Set,r=(e,r)=>{const a="function"==typeof e?e(t):e;if(!Object.is(a,t)){const e=t;t=(null!=r?r:"object"!=typeof a||null===a)?a:Object.assign({},t,a),n.forEach(n=>n(t,e))}},a=()=>t,i={setState:r,getState:a,getInitialState:()=>s,subscribe:e=>(n.add(e),()=>n.delete(e))},s=t=e(r,a,i);return i},D=e=>e;const A=e=>{const t=(e=>e?L(e):L)(e),n=e=>function(e,t=D){const n=h.useSyncExternalStore(e.subscribe,h.useCallback(()=>t(e.getState()),[e,t]),h.useCallback(()=>t(e.getInitialState()),[e,t]));return h.useDebugValue(n),n}(t,e);return Object.assign(n,t),n};async function _(e){const t=await fetch(\`\${e}\`);if(!t.ok)throw new Error(\`\${t.status} \${t.statusText}\`);return t.json()}async function z(e,t){const n=await fetch(\`\${e}\`,{method:"POST",headers:t?{"Content-Type":"application/json"}:void 0,body:t?JSON.stringify(t):void 0});if(!n.ok){const e=await n.json().catch(()=>({}));throw new Error(e.message??\`\${n.status} \${n.statusText}\`)}return n.json()}async function R(e){const t=await fetch(\`\${e}\`,{method:"DELETE"});if(!t.ok){const e=await t.json().catch(()=>({}));throw new Error(e.error??\`\${t.status} \${t.statusText}\`)}return t.json()}async function F(){return await _("/api/local/config")}async function V(e){return async function(e,t){const n={};t&&(n["Content-Type"]="application/json");const r=await fetch(\`\${e}\`,{method:"PATCH",headers:Object.keys(n).length>0?n:void 0,body:t?JSON.stringify(t):void 0});if(!r.ok){const e=await r.json().catch(()=>({}));throw new Error(e.message??\`\${r.status} \${r.statusText}\`)}return r.json()}("/api/local/users/me",{username:e})}const O=f.createContext({});function I(e){const t=f.useRef(null);return null===t.current&&(t.current=e()),t.current}const $="undefined"!=typeof window,B=$?f.useLayoutEffect:f.useEffect,H=f.createContext(null);function U(e,t){-1===e.indexOf(t)&&e.push(t)}function W(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const q=(e,t,n)=>n>t?t:n<e?e:n;const Y={},K=e=>/^-?(?:\\d+(?:\\.\\d+)?|\\.\\d+)$/u.test(e);function Q(e){return"object"==typeof e&&null!==e}const X=e=>/^0[^.\\s]+$/u.test(e);function G(e){let t;return()=>(void 0===t&&(t=e()),t)}const Z=e=>e,J=(e,t)=>n=>t(e(n)),ee=(...e)=>e.reduce(J),te=(e,t,n)=>{const r=t-e;return 0===r?1:(n-e)/r};class ne{constructor(){this.subscriptions=[]}add(e){return U(this.subscriptions,e),()=>W(this.subscriptions,e)}notify(e,t,n){const r=this.subscriptions.length;if(r)if(1===r)this.subscriptions[0](e,t,n);else for(let a=0;a<r;a++){const r=this.subscriptions[a];r&&r(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const re=e=>1e3*e,ae=e=>e/1e3;function ie(e,t){return t?e*(1e3/t):0}const se=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e;function oe(e,t,n,r){if(e===t&&n===r)return Z;const a=t=>function(e,t,n,r,a){let i,s,o=0;do{s=t+(n-t)/2,i=se(s,r,a)-e,i>0?n=s:t=s}while(Math.abs(i)>1e-7&&++o<12);return s}(t,0,1,e,n);return e=>0===e||1===e?e:se(a(e),t,r)}const le=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,ce=e=>t=>1-e(1-t),ue=oe(.33,1.53,.69,.99),de=ce(ue),fe=le(de),he=e=>(e*=2)<1?.5*de(e):.5*(2-Math.pow(2,-10*(e-1))),pe=e=>1-Math.sin(Math.acos(e)),me=ce(pe),ge=le(pe),ye=oe(.42,0,1,1),ve=oe(0,0,.58,1),xe=oe(.42,0,.58,1),be=e=>Array.isArray(e)&&"number"==typeof e[0],we={linear:Z,easeIn:ye,easeInOut:xe,easeOut:ve,circIn:pe,circInOut:ge,circOut:me,backIn:de,backInOut:fe,backOut:ue,anticipate:he},ke=e=>{if(be(e)){e.length;const[t,n,r,a]=e;return oe(t,n,r,a)}return"string"==typeof e?we[e]:e},Se=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function je(e,t){let n=!1,r=!0;const a={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,s=Se.reduce((e,t)=>(e[t]=function(e){let t=new Set,n=new Set,r=!1,a=!1;const i=new WeakSet;let s={delta:0,timestamp:0,isProcessing:!1};function o(t){i.has(t)&&(l.schedule(t),e()),t(s)}const l={schedule:(e,a=!1,s=!1)=>{const o=s&&r?t:n;return a&&i.add(e),o.has(e)||o.add(e),e},cancel:e=>{n.delete(e),i.delete(e)},process:e=>{s=e,r?a=!0:(r=!0,[t,n]=[n,t],t.forEach(o),t.clear(),r=!1,a&&(a=!1,l.process(e)))}};return l}(i),e),{}),{setup:o,read:l,resolveKeyframes:c,preUpdate:u,update:d,preRender:f,render:h,postRender:p}=s,m=()=>{const i=Y.useManualTiming?a.timestamp:performance.now();n=!1,Y.useManualTiming||(a.delta=r?1e3/60:Math.max(Math.min(i-a.timestamp,40),1)),a.timestamp=i,a.isProcessing=!0,o.process(a),l.process(a),c.process(a),u.process(a),d.process(a),f.process(a),h.process(a),p.process(a),a.isProcessing=!1,n&&t&&(r=!1,e(m))};return{schedule:Se.reduce((t,i)=>{const o=s[i];return t[i]=(t,i=!1,s=!1)=>(n||(n=!0,r=!0,a.isProcessing||e(m)),o.schedule(t,i,s)),t},{}),cancel:e=>{for(let t=0;t<Se.length;t++)s[Se[t]].cancel(e)},state:a,steps:s}}const{schedule:Ce,cancel:Ne,state:Te,steps:Ee}=je("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:Z,!0);let Me;function Pe(){Me=void 0}const Le={now:()=>(void 0===Me&&Le.set(Te.isProcessing||Y.useManualTiming?Te.timestamp:performance.now()),Me),set:e=>{Me=e,queueMicrotask(Pe)}},De=e=>t=>"string"==typeof t&&t.startsWith(e),Ae=De("--"),_e=De("var(--"),ze=e=>!!_e(e)&&Re.test(e.split("/*")[0].trim()),Re=/var\\(--(?:[\\w-]+\\s*|[\\w-]+\\s*,(?:\\s*[^)(\\s]|\\s*\\((?:[^)(]|\\([^)(]*\\))*\\))+\\s*)\\)$/iu;function Fe(e){return"string"==typeof e&&e.split("/*")[0].includes("var(--")}const Ve={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},Oe={...Ve,transform:e=>q(0,1,e)},Ie={...Ve,default:1},$e=e=>Math.round(1e5*e)/1e5,Be=/-?(?:\\d+(?:\\.\\d+)?|\\.\\d+)/gu;const He=/^(?:#[\\da-f]{3,8}|(?:rgb|hsl)a?\\((?:-?[\\d.]+%?[,\\s]+){2}-?[\\d.]+%?\\s*(?:[,/]\\s*)?(?:\\b\\d+(?:\\.\\d+)?|\\.\\d+)?%?\\))$/iu,Ue=(e,t)=>n=>Boolean("string"==typeof n&&He.test(n)&&n.startsWith(e)||t&&!function(e){return null==e}(n)&&Object.prototype.hasOwnProperty.call(n,t)),We=(e,t,n)=>r=>{if("string"!=typeof r)return r;const[a,i,s,o]=r.match(Be);return{[e]:parseFloat(a),[t]:parseFloat(i),[n]:parseFloat(s),alpha:void 0!==o?parseFloat(o):1}},qe={...Ve,transform:e=>Math.round((e=>q(0,255,e))(e))},Ye={test:Ue("rgb","red"),parse:We("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+qe.transform(e)+", "+qe.transform(t)+", "+qe.transform(n)+", "+$e(Oe.transform(r))+")"};const Ke={test:Ue("#"),parse:function(e){let t="",n="",r="",a="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),a=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),a=e.substring(4,5),t+=t,n+=n,r+=r,a+=a),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:a?parseInt(a,16)/255:1}},transform:Ye.transform},Qe=e=>({test:t=>"string"==typeof t&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>\`\${t}\${e}\`}),Xe=Qe("deg"),Ge=Qe("%"),Ze=Qe("px"),Je=Qe("vh"),et=Qe("vw"),tt=(()=>({...Ge,parse:e=>Ge.parse(e)/100,transform:e=>Ge.transform(100*e)}))(),nt={test:Ue("hsl","hue"),parse:We("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Ge.transform($e(t))+", "+Ge.transform($e(n))+", "+$e(Oe.transform(r))+")"},rt={test:e=>Ye.test(e)||Ke.test(e)||nt.test(e),parse:e=>Ye.test(e)?Ye.parse(e):nt.test(e)?nt.parse(e):Ke.parse(e),transform:e=>"string"==typeof e?e:e.hasOwnProperty("red")?Ye.transform(e):nt.transform(e),getAnimatableNone:e=>{const t=rt.parse(e);return t.alpha=0,rt.transform(t)}},at=/(?:#[\\da-f]{3,8}|(?:rgb|hsl)a?\\((?:-?[\\d.]+%?[,\\s]+){2}-?[\\d.]+%?\\s*(?:[,/]\\s*)?(?:\\b\\d+(?:\\.\\d+)?|\\.\\d+)?%?\\))/giu;const it="number",st="color",ot=/var\\s*\\(\\s*--(?:[\\w-]+\\s*|[\\w-]+\\s*,(?:\\s*[^)(\\s]|\\s*\\((?:[^)(]|\\([^)(]*\\))*\\))+\\s*)\\)|#[\\da-f]{3,8}|(?:rgb|hsl)a?\\((?:-?[\\d.]+%?[,\\s]+){2}-?[\\d.]+%?\\s*(?:[,/]\\s*)?(?:\\b\\d+(?:\\.\\d+)?|\\.\\d+)?%?\\)|-?(?:\\d+(?:\\.\\d+)?|\\.\\d+)/giu;function lt(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},a=[];let i=0;const s=t.replace(ot,e=>(rt.test(e)?(r.color.push(i),a.push(st),n.push(rt.parse(e))):e.startsWith("var(")?(r.var.push(i),a.push("var"),n.push(e)):(r.number.push(i),a.push(it),n.push(parseFloat(e))),++i,"\${}")).split("\${}");return{values:n,split:s,indexes:r,types:a}}function ct(e){return lt(e).values}function ut(e){const{split:t,types:n}=lt(e),r=t.length;return e=>{let a="";for(let i=0;i<r;i++)if(a+=t[i],void 0!==e[i]){const t=n[i];a+=t===it?$e(e[i]):t===st?rt.transform(e[i]):e[i]}return a}}const dt=e=>"number"==typeof e?0:rt.test(e)?rt.getAnimatableNone(e):e;const ft={test:function(e){return isNaN(e)&&"string"==typeof e&&(e.match(Be)?.length||0)+(e.match(at)?.length||0)>0},parse:ct,createTransformer:ut,getAnimatableNone:function(e){const t=ct(e);return ut(e)(t.map(dt))}};function ht(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function pt(e,t){return n=>n>0?t:e}const mt=(e,t,n)=>e+(t-e)*n,gt=(e,t,n)=>{const r=e*e,a=n*(t*t-r)+r;return a<0?0:Math.sqrt(a)},yt=[Ke,Ye,nt];function vt(e){const t=(n=e,yt.find(e=>e.test(n)));var n;if(!Boolean(t))return!1;let r=t.parse(e);return t===nt&&(r=function({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,n/=100;let a=0,i=0,s=0;if(t/=100){const r=n<.5?n*(1+t):n+t-n*t,o=2*n-r;a=ht(o,r,e+1/3),i=ht(o,r,e),s=ht(o,r,e-1/3)}else a=i=s=n;return{red:Math.round(255*a),green:Math.round(255*i),blue:Math.round(255*s),alpha:r}}(r)),r}const xt=(e,t)=>{const n=vt(e),r=vt(t);if(!n||!r)return pt(e,t);const a={...n};return e=>(a.red=gt(n.red,r.red,e),a.green=gt(n.green,r.green,e),a.blue=gt(n.blue,r.blue,e),a.alpha=mt(n.alpha,r.alpha,e),Ye.transform(a))},bt=new Set(["none","hidden"]);function wt(e,t){return n=>mt(e,t,n)}function kt(e){return"number"==typeof e?wt:"string"==typeof e?ze(e)?pt:rt.test(e)?xt:Ct:Array.isArray(e)?St:"object"==typeof e?rt.test(e)?xt:jt:pt}function St(e,t){const n=[...e],r=n.length,a=e.map((e,n)=>kt(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=a[t](e);return n}}function jt(e,t){const n={...e,...t},r={};for(const a in n)void 0!==e[a]&&void 0!==t[a]&&(r[a]=kt(e[a])(e[a],t[a]));return e=>{for(const t in r)n[t]=r[t](e);return n}}const Ct=(e,t)=>{const n=ft.createTransformer(t),r=lt(e),a=lt(t);return r.indexes.var.length===a.indexes.var.length&&r.indexes.color.length===a.indexes.color.length&&r.indexes.number.length>=a.indexes.number.length?bt.has(e)&&!a.values.length||bt.has(t)&&!r.values.length?function(e,t){return bt.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}(e,t):ee(St(function(e,t){const n=[],r={color:0,var:0,number:0};for(let a=0;a<t.values.length;a++){const i=t.types[a],s=e.indexes[i][r[i]],o=e.values[s]??0;n[a]=o,r[i]++}return n}(r,a),a.values),n):pt(e,t)};function Nt(e,t,n){if("number"==typeof e&&"number"==typeof t&&"number"==typeof n)return mt(e,t,n);return kt(e)(e,t)}const Tt=e=>{const t=({timestamp:t})=>e(t);return{start:(e=!0)=>Ce.update(t,e),stop:()=>Ne(t),now:()=>Te.isProcessing?Te.timestamp:Le.now()}},Et=(e,t,n=10)=>{let r="";const a=Math.max(Math.round(t/n),2);for(let i=0;i<a;i++)r+=Math.round(1e4*e(i/(a-1)))/1e4+", ";return\`linear(\${r.substring(0,r.length-2)})\`},Mt=2e4;function Pt(e){let t=0;let n=e.next(t);for(;!n.done&&t<Mt;)t+=50,n=e.next(t);return t>=Mt?1/0:t}function Lt(e,t,n){const r=Math.max(t-5,0);return ie(n-e(r),t-r)}const Dt=100,At=10,_t=1,zt=0,Rt=800,Ft=.3,Vt=.3,Ot={granular:.01,default:2},It={granular:.005,default:.5},$t=.01,Bt=10,Ht=.05,Ut=1,Wt=.001;function qt({duration:e=Rt,bounce:t=Ft,velocity:n=zt,mass:r=_t}){let a,i,s=1-t;s=q(Ht,Ut,s),e=q($t,Bt,ae(e)),s<1?(a=t=>{const r=t*s,a=r*e,i=r-n,o=Kt(t,s),l=Math.exp(-a);return Wt-i/o*l},i=t=>{const r=t*s*e,i=r*n+n,o=Math.pow(s,2)*Math.pow(t,2)*e,l=Math.exp(-r),c=Kt(Math.pow(t,2),s);return(-a(t)+Wt>0?-1:1)*((i-o)*l)/c}):(a=t=>Math.exp(-t*e)*((t-n)*e+1)-.001,i=t=>Math.exp(-t*e)*(e*e*(n-t)));const o=function(e,t,n){let r=n;for(let a=1;a<Yt;a++)r-=e(r)/t(r);return r}(a,i,5/e);if(e=re(e),isNaN(o))return{stiffness:Dt,damping:At,duration:e};{const t=Math.pow(o,2)*r;return{stiffness:t,damping:2*s*Math.sqrt(r*t),duration:e}}}const Yt=12;function Kt(e,t){return e*Math.sqrt(1-t*t)}const Qt=["duration","bounce"],Xt=["stiffness","damping","mass"];function Gt(e,t){return t.some(t=>void 0!==e[t])}function Zt(e=Vt,t=Ft){const n="object"!=typeof e?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:a}=n;const i=n.keyframes[0],s=n.keyframes[n.keyframes.length-1],o={done:!1,value:i},{stiffness:l,damping:c,mass:u,duration:d,velocity:f,isResolvedFromDuration:h}=function(e){let t={velocity:zt,stiffness:Dt,damping:At,mass:_t,isResolvedFromDuration:!1,...e};if(!Gt(e,Xt)&&Gt(e,Qt))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(1.2*n),a=r*r,i=2*q(.05,1,1-(e.bounce||0))*Math.sqrt(a);t={...t,mass:_t,stiffness:a,damping:i}}else{const n=qt(e);t={...t,...n,mass:_t},t.isResolvedFromDuration=!0}return t}({...n,velocity:-ae(n.velocity||0)}),p=f||0,m=c/(2*Math.sqrt(l*u)),g=s-i,y=ae(Math.sqrt(l/u)),v=Math.abs(g)<5;let x;if(r||(r=v?Ot.granular:Ot.default),a||(a=v?It.granular:It.default),m<1){const e=Kt(y,m);x=t=>{const n=Math.exp(-m*y*t);return s-n*((p+m*y*g)/e*Math.sin(e*t)+g*Math.cos(e*t))}}else if(1===m)x=e=>s-Math.exp(-y*e)*(g+(p+y*g)*e);else{const e=y*Math.sqrt(m*m-1);x=t=>{const n=Math.exp(-m*y*t),r=Math.min(e*t,300);return s-n*((p+m*y*g)*Math.sinh(r)+e*g*Math.cosh(r))/e}}const b={calculatedDuration:h&&d||null,next:e=>{const t=x(e);if(h)o.done=e>=d;else{let n=0===e?p:0;m<1&&(n=0===e?re(p):Lt(x,e,t));const i=Math.abs(n)<=r,l=Math.abs(s-t)<=a;o.done=i&&l}return o.value=o.done?s:t,o},toString:()=>{const e=Math.min(Pt(b),Mt),t=Et(t=>b.next(e*t).value,e,30);return e+"ms "+t},toTransition:()=>{}};return b}function Jt({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:a=10,bounceStiffness:i=500,modifyTarget:s,min:o,max:l,restDelta:c=.5,restSpeed:u}){const d=e[0],f={done:!1,value:d},h=e=>void 0===o?l:void 0===l||Math.abs(o-e)<Math.abs(l-e)?o:l;let p=n*t;const m=d+p,g=void 0===s?m:s(m);g!==m&&(p=g-d);const y=e=>-p*Math.exp(-e/r),v=e=>g+y(e),x=e=>{const t=y(e),n=v(e);f.done=Math.abs(t)<=c,f.value=f.done?g:n};let b,w;const k=e=>{var t;(t=f.value,void 0!==o&&t<o||void 0!==l&&t>l)&&(b=e,w=Zt({keyframes:[f.value,h(f.value)],velocity:Lt(v,e,f.value),damping:a,stiffness:i,restDelta:c,restSpeed:u}))};return k(0),{calculatedDuration:null,next:e=>{let t=!1;return w||void 0!==b||(t=!0,x(e),k(e)),void 0!==b&&e>=b?w.next(e-b):(!t&&x(e),f)}}}function en(e,t,{clamp:n=!0,ease:r,mixer:a}={}){const i=e.length;if(t.length,1===i)return()=>t[0];if(2===i&&t[0]===t[1])return()=>t[1];const s=e[0]===e[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const o=function(e,t,n){const r=[],a=n||Y.mix||Nt,i=e.length-1;for(let s=0;s<i;s++){let n=a(e[s],e[s+1]);if(t){const e=Array.isArray(t)?t[s]||Z:t;n=ee(e,n)}r.push(n)}return r}(t,r,a),l=o.length,c=n=>{if(s&&n<e[0])return t[0];let r=0;if(l>1)for(;r<e.length-2&&!(n<e[r+1]);r++);const a=te(e[r],e[r+1],n);return o[r](a)};return n?t=>c(q(e[0],e[i-1],t)):c}function tn(e){const t=[0];return function(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const a=te(0,t,r);e.push(mt(n,1,a))}}(t,e.length-1),t}function nn({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const a=(e=>Array.isArray(e)&&"number"!=typeof e[0])(r)?r.map(ke):ke(r),i={done:!1,value:t[0]},s=function(e,t){return e.map(e=>e*t)}(n&&n.length===t.length?n:tn(t),e),o=en(s,t,{ease:Array.isArray(a)?a:(l=t,c=a,l.map(()=>c||xe).splice(0,l.length-1))});var l,c;return{calculatedDuration:e,next:t=>(i.value=o(t),i.done=t>=e,i)}}Zt.applyToOptions=e=>{const t=function(e,t=100,n){const r=n({...e,keyframes:[0,t]}),a=Math.min(Pt(r),Mt);return{type:"keyframes",ease:e=>r.next(a*e).value/t,duration:ae(a)}}(e,100,Zt);return e.ease=t.ease,e.duration=re(t.duration),e.type="keyframes",e};const rn=e=>null!==e;function an(e,{repeat:t,repeatType:n="loop"},r,a=1){const i=e.filter(rn),s=a<0||t&&"loop"!==n&&t%2==1?0:i.length-1;return s&&void 0!==r?r:i[s]}const sn={decay:Jt,inertia:Jt,tween:nn,keyframes:nn,spring:Zt};function on(e){"string"==typeof e.type&&(e.type=sn[e.type])}class ln{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,t){return this.finished.then(e,t)}}const cn=e=>e/100;class un extends ln{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:e}=this.options;e&&e.updatedAt!==Le.now()&&this.tick(Le.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),!1===e.autoplay&&this.pause()}initAnimation(){const{options:e}=this;on(e);const{type:t=nn,repeat:n=0,repeatDelay:r=0,repeatType:a,velocity:i=0}=e;let{keyframes:s}=e;const o=t||nn;o!==nn&&"number"!=typeof s[0]&&(this.mixKeyframes=ee(cn,Nt(s[0],s[1])),s=[0,100]);const l=o({...e,keyframes:s});"mirror"===a&&(this.mirroredGenerator=o({...e,keyframes:[...s].reverse(),velocity:-i})),null===l.calculatedDuration&&(l.calculatedDuration=Pt(l));const{calculatedDuration:c}=l;this.calculatedDuration=c,this.resolvedDuration=c+r,this.totalDuration=this.resolvedDuration*(n+1)-r,this.generator=l}updateTime(e){const t=Math.round(e-this.startTime)*this.playbackSpeed;null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=t}tick(e,t=!1){const{generator:n,totalDuration:r,mixKeyframes:a,mirroredGenerator:i,resolvedDuration:s,calculatedDuration:o}=this;if(null===this.startTime)return n.next(0);const{delay:l=0,keyframes:c,repeat:u,repeatType:d,repeatDelay:f,type:h,onUpdate:p,finalKeyframe:m}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-r/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);const g=this.currentTime-l*(this.playbackSpeed>=0?1:-1),y=this.playbackSpeed>=0?g<0:g>r;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=r);let v=this.currentTime,x=n;if(u){const e=Math.min(this.currentTime,r)/s;let t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),1===n&&t--,t=Math.min(t,u+1);Boolean(t%2)&&("reverse"===d?(n=1-n,f&&(n-=f/s)):"mirror"===d&&(x=i)),v=q(0,1,n)*s}const b=y?{done:!1,value:c[0]}:x.next(v);a&&(b.value=a(b.value));let{done:w}=b;y||null===o||(w=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);const k=null===this.holdTime&&("finished"===this.state||"running"===this.state&&w);return k&&h!==Jt&&(b.value=an(c,this.options,m,this.speed)),p&&p(b.value),k&&this.finish(),b}then(e,t){return this.finished.then(e,t)}get duration(){return ae(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+ae(e)}get time(){return ae(this.currentTime)}set time(e){e=re(e),this.currentTime=e,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(e){this.updateTime(Le.now());const t=this.playbackSpeed!==e;this.playbackSpeed=e,t&&(this.time=ae(this.currentTime))}play(){if(this.isStopped)return;const{driver:e=Tt,startTime:t}=this.options;this.driver||(this.driver=e(e=>this.tick(e))),this.options.onPlay?.();const n=this.driver.now();"finished"===this.state?(this.updateFinished(),this.startTime=n):null!==this.holdTime?this.startTime=n-this.holdTime:this.startTime||(this.startTime=t??n),"finished"===this.state&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Le.now()),this.holdTime=this.currentTime}complete(){"running"!==this.state&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),e.observe(this)}}const dn=e=>180*e/Math.PI,fn=e=>{const t=dn(Math.atan2(e[1],e[0]));return pn(t)},hn={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:fn,rotateZ:fn,skewX:e=>dn(Math.atan(e[1])),skewY:e=>dn(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},pn=e=>((e%=360)<0&&(e+=360),e),mn=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),gn=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),yn={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:mn,scaleY:gn,scale:e=>(mn(e)+gn(e))/2,rotateX:e=>pn(dn(Math.atan2(e[6],e[5]))),rotateY:e=>pn(dn(Math.atan2(-e[2],e[0]))),rotateZ:fn,rotate:fn,skewX:e=>dn(Math.atan(e[4])),skewY:e=>dn(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function vn(e){return e.includes("scale")?1:0}function xn(e,t){if(!e||"none"===e)return vn(t);const n=e.match(/^matrix3d\\(([-\\d.e\\s,]+)\\)$/u);let r,a;if(n)r=yn,a=n;else{const t=e.match(/^matrix\\(([-\\d.e\\s,]+)\\)$/u);r=hn,a=t}if(!a)return vn(t);const i=r[t],s=a[1].split(",").map(bn);return"function"==typeof i?i(s):s[i]}function bn(e){return parseFloat(e.trim())}const wn=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],kn=(()=>new Set(wn))(),Sn=e=>e===Ve||e===Ze,jn=new Set(["x","y","z"]),Cn=wn.filter(e=>!jn.has(e));const Nn={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>xn(t,"x"),y:(e,{transform:t})=>xn(t,"y")};Nn.translateX=Nn.x,Nn.translateY=Nn.y;const Tn=new Set;let En=!1,Mn=!1,Pn=!1;function Ln(){if(Mn){const e=Array.from(Tn).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=new Map;t.forEach(e=>{const t=function(e){const t=[];return Cn.forEach(n=>{const r=e.getValue(n);void 0!==r&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}(e);t.length&&(n.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();const t=n.get(e);t&&t.forEach(([t,n])=>{e.getValue(t)?.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{void 0!==e.suspendedScrollY&&window.scrollTo(0,e.suspendedScrollY)})}Mn=!1,En=!1,Tn.forEach(e=>e.complete(Pn)),Tn.clear()}function Dn(){Tn.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Mn=!0)})}class An{constructor(e,t,n,r,a,i=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=a,this.isAsync=i}scheduleResolve(){this.state="scheduled",this.isAsync?(Tn.add(this),En||(En=!0,Ce.read(Dn),Ce.resolveKeyframes(Ln))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;if(null===e[0]){const a=r?.get(),i=e[e.length-1];if(void 0!==a)e[0]=a;else if(n&&t){const r=n.readValue(t,i);null!=r&&(e[0]=r)}void 0===e[0]&&(e[0]=i),r&&void 0===a&&r.set(e[0])}!function(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),Tn.delete(this)}cancel(){"scheduled"===this.state&&(Tn.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}const _n=G(()=>void 0!==window.ScrollTimeline),zn={};function Rn(e,t){const n=G(e);return()=>zn[t]??n()}const Fn=Rn(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(e){return!1}return!0},"linearEasing"),Vn=([e,t,n,r])=>\`cubic-bezier(\${e}, \${t}, \${n}, \${r})\`,On={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Vn([0,.65,.55,1]),circOut:Vn([.55,0,1,.45]),backIn:Vn([.31,.01,.66,-.59]),backOut:Vn([.33,1.53,.69,.99])};function In(e,t){return e?"function"==typeof e?Fn()?Et(e,t):"ease-out":be(e)?Vn(e):Array.isArray(e)?e.map(e=>In(e,t)||On.easeOut):On[e]:void 0}function $n(e,t,n,{delay:r=0,duration:a=300,repeat:i=0,repeatType:s="loop",ease:o="easeOut",times:l}={},c=void 0){const u={[t]:n};l&&(u.offset=l);const d=In(o,a);Array.isArray(d)&&(u.easing=d);const f={delay:r,duration:a,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:i+1,direction:"reverse"===s?"alternate":"normal"};c&&(f.pseudoElement=c);return e.animate(u,f)}function Bn(e){return"function"==typeof e&&"applyToOptions"in e}class Hn extends ln{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;const{element:t,name:n,keyframes:r,pseudoElement:a,allowFlatten:i=!1,finalKeyframe:s,onComplete:o}=e;this.isPseudoElement=Boolean(a),this.allowFlatten=i,this.options=e,e.type;const l=function({type:e,...t}){return Bn(e)&&Fn()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}(e);this.animation=$n(t,n,r,l,a),!1===l.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!a){const e=an(r,this.options,s,this.speed);this.updateMotionValue?this.updateMotionValue(e):function(e,t,n){(e=>e.startsWith("--"))(t)?e.style.setProperty(t,n):e.style[t]=n}(t,n,e),this.animation.cancel()}o?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch(e){}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;"idle"!==e&&"finished"!==e&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){const e=this.animation.effect?.getComputedTiming?.().duration||0;return ae(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+ae(e)}get time(){return ae(Number(this.animation.currentTime)||0)}set time(e){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=re(e)}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,observe:t}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,e&&_n()?(this.animation.timeline=e,Z):t(this)}}const Un={anticipate:he,backInOut:fe,circInOut:ge};function Wn(e){"string"==typeof e.ease&&e.ease in Un&&(e.ease=Un[e.ease])}class qn extends Hn{constructor(e){Wn(e),on(e),super(e),void 0!==e.startTime&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:t,onUpdate:n,onComplete:r,element:a,...i}=this.options;if(!t)return;if(void 0!==e)return void t.set(e);const s=new un({...i,autoplay:!1}),o=Math.max(10,Le.now()-this.startTime),l=q(0,10,o-10);t.setWithVelocity(s.sample(Math.max(0,o-l)).value,s.sample(o).value,l),s.stop()}}const Yn=(e,t)=>"zIndex"!==t&&(!("number"!=typeof e&&!Array.isArray(e))||!("string"!=typeof e||!ft.test(e)&&"0"!==e||e.startsWith("url(")));function Kn(e){e.duration=0,e.type="keyframes"}const Qn=new Set(["opacity","clipPath","filter","transform"]),Xn=G(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));class Gn extends ln{constructor({autoplay:e=!0,delay:t=0,type:n="keyframes",repeat:r=0,repeatDelay:a=0,repeatType:i="loop",keyframes:s,name:o,motionValue:l,element:c,...u}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=Le.now();const d={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:a,repeatType:i,name:o,motionValue:l,element:c,...u},f=c?.KeyframeResolver||An;this.keyframeResolver=new f(s,(e,t,n)=>this.onKeyframesResolved(e,t,d,!n),o,l,c),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,t,n,r){this.keyframeResolver=void 0;const{name:a,type:i,velocity:s,delay:o,isHandoff:l,onUpdate:c}=n;this.resolvedAt=Le.now(),function(e,t,n,r){const a=e[0];if(null===a)return!1;if("display"===t||"visibility"===t)return!0;const i=e[e.length-1],s=Yn(a,t),o=Yn(i,t);return!(!s||!o)&&(function(e){const t=e[0];if(1===e.length)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}(e)||("spring"===n||Bn(n))&&r)}(e,a,i,s)||(!Y.instantAnimations&&o||c?.(an(e,n,t)),e[0]=e[e.length-1],Kn(n),n.repeat=0);const u={startTime:r?this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:t,...n,keyframes:e},d=!l&&function(e){const{motionValue:t,name:n,repeatDelay:r,repeatType:a,damping:i,type:s}=e,o=t?.owner?.current;if(!(o instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=t.owner.getProps();return Xn()&&n&&Qn.has(n)&&("transform"!==n||!c)&&!l&&!r&&"mirror"!==a&&0!==i&&"inertia"!==s}(u),f=u.motionValue?.owner?.current,h=d?new qn({...u,element:f}):new un(u);h.finished.then(()=>{this.notifyFinished()}).catch(Z),this.pendingTimeline&&(this.stopTimeline=h.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=h}get finished(){return this._animation?this.animation.finished:this._finished}then(e,t){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),Pn=!0,Dn(),Ln(),Pn=!1),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}function Zn(e,t,n,r=0,a=1){const i=Array.from(e).sort((e,t)=>e.sortNodePosition(t)).indexOf(t),s=e.size,o=(s-1)*r;return"function"==typeof n?n(i,s):1===a?i*r:o-i*r}const Jn=/^var\\(--(?:([\\w-]+)|([\\w-]+), ?([a-zA-Z\\d ()%#.,-]+))\\)/u;function er(e,t,n=1){const[r,a]=function(e){const t=Jn.exec(e);if(!t)return[,];const[,n,r,a]=t;return[\`--\${n??r}\`,a]}(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const e=i.trim();return K(e)?parseFloat(e):e}return ze(a)?er(a,t,n+1):a}const tr={type:"spring",stiffness:500,damping:25,restSpeed:10},nr={type:"keyframes",duration:.8},rr={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},ar=(e,{keyframes:t})=>t.length>2?nr:kn.has(e)?e.startsWith("scale")?{type:"spring",stiffness:550,damping:0===t[1]?2*Math.sqrt(550):30,restSpeed:10}:tr:rr,ir=e=>null!==e;function sr(e,t){if(e?.inherit&&t){const{inherit:n,...r}=e;return{...t,...r}}return e}function or(e,t){const n=e?.[t]??e?.default??e;return n!==e?sr(n,e):n}const lr=(e,t,n,r={},a,i)=>s=>{const o=or(r,e)||{},l=o.delay||r.delay||0;let{elapsed:c=0}=r;c-=re(l);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...o,delay:-c,onUpdate:e=>{t.set(e),o.onUpdate&&o.onUpdate(e)},onComplete:()=>{s(),o.onComplete&&o.onComplete()},name:e,motionValue:t,element:i?void 0:a};(function({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:a,repeat:i,repeatType:s,repeatDelay:o,from:l,elapsed:c,...u}){return!!Object.keys(u).length})(o)||Object.assign(u,ar(e,u)),u.duration&&(u.duration=re(u.duration)),u.repeatDelay&&(u.repeatDelay=re(u.repeatDelay)),void 0!==u.from&&(u.keyframes[0]=u.from);let d=!1;if((!1===u.type||0===u.duration&&!u.repeatDelay)&&(Kn(u),0===u.delay&&(d=!0)),(Y.instantAnimations||Y.skipAnimations||a?.shouldSkipAnimations)&&(d=!0,Kn(u),u.delay=0),u.allowFlatten=!o.type&&!o.ease,d&&!i&&void 0!==t.get()){const e=function(e,{repeat:t,repeatType:n="loop"}){const r=e.filter(ir);return r[t&&"loop"!==n&&t%2==1?0:r.length-1]}(u.keyframes,o);if(void 0!==e)return void Ce.update(()=>{u.onUpdate(e),u.onComplete()})}return o.isSync?new un(u):new Gn(u)};function cr(e){const t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function ur(e,t,n,r){if("function"==typeof t){const[a,i]=cr(r);t=t(void 0!==n?n:e.custom,a,i)}if("string"==typeof t&&(t=e.variants&&e.variants[t]),"function"==typeof t){const[a,i]=cr(r);t=t(void 0!==n?n:e.custom,a,i)}return t}function dr(e,t,n){const r=e.getProps();return ur(r,t,void 0!==n?n:r.custom,e)}const fr=new Set(["width","height","top","left","right","bottom",...wn]);class hr{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{const t=Le.now();if(this.updatedAt!==t&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const n of this.dependents)n.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){var t;this.current=e,this.updatedAt=Le.now(),null===this.canTrackVelocity&&void 0!==e&&(this.canTrackVelocity=(t=this.current,!isNaN(parseFloat(t))))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new ne);const n=this.events[e].add(t);return"change"===e?()=>{n(),Ce.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=Le.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||e-this.updatedAt>30)return 0;const t=Math.min(this.updatedAt-this.prevUpdatedAt,30);return ie(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function pr(e,t){return new hr(e,t)}const mr=e=>Array.isArray(e);function gr(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,pr(n))}function yr(e){return mr(e)?e[e.length-1]||0:e}const vr=e=>Boolean(e&&e.getVelocity);function xr(e,t){const n=e.getValue("willChange");if(r=n,Boolean(vr(r)&&r.add))return n.add(t);if(!n&&Y.WillChange){const n=new Y.WillChange("auto");e.addValue("willChange",n),n.add(t)}var r}function br(e){return e.replace(/([A-Z])/g,e=>\`-\${e.toLowerCase()}\`)}const wr="data-"+br("framerAppearId");function kr(e){return e.props[wr]}function Sr({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&!0!==t[n];return t[n]=!1,r}function jr(e,t,{delay:n=0,transitionOverride:r,type:a}={}){let{transition:i,transitionEnd:s,...o}=t;const l=e.getDefaultTransition();i=i?sr(i,l):l;const c=i?.reduceMotion;r&&(i=r);const u=[],d=a&&e.animationState&&e.animationState.getState()[a];for(const f in o){const t=e.getValue(f,e.latestValues[f]??null),r=o[f];if(void 0===r||d&&Sr(d,f))continue;const a={delay:n,...or(i||{},f)},s=t.get();if(void 0!==s&&!t.isAnimating&&!Array.isArray(r)&&r===s&&!a.velocity)continue;let l=!1;if(window.MotionHandoffAnimation){const t=kr(e);if(t){const e=window.MotionHandoffAnimation(t,f,Ce);null!==e&&(a.startTime=e,l=!0)}}xr(e,f);const h=c??e.shouldReduceMotion;t.start(lr(f,t,r,h&&fr.has(f)?{type:!1}:a,e,l));const p=t.animation;p&&u.push(p)}if(s){const t=()=>Ce.update(()=>{s&&function(e,t){const n=dr(e,t);let{transitionEnd:r={},transition:a={},...i}=n||{};i={...i,...r};for(const s in i)gr(e,s,yr(i[s]))}(e,s)});u.length?Promise.all(u).then(t):t()}return u}function Cr(e,t,n={}){const r=dr(e,t,"exit"===n.type?e.presenceContext?.custom:void 0);let{transition:a=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(a=n.transitionOverride);const i=r?()=>Promise.all(jr(e,r,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(r=0)=>{const{delayChildren:i=0,staggerChildren:s,staggerDirection:o}=a;return function(e,t,n=0,r=0,a=0,i=1,s){const o=[];for(const l of e.variantChildren)l.notify("AnimationStart",t),o.push(Cr(l,t,{...s,delay:n+("function"==typeof r?0:r)+Zn(e.variantChildren,l,r,a,i)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(o)}(e,t,r,i,s,o,n)}:()=>Promise.resolve(),{when:o}=a;if(o){const[e,t]="beforeChildren"===o?[i,s]:[s,i];return e().then(()=>t())}return Promise.all([i(),s(n.delay)])}const Nr=e=>t=>t.test(e),Tr=[Ve,Ze,Ge,Xe,et,Je,{test:e=>"auto"===e,parse:e=>e}],Er=e=>Tr.find(Nr(e));function Mr(e){return"number"==typeof e?0===e:null===e||("none"===e||"0"===e||X(e))}const Pr=new Set(["brightness","contrast","saturate","opacity"]);function Lr(e){const[t,n]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;const[r]=n.match(Be)||[];if(!r)return e;const a=n.replace(r,"");let i=Pr.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+a+")"}const Dr=/\\b([a-z-]*)\\(.*?\\)/gu,Ar={...ft,getAnimatableNone:e=>{const t=e.match(Dr);return t?t.map(Lr).join(" "):e}},_r={...Ve,transform:Math.round},zr={borderWidth:Ze,borderTopWidth:Ze,borderRightWidth:Ze,borderBottomWidth:Ze,borderLeftWidth:Ze,borderRadius:Ze,borderTopLeftRadius:Ze,borderTopRightRadius:Ze,borderBottomRightRadius:Ze,borderBottomLeftRadius:Ze,width:Ze,maxWidth:Ze,height:Ze,maxHeight:Ze,top:Ze,right:Ze,bottom:Ze,left:Ze,inset:Ze,insetBlock:Ze,insetBlockStart:Ze,insetBlockEnd:Ze,insetInline:Ze,insetInlineStart:Ze,insetInlineEnd:Ze,padding:Ze,paddingTop:Ze,paddingRight:Ze,paddingBottom:Ze,paddingLeft:Ze,paddingBlock:Ze,paddingBlockStart:Ze,paddingBlockEnd:Ze,paddingInline:Ze,paddingInlineStart:Ze,paddingInlineEnd:Ze,margin:Ze,marginTop:Ze,marginRight:Ze,marginBottom:Ze,marginLeft:Ze,marginBlock:Ze,marginBlockStart:Ze,marginBlockEnd:Ze,marginInline:Ze,marginInlineStart:Ze,marginInlineEnd:Ze,fontSize:Ze,backgroundPositionX:Ze,backgroundPositionY:Ze,...{rotate:Xe,rotateX:Xe,rotateY:Xe,rotateZ:Xe,scale:Ie,scaleX:Ie,scaleY:Ie,scaleZ:Ie,skew:Xe,skewX:Xe,skewY:Xe,distance:Ze,translateX:Ze,translateY:Ze,translateZ:Ze,x:Ze,y:Ze,z:Ze,perspective:Ze,transformPerspective:Ze,opacity:Oe,originX:tt,originY:tt,originZ:Ze},zIndex:_r,fillOpacity:Oe,strokeOpacity:Oe,numOctaves:_r},Rr={...zr,color:rt,backgroundColor:rt,outlineColor:rt,fill:rt,stroke:rt,borderColor:rt,borderTopColor:rt,borderRightColor:rt,borderBottomColor:rt,borderLeftColor:rt,filter:Ar,WebkitFilter:Ar},Fr=e=>Rr[e];function Vr(e,t){let n=Fr(e);return n!==Ar&&(n=ft),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Or=new Set(["auto","none","0"]);class Ir extends An{constructor(e,t,n,r,a){super(e,t,n,r,a,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let o=0;o<e.length;o++){let n=e[o];if("string"==typeof n&&(n=n.trim(),ze(n))){const r=er(n,t.current);void 0!==r&&(e[o]=r),o===e.length-1&&(this.finalKeyframe=n)}}if(this.resolveNoneKeyframes(),!fr.has(n)||2!==e.length)return;const[r,a]=e,i=Er(r),s=Er(a);if(Fe(r)!==Fe(a)&&Nn[n])this.needsMeasurement=!0;else if(i!==s)if(Sn(i)&&Sn(s))for(let o=0;o<e.length;o++){const t=e[o];"string"==typeof t&&(e[o]=parseFloat(t))}else Nn[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:t}=this,n=[];for(let r=0;r<e.length;r++)(null===e[r]||Mr(e[r]))&&n.push(r);n.length&&function(e,t,n){let r,a=0;for(;a<e.length&&!r;){const t=e[a];"string"==typeof t&&!Or.has(t)&&lt(t).values.length&&(r=e[a]),a++}if(r&&n)for(const i of t)e[i]=Vr(n,r)}(e,n,t)}measureInitialState(){const{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Nn[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;const r=t[t.length-1];void 0!==r&&e.getValue(n,r).jump(r,!1)}measureEndState(){const{element:e,name:t,unresolvedKeyframes:n}=this;if(!e||!e.current)return;const r=e.getValue(t);r&&r.jump(this.measuredOrigin,!1);const a=n.length-1,i=n[a];n[a]=Nn[t](e.measureViewportBox(),window.getComputedStyle(e.current)),null!==i&&void 0===this.finalKeyframe&&(this.finalKeyframe=i),this.removedTransforms?.length&&this.removedTransforms.forEach(([t,n])=>{e.getValue(t).set(n)}),this.resolveNoneKeyframes()}}const $r=new Set(["opacity","clipPath","filter","transform"]);function Br(e,t,n){if(null==e)return[];if(e instanceof EventTarget)return[e];if("string"==typeof e){let t=document;const r=n?.[e]??t.querySelectorAll(e);return r?Array.from(r):[]}return Array.from(e).filter(e=>null!=e)}const Hr=(e,t)=>t&&"number"==typeof e?t.transform(e):e;function Ur(e){return Q(e)&&"offsetHeight"in e}const{schedule:Wr}=je(queueMicrotask,!1),qr={x:!1,y:!1};function Yr(){return qr.x||qr.y}function Kr(e,t){const n=Br(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function Qr(e,t,n={}){const[r,a,i]=Kr(e,n);return r.forEach(e=>{let n,r=!1,i=!1;const s=t=>{n&&(n(t),n=void 0),e.removeEventListener("pointerleave",l)},o=e=>{r=!1,window.removeEventListener("pointerup",o),window.removeEventListener("pointercancel",o),i&&(i=!1,s(e))},l=e=>{"touch"!==e.pointerType&&(r?i=!0:s(e))};e.addEventListener("pointerenter",r=>{if("touch"===r.pointerType||Yr())return;i=!1;const s=t(e,r);"function"==typeof s&&(n=s,e.addEventListener("pointerleave",l,a))},a),e.addEventListener("pointerdown",()=>{r=!0,window.addEventListener("pointerup",o,a),window.addEventListener("pointercancel",o,a)},a)}),i}const Xr=(e,t)=>!!t&&(e===t||Xr(e,t.parentElement)),Gr=e=>"mouse"===e.pointerType?"number"!=typeof e.button||e.button<=0:!1!==e.isPrimary,Zr=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);const Jr=new Set(["INPUT","SELECT","TEXTAREA"]);const ea=new WeakSet;function ta(e){return t=>{"Enter"===t.key&&e(t)}}function na(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}function ra(e){return Gr(e)&&!Yr()}const aa=new WeakSet;function ia(e,t,n={}){const[r,a,i]=Kr(e,n),s=e=>{const r=e.currentTarget;if(!ra(e))return;if(aa.has(e))return;ea.add(r),n.stopPropagation&&aa.add(e);const i=t(r,e),s=(e,t)=>{window.removeEventListener("pointerup",o),window.removeEventListener("pointercancel",l),ea.has(r)&&ea.delete(r),ra(e)&&"function"==typeof i&&i(e,{success:t})},o=e=>{s(e,r===window||r===document||n.useGlobalTarget||Xr(r,e.target))},l=e=>{s(e,!1)};window.addEventListener("pointerup",o,a),window.addEventListener("pointercancel",l,a)};return r.forEach(e=>{var t;(n.useGlobalTarget?window:e).addEventListener("pointerdown",s,a),Ur(e)&&(e.addEventListener("focus",e=>((e,t)=>{const n=e.currentTarget;if(!n)return;const r=ta(()=>{if(ea.has(n))return;na(n,"down");const e=ta(()=>{na(n,"up")});n.addEventListener("keyup",e,t),n.addEventListener("blur",()=>na(n,"cancel"),t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)})(e,a)),t=e,Zr.has(t.tagName)||!0===t.isContentEditable||e.hasAttribute("tabindex")||(e.tabIndex=0))}),i}function sa(e){return Q(e)&&"ownerSVGElement"in e}const oa=new WeakMap;let la;const ca=(e,t,n)=>(r,a)=>a&&a[0]?a[0][e+"Size"]:sa(r)&&"getBBox"in r?r.getBBox()[t]:r[n],ua=ca("inline","width","offsetWidth"),da=ca("block","height","offsetHeight");function fa({target:e,borderBoxSize:t}){oa.get(e)?.forEach(n=>{n(e,{get width(){return ua(e,t)},get height(){return da(e,t)}})})}function ha(e){e.forEach(fa)}function pa(e,t){la||"undefined"!=typeof ResizeObserver&&(la=new ResizeObserver(ha));const n=Br(e);return n.forEach(e=>{let n=oa.get(e);n||(n=new Set,oa.set(e,n)),n.add(t),la?.observe(e)}),()=>{n.forEach(e=>{const n=oa.get(e);n?.delete(t),n?.size||la?.unobserve(e)})}}const ma=new Set;let ga;function ya(e){return ma.add(e),ga||(ga=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};ma.forEach(t=>t(e))},window.addEventListener("resize",ga)),()=>{ma.delete(e),ma.size||"function"!=typeof ga||(window.removeEventListener("resize",ga),ga=void 0)}}function va(e,t){return"function"==typeof e?ya(e):pa(e,t)}const xa=[...Tr,rt,ft],ba=()=>({x:{min:0,max:0},y:{min:0,max:0}}),wa=new WeakMap;function ka(e){return null!==e&&"object"==typeof e&&"function"==typeof e.start}function Sa(e){return"string"==typeof e||Array.isArray(e)}const ja=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Ca=["initial",...ja];function Na(e){return ka(e.animate)||Ca.some(t=>Sa(e[t]))}function Ta(e){return Boolean(Na(e)||e.variants)}const Ea={current:null},Ma={current:!1},Pa="undefined"!=typeof window;const La=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Da={};function Aa(e){Da=e}class _a{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,skipAnimations:a,blockInitialAnimation:i,visualState:s},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=An,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const e=Le.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,Ce.render(this.render,!1,!0))};const{latestValues:l,renderState:c}=s;this.latestValues=l,this.baseTarget={...l},this.initialValues=t.initial?{...l}:{},this.renderState=c,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.skipAnimationsConfig=a,this.options=o,this.blockInitialAnimation=Boolean(i),this.isControllingVariants=Na(t),this.isVariantNode=Ta(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(e&&e.current);const{willChange:u,...d}=this.scrapeMotionValuesFromProps(t,{},this);for(const f in d){const e=d[f];void 0!==l[f]&&vr(e)&&e.set(l[f])}}mount(e){if(this.hasBeenMounted)for(const t in this.initialValues)this.values.get(t)?.jump(this.initialValues[t]),this.latestValues[t]=this.initialValues[t];this.current=e,wa.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),"never"===this.reducedMotionConfig?this.shouldReduceMotion=!1:"always"===this.reducedMotionConfig?this.shouldReduceMotion=!0:(Ma.current||function(){if(Ma.current=!0,Pa)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Ea.current=e.matches;e.addEventListener("change",t),t()}else Ea.current=!1}(),this.shouldReduceMotion=Ea.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),Ne(this.notifyUpdate),Ne(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,t){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),t.accelerate&&$r.has(e)&&this.current instanceof HTMLElement){const{factory:n,keyframes:r,times:a,ease:i,duration:s}=t.accelerate,o=new Hn({element:this.current,name:e,keyframes:r,times:a,ease:i,duration:re(s)}),l=n(o);return void this.valueSubscriptions.set(e,()=>{l(),o.cancel()})}const n=kn.has(e);n&&this.onBindTransform&&this.onBindTransform();const r=t.on("change",t=>{this.latestValues[e]=t,this.props.onUpdate&&Ce.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let a;"undefined"!=typeof window&&window.MotionCheckAppearSync&&(a=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{r(),a&&a(),t.owner&&t.stop()})}sortNodePosition(e){return this.current&&this.sortInstanceNodePosition&&this.type===e.type?this.sortInstanceNodePosition(this.current,e.current):0}updateFeatures(){let e="animation";for(e in Da){const t=Da[e];if(!t)continue;const{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){const t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):{x:{min:0,max:0},y:{min:0,max:0}}}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let n=0;n<La.length;n++){const t=La[n];this.propEventSubscriptions[t]&&(this.propEventSubscriptions[t](),delete this.propEventSubscriptions[t]);const r=e["on"+t];r&&(this.propEventSubscriptions[t]=this.on(t,r))}this.prevMotionValues=function(e,t,n){for(const r in t){const a=t[r],i=n[r];if(vr(a))e.addValue(r,a);else if(vr(i))e.addValue(r,pr(a,{owner:e}));else if(i!==a)if(e.hasValue(r)){const t=e.getValue(r);!0===t.liveStyle?t.jump(a):t.hasAnimated||t.set(a)}else{const t=e.getStaticValue(r);e.addValue(r,pr(void 0!==t?t:a,{owner:e}))}}for(const r in n)void 0===t[r]&&e.removeValue(r);return t}(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){const t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){const n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);const t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return void 0===n&&void 0!==t&&(n=pr(null===t?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){let n=void 0===this.latestValues[e]&&this.current?this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options):this.latestValues[e];var r;return null!=n&&("string"==typeof n&&(K(n)||X(n))?n=parseFloat(n):(r=n,!xa.find(Nr(r))&&ft.test(t)&&(n=Vr(e,t))),this.setBaseTarget(e,vr(n)?n.get():n)),vr(n)?n.get():n}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){const{initial:t}=this.props;let n;if("string"==typeof t||"object"==typeof t){const r=ur(this.props,t,this.presenceContext?.custom);r&&(n=r[e])}if(t&&void 0!==n)return n;const r=this.getBaseTargetFromProps(this.props,e);return void 0===r||vr(r)?void 0!==this.initialValues[e]&&void 0===n?void 0:this.baseTarget[e]:r}on(e,t){return this.events[e]||(this.events[e]=new ne),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){Wr.render(this.render)}}class za extends _a{constructor(){super(...arguments),this.KeyframeResolver=Ir}sortInstanceNodePosition(e,t){return 2&e.compareDocumentPosition(t)?1:-1}getBaseTargetFromProps(e,t){const n=e.style;return n?n[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;vr(e)&&(this.childSubscription=e.on("change",e=>{this.current&&(this.current.textContent=\`\${e}\`)}))}}class Ra{constructor(e){this.isMounted=!1,this.node=e}update(){}}function Fa({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Va(e){return void 0===e||1===e}function Oa({scale:e,scaleX:t,scaleY:n}){return!Va(e)||!Va(t)||!Va(n)}function Ia(e){return Oa(e)||$a(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function $a(e){return Ba(e.x)||Ba(e.y)}function Ba(e){return e&&"0%"!==e}function Ha(e,t,n){return n+t*(e-n)}function Ua(e,t,n,r,a){return void 0!==a&&(e=Ha(e,a,r)),Ha(e,n,r)+t}function Wa(e,t=0,n=1,r,a){e.min=Ua(e.min,t,n,r,a),e.max=Ua(e.max,t,n,r,a)}function qa(e,{x:t,y:n}){Wa(e.x,t.translate,t.scale,t.originPoint),Wa(e.y,n.translate,n.scale,n.originPoint)}const Ya=.999999999999,Ka=1.0000000000001;function Qa(e,t){e.min=e.min+t,e.max=e.max+t}function Xa(e,t,n,r,a=.5){Wa(e,t,n,mt(e.min,e.max,a),r)}function Ga(e,t){Xa(e.x,t.x,t.scaleX,t.scale,t.originX),Xa(e.y,t.y,t.scaleY,t.scale,t.originY)}function Za(e,t){return Fa(function(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}(e.getBoundingClientRect(),t))}const Ja={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},ei=wn.length;function ti(e,t,n){const{style:r,vars:a,transformOrigin:i}=e;let s=!1,o=!1;for(const l in t){const e=t[l];if(kn.has(l))s=!0;else if(Ae(l))a[l]=e;else{const t=Hr(e,zr[l]);l.startsWith("origin")?(o=!0,i[l]=t):r[l]=t}}if(t.transform||(s||n?r.transform=function(e,t,n){let r="",a=!0;for(let i=0;i<ei;i++){const s=wn[i],o=e[s];if(void 0===o)continue;let l=!0;if("number"==typeof o)l=o===(s.startsWith("scale")?1:0);else{const e=parseFloat(o);l=s.startsWith("scale")?1===e:0===e}if(!l||n){const e=Hr(o,zr[s]);l||(a=!1,r+=\`\${Ja[s]||s}(\${e}) \`),n&&(t[s]=e)}}return r=r.trim(),n?r=n(t,a?"":r):a&&(r="none"),r}(t,e.transform,n):r.transform&&(r.transform="none")),o){const{originX:e="50%",originY:t="50%",originZ:n=0}=i;r.transformOrigin=\`\${e} \${t} \${n}\`}}function ni(e,{style:t,vars:n},r,a){const i=e.style;let s;for(s in t)i[s]=t[s];for(s in a?.applyProjectionStyles(i,r),n)i.setProperty(s,n[s])}function ri(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const ai={correct:(e,t)=>{if(!t.target)return e;if("string"==typeof e){if(!Ze.test(e))return e;e=parseFloat(e)}return\`\${ri(e,t.target.x)}% \${ri(e,t.target.y)}%\`}},ii={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,a=ft.parse(e);if(a.length>5)return r;const i=ft.createTransformer(e),s="number"!=typeof a[0]?1:0,o=n.x.scale*t.x,l=n.y.scale*t.y;a[0+s]/=o,a[1+s]/=l;const c=mt(o,l,.5);return"number"==typeof a[2+s]&&(a[2+s]/=c),"number"==typeof a[3+s]&&(a[3+s]/=c),i(a)}},si={borderRadius:{...ai,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:ai,borderTopRightRadius:ai,borderBottomLeftRadius:ai,borderBottomRightRadius:ai,boxShadow:ii};function oi(e,{layout:t,layoutId:n}){return kn.has(e)||e.startsWith("origin")||(t||void 0!==n)&&(!!si[e]||"opacity"===e)}function li(e,t,n){const r=e.style,a=t?.style,i={};if(!r)return i;for(const s in r)(vr(r[s])||a&&vr(a[s])||oi(s,e)||void 0!==n?.getValue(s)?.liveStyle)&&(i[s]=r[s]);return i}class ci extends za{constructor(){super(...arguments),this.type="html",this.renderInstance=ni}readValueFromInstance(e,t){if(kn.has(t))return this.projection?.isProjecting?vn(t):((e,t)=>{const{transform:n="none"}=getComputedStyle(e);return xn(n,t)})(e,t);{const r=(n=e,window.getComputedStyle(n)),a=(Ae(t)?r.getPropertyValue(t):r[t])||0;return"string"==typeof a?a.trim():a}var n}measureInstanceViewportBox(e,{transformPagePoint:t}){return Za(e,t)}build(e,t,n){ti(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return li(e,t,n)}}const ui={offset:"stroke-dashoffset",array:"stroke-dasharray"},di={offset:"strokeDashoffset",array:"strokeDasharray"};const fi=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function hi(e,{attrX:t,attrY:n,attrScale:r,pathLength:a,pathSpacing:i=1,pathOffset:s=0,...o},l,c,u){if(ti(e,o,c),l)return void(e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox));e.attrs=e.style,e.style={};const{attrs:d,style:f}=e;d.transform&&(f.transform=d.transform,delete d.transform),(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),f.transform&&(f.transformBox=u?.transformBox??"fill-box",delete d.transformBox);for(const h of fi)void 0!==d[h]&&(f[h]=d[h],delete d[h]);void 0!==t&&(d.x=t),void 0!==n&&(d.y=n),void 0!==r&&(d.scale=r),void 0!==a&&function(e,t,n=1,r=0,a=!0){e.pathLength=1;const i=a?ui:di;e[i.offset]=""+-r,e[i.array]=\`\${t} \${n}\`}(d,a,i,s,!1)}const pi=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),mi=e=>"string"==typeof e&&"svg"===e.toLowerCase();function gi(e,t,n){const r=li(e,t,n);for(const a in e)if(vr(e[a])||vr(t[a])){r[-1!==wn.indexOf(a)?"attr"+a.charAt(0).toUpperCase()+a.substring(1):a]=e[a]}return r}class yi extends za{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=ba}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(kn.has(t)){const e=Fr(t);return e&&e.default||0}return t=pi.has(t)?t:br(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return gi(e,t,n)}build(e,t,n){hi(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){!function(e,t,n,r){ni(e,t,void 0,r);for(const a in t.attrs)e.setAttribute(pi.has(a)?a:br(a),t.attrs[a])}(e,t,0,r)}mount(e){this.isSVGTag=mi(e.tagName),super.mount(e)}}const vi=Ca.length;function xi(e){if(!e)return;if(!e.isControllingVariants){const t=e.parent&&xi(e.parent)||{};return void 0!==e.props.initial&&(t.initial=e.props.initial),t}const t={};for(let n=0;n<vi;n++){const r=Ca[n],a=e.props[r];(Sa(a)||!1===a)&&(t[r]=a)}return t}function bi(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const wi=[...ja].reverse(),ki=ja.length;function Si(e){return t=>Promise.all(t.map(({animation:t,options:n})=>function(e,t,n={}){let r;if(e.notify("AnimationStart",t),Array.isArray(t)){const a=t.map(t=>Cr(e,t,n));r=Promise.all(a)}else if("string"==typeof t)r=Cr(e,t,n);else{const a="function"==typeof t?dr(e,t,n.custom):t;r=Promise.all(jr(e,a,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}(e,t,n)))}function ji(e){let t=Si(e),n=Ti(),r=!0;const a=t=>(n,r)=>{const a=dr(e,r,"exit"===t?e.presenceContext?.custom:void 0);if(a){const{transition:e,transitionEnd:t,...r}=a;n={...n,...r,...t}}return n};function i(i){const{props:s}=e,o=xi(e.parent)||{},l=[],c=new Set;let u={},d=1/0;for(let t=0;t<ki;t++){const f=wi[t],h=n[f],p=void 0!==s[f]?s[f]:o[f],m=Sa(p),g=f===i?h.isActive:null;!1===g&&(d=t);let y=p===o[f]&&p!==s[f]&&m;if(y&&r&&e.manuallyAnimateOnMount&&(y=!1),h.protectedKeys={...u},!h.isActive&&null===g||!p&&!h.prevProp||ka(p)||"boolean"==typeof p)continue;if("exit"===f&&h.isActive&&!0!==g){h.prevResolvedValues&&(u={...u,...h.prevResolvedValues});continue}const v=Ci(h.prevProp,p);let x=v||f===i&&h.isActive&&!y&&m||t>d&&m,b=!1;const w=Array.isArray(p)?p:[p];let k=w.reduce(a(f),{});!1===g&&(k={});const{prevResolvedValues:S={}}=h,j={...S,...k},C=t=>{x=!0,c.has(t)&&(b=!0,c.delete(t)),h.needsAnimating[t]=!0;const n=e.getValue(t);n&&(n.liveStyle=!1)};for(const e in j){const t=k[e],n=S[e];if(u.hasOwnProperty(e))continue;let r=!1;r=mr(t)&&mr(n)?!bi(t,n):t!==n,r?null!=t?C(e):c.add(e):void 0!==t&&c.has(e)?C(e):h.protectedKeys[e]=!0}h.prevProp=p,h.prevResolvedValues=k,h.isActive&&(u={...u,...k}),r&&e.blockInitialAnimation&&(x=!1);const N=y&&v;x&&(!N||b)&&l.push(...w.map(t=>{const n={type:f};if("string"==typeof t&&r&&!N&&e.manuallyAnimateOnMount&&e.parent){const{parent:r}=e,a=dr(r,t);if(r.enteringChildren&&a){const{delayChildren:t}=a.transition||{};n.delay=Zn(r.enteringChildren,e,t)}}return{animation:t,options:n}}))}if(c.size){const t={};if("boolean"!=typeof s.initial){const n=dr(e,Array.isArray(s.initial)?s.initial[0]:s.initial);n&&n.transition&&(t.transition=n.transition)}c.forEach(n=>{const r=e.getBaseTarget(n),a=e.getValue(n);a&&(a.liveStyle=!0),t[n]=r??null}),l.push({animation:t})}let f=Boolean(l.length);return!r||!1!==s.initial&&s.initial!==s.animate||e.manuallyAnimateOnMount||(f=!1),r=!1,f?t(l):Promise.resolve()}return{animateChanges:i,setActive:function(t,r){if(n[t].isActive===r)return Promise.resolve();e.variantChildren?.forEach(e=>e.animationState?.setActive(t,r)),n[t].isActive=r;const a=i(t);for(const e in n)n[e].protectedKeys={};return a},setAnimateFunction:function(n){t=n(e)},getState:()=>n,reset:()=>{n=Ti()}}}function Ci(e,t){return"string"==typeof t?t!==e:!!Array.isArray(t)&&!bi(t,e)}function Ni(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Ti(){return{animate:Ni(!0),whileInView:Ni(),whileHover:Ni(),whileTap:Ni(),whileDrag:Ni(),whileFocus:Ni(),exit:Ni()}}function Ei(e,t){e.min=t.min,e.max=t.max}function Mi(e,t){Ei(e.x,t.x),Ei(e.y,t.y)}function Pi(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Li(e){return e.max-e.min}function Di(e,t,n,r=.5){e.origin=r,e.originPoint=mt(t.min,t.max,e.origin),e.scale=Li(n)/Li(t),e.translate=mt(n.min,n.max,e.origin)-e.originPoint,(e.scale>=.9999&&e.scale<=1.0001||isNaN(e.scale))&&(e.scale=1),(e.translate>=-.01&&e.translate<=.01||isNaN(e.translate))&&(e.translate=0)}function Ai(e,t,n,r){Di(e.x,t.x,n.x,r?r.originX:void 0),Di(e.y,t.y,n.y,r?r.originY:void 0)}function _i(e,t,n){e.min=n.min+t.min,e.max=e.min+Li(t)}function zi(e,t,n){e.min=t.min-n.min,e.max=e.min+Li(t)}function Ri(e,t,n){zi(e.x,t.x,n.x),zi(e.y,t.y,n.y)}function Fi(e,t,n,r,a){return e=Ha(e-=t,1/n,r),void 0!==a&&(e=Ha(e,1/a,r)),e}function Vi(e,t,[n,r,a],i,s){!function(e,t=0,n=1,r=.5,a,i=e,s=e){Ge.test(t)&&(t=parseFloat(t),t=mt(s.min,s.max,t/100)-s.min);if("number"!=typeof t)return;let o=mt(i.min,i.max,r);e===i&&(o-=t),e.min=Fi(e.min,t,n,o,a),e.max=Fi(e.max,t,n,o,a)}(e,t[n],t[r],t[a],t.scale,i,s)}const Oi=["x","scaleX","originX"],Ii=["y","scaleY","originY"];function $i(e,t,n,r){Vi(e.x,t,Oi,n?n.x:void 0,r?r.x:void 0),Vi(e.y,t,Ii,n?n.y:void 0,r?r.y:void 0)}function Bi(e){return 0===e.translate&&1===e.scale}function Hi(e){return Bi(e.x)&&Bi(e.y)}function Ui(e,t){return e.min===t.min&&e.max===t.max}function Wi(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function qi(e,t){return Wi(e.x,t.x)&&Wi(e.y,t.y)}function Yi(e){return Li(e.x)/Li(e.y)}function Ki(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function Qi(e){return[e("x"),e("y")]}const Xi=["TopLeft","TopRight","BottomLeft","BottomRight"],Gi=Xi.length,Zi=e=>"string"==typeof e?parseFloat(e):e,Ji=e=>"number"==typeof e||Ze.test(e);function es(e,t){return void 0!==e[t]?e[t]:e.borderRadius}const ts=rs(0,.5,me),ns=rs(.5,.95,Z);function rs(e,t,n){return r=>r<e?0:r>t?1:n(te(e,t,r))}function as(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const is=(e,t)=>e.depth-t.depth;class ss{constructor(){this.children=[],this.isDirty=!1}add(e){U(this.children,e),this.isDirty=!0}remove(e){W(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(is),this.isDirty=!1,this.children.forEach(e)}}function os(e){return vr(e)?e.get():e}class ls{constructor(){this.members=[]}add(e){U(this.members,e);for(let t=this.members.length-1;t>=0;t--){const n=this.members[t];if(n===e||n===this.lead||n===this.prevLead)continue;const r=n.instance;r&&!1===r.isConnected&&!1!==n.isPresent&&!n.snapshot&&W(this.members,n)}e.scheduleRender()}remove(e){if(W(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){const t=this.members.findIndex(t=>e===t);if(0===t)return!1;let n;for(let r=t;r>=0;r--){const e=this.members[r],t=e.instance;if(!1!==e.isPresent&&(!t||!1!==t.isConnected)){n=e;break}}return!!n&&(this.promote(n),!0)}promote(e,t){const n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.instance&&n.scheduleRender(),e.scheduleRender();const r=n.options.layoutDependency,a=e.options.layoutDependency;if(!(void 0!==r&&void 0!==a&&r===a)){const r=n.instance;r&&!1===r.isConnected&&!n.snapshot||(e.resumeFrom=n,t&&(e.resumeFrom.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0))}const{crossfade:i}=e.options;!1===i&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:t,resumingFrom:n}=e;t.onExitComplete&&t.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const cs={hasAnimatedSinceResize:!0,hasEverUpdated:!1},us=["","X","Y","Z"];let ds=0;function fs(e,t,n,r){const{latestValues:a}=t;a[e]&&(n[e]=a[e],t.setStaticValue(e,0),r&&(r[e]=0))}function hs(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=kr(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Ce,!(t||r))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&hs(r)}function ps({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:a}){return class{constructor(e={},n=t?.()){this.id=ds++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(ys),this.nodes.forEach(js),this.nodes.forEach(Cs),this.nodes.forEach(vs)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let t=0;t<this.path.length;t++)this.path[t].shouldResetTransform=!0;this.root===this&&(this.nodes=new ss)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new ne),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){const n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t){if(this.instance)return;var n;this.isSVG=sa(t)&&!(sa(n=t)&&"svg"===n.tagName),this.instance=t;const{layoutId:r,layout:a,visualElement:i}=this.options;if(i&&!i.current&&i.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(a||r)&&(this.isLayoutDirty=!0),e){let n,r=0;const a=()=>this.root.updateBlockedByResize=!1;Ce.read(()=>{r=window.innerWidth}),e(t,()=>{const e=window.innerWidth;e!==r&&(r=e,this.root.updateBlockedByResize=!0,n&&n(),n=function(e,t){const n=Le.now(),r=({timestamp:a})=>{const i=a-n;i>=t&&(Ne(r),e(i-t))};return Ce.setup(r,!0),()=>Ne(r)}(a,250),cs.hasAnimatedSinceResize&&(cs.hasAnimatedSinceResize=!1,this.nodes.forEach(Ss)))})}r&&this.root.registerSharedNode(r,this),!1!==this.options.animate&&i&&(r||a)&&this.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const a=this.options.transition||i.getDefaultTransition()||Ls,{onLayoutAnimationStart:s,onLayoutAnimationComplete:o}=i.getProps(),l=!this.targetLayout||!qi(this.targetLayout,r),c=!t&&n;if(this.options.layoutRoot||this.resumeFrom||c||t&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const t={...or(a,"layout"),onPlay:s,onComplete:o};(i.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,c)}else t||Ss(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Ne(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Ns),this.animationId++)}getTransformTemplate(){const{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&hs(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let a=0;a<this.path.length;a++){const e=this.path[a];e.shouldResetTransform=!0,e.updateScroll("snapshot"),e.options.layoutRoot&&e.willUpdate(!1)}const{layoutId:t,layout:n}=this.options;if(void 0===t&&!n)return;const r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,""):void 0,this.updateSnapshot(),e&&this.notifyListeners("willUpdate")}update(){this.updateScheduled=!1;if(this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(bs);if(this.animationId<=this.animationCommitId)return void this.nodes.forEach(ws);this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(ks),this.nodes.forEach(ms),this.nodes.forEach(gs)):this.nodes.forEach(ws),this.clearAllSnapshots();const e=Le.now();Te.delta=q(0,1e3/60,e-Te.timestamp),Te.timestamp=e,Te.isProcessing=!0,Ee.update.process(Te),Ee.preRender.process(Te),Ee.render.process(Te),Te.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Wr.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(xs),this.sharedNodes.forEach(Ts)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Ce.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Ce.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||Li(this.snapshot.measuredBox.x)||Li(this.snapshot.measuredBox.y)||(this.snapshot=void 0))}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let n=0;n<this.path.length;n++){this.path[n].updateScroll()}const e=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected={x:{min:0,max:0},y:{min:0,max:0}},this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:t}=this.options;t&&t.notify("LayoutMeasure",this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e="measure"){let t=Boolean(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t&&this.instance){const t=r(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!a)return;const e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!Hi(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,""):void 0,i=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||Ia(this.latestValues)||i)&&(a(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){const t=this.measurePageBox();let n=this.removeElementScroll(t);var r;return e&&(n=this.removeTransform(n)),_s((r=n).x),_s(r.y),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:e}=this.options;if(!e)return{x:{min:0,max:0},y:{min:0,max:0}};const t=e.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(Rs))){const{scroll:e}=this.root;e&&(Qa(t.x,e.offset.x),Qa(t.y,e.offset.y))}return t}removeElementScroll(e){const t={x:{min:0,max:0},y:{min:0,max:0}};if(Mi(t,e),this.scroll?.wasRoot)return t;for(let n=0;n<this.path.length;n++){const r=this.path[n],{scroll:a,options:i}=r;r!==this.root&&a&&i.layoutScroll&&(a.wasRoot&&Mi(t,e),Qa(t.x,a.offset.x),Qa(t.y,a.offset.y))}return t}applyTransform(e,t=!1){const n={x:{min:0,max:0},y:{min:0,max:0}};Mi(n,e);for(let r=0;r<this.path.length;r++){const e=this.path[r];!t&&e.options.layoutScroll&&e.scroll&&e!==e.root&&Ga(n,{x:-e.scroll.offset.x,y:-e.scroll.offset.y}),Ia(e.latestValues)&&Ga(n,e.latestValues)}return Ia(this.latestValues)&&Ga(n,this.latestValues),n}removeTransform(e){const t={x:{min:0,max:0},y:{min:0,max:0}};Mi(t,e);for(let n=0;n<this.path.length;n++){const e=this.path[n];if(!e.instance)continue;if(!Ia(e.latestValues))continue;Oa(e.latestValues)&&e.updateSnapshot();const r=ba();Mi(r,e.measurePageBox()),$i(t,e.latestValues,e.snapshot?e.snapshot.layoutBox:void 0,r)}return Ia(this.latestValues)&&$i(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:void 0===e.crossfade||e.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Te.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){const t=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=t.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=t.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=t.isSharedProjectionDirty);const n=Boolean(this.resumingFrom)||this!==t;if(!(e||n&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:r,layoutId:a}=this.options;if(!this.layout||!r&&!a)return;this.resolvedRelativeTargetAt=Te.timestamp;const i=this.getClosestProjectingParent();var s,o,l;(i&&this.linkedParentVersion!==i.layoutVersion&&!i.options.layoutRoot&&this.removeRelativeTarget(),this.targetDelta||this.relativeTarget||(i&&i.layout?this.createRelativeTarget(i,this.layout.layoutBox,i.layout.layoutBox):this.removeRelativeTarget()),this.relativeTarget||this.targetDelta)&&(this.target||(this.target={x:{min:0,max:0},y:{min:0,max:0}},this.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}}),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),s=this.target,o=this.relativeTarget,l=this.relativeParent.target,_i(s.x,o.x,l.x),_i(s.y,o.y,l.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):Mi(this.target,this.layout.layoutBox),qa(this.target,this.targetDelta)):Mi(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,i&&Boolean(i.resumingFrom)===Boolean(this.resumingFrom)&&!i.options.layoutScroll&&i.target&&1!==this.animationProgress?this.createRelativeTarget(i,this.target,i.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(this.parent&&!Oa(this.parent.latestValues)&&!$a(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(e,t,n){this.relativeParent=e,this.linkedParentVersion=e.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},Ri(this.relativeTargetOrigin,t,n),Mi(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const e=this.getLead(),t=Boolean(this.resumingFrom)||this!==e;let n=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(n=!1),t&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===Te.timestamp&&(n=!1),n)return;const{layout:r,layoutId:a}=this.options;if(this.isTreeAnimating=Boolean(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!r&&!a)return;Mi(this.layoutCorrected,this.layout.layoutBox);const i=this.treeScale.x,s=this.treeScale.y;!function(e,t,n,r=!1){const a=n.length;if(!a)return;let i,s;t.x=t.y=1;for(let o=0;o<a;o++){i=n[o],s=i.projectionDelta;const{visualElement:a}=i.options;a&&a.props.style&&"contents"===a.props.style.display||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&Ga(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),s&&(t.x*=s.x.scale,t.y*=s.y.scale,qa(e,s)),r&&Ia(i.latestValues)&&Ga(e,i.latestValues))}t.x<Ka&&t.x>Ya&&(t.x=1),t.y<Ka&&t.y>Ya&&(t.y=1)}(this.layoutCorrected,this.treeScale,this.path,t),!e.layout||e.target||1===this.treeScale.x&&1===this.treeScale.y||(e.target=e.layout.layoutBox,e.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}});const{target:o}=e;o?(this.projectionDelta&&this.prevProjectionDelta?(Pi(this.prevProjectionDelta.x,this.projectionDelta.x),Pi(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),Ai(this.projectionDelta,this.layoutCorrected,o,this.latestValues),this.treeScale.x===i&&this.treeScale.y===s&&Ki(this.projectionDelta.x,this.prevProjectionDelta.x)&&Ki(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",o))):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){if(this.options.visualElement?.scheduleRender(),e){const e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDeltaWithTransform={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}}setAnimationOrigin(e,t=!1){const n=this.snapshot,r=n?n.latestValues:{},a={...this.latestValues},i={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;const s={x:{min:0,max:0},y:{min:0,max:0}},o=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),c=!l||l.members.length<=1,u=Boolean(o&&!c&&!0===this.options.crossfade&&!this.path.some(Ps));let d;this.animationProgress=0,this.mixTargetDelta=t=>{const n=t/1e3;var l,f,h,p,m,g;Es(i.x,e.x,n),Es(i.y,e.y,n),this.setTargetDelta(i),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Ri(s,this.layout.layoutBox,this.relativeParent.layout.layoutBox),h=this.relativeTarget,p=this.relativeTargetOrigin,m=s,g=n,Ms(h.x,p.x,m.x,g),Ms(h.y,p.y,m.y,g),d&&(l=this.relativeTarget,f=d,Ui(l.x,f.x)&&Ui(l.y,f.y))&&(this.isProjectionDirty=!1),d||(d={x:{min:0,max:0},y:{min:0,max:0}}),Mi(d,this.relativeTarget)),o&&(this.animationValues=a,function(e,t,n,r,a,i){a?(e.opacity=mt(0,n.opacity??1,ts(r)),e.opacityExit=mt(t.opacity??1,0,ns(r))):i&&(e.opacity=mt(t.opacity??1,n.opacity??1,r));for(let s=0;s<Gi;s++){const a=\`border\${Xi[s]}Radius\`;let i=es(t,a),o=es(n,a);void 0===i&&void 0===o||(i||(i=0),o||(o=0),0===i||0===o||Ji(i)===Ji(o)?(e[a]=Math.max(mt(Zi(i),Zi(o),r),0),(Ge.test(o)||Ge.test(i))&&(e[a]+="%")):e[a]=o)}(t.rotate||n.rotate)&&(e.rotate=mt(t.rotate||0,n.rotate||0,r))}(a,r,this.latestValues,n,u,c)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Ne(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Ce.update(()=>{cs.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=pr(0)),this.currentAnimation=function(e,t,n){const r=vr(e)?e:pr(e);return r.start(lr("",r,t,n)),r.animation}(this.motionValue,[0,1e3],{...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onStop:()=>{},onComplete:()=>{e.onComplete&&e.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const e=this.getLead();let{targetWithTransforms:t,target:n,layout:r,latestValues:a}=e;if(t&&n&&r){if(this!==e&&this.layout&&r&&zs(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const t=Li(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;const r=Li(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}Mi(t,n),Ga(t,a),Ai(this.projectionDeltaWithTransform,this.layoutCorrected,t,a)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new ls);this.sharedNodes.get(e).add(t);const n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){const e=this.getStack();return!e||e.lead===this}getLead(){const{layoutId:e}=this.options;return e&&this.getStack()?.lead||this}getPrevLead(){const{layoutId:e}=this.options;return e?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){const r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){const e=this.getStack();return!!e&&e.relegate(this)}resetSkewAndRotation(){const{visualElement:e}=this.options;if(!e)return;let t=!1;const{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;const r={};n.z&&fs("z",e,r,this.animationValues);for(let a=0;a<us.length;a++)fs(\`rotate\${us[a]}\`,e,r,this.animationValues),fs(\`skew\${us[a]}\`,e,r,this.animationValues);e.render();for(const a in r)e.setStaticValue(a,r[a]),this.animationValues&&(this.animationValues[a]=r[a]);e.scheduleRender()}applyProjectionStyles(e,t){if(!this.instance||this.isSVG)return;if(!this.isVisible)return void(e.visibility="hidden");const n=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,e.visibility="",e.opacity="",e.pointerEvents=os(t?.pointerEvents)||"",void(e.transform=n?n(this.latestValues,""):"none");const r=this.getLead();if(!this.projectionDelta||!this.layout||!r.target)return this.options.layoutId&&(e.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,e.pointerEvents=os(t?.pointerEvents)||""),void(this.hasProjected&&!Ia(this.latestValues)&&(e.transform=n?n({},""):"none",this.hasProjected=!1));e.visibility="";const a=r.animationValues||r.latestValues;this.applyTransformsToTarget();let i=function(e,t,n){let r="";const a=e.x.translate/t.x,i=e.y.translate/t.y,s=n?.z||0;if((a||i||s)&&(r=\`translate3d(\${a}px, \${i}px, \${s}px) \`),1===t.x&&1===t.y||(r+=\`scale(\${1/t.x}, \${1/t.y}) \`),n){const{transformPerspective:e,rotate:t,rotateX:a,rotateY:i,skewX:s,skewY:o}=n;e&&(r=\`perspective(\${e}px) \${r}\`),t&&(r+=\`rotate(\${t}deg) \`),a&&(r+=\`rotateX(\${a}deg) \`),i&&(r+=\`rotateY(\${i}deg) \`),s&&(r+=\`skewX(\${s}deg) \`),o&&(r+=\`skewY(\${o}deg) \`)}const o=e.x.scale*t.x,l=e.y.scale*t.y;return 1===o&&1===l||(r+=\`scale(\${o}, \${l})\`),r||"none"}(this.projectionDeltaWithTransform,this.treeScale,a);n&&(i=n(a,i)),e.transform=i;const{x:s,y:o}=this.projectionDelta;e.transformOrigin=\`\${100*s.origin}% \${100*o.origin}% 0\`,r.animationValues?e.opacity=r===this?a.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:a.opacityExit:e.opacity=r===this?void 0!==a.opacity?a.opacity:"":void 0!==a.opacityExit?a.opacityExit:0;for(const l in si){if(void 0===a[l])continue;const{correct:t,applyTo:n,isCSSVariable:s}=si[l],o="none"===i?a[l]:t(a[l],r);if(n){const t=n.length;for(let r=0;r<t;r++)e[n[r]]=o}else s?this.options.visualElement.renderState.vars[l]=o:e[l]=o}this.options.layoutId&&(e.pointerEvents=r===this?os(t?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(bs),this.root.sharedNodes.clear()}}}function ms(e){e.updateLayout()}function gs(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:r}=e.layout,{animationType:a}=e.options,i=t.source!==e.layout.source;"size"===a?Qi(e=>{const r=i?t.measuredBox[e]:t.layoutBox[e],a=Li(r);r.min=n[e].min,r.max=r.min+a}):zs(a,t.layoutBox,n)&&Qi(r=>{const a=i?t.measuredBox[r]:t.layoutBox[r],s=Li(n[r]);a.max=a.min+s,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+s)});const s={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};Ai(s,n,t.layoutBox);const o={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};i?Ai(o,e.applyTransform(r,!0),t.measuredBox):Ai(o,n,t.layoutBox);const l=!Hi(s);let c=!1;if(!e.resumeFrom){const r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){const{snapshot:a,layout:i}=r;if(a&&i){const s={x:{min:0,max:0},y:{min:0,max:0}};Ri(s,t.layoutBox,a.layoutBox);const o={x:{min:0,max:0},y:{min:0,max:0}};Ri(o,n,i.layoutBox),qi(s,o)||(c=!0),r.options.layoutRoot&&(e.relativeTarget=o,e.relativeTargetOrigin=s,e.relativeParent=r)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:o,layoutDelta:s,hasLayoutChanged:l,hasRelativeLayoutChanged:c})}else if(e.isLead()){const{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function ys(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=Boolean(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function vs(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function xs(e){e.clearSnapshot()}function bs(e){e.clearMeasurements()}function ws(e){e.isLayoutDirty=!1}function ks(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Ss(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function js(e){e.resolveTargetDelta()}function Cs(e){e.calcProjection()}function Ns(e){e.resetSkewAndRotation()}function Ts(e){e.removeLeadSnapshot()}function Es(e,t,n){e.translate=mt(t.translate,0,n),e.scale=mt(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Ms(e,t,n,r){e.min=mt(t.min,n.min,r),e.max=mt(t.max,n.max,r)}function Ps(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}const Ls={duration:.45,ease:[.4,0,.1,1]},Ds=e=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),As=Ds("applewebkit/")&&!Ds("chrome/")?Math.round:Z;function _s(e){e.min=As(e.min),e.max=As(e.max)}function zs(e,t,n){return"position"===e||"preserve-aspect"===e&&(r=Yi(t),a=Yi(n),i=.2,!(Math.abs(r-a)<=i));var r,a,i}function Rs(e){return e!==e.root&&e.scroll?.wasRoot}const Fs=ps({attachResizeListener:(e,t)=>as(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),Vs={current:void 0},Os=ps({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Vs.current){const e=new Fs({});e.mount(window),e.setOptions({layoutScroll:!0}),Vs.current=e}return Vs.current},resetTransform:(e,t)=>{e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:e=>Boolean("fixed"===window.getComputedStyle(e).position)}),Is=f.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function $s(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function Bs(...e){return f.useCallback(function(...e){return t=>{let n=!1;const r=e.map(e=>{const r=$s(e,t);return n||"function"!=typeof r||(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){const n=r[t];"function"==typeof n?n():$s(e[t],null)}}}}(...e),e)}class Hs extends f.Component{getSnapshotBeforeUpdate(e){const t=this.props.childRef.current;if(t&&e.isPresent&&!this.props.isPresent&&!1!==this.props.pop){const e=t.offsetParent,n=Ur(e)&&e.offsetWidth||0,r=Ur(e)&&e.offsetHeight||0,a=this.props.sizeRef.current;a.height=t.offsetHeight||0,a.width=t.offsetWidth||0,a.top=t.offsetTop,a.left=t.offsetLeft,a.right=n-a.width-a.left,a.bottom=r-a.height-a.top}return null}componentDidUpdate(){}render(){return this.props.children}}function Us({children:e,isPresent:t,anchorX:n,anchorY:r,root:a,pop:i}){const s=f.useId(),l=f.useRef(null),c=f.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:u}=f.useContext(Is),d=e.props?.ref??e?.ref,h=Bs(l,d);return f.useInsertionEffect(()=>{const{width:e,height:o,top:d,left:f,right:h,bottom:p}=c.current;if(t||!1===i||!l.current||!e||!o)return;const m="left"===n?\`left: \${f}\`:\`right: \${h}\`,g="bottom"===r?\`bottom: \${p}\`:\`top: \${d}\`;l.current.dataset.motionPopId=s;const y=document.createElement("style");u&&(y.nonce=u);const v=a??document.head;return v.appendChild(y),y.sheet&&y.sheet.insertRule(\`\\n [data-motion-pop-id="\${s}"] {\\n position: absolute !important;\\n width: \${e}px !important;\\n height: \${o}px !important;\\n \${m}px !important;\\n \${g}px !important;\\n }\\n \`),()=>{v.contains(y)&&v.removeChild(y)}},[t]),o.jsx(Hs,{isPresent:t,childRef:l,sizeRef:c,pop:i,children:!1===i?e:f.cloneElement(e,{ref:h})})}const Ws=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:a,presenceAffectsLayout:i,mode:s,anchorX:l,anchorY:c,root:u})=>{const d=I(qs),h=f.useId();let p=!0,m=f.useMemo(()=>(p=!1,{id:h,initial:t,isPresent:n,custom:a,onExitComplete:e=>{d.set(e,!0);for(const t of d.values())if(!t)return;r&&r()},register:e=>(d.set(e,!1),()=>d.delete(e))}),[n,d,r]);return i&&p&&(m={...m}),f.useMemo(()=>{d.forEach((e,t)=>d.set(t,!1))},[n]),f.useEffect(()=>{!n&&!d.size&&r&&r()},[n]),e=o.jsx(Us,{pop:"popLayout"===s,isPresent:n,anchorX:l,anchorY:c,root:u,children:e}),o.jsx(H.Provider,{value:m,children:e})};function qs(){return new Map}function Ys(e=!0){const t=f.useContext(H);if(null===t)return[!0,null];const{isPresent:n,onExitComplete:r,register:a}=t,i=f.useId();f.useEffect(()=>{if(e)return a(i)},[e]);const s=f.useCallback(()=>e&&r&&r(i),[i,r,e]);return!n&&r?[!1,s]:[!0]}const Ks=e=>e.key||"";function Qs(e){const t=[];return f.Children.forEach(e,e=>{f.isValidElement(e)&&t.push(e)}),t}const Xs=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:a=!0,mode:i="sync",propagate:s=!1,anchorX:l="left",anchorY:c="top",root:u})=>{const[d,h]=Ys(s),p=f.useMemo(()=>Qs(e),[e]),m=s&&!d?[]:p.map(Ks),g=f.useRef(!0),y=f.useRef(p),v=I(()=>new Map),x=f.useRef(new Set),[b,w]=f.useState(p),[k,S]=f.useState(p);B(()=>{g.current=!1,y.current=p;for(let e=0;e<k.length;e++){const t=Ks(k[e]);m.includes(t)?(v.delete(t),x.current.delete(t)):!0!==v.get(t)&&v.set(t,!1)}},[k,m.length,m.join("-")]);const j=[];if(p!==b){let e=[...p];for(let t=0;t<k.length;t++){const n=k[t],r=Ks(n);m.includes(r)||(e.splice(t,0,n),j.push(n))}return"wait"===i&&j.length&&(e=j),S(Qs(e)),w(p),null}const{forceRender:C}=f.useContext(O);return o.jsx(o.Fragment,{children:k.map(e=>{const f=Ks(e),b=!(s&&!d)&&(p===k||m.includes(f));return o.jsx(Ws,{isPresent:b,initial:!(g.current&&!n)&&void 0,custom:t,presenceAffectsLayout:a,mode:i,root:u,onExitComplete:b?void 0:()=>{if(x.current.has(f))return;if(x.current.add(f),!v.has(f))return;v.set(f,!0);let e=!0;v.forEach(t=>{t||(e=!1)}),e&&(C?.(),S(y.current),s&&h?.(),r&&r())},anchorX:l,anchorY:c,children:e},f)})})},Gs=f.createContext({strict:!1}),Zs={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let Js=!1;function eo(){return function(){if(Js)return;const e={};for(const t in Zs)e[t]={isEnabled:e=>Zs[t].some(t=>!!e[t])};Aa(e),Js=!0}(),Da}const to=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function no(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||to.has(e)}let ro=e=>!no(e);try{"function"==typeof(ao=require("@emotion/is-prop-valid").default)&&(ro=e=>e.startsWith("on")?!no(e):ao(e))}catch{}var ao;const io=f.createContext({});function so(e){const{initial:t,animate:n}=function(e,t){if(Na(e)){const{initial:t,animate:n}=e;return{initial:!1===t||Sa(t)?t:void 0,animate:Sa(n)?n:void 0}}return!1!==e.inherit?t:{}}(e,f.useContext(io));return f.useMemo(()=>({initial:t,animate:n}),[oo(t),oo(n)])}function oo(e){return Array.isArray(e)?e.join(" "):e}const lo=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function co(e,t,n){for(const r in t)vr(t[r])||oi(r,n)||(e[r]=t[r])}function uo(e,t){const n={};return co(n,e.style||{},e),Object.assign(n,function({transformTemplate:e},t){return f.useMemo(()=>{const n={style:{},transform:{},transformOrigin:{},vars:{}};return ti(n,t,e),Object.assign({},n.vars,n.style)},[t])}(e,t)),n}function fo(e,t){const n={},r=uo(e,t);return e.drag&&!1!==e.dragListener&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=!0===e.drag?"none":"pan-"+("x"===e.drag?"y":"x")),void 0===e.tabIndex&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const ho=()=>({style:{},transform:{},transformOrigin:{},vars:{},attrs:{}});function po(e,t,n,r){const a=f.useMemo(()=>{const n={style:{},transform:{},transformOrigin:{},vars:{},attrs:{}};return hi(n,t,mi(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){const t={};co(t,e.style,e),a.style={...t,...a.style}}return a}const mo=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function go(e){return"string"==typeof e&&!e.includes("-")&&!!(mo.indexOf(e)>-1||/[A-Z]/u.test(e))}function yo(e,t,n,{latestValues:r},a,i=!1,s){const o=(s??go(e)?po:fo)(t,r,a,e),l=function(e,t,n){const r={};for(const a in e)"values"===a&&"object"==typeof e.values||(ro(a)||!0===n&&no(a)||!t&&!no(a)||e.draggable&&a.startsWith("onDrag"))&&(r[a]=e[a]);return r}(t,"string"==typeof e,i),c=e!==f.Fragment?{...l,...o,ref:n}:{},{children:u}=t,d=f.useMemo(()=>vr(u)?u.get():u,[u]);return f.createElement(e,{...c,children:d})}function vo(e,t,n,r){const a={},i=r(e,{});for(const f in i)a[f]=os(i[f]);let{initial:s,animate:o}=e;const l=Na(e),c=Ta(e);t&&c&&!l&&!1!==e.inherit&&(void 0===s&&(s=t.initial),void 0===o&&(o=t.animate));let u=!!n&&!1===n.initial;u=u||!1===s;const d=u?o:s;if(d&&"boolean"!=typeof d&&!ka(d)){const t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){const r=ur(e,t[n]);if(r){const{transitionEnd:e,transition:t,...n}=r;for(const r in n){let e=n[r];if(Array.isArray(e)){e=e[u?e.length-1:0]}null!==e&&(a[r]=e)}for(const r in e)a[r]=e[r]}}}return a}const xo=e=>(t,n)=>{const r=f.useContext(io),a=f.useContext(H),i=()=>function({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,a){return{latestValues:vo(n,r,a,e),renderState:t()}}(e,t,r,a);return n?i():I(i)},bo=xo({scrapeMotionValuesFromProps:li,createRenderState:lo}),wo=xo({scrapeMotionValuesFromProps:gi,createRenderState:ho}),ko=Symbol.for("motionComponentSymbol");function So(e,t,n){const r=f.useRef(n);f.useInsertionEffect(()=>{r.current=n});const a=f.useRef(null);return f.useCallback(n=>{n&&e.onMount?.(n),t&&(n?t.mount(n):t.unmount());const i=r.current;if("function"==typeof i)if(n){const e=i(n);"function"==typeof e&&(a.current=e)}else a.current?(a.current(),a.current=null):i(n);else i&&(i.current=n)},[t])}const jo=f.createContext({});function Co(e){return e&&"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}function No(e,t,n,r,a,i){const{visualElement:s}=f.useContext(io),o=f.useContext(Gs),l=f.useContext(H),c=f.useContext(Is),u=c.reducedMotion,d=c.skipAnimations,h=f.useRef(null),p=f.useRef(!1);r=r||o.renderer,!h.current&&r&&(h.current=r(e,{visualState:t,parent:s,props:n,presenceContext:l,blockInitialAnimation:!!l&&!1===l.initial,reducedMotionConfig:u,skipAnimations:d,isSVG:i}),p.current&&h.current&&(h.current.manuallyAnimateOnMount=!0));const m=h.current,g=f.useContext(jo);!m||m.projection||!a||"html"!==m.type&&"svg"!==m.type||function(e,t,n,r){const{layoutId:a,layout:i,drag:s,dragConstraints:o,layoutScroll:l,layoutRoot:c,layoutCrossfade:u}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:To(e.parent)),e.projection.setOptions({layoutId:a,layout:i,alwaysMeasureLayout:Boolean(s)||o&&Co(o),visualElement:e,animationType:"string"==typeof i?i:"both",initialPromotionConfig:r,crossfade:u,layoutScroll:l,layoutRoot:c})}(h.current,n,a,g);const y=f.useRef(!1);f.useInsertionEffect(()=>{m&&y.current&&m.update(n,l)});const v=n[wr],x=f.useRef(Boolean(v)&&!window.MotionHandoffIsComplete?.(v)&&window.MotionHasOptimisedAnimation?.(v));return B(()=>{p.current=!0,m&&(y.current=!0,window.MotionIsMounted=!0,m.updateFeatures(),m.scheduleRenderMicrotask(),x.current&&m.animationState&&m.animationState.animateChanges())}),f.useEffect(()=>{m&&(!x.current&&m.animationState&&m.animationState.animateChanges(),x.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(v)}),x.current=!1),m.enteringChildren=void 0)}),m}function To(e){if(e)return!1!==e.options.allowProjection?e.projection:To(e.parent)}function Eo(e,{forwardMotionProps:t=!1,type:n}={},r,a){r&&function(e){const t=eo();for(const n in e)t[n]={...t[n],...e[n]};Aa(t)}(r);const i=n?"svg"===n:go(e),s=i?wo:bo;function l(n,r){let l;const c={...f.useContext(Is),...n,layoutId:Mo(n)},{isStatic:u}=c,d=so(n),h=s(n,u);if(!u&&$){f.useContext(Gs).strict;const t=function(e){const t=eo(),{drag:n,layout:r}=t;if(!n&&!r)return{};const a={...n,...r};return{MeasureLayout:n?.isEnabled(e)||r?.isEnabled(e)?a.MeasureLayout:void 0,ProjectionNode:a.ProjectionNode}}(c);l=t.MeasureLayout,d.visualElement=No(e,h,c,a,t.ProjectionNode,i)}return o.jsxs(io.Provider,{value:d,children:[l&&d.visualElement?o.jsx(l,{visualElement:d.visualElement,...c}):null,yo(e,n,So(h,d.visualElement,r),h,u,t,i)]})}l.displayName=\`motion.\${"string"==typeof e?e:\`create(\${e.displayName??e.name??""})\`}\`;const c=f.forwardRef(l);return c[ko]=e,c}function Mo({layoutId:e}){const t=f.useContext(O).id;return t&&void 0!==e?t+"-"+e:e}function Po(e,t){if("undefined"==typeof Proxy)return Eo;const n=new Map,r=(n,r)=>Eo(n,r,e,t);return new Proxy((e,t)=>r(e,t),{get:(a,i)=>"create"===i?r:(n.has(i)||n.set(i,Eo(i,void 0,e,t)),n.get(i))})}const Lo=(e,t)=>t.isSVG??go(e)?new yi(t):new ci(t,{allowProjection:e!==f.Fragment});let Do=0;const Ao={animation:{Feature:class extends Ra{constructor(e){super(e),e.animationState||(e.animationState=ji(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();ka(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}},exit:{Feature:class extends Ra{constructor(){super(...arguments),this.id=Do++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;const r=this.node.animationState.setActive("exit",!e);t&&!e&&r.then(()=>{t(this.id)})}mount(){const{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}}}};function _o(e){return{point:{x:e.pageX,y:e.pageY}}}function zo(e,t,n,r){return as(e,t,(e=>t=>Gr(t)&&e(t,_o(t)))(n),r)}const Ro=({current:e})=>e?e.ownerDocument.defaultView:null,Fo=(e,t)=>Math.abs(e-t);const Vo=new Set(["auto","scroll"]);class Oo{constructor(e,t,{transformPagePoint:n,contextWindow:r=window,dragSnapToOrigin:a=!1,distanceThreshold:i=3,element:s}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=e=>{this.handleScroll(e.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;const e=Bo(this.lastMoveEventInfo,this.history),t=null!==this.startEvent,n=function(e,t){const n=Fo(e.x,t.x),r=Fo(e.y,t.y);return Math.sqrt(n**2+r**2)}(e.offset,{x:0,y:0})>=this.distanceThreshold;if(!t&&!n)return;const{point:r}=e,{timestamp:a}=Te;this.history.push({...r,timestamp:a});const{onStart:i,onMove:s}=this.handlers;t||(i&&i(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),s&&s(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastMoveEventInfo=Io(t,this.transformPagePoint),Ce.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();const{onEnd:n,onSessionEnd:r,resumeAnimation:a}=this.handlers;if(!this.dragSnapToOrigin&&this.startEvent||a&&a(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const i=Bo("pointercancel"===e.type?this.lastMoveEventInfo:Io(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,i),r&&r(e,i)},!Gr(e))return;this.dragSnapToOrigin=a,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=i,this.contextWindow=r||window;const o=Io(_o(e),this.transformPagePoint),{point:l}=o,{timestamp:c}=Te;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=t;u&&u(e,Bo(o,this.history)),this.removeListeners=ee(zo(this.contextWindow,"pointermove",this.handlePointerMove),zo(this.contextWindow,"pointerup",this.handlePointerUp),zo(this.contextWindow,"pointercancel",this.handlePointerUp)),s&&this.startScrollTracking(s)}startScrollTracking(e){let t=e.parentElement;for(;t;){const e=getComputedStyle(t);(Vo.has(e.overflowX)||Vo.has(e.overflowY))&&this.scrollPositions.set(t,{x:t.scrollLeft,y:t.scrollTop}),t=t.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0,passive:!0}),window.addEventListener("scroll",this.onWindowScroll,{passive:!0}),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(e){const t=this.scrollPositions.get(e);if(!t)return;const n=e===window,r=n?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},a=r.x-t.x,i=r.y-t.y;0===a&&0===i||(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=a,this.lastMoveEventInfo.point.y+=i):this.history.length>0&&(this.history[0].x-=a,this.history[0].y-=i),this.scrollPositions.set(e,r),Ce.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Ne(this.updatePoint)}}function Io(e,t){return t?{point:t(e.point)}:e}function $o(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Bo({point:e},t){return{point:e,delta:$o(e,Uo(t)),offset:$o(e,Ho(t)),velocity:Wo(t,.1)}}function Ho(e){return e[0]}function Uo(e){return e[e.length-1]}function Wo(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const a=Uo(e);for(;n>=0&&(r=e[n],!(a.timestamp-r.timestamp>re(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&a.timestamp-r.timestamp>2*re(t)&&(r=e[1]);const i=ae(a.timestamp-r.timestamp);if(0===i)return{x:0,y:0};const s={x:(a.x-r.x)/i,y:(a.y-r.y)/i};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}function qo(e,t,n){return{min:void 0!==t?e.min+t:void 0,max:void 0!==n?e.max+n-(e.max-e.min):void 0}}function Yo(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}const Ko=.35;function Qo(e,t,n){return{min:Xo(e,t),max:Xo(e,n)}}function Xo(e,t){return"number"==typeof e?e:e[t]||0}const Go=new WeakMap;class Zo{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic={x:{min:0,max:0},y:{min:0,max:0}},this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:t=!1,distanceThreshold:n}={}){const{presenceContext:r}=this.visualElement;if(r&&!1===r.isPresent)return;const{dragSnapToOrigin:a}=this.getProps();this.panSession=new Oo(e,{onSessionStart:e=>{t&&this.snapToCursor(_o(e).point),this.stopAnimation()},onStart:(e,t)=>{const{drag:n,dragPropagation:r,onDragStart:a}=this.getProps();if(n&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock="x"===(i=n)||"y"===i?qr[i]?null:(qr[i]=!0,()=>{qr[i]=!1}):qr.x||qr.y?null:(qr.x=qr.y=!0,()=>{qr.x=qr.y=!1}),!this.openDragLock))return;var i;this.latestPointerEvent=e,this.latestPanInfo=t,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Qi(e=>{let t=this.getAxisMotionValue(e).get()||0;if(Ge.test(t)){const{projection:n}=this.visualElement;if(n&&n.layout){const r=n.layout.layoutBox[e];if(r){t=Li(r)*(parseFloat(t)/100)}}}this.originPoint[e]=t}),a&&Ce.update(()=>a(e,t),!1,!0),xr(this.visualElement,"transform");const{animationState:s}=this.visualElement;s&&s.setActive("whileDrag",!0)},onMove:(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t;const{dragPropagation:n,dragDirectionLock:r,onDirectionLock:a,onDrag:i}=this.getProps();if(!n&&!this.openDragLock)return;const{offset:s}=t;if(r&&null===this.currentDirection)return this.currentDirection=function(e,t=10){let n=null;Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x");return n}(s),void(null!==this.currentDirection&&a&&a(this.currentDirection));this.updateAxis("x",t.point,s),this.updateAxis("y",t.point,s),this.visualElement.render(),i&&Ce.update(()=>i(e,t),!1,!0)},onSessionEnd:(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t,this.stop(e,t),this.latestPointerEvent=null,this.latestPanInfo=null},resumeAnimation:()=>{const{dragSnapToOrigin:e}=this.getProps();(e||this.constraints)&&this.startAnimation({x:0,y:0})}},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:a,distanceThreshold:n,contextWindow:Ro(this.visualElement),element:this.visualElement.current})}stop(e,t){const n=e||this.latestPointerEvent,r=t||this.latestPanInfo,a=this.isDragging;if(this.cancel(),!a||!r||!n)return;const{velocity:i}=r;this.startAnimation(i);const{onDragEnd:s}=this.getProps();s&&Ce.postRender(()=>s(n,r))}cancel(){this.isDragging=!1;const{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,t,n){const{drag:r}=this.getProps();if(!n||!el(e,r,this.currentDirection))return;const a=this.getAxisMotionValue(e);let i=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(i=function(e,{min:t,max:n},r){return void 0!==t&&e<t?e=r?mt(t,e,r.min):Math.max(e,t):void 0!==n&&e>n&&(e=r?mt(n,e,r.max):Math.min(e,n)),e}(i,this.constraints[e],this.elastic[e])),a.set(i)}resolveConstraints(){const{dragConstraints:e,dragElastic:t}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,r=this.constraints;e&&Co(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!e||!n)&&function(e,{top:t,left:n,bottom:r,right:a}){return{x:qo(e.x,n,a),y:qo(e.y,t,r)}}(n.layoutBox,e),this.elastic=function(e=Ko){return!1===e?e=0:!0===e&&(e=Ko),{x:Qo(e,"left","right"),y:Qo(e,"top","bottom")}}(t),r!==this.constraints&&!Co(e)&&n&&this.constraints&&!this.hasMutatedConstraints&&Qi(e=>{!1!==this.constraints&&this.getAxisMotionValue(e)&&(this.constraints[e]=function(e,t){const n={};return void 0!==t.min&&(n.min=t.min-e.min),void 0!==t.max&&(n.max=t.max-e.min),n}(n.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!Co(e))return!1;const n=e.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const a=function(e,t,n){const r=Za(e,n),{scroll:a}=t;return a&&(Qa(r.x,a.offset.x),Qa(r.y,a.offset.y)),r}(n,r.root,this.visualElement.getTransformPagePoint());let i=function(e,t){return{x:Yo(e.x,t.x),y:Yo(e.y,t.y)}}(r.layout.layoutBox,a);if(t){const e=t(function({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}(i));this.hasMutatedConstraints=!!e,e&&(i=Fa(e))}return i}startAnimation(e){const{drag:t,dragMomentum:n,dragElastic:r,dragTransition:a,dragSnapToOrigin:i,onDragTransitionEnd:s}=this.getProps(),o=this.constraints||{},l=Qi(s=>{if(!el(s,t,this.currentDirection))return;let l=o&&o[s]||{};i&&(l={min:0,max:0});const c=r?200:1e6,u=r?40:1e7,d={type:"inertia",velocity:n?e[s]:0,bounceStiffness:c,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...a,...l};return this.startAxisValueAnimation(s,d)});return Promise.all(l).then(s)}startAxisValueAnimation(e,t){const n=this.getAxisMotionValue(e);return xr(this.visualElement,e),n.start(lr(e,n,0,t,this.visualElement,!1))}stopAnimation(){Qi(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){const t=\`_drag\${e.toUpperCase()}\`,n=this.visualElement.getProps(),r=n[t];return r||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){Qi(t=>{const{drag:n}=this.getProps();if(!el(t,n,this.currentDirection))return;const{projection:r}=this.visualElement,a=this.getAxisMotionValue(t);if(r&&r.layout){const{min:n,max:i}=r.layout.layoutBox[t],s=a.get()||0;a.set(e[t]-mt(n,i,.5)+s)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!Co(t)||!n||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};Qi(e=>{const t=this.getAxisMotionValue(e);if(t&&!1!==this.constraints){const n=t.get();r[e]=function(e,t){let n=.5;const r=Li(e),a=Li(t);return a>r?n=te(t.min,t.max-r,e.min):r>a&&(n=te(e.min,e.max-a,t.min)),q(0,1,n)}({min:n,max:n},this.constraints[e])}});const{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.constraints=!1,this.resolveConstraints(),Qi(t=>{if(!el(t,e,null))return;const n=this.getAxisMotionValue(t),{min:a,max:i}=this.constraints[t];n.set(mt(a,i,r[t]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;Go.set(this.visualElement,this);const e=this.visualElement.current,t=zo(e,"pointerdown",t=>{const{drag:n,dragListener:r=!0}=this.getProps(),a=t.target,i=a!==e&&function(e){return Jr.has(e.tagName)||!0===e.isContentEditable}(a);n&&r&&!i&&this.start(t)});let n;const r=()=>{const{dragConstraints:t}=this.getProps();Co(t)&&t.current&&(this.constraints=this.resolveRefConstraints(),n||(n=function(e,t,n){const r=va(e,Jo(n)),a=va(t,Jo(n));return()=>{r(),a()}}(e,t.current,()=>this.scalePositionWithinConstraints())))},{projection:a}=this.visualElement,i=a.addEventListener("measure",r);a&&!a.layout&&(a.root&&a.root.updateScroll(),a.updateLayout()),Ce.read(r);const s=as(window,"resize",()=>this.scalePositionWithinConstraints()),o=a.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(Qi(t=>{const n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))}),this.visualElement.render())});return()=>{s(),t(),i(),o&&o(),n&&n()}}getProps(){const e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:a=!1,dragElastic:i=Ko,dragMomentum:s=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:a,dragElastic:i,dragMomentum:s}}}function Jo(e){let t=!0;return()=>{t?t=!1:e()}}function el(e,t,n){return!(!0!==t&&t!==e||null!==n&&n!==e)}const tl=e=>(t,n)=>{e&&Ce.update(()=>e(t,n),!1,!0)};let nl=!1;class rl extends f.Component{componentDidMount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:a}=e;a&&(t.group&&t.group.add(a),n&&n.register&&r&&n.register(a),nl&&a.root.didUpdate(),a.addEventListener("animationComplete",()=>{this.safeToRemove()}),a.setOptions({...a.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),cs.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:t,visualElement:n,drag:r,isPresent:a}=this.props,{projection:i}=n;return i?(i.isPresent=a,e.layoutDependency!==t&&i.setOptions({...i.options,layoutDependency:t}),nl=!0,r||e.layoutDependency!==t||void 0===t||e.isPresent!==a?i.willUpdate():this.safeToRemove(),e.isPresent!==a&&(a?i.promote():i.relegate()||Ce.postRender(()=>{const e=i.getStack();e&&e.members.length||this.safeToRemove()})),null):null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),Wr.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;nl=!0,r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function al(e){const[t,n]=Ys(),r=f.useContext(O);return o.jsx(rl,{...e,layoutGroup:r,switchLayoutGroup:f.useContext(jo),isPresent:t,safeToRemove:n})}const il={pan:{Feature:class extends Ra{constructor(){super(...arguments),this.removePointerDownListener=Z}onPointerDown(e){this.session=new Oo(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Ro(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:tl(e),onStart:tl(t),onMove:tl(n),onEnd:(e,t)=>{delete this.session,r&&Ce.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=zo(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends Ra{constructor(e){super(e),this.removeGroupControls=Z,this.removeListeners=Z,this.controls=new Zo(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Z}update(){const{dragControls:e}=this.node.getProps(),{dragControls:t}=this.node.prevProps||{};e!==t&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}},ProjectionNode:Os,MeasureLayout:al}};function sl(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover","Start"===n);const a=r["onHover"+n];a&&Ce.postRender(()=>a(t,_o(t)))}function ol(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap","Start"===n);const a=r["onTap"+("End"===n?"":n)];a&&Ce.postRender(()=>a(t,_o(t)))}const ll=new WeakMap,cl=new WeakMap,ul=e=>{const t=ll.get(e.target);t&&t(e)},dl=e=>{e.forEach(ul)};function fl(e,t,n){const r=function({root:e,...t}){const n=e||document;cl.has(n)||cl.set(n,{});const r=cl.get(n),a=JSON.stringify(t);return r[a]||(r[a]=new IntersectionObserver(dl,{root:e,...t})),r[a]}(t);return ll.set(e,n),r.observe(e),()=>{ll.delete(e),r.unobserve(e)}}const hl={some:0,all:1};const pl=Po({...Ao,...{inView:{Feature:class extends Ra{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r="some",once:a}=e,i={root:t?t.current:void 0,rootMargin:n,threshold:"number"==typeof r?r:hl[r]};return fl(this.node.current,i,e=>{const{isIntersecting:t}=e;if(this.isInView===t)return;if(this.isInView=t,a&&!t&&this.hasEnteredView)return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",t);const{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),i=t?n:r;i&&i(e)})}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:e,prevProps:t}=this.node;["amount","margin","root"].some(function({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}(e,t))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends Ra{mount(){const{current:e}=this.node;if(!e)return;const{globalTapTarget:t,propagate:n}=this.node.props;this.unmount=ia(e,(e,t)=>(ol(this.node,t,"Start"),(e,{success:t})=>ol(this.node,e,t?"End":"Cancel")),{useGlobalTarget:t,stopPropagation:!1===n?.tap})}unmount(){}}},focus:{Feature:class extends Ra{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch(t){e=!0}e&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=ee(as(this.node.current,"focus",()=>this.onFocus()),as(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}},hover:{Feature:class extends Ra{mount(){const{current:e}=this.node;e&&(this.unmount=Qr(e,(e,t)=>(sl(this.node,t,"Start"),e=>sl(this.node,e,"End"))))}unmount(){}}}},...il,...{layout:{ProjectionNode:Os,MeasureLayout:al}}},Lo),ml=(...e)=>e.filter((e,t,n)=>Boolean(e)&&""!==e.trim()&&n.indexOf(e)===t).join(" ").trim();
34793
+ */function M(){if(S)return y;S=1;var e=b(),t=d(),n=E();function r(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function a(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function s(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{!!(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function i(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function o(e){if(31===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function l(e){if(s(e)!==e)throw Error(r(188))}function c(e){var t=e.tag;if(5===t||26===t||27===t||6===t)return e;for(e=e.child;null!==e;){if(null!==(t=c(e)))return t;e=e.sibling}return null}var u=Object.assign,h=Symbol.for("react.element"),f=Symbol.for("react.transitional.element"),p=Symbol.for("react.portal"),m=Symbol.for("react.fragment"),g=Symbol.for("react.strict_mode"),v=Symbol.for("react.profiler"),x=Symbol.for("react.consumer"),w=Symbol.for("react.context"),k=Symbol.for("react.forward_ref"),j=Symbol.for("react.suspense"),C=Symbol.for("react.suspense_list"),N=Symbol.for("react.memo"),T=Symbol.for("react.lazy"),M=Symbol.for("react.activity"),P=Symbol.for("react.memo_cache_sentinel"),L=Symbol.iterator;function D(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=L&&e[L]||e["@@iterator"])?e:null}var A=Symbol.for("react.client.reference");function _(e){if(null==e)return null;if("function"==typeof e)return e.$$typeof===A?null:e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case m:return"Fragment";case v:return"Profiler";case g:return"StrictMode";case j:return"Suspense";case C:return"SuspenseList";case M:return"Activity"}if("object"==typeof e)switch(e.$$typeof){case p:return"Portal";case w:return e.displayName||"Context";case x:return(e._context.displayName||"Context")+".Consumer";case k:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case N:return null!==(t=e.displayName||null)?t:_(e.type)||"Memo";case T:t=e._payload,e=e._init;try{return _(e(t))}catch(n){}}return null}var z=Array.isArray,R=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,V={pending:!1,data:null,method:null,action:null},I=[],O=-1;function $(e){return{current:e}}function B(e){0>O||(e.current=I[O],I[O]=null,O--)}function H(e,t){O++,I[O]=e.current,e.current=t}var U,W,q=$(null),Y=$(null),K=$(null),Q=$(null);function X(e,t){switch(H(K,t),H(Y,e),H(q,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?xd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)e=bd(t=xd(t),e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}B(q),H(q,e)}function Z(){B(q),B(Y),B(K)}function G(e){null!==e.memoizedState&&H(Q,e);var t=q.current,n=bd(t,e.type);t!==n&&(H(Y,e),H(q,n))}function J(e){Y.current===e&&(B(q),B(Y)),Q.current===e&&(B(Q),hh._currentValue=V)}function ee(e){if(void 0===U)try{throw Error()}catch(n){var t=n.stack.trim().match(/\\n( *(at )?)/);U=t&&t[1]||"",W=-1<n.stack.indexOf("\\n at")?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return"\\n"+U+e+W}var te=!1;function ne(e,t){if(!e||te)return"";te=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(n,[])}catch(a){var r=a}Reflect.construct(e,[],n)}else{try{n.call()}catch(s){r=s}e.call(n.prototype)}}else{try{throw Error()}catch(i){r=i}(n=e())&&"function"==typeof n.catch&&n.catch(function(){})}}catch(o){if(o&&r&&"string"==typeof o.stack)return[o.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var a=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,"name");a&&a.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var s=r.DetermineComponentFrameRoot(),i=s[0],o=s[1];if(i&&o){var l=i.split("\\n"),c=o.split("\\n");for(a=r=0;r<l.length&&!l[r].includes("DetermineComponentFrameRoot");)r++;for(;a<c.length&&!c[a].includes("DetermineComponentFrameRoot");)a++;if(r===l.length||a===c.length)for(r=l.length-1,a=c.length-1;1<=r&&0<=a&&l[r]!==c[a];)a--;for(;1<=r&&0<=a;r--,a--)if(l[r]!==c[a]){if(1!==r||1!==a)do{if(r--,0>--a||l[r]!==c[a]){var u="\\n"+l[r].replace(" at new "," at ");return e.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",e.displayName)),u}}while(1<=r&&0<=a);break}}}finally{te=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?ee(n):""}function re(e,t){switch(e.tag){case 26:case 27:case 5:return ee(e.type);case 16:return ee("Lazy");case 13:return e.child!==t&&null!==t?ee("Suspense Fallback"):ee("Suspense");case 19:return ee("SuspenseList");case 0:case 15:return ne(e.type,!1);case 11:return ne(e.type.render,!1);case 1:return ne(e.type,!0);case 31:return ee("Activity");default:return""}}function ae(e){try{var t="",n=null;do{t+=re(e,n),n=e,e=e.return}while(e);return t}catch(r){return"\\nError generating stack: "+r.message+"\\n"+r.stack}}var se=Object.prototype.hasOwnProperty,ie=e.unstable_scheduleCallback,oe=e.unstable_cancelCallback,le=e.unstable_shouldYield,ce=e.unstable_requestPaint,ue=e.unstable_now,de=e.unstable_getCurrentPriorityLevel,he=e.unstable_ImmediatePriority,fe=e.unstable_UserBlockingPriority,pe=e.unstable_NormalPriority,me=e.unstable_LowPriority,ge=e.unstable_IdlePriority,ye=e.log,ve=e.unstable_setDisableYieldValue,xe=null,be=null;function we(e){if("function"==typeof ye&&ve(e),be&&"function"==typeof be.setStrictMode)try{be.setStrictMode(xe,e)}catch(t){}}var ke=Math.clz32?Math.clz32:function(e){return 0===(e>>>=0)?32:31-(Se(e)/je|0)|0},Se=Math.log,je=Math.LN2;var Ce=256,Ne=262144,Te=4194304;function Ee(e){var t=42&e;if(0!==t)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return 261888&e;case 262144:case 524288:case 1048576:case 2097152:return 3932160&e;case 4194304:case 8388608:case 16777216:case 33554432:return 62914560&e;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Me(e,t,n){var r=e.pendingLanes;if(0===r)return 0;var a=0,s=e.suspendedLanes,i=e.pingedLanes;e=e.warmLanes;var o=134217727&r;return 0!==o?0!==(r=o&~s)?a=Ee(r):0!==(i&=o)?a=Ee(i):n||0!==(n=o&~e)&&(a=Ee(n)):0!==(o=r&~s)?a=Ee(o):0!==i?a=Ee(i):n||0!==(n=r&~e)&&(a=Ee(n)),0===a?0:0!==t&&t!==a&&0===(t&s)&&((s=a&-a)>=(n=t&-t)||32===s&&4194048&n)?t:a}function Pe(e,t){return 0===(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)}function Le(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;default:return-1}}function De(){var e=Te;return!(62914560&(Te<<=1))&&(Te=4194304),e}function Ae(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function _e(e,t){e.pendingLanes|=t,268435456!==t&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function ze(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-ke(t);e.entangledLanes|=t,e.entanglements[r]=1073741824|e.entanglements[r]|261930&n}function Re(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-ke(n),a=1<<r;a&t|e[r]&t&&(e[r]|=t),n&=~a}}function Fe(e,t){var n=t&-t;return 0!==((n=42&n?1:Ve(n))&(e.suspendedLanes|t))?0:n}function Ve(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Ie(e){return 2<(e&=-e)?8<e?134217727&e?32:268435456:8:2}function Oe(){var e=F.p;return 0!==e?e:void 0===(e=window.event)?32:Eh(e.type)}function $e(e,t){var n=F.p;try{return F.p=e,t()}finally{F.p=n}}var Be=Math.random().toString(36).slice(2),He="__reactFiber$"+Be,Ue="__reactProps$"+Be,We="__reactContainer$"+Be,qe="__reactEvents$"+Be,Ye="__reactListeners$"+Be,Ke="__reactHandles$"+Be,Qe="__reactResources$"+Be,Xe="__reactMarker$"+Be;function Ze(e){delete e[He],delete e[Ue],delete e[qe],delete e[Ye],delete e[Ke]}function Ge(e){var t=e[He];if(t)return t;for(var n=e.parentNode;n;){if(t=n[We]||n[He]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=Vd(e);null!==e;){if(n=e[He])return n;e=Vd(e)}return t}n=(e=n).parentNode}return null}function Je(e){if(e=e[He]||e[We]){var t=e.tag;if(5===t||6===t||13===t||31===t||26===t||27===t||3===t)return e}return null}function et(e){var t=e.tag;if(5===t||26===t||27===t||6===t)return e.stateNode;throw Error(r(33))}function tt(e){var t=e[Qe];return t||(t=e[Qe]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function nt(e){e[Xe]=!0}var rt=new Set,at={};function st(e,t){it(e,t),it(e+"Capture",t)}function it(e,t){for(at[e]=t,e=0;e<t.length;e++)rt.add(t[e])}var ot=RegExp("^[:A-Z_a-z\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD][:A-Z_a-z\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD\\\\-.0-9\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040]*$"),lt={},ct={};function ut(e,t,n){if(a=t,se.call(ct,a)||!se.call(lt,a)&&(ot.test(a)?ct[a]=!0:(lt[a]=!0,0)))if(null===n)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":return void e.removeAttribute(t);case"boolean":var r=t.toLowerCase().slice(0,5);if("data-"!==r&&"aria-"!==r)return void e.removeAttribute(t)}e.setAttribute(t,""+n)}var a}function dt(e,t,n){if(null===n)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":return void e.removeAttribute(t)}e.setAttribute(t,""+n)}}function ht(e,t,n,r){if(null===r)e.removeAttribute(n);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":return void e.removeAttribute(n)}e.setAttributeNS(t,n,""+r)}}function ft(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function pt(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function mt(e){if(!e._valueTracker){var t=pt(e)?"checked":"value";e._valueTracker=function(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&void 0!==r&&"function"==typeof r.get&&"function"==typeof r.set){var a=r.get,s=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return a.call(this)},set:function(e){n=""+e,s.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e,t,""+e[t])}}function gt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=pt(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function yt(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}var vt=/[\\n"\\\\]/g;function xt(e){return e.replace(vt,function(e){return"\\\\"+e.charCodeAt(0).toString(16)+" "})}function bt(e,t,n,r,a,s,i,o){e.name="",null!=i&&"function"!=typeof i&&"symbol"!=typeof i&&"boolean"!=typeof i?e.type=i:e.removeAttribute("type"),null!=t?"number"===i?(0===t&&""===e.value||e.value!=t)&&(e.value=""+ft(t)):e.value!==""+ft(t)&&(e.value=""+ft(t)):"submit"!==i&&"reset"!==i||e.removeAttribute("value"),null!=t?kt(e,i,ft(t)):null!=n?kt(e,i,ft(n)):null!=r&&e.removeAttribute("value"),null==a&&null!=s&&(e.defaultChecked=!!s),null!=a&&(e.checked=a&&"function"!=typeof a&&"symbol"!=typeof a),null!=o&&"function"!=typeof o&&"symbol"!=typeof o&&"boolean"!=typeof o?e.name=""+ft(o):e.removeAttribute("name")}function wt(e,t,n,r,a,s,i,o){if(null!=s&&"function"!=typeof s&&"symbol"!=typeof s&&"boolean"!=typeof s&&(e.type=s),null!=t||null!=n){if(("submit"===s||"reset"===s)&&null==t)return void mt(e);n=null!=n?""+ft(n):"",t=null!=t?""+ft(t):n,o||t===e.value||(e.value=t),e.defaultValue=t}r="function"!=typeof(r=null!=r?r:a)&&"symbol"!=typeof r&&!!r,e.checked=o?e.checked:!!r,e.defaultChecked=!!r,null!=i&&"function"!=typeof i&&"symbol"!=typeof i&&"boolean"!=typeof i&&(e.name=i),mt(e)}function kt(e,t,n){"number"===t&&yt(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function St(e,t,n,r){if(e=e.options,t){t={};for(var a=0;a<n.length;a++)t["$"+n[a]]=!0;for(n=0;n<e.length;n++)a=t.hasOwnProperty("$"+e[n].value),e[n].selected!==a&&(e[n].selected=a),a&&r&&(e[n].defaultSelected=!0)}else{for(n=""+ft(n),t=null,a=0;a<e.length;a++){if(e[a].value===n)return e[a].selected=!0,void(r&&(e[a].defaultSelected=!0));null!==t||e[a].disabled||(t=e[a])}null!==t&&(t.selected=!0)}}function jt(e,t,n){null==t||((t=""+ft(t))!==e.value&&(e.value=t),null!=n)?e.defaultValue=null!=n?""+ft(n):"":e.defaultValue!==t&&(e.defaultValue=t)}function Ct(e,t,n,a){if(null==t){if(null!=a){if(null!=n)throw Error(r(92));if(z(a)){if(1<a.length)throw Error(r(93));a=a[0]}n=a}null==n&&(n=""),t=n}n=ft(t),e.defaultValue=n,(a=e.textContent)===n&&""!==a&&null!==a&&(e.value=a),mt(e)}function Nt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var Tt=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Et(e,t,n){var r=0===t.indexOf("--");null==n||"boolean"==typeof n||""===n?r?e.setProperty(t,""):"float"===t?e.cssFloat="":e[t]="":r?e.setProperty(t,n):"number"!=typeof n||0===n||Tt.has(t)?"float"===t?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function Mt(e,t,n){if(null!=t&&"object"!=typeof t)throw Error(r(62));if(e=e.style,null!=n){for(var a in n)!n.hasOwnProperty(a)||null!=t&&t.hasOwnProperty(a)||(0===a.indexOf("--")?e.setProperty(a,""):"float"===a?e.cssFloat="":e[a]="");for(var s in t)a=t[s],t.hasOwnProperty(s)&&n[s]!==a&&Et(e,s,a)}else for(var i in t)t.hasOwnProperty(i)&&Et(e,i,t[i])}function Pt(e){if(-1===e.indexOf("-"))return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Lt=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Dt=/^[\\u0000-\\u001F ]*j[\\r\\n\\t]*a[\\r\\n\\t]*v[\\r\\n\\t]*a[\\r\\n\\t]*s[\\r\\n\\t]*c[\\r\\n\\t]*r[\\r\\n\\t]*i[\\r\\n\\t]*p[\\r\\n\\t]*t[\\r\\n\\t]*:/i;function At(e){return Dt.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function _t(){}var zt=null;function Rt(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Ft=null,Vt=null;function It(e){var t=Je(e);if(t&&(e=t.stateNode)){var n=e[Ue]||null;e:switch(e=t.stateNode,t.type){case"input":if(bt(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+xt(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var a=n[t];if(a!==e&&a.form===e.form){var s=a[Ue]||null;if(!s)throw Error(r(90));bt(a,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name)}}for(t=0;t<n.length;t++)(a=n[t]).form===e.form&&gt(a)}break e;case"textarea":jt(e,n.value,n.defaultValue);break e;case"select":null!=(t=n.value)&&St(e,!!n.multiple,t,!1)}}}var Ot=!1;function $t(e,t,n){if(Ot)return e(t,n);Ot=!0;try{return e(t)}finally{if(Ot=!1,(null!==Ft||null!==Vt)&&(tu(),Ft&&(t=Ft,e=Vt,Vt=Ft=null,It(t),e)))for(t=0;t<e.length;t++)It(e[t])}}function Bt(e,t){var n=e.stateNode;if(null===n)return null;var a=n[Ue]||null;if(null===a)return null;n=a[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(a=!a.disabled)||(a=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!a;break e;default:e=!1}if(e)return null;if(n&&"function"!=typeof n)throw Error(r(231,t,typeof n));return n}var Ht=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),Ut=!1;if(Ht)try{var Wt={};Object.defineProperty(Wt,"passive",{get:function(){Ut=!0}}),window.addEventListener("test",Wt,Wt),window.removeEventListener("test",Wt,Wt)}catch(Jh){Ut=!1}var qt=null,Yt=null,Kt=null;function Qt(){if(Kt)return Kt;var e,t,n=Yt,r=n.length,a="value"in qt?qt.value:qt.textContent,s=a.length;for(e=0;e<r&&n[e]===a[e];e++);var i=r-e;for(t=1;t<=i&&n[r-t]===a[s-t];t++);return Kt=a.slice(e,1<t?1-t:void 0)}function Xt(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function Zt(){return!0}function Gt(){return!1}function Jt(e){function t(t,n,r,a,s){for(var i in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=a,this.target=s,this.currentTarget=null,e)e.hasOwnProperty(i)&&(t=e[i],this[i]=t?t(a):a[i]);return this.isDefaultPrevented=(null!=a.defaultPrevented?a.defaultPrevented:!1===a.returnValue)?Zt:Gt,this.isPropagationStopped=Gt,this}return u(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=Zt)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=Zt)},persist:function(){},isPersistent:Zt}),t}var en,tn,nn,rn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},an=Jt(rn),sn=u({},rn,{view:0,detail:0}),on=Jt(sn),ln=u({},sn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:xn,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==nn&&(nn&&"mousemove"===e.type?(en=e.screenX-nn.screenX,tn=e.screenY-nn.screenY):tn=en=0,nn=e),en)},movementY:function(e){return"movementY"in e?e.movementY:tn}}),cn=Jt(ln),un=Jt(u({},ln,{dataTransfer:0})),dn=Jt(u({},sn,{relatedTarget:0})),hn=Jt(u({},rn,{animationName:0,elapsedTime:0,pseudoElement:0})),fn=Jt(u({},rn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}})),pn=Jt(u({},rn,{data:0})),mn={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},gn={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},yn={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function vn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=yn[e])&&!!t[e]}function xn(){return vn}var bn=Jt(u({},sn,{key:function(e){if(e.key){var t=mn[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=Xt(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?gn[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:xn,charCode:function(e){return"keypress"===e.type?Xt(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?Xt(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}})),wn=Jt(u({},ln,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),kn=Jt(u({},sn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:xn})),Sn=Jt(u({},rn,{propertyName:0,elapsedTime:0,pseudoElement:0})),jn=Jt(u({},ln,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),Cn=Jt(u({},rn,{newState:0,oldState:0})),Nn=[9,13,27,32],Tn=Ht&&"CompositionEvent"in window,En=null;Ht&&"documentMode"in document&&(En=document.documentMode);var Mn=Ht&&"TextEvent"in window&&!En,Pn=Ht&&(!Tn||En&&8<En&&11>=En),Ln=String.fromCharCode(32),Dn=!1;function An(e,t){switch(e){case"keyup":return-1!==Nn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function _n(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var zn=!1;var Rn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Fn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Rn[e.type]:"textarea"===t}function Vn(e,t,n,r){Ft?Vt?Vt.push(r):Vt=[r]:Ft=r,0<(t=sd(t,"onChange")).length&&(n=new an("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var In=null,On=null;function $n(e){Zu(e,0)}function Bn(e){if(gt(et(e)))return e}function Hn(e,t){if("change"===e)return t}var Un=!1;if(Ht){var Wn;if(Ht){var qn="oninput"in document;if(!qn){var Yn=document.createElement("div");Yn.setAttribute("oninput","return;"),qn="function"==typeof Yn.oninput}Wn=qn}else Wn=!1;Un=Wn&&(!document.documentMode||9<document.documentMode)}function Kn(){In&&(In.detachEvent("onpropertychange",Qn),On=In=null)}function Qn(e){if("value"===e.propertyName&&Bn(On)){var t=[];Vn(t,On,e,Rt(e)),$t($n,t)}}function Xn(e,t,n){"focusin"===e?(Kn(),On=n,(In=t).attachEvent("onpropertychange",Qn)):"focusout"===e&&Kn()}function Zn(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Bn(On)}function Gn(e,t){if("click"===e)return Bn(t)}function Jn(e,t){if("input"===e||"change"===e)return Bn(t)}var er="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t};function tr(e,t){if(er(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var a=n[r];if(!se.call(t,a)||!er(e[a],t[a]))return!1}return!0}function nr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function rr(e,t){var n,r=nr(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=nr(r)}}function ar(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?ar(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function sr(e){for(var t=yt((e=null!=e&&null!=e.ownerDocument&&null!=e.ownerDocument.defaultView?e.ownerDocument.defaultView:window).document);t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(r){n=!1}if(!n)break;t=yt((e=t.contentWindow).document)}return t}function ir(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var or=Ht&&"documentMode"in document&&11>=document.documentMode,lr=null,cr=null,ur=null,dr=!1;function hr(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;dr||null==lr||lr!==yt(r)||("selectionStart"in(r=lr)&&ir(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},ur&&tr(ur,r)||(ur=r,0<(r=sd(cr,"onSelect")).length&&(t=new an("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=lr)))}function fr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var pr={animationend:fr("Animation","AnimationEnd"),animationiteration:fr("Animation","AnimationIteration"),animationstart:fr("Animation","AnimationStart"),transitionrun:fr("Transition","TransitionRun"),transitionstart:fr("Transition","TransitionStart"),transitioncancel:fr("Transition","TransitionCancel"),transitionend:fr("Transition","TransitionEnd")},mr={},gr={};function yr(e){if(mr[e])return mr[e];if(!pr[e])return e;var t,n=pr[e];for(t in n)if(n.hasOwnProperty(t)&&t in gr)return mr[e]=n[t];return e}Ht&&(gr=document.createElement("div").style,"AnimationEvent"in window||(delete pr.animationend.animation,delete pr.animationiteration.animation,delete pr.animationstart.animation),"TransitionEvent"in window||delete pr.transitionend.transition);var vr=yr("animationend"),xr=yr("animationiteration"),br=yr("animationstart"),wr=yr("transitionrun"),kr=yr("transitionstart"),Sr=yr("transitioncancel"),jr=yr("transitionend"),Cr=new Map,Nr="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Tr(e,t){Cr.set(e,t),st(t,[e])}Nr.push("scrollEnd");var Er="function"==typeof reportError?reportError:function(e){if("object"==typeof window&&"function"==typeof window.ErrorEvent){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:"object"==typeof e&&null!==e&&"string"==typeof e.message?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if("object"==typeof process&&"function"==typeof process.emit)return void process.emit("uncaughtException",e);console.error(e)},Mr=[],Pr=0,Lr=0;function Dr(){for(var e=Pr,t=Lr=Pr=0;t<e;){var n=Mr[t];Mr[t++]=null;var r=Mr[t];Mr[t++]=null;var a=Mr[t];Mr[t++]=null;var s=Mr[t];if(Mr[t++]=null,null!==r&&null!==a){var i=r.pending;null===i?a.next=a:(a.next=i.next,i.next=a),r.pending=a}0!==s&&Rr(n,a,s)}}function Ar(e,t,n,r){Mr[Pr++]=e,Mr[Pr++]=t,Mr[Pr++]=n,Mr[Pr++]=r,Lr|=r,e.lanes|=r,null!==(e=e.alternate)&&(e.lanes|=r)}function _r(e,t,n,r){return Ar(e,t,n,r),Fr(e)}function zr(e,t){return Ar(e,null,null,t),Fr(e)}function Rr(e,t,n){e.lanes|=n;var r=e.alternate;null!==r&&(r.lanes|=n);for(var a=!1,s=e.return;null!==s;)s.childLanes|=n,null!==(r=s.alternate)&&(r.childLanes|=n),22===s.tag&&(null===(e=s.stateNode)||1&e._visibility||(a=!0)),e=s,s=s.return;return 3===e.tag?(s=e.stateNode,a&&null!==t&&(a=31-ke(n),null===(r=(e=s.hiddenUpdates)[a])?e[a]=[t]:r.push(t),t.lane=536870912|n),s):null}function Fr(e){if(50<qc)throw qc=0,Yc=null,Error(r(185));for(var t=e.return;null!==t;)t=(e=t).return;return 3===e.tag?e.stateNode:null}var Vr={};function Ir(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Or(e,t,n,r){return new Ir(e,t,n,r)}function $r(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Br(e,t){var n=e.alternate;return null===n?((n=Or(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=65011712&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function Hr(e,t){e.flags&=65011714;var n=e.alternate;return null===n?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Ur(e,t,n,a,s,i){var o=0;if(a=e,"function"==typeof e)$r(e)&&(o=1);else if("string"==typeof e)o=function(e,t,n){if(1===n||null!=t.itemProp)return!1;switch(e){case"meta":case"title":return!0;case"style":if("string"!=typeof t.precedence||"string"!=typeof t.href||""===t.href)break;return!0;case"link":if("string"!=typeof t.rel||"string"!=typeof t.href||""===t.href||t.onLoad||t.onError)break;return"stylesheet"!==t.rel||(e=t.disabled,"string"==typeof t.precedence&&null==e);case"script":if(t.async&&"function"!=typeof t.async&&"symbol"!=typeof t.async&&!t.onLoad&&!t.onError&&t.src&&"string"==typeof t.src)return!0}return!1}(e,n,q.current)?26:"html"===e||"head"===e||"body"===e?27:5;else e:switch(e){case M:return(e=Or(31,n,t,s)).elementType=M,e.lanes=i,e;case m:return Wr(n.children,s,i,t);case g:o=8,s|=24;break;case v:return(e=Or(12,n,t,2|s)).elementType=v,e.lanes=i,e;case j:return(e=Or(13,n,t,s)).elementType=j,e.lanes=i,e;case C:return(e=Or(19,n,t,s)).elementType=C,e.lanes=i,e;default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case w:o=10;break e;case x:o=9;break e;case k:o=11;break e;case N:o=14;break e;case T:o=16,a=null;break e}o=29,n=Error(r(130,null===e?"null":typeof e,"")),a=null}return(t=Or(o,n,t,s)).elementType=e,t.type=a,t.lanes=i,t}function Wr(e,t,n,r){return(e=Or(7,e,r,t)).lanes=n,e}function qr(e,t,n){return(e=Or(6,e,null,t)).lanes=n,e}function Yr(e){var t=Or(18,null,null,0);return t.stateNode=e,t}function Kr(e,t,n){return(t=Or(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Qr=new WeakMap;function Xr(e,t){if("object"==typeof e&&null!==e){var n=Qr.get(e);return void 0!==n?n:(t={value:e,source:t,stack:ae(t)},Qr.set(e,t),t)}return{value:e,source:t,stack:ae(t)}}var Zr=[],Gr=0,Jr=null,ea=0,ta=[],na=0,ra=null,aa=1,sa="";function ia(e,t){Zr[Gr++]=ea,Zr[Gr++]=Jr,Jr=e,ea=t}function oa(e,t,n){ta[na++]=aa,ta[na++]=sa,ta[na++]=ra,ra=e;var r=aa;e=sa;var a=32-ke(r)-1;r&=~(1<<a),n+=1;var s=32-ke(t)+a;if(30<s){var i=a-a%5;s=(r&(1<<i)-1).toString(32),r>>=i,a-=i,aa=1<<32-ke(t)+a|n<<a|r,sa=s+e}else aa=1<<s|n<<a|r,sa=e}function la(e){null!==e.return&&(ia(e,1),oa(e,1,0))}function ca(e){for(;e===Jr;)Jr=Zr[--Gr],Zr[Gr]=null,ea=Zr[--Gr],Zr[Gr]=null;for(;e===ra;)ra=ta[--na],ta[na]=null,sa=ta[--na],ta[na]=null,aa=ta[--na],ta[na]=null}function ua(e,t){ta[na++]=aa,ta[na++]=sa,ta[na++]=ra,aa=t.id,sa=t.overflow,ra=e}var da=null,ha=null,fa=!1,pa=null,ma=!1,ga=Error(r(519));function ya(e){throw Sa(Xr(Error(r(418,1<arguments.length&&void 0!==arguments[1]&&arguments[1]?"text":"HTML","")),e)),ga}function va(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[He]=e,t[Ue]=r,n){case"dialog":Gu("cancel",t),Gu("close",t);break;case"iframe":case"object":case"embed":Gu("load",t);break;case"video":case"audio":for(n=0;n<Qu.length;n++)Gu(Qu[n],t);break;case"source":Gu("error",t);break;case"img":case"image":case"link":Gu("error",t),Gu("load",t);break;case"details":Gu("toggle",t);break;case"input":Gu("invalid",t),wt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case"select":Gu("invalid",t);break;case"textarea":Gu("invalid",t),Ct(t,r.value,r.defaultValue,r.children)}"string"!=typeof(n=r.children)&&"number"!=typeof n&&"bigint"!=typeof n||t.textContent===""+n||!0===r.suppressHydrationWarning||dd(t.textContent,n)?(null!=r.popover&&(Gu("beforetoggle",t),Gu("toggle",t)),null!=r.onScroll&&Gu("scroll",t),null!=r.onScrollEnd&&Gu("scrollend",t),null!=r.onClick&&(t.onclick=_t),t=!0):t=!1,t||ya(e,!0)}function xa(e){for(da=e.return;da;)switch(da.tag){case 5:case 31:case 13:return void(ma=!1);case 27:case 3:return void(ma=!0);default:da=da.return}}function ba(e){if(e!==da)return!1;if(!fa)return xa(e),fa=!0,!1;var t,n=e.tag;if((t=3!==n&&27!==n)&&((t=5===n)&&(t=!("form"!==(t=e.type)&&"button"!==t)||wd(e.type,e.memoizedProps)),t=!t),t&&ha&&ya(e),xa(e),13===n){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(r(317));ha=Fd(e)}else if(31===n){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(r(317));ha=Fd(e)}else 27===n?(n=ha,Ed(e.type)?(e=Rd,Rd=null,ha=e):ha=n):ha=da?zd(e.stateNode.nextSibling):null;return!0}function wa(){ha=da=null,fa=!1}function ka(){var e=pa;return null!==e&&(null===Dc?Dc=e:Dc.push.apply(Dc,e),pa=null),e}function Sa(e){null===pa?pa=[e]:pa.push(e)}var ja=$(null),Ca=null,Na=null;function Ta(e,t,n){H(ja,t._currentValue),t._currentValue=n}function Ea(e){e._currentValue=ja.current,B(ja)}function Ma(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Pa(e,t,n,a){var s=e.child;for(null!==s&&(s.return=e);null!==s;){var i=s.dependencies;if(null!==i){var o=s.child;i=i.firstContext;e:for(;null!==i;){var l=i;i=s;for(var c=0;c<t.length;c++)if(l.context===t[c]){i.lanes|=n,null!==(l=i.alternate)&&(l.lanes|=n),Ma(i.return,n,e),a||(o=null);break e}i=l.next}}else if(18===s.tag){if(null===(o=s.return))throw Error(r(341));o.lanes|=n,null!==(i=o.alternate)&&(i.lanes|=n),Ma(o,n,e),o=null}else o=s.child;if(null!==o)o.return=s;else for(o=s;null!==o;){if(o===e){o=null;break}if(null!==(s=o.sibling)){s.return=o.return,o=s;break}o=o.return}s=o}}function La(e,t,n,a){e=null;for(var s=t,i=!1;null!==s;){if(!i)if(524288&s.flags)i=!0;else if(262144&s.flags)break;if(10===s.tag){var o=s.alternate;if(null===o)throw Error(r(387));if(null!==(o=o.memoizedProps)){var l=s.type;er(s.pendingProps.value,o.value)||(null!==e?e.push(l):e=[l])}}else if(s===Q.current){if(null===(o=s.alternate))throw Error(r(387));o.memoizedState.memoizedState!==s.memoizedState.memoizedState&&(null!==e?e.push(hh):e=[hh])}s=s.return}null!==e&&Pa(t,e,n,a),t.flags|=262144}function Da(e){for(e=e.firstContext;null!==e;){if(!er(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Aa(e){Ca=e,Na=null,null!==(e=e.dependencies)&&(e.firstContext=null)}function _a(e){return Ra(Ca,e)}function za(e,t){return null===Ca&&Aa(e),Ra(e,t)}function Ra(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},null===Na){if(null===e)throw Error(r(308));Na=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Na=Na.next=t;return n}var Fa="undefined"!=typeof AbortController?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},Va=e.unstable_scheduleCallback,Ia=e.unstable_NormalPriority,Oa={$$typeof:w,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function $a(){return{controller:new Fa,data:new Map,refCount:0}}function Ba(e){e.refCount--,0===e.refCount&&Va(Ia,function(){e.controller.abort()})}var Ha=null,Ua=0,Wa=0,qa=null;function Ya(){if(0===--Ua&&null!==Ha){null!==qa&&(qa.status="fulfilled");var e=Ha;Ha=null,Wa=0,qa=null;for(var t=0;t<e.length;t++)(0,e[t])()}}var Ka=R.S;R.S=function(e,t){zc=ue(),"object"==typeof t&&null!==t&&"function"==typeof t.then&&function(e,t){if(null===Ha){var n=Ha=[];Ua=0,Wa=Uu(),qa={status:"pending",value:void 0,then:function(e){n.push(e)}}}Ua++,t.then(Ya,Ya)}(0,t),null!==Ka&&Ka(e,t)};var Qa=$(null);function Xa(){var e=Qa.current;return null!==e?e:gc.pooledCache}function Za(e,t){H(Qa,null===t?Qa.current:t.pool)}function Ga(){var e=Xa();return null===e?null:{parent:Oa._currentValue,pool:e}}var Ja=Error(r(460)),es=Error(r(474)),ts=Error(r(542)),ns={then:function(){}};function rs(e){return"fulfilled"===(e=e.status)||"rejected"===e}function as(e,t,n){switch(void 0===(n=e[n])?e.push(t):n!==t&&(t.then(_t,_t),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw ls(e=t.reason),e;default:if("string"==typeof t.status)t.then(_t,_t);else{if(null!==(e=gc)&&100<e.shellSuspendCounter)throw Error(r(482));(e=t).status="pending",e.then(function(e){if("pending"===t.status){var n=t;n.status="fulfilled",n.value=e}},function(e){if("pending"===t.status){var n=t;n.status="rejected",n.reason=e}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw ls(e=t.reason),e}throw is=t,Ja}}function ss(e){try{return(0,e._init)(e._payload)}catch(t){if(null!==t&&"object"==typeof t&&"function"==typeof t.then)throw is=t,Ja;throw t}}var is=null;function os(){if(null===is)throw Error(r(459));var e=is;return is=null,e}function ls(e){if(e===Ja||e===ts)throw Error(r(483))}var cs=null,us=0;function ds(e){var t=us;return us+=1,null===cs&&(cs=[]),as(cs,e,t)}function hs(e,t){t=t.props.ref,e.ref=void 0!==t?t:null}function fs(e,t){if(t.$$typeof===h)throw Error(r(525));throw e=Object.prototype.toString.call(t),Error(r(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function ps(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function a(e){for(var t=new Map;null!==e;)null!==e.key?t.set(e.key,e):t.set(e.index,e),e=e.sibling;return t}function s(e,t){return(e=Br(e,t)).index=0,e.sibling=null,e}function i(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags|=67108866,n):r:(t.flags|=67108866,n):(t.flags|=1048576,n)}function o(t){return e&&null===t.alternate&&(t.flags|=67108866),t}function l(e,t,n,r){return null===t||6!==t.tag?((t=qr(n,e.mode,r)).return=e,t):((t=s(t,n)).return=e,t)}function c(e,t,n,r){var a=n.type;return a===m?d(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===a||"object"==typeof a&&null!==a&&a.$$typeof===T&&ss(a)===t.type)?(hs(t=s(t,n.props),n),t.return=e,t):(hs(t=Ur(n.type,n.key,n.props,null,e.mode,r),n),t.return=e,t)}function u(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Kr(n,e.mode,r)).return=e,t):((t=s(t,n.children||[])).return=e,t)}function d(e,t,n,r,a){return null===t||7!==t.tag?((t=Wr(n,e.mode,r,a)).return=e,t):((t=s(t,n)).return=e,t)}function h(e,t,n){if("string"==typeof t&&""!==t||"number"==typeof t||"bigint"==typeof t)return(t=qr(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case f:return hs(n=Ur(t.type,t.key,t.props,null,e.mode,n),t),n.return=e,n;case p:return(t=Kr(t,e.mode,n)).return=e,t;case T:return h(e,t=ss(t),n)}if(z(t)||D(t))return(t=Wr(t,e.mode,n,null)).return=e,t;if("function"==typeof t.then)return h(e,ds(t),n);if(t.$$typeof===w)return h(e,za(e,t),n);fs(e,t)}return null}function g(e,t,n,r){var a=null!==t?t.key:null;if("string"==typeof n&&""!==n||"number"==typeof n||"bigint"==typeof n)return null!==a?null:l(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case f:return n.key===a?c(e,t,n,r):null;case p:return n.key===a?u(e,t,n,r):null;case T:return g(e,t,n=ss(n),r)}if(z(n)||D(n))return null!==a?null:d(e,t,n,r,null);if("function"==typeof n.then)return g(e,t,ds(n),r);if(n.$$typeof===w)return g(e,t,za(e,n),r);fs(e,n)}return null}function y(e,t,n,r,a){if("string"==typeof r&&""!==r||"number"==typeof r||"bigint"==typeof r)return l(t,e=e.get(n)||null,""+r,a);if("object"==typeof r&&null!==r){switch(r.$$typeof){case f:return c(t,e=e.get(null===r.key?n:r.key)||null,r,a);case p:return u(t,e=e.get(null===r.key?n:r.key)||null,r,a);case T:return y(e,t,n,r=ss(r),a)}if(z(r)||D(r))return d(t,e=e.get(n)||null,r,a,null);if("function"==typeof r.then)return y(e,t,n,ds(r),a);if(r.$$typeof===w)return y(e,t,n,za(t,r),a);fs(t,r)}return null}function v(l,c,u,d){if("object"==typeof u&&null!==u&&u.type===m&&null===u.key&&(u=u.props.children),"object"==typeof u&&null!==u){switch(u.$$typeof){case f:e:{for(var x=u.key;null!==c;){if(c.key===x){if((x=u.type)===m){if(7===c.tag){n(l,c.sibling),(d=s(c,u.props.children)).return=l,l=d;break e}}else if(c.elementType===x||"object"==typeof x&&null!==x&&x.$$typeof===T&&ss(x)===c.type){n(l,c.sibling),hs(d=s(c,u.props),u),d.return=l,l=d;break e}n(l,c);break}t(l,c),c=c.sibling}u.type===m?((d=Wr(u.props.children,l.mode,d,u.key)).return=l,l=d):(hs(d=Ur(u.type,u.key,u.props,null,l.mode,d),u),d.return=l,l=d)}return o(l);case p:e:{for(x=u.key;null!==c;){if(c.key===x){if(4===c.tag&&c.stateNode.containerInfo===u.containerInfo&&c.stateNode.implementation===u.implementation){n(l,c.sibling),(d=s(c,u.children||[])).return=l,l=d;break e}n(l,c);break}t(l,c),c=c.sibling}(d=Kr(u,l.mode,d)).return=l,l=d}return o(l);case T:return v(l,c,u=ss(u),d)}if(z(u))return function(r,s,o,l){for(var c=null,u=null,d=s,f=s=0,p=null;null!==d&&f<o.length;f++){d.index>f?(p=d,d=null):p=d.sibling;var m=g(r,d,o[f],l);if(null===m){null===d&&(d=p);break}e&&d&&null===m.alternate&&t(r,d),s=i(m,s,f),null===u?c=m:u.sibling=m,u=m,d=p}if(f===o.length)return n(r,d),fa&&ia(r,f),c;if(null===d){for(;f<o.length;f++)null!==(d=h(r,o[f],l))&&(s=i(d,s,f),null===u?c=d:u.sibling=d,u=d);return fa&&ia(r,f),c}for(d=a(d);f<o.length;f++)null!==(p=y(d,r,f,o[f],l))&&(e&&null!==p.alternate&&d.delete(null===p.key?f:p.key),s=i(p,s,f),null===u?c=p:u.sibling=p,u=p);return e&&d.forEach(function(e){return t(r,e)}),fa&&ia(r,f),c}(l,c,u,d);if(D(u)){if("function"!=typeof(x=D(u)))throw Error(r(150));return function(s,o,l,c){if(null==l)throw Error(r(151));for(var u=null,d=null,f=o,p=o=0,m=null,v=l.next();null!==f&&!v.done;p++,v=l.next()){f.index>p?(m=f,f=null):m=f.sibling;var x=g(s,f,v.value,c);if(null===x){null===f&&(f=m);break}e&&f&&null===x.alternate&&t(s,f),o=i(x,o,p),null===d?u=x:d.sibling=x,d=x,f=m}if(v.done)return n(s,f),fa&&ia(s,p),u;if(null===f){for(;!v.done;p++,v=l.next())null!==(v=h(s,v.value,c))&&(o=i(v,o,p),null===d?u=v:d.sibling=v,d=v);return fa&&ia(s,p),u}for(f=a(f);!v.done;p++,v=l.next())null!==(v=y(f,s,p,v.value,c))&&(e&&null!==v.alternate&&f.delete(null===v.key?p:v.key),o=i(v,o,p),null===d?u=v:d.sibling=v,d=v);return e&&f.forEach(function(e){return t(s,e)}),fa&&ia(s,p),u}(l,c,u=x.call(u),d)}if("function"==typeof u.then)return v(l,c,ds(u),d);if(u.$$typeof===w)return v(l,c,za(l,u),d);fs(l,u)}return"string"==typeof u&&""!==u||"number"==typeof u||"bigint"==typeof u?(u=""+u,null!==c&&6===c.tag?(n(l,c.sibling),(d=s(c,u)).return=l,l=d):(n(l,c),(d=qr(u,l.mode,d)).return=l,l=d),o(l)):n(l,c)}return function(e,t,n,r){try{us=0;var a=v(e,t,n,r);return cs=null,a}catch(i){if(i===Ja||i===ts)throw i;var s=Or(29,i,null,e.mode);return s.lanes=r,s.return=e,s}}}var ms=ps(!0),gs=ps(!1),ys=!1;function vs(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function xs(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function bs(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function ws(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,2&mc){var a=r.pending;return null===a?t.next=t:(t.next=a.next,a.next=t),r.pending=t,t=Fr(e),Rr(e,null,n),t}return Ar(e,r,t,n),Fr(e)}function ks(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,4194048&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,Re(e,n)}}function Ss(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var a=null,s=null;if(null!==(n=n.firstBaseUpdate)){do{var i={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};null===s?a=s=i:s=s.next=i,n=n.next}while(null!==n);null===s?a=s=t:s=s.next=t}else a=s=t;return n={baseState:r.baseState,firstBaseUpdate:a,lastBaseUpdate:s,shared:r.shared,callbacks:r.callbacks},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var js=!1;function Cs(){if(js){if(null!==qa)throw qa}}function Ns(e,t,n,r){js=!1;var a=e.updateQueue;ys=!1;var s=a.firstBaseUpdate,i=a.lastBaseUpdate,o=a.shared.pending;if(null!==o){a.shared.pending=null;var l=o,c=l.next;l.next=null,null===i?s=c:i.next=c,i=l;var d=e.alternate;null!==d&&((o=(d=d.updateQueue).lastBaseUpdate)!==i&&(null===o?d.firstBaseUpdate=c:o.next=c,d.lastBaseUpdate=l))}if(null!==s){var h=a.baseState;for(i=0,d=c=l=null,o=s;;){var f=-536870913&o.lane,p=f!==o.lane;if(p?(vc&f)===f:(r&f)===f){0!==f&&f===Wa&&(js=!0),null!==d&&(d=d.next={lane:0,tag:o.tag,payload:o.payload,callback:null,next:null});e:{var m=e,g=o;f=t;var y=n;switch(g.tag){case 1:if("function"==typeof(m=g.payload)){h=m.call(y,h,f);break e}h=m;break e;case 3:m.flags=-65537&m.flags|128;case 0:if(null==(f="function"==typeof(m=g.payload)?m.call(y,h,f):m))break e;h=u({},h,f);break e;case 2:ys=!0}}null!==(f=o.callback)&&(e.flags|=64,p&&(e.flags|=8192),null===(p=a.callbacks)?a.callbacks=[f]:p.push(f))}else p={lane:f,tag:o.tag,payload:o.payload,callback:o.callback,next:null},null===d?(c=d=p,l=h):d=d.next=p,i|=f;if(null===(o=o.next)){if(null===(o=a.shared.pending))break;o=(p=o).next,p.next=null,a.lastBaseUpdate=p,a.shared.pending=null}}null===d&&(l=h),a.baseState=l,a.firstBaseUpdate=c,a.lastBaseUpdate=d,null===s&&(a.shared.lanes=0),Nc|=i,e.lanes=i,e.memoizedState=h}}function Ts(e,t){if("function"!=typeof e)throw Error(r(191,e));e.call(t)}function Es(e,t){var n=e.callbacks;if(null!==n)for(e.callbacks=null,e=0;e<n.length;e++)Ts(n[e],t)}var Ms=$(null),Ps=$(0);function Ls(e,t){H(Ps,e=jc),H(Ms,t),jc=e|t.baseLanes}function Ds(){H(Ps,jc),H(Ms,Ms.current)}function As(){jc=Ps.current,B(Ms),B(Ps)}var _s=$(null),zs=null;function Rs(e){var t=e.alternate;H($s,1&$s.current),H(_s,e),null===zs&&(null===t||null!==Ms.current||null!==t.memoizedState)&&(zs=e)}function Fs(e){H($s,$s.current),H(_s,e),null===zs&&(zs=e)}function Vs(e){22===e.tag?(H($s,$s.current),H(_s,e),null===zs&&(zs=e)):Is()}function Is(){H($s,$s.current),H(_s,_s.current)}function Os(e){B(_s),zs===e&&(zs=null),B($s)}var $s=$(0);function Bs(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||Ad(n)||_d(n)))return t}else if(19!==t.tag||"forwards"!==t.memoizedProps.revealOrder&&"backwards"!==t.memoizedProps.revealOrder&&"unstable_legacy-backwards"!==t.memoizedProps.revealOrder&&"together"!==t.memoizedProps.revealOrder){if(null!==t.child){t.child.return=t,t=t.child;continue}}else if(128&t.flags)return t;if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Hs=0,Us=null,Ws=null,qs=null,Ys=!1,Ks=!1,Qs=!1,Xs=0,Zs=0,Gs=null,Js=0;function ei(){throw Error(r(321))}function ti(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!er(e[n],t[n]))return!1;return!0}function ni(e,t,n,r,a,s){return Hs=s,Us=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,R.H=null===e||null===e.memoizedState?vo:xo,Qs=!1,s=n(r,a),Qs=!1,Ks&&(s=ai(t,n,r,a)),ri(e),s}function ri(e){R.H=yo;var t=null!==Ws&&null!==Ws.next;if(Hs=0,qs=Ws=Us=null,Ys=!1,Zs=0,Gs=null,t)throw Error(r(300));null===e||zo||null!==(e=e.dependencies)&&Da(e)&&(zo=!0)}function ai(e,t,n,a){Us=e;var s=0;do{if(Ks&&(Gs=null),Zs=0,Ks=!1,25<=s)throw Error(r(301));if(s+=1,qs=Ws=null,null!=e.updateQueue){var i=e.updateQueue;i.lastEffect=null,i.events=null,i.stores=null,null!=i.memoCache&&(i.memoCache.index=0)}R.H=bo,i=t(n,a)}while(Ks);return i}function si(){var e=R.H,t=e.useState()[0];return t="function"==typeof t.then?di(t):t,e=e.useState()[0],(null!==Ws?Ws.memoizedState:null)!==e&&(Us.flags|=1024),t}function ii(){var e=0!==Xs;return Xs=0,e}function oi(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function li(e){if(Ys){for(e=e.memoizedState;null!==e;){var t=e.queue;null!==t&&(t.pending=null),e=e.next}Ys=!1}Hs=0,qs=Ws=Us=null,Ks=!1,Zs=Xs=0,Gs=null}function ci(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===qs?Us.memoizedState=qs=e:qs=qs.next=e,qs}function ui(){if(null===Ws){var e=Us.alternate;e=null!==e?e.memoizedState:null}else e=Ws.next;var t=null===qs?Us.memoizedState:qs.next;if(null!==t)qs=t,Ws=e;else{if(null===e){if(null===Us.alternate)throw Error(r(467));throw Error(r(310))}e={memoizedState:(Ws=e).memoizedState,baseState:Ws.baseState,baseQueue:Ws.baseQueue,queue:Ws.queue,next:null},null===qs?Us.memoizedState=qs=e:qs=qs.next=e}return qs}function di(e){var t=Zs;return Zs+=1,null===Gs&&(Gs=[]),e=as(Gs,e,t),t=Us,null===(null===qs?t.memoizedState:qs.next)&&(t=t.alternate,R.H=null===t||null===t.memoizedState?vo:xo),e}function hi(e){if(null!==e&&"object"==typeof e){if("function"==typeof e.then)return di(e);if(e.$$typeof===w)return _a(e)}throw Error(r(438,String(e)))}function fi(e){var t=null,n=Us.updateQueue;if(null!==n&&(t=n.memoCache),null==t){var r=Us.alternate;null!==r&&(null!==(r=r.updateQueue)&&(null!=(r=r.memoCache)&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(null==t&&(t={data:[],index:0}),null===n&&(n={lastEffect:null,events:null,stores:null,memoCache:null},Us.updateQueue=n),n.memoCache=t,void 0===(n=t.data[t.index]))for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=P;return t.index++,n}function pi(e,t){return"function"==typeof t?t(e):t}function mi(e){return gi(ui(),Ws,e)}function gi(e,t,n){var a=e.queue;if(null===a)throw Error(r(311));a.lastRenderedReducer=n;var s=e.baseQueue,i=a.pending;if(null!==i){if(null!==s){var o=s.next;s.next=i.next,i.next=o}t.baseQueue=s=i,a.pending=null}if(i=e.baseState,null===s)e.memoizedState=i;else{var l=o=null,c=null,u=t=s.next,d=!1;do{var h=-536870913&u.lane;if(h!==u.lane?(vc&h)===h:(Hs&h)===h){var f=u.revertLane;if(0===f)null!==c&&(c=c.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),h===Wa&&(d=!0);else{if((Hs&f)===f){u=u.next,f===Wa&&(d=!0);continue}h={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},null===c?(l=c=h,o=i):c=c.next=h,Us.lanes|=f,Nc|=f}h=u.action,Qs&&n(i,h),i=u.hasEagerState?u.eagerState:n(i,h)}else f={lane:h,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},null===c?(l=c=f,o=i):c=c.next=f,Us.lanes|=h,Nc|=h;u=u.next}while(null!==u&&u!==t);if(null===c?o=i:c.next=l,!er(i,e.memoizedState)&&(zo=!0,d&&null!==(n=qa)))throw n;e.memoizedState=i,e.baseState=o,e.baseQueue=c,a.lastRenderedState=i}return null===s&&(a.lanes=0),[e.memoizedState,a.dispatch]}function yi(e){var t=ui(),n=t.queue;if(null===n)throw Error(r(311));n.lastRenderedReducer=e;var a=n.dispatch,s=n.pending,i=t.memoizedState;if(null!==s){n.pending=null;var o=s=s.next;do{i=e(i,o.action),o=o.next}while(o!==s);er(i,t.memoizedState)||(zo=!0),t.memoizedState=i,null===t.baseQueue&&(t.baseState=i),n.lastRenderedState=i}return[i,a]}function vi(e,t,n){var a=Us,s=ui(),i=fa;if(i){if(void 0===n)throw Error(r(407));n=n()}else n=t();var o=!er((Ws||s).memoizedState,n);if(o&&(s.memoizedState=n,zo=!0),s=s.queue,Hi(wi.bind(null,a,s,e),[e]),s.getSnapshot!==t||o||null!==qs&&1&qs.memoizedState.tag){if(a.flags|=2048,Vi(9,{destroy:void 0},bi.bind(null,a,s,n,t),null),null===gc)throw Error(r(349));i||127&Hs||xi(a,t,n)}return n}function xi(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=Us.updateQueue)?(t={lastEffect:null,events:null,stores:null,memoCache:null},Us.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function bi(e,t,n,r){t.value=n,t.getSnapshot=r,ki(t)&&Si(e)}function wi(e,t,n){return n(function(){ki(t)&&Si(e)})}function ki(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!er(e,n)}catch(r){return!0}}function Si(e){var t=zr(e,2);null!==t&&Xc(t,e,2)}function ji(e){var t=ci();if("function"==typeof e){var n=e;if(e=n(),Qs){we(!0);try{n()}finally{we(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:pi,lastRenderedState:e},t}function Ci(e,t,n,r){return e.baseState=n,gi(e,Ws,"function"==typeof r?r:pi)}function Ni(e,t,n,a,s){if(po(e))throw Error(r(485));if(null!==(e=t.action)){var i={payload:s,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(e){i.listeners.push(e)}};null!==R.T?n(!0):i.isTransition=!1,a(i),null===(n=t.pending)?(i.next=t.pending=i,Ti(t,i)):(i.next=n.next,t.pending=n.next=i)}}function Ti(e,t){var n=t.action,r=t.payload,a=e.state;if(t.isTransition){var s=R.T,i={};R.T=i;try{var o=n(a,r),l=R.S;null!==l&&l(i,o),Ei(e,t,o)}catch(c){Pi(e,t,c)}finally{null!==s&&null!==i.types&&(s.types=i.types),R.T=s}}else try{Ei(e,t,s=n(a,r))}catch(u){Pi(e,t,u)}}function Ei(e,t,n){null!==n&&"object"==typeof n&&"function"==typeof n.then?n.then(function(n){Mi(e,t,n)},function(n){return Pi(e,t,n)}):Mi(e,t,n)}function Mi(e,t,n){t.status="fulfilled",t.value=n,Li(t),e.state=n,null!==(t=e.pending)&&((n=t.next)===t?e.pending=null:(n=n.next,t.next=n,Ti(e,n)))}function Pi(e,t,n){var r=e.pending;if(e.pending=null,null!==r){r=r.next;do{t.status="rejected",t.reason=n,Li(t),t=t.next}while(t!==r)}e.action=null}function Li(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Di(e,t){return t}function Ai(e,t){if(fa){var n=gc.formState;if(null!==n){e:{var r=Us;if(fa){if(ha){t:{for(var a=ha,s=ma;8!==a.nodeType;){if(!s){a=null;break t}if(null===(a=zd(a.nextSibling))){a=null;break t}}a="F!"===(s=a.data)||"F"===s?a:null}if(a){ha=zd(a.nextSibling),r="F!"===a.data;break e}}ya(r)}r=!1}r&&(t=n[0])}}return(n=ci()).memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Di,lastRenderedState:t},n.queue=r,n=uo.bind(null,Us,r),r.dispatch=n,r=ji(!1),s=fo.bind(null,Us,!1,r.queue),a={state:t,dispatch:null,action:e,pending:null},(r=ci()).queue=a,n=Ni.bind(null,Us,a,s,n),a.dispatch=n,r.memoizedState=e,[t,n,!1]}function _i(e){return zi(ui(),Ws,e)}function zi(e,t,n){if(t=gi(e,t,Di)[0],e=mi(pi)[0],"object"==typeof t&&null!==t&&"function"==typeof t.then)try{var r=di(t)}catch(i){if(i===Ja)throw ts;throw i}else r=t;var a=(t=ui()).queue,s=a.dispatch;return n!==t.memoizedState&&(Us.flags|=2048,Vi(9,{destroy:void 0},Ri.bind(null,a,n),null)),[r,s,e]}function Ri(e,t){e.action=t}function Fi(e){var t=ui(),n=Ws;if(null!==n)return zi(t,n,e);ui(),t=t.memoizedState;var r=(n=ui()).queue.dispatch;return n.memoizedState=e,[t,r,!1]}function Vi(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},null===(t=Us.updateQueue)&&(t={lastEffect:null,events:null,stores:null,memoCache:null},Us.updateQueue=t),null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Ii(){return ui().memoizedState}function Oi(e,t,n,r){var a=ci();Us.flags|=e,a.memoizedState=Vi(1|t,{destroy:void 0},n,void 0===r?null:r)}function $i(e,t,n,r){var a=ui();r=void 0===r?null:r;var s=a.memoizedState.inst;null!==Ws&&null!==r&&ti(r,Ws.memoizedState.deps)?a.memoizedState=Vi(t,s,n,r):(Us.flags|=e,a.memoizedState=Vi(1|t,s,n,r))}function Bi(e,t){Oi(8390656,8,e,t)}function Hi(e,t){$i(2048,8,e,t)}function Ui(e){var t=ui().memoizedState;return function(e){Us.flags|=4;var t=Us.updateQueue;if(null===t)t={lastEffect:null,events:null,stores:null,memoCache:null},Us.updateQueue=t,t.events=[e];else{var n=t.events;null===n?t.events=[e]:n.push(e)}}({ref:t,nextImpl:e}),function(){if(2&mc)throw Error(r(440));return t.impl.apply(void 0,arguments)}}function Wi(e,t){return $i(4,2,e,t)}function qi(e,t){return $i(4,4,e,t)}function Yi(e,t){if("function"==typeof t){e=e();var n=t(e);return function(){"function"==typeof n?n():t(null)}}if(null!=t)return e=e(),t.current=e,function(){t.current=null}}function Ki(e,t,n){n=null!=n?n.concat([e]):null,$i(4,4,Yi.bind(null,t,e),n)}function Qi(){}function Xi(e,t){var n=ui();t=void 0===t?null:t;var r=n.memoizedState;return null!==t&&ti(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Zi(e,t){var n=ui();t=void 0===t?null:t;var r=n.memoizedState;if(null!==t&&ti(t,r[1]))return r[0];if(r=e(),Qs){we(!0);try{e()}finally{we(!1)}}return n.memoizedState=[r,t],r}function Gi(e,t,n){return void 0===n||1073741824&Hs&&!(261930&vc)?e.memoizedState=t:(e.memoizedState=n,e=Qc(),Us.lanes|=e,Nc|=e,n)}function Ji(e,t,n,r){return er(n,t)?n:null!==Ms.current?(e=Gi(e,n,r),er(e,t)||(zo=!0),e):42&Hs&&(!(1073741824&Hs)||261930&vc)?(e=Qc(),Us.lanes|=e,Nc|=e,t):(zo=!0,e.memoizedState=n)}function eo(e,t,n,r,a){var s=F.p;F.p=0!==s&&8>s?s:8;var i,o,l,c=R.T,u={};R.T=u,fo(e,!1,t,n);try{var d=a(),h=R.S;if(null!==h&&h(u,d),null!==d&&"object"==typeof d&&"function"==typeof d.then)ho(e,t,(i=r,o=[],l={status:"pending",value:null,reason:null,then:function(e){o.push(e)}},d.then(function(){l.status="fulfilled",l.value=i;for(var e=0;e<o.length;e++)(0,o[e])(i)},function(e){for(l.status="rejected",l.reason=e,e=0;e<o.length;e++)(0,o[e])(void 0)}),l),Kc());else ho(e,t,r,Kc())}catch(f){ho(e,t,{then:function(){},status:"rejected",reason:f},Kc())}finally{F.p=s,null!==c&&null!==u.types&&(c.types=u.types),R.T=c}}function to(){}function no(e,t,n,a){if(5!==e.tag)throw Error(r(476));var s=ro(e).queue;eo(e,s,t,V,null===n?to:function(){return ao(e),n(a)})}function ro(e){var t=e.memoizedState;if(null!==t)return t;var n={};return(t={memoizedState:V,baseState:V,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:pi,lastRenderedState:V},next:null}).next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:pi,lastRenderedState:n},next:null},e.memoizedState=t,null!==(e=e.alternate)&&(e.memoizedState=t),t}function ao(e){var t=ro(e);null===t.next&&(t=e.alternate.memoizedState),ho(e,t.next.queue,{},Kc())}function so(){return _a(hh)}function io(){return ui().memoizedState}function oo(){return ui().memoizedState}function lo(e){for(var t=e.return;null!==t;){switch(t.tag){case 24:case 3:var n=Kc(),r=ws(t,e=bs(n),n);return null!==r&&(Xc(r,t,n),ks(r,t,n)),t={cache:$a()},void(e.payload=t)}t=t.return}}function co(e,t,n){var r=Kc();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},po(e)?mo(t,n):null!==(n=_r(e,t,n,r))&&(Xc(n,e,r),go(n,t,r))}function uo(e,t,n){ho(e,t,n,Kc())}function ho(e,t,n,r){var a={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(po(e))mo(t,a);else{var s=e.alternate;if(0===e.lanes&&(null===s||0===s.lanes)&&null!==(s=t.lastRenderedReducer))try{var i=t.lastRenderedState,o=s(i,n);if(a.hasEagerState=!0,a.eagerState=o,er(o,i))return Ar(e,t,a,0),null===gc&&Dr(),!1}catch(l){}if(null!==(n=_r(e,t,a,r)))return Xc(n,e,r),go(n,t,r),!0}return!1}function fo(e,t,n,a){if(a={lane:2,revertLane:Uu(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},po(e)){if(t)throw Error(r(479))}else null!==(t=_r(e,n,a,2))&&Xc(t,e,2)}function po(e){var t=e.alternate;return e===Us||null!==t&&t===Us}function mo(e,t){Ks=Ys=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function go(e,t,n){if(4194048&n){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,Re(e,n)}}var yo={readContext:_a,use:hi,useCallback:ei,useContext:ei,useEffect:ei,useImperativeHandle:ei,useLayoutEffect:ei,useInsertionEffect:ei,useMemo:ei,useReducer:ei,useRef:ei,useState:ei,useDebugValue:ei,useDeferredValue:ei,useTransition:ei,useSyncExternalStore:ei,useId:ei,useHostTransitionStatus:ei,useFormState:ei,useActionState:ei,useOptimistic:ei,useMemoCache:ei,useCacheRefresh:ei};yo.useEffectEvent=ei;var vo={readContext:_a,use:hi,useCallback:function(e,t){return ci().memoizedState=[e,void 0===t?null:t],e},useContext:_a,useEffect:Bi,useImperativeHandle:function(e,t,n){n=null!=n?n.concat([e]):null,Oi(4194308,4,Yi.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Oi(4194308,4,e,t)},useInsertionEffect:function(e,t){Oi(4,2,e,t)},useMemo:function(e,t){var n=ci();t=void 0===t?null:t;var r=e();if(Qs){we(!0);try{e()}finally{we(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=ci();if(void 0!==n){var a=n(t);if(Qs){we(!0);try{n(t)}finally{we(!1)}}}else a=t;return r.memoizedState=r.baseState=a,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:a},r.queue=e,e=e.dispatch=co.bind(null,Us,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},ci().memoizedState=e},useState:function(e){var t=(e=ji(e)).queue,n=uo.bind(null,Us,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Qi,useDeferredValue:function(e,t){return Gi(ci(),e,t)},useTransition:function(){var e=ji(!1);return e=eo.bind(null,Us,e.queue,!0,!1),ci().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var a=Us,s=ci();if(fa){if(void 0===n)throw Error(r(407));n=n()}else{if(n=t(),null===gc)throw Error(r(349));127&vc||xi(a,t,n)}s.memoizedState=n;var i={value:n,getSnapshot:t};return s.queue=i,Bi(wi.bind(null,a,i,e),[e]),a.flags|=2048,Vi(9,{destroy:void 0},bi.bind(null,a,i,n,t),null),n},useId:function(){var e=ci(),t=gc.identifierPrefix;if(fa){var n=sa;t="_"+t+"R_"+(n=(aa&~(1<<32-ke(aa)-1)).toString(32)+n),0<(n=Xs++)&&(t+="H"+n.toString(32)),t+="_"}else t="_"+t+"r_"+(n=Js++).toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:so,useFormState:Ai,useActionState:Ai,useOptimistic:function(e){var t=ci();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=fo.bind(null,Us,!0,n),n.dispatch=t,[e,t]},useMemoCache:fi,useCacheRefresh:function(){return ci().memoizedState=lo.bind(null,Us)},useEffectEvent:function(e){var t=ci(),n={impl:e};return t.memoizedState=n,function(){if(2&mc)throw Error(r(440));return n.impl.apply(void 0,arguments)}}},xo={readContext:_a,use:hi,useCallback:Xi,useContext:_a,useEffect:Hi,useImperativeHandle:Ki,useInsertionEffect:Wi,useLayoutEffect:qi,useMemo:Zi,useReducer:mi,useRef:Ii,useState:function(){return mi(pi)},useDebugValue:Qi,useDeferredValue:function(e,t){return Ji(ui(),Ws.memoizedState,e,t)},useTransition:function(){var e=mi(pi)[0],t=ui().memoizedState;return["boolean"==typeof e?e:di(e),t]},useSyncExternalStore:vi,useId:io,useHostTransitionStatus:so,useFormState:_i,useActionState:_i,useOptimistic:function(e,t){return Ci(ui(),0,e,t)},useMemoCache:fi,useCacheRefresh:oo};xo.useEffectEvent=Ui;var bo={readContext:_a,use:hi,useCallback:Xi,useContext:_a,useEffect:Hi,useImperativeHandle:Ki,useInsertionEffect:Wi,useLayoutEffect:qi,useMemo:Zi,useReducer:yi,useRef:Ii,useState:function(){return yi(pi)},useDebugValue:Qi,useDeferredValue:function(e,t){var n=ui();return null===Ws?Gi(n,e,t):Ji(n,Ws.memoizedState,e,t)},useTransition:function(){var e=yi(pi)[0],t=ui().memoizedState;return["boolean"==typeof e?e:di(e),t]},useSyncExternalStore:vi,useId:io,useHostTransitionStatus:so,useFormState:Fi,useActionState:Fi,useOptimistic:function(e,t){var n=ui();return null!==Ws?Ci(n,0,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:fi,useCacheRefresh:oo};function wo(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:u({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}bo.useEffectEvent=Ui;var ko={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Kc(),a=bs(r);a.payload=t,null!=n&&(a.callback=n),null!==(t=ws(e,a,r))&&(Xc(t,e,r),ks(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Kc(),a=bs(r);a.tag=1,a.payload=t,null!=n&&(a.callback=n),null!==(t=ws(e,a,r))&&(Xc(t,e,r),ks(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Kc(),r=bs(n);r.tag=2,null!=t&&(r.callback=t),null!==(t=ws(e,r,n))&&(Xc(t,e,n),ks(t,e,n))}};function So(e,t,n,r,a,s,i){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,s,i):!t.prototype||!t.prototype.isPureReactComponent||(!tr(n,r)||!tr(a,s))}function jo(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&ko.enqueueReplaceState(t,t.state,null)}function Co(e,t){var n=t;if("ref"in t)for(var r in n={},t)"ref"!==r&&(n[r]=t[r]);if(e=e.defaultProps)for(var a in n===t&&(n=u({},n)),e)void 0===n[a]&&(n[a]=e[a]);return n}function No(e){Er(e)}function To(e){console.error(e)}function Eo(e){Er(e)}function Mo(e,t){try{(0,e.onUncaughtError)(t.value,{componentStack:t.stack})}catch(n){setTimeout(function(){throw n})}}function Po(e,t,n){try{(0,e.onCaughtError)(n.value,{componentStack:n.stack,errorBoundary:1===t.tag?t.stateNode:null})}catch(r){setTimeout(function(){throw r})}}function Lo(e,t,n){return(n=bs(n)).tag=3,n.payload={element:null},n.callback=function(){Mo(e,t)},n}function Do(e){return(e=bs(e)).tag=3,e}function Ao(e,t,n,r){var a=n.type.getDerivedStateFromError;if("function"==typeof a){var s=r.value;e.payload=function(){return a(s)},e.callback=function(){Po(t,n,r)}}var i=n.stateNode;null!==i&&"function"==typeof i.componentDidCatch&&(e.callback=function(){Po(t,n,r),"function"!=typeof a&&(null===Vc?Vc=new Set([this]):Vc.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:null!==e?e:""})})}var _o=Error(r(461)),zo=!1;function Ro(e,t,n,r){t.child=null===e?gs(t,null,n,r):ms(t,e.child,n,r)}function Fo(e,t,n,r,a){n=n.render;var s=t.ref;if("ref"in r){var i={};for(var o in r)"ref"!==o&&(i[o]=r[o])}else i=r;return Aa(t),r=ni(e,t,n,i,s,a),o=ii(),null===e||zo?(fa&&o&&la(t),t.flags|=1,Ro(e,t,r,a),t.child):(oi(e,t,a),il(e,t,a))}function Vo(e,t,n,r,a){if(null===e){var s=n.type;return"function"!=typeof s||$r(s)||void 0!==s.defaultProps||null!==n.compare?((e=Ur(n.type,null,r,t,t.mode,a)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=s,Io(e,t,s,r,a))}if(s=e.child,!ol(e,a)){var i=s.memoizedProps;if((n=null!==(n=n.compare)?n:tr)(i,r)&&e.ref===t.ref)return il(e,t,a)}return t.flags|=1,(e=Br(s,r)).ref=t.ref,e.return=t,t.child=e}function Io(e,t,n,r,a){if(null!==e){var s=e.memoizedProps;if(tr(s,r)&&e.ref===t.ref){if(zo=!1,t.pendingProps=r=s,!ol(e,a))return t.lanes=e.lanes,il(e,t,a);131072&e.flags&&(zo=!0)}}return qo(e,t,n,r,a)}function Oo(e,t,n,r){var a=r.children,s=null!==e?e.memoizedState:null;if(null===e&&null===t.stateNode&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),"hidden"===r.mode){if(128&t.flags){if(s=null!==s?s.baseLanes|n:n,null!==e){for(r=t.child=e.child,a=0;null!==r;)a=a|r.lanes|r.childLanes,r=r.sibling;r=a&~s}else r=0,t.child=null;return Bo(e,t,s,n,r)}if(!(536870912&n))return r=t.lanes=536870912,Bo(e,t,null!==s?s.baseLanes|n:n,n,r);t.memoizedState={baseLanes:0,cachePool:null},null!==e&&Za(0,null!==s?s.cachePool:null),null!==s?Ls(t,s):Ds(),Vs(t)}else null!==s?(Za(0,s.cachePool),Ls(t,s),Is(),t.memoizedState=null):(null!==e&&Za(0,null),Ds(),Is());return Ro(e,t,a,n),t.child}function $o(e,t){return null!==e&&22===e.tag||null!==t.stateNode||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Bo(e,t,n,r,a){var s=Xa();return s=null===s?null:{parent:Oa._currentValue,pool:s},t.memoizedState={baseLanes:n,cachePool:s},null!==e&&Za(0,null),Ds(),Vs(t),null!==e&&La(e,t,r,!0),t.childLanes=a,null}function Ho(e,t){return(t=tl({mode:t.mode,children:t.children},e.mode)).ref=e.ref,e.child=t,t.return=e,t}function Uo(e,t,n){return ms(t,e.child,null,n),(e=Ho(t,t.pendingProps)).flags|=2,Os(t),t.memoizedState=null,e}function Wo(e,t){var n=t.ref;if(null===n)null!==e&&null!==e.ref&&(t.flags|=4194816);else{if("function"!=typeof n&&"object"!=typeof n)throw Error(r(284));null!==e&&e.ref===n||(t.flags|=4194816)}}function qo(e,t,n,r,a){return Aa(t),n=ni(e,t,n,r,void 0,a),r=ii(),null===e||zo?(fa&&r&&la(t),t.flags|=1,Ro(e,t,n,a),t.child):(oi(e,t,a),il(e,t,a))}function Yo(e,t,n,r,a,s){return Aa(t),t.updateQueue=null,n=ai(t,r,n,a),ri(e),r=ii(),null===e||zo?(fa&&r&&la(t),t.flags|=1,Ro(e,t,n,s),t.child):(oi(e,t,s),il(e,t,s))}function Ko(e,t,n,r,a){if(Aa(t),null===t.stateNode){var s=Vr,i=n.contextType;"object"==typeof i&&null!==i&&(s=_a(i)),s=new n(r,s),t.memoizedState=null!==s.state&&void 0!==s.state?s.state:null,s.updater=ko,t.stateNode=s,s._reactInternals=t,(s=t.stateNode).props=r,s.state=t.memoizedState,s.refs={},vs(t),i=n.contextType,s.context="object"==typeof i&&null!==i?_a(i):Vr,s.state=t.memoizedState,"function"==typeof(i=n.getDerivedStateFromProps)&&(wo(t,n,i,r),s.state=t.memoizedState),"function"==typeof n.getDerivedStateFromProps||"function"==typeof s.getSnapshotBeforeUpdate||"function"!=typeof s.UNSAFE_componentWillMount&&"function"!=typeof s.componentWillMount||(i=s.state,"function"==typeof s.componentWillMount&&s.componentWillMount(),"function"==typeof s.UNSAFE_componentWillMount&&s.UNSAFE_componentWillMount(),i!==s.state&&ko.enqueueReplaceState(s,s.state,null),Ns(t,r,s,a),Cs(),s.state=t.memoizedState),"function"==typeof s.componentDidMount&&(t.flags|=4194308),r=!0}else if(null===e){s=t.stateNode;var o=t.memoizedProps,l=Co(n,o);s.props=l;var c=s.context,u=n.contextType;i=Vr,"object"==typeof u&&null!==u&&(i=_a(u));var d=n.getDerivedStateFromProps;u="function"==typeof d||"function"==typeof s.getSnapshotBeforeUpdate,o=t.pendingProps!==o,u||"function"!=typeof s.UNSAFE_componentWillReceiveProps&&"function"!=typeof s.componentWillReceiveProps||(o||c!==i)&&jo(t,s,r,i),ys=!1;var h=t.memoizedState;s.state=h,Ns(t,r,s,a),Cs(),c=t.memoizedState,o||h!==c||ys?("function"==typeof d&&(wo(t,n,d,r),c=t.memoizedState),(l=ys||So(t,n,l,r,h,c,i))?(u||"function"!=typeof s.UNSAFE_componentWillMount&&"function"!=typeof s.componentWillMount||("function"==typeof s.componentWillMount&&s.componentWillMount(),"function"==typeof s.UNSAFE_componentWillMount&&s.UNSAFE_componentWillMount()),"function"==typeof s.componentDidMount&&(t.flags|=4194308)):("function"==typeof s.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),s.props=r,s.state=c,s.context=i,r=l):("function"==typeof s.componentDidMount&&(t.flags|=4194308),r=!1)}else{s=t.stateNode,xs(e,t),u=Co(n,i=t.memoizedProps),s.props=u,d=t.pendingProps,h=s.context,c=n.contextType,l=Vr,"object"==typeof c&&null!==c&&(l=_a(c)),(c="function"==typeof(o=n.getDerivedStateFromProps)||"function"==typeof s.getSnapshotBeforeUpdate)||"function"!=typeof s.UNSAFE_componentWillReceiveProps&&"function"!=typeof s.componentWillReceiveProps||(i!==d||h!==l)&&jo(t,s,r,l),ys=!1,h=t.memoizedState,s.state=h,Ns(t,r,s,a),Cs();var f=t.memoizedState;i!==d||h!==f||ys||null!==e&&null!==e.dependencies&&Da(e.dependencies)?("function"==typeof o&&(wo(t,n,o,r),f=t.memoizedState),(u=ys||So(t,n,u,r,h,f,l)||null!==e&&null!==e.dependencies&&Da(e.dependencies))?(c||"function"!=typeof s.UNSAFE_componentWillUpdate&&"function"!=typeof s.componentWillUpdate||("function"==typeof s.componentWillUpdate&&s.componentWillUpdate(r,f,l),"function"==typeof s.UNSAFE_componentWillUpdate&&s.UNSAFE_componentWillUpdate(r,f,l)),"function"==typeof s.componentDidUpdate&&(t.flags|=4),"function"==typeof s.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof s.componentDidUpdate||i===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!=typeof s.getSnapshotBeforeUpdate||i===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=f),s.props=r,s.state=f,s.context=l,r=u):("function"!=typeof s.componentDidUpdate||i===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!=typeof s.getSnapshotBeforeUpdate||i===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),r=!1)}return s=r,Wo(e,t),r=!!(128&t.flags),s||r?(s=t.stateNode,n=r&&"function"!=typeof n.getDerivedStateFromError?null:s.render(),t.flags|=1,null!==e&&r?(t.child=ms(t,e.child,null,a),t.child=ms(t,null,n,a)):Ro(e,t,n,a),t.memoizedState=s.state,e=t.child):e=il(e,t,a),e}function Qo(e,t,n,r){return wa(),t.flags|=256,Ro(e,t,n,r),t.child}var Xo={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Zo(e){return{baseLanes:e,cachePool:Ga()}}function Go(e,t,n){return e=null!==e?e.childLanes&~n:0,t&&(e|=Mc),e}function Jo(e,t,n){var a,s=t.pendingProps,i=!1,o=!!(128&t.flags);if((a=o)||(a=(null===e||null!==e.memoizedState)&&!!(2&$s.current)),a&&(i=!0,t.flags&=-129),a=!!(32&t.flags),t.flags&=-33,null===e){if(fa){if(i?Rs(t):Is(),(e=ha)?null!==(e=null!==(e=Dd(e,ma))&&"&"!==e.data?e:null)&&(t.memoizedState={dehydrated:e,treeContext:null!==ra?{id:aa,overflow:sa}:null,retryLane:536870912,hydrationErrors:null},(n=Yr(e)).return=t,t.child=n,da=t,ha=null):e=null,null===e)throw ya(t);return _d(e)?t.lanes=32:t.lanes=536870912,null}var l=s.children;return s=s.fallback,i?(Is(),l=tl({mode:"hidden",children:l},i=t.mode),s=Wr(s,i,n,null),l.return=t,s.return=t,l.sibling=s,t.child=l,(s=t.child).memoizedState=Zo(n),s.childLanes=Go(e,a,n),t.memoizedState=Xo,$o(null,s)):(Rs(t),el(t,l))}var c=e.memoizedState;if(null!==c&&null!==(l=c.dehydrated)){if(o)256&t.flags?(Rs(t),t.flags&=-257,t=nl(e,t,n)):null!==t.memoizedState?(Is(),t.child=e.child,t.flags|=128,t=null):(Is(),l=s.fallback,i=t.mode,s=tl({mode:"visible",children:s.children},i),(l=Wr(l,i,n,null)).flags|=2,s.return=t,l.return=t,s.sibling=l,t.child=s,ms(t,e.child,null,n),(s=t.child).memoizedState=Zo(n),s.childLanes=Go(e,a,n),t.memoizedState=Xo,t=$o(null,s));else if(Rs(t),_d(l)){if(a=l.nextSibling&&l.nextSibling.dataset)var u=a.dgst;a=u,(s=Error(r(419))).stack="",s.digest=a,Sa({value:s,source:null,stack:null}),t=nl(e,t,n)}else if(zo||La(e,t,n,!1),a=0!==(n&e.childLanes),zo||a){if(null!==(a=gc)&&(0!==(s=Fe(a,n))&&s!==c.retryLane))throw c.retryLane=s,zr(e,s),Xc(a,e,s),_o;Ad(l)||lu(),t=nl(e,t,n)}else Ad(l)?(t.flags|=192,t.child=e.child,t=null):(e=c.treeContext,ha=zd(l.nextSibling),da=t,fa=!0,pa=null,ma=!1,null!==e&&ua(t,e),(t=el(t,s.children)).flags|=4096);return t}return i?(Is(),l=s.fallback,i=t.mode,u=(c=e.child).sibling,(s=Br(c,{mode:"hidden",children:s.children})).subtreeFlags=65011712&c.subtreeFlags,null!==u?l=Br(u,l):(l=Wr(l,i,n,null)).flags|=2,l.return=t,s.return=t,s.sibling=l,t.child=s,$o(null,s),s=t.child,null===(l=e.child.memoizedState)?l=Zo(n):(null!==(i=l.cachePool)?(c=Oa._currentValue,i=i.parent!==c?{parent:c,pool:c}:i):i=Ga(),l={baseLanes:l.baseLanes|n,cachePool:i}),s.memoizedState=l,s.childLanes=Go(e,a,n),t.memoizedState=Xo,$o(e.child,s)):(Rs(t),e=(n=e.child).sibling,(n=Br(n,{mode:"visible",children:s.children})).return=t,n.sibling=null,null!==e&&(null===(a=t.deletions)?(t.deletions=[e],t.flags|=16):a.push(e)),t.child=n,t.memoizedState=null,n)}function el(e,t){return(t=tl({mode:"visible",children:t},e.mode)).return=e,e.child=t}function tl(e,t){return(e=Or(22,e,null,t)).lanes=0,e}function nl(e,t,n){return ms(t,e.child,null,n),(e=el(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function rl(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),Ma(e.return,t,n)}function al(e,t,n,r,a,s){var i=e.memoizedState;null===i?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:a,treeForkCount:s}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=a,i.treeForkCount=s)}function sl(e,t,n){var r=t.pendingProps,a=r.revealOrder,s=r.tail;r=r.children;var i=$s.current,o=!!(2&i);if(o?(i=1&i|2,t.flags|=128):i&=1,H($s,i),Ro(e,t,r,n),r=fa?ea:0,!o&&null!==e&&128&e.flags)e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&rl(e,n,t);else if(19===e.tag)rl(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(a){case"forwards":for(n=t.child,a=null;null!==n;)null!==(e=n.alternate)&&null===Bs(e)&&(a=n),n=n.sibling;null===(n=a)?(a=t.child,t.child=null):(a=n.sibling,n.sibling=null),al(t,!1,a,n,s,r);break;case"backwards":case"unstable_legacy-backwards":for(n=null,a=t.child,t.child=null;null!==a;){if(null!==(e=a.alternate)&&null===Bs(e)){t.child=a;break}e=a.sibling,a.sibling=n,n=a,a=e}al(t,!0,n,null,s,r);break;case"together":al(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function il(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Nc|=t.lanes,0===(n&t.childLanes)){if(null===e)return null;if(La(e,t,n,!1),0===(n&t.childLanes))return null}if(null!==e&&t.child!==e.child)throw Error(r(153));if(null!==t.child){for(n=Br(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Br(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function ol(e,t){return 0!==(e.lanes&t)||!(null===(e=e.dependencies)||!Da(e))}function ll(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps)zo=!0;else{if(!(ol(e,n)||128&t.flags))return zo=!1,function(e,t,n){switch(t.tag){case 3:X(t,t.stateNode.containerInfo),Ta(0,Oa,e.memoizedState.cache),wa();break;case 27:case 5:G(t);break;case 4:X(t,t.stateNode.containerInfo);break;case 10:Ta(0,t.type,t.memoizedProps.value);break;case 31:if(null!==t.memoizedState)return t.flags|=128,Fs(t),null;break;case 13:var r=t.memoizedState;if(null!==r)return null!==r.dehydrated?(Rs(t),t.flags|=128,null):0!==(n&t.child.childLanes)?Jo(e,t,n):(Rs(t),null!==(e=il(e,t,n))?e.sibling:null);Rs(t);break;case 19:var a=!!(128&e.flags);if((r=0!==(n&t.childLanes))||(La(e,t,n,!1),r=0!==(n&t.childLanes)),a){if(r)return sl(e,t,n);t.flags|=128}if(null!==(a=t.memoizedState)&&(a.rendering=null,a.tail=null,a.lastEffect=null),H($s,$s.current),r)break;return null;case 22:return t.lanes=0,Oo(e,t,n,t.pendingProps);case 24:Ta(0,Oa,e.memoizedState.cache)}return il(e,t,n)}(e,t,n);zo=!!(131072&e.flags)}else zo=!1,fa&&1048576&t.flags&&oa(t,ea,t.index);switch(t.lanes=0,t.tag){case 16:e:{var a=t.pendingProps;if(e=ss(t.elementType),t.type=e,"function"!=typeof e){if(null!=e){var s=e.$$typeof;if(s===k){t.tag=11,t=Fo(null,t,e,a,n);break e}if(s===N){t.tag=14,t=Vo(null,t,e,a,n);break e}}throw t=_(e)||e,Error(r(306,t,""))}$r(e)?(a=Co(e,a),t.tag=1,t=Ko(null,t,e,a,n)):(t.tag=0,t=qo(null,t,e,a,n))}return t;case 0:return qo(e,t,t.type,t.pendingProps,n);case 1:return Ko(e,t,a=t.type,s=Co(a,t.pendingProps),n);case 3:e:{if(X(t,t.stateNode.containerInfo),null===e)throw Error(r(387));a=t.pendingProps;var i=t.memoizedState;s=i.element,xs(e,t),Ns(t,a,null,n);var o=t.memoizedState;if(a=o.cache,Ta(0,Oa,a),a!==i.cache&&Pa(t,[Oa],n,!0),Cs(),a=o.element,i.isDehydrated){if(i={element:a,isDehydrated:!1,cache:o.cache},t.updateQueue.baseState=i,t.memoizedState=i,256&t.flags){t=Qo(e,t,a,n);break e}if(a!==s){Sa(s=Xr(Error(r(424)),t)),t=Qo(e,t,a,n);break e}if(9===(e=t.stateNode.containerInfo).nodeType)e=e.body;else e="HTML"===e.nodeName?e.ownerDocument.body:e;for(ha=zd(e.firstChild),da=t,fa=!0,pa=null,ma=!0,n=gs(t,null,a,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(wa(),a===s){t=il(e,t,n);break e}Ro(e,t,a,n)}t=t.child}return t;case 26:return Wo(e,t),null===e?(n=Yd(t.type,null,t.pendingProps,null))?t.memoizedState=n:fa||(n=t.type,e=t.pendingProps,(a=vd(K.current).createElement(n))[He]=t,a[Ue]=e,pd(a,n,e),nt(a),t.stateNode=a):t.memoizedState=Yd(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return G(t),null===e&&fa&&(a=t.stateNode=Id(t.type,t.pendingProps,K.current),da=t,ma=!0,s=ha,Ed(t.type)?(Rd=s,ha=zd(a.firstChild)):ha=s),Ro(e,t,t.pendingProps.children,n),Wo(e,t),null===e&&(t.flags|=4194304),t.child;case 5:return null===e&&fa&&((s=a=ha)&&(null!==(a=function(e,t,n,r){for(;1===e.nodeType;){var a=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&("INPUT"!==e.nodeName||"hidden"!==e.type))break}else if(r){if(!e[Xe])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if("stylesheet"===(s=e.getAttribute("rel"))&&e.hasAttribute("data-precedence"))break;if(s!==a.rel||e.getAttribute("href")!==(null==a.href||""===a.href?null:a.href)||e.getAttribute("crossorigin")!==(null==a.crossOrigin?null:a.crossOrigin)||e.getAttribute("title")!==(null==a.title?null:a.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(((s=e.getAttribute("src"))!==(null==a.src?null:a.src)||e.getAttribute("type")!==(null==a.type?null:a.type)||e.getAttribute("crossorigin")!==(null==a.crossOrigin?null:a.crossOrigin))&&s&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else{if("input"!==t||"hidden"!==e.type)return e;var s=null==a.name?null:""+a.name;if("hidden"===a.type&&e.getAttribute("name")===s)return e}if(null===(e=zd(e.nextSibling)))break}return null}(a,t.type,t.pendingProps,ma))?(t.stateNode=a,da=t,ha=zd(a.firstChild),ma=!1,s=!0):s=!1),s||ya(t)),G(t),s=t.type,i=t.pendingProps,o=null!==e?e.memoizedProps:null,a=i.children,wd(s,i)?a=null:null!==o&&wd(s,o)&&(t.flags|=32),null!==t.memoizedState&&(s=ni(e,t,si,null,null,n),hh._currentValue=s),Wo(e,t),Ro(e,t,a,n),t.child;case 6:return null===e&&fa&&((e=n=ha)&&(null!==(n=function(e,t,n){if(""===t)return null;for(;3!==e.nodeType;){if((1!==e.nodeType||"INPUT"!==e.nodeName||"hidden"!==e.type)&&!n)return null;if(null===(e=zd(e.nextSibling)))return null}return e}(n,t.pendingProps,ma))?(t.stateNode=n,da=t,ha=null,e=!0):e=!1),e||ya(t)),null;case 13:return Jo(e,t,n);case 4:return X(t,t.stateNode.containerInfo),a=t.pendingProps,null===e?t.child=ms(t,null,a,n):Ro(e,t,a,n),t.child;case 11:return Fo(e,t,t.type,t.pendingProps,n);case 7:return Ro(e,t,t.pendingProps,n),t.child;case 8:case 12:return Ro(e,t,t.pendingProps.children,n),t.child;case 10:return a=t.pendingProps,Ta(0,t.type,a.value),Ro(e,t,a.children,n),t.child;case 9:return s=t.type._context,a=t.pendingProps.children,Aa(t),a=a(s=_a(s)),t.flags|=1,Ro(e,t,a,n),t.child;case 14:return Vo(e,t,t.type,t.pendingProps,n);case 15:return Io(e,t,t.type,t.pendingProps,n);case 19:return sl(e,t,n);case 31:return function(e,t,n){var a=t.pendingProps,s=!!(128&t.flags);if(t.flags&=-129,null===e){if(fa){if("hidden"===a.mode)return e=Ho(t,a),t.lanes=536870912,$o(null,e);if(Fs(t),(e=ha)?null!==(e=null!==(e=Dd(e,ma))&&"&"===e.data?e:null)&&(t.memoizedState={dehydrated:e,treeContext:null!==ra?{id:aa,overflow:sa}:null,retryLane:536870912,hydrationErrors:null},(n=Yr(e)).return=t,t.child=n,da=t,ha=null):e=null,null===e)throw ya(t);return t.lanes=536870912,null}return Ho(t,a)}var i=e.memoizedState;if(null!==i){var o=i.dehydrated;if(Fs(t),s)if(256&t.flags)t.flags&=-257,t=Uo(e,t,n);else{if(null===t.memoizedState)throw Error(r(558));t.child=e.child,t.flags|=128,t=null}else if(zo||La(e,t,n,!1),s=0!==(n&e.childLanes),zo||s){if(null!==(a=gc)&&0!==(o=Fe(a,n))&&o!==i.retryLane)throw i.retryLane=o,zr(e,o),Xc(a,e,o),_o;lu(),t=Uo(e,t,n)}else e=i.treeContext,ha=zd(o.nextSibling),da=t,fa=!0,pa=null,ma=!1,null!==e&&ua(t,e),(t=Ho(t,a)).flags|=4096;return t}return(e=Br(e.child,{mode:a.mode,children:a.children})).ref=t.ref,t.child=e,e.return=t,e}(e,t,n);case 22:return Oo(e,t,n,t.pendingProps);case 24:return Aa(t),a=_a(Oa),null===e?(null===(s=Xa())&&(s=gc,i=$a(),s.pooledCache=i,i.refCount++,null!==i&&(s.pooledCacheLanes|=n),s=i),t.memoizedState={parent:a,cache:s},vs(t),Ta(0,Oa,s)):(0!==(e.lanes&n)&&(xs(e,t),Ns(t,null,null,n),Cs()),s=e.memoizedState,i=t.memoizedState,s.parent!==a?(s={parent:a,cache:a},t.memoizedState=s,0===t.lanes&&(t.memoizedState=t.updateQueue.baseState=s),Ta(0,Oa,a)):(a=i.cache,Ta(0,Oa,a),a!==s.cache&&Pa(t,[Oa],n,!0))),Ro(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(r(156,t.tag))}function cl(e){e.flags|=4}function ul(e,t,n,r,a){if((t=!!(32&e.mode))&&(t=!1),t){if(e.flags|=16777216,(335544128&a)===a)if(e.stateNode.complete)e.flags|=8192;else{if(!su())throw is=ns,es;e.flags|=8192}}else e.flags&=-16777217}function dl(e,t){if("stylesheet"!==t.type||4&t.state.loading)e.flags&=-16777217;else if(e.flags|=16777216,!ih(t)){if(!su())throw is=ns,es;e.flags|=8192}}function hl(e,t){null!==t&&(e.flags|=4),16384&e.flags&&(t=22!==e.tag?De():536870912,e.lanes|=t,Pc|=t)}function fl(e,t){if(!fa)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function pl(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var a=e.child;null!==a;)n|=a.lanes|a.childLanes,r|=65011712&a.subtreeFlags,r|=65011712&a.flags,a.return=e,a=a.sibling;else for(a=e.child;null!==a;)n|=a.lanes|a.childLanes,r|=a.subtreeFlags,r|=a.flags,a.return=e,a=a.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function ml(e,t,n){var a=t.pendingProps;switch(ca(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:case 1:return pl(t),null;case 3:return n=t.stateNode,a=null,null!==e&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),Ea(Oa),Z(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),null!==e&&null!==e.child||(ba(t)?cl(t):null===e||e.memoizedState.isDehydrated&&!(256&t.flags)||(t.flags|=1024,ka())),pl(t),null;case 26:var s=t.type,i=t.memoizedState;return null===e?(cl(t),null!==i?(pl(t),dl(t,i)):(pl(t),ul(t,s,0,0,n))):i?i!==e.memoizedState?(cl(t),pl(t),dl(t,i)):(pl(t),t.flags&=-16777217):((e=e.memoizedProps)!==a&&cl(t),pl(t),ul(t,s,0,0,n)),null;case 27:if(J(t),n=K.current,s=t.type,null!==e&&null!=t.stateNode)e.memoizedProps!==a&&cl(t);else{if(!a){if(null===t.stateNode)throw Error(r(166));return pl(t),null}e=q.current,ba(t)?va(t):(e=Id(s,a,n),t.stateNode=e,cl(t))}return pl(t),null;case 5:if(J(t),s=t.type,null!==e&&null!=t.stateNode)e.memoizedProps!==a&&cl(t);else{if(!a){if(null===t.stateNode)throw Error(r(166));return pl(t),null}if(i=q.current,ba(t))va(t);else{var o=vd(K.current);switch(i){case 1:i=o.createElementNS("http://www.w3.org/2000/svg",s);break;case 2:i=o.createElementNS("http://www.w3.org/1998/Math/MathML",s);break;default:switch(s){case"svg":i=o.createElementNS("http://www.w3.org/2000/svg",s);break;case"math":i=o.createElementNS("http://www.w3.org/1998/Math/MathML",s);break;case"script":(i=o.createElement("div")).innerHTML="<script><\\/script>",i=i.removeChild(i.firstChild);break;case"select":i="string"==typeof a.is?o.createElement("select",{is:a.is}):o.createElement("select"),a.multiple?i.multiple=!0:a.size&&(i.size=a.size);break;default:i="string"==typeof a.is?o.createElement(s,{is:a.is}):o.createElement(s)}}i[He]=t,i[Ue]=a;e:for(o=t.child;null!==o;){if(5===o.tag||6===o.tag)i.appendChild(o.stateNode);else if(4!==o.tag&&27!==o.tag&&null!==o.child){o.child.return=o,o=o.child;continue}if(o===t)break e;for(;null===o.sibling;){if(null===o.return||o.return===t)break e;o=o.return}o.sibling.return=o.return,o=o.sibling}t.stateNode=i;e:switch(pd(i,s,a),s){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break e;case"img":a=!0;break e;default:a=!1}a&&cl(t)}}return pl(t),ul(t,t.type,null===e||e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&null!=t.stateNode)e.memoizedProps!==a&&cl(t);else{if("string"!=typeof a&&null===t.stateNode)throw Error(r(166));if(e=K.current,ba(t)){if(e=t.stateNode,n=t.memoizedProps,a=null,null!==(s=da))switch(s.tag){case 27:case 5:a=s.memoizedProps}e[He]=t,(e=!!(e.nodeValue===n||null!==a&&!0===a.suppressHydrationWarning||dd(e.nodeValue,n)))||ya(t,!0)}else(e=vd(e).createTextNode(a))[He]=t,t.stateNode=e}return pl(t),null;case 31:if(n=t.memoizedState,null===e||null!==e.memoizedState){if(a=ba(t),null!==n){if(null===e){if(!a)throw Error(r(318));if(!(e=null!==(e=t.memoizedState)?e.dehydrated:null))throw Error(r(557));e[He]=t}else wa(),!(128&t.flags)&&(t.memoizedState=null),t.flags|=4;pl(t),e=!1}else n=ka(),null!==e&&null!==e.memoizedState&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return 256&t.flags?(Os(t),t):(Os(t),null);if(128&t.flags)throw Error(r(558))}return pl(t),null;case 13:if(a=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(s=ba(t),null!==a&&null!==a.dehydrated){if(null===e){if(!s)throw Error(r(318));if(!(s=null!==(s=t.memoizedState)?s.dehydrated:null))throw Error(r(317));s[He]=t}else wa(),!(128&t.flags)&&(t.memoizedState=null),t.flags|=4;pl(t),s=!1}else s=ka(),null!==e&&null!==e.memoizedState&&(e.memoizedState.hydrationErrors=s),s=!0;if(!s)return 256&t.flags?(Os(t),t):(Os(t),null)}return Os(t),128&t.flags?(t.lanes=n,t):(n=null!==a,e=null!==e&&null!==e.memoizedState,n&&(s=null,null!==(a=t.child).alternate&&null!==a.alternate.memoizedState&&null!==a.alternate.memoizedState.cachePool&&(s=a.alternate.memoizedState.cachePool.pool),i=null,null!==a.memoizedState&&null!==a.memoizedState.cachePool&&(i=a.memoizedState.cachePool.pool),i!==s&&(a.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),hl(t,t.updateQueue),pl(t),null);case 4:return Z(),null===e&&td(t.stateNode.containerInfo),pl(t),null;case 10:return Ea(t.type),pl(t),null;case 19:if(B($s),null===(a=t.memoizedState))return pl(t),null;if(s=!!(128&t.flags),null===(i=a.rendering))if(s)fl(a,!1);else{if(0!==Cc||null!==e&&128&e.flags)for(e=t.child;null!==e;){if(null!==(i=Bs(e))){for(t.flags|=128,fl(a,!1),e=i.updateQueue,t.updateQueue=e,hl(t,e),t.subtreeFlags=0,e=n,n=t.child;null!==n;)Hr(n,e),n=n.sibling;return H($s,1&$s.current|2),fa&&ia(t,a.treeForkCount),t.child}e=e.sibling}null!==a.tail&&ue()>Rc&&(t.flags|=128,s=!0,fl(a,!1),t.lanes=4194304)}else{if(!s)if(null!==(e=Bs(i))){if(t.flags|=128,s=!0,e=e.updateQueue,t.updateQueue=e,hl(t,e),fl(a,!0),null===a.tail&&"hidden"===a.tailMode&&!i.alternate&&!fa)return pl(t),null}else 2*ue()-a.renderingStartTime>Rc&&536870912!==n&&(t.flags|=128,s=!0,fl(a,!1),t.lanes=4194304);a.isBackwards?(i.sibling=t.child,t.child=i):(null!==(e=a.last)?e.sibling=i:t.child=i,a.last=i)}return null!==a.tail?(e=a.tail,a.rendering=e,a.tail=e.sibling,a.renderingStartTime=ue(),e.sibling=null,n=$s.current,H($s,s?1&n|2:1&n),fa&&ia(t,a.treeForkCount),e):(pl(t),null);case 22:case 23:return Os(t),As(),a=null!==t.memoizedState,null!==e?null!==e.memoizedState!==a&&(t.flags|=8192):a&&(t.flags|=8192),a?!!(536870912&n)&&!(128&t.flags)&&(pl(t),6&t.subtreeFlags&&(t.flags|=8192)):pl(t),null!==(n=t.updateQueue)&&hl(t,n.retryQueue),n=null,null!==e&&null!==e.memoizedState&&null!==e.memoizedState.cachePool&&(n=e.memoizedState.cachePool.pool),a=null,null!==t.memoizedState&&null!==t.memoizedState.cachePool&&(a=t.memoizedState.cachePool.pool),a!==n&&(t.flags|=2048),null!==e&&B(Qa),null;case 24:return n=null,null!==e&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Ea(Oa),pl(t),null;case 25:case 30:return null}throw Error(r(156,t.tag))}function gl(e,t){switch(ca(t),t.tag){case 1:return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return Ea(Oa),Z(),65536&(e=t.flags)&&!(128&e)?(t.flags=-65537&e|128,t):null;case 26:case 27:case 5:return J(t),null;case 31:if(null!==t.memoizedState){if(Os(t),null===t.alternate)throw Error(r(340));wa()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 13:if(Os(t),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(r(340));wa()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return B($s),null;case 4:return Z(),null;case 10:return Ea(t.type),null;case 22:case 23:return Os(t),As(),null!==e&&B(Qa),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 24:return Ea(Oa),null;default:return null}}function yl(e,t){switch(ca(t),t.tag){case 3:Ea(Oa),Z();break;case 26:case 27:case 5:J(t);break;case 4:Z();break;case 31:null!==t.memoizedState&&Os(t);break;case 13:Os(t);break;case 19:B($s);break;case 10:Ea(t.type);break;case 22:case 23:Os(t),As(),null!==e&&B(Qa);break;case 24:Ea(Oa)}}function vl(e,t){try{var n=t.updateQueue,r=null!==n?n.lastEffect:null;if(null!==r){var a=r.next;n=a;do{if((n.tag&e)===e){r=void 0;var s=n.create,i=n.inst;r=s(),i.destroy=r}n=n.next}while(n!==a)}}catch(o){Cu(t,t.return,o)}}function xl(e,t,n){try{var r=t.updateQueue,a=null!==r?r.lastEffect:null;if(null!==a){var s=a.next;r=s;do{if((r.tag&e)===e){var i=r.inst,o=i.destroy;if(void 0!==o){i.destroy=void 0,a=t;var l=n,c=o;try{c()}catch(u){Cu(a,l,u)}}}r=r.next}while(r!==s)}}catch(u){Cu(t,t.return,u)}}function bl(e){var t=e.updateQueue;if(null!==t){var n=e.stateNode;try{Es(t,n)}catch(r){Cu(e,e.return,r)}}}function wl(e,t,n){n.props=Co(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(r){Cu(e,t,r)}}function kl(e,t){try{var n=e.ref;if(null!==n){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;default:r=e.stateNode}"function"==typeof n?e.refCleanup=n(r):n.current=r}}catch(a){Cu(e,t,a)}}function Sl(e,t){var n=e.ref,r=e.refCleanup;if(null!==n)if("function"==typeof r)try{r()}catch(a){Cu(e,t,a)}finally{e.refCleanup=null,null!=(e=e.alternate)&&(e.refCleanup=null)}else if("function"==typeof n)try{n(null)}catch(s){Cu(e,t,s)}else n.current=null}function jl(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&r.focus();break e;case"img":n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(a){Cu(e,e.return,a)}}function Cl(e,t,n){try{var a=e.stateNode;!function(e,t,n,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var s=null,i=null,o=null,l=null,c=null,u=null,d=null;for(p in n){var h=n[p];if(n.hasOwnProperty(p)&&null!=h)switch(p){case"checked":case"value":break;case"defaultValue":c=h;default:a.hasOwnProperty(p)||hd(e,t,p,null,a,h)}}for(var f in a){var p=a[f];if(h=n[f],a.hasOwnProperty(f)&&(null!=p||null!=h))switch(f){case"type":i=p;break;case"name":s=p;break;case"checked":u=p;break;case"defaultChecked":d=p;break;case"value":o=p;break;case"defaultValue":l=p;break;case"children":case"dangerouslySetInnerHTML":if(null!=p)throw Error(r(137,t));break;default:p!==h&&hd(e,t,f,p,a,h)}}return void bt(e,o,l,c,u,d,i,s);case"select":for(i in p=o=l=f=null,n)if(c=n[i],n.hasOwnProperty(i)&&null!=c)switch(i){case"value":break;case"multiple":p=c;default:a.hasOwnProperty(i)||hd(e,t,i,null,a,c)}for(s in a)if(i=a[s],c=n[s],a.hasOwnProperty(s)&&(null!=i||null!=c))switch(s){case"value":f=i;break;case"defaultValue":l=i;break;case"multiple":o=i;default:i!==c&&hd(e,t,s,i,a,c)}return t=l,n=o,a=p,void(null!=f?St(e,!!n,f,!1):!!a!=!!n&&(null!=t?St(e,!!n,t,!0):St(e,!!n,n?[]:"",!1)));case"textarea":for(l in p=f=null,n)if(s=n[l],n.hasOwnProperty(l)&&null!=s&&!a.hasOwnProperty(l))switch(l){case"value":case"children":break;default:hd(e,t,l,null,a,s)}for(o in a)if(s=a[o],i=n[o],a.hasOwnProperty(o)&&(null!=s||null!=i))switch(o){case"value":f=s;break;case"defaultValue":p=s;break;case"children":break;case"dangerouslySetInnerHTML":if(null!=s)throw Error(r(91));break;default:s!==i&&hd(e,t,o,s,a,i)}return void jt(e,f,p);case"option":for(var m in n)if(f=n[m],n.hasOwnProperty(m)&&null!=f&&!a.hasOwnProperty(m))if("selected"===m)e.selected=!1;else hd(e,t,m,null,a,f);for(c in a)if(f=a[c],p=n[c],a.hasOwnProperty(c)&&f!==p&&(null!=f||null!=p))if("selected"===c)e.selected=f&&"function"!=typeof f&&"symbol"!=typeof f;else hd(e,t,c,f,a,p);return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var g in n)f=n[g],n.hasOwnProperty(g)&&null!=f&&!a.hasOwnProperty(g)&&hd(e,t,g,null,a,f);for(u in a)if(f=a[u],p=n[u],a.hasOwnProperty(u)&&f!==p&&(null!=f||null!=p))switch(u){case"children":case"dangerouslySetInnerHTML":if(null!=f)throw Error(r(137,t));break;default:hd(e,t,u,f,a,p)}return;default:if(Pt(t)){for(var y in n)f=n[y],n.hasOwnProperty(y)&&void 0!==f&&!a.hasOwnProperty(y)&&fd(e,t,y,void 0,a,f);for(d in a)f=a[d],p=n[d],!a.hasOwnProperty(d)||f===p||void 0===f&&void 0===p||fd(e,t,d,f,a,p);return}}for(var v in n)f=n[v],n.hasOwnProperty(v)&&null!=f&&!a.hasOwnProperty(v)&&hd(e,t,v,null,a,f);for(h in a)f=a[h],p=n[h],!a.hasOwnProperty(h)||f===p||null==f&&null==p||hd(e,t,h,f,a,p)}(a,e.type,n,t),a[Ue]=t}catch(s){Cu(e,e.return,s)}}function Nl(e){return 5===e.tag||3===e.tag||26===e.tag||27===e.tag&&Ed(e.type)||4===e.tag}function Tl(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||Nl(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(27===e.tag&&Ed(e.type))continue e;if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function El(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?(9===n.nodeType?n.body:"HTML"===n.nodeName?n.ownerDocument.body:n).insertBefore(e,t):((t=9===n.nodeType?n.body:"HTML"===n.nodeName?n.ownerDocument.body:n).appendChild(e),null!=(n=n._reactRootContainer)||null!==t.onclick||(t.onclick=_t));else if(4!==r&&(27===r&&Ed(e.type)&&(n=e.stateNode,t=null),null!==(e=e.child)))for(El(e,t,n),e=e.sibling;null!==e;)El(e,t,n),e=e.sibling}function Ml(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&(27===r&&Ed(e.type)&&(n=e.stateNode),null!==(e=e.child)))for(Ml(e,t,n),e=e.sibling;null!==e;)Ml(e,t,n),e=e.sibling}function Pl(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,a=t.attributes;a.length;)t.removeAttributeNode(a[0]);pd(t,r,n),t[He]=e,t[Ue]=n}catch(s){Cu(e,e.return,s)}}var Ll=!1,Dl=!1,Al=!1,_l="function"==typeof WeakSet?WeakSet:Set,zl=null;function Rl(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Xl(e,n),4&r&&vl(5,n);break;case 1:if(Xl(e,n),4&r)if(e=n.stateNode,null===t)try{e.componentDidMount()}catch(i){Cu(n,n.return,i)}else{var a=Co(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(a,t,e.__reactInternalSnapshotBeforeUpdate)}catch(o){Cu(n,n.return,o)}}64&r&&bl(n),512&r&&kl(n,n.return);break;case 3:if(Xl(e,n),64&r&&null!==(e=n.updateQueue)){if(t=null,null!==n.child)switch(n.child.tag){case 27:case 5:case 1:t=n.child.stateNode}try{Es(e,t)}catch(i){Cu(n,n.return,i)}}break;case 27:null===t&&4&r&&Pl(n);case 26:case 5:Xl(e,n),null===t&&4&r&&jl(n),512&r&&kl(n,n.return);break;case 12:Xl(e,n);break;case 31:Xl(e,n),4&r&&Bl(e,n);break;case 13:Xl(e,n),4&r&&Hl(e,n),64&r&&(null!==(e=n.memoizedState)&&(null!==(e=e.dehydrated)&&function(e,t){var n=e.ownerDocument;if("$~"===e.data)e._reactRetry=t;else if("$?"!==e.data||"loading"!==n.readyState)t();else{var r=function(){t(),n.removeEventListener("DOMContentLoaded",r)};n.addEventListener("DOMContentLoaded",r),e._reactRetry=r}}(e,n=Mu.bind(null,n))));break;case 22:if(!(r=null!==n.memoizedState||Ll)){t=null!==t&&null!==t.memoizedState||Dl,a=Ll;var s=Dl;Ll=r,(Dl=t)&&!s?Gl(e,n,!!(8772&n.subtreeFlags)):Xl(e,n),Ll=a,Dl=s}break;case 30:break;default:Xl(e,n)}}function Fl(e){var t=e.alternate;null!==t&&(e.alternate=null,Fl(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&Ze(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Vl=null,Il=!1;function Ol(e,t,n){for(n=n.child;null!==n;)$l(e,t,n),n=n.sibling}function $l(e,t,n){if(be&&"function"==typeof be.onCommitFiberUnmount)try{be.onCommitFiberUnmount(xe,n)}catch(s){}switch(n.tag){case 26:Dl||Sl(n,t),Ol(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode).parentNode.removeChild(n);break;case 27:Dl||Sl(n,t);var r=Vl,a=Il;Ed(n.type)&&(Vl=n.stateNode,Il=!1),Ol(e,t,n),Od(n.stateNode),Vl=r,Il=a;break;case 5:Dl||Sl(n,t);case 6:if(r=Vl,a=Il,Vl=null,Ol(e,t,n),Il=a,null!==(Vl=r))if(Il)try{(9===Vl.nodeType?Vl.body:"HTML"===Vl.nodeName?Vl.ownerDocument.body:Vl).removeChild(n.stateNode)}catch(i){Cu(n,t,i)}else try{Vl.removeChild(n.stateNode)}catch(i){Cu(n,t,i)}break;case 18:null!==Vl&&(Il?(Md(9===(e=Vl).nodeType?e.body:"HTML"===e.nodeName?e.ownerDocument.body:e,n.stateNode),qh(e)):Md(Vl,n.stateNode));break;case 4:r=Vl,a=Il,Vl=n.stateNode.containerInfo,Il=!0,Ol(e,t,n),Vl=r,Il=a;break;case 0:case 11:case 14:case 15:xl(2,n,t),Dl||xl(4,n,t),Ol(e,t,n);break;case 1:Dl||(Sl(n,t),"function"==typeof(r=n.stateNode).componentWillUnmount&&wl(n,t,r)),Ol(e,t,n);break;case 21:Ol(e,t,n);break;case 22:Dl=(r=Dl)||null!==n.memoizedState,Ol(e,t,n),Dl=r;break;default:Ol(e,t,n)}}function Bl(e,t){if(null===t.memoizedState&&(null!==(e=t.alternate)&&null!==(e=e.memoizedState))){e=e.dehydrated;try{qh(e)}catch(n){Cu(t,t.return,n)}}}function Hl(e,t){if(null===t.memoizedState&&(null!==(e=t.alternate)&&(null!==(e=e.memoizedState)&&null!==(e=e.dehydrated))))try{qh(e)}catch(n){Cu(t,t.return,n)}}function Ul(e,t){var n=function(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return null===t&&(t=e.stateNode=new _l),t;case 22:return null===(t=(e=e.stateNode)._retryCache)&&(t=e._retryCache=new _l),t;default:throw Error(r(435,e.tag))}}(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Pu.bind(null,e,t);t.then(r,r)}})}function Wl(e,t){var n=t.deletions;if(null!==n)for(var a=0;a<n.length;a++){var s=n[a],i=e,o=t,l=o;e:for(;null!==l;){switch(l.tag){case 27:if(Ed(l.type)){Vl=l.stateNode,Il=!1;break e}break;case 5:Vl=l.stateNode,Il=!1;break e;case 3:case 4:Vl=l.stateNode.containerInfo,Il=!0;break e}l=l.return}if(null===Vl)throw Error(r(160));$l(i,o,s),Vl=null,Il=!1,null!==(i=s.alternate)&&(i.return=null),s.return=null}if(13886&t.subtreeFlags)for(t=t.child;null!==t;)Yl(t,e),t=t.sibling}var ql=null;function Yl(e,t){var n=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Wl(t,e),Kl(e),4&a&&(xl(3,e,e.return),vl(3,e),xl(5,e,e.return));break;case 1:Wl(t,e),Kl(e),512&a&&(Dl||null===n||Sl(n,n.return)),64&a&&Ll&&(null!==(e=e.updateQueue)&&(null!==(a=e.callbacks)&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=null===n?a:n.concat(a))));break;case 26:var s=ql;if(Wl(t,e),Kl(e),512&a&&(Dl||null===n||Sl(n,n.return)),4&a){var i=null!==n?n.memoizedState:null;if(a=e.memoizedState,null===n)if(null===a)if(null===e.stateNode){e:{a=e.type,n=e.memoizedProps,s=s.ownerDocument||s;t:switch(a){case"title":(!(i=s.getElementsByTagName("title")[0])||i[Xe]||i[He]||"http://www.w3.org/2000/svg"===i.namespaceURI||i.hasAttribute("itemprop"))&&(i=s.createElement(a),s.head.insertBefore(i,s.querySelector("head > title"))),pd(i,a,n),i[He]=e,nt(i),a=i;break e;case"link":var o=ah("link","href",s).get(a+(n.href||""));if(o)for(var l=0;l<o.length;l++)if((i=o[l]).getAttribute("href")===(null==n.href||""===n.href?null:n.href)&&i.getAttribute("rel")===(null==n.rel?null:n.rel)&&i.getAttribute("title")===(null==n.title?null:n.title)&&i.getAttribute("crossorigin")===(null==n.crossOrigin?null:n.crossOrigin)){o.splice(l,1);break t}pd(i=s.createElement(a),a,n),s.head.appendChild(i);break;case"meta":if(o=ah("meta","content",s).get(a+(n.content||"")))for(l=0;l<o.length;l++)if((i=o[l]).getAttribute("content")===(null==n.content?null:""+n.content)&&i.getAttribute("name")===(null==n.name?null:n.name)&&i.getAttribute("property")===(null==n.property?null:n.property)&&i.getAttribute("http-equiv")===(null==n.httpEquiv?null:n.httpEquiv)&&i.getAttribute("charset")===(null==n.charSet?null:n.charSet)){o.splice(l,1);break t}pd(i=s.createElement(a),a,n),s.head.appendChild(i);break;default:throw Error(r(468,a))}i[He]=e,nt(i),a=i}e.stateNode=a}else sh(s,e.type,e.stateNode);else e.stateNode=Jd(s,a,e.memoizedProps);else i!==a?(null===i?null!==n.stateNode&&(n=n.stateNode).parentNode.removeChild(n):i.count--,null===a?sh(s,e.type,e.stateNode):Jd(s,a,e.memoizedProps)):null===a&&null!==e.stateNode&&Cl(e,e.memoizedProps,n.memoizedProps)}break;case 27:Wl(t,e),Kl(e),512&a&&(Dl||null===n||Sl(n,n.return)),null!==n&&4&a&&Cl(e,e.memoizedProps,n.memoizedProps);break;case 5:if(Wl(t,e),Kl(e),512&a&&(Dl||null===n||Sl(n,n.return)),32&e.flags){s=e.stateNode;try{Nt(s,"")}catch(m){Cu(e,e.return,m)}}4&a&&null!=e.stateNode&&Cl(e,s=e.memoizedProps,null!==n?n.memoizedProps:s),1024&a&&(Al=!0);break;case 6:if(Wl(t,e),Kl(e),4&a){if(null===e.stateNode)throw Error(r(162));a=e.memoizedProps,n=e.stateNode;try{n.nodeValue=a}catch(m){Cu(e,e.return,m)}}break;case 3:if(rh=null,s=ql,ql=Hd(t.containerInfo),Wl(t,e),ql=s,Kl(e),4&a&&null!==n&&n.memoizedState.isDehydrated)try{qh(t.containerInfo)}catch(m){Cu(e,e.return,m)}Al&&(Al=!1,Ql(e));break;case 4:a=ql,ql=Hd(e.stateNode.containerInfo),Wl(t,e),Kl(e),ql=a;break;case 12:default:Wl(t,e),Kl(e);break;case 31:case 19:Wl(t,e),Kl(e),4&a&&(null!==(a=e.updateQueue)&&(e.updateQueue=null,Ul(e,a)));break;case 13:Wl(t,e),Kl(e),8192&e.child.flags&&null!==e.memoizedState!=(null!==n&&null!==n.memoizedState)&&(_c=ue()),4&a&&(null!==(a=e.updateQueue)&&(e.updateQueue=null,Ul(e,a)));break;case 22:s=null!==e.memoizedState;var c=null!==n&&null!==n.memoizedState,u=Ll,d=Dl;if(Ll=u||s,Dl=d||c,Wl(t,e),Dl=d,Ll=u,Kl(e),8192&a)e:for(t=e.stateNode,t._visibility=s?-2&t._visibility:1|t._visibility,s&&(null===n||c||Ll||Dl||Zl(e)),n=null,t=e;;){if(5===t.tag||26===t.tag){if(null===n){c=n=t;try{if(i=c.stateNode,s)"function"==typeof(o=i.style).setProperty?o.setProperty("display","none","important"):o.display="none";else{l=c.stateNode;var h=c.memoizedProps.style,f=null!=h&&h.hasOwnProperty("display")?h.display:null;l.style.display=null==f||"boolean"==typeof f?"":(""+f).trim()}}catch(m){Cu(c,c.return,m)}}}else if(6===t.tag){if(null===n){c=t;try{c.stateNode.nodeValue=s?"":c.memoizedProps}catch(m){Cu(c,c.return,m)}}}else if(18===t.tag){if(null===n){c=t;try{var p=c.stateNode;s?Pd(p,!0):Pd(c.stateNode,!1)}catch(m){Cu(c,c.return,m)}}}else if((22!==t.tag&&23!==t.tag||null===t.memoizedState||t===e)&&null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;null===t.sibling;){if(null===t.return||t.return===e)break e;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}4&a&&(null!==(a=e.updateQueue)&&(null!==(n=a.retryQueue)&&(a.retryQueue=null,Ul(e,n))));case 30:case 21:}}function Kl(e){var t=e.flags;if(2&t){try{for(var n,a=e.return;null!==a;){if(Nl(a)){n=a;break}a=a.return}if(null==n)throw Error(r(160));switch(n.tag){case 27:var s=n.stateNode;Ml(e,Tl(e),s);break;case 5:var i=n.stateNode;32&n.flags&&(Nt(i,""),n.flags&=-33),Ml(e,Tl(e),i);break;case 3:case 4:var o=n.stateNode.containerInfo;El(e,Tl(e),o);break;default:throw Error(r(161))}}catch(l){Cu(e,e.return,l)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function Ql(e){if(1024&e.subtreeFlags)for(e=e.child;null!==e;){var t=e;Ql(t),5===t.tag&&1024&t.flags&&t.stateNode.reset(),e=e.sibling}}function Xl(e,t){if(8772&t.subtreeFlags)for(t=t.child;null!==t;)Rl(e,t.alternate,t),t=t.sibling}function Zl(e){for(e=e.child;null!==e;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:xl(4,t,t.return),Zl(t);break;case 1:Sl(t,t.return);var n=t.stateNode;"function"==typeof n.componentWillUnmount&&wl(t,t.return,n),Zl(t);break;case 27:Od(t.stateNode);case 26:case 5:Sl(t,t.return),Zl(t);break;case 22:null===t.memoizedState&&Zl(t);break;default:Zl(t)}e=e.sibling}}function Gl(e,t,n){for(n=n&&!!(8772&t.subtreeFlags),t=t.child;null!==t;){var r=t.alternate,a=e,s=t,i=s.flags;switch(s.tag){case 0:case 11:case 15:Gl(a,s,n),vl(4,s);break;case 1:if(Gl(a,s,n),"function"==typeof(a=(r=s).stateNode).componentDidMount)try{a.componentDidMount()}catch(c){Cu(r,r.return,c)}if(null!==(a=(r=s).updateQueue)){var o=r.stateNode;try{var l=a.shared.hiddenCallbacks;if(null!==l)for(a.shared.hiddenCallbacks=null,a=0;a<l.length;a++)Ts(l[a],o)}catch(c){Cu(r,r.return,c)}}n&&64&i&&bl(s),kl(s,s.return);break;case 27:Pl(s);case 26:case 5:Gl(a,s,n),n&&null===r&&4&i&&jl(s),kl(s,s.return);break;case 12:Gl(a,s,n);break;case 31:Gl(a,s,n),n&&4&i&&Bl(a,s);break;case 13:Gl(a,s,n),n&&4&i&&Hl(a,s);break;case 22:null===s.memoizedState&&Gl(a,s,n),kl(s,s.return);break;case 30:break;default:Gl(a,s,n)}t=t.sibling}}function Jl(e,t){var n=null;null!==e&&null!==e.memoizedState&&null!==e.memoizedState.cachePool&&(n=e.memoizedState.cachePool.pool),e=null,null!==t.memoizedState&&null!==t.memoizedState.cachePool&&(e=t.memoizedState.cachePool.pool),e!==n&&(null!=e&&e.refCount++,null!=n&&Ba(n))}function ec(e,t){e=null,null!==t.alternate&&(e=t.alternate.memoizedState.cache),(t=t.memoizedState.cache)!==e&&(t.refCount++,null!=e&&Ba(e))}function tc(e,t,n,r){if(10256&t.subtreeFlags)for(t=t.child;null!==t;)nc(e,t,n,r),t=t.sibling}function nc(e,t,n,r){var a=t.flags;switch(t.tag){case 0:case 11:case 15:tc(e,t,n,r),2048&a&&vl(9,t);break;case 1:case 31:case 13:default:tc(e,t,n,r);break;case 3:tc(e,t,n,r),2048&a&&(e=null,null!==t.alternate&&(e=t.alternate.memoizedState.cache),(t=t.memoizedState.cache)!==e&&(t.refCount++,null!=e&&Ba(e)));break;case 12:if(2048&a){tc(e,t,n,r),e=t.stateNode;try{var s=t.memoizedProps,i=s.id,o=s.onPostCommit;"function"==typeof o&&o(i,null===t.alternate?"mount":"update",e.passiveEffectDuration,-0)}catch(l){Cu(t,t.return,l)}}else tc(e,t,n,r);break;case 23:break;case 22:s=t.stateNode,i=t.alternate,null!==t.memoizedState?2&s._visibility?tc(e,t,n,r):ac(e,t):2&s._visibility?tc(e,t,n,r):(s._visibility|=2,rc(e,t,n,r,!!(10256&t.subtreeFlags)||!1)),2048&a&&Jl(i,t);break;case 24:tc(e,t,n,r),2048&a&&ec(t.alternate,t)}}function rc(e,t,n,r,a){for(a=a&&(!!(10256&t.subtreeFlags)||!1),t=t.child;null!==t;){var s=e,i=t,o=n,l=r,c=i.flags;switch(i.tag){case 0:case 11:case 15:rc(s,i,o,l,a),vl(8,i);break;case 23:break;case 22:var u=i.stateNode;null!==i.memoizedState?2&u._visibility?rc(s,i,o,l,a):ac(s,i):(u._visibility|=2,rc(s,i,o,l,a)),a&&2048&c&&Jl(i.alternate,i);break;case 24:rc(s,i,o,l,a),a&&2048&c&&ec(i.alternate,i);break;default:rc(s,i,o,l,a)}t=t.sibling}}function ac(e,t){if(10256&t.subtreeFlags)for(t=t.child;null!==t;){var n=e,r=t,a=r.flags;switch(r.tag){case 22:ac(n,r),2048&a&&Jl(r.alternate,r);break;case 24:ac(n,r),2048&a&&ec(r.alternate,r);break;default:ac(n,r)}t=t.sibling}}var sc=8192;function ic(e,t,n){if(e.subtreeFlags&sc)for(e=e.child;null!==e;)oc(e,t,n),e=e.sibling}function oc(e,t,n){switch(e.tag){case 26:ic(e,t,n),e.flags&sc&&null!==e.memoizedState&&function(e,t,n,r){if(!("stylesheet"!==n.type||"string"==typeof r.media&&!1===matchMedia(r.media).matches||4&n.state.loading)){if(null===n.instance){var a=Kd(r.href),s=t.querySelector(Qd(a));if(s)return null!==(t=s._p)&&"object"==typeof t&&"function"==typeof t.then&&(e.count++,e=lh.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=s,void nt(s);s=t.ownerDocument||t,r=Xd(r),(a=$d.get(a))&&th(r,a),nt(s=s.createElement("link"));var i=s;i._p=new Promise(function(e,t){i.onload=e,i.onerror=t}),pd(s,"link",r),n.instance=s}null===e.stylesheets&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(3&n.state.loading)&&(e.count++,n=lh.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}(n,ql,e.memoizedState,e.memoizedProps);break;case 5:default:ic(e,t,n);break;case 3:case 4:var r=ql;ql=Hd(e.stateNode.containerInfo),ic(e,t,n),ql=r;break;case 22:null===e.memoizedState&&(null!==(r=e.alternate)&&null!==r.memoizedState?(r=sc,sc=16777216,ic(e,t,n),sc=r):ic(e,t,n))}}function lc(e){var t=e.alternate;if(null!==t&&null!==(e=t.child)){t.child=null;do{t=e.sibling,e.sibling=null,e=t}while(null!==e)}}function cc(e){var t=e.deletions;if(16&e.flags){if(null!==t)for(var n=0;n<t.length;n++){var r=t[n];zl=r,hc(r,e)}lc(e)}if(10256&e.subtreeFlags)for(e=e.child;null!==e;)uc(e),e=e.sibling}function uc(e){switch(e.tag){case 0:case 11:case 15:cc(e),2048&e.flags&&xl(9,e,e.return);break;case 3:case 12:default:cc(e);break;case 22:var t=e.stateNode;null!==e.memoizedState&&2&t._visibility&&(null===e.return||13!==e.return.tag)?(t._visibility&=-3,dc(e)):cc(e)}}function dc(e){var t=e.deletions;if(16&e.flags){if(null!==t)for(var n=0;n<t.length;n++){var r=t[n];zl=r,hc(r,e)}lc(e)}for(e=e.child;null!==e;){switch((t=e).tag){case 0:case 11:case 15:xl(8,t,t.return),dc(t);break;case 22:2&(n=t.stateNode)._visibility&&(n._visibility&=-3,dc(t));break;default:dc(t)}e=e.sibling}}function hc(e,t){for(;null!==zl;){var n=zl;switch(n.tag){case 0:case 11:case 15:xl(8,n,t);break;case 23:case 22:if(null!==n.memoizedState&&null!==n.memoizedState.cachePool){var r=n.memoizedState.cachePool.pool;null!=r&&r.refCount++}break;case 24:Ba(n.memoizedState.cache)}if(null!==(r=n.child))r.return=n,zl=r;else e:for(n=e;null!==zl;){var a=(r=zl).sibling,s=r.return;if(Fl(r),r===n){zl=null;break e}if(null!==a){a.return=s,zl=a;break e}zl=s}}}var fc={getCacheForType:function(e){var t=_a(Oa),n=t.data.get(e);return void 0===n&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return _a(Oa).controller.signal}},pc="function"==typeof WeakMap?WeakMap:Map,mc=0,gc=null,yc=null,vc=0,xc=0,bc=null,wc=!1,kc=!1,Sc=!1,jc=0,Cc=0,Nc=0,Tc=0,Ec=0,Mc=0,Pc=0,Lc=null,Dc=null,Ac=!1,_c=0,zc=0,Rc=1/0,Fc=null,Vc=null,Ic=0,Oc=null,$c=null,Bc=0,Hc=0,Uc=null,Wc=null,qc=0,Yc=null;function Kc(){return 2&mc&&0!==vc?vc&-vc:null!==R.T?Uu():Oe()}function Qc(){if(0===Mc)if(536870912&vc&&!fa)Mc=536870912;else{var e=Ne;!(3932160&(Ne<<=1))&&(Ne=262144),Mc=e}return null!==(e=_s.current)&&(e.flags|=32),Mc}function Xc(e,t,n){(e!==gc||2!==xc&&9!==xc)&&null===e.cancelPendingCommit||(ru(e,0),eu(e,vc,Mc,!1)),_e(e,n),2&mc&&e===gc||(e===gc&&(!(2&mc)&&(Tc|=n),4===Cc&&eu(e,vc,Mc,!1)),Fu(e))}function Zc(e,t,n){if(6&mc)throw Error(r(327));for(var a=!n&&!(127&t)&&0===(t&e.expiredLanes)||Pe(e,t),s=a?function(e,t){var n=mc;mc|=2;var a=iu(),s=ou();gc!==e||vc!==t?(Fc=null,Rc=ue()+500,ru(e,t)):kc=Pe(e,t);e:for(;;)try{if(0!==xc&&null!==yc){t=yc;var i=bc;t:switch(xc){case 1:xc=0,bc=null,pu(e,t,i,1);break;case 2:case 9:if(rs(i)){xc=0,bc=null,fu(t);break}t=function(){2!==xc&&9!==xc||gc!==e||(xc=7),Fu(e)},i.then(t,t);break e;case 3:xc=7;break e;case 4:xc=5;break e;case 7:rs(i)?(xc=0,bc=null,fu(t)):(xc=0,bc=null,pu(e,t,i,7));break;case 5:var o=null;switch(yc.tag){case 26:o=yc.memoizedState;case 5:case 27:var l=yc;if(o?ih(o):l.stateNode.complete){xc=0,bc=null;var c=l.sibling;if(null!==c)yc=c;else{var u=l.return;null!==u?(yc=u,mu(u)):yc=null}break t}}xc=0,bc=null,pu(e,t,i,5);break;case 6:xc=0,bc=null,pu(e,t,i,6);break;case 8:nu(),Cc=6;break e;default:throw Error(r(462))}}du();break}catch(d){au(e,d)}return Na=Ca=null,R.H=a,R.A=s,mc=n,null!==yc?0:(gc=null,vc=0,Dr(),Cc)}(e,t):cu(e,t,!0),i=a;;){if(0===s){kc&&!a&&eu(e,t,0,!1);break}if(n=e.current.alternate,!i||Jc(n)){if(2===s){if(i=t,e.errorRecoveryDisabledLanes&i)var o=0;else o=0!==(o=-536870913&e.pendingLanes)?o:536870912&o?536870912:0;if(0!==o){t=o;e:{var l=e;s=Lc;var c=l.current.memoizedState.isDehydrated;if(c&&(ru(l,o).flags|=256),2!==(o=cu(l,o,!1))){if(Sc&&!c){l.errorRecoveryDisabledLanes|=i,Tc|=i,s=4;break e}i=Dc,Dc=s,null!==i&&(null===Dc?Dc=i:Dc.push.apply(Dc,i))}s=o}if(i=!1,2!==s)continue}}if(1===s){ru(e,0),eu(e,t,0,!0);break}e:{switch(a=e,i=s){case 0:case 1:throw Error(r(345));case 4:if((4194048&t)!==t)break;case 6:eu(a,t,Mc,!wc);break e;case 2:Dc=null;break;case 3:case 5:break;default:throw Error(r(329))}if((62914560&t)===t&&10<(s=_c+300-ue())){if(eu(a,t,Mc,!wc),0!==Me(a,0,!0))break e;Bc=t,a.timeoutHandle=Sd(Gc.bind(null,a,n,Dc,Fc,Ac,t,Mc,Tc,Pc,wc,i,"Throttled",-0,0),s)}else Gc(a,n,Dc,Fc,Ac,t,Mc,Tc,Pc,wc,i,null,-0,0)}break}s=cu(e,t,!1),i=!1}Fu(e)}function Gc(e,t,n,r,a,s,i,o,l,c,u,d,h,f){if(e.timeoutHandle=-1,8192&(d=t.subtreeFlags)||!(16785408&~d)){oc(t,s,d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:_t});var p=(62914560&s)===s?_c-ue():(4194048&s)===s?zc-ue():0;if(null!==(p=function(e,t){return e.stylesheets&&0===e.count&&uh(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&uh(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&0===oh&&(oh=62500*function(){if("function"==typeof performance.getEntriesByType){for(var e=0,t=0,n=performance.getEntriesByType("resource"),r=0;r<n.length;r++){var a=n[r],s=a.transferSize,i=a.initiatorType,o=a.duration;if(s&&o&&md(i)){for(i=0,o=a.responseEnd,r+=1;r<n.length;r++){var l=n[r],c=l.startTime;if(c>o)break;var u=l.transferSize,d=l.initiatorType;u&&md(d)&&(i+=u*((l=l.responseEnd)<o?1:(o-c)/(l-c)))}if(--r,t+=8*(s+i)/(a.duration/1e3),10<++e)break}}if(0<e)return t/e/1e6}return navigator.connection&&"number"==typeof(e=navigator.connection.downlink)?e:5}());var a=setTimeout(function(){if(e.waitingForImages=!1,0===e.count&&(e.stylesheets&&uh(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>oh?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(a)}}:null}(d,p)))return Bc=s,e.cancelPendingCommit=p(yu.bind(null,e,t,s,n,r,a,i,o,l,u,d,null,h,f)),void eu(e,s,i,!c)}yu(e,t,s,n,r,a,i,o,l)}function Jc(e){for(var t=e;;){var n=t.tag;if((0===n||11===n||15===n)&&16384&t.flags&&(null!==(n=t.updateQueue)&&null!==(n=n.stores)))for(var r=0;r<n.length;r++){var a=n[r],s=a.getSnapshot;a=a.value;try{if(!er(s(),a))return!1}catch(i){return!1}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function eu(e,t,n,r){t&=~Ec,t&=~Tc,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var a=t;0<a;){var s=31-ke(a),i=1<<s;r[s]=-1,a&=~i}0!==n&&ze(e,n,t)}function tu(){return!!(6&mc)||(Vu(0),!1)}function nu(){if(null!==yc){if(0===xc)var e=yc.return;else Na=Ca=null,li(e=yc),cs=null,us=0,e=yc;for(;null!==e;)yl(e.alternate,e),e=e.return;yc=null}}function ru(e,t){var n=e.timeoutHandle;-1!==n&&(e.timeoutHandle=-1,jd(n)),null!==(n=e.cancelPendingCommit)&&(e.cancelPendingCommit=null,n()),Bc=0,nu(),gc=e,yc=n=Br(e.current,null),vc=t,xc=0,bc=null,wc=!1,kc=Pe(e,t),Sc=!1,Pc=Mc=Ec=Tc=Nc=Cc=0,Dc=Lc=null,Ac=!1,8&t&&(t|=32&t);var r=e.entangledLanes;if(0!==r)for(e=e.entanglements,r&=t;0<r;){var a=31-ke(r),s=1<<a;t|=e[a],r&=~s}return jc=t,Dr(),n}function au(e,t){Us=null,R.H=yo,t===Ja||t===ts?(t=os(),xc=3):t===es?(t=os(),xc=4):xc=t===_o?8:null!==t&&"object"==typeof t&&"function"==typeof t.then?6:1,bc=t,null===yc&&(Cc=1,Mo(e,Xr(t,e.current)))}function su(){var e=_s.current;return null===e||((4194048&vc)===vc?null===zs:!!((62914560&vc)===vc||536870912&vc)&&e===zs)}function iu(){var e=R.H;return R.H=yo,null===e?yo:e}function ou(){var e=R.A;return R.A=fc,e}function lu(){Cc=4,wc||(4194048&vc)!==vc&&null!==_s.current||(kc=!0),!(134217727&Nc)&&!(134217727&Tc)||null===gc||eu(gc,vc,Mc,!1)}function cu(e,t,n){var r=mc;mc|=2;var a=iu(),s=ou();gc===e&&vc===t||(Fc=null,ru(e,t)),t=!1;var i=Cc;e:for(;;)try{if(0!==xc&&null!==yc){var o=yc,l=bc;switch(xc){case 8:nu(),i=6;break e;case 3:case 2:case 9:case 6:null===_s.current&&(t=!0);var c=xc;if(xc=0,bc=null,pu(e,o,l,c),n&&kc){i=0;break e}break;default:c=xc,xc=0,bc=null,pu(e,o,l,c)}}uu(),i=Cc;break}catch(u){au(e,u)}return t&&e.shellSuspendCounter++,Na=Ca=null,mc=r,R.H=a,R.A=s,null===yc&&(gc=null,vc=0,Dr()),i}function uu(){for(;null!==yc;)hu(yc)}function du(){for(;null!==yc&&!le();)hu(yc)}function hu(e){var t=ll(e.alternate,e,jc);e.memoizedProps=e.pendingProps,null===t?mu(e):yc=t}function fu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Yo(n,t,t.pendingProps,t.type,void 0,vc);break;case 11:t=Yo(n,t,t.pendingProps,t.type.render,t.ref,vc);break;case 5:li(t);default:yl(n,t),t=ll(n,t=yc=Hr(t,jc),jc)}e.memoizedProps=e.pendingProps,null===t?mu(e):yc=t}function pu(e,t,n,a){Na=Ca=null,li(t),cs=null,us=0;var s=t.return;try{if(function(e,t,n,a,s){if(n.flags|=32768,null!==a&&"object"==typeof a&&"function"==typeof a.then){if(null!==(t=n.alternate)&&La(t,n,s,!0),null!==(n=_s.current)){switch(n.tag){case 31:case 13:return null===zs?lu():null===n.alternate&&0===Cc&&(Cc=3),n.flags&=-257,n.flags|=65536,n.lanes=s,a===ns?n.flags|=16384:(null===(t=n.updateQueue)?n.updateQueue=new Set([a]):t.add(a),Nu(e,a,s)),!1;case 22:return n.flags|=65536,a===ns?n.flags|=16384:(null===(t=n.updateQueue)?(t={transitions:null,markerInstances:null,retryQueue:new Set([a])},n.updateQueue=t):null===(n=t.retryQueue)?t.retryQueue=new Set([a]):n.add(a),Nu(e,a,s)),!1}throw Error(r(435,n.tag))}return Nu(e,a,s),lu(),!1}if(fa)return null!==(t=_s.current)?(!(65536&t.flags)&&(t.flags|=256),t.flags|=65536,t.lanes=s,a!==ga&&Sa(Xr(e=Error(r(422),{cause:a}),n))):(a!==ga&&Sa(Xr(t=Error(r(423),{cause:a}),n)),(e=e.current.alternate).flags|=65536,s&=-s,e.lanes|=s,a=Xr(a,n),Ss(e,s=Lo(e.stateNode,a,s)),4!==Cc&&(Cc=2)),!1;var i=Error(r(520),{cause:a});if(i=Xr(i,n),null===Lc?Lc=[i]:Lc.push(i),4!==Cc&&(Cc=2),null===t)return!0;a=Xr(a,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=s&-s,n.lanes|=e,Ss(n,e=Lo(n.stateNode,a,e)),!1;case 1:if(t=n.type,i=n.stateNode,!(128&n.flags||"function"!=typeof t.getDerivedStateFromError&&(null===i||"function"!=typeof i.componentDidCatch||null!==Vc&&Vc.has(i))))return n.flags|=65536,s&=-s,n.lanes|=s,Ao(s=Do(s),e,n,a),Ss(n,s),!1}n=n.return}while(null!==n);return!1}(e,s,t,n,vc))return Cc=1,Mo(e,Xr(n,e.current)),void(yc=null)}catch(i){if(null!==s)throw yc=s,i;return Cc=1,Mo(e,Xr(n,e.current)),void(yc=null)}32768&t.flags?(fa||1===a?e=!0:kc||536870912&vc?e=!1:(wc=e=!0,(2===a||9===a||3===a||6===a)&&(null!==(a=_s.current)&&13===a.tag&&(a.flags|=16384))),gu(t,e)):mu(t)}function mu(e){var t=e;do{if(32768&t.flags)return void gu(t,wc);e=t.return;var n=ml(t.alternate,t,jc);if(null!==n)return void(yc=n);if(null!==(t=t.sibling))return void(yc=t);yc=t=e}while(null!==t);0===Cc&&(Cc=5)}function gu(e,t){do{var n=gl(e.alternate,e);if(null!==n)return n.flags&=32767,void(yc=n);if(null!==(n=e.return)&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&null!==(e=e.sibling))return void(yc=e);yc=e=n}while(null!==e);Cc=6,yc=null}function yu(e,t,n,a,s,i,o,l,c){e.cancelPendingCommit=null;do{ku()}while(0!==Ic);if(6&mc)throw Error(r(327));if(null!==t){if(t===e.current)throw Error(r(177));if(i=t.lanes|t.childLanes,function(e,t,n,r,a,s){var i=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var o=e.entanglements,l=e.expirationTimes,c=e.hiddenUpdates;for(n=i&~n;0<n;){var u=31-ke(n),d=1<<u;o[u]=0,l[u]=-1;var h=c[u];if(null!==h)for(c[u]=null,u=0;u<h.length;u++){var f=h[u];null!==f&&(f.lane&=-536870913)}n&=~d}0!==r&&ze(e,r,0),0!==s&&0===a&&0!==e.tag&&(e.suspendedLanes|=s&~(i&~t))}(e,n,i|=Lr,o,l,c),e===gc&&(yc=gc=null,vc=0),$c=t,Oc=e,Bc=n,Hc=i,Uc=s,Wc=a,10256&t.subtreeFlags||10256&t.flags?(e.callbackNode=null,e.callbackPriority=0,ie(pe,function(){return Su(),null})):(e.callbackNode=null,e.callbackPriority=0),a=!!(13878&t.flags),13878&t.subtreeFlags||a){a=R.T,R.T=null,s=F.p,F.p=2,o=mc,mc|=4;try{!function(e,t){if(e=e.containerInfo,gd=wh,ir(e=sr(e))){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{var a=(n=(n=e.ownerDocument)&&n.defaultView||window).getSelection&&n.getSelection();if(a&&0!==a.rangeCount){n=a.anchorNode;var s=a.anchorOffset,i=a.focusNode;a=a.focusOffset;try{n.nodeType,i.nodeType}catch(g){n=null;break e}var o=0,l=-1,c=-1,u=0,d=0,h=e,f=null;t:for(;;){for(var p;h!==n||0!==s&&3!==h.nodeType||(l=o+s),h!==i||0!==a&&3!==h.nodeType||(c=o+a),3===h.nodeType&&(o+=h.nodeValue.length),null!==(p=h.firstChild);)f=h,h=p;for(;;){if(h===e)break t;if(f===n&&++u===s&&(l=o),f===i&&++d===a&&(c=o),null!==(p=h.nextSibling))break;f=(h=f).parentNode}h=p}n=-1===l||-1===c?null:{start:l,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(yd={focusedElem:e,selectionRange:n},wh=!1,zl=t;null!==zl;)if(e=(t=zl).child,1028&t.subtreeFlags&&null!==e)e.return=t,zl=e;else for(;null!==zl;){switch(i=(t=zl).alternate,e=t.flags,t.tag){case 0:if(4&e&&null!==(e=null!==(e=t.updateQueue)?e.events:null))for(n=0;n<e.length;n++)(s=e[n]).ref.impl=s.nextImpl;break;case 11:case 15:case 5:case 26:case 27:case 6:case 4:case 17:break;case 1:if(1024&e&&null!==i){e=void 0,n=t,s=i.memoizedProps,i=i.memoizedState,a=n.stateNode;try{var m=Co(n.type,s);e=a.getSnapshotBeforeUpdate(m,i),a.__reactInternalSnapshotBeforeUpdate=e}catch(y){Cu(n,n.return,y)}}break;case 3:if(1024&e)if(9===(n=(e=t.stateNode.containerInfo).nodeType))Ld(e);else if(1===n)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Ld(e);break;default:e.textContent=""}break;default:if(1024&e)throw Error(r(163))}if(null!==(e=t.sibling)){e.return=t.return,zl=e;break}zl=t.return}}(e,t)}finally{mc=o,F.p=s,R.T=a}}Ic=1,vu(),xu(),bu()}}function vu(){if(1===Ic){Ic=0;var e=Oc,t=$c,n=!!(13878&t.flags);if(13878&t.subtreeFlags||n){n=R.T,R.T=null;var r=F.p;F.p=2;var a=mc;mc|=4;try{Yl(t,e);var s=yd,i=sr(e.containerInfo),o=s.focusedElem,l=s.selectionRange;if(i!==o&&o&&o.ownerDocument&&ar(o.ownerDocument.documentElement,o)){if(null!==l&&ir(o)){var c=l.start,u=l.end;if(void 0===u&&(u=c),"selectionStart"in o)o.selectionStart=c,o.selectionEnd=Math.min(u,o.value.length);else{var d=o.ownerDocument||document,h=d&&d.defaultView||window;if(h.getSelection){var f=h.getSelection(),p=o.textContent.length,m=Math.min(l.start,p),g=void 0===l.end?m:Math.min(l.end,p);!f.extend&&m>g&&(i=g,g=m,m=i);var y=rr(o,m),v=rr(o,g);if(y&&v&&(1!==f.rangeCount||f.anchorNode!==y.node||f.anchorOffset!==y.offset||f.focusNode!==v.node||f.focusOffset!==v.offset)){var x=d.createRange();x.setStart(y.node,y.offset),f.removeAllRanges(),m>g?(f.addRange(x),f.extend(v.node,v.offset)):(x.setEnd(v.node,v.offset),f.addRange(x))}}}}for(d=[],f=o;f=f.parentNode;)1===f.nodeType&&d.push({element:f,left:f.scrollLeft,top:f.scrollTop});for("function"==typeof o.focus&&o.focus(),o=0;o<d.length;o++){var b=d[o];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}wh=!!gd,yd=gd=null}finally{mc=a,F.p=r,R.T=n}}e.current=t,Ic=2}}function xu(){if(2===Ic){Ic=0;var e=Oc,t=$c,n=!!(8772&t.flags);if(8772&t.subtreeFlags||n){n=R.T,R.T=null;var r=F.p;F.p=2;var a=mc;mc|=4;try{Rl(e,t.alternate,t)}finally{mc=a,F.p=r,R.T=n}}Ic=3}}function bu(){if(4===Ic||3===Ic){Ic=0,ce();var e=Oc,t=$c,n=Bc,r=Wc;10256&t.subtreeFlags||10256&t.flags?Ic=5:(Ic=0,$c=Oc=null,wu(e,e.pendingLanes));var a=e.pendingLanes;if(0===a&&(Vc=null),Ie(n),t=t.stateNode,be&&"function"==typeof be.onCommitFiberRoot)try{be.onCommitFiberRoot(xe,t,void 0,!(128&~t.current.flags))}catch(l){}if(null!==r){t=R.T,a=F.p,F.p=2,R.T=null;try{for(var s=e.onRecoverableError,i=0;i<r.length;i++){var o=r[i];s(o.value,{componentStack:o.stack})}}finally{R.T=t,F.p=a}}3&Bc&&ku(),Fu(e),a=e.pendingLanes,261930&n&&42&a?e===Yc?qc++:(qc=0,Yc=e):qc=0,Vu(0)}}function wu(e,t){0===(e.pooledCacheLanes&=t)&&(null!=(t=e.pooledCache)&&(e.pooledCache=null,Ba(t)))}function ku(){return vu(),xu(),bu(),Su()}function Su(){if(5!==Ic)return!1;var e=Oc,t=Hc;Hc=0;var n=Ie(Bc),a=R.T,s=F.p;try{F.p=32>n?32:n,R.T=null,n=Uc,Uc=null;var i=Oc,o=Bc;if(Ic=0,$c=Oc=null,Bc=0,6&mc)throw Error(r(331));var l=mc;if(mc|=4,uc(i.current),nc(i,i.current,o,n),mc=l,Vu(0,!1),be&&"function"==typeof be.onPostCommitFiberRoot)try{be.onPostCommitFiberRoot(xe,i)}catch(c){}return!0}finally{F.p=s,R.T=a,wu(e,t)}}function ju(e,t,n){t=Xr(n,t),null!==(e=ws(e,t=Lo(e.stateNode,t,2),2))&&(_e(e,2),Fu(e))}function Cu(e,t,n){if(3===e.tag)ju(e,e,n);else for(;null!==t;){if(3===t.tag){ju(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===Vc||!Vc.has(r))){e=Xr(n,e),null!==(r=ws(t,n=Do(2),2))&&(Ao(n,r,t,e),_e(r,2),Fu(r));break}}t=t.return}}function Nu(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new pc;var a=new Set;r.set(t,a)}else void 0===(a=r.get(t))&&(a=new Set,r.set(t,a));a.has(n)||(Sc=!0,a.add(n),e=Tu.bind(null,e,t,n),t.then(e,e))}function Tu(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,gc===e&&(vc&n)===n&&(4===Cc||3===Cc&&(62914560&vc)===vc&&300>ue()-_c?!(2&mc)&&ru(e,0):Ec|=n,Pc===vc&&(Pc=0)),Fu(e)}function Eu(e,t){0===t&&(t=De()),null!==(e=zr(e,t))&&(_e(e,t),Fu(e))}function Mu(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),Eu(e,n)}function Pu(e,t){var n=0;switch(e.tag){case 31:case 13:var a=e.stateNode,s=e.memoizedState;null!==s&&(n=s.retryLane);break;case 19:a=e.stateNode;break;case 22:a=e.stateNode._retryCache;break;default:throw Error(r(314))}null!==a&&a.delete(t),Eu(e,n)}var Lu=null,Du=null,Au=!1,_u=!1,zu=!1,Ru=0;function Fu(e){e!==Du&&null===e.next&&(null===Du?Lu=Du=e:Du=Du.next=e),_u=!0,Au||(Au=!0,Nd(function(){6&mc?ie(he,Iu):Ou()}))}function Vu(e,t){if(!zu&&_u){zu=!0;do{for(var n=!1,r=Lu;null!==r;){if(0!==e){var a=r.pendingLanes;if(0===a)var s=0;else{var i=r.suspendedLanes,o=r.pingedLanes;s=(1<<31-ke(42|e)+1)-1,s=201326741&(s&=a&~(i&~o))?201326741&s|1:s?2|s:0}0!==s&&(n=!0,Hu(r,s))}else s=vc,!(3&(s=Me(r,r===gc?s:0,null!==r.cancelPendingCommit||-1!==r.timeoutHandle)))||Pe(r,s)||(n=!0,Hu(r,s));r=r.next}}while(n);zu=!1}}function Iu(){Ou()}function Ou(){_u=Au=!1;var e=0;0!==Ru&&function(){var e=window.event;if(e&&"popstate"===e.type)return e!==kd&&(kd=e,!0);return kd=null,!1}()&&(e=Ru);for(var t=ue(),n=null,r=Lu;null!==r;){var a=r.next,s=$u(r,t);0===s?(r.next=null,null===n?Lu=a:n.next=a,null===a&&(Du=n)):(n=r,(0!==e||3&s)&&(_u=!0)),r=a}0!==Ic&&5!==Ic||Vu(e),0!==Ru&&(Ru=0)}function $u(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,a=e.expirationTimes,s=-62914561&e.pendingLanes;0<s;){var i=31-ke(s),o=1<<i,l=a[i];-1===l?0!==(o&n)&&0===(o&r)||(a[i]=Le(o,t)):l<=t&&(e.expiredLanes|=o),s&=~o}if(n=vc,n=Me(e,e===(t=gc)?n:0,null!==e.cancelPendingCommit||-1!==e.timeoutHandle),r=e.callbackNode,0===n||e===t&&(2===xc||9===xc)||null!==e.cancelPendingCommit)return null!==r&&null!==r&&oe(r),e.callbackNode=null,e.callbackPriority=0;if(!(3&n)||Pe(e,n)){if((t=n&-n)===e.callbackPriority)return t;switch(null!==r&&oe(r),Ie(n)){case 2:case 8:n=fe;break;case 32:default:n=pe;break;case 268435456:n=ge}return r=Bu.bind(null,e),n=ie(n,r),e.callbackPriority=t,e.callbackNode=n,t}return null!==r&&null!==r&&oe(r),e.callbackPriority=2,e.callbackNode=null,2}function Bu(e,t){if(0!==Ic&&5!==Ic)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(ku()&&e.callbackNode!==n)return null;var r=vc;return 0===(r=Me(e,e===gc?r:0,null!==e.cancelPendingCommit||-1!==e.timeoutHandle))?null:(Zc(e,r,t),$u(e,ue()),null!=e.callbackNode&&e.callbackNode===n?Bu.bind(null,e):null)}function Hu(e,t){if(ku())return null;Zc(e,t,!0)}function Uu(){if(0===Ru){var e=Wa;0===e&&(e=Ce,!(261888&(Ce<<=1))&&(Ce=256)),Ru=e}return Ru}function Wu(e){return null==e||"symbol"==typeof e||"boolean"==typeof e?null:"function"==typeof e?e:At(""+e)}function qu(e,t){var n=t.ownerDocument.createElement("input");return n.name=t.name,n.value=t.value,e.id&&n.setAttribute("form",e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}for(var Yu=0;Yu<Nr.length;Yu++){var Ku=Nr[Yu];Tr(Ku.toLowerCase(),"on"+(Ku[0].toUpperCase()+Ku.slice(1)))}Tr(vr,"onAnimationEnd"),Tr(xr,"onAnimationIteration"),Tr(br,"onAnimationStart"),Tr("dblclick","onDoubleClick"),Tr("focusin","onFocus"),Tr("focusout","onBlur"),Tr(wr,"onTransitionRun"),Tr(kr,"onTransitionStart"),Tr(Sr,"onTransitionCancel"),Tr(jr,"onTransitionEnd"),it("onMouseEnter",["mouseout","mouseover"]),it("onMouseLeave",["mouseout","mouseover"]),it("onPointerEnter",["pointerout","pointerover"]),it("onPointerLeave",["pointerout","pointerover"]),st("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),st("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),st("onBeforeInput",["compositionend","keypress","textInput","paste"]),st("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),st("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),st("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Qu="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Xu=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Qu));function Zu(e,t){t=!!(4&t);for(var n=0;n<e.length;n++){var r=e[n],a=r.event;r=r.listeners;e:{var s=void 0;if(t)for(var i=r.length-1;0<=i;i--){var o=r[i],l=o.instance,c=o.currentTarget;if(o=o.listener,l!==s&&a.isPropagationStopped())break e;s=o,a.currentTarget=c;try{s(a)}catch(u){Er(u)}a.currentTarget=null,s=l}else for(i=0;i<r.length;i++){if(l=(o=r[i]).instance,c=o.currentTarget,o=o.listener,l!==s&&a.isPropagationStopped())break e;s=o,a.currentTarget=c;try{s(a)}catch(u){Er(u)}a.currentTarget=null,s=l}}}}function Gu(e,t){var n=t[qe];void 0===n&&(n=t[qe]=new Set);var r=e+"__bubble";n.has(r)||(nd(t,e,2,!1),n.add(r))}function Ju(e,t,n){var r=0;t&&(r|=4),nd(n,e,r,t)}var ed="_reactListening"+Math.random().toString(36).slice(2);function td(e){if(!e[ed]){e[ed]=!0,rt.forEach(function(t){"selectionchange"!==t&&(Xu.has(t)||Ju(t,!1,e),Ju(t,!0,e))});var t=9===e.nodeType?e:e.ownerDocument;null===t||t[ed]||(t[ed]=!0,Ju("selectionchange",!1,t))}}function nd(e,t,n,r){switch(Eh(t)){case 2:var a=kh;break;case 8:a=Sh;break;default:a=jh}n=a.bind(null,t,n,e),a=void 0,!Ut||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(a=!0),r?void 0!==a?e.addEventListener(t,n,{capture:!0,passive:a}):e.addEventListener(t,n,!0):void 0!==a?e.addEventListener(t,n,{passive:a}):e.addEventListener(t,n,!1)}function rd(e,t,n,r,a){var i=r;if(!(1&t||2&t||null===r))e:for(;;){if(null===r)return;var o=r.tag;if(3===o||4===o){var l=r.stateNode.containerInfo;if(l===a)break;if(4===o)for(o=r.return;null!==o;){var c=o.tag;if((3===c||4===c)&&o.stateNode.containerInfo===a)return;o=o.return}for(;null!==l;){if(null===(o=Ge(l)))return;if(5===(c=o.tag)||6===c||26===c||27===c){r=i=o;continue e}l=l.parentNode}}r=r.return}$t(function(){var r=i,a=Rt(n),o=[];e:{var l=Cr.get(e);if(void 0!==l){var c=an,u=e;switch(e){case"keypress":if(0===Xt(n))break e;case"keydown":case"keyup":c=bn;break;case"focusin":u="focus",c=dn;break;case"focusout":u="blur",c=dn;break;case"beforeblur":case"afterblur":c=dn;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":c=cn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":c=un;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":c=kn;break;case vr:case xr:case br:c=hn;break;case jr:c=Sn;break;case"scroll":case"scrollend":c=on;break;case"wheel":c=jn;break;case"copy":case"cut":case"paste":c=fn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":c=wn;break;case"toggle":case"beforetoggle":c=Cn}var d=!!(4&t),h=!d&&("scroll"===e||"scrollend"===e),f=d?null!==l?l+"Capture":null:l;d=[];for(var p,m=r;null!==m;){var g=m;if(p=g.stateNode,5!==(g=g.tag)&&26!==g&&27!==g||null===p||null===f||null!=(g=Bt(m,f))&&d.push(ad(m,g,p)),h)break;m=m.return}0<d.length&&(l=new c(l,u,null,n,a),o.push({event:l,listeners:d}))}}if(!(7&t)){if(c="mouseout"===e||"pointerout"===e,(!(l="mouseover"===e||"pointerover"===e)||n===zt||!(u=n.relatedTarget||n.fromElement)||!Ge(u)&&!u[We])&&(c||l)&&(l=a.window===a?a:(l=a.ownerDocument)?l.defaultView||l.parentWindow:window,c?(c=r,null!==(u=(u=n.relatedTarget||n.toElement)?Ge(u):null)&&(h=s(u),d=u.tag,u!==h||5!==d&&27!==d&&6!==d)&&(u=null)):(c=null,u=r),c!==u)){if(d=cn,g="onMouseLeave",f="onMouseEnter",m="mouse","pointerout"!==e&&"pointerover"!==e||(d=wn,g="onPointerLeave",f="onPointerEnter",m="pointer"),h=null==c?l:et(c),p=null==u?l:et(u),(l=new d(g,m+"leave",c,n,a)).target=h,l.relatedTarget=p,g=null,Ge(a)===r&&((d=new d(f,m+"enter",u,n,a)).target=p,d.relatedTarget=h,g=d),h=g,c&&u)e:{for(d=id,m=u,p=0,g=f=c;g;g=d(g))p++;g=0;for(var y=m;y;y=d(y))g++;for(;0<p-g;)f=d(f),p--;for(;0<g-p;)m=d(m),g--;for(;p--;){if(f===m||null!==m&&f===m.alternate){d=f;break e}f=d(f),m=d(m)}d=null}else d=null;null!==c&&od(o,l,c,d,!1),null!==u&&null!==h&&od(o,h,u,d,!0)}if("select"===(c=(l=r?et(r):window).nodeName&&l.nodeName.toLowerCase())||"input"===c&&"file"===l.type)var v=Hn;else if(Fn(l))if(Un)v=Jn;else{v=Zn;var x=Xn}else!(c=l.nodeName)||"input"!==c.toLowerCase()||"checkbox"!==l.type&&"radio"!==l.type?r&&Pt(r.elementType)&&(v=Hn):v=Gn;switch(v&&(v=v(e,r))?Vn(o,v,n,a):(x&&x(e,l,r),"focusout"===e&&r&&"number"===l.type&&null!=r.memoizedProps.value&&kt(l,"number",l.value)),x=r?et(r):window,e){case"focusin":(Fn(x)||"true"===x.contentEditable)&&(lr=x,cr=r,ur=null);break;case"focusout":ur=cr=lr=null;break;case"mousedown":dr=!0;break;case"contextmenu":case"mouseup":case"dragend":dr=!1,hr(o,n,a);break;case"selectionchange":if(or)break;case"keydown":case"keyup":hr(o,n,a)}var b;if(Tn)e:{switch(e){case"compositionstart":var w="onCompositionStart";break e;case"compositionend":w="onCompositionEnd";break e;case"compositionupdate":w="onCompositionUpdate";break e}w=void 0}else zn?An(e,n)&&(w="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(w="onCompositionStart");w&&(Pn&&"ko"!==n.locale&&(zn||"onCompositionStart"!==w?"onCompositionEnd"===w&&zn&&(b=Qt()):(Yt="value"in(qt=a)?qt.value:qt.textContent,zn=!0)),0<(x=sd(r,w)).length&&(w=new pn(w,e,null,n,a),o.push({event:w,listeners:x}),b?w.data=b:null!==(b=_n(n))&&(w.data=b))),(b=Mn?function(e,t){switch(e){case"compositionend":return _n(t);case"keypress":return 32!==t.which?null:(Dn=!0,Ln);case"textInput":return(e=t.data)===Ln&&Dn?null:e;default:return null}}(e,n):function(e,t){if(zn)return"compositionend"===e||!Tn&&An(e,t)?(e=Qt(),Kt=Yt=qt=null,zn=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Pn&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(w=sd(r,"onBeforeInput")).length&&(x=new pn("onBeforeInput","beforeinput",null,n,a),o.push({event:x,listeners:w}),x.data=b)),function(e,t,n,r,a){if("submit"===t&&n&&n.stateNode===a){var s=Wu((a[Ue]||null).action),i=r.submitter;i&&null!==(t=(t=i[Ue]||null)?Wu(t.formAction):i.getAttribute("formAction"))&&(s=t,i=null);var o=new an("action","action",null,r,a);e.push({event:o,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(0!==Ru){var e=i?qu(a,i):new FormData(a);no(n,{pending:!0,data:e,method:a.method,action:s},null,e)}}else"function"==typeof s&&(o.preventDefault(),e=i?qu(a,i):new FormData(a),no(n,{pending:!0,data:e,method:a.method,action:s},s,e))},currentTarget:a}]})}}(o,e,r,n,a)}Zu(o,t)})}function ad(e,t,n){return{instance:e,listener:t,currentTarget:n}}function sd(e,t){for(var n=t+"Capture",r=[];null!==e;){var a=e,s=a.stateNode;if(5!==(a=a.tag)&&26!==a&&27!==a||null===s||(null!=(a=Bt(e,n))&&r.unshift(ad(e,a,s)),null!=(a=Bt(e,t))&&r.push(ad(e,a,s))),3===e.tag)return r;e=e.return}return[]}function id(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag&&27!==e.tag);return e||null}function od(e,t,n,r,a){for(var s=t._reactName,i=[];null!==n&&n!==r;){var o=n,l=o.alternate,c=o.stateNode;if(o=o.tag,null!==l&&l===r)break;5!==o&&26!==o&&27!==o||null===c||(l=c,a?null!=(c=Bt(n,s))&&i.unshift(ad(n,c,l)):a||null!=(c=Bt(n,s))&&i.push(ad(n,c,l))),n=n.return}0!==i.length&&e.push({event:t,listeners:i})}var ld=/\\r\\n?/g,cd=/\\u0000|\\uFFFD/g;function ud(e){return("string"==typeof e?e:""+e).replace(ld,"\\n").replace(cd,"")}function dd(e,t){return t=ud(t),ud(e)===t}function hd(e,t,n,a,s,i){switch(n){case"children":"string"==typeof a?"body"===t||"textarea"===t&&""===a||Nt(e,a):("number"==typeof a||"bigint"==typeof a)&&"body"!==t&&Nt(e,""+a);break;case"className":dt(e,"class",a);break;case"tabIndex":dt(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":dt(e,n,a);break;case"style":Mt(e,a,i);break;case"data":if("object"!==t){dt(e,"data",a);break}case"src":case"href":if(""===a&&("a"!==t||"href"!==n)){e.removeAttribute(n);break}if(null==a||"function"==typeof a||"symbol"==typeof a||"boolean"==typeof a){e.removeAttribute(n);break}a=At(""+a),e.setAttribute(n,a);break;case"action":case"formAction":if("function"==typeof a){e.setAttribute(n,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}if("function"==typeof i&&("formAction"===n?("input"!==t&&hd(e,t,"name",s.name,s,null),hd(e,t,"formEncType",s.formEncType,s,null),hd(e,t,"formMethod",s.formMethod,s,null),hd(e,t,"formTarget",s.formTarget,s,null)):(hd(e,t,"encType",s.encType,s,null),hd(e,t,"method",s.method,s,null),hd(e,t,"target",s.target,s,null))),null==a||"symbol"==typeof a||"boolean"==typeof a){e.removeAttribute(n);break}a=At(""+a),e.setAttribute(n,a);break;case"onClick":null!=a&&(e.onclick=_t);break;case"onScroll":null!=a&&Gu("scroll",e);break;case"onScrollEnd":null!=a&&Gu("scrollend",e);break;case"dangerouslySetInnerHTML":if(null!=a){if("object"!=typeof a||!("__html"in a))throw Error(r(61));if(null!=(n=a.__html)){if(null!=s.children)throw Error(r(60));e.innerHTML=n}}break;case"multiple":e.multiple=a&&"function"!=typeof a&&"symbol"!=typeof a;break;case"muted":e.muted=a&&"function"!=typeof a&&"symbol"!=typeof a;break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":case"autoFocus":break;case"xlinkHref":if(null==a||"function"==typeof a||"boolean"==typeof a||"symbol"==typeof a){e.removeAttribute("xlink:href");break}n=At(""+a),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":null!=a&&"function"!=typeof a&&"symbol"!=typeof a?e.setAttribute(n,""+a):e.removeAttribute(n);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":a&&"function"!=typeof a&&"symbol"!=typeof a?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":!0===a?e.setAttribute(n,""):!1!==a&&null!=a&&"function"!=typeof a&&"symbol"!=typeof a?e.setAttribute(n,a):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":null!=a&&"function"!=typeof a&&"symbol"!=typeof a&&!isNaN(a)&&1<=a?e.setAttribute(n,a):e.removeAttribute(n);break;case"rowSpan":case"start":null==a||"function"==typeof a||"symbol"==typeof a||isNaN(a)?e.removeAttribute(n):e.setAttribute(n,a);break;case"popover":Gu("beforetoggle",e),Gu("toggle",e),ut(e,"popover",a);break;case"xlinkActuate":ht(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":ht(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":ht(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":ht(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":ht(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":ht(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":ht(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":ht(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":ht(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":ut(e,"is",a);break;case"innerText":case"textContent":break;default:(!(2<n.length)||"o"!==n[0]&&"O"!==n[0]||"n"!==n[1]&&"N"!==n[1])&&ut(e,n=Lt.get(n)||n,a)}}function fd(e,t,n,a,s,i){switch(n){case"style":Mt(e,a,i);break;case"dangerouslySetInnerHTML":if(null!=a){if("object"!=typeof a||!("__html"in a))throw Error(r(61));if(null!=(n=a.__html)){if(null!=s.children)throw Error(r(60));e.innerHTML=n}}break;case"children":"string"==typeof a?Nt(e,a):("number"==typeof a||"bigint"==typeof a)&&Nt(e,""+a);break;case"onScroll":null!=a&&Gu("scroll",e);break;case"onScrollEnd":null!=a&&Gu("scrollend",e);break;case"onClick":null!=a&&(e.onclick=_t);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":case"innerText":case"textContent":break;default:at.hasOwnProperty(n)||("o"!==n[0]||"n"!==n[1]||(s=n.endsWith("Capture"),t=n.slice(2,s?n.length-7:void 0),"function"==typeof(i=null!=(i=e[Ue]||null)?i[n]:null)&&e.removeEventListener(t,i,s),"function"!=typeof a)?n in e?e[n]=a:!0===a?e.setAttribute(n,""):ut(e,n,a):("function"!=typeof i&&null!==i&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,a,s)))}}function pd(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Gu("error",e),Gu("load",e);var a,s=!1,i=!1;for(a in n)if(n.hasOwnProperty(a)){var o=n[a];if(null!=o)switch(a){case"src":s=!0;break;case"srcSet":i=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:hd(e,t,a,o,n,null)}}return i&&hd(e,t,"srcSet",n.srcSet,n,null),void(s&&hd(e,t,"src",n.src,n,null));case"input":Gu("invalid",e);var l=a=o=i=null,c=null,u=null;for(s in n)if(n.hasOwnProperty(s)){var d=n[s];if(null!=d)switch(s){case"name":i=d;break;case"type":o=d;break;case"checked":c=d;break;case"defaultChecked":u=d;break;case"value":a=d;break;case"defaultValue":l=d;break;case"children":case"dangerouslySetInnerHTML":if(null!=d)throw Error(r(137,t));break;default:hd(e,t,s,d,n,null)}}return void wt(e,a,l,c,u,o,i,!1);case"select":for(i in Gu("invalid",e),s=o=a=null,n)if(n.hasOwnProperty(i)&&null!=(l=n[i]))switch(i){case"value":a=l;break;case"defaultValue":o=l;break;case"multiple":s=l;default:hd(e,t,i,l,n,null)}return t=a,n=o,e.multiple=!!s,void(null!=t?St(e,!!s,t,!1):null!=n&&St(e,!!s,n,!0));case"textarea":for(o in Gu("invalid",e),a=i=s=null,n)if(n.hasOwnProperty(o)&&null!=(l=n[o]))switch(o){case"value":s=l;break;case"defaultValue":i=l;break;case"children":a=l;break;case"dangerouslySetInnerHTML":if(null!=l)throw Error(r(91));break;default:hd(e,t,o,l,n,null)}return void Ct(e,s,i,a);case"option":for(c in n)if(n.hasOwnProperty(c)&&null!=(s=n[c]))if("selected"===c)e.selected=s&&"function"!=typeof s&&"symbol"!=typeof s;else hd(e,t,c,s,n,null);return;case"dialog":Gu("beforetoggle",e),Gu("toggle",e),Gu("cancel",e),Gu("close",e);break;case"iframe":case"object":Gu("load",e);break;case"video":case"audio":for(s=0;s<Qu.length;s++)Gu(Qu[s],e);break;case"image":Gu("error",e),Gu("load",e);break;case"details":Gu("toggle",e);break;case"embed":case"source":case"link":Gu("error",e),Gu("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(u in n)if(n.hasOwnProperty(u)&&null!=(s=n[u]))switch(u){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:hd(e,t,u,s,n,null)}return;default:if(Pt(t)){for(d in n)n.hasOwnProperty(d)&&(void 0!==(s=n[d])&&fd(e,t,d,s,n,void 0));return}}for(l in n)n.hasOwnProperty(l)&&(null!=(s=n[l])&&hd(e,t,l,s,n,null))}function md(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}var gd=null,yd=null;function vd(e){return 9===e.nodeType?e:e.ownerDocument}function xd(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function bd(e,t){if(0===e)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return 1===e&&"foreignObject"===t?0:e}function wd(e,t){return"textarea"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"bigint"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var kd=null;var Sd="function"==typeof setTimeout?setTimeout:void 0,jd="function"==typeof clearTimeout?clearTimeout:void 0,Cd="function"==typeof Promise?Promise:void 0,Nd="function"==typeof queueMicrotask?queueMicrotask:void 0!==Cd?function(e){return Cd.resolve(null).then(e).catch(Td)}:Sd;function Td(e){setTimeout(function(){throw e})}function Ed(e){return"head"===e}function Md(e,t){var n=t,r=0;do{var a=n.nextSibling;if(e.removeChild(n),a&&8===a.nodeType)if("/$"===(n=a.data)||"/&"===n){if(0===r)return e.removeChild(a),void qh(t);r--}else if("$"===n||"$?"===n||"$~"===n||"$!"===n||"&"===n)r++;else if("html"===n)Od(e.ownerDocument.documentElement);else if("head"===n){Od(n=e.ownerDocument.head);for(var s=n.firstChild;s;){var i=s.nextSibling,o=s.nodeName;s[Xe]||"SCRIPT"===o||"STYLE"===o||"LINK"===o&&"stylesheet"===s.rel.toLowerCase()||n.removeChild(s),s=i}}else"body"===n&&Od(e.ownerDocument.body);n=a}while(n);qh(t)}function Pd(e,t){var n=e;e=0;do{var r=n.nextSibling;if(1===n.nodeType?t?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",""===n.getAttribute("style")&&n.removeAttribute("style")):3===n.nodeType&&(t?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),r&&8===r.nodeType)if("/$"===(n=r.data)){if(0===e)break;e--}else"$"!==n&&"$?"!==n&&"$~"!==n&&"$!"!==n||e++;n=r}while(n)}function Ld(e){var t=e.firstChild;for(t&&10===t.nodeType&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":Ld(n),Ze(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if("stylesheet"===n.rel.toLowerCase())continue}e.removeChild(n)}}function Dd(e,t){for(;8!==e.nodeType;){if((1!==e.nodeType||"INPUT"!==e.nodeName||"hidden"!==e.type)&&!t)return null;if(null===(e=zd(e.nextSibling)))return null}return e}function Ad(e){return"$?"===e.data||"$~"===e.data}function _d(e){return"$!"===e.data||"$?"===e.data&&"loading"!==e.ownerDocument.readyState}function zd(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t||"$~"===t||"&"===t||"F!"===t||"F"===t)break;if("/$"===t||"/&"===t)return null}}return e}var Rd=null;function Fd(e){e=e.nextSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n||"/&"===n){if(0===t)return zd(e.nextSibling);t--}else"$"!==n&&"$!"!==n&&"$?"!==n&&"$~"!==n&&"&"!==n||t++}e=e.nextSibling}return null}function Vd(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n||"$~"===n||"&"===n){if(0===t)return e;t--}else"/$"!==n&&"/&"!==n||t++}e=e.previousSibling}return null}function Id(e,t,n){switch(t=vd(n),e){case"html":if(!(e=t.documentElement))throw Error(r(452));return e;case"head":if(!(e=t.head))throw Error(r(453));return e;case"body":if(!(e=t.body))throw Error(r(454));return e;default:throw Error(r(451))}}function Od(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Ze(e)}var $d=new Map,Bd=new Set;function Hd(e){return"function"==typeof e.getRootNode?e.getRootNode():9===e.nodeType?e:e.ownerDocument}var Ud=F.d;F.d={f:function(){var e=Ud.f(),t=tu();return e||t},r:function(e){var t=Je(e);null!==t&&5===t.tag&&"form"===t.type?ao(t):Ud.r(e)},D:function(e){Ud.D(e),qd("dns-prefetch",e,null)},C:function(e,t){Ud.C(e,t),qd("preconnect",e,t)},L:function(e,t,n){Ud.L(e,t,n);var r=Wd;if(r&&e&&t){var a='link[rel="preload"][as="'+xt(t)+'"]';"image"===t&&n&&n.imageSrcSet?(a+='[imagesrcset="'+xt(n.imageSrcSet)+'"]',"string"==typeof n.imageSizes&&(a+='[imagesizes="'+xt(n.imageSizes)+'"]')):a+='[href="'+xt(e)+'"]';var s=a;switch(t){case"style":s=Kd(e);break;case"script":s=Zd(e)}$d.has(s)||(e=u({rel:"preload",href:"image"===t&&n&&n.imageSrcSet?void 0:e,as:t},n),$d.set(s,e),null!==r.querySelector(a)||"style"===t&&r.querySelector(Qd(s))||"script"===t&&r.querySelector(Gd(s))||(pd(t=r.createElement("link"),"link",e),nt(t),r.head.appendChild(t)))}},m:function(e,t){Ud.m(e,t);var n=Wd;if(n&&e){var r=t&&"string"==typeof t.as?t.as:"script",a='link[rel="modulepreload"][as="'+xt(r)+'"][href="'+xt(e)+'"]',s=a;switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":s=Zd(e)}if(!$d.has(s)&&(e=u({rel:"modulepreload",href:e},t),$d.set(s,e),null===n.querySelector(a))){switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(Gd(s)))return}pd(r=n.createElement("link"),"link",e),nt(r),n.head.appendChild(r)}}},X:function(e,t){Ud.X(e,t);var n=Wd;if(n&&e){var r=tt(n).hoistableScripts,a=Zd(e),s=r.get(a);s||((s=n.querySelector(Gd(a)))||(e=u({src:e,async:!0},t),(t=$d.get(a))&&nh(e,t),nt(s=n.createElement("script")),pd(s,"link",e),n.head.appendChild(s)),s={type:"script",instance:s,count:1,state:null},r.set(a,s))}},S:function(e,t,n){Ud.S(e,t,n);var r=Wd;if(r&&e){var a=tt(r).hoistableStyles,s=Kd(e);t=t||"default";var i=a.get(s);if(!i){var o={loading:0,preload:null};if(i=r.querySelector(Qd(s)))o.loading=5;else{e=u({rel:"stylesheet",href:e,"data-precedence":t},n),(n=$d.get(s))&&th(e,n);var l=i=r.createElement("link");nt(l),pd(l,"link",e),l._p=new Promise(function(e,t){l.onload=e,l.onerror=t}),l.addEventListener("load",function(){o.loading|=1}),l.addEventListener("error",function(){o.loading|=2}),o.loading|=4,eh(i,t,r)}i={type:"stylesheet",instance:i,count:1,state:o},a.set(s,i)}}},M:function(e,t){Ud.M(e,t);var n=Wd;if(n&&e){var r=tt(n).hoistableScripts,a=Zd(e),s=r.get(a);s||((s=n.querySelector(Gd(a)))||(e=u({src:e,async:!0,type:"module"},t),(t=$d.get(a))&&nh(e,t),nt(s=n.createElement("script")),pd(s,"link",e),n.head.appendChild(s)),s={type:"script",instance:s,count:1,state:null},r.set(a,s))}}};var Wd="undefined"==typeof document?null:document;function qd(e,t,n){var r=Wd;if(r&&"string"==typeof t&&t){var a=xt(t);a='link[rel="'+e+'"][href="'+a+'"]',"string"==typeof n&&(a+='[crossorigin="'+n+'"]'),Bd.has(a)||(Bd.add(a),e={rel:e,crossOrigin:n,href:t},null===r.querySelector(a)&&(pd(t=r.createElement("link"),"link",e),nt(t),r.head.appendChild(t)))}}function Yd(e,t,n,a){var s,i,o,l,c=(c=K.current)?Hd(c):null;if(!c)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return"string"==typeof n.precedence&&"string"==typeof n.href?(t=Kd(n.href),(a=(n=tt(c).hoistableStyles).get(t))||(a={type:"style",instance:null,count:0,state:null},n.set(t,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if("stylesheet"===n.rel&&"string"==typeof n.href&&"string"==typeof n.precedence){e=Kd(n.href);var u=tt(c).hoistableStyles,d=u.get(e);if(d||(c=c.ownerDocument||c,d={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(e,d),(u=c.querySelector(Qd(e)))&&!u._p&&(d.instance=u,d.state.loading=5),$d.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},$d.set(e,n),u||(s=c,i=e,o=n,l=d.state,s.querySelector('link[rel="preload"][as="style"]['+i+"]")?l.loading=1:(i=s.createElement("link"),l.preload=i,i.addEventListener("load",function(){return l.loading|=1}),i.addEventListener("error",function(){return l.loading|=2}),pd(i,"link",o),nt(i),s.head.appendChild(i))))),t&&null===a)throw Error(r(528,""));return d}if(t&&null!==a)throw Error(r(529,""));return null;case"script":return t=n.async,"string"==typeof(n=n.src)&&t&&"function"!=typeof t&&"symbol"!=typeof t?(t=Zd(n),(a=(n=tt(c).hoistableScripts).get(t))||(a={type:"script",instance:null,count:0,state:null},n.set(t,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function Kd(e){return'href="'+xt(e)+'"'}function Qd(e){return'link[rel="stylesheet"]['+e+"]"}function Xd(e){return u({},e,{"data-precedence":e.precedence,precedence:null})}function Zd(e){return'[src="'+xt(e)+'"]'}function Gd(e){return"script[async]"+e}function Jd(e,t,n){if(t.count++,null===t.instance)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+xt(n.href)+'"]');if(a)return t.instance=a,nt(a),a;var s=u({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return nt(a=(e.ownerDocument||e).createElement("style")),pd(a,"style",s),eh(a,n.precedence,e),t.instance=a;case"stylesheet":s=Kd(n.href);var i=e.querySelector(Qd(s));if(i)return t.state.loading|=4,t.instance=i,nt(i),i;a=Xd(n),(s=$d.get(s))&&th(a,s),nt(i=(e.ownerDocument||e).createElement("link"));var o=i;return o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),pd(i,"link",a),t.state.loading|=4,eh(i,n.precedence,e),t.instance=i;case"script":return i=Zd(n.src),(s=e.querySelector(Gd(i)))?(t.instance=s,nt(s),s):(a=n,(s=$d.get(i))&&nh(a=u({},n),s),nt(s=(e=e.ownerDocument||e).createElement("script")),pd(s,"link",a),e.head.appendChild(s),t.instance=s);case"void":return null;default:throw Error(r(443,t.type))}else"stylesheet"===t.type&&!(4&t.state.loading)&&(a=t.instance,t.state.loading|=4,eh(a,n.precedence,e));return t.instance}function eh(e,t,n){for(var r=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),a=r.length?r[r.length-1]:null,s=a,i=0;i<r.length;i++){var o=r[i];if(o.dataset.precedence===t)s=o;else if(s!==a)break}s?s.parentNode.insertBefore(e,s.nextSibling):(t=9===n.nodeType?n.head:n).insertBefore(e,t.firstChild)}function th(e,t){null==e.crossOrigin&&(e.crossOrigin=t.crossOrigin),null==e.referrerPolicy&&(e.referrerPolicy=t.referrerPolicy),null==e.title&&(e.title=t.title)}function nh(e,t){null==e.crossOrigin&&(e.crossOrigin=t.crossOrigin),null==e.referrerPolicy&&(e.referrerPolicy=t.referrerPolicy),null==e.integrity&&(e.integrity=t.integrity)}var rh=null;function ah(e,t,n){if(null===rh){var r=new Map,a=rh=new Map;a.set(n,r)}else(r=(a=rh).get(n))||(r=new Map,a.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),a=0;a<n.length;a++){var s=n[a];if(!(s[Xe]||s[He]||"link"===e&&"stylesheet"===s.getAttribute("rel"))&&"http://www.w3.org/2000/svg"!==s.namespaceURI){var i=s.getAttribute(t)||"";i=e+i;var o=r.get(i);o?o.push(s):r.set(i,[s])}}return r}function sh(e,t,n){(e=e.ownerDocument||e).head.insertBefore(n,"title"===t?e.querySelector("head > title"):null)}function ih(e){return!!("stylesheet"!==e.type||3&e.state.loading)}var oh=0;function lh(){if(this.count--,0===this.count&&(0===this.imgCount||!this.waitingForImages))if(this.stylesheets)uh(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}var ch=null;function uh(e,t){e.stylesheets=null,null!==e.unsuspend&&(e.count++,ch=new Map,t.forEach(dh,e),ch=null,lh.call(e))}function dh(e,t){if(!(4&t.state.loading)){var n=ch.get(e);if(n)var r=n.get(null);else{n=new Map,ch.set(e,n);for(var a=e.querySelectorAll("link[data-precedence],style[data-precedence]"),s=0;s<a.length;s++){var i=a[s];"LINK"!==i.nodeName&&"not all"===i.getAttribute("media")||(n.set(i.dataset.precedence,i),r=i)}r&&n.set(null,r)}i=(a=t.instance).getAttribute("data-precedence"),(s=n.get(i)||r)===r&&n.set(null,a),n.set(i,a),this.count++,r=lh.bind(this),a.addEventListener("load",r),a.addEventListener("error",r),s?s.parentNode.insertBefore(a,s.nextSibling):(e=9===e.nodeType?e.head:e).insertBefore(a,e.firstChild),t.state.loading|=4}}var hh={$$typeof:w,Provider:null,Consumer:null,_currentValue:V,_currentValue2:V,_threadCount:0};function fh(e,t,n,r,a,s,i,o,l){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Ae(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ae(0),this.hiddenUpdates=Ae(null),this.identifierPrefix=r,this.onUncaughtError=a,this.onCaughtError=s,this.onRecoverableError=i,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=l,this.incompleteTransitions=new Map}function ph(e,t,n,r,a,s,i,o,l,c,u,d){return e=new fh(e,t,n,i,l,c,u,d,o),t=1,!0===s&&(t|=24),s=Or(3,null,null,t),e.current=s,s.stateNode=e,(t=$a()).refCount++,e.pooledCache=t,t.refCount++,s.memoizedState={element:r,isDehydrated:n,cache:t},vs(s),e}function mh(e){return e?e=Vr:Vr}function gh(e,t,n,r,a,s){a=mh(a),null===r.context?r.context=a:r.pendingContext=a,(r=bs(t)).payload={element:n},null!==(s=void 0===s?null:s)&&(r.callback=s),null!==(n=ws(e,r,t))&&(Xc(n,0,t),ks(n,e,t))}function yh(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function vh(e,t){yh(e,t),(e=e.alternate)&&yh(e,t)}function xh(e){if(13===e.tag||31===e.tag){var t=zr(e,67108864);null!==t&&Xc(t,0,67108864),vh(e,67108864)}}function bh(e){if(13===e.tag||31===e.tag){var t=Kc(),n=zr(e,t=Ve(t));null!==n&&Xc(n,0,t),vh(e,t)}}var wh=!0;function kh(e,t,n,r){var a=R.T;R.T=null;var s=F.p;try{F.p=2,jh(e,t,n,r)}finally{F.p=s,R.T=a}}function Sh(e,t,n,r){var a=R.T;R.T=null;var s=F.p;try{F.p=8,jh(e,t,n,r)}finally{F.p=s,R.T=a}}function jh(e,t,n,r){if(wh){var a=Ch(r);if(null===a)rd(e,t,r,Nh,n),Fh(e,r);else if(function(e,t,n,r,a){switch(t){case"focusin":return Ph=Vh(Ph,e,t,n,r,a),!0;case"dragenter":return Lh=Vh(Lh,e,t,n,r,a),!0;case"mouseover":return Dh=Vh(Dh,e,t,n,r,a),!0;case"pointerover":var s=a.pointerId;return Ah.set(s,Vh(Ah.get(s)||null,e,t,n,r,a)),!0;case"gotpointercapture":return s=a.pointerId,_h.set(s,Vh(_h.get(s)||null,e,t,n,r,a)),!0}return!1}(a,e,t,n,r))r.stopPropagation();else if(Fh(e,r),4&t&&-1<Rh.indexOf(e)){for(;null!==a;){var s=Je(a);if(null!==s)switch(s.tag){case 3:if((s=s.stateNode).current.memoizedState.isDehydrated){var i=Ee(s.pendingLanes);if(0!==i){var o=s;for(o.pendingLanes|=2,o.entangledLanes|=2;i;){var l=1<<31-ke(i);o.entanglements[1]|=l,i&=~l}Fu(s),!(6&mc)&&(Rc=ue()+500,Vu(0))}}break;case 31:case 13:null!==(o=zr(s,2))&&Xc(o,0,2),tu(),vh(s,2)}if(null===(s=Ch(r))&&rd(e,t,r,Nh,n),s===a)break;a=s}null!==a&&r.stopPropagation()}else rd(e,t,r,null,n)}}function Ch(e){return Th(e=Rt(e))}var Nh=null;function Th(e){if(Nh=null,null!==(e=Ge(e))){var t=s(e);if(null===t)e=null;else{var n=t.tag;if(13===n){if(null!==(e=i(t)))return e;e=null}else if(31===n){if(null!==(e=o(t)))return e;e=null}else if(3===n){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Nh=e,null}function Eh(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(de()){case he:return 2;case fe:return 8;case pe:case me:return 32;case ge:return 268435456;default:return 32}default:return 32}}var Mh=!1,Ph=null,Lh=null,Dh=null,Ah=new Map,_h=new Map,zh=[],Rh="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function Fh(e,t){switch(e){case"focusin":case"focusout":Ph=null;break;case"dragenter":case"dragleave":Lh=null;break;case"mouseover":case"mouseout":Dh=null;break;case"pointerover":case"pointerout":Ah.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":_h.delete(t.pointerId)}}function Vh(e,t,n,r,a,s){return null===e||e.nativeEvent!==s?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:s,targetContainers:[a]},null!==t&&(null!==(t=Je(t))&&xh(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==a&&-1===t.indexOf(a)&&t.push(a),e)}function Ih(e){var t=Ge(e.target);if(null!==t){var n=s(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=i(n)))return e.blockedOn=t,void $e(e.priority,function(){bh(n)})}else if(31===t){if(null!==(t=o(n)))return e.blockedOn=t,void $e(e.priority,function(){bh(n)})}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function Oh(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=Ch(e.nativeEvent);if(null!==n)return null!==(t=Je(n))&&xh(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);zt=r,n.target.dispatchEvent(r),zt=null,t.shift()}return!0}function $h(e,t,n){Oh(e)&&n.delete(t)}function Bh(){Mh=!1,null!==Ph&&Oh(Ph)&&(Ph=null),null!==Lh&&Oh(Lh)&&(Lh=null),null!==Dh&&Oh(Dh)&&(Dh=null),Ah.forEach($h),_h.forEach($h)}function Hh(t,n){t.blockedOn===n&&(t.blockedOn=null,Mh||(Mh=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,Bh)))}var Uh=null;function Wh(t){Uh!==t&&(Uh=t,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Uh===t&&(Uh=null);for(var e=0;e<t.length;e+=3){var n=t[e],r=t[e+1],a=t[e+2];if("function"!=typeof r){if(null===Th(r||n))continue;break}var s=Je(n);null!==s&&(t.splice(e,3),e-=3,no(s,{pending:!0,data:a,method:n.method,action:r},r,a))}}))}function qh(e){function t(t){return Hh(t,e)}null!==Ph&&Hh(Ph,e),null!==Lh&&Hh(Lh,e),null!==Dh&&Hh(Dh,e),Ah.forEach(t),_h.forEach(t);for(var n=0;n<zh.length;n++){var r=zh[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<zh.length&&null===(n=zh[0]).blockedOn;)Ih(n),null===n.blockedOn&&zh.shift();if(null!=(n=(e.ownerDocument||e).$$reactFormReplay))for(r=0;r<n.length;r+=3){var a=n[r],s=n[r+1],i=a[Ue]||null;if("function"==typeof s)i||Wh(n);else if(i){var o=null;if(s&&s.hasAttribute("formAction")){if(a=s,i=s[Ue]||null)o=i.formAction;else if(null!==Th(a))continue}else o=i.action;"function"==typeof o?n[r+1]=o:(n.splice(r,3),r-=3),Wh(n)}}}function Yh(){function e(e){e.canIntercept&&"react-transition"===e.info&&e.intercept({handler:function(){return new Promise(function(e){return a=e})},focusReset:"manual",scroll:"manual"})}function t(){null!==a&&(a(),a=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&null!=e.url&&navigation.navigate(e.url,{state:e.getState(),info:"react-transition",history:"replace"})}}if("object"==typeof navigation){var r=!1,a=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),null!==a&&(a(),a=null)}}}function Kh(e){this._internalRoot=e}function Qh(e){this._internalRoot=e}Qh.prototype.render=Kh.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(r(409));gh(t.current,Kc(),e,t,null,null)},Qh.prototype.unmount=Kh.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;gh(e.current,2,null,e,null,null),tu(),t[We]=null}},Qh.prototype.unstable_scheduleHydration=function(e){if(e){var t=Oe();e={blockedOn:null,target:e,priority:t};for(var n=0;n<zh.length&&0!==t&&t<zh[n].priority;n++);zh.splice(n,0,e),0===n&&Ih(e)}};var Xh=t.version;if("19.2.4"!==Xh)throw Error(r(527,Xh,"19.2.4"));F.findDOMNode=function(e){var t=e._reactInternals;if(void 0===t){if("function"==typeof e.render)throw Error(r(188));throw e=Object.keys(e).join(","),Error(r(268,e))}return e=function(e){var t=e.alternate;if(!t){if(null===(t=s(e)))throw Error(r(188));return t!==e?null:e}for(var n=e,a=t;;){var i=n.return;if(null===i)break;var o=i.alternate;if(null===o){if(null!==(a=i.return)){n=a;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return l(i),e;if(o===a)return l(i),t;o=o.sibling}throw Error(r(188))}if(n.return!==a.return)n=i,a=o;else{for(var c=!1,u=i.child;u;){if(u===n){c=!0,n=i,a=o;break}if(u===a){c=!0,a=i,n=o;break}u=u.sibling}if(!c){for(u=o.child;u;){if(u===n){c=!0,n=o,a=i;break}if(u===a){c=!0,a=o,n=i;break}u=u.sibling}if(!c)throw Error(r(189))}}if(n.alternate!==a)throw Error(r(190))}if(3!==n.tag)throw Error(r(188));return n.stateNode.current===n?e:t}(t),e=null===(e=null!==e?c(e):null)?null:e.stateNode};var Zh={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:R,reconcilerVersion:"19.2.4"};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var Gh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Gh.isDisabled&&Gh.supportsFiber)try{xe=Gh.inject(Zh),be=Gh}catch(ef){}}return y.createRoot=function(e,t){if(!a(e))throw Error(r(299));var n=!1,s="",i=No,o=To,l=Eo;return null!=t&&(!0===t.unstable_strictMode&&(n=!0),void 0!==t.identifierPrefix&&(s=t.identifierPrefix),void 0!==t.onUncaughtError&&(i=t.onUncaughtError),void 0!==t.onCaughtError&&(o=t.onCaughtError),void 0!==t.onRecoverableError&&(l=t.onRecoverableError)),t=ph(e,1,!1,null,0,n,s,null,i,o,l,Yh),e[We]=t.current,td(e),new Kh(t)},y.hydrateRoot=function(e,t,n){if(!a(e))throw Error(r(299));var s=!1,i="",o=No,l=To,c=Eo,u=null;return null!=n&&(!0===n.unstable_strictMode&&(s=!0),void 0!==n.identifierPrefix&&(i=n.identifierPrefix),void 0!==n.onUncaughtError&&(o=n.onUncaughtError),void 0!==n.onCaughtError&&(l=n.onCaughtError),void 0!==n.onRecoverableError&&(c=n.onRecoverableError),void 0!==n.formState&&(u=n.formState)),(t=ph(e,1,!0,t,0,s,i,u,o,l,c,Yh)).context=mh(null),n=t.current,(i=bs(s=Ve(s=Kc()))).callback=null,ws(n,i,s),n=s,t.current.lanes=n,_e(t,n),Fu(t),e[We]=t.current,td(e),new Qh(t)},y.version="19.2.4",y}var P=(j||(j=1,function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),g.exports=M()),g.exports);const L=e=>{let t;const n=new Set,r=(e,r)=>{const a="function"==typeof e?e(t):e;if(!Object.is(a,t)){const e=t;t=(null!=r?r:"object"!=typeof a||null===a)?a:Object.assign({},t,a),n.forEach(n=>n(t,e))}},a=()=>t,s={setState:r,getState:a,getInitialState:()=>i,subscribe:e=>(n.add(e),()=>n.delete(e))},i=t=e(r,a,s);return s},D=e=>e;const A=e=>{const t=(e=>e?L(e):L)(e),n=e=>function(e,t=D){const n=f.useSyncExternalStore(e.subscribe,f.useCallback(()=>t(e.getState()),[e,t]),f.useCallback(()=>t(e.getInitialState()),[e,t]));return f.useDebugValue(n),n}(t,e);return Object.assign(n,t),n};async function _(e){const t=await fetch(\`\${e}\`);if(!t.ok)throw new Error(\`\${t.status} \${t.statusText}\`);return t.json()}async function z(e,t){const n=await fetch(\`\${e}\`,{method:"POST",headers:t?{"Content-Type":"application/json"}:void 0,body:t?JSON.stringify(t):void 0});if(!n.ok){const e=await n.json().catch(()=>({}));throw new Error(e.message??\`\${n.status} \${n.statusText}\`)}return n.json()}async function R(e,t){const n={};t&&(n["Content-Type"]="application/json");const r=await fetch(\`\${e}\`,{method:"PATCH",headers:Object.keys(n).length>0?n:void 0,body:t?JSON.stringify(t):void 0});if(!r.ok){const e=await r.json().catch(()=>({}));throw new Error(e.message??\`\${r.status} \${r.statusText}\`)}return r.json()}async function F(e){const t=await fetch(\`\${e}\`,{method:"DELETE"});if(!t.ok){const e=await t.json().catch(()=>({}));throw new Error(e.error??\`\${t.status} \${t.statusText}\`)}return t.json()}async function V(){return await _("/api/local/config")}const I=h.createContext({});function O(e){const t=h.useRef(null);return null===t.current&&(t.current=e()),t.current}const $="undefined"!=typeof window,B=$?h.useLayoutEffect:h.useEffect,H=h.createContext(null);function U(e,t){-1===e.indexOf(t)&&e.push(t)}function W(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const q=(e,t,n)=>n>t?t:n<e?e:n;const Y={},K=e=>/^-?(?:\\d+(?:\\.\\d+)?|\\.\\d+)$/u.test(e);function Q(e){return"object"==typeof e&&null!==e}const X=e=>/^0[^.\\s]+$/u.test(e);function Z(e){let t;return()=>(void 0===t&&(t=e()),t)}const G=e=>e,J=(e,t)=>n=>t(e(n)),ee=(...e)=>e.reduce(J),te=(e,t,n)=>{const r=t-e;return 0===r?1:(n-e)/r};class ne{constructor(){this.subscriptions=[]}add(e){return U(this.subscriptions,e),()=>W(this.subscriptions,e)}notify(e,t,n){const r=this.subscriptions.length;if(r)if(1===r)this.subscriptions[0](e,t,n);else for(let a=0;a<r;a++){const r=this.subscriptions[a];r&&r(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const re=e=>1e3*e,ae=e=>e/1e3;function se(e,t){return t?e*(1e3/t):0}const ie=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e;function oe(e,t,n,r){if(e===t&&n===r)return G;const a=t=>function(e,t,n,r,a){let s,i,o=0;do{i=t+(n-t)/2,s=ie(i,r,a)-e,s>0?n=i:t=i}while(Math.abs(s)>1e-7&&++o<12);return i}(t,0,1,e,n);return e=>0===e||1===e?e:ie(a(e),t,r)}const le=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,ce=e=>t=>1-e(1-t),ue=oe(.33,1.53,.69,.99),de=ce(ue),he=le(de),fe=e=>(e*=2)<1?.5*de(e):.5*(2-Math.pow(2,-10*(e-1))),pe=e=>1-Math.sin(Math.acos(e)),me=ce(pe),ge=le(pe),ye=oe(.42,0,1,1),ve=oe(0,0,.58,1),xe=oe(.42,0,.58,1),be=e=>Array.isArray(e)&&"number"==typeof e[0],we={linear:G,easeIn:ye,easeInOut:xe,easeOut:ve,circIn:pe,circInOut:ge,circOut:me,backIn:de,backInOut:he,backOut:ue,anticipate:fe},ke=e=>{if(be(e)){e.length;const[t,n,r,a]=e;return oe(t,n,r,a)}return"string"==typeof e?we[e]:e},Se=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function je(e,t){let n=!1,r=!0;const a={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,i=Se.reduce((e,t)=>(e[t]=function(e){let t=new Set,n=new Set,r=!1,a=!1;const s=new WeakSet;let i={delta:0,timestamp:0,isProcessing:!1};function o(t){s.has(t)&&(l.schedule(t),e()),t(i)}const l={schedule:(e,a=!1,i=!1)=>{const o=i&&r?t:n;return a&&s.add(e),o.has(e)||o.add(e),e},cancel:e=>{n.delete(e),s.delete(e)},process:e=>{i=e,r?a=!0:(r=!0,[t,n]=[n,t],t.forEach(o),t.clear(),r=!1,a&&(a=!1,l.process(e)))}};return l}(s),e),{}),{setup:o,read:l,resolveKeyframes:c,preUpdate:u,update:d,preRender:h,render:f,postRender:p}=i,m=()=>{const s=Y.useManualTiming?a.timestamp:performance.now();n=!1,Y.useManualTiming||(a.delta=r?1e3/60:Math.max(Math.min(s-a.timestamp,40),1)),a.timestamp=s,a.isProcessing=!0,o.process(a),l.process(a),c.process(a),u.process(a),d.process(a),h.process(a),f.process(a),p.process(a),a.isProcessing=!1,n&&t&&(r=!1,e(m))};return{schedule:Se.reduce((t,s)=>{const o=i[s];return t[s]=(t,s=!1,i=!1)=>(n||(n=!0,r=!0,a.isProcessing||e(m)),o.schedule(t,s,i)),t},{}),cancel:e=>{for(let t=0;t<Se.length;t++)i[Se[t]].cancel(e)},state:a,steps:i}}const{schedule:Ce,cancel:Ne,state:Te,steps:Ee}=je("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:G,!0);let Me;function Pe(){Me=void 0}const Le={now:()=>(void 0===Me&&Le.set(Te.isProcessing||Y.useManualTiming?Te.timestamp:performance.now()),Me),set:e=>{Me=e,queueMicrotask(Pe)}},De=e=>t=>"string"==typeof t&&t.startsWith(e),Ae=De("--"),_e=De("var(--"),ze=e=>!!_e(e)&&Re.test(e.split("/*")[0].trim()),Re=/var\\(--(?:[\\w-]+\\s*|[\\w-]+\\s*,(?:\\s*[^)(\\s]|\\s*\\((?:[^)(]|\\([^)(]*\\))*\\))+\\s*)\\)$/iu;function Fe(e){return"string"==typeof e&&e.split("/*")[0].includes("var(--")}const Ve={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},Ie={...Ve,transform:e=>q(0,1,e)},Oe={...Ve,default:1},$e=e=>Math.round(1e5*e)/1e5,Be=/-?(?:\\d+(?:\\.\\d+)?|\\.\\d+)/gu;const He=/^(?:#[\\da-f]{3,8}|(?:rgb|hsl)a?\\((?:-?[\\d.]+%?[,\\s]+){2}-?[\\d.]+%?\\s*(?:[,/]\\s*)?(?:\\b\\d+(?:\\.\\d+)?|\\.\\d+)?%?\\))$/iu,Ue=(e,t)=>n=>Boolean("string"==typeof n&&He.test(n)&&n.startsWith(e)||t&&!function(e){return null==e}(n)&&Object.prototype.hasOwnProperty.call(n,t)),We=(e,t,n)=>r=>{if("string"!=typeof r)return r;const[a,s,i,o]=r.match(Be);return{[e]:parseFloat(a),[t]:parseFloat(s),[n]:parseFloat(i),alpha:void 0!==o?parseFloat(o):1}},qe={...Ve,transform:e=>Math.round((e=>q(0,255,e))(e))},Ye={test:Ue("rgb","red"),parse:We("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+qe.transform(e)+", "+qe.transform(t)+", "+qe.transform(n)+", "+$e(Ie.transform(r))+")"};const Ke={test:Ue("#"),parse:function(e){let t="",n="",r="",a="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),a=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),a=e.substring(4,5),t+=t,n+=n,r+=r,a+=a),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:a?parseInt(a,16)/255:1}},transform:Ye.transform},Qe=e=>({test:t=>"string"==typeof t&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>\`\${t}\${e}\`}),Xe=Qe("deg"),Ze=Qe("%"),Ge=Qe("px"),Je=Qe("vh"),et=Qe("vw"),tt=(()=>({...Ze,parse:e=>Ze.parse(e)/100,transform:e=>Ze.transform(100*e)}))(),nt={test:Ue("hsl","hue"),parse:We("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Ze.transform($e(t))+", "+Ze.transform($e(n))+", "+$e(Ie.transform(r))+")"},rt={test:e=>Ye.test(e)||Ke.test(e)||nt.test(e),parse:e=>Ye.test(e)?Ye.parse(e):nt.test(e)?nt.parse(e):Ke.parse(e),transform:e=>"string"==typeof e?e:e.hasOwnProperty("red")?Ye.transform(e):nt.transform(e),getAnimatableNone:e=>{const t=rt.parse(e);return t.alpha=0,rt.transform(t)}},at=/(?:#[\\da-f]{3,8}|(?:rgb|hsl)a?\\((?:-?[\\d.]+%?[,\\s]+){2}-?[\\d.]+%?\\s*(?:[,/]\\s*)?(?:\\b\\d+(?:\\.\\d+)?|\\.\\d+)?%?\\))/giu;const st="number",it="color",ot=/var\\s*\\(\\s*--(?:[\\w-]+\\s*|[\\w-]+\\s*,(?:\\s*[^)(\\s]|\\s*\\((?:[^)(]|\\([^)(]*\\))*\\))+\\s*)\\)|#[\\da-f]{3,8}|(?:rgb|hsl)a?\\((?:-?[\\d.]+%?[,\\s]+){2}-?[\\d.]+%?\\s*(?:[,/]\\s*)?(?:\\b\\d+(?:\\.\\d+)?|\\.\\d+)?%?\\)|-?(?:\\d+(?:\\.\\d+)?|\\.\\d+)/giu;function lt(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},a=[];let s=0;const i=t.replace(ot,e=>(rt.test(e)?(r.color.push(s),a.push(it),n.push(rt.parse(e))):e.startsWith("var(")?(r.var.push(s),a.push("var"),n.push(e)):(r.number.push(s),a.push(st),n.push(parseFloat(e))),++s,"\${}")).split("\${}");return{values:n,split:i,indexes:r,types:a}}function ct(e){return lt(e).values}function ut(e){const{split:t,types:n}=lt(e),r=t.length;return e=>{let a="";for(let s=0;s<r;s++)if(a+=t[s],void 0!==e[s]){const t=n[s];a+=t===st?$e(e[s]):t===it?rt.transform(e[s]):e[s]}return a}}const dt=e=>"number"==typeof e?0:rt.test(e)?rt.getAnimatableNone(e):e;const ht={test:function(e){return isNaN(e)&&"string"==typeof e&&(e.match(Be)?.length||0)+(e.match(at)?.length||0)>0},parse:ct,createTransformer:ut,getAnimatableNone:function(e){const t=ct(e);return ut(e)(t.map(dt))}};function ft(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function pt(e,t){return n=>n>0?t:e}const mt=(e,t,n)=>e+(t-e)*n,gt=(e,t,n)=>{const r=e*e,a=n*(t*t-r)+r;return a<0?0:Math.sqrt(a)},yt=[Ke,Ye,nt];function vt(e){const t=(n=e,yt.find(e=>e.test(n)));var n;if(!Boolean(t))return!1;let r=t.parse(e);return t===nt&&(r=function({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,n/=100;let a=0,s=0,i=0;if(t/=100){const r=n<.5?n*(1+t):n+t-n*t,o=2*n-r;a=ft(o,r,e+1/3),s=ft(o,r,e),i=ft(o,r,e-1/3)}else a=s=i=n;return{red:Math.round(255*a),green:Math.round(255*s),blue:Math.round(255*i),alpha:r}}(r)),r}const xt=(e,t)=>{const n=vt(e),r=vt(t);if(!n||!r)return pt(e,t);const a={...n};return e=>(a.red=gt(n.red,r.red,e),a.green=gt(n.green,r.green,e),a.blue=gt(n.blue,r.blue,e),a.alpha=mt(n.alpha,r.alpha,e),Ye.transform(a))},bt=new Set(["none","hidden"]);function wt(e,t){return n=>mt(e,t,n)}function kt(e){return"number"==typeof e?wt:"string"==typeof e?ze(e)?pt:rt.test(e)?xt:Ct:Array.isArray(e)?St:"object"==typeof e?rt.test(e)?xt:jt:pt}function St(e,t){const n=[...e],r=n.length,a=e.map((e,n)=>kt(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=a[t](e);return n}}function jt(e,t){const n={...e,...t},r={};for(const a in n)void 0!==e[a]&&void 0!==t[a]&&(r[a]=kt(e[a])(e[a],t[a]));return e=>{for(const t in r)n[t]=r[t](e);return n}}const Ct=(e,t)=>{const n=ht.createTransformer(t),r=lt(e),a=lt(t);return r.indexes.var.length===a.indexes.var.length&&r.indexes.color.length===a.indexes.color.length&&r.indexes.number.length>=a.indexes.number.length?bt.has(e)&&!a.values.length||bt.has(t)&&!r.values.length?function(e,t){return bt.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}(e,t):ee(St(function(e,t){const n=[],r={color:0,var:0,number:0};for(let a=0;a<t.values.length;a++){const s=t.types[a],i=e.indexes[s][r[s]],o=e.values[i]??0;n[a]=o,r[s]++}return n}(r,a),a.values),n):pt(e,t)};function Nt(e,t,n){if("number"==typeof e&&"number"==typeof t&&"number"==typeof n)return mt(e,t,n);return kt(e)(e,t)}const Tt=e=>{const t=({timestamp:t})=>e(t);return{start:(e=!0)=>Ce.update(t,e),stop:()=>Ne(t),now:()=>Te.isProcessing?Te.timestamp:Le.now()}},Et=(e,t,n=10)=>{let r="";const a=Math.max(Math.round(t/n),2);for(let s=0;s<a;s++)r+=Math.round(1e4*e(s/(a-1)))/1e4+", ";return\`linear(\${r.substring(0,r.length-2)})\`},Mt=2e4;function Pt(e){let t=0;let n=e.next(t);for(;!n.done&&t<Mt;)t+=50,n=e.next(t);return t>=Mt?1/0:t}function Lt(e,t,n){const r=Math.max(t-5,0);return se(n-e(r),t-r)}const Dt=100,At=10,_t=1,zt=0,Rt=800,Ft=.3,Vt=.3,It={granular:.01,default:2},Ot={granular:.005,default:.5},$t=.01,Bt=10,Ht=.05,Ut=1,Wt=.001;function qt({duration:e=Rt,bounce:t=Ft,velocity:n=zt,mass:r=_t}){let a,s,i=1-t;i=q(Ht,Ut,i),e=q($t,Bt,ae(e)),i<1?(a=t=>{const r=t*i,a=r*e,s=r-n,o=Kt(t,i),l=Math.exp(-a);return Wt-s/o*l},s=t=>{const r=t*i*e,s=r*n+n,o=Math.pow(i,2)*Math.pow(t,2)*e,l=Math.exp(-r),c=Kt(Math.pow(t,2),i);return(-a(t)+Wt>0?-1:1)*((s-o)*l)/c}):(a=t=>Math.exp(-t*e)*((t-n)*e+1)-.001,s=t=>Math.exp(-t*e)*(e*e*(n-t)));const o=function(e,t,n){let r=n;for(let a=1;a<Yt;a++)r-=e(r)/t(r);return r}(a,s,5/e);if(e=re(e),isNaN(o))return{stiffness:Dt,damping:At,duration:e};{const t=Math.pow(o,2)*r;return{stiffness:t,damping:2*i*Math.sqrt(r*t),duration:e}}}const Yt=12;function Kt(e,t){return e*Math.sqrt(1-t*t)}const Qt=["duration","bounce"],Xt=["stiffness","damping","mass"];function Zt(e,t){return t.some(t=>void 0!==e[t])}function Gt(e=Vt,t=Ft){const n="object"!=typeof e?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:a}=n;const s=n.keyframes[0],i=n.keyframes[n.keyframes.length-1],o={done:!1,value:s},{stiffness:l,damping:c,mass:u,duration:d,velocity:h,isResolvedFromDuration:f}=function(e){let t={velocity:zt,stiffness:Dt,damping:At,mass:_t,isResolvedFromDuration:!1,...e};if(!Zt(e,Xt)&&Zt(e,Qt))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(1.2*n),a=r*r,s=2*q(.05,1,1-(e.bounce||0))*Math.sqrt(a);t={...t,mass:_t,stiffness:a,damping:s}}else{const n=qt(e);t={...t,...n,mass:_t},t.isResolvedFromDuration=!0}return t}({...n,velocity:-ae(n.velocity||0)}),p=h||0,m=c/(2*Math.sqrt(l*u)),g=i-s,y=ae(Math.sqrt(l/u)),v=Math.abs(g)<5;let x;if(r||(r=v?It.granular:It.default),a||(a=v?Ot.granular:Ot.default),m<1){const e=Kt(y,m);x=t=>{const n=Math.exp(-m*y*t);return i-n*((p+m*y*g)/e*Math.sin(e*t)+g*Math.cos(e*t))}}else if(1===m)x=e=>i-Math.exp(-y*e)*(g+(p+y*g)*e);else{const e=y*Math.sqrt(m*m-1);x=t=>{const n=Math.exp(-m*y*t),r=Math.min(e*t,300);return i-n*((p+m*y*g)*Math.sinh(r)+e*g*Math.cosh(r))/e}}const b={calculatedDuration:f&&d||null,next:e=>{const t=x(e);if(f)o.done=e>=d;else{let n=0===e?p:0;m<1&&(n=0===e?re(p):Lt(x,e,t));const s=Math.abs(n)<=r,l=Math.abs(i-t)<=a;o.done=s&&l}return o.value=o.done?i:t,o},toString:()=>{const e=Math.min(Pt(b),Mt),t=Et(t=>b.next(e*t).value,e,30);return e+"ms "+t},toTransition:()=>{}};return b}function Jt({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:a=10,bounceStiffness:s=500,modifyTarget:i,min:o,max:l,restDelta:c=.5,restSpeed:u}){const d=e[0],h={done:!1,value:d},f=e=>void 0===o?l:void 0===l||Math.abs(o-e)<Math.abs(l-e)?o:l;let p=n*t;const m=d+p,g=void 0===i?m:i(m);g!==m&&(p=g-d);const y=e=>-p*Math.exp(-e/r),v=e=>g+y(e),x=e=>{const t=y(e),n=v(e);h.done=Math.abs(t)<=c,h.value=h.done?g:n};let b,w;const k=e=>{var t;(t=h.value,void 0!==o&&t<o||void 0!==l&&t>l)&&(b=e,w=Gt({keyframes:[h.value,f(h.value)],velocity:Lt(v,e,h.value),damping:a,stiffness:s,restDelta:c,restSpeed:u}))};return k(0),{calculatedDuration:null,next:e=>{let t=!1;return w||void 0!==b||(t=!0,x(e),k(e)),void 0!==b&&e>=b?w.next(e-b):(!t&&x(e),h)}}}function en(e,t,{clamp:n=!0,ease:r,mixer:a}={}){const s=e.length;if(t.length,1===s)return()=>t[0];if(2===s&&t[0]===t[1])return()=>t[1];const i=e[0]===e[1];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const o=function(e,t,n){const r=[],a=n||Y.mix||Nt,s=e.length-1;for(let i=0;i<s;i++){let n=a(e[i],e[i+1]);if(t){const e=Array.isArray(t)?t[i]||G:t;n=ee(e,n)}r.push(n)}return r}(t,r,a),l=o.length,c=n=>{if(i&&n<e[0])return t[0];let r=0;if(l>1)for(;r<e.length-2&&!(n<e[r+1]);r++);const a=te(e[r],e[r+1],n);return o[r](a)};return n?t=>c(q(e[0],e[s-1],t)):c}function tn(e){const t=[0];return function(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const a=te(0,t,r);e.push(mt(n,1,a))}}(t,e.length-1),t}function nn({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const a=(e=>Array.isArray(e)&&"number"!=typeof e[0])(r)?r.map(ke):ke(r),s={done:!1,value:t[0]},i=function(e,t){return e.map(e=>e*t)}(n&&n.length===t.length?n:tn(t),e),o=en(i,t,{ease:Array.isArray(a)?a:(l=t,c=a,l.map(()=>c||xe).splice(0,l.length-1))});var l,c;return{calculatedDuration:e,next:t=>(s.value=o(t),s.done=t>=e,s)}}Gt.applyToOptions=e=>{const t=function(e,t=100,n){const r=n({...e,keyframes:[0,t]}),a=Math.min(Pt(r),Mt);return{type:"keyframes",ease:e=>r.next(a*e).value/t,duration:ae(a)}}(e,100,Gt);return e.ease=t.ease,e.duration=re(t.duration),e.type="keyframes",e};const rn=e=>null!==e;function an(e,{repeat:t,repeatType:n="loop"},r,a=1){const s=e.filter(rn),i=a<0||t&&"loop"!==n&&t%2==1?0:s.length-1;return i&&void 0!==r?r:s[i]}const sn={decay:Jt,inertia:Jt,tween:nn,keyframes:nn,spring:Gt};function on(e){"string"==typeof e.type&&(e.type=sn[e.type])}class ln{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,t){return this.finished.then(e,t)}}const cn=e=>e/100;class un extends ln{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:e}=this.options;e&&e.updatedAt!==Le.now()&&this.tick(Le.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),!1===e.autoplay&&this.pause()}initAnimation(){const{options:e}=this;on(e);const{type:t=nn,repeat:n=0,repeatDelay:r=0,repeatType:a,velocity:s=0}=e;let{keyframes:i}=e;const o=t||nn;o!==nn&&"number"!=typeof i[0]&&(this.mixKeyframes=ee(cn,Nt(i[0],i[1])),i=[0,100]);const l=o({...e,keyframes:i});"mirror"===a&&(this.mirroredGenerator=o({...e,keyframes:[...i].reverse(),velocity:-s})),null===l.calculatedDuration&&(l.calculatedDuration=Pt(l));const{calculatedDuration:c}=l;this.calculatedDuration=c,this.resolvedDuration=c+r,this.totalDuration=this.resolvedDuration*(n+1)-r,this.generator=l}updateTime(e){const t=Math.round(e-this.startTime)*this.playbackSpeed;null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=t}tick(e,t=!1){const{generator:n,totalDuration:r,mixKeyframes:a,mirroredGenerator:s,resolvedDuration:i,calculatedDuration:o}=this;if(null===this.startTime)return n.next(0);const{delay:l=0,keyframes:c,repeat:u,repeatType:d,repeatDelay:h,type:f,onUpdate:p,finalKeyframe:m}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-r/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);const g=this.currentTime-l*(this.playbackSpeed>=0?1:-1),y=this.playbackSpeed>=0?g<0:g>r;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=r);let v=this.currentTime,x=n;if(u){const e=Math.min(this.currentTime,r)/i;let t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),1===n&&t--,t=Math.min(t,u+1);Boolean(t%2)&&("reverse"===d?(n=1-n,h&&(n-=h/i)):"mirror"===d&&(x=s)),v=q(0,1,n)*i}const b=y?{done:!1,value:c[0]}:x.next(v);a&&(b.value=a(b.value));let{done:w}=b;y||null===o||(w=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);const k=null===this.holdTime&&("finished"===this.state||"running"===this.state&&w);return k&&f!==Jt&&(b.value=an(c,this.options,m,this.speed)),p&&p(b.value),k&&this.finish(),b}then(e,t){return this.finished.then(e,t)}get duration(){return ae(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+ae(e)}get time(){return ae(this.currentTime)}set time(e){e=re(e),this.currentTime=e,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(e){this.updateTime(Le.now());const t=this.playbackSpeed!==e;this.playbackSpeed=e,t&&(this.time=ae(this.currentTime))}play(){if(this.isStopped)return;const{driver:e=Tt,startTime:t}=this.options;this.driver||(this.driver=e(e=>this.tick(e))),this.options.onPlay?.();const n=this.driver.now();"finished"===this.state?(this.updateFinished(),this.startTime=n):null!==this.holdTime?this.startTime=n-this.holdTime:this.startTime||(this.startTime=t??n),"finished"===this.state&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Le.now()),this.holdTime=this.currentTime}complete(){"running"!==this.state&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),e.observe(this)}}const dn=e=>180*e/Math.PI,hn=e=>{const t=dn(Math.atan2(e[1],e[0]));return pn(t)},fn={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:hn,rotateZ:hn,skewX:e=>dn(Math.atan(e[1])),skewY:e=>dn(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},pn=e=>((e%=360)<0&&(e+=360),e),mn=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),gn=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),yn={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:mn,scaleY:gn,scale:e=>(mn(e)+gn(e))/2,rotateX:e=>pn(dn(Math.atan2(e[6],e[5]))),rotateY:e=>pn(dn(Math.atan2(-e[2],e[0]))),rotateZ:hn,rotate:hn,skewX:e=>dn(Math.atan(e[4])),skewY:e=>dn(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function vn(e){return e.includes("scale")?1:0}function xn(e,t){if(!e||"none"===e)return vn(t);const n=e.match(/^matrix3d\\(([-\\d.e\\s,]+)\\)$/u);let r,a;if(n)r=yn,a=n;else{const t=e.match(/^matrix\\(([-\\d.e\\s,]+)\\)$/u);r=fn,a=t}if(!a)return vn(t);const s=r[t],i=a[1].split(",").map(bn);return"function"==typeof s?s(i):i[s]}function bn(e){return parseFloat(e.trim())}const wn=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],kn=(()=>new Set(wn))(),Sn=e=>e===Ve||e===Ge,jn=new Set(["x","y","z"]),Cn=wn.filter(e=>!jn.has(e));const Nn={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>xn(t,"x"),y:(e,{transform:t})=>xn(t,"y")};Nn.translateX=Nn.x,Nn.translateY=Nn.y;const Tn=new Set;let En=!1,Mn=!1,Pn=!1;function Ln(){if(Mn){const e=Array.from(Tn).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=new Map;t.forEach(e=>{const t=function(e){const t=[];return Cn.forEach(n=>{const r=e.getValue(n);void 0!==r&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}(e);t.length&&(n.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();const t=n.get(e);t&&t.forEach(([t,n])=>{e.getValue(t)?.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{void 0!==e.suspendedScrollY&&window.scrollTo(0,e.suspendedScrollY)})}Mn=!1,En=!1,Tn.forEach(e=>e.complete(Pn)),Tn.clear()}function Dn(){Tn.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Mn=!0)})}class An{constructor(e,t,n,r,a,s=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=a,this.isAsync=s}scheduleResolve(){this.state="scheduled",this.isAsync?(Tn.add(this),En||(En=!0,Ce.read(Dn),Ce.resolveKeyframes(Ln))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;if(null===e[0]){const a=r?.get(),s=e[e.length-1];if(void 0!==a)e[0]=a;else if(n&&t){const r=n.readValue(t,s);null!=r&&(e[0]=r)}void 0===e[0]&&(e[0]=s),r&&void 0===a&&r.set(e[0])}!function(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),Tn.delete(this)}cancel(){"scheduled"===this.state&&(Tn.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}const _n=Z(()=>void 0!==window.ScrollTimeline),zn={};function Rn(e,t){const n=Z(e);return()=>zn[t]??n()}const Fn=Rn(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(e){return!1}return!0},"linearEasing"),Vn=([e,t,n,r])=>\`cubic-bezier(\${e}, \${t}, \${n}, \${r})\`,In={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Vn([0,.65,.55,1]),circOut:Vn([.55,0,1,.45]),backIn:Vn([.31,.01,.66,-.59]),backOut:Vn([.33,1.53,.69,.99])};function On(e,t){return e?"function"==typeof e?Fn()?Et(e,t):"ease-out":be(e)?Vn(e):Array.isArray(e)?e.map(e=>On(e,t)||In.easeOut):In[e]:void 0}function $n(e,t,n,{delay:r=0,duration:a=300,repeat:s=0,repeatType:i="loop",ease:o="easeOut",times:l}={},c=void 0){const u={[t]:n};l&&(u.offset=l);const d=On(o,a);Array.isArray(d)&&(u.easing=d);const h={delay:r,duration:a,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:s+1,direction:"reverse"===i?"alternate":"normal"};c&&(h.pseudoElement=c);return e.animate(u,h)}function Bn(e){return"function"==typeof e&&"applyToOptions"in e}class Hn extends ln{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;const{element:t,name:n,keyframes:r,pseudoElement:a,allowFlatten:s=!1,finalKeyframe:i,onComplete:o}=e;this.isPseudoElement=Boolean(a),this.allowFlatten=s,this.options=e,e.type;const l=function({type:e,...t}){return Bn(e)&&Fn()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}(e);this.animation=$n(t,n,r,l,a),!1===l.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!a){const e=an(r,this.options,i,this.speed);this.updateMotionValue?this.updateMotionValue(e):function(e,t,n){(e=>e.startsWith("--"))(t)?e.style.setProperty(t,n):e.style[t]=n}(t,n,e),this.animation.cancel()}o?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch(e){}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;"idle"!==e&&"finished"!==e&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){const e=this.animation.effect?.getComputedTiming?.().duration||0;return ae(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+ae(e)}get time(){return ae(Number(this.animation.currentTime)||0)}set time(e){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=re(e)}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,observe:t}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,e&&_n()?(this.animation.timeline=e,G):t(this)}}const Un={anticipate:fe,backInOut:he,circInOut:ge};function Wn(e){"string"==typeof e.ease&&e.ease in Un&&(e.ease=Un[e.ease])}class qn extends Hn{constructor(e){Wn(e),on(e),super(e),void 0!==e.startTime&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:t,onUpdate:n,onComplete:r,element:a,...s}=this.options;if(!t)return;if(void 0!==e)return void t.set(e);const i=new un({...s,autoplay:!1}),o=Math.max(10,Le.now()-this.startTime),l=q(0,10,o-10);t.setWithVelocity(i.sample(Math.max(0,o-l)).value,i.sample(o).value,l),i.stop()}}const Yn=(e,t)=>"zIndex"!==t&&(!("number"!=typeof e&&!Array.isArray(e))||!("string"!=typeof e||!ht.test(e)&&"0"!==e||e.startsWith("url(")));function Kn(e){e.duration=0,e.type="keyframes"}const Qn=new Set(["opacity","clipPath","filter","transform"]),Xn=Z(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));class Zn extends ln{constructor({autoplay:e=!0,delay:t=0,type:n="keyframes",repeat:r=0,repeatDelay:a=0,repeatType:s="loop",keyframes:i,name:o,motionValue:l,element:c,...u}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=Le.now();const d={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:a,repeatType:s,name:o,motionValue:l,element:c,...u},h=c?.KeyframeResolver||An;this.keyframeResolver=new h(i,(e,t,n)=>this.onKeyframesResolved(e,t,d,!n),o,l,c),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,t,n,r){this.keyframeResolver=void 0;const{name:a,type:s,velocity:i,delay:o,isHandoff:l,onUpdate:c}=n;this.resolvedAt=Le.now(),function(e,t,n,r){const a=e[0];if(null===a)return!1;if("display"===t||"visibility"===t)return!0;const s=e[e.length-1],i=Yn(a,t),o=Yn(s,t);return!(!i||!o)&&(function(e){const t=e[0];if(1===e.length)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}(e)||("spring"===n||Bn(n))&&r)}(e,a,s,i)||(!Y.instantAnimations&&o||c?.(an(e,n,t)),e[0]=e[e.length-1],Kn(n),n.repeat=0);const u={startTime:r?this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:t,...n,keyframes:e},d=!l&&function(e){const{motionValue:t,name:n,repeatDelay:r,repeatType:a,damping:s,type:i}=e,o=t?.owner?.current;if(!(o instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=t.owner.getProps();return Xn()&&n&&Qn.has(n)&&("transform"!==n||!c)&&!l&&!r&&"mirror"!==a&&0!==s&&"inertia"!==i}(u),h=u.motionValue?.owner?.current,f=d?new qn({...u,element:h}):new un(u);f.finished.then(()=>{this.notifyFinished()}).catch(G),this.pendingTimeline&&(this.stopTimeline=f.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=f}get finished(){return this._animation?this.animation.finished:this._finished}then(e,t){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),Pn=!0,Dn(),Ln(),Pn=!1),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}function Gn(e,t,n,r=0,a=1){const s=Array.from(e).sort((e,t)=>e.sortNodePosition(t)).indexOf(t),i=e.size,o=(i-1)*r;return"function"==typeof n?n(s,i):1===a?s*r:o-s*r}const Jn=/^var\\(--(?:([\\w-]+)|([\\w-]+), ?([a-zA-Z\\d ()%#.,-]+))\\)/u;function er(e,t,n=1){const[r,a]=function(e){const t=Jn.exec(e);if(!t)return[,];const[,n,r,a]=t;return[\`--\${n??r}\`,a]}(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const e=s.trim();return K(e)?parseFloat(e):e}return ze(a)?er(a,t,n+1):a}const tr={type:"spring",stiffness:500,damping:25,restSpeed:10},nr={type:"keyframes",duration:.8},rr={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},ar=(e,{keyframes:t})=>t.length>2?nr:kn.has(e)?e.startsWith("scale")?{type:"spring",stiffness:550,damping:0===t[1]?2*Math.sqrt(550):30,restSpeed:10}:tr:rr,sr=e=>null!==e;function ir(e,t){if(e?.inherit&&t){const{inherit:n,...r}=e;return{...t,...r}}return e}function or(e,t){const n=e?.[t]??e?.default??e;return n!==e?ir(n,e):n}const lr=(e,t,n,r={},a,s)=>i=>{const o=or(r,e)||{},l=o.delay||r.delay||0;let{elapsed:c=0}=r;c-=re(l);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...o,delay:-c,onUpdate:e=>{t.set(e),o.onUpdate&&o.onUpdate(e)},onComplete:()=>{i(),o.onComplete&&o.onComplete()},name:e,motionValue:t,element:s?void 0:a};(function({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:a,repeat:s,repeatType:i,repeatDelay:o,from:l,elapsed:c,...u}){return!!Object.keys(u).length})(o)||Object.assign(u,ar(e,u)),u.duration&&(u.duration=re(u.duration)),u.repeatDelay&&(u.repeatDelay=re(u.repeatDelay)),void 0!==u.from&&(u.keyframes[0]=u.from);let d=!1;if((!1===u.type||0===u.duration&&!u.repeatDelay)&&(Kn(u),0===u.delay&&(d=!0)),(Y.instantAnimations||Y.skipAnimations||a?.shouldSkipAnimations)&&(d=!0,Kn(u),u.delay=0),u.allowFlatten=!o.type&&!o.ease,d&&!s&&void 0!==t.get()){const e=function(e,{repeat:t,repeatType:n="loop"}){const r=e.filter(sr);return r[t&&"loop"!==n&&t%2==1?0:r.length-1]}(u.keyframes,o);if(void 0!==e)return void Ce.update(()=>{u.onUpdate(e),u.onComplete()})}return o.isSync?new un(u):new Zn(u)};function cr(e){const t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function ur(e,t,n,r){if("function"==typeof t){const[a,s]=cr(r);t=t(void 0!==n?n:e.custom,a,s)}if("string"==typeof t&&(t=e.variants&&e.variants[t]),"function"==typeof t){const[a,s]=cr(r);t=t(void 0!==n?n:e.custom,a,s)}return t}function dr(e,t,n){const r=e.getProps();return ur(r,t,void 0!==n?n:r.custom,e)}const hr=new Set(["width","height","top","left","right","bottom",...wn]);class fr{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{const t=Le.now();if(this.updatedAt!==t&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const n of this.dependents)n.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){var t;this.current=e,this.updatedAt=Le.now(),null===this.canTrackVelocity&&void 0!==e&&(this.canTrackVelocity=(t=this.current,!isNaN(parseFloat(t))))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new ne);const n=this.events[e].add(t);return"change"===e?()=>{n(),Ce.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=Le.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||e-this.updatedAt>30)return 0;const t=Math.min(this.updatedAt-this.prevUpdatedAt,30);return se(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function pr(e,t){return new fr(e,t)}const mr=e=>Array.isArray(e);function gr(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,pr(n))}function yr(e){return mr(e)?e[e.length-1]||0:e}const vr=e=>Boolean(e&&e.getVelocity);function xr(e,t){const n=e.getValue("willChange");if(r=n,Boolean(vr(r)&&r.add))return n.add(t);if(!n&&Y.WillChange){const n=new Y.WillChange("auto");e.addValue("willChange",n),n.add(t)}var r}function br(e){return e.replace(/([A-Z])/g,e=>\`-\${e.toLowerCase()}\`)}const wr="data-"+br("framerAppearId");function kr(e){return e.props[wr]}function Sr({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&!0!==t[n];return t[n]=!1,r}function jr(e,t,{delay:n=0,transitionOverride:r,type:a}={}){let{transition:s,transitionEnd:i,...o}=t;const l=e.getDefaultTransition();s=s?ir(s,l):l;const c=s?.reduceMotion;r&&(s=r);const u=[],d=a&&e.animationState&&e.animationState.getState()[a];for(const h in o){const t=e.getValue(h,e.latestValues[h]??null),r=o[h];if(void 0===r||d&&Sr(d,h))continue;const a={delay:n,...or(s||{},h)},i=t.get();if(void 0!==i&&!t.isAnimating&&!Array.isArray(r)&&r===i&&!a.velocity)continue;let l=!1;if(window.MotionHandoffAnimation){const t=kr(e);if(t){const e=window.MotionHandoffAnimation(t,h,Ce);null!==e&&(a.startTime=e,l=!0)}}xr(e,h);const f=c??e.shouldReduceMotion;t.start(lr(h,t,r,f&&hr.has(h)?{type:!1}:a,e,l));const p=t.animation;p&&u.push(p)}if(i){const t=()=>Ce.update(()=>{i&&function(e,t){const n=dr(e,t);let{transitionEnd:r={},transition:a={},...s}=n||{};s={...s,...r};for(const i in s)gr(e,i,yr(s[i]))}(e,i)});u.length?Promise.all(u).then(t):t()}return u}function Cr(e,t,n={}){const r=dr(e,t,"exit"===n.type?e.presenceContext?.custom:void 0);let{transition:a=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(a=n.transitionOverride);const s=r?()=>Promise.all(jr(e,r,n)):()=>Promise.resolve(),i=e.variantChildren&&e.variantChildren.size?(r=0)=>{const{delayChildren:s=0,staggerChildren:i,staggerDirection:o}=a;return function(e,t,n=0,r=0,a=0,s=1,i){const o=[];for(const l of e.variantChildren)l.notify("AnimationStart",t),o.push(Cr(l,t,{...i,delay:n+("function"==typeof r?0:r)+Gn(e.variantChildren,l,r,a,s)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(o)}(e,t,r,s,i,o,n)}:()=>Promise.resolve(),{when:o}=a;if(o){const[e,t]="beforeChildren"===o?[s,i]:[i,s];return e().then(()=>t())}return Promise.all([s(),i(n.delay)])}const Nr=e=>t=>t.test(e),Tr=[Ve,Ge,Ze,Xe,et,Je,{test:e=>"auto"===e,parse:e=>e}],Er=e=>Tr.find(Nr(e));function Mr(e){return"number"==typeof e?0===e:null===e||("none"===e||"0"===e||X(e))}const Pr=new Set(["brightness","contrast","saturate","opacity"]);function Lr(e){const[t,n]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;const[r]=n.match(Be)||[];if(!r)return e;const a=n.replace(r,"");let s=Pr.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+a+")"}const Dr=/\\b([a-z-]*)\\(.*?\\)/gu,Ar={...ht,getAnimatableNone:e=>{const t=e.match(Dr);return t?t.map(Lr).join(" "):e}},_r={...Ve,transform:Math.round},zr={borderWidth:Ge,borderTopWidth:Ge,borderRightWidth:Ge,borderBottomWidth:Ge,borderLeftWidth:Ge,borderRadius:Ge,borderTopLeftRadius:Ge,borderTopRightRadius:Ge,borderBottomRightRadius:Ge,borderBottomLeftRadius:Ge,width:Ge,maxWidth:Ge,height:Ge,maxHeight:Ge,top:Ge,right:Ge,bottom:Ge,left:Ge,inset:Ge,insetBlock:Ge,insetBlockStart:Ge,insetBlockEnd:Ge,insetInline:Ge,insetInlineStart:Ge,insetInlineEnd:Ge,padding:Ge,paddingTop:Ge,paddingRight:Ge,paddingBottom:Ge,paddingLeft:Ge,paddingBlock:Ge,paddingBlockStart:Ge,paddingBlockEnd:Ge,paddingInline:Ge,paddingInlineStart:Ge,paddingInlineEnd:Ge,margin:Ge,marginTop:Ge,marginRight:Ge,marginBottom:Ge,marginLeft:Ge,marginBlock:Ge,marginBlockStart:Ge,marginBlockEnd:Ge,marginInline:Ge,marginInlineStart:Ge,marginInlineEnd:Ge,fontSize:Ge,backgroundPositionX:Ge,backgroundPositionY:Ge,...{rotate:Xe,rotateX:Xe,rotateY:Xe,rotateZ:Xe,scale:Oe,scaleX:Oe,scaleY:Oe,scaleZ:Oe,skew:Xe,skewX:Xe,skewY:Xe,distance:Ge,translateX:Ge,translateY:Ge,translateZ:Ge,x:Ge,y:Ge,z:Ge,perspective:Ge,transformPerspective:Ge,opacity:Ie,originX:tt,originY:tt,originZ:Ge},zIndex:_r,fillOpacity:Ie,strokeOpacity:Ie,numOctaves:_r},Rr={...zr,color:rt,backgroundColor:rt,outlineColor:rt,fill:rt,stroke:rt,borderColor:rt,borderTopColor:rt,borderRightColor:rt,borderBottomColor:rt,borderLeftColor:rt,filter:Ar,WebkitFilter:Ar},Fr=e=>Rr[e];function Vr(e,t){let n=Fr(e);return n!==Ar&&(n=ht),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Ir=new Set(["auto","none","0"]);class Or extends An{constructor(e,t,n,r,a){super(e,t,n,r,a,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let o=0;o<e.length;o++){let n=e[o];if("string"==typeof n&&(n=n.trim(),ze(n))){const r=er(n,t.current);void 0!==r&&(e[o]=r),o===e.length-1&&(this.finalKeyframe=n)}}if(this.resolveNoneKeyframes(),!hr.has(n)||2!==e.length)return;const[r,a]=e,s=Er(r),i=Er(a);if(Fe(r)!==Fe(a)&&Nn[n])this.needsMeasurement=!0;else if(s!==i)if(Sn(s)&&Sn(i))for(let o=0;o<e.length;o++){const t=e[o];"string"==typeof t&&(e[o]=parseFloat(t))}else Nn[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:t}=this,n=[];for(let r=0;r<e.length;r++)(null===e[r]||Mr(e[r]))&&n.push(r);n.length&&function(e,t,n){let r,a=0;for(;a<e.length&&!r;){const t=e[a];"string"==typeof t&&!Ir.has(t)&&lt(t).values.length&&(r=e[a]),a++}if(r&&n)for(const s of t)e[s]=Vr(n,r)}(e,n,t)}measureInitialState(){const{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Nn[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;const r=t[t.length-1];void 0!==r&&e.getValue(n,r).jump(r,!1)}measureEndState(){const{element:e,name:t,unresolvedKeyframes:n}=this;if(!e||!e.current)return;const r=e.getValue(t);r&&r.jump(this.measuredOrigin,!1);const a=n.length-1,s=n[a];n[a]=Nn[t](e.measureViewportBox(),window.getComputedStyle(e.current)),null!==s&&void 0===this.finalKeyframe&&(this.finalKeyframe=s),this.removedTransforms?.length&&this.removedTransforms.forEach(([t,n])=>{e.getValue(t).set(n)}),this.resolveNoneKeyframes()}}const $r=new Set(["opacity","clipPath","filter","transform"]);function Br(e,t,n){if(null==e)return[];if(e instanceof EventTarget)return[e];if("string"==typeof e){let t=document;const r=n?.[e]??t.querySelectorAll(e);return r?Array.from(r):[]}return Array.from(e).filter(e=>null!=e)}const Hr=(e,t)=>t&&"number"==typeof e?t.transform(e):e;function Ur(e){return Q(e)&&"offsetHeight"in e}const{schedule:Wr}=je(queueMicrotask,!1),qr={x:!1,y:!1};function Yr(){return qr.x||qr.y}function Kr(e,t){const n=Br(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function Qr(e,t,n={}){const[r,a,s]=Kr(e,n);return r.forEach(e=>{let n,r=!1,s=!1;const i=t=>{n&&(n(t),n=void 0),e.removeEventListener("pointerleave",l)},o=e=>{r=!1,window.removeEventListener("pointerup",o),window.removeEventListener("pointercancel",o),s&&(s=!1,i(e))},l=e=>{"touch"!==e.pointerType&&(r?s=!0:i(e))};e.addEventListener("pointerenter",r=>{if("touch"===r.pointerType||Yr())return;s=!1;const i=t(e,r);"function"==typeof i&&(n=i,e.addEventListener("pointerleave",l,a))},a),e.addEventListener("pointerdown",()=>{r=!0,window.addEventListener("pointerup",o,a),window.addEventListener("pointercancel",o,a)},a)}),s}const Xr=(e,t)=>!!t&&(e===t||Xr(e,t.parentElement)),Zr=e=>"mouse"===e.pointerType?"number"!=typeof e.button||e.button<=0:!1!==e.isPrimary,Gr=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);const Jr=new Set(["INPUT","SELECT","TEXTAREA"]);const ea=new WeakSet;function ta(e){return t=>{"Enter"===t.key&&e(t)}}function na(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}function ra(e){return Zr(e)&&!Yr()}const aa=new WeakSet;function sa(e,t,n={}){const[r,a,s]=Kr(e,n),i=e=>{const r=e.currentTarget;if(!ra(e))return;if(aa.has(e))return;ea.add(r),n.stopPropagation&&aa.add(e);const s=t(r,e),i=(e,t)=>{window.removeEventListener("pointerup",o),window.removeEventListener("pointercancel",l),ea.has(r)&&ea.delete(r),ra(e)&&"function"==typeof s&&s(e,{success:t})},o=e=>{i(e,r===window||r===document||n.useGlobalTarget||Xr(r,e.target))},l=e=>{i(e,!1)};window.addEventListener("pointerup",o,a),window.addEventListener("pointercancel",l,a)};return r.forEach(e=>{var t;(n.useGlobalTarget?window:e).addEventListener("pointerdown",i,a),Ur(e)&&(e.addEventListener("focus",e=>((e,t)=>{const n=e.currentTarget;if(!n)return;const r=ta(()=>{if(ea.has(n))return;na(n,"down");const e=ta(()=>{na(n,"up")});n.addEventListener("keyup",e,t),n.addEventListener("blur",()=>na(n,"cancel"),t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)})(e,a)),t=e,Gr.has(t.tagName)||!0===t.isContentEditable||e.hasAttribute("tabindex")||(e.tabIndex=0))}),s}function ia(e){return Q(e)&&"ownerSVGElement"in e}const oa=new WeakMap;let la;const ca=(e,t,n)=>(r,a)=>a&&a[0]?a[0][e+"Size"]:ia(r)&&"getBBox"in r?r.getBBox()[t]:r[n],ua=ca("inline","width","offsetWidth"),da=ca("block","height","offsetHeight");function ha({target:e,borderBoxSize:t}){oa.get(e)?.forEach(n=>{n(e,{get width(){return ua(e,t)},get height(){return da(e,t)}})})}function fa(e){e.forEach(ha)}function pa(e,t){la||"undefined"!=typeof ResizeObserver&&(la=new ResizeObserver(fa));const n=Br(e);return n.forEach(e=>{let n=oa.get(e);n||(n=new Set,oa.set(e,n)),n.add(t),la?.observe(e)}),()=>{n.forEach(e=>{const n=oa.get(e);n?.delete(t),n?.size||la?.unobserve(e)})}}const ma=new Set;let ga;function ya(e){return ma.add(e),ga||(ga=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};ma.forEach(t=>t(e))},window.addEventListener("resize",ga)),()=>{ma.delete(e),ma.size||"function"!=typeof ga||(window.removeEventListener("resize",ga),ga=void 0)}}function va(e,t){return"function"==typeof e?ya(e):pa(e,t)}const xa=[...Tr,rt,ht],ba=()=>({x:{min:0,max:0},y:{min:0,max:0}}),wa=new WeakMap;function ka(e){return null!==e&&"object"==typeof e&&"function"==typeof e.start}function Sa(e){return"string"==typeof e||Array.isArray(e)}const ja=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Ca=["initial",...ja];function Na(e){return ka(e.animate)||Ca.some(t=>Sa(e[t]))}function Ta(e){return Boolean(Na(e)||e.variants)}const Ea={current:null},Ma={current:!1},Pa="undefined"!=typeof window;const La=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Da={};function Aa(e){Da=e}class _a{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,skipAnimations:a,blockInitialAnimation:s,visualState:i},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=An,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const e=Le.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,Ce.render(this.render,!1,!0))};const{latestValues:l,renderState:c}=i;this.latestValues=l,this.baseTarget={...l},this.initialValues=t.initial?{...l}:{},this.renderState=c,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.skipAnimationsConfig=a,this.options=o,this.blockInitialAnimation=Boolean(s),this.isControllingVariants=Na(t),this.isVariantNode=Ta(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(e&&e.current);const{willChange:u,...d}=this.scrapeMotionValuesFromProps(t,{},this);for(const h in d){const e=d[h];void 0!==l[h]&&vr(e)&&e.set(l[h])}}mount(e){if(this.hasBeenMounted)for(const t in this.initialValues)this.values.get(t)?.jump(this.initialValues[t]),this.latestValues[t]=this.initialValues[t];this.current=e,wa.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),"never"===this.reducedMotionConfig?this.shouldReduceMotion=!1:"always"===this.reducedMotionConfig?this.shouldReduceMotion=!0:(Ma.current||function(){if(Ma.current=!0,Pa)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Ea.current=e.matches;e.addEventListener("change",t),t()}else Ea.current=!1}(),this.shouldReduceMotion=Ea.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),Ne(this.notifyUpdate),Ne(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,t){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),t.accelerate&&$r.has(e)&&this.current instanceof HTMLElement){const{factory:n,keyframes:r,times:a,ease:s,duration:i}=t.accelerate,o=new Hn({element:this.current,name:e,keyframes:r,times:a,ease:s,duration:re(i)}),l=n(o);return void this.valueSubscriptions.set(e,()=>{l(),o.cancel()})}const n=kn.has(e);n&&this.onBindTransform&&this.onBindTransform();const r=t.on("change",t=>{this.latestValues[e]=t,this.props.onUpdate&&Ce.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let a;"undefined"!=typeof window&&window.MotionCheckAppearSync&&(a=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{r(),a&&a(),t.owner&&t.stop()})}sortNodePosition(e){return this.current&&this.sortInstanceNodePosition&&this.type===e.type?this.sortInstanceNodePosition(this.current,e.current):0}updateFeatures(){let e="animation";for(e in Da){const t=Da[e];if(!t)continue;const{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){const t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):{x:{min:0,max:0},y:{min:0,max:0}}}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let n=0;n<La.length;n++){const t=La[n];this.propEventSubscriptions[t]&&(this.propEventSubscriptions[t](),delete this.propEventSubscriptions[t]);const r=e["on"+t];r&&(this.propEventSubscriptions[t]=this.on(t,r))}this.prevMotionValues=function(e,t,n){for(const r in t){const a=t[r],s=n[r];if(vr(a))e.addValue(r,a);else if(vr(s))e.addValue(r,pr(a,{owner:e}));else if(s!==a)if(e.hasValue(r)){const t=e.getValue(r);!0===t.liveStyle?t.jump(a):t.hasAnimated||t.set(a)}else{const t=e.getStaticValue(r);e.addValue(r,pr(void 0!==t?t:a,{owner:e}))}}for(const r in n)void 0===t[r]&&e.removeValue(r);return t}(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){const t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){const n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);const t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return void 0===n&&void 0!==t&&(n=pr(null===t?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){let n=void 0===this.latestValues[e]&&this.current?this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options):this.latestValues[e];var r;return null!=n&&("string"==typeof n&&(K(n)||X(n))?n=parseFloat(n):(r=n,!xa.find(Nr(r))&&ht.test(t)&&(n=Vr(e,t))),this.setBaseTarget(e,vr(n)?n.get():n)),vr(n)?n.get():n}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){const{initial:t}=this.props;let n;if("string"==typeof t||"object"==typeof t){const r=ur(this.props,t,this.presenceContext?.custom);r&&(n=r[e])}if(t&&void 0!==n)return n;const r=this.getBaseTargetFromProps(this.props,e);return void 0===r||vr(r)?void 0!==this.initialValues[e]&&void 0===n?void 0:this.baseTarget[e]:r}on(e,t){return this.events[e]||(this.events[e]=new ne),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){Wr.render(this.render)}}class za extends _a{constructor(){super(...arguments),this.KeyframeResolver=Or}sortInstanceNodePosition(e,t){return 2&e.compareDocumentPosition(t)?1:-1}getBaseTargetFromProps(e,t){const n=e.style;return n?n[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;vr(e)&&(this.childSubscription=e.on("change",e=>{this.current&&(this.current.textContent=\`\${e}\`)}))}}class Ra{constructor(e){this.isMounted=!1,this.node=e}update(){}}function Fa({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Va(e){return void 0===e||1===e}function Ia({scale:e,scaleX:t,scaleY:n}){return!Va(e)||!Va(t)||!Va(n)}function Oa(e){return Ia(e)||$a(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function $a(e){return Ba(e.x)||Ba(e.y)}function Ba(e){return e&&"0%"!==e}function Ha(e,t,n){return n+t*(e-n)}function Ua(e,t,n,r,a){return void 0!==a&&(e=Ha(e,a,r)),Ha(e,n,r)+t}function Wa(e,t=0,n=1,r,a){e.min=Ua(e.min,t,n,r,a),e.max=Ua(e.max,t,n,r,a)}function qa(e,{x:t,y:n}){Wa(e.x,t.translate,t.scale,t.originPoint),Wa(e.y,n.translate,n.scale,n.originPoint)}const Ya=.999999999999,Ka=1.0000000000001;function Qa(e,t){e.min=e.min+t,e.max=e.max+t}function Xa(e,t,n,r,a=.5){Wa(e,t,n,mt(e.min,e.max,a),r)}function Za(e,t){Xa(e.x,t.x,t.scaleX,t.scale,t.originX),Xa(e.y,t.y,t.scaleY,t.scale,t.originY)}function Ga(e,t){return Fa(function(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}(e.getBoundingClientRect(),t))}const Ja={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},es=wn.length;function ts(e,t,n){const{style:r,vars:a,transformOrigin:s}=e;let i=!1,o=!1;for(const l in t){const e=t[l];if(kn.has(l))i=!0;else if(Ae(l))a[l]=e;else{const t=Hr(e,zr[l]);l.startsWith("origin")?(o=!0,s[l]=t):r[l]=t}}if(t.transform||(i||n?r.transform=function(e,t,n){let r="",a=!0;for(let s=0;s<es;s++){const i=wn[s],o=e[i];if(void 0===o)continue;let l=!0;if("number"==typeof o)l=o===(i.startsWith("scale")?1:0);else{const e=parseFloat(o);l=i.startsWith("scale")?1===e:0===e}if(!l||n){const e=Hr(o,zr[i]);l||(a=!1,r+=\`\${Ja[i]||i}(\${e}) \`),n&&(t[i]=e)}}return r=r.trim(),n?r=n(t,a?"":r):a&&(r="none"),r}(t,e.transform,n):r.transform&&(r.transform="none")),o){const{originX:e="50%",originY:t="50%",originZ:n=0}=s;r.transformOrigin=\`\${e} \${t} \${n}\`}}function ns(e,{style:t,vars:n},r,a){const s=e.style;let i;for(i in t)s[i]=t[i];for(i in a?.applyProjectionStyles(s,r),n)s.setProperty(i,n[i])}function rs(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const as={correct:(e,t)=>{if(!t.target)return e;if("string"==typeof e){if(!Ge.test(e))return e;e=parseFloat(e)}return\`\${rs(e,t.target.x)}% \${rs(e,t.target.y)}%\`}},ss={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,a=ht.parse(e);if(a.length>5)return r;const s=ht.createTransformer(e),i="number"!=typeof a[0]?1:0,o=n.x.scale*t.x,l=n.y.scale*t.y;a[0+i]/=o,a[1+i]/=l;const c=mt(o,l,.5);return"number"==typeof a[2+i]&&(a[2+i]/=c),"number"==typeof a[3+i]&&(a[3+i]/=c),s(a)}},is={borderRadius:{...as,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:as,borderTopRightRadius:as,borderBottomLeftRadius:as,borderBottomRightRadius:as,boxShadow:ss};function os(e,{layout:t,layoutId:n}){return kn.has(e)||e.startsWith("origin")||(t||void 0!==n)&&(!!is[e]||"opacity"===e)}function ls(e,t,n){const r=e.style,a=t?.style,s={};if(!r)return s;for(const i in r)(vr(r[i])||a&&vr(a[i])||os(i,e)||void 0!==n?.getValue(i)?.liveStyle)&&(s[i]=r[i]);return s}class cs extends za{constructor(){super(...arguments),this.type="html",this.renderInstance=ns}readValueFromInstance(e,t){if(kn.has(t))return this.projection?.isProjecting?vn(t):((e,t)=>{const{transform:n="none"}=getComputedStyle(e);return xn(n,t)})(e,t);{const r=(n=e,window.getComputedStyle(n)),a=(Ae(t)?r.getPropertyValue(t):r[t])||0;return"string"==typeof a?a.trim():a}var n}measureInstanceViewportBox(e,{transformPagePoint:t}){return Ga(e,t)}build(e,t,n){ts(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return ls(e,t,n)}}const us={offset:"stroke-dashoffset",array:"stroke-dasharray"},ds={offset:"strokeDashoffset",array:"strokeDasharray"};const hs=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function fs(e,{attrX:t,attrY:n,attrScale:r,pathLength:a,pathSpacing:s=1,pathOffset:i=0,...o},l,c,u){if(ts(e,o,c),l)return void(e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox));e.attrs=e.style,e.style={};const{attrs:d,style:h}=e;d.transform&&(h.transform=d.transform,delete d.transform),(h.transform||d.transformOrigin)&&(h.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),h.transform&&(h.transformBox=u?.transformBox??"fill-box",delete d.transformBox);for(const f of hs)void 0!==d[f]&&(h[f]=d[f],delete d[f]);void 0!==t&&(d.x=t),void 0!==n&&(d.y=n),void 0!==r&&(d.scale=r),void 0!==a&&function(e,t,n=1,r=0,a=!0){e.pathLength=1;const s=a?us:ds;e[s.offset]=""+-r,e[s.array]=\`\${t} \${n}\`}(d,a,s,i,!1)}const ps=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),ms=e=>"string"==typeof e&&"svg"===e.toLowerCase();function gs(e,t,n){const r=ls(e,t,n);for(const a in e)if(vr(e[a])||vr(t[a])){r[-1!==wn.indexOf(a)?"attr"+a.charAt(0).toUpperCase()+a.substring(1):a]=e[a]}return r}class ys extends za{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=ba}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(kn.has(t)){const e=Fr(t);return e&&e.default||0}return t=ps.has(t)?t:br(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return gs(e,t,n)}build(e,t,n){fs(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){!function(e,t,n,r){ns(e,t,void 0,r);for(const a in t.attrs)e.setAttribute(ps.has(a)?a:br(a),t.attrs[a])}(e,t,0,r)}mount(e){this.isSVGTag=ms(e.tagName),super.mount(e)}}const vs=Ca.length;function xs(e){if(!e)return;if(!e.isControllingVariants){const t=e.parent&&xs(e.parent)||{};return void 0!==e.props.initial&&(t.initial=e.props.initial),t}const t={};for(let n=0;n<vs;n++){const r=Ca[n],a=e.props[r];(Sa(a)||!1===a)&&(t[r]=a)}return t}function bs(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const ws=[...ja].reverse(),ks=ja.length;function Ss(e){return t=>Promise.all(t.map(({animation:t,options:n})=>function(e,t,n={}){let r;if(e.notify("AnimationStart",t),Array.isArray(t)){const a=t.map(t=>Cr(e,t,n));r=Promise.all(a)}else if("string"==typeof t)r=Cr(e,t,n);else{const a="function"==typeof t?dr(e,t,n.custom):t;r=Promise.all(jr(e,a,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}(e,t,n)))}function js(e){let t=Ss(e),n=Ts(),r=!0;const a=t=>(n,r)=>{const a=dr(e,r,"exit"===t?e.presenceContext?.custom:void 0);if(a){const{transition:e,transitionEnd:t,...r}=a;n={...n,...r,...t}}return n};function s(s){const{props:i}=e,o=xs(e.parent)||{},l=[],c=new Set;let u={},d=1/0;for(let t=0;t<ks;t++){const h=ws[t],f=n[h],p=void 0!==i[h]?i[h]:o[h],m=Sa(p),g=h===s?f.isActive:null;!1===g&&(d=t);let y=p===o[h]&&p!==i[h]&&m;if(y&&r&&e.manuallyAnimateOnMount&&(y=!1),f.protectedKeys={...u},!f.isActive&&null===g||!p&&!f.prevProp||ka(p)||"boolean"==typeof p)continue;if("exit"===h&&f.isActive&&!0!==g){f.prevResolvedValues&&(u={...u,...f.prevResolvedValues});continue}const v=Cs(f.prevProp,p);let x=v||h===s&&f.isActive&&!y&&m||t>d&&m,b=!1;const w=Array.isArray(p)?p:[p];let k=w.reduce(a(h),{});!1===g&&(k={});const{prevResolvedValues:S={}}=f,j={...S,...k},C=t=>{x=!0,c.has(t)&&(b=!0,c.delete(t)),f.needsAnimating[t]=!0;const n=e.getValue(t);n&&(n.liveStyle=!1)};for(const e in j){const t=k[e],n=S[e];if(u.hasOwnProperty(e))continue;let r=!1;r=mr(t)&&mr(n)?!bs(t,n):t!==n,r?null!=t?C(e):c.add(e):void 0!==t&&c.has(e)?C(e):f.protectedKeys[e]=!0}f.prevProp=p,f.prevResolvedValues=k,f.isActive&&(u={...u,...k}),r&&e.blockInitialAnimation&&(x=!1);const N=y&&v;x&&(!N||b)&&l.push(...w.map(t=>{const n={type:h};if("string"==typeof t&&r&&!N&&e.manuallyAnimateOnMount&&e.parent){const{parent:r}=e,a=dr(r,t);if(r.enteringChildren&&a){const{delayChildren:t}=a.transition||{};n.delay=Gn(r.enteringChildren,e,t)}}return{animation:t,options:n}}))}if(c.size){const t={};if("boolean"!=typeof i.initial){const n=dr(e,Array.isArray(i.initial)?i.initial[0]:i.initial);n&&n.transition&&(t.transition=n.transition)}c.forEach(n=>{const r=e.getBaseTarget(n),a=e.getValue(n);a&&(a.liveStyle=!0),t[n]=r??null}),l.push({animation:t})}let h=Boolean(l.length);return!r||!1!==i.initial&&i.initial!==i.animate||e.manuallyAnimateOnMount||(h=!1),r=!1,h?t(l):Promise.resolve()}return{animateChanges:s,setActive:function(t,r){if(n[t].isActive===r)return Promise.resolve();e.variantChildren?.forEach(e=>e.animationState?.setActive(t,r)),n[t].isActive=r;const a=s(t);for(const e in n)n[e].protectedKeys={};return a},setAnimateFunction:function(n){t=n(e)},getState:()=>n,reset:()=>{n=Ts()}}}function Cs(e,t){return"string"==typeof t?t!==e:!!Array.isArray(t)&&!bs(t,e)}function Ns(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Ts(){return{animate:Ns(!0),whileInView:Ns(),whileHover:Ns(),whileTap:Ns(),whileDrag:Ns(),whileFocus:Ns(),exit:Ns()}}function Es(e,t){e.min=t.min,e.max=t.max}function Ms(e,t){Es(e.x,t.x),Es(e.y,t.y)}function Ps(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Ls(e){return e.max-e.min}function Ds(e,t,n,r=.5){e.origin=r,e.originPoint=mt(t.min,t.max,e.origin),e.scale=Ls(n)/Ls(t),e.translate=mt(n.min,n.max,e.origin)-e.originPoint,(e.scale>=.9999&&e.scale<=1.0001||isNaN(e.scale))&&(e.scale=1),(e.translate>=-.01&&e.translate<=.01||isNaN(e.translate))&&(e.translate=0)}function As(e,t,n,r){Ds(e.x,t.x,n.x,r?r.originX:void 0),Ds(e.y,t.y,n.y,r?r.originY:void 0)}function _s(e,t,n){e.min=n.min+t.min,e.max=e.min+Ls(t)}function zs(e,t,n){e.min=t.min-n.min,e.max=e.min+Ls(t)}function Rs(e,t,n){zs(e.x,t.x,n.x),zs(e.y,t.y,n.y)}function Fs(e,t,n,r,a){return e=Ha(e-=t,1/n,r),void 0!==a&&(e=Ha(e,1/a,r)),e}function Vs(e,t,[n,r,a],s,i){!function(e,t=0,n=1,r=.5,a,s=e,i=e){Ze.test(t)&&(t=parseFloat(t),t=mt(i.min,i.max,t/100)-i.min);if("number"!=typeof t)return;let o=mt(s.min,s.max,r);e===s&&(o-=t),e.min=Fs(e.min,t,n,o,a),e.max=Fs(e.max,t,n,o,a)}(e,t[n],t[r],t[a],t.scale,s,i)}const Is=["x","scaleX","originX"],Os=["y","scaleY","originY"];function $s(e,t,n,r){Vs(e.x,t,Is,n?n.x:void 0,r?r.x:void 0),Vs(e.y,t,Os,n?n.y:void 0,r?r.y:void 0)}function Bs(e){return 0===e.translate&&1===e.scale}function Hs(e){return Bs(e.x)&&Bs(e.y)}function Us(e,t){return e.min===t.min&&e.max===t.max}function Ws(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function qs(e,t){return Ws(e.x,t.x)&&Ws(e.y,t.y)}function Ys(e){return Ls(e.x)/Ls(e.y)}function Ks(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function Qs(e){return[e("x"),e("y")]}const Xs=["TopLeft","TopRight","BottomLeft","BottomRight"],Zs=Xs.length,Gs=e=>"string"==typeof e?parseFloat(e):e,Js=e=>"number"==typeof e||Ge.test(e);function ei(e,t){return void 0!==e[t]?e[t]:e.borderRadius}const ti=ri(0,.5,me),ni=ri(.5,.95,G);function ri(e,t,n){return r=>r<e?0:r>t?1:n(te(e,t,r))}function ai(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const si=(e,t)=>e.depth-t.depth;class ii{constructor(){this.children=[],this.isDirty=!1}add(e){U(this.children,e),this.isDirty=!0}remove(e){W(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(si),this.isDirty=!1,this.children.forEach(e)}}function oi(e){return vr(e)?e.get():e}class li{constructor(){this.members=[]}add(e){U(this.members,e);for(let t=this.members.length-1;t>=0;t--){const n=this.members[t];if(n===e||n===this.lead||n===this.prevLead)continue;const r=n.instance;r&&!1===r.isConnected&&!1!==n.isPresent&&!n.snapshot&&W(this.members,n)}e.scheduleRender()}remove(e){if(W(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){const t=this.members.findIndex(t=>e===t);if(0===t)return!1;let n;for(let r=t;r>=0;r--){const e=this.members[r],t=e.instance;if(!1!==e.isPresent&&(!t||!1!==t.isConnected)){n=e;break}}return!!n&&(this.promote(n),!0)}promote(e,t){const n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.instance&&n.scheduleRender(),e.scheduleRender();const r=n.options.layoutDependency,a=e.options.layoutDependency;if(!(void 0!==r&&void 0!==a&&r===a)){const r=n.instance;r&&!1===r.isConnected&&!n.snapshot||(e.resumeFrom=n,t&&(e.resumeFrom.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0))}const{crossfade:s}=e.options;!1===s&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:t,resumingFrom:n}=e;t.onExitComplete&&t.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const ci={hasAnimatedSinceResize:!0,hasEverUpdated:!1},ui=["","X","Y","Z"];let di=0;function hi(e,t,n,r){const{latestValues:a}=t;a[e]&&(n[e]=a[e],t.setStaticValue(e,0),r&&(r[e]=0))}function fi(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=kr(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Ce,!(t||r))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&fi(r)}function pi({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:a}){return class{constructor(e={},n=t?.()){this.id=di++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(yi),this.nodes.forEach(ji),this.nodes.forEach(Ci),this.nodes.forEach(vi)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let t=0;t<this.path.length;t++)this.path[t].shouldResetTransform=!0;this.root===this&&(this.nodes=new ii)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new ne),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){const n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t){if(this.instance)return;var n;this.isSVG=ia(t)&&!(ia(n=t)&&"svg"===n.tagName),this.instance=t;const{layoutId:r,layout:a,visualElement:s}=this.options;if(s&&!s.current&&s.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(a||r)&&(this.isLayoutDirty=!0),e){let n,r=0;const a=()=>this.root.updateBlockedByResize=!1;Ce.read(()=>{r=window.innerWidth}),e(t,()=>{const e=window.innerWidth;e!==r&&(r=e,this.root.updateBlockedByResize=!0,n&&n(),n=function(e,t){const n=Le.now(),r=({timestamp:a})=>{const s=a-n;s>=t&&(Ne(r),e(s-t))};return Ce.setup(r,!0),()=>Ne(r)}(a,250),ci.hasAnimatedSinceResize&&(ci.hasAnimatedSinceResize=!1,this.nodes.forEach(Si)))})}r&&this.root.registerSharedNode(r,this),!1!==this.options.animate&&s&&(r||a)&&this.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const a=this.options.transition||s.getDefaultTransition()||Li,{onLayoutAnimationStart:i,onLayoutAnimationComplete:o}=s.getProps(),l=!this.targetLayout||!qs(this.targetLayout,r),c=!t&&n;if(this.options.layoutRoot||this.resumeFrom||c||t&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const t={...or(a,"layout"),onPlay:i,onComplete:o};(s.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,c)}else t||Si(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Ne(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Ni),this.animationId++)}getTransformTemplate(){const{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&fi(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let a=0;a<this.path.length;a++){const e=this.path[a];e.shouldResetTransform=!0,e.updateScroll("snapshot"),e.options.layoutRoot&&e.willUpdate(!1)}const{layoutId:t,layout:n}=this.options;if(void 0===t&&!n)return;const r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,""):void 0,this.updateSnapshot(),e&&this.notifyListeners("willUpdate")}update(){this.updateScheduled=!1;if(this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(bi);if(this.animationId<=this.animationCommitId)return void this.nodes.forEach(wi);this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(ki),this.nodes.forEach(mi),this.nodes.forEach(gi)):this.nodes.forEach(wi),this.clearAllSnapshots();const e=Le.now();Te.delta=q(0,1e3/60,e-Te.timestamp),Te.timestamp=e,Te.isProcessing=!0,Ee.update.process(Te),Ee.preRender.process(Te),Ee.render.process(Te),Te.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Wr.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(xi),this.sharedNodes.forEach(Ti)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Ce.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Ce.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||Ls(this.snapshot.measuredBox.x)||Ls(this.snapshot.measuredBox.y)||(this.snapshot=void 0))}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let n=0;n<this.path.length;n++){this.path[n].updateScroll()}const e=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected={x:{min:0,max:0},y:{min:0,max:0}},this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:t}=this.options;t&&t.notify("LayoutMeasure",this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e="measure"){let t=Boolean(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t&&this.instance){const t=r(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!a)return;const e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!Hs(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,""):void 0,s=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||Oa(this.latestValues)||s)&&(a(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){const t=this.measurePageBox();let n=this.removeElementScroll(t);var r;return e&&(n=this.removeTransform(n)),_i((r=n).x),_i(r.y),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:e}=this.options;if(!e)return{x:{min:0,max:0},y:{min:0,max:0}};const t=e.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(Ri))){const{scroll:e}=this.root;e&&(Qa(t.x,e.offset.x),Qa(t.y,e.offset.y))}return t}removeElementScroll(e){const t={x:{min:0,max:0},y:{min:0,max:0}};if(Ms(t,e),this.scroll?.wasRoot)return t;for(let n=0;n<this.path.length;n++){const r=this.path[n],{scroll:a,options:s}=r;r!==this.root&&a&&s.layoutScroll&&(a.wasRoot&&Ms(t,e),Qa(t.x,a.offset.x),Qa(t.y,a.offset.y))}return t}applyTransform(e,t=!1){const n={x:{min:0,max:0},y:{min:0,max:0}};Ms(n,e);for(let r=0;r<this.path.length;r++){const e=this.path[r];!t&&e.options.layoutScroll&&e.scroll&&e!==e.root&&Za(n,{x:-e.scroll.offset.x,y:-e.scroll.offset.y}),Oa(e.latestValues)&&Za(n,e.latestValues)}return Oa(this.latestValues)&&Za(n,this.latestValues),n}removeTransform(e){const t={x:{min:0,max:0},y:{min:0,max:0}};Ms(t,e);for(let n=0;n<this.path.length;n++){const e=this.path[n];if(!e.instance)continue;if(!Oa(e.latestValues))continue;Ia(e.latestValues)&&e.updateSnapshot();const r=ba();Ms(r,e.measurePageBox()),$s(t,e.latestValues,e.snapshot?e.snapshot.layoutBox:void 0,r)}return Oa(this.latestValues)&&$s(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:void 0===e.crossfade||e.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Te.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){const t=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=t.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=t.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=t.isSharedProjectionDirty);const n=Boolean(this.resumingFrom)||this!==t;if(!(e||n&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:r,layoutId:a}=this.options;if(!this.layout||!r&&!a)return;this.resolvedRelativeTargetAt=Te.timestamp;const s=this.getClosestProjectingParent();var i,o,l;(s&&this.linkedParentVersion!==s.layoutVersion&&!s.options.layoutRoot&&this.removeRelativeTarget(),this.targetDelta||this.relativeTarget||(s&&s.layout?this.createRelativeTarget(s,this.layout.layoutBox,s.layout.layoutBox):this.removeRelativeTarget()),this.relativeTarget||this.targetDelta)&&(this.target||(this.target={x:{min:0,max:0},y:{min:0,max:0}},this.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}}),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),i=this.target,o=this.relativeTarget,l=this.relativeParent.target,_s(i.x,o.x,l.x),_s(i.y,o.y,l.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):Ms(this.target,this.layout.layoutBox),qa(this.target,this.targetDelta)):Ms(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,s&&Boolean(s.resumingFrom)===Boolean(this.resumingFrom)&&!s.options.layoutScroll&&s.target&&1!==this.animationProgress?this.createRelativeTarget(s,this.target,s.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(this.parent&&!Ia(this.parent.latestValues)&&!$a(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(e,t,n){this.relativeParent=e,this.linkedParentVersion=e.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},Rs(this.relativeTargetOrigin,t,n),Ms(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const e=this.getLead(),t=Boolean(this.resumingFrom)||this!==e;let n=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(n=!1),t&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===Te.timestamp&&(n=!1),n)return;const{layout:r,layoutId:a}=this.options;if(this.isTreeAnimating=Boolean(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!r&&!a)return;Ms(this.layoutCorrected,this.layout.layoutBox);const s=this.treeScale.x,i=this.treeScale.y;!function(e,t,n,r=!1){const a=n.length;if(!a)return;let s,i;t.x=t.y=1;for(let o=0;o<a;o++){s=n[o],i=s.projectionDelta;const{visualElement:a}=s.options;a&&a.props.style&&"contents"===a.props.style.display||(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&Za(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),i&&(t.x*=i.x.scale,t.y*=i.y.scale,qa(e,i)),r&&Oa(s.latestValues)&&Za(e,s.latestValues))}t.x<Ka&&t.x>Ya&&(t.x=1),t.y<Ka&&t.y>Ya&&(t.y=1)}(this.layoutCorrected,this.treeScale,this.path,t),!e.layout||e.target||1===this.treeScale.x&&1===this.treeScale.y||(e.target=e.layout.layoutBox,e.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}});const{target:o}=e;o?(this.projectionDelta&&this.prevProjectionDelta?(Ps(this.prevProjectionDelta.x,this.projectionDelta.x),Ps(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),As(this.projectionDelta,this.layoutCorrected,o,this.latestValues),this.treeScale.x===s&&this.treeScale.y===i&&Ks(this.projectionDelta.x,this.prevProjectionDelta.x)&&Ks(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",o))):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){if(this.options.visualElement?.scheduleRender(),e){const e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDeltaWithTransform={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}}setAnimationOrigin(e,t=!1){const n=this.snapshot,r=n?n.latestValues:{},a={...this.latestValues},s={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;const i={x:{min:0,max:0},y:{min:0,max:0}},o=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),c=!l||l.members.length<=1,u=Boolean(o&&!c&&!0===this.options.crossfade&&!this.path.some(Pi));let d;this.animationProgress=0,this.mixTargetDelta=t=>{const n=t/1e3;var l,h,f,p,m,g;Ei(s.x,e.x,n),Ei(s.y,e.y,n),this.setTargetDelta(s),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Rs(i,this.layout.layoutBox,this.relativeParent.layout.layoutBox),f=this.relativeTarget,p=this.relativeTargetOrigin,m=i,g=n,Mi(f.x,p.x,m.x,g),Mi(f.y,p.y,m.y,g),d&&(l=this.relativeTarget,h=d,Us(l.x,h.x)&&Us(l.y,h.y))&&(this.isProjectionDirty=!1),d||(d={x:{min:0,max:0},y:{min:0,max:0}}),Ms(d,this.relativeTarget)),o&&(this.animationValues=a,function(e,t,n,r,a,s){a?(e.opacity=mt(0,n.opacity??1,ti(r)),e.opacityExit=mt(t.opacity??1,0,ni(r))):s&&(e.opacity=mt(t.opacity??1,n.opacity??1,r));for(let i=0;i<Zs;i++){const a=\`border\${Xs[i]}Radius\`;let s=ei(t,a),o=ei(n,a);void 0===s&&void 0===o||(s||(s=0),o||(o=0),0===s||0===o||Js(s)===Js(o)?(e[a]=Math.max(mt(Gs(s),Gs(o),r),0),(Ze.test(o)||Ze.test(s))&&(e[a]+="%")):e[a]=o)}(t.rotate||n.rotate)&&(e.rotate=mt(t.rotate||0,n.rotate||0,r))}(a,r,this.latestValues,n,u,c)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Ne(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Ce.update(()=>{ci.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=pr(0)),this.currentAnimation=function(e,t,n){const r=vr(e)?e:pr(e);return r.start(lr("",r,t,n)),r.animation}(this.motionValue,[0,1e3],{...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onStop:()=>{},onComplete:()=>{e.onComplete&&e.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const e=this.getLead();let{targetWithTransforms:t,target:n,layout:r,latestValues:a}=e;if(t&&n&&r){if(this!==e&&this.layout&&r&&zi(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const t=Ls(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;const r=Ls(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}Ms(t,n),Za(t,a),As(this.projectionDeltaWithTransform,this.layoutCorrected,t,a)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new li);this.sharedNodes.get(e).add(t);const n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){const e=this.getStack();return!e||e.lead===this}getLead(){const{layoutId:e}=this.options;return e&&this.getStack()?.lead||this}getPrevLead(){const{layoutId:e}=this.options;return e?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){const r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){const e=this.getStack();return!!e&&e.relegate(this)}resetSkewAndRotation(){const{visualElement:e}=this.options;if(!e)return;let t=!1;const{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;const r={};n.z&&hi("z",e,r,this.animationValues);for(let a=0;a<ui.length;a++)hi(\`rotate\${ui[a]}\`,e,r,this.animationValues),hi(\`skew\${ui[a]}\`,e,r,this.animationValues);e.render();for(const a in r)e.setStaticValue(a,r[a]),this.animationValues&&(this.animationValues[a]=r[a]);e.scheduleRender()}applyProjectionStyles(e,t){if(!this.instance||this.isSVG)return;if(!this.isVisible)return void(e.visibility="hidden");const n=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,e.visibility="",e.opacity="",e.pointerEvents=oi(t?.pointerEvents)||"",void(e.transform=n?n(this.latestValues,""):"none");const r=this.getLead();if(!this.projectionDelta||!this.layout||!r.target)return this.options.layoutId&&(e.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,e.pointerEvents=oi(t?.pointerEvents)||""),void(this.hasProjected&&!Oa(this.latestValues)&&(e.transform=n?n({},""):"none",this.hasProjected=!1));e.visibility="";const a=r.animationValues||r.latestValues;this.applyTransformsToTarget();let s=function(e,t,n){let r="";const a=e.x.translate/t.x,s=e.y.translate/t.y,i=n?.z||0;if((a||s||i)&&(r=\`translate3d(\${a}px, \${s}px, \${i}px) \`),1===t.x&&1===t.y||(r+=\`scale(\${1/t.x}, \${1/t.y}) \`),n){const{transformPerspective:e,rotate:t,rotateX:a,rotateY:s,skewX:i,skewY:o}=n;e&&(r=\`perspective(\${e}px) \${r}\`),t&&(r+=\`rotate(\${t}deg) \`),a&&(r+=\`rotateX(\${a}deg) \`),s&&(r+=\`rotateY(\${s}deg) \`),i&&(r+=\`skewX(\${i}deg) \`),o&&(r+=\`skewY(\${o}deg) \`)}const o=e.x.scale*t.x,l=e.y.scale*t.y;return 1===o&&1===l||(r+=\`scale(\${o}, \${l})\`),r||"none"}(this.projectionDeltaWithTransform,this.treeScale,a);n&&(s=n(a,s)),e.transform=s;const{x:i,y:o}=this.projectionDelta;e.transformOrigin=\`\${100*i.origin}% \${100*o.origin}% 0\`,r.animationValues?e.opacity=r===this?a.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:a.opacityExit:e.opacity=r===this?void 0!==a.opacity?a.opacity:"":void 0!==a.opacityExit?a.opacityExit:0;for(const l in is){if(void 0===a[l])continue;const{correct:t,applyTo:n,isCSSVariable:i}=is[l],o="none"===s?a[l]:t(a[l],r);if(n){const t=n.length;for(let r=0;r<t;r++)e[n[r]]=o}else i?this.options.visualElement.renderState.vars[l]=o:e[l]=o}this.options.layoutId&&(e.pointerEvents=r===this?oi(t?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(bi),this.root.sharedNodes.clear()}}}function mi(e){e.updateLayout()}function gi(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:r}=e.layout,{animationType:a}=e.options,s=t.source!==e.layout.source;"size"===a?Qs(e=>{const r=s?t.measuredBox[e]:t.layoutBox[e],a=Ls(r);r.min=n[e].min,r.max=r.min+a}):zi(a,t.layoutBox,n)&&Qs(r=>{const a=s?t.measuredBox[r]:t.layoutBox[r],i=Ls(n[r]);a.max=a.min+i,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+i)});const i={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};As(i,n,t.layoutBox);const o={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};s?As(o,e.applyTransform(r,!0),t.measuredBox):As(o,n,t.layoutBox);const l=!Hs(i);let c=!1;if(!e.resumeFrom){const r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){const{snapshot:a,layout:s}=r;if(a&&s){const i={x:{min:0,max:0},y:{min:0,max:0}};Rs(i,t.layoutBox,a.layoutBox);const o={x:{min:0,max:0},y:{min:0,max:0}};Rs(o,n,s.layoutBox),qs(i,o)||(c=!0),r.options.layoutRoot&&(e.relativeTarget=o,e.relativeTargetOrigin=i,e.relativeParent=r)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:o,layoutDelta:i,hasLayoutChanged:l,hasRelativeLayoutChanged:c})}else if(e.isLead()){const{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function yi(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=Boolean(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function vi(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function xi(e){e.clearSnapshot()}function bi(e){e.clearMeasurements()}function wi(e){e.isLayoutDirty=!1}function ki(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Si(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function ji(e){e.resolveTargetDelta()}function Ci(e){e.calcProjection()}function Ni(e){e.resetSkewAndRotation()}function Ti(e){e.removeLeadSnapshot()}function Ei(e,t,n){e.translate=mt(t.translate,0,n),e.scale=mt(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Mi(e,t,n,r){e.min=mt(t.min,n.min,r),e.max=mt(t.max,n.max,r)}function Pi(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}const Li={duration:.45,ease:[.4,0,.1,1]},Di=e=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Ai=Di("applewebkit/")&&!Di("chrome/")?Math.round:G;function _i(e){e.min=Ai(e.min),e.max=Ai(e.max)}function zi(e,t,n){return"position"===e||"preserve-aspect"===e&&(r=Ys(t),a=Ys(n),s=.2,!(Math.abs(r-a)<=s));var r,a,s}function Ri(e){return e!==e.root&&e.scroll?.wasRoot}const Fi=pi({attachResizeListener:(e,t)=>ai(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),Vi={current:void 0},Ii=pi({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Vi.current){const e=new Fi({});e.mount(window),e.setOptions({layoutScroll:!0}),Vi.current=e}return Vi.current},resetTransform:(e,t)=>{e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:e=>Boolean("fixed"===window.getComputedStyle(e).position)}),Oi=h.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function $i(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function Bi(...e){return h.useCallback(function(...e){return t=>{let n=!1;const r=e.map(e=>{const r=$i(e,t);return n||"function"!=typeof r||(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){const n=r[t];"function"==typeof n?n():$i(e[t],null)}}}}(...e),e)}class Hi extends h.Component{getSnapshotBeforeUpdate(e){const t=this.props.childRef.current;if(t&&e.isPresent&&!this.props.isPresent&&!1!==this.props.pop){const e=t.offsetParent,n=Ur(e)&&e.offsetWidth||0,r=Ur(e)&&e.offsetHeight||0,a=this.props.sizeRef.current;a.height=t.offsetHeight||0,a.width=t.offsetWidth||0,a.top=t.offsetTop,a.left=t.offsetLeft,a.right=n-a.width-a.left,a.bottom=r-a.height-a.top}return null}componentDidUpdate(){}render(){return this.props.children}}function Ui({children:e,isPresent:t,anchorX:n,anchorY:r,root:a,pop:s}){const i=h.useId(),l=h.useRef(null),c=h.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:u}=h.useContext(Oi),d=e.props?.ref??e?.ref,f=Bi(l,d);return h.useInsertionEffect(()=>{const{width:e,height:o,top:d,left:h,right:f,bottom:p}=c.current;if(t||!1===s||!l.current||!e||!o)return;const m="left"===n?\`left: \${h}\`:\`right: \${f}\`,g="bottom"===r?\`bottom: \${p}\`:\`top: \${d}\`;l.current.dataset.motionPopId=i;const y=document.createElement("style");u&&(y.nonce=u);const v=a??document.head;return v.appendChild(y),y.sheet&&y.sheet.insertRule(\`\\n [data-motion-pop-id="\${i}"] {\\n position: absolute !important;\\n width: \${e}px !important;\\n height: \${o}px !important;\\n \${m}px !important;\\n \${g}px !important;\\n }\\n \`),()=>{v.contains(y)&&v.removeChild(y)}},[t]),o.jsx(Hi,{isPresent:t,childRef:l,sizeRef:c,pop:s,children:!1===s?e:h.cloneElement(e,{ref:f})})}const Wi=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:a,presenceAffectsLayout:s,mode:i,anchorX:l,anchorY:c,root:u})=>{const d=O(qi),f=h.useId();let p=!0,m=h.useMemo(()=>(p=!1,{id:f,initial:t,isPresent:n,custom:a,onExitComplete:e=>{d.set(e,!0);for(const t of d.values())if(!t)return;r&&r()},register:e=>(d.set(e,!1),()=>d.delete(e))}),[n,d,r]);return s&&p&&(m={...m}),h.useMemo(()=>{d.forEach((e,t)=>d.set(t,!1))},[n]),h.useEffect(()=>{!n&&!d.size&&r&&r()},[n]),e=o.jsx(Ui,{pop:"popLayout"===i,isPresent:n,anchorX:l,anchorY:c,root:u,children:e}),o.jsx(H.Provider,{value:m,children:e})};function qi(){return new Map}function Yi(e=!0){const t=h.useContext(H);if(null===t)return[!0,null];const{isPresent:n,onExitComplete:r,register:a}=t,s=h.useId();h.useEffect(()=>{if(e)return a(s)},[e]);const i=h.useCallback(()=>e&&r&&r(s),[s,r,e]);return!n&&r?[!1,i]:[!0]}const Ki=e=>e.key||"";function Qi(e){const t=[];return h.Children.forEach(e,e=>{h.isValidElement(e)&&t.push(e)}),t}const Xi=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:a=!0,mode:s="sync",propagate:i=!1,anchorX:l="left",anchorY:c="top",root:u})=>{const[d,f]=Yi(i),p=h.useMemo(()=>Qi(e),[e]),m=i&&!d?[]:p.map(Ki),g=h.useRef(!0),y=h.useRef(p),v=O(()=>new Map),x=h.useRef(new Set),[b,w]=h.useState(p),[k,S]=h.useState(p);B(()=>{g.current=!1,y.current=p;for(let e=0;e<k.length;e++){const t=Ki(k[e]);m.includes(t)?(v.delete(t),x.current.delete(t)):!0!==v.get(t)&&v.set(t,!1)}},[k,m.length,m.join("-")]);const j=[];if(p!==b){let e=[...p];for(let t=0;t<k.length;t++){const n=k[t],r=Ki(n);m.includes(r)||(e.splice(t,0,n),j.push(n))}return"wait"===s&&j.length&&(e=j),S(Qi(e)),w(p),null}const{forceRender:C}=h.useContext(I);return o.jsx(o.Fragment,{children:k.map(e=>{const h=Ki(e),b=!(i&&!d)&&(p===k||m.includes(h));return o.jsx(Wi,{isPresent:b,initial:!(g.current&&!n)&&void 0,custom:t,presenceAffectsLayout:a,mode:s,root:u,onExitComplete:b?void 0:()=>{if(x.current.has(h))return;if(x.current.add(h),!v.has(h))return;v.set(h,!0);let e=!0;v.forEach(t=>{t||(e=!1)}),e&&(C?.(),S(y.current),i&&f?.(),r&&r())},anchorX:l,anchorY:c,children:e},h)})})},Zi=h.createContext({strict:!1}),Gi={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let Ji=!1;function eo(){return function(){if(Ji)return;const e={};for(const t in Gi)e[t]={isEnabled:e=>Gi[t].some(t=>!!e[t])};Aa(e),Ji=!0}(),Da}const to=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function no(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||to.has(e)}let ro=e=>!no(e);try{"function"==typeof(ao=require("@emotion/is-prop-valid").default)&&(ro=e=>e.startsWith("on")?!no(e):ao(e))}catch{}var ao;const so=h.createContext({});function io(e){const{initial:t,animate:n}=function(e,t){if(Na(e)){const{initial:t,animate:n}=e;return{initial:!1===t||Sa(t)?t:void 0,animate:Sa(n)?n:void 0}}return!1!==e.inherit?t:{}}(e,h.useContext(so));return h.useMemo(()=>({initial:t,animate:n}),[oo(t),oo(n)])}function oo(e){return Array.isArray(e)?e.join(" "):e}const lo=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function co(e,t,n){for(const r in t)vr(t[r])||os(r,n)||(e[r]=t[r])}function uo(e,t){const n={};return co(n,e.style||{},e),Object.assign(n,function({transformTemplate:e},t){return h.useMemo(()=>{const n={style:{},transform:{},transformOrigin:{},vars:{}};return ts(n,t,e),Object.assign({},n.vars,n.style)},[t])}(e,t)),n}function ho(e,t){const n={},r=uo(e,t);return e.drag&&!1!==e.dragListener&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=!0===e.drag?"none":"pan-"+("x"===e.drag?"y":"x")),void 0===e.tabIndex&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const fo=()=>({style:{},transform:{},transformOrigin:{},vars:{},attrs:{}});function po(e,t,n,r){const a=h.useMemo(()=>{const n={style:{},transform:{},transformOrigin:{},vars:{},attrs:{}};return fs(n,t,ms(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){const t={};co(t,e.style,e),a.style={...t,...a.style}}return a}const mo=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function go(e){return"string"==typeof e&&!e.includes("-")&&!!(mo.indexOf(e)>-1||/[A-Z]/u.test(e))}function yo(e,t,n,{latestValues:r},a,s=!1,i){const o=(i??go(e)?po:ho)(t,r,a,e),l=function(e,t,n){const r={};for(const a in e)"values"===a&&"object"==typeof e.values||(ro(a)||!0===n&&no(a)||!t&&!no(a)||e.draggable&&a.startsWith("onDrag"))&&(r[a]=e[a]);return r}(t,"string"==typeof e,s),c=e!==h.Fragment?{...l,...o,ref:n}:{},{children:u}=t,d=h.useMemo(()=>vr(u)?u.get():u,[u]);return h.createElement(e,{...c,children:d})}function vo(e,t,n,r){const a={},s=r(e,{});for(const h in s)a[h]=oi(s[h]);let{initial:i,animate:o}=e;const l=Na(e),c=Ta(e);t&&c&&!l&&!1!==e.inherit&&(void 0===i&&(i=t.initial),void 0===o&&(o=t.animate));let u=!!n&&!1===n.initial;u=u||!1===i;const d=u?o:i;if(d&&"boolean"!=typeof d&&!ka(d)){const t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){const r=ur(e,t[n]);if(r){const{transitionEnd:e,transition:t,...n}=r;for(const r in n){let e=n[r];if(Array.isArray(e)){e=e[u?e.length-1:0]}null!==e&&(a[r]=e)}for(const r in e)a[r]=e[r]}}}return a}const xo=e=>(t,n)=>{const r=h.useContext(so),a=h.useContext(H),s=()=>function({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,a){return{latestValues:vo(n,r,a,e),renderState:t()}}(e,t,r,a);return n?s():O(s)},bo=xo({scrapeMotionValuesFromProps:ls,createRenderState:lo}),wo=xo({scrapeMotionValuesFromProps:gs,createRenderState:fo}),ko=Symbol.for("motionComponentSymbol");function So(e,t,n){const r=h.useRef(n);h.useInsertionEffect(()=>{r.current=n});const a=h.useRef(null);return h.useCallback(n=>{n&&e.onMount?.(n),t&&(n?t.mount(n):t.unmount());const s=r.current;if("function"==typeof s)if(n){const e=s(n);"function"==typeof e&&(a.current=e)}else a.current?(a.current(),a.current=null):s(n);else s&&(s.current=n)},[t])}const jo=h.createContext({});function Co(e){return e&&"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}function No(e,t,n,r,a,s){const{visualElement:i}=h.useContext(so),o=h.useContext(Zi),l=h.useContext(H),c=h.useContext(Oi),u=c.reducedMotion,d=c.skipAnimations,f=h.useRef(null),p=h.useRef(!1);r=r||o.renderer,!f.current&&r&&(f.current=r(e,{visualState:t,parent:i,props:n,presenceContext:l,blockInitialAnimation:!!l&&!1===l.initial,reducedMotionConfig:u,skipAnimations:d,isSVG:s}),p.current&&f.current&&(f.current.manuallyAnimateOnMount=!0));const m=f.current,g=h.useContext(jo);!m||m.projection||!a||"html"!==m.type&&"svg"!==m.type||function(e,t,n,r){const{layoutId:a,layout:s,drag:i,dragConstraints:o,layoutScroll:l,layoutRoot:c,layoutCrossfade:u}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:To(e.parent)),e.projection.setOptions({layoutId:a,layout:s,alwaysMeasureLayout:Boolean(i)||o&&Co(o),visualElement:e,animationType:"string"==typeof s?s:"both",initialPromotionConfig:r,crossfade:u,layoutScroll:l,layoutRoot:c})}(f.current,n,a,g);const y=h.useRef(!1);h.useInsertionEffect(()=>{m&&y.current&&m.update(n,l)});const v=n[wr],x=h.useRef(Boolean(v)&&!window.MotionHandoffIsComplete?.(v)&&window.MotionHasOptimisedAnimation?.(v));return B(()=>{p.current=!0,m&&(y.current=!0,window.MotionIsMounted=!0,m.updateFeatures(),m.scheduleRenderMicrotask(),x.current&&m.animationState&&m.animationState.animateChanges())}),h.useEffect(()=>{m&&(!x.current&&m.animationState&&m.animationState.animateChanges(),x.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(v)}),x.current=!1),m.enteringChildren=void 0)}),m}function To(e){if(e)return!1!==e.options.allowProjection?e.projection:To(e.parent)}function Eo(e,{forwardMotionProps:t=!1,type:n}={},r,a){r&&function(e){const t=eo();for(const n in e)t[n]={...t[n],...e[n]};Aa(t)}(r);const s=n?"svg"===n:go(e),i=s?wo:bo;function l(n,r){let l;const c={...h.useContext(Oi),...n,layoutId:Mo(n)},{isStatic:u}=c,d=io(n),f=i(n,u);if(!u&&$){h.useContext(Zi).strict;const t=function(e){const t=eo(),{drag:n,layout:r}=t;if(!n&&!r)return{};const a={...n,...r};return{MeasureLayout:n?.isEnabled(e)||r?.isEnabled(e)?a.MeasureLayout:void 0,ProjectionNode:a.ProjectionNode}}(c);l=t.MeasureLayout,d.visualElement=No(e,f,c,a,t.ProjectionNode,s)}return o.jsxs(so.Provider,{value:d,children:[l&&d.visualElement?o.jsx(l,{visualElement:d.visualElement,...c}):null,yo(e,n,So(f,d.visualElement,r),f,u,t,s)]})}l.displayName=\`motion.\${"string"==typeof e?e:\`create(\${e.displayName??e.name??""})\`}\`;const c=h.forwardRef(l);return c[ko]=e,c}function Mo({layoutId:e}){const t=h.useContext(I).id;return t&&void 0!==e?t+"-"+e:e}function Po(e,t){if("undefined"==typeof Proxy)return Eo;const n=new Map,r=(n,r)=>Eo(n,r,e,t);return new Proxy((e,t)=>r(e,t),{get:(a,s)=>"create"===s?r:(n.has(s)||n.set(s,Eo(s,void 0,e,t)),n.get(s))})}const Lo=(e,t)=>t.isSVG??go(e)?new ys(t):new cs(t,{allowProjection:e!==h.Fragment});let Do=0;const Ao={animation:{Feature:class extends Ra{constructor(e){super(e),e.animationState||(e.animationState=js(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();ka(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}},exit:{Feature:class extends Ra{constructor(){super(...arguments),this.id=Do++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;const r=this.node.animationState.setActive("exit",!e);t&&!e&&r.then(()=>{t(this.id)})}mount(){const{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}}}};function _o(e){return{point:{x:e.pageX,y:e.pageY}}}function zo(e,t,n,r){return ai(e,t,(e=>t=>Zr(t)&&e(t,_o(t)))(n),r)}const Ro=({current:e})=>e?e.ownerDocument.defaultView:null,Fo=(e,t)=>Math.abs(e-t);const Vo=new Set(["auto","scroll"]);class Io{constructor(e,t,{transformPagePoint:n,contextWindow:r=window,dragSnapToOrigin:a=!1,distanceThreshold:s=3,element:i}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=e=>{this.handleScroll(e.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;const e=Bo(this.lastMoveEventInfo,this.history),t=null!==this.startEvent,n=function(e,t){const n=Fo(e.x,t.x),r=Fo(e.y,t.y);return Math.sqrt(n**2+r**2)}(e.offset,{x:0,y:0})>=this.distanceThreshold;if(!t&&!n)return;const{point:r}=e,{timestamp:a}=Te;this.history.push({...r,timestamp:a});const{onStart:s,onMove:i}=this.handlers;t||(s&&s(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),i&&i(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastMoveEventInfo=Oo(t,this.transformPagePoint),Ce.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();const{onEnd:n,onSessionEnd:r,resumeAnimation:a}=this.handlers;if(!this.dragSnapToOrigin&&this.startEvent||a&&a(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const s=Bo("pointercancel"===e.type?this.lastMoveEventInfo:Oo(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,s),r&&r(e,s)},!Zr(e))return;this.dragSnapToOrigin=a,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=s,this.contextWindow=r||window;const o=Oo(_o(e),this.transformPagePoint),{point:l}=o,{timestamp:c}=Te;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=t;u&&u(e,Bo(o,this.history)),this.removeListeners=ee(zo(this.contextWindow,"pointermove",this.handlePointerMove),zo(this.contextWindow,"pointerup",this.handlePointerUp),zo(this.contextWindow,"pointercancel",this.handlePointerUp)),i&&this.startScrollTracking(i)}startScrollTracking(e){let t=e.parentElement;for(;t;){const e=getComputedStyle(t);(Vo.has(e.overflowX)||Vo.has(e.overflowY))&&this.scrollPositions.set(t,{x:t.scrollLeft,y:t.scrollTop}),t=t.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0,passive:!0}),window.addEventListener("scroll",this.onWindowScroll,{passive:!0}),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(e){const t=this.scrollPositions.get(e);if(!t)return;const n=e===window,r=n?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},a=r.x-t.x,s=r.y-t.y;0===a&&0===s||(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=a,this.lastMoveEventInfo.point.y+=s):this.history.length>0&&(this.history[0].x-=a,this.history[0].y-=s),this.scrollPositions.set(e,r),Ce.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Ne(this.updatePoint)}}function Oo(e,t){return t?{point:t(e.point)}:e}function $o(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Bo({point:e},t){return{point:e,delta:$o(e,Uo(t)),offset:$o(e,Ho(t)),velocity:Wo(t,.1)}}function Ho(e){return e[0]}function Uo(e){return e[e.length-1]}function Wo(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const a=Uo(e);for(;n>=0&&(r=e[n],!(a.timestamp-r.timestamp>re(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&a.timestamp-r.timestamp>2*re(t)&&(r=e[1]);const s=ae(a.timestamp-r.timestamp);if(0===s)return{x:0,y:0};const i={x:(a.x-r.x)/s,y:(a.y-r.y)/s};return i.x===1/0&&(i.x=0),i.y===1/0&&(i.y=0),i}function qo(e,t,n){return{min:void 0!==t?e.min+t:void 0,max:void 0!==n?e.max+n-(e.max-e.min):void 0}}function Yo(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}const Ko=.35;function Qo(e,t,n){return{min:Xo(e,t),max:Xo(e,n)}}function Xo(e,t){return"number"==typeof e?e:e[t]||0}const Zo=new WeakMap;class Go{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic={x:{min:0,max:0},y:{min:0,max:0}},this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:t=!1,distanceThreshold:n}={}){const{presenceContext:r}=this.visualElement;if(r&&!1===r.isPresent)return;const{dragSnapToOrigin:a}=this.getProps();this.panSession=new Io(e,{onSessionStart:e=>{t&&this.snapToCursor(_o(e).point),this.stopAnimation()},onStart:(e,t)=>{const{drag:n,dragPropagation:r,onDragStart:a}=this.getProps();if(n&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock="x"===(s=n)||"y"===s?qr[s]?null:(qr[s]=!0,()=>{qr[s]=!1}):qr.x||qr.y?null:(qr.x=qr.y=!0,()=>{qr.x=qr.y=!1}),!this.openDragLock))return;var s;this.latestPointerEvent=e,this.latestPanInfo=t,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Qs(e=>{let t=this.getAxisMotionValue(e).get()||0;if(Ze.test(t)){const{projection:n}=this.visualElement;if(n&&n.layout){const r=n.layout.layoutBox[e];if(r){t=Ls(r)*(parseFloat(t)/100)}}}this.originPoint[e]=t}),a&&Ce.update(()=>a(e,t),!1,!0),xr(this.visualElement,"transform");const{animationState:i}=this.visualElement;i&&i.setActive("whileDrag",!0)},onMove:(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t;const{dragPropagation:n,dragDirectionLock:r,onDirectionLock:a,onDrag:s}=this.getProps();if(!n&&!this.openDragLock)return;const{offset:i}=t;if(r&&null===this.currentDirection)return this.currentDirection=function(e,t=10){let n=null;Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x");return n}(i),void(null!==this.currentDirection&&a&&a(this.currentDirection));this.updateAxis("x",t.point,i),this.updateAxis("y",t.point,i),this.visualElement.render(),s&&Ce.update(()=>s(e,t),!1,!0)},onSessionEnd:(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t,this.stop(e,t),this.latestPointerEvent=null,this.latestPanInfo=null},resumeAnimation:()=>{const{dragSnapToOrigin:e}=this.getProps();(e||this.constraints)&&this.startAnimation({x:0,y:0})}},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:a,distanceThreshold:n,contextWindow:Ro(this.visualElement),element:this.visualElement.current})}stop(e,t){const n=e||this.latestPointerEvent,r=t||this.latestPanInfo,a=this.isDragging;if(this.cancel(),!a||!r||!n)return;const{velocity:s}=r;this.startAnimation(s);const{onDragEnd:i}=this.getProps();i&&Ce.postRender(()=>i(n,r))}cancel(){this.isDragging=!1;const{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,t,n){const{drag:r}=this.getProps();if(!n||!el(e,r,this.currentDirection))return;const a=this.getAxisMotionValue(e);let s=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(s=function(e,{min:t,max:n},r){return void 0!==t&&e<t?e=r?mt(t,e,r.min):Math.max(e,t):void 0!==n&&e>n&&(e=r?mt(n,e,r.max):Math.min(e,n)),e}(s,this.constraints[e],this.elastic[e])),a.set(s)}resolveConstraints(){const{dragConstraints:e,dragElastic:t}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,r=this.constraints;e&&Co(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!e||!n)&&function(e,{top:t,left:n,bottom:r,right:a}){return{x:qo(e.x,n,a),y:qo(e.y,t,r)}}(n.layoutBox,e),this.elastic=function(e=Ko){return!1===e?e=0:!0===e&&(e=Ko),{x:Qo(e,"left","right"),y:Qo(e,"top","bottom")}}(t),r!==this.constraints&&!Co(e)&&n&&this.constraints&&!this.hasMutatedConstraints&&Qs(e=>{!1!==this.constraints&&this.getAxisMotionValue(e)&&(this.constraints[e]=function(e,t){const n={};return void 0!==t.min&&(n.min=t.min-e.min),void 0!==t.max&&(n.max=t.max-e.min),n}(n.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!Co(e))return!1;const n=e.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const a=function(e,t,n){const r=Ga(e,n),{scroll:a}=t;return a&&(Qa(r.x,a.offset.x),Qa(r.y,a.offset.y)),r}(n,r.root,this.visualElement.getTransformPagePoint());let s=function(e,t){return{x:Yo(e.x,t.x),y:Yo(e.y,t.y)}}(r.layout.layoutBox,a);if(t){const e=t(function({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}(s));this.hasMutatedConstraints=!!e,e&&(s=Fa(e))}return s}startAnimation(e){const{drag:t,dragMomentum:n,dragElastic:r,dragTransition:a,dragSnapToOrigin:s,onDragTransitionEnd:i}=this.getProps(),o=this.constraints||{},l=Qs(i=>{if(!el(i,t,this.currentDirection))return;let l=o&&o[i]||{};s&&(l={min:0,max:0});const c=r?200:1e6,u=r?40:1e7,d={type:"inertia",velocity:n?e[i]:0,bounceStiffness:c,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...a,...l};return this.startAxisValueAnimation(i,d)});return Promise.all(l).then(i)}startAxisValueAnimation(e,t){const n=this.getAxisMotionValue(e);return xr(this.visualElement,e),n.start(lr(e,n,0,t,this.visualElement,!1))}stopAnimation(){Qs(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){const t=\`_drag\${e.toUpperCase()}\`,n=this.visualElement.getProps(),r=n[t];return r||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){Qs(t=>{const{drag:n}=this.getProps();if(!el(t,n,this.currentDirection))return;const{projection:r}=this.visualElement,a=this.getAxisMotionValue(t);if(r&&r.layout){const{min:n,max:s}=r.layout.layoutBox[t],i=a.get()||0;a.set(e[t]-mt(n,s,.5)+i)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!Co(t)||!n||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};Qs(e=>{const t=this.getAxisMotionValue(e);if(t&&!1!==this.constraints){const n=t.get();r[e]=function(e,t){let n=.5;const r=Ls(e),a=Ls(t);return a>r?n=te(t.min,t.max-r,e.min):r>a&&(n=te(e.min,e.max-a,t.min)),q(0,1,n)}({min:n,max:n},this.constraints[e])}});const{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.constraints=!1,this.resolveConstraints(),Qs(t=>{if(!el(t,e,null))return;const n=this.getAxisMotionValue(t),{min:a,max:s}=this.constraints[t];n.set(mt(a,s,r[t]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;Zo.set(this.visualElement,this);const e=this.visualElement.current,t=zo(e,"pointerdown",t=>{const{drag:n,dragListener:r=!0}=this.getProps(),a=t.target,s=a!==e&&function(e){return Jr.has(e.tagName)||!0===e.isContentEditable}(a);n&&r&&!s&&this.start(t)});let n;const r=()=>{const{dragConstraints:t}=this.getProps();Co(t)&&t.current&&(this.constraints=this.resolveRefConstraints(),n||(n=function(e,t,n){const r=va(e,Jo(n)),a=va(t,Jo(n));return()=>{r(),a()}}(e,t.current,()=>this.scalePositionWithinConstraints())))},{projection:a}=this.visualElement,s=a.addEventListener("measure",r);a&&!a.layout&&(a.root&&a.root.updateScroll(),a.updateLayout()),Ce.read(r);const i=ai(window,"resize",()=>this.scalePositionWithinConstraints()),o=a.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(Qs(t=>{const n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))}),this.visualElement.render())});return()=>{i(),t(),s(),o&&o(),n&&n()}}getProps(){const e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:a=!1,dragElastic:s=Ko,dragMomentum:i=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:a,dragElastic:s,dragMomentum:i}}}function Jo(e){let t=!0;return()=>{t?t=!1:e()}}function el(e,t,n){return!(!0!==t&&t!==e||null!==n&&n!==e)}const tl=e=>(t,n)=>{e&&Ce.update(()=>e(t,n),!1,!0)};let nl=!1;class rl extends h.Component{componentDidMount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:a}=e;a&&(t.group&&t.group.add(a),n&&n.register&&r&&n.register(a),nl&&a.root.didUpdate(),a.addEventListener("animationComplete",()=>{this.safeToRemove()}),a.setOptions({...a.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),ci.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:t,visualElement:n,drag:r,isPresent:a}=this.props,{projection:s}=n;return s?(s.isPresent=a,e.layoutDependency!==t&&s.setOptions({...s.options,layoutDependency:t}),nl=!0,r||e.layoutDependency!==t||void 0===t||e.isPresent!==a?s.willUpdate():this.safeToRemove(),e.isPresent!==a&&(a?s.promote():s.relegate()||Ce.postRender(()=>{const e=s.getStack();e&&e.members.length||this.safeToRemove()})),null):null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),Wr.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;nl=!0,r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function al(e){const[t,n]=Yi(),r=h.useContext(I);return o.jsx(rl,{...e,layoutGroup:r,switchLayoutGroup:h.useContext(jo),isPresent:t,safeToRemove:n})}const sl={pan:{Feature:class extends Ra{constructor(){super(...arguments),this.removePointerDownListener=G}onPointerDown(e){this.session=new Io(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Ro(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:tl(e),onStart:tl(t),onMove:tl(n),onEnd:(e,t)=>{delete this.session,r&&Ce.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=zo(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends Ra{constructor(e){super(e),this.removeGroupControls=G,this.removeListeners=G,this.controls=new Go(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||G}update(){const{dragControls:e}=this.node.getProps(),{dragControls:t}=this.node.prevProps||{};e!==t&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}},ProjectionNode:Ii,MeasureLayout:al}};function il(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover","Start"===n);const a=r["onHover"+n];a&&Ce.postRender(()=>a(t,_o(t)))}function ol(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap","Start"===n);const a=r["onTap"+("End"===n?"":n)];a&&Ce.postRender(()=>a(t,_o(t)))}const ll=new WeakMap,cl=new WeakMap,ul=e=>{const t=ll.get(e.target);t&&t(e)},dl=e=>{e.forEach(ul)};function hl(e,t,n){const r=function({root:e,...t}){const n=e||document;cl.has(n)||cl.set(n,{});const r=cl.get(n),a=JSON.stringify(t);return r[a]||(r[a]=new IntersectionObserver(dl,{root:e,...t})),r[a]}(t);return ll.set(e,n),r.observe(e),()=>{ll.delete(e),r.unobserve(e)}}const fl={some:0,all:1};const pl=Po({...Ao,...{inView:{Feature:class extends Ra{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r="some",once:a}=e,s={root:t?t.current:void 0,rootMargin:n,threshold:"number"==typeof r?r:fl[r]};return hl(this.node.current,s,e=>{const{isIntersecting:t}=e;if(this.isInView===t)return;if(this.isInView=t,a&&!t&&this.hasEnteredView)return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",t);const{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),s=t?n:r;s&&s(e)})}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:e,prevProps:t}=this.node;["amount","margin","root"].some(function({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}(e,t))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends Ra{mount(){const{current:e}=this.node;if(!e)return;const{globalTapTarget:t,propagate:n}=this.node.props;this.unmount=sa(e,(e,t)=>(ol(this.node,t,"Start"),(e,{success:t})=>ol(this.node,e,t?"End":"Cancel")),{useGlobalTarget:t,stopPropagation:!1===n?.tap})}unmount(){}}},focus:{Feature:class extends Ra{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch(t){e=!0}e&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=ee(ai(this.node.current,"focus",()=>this.onFocus()),ai(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}},hover:{Feature:class extends Ra{mount(){const{current:e}=this.node;e&&(this.unmount=Qr(e,(e,t)=>(il(this.node,t,"Start"),e=>il(this.node,e,"End"))))}unmount(){}}}},...sl,...{layout:{ProjectionNode:Ii,MeasureLayout:al}}},Lo),ml=(...e)=>e.filter((e,t,n)=>Boolean(e)&&""!==e.trim()&&n.indexOf(e)===t).join(" ").trim();
34502
34794
  /**
34503
34795
  * @license lucide-react v0.468.0 - ISC
34504
34796
  *
@@ -34511,14 +34803,14 @@ var gl={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24
34511
34803
  *
34512
34804
  * This source code is licensed under the ISC license.
34513
34805
  * See the LICENSE file in the root directory of this source tree.
34514
- */const yl=f.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:a="",children:i,iconNode:s,...o},l)=>f.createElement("svg",{ref:l,...gl,width:t,height:t,stroke:e,strokeWidth:r?24*Number(n)/Number(t):n,className:ml("lucide",a),...o},[...s.map(([e,t])=>f.createElement(e,t)),...Array.isArray(i)?i:[i]])),vl=(e,t)=>{const n=f.forwardRef(({className:n,...r},a)=>{return f.createElement(yl,{ref:a,iconNode:t,className:ml(\`lucide-\${i=e,i.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}\`,n),...r});var i});return n.displayName=\`\${e}\`,n},xl=vl("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]),bl=vl("Brain",[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z",key:"ep3f8r"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4",key:"1p4c4q"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}]]),wl=vl("Bug",[["path",{d:"m8 2 1.88 1.88",key:"fmnt4t"}],["path",{d:"M14.12 3.88 16 2",key:"qol33r"}],["path",{d:"M9 7.13v-1a3.003 3.003 0 1 1 6 0v1",key:"d7y7pr"}],["path",{d:"M12 20c-3.3 0-6-2.7-6-6v-3a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v3c0 3.3-2.7 6-6 6",key:"xs1cw7"}],["path",{d:"M12 20v-9",key:"1qisl0"}],["path",{d:"M6.53 9C4.6 8.8 3 7.1 3 5",key:"32zzws"}],["path",{d:"M6 13H2",key:"82j7cp"}],["path",{d:"M3 21c0-2.1 1.7-3.9 3.8-4",key:"4p0ekp"}],["path",{d:"M20.97 5c0 2.1-1.6 3.8-3.5 4",key:"18gb23"}],["path",{d:"M22 13h-4",key:"1jl80f"}],["path",{d:"M17.2 17c2.1.1 3.8 1.9 3.8 4",key:"k3fwyw"}]]),kl=vl("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]),Sl=vl("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]),jl=vl("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),Cl=vl("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]),Nl=vl("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]),Tl=vl("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]),El=vl("CircleArrowUp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16 12-4-4-4 4",key:"177agl"}],["path",{d:"M12 16V8",key:"1sbj14"}]]),Ml=vl("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]),Pl=vl("Compass",[["path",{d:"m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z",key:"9ktpf1"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]),Ll=vl("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]),Dl=vl("Cpu",[["rect",{width:"16",height:"16",x:"4",y:"4",rx:"2",key:"14l7u7"}],["rect",{width:"6",height:"6",x:"9",y:"9",rx:"1",key:"5aljv4"}],["path",{d:"M15 2v2",key:"13l42r"}],["path",{d:"M15 20v2",key:"15mkzm"}],["path",{d:"M2 15h2",key:"1gxd5l"}],["path",{d:"M2 9h2",key:"1bbxkp"}],["path",{d:"M20 15h2",key:"19e6y8"}],["path",{d:"M20 9h2",key:"19tzq7"}],["path",{d:"M9 2v2",key:"165o2o"}],["path",{d:"M9 20v2",key:"i2bqo8"}]]),Al=vl("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]),_l=vl("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]),zl=vl("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]),Rl=vl("Filter",[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]]),Fl=vl("Flag",[["path",{d:"M4 15s1-1 4-1 5 2 8 2 4-1 4-1V3s-1 1-4 1-5-2-8-2-4 1-4 1z",key:"i9b6wo"}],["line",{x1:"4",x2:"4",y1:"22",y2:"15",key:"1cm3nv"}]]),Vl=vl("FolderKanban",[["path",{d:"M4 20h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.93a2 2 0 0 1-1.66-.9l-.82-1.2A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13c0 1.1.9 2 2 2Z",key:"1fr9dc"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M12 10v2",key:"hh53o1"}],["path",{d:"M16 10v6",key:"1d6xys"}]]),Ol=vl("Layers",[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]]),Il=vl("Lightbulb",[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]]),$l=vl("Link",[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]]),Bl=vl("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]),Hl=vl("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]),Ul=vl("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]),Wl=vl("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]),ql=vl("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]),Yl=vl("Pen",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]]),Kl=vl("Pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]),Ql=vl("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]),Xl=vl("Rocket",[["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z",key:"m3kijz"}],["path",{d:"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z",key:"1fmvmk"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0",key:"1f8sc4"}],["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}]]),Gl=vl("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]),Zl=vl("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]),Jl=vl("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]),ec=vl("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]),tc=vl("Target",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]]),nc=vl("Timer",[["line",{x1:"10",x2:"14",y1:"2",y2:"2",key:"14vaq8"}],["line",{x1:"12",x2:"15",y1:"14",y2:"11",key:"17fdiu"}],["circle",{cx:"12",cy:"14",r:"8",key:"1e1u0o"}]]),rc=vl("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]),ac=vl("Trophy",[["path",{d:"M6 9H4.5a2.5 2.5 0 0 1 0-5H6",key:"17hqa7"}],["path",{d:"M18 9h1.5a2.5 2.5 0 0 0 0-5H18",key:"lmptdp"}],["path",{d:"M4 22h16",key:"57wxv0"}],["path",{d:"M10 14.66V17c0 .55-.47.98-.97 1.21C7.85 18.75 7 20.24 7 22",key:"1nw9bq"}],["path",{d:"M14 14.66V17c0 .55.47.98.97 1.21C16.15 18.75 17 20.24 17 22",key:"1np0yb"}],["path",{d:"M18 2H6v7a6 6 0 0 0 12 0V2Z",key:"u46fv3"}]]),ic=vl("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]),sc=vl("Wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]]),oc=vl("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),lc=vl("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]),cc={"claude-code":"#d4a04a","claude-desktop":"#d4a04a",codex:"#10a37f",openai:"#10a37f",cursor:"#00b4d8",copilot:"#6e40c9","github-copilot":"#6e40c9","copilot-cli":"#6e40c9",windsurf:"#38bdf8",trae:"#06b6d4",vscode:"#007ACC","vscode-insiders":"#24bfa5",aider:"#4ade80","kilo-code":"#14b8a6",crush:"#ef4444",continue:"#f97316",cody:"#ff6b6b",tabby:"#a78bfa",roo:"#f472b6","roo-code":"#f472b6",gemini:"#4285f4","gemini-cli":"#4285f4",zed:"#084CCF",cline:"#EAB308","amazon-q":"#01A88D","amazon-q-cli":"#01A88D","amazon-q-ide":"#01A88D",goose:"#FF6F00",jetbrains:"#6B57D2",junie:"#7B68EE",opencode:"#71717A",antigravity:"#E91E63",augment:"#e879f9",amp:"#f87171",mcp:"#91919a"},uc={"claude-code":"Claude Code","claude-desktop":"Claude Desktop",codex:"Codex",openai:"OpenAI",cursor:"Cursor",copilot:"GitHub Copilot","github-copilot":"GitHub Copilot","copilot-cli":"Copilot CLI",windsurf:"Windsurf",trae:"Trae",vscode:"VS Code","vscode-insiders":"VS Code Insiders",aider:"Aider","kilo-code":"Kilo Code",crush:"Crush",continue:"Continue",cody:"Sourcegraph Cody",tabby:"TabbyML",roo:"Roo Code","roo-code":"Roo Code",mcp:"MCP Client",gemini:"Gemini","gemini-cli":"Gemini CLI",zed:"Zed",cline:"Cline","amazon-q":"Amazon Q","amazon-q-cli":"Amazon Q CLI","amazon-q-ide":"Amazon Q IDE",goose:"Goose",jetbrains:"JetBrains",junie:"Junie",opencode:"OpenCode",antigravity:"Antigravity",augment:"Augment",amp:"Amp"},dc={"claude-code":"CC","claude-desktop":"CD",codex:"OX",openai:"OA",cursor:"Cu",copilot:"CP","github-copilot":"CP","copilot-cli":"CP",windsurf:"WS",trae:"Tr",vscode:"VS","vscode-insiders":"VI",aider:"Ai","kilo-code":"Ki",crush:"Cr",continue:"Co",cody:"Cy",tabby:"Tb",roo:"Ro","roo-code":"Ro",mcp:"MC",gemini:"Ge","gemini-cli":"Ge",zed:"Ze",cline:"Cl","amazon-q":"AQ","amazon-q-cli":"AQ","amazon-q-ide":"AQ",goose:"Go",jetbrains:"JB",junie:"Ju",opencode:"OC",antigravity:"AG",augment:"Au",amp:"Am"},fc=e=>\`data:image/svg+xml,\${encodeURIComponent(\`<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">\${e}</svg>\`)}\`,hc={"claude-code":\`data:image/svg+xml,\${encodeURIComponent('<svg fill="currentColor" fill-rule="evenodd" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M4.709 15.955l4.72-2.647.08-.23-.08-.128H9.2l-.79-.048-2.698-.073-2.339-.097-2.266-.122-.571-.121L0 11.784l.055-.352.48-.321.686.06 1.52.103 2.278.158 1.652.097 2.449.255h.389l.055-.157-.134-.098-.103-.097-2.358-1.596-2.552-1.688-1.336-.972-.724-.491-.364-.462-.158-1.008.656-.722.881.06.225.061.893.686 1.908 1.476 2.491 1.833.365.304.145-.103.019-.073-.164-.274-1.355-2.446-1.446-2.49-.644-1.032-.17-.619a2.97 2.97 0 01-.104-.729L6.283.134 6.696 0l.996.134.42.364.62 1.414 1.002 2.229 1.555 3.03.456.898.243.832.091.255h.158V9.01l.128-1.706.237-2.095.23-2.695.08-.76.376-.91.747-.492.584.28.48.685-.067.444-.286 1.851-.559 2.903-.364 1.942h.212l.243-.242.985-1.306 1.652-2.064.73-.82.85-.904.547-.431h1.033l.76 1.129-.34 1.166-1.064 1.347-.881 1.142-1.264 1.7-.79 1.36.073.11.188-.02 2.856-.606 1.543-.28 1.841-.315.833.388.091.395-.328.807-1.969.486-2.309.462-3.439.813-.042.03.049.061 1.549.146.662.036h1.622l3.02.225.79.522.474.638-.079.485-1.215.62-1.64-.389-3.829-.91-1.312-.329h-.182v.11l1.093 1.068 2.006 1.81 2.509 2.33.127.578-.322.455-.34-.049-2.205-1.657-.851-.747-1.926-1.62h-.128v.17l.444.649 2.345 3.521.122 1.08-.17.353-.608.213-.668-.122-1.374-1.925-1.415-2.167-1.143-1.943-.14.08-.674 7.254-.316.37-.729.28-.607-.461-.322-.747.322-1.476.389-1.924.315-1.53.286-1.9.17-.632-.012-.042-.14.018-1.434 1.967-2.18 2.945-1.726 1.845-.414.164-.717-.37.067-.662.401-.589 2.388-3.036 1.44-1.882.93-1.086-.006-.158h-.055L4.132 18.56l-1.13.146-.487-.456.061-.746.231-.243 1.908-1.312-.006.006z"></path></svg>')}\`,"claude-desktop":\`data:image/svg+xml,\${encodeURIComponent('<svg fill="currentColor" fill-rule="evenodd" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M4.709 15.955l4.72-2.647.08-.23-.08-.128H9.2l-.79-.048-2.698-.073-2.339-.097-2.266-.122-.571-.121L0 11.784l.055-.352.48-.321.686.06 1.52.103 2.278.158 1.652.097 2.449.255h.389l.055-.157-.134-.098-.103-.097-2.358-1.596-2.552-1.688-1.336-.972-.724-.491-.364-.462-.158-1.008.656-.722.881.06.225.061.893.686 1.908 1.476 2.491 1.833.365.304.145-.103.019-.073-.164-.274-1.355-2.446-1.446-2.49-.644-1.032-.17-.619a2.97 2.97 0 01-.104-.729L6.283.134 6.696 0l.996.134.42.364.62 1.414 1.002 2.229 1.555 3.03.456.898.243.832.091.255h.158V9.01l.128-1.706.237-2.095.23-2.695.08-.76.376-.91.747-.492.584.28.48.685-.067.444-.286 1.851-.559 2.903-.364 1.942h.212l.243-.242.985-1.306 1.652-2.064.73-.82.85-.904.547-.431h1.033l.76 1.129-.34 1.166-1.064 1.347-.881 1.142-1.264 1.7-.79 1.36.073.11.188-.02 2.856-.606 1.543-.28 1.841-.315.833.388.091.395-.328.807-1.969.486-2.309.462-3.439.813-.042.03.049.061 1.549.146.662.036h1.622l3.02.225.79.522.474.638-.079.485-1.215.62-1.64-.389-3.829-.91-1.312-.329h-.182v.11l1.093 1.068 2.006 1.81 2.509 2.33.127.578-.322.455-.34-.049-2.205-1.657-.851-.747-1.926-1.62h-.128v.17l.444.649 2.345 3.521.122 1.08-.17.353-.608.213-.668-.122-1.374-1.925-1.415-2.167-1.143-1.943-.14.08-.674 7.254-.316.37-.729.28-.607-.461-.322-.747.322-1.476.389-1.924.315-1.53.286-1.9.17-.632-.012-.042-.14.018-1.434 1.967-2.18 2.945-1.726 1.845-.414.164-.717-.37.067-.662.401-.589 2.388-3.036 1.44-1.882.93-1.086-.006-.158h-.055L4.132 18.56l-1.13.146-.487-.456.061-.746.231-.243 1.908-1.312-.006.006z"></path></svg>')}\`,codex:\`data:image/svg+xml,\${encodeURIComponent('<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="M22.282 9.821a5.985 5.985 0 0 0-.516-4.91 6.046 6.046 0 0 0-6.51-2.9A6.065 6.065 0 0 0 4.981 4.18a5.985 5.985 0 0 0-3.998 2.9 6.046 6.046 0 0 0 .743 7.097 5.98 5.98 0 0 0 .51 4.911 6.051 6.051 0 0 0 6.515 2.9A5.985 5.985 0 0 0 13.26 24a6.056 6.056 0 0 0 5.772-4.206 5.99 5.99 0 0 0 3.997-2.9 6.056 6.056 0 0 0-.747-7.073zM13.26 22.43a4.476 4.476 0 0 1-2.876-1.04l.141-.081 4.779-2.758a.795.795 0 0 0 .392-.681v-6.737l2.02 1.168a.071.071 0 0 1 .038.052v5.583a4.504 4.504 0 0 1-4.494 4.494zM3.6 18.304a4.47 4.47 0 0 1-.535-3.014l.142.085 4.783 2.759a.771.771 0 0 0 .78 0l5.843-3.369v2.332a.08.08 0 0 1-.033.062L9.74 19.95a4.5 4.5 0 0 1-6.14-1.646zM2.34 7.896a4.485 4.485 0 0 1 2.366-1.973V11.6a.766.766 0 0 0 .388.676l5.815 3.355-2.02 1.168a.076.076 0 0 1-.071 0l-4.83-2.786A4.504 4.504 0 0 1 2.34 7.872zm16.597 3.855l-5.833-3.387L15.119 7.2a.076.076 0 0 1 .071 0l4.83 2.791a4.494 4.494 0 0 1-.676 8.105v-5.678a.79.79 0 0 0-.407-.667zm2.01-3.023l-.141-.085-4.774-2.782a.776.776 0 0 0-.785 0L9.409 9.23V6.897a.066.066 0 0 1 .028-.061l4.83-2.787a4.5 4.5 0 0 1 6.68 4.66zm-12.64 4.135l-2.02-1.164a.08.08 0 0 1-.038-.057V6.075a4.5 4.5 0 0 1 7.375-3.453l-.142.08L8.704 5.46a.795.795 0 0 0-.393.681zm1.097-2.365l2.602-1.5 2.607 1.5v2.999l-2.597 1.5-2.607-1.5z"/></svg>')}\`,openai:\`data:image/svg+xml,\${encodeURIComponent('<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="M22.282 9.821a5.985 5.985 0 0 0-.516-4.91 6.046 6.046 0 0 0-6.51-2.9A6.065 6.065 0 0 0 4.981 4.18a5.985 5.985 0 0 0-3.998 2.9 6.046 6.046 0 0 0 .743 7.097 5.98 5.98 0 0 0 .51 4.911 6.051 6.051 0 0 0 6.515 2.9A5.985 5.985 0 0 0 13.26 24a6.056 6.056 0 0 0 5.772-4.206 5.99 5.99 0 0 0 3.997-2.9 6.056 6.056 0 0 0-.747-7.073z"/></svg>')}\`,cursor:fc('<path fill="currentColor" d="M11.503.131 1.891 5.678a.84.84 0 0 0-.42.726v11.188c0 .3.162.575.42.724l9.609 5.55a1 1 0 0 0 .998 0l9.61-5.55a.84.84 0 0 0 .42-.724V6.404a.84.84 0 0 0-.42-.726L12.497.131a1.01 1.01 0 0 0-.996 0M2.657 6.338h18.55c.263 0 .43.287.297.515L12.23 22.918c-.062.107-.229.064-.229-.06V12.335a.59.59 0 0 0-.295-.51l-9.11-5.257c-.109-.063-.064-.23.061-.23"/>'),copilot:fc('<path fill="currentColor" d="M9 23l.073-.001a2.53 2.53 0 01-2.347-1.838l-.697-2.433a2.529 2.529 0 00-2.426-1.839h-.497l-.104-.002c-4.485 0-2.935-5.278-1.75-9.225l.162-.525C2.412 3.99 3.883 1 6.25 1h8.86c1.12 0 2.106.745 2.422 1.829l.715 2.453a2.53 2.53 0 002.247 1.823l.147.005.534.001c3.557.115 3.088 3.745 2.156 7.206l-.113.413c-.154.548-.315 1.089-.47 1.607l-.163.525C21.588 20.01 20.116 23 17.75 23h-8.75zm8.22-15.89l-3.856.001a2.526 2.526 0 00-2.35 1.615L9.21 15.04a2.529 2.529 0 01-2.43 1.847l3.853.002c1.056 0 1.992-.661 2.361-1.644l1.796-6.287a2.529 2.529 0 012.43-1.848z"/>'),"github-copilot":fc('<path fill="currentColor" d="M23.922 16.997C23.061 18.492 18.063 22.02 12 22.02 5.937 22.02.939 18.492.078 16.997A.641.641 0 0 1 0 16.741v-2.869a.883.883 0 0 1 .053-.22c.372-.935 1.347-2.292 2.605-2.656.167-.429.414-1.055.644-1.517a10.098 10.098 0 0 1-.052-1.086c0-1.331.282-2.499 1.132-3.368.397-.406.89-.717 1.474-.952C7.255 2.937 9.248 1.98 11.978 1.98c2.731 0 4.767.957 6.166 2.093.584.235 1.077.546 1.474.952.85.869 1.132 2.037 1.132 3.368 0 .368-.014.733-.052 1.086.23.462.477 1.088.644 1.517 1.258.364 2.233 1.721 2.605 2.656a.841.841 0 0 1 .053.22v2.869a.641.641 0 0 1-.078.256Zm-11.75-5.992h-.344a4.359 4.359 0 0 1-.355.508c-.77.947-1.918 1.492-3.508 1.492-1.725 0-2.989-.359-3.782-1.259a2.137 2.137 0 0 1-.085-.104L4 11.746v6.585c1.435.779 4.514 2.179 8 2.179 3.486 0 6.565-1.4 8-2.179v-6.585l-.098-.104s-.033.045-.085.104c-.793.9-2.057 1.259-3.782 1.259-1.59 0-2.738-.545-3.508-1.492a4.359 4.359 0 0 1-.355-.508Zm2.328 3.25c.549 0 1 .451 1 1v2c0 .549-.451 1-1 1-.549 0-1-.451-1-1v-2c0-.549.451-1 1-1Zm-5 0c.549 0 1 .451 1 1v2c0 .549-.451 1-1 1-.549 0-1-.451-1-1v-2c0-.549.451-1 1-1Zm3.313-6.185c.136 1.057.403 1.913.878 2.497.442.544 1.134.938 2.344.938 1.573 0 2.292-.337 2.657-.751.384-.435.558-1.15.558-2.361 0-1.14-.243-1.847-.705-2.319-.477-.488-1.319-.862-2.824-1.025-1.487-.161-2.192.138-2.533.529-.269.307-.437.808-.438 1.578v.021c0 .265.021.562.063.893Zm-1.626 0c.042-.331.063-.628.063-.894v-.02c-.001-.77-.169-1.271-.438-1.578-.341-.391-1.046-.69-2.533-.529-1.505.163-2.347.537-2.824 1.025-.462.472-.705 1.179-.705 2.319 0 1.211.175 1.926.558 2.361.365.414 1.084.751 2.657.751 1.21 0 1.902-.394 2.344-.938.475-.584.742-1.44.878-2.497Z"/>'),"copilot-cli":fc('<path fill="currentColor" d="M9 23l.073-.001a2.53 2.53 0 01-2.347-1.838l-.697-2.433a2.529 2.529 0 00-2.426-1.839h-.497l-.104-.002c-4.485 0-2.935-5.278-1.75-9.225l.162-.525C2.412 3.99 3.883 1 6.25 1h8.86c1.12 0 2.106.745 2.422 1.829l.715 2.453a2.53 2.53 0 002.247 1.823l.147.005.534.001c3.557.115 3.088 3.745 2.156 7.206l-.113.413c-.154.548-.315 1.089-.47 1.607l-.163.525C21.588 20.01 20.116 23 17.75 23h-8.75zm8.22-15.89l-3.856.001a2.526 2.526 0 00-2.35 1.615L9.21 15.04a2.529 2.529 0 01-2.43 1.847l3.853.002c1.056 0 1.992-.661 2.361-1.644l1.796-6.287a2.529 2.529 0 012.43-1.848z"/>'),windsurf:fc('<path fill="currentColor" d="M23.78 5.004h-.228a2.187 2.187 0 00-2.18 2.196v4.912c0 .98-.804 1.775-1.76 1.775a1.818 1.818 0 01-1.472-.773L13.168 5.95a2.197 2.197 0 00-1.81-.95c-1.134 0-2.154.972-2.154 2.173v4.94c0 .98-.797 1.775-1.76 1.775-.57 0-1.136-.289-1.472-.773L.408 5.098C.282 4.918 0 5.007 0 5.228v4.284c0 .216.066.426.188.604l5.475 7.889c.324.466.8.812 1.351.938 1.377.316 2.645-.754 2.645-2.117V11.89c0-.98.787-1.775 1.76-1.775h.002c.586 0 1.135.288 1.472.773l4.972 7.163a2.15 2.15 0 001.81.95c1.158 0 2.151-.973 2.151-2.173v-4.939c0-.98.787-1.775 1.76-1.775h.194c.122 0 .22-.1.22-.222V5.225a.221.221 0 00-.22-.222z"/>'),trae:\`data:image/svg+xml,\${encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" width="28" height="21" fill="none" viewBox="0 0 28 21"><g clip-path="url(#logo_svg__a)"><path fill="#fff" d="M28.002 20.846H4v-3.998H0V.846h28.002zM4 16.848h20.002V4.845H4zm10.002-6.062-2.829 2.828-2.828-2.828 2.828-2.829zm8-.002-2.828 2.828-2.829-2.828 2.829-2.829z"></path></g><defs><clipPath id="logo_svg__a"><path fill="#fff" d="M0 .846h28.002v20H0z"></path></clipPath></defs></svg>')}\`,gemini:fc('<path fill="currentColor" d="M12 0C12 6.627 6.627 12 0 12c6.627 0 12 5.373 12 12 0-6.627 5.373-12 12-12-6.627 0-12-5.373-12-12Z"/>'),"gemini-cli":fc('<path fill="currentColor" d="M12 0C12 6.627 6.627 12 0 12c6.627 0 12 5.373 12 12 0-6.627 5.373-12 12-12-6.627 0-12-5.373-12-12Z"/>'),vscode:fc('<path fill="currentColor" d="M23.15 2.587L18.21.21a1.49 1.49 0 0 0-1.705.29l-9.46 8.63-4.12-3.128a1 1 0 0 0-1.276.057L.327 7.261A1 1 0 0 0 .326 8.74L3.899 12 .326 15.26a1 1 0 0 0 .001 1.479L1.65 17.94a1 1 0 0 0 1.276.057l4.12-3.128 9.46 8.63a1.49 1.49 0 0 0 1.704.29l4.942-2.377A1.5 1.5 0 0 0 24 20.06V3.939a1.5 1.5 0 0 0-.85-1.352m-5.146 14.861L10.826 12l7.178-5.448z"/>'),"vscode-insiders":fc('<path fill="currentColor" d="M23.15 2.587L18.21.21a1.49 1.49 0 0 0-1.705.29l-9.46 8.63-4.12-3.128a1 1 0 0 0-1.276.057L.327 7.261A1 1 0 0 0 .326 8.74L3.899 12 .326 15.26a1 1 0 0 0 .001 1.479L1.65 17.94a1 1 0 0 0 1.276.057l4.12-3.128 9.46 8.63a1.49 1.49 0 0 0 1.704.29l4.942-2.377A1.5 1.5 0 0 0 24 20.06V3.939a1.5 1.5 0 0 0-.85-1.352m-5.146 14.861L10.826 12l7.178-5.448z"/>'),zed:fc('<path fill="currentColor" d="M2.25 1.5a.75.75 0 0 0-.75.75v16.5H0V2.25A2.25 2.25 0 0 1 2.25 0h20.095c1.002 0 1.504 1.212.795 1.92L10.764 14.298h3.486V12.75h1.5v1.922a1.125 1.125 0 0 1-1.125 1.125H9.264l-2.578 2.578h11.689V9h1.5v9.375a1.5 1.5 0 0 1-1.5 1.5H5.185L2.562 22.5H21.75a.75.75 0 0 0 .75-.75V5.25H24v16.5A2.25 2.25 0 0 1 21.75 24H1.655C.653 24 .151 22.788.86 22.08L13.19 9.75H9.75v1.5h-1.5V9.375A1.125 1.125 0 0 1 9.375 8.25h5.314l2.625-2.625H5.625V15h-1.5V5.625a1.5 1.5 0 0 1 1.5-1.5h13.19L21.438 1.5z"/>'),cline:fc('<path fill="currentColor" d="M17.035 3.991c2.75 0 4.98 2.24 4.98 5.003v1.667l1.45 2.896a1.01 1.01 0 01-.002.909l-1.448 2.864v1.668c0 2.762-2.23 5.002-4.98 5.002H7.074c-2.751 0-4.98-2.24-4.98-5.002V17.33l-1.48-2.855a1.01 1.01 0 01-.003-.927l1.482-2.887V8.994c0-2.763 2.23-5.003 4.98-5.003h9.962zM8.265 9.6a2.274 2.274 0 00-2.274 2.274v4.042a2.274 2.274 0 004.547 0v-4.042A2.274 2.274 0 008.265 9.6zm7.326 0a2.274 2.274 0 00-2.274 2.274v4.042a2.274 2.274 0 104.548 0v-4.042A2.274 2.274 0 0015.59 9.6z"/><path fill="currentColor" d="M12.054 5.558a2.779 2.779 0 100-5.558 2.779 2.779 0 000 5.558z"/>'),jetbrains:fc('<path fill="currentColor" d="M2.345 23.997A2.347 2.347 0 0 1 0 21.652V10.988C0 9.665.535 8.37 1.473 7.433l5.965-5.961A5.01 5.01 0 0 1 10.989 0h10.666A2.347 2.347 0 0 1 24 2.345v10.664a5.056 5.056 0 0 1-1.473 3.554l-5.965 5.965A5.017 5.017 0 0 1 13.007 24v-.003H2.345Zm8.969-6.854H5.486v1.371h5.828v-1.371ZM3.963 6.514h13.523v13.519l4.257-4.257a3.936 3.936 0 0 0 1.146-2.767V2.345c0-.678-.552-1.234-1.234-1.234H10.989a3.897 3.897 0 0 0-2.767 1.145L3.963 6.514Zm-.192.192L2.256 8.22a3.944 3.944 0 0 0-1.145 2.768v10.664c0 .678.552 1.234 1.234 1.234h10.666a3.9 3.9 0 0 0 2.767-1.146l1.512-1.511H3.771V6.706Z"/>'),junie:fc('<path fill="currentColor" d="M2.345 23.997A2.347 2.347 0 0 1 0 21.652V10.988C0 9.665.535 8.37 1.473 7.433l5.965-5.961A5.01 5.01 0 0 1 10.989 0h10.666A2.347 2.347 0 0 1 24 2.345v10.664a5.056 5.056 0 0 1-1.473 3.554l-5.965 5.965A5.017 5.017 0 0 1 13.007 24v-.003H2.345Zm8.969-6.854H5.486v1.371h5.828v-1.371ZM3.963 6.514h13.523v13.519l4.257-4.257a3.936 3.936 0 0 0 1.146-2.767V2.345c0-.678-.552-1.234-1.234-1.234H10.989a3.897 3.897 0 0 0-2.767 1.145L3.963 6.514Zm-.192.192L2.256 8.22a3.944 3.944 0 0 0-1.145 2.768v10.664c0 .678.552 1.234 1.234 1.234h10.666a3.9 3.9 0 0 0 2.767-1.146l1.512-1.511H3.771V6.706Z"/>'),cody:fc('<path fill="currentColor" d="M17.897 3.84a2.38 2.38 0 1 1 3.09 3.623l-3.525 3.006-2.59-.919-.967-.342-1.625-.576 1.312-1.12.78-.665 3.525-3.007zm-8.27 13.313l.78-.665 1.312-1.12-1.624-.575-.967-.344-2.59-.918-3.525 3.007a2.38 2.38 0 1 0 3.09 3.622l3.525-3.007zM8.724 7.37l2.592.92 2.09-1.784-.84-4.556a2.38 2.38 0 1 0-4.683.865l.841 4.555zm6.554 9.262l-2.592-.92-2.091 1.784.842 4.557a2.38 2.38 0 0 0 4.682-.866l-.841-4.555zm8.186-.564a2.38 2.38 0 0 0-1.449-3.04l-4.365-1.55-.967-.342-1.625-.576-.966-.343-2.59-.92-.967-.342-1.624-.576-.967-.343-4.366-1.55a2.38 2.38 0 1 0-1.591 4.488l4.366 1.55.966.342 1.625.576.965.343 2.591.92.967.342 1.624.577.966.342 4.367 1.55a2.38 2.38 0 0 0 3.04-1.447"/>'),goose:fc('<path fill="currentColor" d="M21.595 23.61c1.167-.254 2.405-.944 2.405-.944l-2.167-1.784a12.124 12.124 0 01-2.695-3.131 12.127 12.127 0 00-3.97-4.049l-.794-.462a1.115 1.115 0 01-.488-.815.844.844 0 01.154-.575c.413-.582 2.548-3.115 2.94-3.44.503-.416 1.065-.762 1.586-1.159.074-.056.148-.112.221-.17.003-.002.007-.004.009-.007.167-.131.325-.272.45-.438.453-.524.563-.988.59-1.193-.061-.197-.244-.639-.753-1.148.319.02.705.272 1.056.569.235-.376.481-.773.727-1.171.165-.266-.08-.465-.086-.471h-.001V3.22c-.007-.007-.206-.25-.471-.086-.567.35-1.134.702-1.639 1.021 0 0-.597-.012-1.305.599a2.464 2.464 0 00-.438.45l-.007.009c-.058.072-.114.147-.17.221-.397.521-.743 1.083-1.16 1.587-.323.391-2.857 2.526-3.44 2.94a.842.842 0 01-.574.153 1.115 1.115 0 01-.815-.488l-.462-.794a12.123 12.123 0 00-4.049-3.97 12.133 12.133 0 01-3.13-2.695L1.332 0S.643 1.238.39 2.405c.352.428 1.27 1.49 2.34 2.302C1.58 4.167.73 3.75.06 3.4c-.103.765-.063 1.92.043 2.816.726.317 1.961.806 3.219 1.066-1.006.236-2.11.278-2.961.262.15.554.358 1.119.64 1.688.119.263.25.52.39.77.452.125 2.222.383 3.164.171l-2.51.897a27.776 27.776 0 002.544 2.726c2.031-1.092 2.494-1.241 4.018-2.238-2.467 2.008-3.108 2.828-3.8 3.67l-.483.678c-.25.351-.469.725-.65 1.117-.61 1.31-1.47 4.1-1.47 4.1-.154.486.202.842.674.674 0 0 2.79-.861 4.1-1.47.392-.182.766-.4 1.118-.65l.677-.483c.227-.187.453-.37.701-.586 0 0 1.705 2.02 3.458 3.349l.896-2.511c-.211.942.046 2.712.17 3.163.252.142.509.272.772.392.569.28 1.134.49 1.688.64-.016-.853.026-1.956.261-2.962.26 1.258.75 2.493 1.067 3.219.895.106 2.051.146 2.816.043a73.87 73.87 0 01-1.308-2.67c.811 1.07 1.874 1.988 2.302 2.34h-.001z"/>'),"amazon-q":fc('<path fill="currentColor" d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10c1.82 0 3.53-.48 5.01-1.32L19.59 23 21 21.59l-2.32-2.42A9.94 9.94 0 0022 12c0-5.52-4.48-10-10-10zm0 3c3.87 0 7 3.13 7 7s-3.13 7-7 7-7-3.13-7-7 3.13-7 7-7z"/>'),"amazon-q-cli":fc('<path fill="currentColor" d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10c1.82 0 3.53-.48 5.01-1.32L19.59 23 21 21.59l-2.32-2.42A9.94 9.94 0 0022 12c0-5.52-4.48-10-10-10zm0 3c3.87 0 7 3.13 7 7s-3.13 7-7 7-7-3.13-7-7 3.13-7 7-7z"/>'),"amazon-q-ide":fc('<path fill="currentColor" d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10c1.82 0 3.53-.48 5.01-1.32L19.59 23 21 21.59l-2.32-2.42A9.94 9.94 0 0022 12c0-5.52-4.48-10-10-10zm0 3c3.87 0 7 3.13 7 7s-3.13 7-7 7-7-3.13-7-7 3.13-7 7-7z"/>'),aider:fc('<path fill="currentColor" d="M2 4a2 2 0 012-2h16a2 2 0 012 2v16a2 2 0 01-2 2H4a2 2 0 01-2-2V4zm5.3 4.3a1 1 0 011.4 0l3 3a1 1 0 010 1.4l-3 3a1 1 0 01-1.4-1.4L9.6 12 7.3 9.7a1 1 0 010-1.4zM13 15a1 1 0 100 2h4a1 1 0 100-2h-4z"/>'),continue:fc('<path fill="currentColor" d="M3 4l9 8-9 8V4zm10 0l9 8-9 8V4z"/>'),tabby:fc('<path fill="currentColor" d="M4 8l4-6h2L7 8h10l-3-6h2l4 6v10a4 4 0 01-4 4H8a4 4 0 01-4-4V8zm4 4a1.5 1.5 0 100 3 1.5 1.5 0 000-3zm8 0a1.5 1.5 0 100 3 1.5 1.5 0 000-3z"/>'),roo:fc('<path fill="currentColor" d="M12 2C8.13 2 5 5.13 5 9c0 2.38 1.19 4.47 3 5.74V17h2v5h4v-5h2v-2.26c1.81-1.27 3-3.36 3-5.74 0-3.87-3.13-7-7-7zm-2 7.5a1 1 0 11-2 0 1 1 0 012 0zm6 0a1 1 0 11-2 0 1 1 0 012 0z"/>'),"roo-code":fc('<path fill="currentColor" d="M12 2C8.13 2 5 5.13 5 9c0 2.38 1.19 4.47 3 5.74V17h2v5h4v-5h2v-2.26c1.81-1.27 3-3.36 3-5.74 0-3.87-3.13-7-7-7zm-2 7.5a1 1 0 11-2 0 1 1 0 012 0zm6 0a1 1 0 11-2 0 1 1 0 012 0z"/>'),opencode:\`data:image/svg+xml,\${encodeURIComponent("<svg width='240' height='300' viewBox='0 0 240 300' fill='none' xmlns='http://www.w3.org/2000/svg'><g clip-path='url(#clip0_1401_86274)'><mask id='mask0_1401_86274' style='mask-type:luminance' maskUnits='userSpaceOnUse' x='0' y='0' width='240' height='300'><path d='M240 0H0V300H240V0Z' fill='white'/></mask><g mask='url(#mask0_1401_86274)'><path d='M180 240H60V120H180V240Z' fill='#CFCECD'/><path d='M180 60H60V240H180V60ZM240 300H0V0H240V300Z' fill='#211E1E'/></g></g><defs><clipPath id='clip0_1401_86274'><rect width='240' height='300' fill='white'/></clipPath></defs></svg>")}\`,"kilo-code":\`data:image/svg+xml,\${encodeURIComponent('<svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="M0,0v100h100V0H0ZM92.5925926,92.5925926H7.4074074V7.4074074h85.1851852v85.1851852ZM61.1111044,71.9096084h9.2592593v7.4074074h-11.6402116l-5.026455-5.026455v-11.6402116h7.4074074v9.2592593ZM77.7777711,71.9096084h-7.4074074v-9.2592593h-9.2592593v-7.4074074h11.6402116l5.026455,5.026455v11.6402116ZM46.2962963,61.1114207h-7.4074074v-7.4074074h7.4074074v7.4074074ZM22.2222222,53.7040133h7.4074074v16.6666667h16.6666667v7.4074074h-19.047619l-5.026455-5.026455v-19.047619ZM77.7777711,38.8888889v7.4074074h-24.0740741v-7.4074074h8.2781918v-9.2592593h-8.2781918v-7.4074074h10.6591442l5.026455,5.026455v11.6402116h8.3884749ZM29.6296296,30.5555556h9.2592593l7.4074074,7.4074074v8.3333333h-7.4074074v-8.3333333h-9.2592593v8.3333333h-7.4074074v-24.0740741h7.4074074v8.3333333ZM46.2962963,30.5555556h-7.4074074v-8.3333333h7.4074074v8.3333333Z"/></svg>')}\`,crush:fc('<path fill="currentColor" d="M12 1.6l8.1 4.7v9.4L12 20.4 3.9 15.7V6.3L12 1.6zm0 3.1l-5.4 3.1v6.3l5.4 3.1 5.4-3.1V7.8L12 4.7zm-2.1 4.1h4.2v6.4H9.9V8.8z"/>'),antigravity:fc('<path fill="currentColor" d="m19.94,20.59c1.09.82,2.73.27,1.23-1.23-4.5-4.36-3.55-16.36-9.14-16.36S7.39,15,2.89,19.36c-1.64,1.64.14,2.05,1.23,1.23,4.23-2.86,3.95-7.91,7.91-7.91s3.68,5.05,7.91,7.91Z"/>'),augment:fc('<path fill="currentColor" d="M12 0l2.5 9.5L24 12l-9.5 2.5L12 24l-2.5-9.5L0 12l9.5-2.5z"/>'),amp:fc('<path fill="currentColor" d="M13 2L4 14h7l-2 8 9-12h-7l2-8z"/>'),mcp:fc('<path fill="currentColor" d="M14 2a2 2 0 012 2v2h2a2 2 0 012 2v2h-4V8h-4v2H8v4h2v4H8v-2H6a2 2 0 01-2-2v-2H0v-2h4V8a2 2 0 012-2h2V4a2 2 0 012-2h4z"/>')},pc={feature:"#4ade80",bugfix:"#f87171",refactor:"#a78bfa",test:"#38bdf8",docs:"#fbbf24",setup:"#6b655c",deployment:"#f97316",other:"#9c9588"},mc=Object.keys(cc);
34806
+ */const yl=h.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:a="",children:s,iconNode:i,...o},l)=>h.createElement("svg",{ref:l,...gl,width:t,height:t,stroke:e,strokeWidth:r?24*Number(n)/Number(t):n,className:ml("lucide",a),...o},[...i.map(([e,t])=>h.createElement(e,t)),...Array.isArray(s)?s:[s]])),vl=(e,t)=>{const n=h.forwardRef(({className:n,...r},a)=>{return h.createElement(yl,{ref:a,iconNode:t,className:ml(\`lucide-\${s=e,s.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}\`,n),...r});var s});return n.displayName=\`\${e}\`,n},xl=vl("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]),bl=vl("Brain",[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z",key:"ep3f8r"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4",key:"1p4c4q"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}]]),wl=vl("Bug",[["path",{d:"m8 2 1.88 1.88",key:"fmnt4t"}],["path",{d:"M14.12 3.88 16 2",key:"qol33r"}],["path",{d:"M9 7.13v-1a3.003 3.003 0 1 1 6 0v1",key:"d7y7pr"}],["path",{d:"M12 20c-3.3 0-6-2.7-6-6v-3a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v3c0 3.3-2.7 6-6 6",key:"xs1cw7"}],["path",{d:"M12 20v-9",key:"1qisl0"}],["path",{d:"M6.53 9C4.6 8.8 3 7.1 3 5",key:"32zzws"}],["path",{d:"M6 13H2",key:"82j7cp"}],["path",{d:"M3 21c0-2.1 1.7-3.9 3.8-4",key:"4p0ekp"}],["path",{d:"M20.97 5c0 2.1-1.6 3.8-3.5 4",key:"18gb23"}],["path",{d:"M22 13h-4",key:"1jl80f"}],["path",{d:"M17.2 17c2.1.1 3.8 1.9 3.8 4",key:"k3fwyw"}]]),kl=vl("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]),Sl=vl("Camera",[["path",{d:"M14.5 4h-5L7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3l-2.5-3z",key:"1tc9qg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]]),jl=vl("ChartColumn",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]),Cl=vl("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]),Nl=vl("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),Tl=vl("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]),El=vl("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]),Ml=vl("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]),Pl=vl("CircleArrowUp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16 12-4-4-4 4",key:"177agl"}],["path",{d:"M12 16V8",key:"1sbj14"}]]),Ll=vl("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]),Dl=vl("Cloud",[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]]),Al=vl("Compass",[["path",{d:"m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z",key:"9ktpf1"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]),_l=vl("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]),zl=vl("Cpu",[["rect",{width:"16",height:"16",x:"4",y:"4",rx:"2",key:"14l7u7"}],["rect",{width:"6",height:"6",x:"9",y:"9",rx:"1",key:"5aljv4"}],["path",{d:"M15 2v2",key:"13l42r"}],["path",{d:"M15 20v2",key:"15mkzm"}],["path",{d:"M2 15h2",key:"1gxd5l"}],["path",{d:"M2 9h2",key:"1bbxkp"}],["path",{d:"M20 15h2",key:"19e6y8"}],["path",{d:"M20 9h2",key:"19tzq7"}],["path",{d:"M9 2v2",key:"165o2o"}],["path",{d:"M9 20v2",key:"i2bqo8"}]]),Rl=vl("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]),Fl=vl("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]),Vl=vl("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]),Il=vl("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]),Ol=vl("Filter",[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]]),$l=vl("Flag",[["path",{d:"M4 15s1-1 4-1 5 2 8 2 4-1 4-1V3s-1 1-4 1-5-2-8-2-4 1-4 1z",key:"i9b6wo"}],["line",{x1:"4",x2:"4",y1:"22",y2:"15",key:"1cm3nv"}]]),Bl=vl("FolderKanban",[["path",{d:"M4 20h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.93a2 2 0 0 1-1.66-.9l-.82-1.2A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13c0 1.1.9 2 2 2Z",key:"1fr9dc"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M12 10v2",key:"hh53o1"}],["path",{d:"M16 10v6",key:"1d6xys"}]]),Hl=vl("Image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]),Ul=vl("Layers",[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]]),Wl=vl("Link",[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]]),ql=vl("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]),Yl=vl("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]),Kl=vl("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]),Ql=vl("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]),Xl=vl("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]),Zl=vl("Pen",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]]),Gl=vl("Pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]),Jl=vl("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]),ec=vl("Rocket",[["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z",key:"m3kijz"}],["path",{d:"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z",key:"1fmvmk"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0",key:"1f8sc4"}],["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}]]),tc=vl("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]),nc=vl("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]),rc=vl("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]),ac=vl("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]),sc=vl("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]),ic=vl("Target",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]]),oc=vl("Timer",[["line",{x1:"10",x2:"14",y1:"2",y2:"2",key:"14vaq8"}],["line",{x1:"12",x2:"15",y1:"14",y2:"11",key:"17fdiu"}],["circle",{cx:"12",cy:"14",r:"8",key:"1e1u0o"}]]),lc=vl("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]),cc=vl("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]),uc=vl("Trophy",[["path",{d:"M6 9H4.5a2.5 2.5 0 0 1 0-5H6",key:"17hqa7"}],["path",{d:"M18 9h1.5a2.5 2.5 0 0 0 0-5H18",key:"lmptdp"}],["path",{d:"M4 22h16",key:"57wxv0"}],["path",{d:"M10 14.66V17c0 .55-.47.98-.97 1.21C7.85 18.75 7 20.24 7 22",key:"1nw9bq"}],["path",{d:"M14 14.66V17c0 .55.47.98.97 1.21C16.15 18.75 17 20.24 17 22",key:"1np0yb"}],["path",{d:"M18 2H6v7a6 6 0 0 0 12 0V2Z",key:"u46fv3"}]]),dc=vl("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]),hc=vl("Wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]]),fc=vl("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),pc=vl("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]),mc={"claude-code":"#d4a04a","claude-desktop":"#d4a04a",codex:"#10a37f",openai:"#10a37f",cursor:"#00b4d8",copilot:"#6e40c9","github-copilot":"#6e40c9","copilot-cli":"#6e40c9",windsurf:"#38bdf8",trae:"#06b6d4",vscode:"#007ACC","vscode-insiders":"#24bfa5",aider:"#4ade80","kilo-code":"#14b8a6",crush:"#ef4444",continue:"#f97316",cody:"#ff6b6b",tabby:"#a78bfa",roo:"#f472b6","roo-code":"#f472b6",gemini:"#4285f4","gemini-cli":"#4285f4",zed:"#084CCF",cline:"#EAB308","amazon-q":"#01A88D","amazon-q-cli":"#01A88D","amazon-q-ide":"#01A88D",goose:"#FF6F00",jetbrains:"#6B57D2",junie:"#7B68EE",opencode:"#71717A",antigravity:"#E91E63",augment:"#e879f9",amp:"#f87171",mcp:"#91919a"},gc={"claude-code":"Claude Code","claude-desktop":"Claude Desktop",codex:"Codex",openai:"OpenAI",cursor:"Cursor",copilot:"GitHub Copilot","github-copilot":"GitHub Copilot","copilot-cli":"Copilot CLI",windsurf:"Windsurf",trae:"Trae",vscode:"VS Code","vscode-insiders":"VS Code Insiders",aider:"Aider","kilo-code":"Kilo Code",crush:"Crush",continue:"Continue",cody:"Sourcegraph Cody",tabby:"TabbyML",roo:"Roo Code","roo-code":"Roo Code",mcp:"MCP Client",gemini:"Gemini","gemini-cli":"Gemini CLI",zed:"Zed",cline:"Cline","amazon-q":"Amazon Q","amazon-q-cli":"Amazon Q CLI","amazon-q-ide":"Amazon Q IDE",goose:"Goose",jetbrains:"JetBrains",junie:"Junie",opencode:"OpenCode",antigravity:"Antigravity",augment:"Augment",amp:"Amp"},yc={"claude-code":"CC","claude-desktop":"CD",codex:"OX",openai:"OA",cursor:"Cu",copilot:"CP","github-copilot":"CP","copilot-cli":"CP",windsurf:"WS",trae:"Tr",vscode:"VS","vscode-insiders":"VI",aider:"Ai","kilo-code":"Ki",crush:"Cr",continue:"Co",cody:"Cy",tabby:"Tb",roo:"Ro","roo-code":"Ro",mcp:"MC",gemini:"Ge","gemini-cli":"Ge",zed:"Ze",cline:"Cl","amazon-q":"AQ","amazon-q-cli":"AQ","amazon-q-ide":"AQ",goose:"Go",jetbrains:"JB",junie:"Ju",opencode:"OC",antigravity:"AG",augment:"Au",amp:"Am"},vc=e=>\`data:image/svg+xml,\${encodeURIComponent(\`<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">\${e}</svg>\`)}\`,xc={"claude-code":\`data:image/svg+xml,\${encodeURIComponent('<svg fill="currentColor" fill-rule="evenodd" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M4.709 15.955l4.72-2.647.08-.23-.08-.128H9.2l-.79-.048-2.698-.073-2.339-.097-2.266-.122-.571-.121L0 11.784l.055-.352.48-.321.686.06 1.52.103 2.278.158 1.652.097 2.449.255h.389l.055-.157-.134-.098-.103-.097-2.358-1.596-2.552-1.688-1.336-.972-.724-.491-.364-.462-.158-1.008.656-.722.881.06.225.061.893.686 1.908 1.476 2.491 1.833.365.304.145-.103.019-.073-.164-.274-1.355-2.446-1.446-2.49-.644-1.032-.17-.619a2.97 2.97 0 01-.104-.729L6.283.134 6.696 0l.996.134.42.364.62 1.414 1.002 2.229 1.555 3.03.456.898.243.832.091.255h.158V9.01l.128-1.706.237-2.095.23-2.695.08-.76.376-.91.747-.492.584.28.48.685-.067.444-.286 1.851-.559 2.903-.364 1.942h.212l.243-.242.985-1.306 1.652-2.064.73-.82.85-.904.547-.431h1.033l.76 1.129-.34 1.166-1.064 1.347-.881 1.142-1.264 1.7-.79 1.36.073.11.188-.02 2.856-.606 1.543-.28 1.841-.315.833.388.091.395-.328.807-1.969.486-2.309.462-3.439.813-.042.03.049.061 1.549.146.662.036h1.622l3.02.225.79.522.474.638-.079.485-1.215.62-1.64-.389-3.829-.91-1.312-.329h-.182v.11l1.093 1.068 2.006 1.81 2.509 2.33.127.578-.322.455-.34-.049-2.205-1.657-.851-.747-1.926-1.62h-.128v.17l.444.649 2.345 3.521.122 1.08-.17.353-.608.213-.668-.122-1.374-1.925-1.415-2.167-1.143-1.943-.14.08-.674 7.254-.316.37-.729.28-.607-.461-.322-.747.322-1.476.389-1.924.315-1.53.286-1.9.17-.632-.012-.042-.14.018-1.434 1.967-2.18 2.945-1.726 1.845-.414.164-.717-.37.067-.662.401-.589 2.388-3.036 1.44-1.882.93-1.086-.006-.158h-.055L4.132 18.56l-1.13.146-.487-.456.061-.746.231-.243 1.908-1.312-.006.006z"></path></svg>')}\`,"claude-desktop":\`data:image/svg+xml,\${encodeURIComponent('<svg fill="currentColor" fill-rule="evenodd" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M4.709 15.955l4.72-2.647.08-.23-.08-.128H9.2l-.79-.048-2.698-.073-2.339-.097-2.266-.122-.571-.121L0 11.784l.055-.352.48-.321.686.06 1.52.103 2.278.158 1.652.097 2.449.255h.389l.055-.157-.134-.098-.103-.097-2.358-1.596-2.552-1.688-1.336-.972-.724-.491-.364-.462-.158-1.008.656-.722.881.06.225.061.893.686 1.908 1.476 2.491 1.833.365.304.145-.103.019-.073-.164-.274-1.355-2.446-1.446-2.49-.644-1.032-.17-.619a2.97 2.97 0 01-.104-.729L6.283.134 6.696 0l.996.134.42.364.62 1.414 1.002 2.229 1.555 3.03.456.898.243.832.091.255h.158V9.01l.128-1.706.237-2.095.23-2.695.08-.76.376-.91.747-.492.584.28.48.685-.067.444-.286 1.851-.559 2.903-.364 1.942h.212l.243-.242.985-1.306 1.652-2.064.73-.82.85-.904.547-.431h1.033l.76 1.129-.34 1.166-1.064 1.347-.881 1.142-1.264 1.7-.79 1.36.073.11.188-.02 2.856-.606 1.543-.28 1.841-.315.833.388.091.395-.328.807-1.969.486-2.309.462-3.439.813-.042.03.049.061 1.549.146.662.036h1.622l3.02.225.79.522.474.638-.079.485-1.215.62-1.64-.389-3.829-.91-1.312-.329h-.182v.11l1.093 1.068 2.006 1.81 2.509 2.33.127.578-.322.455-.34-.049-2.205-1.657-.851-.747-1.926-1.62h-.128v.17l.444.649 2.345 3.521.122 1.08-.17.353-.608.213-.668-.122-1.374-1.925-1.415-2.167-1.143-1.943-.14.08-.674 7.254-.316.37-.729.28-.607-.461-.322-.747.322-1.476.389-1.924.315-1.53.286-1.9.17-.632-.012-.042-.14.018-1.434 1.967-2.18 2.945-1.726 1.845-.414.164-.717-.37.067-.662.401-.589 2.388-3.036 1.44-1.882.93-1.086-.006-.158h-.055L4.132 18.56l-1.13.146-.487-.456.061-.746.231-.243 1.908-1.312-.006.006z"></path></svg>')}\`,codex:\`data:image/svg+xml,\${encodeURIComponent('<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="M22.282 9.821a5.985 5.985 0 0 0-.516-4.91 6.046 6.046 0 0 0-6.51-2.9A6.065 6.065 0 0 0 4.981 4.18a5.985 5.985 0 0 0-3.998 2.9 6.046 6.046 0 0 0 .743 7.097 5.98 5.98 0 0 0 .51 4.911 6.051 6.051 0 0 0 6.515 2.9A5.985 5.985 0 0 0 13.26 24a6.056 6.056 0 0 0 5.772-4.206 5.99 5.99 0 0 0 3.997-2.9 6.056 6.056 0 0 0-.747-7.073zM13.26 22.43a4.476 4.476 0 0 1-2.876-1.04l.141-.081 4.779-2.758a.795.795 0 0 0 .392-.681v-6.737l2.02 1.168a.071.071 0 0 1 .038.052v5.583a4.504 4.504 0 0 1-4.494 4.494zM3.6 18.304a4.47 4.47 0 0 1-.535-3.014l.142.085 4.783 2.759a.771.771 0 0 0 .78 0l5.843-3.369v2.332a.08.08 0 0 1-.033.062L9.74 19.95a4.5 4.5 0 0 1-6.14-1.646zM2.34 7.896a4.485 4.485 0 0 1 2.366-1.973V11.6a.766.766 0 0 0 .388.676l5.815 3.355-2.02 1.168a.076.076 0 0 1-.071 0l-4.83-2.786A4.504 4.504 0 0 1 2.34 7.872zm16.597 3.855l-5.833-3.387L15.119 7.2a.076.076 0 0 1 .071 0l4.83 2.791a4.494 4.494 0 0 1-.676 8.105v-5.678a.79.79 0 0 0-.407-.667zm2.01-3.023l-.141-.085-4.774-2.782a.776.776 0 0 0-.785 0L9.409 9.23V6.897a.066.066 0 0 1 .028-.061l4.83-2.787a4.5 4.5 0 0 1 6.68 4.66zm-12.64 4.135l-2.02-1.164a.08.08 0 0 1-.038-.057V6.075a4.5 4.5 0 0 1 7.375-3.453l-.142.08L8.704 5.46a.795.795 0 0 0-.393.681zm1.097-2.365l2.602-1.5 2.607 1.5v2.999l-2.597 1.5-2.607-1.5z"/></svg>')}\`,openai:\`data:image/svg+xml,\${encodeURIComponent('<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="M22.282 9.821a5.985 5.985 0 0 0-.516-4.91 6.046 6.046 0 0 0-6.51-2.9A6.065 6.065 0 0 0 4.981 4.18a5.985 5.985 0 0 0-3.998 2.9 6.046 6.046 0 0 0 .743 7.097 5.98 5.98 0 0 0 .51 4.911 6.051 6.051 0 0 0 6.515 2.9A5.985 5.985 0 0 0 13.26 24a6.056 6.056 0 0 0 5.772-4.206 5.99 5.99 0 0 0 3.997-2.9 6.056 6.056 0 0 0-.747-7.073z"/></svg>')}\`,cursor:vc('<path fill="currentColor" d="M11.503.131 1.891 5.678a.84.84 0 0 0-.42.726v11.188c0 .3.162.575.42.724l9.609 5.55a1 1 0 0 0 .998 0l9.61-5.55a.84.84 0 0 0 .42-.724V6.404a.84.84 0 0 0-.42-.726L12.497.131a1.01 1.01 0 0 0-.996 0M2.657 6.338h18.55c.263 0 .43.287.297.515L12.23 22.918c-.062.107-.229.064-.229-.06V12.335a.59.59 0 0 0-.295-.51l-9.11-5.257c-.109-.063-.064-.23.061-.23"/>'),copilot:vc('<path fill="currentColor" d="M9 23l.073-.001a2.53 2.53 0 01-2.347-1.838l-.697-2.433a2.529 2.529 0 00-2.426-1.839h-.497l-.104-.002c-4.485 0-2.935-5.278-1.75-9.225l.162-.525C2.412 3.99 3.883 1 6.25 1h8.86c1.12 0 2.106.745 2.422 1.829l.715 2.453a2.53 2.53 0 002.247 1.823l.147.005.534.001c3.557.115 3.088 3.745 2.156 7.206l-.113.413c-.154.548-.315 1.089-.47 1.607l-.163.525C21.588 20.01 20.116 23 17.75 23h-8.75zm8.22-15.89l-3.856.001a2.526 2.526 0 00-2.35 1.615L9.21 15.04a2.529 2.529 0 01-2.43 1.847l3.853.002c1.056 0 1.992-.661 2.361-1.644l1.796-6.287a2.529 2.529 0 012.43-1.848z"/>'),"github-copilot":vc('<path fill="currentColor" d="M23.922 16.997C23.061 18.492 18.063 22.02 12 22.02 5.937 22.02.939 18.492.078 16.997A.641.641 0 0 1 0 16.741v-2.869a.883.883 0 0 1 .053-.22c.372-.935 1.347-2.292 2.605-2.656.167-.429.414-1.055.644-1.517a10.098 10.098 0 0 1-.052-1.086c0-1.331.282-2.499 1.132-3.368.397-.406.89-.717 1.474-.952C7.255 2.937 9.248 1.98 11.978 1.98c2.731 0 4.767.957 6.166 2.093.584.235 1.077.546 1.474.952.85.869 1.132 2.037 1.132 3.368 0 .368-.014.733-.052 1.086.23.462.477 1.088.644 1.517 1.258.364 2.233 1.721 2.605 2.656a.841.841 0 0 1 .053.22v2.869a.641.641 0 0 1-.078.256Zm-11.75-5.992h-.344a4.359 4.359 0 0 1-.355.508c-.77.947-1.918 1.492-3.508 1.492-1.725 0-2.989-.359-3.782-1.259a2.137 2.137 0 0 1-.085-.104L4 11.746v6.585c1.435.779 4.514 2.179 8 2.179 3.486 0 6.565-1.4 8-2.179v-6.585l-.098-.104s-.033.045-.085.104c-.793.9-2.057 1.259-3.782 1.259-1.59 0-2.738-.545-3.508-1.492a4.359 4.359 0 0 1-.355-.508Zm2.328 3.25c.549 0 1 .451 1 1v2c0 .549-.451 1-1 1-.549 0-1-.451-1-1v-2c0-.549.451-1 1-1Zm-5 0c.549 0 1 .451 1 1v2c0 .549-.451 1-1 1-.549 0-1-.451-1-1v-2c0-.549.451-1 1-1Zm3.313-6.185c.136 1.057.403 1.913.878 2.497.442.544 1.134.938 2.344.938 1.573 0 2.292-.337 2.657-.751.384-.435.558-1.15.558-2.361 0-1.14-.243-1.847-.705-2.319-.477-.488-1.319-.862-2.824-1.025-1.487-.161-2.192.138-2.533.529-.269.307-.437.808-.438 1.578v.021c0 .265.021.562.063.893Zm-1.626 0c.042-.331.063-.628.063-.894v-.02c-.001-.77-.169-1.271-.438-1.578-.341-.391-1.046-.69-2.533-.529-1.505.163-2.347.537-2.824 1.025-.462.472-.705 1.179-.705 2.319 0 1.211.175 1.926.558 2.361.365.414 1.084.751 2.657.751 1.21 0 1.902-.394 2.344-.938.475-.584.742-1.44.878-2.497Z"/>'),"copilot-cli":vc('<path fill="currentColor" d="M9 23l.073-.001a2.53 2.53 0 01-2.347-1.838l-.697-2.433a2.529 2.529 0 00-2.426-1.839h-.497l-.104-.002c-4.485 0-2.935-5.278-1.75-9.225l.162-.525C2.412 3.99 3.883 1 6.25 1h8.86c1.12 0 2.106.745 2.422 1.829l.715 2.453a2.53 2.53 0 002.247 1.823l.147.005.534.001c3.557.115 3.088 3.745 2.156 7.206l-.113.413c-.154.548-.315 1.089-.47 1.607l-.163.525C21.588 20.01 20.116 23 17.75 23h-8.75zm8.22-15.89l-3.856.001a2.526 2.526 0 00-2.35 1.615L9.21 15.04a2.529 2.529 0 01-2.43 1.847l3.853.002c1.056 0 1.992-.661 2.361-1.644l1.796-6.287a2.529 2.529 0 012.43-1.848z"/>'),windsurf:vc('<path fill="currentColor" d="M23.78 5.004h-.228a2.187 2.187 0 00-2.18 2.196v4.912c0 .98-.804 1.775-1.76 1.775a1.818 1.818 0 01-1.472-.773L13.168 5.95a2.197 2.197 0 00-1.81-.95c-1.134 0-2.154.972-2.154 2.173v4.94c0 .98-.797 1.775-1.76 1.775-.57 0-1.136-.289-1.472-.773L.408 5.098C.282 4.918 0 5.007 0 5.228v4.284c0 .216.066.426.188.604l5.475 7.889c.324.466.8.812 1.351.938 1.377.316 2.645-.754 2.645-2.117V11.89c0-.98.787-1.775 1.76-1.775h.002c.586 0 1.135.288 1.472.773l4.972 7.163a2.15 2.15 0 001.81.95c1.158 0 2.151-.973 2.151-2.173v-4.939c0-.98.787-1.775 1.76-1.775h.194c.122 0 .22-.1.22-.222V5.225a.221.221 0 00-.22-.222z"/>'),trae:\`data:image/svg+xml,\${encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" width="28" height="21" fill="none" viewBox="0 0 28 21"><g clip-path="url(#logo_svg__a)"><path fill="#fff" d="M28.002 20.846H4v-3.998H0V.846h28.002zM4 16.848h20.002V4.845H4zm10.002-6.062-2.829 2.828-2.828-2.828 2.828-2.829zm8-.002-2.828 2.828-2.829-2.828 2.829-2.829z"></path></g><defs><clipPath id="logo_svg__a"><path fill="#fff" d="M0 .846h28.002v20H0z"></path></clipPath></defs></svg>')}\`,gemini:vc('<path fill="currentColor" d="M12 0C12 6.627 6.627 12 0 12c6.627 0 12 5.373 12 12 0-6.627 5.373-12 12-12-6.627 0-12-5.373-12-12Z"/>'),"gemini-cli":vc('<path fill="currentColor" d="M12 0C12 6.627 6.627 12 0 12c6.627 0 12 5.373 12 12 0-6.627 5.373-12 12-12-6.627 0-12-5.373-12-12Z"/>'),vscode:vc('<path fill="currentColor" d="M23.15 2.587L18.21.21a1.49 1.49 0 0 0-1.705.29l-9.46 8.63-4.12-3.128a1 1 0 0 0-1.276.057L.327 7.261A1 1 0 0 0 .326 8.74L3.899 12 .326 15.26a1 1 0 0 0 .001 1.479L1.65 17.94a1 1 0 0 0 1.276.057l4.12-3.128 9.46 8.63a1.49 1.49 0 0 0 1.704.29l4.942-2.377A1.5 1.5 0 0 0 24 20.06V3.939a1.5 1.5 0 0 0-.85-1.352m-5.146 14.861L10.826 12l7.178-5.448z"/>'),"vscode-insiders":vc('<path fill="currentColor" d="M23.15 2.587L18.21.21a1.49 1.49 0 0 0-1.705.29l-9.46 8.63-4.12-3.128a1 1 0 0 0-1.276.057L.327 7.261A1 1 0 0 0 .326 8.74L3.899 12 .326 15.26a1 1 0 0 0 .001 1.479L1.65 17.94a1 1 0 0 0 1.276.057l4.12-3.128 9.46 8.63a1.49 1.49 0 0 0 1.704.29l4.942-2.377A1.5 1.5 0 0 0 24 20.06V3.939a1.5 1.5 0 0 0-.85-1.352m-5.146 14.861L10.826 12l7.178-5.448z"/>'),zed:vc('<path fill="currentColor" d="M2.25 1.5a.75.75 0 0 0-.75.75v16.5H0V2.25A2.25 2.25 0 0 1 2.25 0h20.095c1.002 0 1.504 1.212.795 1.92L10.764 14.298h3.486V12.75h1.5v1.922a1.125 1.125 0 0 1-1.125 1.125H9.264l-2.578 2.578h11.689V9h1.5v9.375a1.5 1.5 0 0 1-1.5 1.5H5.185L2.562 22.5H21.75a.75.75 0 0 0 .75-.75V5.25H24v16.5A2.25 2.25 0 0 1 21.75 24H1.655C.653 24 .151 22.788.86 22.08L13.19 9.75H9.75v1.5h-1.5V9.375A1.125 1.125 0 0 1 9.375 8.25h5.314l2.625-2.625H5.625V15h-1.5V5.625a1.5 1.5 0 0 1 1.5-1.5h13.19L21.438 1.5z"/>'),cline:vc('<path fill="currentColor" d="M17.035 3.991c2.75 0 4.98 2.24 4.98 5.003v1.667l1.45 2.896a1.01 1.01 0 01-.002.909l-1.448 2.864v1.668c0 2.762-2.23 5.002-4.98 5.002H7.074c-2.751 0-4.98-2.24-4.98-5.002V17.33l-1.48-2.855a1.01 1.01 0 01-.003-.927l1.482-2.887V8.994c0-2.763 2.23-5.003 4.98-5.003h9.962zM8.265 9.6a2.274 2.274 0 00-2.274 2.274v4.042a2.274 2.274 0 004.547 0v-4.042A2.274 2.274 0 008.265 9.6zm7.326 0a2.274 2.274 0 00-2.274 2.274v4.042a2.274 2.274 0 104.548 0v-4.042A2.274 2.274 0 0015.59 9.6z"/><path fill="currentColor" d="M12.054 5.558a2.779 2.779 0 100-5.558 2.779 2.779 0 000 5.558z"/>'),jetbrains:vc('<path fill="currentColor" d="M2.345 23.997A2.347 2.347 0 0 1 0 21.652V10.988C0 9.665.535 8.37 1.473 7.433l5.965-5.961A5.01 5.01 0 0 1 10.989 0h10.666A2.347 2.347 0 0 1 24 2.345v10.664a5.056 5.056 0 0 1-1.473 3.554l-5.965 5.965A5.017 5.017 0 0 1 13.007 24v-.003H2.345Zm8.969-6.854H5.486v1.371h5.828v-1.371ZM3.963 6.514h13.523v13.519l4.257-4.257a3.936 3.936 0 0 0 1.146-2.767V2.345c0-.678-.552-1.234-1.234-1.234H10.989a3.897 3.897 0 0 0-2.767 1.145L3.963 6.514Zm-.192.192L2.256 8.22a3.944 3.944 0 0 0-1.145 2.768v10.664c0 .678.552 1.234 1.234 1.234h10.666a3.9 3.9 0 0 0 2.767-1.146l1.512-1.511H3.771V6.706Z"/>'),junie:vc('<path fill="currentColor" d="M2.345 23.997A2.347 2.347 0 0 1 0 21.652V10.988C0 9.665.535 8.37 1.473 7.433l5.965-5.961A5.01 5.01 0 0 1 10.989 0h10.666A2.347 2.347 0 0 1 24 2.345v10.664a5.056 5.056 0 0 1-1.473 3.554l-5.965 5.965A5.017 5.017 0 0 1 13.007 24v-.003H2.345Zm8.969-6.854H5.486v1.371h5.828v-1.371ZM3.963 6.514h13.523v13.519l4.257-4.257a3.936 3.936 0 0 0 1.146-2.767V2.345c0-.678-.552-1.234-1.234-1.234H10.989a3.897 3.897 0 0 0-2.767 1.145L3.963 6.514Zm-.192.192L2.256 8.22a3.944 3.944 0 0 0-1.145 2.768v10.664c0 .678.552 1.234 1.234 1.234h10.666a3.9 3.9 0 0 0 2.767-1.146l1.512-1.511H3.771V6.706Z"/>'),cody:vc('<path fill="currentColor" d="M17.897 3.84a2.38 2.38 0 1 1 3.09 3.623l-3.525 3.006-2.59-.919-.967-.342-1.625-.576 1.312-1.12.78-.665 3.525-3.007zm-8.27 13.313l.78-.665 1.312-1.12-1.624-.575-.967-.344-2.59-.918-3.525 3.007a2.38 2.38 0 1 0 3.09 3.622l3.525-3.007zM8.724 7.37l2.592.92 2.09-1.784-.84-4.556a2.38 2.38 0 1 0-4.683.865l.841 4.555zm6.554 9.262l-2.592-.92-2.091 1.784.842 4.557a2.38 2.38 0 0 0 4.682-.866l-.841-4.555zm8.186-.564a2.38 2.38 0 0 0-1.449-3.04l-4.365-1.55-.967-.342-1.625-.576-.966-.343-2.59-.92-.967-.342-1.624-.576-.967-.343-4.366-1.55a2.38 2.38 0 1 0-1.591 4.488l4.366 1.55.966.342 1.625.576.965.343 2.591.92.967.342 1.624.577.966.342 4.367 1.55a2.38 2.38 0 0 0 3.04-1.447"/>'),goose:vc('<path fill="currentColor" d="M21.595 23.61c1.167-.254 2.405-.944 2.405-.944l-2.167-1.784a12.124 12.124 0 01-2.695-3.131 12.127 12.127 0 00-3.97-4.049l-.794-.462a1.115 1.115 0 01-.488-.815.844.844 0 01.154-.575c.413-.582 2.548-3.115 2.94-3.44.503-.416 1.065-.762 1.586-1.159.074-.056.148-.112.221-.17.003-.002.007-.004.009-.007.167-.131.325-.272.45-.438.453-.524.563-.988.59-1.193-.061-.197-.244-.639-.753-1.148.319.02.705.272 1.056.569.235-.376.481-.773.727-1.171.165-.266-.08-.465-.086-.471h-.001V3.22c-.007-.007-.206-.25-.471-.086-.567.35-1.134.702-1.639 1.021 0 0-.597-.012-1.305.599a2.464 2.464 0 00-.438.45l-.007.009c-.058.072-.114.147-.17.221-.397.521-.743 1.083-1.16 1.587-.323.391-2.857 2.526-3.44 2.94a.842.842 0 01-.574.153 1.115 1.115 0 01-.815-.488l-.462-.794a12.123 12.123 0 00-4.049-3.97 12.133 12.133 0 01-3.13-2.695L1.332 0S.643 1.238.39 2.405c.352.428 1.27 1.49 2.34 2.302C1.58 4.167.73 3.75.06 3.4c-.103.765-.063 1.92.043 2.816.726.317 1.961.806 3.219 1.066-1.006.236-2.11.278-2.961.262.15.554.358 1.119.64 1.688.119.263.25.52.39.77.452.125 2.222.383 3.164.171l-2.51.897a27.776 27.776 0 002.544 2.726c2.031-1.092 2.494-1.241 4.018-2.238-2.467 2.008-3.108 2.828-3.8 3.67l-.483.678c-.25.351-.469.725-.65 1.117-.61 1.31-1.47 4.1-1.47 4.1-.154.486.202.842.674.674 0 0 2.79-.861 4.1-1.47.392-.182.766-.4 1.118-.65l.677-.483c.227-.187.453-.37.701-.586 0 0 1.705 2.02 3.458 3.349l.896-2.511c-.211.942.046 2.712.17 3.163.252.142.509.272.772.392.569.28 1.134.49 1.688.64-.016-.853.026-1.956.261-2.962.26 1.258.75 2.493 1.067 3.219.895.106 2.051.146 2.816.043a73.87 73.87 0 01-1.308-2.67c.811 1.07 1.874 1.988 2.302 2.34h-.001z"/>'),"amazon-q":vc('<path fill="currentColor" d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10c1.82 0 3.53-.48 5.01-1.32L19.59 23 21 21.59l-2.32-2.42A9.94 9.94 0 0022 12c0-5.52-4.48-10-10-10zm0 3c3.87 0 7 3.13 7 7s-3.13 7-7 7-7-3.13-7-7 3.13-7 7-7z"/>'),"amazon-q-cli":vc('<path fill="currentColor" d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10c1.82 0 3.53-.48 5.01-1.32L19.59 23 21 21.59l-2.32-2.42A9.94 9.94 0 0022 12c0-5.52-4.48-10-10-10zm0 3c3.87 0 7 3.13 7 7s-3.13 7-7 7-7-3.13-7-7 3.13-7 7-7z"/>'),"amazon-q-ide":vc('<path fill="currentColor" d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10c1.82 0 3.53-.48 5.01-1.32L19.59 23 21 21.59l-2.32-2.42A9.94 9.94 0 0022 12c0-5.52-4.48-10-10-10zm0 3c3.87 0 7 3.13 7 7s-3.13 7-7 7-7-3.13-7-7 3.13-7 7-7z"/>'),aider:vc('<path fill="currentColor" d="M2 4a2 2 0 012-2h16a2 2 0 012 2v16a2 2 0 01-2 2H4a2 2 0 01-2-2V4zm5.3 4.3a1 1 0 011.4 0l3 3a1 1 0 010 1.4l-3 3a1 1 0 01-1.4-1.4L9.6 12 7.3 9.7a1 1 0 010-1.4zM13 15a1 1 0 100 2h4a1 1 0 100-2h-4z"/>'),continue:vc('<path fill="currentColor" d="M3 4l9 8-9 8V4zm10 0l9 8-9 8V4z"/>'),tabby:vc('<path fill="currentColor" d="M4 8l4-6h2L7 8h10l-3-6h2l4 6v10a4 4 0 01-4 4H8a4 4 0 01-4-4V8zm4 4a1.5 1.5 0 100 3 1.5 1.5 0 000-3zm8 0a1.5 1.5 0 100 3 1.5 1.5 0 000-3z"/>'),roo:vc('<path fill="currentColor" d="M12 2C8.13 2 5 5.13 5 9c0 2.38 1.19 4.47 3 5.74V17h2v5h4v-5h2v-2.26c1.81-1.27 3-3.36 3-5.74 0-3.87-3.13-7-7-7zm-2 7.5a1 1 0 11-2 0 1 1 0 012 0zm6 0a1 1 0 11-2 0 1 1 0 012 0z"/>'),"roo-code":vc('<path fill="currentColor" d="M12 2C8.13 2 5 5.13 5 9c0 2.38 1.19 4.47 3 5.74V17h2v5h4v-5h2v-2.26c1.81-1.27 3-3.36 3-5.74 0-3.87-3.13-7-7-7zm-2 7.5a1 1 0 11-2 0 1 1 0 012 0zm6 0a1 1 0 11-2 0 1 1 0 012 0z"/>'),opencode:\`data:image/svg+xml,\${encodeURIComponent('<svg viewBox="6 4.5 12 15" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" clip-rule="evenodd" fill-rule="evenodd" d="M18 19.5H6V4.5H18V19.5ZM15 7.5H9V16.5H15V7.5Z"/></svg>')}\`,"kilo-code":\`data:image/svg+xml,\${encodeURIComponent('<svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="M0,0v100h100V0H0ZM92.5925926,92.5925926H7.4074074V7.4074074h85.1851852v85.1851852ZM61.1111044,71.9096084h9.2592593v7.4074074h-11.6402116l-5.026455-5.026455v-11.6402116h7.4074074v9.2592593ZM77.7777711,71.9096084h-7.4074074v-9.2592593h-9.2592593v-7.4074074h11.6402116l5.026455,5.026455v11.6402116ZM46.2962963,61.1114207h-7.4074074v-7.4074074h7.4074074v7.4074074ZM22.2222222,53.7040133h7.4074074v16.6666667h16.6666667v7.4074074h-19.047619l-5.026455-5.026455v-19.047619ZM77.7777711,38.8888889v7.4074074h-24.0740741v-7.4074074h8.2781918v-9.2592593h-8.2781918v-7.4074074h10.6591442l5.026455,5.026455v11.6402116h8.3884749ZM29.6296296,30.5555556h9.2592593l7.4074074,7.4074074v8.3333333h-7.4074074v-8.3333333h-9.2592593v8.3333333h-7.4074074v-24.0740741h7.4074074v8.3333333ZM46.2962963,30.5555556h-7.4074074v-8.3333333h7.4074074v8.3333333Z"/></svg>')}\`,crush:vc('<path fill="currentColor" d="M12 1.6l8.1 4.7v9.4L12 20.4 3.9 15.7V6.3L12 1.6zm0 3.1l-5.4 3.1v6.3l5.4 3.1 5.4-3.1V7.8L12 4.7zm-2.1 4.1h4.2v6.4H9.9V8.8z"/>'),antigravity:vc('<path fill="currentColor" d="m19.94,20.59c1.09.82,2.73.27,1.23-1.23-4.5-4.36-3.55-16.36-9.14-16.36S7.39,15,2.89,19.36c-1.64,1.64.14,2.05,1.23,1.23,4.23-2.86,3.95-7.91,7.91-7.91s3.68,5.05,7.91,7.91Z"/>'),augment:vc('<path fill="currentColor" d="M12 0l2.5 9.5L24 12l-9.5 2.5L12 24l-2.5-9.5L0 12l9.5-2.5z"/>'),amp:vc('<path fill="currentColor" d="M13 2L4 14h7l-2 8 9-12h-7l2-8z"/>'),mcp:vc('<path fill="currentColor" d="M14 2a2 2 0 012 2v2h2a2 2 0 012 2v2h-4V8h-4v2H8v4h2v4H8v-2H6a2 2 0 01-2-2v-2H0v-2h4V8a2 2 0 012-2h2V4a2 2 0 012-2h4z"/>')},bc={feature:"#4ade80",bugfix:"#f87171",refactor:"#a78bfa",test:"#38bdf8",docs:"#fbbf24",setup:"#6b655c",deployment:"#f97316",other:"#9c9588"},wc=Object.keys(mc);
34515
34807
  /**
34516
34808
  * @license lucide-react v0.468.0 - ISC
34517
34809
  *
34518
34810
  * This source code is licensed under the ISC license.
34519
34811
  * See the LICENSE file in the root directory of this source tree.
34520
- */function gc(e){if(cc[e])return e;return mc.filter(t=>e.startsWith(t)).sort((e,t)=>t.length-e.length)[0]??e}var yc=E(),vc=new Map;function xc(e){let t=vc.get(e);return void 0===t&&(t=new Date(e).getTime(),vc.set(e,t)),t}function bc(e){if(0===e.length)return 0;const t=new Set;for(const s of e)t.add(s.started_at.slice(0,10));const n=[...t].sort().reverse();if(0===n.length)return 0;const r=(new Date).toISOString().slice(0,10),a=new Date(Date.now()-864e5).toISOString().slice(0,10);if(n[0]!==r&&n[0]!==a)return 0;let i=1;for(let s=1;s<n.length;s++){const e=new Date(n[s-1]),t=new Date(n[s]);if(1!==(e.getTime()-t.getTime())/864e5)break;i++}return i}function wc(e){const t=e.filter(e=>e.session.evaluation);if(0===t.length)return null;let n=0,r=0,a=0,i=0,s=0,o=0;const l={};for(const u of t){const e=u.session.evaluation;n+=e.prompt_quality,r+=e.context_provided,a+=e.independence_level,i+=e.scope_quality,s+=e.tools_leveraged,o+=e.iteration_count,l[e.task_outcome]=(l[e.task_outcome]??0)+1}const c=t.length;return{prompt_quality:Math.round(n/c*10)/10,context_provided:Math.round(r/c*10)/10,independence_level:Math.round(a/c*10)/10,scope_quality:Math.round(i/c*10)/10,tools_leveraged:Math.round(s/c),total_iterations:o,outcomes:l,session_count:c}}function kc({sessions:e,timeScale:t,effectiveTime:n,isLive:r,onDayClick:a,highlightDate:i}){const s="day"===t||"24h"===t||"12h"===t||"6h"===t,l=new Date(n).toISOString().slice(0,10),c=f.useMemo(()=>s?function(e,t){const n=new Date(\`\${t}T00:00:00\`).getTime(),r=n+864e5,a=[];for(let i=0;i<24;i++)a.push({hour:i,minutes:0});for(const i of e){const e=xc(i.started_at),t=xc(i.ended_at);if(t<n||e>r)continue;const s=Math.max(e,n),o=Math.min(t,r);for(let r=0;r<24;r++){const e=n+36e5*r,t=e+36e5,i=Math.max(s,e),l=Math.min(o,t);l>i&&(a[r].minutes+=(l-i)/6e4)}}return a}(e,l):[],[e,l,s]),u=f.useMemo(()=>s?[]:function(e,t){const n=new Date,r=[];for(let a=t-1;a>=0;a--){const t=new Date(n);t.setDate(t.getDate()-a);const i=t.toISOString().slice(0,10);let s=0;for(const n of e)n.started_at.slice(0,10)===i&&(s+=n.duration_seconds);r.push({date:i,hours:s/3600})}return r}(e,7),[e,s]),d=s?\`Hourly \u2014 \${new Date(n).toLocaleDateString([],{month:"short",day:"numeric"})}\`:"Last 7 Days";if(s){const e=Math.max(...c.map(e=>e.minutes),1);return o.jsxs("div",{className:"mb-8 p-5 rounded-2xl bg-bg-surface-1/50 border border-border/50",children:[o.jsxs("div",{className:"flex items-center justify-between mb-4 px-1",children:[o.jsx("div",{className:"text-xs text-text-muted uppercase tracking-widest font-bold",children:d}),o.jsxs("div",{className:"text-[10px] text-text-muted font-mono bg-bg-surface-2 px-2 py-0.5 rounded",children:[e.toFixed(0),"m peak"]})]}),o.jsx("div",{className:"flex items-end gap-[3px] h-16",children:c.map((t,n)=>{const r=e>0?t.minutes/e*100:0;return o.jsxs("div",{className:"flex-1 flex flex-col items-center justify-end h-full group relative",children:[o.jsx("div",{className:"absolute -top-10 left-1/2 -translate-x-1/2 opacity-0 group-hover:opacity-100 transition-opacity z-20 pointer-events-none",children:o.jsxs("div",{className:"bg-bg-surface-3 text-text-primary text-[10px] font-mono px-2 py-1.5 rounded-lg shadow-xl whitespace-nowrap border border-border flex flex-col items-center",children:[o.jsxs("span",{className:"font-bold",children:[t.hour,":00"]}),o.jsxs("span",{className:"text-accent",children:[t.minutes.toFixed(0),"m active"]}),o.jsx("div",{className:"absolute -bottom-1 left-1/2 -translate-x-1/2 w-2 h-2 bg-bg-surface-3 border-r border-b border-border rotate-45"})]})}),o.jsx(pl.div,{initial:{height:0},animate:{height:\`\${Math.max(r,t.minutes>0?8:0)}%\`},transition:{delay:.01*n,duration:.5},className:"w-full rounded-t-sm transition-all duration-300 group-hover:bg-accent relative overflow-hidden",style:{minHeight:t.minutes>0?"4px":"0px",backgroundColor:t.minutes>0?\`rgba(var(--accent-rgb), \${.4+t.minutes/e*.6})\`:"var(--color-bg-surface-2)"},children:t.minutes>.5*e&&o.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-transparent to-white/10"})})]},t.hour)})}),o.jsx("div",{className:"flex gap-[3px] mt-2 border-t border-border/30 pt-2",children:c.map(e=>o.jsx("div",{className:"flex-1 text-center",children:e.hour%6==0&&o.jsx("span",{className:"text-[9px] text-text-muted font-bold font-mono uppercase",children:0===e.hour?"12a":e.hour<12?\`\${e.hour}a\`:12===e.hour?"12p":e.hour-12+"p"})},e.hour))})]})}const h=Math.max(...u.map(e=>e.hours),.1);return o.jsxs("div",{className:"mb-8 p-5 rounded-2xl bg-bg-surface-1/50 border border-border/50",children:[o.jsxs("div",{className:"flex items-center justify-between mb-4 px-1",children:[o.jsx("div",{className:"text-xs text-text-muted uppercase tracking-widest font-bold",children:d}),o.jsx("div",{className:"text-[10px] text-text-muted font-mono bg-bg-surface-2 px-2 py-0.5 rounded",children:"Last 7 days"})]}),o.jsx("div",{className:"flex items-end gap-2 h-16",children:u.map((e,t)=>{const n=h>0?e.hours/h*100:0,r=e.date===i;return o.jsxs("div",{className:"flex-1 flex flex-col items-center justify-end h-full group relative",children:[o.jsx("div",{className:"absolute -top-10 left-1/2 -translate-x-1/2 opacity-0 group-hover:opacity-100 transition-opacity z-20 pointer-events-none",children:o.jsxs("div",{className:"bg-bg-surface-3 text-text-primary text-[10px] font-mono px-2 py-1.5 rounded-lg shadow-xl whitespace-nowrap border border-border flex flex-col items-center",children:[o.jsx("span",{className:"font-bold",children:e.date}),o.jsxs("span",{className:"text-accent",children:[e.hours.toFixed(1),"h active"]}),o.jsx("div",{className:"absolute -bottom-1 left-1/2 -translate-x-1/2 w-2 h-2 bg-bg-surface-3 border-r border-b border-border rotate-45"})]})}),o.jsx(pl.div,{initial:{height:0},animate:{height:\`\${Math.max(n,e.hours>0?8:0)}%\`},transition:{delay:.05*t,duration:.5},className:"w-full rounded-t-md cursor-pointer transition-all duration-300 group-hover:scale-x-110 origin-bottom "+(r?"ring-2 ring-accent ring-offset-2 ring-offset-bg-base":""),style:{minHeight:e.hours>0?"4px":"0px",backgroundColor:r?"var(--color-accent-bright)":e.hours>0?\`rgba(var(--accent-rgb), \${.4+e.hours/h*.6})\`:"var(--color-bg-surface-2)"},onClick:()=>a?.(e.date)})]},e.date)})}),o.jsx("div",{className:"flex gap-2 mt-2 border-t border-border/30 pt-2",children:u.map(e=>o.jsx("div",{className:"flex-1 text-center",children:o.jsx("span",{className:"text-[10px] text-text-muted font-bold uppercase tracking-tighter",children:new Date(e.date+"T12:00:00").toLocaleDateString([],{weekday:"short"})})},e.date))})]})}var Sc=[{key:"simple",label:"Simple",color:"#34d399"},{key:"medium",label:"Medium",color:"#fbbf24"},{key:"complex",label:"Complex",color:"#f87171"}];function jc({data:e}){const t=e.simple+e.medium+e.complex;if(0===t)return null;const n=Math.max(e.simple,e.medium,e.complex);return o.jsxs(pl.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.15},className:"rounded-xl bg-bg-surface-1 border border-border/50 p-4",children:[o.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[o.jsx("div",{className:"p-1.5 rounded-lg bg-bg-surface-2",children:o.jsx(Ol,{className:"w-3.5 h-3.5 text-text-muted"})}),o.jsx("h2",{className:"text-sm font-bold text-text-muted uppercase tracking-widest",children:"Complexity"})]}),o.jsx("div",{className:"space-y-3",children:Sc.map((r,a)=>{const i=e[r.key],s=n>0?i/n*100:0,l=t>0?(i/t*100).toFixed(0):"0";return o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("span",{className:"text-xs text-text-secondary font-medium w-16 text-right shrink-0",children:r.label}),o.jsx("div",{className:"flex-1 h-5 rounded bg-bg-surface-2/50 overflow-hidden",children:o.jsx(pl.div,{className:"h-full rounded",style:{backgroundColor:r.color},initial:{width:0},animate:{width:\`\${s}%\`},transition:{duration:.6,delay:.08*a,ease:[.22,1,.36,1]}})}),o.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[o.jsx("span",{className:"text-xs text-text-primary font-mono font-bold w-6 text-right",children:i}),o.jsxs("span",{className:"text-[10px] text-text-muted/70 font-mono w-8 text-right",children:[l,"%"]})]})]},r.key)})}),o.jsx("div",{className:"mt-4 flex h-2 rounded-full overflow-hidden bg-bg-surface-2/30",children:Sc.map(n=>{const r=e[n.key],a=t>0?r/t*100:0;return 0===a?null:o.jsx(pl.div,{className:"h-full",style:{backgroundColor:n.color},initial:{width:0},animate:{width:\`\${a}%\`},transition:{duration:.8,ease:[.22,1,.36,1]}},n.key)})})]})}var Cc=["1h","3h","6h","12h"],Nc=["day","week","month"],Tc=["1h","3h","6h","12h","24h","day","7d","week","30d","month"],Ec={day:"24h",week:"7d",month:"30d"},Mc={"24h":"day","7d":"week","30d":"month"};function Pc(e){return"day"===e||"week"===e||"month"===e}var Lc={"1h":36e5,"3h":108e5,"6h":216e5,"12h":432e5,"24h":864e5,"7d":6048e5,"30d":2592e6},Dc={"1h":"1 Hour","3h":"3 Hours","6h":"6 Hours","12h":"12 Hours","24h":"24 Hours",day:"Day","7d":"7 Days",week:"Week","30d":"30 Days",month:"Month"};function Ac(e,t){const n=Lc[e];if(void 0!==n)return{start:t-n,end:t};const r=new Date(t);if("day"===e){const e=new Date(r.getFullYear(),r.getMonth(),r.getDate()).getTime();return{start:e,end:e+864e5}}if("week"===e){const e=r.getDay(),t=0===e?-6:1-e,n=new Date(r.getFullYear(),r.getMonth(),r.getDate()+t).getTime();return{start:n,end:n+6048e5}}return{start:new Date(r.getFullYear(),r.getMonth(),1).getTime(),end:new Date(r.getFullYear(),r.getMonth()+1,1).getTime()}}function _c(e,t,n){const r=Lc[e];if(void 0!==r)return t+n*r;const a=new Date(t);return"day"===e?new Date(a.getFullYear(),a.getMonth(),a.getDate()+n,12).getTime():"week"===e?new Date(a.getFullYear(),a.getMonth(),a.getDate()+7*n,12).getTime():new Date(a.getFullYear(),a.getMonth()+n,Math.min(a.getDate(),28),12).getTime()}function zc(e,t){return Pc(e)?function(e,t){if(!Pc(e))return!1;const n=Ac(e,t),r=Date.now();return r>=n.start&&r<n.end}(e,t):t>=Date.now()-6e4}function Rc({label:e,value:t,suffix:n,decimals:r=0,icon:a,delay:i=0,variant:s="default",clickable:l=!1,selected:c=!1,onClick:u,subtitle:d}){const h=f.useRef(null),p=f.useRef(0);f.useEffect(()=>{h.current&&t!==p.current&&(!function(e,t,n){let r=null;requestAnimationFrame(function a(i){r||(r=i);const s=Math.min((i-r)/800,1),o=1-Math.pow(1-s,4),l=t*o;e.textContent=n>0?l.toFixed(n):String(Math.round(l)),s<1&&requestAnimationFrame(a)})}(h.current,t,r),p.current=t)},[t,r]);const m="accent"===s;return o.jsxs(pl.div,{initial:{opacity:0,y:6},animate:{opacity:1,y:0},transition:{delay:i},onClick:l&&t>0?u:void 0,className:\`px-3 py-2 rounded-lg border flex items-center gap-2.5 group transition-all duration-300 \${m?"shrink-0 bg-bg-surface-1 border-border/50 hover:border-accent/30":"flex-1 min-w-[120px] bg-bg-surface-1 border-border/50 hover:border-accent/30"} \${l&&t>0?"cursor-pointer":""} \${c?"border-accent/50 bg-accent/5":""}\`,children:[o.jsx("div",{className:"p-1.5 rounded-md transition-colors "+(c?"bg-accent/15":"bg-bg-surface-2 group-hover:bg-accent/10"),children:o.jsx(a,{className:"w-3.5 h-3.5 transition-colors "+(c?"text-accent":"text-text-muted group-hover:text-accent")})}),o.jsxs("div",{className:"flex flex-col min-w-0",children:[o.jsxs("div",{className:"flex items-baseline gap-0.5",children:[o.jsx("span",{ref:h,className:"text-lg font-bold text-text-primary tracking-tight leading-none",children:r>0?t.toFixed(r):Math.round(t)}),n&&o.jsx("span",{className:"text-[10px] text-text-muted font-medium",children:n})]}),o.jsx("span",{className:"text-[9px] font-mono text-text-muted uppercase tracking-wider leading-none mt-0.5",children:e}),d&&o.jsx("span",{className:"text-[8px] text-text-muted/50 leading-none mt-0.5 truncate",children:d})]})]})}function Fc({totalHours:e,coveredHours:t,aiMultiplier:n,featuresShipped:r,bugsFixed:a,complexSolved:i,currentStreak:s,totalMilestones:l,selectedCard:c,onCardClick:u}){const d=e=>{u?.(c===e?null:e)};return o.jsxs("div",{className:"flex gap-2 mb-4",children:[o.jsxs("div",{className:"grid grid-cols-3 lg:grid-cols-7 gap-2 flex-1",children:[o.jsx(Rc,{label:"Spent Time",value:t<1/60?0:t<1?Math.round(60*t):t,suffix:t<1?"min":"hrs",decimals:t>=1?1:0,icon:Ml,delay:.1,clickable:!0,selected:"activeTime"===c,onClick:()=>d("activeTime")}),o.jsx(Rc,{label:"Gained Time",value:e<1?Math.round(60*e):e,suffix:e<1?"min":"hrs",decimals:e<1?0:1,icon:nc,delay:.12,clickable:!0,selected:"aiTime"===c,onClick:()=>d("aiTime")}),o.jsx(Rc,{label:"Boost",value:n,suffix:"x",decimals:1,icon:Ol,delay:.15,clickable:!0,selected:"parallel"===c,onClick:()=>d("parallel")}),o.jsx(Rc,{label:"Milestones",value:l,icon:tc,delay:.2,clickable:!0,selected:"milestones"===c,onClick:()=>d("milestones")}),o.jsx(Rc,{label:"Features",value:r,icon:Xl,delay:.25,clickable:!0,selected:"features"===c,onClick:()=>d("features")}),o.jsx(Rc,{label:"Bugs Fixed",value:a,icon:wl,delay:.3,clickable:!0,selected:"bugs"===c,onClick:()=>d("bugs")}),o.jsx(Rc,{label:"Complex",value:i,icon:bl,delay:.35,clickable:!0,selected:"complex"===c,onClick:()=>d("complex")})]}),o.jsx("div",{className:"w-px bg-border/30 self-stretch my-1"}),o.jsx(Rc,{label:"Streak",value:s,suffix:"days",icon:lc,delay:.45,variant:"accent",clickable:!0,selected:"streak"===c,onClick:()=>d("streak")})]})}var Vc={milestones:{title:"All Milestones",icon:tc,filter:()=>!0,emptyText:"No milestones in this time window.",accentColor:"#60a5fa"},features:{title:"Features Shipped",icon:Xl,filter:e=>"feature"===e.category,emptyText:"No features shipped in this time window.",accentColor:"#4ade80"},bugs:{title:"Bugs Fixed",icon:wl,filter:e=>"bugfix"===e.category,emptyText:"No bugs fixed in this time window.",accentColor:"#f87171"},complex:{title:"Complex Tasks",icon:bl,filter:e=>"complex"===e.complexity,emptyText:"No complex tasks in this time window.",accentColor:"#a78bfa"}},Oc={feature:"bg-success/10 text-success border-success/20",bugfix:"bg-error/10 text-error border-error/20",refactor:"bg-purple/10 text-purple border-purple/20",test:"bg-blue/10 text-blue border-blue/20",docs:"bg-accent/10 text-accent border-accent/20",setup:"bg-text-muted/10 text-text-muted border-text-muted/20",deployment:"bg-emerald/10 text-emerald border-emerald/20"};function Ic(e){const t=new Date(e),n=(new Date).getTime()-t.getTime(),r=Math.floor(n/6e4);if(r<1)return"just now";if(r<60)return\`\${r}m ago\`;const a=Math.floor(r/60);if(a<24)return\`\${a}h ago\`;const i=Math.floor(a/24);return 1===i?"yesterday":i<7?\`\${i}d ago\`:t.toLocaleDateString([],{month:"short",day:"numeric"})}function $c({type:e,milestones:t,showPublic:n=!1,onClose:r}){f.useEffect(()=>{if(e)return document.body.style.overflow="hidden",()=>{document.body.style.overflow=""}},[e]);if(!e||!("features"===e||"bugs"===e||"complex"===e||"milestones"===e))return null;const a=Vc[e],i=a.icon,s=t.filter(a.filter).sort((e,t)=>new Date(t.created_at).getTime()-new Date(e.created_at).getTime()),l=new Map;for(const o of s){const e=new Date(o.created_at).toLocaleDateString([],{weekday:"short",month:"short",day:"numeric"}),t=l.get(e);t?t.push(o):l.set(e,[o])}return o.jsx(Xs,{children:e&&o.jsxs(o.Fragment,{children:[o.jsx(pl.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},className:"fixed inset-0 bg-black/40 backdrop-blur-sm z-40",onClick:r}),o.jsxs(pl.div,{initial:{x:"100%"},animate:{x:0},exit:{x:"100%"},transition:{type:"spring",damping:30,stiffness:300},className:"fixed top-0 right-0 h-full w-full max-w-md bg-bg-base border-l border-border/50 z-50 flex flex-col shadow-2xl",children:[o.jsxs("div",{className:"flex items-center gap-3 px-5 py-4 border-b border-border/50",children:[o.jsx("div",{className:"p-2 rounded-lg",style:{backgroundColor:\`\${a.accentColor}15\`},children:o.jsx(i,{className:"w-4 h-4",style:{color:a.accentColor}})}),o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsx("h2",{className:"text-sm font-bold text-text-primary",children:a.title}),o.jsxs("span",{className:"text-[10px] font-mono text-text-muted",children:[s.length," ",1===s.length?"item":"items"," in window"]})]}),o.jsx("button",{onClick:r,className:"p-1.5 rounded-md hover:bg-bg-surface-2 text-text-muted hover:text-text-primary transition-colors",children:o.jsx(oc,{className:"w-4 h-4"})})]}),o.jsx("div",{className:"flex-1 overflow-y-auto overscroll-contain px-5 py-4",children:0===s.length?o.jsxs("div",{className:"flex flex-col items-center justify-center py-16 text-center",children:[o.jsx(ec,{className:"w-8 h-8 text-text-muted/30 mb-3"}),o.jsx("p",{className:"text-sm text-text-muted",children:a.emptyText})]}):o.jsx("div",{className:"space-y-5",children:[...l.entries()].map(([t,r])=>o.jsxs("div",{children:[o.jsx("div",{className:"text-[10px] font-mono text-text-muted uppercase tracking-wider mb-2 px-1",children:t}),o.jsx("div",{className:"space-y-1",children:r.map((t,r)=>{const a=pc[t.category]??"#9c9588",i=Oc[t.category]??"bg-bg-surface-2 text-text-secondary border-border",s=gc(t.client),l=dc[s]??s.slice(0,2).toUpperCase(),c=cc[s]??"#91919a",u="cursor"===s?"var(--text-primary)":c,d=hc[s],f=n?t.title:t.private_title||t.title,h="complex"===t.complexity;return o.jsxs(pl.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},transition:{duration:.2,delay:.03*r},className:"flex items-start gap-2.5 py-2 px-2 rounded-lg hover:bg-bg-surface-1 transition-colors group",children:[o.jsx("div",{className:"w-2 h-2 rounded-full flex-shrink-0 mt-1.5",style:{backgroundColor:a}}),o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsx("p",{className:"text-sm text-text-secondary group-hover:text-text-primary transition-colors leading-snug",children:f}),o.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[("complex"===e||"milestones"===e)&&o.jsx("span",{className:\`text-[8px] uppercase tracking-wider font-bold px-1.5 py-0.5 rounded-full border \${i}\`,children:t.category}),h&&"complex"!==e&&o.jsxs("span",{className:"flex items-center gap-0.5 text-[8px] uppercase tracking-wider font-bold px-1.5 py-0.5 rounded-full border bg-purple/10 text-purple border-purple/20",children:[o.jsx(bl,{className:"w-2 h-2"}),"complex"]}),o.jsx("span",{className:"text-[10px] text-text-muted font-mono",children:Ic(t.created_at)}),t.languages.length>0&&o.jsx("span",{className:"text-[9px] text-text-muted font-mono",children:t.languages.join(", ")}),o.jsx("div",{className:"w-4 h-4 rounded flex items-center justify-center text-[7px] font-bold font-mono flex-shrink-0 ml-auto",style:{backgroundColor:\`\${c}15\`,color:c,border:\`1px solid \${c}20\`},children:d?o.jsx("div",{className:"w-2.5 h-2.5",style:{backgroundColor:u,maskImage:\`url(\${d})\`,maskSize:"contain",maskRepeat:"no-repeat",maskPosition:"center",WebkitMaskImage:\`url(\${d})\`,WebkitMaskSize:"contain",WebkitMaskRepeat:"no-repeat",WebkitMaskPosition:"center"}}):l})]})]})]},t.id)})})]},t))})})]})]})})}function Bc(e){return"activeTime"===e||"aiTime"===e||"parallel"===e||"streak"===e}var Hc={activeTime:{title:"Spent Time",icon:Ml,accentColor:"#60a5fa"},aiTime:{title:"Gained Time",icon:nc,accentColor:"#4ade80"},parallel:{title:"Boost",icon:Ol,accentColor:"#a78bfa"},streak:{title:"Streak",icon:lc,accentColor:"#facc15"}};function Uc(e){if(e<60)return\`\${Math.round(e)}s\`;if(e<3600)return\`\${Math.round(e/60)}m\`;const t=Math.floor(e/3600),n=Math.round(e%3600/60);return n>0?\`\${t}h \${n}m\`:\`\${t}h\`}function Wc(e){return e<1/60?"< 1 min":e<1?\`\${Math.round(60*e)} min\`:\`\${e.toFixed(1)} hrs\`}function qc(e){if(0===e.length)return[];const t=[];for(const i of e){const e=xc(i.started_at),n=xc(i.ended_at);n<=e||(t.push({time:e,delta:1}),t.push({time:n,delta:-1}))}t.sort((e,t)=>e.time-t.time||e.delta-t.delta);const n=[];let r=0,a=0;for(const i of t){const e=r>0;r+=i.delta,!e&&r>0?a=i.time:e&&0===r&&n.push({start:a,end:i.time})}return n}function Yc({children:e}){return o.jsx("div",{className:"px-3 py-2.5 rounded-lg bg-bg-surface-1 border border-border/50 text-xs text-text-secondary leading-relaxed",children:e})}function Kc({label:e,value:t}){return o.jsxs("div",{className:"flex items-center justify-between py-1.5 px-1",children:[o.jsx("span",{className:"text-xs text-text-muted",children:e}),o.jsx("span",{className:"text-xs font-mono font-bold text-text-primary",children:t})]})}function Qc({type:e,sessions:t,allSessions:n,currentStreak:r=0,stats:a,showPublic:i=!1,onClose:s}){if(f.useEffect(()=>{if(e&&Bc(e))return document.body.style.overflow="hidden",()=>{document.body.style.overflow=""}},[e]),!e||!Bc(e))return null;const l=Hc[e],c=l.icon,u=[...t].sort((e,t)=>xc(t.started_at)-xc(e.started_at));return o.jsx(Xs,{children:e&&o.jsxs(o.Fragment,{children:[o.jsx(pl.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},className:"fixed inset-0 bg-black/40 backdrop-blur-sm z-40",onClick:s}),o.jsxs(pl.div,{initial:{x:"100%"},animate:{x:0},exit:{x:"100%"},transition:{type:"spring",damping:30,stiffness:300},className:"fixed top-0 right-0 h-full w-full max-w-md bg-bg-base border-l border-border/50 z-50 flex flex-col shadow-2xl",children:[o.jsxs("div",{className:"flex items-center gap-3 px-5 py-4 border-b border-border/50",children:[o.jsx("div",{className:"p-2 rounded-lg",style:{backgroundColor:\`\${l.accentColor}15\`},children:o.jsx(c,{className:"w-4 h-4",style:{color:l.accentColor}})}),o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsx("h2",{className:"text-sm font-bold text-text-primary",children:l.title}),o.jsx("span",{className:"text-[10px] font-mono text-text-muted",children:"streak"===e?\`\${r} day\${1===r?"":"s"} consecutive\`:\`\${t.length} sessions in window\`})]}),o.jsx("button",{onClick:s,className:"p-1.5 rounded-md hover:bg-bg-surface-2 text-text-muted hover:text-text-primary transition-colors",children:o.jsx(oc,{className:"w-4 h-4"})})]}),o.jsxs("div",{className:"flex-1 overflow-y-auto overscroll-contain px-5 py-4 space-y-4",children:["activeTime"===e&&o.jsx(Xc,{stats:a,sessions:t}),"aiTime"===e&&o.jsx(Gc,{stats:a,sessions:u,showPublic:i}),"parallel"===e&&o.jsx(Zc,{stats:a,sessions:u,showPublic:i}),"streak"===e&&o.jsx(Jc,{allSessions:n??t,currentStreak:r})]})]})]})})}function Xc({stats:e,sessions:t}){const n=qc(t);return o.jsxs(o.Fragment,{children:[o.jsx(Yc,{children:"Real wall-clock time where at least one AI session was running. Gaps between sessions (breaks, thinking, context switches) are excluded."}),o.jsxs("div",{className:"rounded-lg border border-border/50 bg-bg-surface-1 divide-y divide-border/30",children:[o.jsx(Kc,{label:"Spent time",value:Wc(e.coveredHours)}),o.jsx(Kc,{label:"Gained time",value:Wc(e.totalHours)}),o.jsx(Kc,{label:"Active periods",value:String(n.length)}),o.jsx(Kc,{label:"Sessions",value:String(t.length)})]}),n.length>0&&o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"text-[10px] font-mono text-text-muted uppercase tracking-wider px-1 pt-2",children:"Active Periods"}),o.jsx("div",{className:"space-y-1",children:n.map((e,t)=>{const n=(e.end-e.start)/6e4;return o.jsxs(pl.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},transition:{duration:.2,delay:.02*t},className:"flex items-center gap-3 py-2 px-2 rounded-lg hover:bg-bg-surface-1 transition-colors",children:[o.jsx("div",{className:"w-2 h-2 rounded-full bg-accent/60 flex-shrink-0"}),o.jsxs("span",{className:"text-xs font-mono text-text-secondary flex-1",children:[new Date(e.start).toLocaleTimeString([],{hour:"numeric",minute:"2-digit",hour12:!0})," \u2192 ",new Date(e.end).toLocaleTimeString([],{hour:"numeric",minute:"2-digit",hour12:!0})]}),o.jsx("span",{className:"text-xs font-mono font-bold text-text-primary",children:n<1?"< 1m":n<60?\`\${Math.round(n)}m\`:\`\${(n/60).toFixed(1)}h\`})]},t)})})]})]})}function Gc({stats:e,sessions:t,showPublic:n}){return o.jsxs(o.Fragment,{children:[o.jsx(Yc,{children:"Total accumulated AI session duration. When multiple sessions run in parallel, their durations add up \u2014 so Gained Time can exceed Spent Time."}),o.jsxs("div",{className:"rounded-lg border border-border/50 bg-bg-surface-1 divide-y divide-border/30",children:[o.jsx(Kc,{label:"Gained time",value:Wc(e.totalHours)}),o.jsx(Kc,{label:"Spent time",value:Wc(e.coveredHours)}),o.jsx(Kc,{label:"Boost",value:\`\${e.aiMultiplier.toFixed(1)}x\`}),o.jsx(Kc,{label:"Sessions",value:String(t.length)})]}),o.jsx(eu,{sessions:t,showPublic:n})]})}function Zc({stats:e,sessions:t,showPublic:n}){return o.jsxs(o.Fragment,{children:[o.jsx(Yc,{children:"Your AI multiplier \u2014 Gained Time divided by Spent Time. Higher means more parallelization. You're running more AI sessions simultaneously."}),o.jsxs("div",{className:"rounded-lg border border-border/50 bg-bg-surface-1 divide-y divide-border/30",children:[o.jsx(Kc,{label:"Boost",value:\`\${e.aiMultiplier.toFixed(1)}x\`}),o.jsx(Kc,{label:"Peak concurrent",value:String(e.peakConcurrency)}),o.jsx(Kc,{label:"Calculation",value:\`\${Wc(e.totalHours)} \xF7 \${Wc(e.coveredHours)}\`}),o.jsx(Kc,{label:"Sessions",value:String(t.length)})]}),o.jsx(eu,{sessions:t,showPublic:n})]})}function Jc({allSessions:e,currentStreak:t}){const n=function(e){const t=new Map;for(const n of e){const e=new Date(xc(n.started_at)),r=\`\${e.getFullYear()}-\${String(e.getMonth()+1).padStart(2,"0")}-\${String(e.getDate()).padStart(2,"0")}\`,a=t.get(r);a?a.push(n):t.set(r,[n])}return[...t.entries()].sort((e,t)=>t[0].localeCompare(e[0])).map(([e,t])=>{const n=new Date(e+"T12:00:00").toLocaleDateString([],{weekday:"short",month:"short",day:"numeric"}),r=t.reduce((e,t)=>e+t.duration_seconds,0),a=qc(t).reduce((e,t)=>e+(t.end-t.start),0)/1e3,i=a>0?r/a:0;return{date:e,label:n,count:t.length,gainedSeconds:r,spentSeconds:a,boost:i}})}(e),r=new Set,a=new Date;for(let i=0;i<t;i++){const e=new Date(a);e.setDate(e.getDate()-i),r.add(\`\${e.getFullYear()}-\${String(e.getMonth()+1).padStart(2,"0")}-\${String(e.getDate()).padStart(2,"0")}\`)}return o.jsxs(o.Fragment,{children:[o.jsx(Yc,{children:"Consecutive days with at least one AI session. Keep using AI daily to grow your streak!"}),o.jsxs("div",{className:"rounded-lg border border-border/50 bg-bg-surface-1 divide-y divide-border/30",children:[o.jsx(Kc,{label:"Current streak",value:\`\${t} day\${1===t?"":"s"}\`}),o.jsx(Kc,{label:"Total active days",value:String(n.length)}),o.jsx(Kc,{label:"Total sessions",value:String(e.length)})]}),n.length>0&&o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"text-[10px] font-mono text-text-muted uppercase tracking-wider px-1 pt-2",children:"Active Days"}),o.jsx("div",{className:"space-y-1",children:n.map((e,t)=>{const n=r.has(e.date);return o.jsxs(pl.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},transition:{duration:.2,delay:Math.min(.02*t,.6)},className:"flex items-center gap-2 py-2 px-2 rounded-lg hover:bg-bg-surface-1 transition-colors",children:[n?o.jsx(lc,{className:"w-3 h-3 flex-shrink-0",style:{color:"#facc15"}}):o.jsx(kl,{className:"w-3 h-3 flex-shrink-0 text-text-muted"}),o.jsx("span",{className:"text-xs font-mono flex-1 min-w-0 "+(n?"text-text-primary":"text-text-secondary"),children:e.label}),o.jsx("span",{className:"text-[10px] text-text-muted font-mono whitespace-nowrap",title:"Spent time",children:Uc(e.spentSeconds)}),o.jsx("span",{className:"text-[10px] text-text-muted",children:"/"}),o.jsx("span",{className:"text-[10px] font-mono font-bold text-text-primary whitespace-nowrap",title:"Gained time",children:Uc(e.gainedSeconds)}),e.boost>0&&o.jsxs("span",{className:"text-[10px] font-mono font-bold whitespace-nowrap",style:{color:"#a78bfa"},title:"Boost",children:[e.boost.toFixed(1),"x"]})]},e.date)})})]})]})}function eu({sessions:e,showPublic:t}){return 0===e.length?null:o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"text-[10px] font-mono text-text-muted uppercase tracking-wider px-1 pt-2",children:"Sessions"}),o.jsx("div",{className:"space-y-1",children:e.map((e,n)=>{const r=gc(e.client),a=dc[r]??r.slice(0,2).toUpperCase(),i=cc[r]??"#91919a",s="cursor"===r?"var(--text-primary)":i,l=hc[r],c=t?e.title??"Untitled":e.private_title||e.title||"Untitled";return o.jsxs(pl.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},transition:{duration:.2,delay:Math.min(.02*n,.6)},className:"flex items-start gap-2.5 py-2 px-2 rounded-lg hover:bg-bg-surface-1 transition-colors group",children:[o.jsx("div",{className:"w-5 h-5 rounded flex items-center justify-center text-[7px] font-bold font-mono flex-shrink-0 mt-0.5",style:{backgroundColor:\`\${i}15\`,color:i,border:\`1px solid \${i}20\`},children:l?o.jsx("div",{className:"w-3 h-3",style:{backgroundColor:s,maskImage:\`url(\${l})\`,maskSize:"contain",maskRepeat:"no-repeat",maskPosition:"center",WebkitMaskImage:\`url(\${l})\`,WebkitMaskSize:"contain",WebkitMaskRepeat:"no-repeat",WebkitMaskPosition:"center"}}):a}),o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsx("p",{className:"text-sm text-text-secondary group-hover:text-text-primary transition-colors leading-snug truncate",children:c}),o.jsxs("div",{className:"flex items-center gap-2 mt-0.5",children:[o.jsx("span",{className:"text-[10px] font-mono text-text-muted",children:Uc(e.duration_seconds)}),o.jsx("span",{className:"text-[10px] text-text-muted",children:(u=e.started_at,new Date(u).toLocaleTimeString([],{hour:"numeric",minute:"2-digit",hour12:!0}))}),e.project&&o.jsx("span",{className:"text-[10px] text-text-muted font-mono truncate",children:e.project})]})]})]},e.session_id);var u})})]})}var tu=[{id:"sessions",label:"Sessions"},{id:"insights",label:"Insights"}];function nu({activeTab:e,onTabChange:t}){return o.jsx("div",{className:"flex gap-0.5 p-0.5 rounded-lg bg-bg-surface-1 border border-border/40",children:tu.map(({id:n,label:r})=>{const a=e===n;return o.jsx("button",{onClick:()=>t(n),className:\`\\n px-3 py-1 rounded-md text-xs font-medium transition-all duration-150\\n \${a?"bg-bg-surface-2 text-text-primary shadow-sm":"text-text-muted hover:text-text-primary"}\\n \`,children:r},n)})})}function ru({label:e,active:t,onClick:n}){return o.jsx("button",{onClick:n,className:"text-[10px] font-bold uppercase tracking-wider px-3 py-1.5 rounded-full transition-all duration-200 cursor-pointer border "+(t?"bg-accent text-bg-base border-accent scale-105":"bg-bg-surface-1 border-border text-text-muted hover:text-text-primary hover:border-text-muted/50"),style:t?{boxShadow:"0 2px 10px rgba(var(--accent-rgb), 0.4)"}:void 0,children:e})}function au({sessions:e,filters:t,onFilterChange:n}){const r=f.useMemo(()=>[...new Set(e.map(e=>e.client))].sort(),[e]),a=f.useMemo(()=>[...new Set(e.flatMap(e=>e.languages))].sort(),[e]),i=f.useMemo(()=>[...new Set(e.map(e=>e.project).filter(e=>{if(!e)return!1;const t=e.trim().toLowerCase();return!["untitled","mcp","unknown","default","none"].includes(t)}))].sort(),[e]);return r.length>0||a.length>0||i.length>0?o.jsxs("div",{className:"flex flex-wrap items-center gap-2 px-1",children:[o.jsx(ru,{label:"All",active:"all"===t.client&&"all"===t.language&&"all"===t.project,onClick:()=>{n("client","all"),n("language","all"),n("project","all")}}),r.map(e=>o.jsx(ru,{label:uc[e]??e,active:t.client===e,onClick:()=>n("client",t.client===e?"all":e)},e)),a.map(e=>o.jsx(ru,{label:e,active:t.language===e,onClick:()=>n("language",t.language===e?"all":e)},e)),i.map(e=>o.jsx(ru,{label:e,active:t.project===e,onClick:()=>n("project",t.project===e?"all":e)},e))]}):null}function iu({onDelete:e,size:t="md",className:n=""}){const[r,a]=f.useState(!1),i=f.useRef(void 0);f.useEffect(()=>()=>{i.current&&clearTimeout(i.current)},[]);const s=t=>{t.stopPropagation(),i.current&&clearTimeout(i.current),a(!1),e()},l=e=>{e.stopPropagation(),i.current&&clearTimeout(i.current),a(!1)},c="sm"===t?"w-3 h-3":"w-3.5 h-3.5",u="sm"===t?"p-1":"p-1.5";return r?o.jsxs("span",{className:\`inline-flex items-center gap-0.5 \${n}\`,onClick:e=>e.stopPropagation(),children:[o.jsx("button",{onClick:s,className:\`\${u} rounded-lg transition-all bg-error/15 text-error hover:bg-error/25\`,title:"Confirm delete",children:o.jsx(Sl,{className:c})}),o.jsx("button",{onClick:l,className:\`\${u} rounded-lg transition-all text-text-muted hover:bg-bg-surface-2\`,title:"Cancel",children:o.jsx(oc,{className:c})})]}):o.jsx("button",{onClick:e=>{e.stopPropagation(),a(!0),i.current=setTimeout(()=>a(!1),5e3)},className:\`\${u} rounded-lg transition-all text-text-muted hover:text-error/70 hover:bg-error/5 \${n}\`,title:"Delete",children:o.jsx(rc,{className:c})})}function su({text:e,words:t}){if(!t?.length||!e)return o.jsx(o.Fragment,{children:e});const n=t.map(e=>e.replace(/[.*+?^\${}()|[\\]\\\\]/g,"\\\\$&")),r=new RegExp(\`(\${n.join("|")})\`,"gi"),a=e.split(r);return o.jsx(o.Fragment,{children:a.map((e,t)=>t%2==1?o.jsx("mark",{className:"bg-accent/30 text-inherit rounded-sm px-px",children:e},t):o.jsx("span",{children:e},t))})}function ou(e,t){const n=e=>new Date(e).toLocaleTimeString([],{hour:"numeric",minute:"2-digit",hour12:!0});return\`\${n(e)} \u2014 \${n(t)}\`}function lu(e){if(e<60)return\`\${e}s\`;const t=Math.round(e/60);if(t<60)return\`\${t}m\`;const n=Math.floor(t/60),r=t%60;return r>0?\`\${n}h \${r}m\`:\`\${n}h\`}var cu={feature:"bg-success/15 text-success border-success/30",bugfix:"bg-error/15 text-error border-error/30",refactor:"bg-purple/15 text-purple border-purple/30",test:"bg-blue/15 text-blue border-blue/30",docs:"bg-accent/15 text-accent border-accent/30",setup:"bg-text-muted/15 text-text-muted border-text-muted/20",deployment:"bg-emerald/15 text-emerald border-emerald/30"};function uu({category:e}){const t=cu[e]??"bg-bg-surface-2 text-text-secondary border-border";return o.jsx("span",{className:\`text-[10px] px-1.5 py-0.5 rounded-full border font-bold uppercase tracking-wider \${t}\`,children:e})}function du({score:e}){const t=e/5*100,n=e>=4?"bg-success":e>=3?"bg-accent":"bg-error",r=e>=4?"bg-success/15":e>=3?"bg-accent/15":"bg-error/15";return o.jsx("span",{className:\`w-7 h-[4px] rounded-full \${r} flex-shrink-0 overflow-hidden\`,title:\`Quality: \${e.toFixed(1)}/5\`,children:o.jsx("span",{className:\`block h-full rounded-full \${n}\`,style:{width:\`\${t}%\`}})})}function fu({model:e,toolOverhead:t}){return e||t?o.jsxs("div",{className:"flex flex-wrap items-center gap-4",children:[e&&o.jsxs("div",{className:"flex items-center gap-1.5 text-[10px] whitespace-nowrap",children:[o.jsx(Dl,{className:"w-3 h-3 text-text-muted/50 flex-shrink-0"}),o.jsx("span",{className:"text-text-secondary",children:"Model"}),o.jsx("span",{className:"text-text-secondary font-mono font-bold ml-0.5",children:e})]}),t&&o.jsxs("div",{className:"flex items-center gap-1.5 text-[10px] whitespace-nowrap",children:[o.jsx(xl,{className:"w-3 h-3 text-text-muted/50 flex-shrink-0"}),o.jsx("span",{className:"text-text-secondary",children:"Tracking overhead"}),o.jsxs("span",{className:"text-text-secondary font-mono font-bold ml-0.5",children:["~",t.total_tokens_est," tokens"]})]})]}):null}function hu({evaluation:e,showPublic:t=!1,model:n,toolOverhead:r}){const a=!!n||!!r,i=[{label:"Prompt",value:e.prompt_quality,reason:e.prompt_quality_reason,Icon:ql},{label:"Context",value:e.context_provided,reason:e.context_provided_reason,Icon:zl},{label:"Scope",value:e.scope_quality,reason:e.scope_quality_reason,Icon:tc},{label:"Independence",value:e.independence_level,reason:e.independence_level_reason,Icon:Pl}],s=i.some(e=>e.reason)||e.task_outcome_reason;return o.jsxs("div",{className:"px-2.5 py-2 bg-bg-surface-2/30 rounded-md mb-2",children:[o.jsxs("div",{className:"flex flex-wrap items-center gap-x-5 gap-y-2",children:[i.map(({label:e,value:t,Icon:n})=>o.jsxs("div",{className:"flex items-center gap-1.5 text-[10px] whitespace-nowrap",children:[o.jsx(n,{className:"w-3 h-3 text-text-muted/60 flex-shrink-0"}),o.jsx("span",{className:"text-text-secondary whitespace-nowrap",children:e}),o.jsx(du,{score:t})]},e)),a&&o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"hidden md:block h-3.5 w-px bg-border/30"}),o.jsx(fu,{model:n,toolOverhead:r})]}),o.jsx("div",{className:"hidden md:block h-3.5 w-px bg-border/30"}),o.jsxs("div",{className:"flex items-center gap-1.5 text-[10px] whitespace-nowrap",children:[o.jsx(Ql,{className:"w-3 h-3 text-text-muted/50"}),o.jsx("span",{className:"text-text-muted",children:"Iterations"}),o.jsx("span",{className:"text-text-secondary font-mono font-bold ml-0.5",children:e.iteration_count})]}),o.jsxs("div",{className:"flex items-center gap-1.5 text-[10px] whitespace-nowrap",children:[o.jsx(sc,{className:"w-3 h-3 text-text-muted/50"}),o.jsx("span",{className:"text-text-muted",children:"Tools"}),o.jsx("span",{className:"text-text-secondary font-mono font-bold ml-0.5",children:e.tools_leveraged})]})]}),!t&&s&&o.jsx("div",{className:"mt-2 pt-2 border-t border-border/15",children:o.jsxs("div",{className:"grid grid-cols-[86px_minmax(0,1fr)] gap-x-2 gap-y-1 text-[10px]",children:[e.task_outcome_reason&&o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"text-error font-bold text-right",children:"Outcome:"}),o.jsx("span",{className:"text-text-secondary leading-relaxed",children:e.task_outcome_reason})]}),i.filter(e=>e.reason).map(({label:e,reason:t})=>o.jsxs("div",{className:"contents",children:[o.jsxs("span",{className:"text-accent font-bold text-right",children:[e,":"]}),o.jsx("span",{className:"text-text-secondary leading-relaxed",children:t})]},e))]})})]})}var pu=f.memo(function({session:e,milestones:t,defaultExpanded:n=!1,externalShowPublic:r,contextLabel:a,hideClientAvatar:i=!1,hideProject:s=!1,showFullDate:l=!1,highlightWords:c,onDeleteSession:u,onDeleteMilestone:d}){const[h,p]=f.useState(n),[m,g]=f.useState(!1),y=r??m,v=g,x=gc(e.client),b=cc[x]??"#91919a",w="cursor"===x,k=w?"var(--text-primary)":b,S=w?{backgroundColor:"var(--bg-surface-2)",color:"var(--text-primary)",border:"1px solid var(--border)"}:{backgroundColor:\`\${b}15\`,color:b,border:\`1px solid \${b}30\`},j=dc[x]??x.slice(0,2).toUpperCase(),C=hc[x],N=t.length>0||!!e.evaluation||!!e.model||!!e.tool_overhead,T=e.project?.trim()||"",E=!T||["untitled","mcp","unknown","default","none","null","undefined"].includes(T.toLowerCase()),M=t[0],P=E&&M?M.title:T,L=E&&M?M.private_title||M.title:T;let D=e.private_title||e.title||L||"Untitled Session",A=e.title||P||"Untitled Session";const _=D!==A&&void 0===r,z=!!u||N||_,R=a?.replace(/^\\s*prompt\\s*/i,"").trim();return o.jsxs("div",{className:"group/card mb-2 rounded-xl border transition-all duration-200 "+(h?"bg-bg-surface-1 border-accent/35 shadow-md":"bg-bg-surface-1/35 border-border/50 hover:border-accent/30"),children:[o.jsxs("div",{className:"flex items-center",children:[o.jsxs("button",{className:"flex-1 flex items-center gap-3 px-3.5 py-2.5 text-left min-w-0",onClick:()=>N&&p(!h),style:{cursor:N?"pointer":"default"},children:[!i&&o.jsx("div",{className:"w-8 h-8 rounded-lg flex items-center justify-center text-[11px] font-black font-mono flex-shrink-0 shadow-sm",style:S,title:uc[x]??x,children:C?o.jsx("div",{className:"w-4 h-4",style:{backgroundColor:k,maskImage:\`url(\${C})\`,maskSize:"contain",maskRepeat:"no-repeat",maskPosition:"center",WebkitMaskImage:\`url(\${C})\`,WebkitMaskSize:"contain",WebkitMaskRepeat:"no-repeat",WebkitMaskPosition:"center"}}):j}),o.jsxs("div",{className:"flex-1 min-w-0 space-y-1",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[a&&o.jsx("span",{className:"inline-flex items-center rounded-md border border-accent/20 bg-accent/10 px-1.5 py-0.5 text-[9px] font-bold uppercase tracking-wider text-accent/90",children:R||a}),o.jsx("div",{className:"flex items-center gap-1.5 min-w-0",children:o.jsx(Xs,{mode:"wait",children:o.jsxs(pl.div,{initial:{opacity:0,x:-5},animate:{opacity:1,x:0},exit:{opacity:0,x:5},transition:{duration:.1},className:"flex items-center gap-1.5 min-w-0",children:[y?o.jsx(Jl,{className:"w-3 h-3 text-success/70 flex-shrink-0"}):o.jsx(Hl,{className:"w-3 h-3 text-accent/70 flex-shrink-0"}),o.jsx("span",{className:"text-[15px] font-semibold truncate text-text-primary tracking-tight leading-tight",children:o.jsx(su,{text:y?A:D,words:c})})]},y?"public":"private")})})]}),o.jsxs("div",{className:"flex items-center gap-3.5 text-[11px] text-text-secondary font-medium",children:[o.jsxs("span",{className:"flex items-center gap-1.5",children:[o.jsx(Ml,{className:"w-3 h-3 opacity-75"}),lu(e.duration_seconds)]}),o.jsxs("span",{className:"text-text-secondary/80 font-mono tracking-tight",children:[l&&\`\${new Date(e.started_at).toLocaleDateString([],{month:"short",day:"numeric"})} \xB7 \`,ou(e.started_at,e.ended_at).split(" \u2014 ")[0]]}),!y&&!E&&!s&&o.jsxs("span",{className:"flex items-center gap-1 text-text-secondary/85",title:\`Project: \${T}\`,children:[o.jsx(Vl,{className:"w-2.5 h-2.5 opacity-70"}),o.jsx("span",{className:"max-w-[130px] truncate",children:T})]}),t.length>0&&o.jsxs("span",{className:"flex items-center gap-1 text-text-secondary/85",title:\`\${t.length} milestone\${1!==t.length?"s":""}\`,children:[o.jsx(Fl,{className:"w-2.5 h-2.5 opacity-70"}),t.length]}),e.evaluation&&o.jsx(du,{score:(F=e.evaluation,(F.prompt_quality+F.context_provided+F.scope_quality+F.independence_level)/4)})]})]})]}),z&&o.jsxs("div",{className:"flex items-center px-2.5 gap-1.5 border-l border-border/30 h-9 self-center",children:[u&&o.jsx(iu,{onDelete:()=>u(e.session_id),className:"opacity-0 group-hover/card:opacity-100 focus-within:opacity-100"}),_&&o.jsx("button",{onClick:e=>{e.stopPropagation(),v(!y)},className:"p-1.5 rounded-lg transition-all "+(y?"bg-success/10 text-success":"text-text-secondary hover:text-text-primary hover:bg-bg-surface-2"),title:y?"Public title shown":"Private title shown","aria-label":y?"Show private title":"Show public title",children:y?o.jsx(_l,{className:"w-3.5 h-3.5"}):o.jsx(Al,{className:"w-3.5 h-3.5"})}),N&&o.jsx("button",{onClick:()=>p(!h),className:"p-1.5 rounded-lg transition-all "+(h?"text-accent bg-accent/8":"text-text-secondary hover:text-text-primary hover:bg-bg-surface-2"),title:h?"Collapse details":"Expand details","aria-label":h?"Collapse details":"Expand details",children:o.jsx(jl,{className:"w-4 h-4 transition-transform duration-200 "+(h?"rotate-180":"")})})]})]}),o.jsx(Xs,{children:h&&N&&o.jsx(pl.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.2},className:"overflow-hidden",children:o.jsxs("div",{className:"px-3.5 pb-3.5 pt-1.5 space-y-2",children:[o.jsx("div",{className:"h-px bg-border/20 mb-2 mx-1"}),e.evaluation&&o.jsx(hu,{evaluation:e.evaluation,showPublic:y,model:e.model,toolOverhead:e.tool_overhead}),!e.evaluation&&o.jsx(fu,{model:e.model,toolOverhead:e.tool_overhead}),t.length>0&&o.jsx("div",{className:"space-y-0.5",children:t.map(e=>{const t=y?e.title:e.private_title||e.title,n=function(e){if(!e||e<=0)return"";if(e<60)return\`\${e}m\`;const t=Math.floor(e/60),n=e%60;return n>0?\`\${t}h \${n}m\`:\`\${t}h\`}(e.duration_minutes);return o.jsxs("div",{className:"group flex items-center gap-2 p-1.5 rounded-md hover:bg-bg-surface-2/40 transition-colors",children:[o.jsx("div",{className:"w-1.5 h-1.5 rounded-full flex-shrink-0",style:{backgroundColor:pc[e.category]??"#9c9588"}}),o.jsx("div",{className:"flex-1 min-w-0",children:o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("span",{className:"text-xs font-medium text-text-secondary group-hover:text-text-primary truncate",children:o.jsx(su,{text:t,words:c})}),o.jsx(uu,{category:e.category})]})}),n&&o.jsx("span",{className:"text-[10px] text-text-muted font-mono",children:n}),d&&o.jsx(iu,{onDelete:()=>d(e.id),size:"sm",className:"opacity-0 group-hover:opacity-100"})]},e.id)})})]})})})]});var F});function mu(e){if(e<60)return\`\${e}s\`;const t=Math.round(e/60);if(t<60)return\`\${t}m\`;const n=Math.floor(t/60),r=t%60;return r>0?\`\${n}h \${r}m\`:\`\${n}h\`}function gu({score:e}){const t=e/5*100,n=e>=4?"bg-success":e>=3?"bg-accent":"bg-error",r=e>=4?"bg-success/15":e>=3?"bg-accent/15":"bg-error/15";return o.jsx("span",{className:\`w-7 h-[4px] rounded-full \${r} flex-shrink-0 overflow-hidden\`,title:\`Quality: \${e.toFixed(1)}/5\`,children:o.jsx("span",{className:\`block h-full rounded-full \${n}\`,style:{width:\`\${t}%\`}})})}var yu=f.memo(function({group:e,defaultExpanded:t,globalShowPublic:n,showFullDate:r,highlightWords:a,onDeleteSession:i,onDeleteMilestone:s,onDeleteConversation:l}){const[c,u]=f.useState(t),[d,h]=f.useState(!1),p=n||d;if(1===e.sessions.length){const l=e.sessions[0];return o.jsx(pu,{session:l.session,milestones:l.milestones,defaultExpanded:t&&l.milestones.length>0,externalShowPublic:n||void 0,showFullDate:r,highlightWords:a,onDeleteSession:i,onDeleteMilestone:s})}const m=gc(e.sessions[0].session.client),g=cc[m]??"#91919a",y="cursor"===m,v=y?"var(--text-primary)":g,x=y?{backgroundColor:"var(--bg-surface-2)",color:"var(--text-primary)",border:"1px solid var(--border)"}:{backgroundColor:\`\${g}15\`,color:g,border:\`1px solid \${g}30\`},b=dc[m]??m.slice(0,2).toUpperCase(),w=hc[m],k=e.aggregateEval,S=k?(k.prompt_quality+k.context_provided+k.scope_quality+k.independence_level)/4:0,j=e.sessions[0].session,C=j.private_title||j.title||j.project||"Conversation",N=j.title||j.project||"Conversation",T=C!==N&&!n,E=j.project?.trim()||"",M=!!E&&!["untitled","mcp","unknown","default","none","null","undefined"].includes(E.toLowerCase());return o.jsxs("div",{className:"group/conv mb-2 rounded-xl border transition-all duration-200 "+(c?"bg-bg-surface-1 border-accent/35 shadow-md":"bg-bg-surface-1/35 border-border/50 hover:border-accent/30"),children:[o.jsxs("div",{className:"flex items-center",children:[o.jsxs("button",{className:"flex-1 flex items-center gap-3 px-3.5 py-2.5 text-left min-w-0",onClick:()=>u(!c),children:[o.jsx("div",{className:"w-8 h-8 rounded-lg flex items-center justify-center text-[11px] font-black font-mono flex-shrink-0 shadow-sm",style:x,title:uc[m]??m,children:w?o.jsx("div",{className:"w-4 h-4",style:{backgroundColor:v,maskImage:\`url(\${w})\`,maskSize:"contain",maskRepeat:"no-repeat",maskPosition:"center",WebkitMaskImage:\`url(\${w})\`,WebkitMaskSize:"contain",WebkitMaskRepeat:"no-repeat",WebkitMaskPosition:"center"}}):b}),o.jsxs("div",{className:"flex-1 min-w-0 space-y-1",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("div",{className:"flex items-center gap-1.5 min-w-0",children:o.jsx(Xs,{mode:"wait",children:o.jsxs(pl.div,{initial:{opacity:0,x:-5},animate:{opacity:1,x:0},exit:{opacity:0,x:5},transition:{duration:.1},className:"flex items-center gap-1.5 min-w-0",children:[p?o.jsx(Jl,{className:"w-3 h-3 text-success/70 flex-shrink-0"}):o.jsx(Hl,{className:"w-3 h-3 text-accent/70 flex-shrink-0"}),o.jsx("span",{className:"text-[15px] font-semibold truncate text-text-primary tracking-tight leading-tight",children:o.jsx(su,{text:p?N:C,words:a})})]},p?"public":"private")})}),o.jsxs("span",{className:"text-[10px] font-bold text-accent/90 bg-accent/10 px-1.5 py-0.5 rounded border border-accent/20 flex-shrink-0",children:[e.sessions.length," prompts"]})]}),o.jsxs("div",{className:"flex items-center gap-3.5 text-[11px] text-text-secondary font-medium",children:[o.jsxs("span",{className:"flex items-center gap-1.5",children:[o.jsx(Ml,{className:"w-3 h-3 opacity-75"}),mu(e.totalDuration)]}),o.jsxs("span",{className:"text-text-secondary/80 font-mono tracking-tight",children:[r&&\`\${new Date(e.startedAt).toLocaleDateString([],{month:"short",day:"numeric"})} \xB7 \`,(P=e.startedAt,new Date(P).toLocaleTimeString([],{hour:"numeric",minute:"2-digit",hour12:!0}))]}),!p&&M&&o.jsxs("span",{className:"flex items-center gap-1 text-text-secondary/85",title:\`Project: \${E}\`,children:[o.jsx(Vl,{className:"w-2.5 h-2.5 opacity-70"}),o.jsx("span",{className:"max-w-[130px] truncate",children:E})]}),e.totalMilestones>0&&o.jsxs("span",{className:"flex items-center gap-1 text-text-secondary/85",title:\`\${e.totalMilestones} milestone\${1!==e.totalMilestones?"s":""}\`,children:[o.jsx(Fl,{className:"w-2.5 h-2.5 opacity-70"}),e.totalMilestones]}),k&&o.jsx(gu,{score:S})]})]})]}),o.jsxs("div",{className:"flex items-center px-2.5 gap-1.5 border-l border-border/30 h-9 self-center",children:[l&&e.conversationId&&o.jsx(iu,{onDelete:()=>l(e.conversationId),className:"opacity-0 group-hover/conv:opacity-100 focus-within:opacity-100"}),T&&o.jsx("button",{onClick:e=>{e.stopPropagation(),h(!d)},className:"p-1.5 rounded-lg transition-all "+(p?"bg-success/10 text-success":"text-text-secondary hover:text-text-primary hover:bg-bg-surface-2"),title:p?"Public title shown":"Private title shown","aria-label":p?"Show private title":"Show public title",children:p?o.jsx(_l,{className:"w-3.5 h-3.5"}):o.jsx(Al,{className:"w-3.5 h-3.5"})}),o.jsx("button",{onClick:()=>u(!c),className:"p-1.5 rounded-lg transition-all "+(c?"text-accent bg-accent/8":"text-text-secondary hover:text-text-primary hover:bg-bg-surface-2"),title:c?"Collapse conversation":"Expand conversation","aria-label":c?"Collapse conversation":"Expand conversation",children:o.jsx(jl,{className:"w-4 h-4 transition-transform duration-200 "+(c?"rotate-180":"")})})]})]}),o.jsx(Xs,{children:c&&o.jsx(pl.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.2},className:"overflow-hidden",children:o.jsxs("div",{className:"px-3.5 pb-2.5 relative",children:[o.jsx("div",{className:"absolute left-[1.75rem] top-0 bottom-2 w-px",style:{backgroundColor:\`\${g}25\`}}),o.jsx("div",{className:"space-y-1 pl-10",children:e.sessions.map(e=>o.jsxs("div",{className:"relative",children:[o.jsx("div",{className:"absolute -left-7 top-5 w-2 h-2 rounded-full border-2",style:{backgroundColor:g,borderColor:\`\${g}40\`}}),o.jsx(pu,{session:e.session,milestones:e.milestones,defaultExpanded:!1,externalShowPublic:p||void 0,hideClientAvatar:!0,hideProject:!0,showFullDate:r,highlightWords:a,onDeleteSession:i,onDeleteMilestone:s})]},e.session.session_id))})]})})})]});var P});function vu({sessions:e,milestones:t,filters:n,globalShowPublic:r,showFullDate:a,highlightWords:i,outsideWindowCounts:s,onNavigateNewer:l,onNavigateOlder:c,onDeleteSession:u,onDeleteConversation:d,onDeleteMilestone:h}){const p=f.useMemo(()=>e.filter(e=>("all"===n.client||e.client===n.client)&&(!("all"!==n.language&&!e.languages.includes(n.language))&&("all"===n.project||(e.project??"")===n.project))),[e,n]),m=f.useMemo(()=>"all"===n.category?t:t.filter(e=>e.category===n.category),[t,n.category]),g=f.useMemo(()=>{const e=function(e,t){const n=new Map;for(const a of t){const e=n.get(a.session_id);e?e.push(a):n.set(a.session_id,[a])}const r=e.map(e=>({session:e,milestones:n.get(e.session_id)??[]}));return r.sort((e,t)=>xc(t.session.started_at)-xc(e.session.started_at)),r}(p,m);return function(e){const t=new Map,n=[];for(const a of e){const e=a.session.conversation_id;if(e){const n=t.get(e);n?n.push(a):t.set(e,[a])}else n.push(a)}const r=[];for(const[a,i]of t){i.sort((e,t)=>(e.session.conversation_index??0)-(t.session.conversation_index??0));const e=i.reduce((e,t)=>e+t.session.duration_seconds,0),t=i.reduce((e,t)=>e+t.milestones.length,0),n=i[0].session.started_at,s=i[i.length-1].session.ended_at;r.push({conversationId:a,sessions:i,aggregateEval:wc(i),totalDuration:e,totalMilestones:t,startedAt:n,endedAt:s})}for(const a of n)r.push({conversationId:null,sessions:[a],aggregateEval:a.session.evaluation?wc([a]):null,totalDuration:a.session.duration_seconds,totalMilestones:a.milestones.length,startedAt:a.session.started_at,endedAt:a.session.ended_at});return r.sort((e,t)=>xc(t.startedAt)-xc(e.startedAt)),r}(e)},[p,m]),[y,v]=f.useState(25),x=f.useRef(null);if(f.useEffect(()=>{v(25)},[g]),f.useEffect(()=>{const e=x.current;if(!e)return;const t=new IntersectionObserver(([e])=>{e?.isIntersecting&&v(e=>e+25)},{rootMargin:"200px"});return t.observe(e),()=>t.disconnect()},[g,y]),0===g.length){const e=s&&s.before>0,t=s&&s.after>0;return o.jsxs("div",{className:"text-center text-text-muted py-8 text-sm mb-4 space-y-3",children:[t&&o.jsxs("button",{onClick:l,className:"flex flex-col items-center gap-0.5 mx-auto text-[11px] text-text-muted/60 hover:text-accent transition-colors group",children:[o.jsx(Tl,{className:"w-3.5 h-3.5"}),o.jsxs("span",{children:[s.after," newer session",1!==s.after?"s":""]}),s.newerLabel&&o.jsx("span",{className:"text-[10px] opacity-70 group-hover:opacity-100",children:s.newerLabel})]}),o.jsx("div",{children:"No sessions in this window"}),e&&o.jsxs("button",{onClick:c,className:"flex flex-col items-center gap-0.5 mx-auto text-[11px] text-text-muted/60 hover:text-accent transition-colors group",children:[s.olderLabel&&o.jsx("span",{className:"text-[10px] opacity-70 group-hover:opacity-100",children:s.olderLabel}),o.jsxs("span",{children:[s.before," older session",1!==s.before?"s":""]}),o.jsx(jl,{className:"w-3.5 h-3.5"})]})]})}const b=y<g.length,w=b?g.slice(0,y):g;return o.jsxs("div",{className:"space-y-2 mb-4",children:[s&&s.after>0&&o.jsxs("button",{onClick:l,className:"flex flex-col items-center gap-0.5 w-full text-[11px] text-text-muted/60 hover:text-accent py-1.5 transition-colors group",children:[o.jsx(Tl,{className:"w-3.5 h-3.5"}),o.jsxs("span",{children:[s.after," newer session",1!==s.after?"s":""]}),s.newerLabel&&o.jsx("span",{className:"text-[10px] opacity-70 group-hover:opacity-100",children:s.newerLabel})]}),w.map(e=>o.jsx(yu,{group:e,defaultExpanded:!1,globalShowPublic:r,showFullDate:a,highlightWords:i,onDeleteSession:u,onDeleteMilestone:h,onDeleteConversation:d},e.conversationId??e.sessions[0].session.session_id)),b&&o.jsx("div",{ref:x,className:"h-px"}),g.length>25&&o.jsxs("div",{className:"flex items-center justify-center gap-3 py-2 text-[11px] text-text-muted",children:[o.jsxs("span",{children:["Showing ",Math.min(y,g.length)," of ",g.length," conversations"]}),b&&o.jsx("button",{onClick:()=>v(g.length),className:"text-accent hover:text-accent/80 font-semibold transition-colors",children:"Show all"})]}),s&&s.before>0&&o.jsxs("button",{onClick:c,className:"flex flex-col items-center gap-0.5 w-full text-[11px] text-text-muted/60 hover:text-accent py-1.5 transition-colors group",children:[s.olderLabel&&o.jsx("span",{className:"text-[10px] opacity-70 group-hover:opacity-100",children:s.olderLabel}),o.jsxs("span",{children:[s.before," older session",1!==s.before?"s":""]}),o.jsx(jl,{className:"w-3.5 h-3.5"})]})]})}var xu={accent:{border:"border-accent/20",bg:"bg-[var(--accent-alpha)]",dot:"bg-accent"},success:{border:"border-success/20",bg:"bg-success/10",dot:"bg-success"},muted:{border:"border-border",bg:"bg-bg-surface-2/50",dot:"bg-text-muted"}};function bu({label:e,color:t="accent",dot:n=!1,icon:r,glow:a=!1,className:i="","data-testid":s}){const l=xu[t];return o.jsxs("div",{"data-testid":s,className:\`inline-flex items-center gap-2 px-3 py-1 rounded-full border \${l.border} \${l.bg} \${i}\`,style:a?{boxShadow:"0 0 10px rgba(var(--accent-rgb), 0.1)"}:void 0,children:[n&&o.jsx("span",{className:\`w-1.5 h-1.5 rounded-full \${l.dot} animate-pulse\`}),r,o.jsx("span",{className:"text-[10px] font-mono text-text-secondary tracking-widest uppercase",children:e})]})}var wu={"1h":{visibleDuration:36e5,majorTickInterval:9e5,minorTickInterval:3e5,labelFormat:e=>e.toLocaleTimeString([],{hour:"numeric",minute:"2-digit",hour12:!0})},"3h":{visibleDuration:108e5,majorTickInterval:18e5,minorTickInterval:6e5,labelFormat:e=>e.toLocaleTimeString([],{hour:"numeric",minute:"2-digit",hour12:!0})},"6h":{visibleDuration:216e5,majorTickInterval:36e5,minorTickInterval:9e5,labelFormat:e=>e.toLocaleTimeString([],{hour:"numeric",minute:"2-digit",hour12:!0})},"12h":{visibleDuration:432e5,majorTickInterval:72e5,minorTickInterval:18e5,labelFormat:e=>e.toLocaleTimeString([],{hour:"numeric",minute:"2-digit",hour12:!0})},"24h":{visibleDuration:864e5,majorTickInterval:144e5,minorTickInterval:36e5,labelFormat:e=>e.toLocaleTimeString([],{hour:"numeric",minute:"2-digit",hour12:!0})},day:{visibleDuration:864e5,majorTickInterval:144e5,minorTickInterval:36e5,labelFormat:e=>e.toLocaleTimeString([],{hour:"numeric",minute:"2-digit",hour12:!0})},"7d":{visibleDuration:6048e5,majorTickInterval:864e5,minorTickInterval:216e5,labelFormat:e=>e.toLocaleDateString([],{weekday:"short",month:"short",day:"numeric"})},week:{visibleDuration:6048e5,majorTickInterval:864e5,minorTickInterval:216e5,labelFormat:e=>e.toLocaleDateString([],{weekday:"short",month:"short",day:"numeric"})},"30d":{visibleDuration:2592e6,majorTickInterval:6048e5,minorTickInterval:864e5,labelFormat:e=>e.toLocaleDateString([],{month:"short",day:"numeric"})},month:{visibleDuration:2592e6,majorTickInterval:6048e5,minorTickInterval:864e5,labelFormat:e=>e.toLocaleDateString([],{month:"short",day:"numeric"})}};function ku(e){if(e<60)return\`\${e}s\`;const t=Math.round(e/60);if(t<60)return\`\${t}m\`;const n=Math.floor(t/60),r=t%60;return r>0?\`\${n}h \${r}m\`:\`\${n}h\`}function Su({value:e,onChange:t,scale:n,window:r,sessions:a=[],milestones:i=[],showPublic:s=!1}){const l=f.useRef(null),[c,u]=f.useState(0),d=void 0!==r;f.useEffect(()=>{if(!l.current)return;const e=new ResizeObserver(e=>{for(const t of e)u(t.contentRect.width)});return e.observe(l.current),u(l.current.getBoundingClientRect().width),()=>e.disconnect()},[]);const h=wu[n],p=d?r.end-r.start:h.visibleDuration,m=d?r.end:e,g=d?r.start:e-h.visibleDuration,y=c>0?c/p:0,[v,x]=f.useState(!1),[b,w]=f.useState(0),k=f.useRef(0),S=f.useRef(0),j=f.useRef(null);f.useEffect(()=>()=>{j.current&&clearTimeout(j.current)},[]);const C=f.useCallback(e=>{x(!0),k.current=e.clientX,S.current=0,w(0),e.currentTarget.setPointerCapture(e.pointerId)},[]),N=f.useCallback(n=>{if(!v||0===y)return;const r=n.clientX-k.current;k.current=n.clientX,S.current+=r,w(e=>e+r),j.current||(j.current=setTimeout(()=>{j.current=null;const n=S.current;S.current=0,w(0);const r=e+-n/y,a=d?Math.max(Math.min(r,m),g):Math.min(r,Date.now());t(a)},80))},[v,y,e,m,g,d,t]),T=f.useCallback(()=>{if(x(!1),j.current&&(clearTimeout(j.current),j.current=null),0!==S.current&&y>0){const n=e+-S.current/y,r=d?Math.max(Math.min(n,m),g):Math.min(n,Date.now());S.current=0,t(r)}w(0)},[e,m,g,d,y,t]),E=f.useMemo(()=>{if(!c||0===y)return[];const e=g-h.majorTickInterval,t=m+h.majorTickInterval,n=[];for(let r=Math.ceil(e/h.majorTickInterval)*h.majorTickInterval;r<=t;r+=h.majorTickInterval)n.push({type:"major",time:r,position:(r-m)*y,label:h.labelFormat(new Date(r))});for(let r=Math.ceil(e/h.minorTickInterval)*h.minorTickInterval;r<=t;r+=h.minorTickInterval)r%h.majorTickInterval!==0&&n.push({type:"minor",time:r,position:(r-m)*y});return n},[g,m,c,y,h]),M=f.useMemo(()=>a.map(e=>({session:e,start:xc(e.started_at),end:xc(e.ended_at)})),[a]),P=f.useMemo(()=>{if(!c||0===y)return[];const e=M.filter(e=>e.start<=m&&e.end>=g).map(e=>({session:e.session,leftOffset:(Math.max(e.start,g)-m)*y,width:(Math.min(e.end,m)-Math.max(e.start,g))*y}));return e.length>100?(e.sort((e,t)=>t.width-e.width),e.slice(0,100)):e},[M,g,m,c,y]),L=f.useMemo(()=>i.map(e=>({milestone:e,time:xc(e.created_at)})).sort((e,t)=>e.time-t.time),[i]),D=f.useMemo(()=>{if(!c||0===y||!L.length)return[];let e=0,t=L.length;for(;e<t;){const n=e+t>>1;L[n].time<g?e=n+1:t=n}const n=e;for(t=L.length;e<t;){const n=e+t>>1;L[n].time<=m?e=n+1:t=n}const r=e,a=[];for(let i=n;i<r;i++){const e=L[i];a.push({...e,offset:(e.time-m)*y})}return a},[L,g,m,c,y]),A=f.useMemo(()=>{if(!c||0===y)return null;const e=Date.now();return e<g||e>m?null:(e-m)*y},[g,m,c,y]),[_,z]=f.useState(null),R=f.useRef(e);return f.useEffect(()=>{_&&Math.abs(e-R.current)>1e3&&z(null),R.current=e},[e,_]),o.jsxs("div",{className:"relative h-16",children:[o.jsxs("div",{"data-testid":"time-scrubber",className:"absolute inset-0 bg-transparent border-t border-border/50 overflow-hidden select-none touch-none cursor-grab active:cursor-grabbing",ref:l,onPointerDown:C,onPointerMove:N,onPointerUp:T,style:{touchAction:"none"},children:[null!==A&&o.jsx("div",{className:"absolute top-0 bottom-0 w-[2px] bg-accent/50 z-30",style:{right:-A}}),null!==A&&A<-1&&o.jsx("div",{className:"absolute top-0 bottom-0 bg-bg-base/30 z-20",style:{right:0,width:-A}}),o.jsxs("div",{className:"absolute right-0 top-0 bottom-0 w-0 pointer-events-none",style:b?{transform:\`translateX(\${b}px)\`,willChange:"transform"}:void 0,children:[E.map(e=>o.jsx("div",{className:"absolute top-0 border-l "+("major"===e.type?"border-border/60":"border-border/30"),style:{left:e.position,height:"major"===e.type?"100%":"35%",bottom:0},children:"major"===e.type&&e.label&&o.jsx("span",{className:"absolute top-2 left-2 text-[9px] font-bold text-text-muted uppercase tracking-wider whitespace-nowrap bg-bg-surface-1/80 px-1 py-0.5 rounded",children:e.label})},e.time)),P.map(e=>o.jsx("div",{className:"absolute bottom-0 rounded-t-md pointer-events-auto cursor-pointer hover:opacity-80",style:{left:e.leftOffset,width:Math.max(e.width,3),height:"45%",backgroundColor:"rgba(var(--accent-rgb), 0.15)",borderTop:"2px solid rgba(var(--accent-rgb), 0.5)",boxShadow:"inset 0 1px 10px rgba(var(--accent-rgb), 0.05)"},onMouseEnter:t=>{const n=t.currentTarget.getBoundingClientRect();z({type:"session",data:e.session,x:n.left+n.width/2,y:n.top})},onMouseLeave:()=>z(null)},e.session.session_id)),D.map((e,n)=>o.jsx("div",{className:"absolute bottom-2 pointer-events-auto cursor-pointer z-40 transition-transform hover:scale-125",style:{left:e.offset,transform:"translateX(-50%)"},onMouseEnter:t=>{const n=t.currentTarget.getBoundingClientRect();z({type:"milestone",data:e.milestone,x:n.left+n.width/2,y:n.top})},onMouseLeave:()=>z(null),onClick:n=>{n.stopPropagation(),t(e.time)},children:o.jsx("div",{className:"w-3.5 h-3.5 rounded-full border-2 border-bg-surface-1 shadow-lg",style:{backgroundColor:pc[e.milestone.category]??"#9c9588",boxShadow:\`0 0 10px \${pc[e.milestone.category]}50\`}})},n))]})]}),_&&yc.createPortal(o.jsx("div",{className:"fixed z-[9999] pointer-events-none",style:{left:_.x,top:_.y,transform:"translate(-50%, -100%)"},children:o.jsxs("div",{className:"mb-3 bg-bg-surface-3/95 backdrop-blur-md text-text-primary rounded-xl shadow-2xl px-3 py-2.5 text-[11px] min-w-[180px] max-w-[280px] border border-border/50 animate-in fade-in zoom-in-95 duration-200",children:["session"===_.type?o.jsx(ju,{session:_.data,showPublic:s}):o.jsx(Cu,{milestone:_.data,showPublic:s}),o.jsx("div",{className:"absolute -bottom-1.5 left-1/2 -translate-x-1/2 w-3 h-3 bg-bg-surface-3/95 border-r border-b border-border/50 rotate-45"})]})}),document.body)]})}function ju({session:e,showPublic:t}){const n=uc[e.client]??e.client,r=t?e.title||e.project||\`\${n} Session\`:e.private_title||e.title||e.project||\`\${n} Session\`;return o.jsxs("div",{className:"flex flex-col gap-1",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx("span",{className:"font-bold text-xs text-accent uppercase tracking-widest",children:n}),o.jsx("span",{className:"text-[10px] text-text-muted font-mono",children:ku(e.duration_seconds)})]}),o.jsx("div",{className:"h-px bg-border/50 my-0.5"}),o.jsx("div",{className:"text-text-primary font-medium",children:r}),o.jsx("div",{className:"text-text-secondary capitalize text-[10px]",children:e.task_type})]})}function Cu({milestone:e,showPublic:t}){const n=t?e.title:e.private_title??e.title;return o.jsxs("div",{className:"flex flex-col gap-1",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx("span",{className:"font-bold text-[10px] uppercase tracking-widest",style:{color:pc[e.category]??"#9c9588"},children:e.category}),e.complexity&&o.jsx("span",{className:"text-[9px] font-mono text-text-muted font-bold border border-border/50 px-1 rounded uppercase",children:e.complexity})]}),o.jsx("div",{className:"h-px bg-border/50 my-0.5"}),o.jsx("div",{className:"font-bold text-xs break-words text-text-primary",children:n}),!t&&e.private_title&&o.jsxs("div",{className:"text-[10px] text-text-muted italic opacity-70",children:["Public: ",e.title]})]})}function Nu(e,t){const n=e.trim();if(!n)return null;const r=new Date(t),a=n.match(/^(\\d{1,2}):(\\d{2})(?::(\\d{2}))?\\s*(AM|PM)$/i);if(a){let e=parseInt(a[1],10);const t=parseInt(a[2],10),n=a[3]?parseInt(a[3],10):0,i=a[4].toUpperCase();return e<1||e>12||t>59||n>59?null:("AM"===i&&12===e&&(e=0),"PM"===i&&12!==e&&(e+=12),r.setHours(e,t,n,0),r.getTime())}const i=n.match(/^(\\d{1,2}):(\\d{2})(?::(\\d{2}))?$/);if(i){const e=parseInt(i[1],10),t=parseInt(i[2],10),n=i[3]?parseInt(i[3],10):0;return e>23||t>59||n>59?null:(r.setHours(e,t,n,0),r.getTime())}return null}function Tu({value:e,onChange:t,scale:n,onScaleChange:r,sessions:a,showPublic:i=!1}){const s=null===e,l=Pc(n),[c,u]=f.useState(Date.now());f.useEffect(()=>{if(!s)return;const e=setInterval(()=>u(Date.now()),1e3);return()=>clearInterval(e)},[s]);const d=s?c:e,h=Ac(n,d),p=f.useMemo(()=>{const{start:e,end:t}=h,n=e=>new Date(e).toLocaleTimeString([],{hour:"numeric",minute:"2-digit",hour12:!0}),r=e=>new Date(e).toLocaleDateString([],{weekday:"short",month:"short",day:"numeric"}),a=new Date(e).toDateString()===new Date(t-1).toDateString();return s?a?\`\${n(e)} \u2013 Now\`:\`\${r(e)}, \${n(e)} \u2013 Now\`:a?\`\${n(e)} \u2013 \${n(t)}\`:\`\${r(e)}, \${n(e)} \u2013 \${r(t)}, \${n(t)}\`},[h,s]),[m,g]=f.useState(!1),[y,v]=f.useState(""),x=f.useRef(null),b=f.useRef(!1),w=f.useRef(""),k=f.useRef(!1),S=f.useRef(0),j=f.useCallback(e=>{if(l){if(e>=Date.now()-2e3)return void t(null);const a=Ec[n];return a&&r(a),void t(e)}const a=Date.now();if(e>=a-2e3)return k.current=!0,S.current=a,void t(null);k.current&&a-S.current<300||k.current&&e>=a-1e4&&e<=a+2e3?t(null):(k.current=!1,t(e))},[t,r,l,n]),C=e=>{const r=_c(n,d,e);zc(n,r)?t(null):t(r)},N=()=>{b.current=s,t(d);const e=new Date(d).toLocaleTimeString([],{hour12:!0,hour:"2-digit",minute:"2-digit",second:"2-digit"});w.current=e,v(e),g(!0),requestAnimationFrame(()=>x.current?.select())},T=()=>{if(g(!1),b.current&&y===w.current)return void t(null);const e=Nu(y,d);null!==e&&t(Math.min(e,Date.now()))},E=e=>{if(l){const t=-1===e?"Previous":"Next";return"day"===n?\`\${t} Day\`:"week"===n?\`\${t} Week\`:\`\${t} Month\`}return\`\${-1===e?"Back":"Forward"} \${Dc[n].toLowerCase()}\`};return o.jsxs("div",{"data-testid":"time-travel-panel",className:"flex flex-col bg-bg-surface-1 border border-border/50 rounded-2xl overflow-hidden mb-8 shadow-sm",children:[o.jsxs("div",{className:"flex flex-col md:flex-row md:items-center justify-between px-6 py-3 border-b border-border/50 gap-4",children:[o.jsxs("div",{className:"flex flex-col items-start gap-0.5",children:[o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsxs("div",{className:"flex items-center gap-2 h-8",children:[m?o.jsx("input",{ref:x,type:"text",value:y,onChange:e=>v(e.target.value),onBlur:T,onKeyDown:e=>{if("Enter"===e.key)return void T();if("Escape"===e.key)return e.preventDefault(),g(!1),void(b.current&&t(null));if("ArrowUp"!==e.key&&"ArrowDown"!==e.key)return;e.preventDefault();const n=x.current;if(!n)return;const r=n.selectionStart??0,a="ArrowUp"===e.key?1:-1,i=Nu(y,d);if(null===i)return;const s=y.indexOf(":"),o=y.indexOf(":",s+1),l=y.lastIndexOf(" ");let c;c=r<=s?36e5*a:o>-1&&r<=o?6e4*a:l>-1&&r<=l?1e3*a:12*a*36e5;const u=Math.min(i+c,Date.now()),f=new Date(u).toLocaleTimeString([],{hour12:!0,hour:"2-digit",minute:"2-digit",second:"2-digit"});v(f),t(u),requestAnimationFrame(()=>{n&&n.setSelectionRange(r,r)})},className:"text-xl font-mono font-bold tracking-tight bg-bg-surface-2 border rounded-lg px-2 -ml-2 w-[155px] outline-none text-text-primary "+(s?"border-accent":"border-history"),style:{boxShadow:s?"0 0 10px rgba(var(--accent-rgb), 0.2)":"0 0 10px rgba(var(--history-rgb), 0.2)"}}):o.jsxs("button",{onClick:N,className:"group flex items-center gap-2 hover:bg-bg-surface-2/50 rounded-lg px-2 -ml-2 py-1 transition-all cursor-text",title:"Click to edit time",children:[o.jsx(Ml,{className:"w-5 h-5 "+(s?"text-text-muted":"text-history")}),o.jsx("span",{"data-testid":"time-display",className:"text-xl font-mono font-bold tracking-tight tabular-nums "+(s?"text-text-primary":"text-history"),children:new Date(d).toLocaleTimeString([],{hour12:!0,hour:"2-digit",minute:"2-digit",second:"2-digit"})})]}),o.jsx("button",{onClick:m?T:N,className:"p-1.5 rounded-lg transition-colors flex-shrink-0 "+(m?s?"bg-accent text-bg-base hover:bg-accent-bright":"bg-history text-white hover:brightness-110":"text-text-muted hover:text-text-primary hover:bg-bg-surface-2"),title:m?"Confirm time":"Edit time",children:o.jsx(Yl,{className:"w-3.5 h-3.5"})})]}),s?o.jsx(bu,{label:"Live",color:"success",dot:!0,glow:!0,"data-testid":"live-badge"}):o.jsxs(o.Fragment,{children:[o.jsx(bu,{label:"History",color:"muted","data-testid":"history-badge"}),o.jsxs("button",{"data-testid":"go-live-button",onClick:()=>t(null),className:"group flex items-center gap-1.5 px-3 py-1.5 text-[10px] font-bold uppercase tracking-widest bg-history/10 hover:bg-history text-history hover:text-white rounded-xl transition-all border border-history/20",children:[o.jsx(Gl,{className:"w-3 h-3 group-hover:-rotate-90 transition-transform duration-500"}),"Live"]})]})]}),o.jsxs("div",{className:"flex items-center gap-2 text-sm text-text-secondary font-medium px-0.5",children:[o.jsx(kl,{className:"w-3.5 h-3.5 text-text-muted"}),o.jsx("span",{"data-testid":"date-display",children:new Date(d).toLocaleDateString([],{weekday:"short",month:"long",day:"numeric",year:"numeric"})}),o.jsx("span",{className:"text-text-muted",children:"\xB7"}),o.jsx("span",{"data-testid":"period-label",className:"text-text-muted text-xs tabular-nums",children:p})]})]}),o.jsxs("div",{className:"flex flex-col sm:flex-row items-center gap-4",children:[o.jsxs("div",{className:"flex items-center bg-bg-surface-2/50 border border-border/50 rounded-xl p-1 shadow-inner",children:[Cc.map(e=>o.jsx("button",{"data-testid":\`scale-\${e}\`,onClick:()=>r(e),className:"px-3 py-1.5 text-[10px] font-bold uppercase tracking-wider rounded-lg transition-all "+(n===e?"bg-bg-surface-3 text-text-primary shadow-sm":"text-text-muted hover:text-text-primary hover:bg-bg-surface-2"),title:Dc[e],children:e},e)),o.jsx("div",{className:"w-px h-5 bg-border/50 mx-1"}),Nc.map(e=>{const t=n===e||Mc[n]===e;return o.jsx("button",{"data-testid":\`scale-\${e}\`,onClick:()=>r(e),className:"px-3 py-1.5 text-[10px] font-bold uppercase tracking-wider rounded-lg transition-all "+(t?"bg-bg-surface-3 text-text-primary shadow-sm":"text-text-muted hover:text-text-primary hover:bg-bg-surface-2"),title:Dc[e],children:e},e)})]}),o.jsx("div",{className:"flex items-center gap-2",children:o.jsxs("div",{className:"flex items-center gap-1 bg-bg-surface-2/50 border border-border/50 rounded-xl p-1",children:[o.jsx("button",{onClick:()=>C(-1),className:"p-2 text-text-muted hover:text-text-primary hover:bg-bg-surface-2 rounded-lg transition-colors",title:E(-1),children:o.jsx(Cl,{className:"w-4 h-4"})}),o.jsx("button",{onClick:()=>C(1),className:"p-2 text-text-muted hover:text-text-primary hover:bg-bg-surface-2 rounded-lg transition-colors disabled:opacity-20 disabled:cursor-not-allowed",title:E(1),disabled:s||d>=Date.now()-1e3,children:o.jsx(Nl,{className:"w-4 h-4"})})]})})]})]}),o.jsx(Su,{value:d,onChange:j,scale:n,window:l?h:void 0,sessions:a,milestones:void 0,showPublic:i})]})}function Eu({children:e}){return o.jsx("span",{className:"text-text-primary font-medium",children:e})}function Mu(e){return e.reduce((e,t)=>e+t.duration_seconds,0)/3600}function Pu(e,t){const n=e.filter(e=>null!=e.evaluation);if(n.length<2)return null;return n.reduce((e,n)=>e+n.evaluation[t],0)/n.length}function Lu(e,t,n,r,a,i){var s;const l=[],c=a-(i-a),u=a,d=function(e,t,n){return e.filter(e=>{const r=new Date(e.started_at).getTime();return r>=t&&r<=n})}(n,c,u),f=function(e,t,n){return e.filter(e=>{const r=new Date(e.created_at).getTime();return r>=t&&r<=n})}(r,c,u),h=Mu(e),p=Mu(d),m=Pu(e,"prompt_quality"),g=Pu(d,"prompt_quality");if(null!==m&&null!==g&&m>g+.3&&l.push({priority:10,node:o.jsxs("span",{children:["Your prompt quality improved from ",o.jsx(Eu,{children:g.toFixed(1)})," to"," ",o.jsx(Eu,{children:m.toFixed(1)})," \u2014 clearer prompts mean faster results."]})}),d.length>0&&e.length>0){const e=t.length/Math.max(h,.1),n=f.length/Math.max(p,.1);e>1.2*n&&t.length>=2&&l.push({priority:9,node:o.jsxs("span",{children:["You're shipping ",o.jsxs(Eu,{children:[Math.round(100*(e/n-1)),"% faster"]})," ","this period \u2014 great momentum."]})})}const y=t.filter(e=>"complex"===e.complexity).length,v=f.filter(e=>"complex"===e.complexity).length;y>v&&y>=2&&l.push({priority:8,node:o.jsxs("span",{children:[o.jsx(Eu,{children:y})," complex ",1===y?"task":"tasks"," this period vs"," ",o.jsx(Eu,{children:v})," before \u2014 you're taking on harder problems."]})});const x=e.filter(e=>null!=e.evaluation),b=x.filter(e=>"completed"===e.evaluation.task_outcome&&e.evaluation.iteration_count<=3);if(x.length>=3&&b.length>0){const e=Math.round(b.length/x.length*100);e>=50&&l.push({priority:7,node:o.jsxs("span",{children:[o.jsxs(Eu,{children:[e,"%"]})," of your sessions completed in 3 or fewer turns \u2014 efficient prompting."]})})}const w=function(e){if(0===e.length)return null;const t={};for(const a of e){const e=a.task_type||"coding";t[e]=(t[e]??0)+a.duration_seconds}const n=e.reduce((e,t)=>e+t.duration_seconds,0),r=Object.entries(t).sort((e,t)=>t[1]-e[1])[0];return r&&0!==n?{type:r[0],pct:Math.round(r[1]/n*100)}:null}(e);if(w&&w.pct>=60&&e.length>=2){const e={coding:"building",debugging:"debugging",testing:"testing",planning:"planning",reviewing:"reviewing",documenting:"documenting",refactoring:"refactoring",research:"researching",analysis:"analyzing"}[w.type]??w.type;l.push({priority:6,node:o.jsxs("span",{children:["Deep focus: ",o.jsxs(Eu,{children:[w.pct,"%"]})," of your time spent ",e,"."]})})}const k={};for(const o of e)o.client&&(k[s=o.client]??(k[s]=[])).push(o);const S=Object.entries(k).filter(([,e])=>e.length>=2);if(S.length>=2){const e=S.map(([e,n])=>{const r=Mu(n),a=new Set(n.map(e=>e.session_id)),i=t.filter(e=>a.has(e.session_id));return{name:e,rate:i.length/Math.max(r,.1),count:i.length}}).filter(e=>e.count>0);if(e.length>=2){e.sort((e,t)=>t.rate-e.rate);const t=e[0],n=uc[t.name]??t.name;l.push({priority:5,node:o.jsxs("span",{children:[o.jsx(Eu,{children:n})," is your most productive tool this period \u2014 ",t.count," ",1===t.count?"milestone":"milestones"," shipped."]})})}}const j=Pu(e,"context_provided");if(null!==j&&j<3.5&&l.push({priority:4,node:o.jsxs("span",{children:["Tip: Your context score averages ",o.jsxs(Eu,{children:[j.toFixed(1),"/5"]})," \u2014 try including specific files and error messages for faster results."]})}),x.length>=3){const e=x.filter(e=>"completed"===e.evaluation.task_outcome).length,t=Math.round(e/x.length*100);100===t?l.push({priority:3,node:o.jsxs("span",{children:[o.jsx(Eu,{children:"100%"})," completion rate \u2014 every task landed."]})}):t<70&&l.push({priority:4,node:o.jsxs("span",{children:[o.jsxs(Eu,{children:[t,"%"]})," completion rate \u2014 try breaking tasks into smaller, well-scoped pieces."]})})}return p>0&&h>1.5*p&&h>=1&&l.push({priority:2,node:o.jsxs("span",{children:[o.jsxs(Eu,{children:[Math.round(100*(h/p-1)),"% more"]})," AI-paired time this period \u2014 you're leaning in."]})}),0===e.length&&l.push({priority:1,node:o.jsx("span",{className:"text-text-muted",children:"No sessions in this window. Start coding with AI to see insights here."})}),l.sort((e,t)=>t.priority-e.priority)}function Du({sessions:e,milestones:t,windowStart:n,windowEnd:r,allSessions:a,allMilestones:i}){const s=f.useMemo(()=>{const s=Lu(e,t,a??e,i??t,n,r);return s[0]?.node??null},[e,t,a,i,n,r]);return s?o.jsx(pl.div,{initial:{opacity:0},animate:{opacity:1},className:"rounded-xl bg-bg-surface-1 border border-border/50 px-4 py-3",children:o.jsxs("div",{className:"flex items-start gap-3",children:[o.jsx(ec,{className:"w-4 h-4 text-accent flex-shrink-0 mt-0.5"}),o.jsx("p",{className:"text-sm text-text-secondary leading-relaxed",children:s})]})}):null}function Au({sessions:e}){const{scores:t,summaryLine:n}=f.useMemo(()=>{const t=e.filter(e=>null!=e.evaluation);if(0===t.length)return{scores:null,summaryLine:null};let n=0,r=0,a=0,i=0,s=0,o=0;for(const e of t){const t=e.evaluation;n+=t.prompt_quality,r+=t.context_provided,a+=t.independence_level,i+=t.scope_quality,o+=t.iteration_count,"completed"===t.task_outcome&&s++}const l=t.length,c=Math.round(s/l*100);return{scores:[{label:"Prompt Quality",value:n/l,max:5},{label:"Context",value:r/l,max:5},{label:"Independence",value:a/l,max:5},{label:"Scope",value:i/l,max:5},{label:"Completion",value:c/20,max:5}],summaryLine:\`\${l} session\${1===l?"":"s"} evaluated \xB7 \${c}% completed \xB7 avg \${(o/l).toFixed(1)} iterations\`}},[e]);return o.jsxs(pl.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.1},className:"rounded-xl bg-bg-surface-1 border border-border/50 p-4",children:[o.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[o.jsx("div",{className:"p-1.5 rounded-lg bg-bg-surface-2",children:o.jsx(tc,{className:"w-3.5 h-3.5 text-text-muted"})}),o.jsx("h2",{className:"text-sm font-bold text-text-muted uppercase tracking-widest",children:"AI Proficiency"})]}),null===t?o.jsx("p",{className:"text-xs text-text-muted py-2",children:"No evaluation data yet"}):o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"space-y-3",children:t.map((e,t)=>{const n=e.value/e.max*100,r="Completion"===e.label?\`\${Math.round(n)}%\`:e.value.toFixed(1);return o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("span",{className:"text-xs text-text-secondary font-medium w-28 text-right shrink-0",children:e.label}),o.jsx("div",{className:"flex-1 h-1.5 rounded-full bg-bg-surface-2/50 overflow-hidden",children:o.jsx(pl.div,{className:"h-full rounded-full",style:{backgroundColor:(a=e.value,a>=4?"var(--color-accent)":a>=3?"var(--color-success)":"var(--color-text-muted)")},initial:{width:0},animate:{width:\`\${n}%\`},transition:{duration:.6,delay:.05*t,ease:[.22,1,.36,1]}})}),o.jsx("span",{className:"text-xs text-text-muted font-mono w-10 text-right shrink-0",children:r})]},e.label);var a})}),o.jsx("p",{className:"text-[10px] text-text-muted mt-4 px-1 font-mono",children:n})]})]})}var _u=["Output","Efficiency","Prompts","Consistency","Breadth"];function zu(e,t,n,r,a){const i=2*Math.PI*e/5-Math.PI/2;return[n+a*t*Math.cos(i),r+a*t*Math.sin(i)]}function Ru(e,t,n,r){const a=[];for(let i=0;i<5;i++){const[s,o]=zu(i,e,t,n,r);a.push(\`\${s},\${o}\`)}return a.join(" ")}function Fu({sessions:e,milestones:t,streak:n}){const{values:r,hasEvalData:a}=f.useMemo(()=>{const r={simple:1,medium:2,complex:4};let a=0;for(const e of t)a+=r[e.complexity]??1;const i=Math.min(1,a/10),s=e.reduce((e,t)=>e+t.files_touched,0),o=e.reduce((e,t)=>e+t.duration_seconds,0)/3600,l=Math.min(1,s/Math.max(o,1)/20),c=e.filter(e=>null!=e.evaluation);let u=0;const d=c.length>0;if(d){u=c.reduce((e,t)=>e+t.evaluation.prompt_quality,0)/c.length/5}const f=Math.min(1,n/14),h=new Set;for(const t of e)for(const e of t.languages)h.add(e);return{values:[i,l,u,f,Math.min(1,h.size/5)],hasEvalData:d}},[e,t,n]),i=100,s=100,l=[];for(let o=0;o<5;o++){const e=Math.max(r[o],.02),[t,n]=zu(o,e,i,s,70);l.push(\`\${t},\${n}\`)}const c=l.join(" ");return o.jsxs(pl.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.15},className:"rounded-xl bg-bg-surface-1 border border-border/50 p-4",children:[o.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[o.jsx("div",{className:"p-1.5 rounded-lg bg-bg-surface-2",children:o.jsx(bl,{className:"w-3.5 h-3.5 text-text-muted"})}),o.jsx("h2",{className:"text-sm font-bold text-text-muted uppercase tracking-widest",children:"Skill Profile"})]}),o.jsx("div",{className:"flex justify-center",children:o.jsxs("svg",{viewBox:"0 0 200 200",width:200,height:200,className:"overflow-visible",children:[[.33,.66,1].map(e=>o.jsx("polygon",{points:Ru(e,i,s,70),fill:"none",stroke:"var(--color-bg-surface-3)",strokeWidth:.5,opacity:.6},e)),Array.from({length:5}).map((e,t)=>{const[n,r]=zu(t,1,i,s,70);return o.jsx("line",{x1:i,y1:s,x2:n,y2:r,stroke:"var(--color-bg-surface-3)",strokeWidth:.5,opacity:.4},\`axis-\${t}\`)}),o.jsx(pl.polygon,{points:c,fill:"var(--color-accent)",fillOpacity:.2,stroke:"var(--color-accent)",strokeWidth:1.5,strokeLinejoin:"round",initial:{opacity:0,scale:.5},animate:{opacity:1,scale:1},transition:{duration:.6,ease:[.22,1,.36,1]},style:{transformOrigin:"100px 100px"}}),r.map((e,t)=>{const n=Math.max(e,.02),[r,l]=zu(t,n,i,s,70),c=2===t&&!a;return o.jsx("circle",{cx:r,cy:l,r:2.5,fill:c?"var(--color-text-muted)":"var(--color-accent-bright)",opacity:c?.4:1},\`point-\${t}\`)}),_u.map((e,t)=>{const n=function(e,t,n,r){const[a,i]=zu(e,1.28,t,n,r);let s="middle";return 1!==e&&2!==e||(s="start"),3!==e&&4!==e||(s="end"),{x:a,y:i,anchor:s}}(t,i,s,70),r=2===t&&!a;return o.jsx("text",{x:n.x,y:n.y,textAnchor:n.anchor,dominantBaseline:"central",className:"text-[9px] font-medium",fill:r?"var(--color-text-muted)":"var(--color-text-secondary)",opacity:r?.5:1,children:e},e)})]})}),o.jsx("div",{className:"flex justify-center gap-3 mt-2 flex-wrap",children:_u.map((e,t)=>{const n=2===t&&!a,i=Math.round(100*r[t]);return o.jsxs("span",{className:"text-[10px] font-mono "+(n?"text-text-muted/50":"text-text-muted"),children:[i,"%"]},e)})})]})}function Vu({evaluation:e}){const t=function(e){const t=[];return e.prompt_quality<4&&t.push({metric:"Prompt Quality",score:e.prompt_quality,priority:.3*(4-e.prompt_quality),message:e.prompt_quality<3?\`Your prompt_quality score averages \${e.prompt_quality.toFixed(1)}. Try including acceptance criteria and specific expected behavior in your prompts.\`:\`Your prompt_quality score averages \${e.prompt_quality.toFixed(1)}. Adding edge cases and constraints to your prompts could push this higher.\`}),e.context_provided<4&&t.push({metric:"Context",score:e.context_provided,priority:.25*(4-e.context_provided),message:e.context_provided<3?\`Try providing more file context -- your context_provided score averages \${e.context_provided.toFixed(1)}. Share relevant files, error logs, and constraints upfront.\`:\`Your context_provided score averages \${e.context_provided.toFixed(1)}. Including related config files or architecture notes could help.\`}),e.scope_quality<4&&t.push({metric:"Scope",score:e.scope_quality,priority:.2*(4-e.scope_quality),message:e.scope_quality<3?\`Your scope_quality averages \${e.scope_quality.toFixed(1)}. Try breaking large tasks into focused, well-defined subtasks before starting.\`:\`Your scope_quality averages \${e.scope_quality.toFixed(1)}. Defining clear boundaries for what is in and out of scope could improve efficiency.\`}),e.independence_level<4&&t.push({metric:"Independence",score:e.independence_level,priority:.25*(4-e.independence_level),message:e.independence_level<3?\`Your independence_level averages \${e.independence_level.toFixed(1)}. Providing a clear spec with decisions made upfront can reduce back-and-forth.\`:\`Your independence_level averages \${e.independence_level.toFixed(1)}. Pre-deciding ambiguous choices in your prompt can help the AI execute autonomously.\`}),t.sort((e,t)=>t.priority-e.priority),t.slice(0,3)}(e);return 0===t.length?o.jsxs(pl.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.2},className:"rounded-xl bg-bg-surface-1 border border-border/50 p-4",children:[o.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[o.jsx("div",{className:"p-1.5 rounded-lg bg-success/10",children:o.jsx(Il,{className:"w-3.5 h-3.5 text-success"})}),o.jsx("h2",{className:"text-sm font-bold text-text-muted uppercase tracking-widest",children:"Tips"})]}),o.jsx("p",{className:"text-xs text-success",children:"All evaluation scores are 4+ -- great work! Keep it up."})]}):o.jsxs(pl.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.2},className:"rounded-xl bg-bg-surface-1 border border-border/50 p-4",children:[o.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[o.jsx("div",{className:"p-1.5 rounded-lg bg-bg-surface-2",children:o.jsx(Il,{className:"w-3.5 h-3.5 text-accent"})}),o.jsx("h2",{className:"text-sm font-bold text-text-muted uppercase tracking-widest",children:"Improvement Tips"})]}),o.jsx("ul",{className:"space-y-3",children:t.map((e,t)=>{return o.jsxs(pl.li,{initial:{opacity:0,x:-8},animate:{opacity:1,x:0},transition:{delay:.25+.08*t},className:"flex gap-3",children:[o.jsxs("div",{className:"flex flex-col items-center shrink-0 mt-0.5",children:[o.jsx("span",{className:"text-xs font-mono font-bold "+(n=e.score,n>=4?"text-success":n>=3?"text-accent":"text-warning"),children:e.score.toFixed(1)}),o.jsx("span",{className:"text-[8px] text-text-muted font-mono uppercase",children:"/5"})]}),o.jsxs("div",{className:"min-w-0",children:[o.jsx("span",{className:"text-[10px] font-mono text-text-muted uppercase tracking-wider",children:e.metric}),o.jsx("p",{className:"text-xs text-text-secondary leading-relaxed mt-0.5",children:e.message})]})]},e.metric);var n})})]})}var Ou={coding:"#b4f82c",debugging:"#f87171",testing:"#60a5fa",planning:"#a78bfa",reviewing:"#34d399",documenting:"#fbbf24",learning:"#f472b6",deployment:"#fb923c",devops:"#e879f9",research:"#22d3ee",migration:"#facc15",design:"#c084fc",data:"#2dd4bf",security:"#f43f5e",configuration:"#a3e635",other:"#94a3b8"};function Iu(e){if(e<60)return"<1m";const t=Math.round(e/60);if(t<60)return\`\${t}m\`;return\`\${(e/3600).toFixed(1)}h\`}function $u({byTaskType:e}){const t=Object.entries(e).filter(([,e])=>e>0).sort((e,t)=>t[1]-e[1]);if(0===t.length)return null;const n=t[0][1];return o.jsxs("div",{className:"rounded-xl bg-bg-surface-1 border border-border/50 p-4 mb-8",children:[o.jsx("h2",{className:"text-sm font-bold text-text-muted uppercase tracking-widest mb-4 px-1",children:"Task Types"}),o.jsx("div",{className:"space-y-2.5",children:t.map(([e,t],r)=>{const a=Ou[e]??Ou.other,i=t/n*100;return o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("span",{className:"text-xs text-text-secondary font-medium w-24 text-right shrink-0",children:(s=e,s.charAt(0).toUpperCase()+s.slice(1))}),o.jsx("div",{className:"flex-1 h-5 rounded bg-bg-surface-2/50 overflow-hidden",children:o.jsx(pl.div,{className:"h-full rounded",style:{backgroundColor:a},initial:{width:0},animate:{width:\`\${i}%\`},transition:{duration:.6,delay:.05*r,ease:[.22,1,.36,1]}})}),o.jsx("span",{className:"text-xs text-text-muted font-mono w-12 text-right shrink-0",children:Iu(t)})]},e);var s})})]})}var Bu={feature:"bg-success/10 text-success border-success/20",bugfix:"bg-error/10 text-error border-error/20",refactor:"bg-purple/10 text-purple border-purple/20",test:"bg-blue/10 text-blue border-blue/20",docs:"bg-accent/10 text-accent border-accent/20",setup:"bg-text-muted/10 text-text-muted border-text-muted/20",deployment:"bg-emerald/10 text-emerald border-emerald/20"};function Hu(e){const t=Date.now()-new Date(e).getTime(),n=Math.floor(t/6e4);if(n<1)return"just now";if(n<60)return\`\${n}m ago\`;const r=Math.floor(n/60);if(r<24)return\`\${r}h ago\`;const a=Math.floor(r/24);return 1===a?"yesterday":a<7?\`\${a}d ago\`:new Date(e).toLocaleDateString([],{month:"short",day:"numeric"})}function Uu({milestones:e,showPublic:t=!1}){const n=[...e].sort((e,t)=>new Date(t.created_at).getTime()-new Date(e.created_at).getTime()).slice(0,8);return o.jsxs(pl.div,{initial:{opacity:0,y:12},animate:{opacity:1,y:0},transition:{duration:.35,ease:[.22,1,.36,1]},className:"rounded-xl bg-bg-surface-1 border border-border/50 p-4",children:[o.jsxs("div",{className:"flex items-center gap-2 mb-3 px-1",children:[o.jsx(ac,{className:"w-4 h-4 text-accent"}),o.jsx("h2",{className:"text-sm font-bold text-text-muted uppercase tracking-widest",children:"Recent Achievements"}),o.jsxs("span",{className:"text-[10px] text-text-muted font-mono bg-bg-surface-2 px-2 py-0.5 rounded ml-auto",children:[e.length," total"]})]}),0===n.length?o.jsx("div",{className:"text-sm text-text-muted text-center py-6",children:"No milestones yet \u2014 complete your first session!"}):o.jsx("div",{className:"space-y-0.5",children:n.map((e,n)=>{const r=pc[e.category]??"#9c9588",a=Bu[e.category]??"bg-bg-surface-2 text-text-secondary border-border",i=dc[e.client]??e.client.slice(0,2).toUpperCase(),s=cc[e.client]??"#91919a",l=t?e.title:e.private_title||e.title,c="complex"===e.complexity;return o.jsxs(pl.div,{initial:{opacity:0,x:-8},animate:{opacity:1,x:0},transition:{duration:.25,delay:.04*n},className:"flex items-center gap-3 py-2 px-2 rounded-lg hover:bg-bg-surface-2/40 transition-colors",children:[o.jsx("div",{className:"w-2 h-2 rounded-full flex-shrink-0",style:{backgroundColor:r}}),o.jsx("span",{className:"text-sm font-medium text-text-secondary hover:text-text-primary truncate flex-1 min-w-0",children:l}),o.jsx("span",{className:\`text-[9px] uppercase tracking-wider font-bold px-1.5 py-0.5 rounded-full border flex-shrink-0 \${a}\`,children:e.category}),c&&o.jsxs("span",{className:"flex items-center gap-0.5 text-[9px] uppercase tracking-wider font-bold px-1.5 py-0.5 rounded-full border bg-purple/10 text-purple border-purple/20 flex-shrink-0",children:[o.jsx(bl,{className:"w-2.5 h-2.5"}),"complex"]}),o.jsx("span",{className:"text-[10px] text-text-muted font-mono flex-shrink-0",children:Hu(e.created_at)}),o.jsx("div",{className:"w-5 h-5 rounded flex items-center justify-center text-[8px] font-bold font-mono flex-shrink-0",style:{backgroundColor:\`\${s}15\`,color:s,border:\`1px solid \${s}20\`},children:i})]},e.id)})})]})}function Wu(e){const t=e/3600;return t<1?\`\${Math.round(60*t)}m\`:\`\${t.toFixed(1)}h\`}function qu(e,t){return Object.entries(e).sort((e,t)=>t[1]-e[1]).slice(0,t)}function Yu({label:e,children:t}){return o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("span",{className:"text-[10px] text-text-muted uppercase tracking-widest font-bold whitespace-nowrap",children:e}),o.jsx("div",{className:"flex items-center gap-1.5 overflow-x-auto pb-1 no-scrollbar",children:t})]})}function Ku({stats:e}){const t=qu(e.byClient,4),n=qu(e.byLanguage,4);return 0===t.length&&0===n.length?null:o.jsxs("div",{className:"flex flex-col gap-4 mb-8 p-4 rounded-xl bg-bg-surface-1/30 border border-border/50",children:[t.length>0&&o.jsx(Yu,{label:"Top Clients",children:t.map(([e,t])=>{const n=cc[e];return o.jsxs("span",{className:"text-[11px] font-mono px-2.5 py-1 rounded-full bg-bg-surface-1 border border-border hover:border-accent/40 transition-colors shadow-sm whitespace-nowrap group cursor-default",style:n?{borderLeftWidth:"3px",borderLeftColor:n}:void 0,title:Wu(t),children:[uc[e]??e,o.jsx("span",{className:"ml-1.5 text-text-muted opacity-0 group-hover:opacity-100 transition-opacity",children:Wu(t)})]},e)})}),n.length>0&&o.jsx(Yu,{label:"Languages",children:n.map(([e,t])=>o.jsxs("span",{className:"text-[11px] font-mono px-2.5 py-1 rounded-full bg-bg-surface-1 border border-border hover:border-accent/40 transition-colors shadow-sm whitespace-nowrap group cursor-default",title:Wu(t),children:[e,o.jsx("span",{className:"ml-1.5 text-text-muted opacity-0 group-hover:opacity-100 transition-opacity",children:Wu(t)})]},e))})]})}function Qu(e,t,n){try{const n="undefined"!=typeof window?localStorage.getItem(e):null;if(n&&t.includes(n))return n}catch{}return n}function Xu(e,t){try{localStorage.setItem(e,t)}catch{}}function Gu({sessions:e,milestones:t,onDeleteSession:n,onDeleteConversation:r,onDeleteMilestone:a,defaultTimeScale:i="day",activeTab:s,onActiveTabChange:l}){const[c,u]=f.useState(null),[d,h]=f.useState(()=>Qu("useai-time-scale",Tc,i)),[p,m]=f.useState({category:"all",client:"all",project:"all",language:"all"}),[g,y]=f.useState(()=>Qu("useai-active-tab",["sessions","insights"],"sessions")),[v,x]=f.useState(null),[b,w]=f.useState(!1),[k,S]=f.useState(!1),j=void 0!==s,C=s??g,N=f.useCallback(e=>{l?l(e):(Xu("useai-active-tab",e),y(e))},[l]),T=f.useCallback(e=>{Xu("useai-time-scale",e),h(e)},[]),E=f.useCallback((e,t)=>{m(n=>({...n,[e]:t}))},[]);f.useEffect(()=>{if(null===c){const e=Mc[d];e&&T(e)}},[c,d,T]);const M=null===c,P=c??Date.now(),{start:L,end:D}=Ac(d,P),A=f.useMemo(()=>function(e,t,n){return e.filter(e=>{const r=xc(e.started_at),a=xc(e.ended_at);return r<=n&&a>=t})}(e,L,D),[e,L,D]),_=f.useMemo(()=>function(e,t,n){return e.filter(e=>{const r=xc(e.created_at);return r>=t&&r<=n})}(t,L,D),[t,L,D]),z=f.useMemo(()=>function(e,t=[]){let n=0,r=0;const a={},i={},s={},o={};for(const y of e){n+=y.duration_seconds,r+=y.files_touched,a[y.client]=(a[y.client]??0)+y.duration_seconds;for(const e of y.languages)i[e]=(i[e]??0)+y.duration_seconds;s[y.task_type]=(s[y.task_type]??0)+y.duration_seconds,y.project&&(o[y.project]=(o[y.project]??0)+y.duration_seconds)}let l=0,c=0,u=0,d=0;if(e.length>0){let t=1/0,r=-1/0;const a=[];for(const n of e){const e=xc(n.started_at),i=xc(n.ended_at);e<t&&(t=e),i>r&&(r=i),a.push({time:e,delta:1}),a.push({time:i,delta:-1})}l=(r-t)/36e5,a.sort((e,t)=>e.time-t.time||e.delta-t.delta);let i=0,s=0,o=0;for(const e of a){const t=i>0;i+=e.delta,i>d&&(d=i),!t&&i>0?o=e.time:t&&0===i&&(s+=e.time-o)}c=s/36e5,u=c>0?n/3600/c:0}const f=function(e){let t=0,n=0,r=0;for(const a of e)"feature"===a.category&&t++,"bugfix"===a.category&&n++,"complex"===a.complexity&&r++;return{featuresShipped:t,bugsFixed:n,complexSolved:r}}(t),h=e.filter(e=>e.evaluation&&"object"==typeof e.evaluation),p=h.filter(e=>"completed"===e.evaluation.task_outcome).length,m=h.length>0?Math.round(p/h.length*100):0,g=Object.keys(o).length;return{totalHours:n/3600,totalSessions:e.length,actualSpanHours:l,coveredHours:c,aiMultiplier:u,peakConcurrency:d,currentStreak:bc(e),filesTouched:Math.round(r),...f,totalMilestones:t.length,completionRate:m,activeProjects:g,byClient:a,byLanguage:i,byTaskType:s,byProject:o}}(A,_),[A,_]),R=f.useMemo(()=>bc(e),[e]),F=f.useMemo(()=>{const t=function(e,t,n){let r=0,a=0;for(const i of e){const e=xc(i.ended_at),s=xc(i.started_at);e<t?r++:s>n&&a++}return{before:r,after:a}}(e,L,D);if(M&&0===t.before)return;const n=Dc[d],r=e=>new Date(e).toLocaleTimeString([],{hour:"numeric",minute:"2-digit",hour12:!0}),a=Pc(d)||D-L>=864e5?e=>\`\${new Date(e).toLocaleDateString([],{month:"short",day:"numeric"})} \${r(e)}\`:r,i=_c(d,P,-1),s=Ac(d,i),o=\`View prev \${n} \xB7 \${a(s.start)} \u2013 \${a(s.end)}\`;if(M)return{before:t.before,after:0,olderLabel:o};const l=_c(d,P,1),c=Ac(d,l);return{...t,newerLabel:\`View next \${n} \xB7 \${a(c.start)} \u2013 \${a(c.end)}\`,olderLabel:o}},[e,L,D,P,M,d]),V=f.useCallback(()=>{const e=_c(d,P,1);zc(d,e)?u(null):u(e)},[P,d]),O=f.useCallback(()=>{const e=_c(d,P,-1);u(e)},[P,d]),I=f.useMemo(()=>{if(!M)return new Date(P).toISOString().slice(0,10)},[M,P]),$=f.useMemo(()=>{const e=A.filter(e=>null!=e.evaluation);if(0===e.length)return null;let t=0,n=0,r=0,a=0;for(const s of e){const e=s.evaluation;t+=e.prompt_quality,n+=e.context_provided,r+=e.scope_quality,a+=e.independence_level}const i=e.length;return{prompt_quality:Math.round(t/i*10)/10,context_provided:Math.round(n/i*10)/10,scope_quality:Math.round(r/i*10)/10,independence_level:Math.round(a/i*10)/10}},[A]),B=f.useMemo(()=>{let e=0,t=0,n=0;for(const r of _)"simple"===r.complexity?e++:"medium"===r.complexity?t++:"complex"===r.complexity&&n++;return{simple:e,medium:t,complex:n}},[_]),H=f.useCallback(e=>{const t=new Date(\`\${e}T12:00:00\`).getTime();u(t),T("day")},[T]),U="all"!==p.client||"all"!==p.language||"all"!==p.project;return o.jsxs("div",{className:"space-y-3",children:[o.jsx(Tu,{value:c,onChange:u,scale:d,onScaleChange:T,sessions:e,milestones:t,showPublic:b}),o.jsx(Fc,{totalHours:z.totalHours,totalSessions:z.totalSessions,actualSpanHours:z.actualSpanHours,coveredHours:z.coveredHours,aiMultiplier:z.aiMultiplier,peakConcurrency:z.peakConcurrency,currentStreak:R,filesTouched:z.filesTouched,featuresShipped:z.featuresShipped,bugsFixed:z.bugsFixed,complexSolved:z.complexSolved,totalMilestones:z.totalMilestones,completionRate:z.completionRate,activeProjects:z.activeProjects,selectedCard:v,onCardClick:x}),o.jsx($c,{type:v,milestones:_,showPublic:b,onClose:()=>x(null)}),o.jsx(Qc,{type:v,sessions:A,allSessions:e,currentStreak:R,stats:{totalHours:z.totalHours,coveredHours:z.coveredHours,aiMultiplier:z.aiMultiplier,peakConcurrency:z.peakConcurrency},showPublic:b,onClose:()=>x(null)}),!j&&o.jsx(nu,{activeTab:C,onTabChange:N}),"sessions"===C&&o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{className:"flex items-center justify-between px-1 pt-0.5",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("h2",{className:"text-sm font-bold text-text-muted uppercase tracking-widest",children:"Activity Feed"}),o.jsxs("span",{className:"text-[10px] text-text-muted font-mono bg-bg-surface-2 px-2 py-0.5 rounded",children:[A.length," Sessions"]})]}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsxs("button",{onClick:()=>w(e=>!e),className:"inline-flex items-center gap-1.5 px-2.5 py-1.5 rounded-md border transition-all duration-200 "+(b?"bg-success/10 border-success/30 text-success":"bg-bg-surface-1 border-border/50 text-text-muted hover:text-text-primary hover:border-text-muted/50"),title:b?"Showing public titles":"Showing private titles","aria-label":b?"Switch to private titles":"Switch to public titles",children:[b?o.jsx(_l,{className:"w-3.5 h-3.5"}):o.jsx(Al,{className:"w-3.5 h-3.5"}),o.jsx("span",{className:"hidden sm:inline text-xs font-medium",children:b?"Public":"Private"})]}),o.jsxs("button",{onClick:()=>S(e=>!e),className:"inline-flex items-center gap-1.5 px-2.5 py-1.5 rounded-md border transition-all duration-200 "+(k||U?"bg-accent/10 border-accent/30 text-accent":"bg-bg-surface-1 border-border/50 text-text-muted hover:text-text-primary hover:border-text-muted/50"),title:k?"Hide filters":"Show filters","aria-label":k?"Hide filters":"Show filters",children:[o.jsx(Rl,{className:"w-3.5 h-3.5"}),o.jsx("span",{className:"hidden sm:inline text-xs font-medium",children:"Filters"})]})]})]}),k&&o.jsx(au,{sessions:A,filters:p,onFilterChange:E}),o.jsx(vu,{sessions:A,milestones:_,filters:p,globalShowPublic:b,showFullDate:"week"===d||"7d"===d||"month"===d||"30d"===d,outsideWindowCounts:F,onNavigateNewer:V,onNavigateOlder:O,onDeleteSession:n,onDeleteConversation:r,onDeleteMilestone:a})]}),"insights"===C&&o.jsxs("div",{className:"space-y-4 pt-2",children:[o.jsx(Du,{sessions:A,milestones:_,isLive:M,windowStart:L,windowEnd:D,allSessions:e,allMilestones:t}),o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[o.jsx(Au,{sessions:A}),o.jsx(Fu,{sessions:A,milestones:_,streak:R})]}),o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[o.jsx(jc,{data:B}),$&&o.jsx(Vu,{evaluation:$})]}),o.jsx($u,{byTaskType:z.byTaskType}),o.jsx(kc,{sessions:e,timeScale:d,effectiveTime:P,isLive:M,onDayClick:H,highlightDate:I}),o.jsx(Uu,{milestones:_,showPublic:b}),o.jsx(Ku,{stats:z})]})]})}function Zu({className:e}){return o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 611.54 143.47",className:e,children:[o.jsxs("g",{fill:"var(--text-primary)",children:[o.jsx("path",{d:"M21.4,121.85c-4.57-4.57-6.85-10.02-6.85-16.37V17.23c0-3.1,1.55-4.65,4.64-4.65h25.55c3.1,0,4.65,1.55,4.65,4.65v76.64c0,3.25,1.12,6,3.37,8.25,2.24,2.25,4.99,3.37,8.25,3.37h27.87c3.25,0,6-1.12,8.25-3.37,2.24-2.24,3.37-4.99,3.37-8.25V17.23c0-3.1,1.55-4.65,4.64-4.65h25.55c3.1,0,4.65,1.55,4.65,4.65v88.25c0,6.35-2.29,11.81-6.85,16.37-4.57,4.57-10.03,6.85-16.37,6.85H37.78c-6.35,0-11.81-2.28-16.37-6.85Z"}),o.jsx("path",{d:"M146.93,124.06v-13.93c0-3.1,1.55-4.65,4.64-4.65h69.67c3.25,0,6-1.12,8.25-3.37,2.24-2.24,3.37-4.99,3.37-8.25s-1.12-6-3.37-8.25c-2.25-2.24-4.99-3.37-8.25-3.37h-51.09c-6.35,0-11.81-2.28-16.37-6.85-4.57-4.57-6.85-10.02-6.85-16.37v-23.22c0-6.35,2.28-11.81,6.85-16.37,4.56-4.57,10.02-6.85,16.37-6.85h92.9c3.1,0,4.65,1.55,4.65,4.65v13.94c0,3.1-1.55,4.65-4.65,4.65h-69.67c-3.25,0-6,1.12-8.25,3.37-2.25,2.25-3.37,4.99-3.37,8.25s1.12,6,3.37,8.25c2.24,2.25,4.99,3.37,8.25,3.37h51.09c6.35,0,11.8,2.29,16.37,6.85,4.57,4.57,6.85,10.03,6.85,16.37v23.22c0,6.35-2.29,11.81-6.85,16.37-4.57,4.57-10.03,6.85-16.37,6.85h-92.9c-3.1,0-4.64-1.55-4.64-4.65Z"}),o.jsx("path",{d:"M286.16,121.85c-4.57-4.57-6.85-10.02-6.85-16.37V35.81c0-6.35,2.28-11.81,6.85-16.37,4.56-4.57,10.02-6.85,16.37-6.85h74.32c6.35,0,11.8,2.29,16.37,6.85,4.57,4.57,6.85,10.03,6.85,16.37v23.22c0,6.35-2.29,11.81-6.85,16.37-4.57,4.57-10.03,6.85-16.37,6.85h-62.71v11.61c0,3.25,1.12,6,3.37,8.25,2.24,2.25,4.99,3.37,8.25,3.37h69.67c3.1,0,4.65,1.55,4.65,4.65v13.93c0,3.1-1.55,4.65-4.65,4.65h-92.9c-6.35,0-11.81-2.28-16.37-6.85ZM361.87,55.66c2.24-2.24,3.37-4.99,3.37-8.25s-1.12-6-3.37-8.25c-2.25-2.24-4.99-3.37-8.25-3.37h-27.87c-3.25,0-6,1.12-8.25,3.37-2.25,2.25-3.37,4.99-3.37,8.25v11.61h39.48c3.25,0,6-1.12,8.25-3.37Z"})]}),o.jsxs("g",{fill:"var(--accent)",children:[o.jsx("path",{d:"M432.08,126.44c-4.76-4.76-7.14-10.44-7.14-17.06v-24.2c0-6.61,2.38-12.3,7.14-17.06,4.76-4.76,10.44-7.14,17.06-7.14h65.34v-12.1c0-3.39-1.17-6.25-3.51-8.59-2.34-2.34-5.2-3.51-8.59-3.51h-72.6c-3.23,0-4.84-1.61-4.84-4.84v-14.52c0-3.23,1.61-4.84,4.84-4.84h96.8c6.61,0,12.3,2.38,17.06,7.14,4.76,4.76,7.14,10.45,7.14,17.06v72.6c0,6.62-2.38,12.3-7.14,17.06-4.76,4.76-10.45,7.14-17.06,7.14h-77.44c-6.62,0-12.3-2.38-17.06-7.14ZM510.97,105.87c2.34-2.34,3.51-5.2,3.51-8.59v-12.1h-41.14c-3.39,0-6.25,1.17-8.59,3.51-2.34,2.34-3.51,5.2-3.51,8.59s1.17,6.25,3.51,8.59c2.34,2.34,5.2,3.51,8.59,3.51h29.04c3.39,0,6.25-1.17,8.59-3.51Z"}),o.jsx("path",{d:"M562.87,128.74V17.42c0-3.23,1.61-4.84,4.84-4.84h26.62c3.23,0,4.84,1.61,4.84,4.84v111.32c0,3.23-1.61,4.84-4.84,4.84h-26.62c-3.23,0-4.84-1.61-4.84-4.84Z"})]})]})}var Ju={category:"all",client:"all",project:"all",language:"all"};function ed({open:e,onClose:t,sessions:n,milestones:r,onDeleteSession:a,onDeleteConversation:i,onDeleteMilestone:s}){const[l,c]=f.useState(""),[u,d]=f.useState(""),[h,p]=f.useState(!1),m=f.useRef(null);f.useEffect(()=>{e&&(c(""),d(""),requestAnimationFrame(()=>m.current?.focus()))},[e]),f.useEffect(()=>{if(!e)return;const t=document.documentElement;return t.style.overflow="hidden",document.body.style.overflow="hidden",()=>{t.style.overflow="",document.body.style.overflow=""}},[e]),f.useEffect(()=>{if(!e)return;const n=e=>{"Escape"===e.key&&t()};return window.addEventListener("keydown",n),()=>window.removeEventListener("keydown",n)},[e,t]),f.useEffect(()=>{const e=setTimeout(()=>d(l),250);return()=>clearTimeout(e)},[l]);const g=f.useMemo(()=>{const e=new Map;for(const t of r){const n=e.get(t.session_id);n?n.push(t):e.set(t.session_id,[t])}return e},[r]),{filteredSessions:y,filteredMilestones:v,highlightWords:x}=f.useMemo(()=>{const e=u.trim().toLowerCase();if(!e)return{filteredSessions:[],filteredMilestones:[],highlightWords:[]};const t=e.split(/\\s+/),a=n.filter(e=>function(e,t,n,r){const a=(r?[e.title,e.client,e.task_type,...e.languages,...t.map(e=>e.title)]:[e.private_title,e.title,e.client,e.task_type,...e.languages,...t.map(e=>e.private_title),...t.map(e=>e.title)]).filter(Boolean).join(" ").toLowerCase();return n.every(e=>a.includes(e))}(e,g.get(e.session_id)??[],t,h)),i=new Set(a.map(e=>e.session_id));return{filteredSessions:a,filteredMilestones:r.filter(e=>i.has(e.session_id)),highlightWords:t}},[n,r,g,u,h]),b=u.trim().length>0;return o.jsx(Xs,{children:e&&o.jsxs(o.Fragment,{children:[o.jsx(pl.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.15},className:"fixed inset-0 bg-black/40 backdrop-blur-sm z-[60]",onClick:t}),o.jsx(pl.div,{initial:{opacity:0,scale:.96},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.96},transition:{duration:.15},className:"fixed inset-0 z-[61] flex items-start justify-center pt-[10vh] px-4 pointer-events-none",children:o.jsxs("div",{className:"w-full max-w-2xl bg-bg-base border border-border/50 rounded-xl shadow-2xl flex flex-col max-h-[75vh] pointer-events-auto",onClick:e=>e.stopPropagation(),children:[o.jsxs("div",{className:"flex items-center gap-3 px-4 py-3 border-b border-border/50",children:[o.jsx(Zl,{className:"w-4 h-4 text-text-muted flex-shrink-0"}),o.jsx("input",{ref:m,type:"text",value:l,onChange:e=>c(e.target.value),placeholder:h?"Search public titles...":"Search all sessions and milestones...",className:"flex-1 bg-transparent text-sm text-text-primary placeholder:text-text-muted/50 outline-none"}),l&&o.jsx("button",{onClick:()=>{c(""),m.current?.focus()},className:"p-1 rounded-md hover:bg-bg-surface-2 text-text-muted hover:text-text-primary transition-colors",children:o.jsx(oc,{className:"w-3.5 h-3.5"})}),o.jsx("button",{onClick:()=>p(e=>!e),className:"p-1.5 rounded-md border transition-all duration-200 flex-shrink-0 "+(h?"bg-success/10 border-success/30 text-success":"bg-bg-surface-1 border-border/50 text-text-muted hover:text-text-primary hover:border-text-muted/50"),title:h?"Searching public titles":"Searching private titles",children:h?o.jsx(_l,{className:"w-3.5 h-3.5"}):o.jsx(Al,{className:"w-3.5 h-3.5"})}),o.jsx("kbd",{className:"hidden sm:inline-flex items-center gap-0.5 px-1.5 py-0.5 rounded border border-border bg-bg-surface-1 text-[10px] font-mono text-text-muted",children:"esc"})]}),o.jsx("div",{className:"flex-1 overflow-y-auto overscroll-none px-4 py-3",children:b?0===y.length?o.jsxs("div",{className:"text-center py-12 text-sm text-text-muted/60",children:["No results for \u201C",u.trim(),"\u201D"]}):o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"text-[10px] font-mono text-text-muted uppercase tracking-wider mb-3 px-1",children:[y.length," result",1!==y.length?"s":""]}),o.jsx(vu,{sessions:y,milestones:v,filters:Ju,globalShowPublic:h||void 0,showFullDate:!0,highlightWords:x,onDeleteSession:a,onDeleteConversation:i,onDeleteMilestone:s})]}):o.jsx("div",{className:"text-center py-12 text-sm text-text-muted/60",children:"Type to search across all sessions"})})]})})]})})}const td=(nd=(e,t)=>({sessions:[],milestones:[],config:null,health:null,updateInfo:null,loading:!0,timeTravelTime:null,timeScale:(()=>{try{const e=localStorage.getItem("useai-time-scale"),t=[...Tc];if(e&&t.includes(e))return e}catch{}return"day"})(),filters:{category:"all",client:"all",project:"all",language:"all"},activeTab:(()=>{try{const e=localStorage.getItem("useai-active-tab");if("sessions"===e||"insights"===e)return e}catch{}return"sessions"})(),loadAll:async()=>{try{const[t,n,r]=await Promise.all([_("/api/local/sessions"),_("/api/local/milestones"),F()]);e({sessions:t,milestones:n,config:r,loading:!1})}catch{e({loading:!1})}},loadHealth:async()=>{try{const t=await _("/health");e({health:t})}catch{}},loadUpdateCheck:async()=>{try{const t=await _("/api/local/update-check");e({updateInfo:t})}catch{}},setTimeTravelTime:t=>e({timeTravelTime:t}),setTimeScale:t=>{try{localStorage.setItem("useai-time-scale",t)}catch{}e({timeScale:t})},setFilter:(t,n)=>e(e=>({filters:{...e.filters,[t]:n}})),setActiveTab:t=>{try{localStorage.setItem("useai-active-tab",t)}catch{}e({activeTab:t})},deleteSession:async n=>{const r={sessions:t().sessions,milestones:t().milestones};e({sessions:r.sessions.filter(e=>e.session_id!==n),milestones:r.milestones.filter(e=>e.session_id!==n)});try{await function(e){return R(\`/api/local/sessions/\${encodeURIComponent(e)}\`)}(n)}catch{e(r)}},deleteConversation:async n=>{const r={sessions:t().sessions,milestones:t().milestones},a=new Set(r.sessions.filter(e=>e.conversation_id===n).map(e=>e.session_id));e({sessions:r.sessions.filter(e=>e.conversation_id!==n),milestones:r.milestones.filter(e=>!a.has(e.session_id))});try{await function(e){return R(\`/api/local/conversations/\${encodeURIComponent(e)}\`)}(n)}catch{e(r)}},deleteMilestone:async n=>{const r={milestones:t().milestones};e({milestones:r.milestones.filter(e=>e.id!==n)});try{await function(e){return R(\`/api/local/milestones/\${encodeURIComponent(e)}\`)}(n)}catch{e(r)}}}))?A(nd):A;var nd;const rd=/^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/;function ad(e){if(!e)return"Never synced";const t=Date.now()-new Date(e).getTime(),n=Math.floor(t/6e4);if(n<1)return"Just now";if(n<60)return\`\${n}m ago\`;const r=Math.floor(n/60);if(r<24)return\`\${r}h ago\`;return\`\${Math.floor(r/24)}d ago\`}function id({config:e,onRefresh:t}){const n=!!e.username,[r,a]=f.useState(!n),[i,s]=f.useState(e.username??""),[l,c]=f.useState("idle"),[u,d]=f.useState(),[h,p]=f.useState(!1),m=f.useRef(void 0),g=f.useRef(void 0);f.useEffect(()=>{e.username&&(a(!1),s(e.username))},[e.username]);const y=f.useCallback(t=>{const n=function(e){return e.toLowerCase().replace(/[^a-z0-9-]/g,"")}(t);if(s(n),d(void 0),m.current&&clearTimeout(m.current),g.current&&g.current.abort(),!n)return void c("idle");const r=function(e){return 0===e.length?{valid:!1}:e.length<3?{valid:!1,reason:"At least 3 characters"}:e.length>32?{valid:!1,reason:"At most 32 characters"}:rd.test(e)?{valid:!0}:{valid:!1,reason:"No leading/trailing hyphens"}}(n);if(!r.valid)return c("invalid"),void d(r.reason);n!==e.username?(c("checking"),m.current=setTimeout(async()=>{g.current=new AbortController;try{const e=await async function(e){return _(\`/api/local/users/check-username/\${encodeURIComponent(e)}\`)}(n);e.available?(c("available"),d(void 0)):(c("taken"),d(e.reason))}catch{c("invalid"),d("Check failed")}},400)):c("idle")},[e.username]),v=f.useCallback(async()=>{if("available"===l){p(!0);try{await V(i),t()}catch(e){c("invalid"),d(e.message)}finally{p(!1)}}},[i,l,t]),x=f.useCallback(()=>{a(!1),s(e.username??""),c("idle"),d(void 0)},[e.username]),b=f.useCallback(()=>{a(!0),s(e.username??""),c("idle"),d(void 0)},[e.username]);return!r&&n?o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx($l,{className:"w-3.5 h-3.5 text-text-muted"}),o.jsxs("a",{href:\`https://useai.dev/\${e.username}\`,target:"_blank",rel:"noopener noreferrer",className:"text-xs font-bold text-accent hover:text-accent-bright transition-colors",children:["useai.dev/",e.username]}),o.jsx("button",{onClick:b,className:"p-1 rounded hover:bg-bg-surface-2 text-text-muted hover:text-text-primary transition-colors cursor-pointer",title:"Edit username",children:o.jsx(Kl,{className:"w-3 h-3"})})]}):o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("span",{className:"text-xs text-text-muted whitespace-nowrap",children:"useai.dev/"}),o.jsx("div",{className:"flex items-center bg-bg-base border border-border rounded-lg overflow-hidden focus-within:border-accent/50 transition-all",children:o.jsx("input",{type:"text",placeholder:"username",value:i,onChange:e=>y(e.target.value),onKeyDown:e=>"Enter"===e.key&&v(),autoFocus:r,maxLength:32,className:"px-2 py-1.5 text-xs bg-transparent text-text-primary outline-none w-28 placeholder:text-text-muted/50"})}),o.jsxs("div",{className:"w-4 h-4 flex items-center justify-center",children:["checking"===l&&o.jsx(Bl,{className:"w-3.5 h-3.5 text-text-muted animate-spin"}),"available"===l&&o.jsx(Sl,{className:"w-3.5 h-3.5 text-success"}),("taken"===l||"invalid"===l)&&i.length>0&&o.jsx(oc,{className:"w-3.5 h-3.5 text-error"})]}),o.jsx("button",{onClick:v,disabled:"available"!==l||h,className:"px-3 py-1.5 bg-accent hover:bg-accent-bright text-bg-base text-[10px] font-bold uppercase tracking-wider rounded-lg transition-colors disabled:opacity-30 cursor-pointer",children:h?"...":n?"Save":"Claim"}),n&&o.jsx("button",{onClick:x,className:"px-2 py-1.5 text-[10px] font-bold uppercase tracking-wider text-text-muted hover:text-text-primary transition-colors cursor-pointer",children:"Cancel"}),u&&o.jsx("span",{className:"text-[10px] text-error/80 truncate max-w-[140px]",title:u,children:u})]})}function sd({config:e,onRefresh:t}){const[n,r]=f.useState(!1),[a,i]=f.useState(""),[s,l]=f.useState(""),[c,u]=f.useState("email"),[d,h]=f.useState(!1),[p,m]=f.useState(null),g=f.useRef(null);f.useEffect(()=>{if(!n)return;const e=e=>{g.current&&!g.current.contains(e.target)&&r(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[n]),f.useEffect(()=>{if(!n)return;const e=e=>{"Escape"===e.key&&r(!1)};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[n]);const y=f.useCallback(async()=>{if(a.includes("@")){h(!0),m(null);try{await function(e){return z("/api/local/auth/send-otp",{email:e})}(a),u("otp")}catch(e){m(e.message)}finally{h(!1)}}},[a]),v=f.useCallback(async()=>{if(/^\\d{6}$/.test(s)){h(!0),m(null);try{await async function(e,t){return z("/api/local/auth/verify-otp",{email:e,code:t})}(a,s),t(),r(!1)}catch(e){m(e.message)}finally{h(!1)}}},[a,s,t]),x=f.useCallback(async()=>{h(!0),m(null);try{const e=await async function(){return z("/api/local/sync")}();e.success?(m("Synced!"),t(),setTimeout(()=>m(null),3e3)):m(e.error??"Sync failed")}catch(e){m(e.message)}finally{h(!1)}},[t]),b=f.useCallback(async()=>{await async function(){return z("/api/local/auth/logout")}(),t(),r(!1)},[t]);if(!e)return null;const w=e.authenticated;return o.jsxs("div",{className:"relative",ref:g,children:[w?o.jsxs("button",{onClick:()=>r(e=>!e),className:"flex items-center gap-1.5 rounded-full transition-colors cursor-pointer hover:opacity-80",children:[o.jsxs("div",{className:"relative w-7 h-7 rounded-full bg-accent/15 border border-accent/30 flex items-center justify-center",children:[o.jsx("span",{className:"text-xs font-bold text-accent leading-none",children:(e.email?.[0]??"?").toUpperCase()}),o.jsx("div",{className:"absolute -bottom-0.5 -right-0.5 w-2.5 h-2.5 rounded-full border-2 border-bg-base "+(e.last_sync_at?"bg-success":"bg-warning")})]}),o.jsx(jl,{className:"w-3 h-3 text-text-muted transition-transform "+(n?"rotate-180":"")})]}):o.jsxs("button",{onClick:()=>r(e=>!e),className:"flex items-center gap-1.5 px-2.5 py-1.5 rounded-md border border-border/50 bg-bg-surface-1 text-text-muted hover:text-text-primary hover:border-text-muted/50 transition-colors text-xs cursor-pointer",children:[o.jsx(ic,{className:"w-3 h-3"}),"Sign in"]}),n&&o.jsx("div",{className:"absolute right-0 top-full mt-2 z-50 w-80 rounded-lg bg-bg-surface-1 border border-border shadow-lg",children:w?o.jsxs("div",{children:[o.jsx("div",{className:"px-4 pt-3 pb-2",children:o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("div",{className:"w-8 h-8 rounded-full bg-accent/10 flex items-center justify-center border border-accent/20 shrink-0",children:o.jsx("span",{className:"text-sm font-bold text-accent",children:(e.email?.[0]??"?").toUpperCase()})}),o.jsx("div",{className:"flex flex-col min-w-0",children:o.jsx("span",{className:"text-xs font-bold text-text-primary truncate",children:e.email})})]})}),o.jsx("div",{className:"px-4 py-2 border-t border-border/50",children:o.jsx(id,{config:e,onRefresh:t})}),o.jsx("div",{className:"px-4 py-2 border-t border-border/50",children:o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("span",{className:"text-[10px] text-text-muted font-mono uppercase tracking-tighter",children:["Last sync: ",ad(e.last_sync_at)]}),o.jsxs("div",{className:"flex items-center gap-2",children:[p&&o.jsx("span",{className:"text-[10px] font-bold uppercase tracking-widest "+("Synced!"===p?"text-success":"text-error"),children:p}),o.jsxs("button",{onClick:x,disabled:d,className:"flex items-center gap-1.5 px-2.5 py-1 bg-accent hover:bg-accent-bright text-bg-base text-[10px] font-bold uppercase tracking-wider rounded-md transition-colors disabled:opacity-50 cursor-pointer",children:[o.jsx(Ql,{className:"w-3 h-3 "+(d?"animate-spin":"")}),d?"...":"Sync"]})]})]})}),o.jsx("div",{className:"px-4 py-2 border-t border-border/50",children:o.jsxs("button",{onClick:b,className:"flex items-center gap-2 w-full px-2 py-1.5 rounded-md text-xs text-text-muted hover:text-error hover:bg-error/10 transition-colors cursor-pointer",children:[o.jsx(Ul,{className:"w-3.5 h-3.5"}),"Sign out"]})})]}):o.jsxs("div",{className:"p-4",children:[o.jsx("p",{className:"text-xs font-bold text-text-secondary uppercase tracking-widest mb-3",children:"Sign in to sync"}),p&&o.jsx("p",{className:"text-[10px] font-bold text-error uppercase tracking-widest mb-2",children:p}),"email"===c?o.jsxs("div",{className:"flex items-center bg-bg-base border border-border rounded-lg overflow-hidden focus-within:border-accent/50 focus-within:ring-1 focus-within:ring-accent/50 transition-all",children:[o.jsx("div",{className:"pl-3 py-2",children:o.jsx(Wl,{className:"w-3.5 h-3.5 text-text-muted"})}),o.jsx("input",{type:"email",placeholder:"you@email.com",value:a,onChange:e=>i(e.target.value),onKeyDown:e=>"Enter"===e.key&&y(),autoFocus:!0,className:"px-3 py-2 text-xs bg-transparent text-text-primary outline-none flex-1 placeholder:text-text-muted/50"}),o.jsx("button",{onClick:y,disabled:d||!a.includes("@"),className:"px-4 py-2 bg-bg-surface-2 hover:bg-bg-surface-3 text-text-primary text-[10px] font-bold uppercase tracking-wider transition-colors disabled:opacity-50 cursor-pointer border-l border-border",children:d?"...":"Send"})]}):o.jsxs("div",{className:"flex items-center bg-bg-base border border-border rounded-lg overflow-hidden focus-within:border-accent/50 focus-within:ring-1 focus-within:ring-accent/50 transition-all",children:[o.jsx("input",{type:"text",maxLength:6,placeholder:"000000",inputMode:"numeric",autoComplete:"one-time-code",value:s,onChange:e=>l(e.target.value),onKeyDown:e=>"Enter"===e.key&&v(),autoFocus:!0,className:"px-4 py-2 text-xs bg-transparent text-text-primary text-center font-mono tracking-widest outline-none flex-1 placeholder:text-text-muted/50"}),o.jsx("button",{onClick:v,disabled:d||6!==s.length,className:"px-4 py-2 bg-accent hover:bg-accent-bright text-bg-base text-[10px] font-bold uppercase tracking-wider transition-colors disabled:opacity-50 cursor-pointer",children:d?"...":"Verify"})]})]})})]})}const od="npx -y @devness/useai update";function ld({updateInfo:e}){const[t,n]=f.useState(!1),[r,a]=f.useState(!1);return o.jsxs("div",{className:"relative",children:[o.jsxs("button",{onClick:()=>n(e=>!e),className:"flex items-center gap-1.5 px-2.5 py-1 rounded-full bg-accent/10 border border-accent/20 text-xs font-medium text-accent hover:bg-accent/15 transition-colors",children:[o.jsx(El,{className:"w-3 h-3"}),"v",e.latest," available"]}),t&&o.jsxs("div",{className:"absolute right-0 top-full mt-2 z-50 w-72 rounded-lg bg-bg-surface-1 border border-border shadow-lg p-3 space-y-2",children:[o.jsxs("p",{className:"text-xs text-text-muted",children:["Update from ",o.jsxs("span",{className:"font-mono text-text-secondary",children:["v",e.current]})," to ",o.jsxs("span",{className:"font-mono text-accent",children:["v",e.latest]})]}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("code",{className:"flex-1 text-[11px] font-mono bg-bg-base px-2 py-1.5 rounded border border-border text-text-secondary truncate",children:od}),o.jsx("button",{onClick:async()=>{try{await navigator.clipboard.writeText(od),a(!0),setTimeout(()=>a(!1),2e3)}catch{}},className:"p-1.5 rounded-md border border-border bg-bg-base text-text-muted hover:text-text-primary hover:border-text-muted/50 transition-colors shrink-0",title:"Copy command",children:r?o.jsx(Sl,{className:"w-3.5 h-3.5 text-success"}):o.jsx(Ll,{className:"w-3.5 h-3.5"})})]})]})]})}function cd({health:e,updateInfo:t,onSearchOpen:n,activeTab:r,onTabChange:a,config:i,onRefresh:s}){return o.jsx("header",{className:"sticky top-0 z-50 bg-bg-base/80 backdrop-blur-md border-b border-border mb-6",children:o.jsxs("div",{className:"max-w-[1240px] mx-auto px-4 sm:px-6 py-3 flex items-center justify-between relative",children:[o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx(Zu,{className:"h-6"}),e&&e.active_sessions>0&&o.jsx(bu,{label:\`\${e.active_sessions} active session\${1!==e.active_sessions?"s":""}\`,color:"success",dot:!0})]}),o.jsx("div",{className:"absolute left-1/2 -translate-x-1/2",children:o.jsx(nu,{activeTab:r,onTabChange:a})}),o.jsxs("div",{className:"flex items-center gap-4",children:[n&&o.jsxs("button",{onClick:n,className:"flex items-center gap-2 px-2.5 py-1.5 rounded-md border border-border/50 bg-bg-surface-1 text-text-muted hover:text-text-primary hover:border-text-muted/50 transition-colors text-xs",children:[o.jsx(Zl,{className:"w-3 h-3"}),o.jsx("span",{className:"hidden sm:inline",children:"Search"}),o.jsx("kbd",{className:"hidden sm:inline-flex items-center px-1 py-0.5 rounded border border-border bg-bg-base text-[9px] font-mono leading-none",children:"\u2318K"})]}),t?.update_available&&o.jsx(ld,{updateInfo:t}),o.jsx(sd,{config:i,onRefresh:s})]})]})})}function ud(){const{sessions:e,milestones:t,config:n,health:r,updateInfo:a,loading:i,loadAll:s,loadHealth:l,loadUpdateCheck:c,deleteSession:u,deleteConversation:d,deleteMilestone:h,activeTab:p,setActiveTab:m}=td();f.useEffect(()=>{s(),l(),c()},[s,l,c]),f.useEffect(()=>{const e=setInterval(l,3e4),t=setInterval(s,3e4);return()=>{clearInterval(e),clearInterval(t)}},[s,l]);const[g,y]=f.useState(!1);return f.useEffect(()=>{const e=e=>{(e.metaKey||e.ctrlKey)&&"k"===e.key&&(e.preventDefault(),y(e=>!e))};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[]),i?o.jsx("div",{className:"min-h-screen flex items-center justify-center",children:o.jsx("div",{className:"text-text-muted text-sm",children:"Loading..."})}):o.jsxs("div",{className:"min-h-screen bg-bg-base selection:bg-accent/30 selection:text-text-primary",children:[o.jsx(cd,{health:r,updateInfo:a,onSearchOpen:()=>y(!0),activeTab:p,onTabChange:m,config:n,onRefresh:s}),o.jsxs("div",{className:"max-w-[1240px] mx-auto px-4 sm:px-6 pb-6",children:[o.jsx(ed,{open:g,onClose:()=>y(!1),sessions:e,milestones:t,onDeleteSession:u,onDeleteConversation:d,onDeleteMilestone:h}),o.jsx(Gu,{sessions:e,milestones:t,onDeleteSession:u,onDeleteConversation:d,onDeleteMilestone:h,activeTab:p,onActiveTabChange:m})]})]})}P.createRoot(document.getElementById("root")).render(o.jsx(f.StrictMode,{children:o.jsx(ud,{})}));</script>
34521
- <style rel="stylesheet" crossorigin>/*! tailwindcss v4.1.18 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial}}}@layer theme{:root,:host{--font-sans:"Inter",system-ui,-apple-system,sans-serif;--font-mono:"Geist Mono","JetBrains Mono","SF Mono","Fira Code",ui-monospace,monospace;--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-md:28rem;--container-2xl:42rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--font-weight-black:900;--tracking-tighter:-.05em;--tracking-tight:-.025em;--tracking-wider:.05em;--tracking-widest:.1em;--leading-tight:1.25;--leading-snug:1.375;--leading-relaxed:1.625;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--radius-2xl:1rem;--animate-spin:spin 1s linear infinite;--animate-pulse:pulse 2s cubic-bezier(.4,0,.6,1)infinite;--blur-sm:8px;--blur-md:12px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--color-bg-base:var(--bg-base);--color-bg-surface-1:var(--bg-surface-1);--color-bg-surface-2:var(--bg-surface-2);--color-bg-surface-3:var(--bg-surface-3);--color-text-primary:var(--text-primary);--color-text-secondary:var(--text-secondary);--color-text-muted:var(--text-muted);--color-accent:var(--accent);--color-accent-bright:var(--accent-bright);--color-success:var(--success);--color-error:var(--error);--color-history:var(--history);--color-border:var(--border);--color-purple:#8b5cf6;--color-blue:#3b82f6;--color-emerald:#34d399}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}*{border-color:var(--color-border)}}@layer components;@layer utilities{.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.sticky{position:sticky}.inset-0{inset:calc(var(--spacing)*0)}.-top-10{top:calc(var(--spacing)*-10)}.top-0{top:calc(var(--spacing)*0)}.top-2{top:calc(var(--spacing)*2)}.top-5{top:calc(var(--spacing)*5)}.top-full{top:100%}.-right-0\\.5{right:calc(var(--spacing)*-.5)}.right-0{right:calc(var(--spacing)*0)}.-bottom-0\\.5{bottom:calc(var(--spacing)*-.5)}.-bottom-1{bottom:calc(var(--spacing)*-1)}.-bottom-1\\.5{bottom:calc(var(--spacing)*-1.5)}.bottom-0{bottom:calc(var(--spacing)*0)}.bottom-2{bottom:calc(var(--spacing)*2)}.-left-7{left:calc(var(--spacing)*-7)}.left-1\\/2{left:50%}.left-2{left:calc(var(--spacing)*2)}.left-\\[1\\.75rem\\]{left:1.75rem}.z-20{z-index:20}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.z-\\[60\\]{z-index:60}.z-\\[61\\]{z-index:61}.z-\\[9999\\]{z-index:9999}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.mx-1{margin-inline:calc(var(--spacing)*1)}.mx-auto{margin-inline:auto}.my-0\\.5{margin-block:calc(var(--spacing)*.5)}.my-1{margin-block:calc(var(--spacing)*1)}.ms-1{margin-inline-start:calc(var(--spacing)*1)}.ms-2{margin-inline-start:calc(var(--spacing)*2)}.ms-3{margin-inline-start:calc(var(--spacing)*3)}.mt-0\\.5{margin-top:calc(var(--spacing)*.5)}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-1\\.5{margin-top:calc(var(--spacing)*1.5)}.mt-2{margin-top:calc(var(--spacing)*2)}.mt-4{margin-top:calc(var(--spacing)*4)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.mb-3{margin-bottom:calc(var(--spacing)*3)}.mb-4{margin-bottom:calc(var(--spacing)*4)}.mb-6{margin-bottom:calc(var(--spacing)*6)}.mb-8{margin-bottom:calc(var(--spacing)*8)}.-ml-2{margin-left:calc(var(--spacing)*-2)}.ml-0\\.5{margin-left:calc(var(--spacing)*.5)}.ml-1\\.5{margin-left:calc(var(--spacing)*1.5)}.ml-auto{margin-left:auto}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline-flex{display:inline-flex}.h-1\\.5{height:calc(var(--spacing)*1.5)}.h-2{height:calc(var(--spacing)*2)}.h-2\\.5{height:calc(var(--spacing)*2.5)}.h-3{height:calc(var(--spacing)*3)}.h-3\\.5{height:calc(var(--spacing)*3.5)}.h-4{height:calc(var(--spacing)*4)}.h-5{height:calc(var(--spacing)*5)}.h-6{height:calc(var(--spacing)*6)}.h-7{height:calc(var(--spacing)*7)}.h-8{height:calc(var(--spacing)*8)}.h-9{height:calc(var(--spacing)*9)}.h-16{height:calc(var(--spacing)*16)}.h-\\[4px\\]{height:4px}.h-full{height:100%}.h-px{height:1px}.max-h-\\[75vh\\]{max-height:75vh}.min-h-screen{min-height:100vh}.w-0{width:calc(var(--spacing)*0)}.w-1\\.5{width:calc(var(--spacing)*1.5)}.w-2{width:calc(var(--spacing)*2)}.w-2\\.5{width:calc(var(--spacing)*2.5)}.w-3{width:calc(var(--spacing)*3)}.w-3\\.5{width:calc(var(--spacing)*3.5)}.w-4{width:calc(var(--spacing)*4)}.w-5{width:calc(var(--spacing)*5)}.w-6{width:calc(var(--spacing)*6)}.w-7{width:calc(var(--spacing)*7)}.w-8{width:calc(var(--spacing)*8)}.w-10{width:calc(var(--spacing)*10)}.w-12{width:calc(var(--spacing)*12)}.w-16{width:calc(var(--spacing)*16)}.w-24{width:calc(var(--spacing)*24)}.w-28{width:calc(var(--spacing)*28)}.w-72{width:calc(var(--spacing)*72)}.w-80{width:calc(var(--spacing)*80)}.w-\\[2px\\]{width:2px}.w-\\[155px\\]{width:155px}.w-full{width:100%}.w-px{width:1px}.max-w-2xl{max-width:var(--container-2xl)}.max-w-\\[130px\\]{max-width:130px}.max-w-\\[140px\\]{max-width:140px}.max-w-\\[280px\\]{max-width:280px}.max-w-\\[1240px\\]{max-width:1240px}.max-w-md{max-width:var(--container-md)}.min-w-0{min-width:calc(var(--spacing)*0)}.min-w-\\[100px\\]{min-width:100px}.min-w-\\[120px\\]{min-width:120px}.min-w-\\[180px\\]{min-width:180px}.flex-1{flex:1}.flex-shrink-0,.shrink-0{flex-shrink:0}.grow{flex-grow:1}.origin-bottom{transform-origin:bottom}.-translate-x-1\\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.scale-105{--tw-scale-x:105%;--tw-scale-y:105%;--tw-scale-z:105%;scale:var(--tw-scale-x)var(--tw-scale-y)}.rotate-45{rotate:45deg}.rotate-180{rotate:180deg}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-default{cursor:default}.cursor-grab{cursor:grab}.cursor-pointer{cursor:pointer}.cursor-text{cursor:text}.touch-none{touch-action:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-\\[86px_minmax\\(0\\,1fr\\)\\]{grid-template-columns:86px minmax(0,1fr)}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-baseline{align-items:baseline}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-0\\.5{gap:calc(var(--spacing)*.5)}.gap-1{gap:calc(var(--spacing)*1)}.gap-1\\.5{gap:calc(var(--spacing)*1.5)}.gap-2{gap:calc(var(--spacing)*2)}.gap-2\\.5{gap:calc(var(--spacing)*2.5)}.gap-3{gap:calc(var(--spacing)*3)}.gap-3\\.5{gap:calc(var(--spacing)*3.5)}.gap-4{gap:calc(var(--spacing)*4)}.gap-\\[3px\\]{gap:3px}:where(.space-y-0\\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*.5)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*.5)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*2)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2\\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*2.5)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*2.5)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*3)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*3)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*4)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*5)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*5)*calc(1 - var(--tw-space-y-reverse)))}.gap-x-2{column-gap:calc(var(--spacing)*2)}.gap-x-5{column-gap:calc(var(--spacing)*5)}.gap-y-1{row-gap:calc(var(--spacing)*1)}.gap-y-2{row-gap:calc(var(--spacing)*2)}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px*var(--tw-divide-y-reverse));border-bottom-width:calc(1px*calc(1 - var(--tw-divide-y-reverse)))}:where(.divide-border\\/30>:not(:last-child)){border-color:var(--color-border)}@supports (color:color-mix(in lab,red,red)){:where(.divide-border\\/30>:not(:last-child)){border-color:color-mix(in oklab,var(--color-border)30%,transparent)}}.self-center{align-self:center}.self-stretch{align-self:stretch}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overscroll-contain{overscroll-behavior:contain}.overscroll-none{overscroll-behavior:none}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-sm{border-radius:var(--radius-sm)}.rounded-xl{border-radius:var(--radius-xl)}.rounded-t-md{border-top-left-radius:var(--radius-md);border-top-right-radius:var(--radius-md)}.rounded-t-sm{border-top-left-radius:var(--radius-sm);border-top-right-radius:var(--radius-sm)}.border{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-accent,.border-accent\\/20{border-color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.border-accent\\/20{border-color:color-mix(in oklab,var(--color-accent)20%,transparent)}}.border-accent\\/30{border-color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.border-accent\\/30{border-color:color-mix(in oklab,var(--color-accent)30%,transparent)}}.border-accent\\/35{border-color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.border-accent\\/35{border-color:color-mix(in oklab,var(--color-accent)35%,transparent)}}.border-accent\\/50{border-color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.border-accent\\/50{border-color:color-mix(in oklab,var(--color-accent)50%,transparent)}}.border-bg-base{border-color:var(--color-bg-base)}.border-bg-surface-1{border-color:var(--color-bg-surface-1)}.border-blue\\/20{border-color:#3b82f633}@supports (color:color-mix(in lab,red,red)){.border-blue\\/20{border-color:color-mix(in oklab,var(--color-blue)20%,transparent)}}.border-blue\\/30{border-color:#3b82f64d}@supports (color:color-mix(in lab,red,red)){.border-blue\\/30{border-color:color-mix(in oklab,var(--color-blue)30%,transparent)}}.border-border,.border-border\\/15{border-color:var(--color-border)}@supports (color:color-mix(in lab,red,red)){.border-border\\/15{border-color:color-mix(in oklab,var(--color-border)15%,transparent)}}.border-border\\/30{border-color:var(--color-border)}@supports (color:color-mix(in lab,red,red)){.border-border\\/30{border-color:color-mix(in oklab,var(--color-border)30%,transparent)}}.border-border\\/40{border-color:var(--color-border)}@supports (color:color-mix(in lab,red,red)){.border-border\\/40{border-color:color-mix(in oklab,var(--color-border)40%,transparent)}}.border-border\\/50{border-color:var(--color-border)}@supports (color:color-mix(in lab,red,red)){.border-border\\/50{border-color:color-mix(in oklab,var(--color-border)50%,transparent)}}.border-border\\/60{border-color:var(--color-border)}@supports (color:color-mix(in lab,red,red)){.border-border\\/60{border-color:color-mix(in oklab,var(--color-border)60%,transparent)}}.border-emerald\\/20{border-color:#34d39933}@supports (color:color-mix(in lab,red,red)){.border-emerald\\/20{border-color:color-mix(in oklab,var(--color-emerald)20%,transparent)}}.border-emerald\\/30{border-color:#34d3994d}@supports (color:color-mix(in lab,red,red)){.border-emerald\\/30{border-color:color-mix(in oklab,var(--color-emerald)30%,transparent)}}.border-error\\/20{border-color:var(--color-error)}@supports (color:color-mix(in lab,red,red)){.border-error\\/20{border-color:color-mix(in oklab,var(--color-error)20%,transparent)}}.border-error\\/30{border-color:var(--color-error)}@supports (color:color-mix(in lab,red,red)){.border-error\\/30{border-color:color-mix(in oklab,var(--color-error)30%,transparent)}}.border-history,.border-history\\/20{border-color:var(--color-history)}@supports (color:color-mix(in lab,red,red)){.border-history\\/20{border-color:color-mix(in oklab,var(--color-history)20%,transparent)}}.border-purple\\/20{border-color:#8b5cf633}@supports (color:color-mix(in lab,red,red)){.border-purple\\/20{border-color:color-mix(in oklab,var(--color-purple)20%,transparent)}}.border-purple\\/30{border-color:#8b5cf64d}@supports (color:color-mix(in lab,red,red)){.border-purple\\/30{border-color:color-mix(in oklab,var(--color-purple)30%,transparent)}}.border-success\\/20{border-color:var(--color-success)}@supports (color:color-mix(in lab,red,red)){.border-success\\/20{border-color:color-mix(in oklab,var(--color-success)20%,transparent)}}.border-success\\/30{border-color:var(--color-success)}@supports (color:color-mix(in lab,red,red)){.border-success\\/30{border-color:color-mix(in oklab,var(--color-success)30%,transparent)}}.border-text-muted\\/20{border-color:var(--color-text-muted)}@supports (color:color-mix(in lab,red,red)){.border-text-muted\\/20{border-color:color-mix(in oklab,var(--color-text-muted)20%,transparent)}}.bg-\\[var\\(--accent-alpha\\)\\]{background-color:var(--accent-alpha)}.bg-accent,.bg-accent\\/5{background-color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.bg-accent\\/5{background-color:color-mix(in oklab,var(--color-accent)5%,transparent)}}.bg-accent\\/8{background-color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.bg-accent\\/8{background-color:color-mix(in oklab,var(--color-accent)8%,transparent)}}.bg-accent\\/10{background-color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.bg-accent\\/10{background-color:color-mix(in oklab,var(--color-accent)10%,transparent)}}.bg-accent\\/15{background-color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.bg-accent\\/15{background-color:color-mix(in oklab,var(--color-accent)15%,transparent)}}.bg-accent\\/30{background-color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.bg-accent\\/30{background-color:color-mix(in oklab,var(--color-accent)30%,transparent)}}.bg-accent\\/50{background-color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.bg-accent\\/50{background-color:color-mix(in oklab,var(--color-accent)50%,transparent)}}.bg-accent\\/60{background-color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.bg-accent\\/60{background-color:color-mix(in oklab,var(--color-accent)60%,transparent)}}.bg-bg-base,.bg-bg-base\\/30{background-color:var(--color-bg-base)}@supports (color:color-mix(in lab,red,red)){.bg-bg-base\\/30{background-color:color-mix(in oklab,var(--color-bg-base)30%,transparent)}}.bg-bg-base\\/80{background-color:var(--color-bg-base)}@supports (color:color-mix(in lab,red,red)){.bg-bg-base\\/80{background-color:color-mix(in oklab,var(--color-bg-base)80%,transparent)}}.bg-bg-surface-1,.bg-bg-surface-1\\/30{background-color:var(--color-bg-surface-1)}@supports (color:color-mix(in lab,red,red)){.bg-bg-surface-1\\/30{background-color:color-mix(in oklab,var(--color-bg-surface-1)30%,transparent)}}.bg-bg-surface-1\\/35{background-color:var(--color-bg-surface-1)}@supports (color:color-mix(in lab,red,red)){.bg-bg-surface-1\\/35{background-color:color-mix(in oklab,var(--color-bg-surface-1)35%,transparent)}}.bg-bg-surface-1\\/50{background-color:var(--color-bg-surface-1)}@supports (color:color-mix(in lab,red,red)){.bg-bg-surface-1\\/50{background-color:color-mix(in oklab,var(--color-bg-surface-1)50%,transparent)}}.bg-bg-surface-1\\/80{background-color:var(--color-bg-surface-1)}@supports (color:color-mix(in lab,red,red)){.bg-bg-surface-1\\/80{background-color:color-mix(in oklab,var(--color-bg-surface-1)80%,transparent)}}.bg-bg-surface-2,.bg-bg-surface-2\\/30{background-color:var(--color-bg-surface-2)}@supports (color:color-mix(in lab,red,red)){.bg-bg-surface-2\\/30{background-color:color-mix(in oklab,var(--color-bg-surface-2)30%,transparent)}}.bg-bg-surface-2\\/50{background-color:var(--color-bg-surface-2)}@supports (color:color-mix(in lab,red,red)){.bg-bg-surface-2\\/50{background-color:color-mix(in oklab,var(--color-bg-surface-2)50%,transparent)}}.bg-bg-surface-3,.bg-bg-surface-3\\/95{background-color:var(--color-bg-surface-3)}@supports (color:color-mix(in lab,red,red)){.bg-bg-surface-3\\/95{background-color:color-mix(in oklab,var(--color-bg-surface-3)95%,transparent)}}.bg-black{background-color:var(--color-black)}.bg-black\\/40{background-color:#0006}@supports (color:color-mix(in lab,red,red)){.bg-black\\/40{background-color:color-mix(in oklab,var(--color-black)40%,transparent)}}.bg-blue\\/10{background-color:#3b82f61a}@supports (color:color-mix(in lab,red,red)){.bg-blue\\/10{background-color:color-mix(in oklab,var(--color-blue)10%,transparent)}}.bg-blue\\/15{background-color:#3b82f626}@supports (color:color-mix(in lab,red,red)){.bg-blue\\/15{background-color:color-mix(in oklab,var(--color-blue)15%,transparent)}}.bg-border\\/20{background-color:var(--color-border)}@supports (color:color-mix(in lab,red,red)){.bg-border\\/20{background-color:color-mix(in oklab,var(--color-border)20%,transparent)}}.bg-border\\/30{background-color:var(--color-border)}@supports (color:color-mix(in lab,red,red)){.bg-border\\/30{background-color:color-mix(in oklab,var(--color-border)30%,transparent)}}.bg-border\\/50{background-color:var(--color-border)}@supports (color:color-mix(in lab,red,red)){.bg-border\\/50{background-color:color-mix(in oklab,var(--color-border)50%,transparent)}}.bg-emerald\\/10{background-color:#34d3991a}@supports (color:color-mix(in lab,red,red)){.bg-emerald\\/10{background-color:color-mix(in oklab,var(--color-emerald)10%,transparent)}}.bg-emerald\\/15{background-color:#34d39926}@supports (color:color-mix(in lab,red,red)){.bg-emerald\\/15{background-color:color-mix(in oklab,var(--color-emerald)15%,transparent)}}.bg-error,.bg-error\\/10{background-color:var(--color-error)}@supports (color:color-mix(in lab,red,red)){.bg-error\\/10{background-color:color-mix(in oklab,var(--color-error)10%,transparent)}}.bg-error\\/15{background-color:var(--color-error)}@supports (color:color-mix(in lab,red,red)){.bg-error\\/15{background-color:color-mix(in oklab,var(--color-error)15%,transparent)}}.bg-history,.bg-history\\/10{background-color:var(--color-history)}@supports (color:color-mix(in lab,red,red)){.bg-history\\/10{background-color:color-mix(in oklab,var(--color-history)10%,transparent)}}.bg-purple\\/10{background-color:#8b5cf61a}@supports (color:color-mix(in lab,red,red)){.bg-purple\\/10{background-color:color-mix(in oklab,var(--color-purple)10%,transparent)}}.bg-purple\\/15{background-color:#8b5cf626}@supports (color:color-mix(in lab,red,red)){.bg-purple\\/15{background-color:color-mix(in oklab,var(--color-purple)15%,transparent)}}.bg-success,.bg-success\\/10{background-color:var(--color-success)}@supports (color:color-mix(in lab,red,red)){.bg-success\\/10{background-color:color-mix(in oklab,var(--color-success)10%,transparent)}}.bg-success\\/15{background-color:var(--color-success)}@supports (color:color-mix(in lab,red,red)){.bg-success\\/15{background-color:color-mix(in oklab,var(--color-success)15%,transparent)}}.bg-text-muted,.bg-text-muted\\/10{background-color:var(--color-text-muted)}@supports (color:color-mix(in lab,red,red)){.bg-text-muted\\/10{background-color:color-mix(in oklab,var(--color-text-muted)10%,transparent)}}.bg-text-muted\\/15{background-color:var(--color-text-muted)}@supports (color:color-mix(in lab,red,red)){.bg-text-muted\\/15{background-color:color-mix(in oklab,var(--color-text-muted)15%,transparent)}}.bg-transparent{background-color:#0000}.bg-gradient-to-t{--tw-gradient-position:to top in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.from-transparent{--tw-gradient-from:transparent;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-white\\/10{--tw-gradient-to:#ffffff1a}@supports (color:color-mix(in lab,red,red)){.to-white\\/10{--tw-gradient-to:color-mix(in oklab,var(--color-white)10%,transparent)}}.to-white\\/10{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.p-0\\.5{padding:calc(var(--spacing)*.5)}.p-1{padding:calc(var(--spacing)*1)}.p-1\\.5{padding:calc(var(--spacing)*1.5)}.p-2{padding:calc(var(--spacing)*2)}.p-3{padding:calc(var(--spacing)*3)}.p-4{padding:calc(var(--spacing)*4)}.p-5{padding:calc(var(--spacing)*5)}.px-0\\.5{padding-inline:calc(var(--spacing)*.5)}.px-1{padding-inline:calc(var(--spacing)*1)}.px-1\\.5{padding-inline:calc(var(--spacing)*1.5)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-2\\.5{padding-inline:calc(var(--spacing)*2.5)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-3\\.5{padding-inline:calc(var(--spacing)*3.5)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-5{padding-inline:calc(var(--spacing)*5)}.px-6{padding-inline:calc(var(--spacing)*6)}.px-px{padding-inline:1px}.py-0\\.5{padding-block:calc(var(--spacing)*.5)}.py-1{padding-block:calc(var(--spacing)*1)}.py-1\\.5{padding-block:calc(var(--spacing)*1.5)}.py-2{padding-block:calc(var(--spacing)*2)}.py-2\\.5{padding-block:calc(var(--spacing)*2.5)}.py-3{padding-block:calc(var(--spacing)*3)}.py-4{padding-block:calc(var(--spacing)*4)}.py-6{padding-block:calc(var(--spacing)*6)}.py-8{padding-block:calc(var(--spacing)*8)}.py-12{padding-block:calc(var(--spacing)*12)}.py-16{padding-block:calc(var(--spacing)*16)}.pt-0\\.5{padding-top:calc(var(--spacing)*.5)}.pt-1\\.5{padding-top:calc(var(--spacing)*1.5)}.pt-2{padding-top:calc(var(--spacing)*2)}.pt-3{padding-top:calc(var(--spacing)*3)}.pt-\\[10vh\\]{padding-top:10vh}.pb-1{padding-bottom:calc(var(--spacing)*1)}.pb-2{padding-bottom:calc(var(--spacing)*2)}.pb-2\\.5{padding-bottom:calc(var(--spacing)*2.5)}.pb-3\\.5{padding-bottom:calc(var(--spacing)*3.5)}.pb-6{padding-bottom:calc(var(--spacing)*6)}.pl-3{padding-left:calc(var(--spacing)*3)}.pl-10{padding-left:calc(var(--spacing)*10)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.font-mono{font-family:var(--font-mono)}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\\[7px\\]{font-size:7px}.text-\\[8px\\]{font-size:8px}.text-\\[9px\\]{font-size:9px}.text-\\[10px\\]{font-size:10px}.text-\\[11px\\]{font-size:11px}.text-\\[15px\\]{font-size:15px}.leading-none{--tw-leading:1;line-height:1}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-snug{--tw-leading:var(--leading-snug);line-height:var(--leading-snug)}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-black{--tw-font-weight:var(--font-weight-black);font-weight:var(--font-weight-black)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-tighter{--tw-tracking:var(--tracking-tighter);letter-spacing:var(--tracking-tighter)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.tracking-widest{--tw-tracking:var(--tracking-widest);letter-spacing:var(--tracking-widest)}.break-words{overflow-wrap:break-word}.whitespace-nowrap{white-space:nowrap}.text-accent,.text-accent\\/70{color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.text-accent\\/70{color:color-mix(in oklab,var(--color-accent)70%,transparent)}}.text-accent\\/90{color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.text-accent\\/90{color:color-mix(in oklab,var(--color-accent)90%,transparent)}}.text-bg-base{color:var(--color-bg-base)}.text-blue{color:var(--color-blue)}.text-emerald{color:var(--color-emerald)}.text-error,.text-error\\/80{color:var(--color-error)}@supports (color:color-mix(in lab,red,red)){.text-error\\/80{color:color-mix(in oklab,var(--color-error)80%,transparent)}}.text-history{color:var(--color-history)}.text-inherit{color:inherit}.text-purple{color:var(--color-purple)}.text-success,.text-success\\/70{color:var(--color-success)}@supports (color:color-mix(in lab,red,red)){.text-success\\/70{color:color-mix(in oklab,var(--color-success)70%,transparent)}}.text-text-muted,.text-text-muted\\/30{color:var(--color-text-muted)}@supports (color:color-mix(in lab,red,red)){.text-text-muted\\/30{color:color-mix(in oklab,var(--color-text-muted)30%,transparent)}}.text-text-muted\\/50{color:var(--color-text-muted)}@supports (color:color-mix(in lab,red,red)){.text-text-muted\\/50{color:color-mix(in oklab,var(--color-text-muted)50%,transparent)}}.text-text-muted\\/60{color:var(--color-text-muted)}@supports (color:color-mix(in lab,red,red)){.text-text-muted\\/60{color:color-mix(in oklab,var(--color-text-muted)60%,transparent)}}.text-text-muted\\/70{color:var(--color-text-muted)}@supports (color:color-mix(in lab,red,red)){.text-text-muted\\/70{color:color-mix(in oklab,var(--color-text-muted)70%,transparent)}}.text-text-primary{color:var(--color-text-primary)}.text-text-secondary,.text-text-secondary\\/80{color:var(--color-text-secondary)}@supports (color:color-mix(in lab,red,red)){.text-text-secondary\\/80{color:color-mix(in oklab,var(--color-text-secondary)80%,transparent)}}.text-text-secondary\\/85{color:var(--color-text-secondary)}@supports (color:color-mix(in lab,red,red)){.text-text-secondary\\/85{color:color-mix(in oklab,var(--color-text-secondary)85%,transparent)}}.text-white{color:var(--color-white)}.capitalize{text-transform:capitalize}.lowercase{text-transform:lowercase}.uppercase{text-transform:uppercase}.italic{font-style:italic}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}.opacity-0{opacity:0}.opacity-70{opacity:.7}.opacity-75{opacity:.75}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-inner{--tw-shadow:inset 0 2px 4px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a),0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-2{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-accent{--tw-ring-color:var(--color-accent)}.ring-offset-2{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.ring-offset-bg-base{--tw-ring-offset-color:var(--color-bg-base)}.filter{filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.backdrop-blur-md{--tw-backdrop-blur:blur(var(--blur-md));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.duration-500{--tw-duration:.5s;transition-duration:.5s}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}.\\[daemon\\:err\\]{daemon:err}@media(hover:hover){.group-hover\\:scale-x-110:is(:where(.group):hover *){--tw-scale-x:110%;scale:var(--tw-scale-x)var(--tw-scale-y)}.group-hover\\:-rotate-90:is(:where(.group):hover *){rotate:-90deg}.group-hover\\:bg-accent:is(:where(.group):hover *),.group-hover\\:bg-accent\\/10:is(:where(.group):hover *){background-color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.group-hover\\:bg-accent\\/10:is(:where(.group):hover *){background-color:color-mix(in oklab,var(--color-accent)10%,transparent)}}.group-hover\\:text-accent:is(:where(.group):hover *){color:var(--color-accent)}.group-hover\\:text-text-primary:is(:where(.group):hover *){color:var(--color-text-primary)}.group-hover\\:opacity-100:is(:where(.group):hover *),.group-hover\\/card\\:opacity-100:is(:where(.group\\/card):hover *),.group-hover\\/conv\\:opacity-100:is(:where(.group\\/conv):hover *){opacity:1}}.selection\\:bg-accent\\/30 ::selection{background-color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.selection\\:bg-accent\\/30 ::selection{background-color:color-mix(in oklab,var(--color-accent)30%,transparent)}}.selection\\:bg-accent\\/30::selection{background-color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.selection\\:bg-accent\\/30::selection{background-color:color-mix(in oklab,var(--color-accent)30%,transparent)}}.selection\\:text-text-primary ::selection{color:var(--color-text-primary)}.selection\\:text-text-primary::selection{color:var(--color-text-primary)}.placeholder\\:text-text-muted\\/50::placeholder{color:var(--color-text-muted)}@supports (color:color-mix(in lab,red,red)){.placeholder\\:text-text-muted\\/50::placeholder{color:color-mix(in oklab,var(--color-text-muted)50%,transparent)}}.focus-within\\:border-accent\\/50:focus-within{border-color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.focus-within\\:border-accent\\/50:focus-within{border-color:color-mix(in oklab,var(--color-accent)50%,transparent)}}.focus-within\\:opacity-100:focus-within{opacity:1}.focus-within\\:ring-1:focus-within{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-within\\:ring-accent\\/50:focus-within{--tw-ring-color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.focus-within\\:ring-accent\\/50:focus-within{--tw-ring-color:color-mix(in oklab,var(--color-accent)50%,transparent)}}@media(hover:hover){.hover\\:scale-125:hover{--tw-scale-x:125%;--tw-scale-y:125%;--tw-scale-z:125%;scale:var(--tw-scale-x)var(--tw-scale-y)}.hover\\:border-accent\\/30:hover{border-color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.hover\\:border-accent\\/30:hover{border-color:color-mix(in oklab,var(--color-accent)30%,transparent)}}.hover\\:border-accent\\/40:hover{border-color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.hover\\:border-accent\\/40:hover{border-color:color-mix(in oklab,var(--color-accent)40%,transparent)}}.hover\\:border-text-muted\\/50:hover{border-color:var(--color-text-muted)}@supports (color:color-mix(in lab,red,red)){.hover\\:border-text-muted\\/50:hover{border-color:color-mix(in oklab,var(--color-text-muted)50%,transparent)}}.hover\\:bg-accent-bright:hover{background-color:var(--color-accent-bright)}.hover\\:bg-accent\\/15:hover{background-color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-accent\\/15:hover{background-color:color-mix(in oklab,var(--color-accent)15%,transparent)}}.hover\\:bg-bg-surface-1:hover{background-color:var(--color-bg-surface-1)}.hover\\:bg-bg-surface-2:hover,.hover\\:bg-bg-surface-2\\/40:hover{background-color:var(--color-bg-surface-2)}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-bg-surface-2\\/40:hover{background-color:color-mix(in oklab,var(--color-bg-surface-2)40%,transparent)}}.hover\\:bg-bg-surface-2\\/50:hover{background-color:var(--color-bg-surface-2)}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-bg-surface-2\\/50:hover{background-color:color-mix(in oklab,var(--color-bg-surface-2)50%,transparent)}}.hover\\:bg-bg-surface-3:hover{background-color:var(--color-bg-surface-3)}.hover\\:bg-error\\/5:hover{background-color:var(--color-error)}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-error\\/5:hover{background-color:color-mix(in oklab,var(--color-error)5%,transparent)}}.hover\\:bg-error\\/10:hover{background-color:var(--color-error)}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-error\\/10:hover{background-color:color-mix(in oklab,var(--color-error)10%,transparent)}}.hover\\:bg-error\\/25:hover{background-color:var(--color-error)}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-error\\/25:hover{background-color:color-mix(in oklab,var(--color-error)25%,transparent)}}.hover\\:bg-history:hover{background-color:var(--color-history)}.hover\\:text-accent:hover{color:var(--color-accent)}.hover\\:text-accent-bright:hover{color:var(--color-accent-bright)}.hover\\:text-accent\\/80:hover{color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.hover\\:text-accent\\/80:hover{color:color-mix(in oklab,var(--color-accent)80%,transparent)}}.hover\\:text-error:hover,.hover\\:text-error\\/70:hover{color:var(--color-error)}@supports (color:color-mix(in lab,red,red)){.hover\\:text-error\\/70:hover{color:color-mix(in oklab,var(--color-error)70%,transparent)}}.hover\\:text-text-primary:hover{color:var(--color-text-primary)}.hover\\:text-white:hover{color:var(--color-white)}.hover\\:opacity-80:hover{opacity:.8}.hover\\:brightness-110:hover{--tw-brightness:brightness(110%);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}}.active\\:cursor-grabbing:active{cursor:grabbing}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:opacity-20:disabled{opacity:.2}.disabled\\:opacity-30:disabled{opacity:.3}.disabled\\:opacity-50:disabled{opacity:.5}@media(min-width:40rem){.sm\\:inline{display:inline}.sm\\:inline-flex{display:inline-flex}.sm\\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\\:flex-row{flex-direction:row}.sm\\:px-6{padding-inline:calc(var(--spacing)*6)}}@media(min-width:48rem){.md\\:block{display:block}.md\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\\:flex-row{flex-direction:row}.md\\:items-center{align-items:center}}@media(min-width:64rem){.lg\\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.lg\\:grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))}}}:root{--text-primary:#fafafa;--text-secondary:#a1a1aa;--text-muted:#71717a;--accent:#b4f82c;--accent-bright:#d4fc6e;--accent-dim:#4d7c0f;--accent-rgb:180,248,44;--success:#b4f82c;--error:#ef4444;--streak:#f59e0b;--streak-bg:#f59e0b0f;--streak-border:#f59e0b33;--streak-muted:#f59e0b80;--history:#60a5fa;--history-rgb:96,165,250;--glass-border:#ffffff0d;--grid-color:#ffffff14;--glow-opacity:.15;--glow-blue:#3b82f626;--shadow-glow:rgba(var(--accent-rgb),.1);--accent-alpha:rgba(var(--accent-rgb),.05)}@media(prefers-color-scheme:light){:root{--text-primary:#09090b;--text-secondary:#52525b;--text-muted:#5f6068;--accent:#65a30d;--accent-bright:#84cc16;--accent-dim:#f7fee7;--accent-rgb:101,163,13;--success:#65a30d;--error:#dc2626;--streak:#b45309;--streak-bg:#b453090f;--streak-border:#b4530933;--streak-muted:#b4530980;--history:#2563eb;--history-rgb:37,99,235;--glass-border:#0000000d;--grid-color:#0000000a;--glow-opacity:.25;--glow-blue:#3b82f640;--shadow-glow:#00000014;--accent-alpha:rgba(var(--accent-rgb),.15)}}::selection{background-color:rgba(var(--accent-rgb),.3);color:var(--accent-bright)}.glass-card{background:var(--glass-bg);-webkit-backdrop-filter:blur(12px);border:1px solid var(--glass-border);box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -1px #0000000f}.glass-panel{background:var(--glass-bg);-webkit-backdrop-filter:blur(20px);border:1px solid var(--glass-border);will-change:transform,backdrop-filter;transform:translateZ(0);box-shadow:0 8px 32px #0000004d,inset 0 0 0 1px #ffffff0d}.hud-border{background:var(--bg-surface-1);position:relative}.hud-border:before{content:"";border:1px solid rgba(var(--accent-rgb),.2);pointer-events:none;border-radius:inherit;position:absolute;inset:0;-webkit-mask-image:linear-gradient(#000,#0000);mask-image:linear-gradient(#000,#0000)}.hud-border:after{content:"";border-top:2px solid var(--accent);border-left:2px solid var(--accent);border-top-left-radius:inherit;width:10px;height:10px;position:absolute;top:-1px;left:-1px}.gradient-text{background:linear-gradient(135deg,var(--text-primary),var(--text-secondary));-webkit-text-fill-color:transparent;-webkit-background-clip:text;background-clip:text}.gradient-text-accent{background:linear-gradient(135deg,var(--accent),var(--accent-bright));-webkit-text-fill-color:transparent;text-shadow:0 0 20px rgba(var(--accent-rgb),.4);-webkit-background-clip:text;background-clip:text}.subtle-glow{position:relative}.subtle-glow:after{content:"";background:linear-gradient(45deg,transparent,rgba(var(--accent-rgb),.1),transparent);border-radius:inherit;z-index:-1;pointer-events:none;position:absolute;inset:-1px}:root{--bg-base:#040405;--bg-surface-1:#0e0e11;--bg-surface-2:#18181b;--bg-surface-3:#27272a;--border:#ffffff14;--border-accent:rgba(var(--accent-rgb),.3);--glass-bg:#0e0e1199}@media(prefers-color-scheme:light){:root{--bg-base:#fafafa;--bg-surface-1:#fff;--bg-surface-2:#f4f4f5;--bg-surface-3:#e4e4e7;--border:#e4e4e7;--border-accent:rgba(var(--accent-rgb),.4);--glass-bg:#ffffffb3}}::-webkit-scrollbar{width:5px;height:5px}::-webkit-scrollbar-track{background:0 0}::-webkit-scrollbar-thumb{background:var(--color-bg-surface-3);border-radius:10px}::-webkit-scrollbar-thumb:hover{background:var(--color-text-muted)}body{font-family:var(--font-sans);background:var(--color-bg-base);color:var(--color-text-primary);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;min-height:100vh;margin:0;line-height:1.6}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"<length-percentage>";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"<length-percentage>";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"<length-percentage>";inherits:false;initial-value:100%}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(360deg)}}@keyframes pulse{50%{opacity:.5}}</style>
34812
+ */function kc(e){if(mc[e])return e;return wc.filter(t=>e.startsWith(t)).sort((e,t)=>t.length-e.length)[0]??e}var Sc=E(),jc=new Map;function Cc(e){let t=jc.get(e);return void 0===t&&(t=new Date(e).getTime(),jc.set(e,t)),t}function Nc(e){if(0===e.length)return 0;const t=new Set;for(const i of e)t.add(i.started_at.slice(0,10));const n=[...t].sort().reverse();if(0===n.length)return 0;const r=(new Date).toISOString().slice(0,10),a=new Date(Date.now()-864e5).toISOString().slice(0,10);if(n[0]!==r&&n[0]!==a)return 0;let s=1;for(let i=1;i<n.length;i++){const e=new Date(n[i-1]),t=new Date(n[i]);if(1!==(e.getTime()-t.getTime())/864e5)break;s++}return s}function Tc(e){const t=e.filter(e=>e.session.evaluation);if(0===t.length)return null;let n=0,r=0,a=0,s=0,i=0,o=0;const l={};for(const u of t){const e=u.session.evaluation;n+=e.prompt_quality,r+=e.context_provided,a+=e.independence_level,s+=e.scope_quality,i+=e.tools_leveraged,o+=e.iteration_count,l[e.task_outcome]=(l[e.task_outcome]??0)+1}const c=t.length;return{prompt_quality:Math.round(n/c*10)/10,context_provided:Math.round(r/c*10)/10,independence_level:Math.round(a/c*10)/10,scope_quality:Math.round(s/c*10)/10,tools_leveraged:Math.round(i/c),total_iterations:o,outcomes:l,session_count:c}}function Ec({sessions:e,timeScale:t,effectiveTime:n,isLive:r,onDayClick:a,highlightDate:s}){const i="day"===t||"24h"===t||"12h"===t||"6h"===t,l=new Date(n).toISOString().slice(0,10),c=h.useMemo(()=>i?function(e,t){const n=new Date(\`\${t}T00:00:00\`).getTime(),r=n+864e5,a=[];for(let s=0;s<24;s++)a.push({hour:s,minutes:0});for(const s of e){const e=Cc(s.started_at),t=Cc(s.ended_at);if(t<n||e>r)continue;const i=Math.max(e,n),o=Math.min(t,r);for(let r=0;r<24;r++){const e=n+36e5*r,t=e+36e5,s=Math.max(i,e),l=Math.min(o,t);l>s&&(a[r].minutes+=(l-s)/6e4)}}return a}(e,l):[],[e,l,i]),u=h.useMemo(()=>i?[]:function(e,t){const n=new Date,r=[];for(let a=t-1;a>=0;a--){const t=new Date(n);t.setDate(t.getDate()-a);const s=t.toISOString().slice(0,10);let i=0;for(const n of e)n.started_at.slice(0,10)===s&&(i+=n.duration_seconds);r.push({date:s,hours:i/3600})}return r}(e,7),[e,i]),d=i?\`Hourly \u2014 \${new Date(n).toLocaleDateString([],{month:"short",day:"numeric"})}\`:"Last 7 Days";if(i){const e=Math.max(...c.map(e=>e.minutes),1);return o.jsxs("div",{className:"mb-8 p-5 rounded-2xl bg-bg-surface-1/50 border border-border/50",children:[o.jsxs("div",{className:"flex items-center justify-between mb-4 px-1",children:[o.jsx("div",{className:"text-xs text-text-muted uppercase tracking-widest font-bold",children:d}),o.jsxs("div",{className:"text-[10px] text-text-muted font-mono bg-bg-surface-2 px-2 py-0.5 rounded",children:[e.toFixed(0),"m peak"]})]}),o.jsx("div",{className:"flex items-end gap-[3px] h-16",children:c.map((t,n)=>{const r=e>0?t.minutes/e*100:0;return o.jsxs("div",{className:"flex-1 flex flex-col items-center justify-end h-full group relative",children:[o.jsx("div",{className:"absolute -top-10 left-1/2 -translate-x-1/2 opacity-0 group-hover:opacity-100 transition-opacity z-20 pointer-events-none",children:o.jsxs("div",{className:"bg-bg-surface-3 text-text-primary text-[10px] font-mono px-2 py-1.5 rounded-lg shadow-xl whitespace-nowrap border border-border flex flex-col items-center",children:[o.jsxs("span",{className:"font-bold",children:[t.hour,":00"]}),o.jsxs("span",{className:"text-accent",children:[t.minutes.toFixed(0),"m active"]}),o.jsx("div",{className:"absolute -bottom-1 left-1/2 -translate-x-1/2 w-2 h-2 bg-bg-surface-3 border-r border-b border-border rotate-45"})]})}),o.jsx(pl.div,{initial:{height:0},animate:{height:\`\${Math.max(r,t.minutes>0?8:0)}%\`},transition:{delay:.01*n,duration:.5},className:"w-full rounded-t-sm transition-all duration-300 group-hover:bg-accent relative overflow-hidden",style:{minHeight:t.minutes>0?"4px":"0px",backgroundColor:t.minutes>0?\`rgba(var(--accent-rgb), \${.4+t.minutes/e*.6})\`:"var(--color-bg-surface-2)"},children:t.minutes>.5*e&&o.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-transparent to-white/10"})})]},t.hour)})}),o.jsx("div",{className:"flex gap-[3px] mt-2 border-t border-border/30 pt-2",children:c.map(e=>o.jsx("div",{className:"flex-1 text-center",children:e.hour%6==0&&o.jsx("span",{className:"text-[9px] text-text-muted font-bold font-mono uppercase",children:0===e.hour?"12a":e.hour<12?\`\${e.hour}a\`:12===e.hour?"12p":e.hour-12+"p"})},e.hour))})]})}const f=Math.max(...u.map(e=>e.hours),.1);return o.jsxs("div",{className:"mb-8 p-5 rounded-2xl bg-bg-surface-1/50 border border-border/50",children:[o.jsxs("div",{className:"flex items-center justify-between mb-4 px-1",children:[o.jsx("div",{className:"text-xs text-text-muted uppercase tracking-widest font-bold",children:d}),o.jsx("div",{className:"text-[10px] text-text-muted font-mono bg-bg-surface-2 px-2 py-0.5 rounded",children:"Last 7 days"})]}),o.jsx("div",{className:"flex items-end gap-2 h-16",children:u.map((e,t)=>{const n=f>0?e.hours/f*100:0,r=e.date===s;return o.jsxs("div",{className:"flex-1 flex flex-col items-center justify-end h-full group relative",children:[o.jsx("div",{className:"absolute -top-10 left-1/2 -translate-x-1/2 opacity-0 group-hover:opacity-100 transition-opacity z-20 pointer-events-none",children:o.jsxs("div",{className:"bg-bg-surface-3 text-text-primary text-[10px] font-mono px-2 py-1.5 rounded-lg shadow-xl whitespace-nowrap border border-border flex flex-col items-center",children:[o.jsx("span",{className:"font-bold",children:e.date}),o.jsxs("span",{className:"text-accent",children:[e.hours.toFixed(1),"h active"]}),o.jsx("div",{className:"absolute -bottom-1 left-1/2 -translate-x-1/2 w-2 h-2 bg-bg-surface-3 border-r border-b border-border rotate-45"})]})}),o.jsx(pl.div,{initial:{height:0},animate:{height:\`\${Math.max(n,e.hours>0?8:0)}%\`},transition:{delay:.05*t,duration:.5},className:"w-full rounded-t-md cursor-pointer transition-all duration-300 group-hover:scale-x-110 origin-bottom "+(r?"ring-2 ring-accent ring-offset-2 ring-offset-bg-base":""),style:{minHeight:e.hours>0?"4px":"0px",backgroundColor:r?"var(--color-accent-bright)":e.hours>0?\`rgba(var(--accent-rgb), \${.4+e.hours/f*.6})\`:"var(--color-bg-surface-2)"},onClick:()=>a?.(e.date)})]},e.date)})}),o.jsx("div",{className:"flex gap-2 mt-2 border-t border-border/30 pt-2",children:u.map(e=>o.jsx("div",{className:"flex-1 text-center",children:o.jsx("span",{className:"text-[10px] text-text-muted font-bold uppercase tracking-tighter",children:new Date(e.date+"T12:00:00").toLocaleDateString([],{weekday:"short"})})},e.date))})]})}var Mc=[{key:"simple",label:"Simple",color:"#34d399"},{key:"medium",label:"Medium",color:"#fbbf24"},{key:"complex",label:"Complex",color:"#f87171"}];function Pc({data:e}){const t=e.simple+e.medium+e.complex;if(0===t)return null;const n=Math.max(e.simple,e.medium,e.complex);return o.jsxs(pl.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.15},className:"rounded-xl bg-bg-surface-1 border border-border/50 p-4",children:[o.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[o.jsx("div",{className:"p-1.5 rounded-lg bg-bg-surface-2",children:o.jsx(Ul,{className:"w-3.5 h-3.5 text-text-muted"})}),o.jsx("h2",{className:"text-sm font-bold text-text-muted uppercase tracking-widest",children:"Complexity"})]}),o.jsx("div",{className:"space-y-3",children:Mc.map((r,a)=>{const s=e[r.key],i=n>0?s/n*100:0,l=t>0?(s/t*100).toFixed(0):"0";return o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("span",{className:"text-xs text-text-secondary font-medium w-16 text-right shrink-0",children:r.label}),o.jsx("div",{className:"flex-1 h-5 rounded bg-bg-surface-2/50 overflow-hidden",children:o.jsx(pl.div,{className:"h-full rounded",style:{backgroundColor:r.color},initial:{width:0},animate:{width:\`\${i}%\`},transition:{duration:.6,delay:.08*a,ease:[.22,1,.36,1]}})}),o.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[o.jsx("span",{className:"text-xs text-text-primary font-mono font-bold w-6 text-right",children:s}),o.jsxs("span",{className:"text-[10px] text-text-muted/70 font-mono w-8 text-right",children:[l,"%"]})]})]},r.key)})}),o.jsx("div",{className:"mt-4 flex h-2 rounded-full overflow-hidden bg-bg-surface-2/30",children:Mc.map(n=>{const r=e[n.key],a=t>0?r/t*100:0;return 0===a?null:o.jsx(pl.div,{className:"h-full",style:{backgroundColor:n.color},initial:{width:0},animate:{width:\`\${a}%\`},transition:{duration:.8,ease:[.22,1,.36,1]}},n.key)})})]})}var Lc=["1h","3h","6h","12h"],Dc=["day","week","month"],Ac=["1h","3h","6h","12h","24h","day","7d","week","30d","month"],_c={day:"24h",week:"7d",month:"30d"},zc={"24h":"day","7d":"week","30d":"month"};function Rc(e){return"day"===e||"week"===e||"month"===e}var Fc={"1h":36e5,"3h":108e5,"6h":216e5,"12h":432e5,"24h":864e5,"7d":6048e5,"30d":2592e6},Vc={"1h":"1 Hour","3h":"3 Hours","6h":"6 Hours","12h":"12 Hours","24h":"24 Hours",day:"Day","7d":"7 Days",week:"Week","30d":"30 Days",month:"Month"};function Ic(e,t){const n=Fc[e];if(void 0!==n)return{start:t-n,end:t};const r=new Date(t);if("day"===e){const e=new Date(r.getFullYear(),r.getMonth(),r.getDate()).getTime();return{start:e,end:e+864e5}}if("week"===e){const e=r.getDay(),t=0===e?-6:1-e,n=new Date(r.getFullYear(),r.getMonth(),r.getDate()+t).getTime();return{start:n,end:n+6048e5}}return{start:new Date(r.getFullYear(),r.getMonth(),1).getTime(),end:new Date(r.getFullYear(),r.getMonth()+1,1).getTime()}}function Oc(e,t,n){const r=Fc[e];if(void 0!==r)return t+n*r;const a=new Date(t);return"day"===e?new Date(a.getFullYear(),a.getMonth(),a.getDate()+n,12).getTime():"week"===e?new Date(a.getFullYear(),a.getMonth(),a.getDate()+7*n,12).getTime():new Date(a.getFullYear(),a.getMonth()+n,Math.min(a.getDate(),28),12).getTime()}function $c(e,t){return Rc(e)?function(e,t){if(!Rc(e))return!1;const n=Ic(e,t),r=Date.now();return r>=n.start&&r<n.end}(e,t):t>=Date.now()-6e4}function Bc({label:e,value:t,suffix:n,decimals:r=0,icon:a,delay:s=0,variant:i="default",clickable:l=!1,selected:c=!1,onClick:u,subtitle:d}){const f=h.useRef(null),p=h.useRef(0);h.useEffect(()=>{f.current&&t!==p.current&&(!function(e,t,n){let r=null;requestAnimationFrame(function a(s){r||(r=s);const i=Math.min((s-r)/800,1),o=1-Math.pow(1-i,4),l=t*o;e.textContent=n>0?l.toFixed(n):String(Math.round(l)),i<1&&requestAnimationFrame(a)})}(f.current,t,r),p.current=t)},[t,r]);const m="accent"===i;return o.jsxs(pl.div,{initial:{opacity:0,y:6},animate:{opacity:1,y:0},transition:{delay:s},onClick:l&&t>0?u:void 0,className:\`px-3 py-2 rounded-lg border flex items-center gap-2.5 group transition-all duration-300 \${m?"shrink-0 bg-bg-surface-1 border-border/50 hover:border-accent/30":"flex-1 min-w-[120px] bg-bg-surface-1 border-border/50 hover:border-accent/30"} \${l&&t>0?"cursor-pointer":""} \${c?"border-accent/50 bg-accent/5":""}\`,children:[o.jsx("div",{className:"p-1.5 rounded-md transition-colors "+(c?"bg-accent/15":"bg-bg-surface-2 group-hover:bg-accent/10"),children:o.jsx(a,{className:"w-3.5 h-3.5 transition-colors "+(c?"text-accent":"text-text-muted group-hover:text-accent")})}),o.jsxs("div",{className:"flex flex-col min-w-0",children:[o.jsxs("div",{className:"flex items-baseline gap-0.5",children:[o.jsx("span",{ref:f,className:"text-lg font-bold text-text-primary tracking-tight leading-none",children:r>0?t.toFixed(r):Math.round(t)}),n&&o.jsx("span",{className:"text-[10px] text-text-muted font-medium",children:n})]}),o.jsx("span",{className:"text-[9px] font-mono text-text-muted uppercase tracking-wider leading-none mt-0.5",children:e}),d&&o.jsx("span",{className:"text-[8px] text-text-muted/50 leading-none mt-0.5 truncate",children:d})]})]})}function Hc({totalHours:e,coveredHours:t,aiMultiplier:n,featuresShipped:r,bugsFixed:a,complexSolved:s,currentStreak:i,totalMilestones:l,selectedCard:c,onCardClick:u}){const d=e=>{u?.(c===e?null:e)};return o.jsxs("div",{className:"flex gap-2 mb-4",children:[o.jsxs("div",{className:"grid grid-cols-3 lg:grid-cols-7 gap-2 flex-1",children:[o.jsx(Bc,{label:"User Time",value:t<1/60?0:t<1?Math.round(60*t):t,suffix:t<1?"min":"hrs",decimals:t>=1?1:0,icon:Ll,delay:.1,clickable:!0,selected:"activeTime"===c,onClick:()=>d("activeTime")}),o.jsx(Bc,{label:"AI Time",value:e<1?Math.round(60*e):e,suffix:e<1?"min":"hrs",decimals:e<1?0:1,icon:oc,delay:.12,clickable:!0,selected:"aiTime"===c,onClick:()=>d("aiTime")}),o.jsx(Bc,{label:"Multiplier",value:n,suffix:"x",decimals:1,icon:Ul,delay:.15,clickable:!0,selected:"parallel"===c,onClick:()=>d("parallel")}),o.jsx(Bc,{label:"Milestones",value:l,icon:ic,delay:.2,clickable:!0,selected:"milestones"===c,onClick:()=>d("milestones")}),o.jsx(Bc,{label:"Features",value:r,icon:ec,delay:.25,clickable:!0,selected:"features"===c,onClick:()=>d("features")}),o.jsx(Bc,{label:"Bugs Fixed",value:a,icon:wl,delay:.3,clickable:!0,selected:"bugs"===c,onClick:()=>d("bugs")}),o.jsx(Bc,{label:"Complex",value:s,icon:bl,delay:.35,clickable:!0,selected:"complex"===c,onClick:()=>d("complex")})]}),o.jsx("div",{className:"w-px bg-border/30 self-stretch my-1"}),o.jsx(Bc,{label:"Streak",value:i,suffix:"days",icon:pc,delay:.45,variant:"accent",clickable:!0,selected:"streak"===c,onClick:()=>d("streak")})]})}var Uc={milestones:{title:"All Milestones",icon:ic,filter:()=>!0,emptyText:"No milestones in this time window.",accentColor:"#60a5fa"},features:{title:"Features Shipped",icon:ec,filter:e=>"feature"===e.category,emptyText:"No features shipped in this time window.",accentColor:"#4ade80"},bugs:{title:"Bugs Fixed",icon:wl,filter:e=>"bugfix"===e.category,emptyText:"No bugs fixed in this time window.",accentColor:"#f87171"},complex:{title:"Complex Tasks",icon:bl,filter:e=>"complex"===e.complexity,emptyText:"No complex tasks in this time window.",accentColor:"#a78bfa"}},Wc={feature:"bg-success/10 text-success border-success/20",bugfix:"bg-error/10 text-error border-error/20",refactor:"bg-purple/10 text-purple border-purple/20",test:"bg-blue/10 text-blue border-blue/20",docs:"bg-accent/10 text-accent border-accent/20",setup:"bg-text-muted/10 text-text-muted border-text-muted/20",deployment:"bg-emerald/10 text-emerald border-emerald/20"};function qc(e){const t=new Date(e),n=(new Date).getTime()-t.getTime(),r=Math.floor(n/6e4);if(r<1)return"just now";if(r<60)return\`\${r}m ago\`;const a=Math.floor(r/60);if(a<24)return\`\${a}h ago\`;const s=Math.floor(a/24);return 1===s?"yesterday":s<7?\`\${s}d ago\`:t.toLocaleDateString([],{month:"short",day:"numeric"})}function Yc({type:e,milestones:t,showPublic:n=!1,onClose:r}){h.useEffect(()=>{if(e)return document.body.style.overflow="hidden",()=>{document.body.style.overflow=""}},[e]);const[a,s]=h.useState(25),i=h.useRef(null);h.useEffect(()=>{const e=i.current;if(!e)return;const t=new IntersectionObserver(([e])=>{e?.isIntersecting&&s(e=>e+25)},{rootMargin:"200px"});return t.observe(e),()=>t.disconnect()},[e,a]),h.useEffect(()=>{s(25)},[e]);if(!e||!("features"===e||"bugs"===e||"complex"===e||"milestones"===e))return null;const l=Uc[e],c=l.icon,u=t.filter(l.filter).sort((e,t)=>new Date(t.created_at).getTime()-new Date(e.created_at).getTime()),d=u.slice(0,a),f=a<u.length,p=new Map;for(const o of d){const e=new Date(o.created_at).toLocaleDateString([],{weekday:"short",month:"short",day:"numeric"}),t=p.get(e);t?t.push(o):p.set(e,[o])}return o.jsx(Xi,{children:e&&o.jsxs(o.Fragment,{children:[o.jsx(pl.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},className:"fixed inset-0 bg-black/40 backdrop-blur-sm z-40",onClick:r}),o.jsxs(pl.div,{initial:{x:"100%"},animate:{x:0},exit:{x:"100%"},transition:{type:"spring",damping:30,stiffness:300},className:"fixed top-0 right-0 h-full w-full max-w-md bg-bg-base border-l border-border/50 z-50 flex flex-col shadow-2xl",children:[o.jsxs("div",{className:"flex items-center gap-3 px-5 py-4 border-b border-border/50",children:[o.jsx("div",{className:"p-2 rounded-lg",style:{backgroundColor:\`\${l.accentColor}15\`},children:o.jsx(c,{className:"w-4 h-4",style:{color:l.accentColor}})}),o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsx("h2",{className:"text-sm font-bold text-text-primary",children:l.title}),o.jsxs("span",{className:"text-[10px] font-mono text-text-muted",children:[u.length," ",1===u.length?"item":"items"," in window"]})]}),o.jsx("button",{onClick:r,className:"p-1.5 rounded-md hover:bg-bg-surface-2 text-text-muted hover:text-text-primary transition-colors",children:o.jsx(fc,{className:"w-4 h-4"})})]}),o.jsx("div",{className:"flex-1 overflow-y-auto overscroll-contain px-5 py-4",children:0===u.length?o.jsxs("div",{className:"flex flex-col items-center justify-center py-16 text-center",children:[o.jsx(sc,{className:"w-8 h-8 text-text-muted/30 mb-3"}),o.jsx("p",{className:"text-sm text-text-muted",children:l.emptyText})]}):o.jsxs("div",{className:"space-y-5",children:[[...p.entries()].map(([t,r])=>o.jsxs("div",{children:[o.jsx("div",{className:"text-[10px] font-mono text-text-muted uppercase tracking-wider mb-2 px-1",children:t}),o.jsx("div",{className:"space-y-1",children:r.map((t,r)=>{const a=bc[t.category]??"#9c9588",s=Wc[t.category]??"bg-bg-surface-2 text-text-secondary border-border",i=kc(t.client),l=yc[i]??i.slice(0,2).toUpperCase(),c=mc[i]??"#91919a",u="cursor"===i?"var(--text-primary)":c,d=xc[i],h=n?t.title:t.private_title||t.title,f="complex"===t.complexity;return o.jsxs(pl.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},transition:{duration:.2,delay:.03*r},className:"flex items-start gap-2.5 py-2 px-2 rounded-lg hover:bg-bg-surface-1 transition-colors group",children:[o.jsx("div",{className:"w-2 h-2 rounded-full flex-shrink-0 mt-1.5",style:{backgroundColor:a}}),o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsx("p",{className:"text-sm text-text-secondary group-hover:text-text-primary transition-colors leading-snug",children:h}),o.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[("complex"===e||"milestones"===e)&&o.jsx("span",{className:\`text-[8px] uppercase tracking-wider font-bold px-1.5 py-0.5 rounded-full border \${s}\`,children:t.category}),f&&"complex"!==e&&o.jsxs("span",{className:"flex items-center gap-0.5 text-[8px] uppercase tracking-wider font-bold px-1.5 py-0.5 rounded-full border bg-purple/10 text-purple border-purple/20",children:[o.jsx(bl,{className:"w-2 h-2"}),"complex"]}),o.jsx("span",{className:"text-[10px] text-text-muted font-mono",children:qc(t.created_at)}),t.languages.length>0&&o.jsx("span",{className:"text-[9px] text-text-muted font-mono",children:t.languages.join(", ")}),o.jsx("div",{className:"w-4 h-4 rounded flex items-center justify-center text-[7px] font-bold font-mono flex-shrink-0 ml-auto",style:{backgroundColor:\`\${c}15\`,color:c,border:\`1px solid \${c}20\`},children:d?o.jsx("div",{className:"w-2.5 h-2.5",style:{backgroundColor:u,maskImage:\`url(\${d})\`,maskSize:"contain",maskRepeat:"no-repeat",maskPosition:"center",WebkitMaskImage:\`url(\${d})\`,WebkitMaskSize:"contain",WebkitMaskRepeat:"no-repeat",WebkitMaskPosition:"center"}}):l})]})]})]},t.id)})})]},t)),f&&o.jsx("div",{ref:i,className:"py-2 text-center",children:o.jsxs("span",{className:"text-[10px] text-text-muted font-mono",children:["Showing ",d.length," of ",u.length,"..."]})})]})})]})]})})}function Kc(e){return"activeTime"===e||"aiTime"===e||"parallel"===e||"streak"===e}var Qc={activeTime:{title:"User Time",icon:Ll,accentColor:"#60a5fa"},aiTime:{title:"AI Time",icon:oc,accentColor:"#4ade80"},parallel:{title:"Multiplier",icon:Ul,accentColor:"#a78bfa"},streak:{title:"Streak",icon:pc,accentColor:"#facc15"}};function Xc(e){if(e<60)return\`\${Math.round(e)}s\`;if(e<3600)return\`\${Math.round(e/60)}m\`;const t=Math.floor(e/3600),n=Math.round(e%3600/60);return n>0?\`\${t}h \${n}m\`:\`\${t}h\`}function Zc(e){return e<1/60?"< 1 min":e<1?\`\${Math.round(60*e)} min\`:\`\${e.toFixed(1)} hrs\`}function Gc(e){if(0===e.length)return[];const t=[];for(const s of e){const e=Cc(s.started_at),n=Cc(s.ended_at);n<=e||(t.push({time:e,delta:1}),t.push({time:n,delta:-1}))}t.sort((e,t)=>e.time-t.time||e.delta-t.delta);const n=[];let r=0,a=0;for(const s of t){const e=r>0;r+=s.delta,!e&&r>0?a=s.time:e&&0===r&&n.push({start:a,end:s.time})}return n}function Jc({children:e}){return o.jsx("div",{className:"px-3 py-2.5 rounded-lg bg-bg-surface-1 border border-border/50 text-xs text-text-secondary leading-relaxed",children:e})}function eu({label:e,value:t}){return o.jsxs("div",{className:"flex items-center justify-between py-1.5 px-1",children:[o.jsx("span",{className:"text-xs text-text-muted",children:e}),o.jsx("span",{className:"text-xs font-mono font-bold text-text-primary",children:t})]})}function tu({type:e,sessions:t,allSessions:n,currentStreak:r=0,stats:a,showPublic:s=!1,onClose:i}){if(h.useEffect(()=>{if(e&&Kc(e))return document.body.style.overflow="hidden",()=>{document.body.style.overflow=""}},[e]),!e||!Kc(e))return null;const l=Qc[e],c=l.icon,u=[...t].sort((e,t)=>Cc(t.started_at)-Cc(e.started_at));return o.jsx(Xi,{children:e&&o.jsxs(o.Fragment,{children:[o.jsx(pl.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},className:"fixed inset-0 bg-black/40 backdrop-blur-sm z-40",onClick:i}),o.jsxs(pl.div,{initial:{x:"100%"},animate:{x:0},exit:{x:"100%"},transition:{type:"spring",damping:30,stiffness:300},className:"fixed top-0 right-0 h-full w-full max-w-md bg-bg-base border-l border-border/50 z-50 flex flex-col shadow-2xl",children:[o.jsxs("div",{className:"flex items-center gap-3 px-5 py-4 border-b border-border/50",children:[o.jsx("div",{className:"p-2 rounded-lg",style:{backgroundColor:\`\${l.accentColor}15\`},children:o.jsx(c,{className:"w-4 h-4",style:{color:l.accentColor}})}),o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsx("h2",{className:"text-sm font-bold text-text-primary",children:l.title}),o.jsx("span",{className:"text-[10px] font-mono text-text-muted",children:"streak"===e?\`\${r} day\${1===r?"":"s"} consecutive\`:\`\${t.length} sessions in window\`})]}),o.jsx("button",{onClick:i,className:"p-1.5 rounded-md hover:bg-bg-surface-2 text-text-muted hover:text-text-primary transition-colors",children:o.jsx(fc,{className:"w-4 h-4"})})]}),o.jsxs("div",{className:"flex-1 overflow-y-auto overscroll-contain px-5 py-4 space-y-4",children:["activeTime"===e&&o.jsx(nu,{stats:a,sessions:t}),"aiTime"===e&&o.jsx(ru,{stats:a,sessions:u,showPublic:s}),"parallel"===e&&o.jsx(au,{stats:a,sessions:u,showPublic:s}),"streak"===e&&o.jsx(su,{allSessions:n??t,currentStreak:r})]})]})]})})}function nu({stats:e,sessions:t}){const n=Gc(t);return o.jsxs(o.Fragment,{children:[o.jsx(Jc,{children:"Real wall-clock time where at least one AI session was running. Gaps between sessions (breaks, thinking, context switches) are excluded."}),o.jsxs("div",{className:"rounded-lg border border-border/50 bg-bg-surface-1 divide-y divide-border/30",children:[o.jsx(eu,{label:"User time",value:Zc(e.coveredHours)}),o.jsx(eu,{label:"AI time",value:Zc(e.totalHours)}),o.jsx(eu,{label:"Active periods",value:String(n.length)}),o.jsx(eu,{label:"Sessions",value:String(t.length)})]}),n.length>0&&o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"text-[10px] font-mono text-text-muted uppercase tracking-wider px-1 pt-2",children:"Active Periods"}),o.jsx("div",{className:"space-y-1",children:n.map((e,t)=>{const n=(e.end-e.start)/6e4;return o.jsxs(pl.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},transition:{duration:.2,delay:.02*t},className:"flex items-center gap-3 py-2 px-2 rounded-lg hover:bg-bg-surface-1 transition-colors",children:[o.jsx("div",{className:"w-2 h-2 rounded-full bg-accent/60 flex-shrink-0"}),o.jsxs("span",{className:"text-xs font-mono text-text-secondary flex-1",children:[new Date(e.start).toLocaleTimeString([],{hour:"numeric",minute:"2-digit",hour12:!0})," \u2192 ",new Date(e.end).toLocaleTimeString([],{hour:"numeric",minute:"2-digit",hour12:!0})]}),o.jsx("span",{className:"text-xs font-mono font-bold text-text-primary",children:n<1?"< 1m":n<60?\`\${Math.round(n)}m\`:\`\${(n/60).toFixed(1)}h\`})]},t)})})]})]})}function ru({stats:e,sessions:t,showPublic:n}){return o.jsxs(o.Fragment,{children:[o.jsx(Jc,{children:"Total accumulated AI session duration. When multiple sessions run in parallel, their durations add up \u2014 so AI Time can exceed User Time."}),o.jsxs("div",{className:"rounded-lg border border-border/50 bg-bg-surface-1 divide-y divide-border/30",children:[o.jsx(eu,{label:"AI time",value:Zc(e.totalHours)}),o.jsx(eu,{label:"User time",value:Zc(e.coveredHours)}),o.jsx(eu,{label:"Multiplier",value:\`\${e.aiMultiplier.toFixed(1)}x\`}),o.jsx(eu,{label:"Sessions",value:String(t.length)})]}),o.jsx(ou,{sessions:t,showPublic:n})]})}function au({stats:e,sessions:t,showPublic:n}){return o.jsxs(o.Fragment,{children:[o.jsx(Jc,{children:"Your AI multiplier \u2014 AI Time divided by User Time. Higher means more parallelization. You're running more AI sessions simultaneously."}),o.jsxs("div",{className:"rounded-lg border border-border/50 bg-bg-surface-1 divide-y divide-border/30",children:[o.jsx(eu,{label:"Multiplier",value:\`\${e.aiMultiplier.toFixed(1)}x\`}),o.jsx(eu,{label:"Peak concurrent",value:String(e.peakConcurrency)}),o.jsx(eu,{label:"Calculation",value:\`\${Zc(e.totalHours)} \xF7 \${Zc(e.coveredHours)}\`}),o.jsx(eu,{label:"Sessions",value:String(t.length)})]}),o.jsx(ou,{sessions:t,showPublic:n})]})}function su({allSessions:e,currentStreak:t}){const n=function(e){const t=new Map;for(const n of e){const e=new Date(Cc(n.started_at)),r=\`\${e.getFullYear()}-\${String(e.getMonth()+1).padStart(2,"0")}-\${String(e.getDate()).padStart(2,"0")}\`,a=t.get(r);a?a.push(n):t.set(r,[n])}return[...t.entries()].sort((e,t)=>t[0].localeCompare(e[0])).map(([e,t])=>{const n=new Date(e+"T12:00:00").toLocaleDateString([],{weekday:"short",month:"short",day:"numeric"}),r=t.reduce((e,t)=>e+t.duration_seconds,0),a=Gc(t).reduce((e,t)=>e+(t.end-t.start),0)/1e3,s=a>0?r/a:0;return{date:e,label:n,count:t.length,gainedSeconds:r,spentSeconds:a,boost:s}})}(e),r=new Set,a=new Date;for(let s=0;s<t;s++){const e=new Date(a);e.setDate(e.getDate()-s),r.add(\`\${e.getFullYear()}-\${String(e.getMonth()+1).padStart(2,"0")}-\${String(e.getDate()).padStart(2,"0")}\`)}return o.jsxs(o.Fragment,{children:[o.jsx(Jc,{children:"Consecutive days with at least one AI session. Keep using AI daily to grow your streak!"}),o.jsxs("div",{className:"rounded-lg border border-border/50 bg-bg-surface-1 divide-y divide-border/30",children:[o.jsx(eu,{label:"Current streak",value:\`\${t} day\${1===t?"":"s"}\`}),o.jsx(eu,{label:"Total active days",value:String(n.length)}),o.jsx(eu,{label:"Total sessions",value:String(e.length)})]}),n.length>0&&o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"text-[10px] font-mono text-text-muted uppercase tracking-wider px-1 pt-2",children:"Active Days"}),o.jsx("div",{className:"space-y-1",children:n.map((e,t)=>{const n=r.has(e.date);return o.jsxs(pl.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},transition:{duration:.2,delay:Math.min(.02*t,.6)},className:"flex items-center gap-2 py-2 px-2 rounded-lg hover:bg-bg-surface-1 transition-colors",children:[n?o.jsx(pc,{className:"w-3 h-3 flex-shrink-0",style:{color:"#facc15"}}):o.jsx(kl,{className:"w-3 h-3 flex-shrink-0 text-text-muted"}),o.jsx("span",{className:"text-xs font-mono flex-1 min-w-0 "+(n?"text-text-primary":"text-text-secondary"),children:e.label}),o.jsx("span",{className:"text-[10px] text-text-muted font-mono whitespace-nowrap",title:"User time",children:Xc(e.spentSeconds)}),o.jsx("span",{className:"text-[10px] text-text-muted",children:"/"}),o.jsx("span",{className:"text-[10px] font-mono font-bold text-text-primary whitespace-nowrap",title:"AI time",children:Xc(e.gainedSeconds)}),e.boost>0&&o.jsxs("span",{className:"text-[10px] font-mono font-bold whitespace-nowrap",style:{color:"#a78bfa"},title:"Multiplier",children:[e.boost.toFixed(1),"x"]})]},e.date)})})]})]})}var iu=25;function ou({sessions:e,showPublic:t}){const[n,r]=h.useState(iu),a=h.useRef(null);if(h.useEffect(()=>{const e=a.current;if(!e)return;const t=new IntersectionObserver(([e])=>{e?.isIntersecting&&r(e=>e+iu)},{rootMargin:"200px"});return t.observe(e),()=>t.disconnect()},[e,n]),h.useEffect(()=>{r(iu)},[e.length]),0===e.length)return null;const s=e.slice(0,n),i=n<e.length;return o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"text-[10px] font-mono text-text-muted uppercase tracking-wider px-1 pt-2",children:"Sessions"}),o.jsxs("div",{className:"space-y-1",children:[s.map((e,n)=>{const r=kc(e.client),a=yc[r]??r.slice(0,2).toUpperCase(),s=mc[r]??"#91919a",i="cursor"===r?"var(--text-primary)":s,l=xc[r],c=t?e.title??"Untitled":e.private_title||e.title||"Untitled";return o.jsxs(pl.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},transition:{duration:.2,delay:Math.min(.02*n,.6)},className:"flex items-start gap-2.5 py-2 px-2 rounded-lg hover:bg-bg-surface-1 transition-colors group",children:[o.jsx("div",{className:"w-5 h-5 rounded flex items-center justify-center text-[7px] font-bold font-mono flex-shrink-0 mt-0.5",style:{backgroundColor:\`\${s}15\`,color:s,border:\`1px solid \${s}20\`},children:l?o.jsx("div",{className:"w-3 h-3",style:{backgroundColor:i,maskImage:\`url(\${l})\`,maskSize:"contain",maskRepeat:"no-repeat",maskPosition:"center",WebkitMaskImage:\`url(\${l})\`,WebkitMaskSize:"contain",WebkitMaskRepeat:"no-repeat",WebkitMaskPosition:"center"}}):a}),o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsx("p",{className:"text-sm text-text-secondary group-hover:text-text-primary transition-colors leading-snug truncate",children:c}),o.jsxs("div",{className:"flex items-center gap-2 mt-0.5",children:[o.jsx("span",{className:"text-[10px] font-mono text-text-muted",children:Xc(e.duration_seconds)}),o.jsx("span",{className:"text-[10px] text-text-muted",children:(u=e.started_at,new Date(u).toLocaleTimeString([],{hour:"numeric",minute:"2-digit",hour12:!0}))}),e.project&&o.jsx("span",{className:"text-[10px] text-text-muted font-mono truncate",children:e.project})]})]})]},e.session_id);var u}),i&&o.jsx("div",{ref:a,className:"py-2 text-center",children:o.jsxs("span",{className:"text-[10px] text-text-muted font-mono",children:["Showing ",s.length," of ",e.length,"..."]})})]})]})}var lu=[{id:"sessions",label:"Sessions"},{id:"insights",label:"Insights"}];function cu({activeTab:e,onTabChange:t,externalLinks:n}){return o.jsxs("div",{className:"flex items-center gap-0.5 p-0.5 rounded-lg bg-bg-surface-1 border border-border/40",children:[lu.map(({id:n,label:r})=>{const a=e===n;return o.jsx("button",{onClick:()=>t(n),className:\`\\n px-3 py-1 rounded-md text-xs font-medium transition-all duration-150\\n \${a?"bg-bg-surface-2 text-text-primary shadow-sm":"text-text-muted hover:text-text-primary"}\\n \`,children:r},n)}),o.jsx("div",{className:"w-px h-4 bg-border/60 mx-1"}),o.jsxs("button",{onClick:()=>t("settings"),className:\`\\n flex items-center gap-1 px-2.5 py-1 rounded-md text-xs font-medium transition-all duration-150\\n \${"settings"===e?"bg-bg-surface-2 text-text-primary shadow-sm":"text-text-muted hover:text-text-primary"}\\n \`,children:[o.jsx(rc,{className:"w-3 h-3"}),"Settings"]}),n&&n.length>0&&o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"w-px h-4 bg-border/60 mx-1"}),n.map(({label:e,href:t})=>o.jsxs("a",{href:t,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 px-2.5 py-1 rounded-md text-xs font-mono tracking-wide text-text-muted hover:text-accent transition-colors duration-150",children:[e,o.jsx(Rl,{className:"w-2.5 h-2.5 opacity-50"})]},t))]})]})}function uu({label:e,active:t,onClick:n}){return o.jsx("button",{onClick:n,className:"text-[10px] font-bold uppercase tracking-wider px-3 py-1.5 rounded-full transition-all duration-200 cursor-pointer border "+(t?"bg-accent text-bg-base border-accent scale-105":"bg-bg-surface-1 border-border text-text-muted hover:text-text-primary hover:border-text-muted/50"),style:t?{boxShadow:"0 2px 10px rgba(var(--accent-rgb), 0.4)"}:void 0,children:e})}function du({sessions:e,filters:t,onFilterChange:n}){const r=h.useMemo(()=>[...new Set(e.map(e=>e.client))].sort(),[e]),a=h.useMemo(()=>[...new Set(e.flatMap(e=>e.languages))].sort(),[e]),s=h.useMemo(()=>[...new Set(e.map(e=>e.project).filter(e=>{if(!e)return!1;const t=e.trim().toLowerCase();return!["untitled","mcp","unknown","default","none"].includes(t)}))].sort(),[e]);return r.length>0||a.length>0||s.length>0?o.jsxs("div",{className:"flex flex-wrap items-center gap-2 px-1",children:[o.jsx(uu,{label:"All",active:"all"===t.client&&"all"===t.language&&"all"===t.project,onClick:()=>{n("client","all"),n("language","all"),n("project","all")}}),r.map(e=>o.jsx(uu,{label:gc[e]??e,active:t.client===e,onClick:()=>n("client",t.client===e?"all":e)},e)),a.map(e=>o.jsx(uu,{label:e,active:t.language===e,onClick:()=>n("language",t.language===e?"all":e)},e)),s.map(e=>o.jsx(uu,{label:e,active:t.project===e,onClick:()=>n("project",t.project===e?"all":e)},e))]}):null}function hu({onDelete:e,size:t="md",className:n=""}){const[r,a]=h.useState(!1),s=h.useRef(void 0);h.useEffect(()=>()=>{s.current&&clearTimeout(s.current)},[]);const i=t=>{t.stopPropagation(),s.current&&clearTimeout(s.current),a(!1),e()},l=e=>{e.stopPropagation(),s.current&&clearTimeout(s.current),a(!1)},c="sm"===t?"w-3 h-3":"w-3.5 h-3.5",u="sm"===t?"p-1":"p-1.5";return r?o.jsxs("span",{className:\`inline-flex items-center gap-0.5 \${n}\`,onClick:e=>e.stopPropagation(),children:[o.jsx("button",{onClick:i,className:\`\${u} rounded-lg transition-all bg-error/15 text-error hover:bg-error/25\`,title:"Confirm delete",children:o.jsx(Cl,{className:c})}),o.jsx("button",{onClick:l,className:\`\${u} rounded-lg transition-all text-text-muted hover:bg-bg-surface-2\`,title:"Cancel",children:o.jsx(fc,{className:c})})]}):o.jsx("button",{onClick:e=>{e.stopPropagation(),a(!0),s.current=setTimeout(()=>a(!1),5e3)},className:\`\${u} rounded-lg transition-all text-text-muted hover:text-error/70 hover:bg-error/5 \${n}\`,title:"Delete",children:o.jsx(lc,{className:c})})}function fu({text:e,words:t}){if(!t?.length||!e)return o.jsx(o.Fragment,{children:e});const n=t.map(e=>e.replace(/[.*+?^\${}()|[\\]\\\\]/g,"\\\\$&")),r=new RegExp(\`(\${n.join("|")})\`,"gi"),a=e.split(r);return o.jsx(o.Fragment,{children:a.map((e,t)=>t%2==1?o.jsx("mark",{className:"bg-accent/30 text-inherit rounded-sm px-px",children:e},t):o.jsx("span",{children:e},t))})}function pu(e,t){const n=e=>new Date(e).toLocaleTimeString([],{hour:"numeric",minute:"2-digit",hour12:!0});return\`\${n(e)} \u2014 \${n(t)}\`}function mu(e){if(e<60)return\`\${e}s\`;const t=Math.round(e/60);if(t<60)return\`\${t}m\`;const n=Math.floor(t/60),r=t%60;return r>0?\`\${n}h \${r}m\`:\`\${n}h\`}var gu={feature:"bg-success/15 text-success border-success/30",bugfix:"bg-error/15 text-error border-error/30",refactor:"bg-purple/15 text-purple border-purple/30",test:"bg-blue/15 text-blue border-blue/30",docs:"bg-accent/15 text-accent border-accent/30",setup:"bg-text-muted/15 text-text-muted border-text-muted/20",deployment:"bg-emerald/15 text-emerald border-emerald/30"};function yu({category:e}){const t=gu[e]??"bg-bg-surface-2 text-text-secondary border-border";return o.jsx("span",{className:\`text-[10px] px-1.5 py-0.5 rounded-full border font-bold uppercase tracking-wider \${t}\`,children:e})}function vu(e){return e>=5?"text-text-secondary":e>=4?"text-amber-500":e>=3?"text-orange-500":"text-error"}function xu({score:e,decimal:t}){const n=e>=5,r=t?e.toFixed(1):String(Math.round(e)),a=r.endsWith(".0")?r.slice(0,-2):r;return o.jsxs("span",{className:"text-[10px] font-mono "+(n?"":"font-bold"),title:\`\${e.toFixed(1)}/5\`,children:[o.jsx("span",{className:vu(e),children:a}),o.jsx("span",{className:"text-text-muted/50",children:"/5"})]})}function bu({model:e,toolOverhead:t}){return e||t?o.jsxs("div",{className:"flex flex-wrap items-center gap-4",children:[e&&o.jsxs("div",{className:"flex items-center gap-1.5 text-[10px] whitespace-nowrap",children:[o.jsx(zl,{className:"w-3 h-3 text-text-muted/50 flex-shrink-0"}),o.jsx("span",{className:"text-text-secondary",children:"Model"}),o.jsx("span",{className:"text-text-secondary font-mono font-bold ml-0.5",children:e})]}),t&&o.jsxs("div",{className:"flex items-center gap-1.5 text-[10px] whitespace-nowrap",children:[o.jsx(xl,{className:"w-3 h-3 text-text-muted/50 flex-shrink-0"}),o.jsx("span",{className:"text-text-secondary",children:"Tracking overhead"}),o.jsxs("span",{className:"text-text-secondary font-mono font-bold ml-0.5",children:["~",t.total_tokens_est," tokens"]})]})]}):null}function wu({evaluation:e,showPublic:t=!1,model:n,toolOverhead:r}){const a=!!n||!!r,s=[{label:"Prompt",value:e.prompt_quality,reason:e.prompt_quality_reason,Icon:Xl},{label:"Context",value:e.context_provided,reason:e.context_provided_reason,Icon:Il},{label:"Scope",value:e.scope_quality,reason:e.scope_quality_reason,Icon:ic},{label:"Independence",value:e.independence_level,reason:e.independence_level_reason,Icon:Al}],i=s.some(e=>e.reason)||e.task_outcome_reason;return o.jsxs("div",{className:"px-2.5 py-2 bg-bg-surface-2/30 rounded-md mb-2",children:[o.jsxs("div",{className:"flex flex-wrap items-center gap-x-5 gap-y-2",children:[s.map(({label:e,value:t,Icon:n})=>o.jsxs("div",{className:"flex items-center gap-1.5 text-[10px] whitespace-nowrap",children:[o.jsx(n,{className:"w-3 h-3 text-text-muted/60 flex-shrink-0"}),o.jsx("span",{className:"text-text-secondary whitespace-nowrap",children:e}),o.jsx(xu,{score:t})]},e)),a&&o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"hidden md:block h-3.5 w-px bg-border/30"}),o.jsx(bu,{model:n,toolOverhead:r})]}),o.jsx("div",{className:"hidden md:block h-3.5 w-px bg-border/30"}),o.jsxs("div",{className:"flex items-center gap-1.5 text-[10px] whitespace-nowrap",children:[o.jsx(Jl,{className:"w-3 h-3 text-text-muted/50"}),o.jsx("span",{className:"text-text-muted",children:"Iterations"}),o.jsx("span",{className:"text-text-secondary font-mono font-bold ml-0.5",children:e.iteration_count})]}),o.jsxs("div",{className:"flex items-center gap-1.5 text-[10px] whitespace-nowrap",children:[o.jsx(hc,{className:"w-3 h-3 text-text-muted/50"}),o.jsx("span",{className:"text-text-muted",children:"Tools"}),o.jsx("span",{className:"text-text-secondary font-mono font-bold ml-0.5",children:e.tools_leveraged})]})]}),!t&&i&&o.jsx("div",{className:"mt-2 pt-2 border-t border-border/15",children:o.jsxs("div",{className:"grid grid-cols-[86px_minmax(0,1fr)] gap-x-2 gap-y-1 text-[10px]",children:[s.filter(e=>e.reason).map(({label:e,value:t,reason:n})=>o.jsxs("div",{className:"contents",children:[o.jsxs("span",{className:\`\${vu(t)} font-bold text-right\`,children:[e,":"]}),o.jsx("span",{className:"text-text-secondary leading-relaxed",children:n})]},e)),e.task_outcome_reason&&o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"col-span-2 border-t border-border/15 mt-0.5 mb-0.5"}),o.jsx("span",{className:"text-text-secondary font-bold text-right",children:"Outcome:"}),o.jsx("span",{className:"text-text-secondary leading-relaxed",children:e.task_outcome_reason})]})]})})]})}function ku({prompt:e,imageCount:t}){const[n,r]=h.useState(!1),a=e.length>300,s=a&&!n?e.slice(0,300)+"\u2026":e;return o.jsxs("div",{className:"px-2.5 py-2 bg-bg-surface-2/20 rounded-md mb-2 border border-border/10",children:[o.jsxs("div",{className:"flex items-center gap-1.5 mb-1.5",children:[o.jsx(Xl,{className:"w-3 h-3 text-text-muted/50"}),o.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider text-text-muted",children:"Prompt"}),null!=t&&t>0&&o.jsxs("span",{className:"inline-flex items-center gap-0.5 text-[10px] text-text-muted bg-bg-surface-2 px-1.5 py-0.5 rounded-full border border-border/20",children:[o.jsx(Hl,{className:"w-2.5 h-2.5"}),t]})]}),o.jsx("p",{className:"text-[11px] text-text-secondary leading-relaxed whitespace-pre-wrap break-words",children:s}),a&&o.jsx("button",{onClick:()=>r(!n),className:"text-[10px] text-accent hover:text-accent/80 mt-1 font-medium",children:n?"Show less":"Show more"})]})}var Su=h.memo(function({session:e,milestones:t,defaultExpanded:n=!1,externalShowPublic:r,contextLabel:a,hideClientAvatar:s=!1,hideProject:i=!1,showFullDate:l=!1,highlightWords:c,onDeleteSession:u,onDeleteMilestone:d}){const[f,p]=h.useState(n),[m,g]=h.useState(!1),y=r??m,v=g,x=kc(e.client),b=mc[x]??"#91919a",w="cursor"===x,k=w?"var(--text-primary)":b,S=w?{backgroundColor:"var(--bg-surface-2)",color:"var(--text-primary)",border:"1px solid var(--border)"}:{backgroundColor:\`\${b}15\`,color:b,border:\`1px solid \${b}30\`},j=yc[x]??x.slice(0,2).toUpperCase(),C=xc[x],N=t.length>0||!!e.evaluation||!!e.model||!!e.tool_overhead||!!e.prompt,T=e.project?.trim()||"",E=!T||["untitled","mcp","unknown","default","none","null","undefined"].includes(T.toLowerCase()),M=t[0],P=E&&M?M.title:T,L=E&&M?M.private_title||M.title:T;let D=e.private_title||e.title||L||"Untitled Session",A=e.title||P||"Untitled Session";const _=D!==A&&void 0===r,z=!!u||N||_,R=a?.replace(/^\\s*prompt\\s*/i,"").trim();return o.jsxs("div",{className:"group/card mb-2 rounded-xl border transition-all duration-200 "+(f?"bg-bg-surface-1 border-accent/35 shadow-md":"bg-bg-surface-1/35 border-border/50 hover:border-accent/30"),children:[o.jsxs("div",{className:"flex items-center",children:[o.jsxs("button",{className:"flex-1 flex items-center gap-3 px-3.5 py-2.5 text-left min-w-0",onClick:()=>N&&p(!f),style:{cursor:N?"pointer":"default"},children:[!s&&o.jsx("div",{className:"w-8 h-8 rounded-lg flex items-center justify-center text-[11px] font-black font-mono flex-shrink-0 shadow-sm",style:S,title:gc[x]??x,children:C?o.jsx("div",{className:"w-4 h-4",style:{backgroundColor:k,maskImage:\`url(\${C})\`,maskSize:"contain",maskRepeat:"no-repeat",maskPosition:"center",WebkitMaskImage:\`url(\${C})\`,WebkitMaskSize:"contain",WebkitMaskRepeat:"no-repeat",WebkitMaskPosition:"center"}}):j}),o.jsxs("div",{className:"flex-1 min-w-0 space-y-1",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[a&&o.jsx("span",{className:"inline-flex items-center rounded-md border border-accent/20 bg-accent/10 px-1.5 py-0.5 text-[9px] font-bold uppercase tracking-wider text-accent/90",children:R||a}),o.jsx("div",{className:"flex items-center gap-1.5 min-w-0",children:o.jsx(Xi,{mode:"wait",children:o.jsxs(pl.div,{initial:{opacity:0,x:-5},animate:{opacity:1,x:0},exit:{opacity:0,x:5},transition:{duration:.1},className:"flex items-center gap-1.5 min-w-0",children:[y?o.jsx(ac,{className:"w-3 h-3 text-success/70 flex-shrink-0"}):o.jsx(Yl,{className:"w-3 h-3 text-accent/70 flex-shrink-0"}),o.jsx("span",{className:"text-[15px] font-semibold truncate text-text-primary tracking-tight leading-tight",children:o.jsx(fu,{text:y?A:D,words:c})})]},y?"public":"private")})})]}),o.jsxs("div",{className:"flex items-center gap-3.5 text-[11px] text-text-secondary font-medium",children:[o.jsxs("span",{className:"flex items-center gap-1.5",children:[o.jsx(Ll,{className:"w-3 h-3 opacity-75"}),mu(e.duration_seconds)]}),o.jsxs("span",{className:"text-text-secondary/80 font-mono tracking-tight",children:[l&&\`\${new Date(e.started_at).toLocaleDateString([],{month:"short",day:"numeric"})} \xB7 \`,pu(e.started_at,e.ended_at).split(" \u2014 ")[0]]}),!y&&!E&&!i&&o.jsxs("span",{className:"flex items-center gap-1 text-text-secondary/85",title:\`Project: \${T}\`,children:[o.jsx(Bl,{className:"w-2.5 h-2.5 opacity-70"}),o.jsx("span",{className:"max-w-[130px] truncate",children:T})]}),t.length>0&&o.jsxs("span",{className:"flex items-center gap-1 text-text-secondary/85",title:\`\${t.length} milestone\${1!==t.length?"s":""}\`,children:[o.jsx($l,{className:"w-2.5 h-2.5 opacity-70"}),t.length]}),e.evaluation&&o.jsx(xu,{score:(F=e.evaluation,(F.prompt_quality+F.context_provided+F.scope_quality+F.independence_level)/4),decimal:!0})]})]})]}),z&&o.jsxs("div",{className:"flex items-center px-2.5 gap-1.5 border-l border-border/30 h-9 self-center",children:[u&&o.jsx(hu,{onDelete:()=>u(e.session_id),className:"opacity-0 group-hover/card:opacity-100 focus-within:opacity-100"}),_&&o.jsx("button",{onClick:e=>{e.stopPropagation(),v(!y)},className:"p-1.5 rounded-lg transition-all "+(y?"bg-success/10 text-success":"text-text-secondary hover:text-text-primary hover:bg-bg-surface-2"),title:y?"Public title shown":"Private title shown","aria-label":y?"Show private title":"Show public title",children:y?o.jsx(Vl,{className:"w-3.5 h-3.5"}):o.jsx(Fl,{className:"w-3.5 h-3.5"})}),N&&o.jsx("button",{onClick:()=>p(!f),className:"p-1.5 rounded-lg transition-all "+(f?"text-accent bg-accent/8":"text-text-secondary hover:text-text-primary hover:bg-bg-surface-2"),title:f?"Collapse details":"Expand details","aria-label":f?"Collapse details":"Expand details",children:o.jsx(Nl,{className:"w-4 h-4 transition-transform duration-200 "+(f?"rotate-180":"")})})]})]}),o.jsx(Xi,{children:f&&N&&o.jsx(pl.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.2},className:"overflow-hidden",children:o.jsxs("div",{className:"px-3.5 pb-3.5 pt-1.5 space-y-2",children:[o.jsx("div",{className:"h-px bg-border/20 mb-2 mx-1"}),!y&&e.prompt&&o.jsx(ku,{prompt:e.prompt,imageCount:e.prompt_image_count}),e.evaluation&&o.jsx(wu,{evaluation:e.evaluation,showPublic:y,model:e.model,toolOverhead:e.tool_overhead}),!e.evaluation&&o.jsx(bu,{model:e.model,toolOverhead:e.tool_overhead}),t.length>0&&o.jsx("div",{className:"space-y-0.5",children:t.map(e=>{const t=y?e.title:e.private_title||e.title,n=function(e){if(!e||e<=0)return"";if(e<60)return\`\${e}m\`;const t=Math.floor(e/60),n=e%60;return n>0?\`\${t}h \${n}m\`:\`\${t}h\`}(e.duration_minutes);return o.jsxs("div",{className:"group flex items-center gap-2 p-1.5 rounded-md hover:bg-bg-surface-2/40 transition-colors",children:[o.jsx("div",{className:"w-1.5 h-1.5 rounded-full flex-shrink-0",style:{backgroundColor:bc[e.category]??"#9c9588"}}),o.jsx("div",{className:"flex-1 min-w-0",children:o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("span",{className:"text-xs font-medium text-text-secondary group-hover:text-text-primary truncate",children:o.jsx(fu,{text:t,words:c})}),o.jsx(yu,{category:e.category})]})}),n&&o.jsx("span",{className:"text-[10px] text-text-muted font-mono",children:n}),d&&o.jsx(hu,{onDelete:()=>d(e.id),size:"sm",className:"opacity-0 group-hover:opacity-100"})]},e.id)})})]})})})]});var F});function ju(e){if(e<60)return\`\${e}s\`;const t=Math.round(e/60);if(t<60)return\`\${t}m\`;const n=Math.floor(t/60),r=t%60;return r>0?\`\${n}h \${r}m\`:\`\${n}h\`}function Cu({score:e,decimal:t}){const n=e>=5,r=n?"text-text-secondary":e>=4?"text-amber-500":e>=3?"text-orange-500":"text-error",a=t?e.toFixed(1):String(Math.round(e)),s=a.endsWith(".0")?a.slice(0,-2):a;return o.jsxs("span",{className:"text-[10px] font-mono "+(n?"":"font-bold"),title:\`\${e.toFixed(1)}/5\`,children:[o.jsx("span",{className:r,children:s}),o.jsx("span",{className:"text-text-muted/50",children:"/5"})]})}var Nu=h.memo(function({group:e,defaultExpanded:t,globalShowPublic:n,showFullDate:r,highlightWords:a,onDeleteSession:s,onDeleteMilestone:i,onDeleteConversation:l}){const[c,u]=h.useState(t),[d,f]=h.useState(!1),p=n||d;if(1===e.sessions.length){const l=e.sessions[0];return o.jsx(Su,{session:l.session,milestones:l.milestones,defaultExpanded:t&&l.milestones.length>0,externalShowPublic:n||void 0,showFullDate:r,highlightWords:a,onDeleteSession:s,onDeleteMilestone:i})}const m=kc(e.sessions[0].session.client),g=mc[m]??"#91919a",y="cursor"===m,v=y?"var(--text-primary)":g,x=y?{backgroundColor:"var(--bg-surface-2)",color:"var(--text-primary)",border:"1px solid var(--border)"}:{backgroundColor:\`\${g}15\`,color:g,border:\`1px solid \${g}30\`},b=yc[m]??m.slice(0,2).toUpperCase(),w=xc[m],k=e.aggregateEval,S=k?(k.prompt_quality+k.context_provided+k.scope_quality+k.independence_level)/4:0,j=e.sessions[0].session,C=j.private_title||j.title||j.project||"Conversation",N=j.title||j.project||"Conversation",T=C!==N&&!n,E=j.project?.trim()||"",M=!!E&&!["untitled","mcp","unknown","default","none","null","undefined"].includes(E.toLowerCase());return o.jsxs("div",{className:"group/conv mb-2 rounded-xl border transition-all duration-200 "+(c?"bg-bg-surface-1 border-accent/35 shadow-md":"bg-bg-surface-1/35 border-border/50 hover:border-accent/30"),children:[o.jsxs("div",{className:"flex items-center",children:[o.jsxs("button",{className:"flex-1 flex items-center gap-3 px-3.5 py-2.5 text-left min-w-0",onClick:()=>u(!c),children:[o.jsx("div",{className:"w-8 h-8 rounded-lg flex items-center justify-center text-[11px] font-black font-mono flex-shrink-0 shadow-sm",style:x,title:gc[m]??m,children:w?o.jsx("div",{className:"w-4 h-4",style:{backgroundColor:v,maskImage:\`url(\${w})\`,maskSize:"contain",maskRepeat:"no-repeat",maskPosition:"center",WebkitMaskImage:\`url(\${w})\`,WebkitMaskSize:"contain",WebkitMaskRepeat:"no-repeat",WebkitMaskPosition:"center"}}):b}),o.jsxs("div",{className:"flex-1 min-w-0 space-y-1",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("div",{className:"flex items-center gap-1.5 min-w-0",children:o.jsx(Xi,{mode:"wait",children:o.jsxs(pl.div,{initial:{opacity:0,x:-5},animate:{opacity:1,x:0},exit:{opacity:0,x:5},transition:{duration:.1},className:"flex items-center gap-1.5 min-w-0",children:[p?o.jsx(ac,{className:"w-3 h-3 text-success/70 flex-shrink-0"}):o.jsx(Yl,{className:"w-3 h-3 text-accent/70 flex-shrink-0"}),o.jsx("span",{className:"text-[15px] font-semibold truncate text-text-primary tracking-tight leading-tight",children:o.jsx(fu,{text:p?N:C,words:a})})]},p?"public":"private")})}),o.jsxs("span",{className:"text-[10px] font-bold text-accent/90 bg-accent/10 px-1.5 py-0.5 rounded border border-accent/20 flex-shrink-0",children:[e.sessions.length," prompts"]})]}),o.jsxs("div",{className:"flex items-center gap-3.5 text-[11px] text-text-secondary font-medium",children:[o.jsxs("span",{className:"flex items-center gap-1.5",children:[o.jsx(Ll,{className:"w-3 h-3 opacity-75"}),ju(e.totalDuration)]}),o.jsxs("span",{className:"text-text-secondary/80 font-mono tracking-tight",children:[r&&\`\${new Date(e.startedAt).toLocaleDateString([],{month:"short",day:"numeric"})} \xB7 \`,(P=e.startedAt,new Date(P).toLocaleTimeString([],{hour:"numeric",minute:"2-digit",hour12:!0}))]}),!p&&M&&o.jsxs("span",{className:"flex items-center gap-1 text-text-secondary/85",title:\`Project: \${E}\`,children:[o.jsx(Bl,{className:"w-2.5 h-2.5 opacity-70"}),o.jsx("span",{className:"max-w-[130px] truncate",children:E})]}),e.totalMilestones>0&&o.jsxs("span",{className:"flex items-center gap-1 text-text-secondary/85",title:\`\${e.totalMilestones} milestone\${1!==e.totalMilestones?"s":""}\`,children:[o.jsx($l,{className:"w-2.5 h-2.5 opacity-70"}),e.totalMilestones]}),k&&o.jsx(Cu,{score:S,decimal:!0})]})]})]}),o.jsxs("div",{className:"flex items-center px-2.5 gap-1.5 border-l border-border/30 h-9 self-center",children:[l&&e.conversationId&&o.jsx(hu,{onDelete:()=>l(e.conversationId),className:"opacity-0 group-hover/conv:opacity-100 focus-within:opacity-100"}),T&&o.jsx("button",{onClick:e=>{e.stopPropagation(),f(!d)},className:"p-1.5 rounded-lg transition-all "+(p?"bg-success/10 text-success":"text-text-secondary hover:text-text-primary hover:bg-bg-surface-2"),title:p?"Public title shown":"Private title shown","aria-label":p?"Show private title":"Show public title",children:p?o.jsx(Vl,{className:"w-3.5 h-3.5"}):o.jsx(Fl,{className:"w-3.5 h-3.5"})}),o.jsx("button",{onClick:()=>u(!c),className:"p-1.5 rounded-lg transition-all "+(c?"text-accent bg-accent/8":"text-text-secondary hover:text-text-primary hover:bg-bg-surface-2"),title:c?"Collapse conversation":"Expand conversation","aria-label":c?"Collapse conversation":"Expand conversation",children:o.jsx(Nl,{className:"w-4 h-4 transition-transform duration-200 "+(c?"rotate-180":"")})})]})]}),o.jsx(Xi,{children:c&&o.jsx(pl.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.2},className:"overflow-hidden",children:o.jsxs("div",{className:"px-3.5 pb-2.5 relative",children:[o.jsx("div",{className:"absolute left-[1.75rem] top-0 bottom-2 w-px",style:{backgroundColor:\`\${g}25\`}}),o.jsx("div",{className:"space-y-1 pl-10",children:e.sessions.map(e=>o.jsxs("div",{className:"relative",children:[o.jsx("div",{className:"absolute -left-7 top-5 w-2 h-2 rounded-full border-2",style:{backgroundColor:g,borderColor:\`\${g}40\`}}),o.jsx(Su,{session:e.session,milestones:e.milestones,defaultExpanded:!1,externalShowPublic:p||void 0,hideClientAvatar:!0,hideProject:!0,showFullDate:r,highlightWords:a,onDeleteSession:s,onDeleteMilestone:i})]},e.session.session_id))})]})})})]});var P});function Tu({sessions:e,milestones:t,filters:n,globalShowPublic:r,showFullDate:a,highlightWords:s,outsideWindowCounts:i,onNavigateNewer:l,onNavigateOlder:c,onDeleteSession:u,onDeleteConversation:d,onDeleteMilestone:f}){const p=h.useMemo(()=>e.filter(e=>("all"===n.client||e.client===n.client)&&(!("all"!==n.language&&!e.languages.includes(n.language))&&("all"===n.project||(e.project??"")===n.project))),[e,n]),m=h.useMemo(()=>"all"===n.category?t:t.filter(e=>e.category===n.category),[t,n.category]),g=h.useMemo(()=>{const e=function(e,t){const n=new Map;for(const a of t){const e=n.get(a.session_id);e?e.push(a):n.set(a.session_id,[a])}const r=e.map(e=>({session:e,milestones:n.get(e.session_id)??[]}));return r.sort((e,t)=>Cc(t.session.started_at)-Cc(e.session.started_at)),r}(p,m);return function(e){const t=new Map,n=[];for(const a of e){const e=a.session.conversation_id;if(e){const n=t.get(e);n?n.push(a):t.set(e,[a])}else n.push(a)}const r=[];for(const[a,s]of t){s.sort((e,t)=>Cc(t.session.started_at)-Cc(e.session.started_at));const e=s.reduce((e,t)=>e+t.session.duration_seconds,0),t=s.reduce((e,t)=>e+t.milestones.length,0),n=s[s.length-1].session.started_at,i=s[0].session.ended_at;r.push({conversationId:a,sessions:s,aggregateEval:Tc(s),totalDuration:e,totalMilestones:t,startedAt:n,endedAt:i})}for(const a of n)r.push({conversationId:null,sessions:[a],aggregateEval:a.session.evaluation?Tc([a]):null,totalDuration:a.session.duration_seconds,totalMilestones:a.milestones.length,startedAt:a.session.started_at,endedAt:a.session.ended_at});return r.sort((e,t)=>Cc(t.startedAt)-Cc(e.startedAt)),r}(e)},[p,m]),[y,v]=h.useState(25),x=h.useRef(null);if(h.useEffect(()=>{v(25)},[g]),h.useEffect(()=>{const e=x.current;if(!e)return;const t=new IntersectionObserver(([e])=>{e?.isIntersecting&&v(e=>e+25)},{rootMargin:"200px"});return t.observe(e),()=>t.disconnect()},[g,y]),0===g.length){const e=i&&i.before>0,t=i&&i.after>0;return o.jsxs("div",{className:"text-center text-text-muted py-8 text-sm mb-4 space-y-3",children:[t&&o.jsxs("button",{onClick:l,className:"flex flex-col items-center gap-0.5 mx-auto text-[11px] text-text-muted/60 hover:text-accent transition-colors group",children:[o.jsx(Ml,{className:"w-3.5 h-3.5"}),o.jsxs("span",{children:[i.after," newer session",1!==i.after?"s":""]}),i.newerLabel&&o.jsx("span",{className:"text-[10px] opacity-70 group-hover:opacity-100",children:i.newerLabel})]}),o.jsx("div",{children:"No sessions in this window"}),e&&o.jsxs("button",{onClick:c,className:"flex flex-col items-center gap-0.5 mx-auto text-[11px] text-text-muted/60 hover:text-accent transition-colors group",children:[i.olderLabel&&o.jsx("span",{className:"text-[10px] opacity-70 group-hover:opacity-100",children:i.olderLabel}),o.jsxs("span",{children:[i.before," older session",1!==i.before?"s":""]}),o.jsx(Nl,{className:"w-3.5 h-3.5"})]})]})}const b=y<g.length,w=b?g.slice(0,y):g;return o.jsxs("div",{className:"space-y-2 mb-4",children:[i&&i.after>0&&o.jsxs("button",{onClick:l,className:"flex flex-col items-center gap-0.5 w-full text-[11px] text-text-muted/60 hover:text-accent py-1.5 transition-colors group",children:[o.jsx(Ml,{className:"w-3.5 h-3.5"}),o.jsxs("span",{children:[i.after," newer session",1!==i.after?"s":""]}),i.newerLabel&&o.jsx("span",{className:"text-[10px] opacity-70 group-hover:opacity-100",children:i.newerLabel})]}),w.map(e=>o.jsx(Nu,{group:e,defaultExpanded:!1,globalShowPublic:r,showFullDate:a,highlightWords:s,onDeleteSession:u,onDeleteMilestone:f,onDeleteConversation:d},e.conversationId??e.sessions[0].session.session_id)),b&&o.jsx("div",{ref:x,className:"h-px"}),g.length>25&&o.jsxs("div",{className:"flex items-center justify-center gap-3 py-2 text-[11px] text-text-muted",children:[o.jsxs("span",{children:["Showing ",Math.min(y,g.length)," of ",g.length," conversations"]}),b&&o.jsx("button",{onClick:()=>v(g.length),className:"text-accent hover:text-accent/80 font-semibold transition-colors",children:"Show all"})]}),i&&i.before>0&&o.jsxs("button",{onClick:c,className:"flex flex-col items-center gap-0.5 w-full text-[11px] text-text-muted/60 hover:text-accent py-1.5 transition-colors group",children:[i.olderLabel&&o.jsx("span",{className:"text-[10px] opacity-70 group-hover:opacity-100",children:i.olderLabel}),o.jsxs("span",{children:[i.before," older session",1!==i.before?"s":""]}),o.jsx(Nl,{className:"w-3.5 h-3.5"})]})]})}var Eu={accent:{border:"border-accent/20",bg:"bg-[var(--accent-alpha)]",dot:"bg-accent"},success:{border:"border-success/20",bg:"bg-success/10",dot:"bg-success"},muted:{border:"border-border",bg:"bg-bg-surface-2/50",dot:"bg-text-muted"}};function Mu({label:e,color:t="accent",dot:n=!1,icon:r,glow:a=!1,className:s="","data-testid":i}){const l=Eu[t];return o.jsxs("div",{"data-testid":i,className:\`inline-flex items-center gap-2 px-3 py-1 rounded-full border \${l.border} \${l.bg} \${s}\`,style:a?{boxShadow:"0 0 10px rgba(var(--accent-rgb), 0.1)"}:void 0,children:[n&&o.jsx("span",{className:\`w-1.5 h-1.5 rounded-full \${l.dot} animate-pulse\`}),r,o.jsx("span",{className:"text-[10px] font-mono text-text-secondary tracking-widest uppercase",children:e})]})}var Pu={"1h":{visibleDuration:36e5,majorTickInterval:9e5,minorTickInterval:3e5,labelFormat:e=>e.toLocaleTimeString([],{hour:"numeric",minute:"2-digit",hour12:!0})},"3h":{visibleDuration:108e5,majorTickInterval:18e5,minorTickInterval:6e5,labelFormat:e=>e.toLocaleTimeString([],{hour:"numeric",minute:"2-digit",hour12:!0})},"6h":{visibleDuration:216e5,majorTickInterval:36e5,minorTickInterval:9e5,labelFormat:e=>e.toLocaleTimeString([],{hour:"numeric",minute:"2-digit",hour12:!0})},"12h":{visibleDuration:432e5,majorTickInterval:72e5,minorTickInterval:18e5,labelFormat:e=>e.toLocaleTimeString([],{hour:"numeric",minute:"2-digit",hour12:!0})},"24h":{visibleDuration:864e5,majorTickInterval:144e5,minorTickInterval:36e5,labelFormat:e=>e.toLocaleTimeString([],{hour:"numeric",minute:"2-digit",hour12:!0})},day:{visibleDuration:864e5,majorTickInterval:144e5,minorTickInterval:36e5,labelFormat:e=>e.toLocaleTimeString([],{hour:"numeric",minute:"2-digit",hour12:!0})},"7d":{visibleDuration:6048e5,majorTickInterval:864e5,minorTickInterval:216e5,labelFormat:e=>e.toLocaleDateString([],{weekday:"short",month:"short",day:"numeric"})},week:{visibleDuration:6048e5,majorTickInterval:864e5,minorTickInterval:216e5,labelFormat:e=>e.toLocaleDateString([],{weekday:"short",month:"short",day:"numeric"})},"30d":{visibleDuration:2592e6,majorTickInterval:6048e5,minorTickInterval:864e5,labelFormat:e=>e.toLocaleDateString([],{month:"short",day:"numeric"})},month:{visibleDuration:2592e6,majorTickInterval:6048e5,minorTickInterval:864e5,labelFormat:e=>e.toLocaleDateString([],{month:"short",day:"numeric"})}};function Lu(e){if(e<60)return\`\${e}s\`;const t=Math.round(e/60);if(t<60)return\`\${t}m\`;const n=Math.floor(t/60),r=t%60;return r>0?\`\${n}h \${r}m\`:\`\${n}h\`}function Du({value:e,onChange:t,scale:n,window:r,sessions:a=[],milestones:s=[],showPublic:i=!1}){const l=h.useRef(null),[c,u]=h.useState(0),d=void 0!==r;h.useEffect(()=>{if(!l.current)return;const e=new ResizeObserver(e=>{for(const t of e)u(t.contentRect.width)});return e.observe(l.current),u(l.current.getBoundingClientRect().width),()=>e.disconnect()},[]);const f=Pu[n],p=d?r.end-r.start:f.visibleDuration,m=d?r.end:e,g=d?r.start:e-f.visibleDuration,y=c>0?c/p:0,[v,x]=h.useState(!1),[b,w]=h.useState(0),k=h.useRef(0),S=h.useRef(0),j=h.useRef(null);h.useEffect(()=>()=>{j.current&&clearTimeout(j.current)},[]);const C=h.useCallback(e=>{x(!0),k.current=e.clientX,S.current=0,w(0),e.currentTarget.setPointerCapture(e.pointerId)},[]),N=h.useCallback(n=>{if(!v||0===y)return;const r=n.clientX-k.current;k.current=n.clientX,S.current+=r,w(e=>e+r),j.current||(j.current=setTimeout(()=>{j.current=null;const n=S.current;S.current=0,w(0);const r=e+-n/y,a=d?Math.max(Math.min(r,m),g):Math.min(r,Date.now());t(a)},80))},[v,y,e,m,g,d,t]),T=h.useCallback(()=>{if(x(!1),j.current&&(clearTimeout(j.current),j.current=null),0!==S.current&&y>0){const n=e+-S.current/y,r=d?Math.max(Math.min(n,m),g):Math.min(n,Date.now());S.current=0,t(r)}w(0)},[e,m,g,d,y,t]),E=h.useMemo(()=>{if(!c||0===y)return[];const e=g-f.majorTickInterval,t=m+f.majorTickInterval,n=[];for(let r=Math.ceil(e/f.majorTickInterval)*f.majorTickInterval;r<=t;r+=f.majorTickInterval)n.push({type:"major",time:r,position:(r-m)*y,label:f.labelFormat(new Date(r))});for(let r=Math.ceil(e/f.minorTickInterval)*f.minorTickInterval;r<=t;r+=f.minorTickInterval)r%f.majorTickInterval!==0&&n.push({type:"minor",time:r,position:(r-m)*y});return n},[g,m,c,y,f]),M=h.useMemo(()=>a.map(e=>({session:e,start:Cc(e.started_at),end:Cc(e.ended_at)})),[a]),P=h.useMemo(()=>{if(!c||0===y)return[];const e=M.filter(e=>e.start<=m&&e.end>=g).map(e=>({session:e.session,leftOffset:(Math.max(e.start,g)-m)*y,width:(Math.min(e.end,m)-Math.max(e.start,g))*y}));return e.length>100?(e.sort((e,t)=>t.width-e.width),e.slice(0,100)):e},[M,g,m,c,y]),L=h.useMemo(()=>s.map(e=>({milestone:e,time:Cc(e.created_at)})).sort((e,t)=>e.time-t.time),[s]),D=h.useMemo(()=>{if(!c||0===y||!L.length)return[];let e=0,t=L.length;for(;e<t;){const n=e+t>>1;L[n].time<g?e=n+1:t=n}const n=e;for(t=L.length;e<t;){const n=e+t>>1;L[n].time<=m?e=n+1:t=n}const r=e,a=[];for(let s=n;s<r;s++){const e=L[s];a.push({...e,offset:(e.time-m)*y})}return a},[L,g,m,c,y]),A=h.useMemo(()=>{if(!c||0===y)return null;const e=Date.now();return e<g||e>m?null:(e-m)*y},[g,m,c,y]),[_,z]=h.useState(null),R=h.useRef(e);return h.useEffect(()=>{_&&Math.abs(e-R.current)>1e3&&z(null),R.current=e},[e,_]),o.jsxs("div",{className:"relative h-16",children:[o.jsxs("div",{"data-testid":"time-scrubber",className:"absolute inset-0 bg-transparent border-t border-border/50 overflow-hidden select-none touch-none cursor-grab active:cursor-grabbing",ref:l,onPointerDown:C,onPointerMove:N,onPointerUp:T,style:{touchAction:"none"},children:[null!==A&&o.jsx("div",{className:"absolute top-0 bottom-0 w-[2px] bg-accent/50 z-30",style:{right:-A}}),null!==A&&A<-1&&o.jsx("div",{className:"absolute top-0 bottom-0 bg-bg-base/30 z-20",style:{right:0,width:-A}}),o.jsxs("div",{className:"absolute right-0 top-0 bottom-0 w-0 pointer-events-none",style:b?{transform:\`translateX(\${b}px)\`,willChange:"transform"}:void 0,children:[E.map(e=>o.jsx("div",{className:"absolute top-0 border-l "+("major"===e.type?"border-border/60":"border-border/30"),style:{left:e.position,height:"major"===e.type?"100%":"35%",bottom:0},children:"major"===e.type&&e.label&&o.jsx("span",{className:"absolute top-2 left-2 text-[9px] font-bold text-text-muted uppercase tracking-wider whitespace-nowrap bg-bg-surface-1/80 px-1 py-0.5 rounded",children:e.label})},e.time)),P.map(e=>o.jsx("div",{className:"absolute bottom-0 rounded-t-md pointer-events-auto cursor-pointer hover:opacity-80",style:{left:e.leftOffset,width:Math.max(e.width,3),height:"45%",backgroundColor:"rgba(var(--accent-rgb), 0.15)",borderTop:"2px solid rgba(var(--accent-rgb), 0.5)",boxShadow:"inset 0 1px 10px rgba(var(--accent-rgb), 0.05)"},onMouseEnter:t=>{const n=t.currentTarget.getBoundingClientRect();z({type:"session",data:e.session,x:n.left+n.width/2,y:n.top})},onMouseLeave:()=>z(null)},e.session.session_id)),D.map((e,n)=>o.jsx("div",{className:"absolute bottom-2 pointer-events-auto cursor-pointer z-40 transition-transform hover:scale-125",style:{left:e.offset,transform:"translateX(-50%)"},onMouseEnter:t=>{const n=t.currentTarget.getBoundingClientRect();z({type:"milestone",data:e.milestone,x:n.left+n.width/2,y:n.top})},onMouseLeave:()=>z(null),onClick:n=>{n.stopPropagation(),t(e.time)},children:o.jsx("div",{className:"w-3.5 h-3.5 rounded-full border-2 border-bg-surface-1 shadow-lg",style:{backgroundColor:bc[e.milestone.category]??"#9c9588",boxShadow:\`0 0 10px \${bc[e.milestone.category]}50\`}})},n))]})]}),_&&Sc.createPortal(o.jsx("div",{className:"fixed z-[9999] pointer-events-none",style:{left:_.x,top:_.y,transform:"translate(-50%, -100%)"},children:o.jsxs("div",{className:"mb-3 bg-bg-surface-3/95 backdrop-blur-md text-text-primary rounded-xl shadow-2xl px-3 py-2.5 text-[11px] min-w-[180px] max-w-[280px] border border-border/50 animate-in fade-in zoom-in-95 duration-200",children:["session"===_.type?o.jsx(Au,{session:_.data,showPublic:i}):o.jsx(_u,{milestone:_.data,showPublic:i}),o.jsx("div",{className:"absolute -bottom-1.5 left-1/2 -translate-x-1/2 w-3 h-3 bg-bg-surface-3/95 border-r border-b border-border/50 rotate-45"})]})}),document.body)]})}function Au({session:e,showPublic:t}){const n=gc[e.client]??e.client,r=t?e.title||e.project||\`\${n} Session\`:e.private_title||e.title||e.project||\`\${n} Session\`;return o.jsxs("div",{className:"flex flex-col gap-1",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx("span",{className:"font-bold text-xs text-accent uppercase tracking-widest",children:n}),o.jsx("span",{className:"text-[10px] text-text-muted font-mono",children:Lu(e.duration_seconds)})]}),o.jsx("div",{className:"h-px bg-border/50 my-0.5"}),o.jsx("div",{className:"text-text-primary font-medium",children:r}),o.jsx("div",{className:"text-text-secondary capitalize text-[10px]",children:e.task_type})]})}function _u({milestone:e,showPublic:t}){const n=t?e.title:e.private_title??e.title;return o.jsxs("div",{className:"flex flex-col gap-1",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx("span",{className:"font-bold text-[10px] uppercase tracking-widest",style:{color:bc[e.category]??"#9c9588"},children:e.category}),e.complexity&&o.jsx("span",{className:"text-[9px] font-mono text-text-muted font-bold border border-border/50 px-1 rounded uppercase",children:e.complexity})]}),o.jsx("div",{className:"h-px bg-border/50 my-0.5"}),o.jsx("div",{className:"font-bold text-xs break-words text-text-primary",children:n}),!t&&e.private_title&&o.jsxs("div",{className:"text-[10px] text-text-muted italic opacity-70",children:["Public: ",e.title]})]})}function zu(e,t){const n=e.trim();if(!n)return null;const r=new Date(t),a=n.match(/^(\\d{1,2}):(\\d{2})(?::(\\d{2}))?\\s*(AM|PM)$/i);if(a){let e=parseInt(a[1],10);const t=parseInt(a[2],10),n=a[3]?parseInt(a[3],10):0,s=a[4].toUpperCase();return e<1||e>12||t>59||n>59?null:("AM"===s&&12===e&&(e=0),"PM"===s&&12!==e&&(e+=12),r.setHours(e,t,n,0),r.getTime())}const s=n.match(/^(\\d{1,2}):(\\d{2})(?::(\\d{2}))?$/);if(s){const e=parseInt(s[1],10),t=parseInt(s[2],10),n=s[3]?parseInt(s[3],10):0;return e>23||t>59||n>59?null:(r.setHours(e,t,n,0),r.getTime())}return null}function Ru({value:e,onChange:t,scale:n,onScaleChange:r,sessions:a,showPublic:s=!1}){const i=null===e,l=Rc(n),[c,u]=h.useState(Date.now());h.useEffect(()=>{if(!i)return;const e=setInterval(()=>u(Date.now()),1e3);return()=>clearInterval(e)},[i]);const d=i?c:e,f=Ic(n,d),p=h.useMemo(()=>{const{start:e,end:t}=f,n=e=>new Date(e).toLocaleTimeString([],{hour:"numeric",minute:"2-digit",hour12:!0}),r=e=>new Date(e).toLocaleDateString([],{weekday:"short",month:"short",day:"numeric"}),a=new Date(e).toDateString()===new Date(t-1).toDateString();return i?a?\`\${n(e)} \u2013 Now\`:\`\${r(e)}, \${n(e)} \u2013 Now\`:a?\`\${n(e)} \u2013 \${n(t)}\`:\`\${r(e)}, \${n(e)} \u2013 \${r(t)}, \${n(t)}\`},[f,i]),[m,g]=h.useState(!1),[y,v]=h.useState(""),x=h.useRef(null),b=h.useRef(!1),w=h.useRef(""),k=h.useRef(!1),S=h.useRef(0),j=h.useCallback(e=>{if(l){if(e>=Date.now()-2e3)return void t(null);const a=_c[n];return a&&r(a),void t(e)}const a=Date.now();if(e>=a-2e3)return k.current=!0,S.current=a,void t(null);k.current&&a-S.current<300||k.current&&e>=a-1e4&&e<=a+2e3?t(null):(k.current=!1,t(e))},[t,r,l,n]),C=e=>{const r=Oc(n,d,e);$c(n,r)?t(null):t(r)},N=()=>{b.current=i,t(d);const e=new Date(d).toLocaleTimeString([],{hour12:!0,hour:"2-digit",minute:"2-digit",second:"2-digit"});w.current=e,v(e),g(!0),requestAnimationFrame(()=>x.current?.select())},T=()=>{if(g(!1),b.current&&y===w.current)return void t(null);const e=zu(y,d);null!==e&&t(Math.min(e,Date.now()))},E=e=>{if(l){const t=-1===e?"Previous":"Next";return"day"===n?\`\${t} Day\`:"week"===n?\`\${t} Week\`:\`\${t} Month\`}return\`\${-1===e?"Back":"Forward"} \${Vc[n].toLowerCase()}\`};return o.jsxs("div",{"data-testid":"time-travel-panel",className:"flex flex-col bg-bg-surface-1 border border-border/50 rounded-2xl overflow-hidden mb-8 shadow-sm",children:[o.jsxs("div",{className:"flex flex-col md:flex-row md:items-center justify-between px-6 py-3 border-b border-border/50 gap-4",children:[o.jsxs("div",{className:"flex flex-col items-start gap-0.5",children:[o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsxs("div",{className:"flex items-center gap-2 h-8",children:[m?o.jsx("input",{ref:x,type:"text",value:y,onChange:e=>v(e.target.value),onBlur:T,onKeyDown:e=>{if("Enter"===e.key)return void T();if("Escape"===e.key)return e.preventDefault(),g(!1),void(b.current&&t(null));if("ArrowUp"!==e.key&&"ArrowDown"!==e.key)return;e.preventDefault();const n=x.current;if(!n)return;const r=n.selectionStart??0,a="ArrowUp"===e.key?1:-1,s=zu(y,d);if(null===s)return;const i=y.indexOf(":"),o=y.indexOf(":",i+1),l=y.lastIndexOf(" ");let c;c=r<=i?36e5*a:o>-1&&r<=o?6e4*a:l>-1&&r<=l?1e3*a:12*a*36e5;const u=Math.min(s+c,Date.now()),h=new Date(u).toLocaleTimeString([],{hour12:!0,hour:"2-digit",minute:"2-digit",second:"2-digit"});v(h),t(u),requestAnimationFrame(()=>{n&&n.setSelectionRange(r,r)})},className:"text-xl font-mono font-bold tracking-tight bg-bg-surface-2 border rounded-lg px-2 -ml-2 w-[155px] outline-none text-text-primary "+(i?"border-accent":"border-history"),style:{boxShadow:i?"0 0 10px rgba(var(--accent-rgb), 0.2)":"0 0 10px rgba(var(--history-rgb), 0.2)"}}):o.jsxs("button",{onClick:N,className:"group flex items-center gap-2 hover:bg-bg-surface-2/50 rounded-lg px-2 -ml-2 py-1 transition-all cursor-text",title:"Click to edit time",children:[o.jsx(Ll,{className:"w-5 h-5 "+(i?"text-text-muted":"text-history")}),o.jsx("span",{"data-testid":"time-display",className:"text-xl font-mono font-bold tracking-tight tabular-nums "+(i?"text-text-primary":"text-history"),children:new Date(d).toLocaleTimeString([],{hour12:!0,hour:"2-digit",minute:"2-digit",second:"2-digit"})})]}),o.jsx("button",{onClick:m?T:N,className:"p-1.5 rounded-lg transition-colors flex-shrink-0 "+(m?i?"bg-accent text-bg-base hover:bg-accent-bright":"bg-history text-white hover:brightness-110":"text-text-muted hover:text-text-primary hover:bg-bg-surface-2"),title:m?"Confirm time":"Edit time",children:o.jsx(Zl,{className:"w-3.5 h-3.5"})})]}),i?o.jsx(Mu,{label:"Live",color:"success",dot:!0,glow:!0,"data-testid":"live-badge"}):o.jsxs(o.Fragment,{children:[o.jsx(Mu,{label:"History",color:"muted","data-testid":"history-badge"}),o.jsxs("button",{"data-testid":"go-live-button",onClick:()=>t(null),className:"group flex items-center gap-1.5 px-3 py-1.5 text-[10px] font-bold uppercase tracking-widest bg-history/10 hover:bg-history text-history hover:text-white rounded-xl transition-all border border-history/20",children:[o.jsx(tc,{className:"w-3 h-3 group-hover:-rotate-90 transition-transform duration-500"}),"Live"]})]})]}),o.jsxs("div",{className:"flex items-center gap-2 text-sm text-text-secondary font-medium px-0.5",children:[o.jsx(kl,{className:"w-3.5 h-3.5 text-text-muted"}),o.jsx("span",{"data-testid":"date-display",children:new Date(d).toLocaleDateString([],{weekday:"short",month:"long",day:"numeric",year:"numeric"})}),o.jsx("span",{className:"text-text-muted",children:"\xB7"}),o.jsx("span",{"data-testid":"period-label",className:"text-text-muted text-xs tabular-nums",children:p})]})]}),o.jsxs("div",{className:"flex flex-col sm:flex-row items-center gap-4",children:[o.jsxs("div",{className:"flex items-center bg-bg-surface-2/50 border border-border/50 rounded-xl p-1 shadow-inner",children:[Lc.map(e=>o.jsx("button",{"data-testid":\`scale-\${e}\`,onClick:()=>r(e),className:"px-3 py-1.5 text-[10px] font-bold uppercase tracking-wider rounded-lg transition-all "+(n===e?"bg-bg-surface-3 text-text-primary shadow-sm":"text-text-muted hover:text-text-primary hover:bg-bg-surface-2"),title:Vc[e],children:e},e)),o.jsx("div",{className:"w-px h-5 bg-border/50 mx-1"}),Dc.map(e=>{const t=n===e||zc[n]===e;return o.jsx("button",{"data-testid":\`scale-\${e}\`,onClick:()=>r(e),className:"px-3 py-1.5 text-[10px] font-bold uppercase tracking-wider rounded-lg transition-all "+(t?"bg-bg-surface-3 text-text-primary shadow-sm":"text-text-muted hover:text-text-primary hover:bg-bg-surface-2"),title:Vc[e],children:e},e)})]}),o.jsx("div",{className:"flex items-center gap-2",children:o.jsxs("div",{className:"flex items-center gap-1 bg-bg-surface-2/50 border border-border/50 rounded-xl p-1",children:[o.jsx("button",{onClick:()=>C(-1),className:"p-2 text-text-muted hover:text-text-primary hover:bg-bg-surface-2 rounded-lg transition-colors",title:E(-1),children:o.jsx(Tl,{className:"w-4 h-4"})}),o.jsx("button",{onClick:()=>C(1),className:"p-2 text-text-muted hover:text-text-primary hover:bg-bg-surface-2 rounded-lg transition-colors disabled:opacity-20 disabled:cursor-not-allowed",title:E(1),disabled:i||d>=Date.now()-1e3,children:o.jsx(El,{className:"w-4 h-4"})})]})})]})]}),o.jsx(Du,{value:d,onChange:j,scale:n,window:l?f:void 0,sessions:a,milestones:void 0,showPublic:s})]})}function Fu({children:e}){return o.jsx("span",{className:"text-text-primary font-medium",children:e})}function Vu(e){return e.reduce((e,t)=>e+t.duration_seconds,0)/3600}function Iu(e,t){const n=e.filter(e=>null!=e.evaluation);if(n.length<2)return null;return n.reduce((e,n)=>e+n.evaluation[t],0)/n.length}function Ou(e,t,n,r,a,s){var i;const l=[],c=a-(s-a),u=a,d=function(e,t,n){return e.filter(e=>{const r=new Date(e.started_at).getTime();return r>=t&&r<=n})}(n,c,u),h=function(e,t,n){return e.filter(e=>{const r=new Date(e.created_at).getTime();return r>=t&&r<=n})}(r,c,u),f=Vu(e),p=Vu(d),m=Iu(e,"prompt_quality"),g=Iu(d,"prompt_quality");if(null!==m&&null!==g&&m>g+.3&&l.push({priority:10,node:o.jsxs("span",{children:["Your prompt quality improved from ",o.jsx(Fu,{children:g.toFixed(1)})," to"," ",o.jsx(Fu,{children:m.toFixed(1)})," \u2014 clearer prompts mean faster results."]})}),d.length>0&&e.length>0){const e=t.length/Math.max(f,.1),n=h.length/Math.max(p,.1);e>1.2*n&&t.length>=2&&l.push({priority:9,node:o.jsxs("span",{children:["You're shipping ",o.jsxs(Fu,{children:[Math.round(100*(e/n-1)),"% faster"]})," ","this period \u2014 great momentum."]})})}const y=t.filter(e=>"complex"===e.complexity).length,v=h.filter(e=>"complex"===e.complexity).length;y>v&&y>=2&&l.push({priority:8,node:o.jsxs("span",{children:[o.jsx(Fu,{children:y})," complex ",1===y?"task":"tasks"," this period vs"," ",o.jsx(Fu,{children:v})," before \u2014 you're taking on harder problems."]})});const x=e.filter(e=>null!=e.evaluation),b=x.filter(e=>"completed"===e.evaluation.task_outcome&&e.evaluation.iteration_count<=3);if(x.length>=3&&b.length>0){const e=Math.round(b.length/x.length*100);e>=50&&l.push({priority:7,node:o.jsxs("span",{children:[o.jsxs(Fu,{children:[e,"%"]})," of your sessions completed in 3 or fewer turns \u2014 efficient prompting."]})})}const w=function(e){if(0===e.length)return null;const t={};for(const a of e){const e=a.task_type||"coding";t[e]=(t[e]??0)+a.duration_seconds}const n=e.reduce((e,t)=>e+t.duration_seconds,0),r=Object.entries(t).sort((e,t)=>t[1]-e[1])[0];return r&&0!==n?{type:r[0],pct:Math.round(r[1]/n*100)}:null}(e);if(w&&w.pct>=60&&e.length>=2){const e={coding:"building",debugging:"debugging",testing:"testing",planning:"planning",reviewing:"reviewing",documenting:"documenting",refactoring:"refactoring",research:"researching",analysis:"analyzing"}[w.type]??w.type;l.push({priority:6,node:o.jsxs("span",{children:["Deep focus: ",o.jsxs(Fu,{children:[w.pct,"%"]})," of your time spent ",e,"."]})})}const k={};for(const o of e)o.client&&(k[i=o.client]??(k[i]=[])).push(o);const S=Object.entries(k).filter(([,e])=>e.length>=2);if(S.length>=2){const e=S.map(([e,n])=>{const r=Vu(n),a=new Set(n.map(e=>e.session_id)),s=t.filter(e=>a.has(e.session_id));return{name:e,rate:s.length/Math.max(r,.1),count:s.length}}).filter(e=>e.count>0);if(e.length>=2){e.sort((e,t)=>t.rate-e.rate);const t=e[0],n=gc[t.name]??t.name;l.push({priority:5,node:o.jsxs("span",{children:[o.jsx(Fu,{children:n})," is your most productive tool this period \u2014 ",t.count," ",1===t.count?"milestone":"milestones"," shipped."]})})}}const j=Iu(e,"context_provided");if(null!==j&&j<3.5&&l.push({priority:4,node:o.jsxs("span",{children:["Tip: Your context score averages ",o.jsxs(Fu,{children:[j.toFixed(1),"/5"]})," \u2014 try including specific files and error messages for faster results."]})}),x.length>=3){const e=x.filter(e=>"completed"===e.evaluation.task_outcome).length,t=Math.round(e/x.length*100);100===t?l.push({priority:3,node:o.jsxs("span",{children:[o.jsx(Fu,{children:"100%"})," completion rate \u2014 every task landed."]})}):t<70&&l.push({priority:4,node:o.jsxs("span",{children:[o.jsxs(Fu,{children:[t,"%"]})," completion rate \u2014 try breaking tasks into smaller, well-scoped pieces."]})})}return p>0&&f>1.5*p&&f>=1&&l.push({priority:2,node:o.jsxs("span",{children:[o.jsxs(Fu,{children:[Math.round(100*(f/p-1)),"% more"]})," AI-paired time this period \u2014 you're leaning in."]})}),0===e.length&&l.push({priority:1,node:o.jsx("span",{className:"text-text-muted",children:"No sessions in this window. Start coding with AI to see insights here."})}),l.sort((e,t)=>t.priority-e.priority)}function $u({sessions:e,milestones:t,windowStart:n,windowEnd:r,allSessions:a,allMilestones:s}){const i=h.useMemo(()=>{const i=Ou(e,t,a??e,s??t,n,r);return i[0]?.node??null},[e,t,a,s,n,r]);return i?o.jsx(pl.div,{initial:{opacity:0},animate:{opacity:1},className:"rounded-xl bg-bg-surface-1 border border-border/50 px-4 py-3",children:o.jsxs("div",{className:"flex items-start gap-3",children:[o.jsx(sc,{className:"w-4 h-4 text-accent flex-shrink-0 mt-0.5"}),o.jsx("p",{className:"text-sm text-text-secondary leading-relaxed",children:i})]})}):null}function Bu(e){return e>=5?"var(--color-text-muted)":e>=4?"#f59e0b":e>=3?"#f97316":"var(--color-error)"}function Hu({sessions:e}){const{scores:t,summaryLine:n}=h.useMemo(()=>{const t=e.filter(e=>null!=e.evaluation);if(0===t.length)return{scores:null,summaryLine:null};let n=0,r=0,a=0,s=0,i=0,o=0;for(const e of t){const t=e.evaluation;n+=t.prompt_quality,r+=t.context_provided,a+=t.independence_level,s+=t.scope_quality,o+=t.iteration_count,"completed"===t.task_outcome&&i++}const l=t.length,c=Math.round(i/l*100);return{scores:[{label:"Prompt Quality",value:n/l,max:5},{label:"Context",value:r/l,max:5},{label:"Independence",value:a/l,max:5},{label:"Scope",value:s/l,max:5},{label:"Completion",value:c/20,max:5}],summaryLine:\`\${l} session\${1===l?"":"s"} evaluated \xB7 \${c}% completed \xB7 avg \${(o/l).toFixed(1)} iterations\`}},[e]);return o.jsxs(pl.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.1},className:"rounded-xl bg-bg-surface-1 border border-border/50 p-4",children:[o.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[o.jsx("div",{className:"p-1.5 rounded-lg bg-bg-surface-2",children:o.jsx(ic,{className:"w-3.5 h-3.5 text-text-muted"})}),o.jsx("h2",{className:"text-sm font-bold text-text-muted uppercase tracking-widest",children:"AI Proficiency"})]}),null===t?o.jsx("p",{className:"text-xs text-text-muted py-2",children:"No evaluation data yet"}):o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"space-y-3",children:t.map((e,t)=>{const n=e.value/e.max*100,r="Completion"===e.label?\`\${Math.round(n)}%\`:e.value>=5?"5/5":\`\${e.value.toFixed(1)}/5\`,a=e.value>=e.max;return o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("span",{className:"text-xs text-text-secondary font-medium w-28 text-right shrink-0",children:e.label}),o.jsx("div",{className:"flex-1 h-1.5 rounded-full bg-bg-surface-2/50 overflow-hidden",children:o.jsx(pl.div,{className:"h-full rounded-full",style:{backgroundColor:Bu(e.value)},initial:{width:0},animate:{width:\`\${n}%\`},transition:{duration:.6,delay:.05*t,ease:[.22,1,.36,1]}})}),o.jsx("span",{className:"text-xs font-mono w-10 text-right shrink-0 "+(a?"text-text-muted":"font-bold"),style:a?void 0:{color:Bu(e.value)},children:r})]},e.label)})}),o.jsx("p",{className:"text-[10px] text-text-muted mt-4 px-1 font-mono",children:n})]})]})}var Uu=["Output","Efficiency","Prompts","Consistency","Breadth"];function Wu(e,t,n,r,a){const s=2*Math.PI*e/5-Math.PI/2;return[n+a*t*Math.cos(s),r+a*t*Math.sin(s)]}function qu(e,t,n,r){const a=[];for(let s=0;s<5;s++){const[i,o]=Wu(s,e,t,n,r);a.push(\`\${i},\${o}\`)}return a.join(" ")}function Yu({sessions:e,milestones:t,streak:n}){const{values:r,hasEvalData:a}=h.useMemo(()=>{const r={simple:1,medium:2,complex:4};let a=0;for(const e of t)a+=r[e.complexity]??1;const s=Math.min(1,a/10),i=e.reduce((e,t)=>e+t.files_touched,0),o=e.reduce((e,t)=>e+t.duration_seconds,0)/3600,l=Math.min(1,i/Math.max(o,1)/20),c=e.filter(e=>null!=e.evaluation);let u=0;const d=c.length>0;if(d){u=c.reduce((e,t)=>e+t.evaluation.prompt_quality,0)/c.length/5}const h=Math.min(1,n/14),f=new Set;for(const t of e)for(const e of t.languages)f.add(e);return{values:[s,l,u,h,Math.min(1,f.size/5)],hasEvalData:d}},[e,t,n]),s=100,i=100,l=[];for(let o=0;o<5;o++){const e=Math.max(r[o],.02),[t,n]=Wu(o,e,s,i,70);l.push(\`\${t},\${n}\`)}const c=l.join(" ");return o.jsxs(pl.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.15},className:"rounded-xl bg-bg-surface-1 border border-border/50 p-4",children:[o.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[o.jsx("div",{className:"p-1.5 rounded-lg bg-bg-surface-2",children:o.jsx(bl,{className:"w-3.5 h-3.5 text-text-muted"})}),o.jsx("h2",{className:"text-sm font-bold text-text-muted uppercase tracking-widest",children:"Skill Profile"})]}),o.jsx("div",{className:"flex justify-center",children:o.jsxs("svg",{viewBox:"0 0 200 200",width:200,height:200,className:"overflow-visible",children:[[.33,.66,1].map(e=>o.jsx("polygon",{points:qu(e,s,i,70),fill:"none",stroke:"var(--color-bg-surface-3)",strokeWidth:.5,opacity:.6},e)),Array.from({length:5}).map((e,t)=>{const[n,r]=Wu(t,1,s,i,70);return o.jsx("line",{x1:s,y1:i,x2:n,y2:r,stroke:"var(--color-bg-surface-3)",strokeWidth:.5,opacity:.4},\`axis-\${t}\`)}),o.jsx(pl.polygon,{points:c,fill:"var(--color-accent)",fillOpacity:.2,stroke:"var(--color-accent)",strokeWidth:1.5,strokeLinejoin:"round",initial:{opacity:0,scale:.5},animate:{opacity:1,scale:1},transition:{duration:.6,ease:[.22,1,.36,1]},style:{transformOrigin:"100px 100px"}}),r.map((e,t)=>{const n=Math.max(e,.02),[r,l]=Wu(t,n,s,i,70),c=2===t&&!a;return o.jsx("circle",{cx:r,cy:l,r:2.5,fill:c?"var(--color-text-muted)":"var(--color-accent-bright)",opacity:c?.4:1},\`point-\${t}\`)}),Uu.map((e,t)=>{const n=function(e,t,n,r){const[a,s]=Wu(e,1.28,t,n,r);let i="middle";return 1!==e&&2!==e||(i="start"),3!==e&&4!==e||(i="end"),{x:a,y:s,anchor:i}}(t,s,i,70),r=2===t&&!a;return o.jsx("text",{x:n.x,y:n.y,textAnchor:n.anchor,dominantBaseline:"central",className:"text-[9px] font-medium",fill:r?"var(--color-text-muted)":"var(--color-text-secondary)",opacity:r?.5:1,children:e},e)})]})}),o.jsx("div",{className:"flex justify-center gap-3 mt-2 flex-wrap",children:Uu.map((e,t)=>{const n=2===t&&!a,s=Math.round(100*r[t]);return o.jsxs("span",{className:"text-[10px] font-mono "+(n?"text-text-muted/50":"text-text-muted"),children:[s,"%"]},e)})})]})}var Ku={coding:"#b4f82c",debugging:"#f87171",testing:"#60a5fa",planning:"#a78bfa",reviewing:"#34d399",documenting:"#fbbf24",learning:"#f472b6",deployment:"#fb923c",devops:"#e879f9",research:"#22d3ee",migration:"#facc15",design:"#c084fc",data:"#2dd4bf",security:"#f43f5e",configuration:"#a3e635",other:"#94a3b8"};function Qu(e){if(e<60)return"<1m";const t=Math.round(e/60);if(t<60)return\`\${t}m\`;return\`\${(e/3600).toFixed(1)}h\`}function Xu({byTaskType:e}){const t=Object.entries(e).filter(([,e])=>e>0).sort((e,t)=>t[1]-e[1]);if(0===t.length)return null;const n=t[0][1];return o.jsxs("div",{className:"rounded-xl bg-bg-surface-1 border border-border/50 p-4 mb-8",children:[o.jsx("h2",{className:"text-sm font-bold text-text-muted uppercase tracking-widest mb-4 px-1",children:"Task Types"}),o.jsx("div",{className:"space-y-2.5",children:t.map(([e,t],r)=>{const a=Ku[e]??Ku.other,s=t/n*100;return o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("span",{className:"text-xs text-text-secondary font-medium w-24 text-right shrink-0",children:(i=e,i.charAt(0).toUpperCase()+i.slice(1))}),o.jsx("div",{className:"flex-1 h-5 rounded bg-bg-surface-2/50 overflow-hidden",children:o.jsx(pl.div,{className:"h-full rounded",style:{backgroundColor:a},initial:{width:0},animate:{width:\`\${s}%\`},transition:{duration:.6,delay:.05*r,ease:[.22,1,.36,1]}})}),o.jsx("span",{className:"text-xs text-text-muted font-mono w-12 text-right shrink-0",children:Qu(t)})]},e);var i})})]})}var Zu=["#b4f82c","#60a5fa","#f87171","#a78bfa","#fbbf24","#34d399","#f472b6","#22d3ee"];function Gu(e){if(e<60)return"<1m";const t=Math.round(e/60);if(t<60)return\`\${t}m\`;return\`\${(e/3600).toFixed(1)}h\`}function Ju({sessions:e,byProject:t}){const[n,r]=h.useState("user"),[a,s]=h.useState(!1),i=h.useMemo(()=>{const t=[];for(const o of e){if(!o.project)continue;const e=new Date(o.started_at).getTime(),n=new Date(o.ended_at).getTime();n<=e||(t.push({time:e,project:o.project,delta:1}),t.push({time:n,project:o.project,delta:-1}))}t.sort((e,t)=>e.time-t.time||e.delta-t.delta);const n={},r={};let a=0,s=0;for(const e of t){if(a>0&&e.time>s){const t=e.time-s,a=Object.keys(r).filter(e=>r[e]>0),i=a.length;if(i>0){const e=t/i;for(const t of a)n[t]=(n[t]??0)+e}}s=e.time,r[e.project]=(r[e.project]??0)+e.delta,0===r[e.project]&&delete r[e.project],a=Object.values(r).reduce((e,t)=>e+t,0)}const i={};for(const[e,o]of Object.entries(n))o>0&&(i[e]=o/1e3);return i},[e]),l="user"===n?i:t,c=h.useMemo(()=>function(e){const t=Object.entries(e).filter(([,e])=>e>0).sort((e,t)=>t[1]-e[1]);if(0===t.length)return[];const n=t.reduce((e,[,t])=>e+t,0);let r,a=0;t.length<=6?r=t:(r=t.slice(0,6),a=t.slice(6).reduce((e,[,t])=>e+t,0));const s=r.map(([e,t],r)=>({name:e,seconds:t,color:Zu[r%Zu.length],percentage:t/n*100}));return a>0&&s.push({name:"Other",seconds:a,color:"#64748b",percentage:a/n*100}),s}(l),[l]);if(0===c.length)return null;const u=c.reduce((e,t)=>e+t.seconds,0),d=140,f=2*Math.PI*52;let p=0;const m=c.map(e=>{const t=e.percentage/100*f,n=f-t,r=.25*f-p;return p+=t,{...e,dashLength:t,gap:n,offset:r}}),g={user:"Clock Time",ai:"AI Time"};return o.jsxs(pl.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.1},className:"rounded-xl bg-bg-surface-1 border border-border/50 p-4",children:[o.jsxs("div",{className:"flex items-center justify-between mb-4 px-1",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("div",{className:"p-1.5 rounded-lg bg-bg-surface-2",children:o.jsx(Bl,{className:"w-3.5 h-3.5 text-text-muted"})}),o.jsx("h2",{className:"text-sm font-bold text-text-muted uppercase tracking-widest",children:"Project Allocation"})]}),o.jsxs("div",{className:"relative",children:[o.jsxs("button",{onClick:()=>s(e=>!e),className:"inline-flex items-center gap-1 px-2 py-1 rounded-md border border-border/50 bg-bg-surface-2 text-[11px] text-text-secondary font-medium hover:border-text-muted/50 transition-colors",children:[g[n],o.jsx(Nl,{className:"w-3 h-3 text-text-muted"})]}),a&&o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"fixed inset-0 z-10",onClick:()=>s(!1)}),o.jsx("div",{className:"absolute right-0 top-full mt-1 z-20 min-w-[120px] rounded-lg border border-border/50 bg-bg-surface-1 shadow-lg py-1",children:Object.entries(g).map(([e,t])=>o.jsx("button",{onClick:()=>{r(e),s(!1)},className:"w-full text-left px-3 py-1.5 text-xs transition-colors "+(e===n?"text-accent bg-accent/10 font-medium":"text-text-secondary hover:bg-bg-surface-2"),children:t},e))})]})]})]}),o.jsxs("div",{className:"flex flex-col sm:flex-row items-center gap-6",children:[o.jsxs("div",{className:"relative shrink-0",style:{width:d,height:d},children:[o.jsxs("svg",{width:d,height:d,viewBox:"0 0 140 140",children:[o.jsx("circle",{cx:70,cy:70,r:52,fill:"none",stroke:"var(--color-bg-surface-2, #1e293b)",strokeWidth:18,opacity:.3}),m.map((e,t)=>o.jsx(pl.circle,{cx:70,cy:70,r:52,fill:"none",stroke:e.color,strokeWidth:18,strokeDasharray:\`\${e.dashLength} \${e.gap}\`,strokeDashoffset:e.offset,strokeLinecap:"butt",initial:{opacity:0},animate:{opacity:1},transition:{duration:.5,delay:.1+.08*t,ease:[.22,1,.36,1]}},\`\${n}-\${e.name}\`))]}),o.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center",children:[o.jsx("span",{className:"text-lg font-bold text-text-primary leading-none",children:c.length}),o.jsx("span",{className:"text-[10px] text-text-muted mt-0.5",children:1===c.length?"project":"projects"})]})]}),o.jsx("div",{className:"flex-1 min-w-0 space-y-1.5 w-full",children:c.map((e,t)=>o.jsxs(pl.div,{className:"flex items-center gap-2.5",initial:{opacity:0,x:-8},animate:{opacity:1,x:0},transition:{duration:.4,delay:.15+.06*t,ease:[.22,1,.36,1]},children:[o.jsx("span",{className:"w-2.5 h-2.5 rounded-full shrink-0",style:{backgroundColor:e.color}}),o.jsx("span",{className:"text-xs text-text-secondary font-medium truncate flex-1 min-w-0",children:e.name}),o.jsx("span",{className:"text-[10px] text-text-muted font-mono shrink-0",children:Gu(e.seconds)}),o.jsxs("span",{className:"text-[10px] text-text-muted/70 font-mono w-10 text-right shrink-0",children:[e.percentage.toFixed(0),"%"]})]},e.name))})]}),o.jsx("div",{className:"mt-4 flex h-2 rounded-full overflow-hidden bg-bg-surface-2/30",children:c.map(e=>{const t=u>0?e.seconds/u*100:0;return 0===t?null:o.jsx(pl.div,{className:"h-full",style:{backgroundColor:e.color},initial:{width:0},animate:{width:\`\${t}%\`},transition:{duration:.8,ease:[.22,1,.36,1]}},e.name)})})]})}var ed={feature:"bg-success/10 text-success border-success/20",bugfix:"bg-error/10 text-error border-error/20",refactor:"bg-purple/10 text-purple border-purple/20",test:"bg-blue/10 text-blue border-blue/20",docs:"bg-accent/10 text-accent border-accent/20",setup:"bg-text-muted/10 text-text-muted border-text-muted/20",deployment:"bg-emerald/10 text-emerald border-emerald/20"};function td(e){const t=Date.now()-new Date(e).getTime(),n=Math.floor(t/6e4);if(n<1)return"just now";if(n<60)return\`\${n}m ago\`;const r=Math.floor(n/60);if(r<24)return\`\${r}h ago\`;const a=Math.floor(r/24);return 1===a?"yesterday":a<7?\`\${a}d ago\`:new Date(e).toLocaleDateString([],{month:"short",day:"numeric"})}function nd({milestones:e,showPublic:t=!1}){const n=[...e].sort((e,t)=>new Date(t.created_at).getTime()-new Date(e.created_at).getTime()).slice(0,8);return o.jsxs(pl.div,{initial:{opacity:0,y:12},animate:{opacity:1,y:0},transition:{duration:.35,ease:[.22,1,.36,1]},className:"rounded-xl bg-bg-surface-1 border border-border/50 p-4",children:[o.jsxs("div",{className:"flex items-center gap-2 mb-3 px-1",children:[o.jsx(uc,{className:"w-4 h-4 text-accent"}),o.jsx("h2",{className:"text-sm font-bold text-text-muted uppercase tracking-widest",children:"Recent Achievements"}),o.jsxs("span",{className:"text-[10px] text-text-muted font-mono bg-bg-surface-2 px-2 py-0.5 rounded ml-auto",children:[e.length," total"]})]}),0===n.length?o.jsx("div",{className:"text-sm text-text-muted text-center py-6",children:"No milestones yet \u2014 complete your first session!"}):o.jsx("div",{className:"space-y-0.5",children:n.map((e,n)=>{const r=bc[e.category]??"#9c9588",a=ed[e.category]??"bg-bg-surface-2 text-text-secondary border-border",s=yc[e.client]??e.client.slice(0,2).toUpperCase(),i=mc[e.client]??"#91919a",l=t?e.title:e.private_title||e.title,c="complex"===e.complexity;return o.jsxs(pl.div,{initial:{opacity:0,x:-8},animate:{opacity:1,x:0},transition:{duration:.25,delay:.04*n},className:"flex items-center gap-3 py-2 px-2 rounded-lg hover:bg-bg-surface-2/40 transition-colors",children:[o.jsx("div",{className:"w-2 h-2 rounded-full flex-shrink-0",style:{backgroundColor:r}}),o.jsx("span",{className:"text-sm font-medium text-text-secondary hover:text-text-primary truncate flex-1 min-w-0",children:l}),o.jsx("span",{className:\`text-[9px] uppercase tracking-wider font-bold px-1.5 py-0.5 rounded-full border flex-shrink-0 \${a}\`,children:e.category}),c&&o.jsxs("span",{className:"flex items-center gap-0.5 text-[9px] uppercase tracking-wider font-bold px-1.5 py-0.5 rounded-full border bg-purple/10 text-purple border-purple/20 flex-shrink-0",children:[o.jsx(bl,{className:"w-2.5 h-2.5"}),"complex"]}),o.jsx("span",{className:"text-[10px] text-text-muted font-mono flex-shrink-0",children:td(e.created_at)}),o.jsx("div",{className:"w-5 h-5 rounded flex items-center justify-center text-[8px] font-bold font-mono flex-shrink-0",style:{backgroundColor:\`\${i}15\`,color:i,border:\`1px solid \${i}20\`},children:s})]},e.id)})})]})}function rd(e){const t=e/3600;return t<1?\`\${Math.round(60*t)}m\`:\`\${t.toFixed(1)}h\`}function ad(e,t){return Object.entries(e).sort((e,t)=>t[1]-e[1]).slice(0,t)}function sd({label:e,children:t}){return o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("span",{className:"text-[10px] text-text-muted uppercase tracking-widest font-bold whitespace-nowrap",children:e}),o.jsx("div",{className:"flex items-center gap-1.5 overflow-x-auto pb-1 no-scrollbar",children:t})]})}function id({stats:e}){const t=ad(e.byClient,4),n=ad(e.byLanguage,4);return 0===t.length&&0===n.length?null:o.jsxs("div",{className:"flex flex-col gap-4 mb-8 p-4 rounded-xl bg-bg-surface-1/30 border border-border/50",children:[t.length>0&&o.jsx(sd,{label:"Top Clients",children:t.map(([e,t])=>{const n=mc[e];return o.jsxs("span",{className:"text-[11px] font-mono px-2.5 py-1 rounded-full bg-bg-surface-1 border border-border hover:border-accent/40 transition-colors shadow-sm whitespace-nowrap group cursor-default",style:n?{borderLeftWidth:"3px",borderLeftColor:n}:void 0,title:rd(t),children:[gc[e]??e,o.jsx("span",{className:"ml-1.5 text-text-muted opacity-0 group-hover:opacity-100 transition-opacity",children:rd(t)})]},e)})}),n.length>0&&o.jsx(sd,{label:"Languages",children:n.map(([e,t])=>o.jsxs("span",{className:"text-[11px] font-mono px-2.5 py-1 rounded-full bg-bg-surface-1 border border-border hover:border-accent/40 transition-colors shadow-sm whitespace-nowrap group cursor-default",title:rd(t),children:[e,o.jsx("span",{className:"ml-1.5 text-text-muted opacity-0 group-hover:opacity-100 transition-opacity",children:rd(t)})]},e))})]})}function od(e,t,n){try{const n="undefined"!=typeof window?localStorage.getItem(e):null;if(n&&t.includes(n))return n}catch{}return n}function ld(e,t){try{localStorage.setItem(e,t)}catch{}}function cd({sessions:e,milestones:t,onDeleteSession:n,onDeleteConversation:r,onDeleteMilestone:a,defaultTimeScale:s="day",activeTab:i,onActiveTabChange:l}){const[c,u]=h.useState(null),[d,f]=h.useState(()=>od("useai-time-scale",Ac,s)),[p,m]=h.useState({category:"all",client:"all",project:"all",language:"all"}),[g,y]=h.useState(()=>od("useai-active-tab",["sessions","insights"],"sessions")),[v,x]=h.useState(null),[b,w]=h.useState(!1),[k,S]=h.useState(!1),j=void 0!==i,C=i??g,N=h.useCallback(e=>{l?l(e):(ld("useai-active-tab",e),y(e))},[l]),T=h.useCallback(e=>{ld("useai-time-scale",e),f(e)},[]),E=h.useCallback((e,t)=>{m(n=>({...n,[e]:t}))},[]);h.useEffect(()=>{if(null===c){const e=zc[d];e&&T(e)}},[c,d,T]);const M=null===c,P=c??Date.now(),{start:L,end:D}=Ic(d,P),A=h.useMemo(()=>function(e,t,n){return e.filter(e=>{const r=Cc(e.started_at),a=Cc(e.ended_at);return r<=n&&a>=t})}(e,L,D),[e,L,D]),_=h.useMemo(()=>function(e,t,n){return e.filter(e=>{const r=Cc(e.created_at);return r>=t&&r<=n})}(t,L,D),[t,L,D]),z=h.useMemo(()=>function(e,t=[]){let n=0,r=0;const a={},s={},i={},o={};for(const y of e){n+=y.duration_seconds,r+=y.files_touched,a[y.client]=(a[y.client]??0)+y.duration_seconds;for(const e of y.languages)s[e]=(s[e]??0)+y.duration_seconds;i[y.task_type]=(i[y.task_type]??0)+y.duration_seconds,y.project&&(o[y.project]=(o[y.project]??0)+y.duration_seconds)}let l=0,c=0,u=0,d=0;if(e.length>0){let t=1/0,r=-1/0;const a=[];for(const n of e){const e=Cc(n.started_at),s=Cc(n.ended_at);e<t&&(t=e),s>r&&(r=s),a.push({time:e,delta:1}),a.push({time:s,delta:-1})}l=(r-t)/36e5,a.sort((e,t)=>e.time-t.time||e.delta-t.delta);let s=0,i=0,o=0;for(const e of a){const t=s>0;s+=e.delta,s>d&&(d=s),!t&&s>0?o=e.time:t&&0===s&&(i+=e.time-o)}c=i/36e5,u=c>0?n/3600/c:0}const h=function(e){let t=0,n=0,r=0;for(const a of e)"feature"===a.category&&t++,"bugfix"===a.category&&n++,"complex"===a.complexity&&r++;return{featuresShipped:t,bugsFixed:n,complexSolved:r}}(t),f=e.filter(e=>e.evaluation&&"object"==typeof e.evaluation),p=f.filter(e=>"completed"===e.evaluation.task_outcome).length,m=f.length>0?Math.round(p/f.length*100):0,g=Object.keys(o).length;return{totalHours:n/3600,totalSessions:e.length,actualSpanHours:l,coveredHours:c,aiMultiplier:u,peakConcurrency:d,currentStreak:Nc(e),filesTouched:Math.round(r),...h,totalMilestones:t.length,completionRate:m,activeProjects:g,byClient:a,byLanguage:s,byTaskType:i,byProject:o}}(A,_),[A,_]),R=h.useMemo(()=>Nc(e),[e]),F=h.useMemo(()=>{const t=function(e,t,n){let r=0,a=0;for(const s of e){const e=Cc(s.ended_at),i=Cc(s.started_at);e<t?r++:i>n&&a++}return{before:r,after:a}}(e,L,D);if(M&&0===t.before)return;const n=Vc[d],r=e=>new Date(e).toLocaleTimeString([],{hour:"numeric",minute:"2-digit",hour12:!0}),a=Rc(d)||D-L>=864e5?e=>\`\${new Date(e).toLocaleDateString([],{month:"short",day:"numeric"})} \${r(e)}\`:r,s=Oc(d,P,-1),i=Ic(d,s),o=\`View prev \${n} \xB7 \${a(i.start)} \u2013 \${a(i.end)}\`;if(M)return{before:t.before,after:0,olderLabel:o};const l=Oc(d,P,1),c=Ic(d,l);return{...t,newerLabel:\`View next \${n} \xB7 \${a(c.start)} \u2013 \${a(c.end)}\`,olderLabel:o}},[e,L,D,P,M,d]),V=h.useCallback(()=>{const e=Oc(d,P,1);$c(d,e)?u(null):u(e)},[P,d]),I=h.useCallback(()=>{const e=Oc(d,P,-1);u(e)},[P,d]),O=h.useMemo(()=>{if(!M)return new Date(P).toISOString().slice(0,10)},[M,P]),$=h.useMemo(()=>{let e=0,t=0,n=0;for(const r of _)"simple"===r.complexity?e++:"medium"===r.complexity?t++:"complex"===r.complexity&&n++;return{simple:e,medium:t,complex:n}},[_]),B=h.useCallback(e=>{const t=new Date(\`\${e}T12:00:00\`).getTime();u(t),T("day")},[T]),H="all"!==p.client||"all"!==p.language||"all"!==p.project;return o.jsxs("div",{className:"space-y-3",children:[o.jsx(Ru,{value:c,onChange:u,scale:d,onScaleChange:T,sessions:e,milestones:t,showPublic:b}),o.jsx(Hc,{totalHours:z.totalHours,totalSessions:z.totalSessions,actualSpanHours:z.actualSpanHours,coveredHours:z.coveredHours,aiMultiplier:z.aiMultiplier,peakConcurrency:z.peakConcurrency,currentStreak:R,filesTouched:z.filesTouched,featuresShipped:z.featuresShipped,bugsFixed:z.bugsFixed,complexSolved:z.complexSolved,totalMilestones:z.totalMilestones,completionRate:z.completionRate,activeProjects:z.activeProjects,selectedCard:v,onCardClick:x}),o.jsx(Yc,{type:v,milestones:_,showPublic:b,onClose:()=>x(null)}),o.jsx(tu,{type:v,sessions:A,allSessions:e,currentStreak:R,stats:{totalHours:z.totalHours,coveredHours:z.coveredHours,aiMultiplier:z.aiMultiplier,peakConcurrency:z.peakConcurrency},showPublic:b,onClose:()=>x(null)}),!j&&o.jsx(cu,{activeTab:C,onTabChange:N}),"sessions"===C&&o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{className:"flex items-center justify-between px-1 pt-0.5",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("h2",{className:"text-sm font-bold text-text-muted uppercase tracking-widest",children:"Activity Feed"}),o.jsxs("span",{className:"text-[10px] text-text-muted font-mono bg-bg-surface-2 px-2 py-0.5 rounded",children:[A.length," Sessions"]})]}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsxs("button",{onClick:()=>w(e=>!e),className:"inline-flex items-center gap-1.5 px-2.5 py-1.5 rounded-md border transition-all duration-200 "+(b?"bg-success/10 border-success/30 text-success":"bg-bg-surface-1 border-border/50 text-text-muted hover:text-text-primary hover:border-text-muted/50"),title:b?"Showing public titles":"Showing private titles","aria-label":b?"Switch to private titles":"Switch to public titles",children:[b?o.jsx(Vl,{className:"w-3.5 h-3.5"}):o.jsx(Fl,{className:"w-3.5 h-3.5"}),o.jsx("span",{className:"hidden sm:inline text-xs font-medium",children:b?"Public":"Private"})]}),o.jsxs("button",{onClick:()=>S(e=>!e),className:"inline-flex items-center gap-1.5 px-2.5 py-1.5 rounded-md border transition-all duration-200 "+(k||H?"bg-accent/10 border-accent/30 text-accent":"bg-bg-surface-1 border-border/50 text-text-muted hover:text-text-primary hover:border-text-muted/50"),title:k?"Hide filters":"Show filters","aria-label":k?"Hide filters":"Show filters",children:[o.jsx(Ol,{className:"w-3.5 h-3.5"}),o.jsx("span",{className:"hidden sm:inline text-xs font-medium",children:"Filters"})]})]})]}),k&&o.jsx(du,{sessions:A,filters:p,onFilterChange:E}),o.jsx(Tu,{sessions:A,milestones:_,filters:p,globalShowPublic:b,showFullDate:"week"===d||"7d"===d||"month"===d||"30d"===d,outsideWindowCounts:F,onNavigateNewer:V,onNavigateOlder:I,onDeleteSession:n,onDeleteConversation:r,onDeleteMilestone:a})]}),"insights"===C&&o.jsxs("div",{className:"space-y-4 pt-2",children:[o.jsx($u,{sessions:A,milestones:_,isLive:M,windowStart:L,windowEnd:D,allSessions:e,allMilestones:t}),o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[o.jsx(Hu,{sessions:A}),o.jsx(Yu,{sessions:A,milestones:_,streak:R})]}),o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[o.jsx(Pc,{data:$}),o.jsx(Ju,{sessions:A,byProject:z.byProject})]}),o.jsx(Xu,{byTaskType:z.byTaskType}),o.jsx(Ec,{sessions:e,timeScale:d,effectiveTime:P,isLive:M,onDayClick:B,highlightDate:O}),o.jsx(nd,{milestones:_,showPublic:b}),o.jsx(id,{stats:z})]})]})}function ud({className:e}){return o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 611.54 143.47",className:e,children:[o.jsxs("g",{fill:"var(--text-primary)",children:[o.jsx("path",{d:"M21.4,121.85c-4.57-4.57-6.85-10.02-6.85-16.37V17.23c0-3.1,1.55-4.65,4.64-4.65h25.55c3.1,0,4.65,1.55,4.65,4.65v76.64c0,3.25,1.12,6,3.37,8.25,2.24,2.25,4.99,3.37,8.25,3.37h27.87c3.25,0,6-1.12,8.25-3.37,2.24-2.24,3.37-4.99,3.37-8.25V17.23c0-3.1,1.55-4.65,4.64-4.65h25.55c3.1,0,4.65,1.55,4.65,4.65v88.25c0,6.35-2.29,11.81-6.85,16.37-4.57,4.57-10.03,6.85-16.37,6.85H37.78c-6.35,0-11.81-2.28-16.37-6.85Z"}),o.jsx("path",{d:"M146.93,124.06v-13.93c0-3.1,1.55-4.65,4.64-4.65h69.67c3.25,0,6-1.12,8.25-3.37,2.24-2.24,3.37-4.99,3.37-8.25s-1.12-6-3.37-8.25c-2.25-2.24-4.99-3.37-8.25-3.37h-51.09c-6.35,0-11.81-2.28-16.37-6.85-4.57-4.57-6.85-10.02-6.85-16.37v-23.22c0-6.35,2.28-11.81,6.85-16.37,4.56-4.57,10.02-6.85,16.37-6.85h92.9c3.1,0,4.65,1.55,4.65,4.65v13.94c0,3.1-1.55,4.65-4.65,4.65h-69.67c-3.25,0-6,1.12-8.25,3.37-2.25,2.25-3.37,4.99-3.37,8.25s1.12,6,3.37,8.25c2.24,2.25,4.99,3.37,8.25,3.37h51.09c6.35,0,11.8,2.29,16.37,6.85,4.57,4.57,6.85,10.03,6.85,16.37v23.22c0,6.35-2.29,11.81-6.85,16.37-4.57,4.57-10.03,6.85-16.37,6.85h-92.9c-3.1,0-4.64-1.55-4.64-4.65Z"}),o.jsx("path",{d:"M286.16,121.85c-4.57-4.57-6.85-10.02-6.85-16.37V35.81c0-6.35,2.28-11.81,6.85-16.37,4.56-4.57,10.02-6.85,16.37-6.85h74.32c6.35,0,11.8,2.29,16.37,6.85,4.57,4.57,6.85,10.03,6.85,16.37v23.22c0,6.35-2.29,11.81-6.85,16.37-4.57,4.57-10.03,6.85-16.37,6.85h-62.71v11.61c0,3.25,1.12,6,3.37,8.25,2.24,2.25,4.99,3.37,8.25,3.37h69.67c3.1,0,4.65,1.55,4.65,4.65v13.93c0,3.1-1.55,4.65-4.65,4.65h-92.9c-6.35,0-11.81-2.28-16.37-6.85ZM361.87,55.66c2.24-2.24,3.37-4.99,3.37-8.25s-1.12-6-3.37-8.25c-2.25-2.24-4.99-3.37-8.25-3.37h-27.87c-3.25,0-6,1.12-8.25,3.37-2.25,2.25-3.37,4.99-3.37,8.25v11.61h39.48c3.25,0,6-1.12,8.25-3.37Z"})]}),o.jsxs("g",{fill:"var(--accent)",children:[o.jsx("path",{d:"M432.08,126.44c-4.76-4.76-7.14-10.44-7.14-17.06v-24.2c0-6.61,2.38-12.3,7.14-17.06,4.76-4.76,10.44-7.14,17.06-7.14h65.34v-12.1c0-3.39-1.17-6.25-3.51-8.59-2.34-2.34-5.2-3.51-8.59-3.51h-72.6c-3.23,0-4.84-1.61-4.84-4.84v-14.52c0-3.23,1.61-4.84,4.84-4.84h96.8c6.61,0,12.3,2.38,17.06,7.14,4.76,4.76,7.14,10.45,7.14,17.06v72.6c0,6.62-2.38,12.3-7.14,17.06-4.76,4.76-10.45,7.14-17.06,7.14h-77.44c-6.62,0-12.3-2.38-17.06-7.14ZM510.97,105.87c2.34-2.34,3.51-5.2,3.51-8.59v-12.1h-41.14c-3.39,0-6.25,1.17-8.59,3.51-2.34,2.34-3.51,5.2-3.51,8.59s1.17,6.25,3.51,8.59c2.34,2.34,5.2,3.51,8.59,3.51h29.04c3.39,0,6.25-1.17,8.59-3.51Z"}),o.jsx("path",{d:"M562.87,128.74V17.42c0-3.23,1.61-4.84,4.84-4.84h26.62c3.23,0,4.84,1.61,4.84,4.84v111.32c0,3.23-1.61,4.84-4.84,4.84h-26.62c-3.23,0-4.84-1.61-4.84-4.84Z"})]})]})}var dd={category:"all",client:"all",project:"all",language:"all"};function hd({open:e,onClose:t,sessions:n,milestones:r,onDeleteSession:a,onDeleteConversation:s,onDeleteMilestone:i}){const[l,c]=h.useState(""),[u,d]=h.useState(""),[f,p]=h.useState(!1),m=h.useRef(null);h.useEffect(()=>{e&&(c(""),d(""),requestAnimationFrame(()=>m.current?.focus()))},[e]),h.useEffect(()=>{if(!e)return;const t=document.documentElement;return t.style.overflow="hidden",document.body.style.overflow="hidden",()=>{t.style.overflow="",document.body.style.overflow=""}},[e]),h.useEffect(()=>{if(!e)return;const n=e=>{"Escape"===e.key&&t()};return window.addEventListener("keydown",n),()=>window.removeEventListener("keydown",n)},[e,t]),h.useEffect(()=>{const e=setTimeout(()=>d(l),250);return()=>clearTimeout(e)},[l]);const g=h.useMemo(()=>{const e=new Map;for(const t of r){const n=e.get(t.session_id);n?n.push(t):e.set(t.session_id,[t])}return e},[r]),{filteredSessions:y,filteredMilestones:v,highlightWords:x}=h.useMemo(()=>{const e=u.trim().toLowerCase();if(!e)return{filteredSessions:[],filteredMilestones:[],highlightWords:[]};const t=e.split(/\\s+/),a=n.filter(e=>function(e,t,n,r){const a=(r?[e.title,e.client,e.task_type,...e.languages,...t.map(e=>e.title)]:[e.private_title,e.title,e.client,e.task_type,...e.languages,...t.map(e=>e.private_title),...t.map(e=>e.title)]).filter(Boolean).join(" ").toLowerCase();return n.every(e=>a.includes(e))}(e,g.get(e.session_id)??[],t,f)),s=new Set(a.map(e=>e.session_id));return{filteredSessions:a,filteredMilestones:r.filter(e=>s.has(e.session_id)),highlightWords:t}},[n,r,g,u,f]),b=u.trim().length>0;return o.jsx(Xi,{children:e&&o.jsxs(o.Fragment,{children:[o.jsx(pl.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.15},className:"fixed inset-0 bg-black/40 backdrop-blur-sm z-[60]",onClick:t}),o.jsx(pl.div,{initial:{opacity:0,scale:.96},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.96},transition:{duration:.15},className:"fixed inset-0 z-[61] flex items-start justify-center pt-[10vh] px-4 pointer-events-none",children:o.jsxs("div",{className:"w-full max-w-2xl bg-bg-base border border-border/50 rounded-xl shadow-2xl flex flex-col max-h-[75vh] pointer-events-auto",onClick:e=>e.stopPropagation(),children:[o.jsxs("div",{className:"flex items-center gap-3 px-4 py-3 border-b border-border/50",children:[o.jsx(nc,{className:"w-4 h-4 text-text-muted flex-shrink-0"}),o.jsx("input",{ref:m,type:"text",value:l,onChange:e=>c(e.target.value),placeholder:f?"Search public titles...":"Search all sessions and milestones...",className:"flex-1 bg-transparent text-sm text-text-primary placeholder:text-text-muted/50 outline-none"}),l&&o.jsx("button",{onClick:()=>{c(""),m.current?.focus()},className:"p-1 rounded-md hover:bg-bg-surface-2 text-text-muted hover:text-text-primary transition-colors",children:o.jsx(fc,{className:"w-3.5 h-3.5"})}),o.jsx("button",{onClick:()=>p(e=>!e),className:"p-1.5 rounded-md border transition-all duration-200 flex-shrink-0 "+(f?"bg-success/10 border-success/30 text-success":"bg-bg-surface-1 border-border/50 text-text-muted hover:text-text-primary hover:border-text-muted/50"),title:f?"Searching public titles":"Searching private titles",children:f?o.jsx(Vl,{className:"w-3.5 h-3.5"}):o.jsx(Fl,{className:"w-3.5 h-3.5"})}),o.jsx("kbd",{className:"hidden sm:inline-flex items-center gap-0.5 px-1.5 py-0.5 rounded border border-border bg-bg-surface-1 text-[10px] font-mono text-text-muted",children:"esc"})]}),o.jsx("div",{className:"flex-1 overflow-y-auto overscroll-none px-4 py-3",children:b?0===y.length?o.jsxs("div",{className:"text-center py-12 text-sm text-text-muted/60",children:["No results for \u201C",u.trim(),"\u201D"]}):o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"text-[10px] font-mono text-text-muted uppercase tracking-wider mb-3 px-1",children:[y.length," result",1!==y.length?"s":""]}),o.jsx(Tu,{sessions:y,milestones:v,filters:dd,globalShowPublic:f||void 0,showFullDate:!0,highlightWords:x,onDeleteSession:a,onDeleteConversation:s,onDeleteMilestone:i})]}):o.jsx("div",{className:"text-center py-12 text-sm text-text-muted/60",children:"Type to search across all sessions"})})]})})]})})}const fd=(pd=(e,t)=>({sessions:[],milestones:[],config:null,health:null,updateInfo:null,loading:!0,timeTravelTime:null,timeScale:(()=>{try{const e=localStorage.getItem("useai-time-scale"),t=[...Ac];if(e&&t.includes(e))return e}catch{}return"day"})(),filters:{category:"all",client:"all",project:"all",language:"all"},activeTab:(()=>{try{const e=localStorage.getItem("useai-active-tab");if("sessions"===e||"insights"===e||"settings"===e)return e}catch{}return"sessions"})(),loadAll:async()=>{try{const[t,n,r]=await Promise.all([_("/api/local/sessions"),_("/api/local/milestones"),V()]);e({sessions:t,milestones:n,config:r,loading:!1})}catch{e({loading:!1})}},loadHealth:async()=>{try{const t=await _("/health");e({health:t})}catch{}},loadUpdateCheck:async()=>{try{const t=await _("/api/local/update-check");e({updateInfo:t})}catch{}},setTimeTravelTime:t=>e({timeTravelTime:t}),setTimeScale:t=>{try{localStorage.setItem("useai-time-scale",t)}catch{}e({timeScale:t})},setFilter:(t,n)=>e(e=>({filters:{...e.filters,[t]:n}})),setActiveTab:t=>{try{localStorage.setItem("useai-active-tab",t)}catch{}e({activeTab:t})},deleteSession:async n=>{const r={sessions:t().sessions,milestones:t().milestones};e({sessions:r.sessions.filter(e=>e.session_id!==n),milestones:r.milestones.filter(e=>e.session_id!==n)});try{await function(e){return F(\`/api/local/sessions/\${encodeURIComponent(e)}\`)}(n)}catch{e(r)}},deleteConversation:async n=>{const r={sessions:t().sessions,milestones:t().milestones},a=new Set(r.sessions.filter(e=>e.conversation_id===n).map(e=>e.session_id));e({sessions:r.sessions.filter(e=>e.conversation_id!==n),milestones:r.milestones.filter(e=>!a.has(e.session_id))});try{await function(e){return F(\`/api/local/conversations/\${encodeURIComponent(e)}\`)}(n)}catch{e(r)}},deleteMilestone:async n=>{const r={milestones:t().milestones};e({milestones:r.milestones.filter(e=>e.id!==n)});try{await function(e){return F(\`/api/local/milestones/\${encodeURIComponent(e)}\`)}(n)}catch{e(r)}}}))?A(pd):A;var pd;const md=/^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/;function gd(e){if(!e)return"Never synced";const t=Date.now()-new Date(e).getTime(),n=Math.floor(t/6e4);if(n<1)return"Just now";if(n<60)return\`\${n}m ago\`;const r=Math.floor(n/60);if(r<24)return\`\${r}h ago\`;return\`\${Math.floor(r/24)}d ago\`}function yd({config:e,onRefresh:t}){const n=!!e.username,[r,a]=h.useState(!n),[s,i]=h.useState(e.username??""),[l,c]=h.useState("idle"),[u,d]=h.useState(),[f,p]=h.useState(!1),m=h.useRef(void 0),g=h.useRef(void 0);h.useEffect(()=>{e.username&&(a(!1),i(e.username))},[e.username]);const y=h.useCallback(t=>{const n=function(e){return e.toLowerCase().replace(/[^a-z0-9-]/g,"")}(t);if(i(n),d(void 0),m.current&&clearTimeout(m.current),g.current&&g.current.abort(),!n)return void c("idle");const r=function(e){return 0===e.length?{valid:!1}:e.length<3?{valid:!1,reason:"At least 3 characters"}:e.length>32?{valid:!1,reason:"At most 32 characters"}:md.test(e)?{valid:!0}:{valid:!1,reason:"No leading/trailing hyphens"}}(n);if(!r.valid)return c("invalid"),void d(r.reason);n!==e.username?(c("checking"),m.current=setTimeout(async()=>{g.current=new AbortController;try{const e=await async function(e){return _(\`/api/local/users/check-username/\${encodeURIComponent(e)}\`)}(n);e.available?(c("available"),d(void 0)):(c("taken"),d(e.reason))}catch{c("invalid"),d("Check failed")}},400)):c("idle")},[e.username]),v=h.useCallback(async()=>{if("available"===l){p(!0);try{await async function(e){return R("/api/local/users/me",{username:e})}(s),t()}catch(e){c("invalid"),d(e.message)}finally{p(!1)}}},[s,l,t]),x=h.useCallback(()=>{a(!1),i(e.username??""),c("idle"),d(void 0)},[e.username]),b=h.useCallback(()=>{a(!0),i(e.username??""),c("idle"),d(void 0)},[e.username]);return!r&&n?o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(Wl,{className:"w-3.5 h-3.5 text-text-muted"}),o.jsxs("a",{href:\`https://useai.dev/\${e.username}\`,target:"_blank",rel:"noopener noreferrer",className:"text-xs font-bold text-accent hover:text-accent-bright transition-colors",children:["useai.dev/",e.username]}),o.jsx("button",{onClick:b,className:"p-1 rounded hover:bg-bg-surface-2 text-text-muted hover:text-text-primary transition-colors cursor-pointer",title:"Edit username",children:o.jsx(Gl,{className:"w-3 h-3"})})]}):o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("span",{className:"text-xs text-text-muted whitespace-nowrap",children:"useai.dev/"}),o.jsx("div",{className:"flex items-center bg-bg-base border border-border rounded-lg overflow-hidden focus-within:border-accent/50 transition-all",children:o.jsx("input",{type:"text",placeholder:"username",value:s,onChange:e=>y(e.target.value),onKeyDown:e=>"Enter"===e.key&&v(),autoFocus:r,maxLength:32,className:"px-2 py-1.5 text-xs bg-transparent text-text-primary outline-none w-28 placeholder:text-text-muted/50"})}),o.jsxs("div",{className:"w-4 h-4 flex items-center justify-center",children:["checking"===l&&o.jsx(ql,{className:"w-3.5 h-3.5 text-text-muted animate-spin"}),"available"===l&&o.jsx(Cl,{className:"w-3.5 h-3.5 text-success"}),("taken"===l||"invalid"===l)&&s.length>0&&o.jsx(fc,{className:"w-3.5 h-3.5 text-error"})]}),o.jsx("button",{onClick:v,disabled:"available"!==l||f,className:"px-3 py-1.5 bg-accent hover:bg-accent-bright text-bg-base text-[10px] font-bold uppercase tracking-wider rounded-lg transition-colors disabled:opacity-30 cursor-pointer",children:f?"...":n?"Save":"Claim"}),n&&o.jsx("button",{onClick:x,className:"px-2 py-1.5 text-[10px] font-bold uppercase tracking-wider text-text-muted hover:text-text-primary transition-colors cursor-pointer",children:"Cancel"}),u&&o.jsx("span",{className:"text-[10px] text-error/80 truncate max-w-[140px]",title:u,children:u})]})}function vd({config:e,onRefresh:t}){const[n,r]=h.useState(!1),[a,s]=h.useState(""),[i,l]=h.useState(""),[c,u]=h.useState("email"),[d,f]=h.useState(!1),[p,m]=h.useState(null),g=h.useRef(null);h.useEffect(()=>{if(!n)return;const e=e=>{g.current&&!g.current.contains(e.target)&&r(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[n]),h.useEffect(()=>{if(!n)return;const e=e=>{"Escape"===e.key&&r(!1)};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[n]);const y=h.useCallback(async()=>{if(a.includes("@")){f(!0),m(null);try{await function(e){return z("/api/local/auth/send-otp",{email:e})}(a),u("otp")}catch(e){m(e.message)}finally{f(!1)}}},[a]),v=h.useCallback(async()=>{if(/^\\d{6}$/.test(i)){f(!0),m(null);try{await async function(e,t){return z("/api/local/auth/verify-otp",{email:e,code:t})}(a,i),t(),r(!1)}catch(e){m(e.message)}finally{f(!1)}}},[a,i,t]),x=h.useCallback(async()=>{f(!0),m(null);try{const e=await async function(){return z("/api/local/sync")}();e.success?(m("Synced!"),t(),setTimeout(()=>m(null),3e3)):m(e.error??"Sync failed")}catch(e){m(e.message)}finally{f(!1)}},[t]),b=h.useCallback(async()=>{await async function(){return z("/api/local/auth/logout")}(),t(),r(!1)},[t]);if(!e)return null;const w=e.authenticated;return o.jsxs("div",{className:"relative",ref:g,children:[w?o.jsxs("button",{onClick:()=>r(e=>!e),className:"flex items-center gap-1.5 rounded-full transition-colors cursor-pointer hover:opacity-80",children:[o.jsxs("div",{className:"relative w-7 h-7 rounded-full bg-accent/15 border border-accent/30 flex items-center justify-center",children:[o.jsx("span",{className:"text-xs font-bold text-accent leading-none",children:(e.email?.[0]??"?").toUpperCase()}),o.jsx("div",{className:"absolute -bottom-0.5 -right-0.5 w-2.5 h-2.5 rounded-full border-2 border-bg-base "+(e.last_sync_at?"bg-success":"bg-warning")})]}),o.jsx(Nl,{className:"w-3 h-3 text-text-muted transition-transform "+(n?"rotate-180":"")})]}):o.jsxs("button",{onClick:()=>r(e=>!e),className:"flex items-center gap-1.5 px-2.5 py-1.5 rounded-md border border-border/50 bg-bg-surface-1 text-text-muted hover:text-text-primary hover:border-text-muted/50 transition-colors text-xs cursor-pointer",children:[o.jsx(dc,{className:"w-3 h-3"}),"Sign in"]}),n&&o.jsx("div",{className:"absolute right-0 top-full mt-2 z-50 w-80 rounded-lg bg-bg-surface-1 border border-border shadow-lg",children:w?o.jsxs("div",{children:[o.jsx("div",{className:"px-4 pt-3 pb-2",children:o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("div",{className:"w-8 h-8 rounded-full bg-accent/10 flex items-center justify-center border border-accent/20 shrink-0",children:o.jsx("span",{className:"text-sm font-bold text-accent",children:(e.email?.[0]??"?").toUpperCase()})}),o.jsx("div",{className:"flex flex-col min-w-0",children:o.jsx("span",{className:"text-xs font-bold text-text-primary truncate",children:e.email})})]})}),o.jsx("div",{className:"px-4 py-2 border-t border-border/50",children:o.jsx(yd,{config:e,onRefresh:t})}),o.jsx("div",{className:"px-4 py-2 border-t border-border/50",children:o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("span",{className:"text-[10px] text-text-muted font-mono uppercase tracking-tighter",children:["Last sync: ",gd(e.last_sync_at)]}),o.jsxs("div",{className:"flex items-center gap-2",children:[p&&o.jsx("span",{className:"text-[10px] font-bold uppercase tracking-widest "+("Synced!"===p?"text-success":"text-error"),children:p}),o.jsxs("button",{onClick:x,disabled:d,className:"flex items-center gap-1.5 px-2.5 py-1 bg-accent hover:bg-accent-bright text-bg-base text-[10px] font-bold uppercase tracking-wider rounded-md transition-colors disabled:opacity-50 cursor-pointer",children:[o.jsx(Jl,{className:"w-3 h-3 "+(d?"animate-spin":"")}),d?"...":"Sync"]})]})]})}),o.jsx("div",{className:"px-4 py-2 border-t border-border/50",children:o.jsxs("button",{onClick:b,className:"flex items-center gap-2 w-full px-2 py-1.5 rounded-md text-xs text-text-muted hover:text-error hover:bg-error/10 transition-colors cursor-pointer",children:[o.jsx(Kl,{className:"w-3.5 h-3.5"}),"Sign out"]})})]}):o.jsxs("div",{className:"p-4",children:[o.jsx("p",{className:"text-xs font-bold text-text-secondary uppercase tracking-widest mb-3",children:"Sign in to sync"}),p&&o.jsx("p",{className:"text-[10px] font-bold text-error uppercase tracking-widest mb-2",children:p}),"email"===c?o.jsxs("div",{className:"flex items-center bg-bg-base border border-border rounded-lg overflow-hidden focus-within:border-accent/50 focus-within:ring-1 focus-within:ring-accent/50 transition-all",children:[o.jsx("div",{className:"pl-3 py-2",children:o.jsx(Ql,{className:"w-3.5 h-3.5 text-text-muted"})}),o.jsx("input",{type:"email",placeholder:"you@email.com",value:a,onChange:e=>s(e.target.value),onKeyDown:e=>"Enter"===e.key&&y(),autoFocus:!0,className:"px-3 py-2 text-xs bg-transparent text-text-primary outline-none flex-1 placeholder:text-text-muted/50"}),o.jsx("button",{onClick:y,disabled:d||!a.includes("@"),className:"px-4 py-2 bg-bg-surface-2 hover:bg-bg-surface-3 text-text-primary text-[10px] font-bold uppercase tracking-wider transition-colors disabled:opacity-50 cursor-pointer border-l border-border",children:d?"...":"Send"})]}):o.jsxs("div",{className:"flex items-center bg-bg-base border border-border rounded-lg overflow-hidden focus-within:border-accent/50 focus-within:ring-1 focus-within:ring-accent/50 transition-all",children:[o.jsx("input",{type:"text",maxLength:6,placeholder:"000000",inputMode:"numeric",autoComplete:"one-time-code",value:i,onChange:e=>l(e.target.value),onKeyDown:e=>"Enter"===e.key&&v(),autoFocus:!0,className:"px-4 py-2 text-xs bg-transparent text-text-primary text-center font-mono tracking-widest outline-none flex-1 placeholder:text-text-muted/50"}),o.jsx("button",{onClick:v,disabled:d||6!==i.length,className:"px-4 py-2 bg-accent hover:bg-accent-bright text-bg-base text-[10px] font-bold uppercase tracking-wider transition-colors disabled:opacity-50 cursor-pointer",children:d?"...":"Verify"})]})]})})]})}const xd="npx -y @devness/useai update",bd=[{label:"Leaderboard",href:"https://useai.dev/leaderboard"}];function wd({updateInfo:e}){const[t,n]=h.useState(!1),[r,a]=h.useState(!1);return o.jsxs("div",{className:"relative",children:[o.jsxs("button",{onClick:()=>n(e=>!e),className:"flex items-center gap-1.5 px-2.5 py-1 rounded-full bg-accent/10 border border-accent/20 text-xs font-medium text-accent hover:bg-accent/15 transition-colors",children:[o.jsx(Pl,{className:"w-3 h-3"}),"v",e.latest," available"]}),t&&o.jsxs("div",{className:"absolute right-0 top-full mt-2 z-50 w-72 rounded-lg bg-bg-surface-1 border border-border shadow-lg p-3 space-y-2",children:[o.jsxs("p",{className:"text-xs text-text-muted",children:["Update from ",o.jsxs("span",{className:"font-mono text-text-secondary",children:["v",e.current]})," to ",o.jsxs("span",{className:"font-mono text-accent",children:["v",e.latest]})]}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("code",{className:"flex-1 text-[11px] font-mono bg-bg-base px-2 py-1.5 rounded border border-border text-text-secondary truncate",children:xd}),o.jsx("button",{onClick:async()=>{try{await navigator.clipboard.writeText(xd),a(!0),setTimeout(()=>a(!1),2e3)}catch{}},className:"p-1.5 rounded-md border border-border bg-bg-base text-text-muted hover:text-text-primary hover:border-text-muted/50 transition-colors shrink-0",title:"Copy command",children:r?o.jsx(Cl,{className:"w-3.5 h-3.5 text-success"}):o.jsx(_l,{className:"w-3.5 h-3.5"})})]})]})]})}function kd({health:e,updateInfo:t,onSearchOpen:n,activeTab:r,onTabChange:a,config:s,onRefresh:i}){const l=h.useMemo(()=>{const e=[...bd];return s?.username&&e.push({label:"Profile",href:\`https://useai.dev/\${s.username}\`}),e},[s?.username]);return o.jsx("header",{className:"sticky top-0 z-50 bg-bg-base/80 backdrop-blur-md border-b border-border mb-6",children:o.jsxs("div",{className:"max-w-[1240px] mx-auto px-4 sm:px-6 py-3 flex items-center justify-between relative",children:[o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx(ud,{className:"h-6"}),e&&e.active_sessions>0&&o.jsx(Mu,{label:\`\${e.active_sessions} active session\${1!==e.active_sessions?"s":""}\`,color:"success",dot:!0})]}),o.jsx("div",{className:"absolute left-1/2 -translate-x-1/2",children:o.jsx(cu,{activeTab:r,onTabChange:a,externalLinks:l})}),o.jsxs("div",{className:"flex items-center gap-4",children:[n&&o.jsxs("button",{onClick:n,className:"flex items-center gap-2 px-2.5 py-1.5 rounded-md border border-border/50 bg-bg-surface-1 text-text-muted hover:text-text-primary hover:border-text-muted/50 transition-colors text-xs",children:[o.jsx(nc,{className:"w-3 h-3"}),o.jsx("span",{className:"hidden sm:inline",children:"Search"}),o.jsx("kbd",{className:"hidden sm:inline-flex items-center px-1 py-0.5 rounded border border-border bg-bg-base text-[9px] font-mono leading-none",children:"\u2318K"})]}),t?.update_available&&o.jsx(wd,{updateInfo:t}),o.jsx(vd,{config:s,onRefresh:i})]})]})})}function Sd({label:e,description:t,checked:n,onChange:r,warning:a}){return o.jsxs("label",{className:"flex items-start justify-between gap-3 py-2 cursor-pointer group",children:[o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsx("div",{className:"text-xs font-medium text-text-primary",children:e}),o.jsx("div",{className:"text-[11px] text-text-muted leading-relaxed mt-0.5",children:t}),a&&n&&o.jsxs("div",{className:"flex items-center gap-1 mt-1 text-[11px] text-warning",children:[o.jsx(cc,{className:"w-3 h-3 shrink-0"}),a]})]}),o.jsx("button",{role:"switch","aria-checked":n,onClick:()=>r(!n),className:\`\\n relative inline-flex h-5 w-9 shrink-0 rounded-full border-2 border-transparent transition-colors duration-200\\n \${n?"bg-accent":"bg-bg-surface-2"}\\n \`,children:o.jsx("span",{className:\`\\n pointer-events-none inline-block h-4 w-4 rounded-full bg-white shadow-sm transition-transform duration-200\\n \${n?"translate-x-4":"translate-x-0"}\\n \`})})]})}function jd({label:e,description:t,value:n,options:r,onChange:a}){return o.jsxs("div",{className:"flex items-start justify-between gap-3 py-2",children:[o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsx("div",{className:"text-xs font-medium text-text-primary",children:e}),o.jsx("div",{className:"text-[11px] text-text-muted leading-relaxed mt-0.5",children:t})]}),o.jsxs("div",{className:"relative",children:[o.jsx("select",{value:n,onChange:e=>a(e.target.value),className:"appearance-none bg-bg-surface-2 border border-border/50 rounded-md px-2.5 py-1 pr-7 text-xs text-text-primary cursor-pointer hover:border-border transition-colors",children:r.map(e=>o.jsx("option",{value:e.value,children:e.label},e.value))}),o.jsx(Nl,{className:"absolute right-1.5 top-1/2 -translate-y-1/2 w-3 h-3 text-text-muted pointer-events-none"})]})]})}function Cd(){const[e,t]=h.useState(null),[n,r]=h.useState(null);h.useEffect(()=>{_("/api/local/config/full").then(t).catch(e=>r(e.message))},[]);const a=h.useCallback(async n=>{if(!e)return;const r=structuredClone(e);if(n.capture&&"object"==typeof n.capture&&(r.capture={...r.capture,...n.capture}),void 0!==n.evaluation_framework&&(r.evaluation_framework=n.evaluation_framework),n.sync&&"object"==typeof n.sync){const e=n.sync;void 0!==e.enabled&&(r.sync.enabled=e.enabled),void 0!==e.interval_hours&&(r.sync.interval_hours=e.interval_hours),e.include&&"object"==typeof e.include&&(r.sync.include={...r.sync.include,...e.include})}t(r);try{const e=await function(e){return R("/api/local/config",e)}(n);t(e)}catch{t(e)}},[e]);return n?o.jsx("div",{className:"max-w-xl mx-auto mt-12 text-center",children:o.jsxs("div",{className:"text-sm text-danger",children:["Failed to load config: ",n]})}):e?o.jsxs("div",{className:"max-w-xl mx-auto pt-2 pb-12 space-y-5",children:[o.jsxs("section",{className:"bg-bg-surface-1 border border-border/50 rounded-xl p-4",children:[o.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[o.jsx(Sl,{className:"w-4 h-4 text-text-muted"}),o.jsx("h2",{className:"text-xs font-bold text-text-muted uppercase tracking-widest",children:"Capture"})]}),o.jsx("p",{className:"text-[11px] text-text-muted mb-3",children:"What data to record locally for each session."}),o.jsxs("div",{className:"divide-y divide-border/30",children:[o.jsx(Sd,{label:"Prompts",description:"Record prompt word count and content metadata",checked:e.capture.prompt,onChange:e=>a({capture:{prompt:e}})}),o.jsx(Sd,{label:"Prompt images",description:"Record image descriptions from prompts",checked:e.capture.prompt_images,onChange:e=>a({capture:{prompt_images:e}})}),o.jsx(Sd,{label:"Evaluation scores",description:"Record session quality scores (SPACE framework)",checked:e.capture.evaluation,onChange:e=>a({capture:{evaluation:e}})}),o.jsx(jd,{label:"Evaluation reasons",description:"When to include reason text for each score",value:e.capture.evaluation_reasons,options:[{value:"all",label:"All scores"},{value:"below_perfect",label:"Below perfect only"},{value:"none",label:"None"}],onChange:e=>a({capture:{evaluation_reasons:e}})}),o.jsx(Sd,{label:"Milestones",description:"Record milestones (accomplishments) from each session",checked:e.capture.milestones,onChange:e=>a({capture:{milestones:e}})})]})]}),o.jsxs("section",{className:"bg-bg-surface-1 border border-border/50 rounded-xl p-4",children:[o.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[o.jsx(jl,{className:"w-4 h-4 text-text-muted"}),o.jsx("h2",{className:"text-xs font-bold text-text-muted uppercase tracking-widest",children:"Evaluation"})]}),o.jsx("p",{className:"text-[11px] text-text-muted mb-3",children:"How sessions are scored."}),o.jsx(jd,{label:"Framework",description:"Scoring method used for session evaluations",value:e.evaluation_framework,options:[{value:"space",label:"SPACE (weighted)"},{value:"raw",label:"Raw (equal weight)"}],onChange:e=>a({evaluation_framework:e})})]}),o.jsxs("section",{className:"bg-bg-surface-1 border border-border/50 rounded-xl p-4",children:[o.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[o.jsx(Dl,{className:"w-4 h-4 text-text-muted"}),o.jsx("h2",{className:"text-xs font-bold text-text-muted uppercase tracking-widest",children:"Cloud Sync"})]}),o.jsxs("p",{className:"text-[11px] text-text-muted mb-3",children:["Sync session data to useai.dev for leaderboards and public profiles.",!e.authenticated&&" Login first to enable sync."]}),o.jsxs("div",{className:"divide-y divide-border/30",children:[o.jsx(Sd,{label:"Auto-sync",description:"Automatically sync data on a schedule",checked:e.sync.enabled,onChange:e=>a({sync:{enabled:e}})}),e.sync.enabled&&o.jsxs(o.Fragment,{children:[o.jsx(jd,{label:"Sync interval",description:"How often to sync data",value:String(e.sync.interval_hours),options:[{value:"6",label:"Every 6 hours"},{value:"12",label:"Every 12 hours"},{value:"24",label:"Every 24 hours"},{value:"48",label:"Every 48 hours"}],onChange:e=>a({sync:{interval_hours:Number(e)}})}),o.jsx("div",{className:"pt-3 pb-1",children:o.jsx("div",{className:"text-[11px] font-medium text-text-muted uppercase tracking-wider mb-2",children:"Include in sync"})}),o.jsx(Sd,{label:"Sessions",description:"Session metadata (duration, task type, client)",checked:e.sync.include.sessions,onChange:e=>a({sync:{include:{sessions:e}}})}),o.jsx(Sd,{label:"Evaluations",description:"Session quality scores",checked:e.sync.include.evaluations,onChange:e=>a({sync:{include:{evaluations:e}}})}),o.jsx(Sd,{label:"Milestones",description:"Accomplishments and categories",checked:e.sync.include.milestones,onChange:e=>a({sync:{include:{milestones:e}}})}),o.jsx(Sd,{label:"Model",description:"AI model used for each session",checked:e.sync.include.model,onChange:e=>a({sync:{include:{model:e}}})}),o.jsx(Sd,{label:"Languages",description:"Programming languages used",checked:e.sync.include.languages,onChange:e=>a({sync:{include:{languages:e}}})}),o.jsx(jd,{label:"Eval reasons level",description:"How much evaluation reason text to sync",value:e.sync.include.evaluation_reasons,options:[{value:"all",label:"All scores"},{value:"below_perfect",label:"Below perfect only"},{value:"none",label:"None"}],onChange:e=>a({sync:{include:{evaluation_reasons:e}}})}),o.jsx("div",{className:"pt-3 pb-1",children:o.jsxs("div",{className:"flex items-center gap-1.5",children:[o.jsx(ac,{className:"w-3 h-3 text-warning"}),o.jsx("div",{className:"text-[11px] font-medium text-warning uppercase tracking-wider",children:"Privacy-sensitive"})]})}),o.jsx(Sd,{label:"Prompts",description:"Prompt content sent to AI tools",checked:e.sync.include.prompts,onChange:e=>a({sync:{include:{prompts:e}}}),warning:"Prompts may contain sensitive code or context"}),o.jsx(Sd,{label:"Private titles",description:"Detailed session/milestone titles with project names",checked:e.sync.include.private_titles,onChange:e=>a({sync:{include:{private_titles:e}}}),warning:"May reveal project names and specifics"}),o.jsx(Sd,{label:"Projects",description:"Project names associated with sessions",checked:e.sync.include.projects,onChange:e=>a({sync:{include:{projects:e}}}),warning:"Project names will be visible on your profile"})]})]})]})]}):o.jsx("div",{className:"max-w-xl mx-auto mt-12 text-center",children:o.jsx("div",{className:"text-sm text-text-muted",children:"Loading settings..."})})}function Nd(){const{sessions:e,milestones:t,config:n,health:r,updateInfo:a,loading:s,loadAll:i,loadHealth:l,loadUpdateCheck:c,deleteSession:u,deleteConversation:d,deleteMilestone:f,activeTab:p,setActiveTab:m}=fd();h.useEffect(()=>{i(),l(),c()},[i,l,c]),h.useEffect(()=>{const e=setInterval(l,3e4),t=setInterval(i,3e4);return()=>{clearInterval(e),clearInterval(t)}},[i,l]);const[g,y]=h.useState(!1);return h.useEffect(()=>{const e=e=>{(e.metaKey||e.ctrlKey)&&"k"===e.key&&(e.preventDefault(),y(e=>!e))};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[]),s?o.jsx("div",{className:"min-h-screen flex items-center justify-center",children:o.jsx("div",{className:"text-text-muted text-sm",children:"Loading..."})}):o.jsxs("div",{className:"min-h-screen bg-bg-base selection:bg-accent/30 selection:text-text-primary",children:[o.jsx(kd,{health:r,updateInfo:a,onSearchOpen:()=>y(!0),activeTab:p,onTabChange:m,config:n,onRefresh:i}),o.jsx("div",{className:"max-w-[1240px] mx-auto px-4 sm:px-6 pb-6",children:"settings"===p?o.jsx(Cd,{}):o.jsxs(o.Fragment,{children:[o.jsx(hd,{open:g,onClose:()=>y(!1),sessions:e,milestones:t,onDeleteSession:u,onDeleteConversation:d,onDeleteMilestone:f}),o.jsx(cd,{sessions:e,milestones:t,onDeleteSession:u,onDeleteConversation:d,onDeleteMilestone:f,activeTab:p,onActiveTabChange:m})]})})]})}P.createRoot(document.getElementById("root")).render(o.jsx(h.StrictMode,{children:o.jsx(Nd,{})}));</script>
34813
+ <style rel="stylesheet" crossorigin>/*! tailwindcss v4.1.18 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial}}}@layer theme{:root,:host{--font-sans:"Inter",system-ui,-apple-system,sans-serif;--font-mono:"Geist Mono","JetBrains Mono","SF Mono","Fira Code",ui-monospace,monospace;--color-orange-500:oklch(70.5% .213 47.604);--color-amber-500:oklch(76.9% .188 70.08);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-md:28rem;--container-xl:36rem;--container-2xl:42rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--font-weight-black:900;--tracking-tighter:-.05em;--tracking-tight:-.025em;--tracking-wide:.025em;--tracking-wider:.05em;--tracking-widest:.1em;--leading-tight:1.25;--leading-snug:1.375;--leading-relaxed:1.625;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--radius-2xl:1rem;--animate-spin:spin 1s linear infinite;--animate-pulse:pulse 2s cubic-bezier(.4,0,.6,1)infinite;--blur-sm:8px;--blur-md:12px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--color-bg-base:var(--bg-base);--color-bg-surface-1:var(--bg-surface-1);--color-bg-surface-2:var(--bg-surface-2);--color-bg-surface-3:var(--bg-surface-3);--color-text-primary:var(--text-primary);--color-text-secondary:var(--text-secondary);--color-text-muted:var(--text-muted);--color-accent:var(--accent);--color-accent-bright:var(--accent-bright);--color-success:var(--success);--color-error:var(--error);--color-history:var(--history);--color-border:var(--border);--color-purple:#8b5cf6;--color-blue:#3b82f6;--color-emerald:#34d399}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}*{border-color:var(--color-border)}}@layer components;@layer utilities{.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.sticky{position:sticky}.inset-0{inset:calc(var(--spacing)*0)}.-top-10{top:calc(var(--spacing)*-10)}.top-0{top:calc(var(--spacing)*0)}.top-1\\/2{top:50%}.top-2{top:calc(var(--spacing)*2)}.top-5{top:calc(var(--spacing)*5)}.top-full{top:100%}.-right-0\\.5{right:calc(var(--spacing)*-.5)}.right-0{right:calc(var(--spacing)*0)}.right-1\\.5{right:calc(var(--spacing)*1.5)}.-bottom-0\\.5{bottom:calc(var(--spacing)*-.5)}.-bottom-1{bottom:calc(var(--spacing)*-1)}.-bottom-1\\.5{bottom:calc(var(--spacing)*-1.5)}.bottom-0{bottom:calc(var(--spacing)*0)}.bottom-2{bottom:calc(var(--spacing)*2)}.-left-7{left:calc(var(--spacing)*-7)}.left-1\\/2{left:50%}.left-2{left:calc(var(--spacing)*2)}.left-\\[1\\.75rem\\]{left:1.75rem}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.z-\\[60\\]{z-index:60}.z-\\[61\\]{z-index:61}.z-\\[9999\\]{z-index:9999}.col-span-2{grid-column:span 2/span 2}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.mx-1{margin-inline:calc(var(--spacing)*1)}.mx-auto{margin-inline:auto}.my-0\\.5{margin-block:calc(var(--spacing)*.5)}.my-1{margin-block:calc(var(--spacing)*1)}.ms-1{margin-inline-start:calc(var(--spacing)*1)}.ms-2{margin-inline-start:calc(var(--spacing)*2)}.ms-3{margin-inline-start:calc(var(--spacing)*3)}.mt-0\\.5{margin-top:calc(var(--spacing)*.5)}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-1\\.5{margin-top:calc(var(--spacing)*1.5)}.mt-2{margin-top:calc(var(--spacing)*2)}.mt-4{margin-top:calc(var(--spacing)*4)}.mt-12{margin-top:calc(var(--spacing)*12)}.mb-0\\.5{margin-bottom:calc(var(--spacing)*.5)}.mb-1\\.5{margin-bottom:calc(var(--spacing)*1.5)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.mb-3{margin-bottom:calc(var(--spacing)*3)}.mb-4{margin-bottom:calc(var(--spacing)*4)}.mb-6{margin-bottom:calc(var(--spacing)*6)}.mb-8{margin-bottom:calc(var(--spacing)*8)}.-ml-2{margin-left:calc(var(--spacing)*-2)}.ml-0\\.5{margin-left:calc(var(--spacing)*.5)}.ml-1\\.5{margin-left:calc(var(--spacing)*1.5)}.ml-auto{margin-left:auto}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.h-1\\.5{height:calc(var(--spacing)*1.5)}.h-2{height:calc(var(--spacing)*2)}.h-2\\.5{height:calc(var(--spacing)*2.5)}.h-3{height:calc(var(--spacing)*3)}.h-3\\.5{height:calc(var(--spacing)*3.5)}.h-4{height:calc(var(--spacing)*4)}.h-5{height:calc(var(--spacing)*5)}.h-6{height:calc(var(--spacing)*6)}.h-7{height:calc(var(--spacing)*7)}.h-8{height:calc(var(--spacing)*8)}.h-9{height:calc(var(--spacing)*9)}.h-16{height:calc(var(--spacing)*16)}.h-full{height:100%}.h-px{height:1px}.max-h-\\[75vh\\]{max-height:75vh}.min-h-screen{min-height:100vh}.w-0{width:calc(var(--spacing)*0)}.w-1\\.5{width:calc(var(--spacing)*1.5)}.w-2{width:calc(var(--spacing)*2)}.w-2\\.5{width:calc(var(--spacing)*2.5)}.w-3{width:calc(var(--spacing)*3)}.w-3\\.5{width:calc(var(--spacing)*3.5)}.w-4{width:calc(var(--spacing)*4)}.w-5{width:calc(var(--spacing)*5)}.w-6{width:calc(var(--spacing)*6)}.w-7{width:calc(var(--spacing)*7)}.w-8{width:calc(var(--spacing)*8)}.w-9{width:calc(var(--spacing)*9)}.w-10{width:calc(var(--spacing)*10)}.w-12{width:calc(var(--spacing)*12)}.w-16{width:calc(var(--spacing)*16)}.w-24{width:calc(var(--spacing)*24)}.w-28{width:calc(var(--spacing)*28)}.w-72{width:calc(var(--spacing)*72)}.w-80{width:calc(var(--spacing)*80)}.w-\\[2px\\]{width:2px}.w-\\[155px\\]{width:155px}.w-full{width:100%}.w-px{width:1px}.max-w-2xl{max-width:var(--container-2xl)}.max-w-\\[130px\\]{max-width:130px}.max-w-\\[140px\\]{max-width:140px}.max-w-\\[280px\\]{max-width:280px}.max-w-\\[1240px\\]{max-width:1240px}.max-w-md{max-width:var(--container-md)}.max-w-xl{max-width:var(--container-xl)}.min-w-0{min-width:calc(var(--spacing)*0)}.min-w-\\[100px\\]{min-width:100px}.min-w-\\[120px\\]{min-width:120px}.min-w-\\[180px\\]{min-width:180px}.flex-1{flex:1}.flex-shrink-0,.shrink-0{flex-shrink:0}.grow{flex-grow:1}.origin-bottom{transform-origin:bottom}.-translate-x-1\\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-x-0{--tw-translate-x:calc(var(--spacing)*0);translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-x-4{--tw-translate-x:calc(var(--spacing)*4);translate:var(--tw-translate-x)var(--tw-translate-y)}.-translate-y-1\\/2{--tw-translate-y: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.scale-105{--tw-scale-x:105%;--tw-scale-y:105%;--tw-scale-z:105%;scale:var(--tw-scale-x)var(--tw-scale-y)}.rotate-45{rotate:45deg}.rotate-180{rotate:180deg}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-default{cursor:default}.cursor-grab{cursor:grab}.cursor-pointer{cursor:pointer}.cursor-text{cursor:text}.touch-none{touch-action:none}.appearance-none{appearance:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-\\[86px_minmax\\(0\\,1fr\\)\\]{grid-template-columns:86px minmax(0,1fr)}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-baseline{align-items:baseline}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-0\\.5{gap:calc(var(--spacing)*.5)}.gap-1{gap:calc(var(--spacing)*1)}.gap-1\\.5{gap:calc(var(--spacing)*1.5)}.gap-2{gap:calc(var(--spacing)*2)}.gap-2\\.5{gap:calc(var(--spacing)*2.5)}.gap-3{gap:calc(var(--spacing)*3)}.gap-3\\.5{gap:calc(var(--spacing)*3.5)}.gap-4{gap:calc(var(--spacing)*4)}.gap-6{gap:calc(var(--spacing)*6)}.gap-\\[3px\\]{gap:3px}:where(.space-y-0\\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*.5)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*.5)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1\\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1.5)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1.5)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*2)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2\\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*2.5)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*2.5)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*3)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*3)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*4)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*5)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*5)*calc(1 - var(--tw-space-y-reverse)))}.gap-x-2{column-gap:calc(var(--spacing)*2)}.gap-x-5{column-gap:calc(var(--spacing)*5)}.gap-y-1{row-gap:calc(var(--spacing)*1)}.gap-y-2{row-gap:calc(var(--spacing)*2)}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px*var(--tw-divide-y-reverse));border-bottom-width:calc(1px*calc(1 - var(--tw-divide-y-reverse)))}:where(.divide-border\\/30>:not(:last-child)){border-color:var(--color-border)}@supports (color:color-mix(in lab,red,red)){:where(.divide-border\\/30>:not(:last-child)){border-color:color-mix(in oklab,var(--color-border)30%,transparent)}}.self-center{align-self:center}.self-stretch{align-self:stretch}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overscroll-contain{overscroll-behavior:contain}.overscroll-none{overscroll-behavior:none}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-sm{border-radius:var(--radius-sm)}.rounded-xl{border-radius:var(--radius-xl)}.rounded-t-md{border-top-left-radius:var(--radius-md);border-top-right-radius:var(--radius-md)}.rounded-t-sm{border-top-left-radius:var(--radius-sm);border-top-right-radius:var(--radius-sm)}.border{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-accent,.border-accent\\/20{border-color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.border-accent\\/20{border-color:color-mix(in oklab,var(--color-accent)20%,transparent)}}.border-accent\\/30{border-color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.border-accent\\/30{border-color:color-mix(in oklab,var(--color-accent)30%,transparent)}}.border-accent\\/35{border-color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.border-accent\\/35{border-color:color-mix(in oklab,var(--color-accent)35%,transparent)}}.border-accent\\/50{border-color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.border-accent\\/50{border-color:color-mix(in oklab,var(--color-accent)50%,transparent)}}.border-bg-base{border-color:var(--color-bg-base)}.border-bg-surface-1{border-color:var(--color-bg-surface-1)}.border-blue\\/20{border-color:#3b82f633}@supports (color:color-mix(in lab,red,red)){.border-blue\\/20{border-color:color-mix(in oklab,var(--color-blue)20%,transparent)}}.border-blue\\/30{border-color:#3b82f64d}@supports (color:color-mix(in lab,red,red)){.border-blue\\/30{border-color:color-mix(in oklab,var(--color-blue)30%,transparent)}}.border-border,.border-border\\/10{border-color:var(--color-border)}@supports (color:color-mix(in lab,red,red)){.border-border\\/10{border-color:color-mix(in oklab,var(--color-border)10%,transparent)}}.border-border\\/15{border-color:var(--color-border)}@supports (color:color-mix(in lab,red,red)){.border-border\\/15{border-color:color-mix(in oklab,var(--color-border)15%,transparent)}}.border-border\\/20{border-color:var(--color-border)}@supports (color:color-mix(in lab,red,red)){.border-border\\/20{border-color:color-mix(in oklab,var(--color-border)20%,transparent)}}.border-border\\/30{border-color:var(--color-border)}@supports (color:color-mix(in lab,red,red)){.border-border\\/30{border-color:color-mix(in oklab,var(--color-border)30%,transparent)}}.border-border\\/40{border-color:var(--color-border)}@supports (color:color-mix(in lab,red,red)){.border-border\\/40{border-color:color-mix(in oklab,var(--color-border)40%,transparent)}}.border-border\\/50{border-color:var(--color-border)}@supports (color:color-mix(in lab,red,red)){.border-border\\/50{border-color:color-mix(in oklab,var(--color-border)50%,transparent)}}.border-border\\/60{border-color:var(--color-border)}@supports (color:color-mix(in lab,red,red)){.border-border\\/60{border-color:color-mix(in oklab,var(--color-border)60%,transparent)}}.border-emerald\\/20{border-color:#34d39933}@supports (color:color-mix(in lab,red,red)){.border-emerald\\/20{border-color:color-mix(in oklab,var(--color-emerald)20%,transparent)}}.border-emerald\\/30{border-color:#34d3994d}@supports (color:color-mix(in lab,red,red)){.border-emerald\\/30{border-color:color-mix(in oklab,var(--color-emerald)30%,transparent)}}.border-error\\/20{border-color:var(--color-error)}@supports (color:color-mix(in lab,red,red)){.border-error\\/20{border-color:color-mix(in oklab,var(--color-error)20%,transparent)}}.border-error\\/30{border-color:var(--color-error)}@supports (color:color-mix(in lab,red,red)){.border-error\\/30{border-color:color-mix(in oklab,var(--color-error)30%,transparent)}}.border-history,.border-history\\/20{border-color:var(--color-history)}@supports (color:color-mix(in lab,red,red)){.border-history\\/20{border-color:color-mix(in oklab,var(--color-history)20%,transparent)}}.border-purple\\/20{border-color:#8b5cf633}@supports (color:color-mix(in lab,red,red)){.border-purple\\/20{border-color:color-mix(in oklab,var(--color-purple)20%,transparent)}}.border-purple\\/30{border-color:#8b5cf64d}@supports (color:color-mix(in lab,red,red)){.border-purple\\/30{border-color:color-mix(in oklab,var(--color-purple)30%,transparent)}}.border-success\\/20{border-color:var(--color-success)}@supports (color:color-mix(in lab,red,red)){.border-success\\/20{border-color:color-mix(in oklab,var(--color-success)20%,transparent)}}.border-success\\/30{border-color:var(--color-success)}@supports (color:color-mix(in lab,red,red)){.border-success\\/30{border-color:color-mix(in oklab,var(--color-success)30%,transparent)}}.border-text-muted\\/20{border-color:var(--color-text-muted)}@supports (color:color-mix(in lab,red,red)){.border-text-muted\\/20{border-color:color-mix(in oklab,var(--color-text-muted)20%,transparent)}}.border-transparent{border-color:#0000}.bg-\\[var\\(--accent-alpha\\)\\]{background-color:var(--accent-alpha)}.bg-accent,.bg-accent\\/5{background-color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.bg-accent\\/5{background-color:color-mix(in oklab,var(--color-accent)5%,transparent)}}.bg-accent\\/8{background-color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.bg-accent\\/8{background-color:color-mix(in oklab,var(--color-accent)8%,transparent)}}.bg-accent\\/10{background-color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.bg-accent\\/10{background-color:color-mix(in oklab,var(--color-accent)10%,transparent)}}.bg-accent\\/15{background-color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.bg-accent\\/15{background-color:color-mix(in oklab,var(--color-accent)15%,transparent)}}.bg-accent\\/30{background-color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.bg-accent\\/30{background-color:color-mix(in oklab,var(--color-accent)30%,transparent)}}.bg-accent\\/50{background-color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.bg-accent\\/50{background-color:color-mix(in oklab,var(--color-accent)50%,transparent)}}.bg-accent\\/60{background-color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.bg-accent\\/60{background-color:color-mix(in oklab,var(--color-accent)60%,transparent)}}.bg-bg-base,.bg-bg-base\\/30{background-color:var(--color-bg-base)}@supports (color:color-mix(in lab,red,red)){.bg-bg-base\\/30{background-color:color-mix(in oklab,var(--color-bg-base)30%,transparent)}}.bg-bg-base\\/80{background-color:var(--color-bg-base)}@supports (color:color-mix(in lab,red,red)){.bg-bg-base\\/80{background-color:color-mix(in oklab,var(--color-bg-base)80%,transparent)}}.bg-bg-surface-1,.bg-bg-surface-1\\/30{background-color:var(--color-bg-surface-1)}@supports (color:color-mix(in lab,red,red)){.bg-bg-surface-1\\/30{background-color:color-mix(in oklab,var(--color-bg-surface-1)30%,transparent)}}.bg-bg-surface-1\\/35{background-color:var(--color-bg-surface-1)}@supports (color:color-mix(in lab,red,red)){.bg-bg-surface-1\\/35{background-color:color-mix(in oklab,var(--color-bg-surface-1)35%,transparent)}}.bg-bg-surface-1\\/50{background-color:var(--color-bg-surface-1)}@supports (color:color-mix(in lab,red,red)){.bg-bg-surface-1\\/50{background-color:color-mix(in oklab,var(--color-bg-surface-1)50%,transparent)}}.bg-bg-surface-1\\/80{background-color:var(--color-bg-surface-1)}@supports (color:color-mix(in lab,red,red)){.bg-bg-surface-1\\/80{background-color:color-mix(in oklab,var(--color-bg-surface-1)80%,transparent)}}.bg-bg-surface-2,.bg-bg-surface-2\\/20{background-color:var(--color-bg-surface-2)}@supports (color:color-mix(in lab,red,red)){.bg-bg-surface-2\\/20{background-color:color-mix(in oklab,var(--color-bg-surface-2)20%,transparent)}}.bg-bg-surface-2\\/30{background-color:var(--color-bg-surface-2)}@supports (color:color-mix(in lab,red,red)){.bg-bg-surface-2\\/30{background-color:color-mix(in oklab,var(--color-bg-surface-2)30%,transparent)}}.bg-bg-surface-2\\/50{background-color:var(--color-bg-surface-2)}@supports (color:color-mix(in lab,red,red)){.bg-bg-surface-2\\/50{background-color:color-mix(in oklab,var(--color-bg-surface-2)50%,transparent)}}.bg-bg-surface-3,.bg-bg-surface-3\\/95{background-color:var(--color-bg-surface-3)}@supports (color:color-mix(in lab,red,red)){.bg-bg-surface-3\\/95{background-color:color-mix(in oklab,var(--color-bg-surface-3)95%,transparent)}}.bg-black{background-color:var(--color-black)}.bg-black\\/40{background-color:#0006}@supports (color:color-mix(in lab,red,red)){.bg-black\\/40{background-color:color-mix(in oklab,var(--color-black)40%,transparent)}}.bg-blue\\/10{background-color:#3b82f61a}@supports (color:color-mix(in lab,red,red)){.bg-blue\\/10{background-color:color-mix(in oklab,var(--color-blue)10%,transparent)}}.bg-blue\\/15{background-color:#3b82f626}@supports (color:color-mix(in lab,red,red)){.bg-blue\\/15{background-color:color-mix(in oklab,var(--color-blue)15%,transparent)}}.bg-border\\/20{background-color:var(--color-border)}@supports (color:color-mix(in lab,red,red)){.bg-border\\/20{background-color:color-mix(in oklab,var(--color-border)20%,transparent)}}.bg-border\\/30{background-color:var(--color-border)}@supports (color:color-mix(in lab,red,red)){.bg-border\\/30{background-color:color-mix(in oklab,var(--color-border)30%,transparent)}}.bg-border\\/50{background-color:var(--color-border)}@supports (color:color-mix(in lab,red,red)){.bg-border\\/50{background-color:color-mix(in oklab,var(--color-border)50%,transparent)}}.bg-border\\/60{background-color:var(--color-border)}@supports (color:color-mix(in lab,red,red)){.bg-border\\/60{background-color:color-mix(in oklab,var(--color-border)60%,transparent)}}.bg-emerald\\/10{background-color:#34d3991a}@supports (color:color-mix(in lab,red,red)){.bg-emerald\\/10{background-color:color-mix(in oklab,var(--color-emerald)10%,transparent)}}.bg-emerald\\/15{background-color:#34d39926}@supports (color:color-mix(in lab,red,red)){.bg-emerald\\/15{background-color:color-mix(in oklab,var(--color-emerald)15%,transparent)}}.bg-error\\/10{background-color:var(--color-error)}@supports (color:color-mix(in lab,red,red)){.bg-error\\/10{background-color:color-mix(in oklab,var(--color-error)10%,transparent)}}.bg-error\\/15{background-color:var(--color-error)}@supports (color:color-mix(in lab,red,red)){.bg-error\\/15{background-color:color-mix(in oklab,var(--color-error)15%,transparent)}}.bg-history,.bg-history\\/10{background-color:var(--color-history)}@supports (color:color-mix(in lab,red,red)){.bg-history\\/10{background-color:color-mix(in oklab,var(--color-history)10%,transparent)}}.bg-purple\\/10{background-color:#8b5cf61a}@supports (color:color-mix(in lab,red,red)){.bg-purple\\/10{background-color:color-mix(in oklab,var(--color-purple)10%,transparent)}}.bg-purple\\/15{background-color:#8b5cf626}@supports (color:color-mix(in lab,red,red)){.bg-purple\\/15{background-color:color-mix(in oklab,var(--color-purple)15%,transparent)}}.bg-success,.bg-success\\/10{background-color:var(--color-success)}@supports (color:color-mix(in lab,red,red)){.bg-success\\/10{background-color:color-mix(in oklab,var(--color-success)10%,transparent)}}.bg-success\\/15{background-color:var(--color-success)}@supports (color:color-mix(in lab,red,red)){.bg-success\\/15{background-color:color-mix(in oklab,var(--color-success)15%,transparent)}}.bg-text-muted,.bg-text-muted\\/10{background-color:var(--color-text-muted)}@supports (color:color-mix(in lab,red,red)){.bg-text-muted\\/10{background-color:color-mix(in oklab,var(--color-text-muted)10%,transparent)}}.bg-text-muted\\/15{background-color:var(--color-text-muted)}@supports (color:color-mix(in lab,red,red)){.bg-text-muted\\/15{background-color:color-mix(in oklab,var(--color-text-muted)15%,transparent)}}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.bg-gradient-to-t{--tw-gradient-position:to top in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.from-transparent{--tw-gradient-from:transparent;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-white\\/10{--tw-gradient-to:#ffffff1a}@supports (color:color-mix(in lab,red,red)){.to-white\\/10{--tw-gradient-to:color-mix(in oklab,var(--color-white)10%,transparent)}}.to-white\\/10{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.p-0\\.5{padding:calc(var(--spacing)*.5)}.p-1{padding:calc(var(--spacing)*1)}.p-1\\.5{padding:calc(var(--spacing)*1.5)}.p-2{padding:calc(var(--spacing)*2)}.p-3{padding:calc(var(--spacing)*3)}.p-4{padding:calc(var(--spacing)*4)}.p-5{padding:calc(var(--spacing)*5)}.px-0\\.5{padding-inline:calc(var(--spacing)*.5)}.px-1{padding-inline:calc(var(--spacing)*1)}.px-1\\.5{padding-inline:calc(var(--spacing)*1.5)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-2\\.5{padding-inline:calc(var(--spacing)*2.5)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-3\\.5{padding-inline:calc(var(--spacing)*3.5)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-5{padding-inline:calc(var(--spacing)*5)}.px-6{padding-inline:calc(var(--spacing)*6)}.px-px{padding-inline:1px}.py-0\\.5{padding-block:calc(var(--spacing)*.5)}.py-1{padding-block:calc(var(--spacing)*1)}.py-1\\.5{padding-block:calc(var(--spacing)*1.5)}.py-2{padding-block:calc(var(--spacing)*2)}.py-2\\.5{padding-block:calc(var(--spacing)*2.5)}.py-3{padding-block:calc(var(--spacing)*3)}.py-4{padding-block:calc(var(--spacing)*4)}.py-6{padding-block:calc(var(--spacing)*6)}.py-8{padding-block:calc(var(--spacing)*8)}.py-12{padding-block:calc(var(--spacing)*12)}.py-16{padding-block:calc(var(--spacing)*16)}.pt-0\\.5{padding-top:calc(var(--spacing)*.5)}.pt-1\\.5{padding-top:calc(var(--spacing)*1.5)}.pt-2{padding-top:calc(var(--spacing)*2)}.pt-3{padding-top:calc(var(--spacing)*3)}.pt-\\[10vh\\]{padding-top:10vh}.pr-7{padding-right:calc(var(--spacing)*7)}.pb-1{padding-bottom:calc(var(--spacing)*1)}.pb-2{padding-bottom:calc(var(--spacing)*2)}.pb-2\\.5{padding-bottom:calc(var(--spacing)*2.5)}.pb-3\\.5{padding-bottom:calc(var(--spacing)*3.5)}.pb-6{padding-bottom:calc(var(--spacing)*6)}.pb-12{padding-bottom:calc(var(--spacing)*12)}.pl-3{padding-left:calc(var(--spacing)*3)}.pl-10{padding-left:calc(var(--spacing)*10)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.font-mono{font-family:var(--font-mono)}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\\[7px\\]{font-size:7px}.text-\\[8px\\]{font-size:8px}.text-\\[9px\\]{font-size:9px}.text-\\[10px\\]{font-size:10px}.text-\\[11px\\]{font-size:11px}.text-\\[15px\\]{font-size:15px}.leading-none{--tw-leading:1;line-height:1}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-snug{--tw-leading:var(--leading-snug);line-height:var(--leading-snug)}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-black{--tw-font-weight:var(--font-weight-black);font-weight:var(--font-weight-black)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-tighter{--tw-tracking:var(--tracking-tighter);letter-spacing:var(--tracking-tighter)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.tracking-widest{--tw-tracking:var(--tracking-widest);letter-spacing:var(--tracking-widest)}.break-words{overflow-wrap:break-word}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.text-accent,.text-accent\\/70{color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.text-accent\\/70{color:color-mix(in oklab,var(--color-accent)70%,transparent)}}.text-accent\\/90{color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.text-accent\\/90{color:color-mix(in oklab,var(--color-accent)90%,transparent)}}.text-amber-500{color:var(--color-amber-500)}.text-bg-base{color:var(--color-bg-base)}.text-blue{color:var(--color-blue)}.text-emerald{color:var(--color-emerald)}.text-error,.text-error\\/80{color:var(--color-error)}@supports (color:color-mix(in lab,red,red)){.text-error\\/80{color:color-mix(in oklab,var(--color-error)80%,transparent)}}.text-history{color:var(--color-history)}.text-inherit{color:inherit}.text-orange-500{color:var(--color-orange-500)}.text-purple{color:var(--color-purple)}.text-success,.text-success\\/70{color:var(--color-success)}@supports (color:color-mix(in lab,red,red)){.text-success\\/70{color:color-mix(in oklab,var(--color-success)70%,transparent)}}.text-text-muted,.text-text-muted\\/30{color:var(--color-text-muted)}@supports (color:color-mix(in lab,red,red)){.text-text-muted\\/30{color:color-mix(in oklab,var(--color-text-muted)30%,transparent)}}.text-text-muted\\/50{color:var(--color-text-muted)}@supports (color:color-mix(in lab,red,red)){.text-text-muted\\/50{color:color-mix(in oklab,var(--color-text-muted)50%,transparent)}}.text-text-muted\\/60{color:var(--color-text-muted)}@supports (color:color-mix(in lab,red,red)){.text-text-muted\\/60{color:color-mix(in oklab,var(--color-text-muted)60%,transparent)}}.text-text-muted\\/70{color:var(--color-text-muted)}@supports (color:color-mix(in lab,red,red)){.text-text-muted\\/70{color:color-mix(in oklab,var(--color-text-muted)70%,transparent)}}.text-text-primary{color:var(--color-text-primary)}.text-text-secondary,.text-text-secondary\\/80{color:var(--color-text-secondary)}@supports (color:color-mix(in lab,red,red)){.text-text-secondary\\/80{color:color-mix(in oklab,var(--color-text-secondary)80%,transparent)}}.text-text-secondary\\/85{color:var(--color-text-secondary)}@supports (color:color-mix(in lab,red,red)){.text-text-secondary\\/85{color:color-mix(in oklab,var(--color-text-secondary)85%,transparent)}}.text-white{color:var(--color-white)}.capitalize{text-transform:capitalize}.lowercase{text-transform:lowercase}.uppercase{text-transform:uppercase}.italic{font-style:italic}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}.opacity-0{opacity:0}.opacity-50{opacity:.5}.opacity-70{opacity:.7}.opacity-75{opacity:.75}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-inner{--tw-shadow:inset 0 2px 4px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a),0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-2{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-accent{--tw-ring-color:var(--color-accent)}.ring-offset-2{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.ring-offset-bg-base{--tw-ring-offset-color:var(--color-bg-base)}.filter{filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.backdrop-blur-md{--tw-backdrop-blur:blur(var(--blur-md));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.duration-500{--tw-duration:.5s;transition-duration:.5s}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}.\\[daemon\\:err\\]{daemon:err}@media(hover:hover){.group-hover\\:scale-x-110:is(:where(.group):hover *){--tw-scale-x:110%;scale:var(--tw-scale-x)var(--tw-scale-y)}.group-hover\\:-rotate-90:is(:where(.group):hover *){rotate:-90deg}.group-hover\\:bg-accent:is(:where(.group):hover *),.group-hover\\:bg-accent\\/10:is(:where(.group):hover *){background-color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.group-hover\\:bg-accent\\/10:is(:where(.group):hover *){background-color:color-mix(in oklab,var(--color-accent)10%,transparent)}}.group-hover\\:text-accent:is(:where(.group):hover *){color:var(--color-accent)}.group-hover\\:text-text-primary:is(:where(.group):hover *){color:var(--color-text-primary)}.group-hover\\:opacity-100:is(:where(.group):hover *),.group-hover\\/card\\:opacity-100:is(:where(.group\\/card):hover *),.group-hover\\/conv\\:opacity-100:is(:where(.group\\/conv):hover *){opacity:1}}.selection\\:bg-accent\\/30 ::selection{background-color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.selection\\:bg-accent\\/30 ::selection{background-color:color-mix(in oklab,var(--color-accent)30%,transparent)}}.selection\\:bg-accent\\/30::selection{background-color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.selection\\:bg-accent\\/30::selection{background-color:color-mix(in oklab,var(--color-accent)30%,transparent)}}.selection\\:text-text-primary ::selection{color:var(--color-text-primary)}.selection\\:text-text-primary::selection{color:var(--color-text-primary)}.placeholder\\:text-text-muted\\/50::placeholder{color:var(--color-text-muted)}@supports (color:color-mix(in lab,red,red)){.placeholder\\:text-text-muted\\/50::placeholder{color:color-mix(in oklab,var(--color-text-muted)50%,transparent)}}.focus-within\\:border-accent\\/50:focus-within{border-color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.focus-within\\:border-accent\\/50:focus-within{border-color:color-mix(in oklab,var(--color-accent)50%,transparent)}}.focus-within\\:opacity-100:focus-within{opacity:1}.focus-within\\:ring-1:focus-within{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-within\\:ring-accent\\/50:focus-within{--tw-ring-color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.focus-within\\:ring-accent\\/50:focus-within{--tw-ring-color:color-mix(in oklab,var(--color-accent)50%,transparent)}}@media(hover:hover){.hover\\:scale-125:hover{--tw-scale-x:125%;--tw-scale-y:125%;--tw-scale-z:125%;scale:var(--tw-scale-x)var(--tw-scale-y)}.hover\\:border-accent\\/30:hover{border-color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.hover\\:border-accent\\/30:hover{border-color:color-mix(in oklab,var(--color-accent)30%,transparent)}}.hover\\:border-accent\\/40:hover{border-color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.hover\\:border-accent\\/40:hover{border-color:color-mix(in oklab,var(--color-accent)40%,transparent)}}.hover\\:border-border:hover{border-color:var(--color-border)}.hover\\:border-text-muted\\/50:hover{border-color:var(--color-text-muted)}@supports (color:color-mix(in lab,red,red)){.hover\\:border-text-muted\\/50:hover{border-color:color-mix(in oklab,var(--color-text-muted)50%,transparent)}}.hover\\:bg-accent-bright:hover{background-color:var(--color-accent-bright)}.hover\\:bg-accent\\/15:hover{background-color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-accent\\/15:hover{background-color:color-mix(in oklab,var(--color-accent)15%,transparent)}}.hover\\:bg-bg-surface-1:hover{background-color:var(--color-bg-surface-1)}.hover\\:bg-bg-surface-2:hover,.hover\\:bg-bg-surface-2\\/40:hover{background-color:var(--color-bg-surface-2)}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-bg-surface-2\\/40:hover{background-color:color-mix(in oklab,var(--color-bg-surface-2)40%,transparent)}}.hover\\:bg-bg-surface-2\\/50:hover{background-color:var(--color-bg-surface-2)}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-bg-surface-2\\/50:hover{background-color:color-mix(in oklab,var(--color-bg-surface-2)50%,transparent)}}.hover\\:bg-bg-surface-3:hover{background-color:var(--color-bg-surface-3)}.hover\\:bg-error\\/5:hover{background-color:var(--color-error)}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-error\\/5:hover{background-color:color-mix(in oklab,var(--color-error)5%,transparent)}}.hover\\:bg-error\\/10:hover{background-color:var(--color-error)}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-error\\/10:hover{background-color:color-mix(in oklab,var(--color-error)10%,transparent)}}.hover\\:bg-error\\/25:hover{background-color:var(--color-error)}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-error\\/25:hover{background-color:color-mix(in oklab,var(--color-error)25%,transparent)}}.hover\\:bg-history:hover{background-color:var(--color-history)}.hover\\:text-accent:hover{color:var(--color-accent)}.hover\\:text-accent-bright:hover{color:var(--color-accent-bright)}.hover\\:text-accent\\/80:hover{color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.hover\\:text-accent\\/80:hover{color:color-mix(in oklab,var(--color-accent)80%,transparent)}}.hover\\:text-error:hover,.hover\\:text-error\\/70:hover{color:var(--color-error)}@supports (color:color-mix(in lab,red,red)){.hover\\:text-error\\/70:hover{color:color-mix(in oklab,var(--color-error)70%,transparent)}}.hover\\:text-text-primary:hover{color:var(--color-text-primary)}.hover\\:text-white:hover{color:var(--color-white)}.hover\\:opacity-80:hover{opacity:.8}.hover\\:brightness-110:hover{--tw-brightness:brightness(110%);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}}.active\\:cursor-grabbing:active{cursor:grabbing}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:opacity-20:disabled{opacity:.2}.disabled\\:opacity-30:disabled{opacity:.3}.disabled\\:opacity-50:disabled{opacity:.5}@media(min-width:40rem){.sm\\:inline{display:inline}.sm\\:inline-flex{display:inline-flex}.sm\\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\\:flex-row{flex-direction:row}.sm\\:px-6{padding-inline:calc(var(--spacing)*6)}}@media(min-width:48rem){.md\\:block{display:block}.md\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\\:flex-row{flex-direction:row}.md\\:items-center{align-items:center}}@media(min-width:64rem){.lg\\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.lg\\:grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))}}}:root{--text-primary:#fafafa;--text-secondary:#a1a1aa;--text-muted:#71717a;--accent:#b4f82c;--accent-bright:#d4fc6e;--accent-dim:#4d7c0f;--accent-rgb:180,248,44;--success:#b4f82c;--error:#ef4444;--streak:#f59e0b;--streak-bg:#f59e0b0f;--streak-border:#f59e0b33;--streak-muted:#f59e0b80;--history:#60a5fa;--history-rgb:96,165,250;--glass-border:#ffffff0d;--grid-color:#ffffff14;--glow-opacity:.15;--glow-blue:#3b82f626;--shadow-glow:rgba(var(--accent-rgb),.1);--accent-alpha:rgba(var(--accent-rgb),.05)}@media(prefers-color-scheme:light){:root{--text-primary:#09090b;--text-secondary:#52525b;--text-muted:#5f6068;--accent:#65a30d;--accent-bright:#84cc16;--accent-dim:#f7fee7;--accent-rgb:101,163,13;--success:#65a30d;--error:#dc2626;--streak:#b45309;--streak-bg:#b453090f;--streak-border:#b4530933;--streak-muted:#b4530980;--history:#2563eb;--history-rgb:37,99,235;--glass-border:#0000000d;--grid-color:#0000000a;--glow-opacity:.25;--glow-blue:#3b82f640;--shadow-glow:#00000014;--accent-alpha:rgba(var(--accent-rgb),.15)}}::selection{background-color:rgba(var(--accent-rgb),.3);color:var(--accent-bright)}.glass-card{background:var(--glass-bg);-webkit-backdrop-filter:blur(12px);border:1px solid var(--glass-border);box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -1px #0000000f}.glass-panel{background:var(--glass-bg);-webkit-backdrop-filter:blur(20px);border:1px solid var(--glass-border);will-change:transform,backdrop-filter;transform:translateZ(0);box-shadow:0 8px 32px #0000004d,inset 0 0 0 1px #ffffff0d}.hud-border{background:var(--bg-surface-1);position:relative}.hud-border:before{content:"";border:1px solid rgba(var(--accent-rgb),.2);pointer-events:none;border-radius:inherit;position:absolute;inset:0;-webkit-mask-image:linear-gradient(#000,#0000);mask-image:linear-gradient(#000,#0000)}.hud-border:after{content:"";border-top:2px solid var(--accent);border-left:2px solid var(--accent);border-top-left-radius:inherit;width:10px;height:10px;position:absolute;top:-1px;left:-1px}.gradient-text{background:linear-gradient(135deg,var(--text-primary),var(--text-secondary));-webkit-text-fill-color:transparent;-webkit-background-clip:text;background-clip:text}.gradient-text-accent{background:linear-gradient(135deg,var(--accent),var(--accent-bright));-webkit-text-fill-color:transparent;text-shadow:0 0 20px rgba(var(--accent-rgb),.4);-webkit-background-clip:text;background-clip:text}.subtle-glow{position:relative}.subtle-glow:after{content:"";background:linear-gradient(45deg,transparent,rgba(var(--accent-rgb),.1),transparent);border-radius:inherit;z-index:-1;pointer-events:none;position:absolute;inset:-1px}:root{--bg-base:#040405;--bg-surface-1:#0e0e11;--bg-surface-2:#18181b;--bg-surface-3:#27272a;--border:#ffffff14;--border-accent:rgba(var(--accent-rgb),.3);--glass-bg:#0e0e1199}@media(prefers-color-scheme:light){:root{--bg-base:#fafafa;--bg-surface-1:#fff;--bg-surface-2:#f4f4f5;--bg-surface-3:#e4e4e7;--border:#e4e4e7;--border-accent:rgba(var(--accent-rgb),.4);--glass-bg:#ffffffb3}}::-webkit-scrollbar{width:5px;height:5px}::-webkit-scrollbar-track{background:0 0}::-webkit-scrollbar-thumb{background:var(--color-bg-surface-3);border-radius:10px}::-webkit-scrollbar-thumb:hover{background:var(--color-text-muted)}body{font-family:var(--font-sans);background:var(--color-bg-base);color:var(--color-text-primary);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;min-height:100vh;margin:0;line-height:1.6}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"<length-percentage>";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"<length-percentage>";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"<length-percentage>";inherits:false;initial-value:100%}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(360deg)}}@keyframes pulse{50%{opacity:.5}}</style>
34522
34814
  </head>
34523
34815
  <body>
34524
34816
  <div id="root"></div>
@@ -34635,17 +34927,60 @@ function handleLocalMilestones(_req, res) {
34635
34927
  }
34636
34928
  function handleLocalConfig(_req, res) {
34637
34929
  try {
34638
- const config2 = readJson(CONFIG_FILE, {
34639
- milestone_tracking: true,
34640
- auto_sync: false,
34641
- sync_interval_hours: 24
34642
- });
34930
+ const raw = readJson(CONFIG_FILE, {});
34931
+ const config2 = migrateConfig(raw);
34643
34932
  json(res, 200, {
34644
34933
  authenticated: !!config2.auth?.token,
34645
34934
  email: config2.auth?.user?.email ?? null,
34646
34935
  username: config2.auth?.user?.username ?? null,
34647
34936
  last_sync_at: config2.last_sync_at ?? null,
34648
- auto_sync: config2.auto_sync
34937
+ auto_sync: config2.sync.enabled
34938
+ });
34939
+ } catch (err) {
34940
+ json(res, 500, { error: err.message });
34941
+ }
34942
+ }
34943
+ function handleLocalConfigFull(_req, res) {
34944
+ try {
34945
+ const raw = readJson(CONFIG_FILE, {});
34946
+ const config2 = migrateConfig(raw);
34947
+ json(res, 200, {
34948
+ capture: config2.capture,
34949
+ sync: config2.sync,
34950
+ evaluation_framework: config2.evaluation_framework ?? "space",
34951
+ authenticated: !!config2.auth?.token,
34952
+ email: config2.auth?.user?.email ?? null
34953
+ });
34954
+ } catch (err) {
34955
+ json(res, 500, { error: err.message });
34956
+ }
34957
+ }
34958
+ async function handleLocalConfigUpdate(req, res) {
34959
+ try {
34960
+ const body = JSON.parse(await readBody(req));
34961
+ const raw = readJson(CONFIG_FILE, {});
34962
+ const config2 = migrateConfig(raw);
34963
+ if (body.evaluation_framework !== void 0) {
34964
+ config2.evaluation_framework = body.evaluation_framework;
34965
+ }
34966
+ if (body.capture && typeof body.capture === "object") {
34967
+ config2.capture = { ...config2.capture, ...body.capture };
34968
+ }
34969
+ if (body.sync && typeof body.sync === "object") {
34970
+ const syncUpdate = body.sync;
34971
+ if (syncUpdate.enabled !== void 0) config2.sync.enabled = syncUpdate.enabled;
34972
+ if (syncUpdate.interval_hours !== void 0) config2.sync.interval_hours = syncUpdate.interval_hours;
34973
+ if (syncUpdate.include && typeof syncUpdate.include === "object") {
34974
+ config2.sync.include = { ...config2.sync.include, ...syncUpdate.include };
34975
+ }
34976
+ }
34977
+ writeJson(CONFIG_FILE, config2);
34978
+ json(res, 200, {
34979
+ capture: config2.capture,
34980
+ sync: config2.sync,
34981
+ evaluation_framework: config2.evaluation_framework ?? "space",
34982
+ authenticated: !!config2.auth?.token,
34983
+ email: config2.auth?.user?.email ?? null
34649
34984
  });
34650
34985
  } catch (err) {
34651
34986
  json(res, 500, { error: err.message });
@@ -34654,11 +34989,9 @@ function handleLocalConfig(_req, res) {
34654
34989
  async function handleLocalSync(req, res) {
34655
34990
  try {
34656
34991
  await readBody(req);
34657
- const config2 = readJson(CONFIG_FILE, {
34658
- milestone_tracking: true,
34659
- auto_sync: false,
34660
- sync_interval_hours: 24
34661
- });
34992
+ const raw = readJson(CONFIG_FILE, {});
34993
+ const config2 = migrateConfig(raw);
34994
+ const syncInclude = config2.sync.include;
34662
34995
  if (!config2.auth?.token) {
34663
34996
  json(res, 401, { success: false, error: "Not authenticated. Login at useai.dev first." });
34664
34997
  return;
@@ -34695,7 +35028,7 @@ async function handleLocalSync(req, res) {
34695
35028
  clients,
34696
35029
  task_types: taskTypes,
34697
35030
  languages,
34698
- sessions: daySessions,
35031
+ sessions: daySessions.map((s) => sanitizeSealForSync(s, syncInclude)),
34699
35032
  sync_signature: ""
34700
35033
  };
34701
35034
  const sessionsRes = await fetch(`${USEAI_API}/api/sync`, {
@@ -34709,19 +35042,25 @@ async function handleLocalSync(req, res) {
34709
35042
  return;
34710
35043
  }
34711
35044
  }
34712
- const MILESTONE_CHUNK = 50;
34713
- const milestones = readJson(MILESTONES_FILE, []);
34714
- for (let i = 0; i < milestones.length; i += MILESTONE_CHUNK) {
34715
- const chunk = milestones.slice(i, i + MILESTONE_CHUNK);
34716
- const milestonesRes = await fetch(`${USEAI_API}/api/publish`, {
34717
- method: "POST",
34718
- headers,
34719
- body: JSON.stringify({ milestones: chunk })
35045
+ if (syncInclude.milestones) {
35046
+ const MILESTONE_CHUNK = 50;
35047
+ const milestones = readJson(MILESTONES_FILE, []);
35048
+ const sanitizedMilestones = syncInclude.private_titles ? milestones : milestones.map((m) => {
35049
+ const { private_title: _, ...rest } = m;
35050
+ return rest;
34720
35051
  });
34721
- if (!milestonesRes.ok) {
34722
- const errBody = await milestonesRes.text();
34723
- json(res, 502, { success: false, error: `Milestones publish failed (chunk ${Math.floor(i / MILESTONE_CHUNK) + 1}): ${milestonesRes.status} ${errBody}` });
34724
- return;
35052
+ for (let i = 0; i < sanitizedMilestones.length; i += MILESTONE_CHUNK) {
35053
+ const chunk = sanitizedMilestones.slice(i, i + MILESTONE_CHUNK);
35054
+ const milestonesRes = await fetch(`${USEAI_API}/api/publish`, {
35055
+ method: "POST",
35056
+ headers,
35057
+ body: JSON.stringify({ milestones: chunk })
35058
+ });
35059
+ if (!milestonesRes.ok) {
35060
+ const errBody = await milestonesRes.text();
35061
+ json(res, 502, { success: false, error: `Milestones publish failed (chunk ${Math.floor(i / MILESTONE_CHUNK) + 1}): ${milestonesRes.status} ${errBody}` });
35062
+ return;
35063
+ }
34725
35064
  }
34726
35065
  }
34727
35066
  const now = (/* @__PURE__ */ new Date()).toISOString();
@@ -34766,11 +35105,7 @@ async function handleLocalVerifyOtp(req, res) {
34766
35105
  return;
34767
35106
  }
34768
35107
  if (data.token && data.user) {
34769
- const config2 = readJson(CONFIG_FILE, {
34770
- milestone_tracking: true,
34771
- auto_sync: true,
34772
- sync_interval_hours: 24
34773
- });
35108
+ const config2 = migrateConfig(readJson(CONFIG_FILE, {}));
34774
35109
  config2.auth = {
34775
35110
  token: data.token,
34776
35111
  user: {
@@ -34794,11 +35129,7 @@ async function handleLocalSaveAuth(req, res) {
34794
35129
  json(res, 400, { error: "Missing token or user" });
34795
35130
  return;
34796
35131
  }
34797
- const config2 = readJson(CONFIG_FILE, {
34798
- milestone_tracking: true,
34799
- auto_sync: true,
34800
- sync_interval_hours: 24
34801
- });
35132
+ const config2 = migrateConfig(readJson(CONFIG_FILE, {}));
34802
35133
  config2.auth = {
34803
35134
  token: body.token,
34804
35135
  user: {
@@ -34835,11 +35166,7 @@ async function handleLocalSyncMark(req, res) {
34835
35166
  async function handleLocalLogout(req, res) {
34836
35167
  try {
34837
35168
  await readBody(req);
34838
- const config2 = readJson(CONFIG_FILE, {
34839
- milestone_tracking: true,
34840
- auto_sync: false,
34841
- sync_interval_hours: 24
34842
- });
35169
+ const config2 = migrateConfig(readJson(CONFIG_FILE, {}));
34843
35170
  delete config2.auth;
34844
35171
  writeJson(CONFIG_FILE, config2);
34845
35172
  json(res, 200, { success: true });
@@ -34972,7 +35299,7 @@ __export(daemon_exports, {
34972
35299
  });
34973
35300
  import { createServer } from "http";
34974
35301
  import { createHash as createHash4, randomUUID as randomUUID4 } from "crypto";
34975
- import { existsSync as existsSync10, readdirSync, readFileSync as readFileSync6, appendFileSync as appendFileSync2, renameSync as renameSync3, writeFileSync as writeFileSync5, unlinkSync as unlinkSync5, statSync } from "fs";
35302
+ import { existsSync as existsSync10, readdirSync as readdirSync2, readFileSync as readFileSync6, appendFileSync as appendFileSync2, renameSync as renameSync3, writeFileSync as writeFileSync6, unlinkSync as unlinkSync5, statSync } from "fs";
34976
35303
  import { join as join9 } from "path";
34977
35304
  function getActiveUseaiSessionIds() {
34978
35305
  const ids = /* @__PURE__ */ new Set();
@@ -35089,7 +35416,7 @@ function sealOrphanedSessions() {
35089
35416
  const mappedUseaiIds = new Set(Object.values(mcpMap));
35090
35417
  let sealed = 0;
35091
35418
  try {
35092
- const files = readdirSync(ACTIVE_DIR).filter((f) => f.endsWith(".jsonl"));
35419
+ const files = readdirSync2(ACTIVE_DIR).filter((f) => f.endsWith(".jsonl"));
35093
35420
  for (const file of files) {
35094
35421
  const sessionId = file.replace(".jsonl", "");
35095
35422
  if (activeIds.has(sessionId)) continue;
@@ -35235,13 +35562,10 @@ function resetIdleTimer(sessionId) {
35235
35562
  const active = sessions.get(sessionId);
35236
35563
  if (!active) return;
35237
35564
  clearTimeout(active.idleTimer);
35238
- active.idleTimer = setTimeout(async () => {
35239
- autoSealSession(active);
35240
- try {
35241
- await active.transport.close();
35242
- } catch {
35565
+ active.idleTimer = setTimeout(() => {
35566
+ if (active.session.sessionRecordCount > 0 && !isSessionAlreadySealed(active.session)) {
35567
+ sealSessionData(active);
35243
35568
  }
35244
- sessions.delete(sessionId);
35245
35569
  }, IDLE_TIMEOUT_MS);
35246
35570
  }
35247
35571
  async function cleanupSession(sessionId) {
@@ -35257,7 +35581,7 @@ async function cleanupSession(sessionId) {
35257
35581
  }
35258
35582
  function countActiveSessionFiles() {
35259
35583
  try {
35260
- return readdirSync(ACTIVE_DIR).filter((f) => f.endsWith(".jsonl")).length;
35584
+ return readdirSync2(ACTIVE_DIR).filter((f) => f.endsWith(".jsonl")).length;
35261
35585
  } catch {
35262
35586
  return 0;
35263
35587
  }
@@ -35477,8 +35801,8 @@ function recoverEndSession(staleMcpSessionId, args, rpcId, res) {
35477
35801
  if (isAlreadySealed) {
35478
35802
  let milestoneCount2 = 0;
35479
35803
  if (milestonesInput && milestonesInput.length > 0) {
35480
- const config2 = readJson(CONFIG_FILE, { milestone_tracking: true, auto_sync: true });
35481
- if (config2.milestone_tracking) {
35804
+ const config2 = migrateConfig(readJson(CONFIG_FILE, {}));
35805
+ if (config2.capture.milestones) {
35482
35806
  const durationMinutes = Math.round(duration3 / 60);
35483
35807
  const allMilestones = readJson(MILESTONES_FILE, []);
35484
35808
  for (const m of milestonesInput) {
@@ -35552,8 +35876,8 @@ function recoverEndSession(staleMcpSessionId, args, rpcId, res) {
35552
35876
  let recordCount = lines.length;
35553
35877
  let milestoneCount = 0;
35554
35878
  if (milestonesInput && milestonesInput.length > 0) {
35555
- const config2 = readJson(CONFIG_FILE, { milestone_tracking: true, auto_sync: true });
35556
- if (config2.milestone_tracking) {
35879
+ const config2 = migrateConfig(readJson(CONFIG_FILE, {}));
35880
+ if (config2.capture.milestones) {
35557
35881
  const durationMinutes = Math.round(duration3 / 60);
35558
35882
  const allMilestones = readJson(MILESTONES_FILE, []);
35559
35883
  for (const m of milestonesInput) {
@@ -35785,6 +36109,10 @@ async function startDaemon(port) {
35785
36109
  handleLocalConfig(req, res);
35786
36110
  return;
35787
36111
  }
36112
+ if (url.pathname === "/api/local/config/full") {
36113
+ handleLocalConfigFull(req, res);
36114
+ return;
36115
+ }
35788
36116
  if (url.pathname === "/api/local/update-check") {
35789
36117
  await handleUpdateCheck(res);
35790
36118
  return;
@@ -35823,6 +36151,10 @@ async function startDaemon(port) {
35823
36151
  await handleLocalSyncMark(req, res);
35824
36152
  return;
35825
36153
  }
36154
+ if (url.pathname === "/api/local/config" && req.method === "PATCH") {
36155
+ await handleLocalConfigUpdate(req, res);
36156
+ return;
36157
+ }
35826
36158
  if (url.pathname === "/api/local/users/me" && req.method === "PATCH") {
35827
36159
  await handleLocalUpdateUser(req, res);
35828
36160
  return;
@@ -36015,7 +36347,7 @@ async function startDaemon(port) {
36015
36347
  port: listenPort,
36016
36348
  started_at: (/* @__PURE__ */ new Date()).toISOString()
36017
36349
  });
36018
- writeFileSync5(DAEMON_PID_FILE, pidData + "\n");
36350
+ writeFileSync6(DAEMON_PID_FILE, pidData + "\n");
36019
36351
  console.log(`UseAI daemon listening on http://127.0.0.1:${listenPort}`);
36020
36352
  console.log(`PID: ${process.pid}`);
36021
36353
  }
@@ -36027,6 +36359,7 @@ var init_daemon2 = __esm({
36027
36359
  init_streamableHttp();
36028
36360
  init_types5();
36029
36361
  init_dist();
36362
+ init_dist();
36030
36363
  init_session_state();
36031
36364
  init_register_tools();
36032
36365
  init_mcp_map();