@gaodefa/daocore 2026.5.95 → 2026.5.97

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.
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "2026.5.95",
3
- "commit": "d631bf21ee21269189e539966de7072e25e69483",
4
- "builtAt": "2026-05-28T13:11:57.824Z"
2
+ "version": "2026.5.97",
3
+ "commit": "49055735f9e13a505c5149b46864eb3d95f56e5e",
4
+ "builtAt": "2026-05-28T15:08:04.448Z"
5
5
  }
@@ -1 +1 @@
1
- c483d19a9ffcfb426c11234e9fa563de90cbfbc0b3ae0e666826d84dcf8e2258
1
+ 9aad2245f9c48d765cc48af7db951c1add5d4d04cf6857a0c17ab0b88e0cfbc8
@@ -31,14 +31,14 @@
31
31
  "secretsHelpSourceSignature": "98f16f85bbf79bf5f2b44f095dfd660e6e316890",
32
32
  "nodesHelpSourceSignature": "250d758110b3ffd7e90be1e132cd932880ab84ca",
33
33
  "subcommandHelpSourceSignature": "bcdfecba02dea9425970635f7e5646e001ff814e",
34
- "browserHelpText": "\nDaoCore 2026.5.95 (d631bf2) — All your chats, one DaoCore.\n\nUsage: daocore browser [options] [command]\n\nManage DaoCore's dedicated browser (Chrome/Chromium)\n\nOptions:\n --browser-profile <name> Browser profile name (default from config)\n --expect-final Wait for final response (agent) (default: false)\n -h, --help Display help for command\n --json Output machine-readable JSON (default: false)\n --timeout <ms> Timeout in ms (default: \"30000\")\n --token <token> Gateway token (if required)\n --url <url> Gateway WebSocket URL (defaults to\n gateway.remote.url when configured)\n\nCommands:\n click Click an element by ref from snapshot\n click-coords Click viewport coordinates\n close Close a tab (target id optional)\n console Get recent console messages\n cookies Read/write cookies\n create-profile Create a new browser profile\n delete-profile Delete a browser profile\n dialog Arm the next modal dialog (alert/confirm/prompt)\n doctor Check browser plugin readiness\n download Click a ref and save the resulting download\n drag Drag from one ref to another\n errors Get recent page errors\n evaluate Evaluate a function against the page or a ref\n fill Fill a form with JSON field descriptors\n focus Focus a tab by target id, tab id, label, or unique\n target id prefix\n highlight Highlight an element by ref\n hover Hover an element by ai ref\n navigate Navigate the current tab to a URL\n open Open a URL in a new tab\n pdf Save page as PDF\n press Press a key\n profiles List all browser profiles\n requests Get recent network requests (best-effort)\n reset-profile Reset browser profile (moves it to Trash)\n resize Resize the viewport\n responsebody Wait for a network response and return its body\n screenshot Capture a screenshot (MEDIA:<path>)\n scrollintoview Scroll an element into view by ref from snapshot\n select Select option(s) in a select element\n set Browser environment settings\n snapshot Capture a snapshot (default: ai; aria is the\n accessibility tree)\n start Start the browser (no-op if already running)\n status Show browser status\n stop Stop the browser (best-effort)\n storage Read/write localStorage/sessionStorage\n tab Tab shortcuts (index-based)\n tabs List open tabs\n trace Record a Playwright trace\n type Type into an element by ref from snapshot\n upload Arm file upload for the next file chooser\n wait Wait for time, selector, URL, load state, or JS\n conditions\n waitfordownload Wait for the next download (and save it)\n\nExamples:\n daocore browser status\n daocore browser start\n daocore browser start --headless\n daocore browser stop\n daocore browser tabs\n daocore browser open https://example.com\n daocore browser focus abcd1234\n daocore browser close abcd1234\n daocore browser screenshot\n daocore browser screenshot --full-page\n daocore browser screenshot --ref 12\n daocore browser snapshot\n daocore browser snapshot --format aria --limit 200\n daocore browser snapshot --efficient\n daocore browser snapshot --labels\n daocore browser navigate https://example.com\n daocore browser resize 1280 720\n daocore browser click 12 --double\n daocore browser click-coords 120 340\n daocore browser type 23 \"hello\" --submit\n daocore browser press Enter\n daocore browser hover 44\n daocore browser drag 10 11\n daocore browser select 9 OptionA OptionB\n daocore browser upload /tmp/daocore/uploads/file.pdf\n daocore browser fill --fields '[{\"ref\":\"1\",\"value\":\"Ada\"}]'\n daocore browser dialog --accept\n daocore browser wait --text \"Done\"\n daocore browser evaluate --fn '(el) => el.textContent' --ref 7\n daocore browser console --level error\n daocore browser pdf\n\nDocs: https://daocore-ai.vercel.app/cli/browser\n\n",
35
- "secretsHelpText": "\nDaoCore 2026.5.95 (d631bf2) — All your chats, one DaoCore.\n\nUsage: daocore secrets [options] [command]\n\nSecrets runtime controls\n\nOptions:\n -h, --help Display help for command\n\nCommands:\n apply Apply a previously generated secrets plan\n audit Audit plaintext secrets, unresolved refs, and precedence drift\n configure Interactive secrets helper (provider setup + SecretRef mapping +\n preflight)\n help Display help for command\n reload Re-resolve secret references and atomically swap runtime snapshot\n\nDocs: https://daocore-ai.vercel.app/gateway/security\n\n",
36
- "nodesHelpText": "\nDaoCore 2026.5.95 (d631bf2) — All your chats, one DaoCore.\n\nUsage: daocore nodes [options] [command]\n\nManage gateway-owned nodes (pairing, status, invoke, and media)\n\nOptions:\n -h, --help Display help for command\n\nCommands:\n approve Approve a pending pairing request\n camera Capture camera media from a paired node\n canvas Capture or render canvas content from a paired node\n describe Describe a node (capabilities + supported invoke commands)\n help Display help for command\n invoke Invoke a command on a paired node\n list List pending and paired nodes\n location Fetch location from a paired node\n notify Send a local notification on a node (mac only)\n pending List pending pairing requests\n push Send an APNs test push to an iOS node\n reject Reject a pending pairing request\n remove Remove a paired node entry\n rename Rename a paired node (display name override)\n screen Capture screen recordings from a paired node\n status List known nodes with connection status and capabilities\n\nExamples:\n daocore nodes status\n List known nodes with live status.\n daocore nodes pairing pending\n Show pending node pairing requests.\n daocore nodes remove --node <id|name|ip>\n Remove a stale paired node entry.\n daocore nodes invoke --node <id> --command system.which --params '{\"name\":\"uname\"}'\n Invoke a node command directly.\n daocore nodes camera snap --node <id>\n Capture a photo from a node camera.\n\nDocs: https://daocore-ai.vercel.app/cli/nodes\n\n",
34
+ "browserHelpText": "\nDaoCore 2026.5.97 (4905573) — All your chats, one DaoCore.\n\nUsage: daocore browser [options] [command]\n\nManage DaoCore's dedicated browser (Chrome/Chromium)\n\nOptions:\n --browser-profile <name> Browser profile name (default from config)\n --expect-final Wait for final response (agent) (default: false)\n -h, --help Display help for command\n --json Output machine-readable JSON (default: false)\n --timeout <ms> Timeout in ms (default: \"30000\")\n --token <token> Gateway token (if required)\n --url <url> Gateway WebSocket URL (defaults to\n gateway.remote.url when configured)\n\nCommands:\n click Click an element by ref from snapshot\n click-coords Click viewport coordinates\n close Close a tab (target id optional)\n console Get recent console messages\n cookies Read/write cookies\n create-profile Create a new browser profile\n delete-profile Delete a browser profile\n dialog Arm the next modal dialog (alert/confirm/prompt)\n doctor Check browser plugin readiness\n download Click a ref and save the resulting download\n drag Drag from one ref to another\n errors Get recent page errors\n evaluate Evaluate a function against the page or a ref\n fill Fill a form with JSON field descriptors\n focus Focus a tab by target id, tab id, label, or unique\n target id prefix\n highlight Highlight an element by ref\n hover Hover an element by ai ref\n navigate Navigate the current tab to a URL\n open Open a URL in a new tab\n pdf Save page as PDF\n press Press a key\n profiles List all browser profiles\n requests Get recent network requests (best-effort)\n reset-profile Reset browser profile (moves it to Trash)\n resize Resize the viewport\n responsebody Wait for a network response and return its body\n screenshot Capture a screenshot (MEDIA:<path>)\n scrollintoview Scroll an element into view by ref from snapshot\n select Select option(s) in a select element\n set Browser environment settings\n snapshot Capture a snapshot (default: ai; aria is the\n accessibility tree)\n start Start the browser (no-op if already running)\n status Show browser status\n stop Stop the browser (best-effort)\n storage Read/write localStorage/sessionStorage\n tab Tab shortcuts (index-based)\n tabs List open tabs\n trace Record a Playwright trace\n type Type into an element by ref from snapshot\n upload Arm file upload for the next file chooser\n wait Wait for time, selector, URL, load state, or JS\n conditions\n waitfordownload Wait for the next download (and save it)\n\nExamples:\n daocore browser status\n daocore browser start\n daocore browser start --headless\n daocore browser stop\n daocore browser tabs\n daocore browser open https://example.com\n daocore browser focus abcd1234\n daocore browser close abcd1234\n daocore browser screenshot\n daocore browser screenshot --full-page\n daocore browser screenshot --ref 12\n daocore browser snapshot\n daocore browser snapshot --format aria --limit 200\n daocore browser snapshot --efficient\n daocore browser snapshot --labels\n daocore browser navigate https://example.com\n daocore browser resize 1280 720\n daocore browser click 12 --double\n daocore browser click-coords 120 340\n daocore browser type 23 \"hello\" --submit\n daocore browser press Enter\n daocore browser hover 44\n daocore browser drag 10 11\n daocore browser select 9 OptionA OptionB\n daocore browser upload /tmp/daocore/uploads/file.pdf\n daocore browser fill --fields '[{\"ref\":\"1\",\"value\":\"Ada\"}]'\n daocore browser dialog --accept\n daocore browser wait --text \"Done\"\n daocore browser evaluate --fn '(el) => el.textContent' --ref 7\n daocore browser console --level error\n daocore browser pdf\n\nDocs: https://daocore-ai.vercel.app/cli/browser\n\n",
35
+ "secretsHelpText": "\nDaoCore 2026.5.97 (4905573) — All your chats, one DaoCore.\n\nUsage: daocore secrets [options] [command]\n\nSecrets runtime controls\n\nOptions:\n -h, --help Display help for command\n\nCommands:\n apply Apply a previously generated secrets plan\n audit Audit plaintext secrets, unresolved refs, and precedence drift\n configure Interactive secrets helper (provider setup + SecretRef mapping +\n preflight)\n help Display help for command\n reload Re-resolve secret references and atomically swap runtime snapshot\n\nDocs: https://daocore-ai.vercel.app/gateway/security\n\n",
36
+ "nodesHelpText": "\nDaoCore 2026.5.97 (4905573) — All your chats, one DaoCore.\n\nUsage: daocore nodes [options] [command]\n\nManage gateway-owned nodes (pairing, status, invoke, and media)\n\nOptions:\n -h, --help Display help for command\n\nCommands:\n approve Approve a pending pairing request\n camera Capture camera media from a paired node\n canvas Capture or render canvas content from a paired node\n describe Describe a node (capabilities + supported invoke commands)\n help Display help for command\n invoke Invoke a command on a paired node\n list List pending and paired nodes\n location Fetch location from a paired node\n notify Send a local notification on a node (mac only)\n pending List pending pairing requests\n push Send an APNs test push to an iOS node\n reject Reject a pending pairing request\n remove Remove a paired node entry\n rename Rename a paired node (display name override)\n screen Capture screen recordings from a paired node\n status List known nodes with connection status and capabilities\n\nExamples:\n daocore nodes status\n List known nodes with live status.\n daocore nodes pairing pending\n Show pending node pairing requests.\n daocore nodes remove --node <id|name|ip>\n Remove a stale paired node entry.\n daocore nodes invoke --node <id> --command system.which --params '{\"name\":\"uname\"}'\n Invoke a node command directly.\n daocore nodes camera snap --node <id>\n Capture a photo from a node camera.\n\nDocs: https://daocore-ai.vercel.app/cli/nodes\n\n",
37
37
  "subcommandHelpText": {
38
- "doctor": "\nDaoCore 2026.5.95 (d631bf2) — All your chats, one DaoCore.\n\nUsage: daocore doctor [options]\n\nHealth checks + quick fixes for the gateway and channels\n\nOptions:\n --deep Scan system services for extra gateway installs\n (default: false)\n --fix Apply recommended repairs (alias for --repair)\n (default: false)\n --fix-update Fix update issues: check npm cache, compare\n version, reinstall if behind, clear stale state\n (default: false)\n --force Apply aggressive repairs (overwrites custom\n service config) (default: false)\n --generate-gateway-token Generate and configure a gateway token (default:\n false)\n -h, --help Display help for command\n --json With --lint: emit JSON findings instead of human\n output (default: false)\n --lint Run read-only health checks and report findings\n (default: false)\n --no-workspace-suggestions Disable workspace memory system suggestions\n --non-interactive Run without prompts (safe migrations only)\n (default: false)\n --only <id> With --lint: run only the specified check id\n (repeatable) (default: [])\n --repair Apply recommended repairs without prompting\n (default: false)\n --severity-min <level> With --lint: drop findings below this severity\n (info|warning|error)\n --skip <id> With --lint: skip a specific check id (repeatable)\n (default: [])\n --yes Accept defaults without prompting (default: false)\n\nDocs: https://daocore-ai.vercel.app/cli/doctor\n\n",
39
- "gateway": "\nDaoCore 2026.5.95 (d631bf2) — All your chats, one DaoCore.\n\nUsage: daocore gateway [options] [command]\n\nRun, inspect, and query the WebSocket Gateway\n\nOptions:\n --allow-unconfigured Allow gateway start without enforcing\n gateway.mode=local in config (does not repair\n config) (default: false)\n --auth <mode> Gateway auth mode\n (\"none\"|\"token\"|\"password\"|\"trusted-proxy\")\n --bind <mode> Bind mode\n (\"loopback\"|\"lan\"|\"tailnet\"|\"auto\"|\"custom\").\n Defaults to config gateway.bind (or loopback).\n --claude-cli-logs Deprecated alias for --cli-backend-logs (default:\n false)\n --cli-backend-logs Only show CLI backend logs in the console (includes\n stdout/stderr) (default: false)\n --compact Alias for \"--ws-log compact\" (default: false)\n --dev Create a dev config + workspace if missing (no\n BOOTSTRAP.md) (default: false)\n --force Kill any existing listener on the target port\n before starting (default: false)\n -h, --help Display help for command\n --password <password> Password for auth mode=password\n --password-file <path> Read gateway password from file\n --port <port> Port for the gateway WebSocket\n --raw-stream Log raw model stream events to jsonl (default:\n false)\n --raw-stream-path <path> Raw stream jsonl path\n --reset Reset dev config + credentials + sessions +\n workspace (requires --dev) (default: false)\n --tailscale <mode> Tailscale exposure mode (\"off\"|\"serve\"|\"funnel\")\n --tailscale-reset-on-exit Reset Tailscale serve/funnel configuration on\n shutdown (default: false)\n --token <token> Shared token required in connect.params.auth.token\n (default: DAOCORE_GATEWAY_TOKEN env if set)\n --verbose Verbose logging to stdout/stderr (default: false)\n --ws-log <style> WebSocket log style (\"auto\"|\"full\"|\"compact\")\n (default: \"auto\")\n\nCommands:\n call Call a Gateway method\n diagnostics Export local support diagnostics\n discover Discover gateways via Bonjour (local + wide-area if\n configured)\n health Fetch Gateway health\n install Install the Gateway service\n (launchd/systemd/schtasks)\n probe Show gateway reachability, auth capability, and\n read-probe summary (local + remote)\n restart Restart the Gateway service\n (launchd/systemd/schtasks)\n run Run the WebSocket Gateway (foreground)\n stability Fetch payload-free Gateway stability diagnostics\n start Start the Gateway service\n (launchd/systemd/schtasks)\n status Show gateway service status + probe\n connectivity/capability\n stop Stop the Gateway service (launchd/systemd/schtasks)\n uninstall Uninstall the Gateway service\n (launchd/systemd/schtasks)\n usage-cost Fetch usage cost summary from session logs\n\nExamples:\n daocore gateway run\n Run the gateway in the foreground.\n daocore gateway status\n Show service status plus connectivity/capability.\n daocore gateway discover\n Find local and wide-area gateway beacons.\n daocore gateway stability\n Show recent stability diagnostics.\n daocore gateway call health\n Call a gateway RPC method directly.\n\nDocs: https://daocore-ai.vercel.app/cli/gateway\n\n",
40
- "models": "\nDaoCore 2026.5.95 (d631bf2) — All your chats, one DaoCore.\n\nUsage: daocore models [options] [command]\n\nModel discovery, scanning, and configuration\n\nOptions:\n --agent <id> Agent id to inspect (overrides\n DAOCORE_AGENT_DIR/PI_CODING_AGENT_DIR)\n -h, --help Display help for command\n --status-json Output JSON (alias for `models status --json`) (default:\n false)\n --status-plain Plain output (alias for `models status --plain`) (default:\n false)\n\nCommands:\n aliases Manage model aliases\n auth Manage model auth profiles\n fallbacks Manage model fallback list\n image-fallbacks Manage image model fallback list\n list List models (configured by default)\n scan Scan OpenRouter free models for tools + images\n set Set the default model\n set-image Set the image model\n status Show configured model state\n\nDocs: https://daocore-ai.vercel.app/cli/models\n\n",
41
- "plugins": "\nDaoCore 2026.5.95 (d631bf2) — All your chats, one DaoCore.\n\nUsage: daocore plugins [options] [command]\n\nManage DaoCore plugins and extensions\n\nOptions:\n -h, --help Display help for command\n\nCommands:\n build Generate simple tool plugin metadata\n disable Disable a plugin in config\n doctor Report plugin load issues\n enable Enable a plugin in config\n init Create a simple tool plugin project\n inspect Inspect plugin details\n install Install a plugin or hook pack (path, archive, npm spec, git repo,\n clawhub:package, or marketplace entry)\n list List discovered plugins\n marketplace Inspect Claude-compatible plugin marketplaces\n registry Inspect or rebuild the persisted plugin registry\n search Search ClawHub plugin packages\n uninstall Uninstall a plugin\n update Update installed plugins and tracked hook packs\n validate Validate simple tool plugin metadata\n\nDocs: https://daocore-ai.vercel.app/cli/plugins\n\n"
38
+ "doctor": "\nDaoCore 2026.5.97 (4905573) — All your chats, one DaoCore.\n\nUsage: daocore doctor [options]\n\nHealth checks + quick fixes for the gateway and channels\n\nOptions:\n --deep Scan system services for extra gateway installs\n (default: false)\n --fix Apply recommended repairs (alias for --repair)\n (default: false)\n --fix-update Fix update issues: check npm cache, compare\n version, reinstall if behind, clear stale state\n (default: false)\n --force Apply aggressive repairs (overwrites custom\n service config) (default: false)\n --generate-gateway-token Generate and configure a gateway token (default:\n false)\n -h, --help Display help for command\n --json With --lint: emit JSON findings instead of human\n output (default: false)\n --lint Run read-only health checks and report findings\n (default: false)\n --no-workspace-suggestions Disable workspace memory system suggestions\n --non-interactive Run without prompts (safe migrations only)\n (default: false)\n --only <id> With --lint: run only the specified check id\n (repeatable) (default: [])\n --repair Apply recommended repairs without prompting\n (default: false)\n --severity-min <level> With --lint: drop findings below this severity\n (info|warning|error)\n --skip <id> With --lint: skip a specific check id (repeatable)\n (default: [])\n --yes Accept defaults without prompting (default: false)\n\nDocs: https://daocore-ai.vercel.app/cli/doctor\n\n",
39
+ "gateway": "\nDaoCore 2026.5.97 (4905573) — All your chats, one DaoCore.\n\nUsage: daocore gateway [options] [command]\n\nRun, inspect, and query the WebSocket Gateway\n\nOptions:\n --allow-unconfigured Allow gateway start without enforcing\n gateway.mode=local in config (does not repair\n config) (default: false)\n --auth <mode> Gateway auth mode\n (\"none\"|\"token\"|\"password\"|\"trusted-proxy\")\n --bind <mode> Bind mode\n (\"loopback\"|\"lan\"|\"tailnet\"|\"auto\"|\"custom\").\n Defaults to config gateway.bind (or loopback).\n --claude-cli-logs Deprecated alias for --cli-backend-logs (default:\n false)\n --cli-backend-logs Only show CLI backend logs in the console (includes\n stdout/stderr) (default: false)\n --compact Alias for \"--ws-log compact\" (default: false)\n --dev Create a dev config + workspace if missing (no\n BOOTSTRAP.md) (default: false)\n --force Kill any existing listener on the target port\n before starting (default: false)\n -h, --help Display help for command\n --password <password> Password for auth mode=password\n --password-file <path> Read gateway password from file\n --port <port> Port for the gateway WebSocket\n --raw-stream Log raw model stream events to jsonl (default:\n false)\n --raw-stream-path <path> Raw stream jsonl path\n --reset Reset dev config + credentials + sessions +\n workspace (requires --dev) (default: false)\n --tailscale <mode> Tailscale exposure mode (\"off\"|\"serve\"|\"funnel\")\n --tailscale-reset-on-exit Reset Tailscale serve/funnel configuration on\n shutdown (default: false)\n --token <token> Shared token required in connect.params.auth.token\n (default: DAOCORE_GATEWAY_TOKEN env if set)\n --verbose Verbose logging to stdout/stderr (default: false)\n --ws-log <style> WebSocket log style (\"auto\"|\"full\"|\"compact\")\n (default: \"auto\")\n\nCommands:\n call Call a Gateway method\n diagnostics Export local support diagnostics\n discover Discover gateways via Bonjour (local + wide-area if\n configured)\n health Fetch Gateway health\n install Install the Gateway service\n (launchd/systemd/schtasks)\n probe Show gateway reachability, auth capability, and\n read-probe summary (local + remote)\n restart Restart the Gateway service\n (launchd/systemd/schtasks)\n run Run the WebSocket Gateway (foreground)\n stability Fetch payload-free Gateway stability diagnostics\n start Start the Gateway service\n (launchd/systemd/schtasks)\n status Show gateway service status + probe\n connectivity/capability\n stop Stop the Gateway service (launchd/systemd/schtasks)\n uninstall Uninstall the Gateway service\n (launchd/systemd/schtasks)\n usage-cost Fetch usage cost summary from session logs\n\nExamples:\n daocore gateway run\n Run the gateway in the foreground.\n daocore gateway status\n Show service status plus connectivity/capability.\n daocore gateway discover\n Find local and wide-area gateway beacons.\n daocore gateway stability\n Show recent stability diagnostics.\n daocore gateway call health\n Call a gateway RPC method directly.\n\nDocs: https://daocore-ai.vercel.app/cli/gateway\n\n",
40
+ "models": "\nDaoCore 2026.5.97 (4905573) — All your chats, one DaoCore.\n\nUsage: daocore models [options] [command]\n\nModel discovery, scanning, and configuration\n\nOptions:\n --agent <id> Agent id to inspect (overrides\n DAOCORE_AGENT_DIR/PI_CODING_AGENT_DIR)\n -h, --help Display help for command\n --status-json Output JSON (alias for `models status --json`) (default:\n false)\n --status-plain Plain output (alias for `models status --plain`) (default:\n false)\n\nCommands:\n aliases Manage model aliases\n auth Manage model auth profiles\n fallbacks Manage model fallback list\n image-fallbacks Manage image model fallback list\n list List models (configured by default)\n scan Scan OpenRouter free models for tools + images\n set Set the default model\n set-image Set the image model\n status Show configured model state\n\nDocs: https://daocore-ai.vercel.app/cli/models\n\n",
41
+ "plugins": "\nDaoCore 2026.5.97 (4905573) — All your chats, one DaoCore.\n\nUsage: daocore plugins [options] [command]\n\nManage DaoCore plugins and extensions\n\nOptions:\n -h, --help Display help for command\n\nCommands:\n build Generate simple tool plugin metadata\n disable Disable a plugin in config\n doctor Report plugin load issues\n enable Enable a plugin in config\n init Create a simple tool plugin project\n inspect Inspect plugin details\n install Install a plugin or hook pack (path, archive, npm spec, git repo,\n clawhub:package, or marketplace entry)\n list List discovered plugins\n marketplace Inspect Claude-compatible plugin marketplaces\n registry Inspect or rebuild the persisted plugin registry\n search Search ClawHub plugin packages\n uninstall Uninstall a plugin\n update Update installed plugins and tracked hook packs\n validate Validate simple tool plugin metadata\n\nDocs: https://daocore-ai.vercel.app/cli/plugins\n\n"
42
42
  },
43
- "rootHelpText": "\nDaoCore 2026.5.95 (d631bf2) — All your chats, one DaoCore.\n\nUsage: daocore [options] [command]\n\nOptions:\n --container <name> Run the CLI inside a running Podman/Docker container\n named <name> (default: env DAOCORE_CONTAINER)\n --dev Dev profile: isolate state under ~/.daocore-dev, default\n gateway port 19001, and shift derived ports\n (browser/canvas)\n -h, --help Display help for command\n --log-level <level> Global log level override for file + console\n (silent|fatal|error|warn|info|debug|trace)\n --no-color Disable ANSI colors\n --profile <name> Use a named profile (isolates\n DAOCORE_STATE_DIR/DAOCORE_CONFIG_PATH under\n ~/.daocore-<name>)\n -V, --version output the version number\n\nCommands:\n Hint: commands suffixed with * have subcommands. Run <command> --help for details.\n acp * Run and manage ACP-backed coding agents\n agent Run one agent turn via the Gateway\n agents * Manage isolated agents (workspaces, auth, routing)\n approvals * Manage exec approvals (gateway or node host)\n backup * Create and verify local backup archives for DaoCore state\n capability * Run provider capability commands (fallback alias: infer)\n channels * Add, remove, login, and inspect messaging channels\n chat Open a local terminal UI (alias for tui --local)\n clawbot * Legacy clawbot command aliases\n commitments * List and manage inferred follow-up commitments\n completion Generate shell completion script\n config * Non-interactive config helpers\n (get/set/unset/file/validate). Default: starts guided\n setup.\n configure Interactive configuration for credentials, channels,\n gateway, and agent defaults\n crestodian Open the interactive setup and repair assistant\n cron * Schedule and inspect Gateway background jobs\n daemon * Manage the Gateway service (legacy alias)\n dashboard Open the Control UI with your current token\n devices * Device pairing + token management\n directory * Lookup contact and group IDs (self, peers, groups) for\n supported chat channels\n dns * DNS helpers for wide-area discovery (Tailscale + CoreDNS)\n docs Search the live DaoCore docs\n doctor Diagnose and repair config, Gateway, plugin, and channel\n problems\n exec-policy * Show or synchronize requested exec policy with host\n approvals\n gateway * Run, inspect, and query the DaoCore Gateway\n health Fetch detailed health from the running Gateway\n help Display help for command\n hooks * Manage internal agent hooks\n infer * Run provider-backed model, media, search, and embedding\n commands\n logs Tail Gateway logs locally or via RPC\n mcp * Manage DaoCore MCP config and channel bridge\n memory Search, inspect, and reindex memory files\n message * Send, read, and manage channel messages\n migrate * Import state from another agent system\n models * List, scan, and set model providers\n node * Run and manage the headless node host service\n nodes * Pair nodes and run node-host commands through the Gateway\n onboard Interactive onboarding for gateway, workspace, and skills\n pairing * Secure DM pairing (approve inbound requests)\n plugins * Install, enable, disable, and inspect plugins\n proxy * Run the DaoCore debug proxy and inspect captured traffic\n qr Generate mobile pairing QR/setup code\n reset Reset local config/state (keeps the CLI installed)\n sandbox * Manage sandbox containers for agent isolation\n secrets * Audit, apply, and reload SecretRef-backed credentials\n security * Security tools and local config audits\n sessions * List stored conversation sessions\n setup Initialize local config and an agent workspace\n skills * List, inspect, and install agent skills\n status Show Gateway, channel, model, and recent-session status\n system * System events, heartbeat, and presence\n tasks * Inspect durable background tasks and flows\n terminal Open a local terminal UI (alias for tui --local)\n tui Open a terminal UI connected to the Gateway\n uninstall Uninstall the gateway service + local data (CLI remains)\n update * Update DaoCore and inspect update channel status\n webhooks * Webhook helpers and integrations\n\nExamples:\n daocore onboard\n Run guided setup for a local Gateway, workspace, auth, and channels.\n daocore setup\n Create the baseline config, workspace, and session folders.\n daocore configure\n Change models, Gateway, channels, plugins, skills, and health checks.\n daocore status\n Check Gateway, channel, model, and recent-session status.\n daocore doctor --fix\n Repair common config, service, plugin, and channel problems.\n daocore channels add\n Add or update a chat channel account with guided prompts.\n daocore channels status\n See connected messaging accounts and login state.\n daocore --dev gateway\n Run a dev Gateway (isolated state/config) on ws://127.0.0.1:19001.\n daocore gateway run --force\n Start the Gateway and replace anything bound to its port.\n daocore models status\n Show model/provider auth health before running agents.\n daocore plugins list\n Inspect enabled, disabled, and installed plugins.\n daocore agent --to +15555550123 --message \"Run summary\" --deliver\n Run one agent turn through the Gateway and optionally deliver the reply.\n daocore message send --channel telegram --target @mychat --message \"Hi\"\n Send via your Telegram bot.\n\nDocs: https://daocore-ai.vercel.app/cli\n\n"
43
+ "rootHelpText": "\nDaoCore 2026.5.97 (4905573) — All your chats, one DaoCore.\n\nUsage: daocore [options] [command]\n\nOptions:\n --container <name> Run the CLI inside a running Podman/Docker container\n named <name> (default: env DAOCORE_CONTAINER)\n --dev Dev profile: isolate state under ~/.daocore-dev, default\n gateway port 19001, and shift derived ports\n (browser/canvas)\n -h, --help Display help for command\n --log-level <level> Global log level override for file + console\n (silent|fatal|error|warn|info|debug|trace)\n --no-color Disable ANSI colors\n --profile <name> Use a named profile (isolates\n DAOCORE_STATE_DIR/DAOCORE_CONFIG_PATH under\n ~/.daocore-<name>)\n -V, --version output the version number\n\nCommands:\n Hint: commands suffixed with * have subcommands. Run <command> --help for details.\n acp * Run and manage ACP-backed coding agents\n agent Run one agent turn via the Gateway\n agents * Manage isolated agents (workspaces, auth, routing)\n approvals * Manage exec approvals (gateway or node host)\n backup * Create and verify local backup archives for DaoCore state\n capability * Run provider capability commands (fallback alias: infer)\n channels * Add, remove, login, and inspect messaging channels\n chat Open a local terminal UI (alias for tui --local)\n clawbot * Legacy clawbot command aliases\n commitments * List and manage inferred follow-up commitments\n completion Generate shell completion script\n config * Non-interactive config helpers\n (get/set/unset/file/validate). Default: starts guided\n setup.\n configure Interactive configuration for credentials, channels,\n gateway, and agent defaults\n crestodian Open the interactive setup and repair assistant\n cron * Schedule and inspect Gateway background jobs\n daemon * Manage the Gateway service (legacy alias)\n dashboard Open the Control UI with your current token\n devices * Device pairing + token management\n directory * Lookup contact and group IDs (self, peers, groups) for\n supported chat channels\n dns * DNS helpers for wide-area discovery (Tailscale + CoreDNS)\n docs Search the live DaoCore docs\n doctor Diagnose and repair config, Gateway, plugin, and channel\n problems\n exec-policy * Show or synchronize requested exec policy with host\n approvals\n gateway * Run, inspect, and query the DaoCore Gateway\n health Fetch detailed health from the running Gateway\n help Display help for command\n hooks * Manage internal agent hooks\n infer * Run provider-backed model, media, search, and embedding\n commands\n logs Tail Gateway logs locally or via RPC\n mcp * Manage DaoCore MCP config and channel bridge\n memory Search, inspect, and reindex memory files\n message * Send, read, and manage channel messages\n migrate * Import state from another agent system\n models * List, scan, and set model providers\n node * Run and manage the headless node host service\n nodes * Pair nodes and run node-host commands through the Gateway\n onboard Interactive onboarding for gateway, workspace, and skills\n pairing * Secure DM pairing (approve inbound requests)\n plugins * Install, enable, disable, and inspect plugins\n proxy * Run the DaoCore debug proxy and inspect captured traffic\n qr Generate mobile pairing QR/setup code\n reset Reset local config/state (keeps the CLI installed)\n sandbox * Manage sandbox containers for agent isolation\n secrets * Audit, apply, and reload SecretRef-backed credentials\n security * Security tools and local config audits\n sessions * List stored conversation sessions\n setup Initialize local config and an agent workspace\n skills * List, inspect, and install agent skills\n status Show Gateway, channel, model, and recent-session status\n system * System events, heartbeat, and presence\n tasks * Inspect durable background tasks and flows\n terminal Open a local terminal UI (alias for tui --local)\n tui Open a terminal UI connected to the Gateway\n uninstall Uninstall the gateway service + local data (CLI remains)\n update * Update DaoCore and inspect update channel status\n webhooks * Webhook helpers and integrations\n\nExamples:\n daocore onboard\n Run guided setup for a local Gateway, workspace, auth, and channels.\n daocore setup\n Create the baseline config, workspace, and session folders.\n daocore configure\n Change models, Gateway, channels, plugins, skills, and health checks.\n daocore status\n Check Gateway, channel, model, and recent-session status.\n daocore doctor --fix\n Repair common config, service, plugin, and channel problems.\n daocore channels add\n Add or update a chat channel account with guided prompts.\n daocore channels status\n See connected messaging accounts and login state.\n daocore --dev gateway\n Run a dev Gateway (isolated state/config) on ws://127.0.0.1:19001.\n daocore gateway run --force\n Start the Gateway and replace anything bound to its port.\n daocore models status\n Show model/provider auth health before running agents.\n daocore plugins list\n Inspect enabled, disabled, and installed plugins.\n daocore agent --to +15555550123 --message \"Run summary\" --deliver\n Run one agent turn through the Gateway and optionally deliver the reply.\n daocore message send --channel telegram --target @mychat --message \"Hi\"\n Send via your Telegram bot.\n\nDocs: https://daocore-ai.vercel.app/cli\n\n"
44
44
  }
@@ -1,4 +1,4 @@
1
- import{$ as e,B as t,F as n,G as r,H as i,I as a,J as o,K as s,L as c,M as l,N as u,P as d,R as f,U as p,V as m,W as h,_ as g,a as _,b as v,g as y,h as b,it as x,j as S,k as C,n as ee,nt as w,q as te,r as T,rt as E,t as D,tt as O,x as ne,y as k,z as A}from"./index-B3XB6bSV.js";import{r as j}from"./channel-config-extras-DsWLp7oz.js";import{i as M,n as N,r as P,t as re}from"./skills-shared-DC-j3T73.js";var ie=k(class extends v{constructor(){super(...arguments),this.key=E}render(e,t){return this.key=e,t}update(e,[t,n]){return t!==this.key&&(ne(e),this.key=t),n}});function ae(e){let{agent:n,configForm:r,agentFilesList:a,configLoading:o,configSaving:s,configDirty:c,onConfigReload:l,onConfigSave:d,onModelChange:g,onModelFallbacksChange:_,onSelectPanel:v}=e,y=!!(e.defaultId&&n.id===e.defaultId),b=t(r,n.id),S=n.model,C=(a&&a.agentId===n.id?a.workspace:null)||b.entry?.workspace||b.defaults?.workspace||n.workspace||`default`,ee=b.entry?.model?p(b.entry?.model):b.defaults?.model?p(b.defaults?.model):p(S),w=m(n.agentRuntime),te=p(b.defaults?.model??S),T=h(b.entry?.model),D=h(b.defaults?.model)||(te===`-`?null:f(te))||(r?null:h(S)),ne=T??D??null,k=y?ne:T,j=i(b.entry?.model)??i(b.defaults?.model)??(r?null:i(S))??[],M=Array.isArray(b.entry?.skills)?b.entry?.skills:null,N=M?.length??null,P=!r||o||s,re=e=>{let t=j.filter((t,n)=>n!==e);_(n.id,t)};return x`
1
+ import{$ as e,B as t,F as n,G as r,H as i,I as a,J as o,K as s,L as c,M as l,N as u,P as d,R as f,U as p,V as m,W as h,_ as g,a as _,b as v,g as y,h as b,it as x,j as S,k as C,n as ee,nt as w,q as te,r as T,rt as E,t as D,tt as O,x as ne,y as k,z as A}from"./index-CoPmouB8.js";import{r as j}from"./channel-config-extras-Dx3phszd.js";import{i as M,n as N,r as P,t as re}from"./skills-shared-BtO99ARa.js";var ie=k(class extends v{constructor(){super(...arguments),this.key=E}render(e,t){return this.key=e,t}update(e,[t,n]){return t!==this.key&&(ne(e),this.key=t),n}});function ae(e){let{agent:n,configForm:r,agentFilesList:a,configLoading:o,configSaving:s,configDirty:c,onConfigReload:l,onConfigSave:d,onModelChange:g,onModelFallbacksChange:_,onSelectPanel:v}=e,y=!!(e.defaultId&&n.id===e.defaultId),b=t(r,n.id),S=n.model,C=(a&&a.agentId===n.id?a.workspace:null)||b.entry?.workspace||b.defaults?.workspace||n.workspace||`default`,ee=b.entry?.model?p(b.entry?.model):b.defaults?.model?p(b.defaults?.model):p(S),w=m(n.agentRuntime),te=p(b.defaults?.model??S),T=h(b.entry?.model),D=h(b.defaults?.model)||(te===`-`?null:f(te))||(r?null:h(S)),ne=T??D??null,k=y?ne:T,j=i(b.entry?.model)??i(b.defaults?.model)??(r?null:i(S))??[],M=Array.isArray(b.entry?.skills)?b.entry?.skills:null,N=M?.length??null,P=!r||o||s,re=e=>{let t=j.filter((t,n)=>n!==e);_(n.id,t)};return x`
2
2
  <section class="card">
3
3
  <div class="card-title">Overview</div>
4
4
  <div class="card-sub">Workspace paths and identity metadata.</div>
@@ -1005,4 +1005,4 @@ Please report this to https://github.com/markedjs/marked.`,e){let e=`<p>An error
1005
1005
  `)}
1006
1006
  </div>
1007
1007
  `}export{wn as renderAgents};
1008
- //# sourceMappingURL=agents-DhhhjVfj.js.map
1008
+ //# sourceMappingURL=agents-TcDckPid.js.map
@@ -1,2 +1,2 @@
1
- import{tt as e}from"./index-B3XB6bSV.js";function t(e,t){if(!e)return null;let n=(e.channels??{})[t];if(n&&typeof n==`object`)return n;let r=e[t];return r&&typeof r==`object`?r:null}function n(t){if(t==null)return e(`common.na`);if(typeof t==`string`||typeof t==`number`||typeof t==`boolean`)return String(t);try{return JSON.stringify(t)}catch{return e(`common.na`)}}function r(e){let r=t(e.configForm,e.channelId);return r?e.fields.flatMap(e=>e in r?[{label:e,value:n(r[e])}]:[]):[]}export{t as n,r,n as t};
2
- //# sourceMappingURL=channel-config-extras-DsWLp7oz.js.map
1
+ import{tt as e}from"./index-CoPmouB8.js";function t(e,t){if(!e)return null;let n=(e.channels??{})[t];if(n&&typeof n==`object`)return n;let r=e[t];return r&&typeof r==`object`?r:null}function n(t){if(t==null)return e(`common.na`);if(typeof t==`string`||typeof t==`number`||typeof t==`boolean`)return String(t);try{return JSON.stringify(t)}catch{return e(`common.na`)}}function r(e){let r=t(e.configForm,e.channelId);return r?e.fields.flatMap(e=>e in r?[{label:e,value:n(r[e])}]:[]):[]}export{t as n,r,n as t};
2
+ //# sourceMappingURL=channel-config-extras-Dx3phszd.js.map
@@ -1,4 +1,4 @@
1
- import{A as e,X as t,Z as n,c as r,it as i,k as a,l as o,rt as s,tt as c}from"./index-B3XB6bSV.js";import{n as l,t as u}from"./channel-config-extras-DsWLp7oz.js";function d(e,t){let r=e;for(let e of t){if(!r)return null;let t=n(r);if(t===`object`){let t=r.properties??{};if(typeof e==`string`&&t[e]){r=t[e];continue}let n=r.additionalProperties;if(typeof e==`string`&&n&&typeof n==`object`){r=n;continue}return null}if(t===`array`){if(typeof e!=`number`)return null;r=(Array.isArray(r.items)?r.items[0]:r.items)??null;continue}return null}return r}function f(e,t){return l(e,t)??{}}var p=[`groupPolicy`,`streamMode`,`dmPolicy`];function m(e){let t=p.flatMap(t=>t in e?[[t,e[t]]]:[]);return t.length===0?null:i`
1
+ import{A as e,X as t,Z as n,c as r,it as i,k as a,l as o,rt as s,tt as c}from"./index-CoPmouB8.js";import{n as l,t as u}from"./channel-config-extras-Dx3phszd.js";function d(e,t){let r=e;for(let e of t){if(!r)return null;let t=n(r);if(t===`object`){let t=r.properties??{};if(typeof e==`string`&&t[e]){r=t[e];continue}let n=r.additionalProperties;if(typeof e==`string`&&n&&typeof n==`object`){r=n;continue}return null}if(t===`array`){if(typeof e!=`number`)return null;r=(Array.isArray(r.items)?r.items[0]:r.items)??null;continue}return null}return r}function f(e,t){return l(e,t)??{}}var p=[`groupPolicy`,`streamMode`,`dmPolicy`];function m(e){let t=p.flatMap(t=>t in e?[[t,e[t]]]:[]);return t.length===0?null:i`
2
2
  <div class="status-list" style="margin-top: 12px;">
3
3
  ${t.map(([e,t])=>i`
4
4
  <div>
@@ -364,4 +364,4 @@ ${e.snapshot?JSON.stringify(e.snapshot,null,2):c(`channels.health.noSnapshotYet`
364
364
  </div>
365
365
  </div>
366
366
  `}export{F as renderChannels};
367
- //# sourceMappingURL=channels-DhDjOrEc.js.map
367
+ //# sourceMappingURL=channels-Dy2yk3Du.js.map
@@ -1,4 +1,4 @@
1
- import{C as e,D as t,S as n,Y as r,a as i,g as a,it as o,k as s,m as c,n as l,rt as u,tt as d}from"./index-B3XB6bSV.js";function f(){return[{value:`ok`,label:d(`cron.runs.runStatusOk`)},{value:`error`,label:d(`cron.runs.runStatusError`)},{value:`skipped`,label:d(`cron.runs.runStatusSkipped`)}]}function p(){return[{value:`delivered`,label:d(`cron.runs.deliveryDelivered`)},{value:`not-delivered`,label:d(`cron.runs.deliveryNotDelivered`)},{value:`unknown`,label:d(`cron.runs.deliveryUnknown`)},{value:`not-requested`,label:d(`cron.runs.deliveryNotRequested`)}]}function m(e,t,n){let r=new Set(e);return n?r.add(t):r.delete(t),Array.from(r)}function h(e,t){return e.length===0?t:e.length<=2?e.join(`, `):`${e[0]} +${e.length-1}`}function g(e){let t=[`last`,...e.channels.filter(Boolean)],n=e.form.deliveryChannel?.trim();n&&!t.includes(n)&&t.push(n);let r=new Set;return t.filter(e=>r.has(e)?!1:(r.add(e),!0))}function _(e,t){if(t===`last`)return`last`;let n=e.channelMeta?.find(e=>e.id===t);return n?.label?n.label:e.channelLabels?.[t]??t}function v(e){return o`
1
+ import{C as e,D as t,S as n,Y as r,a as i,g as a,it as o,k as s,m as c,n as l,rt as u,tt as d}from"./index-CoPmouB8.js";function f(){return[{value:`ok`,label:d(`cron.runs.runStatusOk`)},{value:`error`,label:d(`cron.runs.runStatusError`)},{value:`skipped`,label:d(`cron.runs.runStatusSkipped`)}]}function p(){return[{value:`delivered`,label:d(`cron.runs.deliveryDelivered`)},{value:`not-delivered`,label:d(`cron.runs.deliveryNotDelivered`)},{value:`unknown`,label:d(`cron.runs.deliveryUnknown`)},{value:`not-requested`,label:d(`cron.runs.deliveryNotRequested`)}]}function m(e,t,n){let r=new Set(e);return n?r.add(t):r.delete(t),Array.from(r)}function h(e,t){return e.length===0?t:e.length<=2?e.join(`, `):`${e[0]} +${e.length-1}`}function g(e){let t=[`last`,...e.channels.filter(Boolean)],n=e.form.deliveryChannel?.trim();n&&!t.includes(n)&&t.push(n);let r=new Set;return t.filter(e=>r.has(e)?!1:(r.add(e),!0))}function _(e,t){if(t===`last`)return`last`;let n=e.channelMeta?.find(e=>e.id===t);return n?.label?n.label:e.channelLabels?.[t]??t}function v(e){return o`
2
2
  <div class="field cron-filter-dropdown" data-filter=${e.id}>
3
3
  <span>${e.title}</span>
4
4
  <details class="cron-filter-dropdown__details">
@@ -1010,4 +1010,4 @@ import{C as e,D as t,S as n,Y as r,a as i,g as a,it as o,k as s,m as c,n as l,rt
1010
1010
  </div>
1011
1011
  </div>
1012
1012
  `}export{E as renderCron};
1013
- //# sourceMappingURL=cron-1rfwzgga.js.map
1013
+ //# sourceMappingURL=cron-u03_i0HS.js.map
@@ -1,4 +1,4 @@
1
- import{i as e,it as t,rt as n,tt as r}from"./index-B3XB6bSV.js";function i(i){let a=(i.status&&typeof i.status==`object`?i.status.securityAudit:null)?.summary??null,o=a?.critical??0,s=a?.warn??0,c=a?.info??0,l=o>0?`danger`:s>0?`warn`:`success`,u=o>0?r(`debug.security.critical`,{count:String(o)}):s>0?r(`debug.security.warnings`,{count:String(s)}):r(`debug.security.noCriticalIssues`);return t`
1
+ import{i as e,it as t,rt as n,tt as r}from"./index-CoPmouB8.js";function i(i){let a=(i.status&&typeof i.status==`object`?i.status.securityAudit:null)?.summary??null,o=a?.critical??0,s=a?.warn??0,c=a?.info??0,l=o>0?`danger`:s>0?`warn`:`success`,u=o>0?r(`debug.security.critical`,{count:String(o)}):s>0?r(`debug.security.warnings`,{count:String(s)}):r(`debug.security.noCriticalIssues`);return t`
2
2
  <section class="grid">
3
3
  <div class="card">
4
4
  <div class="row" style="justify-content: space-between;">
@@ -94,4 +94,4 @@ ${e(n.payload)}</pre
94
94
  `}
95
95
  </section>
96
96
  `}export{i as renderDebug};
97
- //# sourceMappingURL=debug-BfQ6tc5Z.js.map
97
+ //# sourceMappingURL=debug-7KunYHyM.js.map
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./agents-DhhhjVfj.js","./channel-config-extras-DsWLp7oz.js","./skills-shared-DC-j3T73.js","./channels-DhDjOrEc.js","./skills-DyIrWhx0.js"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./agents-TcDckPid.js","./channel-config-extras-Dx3phszd.js","./skills-shared-BtO99ARa.js","./channels-Dy2yk3Du.js","./skills-m8BzGBav.js"])))=>i.map(i=>d[i]);
2
2
  var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,a)=>(a=n==null?{}:e(i(n)),c(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var u=globalThis,d=u.ShadowRoot&&(u.ShadyCSS===void 0||u.ShadyCSS.nativeShadow)&&`adoptedStyleSheets`in Document.prototype&&`replace`in CSSStyleSheet.prototype,f=Symbol(),p=new WeakMap,m=class{constructor(e,t,n){if(this._$cssResult$=!0,n!==f)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o,t=this.t;if(d&&e===void 0){let n=t!==void 0&&t.length===1;n&&(e=p.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),n&&p.set(t,e))}return e}toString(){return this.cssText}},h=e=>new m(typeof e==`string`?e:e+``,void 0,f),g=(e,...t)=>new m(e.length===1?e[0]:t.reduce((t,n,r)=>t+(e=>{if(!0===e._$cssResult$)return e.cssText;if(typeof e==`number`)return e;throw Error(`Value passed to 'css' function must be a 'css' function result: `+e+`. Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.`)})(n)+e[r+1],e[0]),e,f),_=(e,t)=>{if(d)e.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(let n of t){let t=document.createElement(`style`),r=u.litNonce;r!==void 0&&t.setAttribute(`nonce`,r),t.textContent=n.cssText,e.appendChild(t)}},v=d?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t=``;for(let n of e.cssRules)t+=n.cssText;return h(t)})(e):e,{is:y,defineProperty:b,getOwnPropertyDescriptor:x,getOwnPropertyNames:S,getOwnPropertySymbols:ee,getPrototypeOf:C}=Object,te=globalThis,ne=te.trustedTypes,w=ne?ne.emptyScript:``,re=te.reactiveElementPolyfillSupport,T=(e,t)=>e,E={toAttribute(e,t){switch(t){case Boolean:e=e?w:null;break;case Object:case Array:e=e==null?e:JSON.stringify(e)}return e},fromAttribute(e,t){let n=e;switch(t){case Boolean:n=e!==null;break;case Number:n=e===null?null:Number(e);break;case Object:case Array:try{n=JSON.parse(e)}catch{n=null}}return n}},D=(e,t)=>!y(e,t),O={attribute:!0,type:String,converter:E,reflect:!1,useDefault:!1,hasChanged:D};Symbol.metadata??=Symbol(`metadata`),te.litPropertyMetadata??=new WeakMap;var ie=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=O){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){let n=Symbol(),r=this.getPropertyDescriptor(e,n,t);r!==void 0&&b(this.prototype,e,r)}}static getPropertyDescriptor(e,t,n){let{get:r,set:i}=x(this.prototype,e)??{get(){return this[t]},set(e){this[t]=e}};return{get:r,set(t){let a=r?.call(this);i?.call(this,t),this.requestUpdate(e,a,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??O}static _$Ei(){if(this.hasOwnProperty(T(`elementProperties`)))return;let e=C(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(T(`finalized`)))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(T(`properties`))){let e=this.properties,t=[...S(e),...ee(e)];for(let n of t)this.createProperty(n,e[n])}let e=this[Symbol.metadata];if(e!==null){let t=litPropertyMetadata.get(e);if(t!==void 0)for(let[e,n]of t)this.elementProperties.set(e,n)}this._$Eh=new Map;for(let[e,t]of this.elementProperties){let n=this._$Eu(e,t);n!==void 0&&this._$Eh.set(n,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){let t=[];if(Array.isArray(e)){let n=new Set(e.flat(1/0).reverse());for(let e of n)t.unshift(v(e))}else e!==void 0&&t.push(v(e));return t}static _$Eu(e,t){let n=t.attribute;return!1===n?void 0:typeof n==`string`?n:typeof e==`string`?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(e=>e(this))}addController(e){(this._$EO??=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){let e=new Map,t=this.constructor.elementProperties;for(let n of t.keys())this.hasOwnProperty(n)&&(e.set(n,this[n]),delete this[n]);e.size>0&&(this._$Ep=e)}createRenderRoot(){let e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return _(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(e=>e.hostConnected?.())}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach(e=>e.hostDisconnected?.())}attributeChangedCallback(e,t,n){this._$AK(e,n)}_$ET(e,t){let n=this.constructor.elementProperties.get(e),r=this.constructor._$Eu(e,n);if(r!==void 0&&!0===n.reflect){let i=(n.converter?.toAttribute===void 0?E:n.converter).toAttribute(t,n.type);this._$Em=e,i==null?this.removeAttribute(r):this.setAttribute(r,i),this._$Em=null}}_$AK(e,t){let n=this.constructor,r=n._$Eh.get(e);if(r!==void 0&&this._$Em!==r){let e=n.getPropertyOptions(r),i=typeof e.converter==`function`?{fromAttribute:e.converter}:e.converter?.fromAttribute===void 0?E:e.converter;this._$Em=r;let a=i.fromAttribute(t,e.type);this[r]=a??this._$Ej?.get(r)??a,this._$Em=null}}requestUpdate(e,t,n,r=!1,i){if(e!==void 0){let a=this.constructor;if(!1===r&&(i=this[e]),n??=a.getPropertyOptions(e),!((n.hasChanged??D)(i,t)||n.useDefault&&n.reflect&&i===this._$Ej?.get(e)&&!this.hasAttribute(a._$Eu(e,n))))return;this.C(e,t,n)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(e,t,{useDefault:n,reflect:r,wrapped:i},a){n&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,a??t??this[e]),!0!==i||a!==void 0)||(this._$AL.has(e)||(this.hasUpdated||n||(t=void 0),this._$AL.set(e,t)),!0===r&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}let e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[e,t]of this._$Ep)this[e]=t;this._$Ep=void 0}let e=this.constructor.elementProperties;if(e.size>0)for(let[t,n]of e){let{wrapped:e}=n,r=this[t];!0!==e||this._$AL.has(t)||r===void 0||this.C(t,void 0,n,r)}}let e=!1,t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach(e=>e.hostUpdate?.()),this.update(t)):this._$EM()}catch(t){throw e=!1,this._$EM(),t}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach(e=>e.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach(e=>this._$ET(e,this[e])),this._$EM()}updated(e){}firstUpdated(e){}};ie.elementStyles=[],ie.shadowRootOptions={mode:`open`},ie[T(`elementProperties`)]=new Map,ie[T(`finalized`)]=new Map,re?.({ReactiveElement:ie}),(te.reactiveElementVersions??=[]).push(`2.1.2`);var k=globalThis,ae=e=>e,oe=k.trustedTypes,se=oe?oe.createPolicy(`lit-html`,{createHTML:e=>e}):void 0,ce=`$lit$`,le=`lit$${Math.random().toFixed(9).slice(2)}$`,A=`?`+le,ue=`<${A}>`,j=document,de=()=>j.createComment(``),fe=e=>e===null||typeof e!=`object`&&typeof e!=`function`,pe=Array.isArray,me=e=>pe(e)||typeof e?.[Symbol.iterator]==`function`,he=`[
3
3
  \f\r]`,ge=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,_e=/-->/g,ve=/>/g,ye=RegExp(`>|${he}(?:([^\\s"'>=/]+)(${he}*=${he}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,`g`),M=/'/g,N=/"/g,be=/^(?:script|style|textarea|title)$/i,xe=e=>(t,...n)=>({_$litType$:e,strings:t,values:n}),P=xe(1),Se=xe(2),Ce=Symbol.for(`lit-noChange`),F=Symbol.for(`lit-nothing`),we=new WeakMap,Te=j.createTreeWalker(j,129);function Ee(e,t){if(!pe(e)||!e.hasOwnProperty(`raw`))throw Error(`invalid template strings array`);return se===void 0?t:se.createHTML(t)}var De=(e,t)=>{let n=e.length-1,r=[],i,a=t===2?`<svg>`:t===3?`<math>`:``,o=ge;for(let t=0;t<n;t++){let n=e[t],s,c,l=-1,u=0;for(;u<n.length&&(o.lastIndex=u,c=o.exec(n),c!==null);)u=o.lastIndex,o===ge?c[1]===`!--`?o=_e:c[1]===void 0?c[2]===void 0?c[3]!==void 0&&(o=ye):(be.test(c[2])&&(i=RegExp(`</`+c[2],`g`)),o=ye):o=ve:o===ye?c[0]===`>`?(o=i??ge,l=-1):c[1]===void 0?l=-2:(l=o.lastIndex-c[2].length,s=c[1],o=c[3]===void 0?ye:c[3]===`"`?N:M):o===N||o===M?o=ye:o===_e||o===ve?o=ge:(o=ye,i=void 0);let d=o===ye&&e[t+1].startsWith(`/>`)?` `:``;a+=o===ge?n+ue:l>=0?(r.push(s),n.slice(0,l)+ce+n.slice(l)+le+d):n+le+(l===-2?t:d)}return[Ee(e,a+(e[n]||`<?>`)+(t===2?`</svg>`:t===3?`</math>`:``)),r]},Oe=class e{constructor({strings:t,_$litType$:n},r){let i;this.parts=[];let a=0,o=0,s=t.length-1,c=this.parts,[l,u]=De(t,n);if(this.el=e.createElement(l,r),Te.currentNode=this.el.content,n===2||n===3){let e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;(i=Te.nextNode())!==null&&c.length<s;){if(i.nodeType===1){if(i.hasAttributes())for(let e of i.getAttributeNames())if(e.endsWith(ce)){let t=u[o++],n=i.getAttribute(e).split(le),r=/([.?@])?(.*)/.exec(t);c.push({type:1,index:a,name:r[2],strings:n,ctor:r[1]===`.`?Ne:r[1]===`?`?Pe:r[1]===`@`?Fe:Me}),i.removeAttribute(e)}else e.startsWith(le)&&(c.push({type:6,index:a}),i.removeAttribute(e));if(be.test(i.tagName)){let e=i.textContent.split(le),t=e.length-1;if(t>0){i.textContent=oe?oe.emptyScript:``;for(let n=0;n<t;n++)i.append(e[n],de()),Te.nextNode(),c.push({type:2,index:++a});i.append(e[t],de())}}}else if(i.nodeType===8)if(i.data===A)c.push({type:2,index:a});else{let e=-1;for(;(e=i.data.indexOf(le,e+1))!==-1;)c.push({type:7,index:a}),e+=le.length-1}a++}}static createElement(e,t){let n=j.createElement(`template`);return n.innerHTML=e,n}};function ke(e,t,n=e,r){if(t===Ce)return t;let i=r===void 0?n._$Cl:n._$Co?.[r],a=fe(t)?void 0:t._$litDirective$;return i?.constructor!==a&&(i?._$AO?.(!1),a===void 0?i=void 0:(i=new a(e),i._$AT(e,n,r)),r===void 0?n._$Cl=i:(n._$Co??=[])[r]=i),i!==void 0&&(t=ke(e,i._$AS(e,t.values),i,r)),t}var Ae=class{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){let{el:{content:t},parts:n}=this._$AD,r=(e?.creationScope??j).importNode(t,!0);Te.currentNode=r;let i=Te.nextNode(),a=0,o=0,s=n[0];for(;s!==void 0;){if(a===s.index){let t;s.type===2?t=new je(i,i.nextSibling,this,e):s.type===1?t=new s.ctor(i,s.name,s.strings,this,e):s.type===6&&(t=new Ie(i,this,e)),this._$AV.push(t),s=n[++o]}a!==s?.index&&(i=Te.nextNode(),a++)}return Te.currentNode=j,r}p(e){let t=0;for(let n of this._$AV)n!==void 0&&(n.strings===void 0?n._$AI(e[t]):(n._$AI(e,n,t),t+=n.strings.length-2)),t++}},je=class e{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,n,r){this.type=2,this._$AH=F,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=n,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode,t=this._$AM;return t!==void 0&&e?.nodeType===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=ke(this,e,t),fe(e)?e===F||e==null||e===``?(this._$AH!==F&&this._$AR(),this._$AH=F):e!==this._$AH&&e!==Ce&&this._(e):e._$litType$===void 0?e.nodeType===void 0?me(e)?this.k(e):this._(e):this.T(e):this.$(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==F&&fe(this._$AH)?this._$AA.nextSibling.data=e:this.T(j.createTextNode(e)),this._$AH=e}$(e){let{values:t,_$litType$:n}=e,r=typeof n==`number`?this._$AC(e):(n.el===void 0&&(n.el=Oe.createElement(Ee(n.h,n.h[0]),this.options)),n);if(this._$AH?._$AD===r)this._$AH.p(t);else{let e=new Ae(r,this),n=e.u(this.options);e.p(t),this.T(n),this._$AH=e}}_$AC(e){let t=we.get(e.strings);return t===void 0&&we.set(e.strings,t=new Oe(e)),t}k(t){pe(this._$AH)||(this._$AH=[],this._$AR());let n=this._$AH,r,i=0;for(let a of t)i===n.length?n.push(r=new e(this.O(de()),this.O(de()),this,this.options)):r=n[i],r._$AI(a),i++;i<n.length&&(this._$AR(r&&r._$AB.nextSibling,i),n.length=i)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e!==this._$AB;){let t=ae(e).nextSibling;ae(e).remove(),e=t}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}},Me=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,n,r,i){this.type=1,this._$AH=F,this._$AN=void 0,this.element=e,this.name=t,this._$AM=r,this.options=i,n.length>2||n[0]!==``||n[1]!==``?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=F}_$AI(e,t=this,n,r){let i=this.strings,a=!1;if(i===void 0)e=ke(this,e,t,0),a=!fe(e)||e!==this._$AH&&e!==Ce,a&&(this._$AH=e);else{let r=e,o,s;for(e=i[0],o=0;o<i.length-1;o++)s=ke(this,r[n+o],t,o),s===Ce&&(s=this._$AH[o]),a||=!fe(s)||s!==this._$AH[o],s===F?e=F:e!==F&&(e+=(s??``)+i[o+1]),this._$AH[o]=s}a&&!r&&this.j(e)}j(e){e===F?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??``)}},Ne=class extends Me{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===F?void 0:e}},Pe=class extends Me{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==F)}},Fe=class extends Me{constructor(e,t,n,r,i){super(e,t,n,r,i),this.type=5}_$AI(e,t=this){if((e=ke(this,e,t,0)??F)===Ce)return;let n=this._$AH,r=e===F&&n!==F||e.capture!==n.capture||e.once!==n.once||e.passive!==n.passive,i=e!==F&&(n===F||r);r&&this.element.removeEventListener(this.name,this,n),i&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH==`function`?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}},Ie=class{constructor(e,t,n){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(e){ke(this,e)}},Le={M:ce,P:le,A,C:1,L:De,R:Ae,D:me,V:ke,I:je,H:Me,N:Pe,U:Fe,B:Ne,F:Ie},Re=k.litHtmlPolyfillSupport;Re?.(Oe,je),(k.litHtmlVersions??=[]).push(`3.3.3`);var ze=(e,t,n)=>{let r=n?.renderBefore??t,i=r._$litPart$;if(i===void 0){let e=n?.renderBefore??null;r._$litPart$=i=new je(t.insertBefore(de(),e),e,void 0,n??{})}return i._$AI(e),i},Be=globalThis,Ve=class extends ie{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){let t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=ze(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return Ce}};Ve._$litElement$=!0,Ve.finalized=!0,Be.litElementHydrateSupport?.({LitElement:Ve});var He=Be.litElementPolyfillSupport;He?.({LitElement:Ve}),(Be.litElementVersions??=[]).push(`4.2.2`);var Ue={attribute:!0,type:String,converter:E,reflect:!1,hasChanged:D},We=(e=Ue,t,n)=>{let{kind:r,metadata:i}=n,a=globalThis.litPropertyMetadata.get(i);if(a===void 0&&globalThis.litPropertyMetadata.set(i,a=new Map),r===`setter`&&((e=Object.create(e)).wrapped=!0),a.set(n.name,e),r===`accessor`){let{name:r}=n;return{set(n){let i=t.get.call(this);t.set.call(this,n),this.requestUpdate(r,i,e,!0,n)},init(t){return t!==void 0&&this.C(r,void 0,e,t),t}}}if(r===`setter`){let{name:r}=n;return function(n){let i=this[r];t.call(this,n),this.requestUpdate(r,i,e,!0,n)}}throw Error(`Unsupported decorator location: `+r)};function Ge(e){return(t,n)=>typeof n==`object`?We(e,t,n):((e,t,n)=>{let r=t.hasOwnProperty(n);return t.constructor.createProperty(n,e),r?Object.getOwnPropertyDescriptor(t,n):void 0})(e,t,n)}function I(e){return Ge({...e,state:!0,attribute:!1})}var Ke=(e,t,n)=>(n.configurable=!0,n.enumerable=!0,Reflect.decorate&&typeof t!=`object`&&Object.defineProperty(e,t,n),n);function qe(e,t){return(n,r,i)=>{let a=t=>t.renderRoot?.querySelector(e)??null;if(t){let{get:e,set:t}=typeof r==`object`?n:i??(()=>{let e=Symbol();return{get(){return this[e]},set(t){this[e]=t}}})();return Ke(n,r,{get(){let n=e.call(this);return n===void 0&&(n=a(this),(n!==null||this.hasUpdated)&&t.call(this,n)),n}})}return Ke(n,r,{get(){return a(this)}})}}function Je(e){return!!e&&typeof e.getItem==`function`&&typeof e.setItem==`function`}function Ye(e){let t=Object.getOwnPropertyDescriptor(globalThis,e);if(typeof process<`u`&&{}.VITEST)return t&&!t.get&&Je(t.value)?t.value:null;if(typeof window<`u`&&typeof document<`u`)try{let t=window[e];return Je(t)?t:null}catch{return null}return t&&!t.get&&Je(t.value)?t.value:null}function Xe(){return Ye(`localStorage`)}function Ze(){return Ye(`sessionStorage`)}var Qe={common:{health:`Health`,ok:`OK`,yes:`Yes`,no:`No`,active:`Active`,loading:`Loading…`,refreshing:`Refreshing…`,online:`Online`,offline:`Offline`,connect:`Connect`,connected:`Connected`,refresh:`Refresh`,reload:`Reload`,reset:`Reset`,probe:`Probe`,call:`Call`,confirm:`Confirm`,cancel:`Cancel`,next:`Next`,back:`Back`,create:`Create`,copy:`Copy`,copied:`Copied!`,copyCode:`Copy code`,delete:`Delete`,dismiss:`Dismiss`,unselect:`Unselect`,enabled:`Enabled`,disabled:`Disabled`,none:`none`,na:`n/a`,never:`never`,configured:`Configured`,running:`Running`,linked:`Linked`,mode:`Mode`,system:`System`,light:`Light`,dark:`Dark`,baseUrl:`Base URL`,lastStart:`Last start`,lastProbe:`Last probe`,lastInbound:`Last inbound`,lastConnect:`Last connect`,lastMessage:`Last message`,authAge:`Auth age`,credential:`Credential`,audience:`Audience`,publicKey:`Public Key`,probeOk:`Probe ok`,probeFailed:`Probe failed`,reloadConfig:`Reload Config`,loadConfig:`Load config`,loadApprovals:`Load approvals`,settingsSections:`Settings sections`,version:`Version`,docs:`Docs`,theme:`Theme`,colorMode:`Color mode`,colorModeOption:`Color mode: {mode}`,resources:`Resources`,search:`Search`,save:`Save`,saving:`Saving…`,saveAndPublish:`Save & Publish`,importing:`Importing…`,importFromRelays:`Import from Relays`,showAdvanced:`Show Advanced`,hideAdvanced:`Hide Advanced`,unsavedChanges:`You have unsaved changes`,secondsAgo:`{count}s ago`,working:`Working…`,showQr:`Show QR`,relink:`Relink`,waitForScan:`Wait for scan`,logout:`Logout`},channels:{health:{title:`Channel health`,subtitle:`Channel status snapshots from the gateway.`,noSnapshotYet:`No snapshot yet.`},generic:{subtitle:`Channel status and configuration.`},gatewayUrlConfirmation:{title:`Change Gateway URL`,subtitle:`This will reconnect to a different gateway server`,warning:`Only confirm if you trust this URL. Malicious URLs can compromise your system.`},nostr:{profile:`Profile`,editProfile:`Edit Profile`,profilePicture:`Profile picture`,noProfile:`No profile set.`,noProfileHint:`Click "Edit Profile" to add your name, bio, and avatar.`,name:`Name`,displayName:`Display Name`,about:`About`,advanced:`Advanced`,profilePicturePreview:`Profile picture preview`,account:`Account`,username:`Username`,usernameHelp:`Short username (e.g., satoshi)`,bio:`Bio`,bioPlaceholder:`Tell people about yourself...`,bioHelp:`A brief bio or description`,displayNameHelp:`Your full display name`,avatarUrl:`Avatar URL`,avatarHelp:`HTTPS URL to your profile picture`,bannerUrl:`Banner URL`,bannerHelp:`HTTPS URL to a banner image`,website:`Website`,websiteHelp:`Your personal website`,nip05Identifier:`NIP-05 Identifier`,nip05Help:`Verifiable identifier (e.g., you@domain.com)`,lightningAddress:`Lightning Address`,lightningHelp:`Lightning address for tips (LUD-16)`}},lazyView:{loadingTitle:`Loading panel`,errorTitle:`Panel failed to load`,errorSubtitle:`Reload the page to load the latest Control UI bundle, or retry if the network request failed.`,retry:`Retry`,unknownError:`Unknown module load error.`},nodes:{binding:{loadConfigHint:`Load config to edit bindings.`,formModeHint:`Switch the Config tab to Form mode to edit bindings here.`,execNodeBinding:`Exec node binding`,execNodeBindingSubtitle:`Pin agents to a specific node when using exec host=node.`,defaultBinding:`Default binding`,defaultBindingHint:`Used when agents do not override a node binding.`,node:`Node`}},instances:{title:`Connected Instances`,subtitle:`Presence beacons from the gateway and clients.`,showHosts:`Show hosts and IPs`,hideHosts:`Hide hosts and IPs`,toggleHostVisibility:`Toggle host visibility`,noInstances:`No instances reported yet.`,lastInput:`Last input {time}`,reason:`Reason {reason}`},sessionsView:{title:`Sessions`,subtitle:`Active session keys and per-session overrides.`,store:`Store: {path}`,active:`Updated within`,limit:`Limit`,filters:`Filters`,showFilters:`Show filters`,hideFilters:`Hide filters`,sourceFilters:`Session source filters`,global:`Global`,unknown:`Unknown`,showArchived:`Show archived`,activeTooltip:`Loads sessions updated in the last {count} minutes.`,limitTooltip:`Max sessions to load.`,globalTooltip:`Include global sessions.`,unknownTooltip:`Include unknown sessions.`,showArchivedTooltip:`Include archived sessions.`,minutesPlaceholder:`min`,searchPlaceholder:`Filter by key, agent, label, kind…`,selected:`{count} selected`,deleteSelected:`Delete`,selectAllOnPage:`Select all on page`,selectSession:`Select session`,optionalPlaceholder:`(optional)`,key:`Key`,label:`Label`,kind:`Kind`,updated:`Updated`,tokens:`Tokens`,compaction:`Compaction`,thinking:`Thinking`,fast:`Fast`,verbose:`Verbose`,reasoning:`Reasoning`,noSessions:`No sessions found.`,noSessionsMatchFilters:`No sessions match your filters.`,showAll:`Show all`,inherit:`inherit`,defaultOption:`Default ({value})`,offExplicit:`off (explicit)`,on:`on`,off:`off`,full:`full`,stream:`stream`,customOption:`{value} (custom)`,manual:`manual`,autoThreshold:`auto-threshold`,overflowRetry:`overflow retry`,timeoutRetry:`timeout retry`,tokenRange:`{before} to {after} tokens`,tokensBefore:`{count} tokens before`,tokenDeltaUnavailable:`token delta unavailable`,checkpoints:`{count} Checkpoints`,checkpoint:`{count} Checkpoint`,showSessionDetails:`Show session details for {count}`,hideSessionDetails:`Hide session details for {count}`,sessionDetails:`Session details`,compactionHistory:`Compaction history`,status:`Status`,statusLive:`Live`,statusIdle:`Idle`,statusUnknown:`Unknown`,statusRunning:`Running`,statusDone:`Done`,statusFailed:`Failed`,statusKilled:`Killed`,statusTimeout:`Timed out`,model:`Model`,provider:`Provider`,runtime:`Runtime`,surface:`Surface`,subject:`Subject`,room:`Room`,space:`Space`,sessionId:`Session ID`,activeRun:`Active run`,archived:`Archived`,loadingCheckpoints:`Loading checkpoints…`,noCheckpoints:`No compaction checkpoints recorded for this session.`,noSummary:`No summary captured.`,branchFromCheckpoint:`Branch from checkpoint`,restoreCheckpoint:`Restore checkpoint`},agents:{noAgents:`No agents`,copyId:`Copy ID`,copyIdTitle:`Copy agent ID to clipboard`,default:`Default`,setDefault:`Set Default`,alreadyDefaultTitle:`Already the default agent`,setDefaultTitle:`Set as the default agent`,selectTitle:`Select an agent`,selectSubtitle:`Pick an agent to inspect its workspace and tools.`,tabs:{overview:`Overview`,files:`Files`,tools:`Tools`,skills:`Skills`,channels:`Channels`,cronJobs:`Cron Jobs`},context:{title:`Agent Context`,workspace:`Workspace`,openFilesTab:`Open Files tab`,primaryModel:`Primary Model`,runtime:`Runtime`,identityName:`Identity Name`,identityAvatar:`Identity Avatar`,skillsFilter:`Skills Filter`,default:`Default`,configurationSubtitle:`Workspace, identity, and model configuration.`,schedulingSubtitle:`Workspace and scheduling targets.`},channels:{title:`Channels`,subtitle:`Gateway-wide channel status snapshot.`,lastRefresh:`Last refresh: {time}`,loadHint:`Load channels to see live status.`,empty:`No channels found.`,connectedCount:`{connected}/{total} connected`,noAccounts:`no accounts`,configuredCount:`{count} configured`,notConfigured:`not configured`,enabledCount:`{count} enabled`,setupGuide:`Setup guide`},cronPanel:{schedulerTitle:`Scheduler`,schedulerSubtitle:`Gateway cron status.`,jobs:`Jobs`,nextWake:`Next wake`,agentJobsTitle:`Agent Cron Jobs`,agentJobsSubtitle:`Scheduled jobs targeting this agent.`,noJobs:`No jobs assigned.`,runNow:`Run Now`},files:{emptyDraft:`Empty draft`,minRead:`{count} min read`,markdownPreview:`Markdown Preview`,extensionPreview:`{ext} Preview`,preview:`Preview`,expandPreview:`Expand preview`,collapsePreview:`Collapse preview`,editFile:`Edit file`,closePreview:`Close preview`,coreFilesTitle:`Core Files`,coreFilesSubtitle:`Bootstrap persona, identity, and tool guidance.`,workspace:`Workspace`,loadHint:`Load the agent workspace files to edit core instructions.`,empty:`No files found.`,missing:`missing`,selectFile:`Select a file to edit.`,previewMarkdownTitle:`Preview rendered markdown`,willCreateOnSave:`Will Create on Save`,liveDraftPreview:`Live Draft Preview`,savedPreview:`Saved Preview`,updated:`Updated {time}`,notCreatedYet:`Not Created Yet`,updatedUnknown:`Updated Unknown`,missingHint:`This file is missing. Saving will create it in the agent workspace.`,content:`Content`,words:`{count} words`,lines:`lines`}},debug:{snapshotsTitle:`Snapshots`,snapshotsSubtitle:`Status, health, and heartbeat data.`,status:`Status`,health:`Health`,lastHeartbeat:`Last heartbeat`,security:{audit:`Security audit`,critical:`{count} critical`,warnings:`{count} warnings`,noCriticalIssues:`No critical issues`,info:`{count} info`,runPrefix:`Run`,runSuffix:`for details.`},manualRpcTitle:`Manual RPC`,manualRpcSubtitle:`Send a raw gateway method with JSON params.`,method:`Method`,selectMethod:`Select a method…`,paramsJson:`Params (JSON)`,modelsTitle:`Models`,modelsSubtitle:`Catalog from models.list.`,eventLogTitle:`Event Log`,eventLogSubtitle:`Latest gateway events.`,noEvents:`No events yet.`},quickSettings:{security:{browserEnabled:`Browser enabled`,toolProfile:`Tool profile`}},execApproval:{expiresIn:`expires in {time}`,expired:`expired`,execApprovalNeeded:`Exec approval needed`,pluginApprovalNeeded:`Plugin approval needed`,pending:`{count} pending`,allowOnce:`Allow once`,alwaysAllow:`Always allow`,deny:`Deny`,labels:{host:`Host`,agent:`Agent`,session:`Session`,cwd:`CWD`,resolved:`Resolved`,security:`Security`,ask:`Ask`,severity:`Severity`,plugin:`Plugin`}},agentTools:{connectedSource:`Connected: {id}`,connected:`Connected`,channelSource:`Channel: {id}`,channel:`Channel`,builtIn:`Built-in`},nav:{chat:`Chat`,control:`Control`,agent:`Agent`,settings:`Settings`,expand:`Expand sidebar`,collapse:`Collapse sidebar`,resize:`Resize sidebar`},tabs:{agents:`Agents`,overview:`Overview`,channels:`Channels`,instances:`Instances`,sessions:`Sessions`,usage:`Usage`,cron:`Cron Jobs`,skills:`Skills`,nodes:`Nodes`,chat:`Chat`,config:`Config`,communications:`Communications`,appearance:`Appearance`,automation:`Automation`,infrastructure:`Infrastructure`,aiAgents:`AI & Agents`,debug:`Debug`,logs:`Logs`,dreams:`Dreaming`},subtitles:{agents:`Workspaces, tools, identities.`,overview:`Status, entry points, health.`,channels:`Channels and settings.`,instances:`Connected clients and nodes.`,sessions:`Active sessions and defaults.`,usage:`API usage and costs.`,cron:`Wakeups and recurring runs.`,skills:`Skills and API keys.`,nodes:`Paired devices and commands.`,chat:`Gateway chat for quick interventions.`,config:`Edit daocore.json.`,communications:`Channels, messages, and audio settings.`,appearance:`Theme, UI, and setup wizard settings.`,automation:`Commands, hooks, cron, and plugins.`,infrastructure:`Gateway, web, browser, and media settings.`,aiAgents:`Agents, models, skills, tools, memory, session.`,debug:`Snapshots, events, RPC.`,logs:`Live gateway logs.`,dreams:`Memory dreaming, consolidation, and reflection.`},overview:{access:{title:`Gateway Access`,subtitle:`Where the dashboard connects and how it authenticates.`,wsUrl:`WebSocket URL`,token:`Gateway Token`,password:`Password (not stored)`,passwordPlaceholder:`system or shared password`,sessionKey:`Default Session Key`,language:`Language`,connectHint:`Click Connect to apply connection changes.`,trustedProxy:`Authenticated via trusted proxy.`,showToken:`Show token`,hideToken:`Hide token`,toggleTokenVisibility:`Toggle token visibility`,showPassword:`Show password`,hidePassword:`Hide password`,togglePasswordVisibility:`Toggle password visibility`},snapshot:{title:`Snapshot`,subtitle:`Latest gateway handshake information.`,status:`Status`,uptime:`Uptime`,tickInterval:`Tick Interval`,lastChannelsRefresh:`Last Channels Refresh`,channelsHint:`Use Channels to link WhatsApp, Telegram, Discord, Signal, or iMessage.`},stats:{instances:`Instances`,instancesHint:`Presence beacons in the last 5 minutes.`,sessions:`Sessions`,sessionsHint:`Recent session keys tracked by the gateway.`,cron:`Cron`,cronNext:`Next wake {time}`},notes:{title:`Notes`,subtitle:`Quick reminders for remote control setups.`,tailscaleTitle:`Tailscale serve`,tailscaleText:`Prefer serve mode to keep the gateway on loopback with tailnet auth.`,sessionTitle:`Session hygiene`,sessionText:`Use /new or sessions.patch to reset context.`,cronTitle:`Cron reminders`,cronText:`Use isolated sessions for recurring runs.`},auth:{required:`This gateway requires auth. Add a token or password, then click Connect.`,failed:`Auth failed. Re-copy a tokenized URL with {command}, or update the token, then click Connect.`},pairing:{hint:`This device needs pairing approval from the gateway host.`,scopeUpgradeTitle:`Scope upgrade pending approval.`,scopeUpgradeSummary:`This device is already paired, but the requested wider scope is waiting for approval.`,roleUpgradeTitle:`Role upgrade pending approval.`,roleUpgradeSummary:`This device is already paired, but the requested role change is waiting for approval.`,metadataUpgradeTitle:`Device metadata change pending approval.`,metadataUpgradeSummary:`This device is already paired, but the metadata change is waiting for approval.`,mobileHint:`On mobile? Copy the full URL (including #token=...) from daocore dashboard --no-open on your desktop.`,docsTitle:`Device pairing docs (opens in new tab)`,docsLink:`Docs: Device pairing`},insecure:{hint:`This page is HTTP, so the browser blocks device identity. Use HTTPS (Tailscale Serve) or open {url} on the gateway host.`,stayHttp:`If you must stay on HTTP, set {config} (token-only).`},connection:{title:`How to connect`,step1:`Start the gateway on your host machine:`,step2:`Get a tokenized dashboard URL:`,step3:`Paste the WebSocket URL and token above, or open the tokenized URL directly.`,step4:`Or generate a reusable token:`,docsHint:`For remote access, Tailscale Serve is recommended. `,docsLink:`Read the docs →`,authDocsTitle:`Control UI auth docs (opens in new tab)`,authDocsLink:`Docs: Control UI auth`,tailscaleDocsTitle:`Tailscale Serve docs (opens in new tab)`,tailscaleDocsLink:`Docs: Tailscale Serve`,insecureHttpDocsTitle:`Insecure HTTP docs (opens in new tab)`,insecureHttpDocsLink:`Docs: Insecure HTTP`,copyCommand:`Copy command`,copyCommandAria:`Copy command: {command}`},cards:{cost:`Cost`,skills:`Skills`,recentSessions:`Recent Sessions`,modelAuth:`Model Auth`,modelAuthOk:`{count} ok`,modelAuthExpired:`{count} expired`,modelAuthExpiring:`{count} expiring`,modelAuthProviders:`{count} providers`,modelAuthUsageLeft:`{pct}% left`,modelAuthExpiresIn:`expires {when}`,modelAuthAttentionExpiredTitle:`Model auth expired`,modelAuthAttentionExpiringTitle:`Model auth expiring soon`,modelAuthAttentionExpiredDesc:`{providers} — re-authenticate with daocore models auth`,modelAuthAttentionExpiringEntry:`{provider} ({when})`},attention:{title:`Attention`},eventLog:{title:`Event Log`},logTail:{title:`Gateway Logs`},quickActions:{newSession:`New Session`,automation:`Automation`,refreshAll:`Refresh All`,terminal:`Terminal`},palette:{placeholder:`Type a command…`,noResults:`No results`,categories:{search:`Search`,navigation:`Navigation`,skills:`Skills`},items:{overview:`Overview`,sessions:`Sessions`,scheduled:`Scheduled`,skills:`Skills`,settings:`Settings`,agents:`Agents`,shellCommand:`Shell Command`,debugMode:`Debug Mode`},descriptions:{shellCommand:`Run shell`,debugMode:`Toggle debug`},footer:{navigate:`navigate`,select:`select`,close:`close`}}},dreaming:{tabs:{scene:`Scene`,diary:`Diary`,advanced:`Advanced`},header:{refresh:`Refresh`,refreshing:`Refreshing…`,on:`Dreaming On`,off:`Dreaming Off`},restartConfirmation:{title:`Restart Gateway to Apply Change`,subtitle:`Changing Dreaming mode restarts the gateway.`,warning:`This action will restart the Gateway and may temporarily interrupt chats, automations, and connected channels.`,confirm:`Confirm Restart`,restarting:`Restarting…`,failed:`Could not apply change. Check your connection and try again.`},status:{active:`Dreaming Active`,idle:`Dreaming Idle`,promotedSuffix:`promoted`,nextSweepPrefix:`next sweep`},scene:{backfill:`Backfill`,dedupeDiary:`Dedupe Diary`,reset:`Reset`,clearGrounded:`Clear Replayed`,repairCache:`Repair Dream Cache`,working:`Working…`},phase:{light:`Light`,deep:`Deep`,rem:`Rem`,off:`off`},advanced:{eyebrow:`Review`,title:`Daily Log Review`,description:`Review what came from the daily log, what is waiting for promotion, and what was promoted recently.`,summaryFromDailyLog:`from daily log`,summaryWaiting:`waiting`,summaryPromotedToday:`promoted today`,stagedTitle:`From the Daily Log`,stagedDescription:`Replay candidates pulled from older daily log entries.`,shortTermTitle:`Waiting for Promotion`,shortTermDescription:`Current short-term candidates waiting to graduate into real memory.`,sortRecent:`Most recent`,sortSignals:`Strongest support`,originDailyLog:`replayed`,originLive:`live`,originMixed:`mixed`,promotedTitle:`Recent Promotions`,promotedDescription:`Items that already made it through promotion.`,emptyGrounded:`No staged grounded replay entries right now.`,emptyShortTerm:`No short-term entries to inspect.`,emptyPromoted:`No recent promotions to inspect.`,updatedPrefix:`updated`},stats:{shortTerm:`Short-term`,grounded:`Grounded`,signals:`Signals`,promoted:`Promoted`,phaseHits:`Phase Hits`},trace:{shortTerm:`Short-term`,grounded:`Grounded`,signals:`Signals`,promoted:`Promoted`,groundedLed:`grounded-led`,emptyShortTerm:`No active short-term items.`,emptyGrounded:`No staged grounded items.`,emptySignals:`No active signals.`,emptyPromoted:`Nothing promoted yet today.`},diary:{title:`Dream Diary`,noDreamsYet:`No dreams yet`,noDreamsHint:`Dreams will appear here after the first dreaming cycle runs.`,waitingTitle:`The diary is waiting`,waitingHint:`Narrative entries will appear after the next dreaming cycle.`,older:`Older`,newer:`Newer`,reload:`Reload`,reloading:`Reloading…`},phrases:{consolidatingMemories:`consolidating memories…`,tidyingKnowledgeGraph:`tidying the knowledge graph…`,replayingConversations:`replaying today's conversations…`,weavingShortTerm:`weaving short-term into long-term…`,defragmentingMindPalace:`defragmenting the mind palace…`,filingLooseThoughts:`filing away loose thoughts…`,connectingDots:`connecting distant dots…`,compostingContext:`composting old context windows…`,alphabetizingSubconscious:`alphabetizing the subconscious…`,promotingHunches:`promoting promising hunches…`,forgettingNoise:`forgetting what doesn't matter…`,dreamingEmbeddings:`dreaming in embeddings…`,reorganizingAttic:`reorganizing the memory attic…`,indexingDay:`softly indexing the day…`,nurturingInsights:`nurturing fledgling insights…`,simmeringIdeas:`simmering half-formed ideas…`,whisperingVectorStore:`whispering to the vector store…`}},usage:{common:{emptyValue:`—`,unknown:`unknown`},loading:{title:`Usage Overview`,badge:`Loading`},metrics:{tokens:`Tokens`,cost:`Cost`,session:`session`,sessions:`sessions`},presets:{today:`Today`,last7d:`7d`,last30d:`30d`,last90d:`90d`,last1y:`1y`,all:`All`},scope:{instance:`Current instance`,instanceHint:`Show only the active session id for each logical session.`,family:`Historical lineage`,familyHint:`Roll up known rotated transcript-backed session ids.`,familyIncluded:`Historical lineage includes {count} session instances.`},filters:{title:`Filters`,to:`to`,startDate:`Start date`,endDate:`End date`,timeZone:`Time zone`,timeZoneLocal:`Local`,timeZoneUtc:`UTC`,pin:`Pin`,pinned:`Pinned`,unpin:`Unpin filters`,selectAll:`Select All`,clear:`Clear`,clearAll:`Clear All`,remove:`Remove filter`,all:`All`,days:`Days`,hours:`Hours`,session:`Session`,agent:`Agent`,channel:`Channel`,provider:`Provider`,model:`Model`,tool:`Tool`,daysCount:`{count} days`,hoursCount:`{count} hours`,sessionsCount:`{count} sessions`},query:{placeholder:`Filter sessions (e.g. key:agent:main:cron* model:gpt-4o has:errors minTokens:2000)`,apply:`Filter (client-side)`,matching:`{shown} of {total} sessions match`,inRange:`{total} sessions in range`,tip:`Tip: use filters or click bars to refine days.`},export:{label:`Export`,sessionsCsv:`Sessions CSV`,dailyCsv:`Daily CSV`,json:`JSON`},cacheStatus:{warning:`Usage cache is rebuilding in the background. Displayed totals may be stale.`,title:`{status}: {pending} pending, {stale} stale, {cached} cached`,status:{refreshing:`refreshing`,stale:`stale`,partial:`partial`}},empty:{title:`Start with a date range`,subtitle:`Load usage data to compare costs, inspect sessions, and drill into timelines without leaving the dashboard.`,hint:`Select a date range and click Refresh to load usage.`,noData:`No data`,featureOverview:`Overview cards`,featureSessions:`Session ranking`,featureTimeline:`Timeline drilldown`},daily:{title:`Daily Usage`,total:`Total`,byType:`By Type`,tokensTitle:`Daily Token Usage`,costTitle:`Daily Cost`},breakdown:{output:`Output`,input:`Input`,cacheWrite:`Cache Write`,cacheRead:`Cache Read`,total:`Total`,tokensByType:`Tokens by Type`,costByType:`Cost by Type`},overview:{title:`Usage Overview`,messages:`Messages`,messagesHint:`Total user and assistant messages in range.`,messagesAbbrev:`msgs`,user:`user`,assistant:`assistant`,toolCalls:`Tool Calls`,toolCallsHint:`Total tool call count across sessions.`,toolsUsed:`tools used`,errors:`Errors`,errorsHint:`Total message and tool errors in range.`,toolResults:`tool results`,avgTokens:`Avg Tokens / Msg`,avgTokensHint:`Average tokens per message in this range.`,avgCost:`Avg Cost / Msg`,avgCostHint:`Average cost per message when providers report costs.`,avgCostHintMissing:`Average cost per message when providers report costs. Cost data is missing for some or all sessions in this range.`,acrossMessages:`Across {count} messages`,sessions:`Sessions`,sessionsHint:`Distinct sessions in the range.`,sessionsInRange:`of {count} in range`,throughput:`Throughput`,throughputHint:`Throughput shows tokens per minute over active time. Higher is better.`,tokensPerMinute:`tok/min`,perMinute:`/ min`,errorRate:`Error Rate`,errorHint:`Error rate = errors / total messages. Lower is better.`,avgSession:`avg session`,cacheHitRate:`Cache Hit Rate`,cacheHint:`Cache hit rate = cache read / (input + cache read + cache write). Higher is better.`,cached:`cached`,prompt:`prompt`,calls:`calls`,topModels:`Top Models`,topProviders:`Top Providers`,topTools:`Top Tools`,topAgents:`Top Agents`,topChannels:`Top Channels`,peakErrorDays:`Peak Error Days`,peakErrorHours:`Peak Error Hours`,noModelData:`No model data`,noProviderData:`No provider data`,noToolCalls:`No tool calls`,noAgentData:`No agent data`,noChannelData:`No channel data`,noErrorData:`No error data`},sessions:{title:`Sessions`,shown:`{count} shown`,total:`{count} total`,avg:`avg`,all:`All`,recent:`Recently viewed`,recentShort:`Recent`,sort:`Sort`,ascending:`Ascending`,descending:`Descending`,clearSelection:`Clear Selection`,noRecent:`No recent sessions`,noneInRange:`No sessions in range`,more:`+{count} more`,selected:`Selected ({count})`,copy:`Copy`,copyName:`Copy session name`,limitReached:`Showing first 1,000 sessions. Narrow date range for complete results.`},details:{noUsageData:`No usage data for this session.`,duration:`Duration`,modelMix:`Model Mix`,filtered:`(filtered)`,close:`Close session details`,noTimeline:`No timeline data`,noDataInRange:`No data in range`,usageOverTime:`Usage Over Time`,reset:`Reset`,perTurn:`Per Turn`,cumulative:`Cumulative`,turnRange:`Turns {start}–{end} of {total}`,assistantOutputTokens:`Assistant output tokens`,userToolInputTokens:`User + tool input tokens`,tokensWrittenToCache:`Tokens written to cache`,tokensReadFromCache:`Tokens read from cache`,noContextData:`No context data`,systemPromptBreakdown:`System Prompt Breakdown`,collapse:`Collapse`,collapseAll:`Collapse All`,expandAll:`Expand All`,baseContextPerMessage:`Base context per message`,system:`System`,systemShort:`Sys`,skills:`Skills`,tools:`Tools`,files:`Files`,ofInput:`of input`,of:`of`,timelineFiltered:`timeline filtered`,conversation:`Conversation`,noMessages:`No messages`,tool:`Tool`,toolResult:`Tool result`,hasTools:`Has tools`,searchConversation:`Search conversation`,you:`You`,noMessagesMatch:`No messages match the filters.`},mosaic:{title:`Activity by Time`,subtitleEmpty:`Estimates require session timestamps.`,subtitle:`Estimated from session spans (first/last activity). Time zone: {zone}.`,noTimelineData:`No timeline data yet.`,dayOfWeek:`Day of Week`,midnight:`Midnight`,fourAm:`4am`,eightAm:`8am`,noon:`Noon`,fourPm:`4pm`,eightPm:`8pm`,legend:`Low → High token density`,sun:`Sun`,mon:`Mon`,tue:`Tue`,wed:`Wed`,thu:`Thu`,fri:`Fri`,sat:`Sat`}},login:{subtitle:`Gateway Dashboard`,passwordPlaceholder:`optional`,showToken:`Show token`,hideToken:`Hide token`,toggleTokenVisibility:`Toggle token visibility`,showPassword:`Show password`,hidePassword:`Hide password`,togglePasswordVisibility:`Toggle password visibility`,failure:{rawError:`Raw error`,docsAuth:`Control UI auth docs`,docsPairing:`Device pairing docs`,docsInsecure:`Insecure HTTP docs`,authRequired:{title:`Auth required`,summary:`The Gateway is reachable, but it needs a matching token or password before this browser can connect.`,stepPaste:`Paste the token from daocore dashboard --no-open or enter the configured password.`,stepGenerate:`If no token is configured, run daocore doctor --generate-gateway-token on the gateway host.`,stepConnect:`Click Connect again after updating the credential.`},authFailed:{title:`Auth did not match`,summary:`The supplied credential was rejected. The most common cause is a stale token or a token copied from another Gateway URL.`,stepDashboard:`Run daocore dashboard --no-open and open the fresh URL or paste its token.`,stepReplace:`Replace stale token/password values; do not reuse a token from another Gateway URL.`,stepMode:`Use one matching auth mode at a time: gateway token for token mode, password for password mode.`},rateLimited:{title:`Too many failed attempts`,summary:`The Gateway is temporarily limiting authentication attempts for this client.`,stepStop:`Stop retrying from this tab for a moment.`,stepWait:`Wait for the auth limiter to cool down, then reconnect with the corrected credential.`,stepCheckClients:`If this is a shared host, check other clients for repeated bad retries.`},pairing:{title:`Device pairing required`,scopeTitle:`Scope upgrade pending`,roleTitle:`Role upgrade pending`,metadataTitle:`Device refresh pending`,summary:`This browser needs one-time approval from the Gateway host before it can use the Control UI.`,upgradeSummary:`This browser is already known, but the requested access changed and needs a fresh approval.`,stepList:`Run daocore devices list on the Gateway host.`,stepApproveId:`Approve this request: daocore devices approve {requestId}.`,stepApprove:`Approve the pending browser/device request from that list.`,stepReconnect:`Reconnect after the approval completes.`},insecure:{title:`Secure browser context required`,summary:`This page is running over plain HTTP, so the browser cannot create the device identity the Gateway expects.`,stepHttps:`Use HTTPS/Tailscale Serve, or open http://127.0.0.1:18789 on the Gateway host.`,stepLocalCompat:`For local token-only compatibility, set gateway.controlUi.allowInsecureAuth: true.`,stepAvoidDisable:`Avoid disabling device auth for remote HTTP access.`},origin:{title:`Browser origin not allowed`,summary:`The Gateway rejected this page origin before accepting the Control UI connection.`,stepAllowedOrigins:`Add this browser origin to gateway.controlUi.allowedOrigins.`,stepFullOrigin:`Use full origins such as http://localhost:5173, not wildcard patterns.`,stepRestart:`Restart or reload the Gateway after changing allowed origins.`},protocol:{title:`Protocol mismatch`,summary:`The served Control UI and the running Gateway do not agree on the supported connection protocol.`,stepDashboard:`Reopen the served dashboard with daocore dashboard so the UI and Gateway come from the same install.`,stepDevUi:`If using pnpm ui:dev, rebuild or restart the dev UI against the current checkout.`,stepRestart:`Restart the Gateway after updating DaoCore so it serves the current protocol.`},network:{title:`Could not connect`,summary:`The browser could not complete the Gateway connection. Check the target and transport before retrying credentials.`,stepGateway:`Confirm the Gateway is running with daocore status or daocore gateway run.`,stepUrl:`Check the WebSocket URL and use wss:// when the Gateway is behind HTTPS/Tailscale Serve.`,stepDashboard:`Reopen the dashboard with daocore dashboard --no-open to recopy the current URL and auth details.`}}},chat:{disconnected:`Disconnected from gateway.`,refreshTitle:`Refresh chat data`,settings:`Chat settings`,thinkingToggle:`Toggle assistant thinking/working output`,toolCallsToggle:`Toggle tool calls and tool results`,autoScrollMode:`Auto-scroll mode`,autoScrollAlways:`Always`,autoScrollNearBottom:`Near bottom`,autoScrollOff:`Off`,focusToggle:`Toggle focus mode (hide sidebar + page header)`,hideCronSessions:`Hide cron sessions`,showCronSessions:`Show cron sessions`,showCronSessionsHidden:`Show cron sessions ({count} hidden)`,onboardingDisabled:`Disabled during setup`,gatewayStatus:`Gateway status: {status}`,commandPaletteTitle:`Search or jump to… (⌘K)`,openCommandPalette:`Open command palette`,docsOpensInNewTab:`{label} (opens in new tab)`,updateAvailable:`Update available:`,runningVersion:`running V{version}`,updating:`Updating…`,updateNow:`Update now`,dismissUpdateBanner:`Dismiss update banner`,switchedSession:`Switched to {session}`,welcome:{ready:`Ready to chat`,hintBeforeShortcut:`Type a message below ·`,hintAfterShortcut:`for commands`,suggestions:{whatCanYouDo:`What can you do?`,summarizeRecentSessions:`Summarize my recent sessions`,configureChannel:`Help me configure a channel`,checkSystemHealth:`Check system health`}},runControls:{newSession:`New session`,export:`Export`,exportChat:`Export chat`,queue:`Queue`,queueMessage:`Queue message`,stop:`Stop`,stopGenerating:`Stop generating`,send:`Send`,sendMessage:`Send message`},composer:{placeholder:`Message {name} (Enter to send)`,placeholderWithAttachments:`Add a message or paste more images...`,placeholderDisconnected:`Connect to the gateway to start chatting...`,attachFile:`Attach file`,startTalk:`Start Talk`,stillListening:`Still listening`,talkTranscript:`Talk transcript`,stopTalk:`Stop Talk`},selectors:{agentFilter:`Filter sessions by agent`,session:`Chat session`,sessionSearch:`Search sessions`,clearSessionSearch:`Clear session search`,loadMoreSessions:`Load more sessions`,model:`Chat model`,thinkingLevel:`Chat thinking level`}},languages:{en:`English`,zhCN:`简体中文 (Simplified Chinese)`,zhTW:`繁體中文 (Traditional Chinese)`,ptBR:`Português (Brazilian Portuguese)`,de:`Deutsch (German)`,es:`Español (Spanish)`,jaJP:`日本語 (Japanese)`,ko:`한국어 (Korean)`,fr:`Français (French)`,ar:`العربية (Arabic)`,it:`Italiano (Italian)`,tr:`Türkçe (Turkish)`,uk:`Українська (Ukrainian)`,id:`Bahasa Indonesia (Indonesian)`,pl:`Polski (Polish)`,th:`ไทย (Thai)`,vi:`Tiếng Việt (Vietnamese)`,nl:`Nederlands (Dutch)`,fa:`فارسی (Persian)`},cron:{quickCreate:{schedules:{everyMorning:{label:`Every morning`,description:`Daily at 8:00 AM`},everyEvening:{label:`Every evening`,description:`Daily at 6:00 PM`},hourly:{label:`Hourly`,description:`Every hour`},weekdays:{label:`Weekdays`,description:`Mon–Fri at 9:00 AM`},weekly:{label:`Weekly`,description:`Every Monday at 9:00 AM`},once:{label:`Run once`,description:`One-time, delete after run`}},delivery:{notify:{label:`Notify me`,description:`Deliver results to chat`},silent:{label:`Silent`,description:`Run without notification`},isolated:{label:`Independent session`,description:`Run in its own session`}},steps:{what:`What`,when:`When`,how:`How`},defaultName:`Automation`,whatHeading:`What should it do?`,whatHint:`Describe the task in natural language. The agent will run this prompt each time.`,promptPlaceholder:`e.g., Check my inbox for urgent emails and summarize them...`,nameOptional:`Name (optional)`,namePlaceholder:`e.g., Morning inbox check`,whenHeading:`When should it run?`,whenHint:`Pick a schedule. You can fine-tune it later.`,howHeading:`How should it work?`,howHint:`Choose how results are delivered.`,title:`New Cron Job`},summary:{enabled:`Enabled`,yes:`Yes`,no:`No`,jobs:`Jobs`,nextWake:`Next wake`,refreshing:`Refreshing...`,refresh:`Refresh`},jobs:{title:`Jobs`,subtitle:`All scheduled jobs stored in the gateway.`,shownOf:`{shown} shown of {total}`,searchJobs:`Search jobs`,searchPlaceholder:`Name, description, or agent`,enabled:`Enabled`,schedule:`Schedule`,lastRun:`Last run`,all:`All`,sort:`Sort`,nextRun:`Next run`,recentlyUpdated:`Recently updated`,name:`Name`,direction:`Direction`,ascending:`Ascending`,descending:`Descending`,reset:`Reset`,emptyTitle:`No scheduled jobs yet.`,emptyHint:`Create one from a plain-language prompt; advanced fields can wait.`,emptyFilteredHint:`Clear or change filters to see scheduled jobs.`,noMatching:`No matching jobs.`,loading:`Loading...`,loadMore:`Load more jobs`},runs:{title:`Run history`,subtitleAll:`Latest runs across all jobs.`,subtitleJob:`Latest runs for {title}.`,scope:`Scope`,allJobs:`All jobs`,selectedJob:`Selected job`,searchRuns:`Search runs`,searchPlaceholder:`Summary, error, or job`,newestFirst:`Newest first`,oldestFirst:`Oldest first`,status:`Status`,delivery:`Delivery`,clear:`Clear`,allStatuses:`All statuses`,allDelivery:`All delivery`,selectJobHint:`Select a job to inspect run history.`,noMatching:`No matching runs.`,loadMore:`Load more runs`,runStatusOk:`OK`,runStatusError:`Error`,runStatusSkipped:`Skipped`,runStatusUnknown:`Unknown`,deliveryDelivered:`Delivered`,deliveryNotDelivered:`Not delivered`,deliveryUnknown:`Unknown`,deliveryNotRequested:`Not requested`},form:{editJob:`Edit Job`,newJob:`New Job`,advancedJob:`Advanced job`,updateSubtitle:`Update the selected scheduled job.`,createSubtitle:`Create a scheduled wakeup or agent run.`,required:`Required`,requiredSr:`required`,basics:`Basics`,basicsSub:`Name it, choose the assistant, and set enabled state.`,fieldName:`Name`,description:`Description`,agentId:`Agent ID`,namePlaceholder:`Morning brief`,descriptionPlaceholder:`Optional context for this job`,agentPlaceholder:`main or ops`,agentHelp:`Start typing to pick a known agent, or enter a custom one.`,schedule:`Schedule`,scheduleSub:`Control when this job runs.`,every:`Every`,at:`At`,cronOption:`Cron`,runAt:`Run at`,unit:`Unit`,minutes:`Minutes`,hours:`Hours`,days:`Days`,expression:`Expression`,expressionPlaceholder:`0 7 * * *`,everyAmountPlaceholder:`30`,timezoneOptional:`Timezone (optional)`,timezonePlaceholder:`America/Los_Angeles`,timezoneHelp:`Pick a common timezone or enter any valid IANA timezone.`,jitterHelp:`Need jitter? Use Advanced → Stagger window / Stagger unit.`,execution:`Execution`,executionSub:`Choose when to wake, and what this job should do.`,session:`Session`,main:`Main`,isolated:`Isolated`,sessionHelp:`Main posts a system event. Isolated runs a dedicated agent turn.`,wakeMode:`Wake mode`,now:`Now`,nextHeartbeat:`Next heartbeat`,wakeModeHelp:`Now triggers immediately. Next heartbeat waits for the next cycle.`,payloadKind:`What should run?`,systemEvent:`Post message to main timeline`,agentTurn:`Run assistant task (isolated)`,systemEventHelp:`Sends your text to the gateway main timeline (good for reminders/triggers).`,agentTurnHelp:`Starts an assistant run in its own session using your prompt.`,timeoutSeconds:`Timeout (seconds)`,timeoutPlaceholder:`Optional, e.g. 90`,timeoutHelp:`Optional. Leave blank to use the gateway default timeout behavior for this run.`,mainTimelineMessage:`Main timeline message`,assistantTaskPrompt:`Assistant task prompt`,deliverySection:`Delivery`,deliverySub:`Choose where run summaries are sent.`,resultDelivery:`Result delivery`,announceDefault:`Announce summary (default)`,webhookPost:`Webhook POST`,noneInternal:`None (internal)`,deliveryHelp:`Announce posts a summary to chat. None keeps execution internal.`,webhookUrl:`Webhook URL`,channel:`Channel`,webhookPlaceholder:`https://example.com/cron`,channelHelp:`Choose which connected channel receives the summary.`,webhookHelp:`Send run summaries to a webhook endpoint.`,to:`To`,toPlaceholder:`+1555... or chat id`,toHelp:`Optional recipient override (chat id, phone, or user id).`,advanced:`Advanced`,advancedHelp:`Optional overrides for delivery guarantees, schedule jitter, and model controls.`,deleteAfterRun:`Delete after run`,deleteAfterRunHelp:`Best for one-shot reminders that should auto-clean up.`,clearAgentOverride:`Clear agent override`,clearAgentHelp:`Force this job to use the gateway default assistant.`,exactTiming:`Exact timing (no stagger)`,exactTimingHelp:`Run on exact cron boundaries with no spread.`,staggerWindow:`Stagger window`,staggerUnit:`Stagger unit`,staggerPlaceholder:`30`,seconds:`Seconds`,model:`Model`,modelPlaceholder:`openai/gpt-5.2`,modelHelp:`Start typing to pick a known model, or enter a custom one.`,thinking:`Thinking`,thinkingPlaceholder:`low`,thinkingHelp:`Use a suggested level or enter a provider-specific value.`,bestEffortDelivery:`Best effort delivery`,bestEffortHelp:`Do not fail the job if delivery itself fails.`,cantAddYet:`Can't add job yet`,fillRequired:`Fill the required fields below to enable submit.`,fixFields:`Fix {count} field to continue.`,fixFieldsPlural:`Fix {count} fields to continue.`,saving:`Saving...`,saveChanges:`Save changes`,addJob:`Add job`,cancel:`Cancel`},jobList:{allJobs:`all jobs`,selectJob:`(select a job)`,enabled:`enabled`,disabled:`disabled`,edit:`Edit`,clone:`Clone`,disable:`Disable`,enable:`Enable`,run:`Run`,history:`History`,remove:`Remove`},jobDetail:{system:`System`,prompt:`Prompt`,delivery:`Delivery`,agent:`Agent`},jobState:{status:`Status`,next:`Next`,last:`Last`},runEntry:{noSummary:`No summary.`,runAt:`Run at`,openRunChat:`Open run chat`,next:`Next {rel}`,due:`Due {rel}`},errors:{nameRequired:`Name is required.`,scheduleAtInvalid:`Enter a valid date/time.`,everyAmountInvalid:`Interval must be greater than 0.`,cronExprRequired:`Cron expression is required.`,staggerAmountInvalid:`Stagger must be greater than 0.`,systemTextRequired:`System text is required.`,agentMessageRequired:`Agent message is required.`,timeoutInvalid:`If set, timeout must be greater than 0 seconds.`,webhookUrlRequired:`Webhook URL is required.`,webhookUrlInvalid:`Webhook URL must start with http:// or https://.`,invalidRunTime:`Invalid run time.`,invalidIntervalAmount:`Invalid interval amount.`,cronExprRequiredShort:`Cron expression required.`,invalidStaggerAmount:`Invalid stagger amount.`,systemEventTextRequired:`System event text required.`,agentMessageRequiredShort:`Agent message required.`,nameRequiredShort:`Name required.`}}},$e=`modulepreload`,et=function(e,t){return new URL(e,t).href},tt={},L=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}r=o(t.map(t=>{if(t=et(t,n),t in tt)return;tt[t]=!0;let r=t.endsWith(`.css`),i=r?`[rel="stylesheet"]`:``;if(n)for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}else if(document.querySelector(`link[href="${t}"]${i}`))return;let o=document.createElement(`link`);if(o.rel=r?`stylesheet`:$e,r||(o.as=`script`),o.crossOrigin=``,o.href=t,a&&o.setAttribute(`nonce`,a),document.head.appendChild(o),r)return new Promise((e,n)=>{o.addEventListener(`load`,e),o.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},nt=[`zh-CN`,`zh-TW`,`pt-BR`,`de`,`es`,`ja-JP`,`ko`,`fr`,`ar`,`it`,`tr`,`uk`,`id`,`pl`,`th`,`vi`,`nl`,`fa`],rt={"zh-CN":{exportName:`zh_CN`,loader:()=>L(()=>import(`./zh-CN-_ZlPZpIz.js`),[],import.meta.url)},"zh-TW":{exportName:`zh_TW`,loader:()=>L(()=>import(`./zh-TW-CA4YEnf2.js`),[],import.meta.url)},"pt-BR":{exportName:`pt_BR`,loader:()=>L(()=>import(`./pt-BR-DDsy5M68.js`),[],import.meta.url)},de:{exportName:`de`,loader:()=>L(()=>import(`./de-nNWCMyC9.js`),[],import.meta.url)},es:{exportName:`es`,loader:()=>L(()=>import(`./es-BcdhLNdf.js`),[],import.meta.url)},"ja-JP":{exportName:`ja_JP`,loader:()=>L(()=>import(`./ja-JP-D8RXA_04.js`),[],import.meta.url)},ko:{exportName:`ko`,loader:()=>L(()=>import(`./ko-5en8VO8w.js`),[],import.meta.url)},fr:{exportName:`fr`,loader:()=>L(()=>import(`./fr-CBqvw0rY.js`),[],import.meta.url)},ar:{exportName:`ar`,loader:()=>L(()=>import(`./ar-DmY3OKJ7.js`),[],import.meta.url)},it:{exportName:`it`,loader:()=>L(()=>import(`./it-DpT4ZVOU.js`),[],import.meta.url)},tr:{exportName:`tr`,loader:()=>L(()=>import(`./tr-DBsYZTmE.js`),[],import.meta.url)},uk:{exportName:`uk`,loader:()=>L(()=>import(`./uk-BUxHBc05.js`),[],import.meta.url)},id:{exportName:`id`,loader:()=>L(()=>import(`./id-DXES9f6X.js`),[],import.meta.url)},pl:{exportName:`pl`,loader:()=>L(()=>import(`./pl-Y8UIOEIm.js`),[],import.meta.url)},th:{exportName:`th`,loader:()=>L(()=>import(`./th-D_2DtFn6.js`),[],import.meta.url)},vi:{exportName:`vi`,loader:()=>L(()=>import(`./vi-B67Eos5b.js`),[],import.meta.url)},nl:{exportName:`nl`,loader:()=>L(()=>import(`./nl-Bb10QoRg.js`),[],import.meta.url)},fa:{exportName:`fa`,loader:()=>L(()=>import(`./fa-DbS2z7VZ.js`),[],import.meta.url)}},it=[`en`,...nt];function at(e){return e!=null&&it.includes(e)}function ot(e){return nt.includes(e)}function st(e){return e.startsWith(`zh`)?e===`zh-TW`||e===`zh-HK`?`zh-TW`:`zh-CN`:e.startsWith(`pt`)?`pt-BR`:e.startsWith(`de`)?`de`:e.startsWith(`es`)?`es`:e.startsWith(`ja`)?`ja-JP`:e.startsWith(`ko`)?`ko`:e.startsWith(`fr`)?`fr`:e.startsWith(`ar`)?`ar`:e.startsWith(`it`)?`it`:e.startsWith(`tr`)?`tr`:e.startsWith(`uk`)?`uk`:e.startsWith(`id`)?`id`:e.startsWith(`pl`)?`pl`:e.startsWith(`th`)?`th`:e.startsWith(`vi`)?`vi`:e.startsWith(`nl`)?`nl`:e.startsWith(`fa`)?`fa`:`en`}async function ct(e){if(!ot(e))return null;let t=rt[e];return(await t.loader())[t.exportName]??null}var lt=new class{constructor(){this.locale=`en`,this.translations={en:Qe},this.subscribers=new Set,this.loadLocale()}readStoredLocale(){let e=Xe();if(!e)return null;try{return e.getItem(`daocore.i18n.locale`)}catch{return null}}persistLocale(e){let t=Xe();if(t)try{t.setItem(`daocore.i18n.locale`,e)}catch{}}resolveInitialLocale(){let e=this.readStoredLocale();return at(e)?e:st((typeof globalThis.navigator?.language==`string`?globalThis.navigator.language:null)??``)}loadLocale(){let e=this.resolveInitialLocale();if(e===`en`){this.locale=`en`;return}this.setLocale(e)}getLocale(){return this.locale}async setLocale(e){let t=e!==`en`&&!this.translations[e];if(!(this.locale===e&&!t)){if(t)try{let t=await ct(e);if(!t)return;this.translations[e]=t}catch(t){console.error(`Failed to load locale: ${e}`,t);return}this.locale=e,this.persistLocale(e),this.notify()}}registerTranslation(e,t){this.translations[e]=t}subscribe(e){return this.subscribers.add(e),()=>this.subscribers.delete(e)}notify(){this.subscribers.forEach(e=>e(this.locale))}t(e,t){let n=e.split(`.`),r=this.translations[this.locale]||this.translations.en;for(let e of n)if(r&&typeof r==`object`)r=r[e];else{r=void 0;break}if(r===void 0&&this.locale!==`en`){r=this.translations.en;for(let e of n)if(r&&typeof r==`object`)r=r[e];else{r=void 0;break}}return typeof r==`string`?t?r.replace(/\{(\w+)\}/g,(e,n)=>t[n]||`{${n}}`):r:e}},R=(e,t)=>lt.t(e,t),ut=class{constructor(e){this.host=e,this.host.addController(this)}hostConnected(){this.unsubscribe=lt.subscribe(()=>{this.host.requestUpdate()})}hostDisconnected(){this.unsubscribe?.()}};function dt(e){return typeof e==`string`&&e.trim()||null}function z(e){return dt(e)??void 0}function ft(e){return z(e)?.toLowerCase()}function B(e){return ft(e)??``}function pt(e){return e?/[\r\n]/.test(e)?null:e:null}function mt(e){return pt(z(e.hello?.auth?.deviceToken)??null)??pt(z(e.settings?.token)??null)??pt(z(e.password)??null)??null}function ht(e){let t=mt(e);return t?`Bearer ${t}`:null}function gt(e){let t=new Set,n=[];for(let r of[z(e.hello?.auth?.deviceToken),z(e.settings?.token),z(e.password)]){let e=pt(r??null);e&&!t.has(e)&&(t.add(e),n.push(e))}return n}var V={AUTH_REQUIRED:`AUTH_REQUIRED`,AUTH_UNAUTHORIZED:`AUTH_UNAUTHORIZED`,AUTH_TOKEN_MISSING:`AUTH_TOKEN_MISSING`,AUTH_TOKEN_MISMATCH:`AUTH_TOKEN_MISMATCH`,AUTH_TOKEN_NOT_CONFIGURED:`AUTH_TOKEN_NOT_CONFIGURED`,AUTH_PASSWORD_MISSING:`AUTH_PASSWORD_MISSING`,AUTH_PASSWORD_MISMATCH:`AUTH_PASSWORD_MISMATCH`,AUTH_PASSWORD_NOT_CONFIGURED:`AUTH_PASSWORD_NOT_CONFIGURED`,AUTH_BOOTSTRAP_TOKEN_INVALID:`AUTH_BOOTSTRAP_TOKEN_INVALID`,AUTH_DEVICE_TOKEN_MISMATCH:`AUTH_DEVICE_TOKEN_MISMATCH`,AUTH_SCOPE_MISMATCH:`AUTH_SCOPE_MISMATCH`,AUTH_RATE_LIMITED:`AUTH_RATE_LIMITED`,AUTH_TAILSCALE_IDENTITY_MISSING:`AUTH_TAILSCALE_IDENTITY_MISSING`,AUTH_TAILSCALE_PROXY_MISSING:`AUTH_TAILSCALE_PROXY_MISSING`,AUTH_TAILSCALE_WHOIS_FAILED:`AUTH_TAILSCALE_WHOIS_FAILED`,AUTH_TAILSCALE_IDENTITY_MISMATCH:`AUTH_TAILSCALE_IDENTITY_MISMATCH`,CONTROL_UI_ORIGIN_NOT_ALLOWED:`CONTROL_UI_ORIGIN_NOT_ALLOWED`,PROTOCOL_MISMATCH:`PROTOCOL_MISMATCH`,CONTROL_UI_DEVICE_IDENTITY_REQUIRED:`CONTROL_UI_DEVICE_IDENTITY_REQUIRED`,DEVICE_IDENTITY_REQUIRED:`DEVICE_IDENTITY_REQUIRED`,DEVICE_AUTH_INVALID:`DEVICE_AUTH_INVALID`,DEVICE_AUTH_DEVICE_ID_MISMATCH:`DEVICE_AUTH_DEVICE_ID_MISMATCH`,DEVICE_AUTH_SIGNATURE_EXPIRED:`DEVICE_AUTH_SIGNATURE_EXPIRED`,DEVICE_AUTH_NONCE_REQUIRED:`DEVICE_AUTH_NONCE_REQUIRED`,DEVICE_AUTH_NONCE_MISMATCH:`DEVICE_AUTH_NONCE_MISMATCH`,DEVICE_AUTH_SIGNATURE_INVALID:`DEVICE_AUTH_SIGNATURE_INVALID`,DEVICE_AUTH_PUBLIC_KEY_INVALID:`DEVICE_AUTH_PUBLIC_KEY_INVALID`,PAIRING_REQUIRED:`PAIRING_REQUIRED`},_t={NOT_PAIRED:`not-paired`,ROLE_UPGRADE:`role-upgrade`,SCOPE_UPGRADE:`scope-upgrade`,METADATA_UPGRADE:`metadata-upgrade`},vt=new Set([`retry_with_device_token`,`update_auth_configuration`,`update_auth_credentials`,`wait_then_retry`,`review_auth_configuration`]),yt=new Set([`not-paired`,`role-upgrade`,`scope-upgrade`,`metadata-upgrade`]),bt=/^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$/,xt={"not-paired":{requirement:`device is not approved yet`,remediationHint:`Approve this device from the pending pairing requests.`,recoveryTitle:`Gateway pairing approval required.`},"role-upgrade":{requirement:`device is asking for a higher role than currently approved`,remediationHint:`Review the requested role upgrade, then approve the pending request.`,recoveryTitle:`Gateway role upgrade approval required.`},"scope-upgrade":{requirement:`device is asking for more scopes than currently approved`,remediationHint:`Review the requested scopes, then approve the pending upgrade.`,recoveryTitle:`Gateway scope upgrade approval required.`},"metadata-upgrade":{requirement:`device identity changed and must be re-approved`,remediationHint:`Review the refreshed device details, then approve the pending request.`,recoveryTitle:`Gateway device refresh approval required.`}},St={"not-paired":`device pairing required`,"role-upgrade":`role upgrade pending approval`,"scope-upgrade":`scope upgrade pending approval`,"metadata-upgrade":`device metadata change pending approval`};function Ct(e){if(!e||typeof e!=`object`||Array.isArray(e))return null;let t=e.code;return typeof t==`string`&&t.trim().length>0?t:null}function wt(e){if(!e||typeof e!=`object`||Array.isArray(e))return{};let t=e,n=typeof t.canRetryWithDeviceToken==`boolean`?t.canRetryWithDeviceToken:void 0,r=z(t.recommendedNextStep)??``;return{canRetryWithDeviceToken:n,recommendedNextStep:vt.has(r)?r:void 0}}function Tt(e){let t=z(e)??``;return yt.has(t)?t:void 0}function Et(e){let t=z(e);return t&&bt.test(t)?t:void 0}function Dt(e){if(!Array.isArray(e))return;let t=e.map(e=>z(e)).filter(e=>!!e);return t.length>0?t:[]}function Ot(e){return{code:V.PAIRING_REQUIRED,...e.reason?{reason:e.reason}:{},...e.requestId?{requestId:e.requestId}:{},...e.remediationHint?{remediationHint:e.remediationHint}:{},...e.recommendedNextStep?{recommendedNextStep:e.recommendedNextStep}:{},...e.retryable===void 0?{}:{retryable:e.retryable},...e.pauseReconnect===void 0?{}:{pauseReconnect:e.pauseReconnect},...e.deviceId?{deviceId:e.deviceId}:{},...e.requestedRole?{requestedRole:e.requestedRole}:{},...e.requestedScopes?{requestedScopes:e.requestedScopes}:{},...e.approvedRoles?{approvedRoles:e.approvedRoles}:{},...e.approvedScopes?{approvedScopes:e.approvedScopes}:{}}}function kt(e){return e?xt[e].requirement:`device approval is required`}function At(e){return e?xt[e].remediationHint:`Approve the pending device request before retrying.`}function jt(e){if(Ct(e)!==V.PAIRING_REQUIRED||!e||typeof e!=`object`||Array.isArray(e))return null;let t=e,n=Tt(t.reason),r=Et(t.requestId),i=z(t.remediationHint)??At(n),a=z(t.recommendedNextStep)??``,o=vt.has(a)?a:void 0,s=z(t.deviceId),c=z(t.requestedRole),l=Dt(t.requestedScopes),u=Dt(t.approvedRoles),d=Dt(t.approvedScopes);return Ot({reason:n,requestId:r,remediationHint:i,recommendedNextStep:o,retryable:typeof t.retryable==`boolean`?t.retryable:void 0,pauseReconnect:typeof t.pauseReconnect==`boolean`?t.pauseReconnect:void 0,deviceId:s,requestedRole:c,requestedScopes:l,approvedRoles:u,approvedScopes:d})}function Mt(e){let t=z(e);if(!t)return null;let n=t.trim().toLowerCase(),r;for(let[e,t]of Object.entries(St))if(n.includes(t)){r=e;break}if(!r&&n.includes(`pairing required`)&&(r=_t.NOT_PAIRED),!r)return null;let i=Et(t.match(/\(requestId:\s*([^\s)]+)\)/i)?.[1]);return{...i?{requestId:i}:{},reason:r}}function Nt(e){let t=jt(e),n=St[t?.reason??_t.NOT_PAIRED];return t?.requestId?`${n} (requestId: ${t.requestId})`:n}function Pt(e){return Ct(e.details)===V.PAIRING_REQUIRED?Nt(e.details):Ct(e.details)===V.PROTOCOL_MISMATCH?Ft(e.message,e.details):z(e.message)??`gateway request failed`}function Ft(e,t){let n=t,r=It(n.clientMinProtocol),i=It(n.clientMaxProtocol),a=It(n.expectedProtocol),o=It(n.minimumProbeProtocol),s=[];r!==void 0&&i!==void 0&&s.push(r===i?`Control UI v${r}`:`Control UI v${r}-v${i}`),a!==void 0&&s.push(`Gateway v${a}`),o!==void 0&&s.push(`probe min v${o}`);let c=z(e)??`protocol mismatch`;return s.length>0?`${c}: ${s.join(`, `)}`:c}function It(e){return typeof e==`number`&&Number.isInteger(e)&&e>0?e:void 0}function Lt(e){let t=e.scopes.join(`,`),n=e.token??``;return[`v2`,e.deviceId,e.clientId,e.clientMode,e.role,t,String(e.signedAtMs),n,e.nonce].join(`|`)}var Rt={WEBCHAT_UI:`webchat-ui`,CONTROL_UI:`daocore-control-ui`,TUI:`daocore-tui`,WEBCHAT:`webchat`,CLI:`cli`,GATEWAY_CLIENT:`gateway-client`,MACOS_APP:`daocore-macos`,IOS_APP:`daocore-ios`,ANDROID_APP:`daocore-android`,NODE_HOST:`node-host`,TEST:`test`,FINGERPRINT:`fingerprint`,PROBE:`daocore-probe`},zt=Rt,Bt={WEBCHAT:`webchat`,CLI:`cli`,UI:`ui`,BACKEND:`backend`,NODE:`node`,PROBE:`probe`,TEST:`test`};new Set(Object.values(Rt)),new Set(Object.values(Bt));var Vt=100,Ht=2e3;function Ut(e){return typeof e==`object`&&!!e&&e.reason===`startup-sidecars`}function Wt(e){if(!e||typeof e!=`object`)return!1;let t=e;return(t.gatewayCode??t.code)===`UNAVAILABLE`&&t.retryable===!0&&Ut(t.details)}function Gt(e){if(!Wt(e))return null;let t=e.retryAfterMs;return Math.min(Math.max(Math.floor(typeof t==`number`&&Number.isFinite(t)?t:500),Vt),Ht)}function Kt(e){return e.trim()}function qt(e){if(!Array.isArray(e))return[];let t=new Set;for(let n of e){if(typeof n!=`string`)continue;let e=n.trim();e&&t.add(e)}return t.has(`operator.admin`)?(t.add(`operator.read`),t.add(`operator.write`)):t.has(`operator.write`)&&t.add(`operator.read`),[...t].toSorted()}function Jt(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function Yt(e,t){if(!Jt(t)||typeof t.token!=`string`)return null;let n=typeof t.updatedAtMs==`number`&&Number.isFinite(t.updatedAtMs)?t.updatedAtMs:0;return{token:t.token,role:e,scopes:qt(Array.isArray(t.scopes)?t.scopes:void 0),updatedAtMs:n}}function Xt(e){let t={};for(let[n,r]of Object.entries(e)){let e=Kt(n);if(!e)continue;let i=Yt(e,r);i&&(t[e]=i)}return t}function Zt(e){let t=e.adapter.readStore();if(!t||t.deviceId!==e.deviceId)return null;let n=Kt(e.role);return Yt(n,t.tokens[n])}function Qt(e){let t=Kt(e.role),n=e.adapter.readStore(),r={version:1,deviceId:e.deviceId,tokens:n&&n.deviceId===e.deviceId&&n.tokens?Xt(n.tokens):{}},i={token:e.token,role:t,scopes:qt(e.scopes),updatedAtMs:Date.now()};return r.tokens[t]=i,e.adapter.writeStore(r),i}function $t(e){let t=e.adapter.readStore();if(!t||t.deviceId!==e.deviceId)return;let n=Kt(e.role);if(!t.tokens[n])return;let r={version:1,deviceId:t.deviceId,tokens:Xt(t.tokens)};delete r.tokens[n],e.adapter.writeStore(r)}var en=`daocore.device.auth.v1`;function tn(){try{let e=Xe()?.getItem(en);if(!e)return null;let t=JSON.parse(e);return!t||t.version!==1||!t.deviceId||typeof t.deviceId!=`string`||!t.tokens||typeof t.tokens!=`object`?null:t}catch{return null}}function nn(e){try{Xe()?.setItem(en,JSON.stringify(e))}catch{}}function rn(e){return Zt({adapter:{readStore:tn,writeStore:nn},deviceId:e.deviceId,role:e.role})}function an(e){return Qt({adapter:{readStore:tn,writeStore:nn},deviceId:e.deviceId,role:e.role,token:e.token,scopes:e.scopes})}function on(e){$t({adapter:{readStore:tn,writeStore:nn},deviceId:e.deviceId,role:e.role})}var sn=Object.freeze({p:57896044618658097711785492504343953926634992332820282019728792003956564819949n,n:7237005577332262213973186563042994240857116359379907606001950938285454250989n,h:8n,a:57896044618658097711785492504343953926634992332820282019728792003956564819948n,d:37095705934669439343138083508754565189542113879843219016388785533085940283555n,Gx:15112221349535400772501151409588531511454012693041857206046113283949847762202n,Gy:46316835694926478169428394003475163141307993866256225615783033603165251855960n}),{p:cn,n:ln,Gx:un,Gy:dn,a:fn,d:pn,h:mn}=sn,hn=32,gn=(...e)=>{`captureStackTrace`in Error&&typeof Error.captureStackTrace==`function`&&Error.captureStackTrace(...e)},_n=(e=``)=>{let t=Error(e);throw gn(t,_n),t},vn=e=>typeof e==`bigint`,yn=e=>typeof e==`string`,bn=e=>e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name===`Uint8Array`&&`BYTES_PER_ELEMENT`in e&&e.BYTES_PER_ELEMENT===1,xn=(e,t,n=``)=>{let r=bn(e),i=e?.length,a=t!==void 0;if(!r||a&&i!==t){let o=n&&`"${n}" `,s=a?` of length ${t}`:``,c=r?`length=${i}`:`type=${typeof e}`,l=o+`expected Uint8Array`+s+`, got `+c;throw r?RangeError(l):TypeError(l)}return e},Sn=e=>new Uint8Array(e),Cn=e=>Uint8Array.from(e),wn=(e,t)=>e.toString(16).padStart(t,`0`),Tn=e=>Array.from(xn(e)).map(e=>wn(e,2)).join(``),En={_0:48,_9:57,A:65,F:70,a:97,f:102},Dn=e=>{if(e>=En._0&&e<=En._9)return e-En._0;if(e>=En.A&&e<=En.F)return e-(En.A-10);if(e>=En.a&&e<=En.f)return e-(En.a-10)},On=e=>{let t=`hex invalid`;if(!yn(e))return _n(t);let n=e.length,r=n/2;if(n%2)return _n(t);let i=Sn(r);for(let n=0,a=0;n<r;n++,a+=2){let r=Dn(e.charCodeAt(a)),o=Dn(e.charCodeAt(a+1));if(r===void 0||o===void 0)return _n(t);i[n]=r*16+o}return i},kn=()=>globalThis?.crypto,An=()=>kn()?.subtle??_n(`crypto.subtle must be defined, consider polyfill`),jn=(...e)=>{let t=0;for(let n of e)t+=xn(n).length;let n=Sn(t),r=0;return e.forEach(e=>{n.set(e,r),r+=e.length}),n},Mn=(e=hn)=>kn().getRandomValues(Sn(e)),Nn=BigInt,Pn=(e,t,n,r=`bad number: out of range`)=>{if(!vn(e))throw TypeError(r);if(t<=e&&e<n)return e;throw RangeError(r)},Fn=(e,t=cn)=>{let n=e%t;return n>=0n?n:t+n},In=(1n<<255n)-1n,H=e=>{e<0n&&_n(`negative coordinate`);let t=(e>>255n)*19n+(e&In);return t=(t>>255n)*19n+(t&In),t%cn},Ln=e=>Fn(e,ln),Rn=(e,t)=>{(e===0n||t<=0n)&&_n(`no inverse n=`+e+` mod=`+t);let n=Fn(e,t),r=t,i=0n,a=1n,o=1n,s=0n;for(;n!==0n;){let e=r/n,t=r%n,c=i-o*e,l=a-s*e;r=n,n=t,i=o,a=s,o=c,s=l}return r===1n?Fn(i,t):_n(`no inverse`)},zn=e=>{let t=cr[e];return typeof t!=`function`&&_n(`hashes.`+e+` not set`),t},Bn=e=>xn(e,64,`digest`),Vn=e=>e instanceof Un?e:_n(`Point expected`),Hn=2n**256n,Un=class e{static BASE;static ZERO;X;Y;Z;T;constructor(e,t,n,r){let i=Hn;this.X=Pn(e,0n,i),this.Y=Pn(t,0n,i),this.Z=Pn(n,1n,i),this.T=Pn(r,0n,i),Object.freeze(this)}static CURVE(){return sn}static fromAffine(t){return new e(t.x,t.y,1n,H(t.x*t.y))}static fromBytes(t,n=!1){let r=pn,i=Cn(xn(t,hn)),a=t[31];i[31]=a&-129;let o=qn(i);Pn(o,0n,n?Hn:cn);let s=H(o*o),{isValid:c,value:l}=Zn(Fn(s-1n),H(r*s+1n));c||_n(`bad point: y not sqrt`);let u=(l&1n)==1n,d=(a&128)!=0;return!n&&l===0n&&d&&_n(`bad point: x==0, isLastByteOdd`),d!==u&&(l=Fn(-l)),new e(l,o,1n,H(l*o))}static fromHex(t,n){return e.fromBytes(On(t),n)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}assertValidity(){let e=fn,t=pn,n=this;if(n.is0())return _n(`bad point: ZERO`);let{X:r,Y:i,Z:a,T:o}=n,s=H(r*r),c=H(i*i),l=H(a*a),u=H(l*l);return H(l*(H(s*e)+c))===Fn(u+H(t*H(s*c)))?H(r*i)===H(a*o)?this:_n(`bad point: equation left != right (2)`):_n(`bad point: equation left != right (1)`)}equals(e){let{X:t,Y:n,Z:r}=this,{X:i,Y:a,Z:o}=Vn(e),s=H(t*o),c=H(i*r),l=H(n*o),u=H(a*r);return s===c&&l===u}is0(){return this.equals(Gn)}negate(){return new e(Fn(-this.X),this.Y,this.Z,Fn(-this.T))}double(){let{X:t,Y:n,Z:r}=this,i=fn,a=H(t*t),o=H(n*n),s=H(2n*r*r),c=H(i*a),l=Fn(t+n),u=Fn(H(l*l)-a-o),d=Fn(c+o),f=Fn(d-s),p=Fn(c-o),m=H(u*f),h=H(d*p),g=H(u*p);return new e(m,h,H(f*d),g)}add(t){let{X:n,Y:r,Z:i,T:a}=this,{X:o,Y:s,Z:c,T:l}=Vn(t),u=fn,d=pn,f=H(n*o),p=H(r*s),m=H(H(a*d)*l),h=H(i*c),g=Fn(H(Fn(n+r)*Fn(o+s))-f-p),_=Fn(h-m),v=Fn(h+m),y=Fn(p-H(u*f)),b=H(g*_),x=H(v*y),S=H(g*y);return new e(b,x,H(_*v),S)}subtract(e){return this.add(Vn(e).negate())}multiply(e,t=!0){if(!t&&e===0n||(Pn(e,1n,ln),!t&&this.is0()))return Gn;if(e===1n)return this;if(this.equals(Wn))return gr(e).p;let n=Gn,r=Wn;for(let i=this;e>0n;i=i.double(),e>>=1n)e&1n?n=n.add(i):t&&(r=r.add(i));return n}multiplyUnsafe(e){return this.multiply(e,!1)}toAffine(){let{X:e,Y:t,Z:n}=this;if(this.equals(Gn))return{x:0n,y:1n};let r=Rn(n,cn);return H(n*r)!==1n&&_n(`invalid inverse`),{x:H(e*r),y:H(t*r)}}toBytes(){let{x:e,y:t}=this.toAffine(),n=Kn(t);return n[31]|=e&1n?128:0,n}toHex(){return Tn(this.toBytes())}clearCofactor(){return this.multiply(Nn(mn),!1)}isSmallOrder(){return this.clearCofactor().is0()}isTorsionFree(){let e=this.multiply(ln/2n,!1).double();return ln%2n&&(e=e.add(this)),e.is0()}},Wn=new Un(un,dn,1n,Fn(un*dn)),Gn=new Un(0n,1n,1n,0n);Un.BASE=Wn,Un.ZERO=Gn;var Kn=e=>On(wn(Pn(e,0n,Hn),64)).reverse(),qn=e=>Nn(`0x`+Tn(Cn(xn(e)).reverse())),Jn=(e,t)=>{let n=e;for(;t-- >0n;)n=H(n*n);return n},Yn=e=>{let t=H(H(e*e)*e),n=H(Jn(H(Jn(t,2n)*t),1n)*e),r=H(Jn(n,5n)*n),i=H(Jn(r,10n)*r),a=H(Jn(i,20n)*i),o=H(Jn(a,40n)*a);return{pow_p_5_8:H(Jn(H(Jn(H(Jn(H(Jn(o,80n)*o),80n)*o),10n)*r),2n)*e),b2:t}},Xn=19681161376707505956807079304988542015446066515923890162744021073123829784752n,Zn=(e,t)=>{let n=H(t*H(t*t)),r=Yn(H(e*H(H(n*n)*t))).pow_p_5_8,i=H(e*H(n*r)),a=H(t*H(i*i)),o=i,s=H(i*Xn),c=a===e,l=a===Fn(-e),u=a===Fn(-e*Xn);return c&&(i=o),(l||u)&&(i=s),(Fn(i)&1n)==1n&&(i=Fn(-i)),{isValid:c||l,value:i}},Qn=e=>Ln(qn(e)),$n=(...e)=>Promise.resolve(zn(`sha512Async`)(jn(...e))).then(Bn),er=(...e)=>Bn(zn(`sha512`)(jn(...e))),tr=e=>{let t=Cn(e),n=t.slice(0,32);n[0]&=248,n[31]&=127,n[31]|=64;let r=t.slice(32,64),i=Qn(n),a=Wn.multiply(i);return{head:n,prefix:r,scalar:i,point:a,pointBytes:a.toBytes()}},nr=e=>$n(xn(e,hn)).then(tr),rr=e=>tr(er(xn(e,hn))),ir=e=>nr(e).then(e=>e.pointBytes),ar=e=>$n(e.hashable).then(e.finish),or=(e,t,n)=>{let{pointBytes:r,scalar:i}=e,a=Qn(t),o=Wn.multiply(a).toBytes();return{hashable:jn(o,r,n),finish:e=>xn(jn(o,Kn(Ln(a+Qn(e)*i))),64)}},sr=async(e,t)=>{let n=xn(e),r=await nr(t);return ar(or(r,await $n(r.prefix,n),n))},cr={sha512Async:async e=>{let t=An(),n=jn(e);return Sn(await t.digest(`SHA-512`,n.buffer))},sha512:void 0},lr=Object.freeze({getExtendedPublicKeyAsync:nr,getExtendedPublicKey:rr,randomSecretKey:e=>(e=e===void 0?Mn(hn):e,xn(e,hn))}),ur=8,dr=Math.ceil(256/ur)+1,fr=2**(ur-1),pr=()=>{let e=[],t=Wn,n=t;for(let r=0;r<dr;r++){n=t,e.push(n);for(let r=1;r<fr;r++)n=n.add(t),e.push(n);t=n.double()}return e},mr=void 0,hr=(e,t)=>{let n=t.negate();return e?n:t},gr=e=>{let t=mr||=pr(),n=Gn,r=Wn,i=2**ur,a=i,o=Nn(i-1),s=Nn(ur);for(let i=0;i<dr;i++){let c=Number(e&o);e>>=s,c>fr&&(c-=a,e+=1n);let l=i*fr,u=l,d=l+Math.abs(c)-1,f=i%2!=0,p=c<0;c===0?r=r.add(hr(f,t[u])):n=n.add(hr(p,t[d]))}return e!==0n&&_n(`invalid wnaf`),{p:n,f:r}},_r=`daocore-device-identity-v1`;function vr(e){let t=``;for(let n of e)t+=String.fromCharCode(n);return btoa(t).replaceAll(`+`,`-`).replaceAll(`/`,`_`).replace(/=+$/g,``)}function yr(e){let t=e.replaceAll(`-`,`+`).replaceAll(`_`,`/`),n=t+`=`.repeat((4-t.length%4)%4),r=atob(n),i=new Uint8Array(r.length);for(let e=0;e<r.length;e+=1)i[e]=r.charCodeAt(e);return i}function br(e){return Array.from(e).map(e=>e.toString(16).padStart(2,`0`)).join(``)}async function xr(e){let t=await crypto.subtle.digest(`SHA-256`,e.slice().buffer);return br(new Uint8Array(t))}async function Sr(){let e=lr.randomSecretKey(),t=await ir(e);return{deviceId:await xr(t),publicKey:vr(t),privateKey:vr(e)}}async function Cr(){let e=Xe();try{let t=e?.getItem(_r);if(t){let n=JSON.parse(t);if(n?.version===1&&typeof n.deviceId==`string`&&typeof n.publicKey==`string`&&typeof n.privateKey==`string`){let t=await xr(yr(n.publicKey));if(t!==n.deviceId){let r={...n,deviceId:t};return e?.setItem(_r,JSON.stringify(r)),{deviceId:t,publicKey:n.publicKey,privateKey:n.privateKey}}return{deviceId:n.deviceId,publicKey:n.publicKey,privateKey:n.privateKey}}}}catch{}let t=await Sr(),n={version:1,deviceId:t.deviceId,publicKey:t.publicKey,privateKey:t.privateKey,createdAtMs:Date.now()};return e?.setItem(_r,JSON.stringify(n)),t}async function wr(e,t){let n=yr(e);return vr(await sr(new TextEncoder().encode(t),n))}var Tr=!1;function Er(e){e[6]=e[6]&15|64,e[8]=e[8]&63|128;let t=``;for(let n=0;n<e.length;n++)t+=e[n].toString(16).padStart(2,`0`);return`${t.slice(0,8)}-${t.slice(8,12)}-${t.slice(12,16)}-${t.slice(16,20)}-${t.slice(20)}`}function Dr(){Tr||(Tr=!0,console.warn(`[uuid] crypto API missing; refusing insecure UUID generation`))}function Or(e=globalThis.crypto){if(e&&typeof e.randomUUID==`function`)return e.randomUUID();if(e&&typeof e.getRandomValues==`function`){let t=new Uint8Array(16);return e.getRandomValues(t),Er(t)}throw Dr(),Error(`Web Crypto is required for UUID generation`)}var kr=class extends Error{constructor(e){super(Pt({message:e.message,details:Ar(e.message,e.details)})),this.name=`GatewayRequestError`,this.gatewayCode=e.code,this.details=e.details,this.retryable=e.retryable===!0,this.retryAfterMs=e.retryAfterMs}};function Ar(e,t){return Ct(t)===V.PROTOCOL_MISMATCH||!e?.toLowerCase().includes(`protocol mismatch`)?t:{code:V.PROTOCOL_MISMATCH,clientMinProtocol:4,clientMaxProtocol:4,...t&&typeof t==`object`&&!Array.isArray(t)?t:{}}}function jr(e){return Ct(e?.details)}function Mr(e){let t=jt(e);return t?.pauseReconnect===!1||t?.recommendedNextStep===`wait_then_retry`}function Nr(e){if(!e)return!1;let t=jr(e);return t===V.PAIRING_REQUIRED&&Mr(e.details)?!1:t===V.AUTH_TOKEN_MISSING||t===V.AUTH_BOOTSTRAP_TOKEN_INVALID||t===V.AUTH_PASSWORD_MISSING||t===V.AUTH_PASSWORD_MISMATCH||t===V.AUTH_RATE_LIMITED||t===V.AUTH_DEVICE_TOKEN_MISMATCH||t===V.AUTH_SCOPE_MISMATCH||t===V.PAIRING_REQUIRED||t===V.CONTROL_UI_DEVICE_IDENTITY_REQUIRED||t===V.DEVICE_IDENTITY_REQUIRED}function Pr(e){let t=e.split(`.`);return t.length!==4||t[0]!==`127`?!1:t.every(e=>{if(!/^\d+$/.test(e))return!1;let t=Number(e);return t>=0&&t<=255})}function Fr(e){try{let t=new URL(e,window.location.href),n=t.hostname.trim().toLowerCase(),r=n===`localhost`||n===`::1`||n===`[::1]`,i=Pr(n);if(r||i)return!0;let a=new URL(window.location.href);return t.host===a.host}catch{return!1}}var Ir=`operator`,Lr=[`operator.admin`,`operator.read`,`operator.write`,`operator.approvals`,`operator.pairing`],Rr=4008,zr=4013,Br=1006,Vr=`BROWSER_WEBSOCKET_CONSTRUCTOR_ERROR`,Hr=`BROWSER_WEBSOCKET_SECURITY_ERROR`;function Ur(e){let t=e.authToken;if(t||e.authPassword)return{token:t,deviceToken:e.authDeviceToken??e.resolvedDeviceToken,password:e.authPassword}}function Wr(e){return e instanceof Error&&e.message?e.message:String(e)}function Gr(e){if(e instanceof Error&&e.name)return e.name;if(e&&typeof e==`object`&&`name`in e){let t=e.name;return typeof t==`string`&&t.trim()?t:void 0}}function Kr(e){let t=Gr(e)?.toLowerCase(),n=Wr(e).toLowerCase();return t===`securityerror`||n.includes(`security error`)||n.includes(`mixed content`)||n.includes(`insecure websocket`)}function qr(e,t){let n=Kr(e),r=Wr(e),i=t.trim().toLowerCase().startsWith(`ws://`);return n?{code:Hr,message:`Browser refused the Gateway WebSocket for security reasons.`+(i?` Use wss:// when the Control UI is served over HTTPS/Tailscale Serve, or open the loopback dashboard at http://127.0.0.1:18789.`:` Check the Gateway WebSocket URL and browser security policy.`),details:{code:Hr,browserErrorName:Gr(e),browserMessage:r}}:{code:Vr,message:`Could not create the Gateway WebSocket: ${r}`,details:{code:Vr,browserErrorName:Gr(e),browserMessage:r}}}function Jr(e){return e.storedToken&&(e.resolvedDeviceToken===e.storedToken||e.authDeviceToken===e.storedToken)&&e.storedScopes&&e.storedScopes.length>0?[...e.storedScopes]:[...Lr]}async function Yr(e){let{deviceIdentity:t}=e;if(!t)return;let n=Date.now(),r=e.connectNonce??``,i=Lt({deviceId:t.deviceId,clientId:e.client.id,clientMode:e.client.mode,role:e.role,scopes:e.scopes,signedAtMs:n,token:e.authToken??null,nonce:r}),a=await wr(t.privateKey,i);return{id:t.deviceId,publicKey:t.publicKey,signature:a,signedAt:n,nonce:r}}function Xr(e){return!e.deviceTokenRetryBudgetUsed&&!e.authDeviceToken&&!!e.explicitGatewayToken&&!!e.deviceIdentity&&!!e.storedToken&&e.canRetryWithDeviceTokenHint&&Fr(e.url)}var Zr=class{constructor(e){this.opts=e,this.ws=null,this.pending=new Map,this.closed=!1,this.lastSeq=null,this.connectNonce=null,this.connectSent=!1,this.connectTimer=null,this.connectGeneration=0,this.backoffMs=800,this.pendingDeviceTokenRetry=!1,this.deviceTokenRetryBudgetUsed=!1,this.pendingStartupReconnectDelayMs=null,this.eventListeners=new Set}start(){this.closed=!1,this.connect()}stop(){this.closed=!0,this.clearConnectTimer(),this.ws?.close(),this.ws=null,this.pendingConnectError=void 0,this.pendingDeviceTokenRetry=!1,this.deviceTokenRetryBudgetUsed=!1,this.pendingStartupReconnectDelayMs=null,this.flushPending(Error(`gateway client stopped`))}get connected(){return this.ws?.readyState===WebSocket.OPEN}connect(){if(this.closed)return;let e;try{e=new WebSocket(this.opts.url)}catch(e){let t=qr(e,this.opts.url);this.ws=null,this.pendingConnectError=void 0,this.pendingDeviceTokenRetry=!1,this.pendingStartupReconnectDelayMs=null,this.flushPending(Error(t.message)),this.opts.onClose?.({code:Br,reason:t.code===Hr?`security error`:`websocket error`,error:t});return}let t=++this.connectGeneration;this.ws=e,e.addEventListener(`open`,()=>this.queueConnect(e,t)),e.addEventListener(`message`,n=>{this.isActiveSocket(e,t)&&this.handleMessage(e,t,String(n.data??``))}),e.addEventListener(`close`,t=>{if(this.ws!==e)return;let n=t.reason??``,r=this.pendingConnectError;if(this.pendingConnectError=void 0,this.ws=null,this.pendingStartupReconnectDelayMs!==null){this.flushPending(Error(`gateway closed (${t.code}): ${n}`)),this.scheduleReconnect();return}if(this.flushPending(Error(`gateway closed (${t.code}): ${n}`)),this.opts.onClose?.({code:t.code,reason:n,error:r}),jr(r)===V.AUTH_TOKEN_MISMATCH){this.pendingDeviceTokenRetry&&this.scheduleReconnect();return}Nr(r)||this.scheduleReconnect()}),e.addEventListener(`error`,()=>{})}scheduleReconnect(){if(this.closed)return;let e=this.pendingStartupReconnectDelayMs;this.pendingStartupReconnectDelayMs=null;let t=e??this.backoffMs;e===null&&(this.backoffMs=Math.min(this.backoffMs*1.7,15e3)),this.clearConnectTimer(),this.connectTimer=window.setTimeout(()=>{this.connectTimer=null,this.connect()},t)}flushPending(e){for(let[t,n]of this.pending)this.emitRequestTiming(t,n,!1,`CLIENT_CLOSED`),n.reject(e);this.pending.clear()}nowMs(){return typeof performance<`u`&&typeof performance.now==`function`?performance.now():Date.now()}emitRequestTiming(e,t,n,r){let i=this.nowMs();try{this.opts.onRequestTiming?.({id:e,method:t.method,ok:n,durationMs:Math.max(0,i-t.startedAtMs),startedAtMs:t.startedAtMs,endedAtMs:i,errorCode:r})}catch(e){console.error(`[gateway] request timing handler error:`,e)}}buildConnectClient(){return{id:this.opts.clientName??zt.CONTROL_UI,version:this.opts.clientVersion??`control-ui`,platform:this.opts.platform??navigator.platform??`web`,mode:this.opts.mode??Bt.WEBCHAT,instanceId:this.opts.instanceId}}buildConnectParams(e){return{minProtocol:4,maxProtocol:4,client:e.client,role:e.role,scopes:e.scopes,device:e.device,caps:[`tool-events`],auth:e.auth,userAgent:navigator.userAgent,locale:navigator.language}}async buildConnectPlan(e){let t=Ir,n=this.buildConnectClient(),r=this.opts.token?.trim()||void 0,i=this.opts.password?.trim()||void 0,a=typeof crypto<`u`&&!!crypto.subtle,o=null,s={authToken:r,authPassword:i,canFallbackToShared:!1};a&&(o=await Cr(),s=this.selectConnectAuth({role:t,deviceId:o.deviceId}));let c=Jr(s);return{role:t,scopes:c,client:n,explicitGatewayToken:r,selectedAuth:s,auth:Ur(s),deviceIdentity:o,device:await Yr({deviceIdentity:o,client:n,role:t,scopes:c,authToken:s.authToken,connectNonce:e})}}handleConnectHello(e,t,n,r){this.isActiveSocket(n,r)&&(this.pendingDeviceTokenRetry=!1,this.deviceTokenRetryBudgetUsed=!1,this.pendingStartupReconnectDelayMs=null,e?.auth?.deviceToken&&t.deviceIdentity&&an({deviceId:t.deviceIdentity.deviceId,role:e.auth.role??t.role,token:e.auth.deviceToken,scopes:e.auth.scopes??[]}),this.backoffMs=800,this.opts.onHello?.(e))}handleConnectFailure(e,t,n,r){if(!this.isActiveSocket(n,r))return;let i=e instanceof kr?jr(e):null,a=e instanceof kr?wt(e.details):{},o=a.recommendedNextStep===`retry_with_device_token`,s=a.canRetryWithDeviceToken===!0||o||i===V.AUTH_TOKEN_MISMATCH;Xr({deviceTokenRetryBudgetUsed:this.deviceTokenRetryBudgetUsed,authDeviceToken:t.selectedAuth.authDeviceToken,explicitGatewayToken:t.explicitGatewayToken,deviceIdentity:t.deviceIdentity,storedToken:t.selectedAuth.storedToken,canRetryWithDeviceTokenHint:s,url:this.opts.url})&&(this.pendingDeviceTokenRetry=!0,this.deviceTokenRetryBudgetUsed=!0),e instanceof kr?this.pendingConnectError={code:e.gatewayCode,message:e.message,details:e.details,retryable:e.retryable,retryAfterMs:e.retryAfterMs}:this.pendingConnectError=void 0,t.selectedAuth.storedToken&&(t.selectedAuth.resolvedDeviceToken===t.selectedAuth.storedToken||t.selectedAuth.authDeviceToken===t.selectedAuth.storedToken)&&t.deviceIdentity&&i===V.AUTH_DEVICE_TOKEN_MISMATCH&&on({deviceId:t.deviceIdentity.deviceId,role:t.role});let c=Gt(e);if(c!==null&&(this.pendingStartupReconnectDelayMs=c),Wt(e)){n.close(zr,`gateway starting`);return}n.close(Rr,`connect failed`)}isActiveSocket(e,t){return!this.closed&&this.ws===e&&this.connectGeneration===t}async sendConnect(e,t){if(!this.isActiveSocket(e,t)||e.readyState!==WebSocket.OPEN||this.connectSent)return;this.connectSent=!0,this.clearConnectTimer();let n=await this.buildConnectPlan(this.connectNonce);!this.isActiveSocket(e,t)||e.readyState!==WebSocket.OPEN||(this.pendingDeviceTokenRetry&&n.selectedAuth.authDeviceToken&&(this.pendingDeviceTokenRetry=!1),this.requestOnSocket(e,`connect`,this.buildConnectParams(n)).then(r=>this.handleConnectHello(r,n,e,t)).catch(r=>this.handleConnectFailure(r,n,e,t)))}handleMessage(e,t,n){let r;try{r=JSON.parse(n)}catch{return}let i=r;if(i.type===`event`){let n=r;if(n.event===`connect.challenge`){let r=n.payload,i=r&&typeof r.nonce==`string`?r.nonce:null;i&&(this.connectNonce=i,this.sendConnect(e,t));return}let i=typeof n.seq==`number`?n.seq:null;i!==null&&(this.lastSeq!==null&&i>this.lastSeq+1&&this.opts.onGap?.({expected:this.lastSeq+1,received:i}),this.lastSeq=i);try{this.opts.onEvent?.(n);for(let e of this.eventListeners)e(n)}catch(e){console.error(`[gateway] event handler error:`,e)}return}if(i.type===`res`){let e=r,t=this.pending.get(e.id);if(!t)return;this.pending.delete(e.id),e.ok?(this.emitRequestTiming(e.id,t,!0),t.resolve(e.payload)):(this.emitRequestTiming(e.id,t,!1,e.error?.code),t.reject(new kr({code:e.error?.code??`UNAVAILABLE`,message:e.error?.message??`request failed`,details:e.error?.details,retryable:e.error?.retryable,retryAfterMs:e.error?.retryAfterMs})));return}}selectConnectAuth(e){let t=this.opts.token?.trim()||void 0,n=this.opts.password?.trim()||void 0,r=rn({deviceId:e.deviceId,role:e.role}),i=r?.scopes??[],a=e.role!==Ir||i.includes(`operator.read`)||i.includes(`operator.write`)||i.includes(`operator.admin`)?r?.token:void 0,o=this.pendingDeviceTokenRetry&&!!t&&!!a&&Fr(this.opts.url),s=t||n?void 0:a??void 0;return{authToken:t??s,authDeviceToken:o?a??void 0:void 0,authPassword:n,resolvedDeviceToken:s,storedToken:a??void 0,storedScopes:r?.scopes??void 0,canFallbackToShared:!!(a&&t)}}request(e,t){return!this.ws||this.ws.readyState!==WebSocket.OPEN?Promise.reject(Error(`gateway not connected`)):this.requestOnSocket(this.ws,e,t)}requestOnSocket(e,t,n){if(this.ws!==e||e.readyState!==WebSocket.OPEN)return Promise.reject(Error(`gateway not connected`));let r=Or(),i={type:`req`,id:r,method:t,params:n},a=this.nowMs(),o=new Promise((e,n)=>{this.pending.set(r,{resolve:t=>e(t),reject:n,method:t,startedAtMs:a})});return e.send(JSON.stringify(i)),o}addEventListener(e){return this.eventListeners.add(e),()=>{this.eventListeners.delete(e)}}queueConnect(e,t){this.isActiveSocket(e,t)&&(this.connectNonce=null,this.connectSent=!1,this.clearConnectTimer(),this.connectTimer=window.setTimeout(()=>{this.connectTimer=null,this.sendConnect(e,t)},750))}clearConnectTimer(){this.connectTimer!==null&&(window.clearTimeout(this.connectTimer),this.connectTimer=null)}};function Qr(e){return e instanceof kr?jr(e)===V.AUTH_UNAUTHORIZED?!0:e.message.includes(`missing scope: operator.read`):!1}function $r(e){return`This connection is missing operator.read, so ${e} cannot be loaded yet.`}function ei(e){return new Promise(t=>setTimeout(()=>t(`timeout`),e))}async function ti(e,t,n={}){if(!e.client||!e.connected||e.channelsLoading&&(!e.channelsLoadingProbe||t))return;let r=(e.channelsRefreshSeq??0)+1;e.channelsRefreshSeq=r,e.channelsLoading=!0,e.channelsLoadingProbe=t,e.channelsError=null;let i=(async()=>{try{let n=await e.client.request(`channels.status`,{probe:t,timeoutMs:8e3});if(e.channelsRefreshSeq!==r)return;e.channelsSnapshot=n,e.channelsLastSuccess=Date.now()}catch(t){if(e.channelsRefreshSeq!==r)return;Qr(t)?(e.channelsSnapshot=null,e.channelsError=$r(`channel status`)):e.channelsError=String(t)}finally{e.channelsRefreshSeq===r&&(e.channelsLoading=!1,e.channelsLoadingProbe=null)}})(),a=n.softTimeoutMs;if(typeof a==`number`&&a>0)return await Promise.race([i.then(()=>`done`),ei(a)]),void 0;await i}async function ni(e,t){if(!(!e.client||!e.connected||e.whatsappBusy)){e.whatsappBusy=!0;try{let n=await e.client.request(`web.login.start`,{force:t,timeoutMs:3e4});e.whatsappLoginMessage=n.message??null,e.whatsappLoginQrDataUrl=n.qrDataUrl??null,e.whatsappLoginConnected=typeof n.connected==`boolean`?n.connected:null}catch(t){e.whatsappLoginMessage=String(t),e.whatsappLoginQrDataUrl=null,e.whatsappLoginConnected=null}finally{e.whatsappBusy=!1}}}async function ri(e){if(!(!e.client||!e.connected||e.whatsappBusy)){e.whatsappBusy=!0;try{let t=await e.client.request(`web.login.wait`,{timeoutMs:12e4,currentQrDataUrl:e.whatsappLoginQrDataUrl??void 0});e.whatsappLoginMessage=t.message??null,e.whatsappLoginConnected=t.connected??null,t.qrDataUrl?e.whatsappLoginQrDataUrl=t.qrDataUrl:t.connected&&(e.whatsappLoginQrDataUrl=null)}catch(t){e.whatsappLoginMessage=String(t),e.whatsappLoginConnected=null}finally{e.whatsappBusy=!1}}}async function ii(e){if(!(!e.client||!e.connected||e.whatsappBusy)){e.whatsappBusy=!0;try{await e.client.request(`channels.logout`,{channel:`whatsapp`}),e.whatsappLoginMessage=`Logged out.`,e.whatsappLoginQrDataUrl=null,e.whatsappLoginConnected=null}catch(t){e.whatsappLoginMessage=String(t)}finally{e.whatsappBusy=!1}}}function ai(e){return typeof e==`object`&&!!e&&!Array.isArray(e)&&Object.prototype.toString.call(e)===`[object Object]`}var oi=new Set([`__proto__`,`prototype`,`constructor`]);function si(e){return oi.has(e)}function ci(e){return ai(e)?typeof e.id==`string`&&e.id.length>0:!1}function li(e,t,n){if(!e.every(ci))return;let r=[...e],i=new Map;for(let[e,t]of r.entries()){if(!ci(t))return;i.set(t.id,e)}for(let e of t){if(!ci(e)){r.push(structuredClone(e));continue}let t=i.get(e.id);if(t===void 0){r.push(structuredClone(e)),i.set(e.id,r.length-1);continue}r[t]=ui(r[t],e,n)}return r}function ui(e,t,n={}){if(!ai(t))return t;let r=ai(e)?{...e}:{};for(let[e,i]of Object.entries(t))if(!si(e)){if(i===null){delete r[e];continue}if(n.mergeObjectArraysById&&Array.isArray(r[e])&&Array.isArray(i)){let t=li(r[e],i,n);if(t){r[e]=t;continue}}if(ai(i)){let t=r[e];r[e]=ui(ai(t)?t:{},i,n);continue}r[e]=i}return r}function di(e){if(e)return Array.isArray(e.type)?e.type.find(e=>e!==`null`)??e.type[0]:e.type}function fi(e){if(!e)return``;if(e.default!==void 0)return e.default;switch(di(e)){case`object`:return{};case`array`:return[];case`boolean`:return!1;case`number`:case`integer`:return 0;case`string`:return``;default:return``}}function pi(e){return e.filter(e=>typeof e==`string`).join(`.`)}function mi(e,t){let n=t[pi(e)];if(n)return n;let r=e.map(String);for(let[e,n]of Object.entries(t)){if(!e.includes(`*`))continue;let t=e.split(`.`);if(t.length!==r.length)continue;let i=!0;for(let e=0;e<r.length;e+=1)if(t[e]!==`*`&&t[e]!==r[e]){i=!1;break}if(i)return n}}function hi(e){return e.replace(/_/g,` `).replace(/([a-z0-9])([A-Z])/g,`$1 $2`).replace(/\s+/g,` `).replace(/^./,e=>e.toUpperCase())}var gi=[`maxtokens`,`maxoutputtokens`,`maxinputtokens`,`maxcompletiontokens`,`contexttokens`,`totaltokens`,`tokencount`,`tokenlimit`,`tokenbudget`,`passwordfile`],_i=[/token$/i,/password/i,/secret/i,/api.?key/i,/serviceaccount(?:ref)?$/i],vi=/^\$\{[^}]*\}$/,yi=`[redacted - click reveal to view]`,bi=64,xi=2e4;function Si(){return{visited:0}}function Ci(e,t){return!(t>bi||(e.visited+=1,e.visited>xi))}function wi(e){return vi.test(e.trim())}function Ti(e){let t=B(e);return!gi.some(e=>t.endsWith(e))&&_i.some(t=>t.test(e))}function Ei(e){return typeof e==`string`?e.trim().length>0&&!wi(e):e!=null}function Di(e){return e?.sensitive??!1}function Oi(e,t,n){return ki(e,t,n,Si(),0)}function ki(e,t,n,r,i){if(!Ci(r,i))return!0;let a=pi(t);return(Di(mi(t,n))||Ti(a))&&Ei(e)?!0:Array.isArray(e)?e.some((e,a)=>ki(e,[...t,a],n,r,i+1)):e&&typeof e==`object`?Object.entries(e).some(([e,a])=>ki(a,[...t,e],n,r,i+1)):!1}function Ai(e,t,n){return ji(e,t,n,Si(),0)}function ji(e,t,n,r,i){if(!Ci(r,i))return 1;if(e==null)return 0;let a=pi(t);return(Di(mi(t,n))||Ti(a))&&Ei(e)?1:Array.isArray(e)?e.reduce((e,a,o)=>e+ji(a,[...t,o],n,r,i+1),0):e&&typeof e==`object`?Object.entries(e).reduce((e,[a,o])=>e+ji(o,[...t,a],n,r,i+1),0):0}function Mi(e,t){let n=e.trim();if(n===``)return;let r=Number(n);return!Number.isFinite(r)||t&&!Number.isInteger(r)?e:r}function Ni(e){let t=e.trim();return t===`true`?!0:t===`false`?!1:e}function Pi(e,t){if(e==null)return e;if(t.allOf&&t.allOf.length>0){let n=e;for(let e of t.allOf)n=Pi(n,e);return n}let n=di(t);if(t.anyOf||t.oneOf){let n=(t.anyOf??t.oneOf??[]).filter(e=>!(e.type===`null`||Array.isArray(e.type)&&e.type.includes(`null`)));if(n.length===1)return Pi(e,n[0]);if(typeof e==`string`)for(let t of n){let n=di(t);if(n===`number`||n===`integer`){let t=Mi(e,n===`integer`);if(t===void 0||typeof t==`number`)return t}if(n===`boolean`){let t=Ni(e);if(typeof t==`boolean`)return t}}for(let t of n){let n=di(t);if(n===`object`&&typeof e==`object`&&!Array.isArray(e)||n===`array`&&Array.isArray(e))return Pi(e,t)}return e}if(n===`number`||n===`integer`){if(typeof e==`string`){let t=Mi(e,n===`integer`);if(t===void 0||typeof t==`number`)return t}return e}if(n===`boolean`){if(typeof e==`string`){let t=Ni(e);if(typeof t==`boolean`)return t}return e}if(n===`object`){if(typeof e!=`object`||Array.isArray(e))return e;let n=e,r=t.properties??{},i=t.additionalProperties&&typeof t.additionalProperties==`object`?t.additionalProperties:null,a={};for(let[e,t]of Object.entries(n)){let n=r[e]??i,o=n?Pi(t,n):t;o!==void 0&&(a[e]=o)}return a}if(n===`array`){if(!Array.isArray(e))return e;if(Array.isArray(t.items)){let n=t.items;return e.map((e,t)=>{let r=t<n.length?n[t]:void 0;return r?Pi(e,r):e})}let n=t.items;return n?e.map(e=>Pi(e,n)).filter(e=>e!==void 0):e}return e}var Fi=l(o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):n.JSON5=r()})(e,(function(){function e(e,t){return t={exports:{}},e(t,t.exports),t.exports}var t=e(function(e){var t=e.exports=typeof window<`u`&&window.Math==Math?window:typeof self<`u`&&self.Math==Math?self:Function(`return this`)();typeof __g==`number`&&(__g=t)}),n=e(function(e){var t=e.exports={version:`2.6.5`};typeof __e==`number`&&(__e=t)});n.version;var r=function(e){return typeof e==`object`?e!==null:typeof e==`function`},i=function(e){if(!r(e))throw TypeError(e+` is not an object!`);return e},a=function(e){try{return!!e()}catch{return!0}},o=!a(function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7}),s=t.document,c=r(s)&&r(s.createElement),l=function(e){return c?s.createElement(e):{}},u=!o&&!a(function(){return Object.defineProperty(l(`div`),"a",{get:function(){return 7}}).a!=7}),d=function(e,t){if(!r(e))return e;var n,i;if(t&&typeof(n=e.toString)==`function`&&!r(i=n.call(e))||typeof(n=e.valueOf)==`function`&&!r(i=n.call(e))||!t&&typeof(n=e.toString)==`function`&&!r(i=n.call(e)))return i;throw TypeError(`Can't convert object to primitive value`)},f=Object.defineProperty,p={f:o?Object.defineProperty:function(e,t,n){if(i(e),t=d(t,!0),i(n),u)try{return f(e,t,n)}catch{}if(`get`in n||`set`in n)throw TypeError(`Accessors not supported!`);return`value`in n&&(e[t]=n.value),e}},m=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}},h=o?function(e,t,n){return p.f(e,t,m(1,n))}:function(e,t,n){return e[t]=n,e},g={}.hasOwnProperty,_=function(e,t){return g.call(e,t)},v=0,y=Math.random(),b=function(e){return`Symbol(${e===void 0?``:e})_${(++v+y).toString(36)}`},x=!1,S=e(function(e){var r=`__core-js_shared__`,i=t[r]||(t[r]={});(e.exports=function(e,t){return i[e]||(i[e]=t===void 0?{}:t)})(`versions`,[]).push({version:n.version,mode:x?`pure`:`global`,copyright:`© 2019 Denis Pushkarev (zloirock.ru)`})})(`native-function-to-string`,Function.toString),ee=e(function(e){var r=b(`src`),i=`toString`,a=(``+S).split(i);n.inspectSource=function(e){return S.call(e)},(e.exports=function(e,n,i,o){var s=typeof i==`function`;s&&(_(i,`name`)||h(i,`name`,n)),e[n]!==i&&(s&&(_(i,r)||h(i,r,e[n]?``+e[n]:a.join(String(n)))),e===t?e[n]=i:o?e[n]?e[n]=i:h(e,n,i):(delete e[n],h(e,n,i)))})(Function.prototype,i,function(){return typeof this==`function`&&this[r]||S.call(this)})}),C=function(e){if(typeof e!=`function`)throw TypeError(e+` is not a function!`);return e},te=function(e,t,n){if(C(e),t===void 0)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}},ne=`prototype`,w=function(e,r,i){var a=e&w.F,o=e&w.G,s=e&w.S,c=e&w.P,l=e&w.B,u=o?t:s?t[r]||(t[r]={}):(t[r]||{})[ne],d=o?n:n[r]||(n[r]={}),f=d[ne]||(d[ne]={}),p,m,g,_;for(p in o&&(i=r),i)m=!a&&u&&u[p]!==void 0,g=(m?u:i)[p],_=l&&m?te(g,t):c&&typeof g==`function`?te(Function.call,g):g,u&&ee(u,p,g,e&w.U),d[p]!=g&&h(d,p,_),c&&f[p]!=g&&(f[p]=g)};t.core=n,w.F=1,w.G=2,w.S=4,w.P=8,w.B=16,w.W=32,w.U=64,w.R=128;var re=w,T=Math.ceil,E=Math.floor,D=function(e){return isNaN(e=+e)?0:(e>0?E:T)(e)},O=function(e){if(e==null)throw TypeError(`Can't call method on `+e);return e},ie=function(e){return function(t,n){var r=String(O(t)),i=D(n),a=r.length,o,s;return i<0||i>=a?e?``:void 0:(o=r.charCodeAt(i),o<55296||o>56319||i+1===a||(s=r.charCodeAt(i+1))<56320||s>57343?e?r.charAt(i):o:e?r.slice(i,i+2):(o-55296<<10)+(s-56320)+65536)}}(!1);re(re.P,`String`,{codePointAt:function(e){return ie(this,e)}}),n.String.codePointAt;var k=Math.max,ae=Math.min,oe=function(e,t){return e=D(e),e<0?k(e+t,0):ae(e,t)},se=String.fromCharCode,ce=String.fromCodePoint;re(re.S+re.F*(!!ce&&ce.length!=1),`String`,{fromCodePoint:function(e){for(var t=arguments,n=[],r=arguments.length,i=0,a;r>i;){if(a=+t[i++],oe(a,1114111)!==a)throw RangeError(a+` is not a valid code point`);n.push(a<65536?se(a):se(((a-=65536)>>10)+55296,a%1024+56320))}return n.join(``)}}),n.String.fromCodePoint;var le={Space_Separator:/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,ID_Start:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,ID_Continue:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/},A={isSpaceSeparator:function(e){return typeof e==`string`&&le.Space_Separator.test(e)},isIdStartChar:function(e){return typeof e==`string`&&(e>=`a`&&e<=`z`||e>=`A`&&e<=`Z`||e===`$`||e===`_`||le.ID_Start.test(e))},isIdContinueChar:function(e){return typeof e==`string`&&(e>=`a`&&e<=`z`||e>=`A`&&e<=`Z`||e>=`0`&&e<=`9`||e===`$`||e===`_`||e===`‌`||e===`‍`||le.ID_Continue.test(e))},isDigit:function(e){return typeof e==`string`&&/[0-9]/.test(e)},isHexDigit:function(e){return typeof e==`string`&&/[0-9A-Fa-f]/.test(e)}},ue,j,de,fe,pe,me,he,ge,_e,ve=function(e,t){ue=String(e),j=`start`,de=[],fe=0,pe=1,me=0,he=void 0,ge=void 0,_e=void 0;do he=Se(),Ae[j]();while(he.type!==`eof`);return typeof t==`function`?ye({"":_e},``,t):_e};function ye(e,t,n){var r=e[t];if(typeof r==`object`&&r)if(Array.isArray(r))for(var i=0;i<r.length;i++){var a=String(i),o=ye(r,a,n);o===void 0?delete r[a]:Object.defineProperty(r,a,{value:o,writable:!0,enumerable:!0,configurable:!0})}else for(var s in r){var c=ye(r,s,n);c===void 0?delete r[s]:Object.defineProperty(r,s,{value:c,writable:!0,enumerable:!0,configurable:!0})}return n.call(e,t,r)}var M,N,be,xe,P;function Se(){for(M=`default`,N=``,be=!1,xe=1;;){P=Ce();var e=we[M]();if(e)return e}}function Ce(){if(ue[fe])return String.fromCodePoint(ue.codePointAt(fe))}function F(){var e=Ce();return e===`
4
4
  `?(pe++,me=0):e?me+=e.length:me++,e&&(fe+=e.length),e}var we={default:function(){switch(P){case` `:case`\v`:case`\f`:case` `:case`\xA0`:case``:case`
@@ -7149,7 +7149,7 @@ ${e.pluginDescription}</pre
7149
7149
  ${J.x}
7150
7150
  </button>
7151
7151
  </span>
7152
- `}var sQ=sq(()=>L(()=>import(`./agents-DhhhjVfj.js`),__vite__mapDeps([0,1,2]),import.meta.url),eQ),cQ=sq(()=>L(()=>import(`./channels-DhDjOrEc.js`),__vite__mapDeps([3,1]),import.meta.url),eQ),lQ=sq(()=>L(()=>import(`./cron-1rfwzgga.js`),[],import.meta.url),eQ),uQ=sq(()=>L(()=>import(`./debug-BfQ6tc5Z.js`),[],import.meta.url),eQ),dQ=sq(()=>L(()=>import(`./instances-DxlwM05o.js`),[],import.meta.url),eQ),fQ=sq(()=>L(()=>import(`./logs-C6ECFXFe.js`),[],import.meta.url),eQ),pQ=sq(()=>L(()=>import(`./nodes-Ci25CEEq.js`),[],import.meta.url),eQ),mQ=sq(()=>L(()=>import(`./sessions-BZ92NJ5-.js`),[],import.meta.url),eQ),hQ=sq(()=>L(()=>import(`./skills-DyIrWhx0.js`),__vite__mapDeps([4,2]),import.meta.url),eQ);function gQ(e){return typeof e!=`number`||!Number.isFinite(e)?null:new Date(e).toLocaleTimeString([],{hour:`numeric`,minute:`2-digit`})}function _Q(e){if(!e?.phases)return null;let t;for(let n of Object.values(e.phases))!n.enabled||typeof n.nextRunAtMs!=`number`||(t===void 0||n.nextRunAtMs<t)&&(t=n.nextRunAtMs);return gQ(t)}var vQ=null,yQ=`daocore:control-ui:update-banner-dismissed:v1`,bQ=[`off`,`minimal`,`low`,`medium`,`high`],xQ=[`UTC`,`America/Los_Angeles`,`America/Denver`,`America/Chicago`,`America/New_York`,`Europe/London`,`Europe/Berlin`,`Asia/Tokyo`];function SQ(e){return/^https?:\/\//i.test(e.trim())}function CQ(e){return typeof e==`string`?e.trim():``}function wQ(e){let t=new Set,n=[];for(let r of e){let e=r.trim();if(!e)continue;let i=e.toLowerCase();t.has(i)||(t.add(i),n.push(e))}return n}function TQ(){try{let e=Xe()?.getItem(yQ);if(!e)return null;let t=JSON.parse(e);return!t||typeof t.latestVersion!=`string`?null:{latestVersion:t.latestVersion,channel:typeof t.channel==`string`?t.channel:null,dismissedAtMs:typeof t.dismissedAtMs==`number`?t.dismissedAtMs:Date.now()}}catch{return null}}function EQ(e){let t=TQ();if(!t)return!1;let n=e,r=n&&typeof n.latestVersion==`string`?n.latestVersion:null,i=n&&typeof n.channel==`string`?n.channel:null;return!!(r&&t.latestVersion===r&&t.channel===i)}function DQ(e){let t=e,n=t&&typeof t.latestVersion==`string`?t.latestVersion:null;if(!n)return;let r={latestVersion:n,channel:t&&typeof t.channel==`string`?t.channel:null,dismissedAtMs:Date.now()};try{Xe()?.setItem(yQ,JSON.stringify(r))}catch{}}var OQ=[`messages`,`broadcast`,`__notifications__`,`talk`,`audio`,`channels`],kQ=[`__appearance__`,`ui`,`wizard`],AQ=[`commands`,`hooks`,`bindings`,`cron`,`approvals`,`plugins`],jQ=[`gateway`,`web`,`browser`,`nodeHost`,`canvasHost`,`discovery`,`media`,`acp`,`mcp`],MQ=[`agents`,`models`,`skills`,`tools`,`memory`,`session`],NQ=new Set([...OQ,...kQ,...AQ,...jQ,...MQ]);function PQ(e,t){return e&&NQ.has(e)?{activeSection:null,activeSubsection:null}:{activeSection:e,activeSubsection:t}}function FQ(e,t,n){return e&&!n.includes(e)?{activeSection:null,activeSubsection:null}:{activeSection:e,activeSubsection:t}}function IQ(e,t,n){if(!e||typeof e!=`object`||Array.isArray(e))return 0;let r=e.properties;if(!r||typeof r!=`object`||Array.isArray(r))return 0;let i=t?.length?new Set(t):null,a=n?.length?new Set(n):null;return Object.keys(r).filter(e=>!(i&&!i.has(e)||a?.has(e))).length}function LQ(e,t,n,r){let i=KC(),a=r();return iw(e,t,{...n,durationMs:qC(KC()-i)}),a}function RQ(e){let t=e.agentsList?.agents??[],n=Gg(e.sessionKey)?.agentId??e.agentsList?.defaultId??`main`,r=t.find(e=>e.id===n)?.identity,i=r?.avatarUrl??r?.avatar;if(i&&Vp(i))return i}function zQ(e){if(!e||typeof e!=`object`||Array.isArray(e))return null;let t=e.ui;if(!t||typeof t!=`object`||Array.isArray(t))return null;let n=t.assistant;return!n||typeof n!=`object`||Array.isArray(n)?null:z(n.avatar)??null}function BQ(e,t){let n=Ff(e??``),r=encodeURIComponent(t);return n?`${n}/avatar/${r}`:`/avatar/${r}`}var VQ=[{id:`telegram`,label:`Telegram`},{id:`discord`,label:`Discord`},{id:`slack`,label:`Slack`},{id:`whatsapp`,label:`WhatsApp`},{id:`signal`,label:`Signal`},{id:`imessage`,label:`iMessage`}];function HQ(e){let t=e.trim();return t?t.split(/[-_]+/).filter(Boolean).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(` `):`Unknown`}function UQ(e){let t=e.configForm??e.configSnapshot?.config;if(!t||typeof t!=`object`)return[];let n=`channels`in t&&t.channels&&typeof t.channels==`object`?t.channels:{},r=Object.keys(n).filter(e=>e.trim().length>0),i=r.length>0?r.toSorted((e,t)=>e.localeCompare(t)):VQ.map(({id:e})=>e),a=new Map(VQ.map(({id:e,label:t})=>[e,t])),o=[];for(let e of i){let t=n[e],r=typeof t==`object`&&!!t&&Object.keys(t).length>0;o.push({id:e,label:a.get(e)??HQ(e),connected:r,detail:r?`Configured`:void 0})}return o}function WQ(e){let t=e.configForm??e.configSnapshot?.config;if(!t||typeof t!=`object`)return 0;let n=t.mcp;if(!n||typeof n!=`object`)return 0;let r=`servers`in n&&n.servers&&typeof n.servers==`object`?n.servers:{};return Object.keys(r).length}function GQ(e){let t=e.configForm??e.configSnapshot?.config;if(!t||typeof t!=`object`)return{gatewayAuth:`unknown`,execPolicy:`unknown`,deviceAuth:!1,browserEnabled:!0,toolProfile:`full`};let n=t,r=`gateway`in n&&n.gateway&&typeof n.gateway==`object`?n.gateway:null,i=r&&`auth`in r&&r.auth&&typeof r.auth==`object`?r.auth:null,a=`unknown`;i&&(a=(typeof i.mode==`string`?i.mode.trim():``)||(i.password?`password`:i.token?`token`:i.trustedProxy?`trusted-proxy`:`none`));let o=`allowlist`,s=`full`,c=n.tools;if(c&&typeof c==`object`){let e=c.profile;if(typeof e==`string`){let t=e.trim();t&&(s=t)}let t=c.exec;if(t&&typeof t==`object`){let e=t.security;if(typeof e==`string`){let t=e.trim();t&&(o=t)}}}let l=!0,u=`browser`in n&&n.browser&&typeof n.browser==`object`?n.browser:null;u&&typeof u.enabled==`boolean`&&(l=u.enabled);let d=!0;return r&&(`controlUi`in r&&r.controlUi&&typeof r.controlUi==`object`?r.controlUi:null)?.dangerouslyDisableDeviceAuth===!0&&(d=!1),{gatewayAuth:a,execPolicy:o,deviceAuth:d,browserEnabled:l,toolProfile:s}}function KQ(e){return e.sessionsResult?.sessions?.find(t=>t.key===e.sessionKey)}function qQ(e,t){return ZY({open:e.cronQuickCreateOpen,step:e.cronQuickCreateStep,draft:e.cronQuickCreateDraft??VY(),onDraftChange:n=>{e.cronQuickCreateDraft={...e.cronQuickCreateDraft??VY(),...n},t?.()},onStepChange:n=>{e.cronQuickCreateStep=n,t?.()},onCreate:()=>{let n=UY(e.cronQuickCreateDraft??VY());e.cronEditingJobId=null,e.cronForm={...lC,...n},t?.(),(async()=>{if(!await $w(e)){t?.();return}e.cronQuickCreateOpen=!1,e.cronQuickCreateStep=`what`,e.cronQuickCreateDraft=null,t?.()})()},onAdvancedCreate:()=>{let n=UY(e.cronQuickCreateDraft??VY());e.cronEditingJobId=null,e.cronForm=Nw({...lC,...n}),e.cronFieldErrors=Pw(e.cronForm),e.cronQuickCreateOpen=!1,e.cronQuickCreateStep=`what`,e.cronQuickCreateDraft=null,e.cronFormCollapsed=!1,t?.()},onCancel:()=>{e.cronQuickCreateOpen=!1,e.cronQuickCreateStep=`what`,e.cronQuickCreateDraft=null,t?.()}})}function JQ(e){let t=e,n=typeof t.requestUpdate==`function`?()=>t.requestUpdate?.():void 0;if($Z=n,!e.connected)return P` ${jZ(e)} ${mZ(e)} `;let r=e.presenceEntries.length,i=e.sessionsResult?.count??null,a=e.cronStatus?.nextWakeAtMs??null,o=e.connected?null:R(`chat.disconnected`),s=e.tab===`chat`,c=s&&(e.settings.chatFocusMode||e.onboarding),l=e.navDrawerOpen&&!c&&!e.onboarding,u=e.settings.navCollapsed&&!l,d=IW(e),f=e.onboarding?!1:e.settings.chatShowThinking,p=e.onboarding?!0:e.settings.chatShowToolCalls,m=z(eh().avatar)??null,h=RQ(e),g=m?`data`:e.chatAvatarStatus??e.assistantAvatarStatus??null,_=m?null:e.chatAvatarReason??e.assistantAvatarReason??null,v=g===`none`&&_===`missing`,y=m??(v?null:e.assistantAvatar),b=m??e.chatAvatarUrl??(v?null:h??null),x=m?`data`:e.assistantAvatarStatus??e.chatAvatarStatus??null,S=m?null:e.assistantAvatarReason??e.chatAvatarReason??null,ee=m??e.assistantAvatarSource??e.chatAvatarSource??null,C=x===`none`&&S===`missing`,te=m??(C||x===`local`?null:e.assistantAvatar),ne=m??(x===`local`&&e.assistantAgentId?BQ(e.basePath,e.assistantAgentId):e.chatAvatarUrl??(C?null:h??null)),w=e.configForm??e.configSnapshot?.config,re=jT(w),T=e.dreamingStatus?.enabled??re.enabled,E=_Q(e.dreamingStatus),D=e.dreamingStatusLoading||e.dreamingModeSaving,O=e.dreamingStatusLoading||e.dreamDiaryLoading,ie=()=>{(async()=>{await Zi(e),await Promise.all([UT(e),WT(e),GT(e),KT(e)])})()},k=async t=>{if(!e.client||!e.connected)return null;let n=await e.client.request(`wiki.get`,{lookup:t,fromLine:1,lineCount:5e3}),r=typeof n?.title==`string`&&n.title.trim()?n.title.trim():t,i=typeof n?.path==`string`&&n.path.trim()?n.path.trim():t,a=typeof n?.content==`string`&&n.content.length>0?n.content:`No wiki content available.`,o=typeof n?.updatedAt==`string`&&n.updatedAt.trim()?n.updatedAt.trim():void 0,s=typeof n?.totalLines==`number`&&Number.isFinite(n.totalLines)?Math.max(0,Math.floor(n.totalLines)):void 0,c=n?.truncated===!0;return{title:r,path:i,content:a,...s===void 0?{}:{totalLines:s},...c?{truncated:c}:{},...o?{updatedAt:o}:{}}},ae=t=>{e.dreamingModeSaving||e.dreamingRestartConfirmLoading||e.dreamingRestartConfirmOpen||T===t||(e.dreamingPendingEnabled=t,e.dreamingRestartConfirmOpen=!0,e.dreamingStatusError=null)},oe=()=>{e.dreamingRestartConfirmLoading||(e.dreamingRestartConfirmOpen=!1,e.dreamingPendingEnabled=null,e.dreamingStatusError=null)},se=()=>{let t=e.dreamingPendingEnabled;t==null||e.dreamingRestartConfirmLoading||(async()=>{e.dreamingRestartConfirmLoading=!0,e.dreamingStatusError=null;try{if(!await iE(e,t)){e.dreamingStatusError||=R(`dreaming.restartConfirmation.failed`);return}await Zi(e),await UT(e),e.dreamingRestartConfirmOpen=!1,e.dreamingPendingEnabled=null}finally{e.dreamingRestartConfirmLoading=!1}})()},ce=Ff(e.basePath??``),le=()=>e.agentsSelectedId??e.agentsList?.defaultId??e.agentsList?.agents?.[0]?.id??null,A=le(),ue=Yg(e.sessionKey),j=!!(A&&ue&&A===ue),de=()=>e.configForm??e.configSnapshot?.config,fe=e=>_a(de(),e),pe=t=>va(e,t),me=(e,t)=>{let n=t?pe(e):fe(e);return n>=0?[`agents`,`list`,n,`tools`]:null},he=e=>{let t=de()?.agents?.list,n=Array.isArray(t)?t[e]?.model:void 0;return{basePath:[`agents`,`list`,e,`model`],existing:n}},ge=cm(new Set([...e.agentsList?.agents?.map(e=>e.id.trim())??[],...e.cronJobs.map(e=>typeof e.agentId==`string`?e.agentId.trim():``).filter(Boolean)].filter(Boolean))),_e=cm(new Set([...e.cronModelSuggestions,...lm(w),...e.cronJobs.map(e=>{let t=kw(e);return t?.kind!==`agentTurn`||typeof t.model!=`string`?``:t.model.trim()}).filter(Boolean)].filter(Boolean))),ve=Vw(e),ye=e.cronForm.deliveryChannel&&e.cronForm.deliveryChannel.trim()?e.cronForm.deliveryChannel.trim():`last`,M=e.cronJobs.map(e=>CQ(e.delivery?.to)).filter(Boolean),N=(ye===`last`?Object.values(e.channelsSnapshot?.channelAccounts??{}).flat():e.channelsSnapshot?.channelAccounts?.[ye]??[]).flatMap(e=>[CQ(e.accountId),CQ(e.name)]).filter(Boolean),be=wQ([...M,...N]),xe=wQ(N),Se=e.cronForm.deliveryMode===`webhook`?be.filter(e=>SQ(e)):be,Ce={raw:e.configRaw,originalRaw:e.configRawOriginal,valid:e.configValid,issues:e.configIssues,loading:e.configLoading,saving:e.configSaving,applying:e.configApplying,updating:e.updateRunning,connected:e.connected,schema:e.configSchema,schemaLoading:e.configSchemaLoading,uiHints:e.configUiHints,formValue:e.configForm,originalValue:e.configFormOriginal,onRawChange:t=>{e.configRaw=t},onRequestUpdate:n,onFormPatch:(t,n)=>pa(e,t,n),onReload:()=>Zi(e,{discardPendingChanges:!0}),onReset:()=>ha(e),onSave:()=>oa(e),onApply:()=>sa(e),onUpdate:()=>ca(e),onOpenFile:()=>ba(e),version:e.hello?.server?.version??``,theme:e.theme,themeMode:e.themeMode,setTheme:(t,n)=>e.setTheme(t,n),setThemeMode:(t,n)=>e.setThemeMode(t,n),hasCustomTheme:!!e.settings.customTheme,customThemeLabel:e.settings.customTheme?.label??null,customThemeSourceUrl:e.settings.customTheme?.sourceUrl??null,customThemeImportUrl:e.customThemeImportUrl,customThemeImportBusy:e.customThemeImportBusy,customThemeImportMessage:e.customThemeImportMessage,customThemeImportExpanded:e.customThemeImportExpanded,customThemeImportFocusToken:e.customThemeImportFocusToken,onCustomThemeImportUrlChange:t=>e.setCustomThemeImportUrl(t),onOpenCustomThemeImport:()=>e.openCustomThemeImport(),onImportCustomTheme:()=>void e.importCustomTheme(),onClearCustomTheme:()=>e.clearCustomTheme(),borderRadius:e.settings.borderRadius,setBorderRadius:t=>e.setBorderRadius(t),textScale:e.settings.textScale??100,setTextScale:t=>e.setTextScale(t),gatewayUrl:e.settings.gatewayUrl,assistantName:e.assistantName,configPath:e.configSnapshot?.path??null,rawAvailable:typeof e.configSnapshot?.raw==`string`},we=t=>{let n=t.includeSections?.[0]??null,r=t.activeSection??n,i=t.showRootTab??!t.includeSections?.length;return LQ(e,`config`,{tab:e.tab,formMode:t.formMode,activeSection:r,activeSubsection:t.activeSubsection,schemaSectionCount:IQ(Ce.schema,t.includeSections,t.excludeSections),hasSearch:!!t.searchQuery?.trim()},()=>RY({...Ce,includeVirtualSections:!1,...t,activeSection:r,showRootTab:i}))},Te=PQ(e.configActiveSection,e.configActiveSubsection),Ee=FQ(e.communicationsActiveSection,e.communicationsActiveSubsection,OQ),De=FQ(e.appearanceActiveSection,e.appearanceActiveSubsection,kQ),Oe=FQ(e.automationActiveSection,e.automationActiveSubsection,AQ),ke=FQ(e.infrastructureActiveSection,e.infrastructureActiveSubsection,jQ),Ae=FQ(e.aiAgentsActiveSection,e.aiAgentsActiveSubsection,MQ),je=()=>{switch(e.tab){case`config`:if(e.configSettingsMode===`quick`){let t=e.configForm??e.configSnapshot?.config??{},r=m??zQ(t),i=t.agents?.defaults??{},a=KQ(e),o=typeof a?.model==`string`?a.model:typeof i.model==`string`?i.model:`default`,s=typeof a?.thinkingLevel==`string`?a.thinkingLevel:typeof i.thinkingLevel==`string`?i.thinkingLevel:`off`,c=typeof a?.fastMode==`boolean`?a.fastMode:i.fastMode===!0;return hJ({currentModel:o,thinkingLevel:s,fastMode:c,onModelChange:()=>{e.configSettingsMode=`advanced`,e.aiAgentsActiveSection=`models`,e.setTab(`aiAgents`)},onThinkingChange:t=>{uS(e,e.sessionKey,{thinkingLevel:t}).then(()=>n?.())},onFastModeToggle:()=>{uS(e,e.sessionKey,{fastMode:!c}).then(()=>n?.())},channels:UQ(e),onChannelConfigure:()=>{e.setTab(`channels`)},automation:{cronJobCount:e.cronJobs?.length??0,skillCount:e.skillsReport?.skills?.length??0,mcpServerCount:WQ(e)},onManageCron:()=>{e.setTab(`cron`)},onBrowseSkills:()=>{e.setTab(`skills`)},onConfigureMcp:()=>{e.infrastructureActiveSection=`mcp`,e.setTab(`infrastructure`)},security:GQ(e),onSecurityConfigure:()=>{e.configSettingsMode=`advanced`,e.configActiveSection=`auth`,n?.()},onBrowserEnabledToggle:t=>{pa(e,[`browser`,`enabled`],t),n?.()},onToolProfileChange:t=>{pa(e,[`tools`,`profile`],t),n?.()},theme:e.theme,themeMode:e.themeMode,hasCustomTheme:!!e.settings.customTheme,customThemeLabel:e.settings.customTheme?.label??null,borderRadius:e.settings.borderRadius,textScale:e.settings.textScale??100,setTheme:(t,n)=>e.setTheme(t,n),onOpenCustomThemeImport:()=>{e.setTab(`appearance`),e.appearanceFormMode=`form`,e.appearanceSearchQuery=``,e.appearanceActiveSection=`__appearance__`,e.appearanceActiveSubsection=null,e.openCustomThemeImport(),n?.()},setThemeMode:(t,n)=>e.setThemeMode(t,n),setBorderRadius:t=>e.setBorderRadius(t),setTextScale:t=>e.setTextScale(t),userAvatar:e.userAvatar??null,onUserAvatarChange:t=>e.applyLocalUserIdentity?.({avatar:t}),assistantAvatar:te,assistantAvatarUrl:ne,assistantAvatarSource:ee,assistantAvatarStatus:x,assistantAvatarReason:S,assistantAvatarOverride:r,assistantAvatarUploadBusy:e.assistantAvatarUploadBusy,assistantAvatarUploadError:e.assistantAvatarUploadError,onAssistantAvatarOverrideChange:t=>{lH(e,t),e.chatAvatarUrl=t,e.chatAvatarSource=t,e.chatAvatarStatus=`data`,e.chatAvatarReason=null,e.assistantAvatarUploadError=null,n?.()},onAssistantAvatarClearOverride:()=>{lH(e,null),e.chatAvatarUrl=null,e.chatAvatarSource=null,e.chatAvatarStatus=null,e.chatAvatarReason=null,e.assistantAvatarUploadError=null,e.loadAssistantIdentity?.().finally(()=>n?.()),n?.()},basePath:e.basePath??``,configObject:t,savedConfigObject:e.configSnapshot?.config??{},configDirty:e.configFormDirty,configSaving:e.configSaving,configApplying:e.configApplying,configReady:!!e.configSnapshot?.hash,onSelectPreset:t=>{let r=Fq(t);r&&(ma(e,r.patch),n?.())},onResetConfig:()=>ha(e),onSaveConfig:()=>oa(e),onApplyConfig:()=>sa(e),onAdvancedSettings:()=>{e.configSettingsMode=`advanced`,n?.()},connected:e.connected,gatewayUrl:e.settings.gatewayUrl,assistantName:e.assistantName,version:e.hello?.server?.version??``})}return we({formMode:e.configFormMode,searchQuery:e.configSearchQuery,activeSection:Te.activeSection,activeSubsection:Te.activeSubsection,onFormModeChange:t=>e.configFormMode=t,onSearchChange:t=>e.configSearchQuery=t,onSectionChange:t=>{e.configActiveSection=t,e.configActiveSubsection=null},onSubsectionChange:t=>e.configActiveSubsection=t,showModeToggle:!0,settingsLayout:`accordion`,onBackToQuick:()=>{e.configSettingsMode=`quick`,n?.()},excludeSections:[...OQ,...AQ,...jQ,...MQ,`ui`,`wizard`]});case`channels`:return lq(cQ,t=>t.renderChannels({connected:e.connected,loading:e.channelsLoading,snapshot:e.channelsSnapshot,lastError:e.channelsError,lastSuccessAt:e.channelsLastSuccess,whatsappMessage:e.whatsappLoginMessage,whatsappQrDataUrl:e.whatsappLoginQrDataUrl,whatsappConnected:e.whatsappLoginConnected,whatsappBusy:e.whatsappBusy,configSchema:e.configSchema,configSchemaLoading:e.configSchemaLoading,configForm:e.configForm,configUiHints:e.configUiHints,configSaving:e.configSaving,configFormDirty:e.configFormDirty,nostrProfileFormState:e.nostrProfileFormState,nostrProfileAccountId:e.nostrProfileAccountId,onRefresh:t=>ti(e,t),onWhatsAppStart:t=>e.handleWhatsAppStart(t),onWhatsAppWait:()=>e.handleWhatsAppWait(),onWhatsAppLogout:()=>e.handleWhatsAppLogout(),onConfigPatch:(t,n)=>pa(e,t,n),onConfigSave:()=>e.handleChannelConfigSave(),onConfigReload:()=>e.handleChannelConfigReload(),onNostrProfileEdit:(t,n)=>e.handleNostrProfileEdit(t,n),onNostrProfileCancel:()=>e.handleNostrProfileCancel(),onNostrProfileFieldChange:(t,n)=>e.handleNostrProfileFieldChange(t,n),onNostrProfileSave:()=>e.handleNostrProfileSave(),onNostrProfileImport:()=>e.handleNostrProfileImport(),onNostrProfileToggleAdvanced:()=>e.handleNostrProfileToggleAdvanced()}));case`communications`:return we({formMode:e.communicationsFormMode,searchQuery:e.communicationsSearchQuery,activeSection:Ee.activeSection,activeSubsection:Ee.activeSubsection,onFormModeChange:t=>e.communicationsFormMode=t,onSearchChange:t=>e.communicationsSearchQuery=t,onSectionChange:t=>{e.communicationsActiveSection=t,e.communicationsActiveSubsection=null},onSubsectionChange:t=>e.communicationsActiveSubsection=t,navRootLabel:`Communication`,includeSections:[...OQ],includeVirtualSections:!0,webPush:{supported:e.webPushSupported,permission:e.webPushPermission,subscribed:e.webPushSubscribed,loading:e.webPushLoading},onWebPushSubscribe:()=>e.handleWebPushSubscribe(),onWebPushUnsubscribe:()=>e.handleWebPushUnsubscribe(),onWebPushTest:()=>e.handleWebPushTest()});case`appearance`:return we({formMode:e.appearanceFormMode,searchQuery:e.appearanceSearchQuery,activeSection:De.activeSection,activeSubsection:De.activeSubsection,onFormModeChange:t=>e.appearanceFormMode=t,onSearchChange:t=>e.appearanceSearchQuery=t,onSectionChange:t=>{e.appearanceActiveSection=t,e.appearanceActiveSubsection=null},onSubsectionChange:t=>e.appearanceActiveSubsection=t,navRootLabel:R(`tabs.appearance`),includeSections:[...kQ],includeVirtualSections:!0});case`automation`:return we({formMode:e.automationFormMode,searchQuery:e.automationSearchQuery,activeSection:Oe.activeSection,activeSubsection:Oe.activeSubsection,onFormModeChange:t=>e.automationFormMode=t,onSearchChange:t=>e.automationSearchQuery=t,onSectionChange:t=>{e.automationActiveSection=t,e.automationActiveSubsection=null},onSubsectionChange:t=>e.automationActiveSubsection=t,navRootLabel:`Automation`,includeSections:[...AQ]});case`infrastructure`:return we({formMode:e.infrastructureFormMode,searchQuery:e.infrastructureSearchQuery,activeSection:ke.activeSection,activeSubsection:ke.activeSubsection,onFormModeChange:t=>e.infrastructureFormMode=t,onSearchChange:t=>e.infrastructureSearchQuery=t,onSectionChange:t=>{e.infrastructureActiveSection=t,e.infrastructureActiveSubsection=null},onSubsectionChange:t=>e.infrastructureActiveSubsection=t,navRootLabel:`Infrastructure`,includeSections:[...jQ]});case`aiAgents`:return we({formMode:e.aiAgentsFormMode,searchQuery:e.aiAgentsSearchQuery,activeSection:Ae.activeSection,activeSubsection:Ae.activeSubsection,onFormModeChange:t=>e.aiAgentsFormMode=t,onSearchChange:t=>e.aiAgentsSearchQuery=t,onSectionChange:t=>{e.aiAgentsActiveSection=t,e.aiAgentsActiveSubsection=null},onSubsectionChange:t=>e.aiAgentsActiveSubsection=t,navRootLabel:`AI & Agents`,includeSections:[...MQ]});default:return F}},Me=t=>{if(t)switch(e.agentsPanel){case`files`:dw(e,t);return;case`skills`:gw(e,t);return;case`tools`:bw(e,t),ww(e);return;case`overview`:case`channels`:case`cron`:return}},Ne=t=>{if(t===`channels`){ti(e,!1);return}t===`cron`&&e.loadCron()},Pe=(t=!1)=>{e.agentFilesList=null,e.agentFilesError=null,e.agentFileActive=null,e.agentFileContents={},e.agentFileDrafts={},t&&(e.agentFilesLoading=!1)},Fe=()=>{Pe(!0),e.agentSkillsReport=null,e.agentSkillsError=null,e.agentSkillsAgentId=null,e.toolsCatalogResult=null,e.toolsCatalogError=null,e.toolsCatalogLoading=!1,Sw(e)};return P`
7152
+ `}var sQ=sq(()=>L(()=>import(`./agents-TcDckPid.js`),__vite__mapDeps([0,1,2]),import.meta.url),eQ),cQ=sq(()=>L(()=>import(`./channels-Dy2yk3Du.js`),__vite__mapDeps([3,1]),import.meta.url),eQ),lQ=sq(()=>L(()=>import(`./cron-u03_i0HS.js`),[],import.meta.url),eQ),uQ=sq(()=>L(()=>import(`./debug-7KunYHyM.js`),[],import.meta.url),eQ),dQ=sq(()=>L(()=>import(`./instances-CMzbUBCW.js`),[],import.meta.url),eQ),fQ=sq(()=>L(()=>import(`./logs-QiHU0yhv.js`),[],import.meta.url),eQ),pQ=sq(()=>L(()=>import(`./nodes-tabyMKVi.js`),[],import.meta.url),eQ),mQ=sq(()=>L(()=>import(`./sessions-Cb6W8cm7.js`),[],import.meta.url),eQ),hQ=sq(()=>L(()=>import(`./skills-m8BzGBav.js`),__vite__mapDeps([4,2]),import.meta.url),eQ);function gQ(e){return typeof e!=`number`||!Number.isFinite(e)?null:new Date(e).toLocaleTimeString([],{hour:`numeric`,minute:`2-digit`})}function _Q(e){if(!e?.phases)return null;let t;for(let n of Object.values(e.phases))!n.enabled||typeof n.nextRunAtMs!=`number`||(t===void 0||n.nextRunAtMs<t)&&(t=n.nextRunAtMs);return gQ(t)}var vQ=null,yQ=`daocore:control-ui:update-banner-dismissed:v1`,bQ=[`off`,`minimal`,`low`,`medium`,`high`],xQ=[`UTC`,`America/Los_Angeles`,`America/Denver`,`America/Chicago`,`America/New_York`,`Europe/London`,`Europe/Berlin`,`Asia/Tokyo`];function SQ(e){return/^https?:\/\//i.test(e.trim())}function CQ(e){return typeof e==`string`?e.trim():``}function wQ(e){let t=new Set,n=[];for(let r of e){let e=r.trim();if(!e)continue;let i=e.toLowerCase();t.has(i)||(t.add(i),n.push(e))}return n}function TQ(){try{let e=Xe()?.getItem(yQ);if(!e)return null;let t=JSON.parse(e);return!t||typeof t.latestVersion!=`string`?null:{latestVersion:t.latestVersion,channel:typeof t.channel==`string`?t.channel:null,dismissedAtMs:typeof t.dismissedAtMs==`number`?t.dismissedAtMs:Date.now()}}catch{return null}}function EQ(e){let t=TQ();if(!t)return!1;let n=e,r=n&&typeof n.latestVersion==`string`?n.latestVersion:null,i=n&&typeof n.channel==`string`?n.channel:null;return!!(r&&t.latestVersion===r&&t.channel===i)}function DQ(e){let t=e,n=t&&typeof t.latestVersion==`string`?t.latestVersion:null;if(!n)return;let r={latestVersion:n,channel:t&&typeof t.channel==`string`?t.channel:null,dismissedAtMs:Date.now()};try{Xe()?.setItem(yQ,JSON.stringify(r))}catch{}}var OQ=[`messages`,`broadcast`,`__notifications__`,`talk`,`audio`,`channels`],kQ=[`__appearance__`,`ui`,`wizard`],AQ=[`commands`,`hooks`,`bindings`,`cron`,`approvals`,`plugins`],jQ=[`gateway`,`web`,`browser`,`nodeHost`,`canvasHost`,`discovery`,`media`,`acp`,`mcp`],MQ=[`agents`,`models`,`skills`,`tools`,`memory`,`session`],NQ=new Set([...OQ,...kQ,...AQ,...jQ,...MQ]);function PQ(e,t){return e&&NQ.has(e)?{activeSection:null,activeSubsection:null}:{activeSection:e,activeSubsection:t}}function FQ(e,t,n){return e&&!n.includes(e)?{activeSection:null,activeSubsection:null}:{activeSection:e,activeSubsection:t}}function IQ(e,t,n){if(!e||typeof e!=`object`||Array.isArray(e))return 0;let r=e.properties;if(!r||typeof r!=`object`||Array.isArray(r))return 0;let i=t?.length?new Set(t):null,a=n?.length?new Set(n):null;return Object.keys(r).filter(e=>!(i&&!i.has(e)||a?.has(e))).length}function LQ(e,t,n,r){let i=KC(),a=r();return iw(e,t,{...n,durationMs:qC(KC()-i)}),a}function RQ(e){let t=e.agentsList?.agents??[],n=Gg(e.sessionKey)?.agentId??e.agentsList?.defaultId??`main`,r=t.find(e=>e.id===n)?.identity,i=r?.avatarUrl??r?.avatar;if(i&&Vp(i))return i}function zQ(e){if(!e||typeof e!=`object`||Array.isArray(e))return null;let t=e.ui;if(!t||typeof t!=`object`||Array.isArray(t))return null;let n=t.assistant;return!n||typeof n!=`object`||Array.isArray(n)?null:z(n.avatar)??null}function BQ(e,t){let n=Ff(e??``),r=encodeURIComponent(t);return n?`${n}/avatar/${r}`:`/avatar/${r}`}var VQ=[{id:`telegram`,label:`Telegram`},{id:`discord`,label:`Discord`},{id:`slack`,label:`Slack`},{id:`whatsapp`,label:`WhatsApp`},{id:`signal`,label:`Signal`},{id:`imessage`,label:`iMessage`}];function HQ(e){let t=e.trim();return t?t.split(/[-_]+/).filter(Boolean).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(` `):`Unknown`}function UQ(e){let t=e.configForm??e.configSnapshot?.config;if(!t||typeof t!=`object`)return[];let n=`channels`in t&&t.channels&&typeof t.channels==`object`?t.channels:{},r=Object.keys(n).filter(e=>e.trim().length>0),i=r.length>0?r.toSorted((e,t)=>e.localeCompare(t)):VQ.map(({id:e})=>e),a=new Map(VQ.map(({id:e,label:t})=>[e,t])),o=[];for(let e of i){let t=n[e],r=typeof t==`object`&&!!t&&Object.keys(t).length>0;o.push({id:e,label:a.get(e)??HQ(e),connected:r,detail:r?`Configured`:void 0})}return o}function WQ(e){let t=e.configForm??e.configSnapshot?.config;if(!t||typeof t!=`object`)return 0;let n=t.mcp;if(!n||typeof n!=`object`)return 0;let r=`servers`in n&&n.servers&&typeof n.servers==`object`?n.servers:{};return Object.keys(r).length}function GQ(e){let t=e.configForm??e.configSnapshot?.config;if(!t||typeof t!=`object`)return{gatewayAuth:`unknown`,execPolicy:`unknown`,deviceAuth:!1,browserEnabled:!0,toolProfile:`full`};let n=t,r=`gateway`in n&&n.gateway&&typeof n.gateway==`object`?n.gateway:null,i=r&&`auth`in r&&r.auth&&typeof r.auth==`object`?r.auth:null,a=`unknown`;i&&(a=(typeof i.mode==`string`?i.mode.trim():``)||(i.password?`password`:i.token?`token`:i.trustedProxy?`trusted-proxy`:`none`));let o=`allowlist`,s=`full`,c=n.tools;if(c&&typeof c==`object`){let e=c.profile;if(typeof e==`string`){let t=e.trim();t&&(s=t)}let t=c.exec;if(t&&typeof t==`object`){let e=t.security;if(typeof e==`string`){let t=e.trim();t&&(o=t)}}}let l=!0,u=`browser`in n&&n.browser&&typeof n.browser==`object`?n.browser:null;u&&typeof u.enabled==`boolean`&&(l=u.enabled);let d=!0;return r&&(`controlUi`in r&&r.controlUi&&typeof r.controlUi==`object`?r.controlUi:null)?.dangerouslyDisableDeviceAuth===!0&&(d=!1),{gatewayAuth:a,execPolicy:o,deviceAuth:d,browserEnabled:l,toolProfile:s}}function KQ(e){return e.sessionsResult?.sessions?.find(t=>t.key===e.sessionKey)}function qQ(e,t){return ZY({open:e.cronQuickCreateOpen,step:e.cronQuickCreateStep,draft:e.cronQuickCreateDraft??VY(),onDraftChange:n=>{e.cronQuickCreateDraft={...e.cronQuickCreateDraft??VY(),...n},t?.()},onStepChange:n=>{e.cronQuickCreateStep=n,t?.()},onCreate:()=>{let n=UY(e.cronQuickCreateDraft??VY());e.cronEditingJobId=null,e.cronForm={...lC,...n},t?.(),(async()=>{if(!await $w(e)){t?.();return}e.cronQuickCreateOpen=!1,e.cronQuickCreateStep=`what`,e.cronQuickCreateDraft=null,t?.()})()},onAdvancedCreate:()=>{let n=UY(e.cronQuickCreateDraft??VY());e.cronEditingJobId=null,e.cronForm=Nw({...lC,...n}),e.cronFieldErrors=Pw(e.cronForm),e.cronQuickCreateOpen=!1,e.cronQuickCreateStep=`what`,e.cronQuickCreateDraft=null,e.cronFormCollapsed=!1,t?.()},onCancel:()=>{e.cronQuickCreateOpen=!1,e.cronQuickCreateStep=`what`,e.cronQuickCreateDraft=null,t?.()}})}function JQ(e){let t=e,n=typeof t.requestUpdate==`function`?()=>t.requestUpdate?.():void 0;if($Z=n,!e.connected)return P` ${jZ(e)} ${mZ(e)} `;let r=e.presenceEntries.length,i=e.sessionsResult?.count??null,a=e.cronStatus?.nextWakeAtMs??null,o=e.connected?null:R(`chat.disconnected`),s=e.tab===`chat`,c=s&&(e.settings.chatFocusMode||e.onboarding),l=e.navDrawerOpen&&!c&&!e.onboarding,u=e.settings.navCollapsed&&!l,d=IW(e),f=e.onboarding?!1:e.settings.chatShowThinking,p=e.onboarding?!0:e.settings.chatShowToolCalls,m=z(eh().avatar)??null,h=RQ(e),g=m?`data`:e.chatAvatarStatus??e.assistantAvatarStatus??null,_=m?null:e.chatAvatarReason??e.assistantAvatarReason??null,v=g===`none`&&_===`missing`,y=m??(v?null:e.assistantAvatar),b=m??e.chatAvatarUrl??(v?null:h??null),x=m?`data`:e.assistantAvatarStatus??e.chatAvatarStatus??null,S=m?null:e.assistantAvatarReason??e.chatAvatarReason??null,ee=m??e.assistantAvatarSource??e.chatAvatarSource??null,C=x===`none`&&S===`missing`,te=m??(C||x===`local`?null:e.assistantAvatar),ne=m??(x===`local`&&e.assistantAgentId?BQ(e.basePath,e.assistantAgentId):e.chatAvatarUrl??(C?null:h??null)),w=e.configForm??e.configSnapshot?.config,re=jT(w),T=e.dreamingStatus?.enabled??re.enabled,E=_Q(e.dreamingStatus),D=e.dreamingStatusLoading||e.dreamingModeSaving,O=e.dreamingStatusLoading||e.dreamDiaryLoading,ie=()=>{(async()=>{await Zi(e),await Promise.all([UT(e),WT(e),GT(e),KT(e)])})()},k=async t=>{if(!e.client||!e.connected)return null;let n=await e.client.request(`wiki.get`,{lookup:t,fromLine:1,lineCount:5e3}),r=typeof n?.title==`string`&&n.title.trim()?n.title.trim():t,i=typeof n?.path==`string`&&n.path.trim()?n.path.trim():t,a=typeof n?.content==`string`&&n.content.length>0?n.content:`No wiki content available.`,o=typeof n?.updatedAt==`string`&&n.updatedAt.trim()?n.updatedAt.trim():void 0,s=typeof n?.totalLines==`number`&&Number.isFinite(n.totalLines)?Math.max(0,Math.floor(n.totalLines)):void 0,c=n?.truncated===!0;return{title:r,path:i,content:a,...s===void 0?{}:{totalLines:s},...c?{truncated:c}:{},...o?{updatedAt:o}:{}}},ae=t=>{e.dreamingModeSaving||e.dreamingRestartConfirmLoading||e.dreamingRestartConfirmOpen||T===t||(e.dreamingPendingEnabled=t,e.dreamingRestartConfirmOpen=!0,e.dreamingStatusError=null)},oe=()=>{e.dreamingRestartConfirmLoading||(e.dreamingRestartConfirmOpen=!1,e.dreamingPendingEnabled=null,e.dreamingStatusError=null)},se=()=>{let t=e.dreamingPendingEnabled;t==null||e.dreamingRestartConfirmLoading||(async()=>{e.dreamingRestartConfirmLoading=!0,e.dreamingStatusError=null;try{if(!await iE(e,t)){e.dreamingStatusError||=R(`dreaming.restartConfirmation.failed`);return}await Zi(e),await UT(e),e.dreamingRestartConfirmOpen=!1,e.dreamingPendingEnabled=null}finally{e.dreamingRestartConfirmLoading=!1}})()},ce=Ff(e.basePath??``),le=()=>e.agentsSelectedId??e.agentsList?.defaultId??e.agentsList?.agents?.[0]?.id??null,A=le(),ue=Yg(e.sessionKey),j=!!(A&&ue&&A===ue),de=()=>e.configForm??e.configSnapshot?.config,fe=e=>_a(de(),e),pe=t=>va(e,t),me=(e,t)=>{let n=t?pe(e):fe(e);return n>=0?[`agents`,`list`,n,`tools`]:null},he=e=>{let t=de()?.agents?.list,n=Array.isArray(t)?t[e]?.model:void 0;return{basePath:[`agents`,`list`,e,`model`],existing:n}},ge=cm(new Set([...e.agentsList?.agents?.map(e=>e.id.trim())??[],...e.cronJobs.map(e=>typeof e.agentId==`string`?e.agentId.trim():``).filter(Boolean)].filter(Boolean))),_e=cm(new Set([...e.cronModelSuggestions,...lm(w),...e.cronJobs.map(e=>{let t=kw(e);return t?.kind!==`agentTurn`||typeof t.model!=`string`?``:t.model.trim()}).filter(Boolean)].filter(Boolean))),ve=Vw(e),ye=e.cronForm.deliveryChannel&&e.cronForm.deliveryChannel.trim()?e.cronForm.deliveryChannel.trim():`last`,M=e.cronJobs.map(e=>CQ(e.delivery?.to)).filter(Boolean),N=(ye===`last`?Object.values(e.channelsSnapshot?.channelAccounts??{}).flat():e.channelsSnapshot?.channelAccounts?.[ye]??[]).flatMap(e=>[CQ(e.accountId),CQ(e.name)]).filter(Boolean),be=wQ([...M,...N]),xe=wQ(N),Se=e.cronForm.deliveryMode===`webhook`?be.filter(e=>SQ(e)):be,Ce={raw:e.configRaw,originalRaw:e.configRawOriginal,valid:e.configValid,issues:e.configIssues,loading:e.configLoading,saving:e.configSaving,applying:e.configApplying,updating:e.updateRunning,connected:e.connected,schema:e.configSchema,schemaLoading:e.configSchemaLoading,uiHints:e.configUiHints,formValue:e.configForm,originalValue:e.configFormOriginal,onRawChange:t=>{e.configRaw=t},onRequestUpdate:n,onFormPatch:(t,n)=>pa(e,t,n),onReload:()=>Zi(e,{discardPendingChanges:!0}),onReset:()=>ha(e),onSave:()=>oa(e),onApply:()=>sa(e),onUpdate:()=>ca(e),onOpenFile:()=>ba(e),version:e.hello?.server?.version??``,theme:e.theme,themeMode:e.themeMode,setTheme:(t,n)=>e.setTheme(t,n),setThemeMode:(t,n)=>e.setThemeMode(t,n),hasCustomTheme:!!e.settings.customTheme,customThemeLabel:e.settings.customTheme?.label??null,customThemeSourceUrl:e.settings.customTheme?.sourceUrl??null,customThemeImportUrl:e.customThemeImportUrl,customThemeImportBusy:e.customThemeImportBusy,customThemeImportMessage:e.customThemeImportMessage,customThemeImportExpanded:e.customThemeImportExpanded,customThemeImportFocusToken:e.customThemeImportFocusToken,onCustomThemeImportUrlChange:t=>e.setCustomThemeImportUrl(t),onOpenCustomThemeImport:()=>e.openCustomThemeImport(),onImportCustomTheme:()=>void e.importCustomTheme(),onClearCustomTheme:()=>e.clearCustomTheme(),borderRadius:e.settings.borderRadius,setBorderRadius:t=>e.setBorderRadius(t),textScale:e.settings.textScale??100,setTextScale:t=>e.setTextScale(t),gatewayUrl:e.settings.gatewayUrl,assistantName:e.assistantName,configPath:e.configSnapshot?.path??null,rawAvailable:typeof e.configSnapshot?.raw==`string`},we=t=>{let n=t.includeSections?.[0]??null,r=t.activeSection??n,i=t.showRootTab??!t.includeSections?.length;return LQ(e,`config`,{tab:e.tab,formMode:t.formMode,activeSection:r,activeSubsection:t.activeSubsection,schemaSectionCount:IQ(Ce.schema,t.includeSections,t.excludeSections),hasSearch:!!t.searchQuery?.trim()},()=>RY({...Ce,includeVirtualSections:!1,...t,activeSection:r,showRootTab:i}))},Te=PQ(e.configActiveSection,e.configActiveSubsection),Ee=FQ(e.communicationsActiveSection,e.communicationsActiveSubsection,OQ),De=FQ(e.appearanceActiveSection,e.appearanceActiveSubsection,kQ),Oe=FQ(e.automationActiveSection,e.automationActiveSubsection,AQ),ke=FQ(e.infrastructureActiveSection,e.infrastructureActiveSubsection,jQ),Ae=FQ(e.aiAgentsActiveSection,e.aiAgentsActiveSubsection,MQ),je=()=>{switch(e.tab){case`config`:if(e.configSettingsMode===`quick`){let t=e.configForm??e.configSnapshot?.config??{},r=m??zQ(t),i=t.agents?.defaults??{},a=KQ(e),o=typeof a?.model==`string`?a.model:typeof i.model==`string`?i.model:`default`,s=typeof a?.thinkingLevel==`string`?a.thinkingLevel:typeof i.thinkingLevel==`string`?i.thinkingLevel:`off`,c=typeof a?.fastMode==`boolean`?a.fastMode:i.fastMode===!0;return hJ({currentModel:o,thinkingLevel:s,fastMode:c,onModelChange:()=>{e.configSettingsMode=`advanced`,e.aiAgentsActiveSection=`models`,e.setTab(`aiAgents`)},onThinkingChange:t=>{uS(e,e.sessionKey,{thinkingLevel:t}).then(()=>n?.())},onFastModeToggle:()=>{uS(e,e.sessionKey,{fastMode:!c}).then(()=>n?.())},channels:UQ(e),onChannelConfigure:()=>{e.setTab(`channels`)},automation:{cronJobCount:e.cronJobs?.length??0,skillCount:e.skillsReport?.skills?.length??0,mcpServerCount:WQ(e)},onManageCron:()=>{e.setTab(`cron`)},onBrowseSkills:()=>{e.setTab(`skills`)},onConfigureMcp:()=>{e.infrastructureActiveSection=`mcp`,e.setTab(`infrastructure`)},security:GQ(e),onSecurityConfigure:()=>{e.configSettingsMode=`advanced`,e.configActiveSection=`auth`,n?.()},onBrowserEnabledToggle:t=>{pa(e,[`browser`,`enabled`],t),n?.()},onToolProfileChange:t=>{pa(e,[`tools`,`profile`],t),n?.()},theme:e.theme,themeMode:e.themeMode,hasCustomTheme:!!e.settings.customTheme,customThemeLabel:e.settings.customTheme?.label??null,borderRadius:e.settings.borderRadius,textScale:e.settings.textScale??100,setTheme:(t,n)=>e.setTheme(t,n),onOpenCustomThemeImport:()=>{e.setTab(`appearance`),e.appearanceFormMode=`form`,e.appearanceSearchQuery=``,e.appearanceActiveSection=`__appearance__`,e.appearanceActiveSubsection=null,e.openCustomThemeImport(),n?.()},setThemeMode:(t,n)=>e.setThemeMode(t,n),setBorderRadius:t=>e.setBorderRadius(t),setTextScale:t=>e.setTextScale(t),userAvatar:e.userAvatar??null,onUserAvatarChange:t=>e.applyLocalUserIdentity?.({avatar:t}),assistantAvatar:te,assistantAvatarUrl:ne,assistantAvatarSource:ee,assistantAvatarStatus:x,assistantAvatarReason:S,assistantAvatarOverride:r,assistantAvatarUploadBusy:e.assistantAvatarUploadBusy,assistantAvatarUploadError:e.assistantAvatarUploadError,onAssistantAvatarOverrideChange:t=>{lH(e,t),e.chatAvatarUrl=t,e.chatAvatarSource=t,e.chatAvatarStatus=`data`,e.chatAvatarReason=null,e.assistantAvatarUploadError=null,n?.()},onAssistantAvatarClearOverride:()=>{lH(e,null),e.chatAvatarUrl=null,e.chatAvatarSource=null,e.chatAvatarStatus=null,e.chatAvatarReason=null,e.assistantAvatarUploadError=null,e.loadAssistantIdentity?.().finally(()=>n?.()),n?.()},basePath:e.basePath??``,configObject:t,savedConfigObject:e.configSnapshot?.config??{},configDirty:e.configFormDirty,configSaving:e.configSaving,configApplying:e.configApplying,configReady:!!e.configSnapshot?.hash,onSelectPreset:t=>{let r=Fq(t);r&&(ma(e,r.patch),n?.())},onResetConfig:()=>ha(e),onSaveConfig:()=>oa(e),onApplyConfig:()=>sa(e),onAdvancedSettings:()=>{e.configSettingsMode=`advanced`,n?.()},connected:e.connected,gatewayUrl:e.settings.gatewayUrl,assistantName:e.assistantName,version:e.hello?.server?.version??``})}return we({formMode:e.configFormMode,searchQuery:e.configSearchQuery,activeSection:Te.activeSection,activeSubsection:Te.activeSubsection,onFormModeChange:t=>e.configFormMode=t,onSearchChange:t=>e.configSearchQuery=t,onSectionChange:t=>{e.configActiveSection=t,e.configActiveSubsection=null},onSubsectionChange:t=>e.configActiveSubsection=t,showModeToggle:!0,settingsLayout:`accordion`,onBackToQuick:()=>{e.configSettingsMode=`quick`,n?.()},excludeSections:[...OQ,...AQ,...jQ,...MQ,`ui`,`wizard`]});case`channels`:return lq(cQ,t=>t.renderChannels({connected:e.connected,loading:e.channelsLoading,snapshot:e.channelsSnapshot,lastError:e.channelsError,lastSuccessAt:e.channelsLastSuccess,whatsappMessage:e.whatsappLoginMessage,whatsappQrDataUrl:e.whatsappLoginQrDataUrl,whatsappConnected:e.whatsappLoginConnected,whatsappBusy:e.whatsappBusy,configSchema:e.configSchema,configSchemaLoading:e.configSchemaLoading,configForm:e.configForm,configUiHints:e.configUiHints,configSaving:e.configSaving,configFormDirty:e.configFormDirty,nostrProfileFormState:e.nostrProfileFormState,nostrProfileAccountId:e.nostrProfileAccountId,onRefresh:t=>ti(e,t),onWhatsAppStart:t=>e.handleWhatsAppStart(t),onWhatsAppWait:()=>e.handleWhatsAppWait(),onWhatsAppLogout:()=>e.handleWhatsAppLogout(),onConfigPatch:(t,n)=>pa(e,t,n),onConfigSave:()=>e.handleChannelConfigSave(),onConfigReload:()=>e.handleChannelConfigReload(),onNostrProfileEdit:(t,n)=>e.handleNostrProfileEdit(t,n),onNostrProfileCancel:()=>e.handleNostrProfileCancel(),onNostrProfileFieldChange:(t,n)=>e.handleNostrProfileFieldChange(t,n),onNostrProfileSave:()=>e.handleNostrProfileSave(),onNostrProfileImport:()=>e.handleNostrProfileImport(),onNostrProfileToggleAdvanced:()=>e.handleNostrProfileToggleAdvanced()}));case`communications`:return we({formMode:e.communicationsFormMode,searchQuery:e.communicationsSearchQuery,activeSection:Ee.activeSection,activeSubsection:Ee.activeSubsection,onFormModeChange:t=>e.communicationsFormMode=t,onSearchChange:t=>e.communicationsSearchQuery=t,onSectionChange:t=>{e.communicationsActiveSection=t,e.communicationsActiveSubsection=null},onSubsectionChange:t=>e.communicationsActiveSubsection=t,navRootLabel:`Communication`,includeSections:[...OQ],includeVirtualSections:!0,webPush:{supported:e.webPushSupported,permission:e.webPushPermission,subscribed:e.webPushSubscribed,loading:e.webPushLoading},onWebPushSubscribe:()=>e.handleWebPushSubscribe(),onWebPushUnsubscribe:()=>e.handleWebPushUnsubscribe(),onWebPushTest:()=>e.handleWebPushTest()});case`appearance`:return we({formMode:e.appearanceFormMode,searchQuery:e.appearanceSearchQuery,activeSection:De.activeSection,activeSubsection:De.activeSubsection,onFormModeChange:t=>e.appearanceFormMode=t,onSearchChange:t=>e.appearanceSearchQuery=t,onSectionChange:t=>{e.appearanceActiveSection=t,e.appearanceActiveSubsection=null},onSubsectionChange:t=>e.appearanceActiveSubsection=t,navRootLabel:R(`tabs.appearance`),includeSections:[...kQ],includeVirtualSections:!0});case`automation`:return we({formMode:e.automationFormMode,searchQuery:e.automationSearchQuery,activeSection:Oe.activeSection,activeSubsection:Oe.activeSubsection,onFormModeChange:t=>e.automationFormMode=t,onSearchChange:t=>e.automationSearchQuery=t,onSectionChange:t=>{e.automationActiveSection=t,e.automationActiveSubsection=null},onSubsectionChange:t=>e.automationActiveSubsection=t,navRootLabel:`Automation`,includeSections:[...AQ]});case`infrastructure`:return we({formMode:e.infrastructureFormMode,searchQuery:e.infrastructureSearchQuery,activeSection:ke.activeSection,activeSubsection:ke.activeSubsection,onFormModeChange:t=>e.infrastructureFormMode=t,onSearchChange:t=>e.infrastructureSearchQuery=t,onSectionChange:t=>{e.infrastructureActiveSection=t,e.infrastructureActiveSubsection=null},onSubsectionChange:t=>e.infrastructureActiveSubsection=t,navRootLabel:`Infrastructure`,includeSections:[...jQ]});case`aiAgents`:return we({formMode:e.aiAgentsFormMode,searchQuery:e.aiAgentsSearchQuery,activeSection:Ae.activeSection,activeSubsection:Ae.activeSubsection,onFormModeChange:t=>e.aiAgentsFormMode=t,onSearchChange:t=>e.aiAgentsSearchQuery=t,onSectionChange:t=>{e.aiAgentsActiveSection=t,e.aiAgentsActiveSubsection=null},onSubsectionChange:t=>e.aiAgentsActiveSubsection=t,navRootLabel:`AI & Agents`,includeSections:[...MQ]});default:return F}},Me=t=>{if(t)switch(e.agentsPanel){case`files`:dw(e,t);return;case`skills`:gw(e,t);return;case`tools`:bw(e,t),ww(e);return;case`overview`:case`channels`:case`cron`:return}},Ne=t=>{if(t===`channels`){ti(e,!1);return}t===`cron`&&e.loadCron()},Pe=(t=!1)=>{e.agentFilesList=null,e.agentFilesError=null,e.agentFileActive=null,e.agentFileContents={},e.agentFileDrafts={},t&&(e.agentFilesLoading=!1)},Fe=()=>{Pe(!0),e.agentSkillsReport=null,e.agentSkillsError=null,e.agentSkillsAgentId=null,e.toolsCatalogResult=null,e.toolsCatalogError=null,e.toolsCatalogLoading=!1,Sw(e)};return P`
7153
7153
  ${Nq({open:e.paletteOpen,query:e.paletteQuery,activeIndex:e.paletteActiveIndex,onToggle:()=>{e.paletteOpen=!e.paletteOpen},onQueryChange:t=>{e.paletteQuery=t},onActiveIndexChange:t=>{e.paletteActiveIndex=t},onNavigate:t=>{e.setTab(t)},onSlashCommand:t=>{e.setTab(`chat`),e.handleChatDraftChange(t.endsWith(` `)?t:`${t} `)}})}
7154
7154
  <div
7155
7155
  class="shell ${s?`shell--chat`:``} ${c?`shell--chat-focus`:``} ${u?`shell--nav-collapsed`:``} ${l?`shell--nav-drawer-open`:``} ${e.onboarding?`shell--onboarding`:``}"
@@ -7379,5 +7379,5 @@ ${e.pluginDescription}</pre
7379
7379
 
7380
7380
  `).trim()}function x$(e){return new Promise((t,n)=>{if(e.signal?.aborted){n(new DOMException(`DaoCore tool call aborted`,`AbortError`));return}let r=window.setTimeout(()=>{o(),n(Error(`DaoCore tool call timed out`))},e.timeoutMs),i=()=>{o(),n(new DOMException(`DaoCore tool call aborted`,`AbortError`))};e.signal?.addEventListener(`abort`,i,{once:!0});let a=()=>void 0;a=e.client.addEventListener(r=>{if(r.event!==`chat`)return;let i=r.payload;!i||i.runId!==e.runId||(i.state===`final`?(o(),t(b$(i.message)||`DaoCore finished with no text.`)):i.state===`aborted`?(o(),n(new DOMException(i.errorMessage??`DaoCore tool call aborted`,`AbortError`))):i.state===`error`&&(o(),n(Error(i.errorMessage??`DaoCore tool call failed`))))});function o(){window.clearTimeout(r),e.signal?.removeEventListener(`abort`,i),a()}})}async function S$(e){let{ctx:t,callId:n,submit:r}=e;t.callbacks.onStatus?.(`thinking`);let i,a=!1,o=()=>{a=!0,i&&t.client.request(`chat.abort`,{sessionKey:t.sessionKey,runId:i})};if(!e.signal?.aborted){e.signal?.addEventListener(`abort`,o,{once:!0});try{let a=typeof e.args==`string`?JSON.parse(e.args||`{}`):e.args??{},s=await t.client.request(`talk.client.toolCall`,{sessionKey:t.sessionKey,callId:n,name:g$,args:a,...e.relaySessionId?{relaySessionId:e.relaySessionId}:{}});if(i=s.runId??s.idempotencyKey,!i)throw Error(`DaoCore realtime tool call did not return a run id`);if(e.signal?.aborted){o();return}r(n,{result:await x$({client:t.client,runId:i,timeoutMs:12e4,signal:e.signal})})}catch(t){if(a||e.signal?.aborted||C$(t))return;r(n,{error:t instanceof Error?t.message:String(t)})}finally{e.signal?.removeEventListener(`abort`,o),!a&&!e.signal?.aborted&&t.callbacks.onStatus?.(`listening`)}}}function C$(e){return typeof DOMException<`u`&&e instanceof DOMException&&e.name===`AbortError`}var w$=.02,T$=.08,E$=2,D$=class{constructor(e,t){this.session=e,this.ctx=t,this.media=null,this.inputContext=null,this.outputContext=null,this.inputSource=null,this.inputProcessor=null,this.unsubscribe=null,this.closed=!1,this.outputQueue=new h$,this.consultAbortControllers=new Set,this.cancelRequestedForPlayback=!1,this.speechFramesDuringPlayback=0}async start(){if(!navigator.mediaDevices?.getUserMedia)throw Error(`Realtime Talk requires browser microphone access`);if(this.session.audio.inputEncoding!==`pcm16`||this.session.audio.outputEncoding!==`pcm16`)throw Error(`Gateway-relay realtime Talk currently requires PCM16 audio`);this.closed=!1,this.unsubscribe=this.ctx.client.addEventListener(e=>{e.event===`talk.event`&&this.handleRelayEvent(e.payload)}),this.media=await navigator.mediaDevices.getUserMedia({audio:{autoGainControl:!0,echoCancellation:!0,noiseSuppression:!0}}),this.inputContext=new AudioContext({sampleRate:this.session.audio.inputSampleRateHz}),this.outputContext=new AudioContext({sampleRate:this.session.audio.outputSampleRateHz}),this.startMicrophonePump()}stop(){let e=this.closed;this.stopLocal(),e||this.ctx.client.request(`talk.session.close`,{sessionId:this.session.relaySessionId}).catch(()=>void 0)}stopLocal(){this.closed=!0,this.unsubscribe?.(),this.unsubscribe=null,this.inputProcessor?.disconnect(),this.inputProcessor=null,this.inputSource?.disconnect(),this.inputSource=null,this.abortConsults(),this.media?.getTracks().forEach(e=>e.stop()),this.media=null,this.stopOutput(),this.inputContext?.close(),this.inputContext=null,this.outputContext?.close(),this.outputContext=null}startMicrophonePump(){!this.media||!this.inputContext||(this.inputSource=this.inputContext.createMediaStreamSource(this.media),this.inputProcessor=this.inputContext.createScriptProcessor(4096,1,1),this.inputProcessor.onaudioprocess=e=>{if(this.closed)return;let t=e.inputBuffer.getChannelData(0),n=p$(t);this.detectBargeInSpeech(t)&&this.cancelOutputForBargeIn(),this.ctx.client.request(`talk.session.appendAudio`,{sessionId:this.session.relaySessionId,audioBase64:d$(n),timestamp:Math.round((this.inputContext?.currentTime??0)*1e3)}).catch(e=>{this.closed||(this.ctx.callbacks.onStatus?.(`error`,e instanceof Error?e.message:String(e)),this.stop())})},this.inputSource.connect(this.inputProcessor),this.inputProcessor.connect(this.inputContext.destination))}handleRelayEvent(e){if(!(e.relaySessionId!==this.session.relaySessionId||this.closed))switch(e.talkEvent&&this.ctx.callbacks.onTalkEvent?.(e.talkEvent),e.type){case`ready`:this.ctx.callbacks.onStatus?.(`listening`);return;case`audio`:e.audioBase64&&(this.cancelRequestedForPlayback=!1,this.speechFramesDuringPlayback=0,this.playPcm16(e.audioBase64));return;case`clear`:this.stopOutput();return;case`mark`:this.scheduleMarkAck();return;case`transcript`:e.role&&e.text&&this.ctx.callbacks.onTranscript?.({role:e.role,text:e.text,final:e.final??!1});return;case`toolCall`:this.handleToolCall(e);return;case`error`:this.lastRelayError=e.message??`Realtime relay failed`,this.ctx.callbacks.onStatus?.(`error`,this.lastRelayError);return;case`close`:this.abortConsults(),this.closed||(this.ctx.callbacks.onStatus?.(e.reason===`error`?`error`:`idle`,e.reason===`error`?this.lastRelayError??`Realtime relay closed`:void 0),this.stopLocal());return;default:return}}playPcm16(e){this.outputQueue.play(e,this.outputContext,this.session.audio.outputSampleRateHz)}stopOutput(){this.outputQueue.stop(this.outputContext),this.speechFramesDuringPlayback=0}scheduleMarkAck(){let e=Math.max(0,Math.ceil(((this.outputQueue.queuedUntil||this.outputContext?.currentTime||0)-(this.outputContext?.currentTime??0))*1e3));window.setTimeout(()=>{this.closed},e)}async handleToolCall(e){let t=e.callId?.trim(),n=e.name?.trim();if(!t||!n)return;if(n!==`daocore_agent_consult`){this.submitToolResult(t,{error:`Tool "${n}" not available in browser Talk`});return}let r=new AbortController;this.consultAbortControllers.add(r);try{e.forced&&this.submitToolResult(t,{status:`working`,tool:g$,message:`Tell the person briefly that you are checking, then wait for the final DaoCore result before answering with the actual result.`},{willContinue:!0}),await S$({ctx:this.ctx,callId:t,args:e.args??{},relaySessionId:this.session.relaySessionId,signal:r.signal,submit:(e,t)=>this.submitToolResult(e,t)})}finally{this.consultAbortControllers.delete(r)}}submitToolResult(e,t,n){this.ctx.client.request(`talk.session.submitToolResult`,{sessionId:this.session.relaySessionId,callId:e,result:t,...n?{options:n}:{}})}cancelOutputForBargeIn(){!this.outputQueue.isPlaying||this.cancelRequestedForPlayback||(this.cancelRequestedForPlayback=!0,this.stopOutput(),this.ctx.client.request(`talk.session.cancelOutput`,{sessionId:this.session.relaySessionId,reason:`barge-in`}))}abortConsults(){for(let e of this.consultAbortControllers)e.abort();this.consultAbortControllers.clear()}detectBargeInSpeech(e){if(!this.outputQueue.isPlaying||this.cancelRequestedForPlayback||e.length===0)return this.speechFramesDuringPlayback=0,!1;let t=0,n=0;for(let r of e)n=Math.max(n,Math.abs(r)),t+=r*r;return Math.sqrt(t/e.length)>=w$&&n>=T$?this.speechFramesDuringPlayback+=1:this.speechFramesDuringPlayback=0,this.speechFramesDuringPlayback>=E$}},O$=`generativelanguage.googleapis.com`,k$=/^\/ws\/google\.ai\.generativelanguage\.v[0-9a-z]+\.GenerativeService\.BidiGenerateContent(?:Constrained)?$/;function A$(e){let t;try{t=new URL(e.websocketUrl)}catch{throw Error(`Invalid Google Live WebSocket URL`)}if(t.protocol!==`wss:`)throw Error(`Google Live WebSocket URL must use wss://`);if(t.hostname.toLowerCase()!==O$)throw Error(`Untrusted Google Live WebSocket host`);if(t.username||t.password)throw Error(`Google Live WebSocket URL must not include credentials`);if(!k$.test(t.pathname))throw Error(`Untrusted Google Live WebSocket path`);return t.search=``,t.searchParams.set(`access_token`,e.clientSecret),t.toString()}var j$=class{constructor(e,t){this.session=e,this.ctx=t,this.ws=null,this.media=null,this.inputContext=null,this.outputContext=null,this.inputSource=null,this.inputProcessor=null,this.closed=!1,this.pendingCalls=new Map,this.consultAbortControllers=new Set,this.outputQueue=new h$,this.emitTalkEvent=_$(t,e)}async start(){if(!navigator.mediaDevices?.getUserMedia||typeof WebSocket>`u`)throw Error(`Realtime Talk requires browser WebSocket and microphone access`);if(this.session.protocol!==`google-live-bidi`)throw Error(`Unsupported realtime WebSocket protocol: ${this.session.protocol}`);let e=A$(this.session);this.closed=!1,this.media=await navigator.mediaDevices.getUserMedia({audio:!0}),this.inputContext=new AudioContext({sampleRate:this.session.audio.inputSampleRateHz}),this.outputContext=new AudioContext({sampleRate:this.session.audio.outputSampleRateHz}),this.ws=new WebSocket(e),this.ws.binaryType=`arraybuffer`,this.ws.addEventListener(`open`,()=>{this.closed||(this.send(this.session.initialMessage??{setup:{}}),this.startMicrophonePump())}),this.ws.addEventListener(`message`,e=>{this.handleMessage(e.data)}),this.ws.addEventListener(`close`,()=>{this.closed||this.ctx.callbacks.onStatus?.(`error`,`Realtime connection closed`)}),this.ws.addEventListener(`error`,()=>{this.closed||this.ctx.callbacks.onStatus?.(`error`,`Realtime connection failed`)})}stop(){this.closed||this.emitTalkEvent({type:`session.closed`,final:!0}),this.closed=!0;for(let e of this.consultAbortControllers)e.abort();this.consultAbortControllers.clear(),this.pendingCalls.clear(),this.inputProcessor?.disconnect(),this.inputProcessor=null,this.inputSource?.disconnect(),this.inputSource=null,this.media?.getTracks().forEach(e=>e.stop()),this.media=null,this.stopOutput(),this.inputContext?.close(),this.inputContext=null,this.outputContext?.close(),this.outputContext=null,this.ws?.close(),this.ws=null}startMicrophonePump(){this.closed||!this.media||!this.inputContext||(this.inputSource=this.inputContext.createMediaStreamSource(this.media),this.inputProcessor=this.inputContext.createScriptProcessor(4096,1,1),this.inputProcessor.onaudioprocess=e=>{if(this.ws?.readyState!==WebSocket.OPEN)return;let t=p$(e.inputBuffer.getChannelData(0));this.send({realtimeInput:{audio:{data:d$(t),mimeType:`audio/pcm;rate=${this.inputContext?.sampleRate??16e3}`}}})},this.inputSource.connect(this.inputProcessor),this.inputProcessor.connect(this.inputContext.destination))}send(e){!this.closed&&this.ws?.readyState===WebSocket.OPEN&&this.ws.send(JSON.stringify(e))}async handleMessage(e){if(this.closed)return;let t;try{t=JSON.parse(await M$(e))}catch{return}if(this.closed)return;t.setupComplete&&(this.ctx.callbacks.onStatus?.(`listening`),this.emitTalkEvent({type:`session.ready`}));let n=t.serverContent;n?.interrupted&&(this.stopOutput(),this.emitTalkEvent({type:`turn.cancelled`,final:!0,payload:{reason:`provider-interrupted`}})),n?.inputTranscription?.text&&(this.ctx.callbacks.onTranscript?.({role:`user`,text:n.inputTranscription.text,final:n.inputTranscription.finished??!1}),this.emitTalkEvent({type:n.inputTranscription.finished?`transcript.done`:`transcript.delta`,final:n.inputTranscription.finished??!1,payload:{role:`user`,text:n.inputTranscription.text}})),n?.outputTranscription?.text&&(this.ctx.callbacks.onTranscript?.({role:`assistant`,text:n.outputTranscription.text,final:n.outputTranscription.finished??!1}),this.emitTalkEvent({type:n.outputTranscription.finished?`output.text.done`:`output.text.delta`,final:n.outputTranscription.finished??!1,payload:{text:n.outputTranscription.text}}));for(let e of n?.modelTurn?.parts??[])e.inlineData?.data?(this.emitTalkEvent({type:`output.audio.delta`,payload:{byteLength:f$(e.inlineData.data).byteLength,mimeType:e.inlineData.mimeType}}),this.playPcm16(e.inlineData.data)):!e.thought&&typeof e.text==`string`&&e.text.trim()&&(this.ctx.callbacks.onTranscript?.({role:`assistant`,text:e.text,final:n?.turnComplete??!1}),this.emitTalkEvent({type:n?.turnComplete?`output.text.done`:`output.text.delta`,final:n?.turnComplete??!1,payload:{text:e.text}}));n?.turnComplete&&this.emitTalkEvent({type:`turn.ended`,final:!0});for(let e of t.toolCall?.functionCalls??[])this.handleToolCall(e)}playPcm16(e){this.outputQueue.play(e,this.outputContext,this.session.audio.outputSampleRateHz)}stopOutput(){this.outputQueue.stop(this.outputContext)}async handleToolCall(e){let t=e.name?.trim(),n=e.id?.trim();if(!t||!n||(this.pendingCalls.set(n,{name:t,args:e.args??{}}),this.emitTalkEvent({type:`tool.call`,callId:n,payload:{name:t,args:e.args??{}}}),t!==`daocore_agent_consult`))return;let r=new AbortController;this.consultAbortControllers.add(r);try{await S$({ctx:this.createActiveContext(),callId:n,args:e.args??{},signal:r.signal,submit:(e,t)=>this.submitToolResult(e,t)})}finally{this.consultAbortControllers.delete(r)}}createActiveContext(){return{...this.ctx,callbacks:{onStatus:(e,t)=>{this.closed||this.ctx.callbacks.onStatus?.(e,t)},onTranscript:e=>{this.closed||this.ctx.callbacks.onTranscript?.(e)}}}}submitToolResult(e,t){let n=this.pendingCalls.get(e);n&&(this.pendingCalls.delete(e),this.send({toolResponse:{functionResponses:[{id:e,name:n.name,scheduling:`WHEN_IDLE`,response:t&&typeof t==`object`&&!Array.isArray(t)?t:{output:t}}]}}))}};async function M$(e){return typeof e==`string`?e:(typeof Blob<`u`&&e instanceof Blob&&(e=await e.arrayBuffer()),N$(e)?new TextDecoder().decode(new Uint8Array(e)):ArrayBuffer.isView(e)?new TextDecoder().decode(new Uint8Array(e.buffer,e.byteOffset,e.byteLength)):String(e))}function N$(e){return e instanceof ArrayBuffer||Object.prototype.toString.call(e)===`[object ArrayBuffer]`}var P$=class{constructor(e,t){this.session=e,this.ctx=t,this.peer=null,this.channel=null,this.media=null,this.audio=null,this.closed=!1,this.toolBuffers=new Map,this.consultAbortControllers=new Set,this.emitTalkEvent=_$(t,e)}async start(){if(!navigator.mediaDevices?.getUserMedia||typeof RTCPeerConnection>`u`)throw Error(`Realtime Talk requires browser WebRTC and microphone access`);this.closed=!1,this.peer=new RTCPeerConnection,this.audio=document.createElement(`audio`),this.audio.autoplay=!0,this.audio.style.display=`none`,document.body.append(this.audio),this.peer.addEventListener(`track`,e=>{this.audio&&(this.audio.srcObject=e.streams[0])}),this.media=await navigator.mediaDevices.getUserMedia({audio:!0});for(let e of this.media.getAudioTracks())this.peer.addTrack(e,this.media);this.channel=this.peer.createDataChannel(`oai-events`),this.channel.addEventListener(`open`,()=>{this.ctx.callbacks.onStatus?.(`listening`),this.emitTalkEvent({type:`session.ready`})}),this.channel.addEventListener(`message`,e=>this.handleRealtimeEvent(e.data)),this.peer.addEventListener(`connectionstatechange`,()=>{this.closed||(this.peer?.connectionState===`failed`||this.peer?.connectionState===`closed`)&&this.ctx.callbacks.onStatus?.(`error`,`Realtime connection closed`)});let e=await this.peer.createOffer();await this.peer.setLocalDescription(e);let t=await fetch(this.session.offerUrl??`https://api.openai.com/v1/realtime/calls`,{method:`POST`,body:e.sdp,headers:{...this.session.offerHeaders,Authorization:`Bearer ${this.session.clientSecret}`,"Content-Type":`application/sdp`}});if(!t.ok)throw Error(`Realtime WebRTC setup failed (${t.status})`);await this.peer.setRemoteDescription({type:`answer`,sdp:await t.text()})}stop(){this.closed||this.emitTalkEvent({type:`session.closed`,final:!0}),this.closed=!0,this.channel?.close(),this.channel=null,this.peer?.close(),this.peer=null,this.media?.getTracks().forEach(e=>e.stop()),this.media=null,this.audio?.remove(),this.audio=null;for(let e of this.consultAbortControllers)e.abort();this.consultAbortControllers.clear(),this.toolBuffers.clear()}send(e){this.channel?.readyState===`open`&&this.channel.send(JSON.stringify(e))}handleRealtimeEvent(e){if(this.closed)return;let t;try{t=JSON.parse(String(e))}catch{return}switch(t.type){case`conversation.item.input_audio_transcription.completed`:t.transcript&&(this.ctx.callbacks.onTranscript?.({role:`user`,text:t.transcript,final:!0}),this.emitTalkEvent({type:`transcript.done`,final:!0,itemId:t.item_id,payload:{role:`user`,text:t.transcript}}));return;case`response.audio_transcript.done`:t.transcript&&(this.ctx.callbacks.onTranscript?.({role:`assistant`,text:t.transcript,final:!0}),this.emitTalkEvent({type:`output.text.done`,final:!0,itemId:t.item_id,payload:{text:t.transcript}}));return;case`response.function_call_arguments.delta`:this.bufferToolDelta(t);return;case`response.function_call_arguments.done`:this.handleToolCall(t);return;case`input_audio_buffer.speech_started`:this.ctx.callbacks.onStatus?.(`listening`,`Speech detected`),this.emitTalkEvent({type:`turn.started`,payload:{source:t.type}});return;case`input_audio_buffer.speech_stopped`:this.ctx.callbacks.onStatus?.(`thinking`,`Processing speech`),this.emitTalkEvent({type:`input.audio.committed`,final:!0});return;case`response.created`:this.ctx.callbacks.onStatus?.(`thinking`,`Generating response`);return;case`response.done`:this.ctx.callbacks.onStatus?.(`listening`,this.extractResponseStatus(t)),this.emitTalkEvent({type:`turn.ended`,final:!0,payload:{status:t.response?.status??`completed`}});return;case`error`:this.ctx.callbacks.onStatus?.(`error`,this.extractErrorDetail(t.error)),this.emitTalkEvent({type:`session.error`,final:!0,payload:{message:this.extractErrorDetail(t.error)}});return;default:return}}extractResponseStatus(e){let t=e.response?.status;return t&&t!==`completed`?`Response ${t}`:void 0}extractErrorDetail(e){if(!e||typeof e!=`object`)return`Realtime provider error`;let t=e,n=typeof t.message==`string`?t.message.trim():``,r=typeof t.code==`string`?t.code.trim():``,i=typeof t.type==`string`?t.type.trim():``;return n||r||i||`Realtime provider error`}bufferToolDelta(e){let t=e.item_id??`unknown`,n=this.toolBuffers.get(t);if(n){n.args+=e.delta??``;return}this.toolBuffers.set(t,{name:e.name??``,callId:e.call_id??``,args:e.delta??``})}async handleToolCall(e){let t=e.item_id??`unknown`,n=this.toolBuffers.get(t);this.toolBuffers.delete(t);let r=n?.name||e.name||``,i=n?.callId||e.call_id||``;if(r!==`daocore_agent_consult`||!i)return;this.emitTalkEvent({type:`tool.call`,callId:i,itemId:t,payload:{name:r,args:n?.args||e.arguments||`{}`}});let a=new AbortController;this.consultAbortControllers.add(a);try{await S$({ctx:this.ctx,callId:i,args:n?.args||e.arguments||`{}`,signal:a.signal,submit:(e,t)=>this.submitToolResult(e,t)})}finally{this.consultAbortControllers.delete(a)}}submitToolResult(e,t){this.send({type:`conversation.item.create`,item:{type:`function_call_output`,call_id:e,output:JSON.stringify(t)}}),this.send({type:`response.create`})}};function F$(e,t){let n=I$(e);if(n===`webrtc`)return new P$(e,t);if(n===`provider-websocket`)return new j$(e,t);if(n===`gateway-relay`)return new D$(e,t);if(n===`managed-room`)throw Error(`Managed-room realtime Talk sessions are not available in this UI yet`);let r=e.transport??`unknown`;throw Error(`Unsupported realtime Talk transport: ${r}`)}function I$(e){return l$(e.transport)??`webrtc`}function L$(e){return Object.fromEntries(Object.entries(e).filter(([,e])=>e!==void 0))}var R$=class{constructor(e,t,n={},r={}){this.client=e,this.sessionKey=t,this.callbacks=n,this.options=r,this.transport=null,this.closed=!1}async start(){this.closed=!1,this.callbacks.onStatus?.(`connecting`);let e=await this.createSession();this.closed||(this.transport=F$(e,{client:this.client,sessionKey:this.sessionKey,callbacks:this.callbacks,consultThinkingLevel:e.consultThinkingLevel,consultFastMode:e.consultFastMode}),await this.transport.start())}async createSession(){try{return await this.client.request(`talk.client.create`,L$({sessionKey:this.sessionKey,...this.options}))}catch(e){if(this.options.transport&&this.options.transport!==`gateway-relay`)throw e;try{return await this.client.request(`talk.session.create`,L$({sessionKey:this.sessionKey,...this.options,mode:`realtime`,transport:this.options.transport??`gateway-relay`,brain:`agent-consult`}))}catch{throw e}}}stop(){this.closed=!0,this.callbacks.onStatus?.(`idle`),this.transport?.stop(),this.transport=null}},z$=vp({}),B$=Qm();function V$(){if(!window.location.search)return!1;let e=new URLSearchParams(window.location.search).get(`onboarding`);if(!e)return!1;let t=e.trim().toLowerCase();return t===`1`||t===`true`||t===`yes`||t===`on`}var $=class extends Ve{constructor(){super(),this.i18nController=new ut(this),this.clientInstanceId=Or(),this.connectGeneration=0,this.settings=Xm(),this.password=``,this.loginShowGatewayToken=!1,this.loginShowGatewayPassword=!1,this.tab=`chat`,this.onboarding=V$(),this.connected=!1,this.theme=this.settings.theme??`claw`,this.themeMode=this.settings.themeMode??`system`,this.themeResolved=`dark`,this.themeOrder=this.buildThemeOrder(this.theme),this.customThemeImportUrl=``,this.customThemeImportBusy=!1,this.customThemeImportMessage=null,this.customThemeImportExpanded=!1,this.customThemeImportFocusToken=0,this.customThemeImportSelectOnSuccess=!1,this.hello=null,this.lastError=null,this.lastErrorCode=null,this.eventLog=[],this.eventLogBuffer=[],this.toolStreamSyncTimer=null,this.sidebarCloseTimer=null,this.assistantName=z$.name,this.assistantAvatar=z$.avatar,this.assistantAvatarSource=z$.avatarSource??null,this.assistantAvatarStatus=z$.avatarStatus??null,this.assistantAvatarReason=z$.avatarReason??null,this.assistantAvatarUploadBusy=!1,this.assistantAvatarUploadError=null,this.assistantAgentId=z$.agentId??null,this.userName=B$.name,this.userAvatar=B$.avatar,this.localMediaPreviewRoots=[],this.embedSandboxMode=`scripts`,this.allowExternalEmbedUrls=!1,this.chatMessageMaxWidth=null,this.serverVersion=null,this.sessionKey=this.settings.sessionKey,this.currentSessionId=null,this.chatLoading=!1,this.chatSending=!1,this.chatMessage=``,this.chatMessages=[],this.chatToolMessages=[],this.chatStreamSegments=[],this.chatStream=null,this.chatStreamStartedAt=null,this.chatRunId=null,this.chatSideResult=null,this.compactionStatus=null,this.fallbackStatus=null,this.chatRunStatus=null,this.chatRunStatusClearTimer=null,this.chatAvatarUrl=null,this.chatAvatarSource=null,this.chatAvatarStatus=null,this.chatAvatarReason=null,this.chatThinkingLevel=null,this.chatModelOverrides={},this.chatModelSwitchPromises={},this.chatModelsLoading=!1,this.chatModelCatalog=[],this.sessionSwitchNotice=null,this.sessionSwitchFlashKey=null,this.chatSessionPickerOpen=!1,this.chatSessionPickerSurface=null,this.chatSessionPickerQuery=``,this.chatSessionPickerAppliedQuery=``,this.chatSessionPickerLoading=!1,this.chatSessionPickerError=null,this.chatSessionPickerResult=null,this.sessionSwitchNoticeSeq=0,this.sessionSwitchNoticeTimer=null,this.sessionSwitchFlashTimer=null,this.chatQueue=[],this.chatQueueBySession={},this.chatAttachments=[],this.realtimeTalkActive=!1,this.realtimeTalkStatus=`idle`,this.realtimeTalkDetail=null,this.realtimeTalkTranscript=null,this.realtimeTalkConversation=[],this.realtimeTalkOptionsOpen=!1,this.realtimeTalkOptions={provider:``,model:``,voice:``,transport:``,vadThreshold:``,silenceDurationMs:``,prefixPaddingMs:``,reasoningEffort:``,apiKey:``,endpoint:``},this.realtimeTalkSession=null,this.realtimeTalkConversationState=XQ(),this.nativeBridgeCleanup=null,this.chatManualRefreshInFlight=!1,this.chatHeaderControlsHidden=!1,this.chatMobileControlsOpen=!1,this.chatMobileControlsTrigger=null,this.navDrawerOpen=!1,this.chatLocalInputHistoryBySession={},this.chatInputHistorySessionKey=null,this.chatInputHistoryItems=null,this.chatInputHistoryIndex=-1,this.chatDraftBeforeHistory=null,this.sidebarOpen=!1,this.sidebarContent=null,this.sidebarError=null,this.splitRatio=this.settings.splitRatio,this.nodesLoading=!1,this.nodes=[],this.devicesLoading=!1,this.devicesError=null,this.devicesList=null,this.execApprovalsLoading=!1,this.execApprovalsSaving=!1,this.execApprovalsDirty=!1,this.execApprovalsSnapshot=null,this.execApprovalsForm=null,this.execApprovalsSelectedAgent=null,this.execApprovalsTarget=`gateway`,this.execApprovalsTargetNodeId=null,this.execApprovalQueue=[],this.execApprovalBusy=!1,this.execApprovalError=null,this.pendingGatewayUrl=null,this.pendingGatewayToken=null,this.configLoading=!1,this.configRaw=`{
7381
7381
  }
7382
- `,this.configRawOriginal=``,this.configValid=null,this.configIssues=[],this.configSaving=!1,this.configApplying=!1,this.updateRunning=!1,this.applySessionKey=this.settings.lastActiveSessionKey,this.configSnapshot=null,this.configSchema=null,this.configSchemaVersion=null,this.configSchemaLoading=!1,this.configUiHints={},this.configForm=null,this.configFormOriginal=null,this.dreamingStatusLoading=!1,this.dreamingStatusError=null,this.dreamingStatus=null,this.dreamingModeSaving=!1,this.dreamingRestartConfirmOpen=!1,this.dreamingRestartConfirmLoading=!1,this.dreamingPendingEnabled=null,this.dreamDiaryLoading=!1,this.dreamDiaryActionLoading=!1,this.dreamDiaryActionMessage=null,this.dreamDiaryActionArchivePath=null,this.dreamDiaryError=null,this.dreamDiaryPath=null,this.dreamDiaryContent=null,this.wikiImportInsightsLoading=!1,this.wikiImportInsightsError=null,this.wikiImportInsights=null,this.wikiMemoryPalaceLoading=!1,this.wikiMemoryPalaceError=null,this.wikiMemoryPalace=null,this.configFormDirty=!1,this.configSettingsMode=`quick`,this.configFormMode=`form`,this.configSearchQuery=``,this.configActiveSection=null,this.configActiveSubsection=null,this.pendingUpdateExpectedVersion=null,this.updateStatusBanner=null,this.communicationsFormMode=`form`,this.communicationsSearchQuery=``,this.communicationsActiveSection=null,this.communicationsActiveSubsection=null,this.appearanceFormMode=`form`,this.appearanceSearchQuery=``,this.appearanceActiveSection=null,this.appearanceActiveSubsection=null,this.automationFormMode=`form`,this.automationSearchQuery=``,this.automationActiveSection=null,this.automationActiveSubsection=null,this.infrastructureFormMode=`form`,this.infrastructureSearchQuery=``,this.infrastructureActiveSection=null,this.infrastructureActiveSubsection=null,this.aiAgentsFormMode=`form`,this.aiAgentsSearchQuery=``,this.aiAgentsActiveSection=null,this.aiAgentsActiveSubsection=null,this.channelsLoading=!1,this.channelsSnapshot=null,this.channelsError=null,this.channelsLastSuccess=null,this.whatsappLoginMessage=null,this.whatsappLoginQrDataUrl=null,this.whatsappLoginConnected=null,this.whatsappBusy=!1,this.nostrProfileFormState=null,this.nostrProfileAccountId=null,this.presenceLoading=!1,this.presenceEntries=[],this.presenceError=null,this.presenceStatus=null,this.agentsLoading=!1,this.agentsList=null,this.agentsError=null,this.agentsSelectedId=null,this.toolsCatalogLoading=!1,this.toolsCatalogError=null,this.toolsCatalogResult=null,this.toolsEffectiveLoading=!1,this.toolsEffectiveLoadingKey=null,this.toolsEffectiveResultKey=null,this.toolsEffectiveError=null,this.toolsEffectiveResult=null,this.agentsPanel=`files`,this.agentFilesLoading=!1,this.agentFilesError=null,this.agentFilesList=null,this.agentFileContents={},this.agentFileDrafts={},this.agentFileActive=null,this.agentFileSaving=!1,this.agentIdentityLoading=!1,this.agentIdentityError=null,this.agentIdentityById={},this.agentSkillsLoading=!1,this.agentSkillsError=null,this.agentSkillsReport=null,this.agentSkillsAgentId=null,this.sessionsLoading=!1,this.sessionsResult=null,this.sessionsError=null,this.sessionsFilterActive=cC.activeMinutes,this.sessionsFilterLimit=cC.limit,this.sessionsIncludeGlobal=!0,this.sessionsIncludeUnknown=!1,this.sessionsShowArchived=!1,this.sessionsFiltersCollapsed=!1,this.sessionsHideCron=!0,this.sessionsSearchQuery=``,this.sessionsSortColumn=`updated`,this.sessionsSortDir=`desc`,this.sessionsPage=0,this.sessionsPageSize=25,this.sessionsSelectedKeys=new Set,this.sessionsExpandedCheckpointKey=null,this.sessionsCheckpointItemsByKey={},this.sessionsCheckpointLoadingKey=null,this.sessionsCheckpointBusyKey=null,this.sessionsCheckpointErrorByKey={},this.usageLoading=!1,this.usageResult=null,this.usageCostSummary=null,this.usageError=null,this.usageStartDate=(()=>{let e=new Date;return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,`0`)}-${String(e.getDate()).padStart(2,`0`)}`})(),this.usageEndDate=(()=>{let e=new Date;return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,`0`)}-${String(e.getDate()).padStart(2,`0`)}`})(),this.usageScope=`family`,this.usageSelectedSessions=[],this.usageSelectedDays=[],this.usageSelectedHours=[],this.usageChartMode=`tokens`,this.usageDailyChartMode=`by-type`,this.usageTimeSeriesMode=`per-turn`,this.usageTimeSeriesBreakdownMode=`by-type`,this.usageTimeSeries=null,this.usageTimeSeriesLoading=!1,this.usageTimeSeriesCursorStart=null,this.usageTimeSeriesCursorEnd=null,this.usageSessionLogs=null,this.usageSessionLogsLoading=!1,this.usageSessionLogsExpanded=!1,this.usageQuery=``,this.usageQueryDraft=``,this.usageSessionSort=`recent`,this.usageSessionSortDir=`desc`,this.usageRecentSessions=[],this.usageTimeZone=`local`,this.usageContextExpanded=!1,this.usageHeaderPinned=!1,this.usageSessionsTab=`all`,this.usageVisibleColumns=[`channel`,`agent`,`provider`,`model`,`messages`,`tools`,`errors`,`duration`],this.usageLogFilterRoles=[],this.usageLogFilterTools=[],this.usageLogFilterHasTools=!1,this.usageLogFilterQuery=``,this.usageQueryDebounceTimer=null,this.cronLoading=!1,this.cronQuickCreateOpen=!1,this.cronQuickCreateStep=`what`,this.cronQuickCreateDraft=null,this.cronJobsLoadingMore=!1,this.cronJobs=[],this.cronJobsTotal=0,this.cronJobsHasMore=!1,this.cronJobsNextOffset=null,this.cronJobsLimit=50,this.cronJobsQuery=``,this.cronJobsEnabledFilter=`all`,this.cronJobsScheduleKindFilter=`all`,this.cronJobsLastStatusFilter=`all`,this.cronJobsSortBy=`nextRunAtMs`,this.cronJobsSortDir=`asc`,this.cronStatus=null,this.cronError=null,this.cronForm={...lC},this.cronFormCollapsed=!0,this.cronFieldErrors={},this.cronEditingJobId=null,this.cronRunsJobId=null,this.cronRunsLoadingMore=!1,this.cronRuns=[],this.cronRunsTotal=0,this.cronRunsHasMore=!1,this.cronRunsNextOffset=null,this.cronRunsLimit=50,this.cronRunsScope=`all`,this.cronRunsStatuses=[],this.cronRunsDeliveryStatuses=[],this.cronRunsStatusFilter=`all`,this.cronRunsQuery=``,this.cronRunsSortDir=`desc`,this.cronModelSuggestions=[],this.cronBusy=!1,this.updateAvailable=null,this.attentionItems=[],this.paletteOpen=!1,this.paletteQuery=``,this.paletteActiveIndex=0,this.overviewShowGatewayToken=!1,this.overviewShowGatewayPassword=!1,this.overviewLogLines=[],this.overviewLogCursor=0,this.skillsLoading=!1,this.skillsReport=null,this.skillsError=null,this.skillsFilter=``,this.skillsStatusFilter=`all`,this.skillEdits={},this.skillsBusyKey=null,this.skillMessages={},this.skillsDetailKey=null,this.clawhubSearchQuery=``,this.clawhubSearchResults=null,this.clawhubSearchLoading=!1,this.clawhubSearchError=null,this.clawhubDetail=null,this.clawhubDetailSlug=null,this.clawhubDetailLoading=!1,this.clawhubDetailError=null,this.clawhubInstallSlug=null,this.clawhubInstallMessage=null,this.healthLoading=!1,this.healthResult=null,this.healthError=null,this.modelAuthStatusLoading=!1,this.modelAuthStatusResult=null,this.modelAuthStatusError=null,this.debugLoading=!1,this.debugStatus=null,this.debugHealth=null,this.debugModels=[],this.debugHeartbeat=null,this.debugCallMethod=``,this.debugCallParams=`{}`,this.debugCallResult=null,this.debugCallError=null,this.webPushSupported=!1,this.webPushPermission=`unsupported`,this.webPushSubscribed=!1,this.webPushLoading=!1,this.logsLoading=!1,this.logsError=null,this.logsFile=null,this.logsEntries=[],this.logsFilterText=``,this.logsLevelFilters={...sC},this.logsAutoFollow=!0,this.logsTruncated=!1,this.logsCursor=null,this.logsLastFetchAt=null,this.logsLimit=500,this.logsMaxBytes=25e4,this.logsAtBottom=!0,this.client=null,this.chatScrollFrame=null,this.chatScrollTimeout=null,this.chatLastScrollTop=0,this.chatHasAutoScrolled=!1,this.chatUserNearBottom=!0,this.chatIsProgrammaticScroll=!1,this.chatProgrammaticScrollTarget=0,this.chatNewMessagesBelow=!1,this.nodesPollInterval=null,this.logsPollInterval=null,this.debugPollInterval=null,this.sessionsChangedReloadTimer=null,this.logsScrollFrame=null,this.controlUiResponsivenessObserver=null,this.toolStreamById=new Map,this.toolStreamOrder=[],this.refreshSessionsAfterChat=new Set,this.chatSideResultTerminalRuns=new Set,this.basePath=``,this.popStateHandler=()=>VV(this),this.topbarObserver=null,this.globalKeydownHandler=e=>{(e.metaKey||e.ctrlKey)&&!e.shiftKey&&e.key===`k`&&(e.preventDefault(),this.paletteOpen=!this.paletteOpen,this.paletteOpen&&(this.paletteQuery=``,this.paletteActiveIndex=0))},this.chatMobileControlsKeydownHandler=e=>{if(e.key===`Escape`){if(this.chatSessionPickerOpen){e.preventDefault(),this.chatSessionPickerOpen=!1,this.chatSessionPickerSurface=null;return}this.chatMobileControlsOpen&&(e.preventDefault(),this.setChatMobileControlsOpen(!1,{restoreFocus:!0}))}},this.chatMobileControlsPointerdownHandler=e=>{let t=e.composedPath();if(this.chatSessionPickerOpen&&(Array.from(this.querySelectorAll(`.chat-controls__session-picker`)).some(e=>t.includes(e))||(this.chatSessionPickerOpen=!1,this.chatSessionPickerSurface=null)),!this.chatMobileControlsOpen)return;let n=this.querySelector(`.chat-mobile-controls-wrapper`);n&&t.includes(n)||this.setChatMobileControlsOpen(!1)},at(this.settings.locale)&&lt.setLocale(this.settings.locale)}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.onSlashAction=async e=>{switch(e){case`new-session`:await tG(this);break;case`toggle-focus`:this.applySettings({...this.settings,chatFocusMode:!this.settings.chatFocusMode});break;case`export`:Wj(this.chatMessages,this.assistantName);break;case`refresh-tools-effective`:await ww(this);break}},document.addEventListener(`keydown`,this.globalKeydownHandler),document.addEventListener(`keydown`,this.chatMobileControlsKeydownHandler),document.addEventListener(`pointerdown`,this.chatMobileControlsPointerdownHandler),aU(this),this.nativeBridgeCleanup=hU(this),this.initWebPushState()}firstUpdated(){oU(this)}disconnectedCallback(){document.removeEventListener(`keydown`,this.globalKeydownHandler),this.nativeBridgeCleanup?.(),this.nativeBridgeCleanup=null,document.removeEventListener(`keydown`,this.chatMobileControlsKeydownHandler),document.removeEventListener(`pointerdown`,this.chatMobileControlsPointerdownHandler),this.sessionSwitchNoticeTimer!==null&&(window.clearTimeout(this.sessionSwitchNoticeTimer),this.sessionSwitchNoticeTimer=null),this.sessionSwitchFlashTimer!==null&&(window.clearTimeout(this.sessionSwitchFlashTimer),this.sessionSwitchFlashTimer=null),this.chatMobileControlsTrigger=null,uU(this),super.disconnectedCallback()}updated(e){if(dU(this,e),e.has(`tab`)&&this.tab!==`chat`&&this.chatMobileControlsOpen&&this.setChatMobileControlsOpen(!1),!e.has(`sessionKey`)||this.agentsPanel!==`tools`)return;let t=Yg(this.sessionKey);if(this.agentsSelectedId&&this.agentsSelectedId===t){xw(this,{agentId:this.agentsSelectedId,sessionKey:this.sessionKey});return}this.toolsEffectiveResult=null,this.toolsEffectiveResultKey=null,this.toolsEffectiveError=null,this.toolsEffectiveLoading=!1,this.toolsEffectiveLoadingKey=null}connect(){YH(this)}handleChatScroll(e){lh(this,e)}handleLogsScroll(e){uh(this,e)}exportLogs(e,t){fh(e,t)}resetToolStream(){__(this)}resetChatScroll(){dh(this)}scrollToBottom(e){dh(this),sh(this,!0,!!e?.smooth,{source:`manual`})}async loadAssistantIdentity(){await cH(this)}applySettings(e){yV(this,e)}applyLocalUserIdentity(e){bV(this,e)}setTab(e){TV(this,e),e!==`chat`&&this.setChatMobileControlsOpen(!1),this.navDrawerOpen=!1}setChatMobileControlsOpen(e,t){if(e){this.chatMobileControlsTrigger=t?.trigger??this.chatMobileControlsTrigger,this.chatMobileControlsOpen=!0;return}let n=t?.restoreFocus?this.chatMobileControlsTrigger:null;this.chatMobileControlsOpen=!1,this.chatSessionPickerSurface===`mobile`&&(this.chatSessionPickerOpen=!1,this.chatSessionPickerSurface=null),this.chatMobileControlsTrigger=null,!(!(n instanceof HTMLElement)||!n.isConnected)&&requestAnimationFrame(()=>{n.isConnected&&n.focus()})}setTheme(e,t){DV(this,e,t),this.themeOrder=this.buildThemeOrder(e)}setThemeMode(e,t){OV(this,e,t)}setCustomThemeImportUrl(e){this.customThemeImportUrl=e,this.customThemeImportMessage?.kind===`error`&&(this.customThemeImportMessage=null)}openCustomThemeImport(){this.customThemeImportExpanded=!0,this.customThemeImportFocusToken+=1,this.settings.customTheme||(this.customThemeImportSelectOnSuccess=!0)}async importCustomTheme(){if(!this.customThemeImportBusy){this.customThemeImportExpanded=!0,this.customThemeImportBusy=!0,this.customThemeImportMessage=null;try{let e=await Ef(this.customThemeImportUrl),t=this.theme===`custom`||!this.settings.customTheme||this.customThemeImportSelectOnSuccess;yV(this,{...this.settings,theme:t?`custom`:this.settings.theme,customTheme:e}),this.themeOrder=this.buildThemeOrder(t?`custom`:this.theme),this.customThemeImportUrl=``,this.customThemeImportSelectOnSuccess=!1,this.customThemeImportMessage={kind:`success`,text:`Imported ${e.label}.`}}catch(e){this.customThemeImportMessage={kind:`error`,text:e instanceof Error?e.message:`Failed to import tweakcn theme.`}}finally{this.customThemeImportBusy=!1}}}clearCustomTheme(){let e=this.theme===`custom`?`claw`:this.theme;this.customThemeImportExpanded=!0,this.customThemeImportSelectOnSuccess=!1,yV(this,{...this.settings,theme:e,customTheme:void 0}),this.themeOrder=this.buildThemeOrder(e),this.customThemeImportMessage={kind:`success`,text:`Cleared custom theme.`}}setBorderRadius(e){yV(this,{...this.settings,borderRadius:e}),this.requestUpdate()}setTextScale(e){yV(this,{...this.settings,textScale:e}),this.requestUpdate()}announceSessionSwitch(e,t){let n=++this.sessionSwitchNoticeSeq;this.sessionSwitchNoticeTimer!==null&&window.clearTimeout(this.sessionSwitchNoticeTimer),this.sessionSwitchFlashTimer!==null&&window.clearTimeout(this.sessionSwitchFlashTimer),this.sessionSwitchNotice={id:n,text:R(`chat.switchedSession`,{session:t})},this.sessionSwitchFlashKey=e,this.sessionSwitchFlashTimer=window.setTimeout(()=>{this.sessionSwitchNotice?.id===n&&(this.sessionSwitchFlashKey=null),this.sessionSwitchFlashTimer=null},200),this.sessionSwitchNoticeTimer=window.setTimeout(()=>{this.sessionSwitchNotice?.id===n&&(this.sessionSwitchNotice=null),this.sessionSwitchNoticeTimer=null},2800)}buildThemeOrder(e){return[e,...[...Wf].filter(t=>t!==e)]}async loadOverview(e){await JV(this,e)}async loadCron(){await eH(this)}async handleAbortChat(e){await CS(this,e)}handleChatDraftChange(e){Pv(this,e)}handleChatInputHistoryKey(e){return Rv(this,e)}resetChatInputHistoryNavigation(){Nv(this)}removeQueuedMessage(e){LS(this,e)}async handleSendChat(e,t){await zS(this,e,t)}updateRealtimeTalkOptions(e){this.realtimeTalkOptions={...this.realtimeTalkOptions,...e}}buildRealtimeTalkLaunchOptions(){let e=this.realtimeTalkOptions??{provider:``,model:``,voice:``,transport:``,vadThreshold:``,silenceDurationMs:``,prefixPaddingMs:``,reasoningEffort:``,apiKey:``,endpoint:``},t=e=>e.trim()||void 0,n=e=>{let t=e.trim();if(!t)return;let n=Number(t);return Number.isFinite(n)?n:void 0},r=t(e.transport);return{provider:t(e.provider),model:t(e.model),voice:t(e.voice),transport:r,vadThreshold:n(e.vadThreshold),silenceDurationMs:n(e.silenceDurationMs),prefixPaddingMs:n(e.prefixPaddingMs),reasoningEffort:t(e.reasoningEffort),apiKey:t(e.apiKey),endpoint:t(e.endpoint)}}async toggleRealtimeTalk(){if(this.realtimeTalkSession)if(this.realtimeTalkStatus===`error`)this.realtimeTalkSession.stop(),this.realtimeTalkSession=null;else{this.realtimeTalkSession.stop(),this.realtimeTalkSession=null,this.realtimeTalkActive=!1,this.realtimeTalkStatus=`idle`,this.realtimeTalkDetail=null,this.realtimeTalkTranscript=null,this.resetRealtimeTalkConversation();return}if(!this.client||!this.connected){this.lastError=`Gateway not connected`;return}this.realtimeTalkActive=!0,this.realtimeTalkStatus=`connecting`,this.realtimeTalkDetail=null,this.realtimeTalkTranscript=null,this.resetRealtimeTalkConversation();let e=new R$(this.client,this.sessionKey,{onStatus:(e,t)=>{this.realtimeTalkStatus=e,this.realtimeTalkDetail=t??null,(e===`idle`||e===`error`)&&(this.realtimeTalkActive=e!==`idle`)},onTranscript:e=>{this.realtimeTalkTranscript=`${e.role===`user`?`You`:`DaoCore`}: ${e.text}`,this.realtimeTalkConversationState=ZQ(this.realtimeTalkConversationState,e),this.realtimeTalkConversation=this.realtimeTalkConversationState.entries}},this.buildRealtimeTalkLaunchOptions());this.realtimeTalkSession=e;try{await e.start()}catch(t){e.stop(),this.realtimeTalkSession===e&&(this.realtimeTalkSession=null),this.realtimeTalkActive=!1,this.realtimeTalkStatus=`error`,this.realtimeTalkDetail=t instanceof Error?t.message:String(t),this.lastError=this.realtimeTalkDetail}}resetRealtimeTalkConversation(){this.realtimeTalkConversationState=XQ(),this.realtimeTalkConversation=[]}async steerQueuedChatMessage(e){await FS(this,e)}async handleWhatsAppStart(e){await wa(this,e)}async handleWhatsAppWait(){await Ta(this)}async handleWhatsAppLogout(){await Ea(this)}async handleChannelConfigSave(){await Da(this)}async handleChannelConfigReload(){await Oa(this)}handleNostrProfileEdit(e,t){Na(this,e,t)}handleNostrProfileCancel(){Pa(this)}handleNostrProfileFieldChange(e,t){Fa(this,e,t)}async handleNostrProfileSave(){await La(this)}async handleNostrProfileImport(){await Ra(this)}handleNostrProfileToggleAdvanced(){Ia(this)}async handleExecApprovalDecision(e){let t=this.execApprovalQueue[0];if(!(!t||!this.client||this.execApprovalBusy)){this.execApprovalBusy=!0,this.execApprovalError=null;try{let n=t.kind===`plugin`?`plugin.approval.resolve`:`exec.approval.resolve`;await this.client.request(n,{id:t.id,decision:e}),this.execApprovalQueue=this.execApprovalQueue.filter(e=>e.id!==t.id)}catch(e){this.execApprovalError=`Approval failed: ${String(e)}`}finally{this.execApprovalBusy=!1}}}handleGatewayUrlConfirm(){let e=this.pendingGatewayUrl;if(!e)return;let t=this.pendingGatewayToken?.trim()||``;this.pendingGatewayUrl=null,this.pendingGatewayToken=null,yV(this,{...this.settings,gatewayUrl:e,token:t}),this.connect()}handleGatewayUrlCancel(){this.pendingGatewayUrl=null,this.pendingGatewayToken=null}handleOpenSidebar(e){this.sidebarCloseTimer!=null&&(window.clearTimeout(this.sidebarCloseTimer),this.sidebarCloseTimer=null),this.sidebarContent=e,this.sidebarError=null,this.sidebarOpen=!0}handleCloseSidebar(){this.sidebarOpen=!1,this.sidebarCloseTimer!=null&&window.clearTimeout(this.sidebarCloseTimer),this.sidebarCloseTimer=window.setTimeout(()=>{this.sidebarOpen||(this.sidebarContent=null,this.sidebarError=null,this.sidebarCloseTimer=null)},200)}handleSplitRatioChange(e){let t=Math.max(.4,Math.min(.7,e));this.splitRatio=t,this.applySettings({...this.settings,splitRatio:t})}async initWebPushState(){let e=`serviceWorker`in navigator&&`PushManager`in window&&`Notification`in window;if(this.webPushSupported=e,this.webPushPermission=e?Notification.permission:`unsupported`,e)try{let{getExistingSubscription:e}=await L(async()=>{let{getExistingSubscription:e}=await import(`./push-subscription-TTvs1whj.js`);return{getExistingSubscription:e}},[],import.meta.url),t=await e();this.webPushSubscribed=t!==null}catch{}}async reconcileWebPushState(){if(this.client)try{let{getExistingSubscription:e}=await L(async()=>{let{getExistingSubscription:e}=await import(`./push-subscription-TTvs1whj.js`);return{getExistingSubscription:e}},[],import.meta.url),t=await e();if(!t)return;this.webPushSubscribed=!0;let n=t.toJSON();n.endpoint&&n.keys?.p256dh&&n.keys?.auth&&await this.client.request(`push.web.subscribe`,{endpoint:n.endpoint,keys:{p256dh:n.keys.p256dh,auth:n.keys.auth}})}catch{}}async handleWebPushSubscribe(){if(!(!this.client||this.webPushLoading)){this.webPushLoading=!0;try{let{subscribeToWebPush:e}=await L(async()=>{let{subscribeToWebPush:e}=await import(`./push-subscription-TTvs1whj.js`);return{subscribeToWebPush:e}},[],import.meta.url);await e(this.client),this.webPushSubscribed=!0,this.webPushPermission=Notification.permission}catch(e){this.lastError=String(e)}finally{this.webPushLoading=!1,`Notification`in window&&(this.webPushPermission=Notification.permission)}}}async handleWebPushUnsubscribe(){if(!(!this.client||this.webPushLoading)){this.webPushLoading=!0;try{let{unsubscribeFromWebPush:e}=await L(async()=>{let{unsubscribeFromWebPush:e}=await import(`./push-subscription-TTvs1whj.js`);return{unsubscribeFromWebPush:e}},[],import.meta.url);await e(this.client),this.webPushSubscribed=!1}catch(e){this.lastError=String(e)}finally{this.webPushLoading=!1}}}async handleWebPushTest(){if(this.client)try{let{sendTestWebPush:e}=await L(async()=>{let{sendTestWebPush:e}=await import(`./push-subscription-TTvs1whj.js`);return{sendTestWebPush:e}},[],import.meta.url);await e(this.client)}catch(e){this.lastError=String(e)}}render(){return JQ(this)}};if(X([I()],$.prototype,`settings`,void 0),X([I()],$.prototype,`password`,void 0),X([I()],$.prototype,`loginShowGatewayToken`,void 0),X([I()],$.prototype,`loginShowGatewayPassword`,void 0),X([I()],$.prototype,`tab`,void 0),X([I()],$.prototype,`onboarding`,void 0),X([I()],$.prototype,`connected`,void 0),X([I()],$.prototype,`theme`,void 0),X([I()],$.prototype,`themeMode`,void 0),X([I()],$.prototype,`themeResolved`,void 0),X([I()],$.prototype,`themeOrder`,void 0),X([I()],$.prototype,`customThemeImportUrl`,void 0),X([I()],$.prototype,`customThemeImportBusy`,void 0),X([I()],$.prototype,`customThemeImportMessage`,void 0),X([I()],$.prototype,`customThemeImportExpanded`,void 0),X([I()],$.prototype,`customThemeImportFocusToken`,void 0),X([I()],$.prototype,`hello`,void 0),X([I()],$.prototype,`lastError`,void 0),X([I()],$.prototype,`lastErrorCode`,void 0),X([I()],$.prototype,`eventLog`,void 0),X([I()],$.prototype,`assistantName`,void 0),X([I()],$.prototype,`assistantAvatar`,void 0),X([I()],$.prototype,`assistantAvatarSource`,void 0),X([I()],$.prototype,`assistantAvatarStatus`,void 0),X([I()],$.prototype,`assistantAvatarReason`,void 0),X([I()],$.prototype,`assistantAvatarUploadBusy`,void 0),X([I()],$.prototype,`assistantAvatarUploadError`,void 0),X([I()],$.prototype,`assistantAgentId`,void 0),X([I()],$.prototype,`userName`,void 0),X([I()],$.prototype,`userAvatar`,void 0),X([I()],$.prototype,`localMediaPreviewRoots`,void 0),X([I()],$.prototype,`embedSandboxMode`,void 0),X([I()],$.prototype,`allowExternalEmbedUrls`,void 0),X([I()],$.prototype,`chatMessageMaxWidth`,void 0),X([I()],$.prototype,`serverVersion`,void 0),X([I()],$.prototype,`sessionKey`,void 0),X([I()],$.prototype,`chatLoading`,void 0),X([I()],$.prototype,`chatSending`,void 0),X([I()],$.prototype,`chatMessage`,void 0),X([I()],$.prototype,`chatMessages`,void 0),X([I()],$.prototype,`chatToolMessages`,void 0),X([I()],$.prototype,`chatStreamSegments`,void 0),X([I()],$.prototype,`chatStream`,void 0),X([I()],$.prototype,`chatStreamStartedAt`,void 0),X([I()],$.prototype,`chatRunId`,void 0),X([I()],$.prototype,`chatSideResult`,void 0),X([I()],$.prototype,`compactionStatus`,void 0),X([I()],$.prototype,`fallbackStatus`,void 0),X([I()],$.prototype,`chatRunStatus`,void 0),X([I()],$.prototype,`chatAvatarUrl`,void 0),X([I()],$.prototype,`chatAvatarSource`,void 0),X([I()],$.prototype,`chatAvatarStatus`,void 0),X([I()],$.prototype,`chatAvatarReason`,void 0),X([I()],$.prototype,`chatThinkingLevel`,void 0),X([I()],$.prototype,`chatModelOverrides`,void 0),X([I()],$.prototype,`chatModelSwitchPromises`,void 0),X([I()],$.prototype,`chatModelsLoading`,void 0),X([I()],$.prototype,`chatModelCatalog`,void 0),X([I()],$.prototype,`sessionSwitchNotice`,void 0),X([I()],$.prototype,`sessionSwitchFlashKey`,void 0),X([I()],$.prototype,`chatSessionPickerOpen`,void 0),X([I()],$.prototype,`chatSessionPickerSurface`,void 0),X([I()],$.prototype,`chatSessionPickerQuery`,void 0),X([I()],$.prototype,`chatSessionPickerAppliedQuery`,void 0),X([I()],$.prototype,`chatSessionPickerLoading`,void 0),X([I()],$.prototype,`chatSessionPickerError`,void 0),X([I()],$.prototype,`chatSessionPickerResult`,void 0),X([I()],$.prototype,`chatQueue`,void 0),X([I()],$.prototype,`chatQueueBySession`,void 0),X([I()],$.prototype,`chatAttachments`,void 0),X([I()],$.prototype,`realtimeTalkActive`,void 0),X([I()],$.prototype,`realtimeTalkStatus`,void 0),X([I()],$.prototype,`realtimeTalkDetail`,void 0),X([I()],$.prototype,`realtimeTalkTranscript`,void 0),X([I()],$.prototype,`realtimeTalkConversation`,void 0),X([I()],$.prototype,`realtimeTalkOptionsOpen`,void 0),X([I()],$.prototype,`realtimeTalkOptions`,void 0),X([I()],$.prototype,`chatManualRefreshInFlight`,void 0),X([I()],$.prototype,`chatHeaderControlsHidden`,void 0),X([I()],$.prototype,`chatMobileControlsOpen`,void 0),X([I()],$.prototype,`navDrawerOpen`,void 0),X([I()],$.prototype,`chatInputHistoryIndex`,void 0),X([I()],$.prototype,`sidebarOpen`,void 0),X([I()],$.prototype,`sidebarContent`,void 0),X([I()],$.prototype,`sidebarError`,void 0),X([I()],$.prototype,`splitRatio`,void 0),X([I()],$.prototype,`nodesLoading`,void 0),X([I()],$.prototype,`nodes`,void 0),X([I()],$.prototype,`devicesLoading`,void 0),X([I()],$.prototype,`devicesError`,void 0),X([I()],$.prototype,`devicesList`,void 0),X([I()],$.prototype,`execApprovalsLoading`,void 0),X([I()],$.prototype,`execApprovalsSaving`,void 0),X([I()],$.prototype,`execApprovalsDirty`,void 0),X([I()],$.prototype,`execApprovalsSnapshot`,void 0),X([I()],$.prototype,`execApprovalsForm`,void 0),X([I()],$.prototype,`execApprovalsSelectedAgent`,void 0),X([I()],$.prototype,`execApprovalsTarget`,void 0),X([I()],$.prototype,`execApprovalsTargetNodeId`,void 0),X([I()],$.prototype,`execApprovalQueue`,void 0),X([I()],$.prototype,`execApprovalBusy`,void 0),X([I()],$.prototype,`execApprovalError`,void 0),X([I()],$.prototype,`pendingGatewayUrl`,void 0),X([I()],$.prototype,`configLoading`,void 0),X([I()],$.prototype,`configRaw`,void 0),X([I()],$.prototype,`configRawOriginal`,void 0),X([I()],$.prototype,`configValid`,void 0),X([I()],$.prototype,`configIssues`,void 0),X([I()],$.prototype,`configSaving`,void 0),X([I()],$.prototype,`configApplying`,void 0),X([I()],$.prototype,`updateRunning`,void 0),X([I()],$.prototype,`applySessionKey`,void 0),X([I()],$.prototype,`configSnapshot`,void 0),X([I()],$.prototype,`configSchema`,void 0),X([I()],$.prototype,`configSchemaVersion`,void 0),X([I()],$.prototype,`configSchemaLoading`,void 0),X([I()],$.prototype,`configUiHints`,void 0),X([I()],$.prototype,`configForm`,void 0),X([I()],$.prototype,`configFormOriginal`,void 0),X([I()],$.prototype,`dreamingStatusLoading`,void 0),X([I()],$.prototype,`dreamingStatusError`,void 0),X([I()],$.prototype,`dreamingStatus`,void 0),X([I()],$.prototype,`dreamingModeSaving`,void 0),X([I()],$.prototype,`dreamingRestartConfirmOpen`,void 0),X([I()],$.prototype,`dreamingRestartConfirmLoading`,void 0),X([I()],$.prototype,`dreamingPendingEnabled`,void 0),X([I()],$.prototype,`dreamDiaryLoading`,void 0),X([I()],$.prototype,`dreamDiaryActionLoading`,void 0),X([I()],$.prototype,`dreamDiaryActionMessage`,void 0),X([I()],$.prototype,`dreamDiaryActionArchivePath`,void 0),X([I()],$.prototype,`dreamDiaryError`,void 0),X([I()],$.prototype,`dreamDiaryPath`,void 0),X([I()],$.prototype,`dreamDiaryContent`,void 0),X([I()],$.prototype,`wikiImportInsightsLoading`,void 0),X([I()],$.prototype,`wikiImportInsightsError`,void 0),X([I()],$.prototype,`wikiImportInsights`,void 0),X([I()],$.prototype,`wikiMemoryPalaceLoading`,void 0),X([I()],$.prototype,`wikiMemoryPalaceError`,void 0),X([I()],$.prototype,`wikiMemoryPalace`,void 0),X([I()],$.prototype,`configFormDirty`,void 0),X([I()],$.prototype,`configSettingsMode`,void 0),X([I()],$.prototype,`configFormMode`,void 0),X([I()],$.prototype,`configSearchQuery`,void 0),X([I()],$.prototype,`configActiveSection`,void 0),X([I()],$.prototype,`configActiveSubsection`,void 0),X([I()],$.prototype,`pendingUpdateExpectedVersion`,void 0),X([I()],$.prototype,`updateStatusBanner`,void 0),X([I()],$.prototype,`communicationsFormMode`,void 0),X([I()],$.prototype,`communicationsSearchQuery`,void 0),X([I()],$.prototype,`communicationsActiveSection`,void 0),X([I()],$.prototype,`communicationsActiveSubsection`,void 0),X([I()],$.prototype,`appearanceFormMode`,void 0),X([I()],$.prototype,`appearanceSearchQuery`,void 0),X([I()],$.prototype,`appearanceActiveSection`,void 0),X([I()],$.prototype,`appearanceActiveSubsection`,void 0),X([I()],$.prototype,`automationFormMode`,void 0),X([I()],$.prototype,`automationSearchQuery`,void 0),X([I()],$.prototype,`automationActiveSection`,void 0),X([I()],$.prototype,`automationActiveSubsection`,void 0),X([I()],$.prototype,`infrastructureFormMode`,void 0),X([I()],$.prototype,`infrastructureSearchQuery`,void 0),X([I()],$.prototype,`infrastructureActiveSection`,void 0),X([I()],$.prototype,`infrastructureActiveSubsection`,void 0),X([I()],$.prototype,`aiAgentsFormMode`,void 0),X([I()],$.prototype,`aiAgentsSearchQuery`,void 0),X([I()],$.prototype,`aiAgentsActiveSection`,void 0),X([I()],$.prototype,`aiAgentsActiveSubsection`,void 0),X([I()],$.prototype,`channelsLoading`,void 0),X([I()],$.prototype,`channelsSnapshot`,void 0),X([I()],$.prototype,`channelsError`,void 0),X([I()],$.prototype,`channelsLastSuccess`,void 0),X([I()],$.prototype,`whatsappLoginMessage`,void 0),X([I()],$.prototype,`whatsappLoginQrDataUrl`,void 0),X([I()],$.prototype,`whatsappLoginConnected`,void 0),X([I()],$.prototype,`whatsappBusy`,void 0),X([I()],$.prototype,`nostrProfileFormState`,void 0),X([I()],$.prototype,`nostrProfileAccountId`,void 0),X([I()],$.prototype,`presenceLoading`,void 0),X([I()],$.prototype,`presenceEntries`,void 0),X([I()],$.prototype,`presenceError`,void 0),X([I()],$.prototype,`presenceStatus`,void 0),X([I()],$.prototype,`agentsLoading`,void 0),X([I()],$.prototype,`agentsList`,void 0),X([I()],$.prototype,`agentsError`,void 0),X([I()],$.prototype,`agentsSelectedId`,void 0),X([I()],$.prototype,`toolsCatalogLoading`,void 0),X([I()],$.prototype,`toolsCatalogError`,void 0),X([I()],$.prototype,`toolsCatalogResult`,void 0),X([I()],$.prototype,`toolsEffectiveLoading`,void 0),X([I()],$.prototype,`toolsEffectiveLoadingKey`,void 0),X([I()],$.prototype,`toolsEffectiveResultKey`,void 0),X([I()],$.prototype,`toolsEffectiveError`,void 0),X([I()],$.prototype,`toolsEffectiveResult`,void 0),X([I()],$.prototype,`agentsPanel`,void 0),X([I()],$.prototype,`agentFilesLoading`,void 0),X([I()],$.prototype,`agentFilesError`,void 0),X([I()],$.prototype,`agentFilesList`,void 0),X([I()],$.prototype,`agentFileContents`,void 0),X([I()],$.prototype,`agentFileDrafts`,void 0),X([I()],$.prototype,`agentFileActive`,void 0),X([I()],$.prototype,`agentFileSaving`,void 0),X([I()],$.prototype,`agentIdentityLoading`,void 0),X([I()],$.prototype,`agentIdentityError`,void 0),X([I()],$.prototype,`agentIdentityById`,void 0),X([I()],$.prototype,`agentSkillsLoading`,void 0),X([I()],$.prototype,`agentSkillsError`,void 0),X([I()],$.prototype,`agentSkillsReport`,void 0),X([I()],$.prototype,`agentSkillsAgentId`,void 0),X([I()],$.prototype,`sessionsLoading`,void 0),X([I()],$.prototype,`sessionsResult`,void 0),X([I()],$.prototype,`sessionsError`,void 0),X([I()],$.prototype,`sessionsFilterActive`,void 0),X([I()],$.prototype,`sessionsFilterLimit`,void 0),X([I()],$.prototype,`sessionsIncludeGlobal`,void 0),X([I()],$.prototype,`sessionsIncludeUnknown`,void 0),X([I()],$.prototype,`sessionsShowArchived`,void 0),X([I()],$.prototype,`sessionsFiltersCollapsed`,void 0),X([I()],$.prototype,`sessionsHideCron`,void 0),X([I()],$.prototype,`sessionsSearchQuery`,void 0),X([I()],$.prototype,`sessionsSortColumn`,void 0),X([I()],$.prototype,`sessionsSortDir`,void 0),X([I()],$.prototype,`sessionsPage`,void 0),X([I()],$.prototype,`sessionsPageSize`,void 0),X([I()],$.prototype,`sessionsSelectedKeys`,void 0),X([I()],$.prototype,`sessionsExpandedCheckpointKey`,void 0),X([I()],$.prototype,`sessionsCheckpointItemsByKey`,void 0),X([I()],$.prototype,`sessionsCheckpointLoadingKey`,void 0),X([I()],$.prototype,`sessionsCheckpointBusyKey`,void 0),X([I()],$.prototype,`sessionsCheckpointErrorByKey`,void 0),X([I()],$.prototype,`usageLoading`,void 0),X([I()],$.prototype,`usageResult`,void 0),X([I()],$.prototype,`usageCostSummary`,void 0),X([I()],$.prototype,`usageError`,void 0),X([I()],$.prototype,`usageStartDate`,void 0),X([I()],$.prototype,`usageEndDate`,void 0),X([I()],$.prototype,`usageScope`,void 0),X([I()],$.prototype,`usageSelectedSessions`,void 0),X([I()],$.prototype,`usageSelectedDays`,void 0),X([I()],$.prototype,`usageSelectedHours`,void 0),X([I()],$.prototype,`usageChartMode`,void 0),X([I()],$.prototype,`usageDailyChartMode`,void 0),X([I()],$.prototype,`usageTimeSeriesMode`,void 0),X([I()],$.prototype,`usageTimeSeriesBreakdownMode`,void 0),X([I()],$.prototype,`usageTimeSeries`,void 0),X([I()],$.prototype,`usageTimeSeriesLoading`,void 0),X([I()],$.prototype,`usageTimeSeriesCursorStart`,void 0),X([I()],$.prototype,`usageTimeSeriesCursorEnd`,void 0),X([I()],$.prototype,`usageSessionLogs`,void 0),X([I()],$.prototype,`usageSessionLogsLoading`,void 0),X([I()],$.prototype,`usageSessionLogsExpanded`,void 0),X([I()],$.prototype,`usageQuery`,void 0),X([I()],$.prototype,`usageQueryDraft`,void 0),X([I()],$.prototype,`usageSessionSort`,void 0),X([I()],$.prototype,`usageSessionSortDir`,void 0),X([I()],$.prototype,`usageRecentSessions`,void 0),X([I()],$.prototype,`usageTimeZone`,void 0),X([I()],$.prototype,`usageContextExpanded`,void 0),X([I()],$.prototype,`usageHeaderPinned`,void 0),X([I()],$.prototype,`usageSessionsTab`,void 0),X([I()],$.prototype,`usageVisibleColumns`,void 0),X([I()],$.prototype,`usageLogFilterRoles`,void 0),X([I()],$.prototype,`usageLogFilterTools`,void 0),X([I()],$.prototype,`usageLogFilterHasTools`,void 0),X([I()],$.prototype,`usageLogFilterQuery`,void 0),X([I()],$.prototype,`cronLoading`,void 0),X([I()],$.prototype,`cronQuickCreateOpen`,void 0),X([I()],$.prototype,`cronQuickCreateStep`,void 0),X([I()],$.prototype,`cronQuickCreateDraft`,void 0),X([I()],$.prototype,`cronJobsLoadingMore`,void 0),X([I()],$.prototype,`cronJobs`,void 0),X([I()],$.prototype,`cronJobsTotal`,void 0),X([I()],$.prototype,`cronJobsHasMore`,void 0),X([I()],$.prototype,`cronJobsNextOffset`,void 0),X([I()],$.prototype,`cronJobsLimit`,void 0),X([I()],$.prototype,`cronJobsQuery`,void 0),X([I()],$.prototype,`cronJobsEnabledFilter`,void 0),X([I()],$.prototype,`cronJobsScheduleKindFilter`,void 0),X([I()],$.prototype,`cronJobsLastStatusFilter`,void 0),X([I()],$.prototype,`cronJobsSortBy`,void 0),X([I()],$.prototype,`cronJobsSortDir`,void 0),X([I()],$.prototype,`cronStatus`,void 0),X([I()],$.prototype,`cronError`,void 0),X([I()],$.prototype,`cronForm`,void 0),X([I()],$.prototype,`cronFormCollapsed`,void 0),X([I()],$.prototype,`cronFieldErrors`,void 0),X([I()],$.prototype,`cronEditingJobId`,void 0),X([I()],$.prototype,`cronRunsJobId`,void 0),X([I()],$.prototype,`cronRunsLoadingMore`,void 0),X([I()],$.prototype,`cronRuns`,void 0),X([I()],$.prototype,`cronRunsTotal`,void 0),X([I()],$.prototype,`cronRunsHasMore`,void 0),X([I()],$.prototype,`cronRunsNextOffset`,void 0),X([I()],$.prototype,`cronRunsLimit`,void 0),X([I()],$.prototype,`cronRunsScope`,void 0),X([I()],$.prototype,`cronRunsStatuses`,void 0),X([I()],$.prototype,`cronRunsDeliveryStatuses`,void 0),X([I()],$.prototype,`cronRunsStatusFilter`,void 0),X([I()],$.prototype,`cronRunsQuery`,void 0),X([I()],$.prototype,`cronRunsSortDir`,void 0),X([I()],$.prototype,`cronModelSuggestions`,void 0),X([I()],$.prototype,`cronBusy`,void 0),X([I()],$.prototype,`updateAvailable`,void 0),X([I()],$.prototype,`attentionItems`,void 0),X([I()],$.prototype,`paletteOpen`,void 0),X([I()],$.prototype,`paletteQuery`,void 0),X([I()],$.prototype,`paletteActiveIndex`,void 0),X([I()],$.prototype,`overviewShowGatewayToken`,void 0),X([I()],$.prototype,`overviewShowGatewayPassword`,void 0),X([I()],$.prototype,`overviewLogLines`,void 0),X([I()],$.prototype,`overviewLogCursor`,void 0),X([I()],$.prototype,`skillsLoading`,void 0),X([I()],$.prototype,`skillsReport`,void 0),X([I()],$.prototype,`skillsError`,void 0),X([I()],$.prototype,`skillsFilter`,void 0),X([I()],$.prototype,`skillsStatusFilter`,void 0),X([I()],$.prototype,`skillEdits`,void 0),X([I()],$.prototype,`skillsBusyKey`,void 0),X([I()],$.prototype,`skillMessages`,void 0),X([I()],$.prototype,`skillsDetailKey`,void 0),X([I()],$.prototype,`clawhubSearchQuery`,void 0),X([I()],$.prototype,`clawhubSearchResults`,void 0),X([I()],$.prototype,`clawhubSearchLoading`,void 0),X([I()],$.prototype,`clawhubSearchError`,void 0),X([I()],$.prototype,`clawhubDetail`,void 0),X([I()],$.prototype,`clawhubDetailSlug`,void 0),X([I()],$.prototype,`clawhubDetailLoading`,void 0),X([I()],$.prototype,`clawhubDetailError`,void 0),X([I()],$.prototype,`clawhubInstallSlug`,void 0),X([I()],$.prototype,`clawhubInstallMessage`,void 0),X([I()],$.prototype,`healthLoading`,void 0),X([I()],$.prototype,`healthResult`,void 0),X([I()],$.prototype,`healthError`,void 0),X([I()],$.prototype,`modelAuthStatusLoading`,void 0),X([I()],$.prototype,`modelAuthStatusResult`,void 0),X([I()],$.prototype,`modelAuthStatusError`,void 0),X([I()],$.prototype,`debugLoading`,void 0),X([I()],$.prototype,`debugStatus`,void 0),X([I()],$.prototype,`debugHealth`,void 0),X([I()],$.prototype,`debugModels`,void 0),X([I()],$.prototype,`debugHeartbeat`,void 0),X([I()],$.prototype,`debugCallMethod`,void 0),X([I()],$.prototype,`debugCallParams`,void 0),X([I()],$.prototype,`debugCallResult`,void 0),X([I()],$.prototype,`debugCallError`,void 0),X([I()],$.prototype,`webPushSupported`,void 0),X([I()],$.prototype,`webPushPermission`,void 0),X([I()],$.prototype,`webPushSubscribed`,void 0),X([I()],$.prototype,`webPushLoading`,void 0),X([I()],$.prototype,`logsLoading`,void 0),X([I()],$.prototype,`logsError`,void 0),X([I()],$.prototype,`logsFile`,void 0),X([I()],$.prototype,`logsEntries`,void 0),X([I()],$.prototype,`logsFilterText`,void 0),X([I()],$.prototype,`logsLevelFilters`,void 0),X([I()],$.prototype,`logsAutoFollow`,void 0),X([I()],$.prototype,`logsTruncated`,void 0),X([I()],$.prototype,`logsCursor`,void 0),X([I()],$.prototype,`logsLastFetchAt`,void 0),X([I()],$.prototype,`logsLimit`,void 0),X([I()],$.prototype,`logsMaxBytes`,void 0),X([I()],$.prototype,`logsAtBottom`,void 0),X([I()],$.prototype,`chatNewMessagesBelow`,void 0),customElements.get(`daocore-app`)||customElements.define(`daocore-app`,$),`serviceWorker`in navigator){let e=new URL(`./sw.js`,window.location.href);e.searchParams.set(`v`,`2026.5.95-d631bf21ee21`),navigator.serviceWorker.register(e,{updateViaCache:`none`})}export{B as $,hh as A,Qp as B,kw as C,jg as D,Mg as E,gm as F,vm as G,im as H,_m as I,op as J,Rp as K,zp as L,$p as M,fm as N,Rg as O,Zp as P,qt as Q,nm as R,sD as S,Ng as T,tm as U,em as V,rm as W,Sa as X,Lf as Y,di as Z,J as _,IZ as a,xD as b,XJ as c,NU as d,z as et,jU as f,qj as g,hN as h,RZ as i,P as it,Xp as j,gh as k,PJ as l,LR as m,BZ as n,L as nt,FZ as o,UR as p,Lp as q,zZ as r,F as rt,LZ as s,VZ as t,R as tt,MU as u,AD as v,zv as w,gD as x,bD as y,um as z};
7383
- //# sourceMappingURL=index-B3XB6bSV.js.map
7382
+ `,this.configRawOriginal=``,this.configValid=null,this.configIssues=[],this.configSaving=!1,this.configApplying=!1,this.updateRunning=!1,this.applySessionKey=this.settings.lastActiveSessionKey,this.configSnapshot=null,this.configSchema=null,this.configSchemaVersion=null,this.configSchemaLoading=!1,this.configUiHints={},this.configForm=null,this.configFormOriginal=null,this.dreamingStatusLoading=!1,this.dreamingStatusError=null,this.dreamingStatus=null,this.dreamingModeSaving=!1,this.dreamingRestartConfirmOpen=!1,this.dreamingRestartConfirmLoading=!1,this.dreamingPendingEnabled=null,this.dreamDiaryLoading=!1,this.dreamDiaryActionLoading=!1,this.dreamDiaryActionMessage=null,this.dreamDiaryActionArchivePath=null,this.dreamDiaryError=null,this.dreamDiaryPath=null,this.dreamDiaryContent=null,this.wikiImportInsightsLoading=!1,this.wikiImportInsightsError=null,this.wikiImportInsights=null,this.wikiMemoryPalaceLoading=!1,this.wikiMemoryPalaceError=null,this.wikiMemoryPalace=null,this.configFormDirty=!1,this.configSettingsMode=`quick`,this.configFormMode=`form`,this.configSearchQuery=``,this.configActiveSection=null,this.configActiveSubsection=null,this.pendingUpdateExpectedVersion=null,this.updateStatusBanner=null,this.communicationsFormMode=`form`,this.communicationsSearchQuery=``,this.communicationsActiveSection=null,this.communicationsActiveSubsection=null,this.appearanceFormMode=`form`,this.appearanceSearchQuery=``,this.appearanceActiveSection=null,this.appearanceActiveSubsection=null,this.automationFormMode=`form`,this.automationSearchQuery=``,this.automationActiveSection=null,this.automationActiveSubsection=null,this.infrastructureFormMode=`form`,this.infrastructureSearchQuery=``,this.infrastructureActiveSection=null,this.infrastructureActiveSubsection=null,this.aiAgentsFormMode=`form`,this.aiAgentsSearchQuery=``,this.aiAgentsActiveSection=null,this.aiAgentsActiveSubsection=null,this.channelsLoading=!1,this.channelsSnapshot=null,this.channelsError=null,this.channelsLastSuccess=null,this.whatsappLoginMessage=null,this.whatsappLoginQrDataUrl=null,this.whatsappLoginConnected=null,this.whatsappBusy=!1,this.nostrProfileFormState=null,this.nostrProfileAccountId=null,this.presenceLoading=!1,this.presenceEntries=[],this.presenceError=null,this.presenceStatus=null,this.agentsLoading=!1,this.agentsList=null,this.agentsError=null,this.agentsSelectedId=null,this.toolsCatalogLoading=!1,this.toolsCatalogError=null,this.toolsCatalogResult=null,this.toolsEffectiveLoading=!1,this.toolsEffectiveLoadingKey=null,this.toolsEffectiveResultKey=null,this.toolsEffectiveError=null,this.toolsEffectiveResult=null,this.agentsPanel=`files`,this.agentFilesLoading=!1,this.agentFilesError=null,this.agentFilesList=null,this.agentFileContents={},this.agentFileDrafts={},this.agentFileActive=null,this.agentFileSaving=!1,this.agentIdentityLoading=!1,this.agentIdentityError=null,this.agentIdentityById={},this.agentSkillsLoading=!1,this.agentSkillsError=null,this.agentSkillsReport=null,this.agentSkillsAgentId=null,this.sessionsLoading=!1,this.sessionsResult=null,this.sessionsError=null,this.sessionsFilterActive=cC.activeMinutes,this.sessionsFilterLimit=cC.limit,this.sessionsIncludeGlobal=!0,this.sessionsIncludeUnknown=!1,this.sessionsShowArchived=!1,this.sessionsFiltersCollapsed=!1,this.sessionsHideCron=!0,this.sessionsSearchQuery=``,this.sessionsSortColumn=`updated`,this.sessionsSortDir=`desc`,this.sessionsPage=0,this.sessionsPageSize=25,this.sessionsSelectedKeys=new Set,this.sessionsExpandedCheckpointKey=null,this.sessionsCheckpointItemsByKey={},this.sessionsCheckpointLoadingKey=null,this.sessionsCheckpointBusyKey=null,this.sessionsCheckpointErrorByKey={},this.usageLoading=!1,this.usageResult=null,this.usageCostSummary=null,this.usageError=null,this.usageStartDate=(()=>{let e=new Date;return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,`0`)}-${String(e.getDate()).padStart(2,`0`)}`})(),this.usageEndDate=(()=>{let e=new Date;return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,`0`)}-${String(e.getDate()).padStart(2,`0`)}`})(),this.usageScope=`family`,this.usageSelectedSessions=[],this.usageSelectedDays=[],this.usageSelectedHours=[],this.usageChartMode=`tokens`,this.usageDailyChartMode=`by-type`,this.usageTimeSeriesMode=`per-turn`,this.usageTimeSeriesBreakdownMode=`by-type`,this.usageTimeSeries=null,this.usageTimeSeriesLoading=!1,this.usageTimeSeriesCursorStart=null,this.usageTimeSeriesCursorEnd=null,this.usageSessionLogs=null,this.usageSessionLogsLoading=!1,this.usageSessionLogsExpanded=!1,this.usageQuery=``,this.usageQueryDraft=``,this.usageSessionSort=`recent`,this.usageSessionSortDir=`desc`,this.usageRecentSessions=[],this.usageTimeZone=`local`,this.usageContextExpanded=!1,this.usageHeaderPinned=!1,this.usageSessionsTab=`all`,this.usageVisibleColumns=[`channel`,`agent`,`provider`,`model`,`messages`,`tools`,`errors`,`duration`],this.usageLogFilterRoles=[],this.usageLogFilterTools=[],this.usageLogFilterHasTools=!1,this.usageLogFilterQuery=``,this.usageQueryDebounceTimer=null,this.cronLoading=!1,this.cronQuickCreateOpen=!1,this.cronQuickCreateStep=`what`,this.cronQuickCreateDraft=null,this.cronJobsLoadingMore=!1,this.cronJobs=[],this.cronJobsTotal=0,this.cronJobsHasMore=!1,this.cronJobsNextOffset=null,this.cronJobsLimit=50,this.cronJobsQuery=``,this.cronJobsEnabledFilter=`all`,this.cronJobsScheduleKindFilter=`all`,this.cronJobsLastStatusFilter=`all`,this.cronJobsSortBy=`nextRunAtMs`,this.cronJobsSortDir=`asc`,this.cronStatus=null,this.cronError=null,this.cronForm={...lC},this.cronFormCollapsed=!0,this.cronFieldErrors={},this.cronEditingJobId=null,this.cronRunsJobId=null,this.cronRunsLoadingMore=!1,this.cronRuns=[],this.cronRunsTotal=0,this.cronRunsHasMore=!1,this.cronRunsNextOffset=null,this.cronRunsLimit=50,this.cronRunsScope=`all`,this.cronRunsStatuses=[],this.cronRunsDeliveryStatuses=[],this.cronRunsStatusFilter=`all`,this.cronRunsQuery=``,this.cronRunsSortDir=`desc`,this.cronModelSuggestions=[],this.cronBusy=!1,this.updateAvailable=null,this.attentionItems=[],this.paletteOpen=!1,this.paletteQuery=``,this.paletteActiveIndex=0,this.overviewShowGatewayToken=!1,this.overviewShowGatewayPassword=!1,this.overviewLogLines=[],this.overviewLogCursor=0,this.skillsLoading=!1,this.skillsReport=null,this.skillsError=null,this.skillsFilter=``,this.skillsStatusFilter=`all`,this.skillEdits={},this.skillsBusyKey=null,this.skillMessages={},this.skillsDetailKey=null,this.clawhubSearchQuery=``,this.clawhubSearchResults=null,this.clawhubSearchLoading=!1,this.clawhubSearchError=null,this.clawhubDetail=null,this.clawhubDetailSlug=null,this.clawhubDetailLoading=!1,this.clawhubDetailError=null,this.clawhubInstallSlug=null,this.clawhubInstallMessage=null,this.healthLoading=!1,this.healthResult=null,this.healthError=null,this.modelAuthStatusLoading=!1,this.modelAuthStatusResult=null,this.modelAuthStatusError=null,this.debugLoading=!1,this.debugStatus=null,this.debugHealth=null,this.debugModels=[],this.debugHeartbeat=null,this.debugCallMethod=``,this.debugCallParams=`{}`,this.debugCallResult=null,this.debugCallError=null,this.webPushSupported=!1,this.webPushPermission=`unsupported`,this.webPushSubscribed=!1,this.webPushLoading=!1,this.logsLoading=!1,this.logsError=null,this.logsFile=null,this.logsEntries=[],this.logsFilterText=``,this.logsLevelFilters={...sC},this.logsAutoFollow=!0,this.logsTruncated=!1,this.logsCursor=null,this.logsLastFetchAt=null,this.logsLimit=500,this.logsMaxBytes=25e4,this.logsAtBottom=!0,this.client=null,this.chatScrollFrame=null,this.chatScrollTimeout=null,this.chatLastScrollTop=0,this.chatHasAutoScrolled=!1,this.chatUserNearBottom=!0,this.chatIsProgrammaticScroll=!1,this.chatProgrammaticScrollTarget=0,this.chatNewMessagesBelow=!1,this.nodesPollInterval=null,this.logsPollInterval=null,this.debugPollInterval=null,this.sessionsChangedReloadTimer=null,this.logsScrollFrame=null,this.controlUiResponsivenessObserver=null,this.toolStreamById=new Map,this.toolStreamOrder=[],this.refreshSessionsAfterChat=new Set,this.chatSideResultTerminalRuns=new Set,this.basePath=``,this.popStateHandler=()=>VV(this),this.topbarObserver=null,this.globalKeydownHandler=e=>{(e.metaKey||e.ctrlKey)&&!e.shiftKey&&e.key===`k`&&(e.preventDefault(),this.paletteOpen=!this.paletteOpen,this.paletteOpen&&(this.paletteQuery=``,this.paletteActiveIndex=0))},this.chatMobileControlsKeydownHandler=e=>{if(e.key===`Escape`){if(this.chatSessionPickerOpen){e.preventDefault(),this.chatSessionPickerOpen=!1,this.chatSessionPickerSurface=null;return}this.chatMobileControlsOpen&&(e.preventDefault(),this.setChatMobileControlsOpen(!1,{restoreFocus:!0}))}},this.chatMobileControlsPointerdownHandler=e=>{let t=e.composedPath();if(this.chatSessionPickerOpen&&(Array.from(this.querySelectorAll(`.chat-controls__session-picker`)).some(e=>t.includes(e))||(this.chatSessionPickerOpen=!1,this.chatSessionPickerSurface=null)),!this.chatMobileControlsOpen)return;let n=this.querySelector(`.chat-mobile-controls-wrapper`);n&&t.includes(n)||this.setChatMobileControlsOpen(!1)},at(this.settings.locale)&&lt.setLocale(this.settings.locale)}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.onSlashAction=async e=>{switch(e){case`new-session`:await tG(this);break;case`toggle-focus`:this.applySettings({...this.settings,chatFocusMode:!this.settings.chatFocusMode});break;case`export`:Wj(this.chatMessages,this.assistantName);break;case`refresh-tools-effective`:await ww(this);break}},document.addEventListener(`keydown`,this.globalKeydownHandler),document.addEventListener(`keydown`,this.chatMobileControlsKeydownHandler),document.addEventListener(`pointerdown`,this.chatMobileControlsPointerdownHandler),aU(this),this.nativeBridgeCleanup=hU(this),this.initWebPushState()}firstUpdated(){oU(this)}disconnectedCallback(){document.removeEventListener(`keydown`,this.globalKeydownHandler),this.nativeBridgeCleanup?.(),this.nativeBridgeCleanup=null,document.removeEventListener(`keydown`,this.chatMobileControlsKeydownHandler),document.removeEventListener(`pointerdown`,this.chatMobileControlsPointerdownHandler),this.sessionSwitchNoticeTimer!==null&&(window.clearTimeout(this.sessionSwitchNoticeTimer),this.sessionSwitchNoticeTimer=null),this.sessionSwitchFlashTimer!==null&&(window.clearTimeout(this.sessionSwitchFlashTimer),this.sessionSwitchFlashTimer=null),this.chatMobileControlsTrigger=null,uU(this),super.disconnectedCallback()}updated(e){if(dU(this,e),e.has(`tab`)&&this.tab!==`chat`&&this.chatMobileControlsOpen&&this.setChatMobileControlsOpen(!1),!e.has(`sessionKey`)||this.agentsPanel!==`tools`)return;let t=Yg(this.sessionKey);if(this.agentsSelectedId&&this.agentsSelectedId===t){xw(this,{agentId:this.agentsSelectedId,sessionKey:this.sessionKey});return}this.toolsEffectiveResult=null,this.toolsEffectiveResultKey=null,this.toolsEffectiveError=null,this.toolsEffectiveLoading=!1,this.toolsEffectiveLoadingKey=null}connect(){YH(this)}handleChatScroll(e){lh(this,e)}handleLogsScroll(e){uh(this,e)}exportLogs(e,t){fh(e,t)}resetToolStream(){__(this)}resetChatScroll(){dh(this)}scrollToBottom(e){dh(this),sh(this,!0,!!e?.smooth,{source:`manual`})}async loadAssistantIdentity(){await cH(this)}applySettings(e){yV(this,e)}applyLocalUserIdentity(e){bV(this,e)}setTab(e){TV(this,e),e!==`chat`&&this.setChatMobileControlsOpen(!1),this.navDrawerOpen=!1}setChatMobileControlsOpen(e,t){if(e){this.chatMobileControlsTrigger=t?.trigger??this.chatMobileControlsTrigger,this.chatMobileControlsOpen=!0;return}let n=t?.restoreFocus?this.chatMobileControlsTrigger:null;this.chatMobileControlsOpen=!1,this.chatSessionPickerSurface===`mobile`&&(this.chatSessionPickerOpen=!1,this.chatSessionPickerSurface=null),this.chatMobileControlsTrigger=null,!(!(n instanceof HTMLElement)||!n.isConnected)&&requestAnimationFrame(()=>{n.isConnected&&n.focus()})}setTheme(e,t){DV(this,e,t),this.themeOrder=this.buildThemeOrder(e)}setThemeMode(e,t){OV(this,e,t)}setCustomThemeImportUrl(e){this.customThemeImportUrl=e,this.customThemeImportMessage?.kind===`error`&&(this.customThemeImportMessage=null)}openCustomThemeImport(){this.customThemeImportExpanded=!0,this.customThemeImportFocusToken+=1,this.settings.customTheme||(this.customThemeImportSelectOnSuccess=!0)}async importCustomTheme(){if(!this.customThemeImportBusy){this.customThemeImportExpanded=!0,this.customThemeImportBusy=!0,this.customThemeImportMessage=null;try{let e=await Ef(this.customThemeImportUrl),t=this.theme===`custom`||!this.settings.customTheme||this.customThemeImportSelectOnSuccess;yV(this,{...this.settings,theme:t?`custom`:this.settings.theme,customTheme:e}),this.themeOrder=this.buildThemeOrder(t?`custom`:this.theme),this.customThemeImportUrl=``,this.customThemeImportSelectOnSuccess=!1,this.customThemeImportMessage={kind:`success`,text:`Imported ${e.label}.`}}catch(e){this.customThemeImportMessage={kind:`error`,text:e instanceof Error?e.message:`Failed to import tweakcn theme.`}}finally{this.customThemeImportBusy=!1}}}clearCustomTheme(){let e=this.theme===`custom`?`claw`:this.theme;this.customThemeImportExpanded=!0,this.customThemeImportSelectOnSuccess=!1,yV(this,{...this.settings,theme:e,customTheme:void 0}),this.themeOrder=this.buildThemeOrder(e),this.customThemeImportMessage={kind:`success`,text:`Cleared custom theme.`}}setBorderRadius(e){yV(this,{...this.settings,borderRadius:e}),this.requestUpdate()}setTextScale(e){yV(this,{...this.settings,textScale:e}),this.requestUpdate()}announceSessionSwitch(e,t){let n=++this.sessionSwitchNoticeSeq;this.sessionSwitchNoticeTimer!==null&&window.clearTimeout(this.sessionSwitchNoticeTimer),this.sessionSwitchFlashTimer!==null&&window.clearTimeout(this.sessionSwitchFlashTimer),this.sessionSwitchNotice={id:n,text:R(`chat.switchedSession`,{session:t})},this.sessionSwitchFlashKey=e,this.sessionSwitchFlashTimer=window.setTimeout(()=>{this.sessionSwitchNotice?.id===n&&(this.sessionSwitchFlashKey=null),this.sessionSwitchFlashTimer=null},200),this.sessionSwitchNoticeTimer=window.setTimeout(()=>{this.sessionSwitchNotice?.id===n&&(this.sessionSwitchNotice=null),this.sessionSwitchNoticeTimer=null},2800)}buildThemeOrder(e){return[e,...[...Wf].filter(t=>t!==e)]}async loadOverview(e){await JV(this,e)}async loadCron(){await eH(this)}async handleAbortChat(e){await CS(this,e)}handleChatDraftChange(e){Pv(this,e)}handleChatInputHistoryKey(e){return Rv(this,e)}resetChatInputHistoryNavigation(){Nv(this)}removeQueuedMessage(e){LS(this,e)}async handleSendChat(e,t){await zS(this,e,t)}updateRealtimeTalkOptions(e){this.realtimeTalkOptions={...this.realtimeTalkOptions,...e}}buildRealtimeTalkLaunchOptions(){let e=this.realtimeTalkOptions??{provider:``,model:``,voice:``,transport:``,vadThreshold:``,silenceDurationMs:``,prefixPaddingMs:``,reasoningEffort:``,apiKey:``,endpoint:``},t=e=>e.trim()||void 0,n=e=>{let t=e.trim();if(!t)return;let n=Number(t);return Number.isFinite(n)?n:void 0},r=t(e.transport);return{provider:t(e.provider),model:t(e.model),voice:t(e.voice),transport:r,vadThreshold:n(e.vadThreshold),silenceDurationMs:n(e.silenceDurationMs),prefixPaddingMs:n(e.prefixPaddingMs),reasoningEffort:t(e.reasoningEffort),apiKey:t(e.apiKey),endpoint:t(e.endpoint)}}async toggleRealtimeTalk(){if(this.realtimeTalkSession)if(this.realtimeTalkStatus===`error`)this.realtimeTalkSession.stop(),this.realtimeTalkSession=null;else{this.realtimeTalkSession.stop(),this.realtimeTalkSession=null,this.realtimeTalkActive=!1,this.realtimeTalkStatus=`idle`,this.realtimeTalkDetail=null,this.realtimeTalkTranscript=null,this.resetRealtimeTalkConversation();return}if(!this.client||!this.connected){this.lastError=`Gateway not connected`;return}this.realtimeTalkActive=!0,this.realtimeTalkStatus=`connecting`,this.realtimeTalkDetail=null,this.realtimeTalkTranscript=null,this.resetRealtimeTalkConversation();let e=new R$(this.client,this.sessionKey,{onStatus:(e,t)=>{this.realtimeTalkStatus=e,this.realtimeTalkDetail=t??null,(e===`idle`||e===`error`)&&(this.realtimeTalkActive=e!==`idle`)},onTranscript:e=>{this.realtimeTalkTranscript=`${e.role===`user`?`You`:`DaoCore`}: ${e.text}`,this.realtimeTalkConversationState=ZQ(this.realtimeTalkConversationState,e),this.realtimeTalkConversation=this.realtimeTalkConversationState.entries}},this.buildRealtimeTalkLaunchOptions());this.realtimeTalkSession=e;try{await e.start()}catch(t){e.stop(),this.realtimeTalkSession===e&&(this.realtimeTalkSession=null),this.realtimeTalkActive=!1,this.realtimeTalkStatus=`error`,this.realtimeTalkDetail=t instanceof Error?t.message:String(t),this.lastError=this.realtimeTalkDetail}}resetRealtimeTalkConversation(){this.realtimeTalkConversationState=XQ(),this.realtimeTalkConversation=[]}async steerQueuedChatMessage(e){await FS(this,e)}async handleWhatsAppStart(e){await wa(this,e)}async handleWhatsAppWait(){await Ta(this)}async handleWhatsAppLogout(){await Ea(this)}async handleChannelConfigSave(){await Da(this)}async handleChannelConfigReload(){await Oa(this)}handleNostrProfileEdit(e,t){Na(this,e,t)}handleNostrProfileCancel(){Pa(this)}handleNostrProfileFieldChange(e,t){Fa(this,e,t)}async handleNostrProfileSave(){await La(this)}async handleNostrProfileImport(){await Ra(this)}handleNostrProfileToggleAdvanced(){Ia(this)}async handleExecApprovalDecision(e){let t=this.execApprovalQueue[0];if(!(!t||!this.client||this.execApprovalBusy)){this.execApprovalBusy=!0,this.execApprovalError=null;try{let n=t.kind===`plugin`?`plugin.approval.resolve`:`exec.approval.resolve`;await this.client.request(n,{id:t.id,decision:e}),this.execApprovalQueue=this.execApprovalQueue.filter(e=>e.id!==t.id)}catch(e){this.execApprovalError=`Approval failed: ${String(e)}`}finally{this.execApprovalBusy=!1}}}handleGatewayUrlConfirm(){let e=this.pendingGatewayUrl;if(!e)return;let t=this.pendingGatewayToken?.trim()||``;this.pendingGatewayUrl=null,this.pendingGatewayToken=null,yV(this,{...this.settings,gatewayUrl:e,token:t}),this.connect()}handleGatewayUrlCancel(){this.pendingGatewayUrl=null,this.pendingGatewayToken=null}handleOpenSidebar(e){this.sidebarCloseTimer!=null&&(window.clearTimeout(this.sidebarCloseTimer),this.sidebarCloseTimer=null),this.sidebarContent=e,this.sidebarError=null,this.sidebarOpen=!0}handleCloseSidebar(){this.sidebarOpen=!1,this.sidebarCloseTimer!=null&&window.clearTimeout(this.sidebarCloseTimer),this.sidebarCloseTimer=window.setTimeout(()=>{this.sidebarOpen||(this.sidebarContent=null,this.sidebarError=null,this.sidebarCloseTimer=null)},200)}handleSplitRatioChange(e){let t=Math.max(.4,Math.min(.7,e));this.splitRatio=t,this.applySettings({...this.settings,splitRatio:t})}async initWebPushState(){let e=`serviceWorker`in navigator&&`PushManager`in window&&`Notification`in window;if(this.webPushSupported=e,this.webPushPermission=e?Notification.permission:`unsupported`,e)try{let{getExistingSubscription:e}=await L(async()=>{let{getExistingSubscription:e}=await import(`./push-subscription-TTvs1whj.js`);return{getExistingSubscription:e}},[],import.meta.url),t=await e();this.webPushSubscribed=t!==null}catch{}}async reconcileWebPushState(){if(this.client)try{let{getExistingSubscription:e}=await L(async()=>{let{getExistingSubscription:e}=await import(`./push-subscription-TTvs1whj.js`);return{getExistingSubscription:e}},[],import.meta.url),t=await e();if(!t)return;this.webPushSubscribed=!0;let n=t.toJSON();n.endpoint&&n.keys?.p256dh&&n.keys?.auth&&await this.client.request(`push.web.subscribe`,{endpoint:n.endpoint,keys:{p256dh:n.keys.p256dh,auth:n.keys.auth}})}catch{}}async handleWebPushSubscribe(){if(!(!this.client||this.webPushLoading)){this.webPushLoading=!0;try{let{subscribeToWebPush:e}=await L(async()=>{let{subscribeToWebPush:e}=await import(`./push-subscription-TTvs1whj.js`);return{subscribeToWebPush:e}},[],import.meta.url);await e(this.client),this.webPushSubscribed=!0,this.webPushPermission=Notification.permission}catch(e){this.lastError=String(e)}finally{this.webPushLoading=!1,`Notification`in window&&(this.webPushPermission=Notification.permission)}}}async handleWebPushUnsubscribe(){if(!(!this.client||this.webPushLoading)){this.webPushLoading=!0;try{let{unsubscribeFromWebPush:e}=await L(async()=>{let{unsubscribeFromWebPush:e}=await import(`./push-subscription-TTvs1whj.js`);return{unsubscribeFromWebPush:e}},[],import.meta.url);await e(this.client),this.webPushSubscribed=!1}catch(e){this.lastError=String(e)}finally{this.webPushLoading=!1}}}async handleWebPushTest(){if(this.client)try{let{sendTestWebPush:e}=await L(async()=>{let{sendTestWebPush:e}=await import(`./push-subscription-TTvs1whj.js`);return{sendTestWebPush:e}},[],import.meta.url);await e(this.client)}catch(e){this.lastError=String(e)}}render(){return JQ(this)}};if(X([I()],$.prototype,`settings`,void 0),X([I()],$.prototype,`password`,void 0),X([I()],$.prototype,`loginShowGatewayToken`,void 0),X([I()],$.prototype,`loginShowGatewayPassword`,void 0),X([I()],$.prototype,`tab`,void 0),X([I()],$.prototype,`onboarding`,void 0),X([I()],$.prototype,`connected`,void 0),X([I()],$.prototype,`theme`,void 0),X([I()],$.prototype,`themeMode`,void 0),X([I()],$.prototype,`themeResolved`,void 0),X([I()],$.prototype,`themeOrder`,void 0),X([I()],$.prototype,`customThemeImportUrl`,void 0),X([I()],$.prototype,`customThemeImportBusy`,void 0),X([I()],$.prototype,`customThemeImportMessage`,void 0),X([I()],$.prototype,`customThemeImportExpanded`,void 0),X([I()],$.prototype,`customThemeImportFocusToken`,void 0),X([I()],$.prototype,`hello`,void 0),X([I()],$.prototype,`lastError`,void 0),X([I()],$.prototype,`lastErrorCode`,void 0),X([I()],$.prototype,`eventLog`,void 0),X([I()],$.prototype,`assistantName`,void 0),X([I()],$.prototype,`assistantAvatar`,void 0),X([I()],$.prototype,`assistantAvatarSource`,void 0),X([I()],$.prototype,`assistantAvatarStatus`,void 0),X([I()],$.prototype,`assistantAvatarReason`,void 0),X([I()],$.prototype,`assistantAvatarUploadBusy`,void 0),X([I()],$.prototype,`assistantAvatarUploadError`,void 0),X([I()],$.prototype,`assistantAgentId`,void 0),X([I()],$.prototype,`userName`,void 0),X([I()],$.prototype,`userAvatar`,void 0),X([I()],$.prototype,`localMediaPreviewRoots`,void 0),X([I()],$.prototype,`embedSandboxMode`,void 0),X([I()],$.prototype,`allowExternalEmbedUrls`,void 0),X([I()],$.prototype,`chatMessageMaxWidth`,void 0),X([I()],$.prototype,`serverVersion`,void 0),X([I()],$.prototype,`sessionKey`,void 0),X([I()],$.prototype,`chatLoading`,void 0),X([I()],$.prototype,`chatSending`,void 0),X([I()],$.prototype,`chatMessage`,void 0),X([I()],$.prototype,`chatMessages`,void 0),X([I()],$.prototype,`chatToolMessages`,void 0),X([I()],$.prototype,`chatStreamSegments`,void 0),X([I()],$.prototype,`chatStream`,void 0),X([I()],$.prototype,`chatStreamStartedAt`,void 0),X([I()],$.prototype,`chatRunId`,void 0),X([I()],$.prototype,`chatSideResult`,void 0),X([I()],$.prototype,`compactionStatus`,void 0),X([I()],$.prototype,`fallbackStatus`,void 0),X([I()],$.prototype,`chatRunStatus`,void 0),X([I()],$.prototype,`chatAvatarUrl`,void 0),X([I()],$.prototype,`chatAvatarSource`,void 0),X([I()],$.prototype,`chatAvatarStatus`,void 0),X([I()],$.prototype,`chatAvatarReason`,void 0),X([I()],$.prototype,`chatThinkingLevel`,void 0),X([I()],$.prototype,`chatModelOverrides`,void 0),X([I()],$.prototype,`chatModelSwitchPromises`,void 0),X([I()],$.prototype,`chatModelsLoading`,void 0),X([I()],$.prototype,`chatModelCatalog`,void 0),X([I()],$.prototype,`sessionSwitchNotice`,void 0),X([I()],$.prototype,`sessionSwitchFlashKey`,void 0),X([I()],$.prototype,`chatSessionPickerOpen`,void 0),X([I()],$.prototype,`chatSessionPickerSurface`,void 0),X([I()],$.prototype,`chatSessionPickerQuery`,void 0),X([I()],$.prototype,`chatSessionPickerAppliedQuery`,void 0),X([I()],$.prototype,`chatSessionPickerLoading`,void 0),X([I()],$.prototype,`chatSessionPickerError`,void 0),X([I()],$.prototype,`chatSessionPickerResult`,void 0),X([I()],$.prototype,`chatQueue`,void 0),X([I()],$.prototype,`chatQueueBySession`,void 0),X([I()],$.prototype,`chatAttachments`,void 0),X([I()],$.prototype,`realtimeTalkActive`,void 0),X([I()],$.prototype,`realtimeTalkStatus`,void 0),X([I()],$.prototype,`realtimeTalkDetail`,void 0),X([I()],$.prototype,`realtimeTalkTranscript`,void 0),X([I()],$.prototype,`realtimeTalkConversation`,void 0),X([I()],$.prototype,`realtimeTalkOptionsOpen`,void 0),X([I()],$.prototype,`realtimeTalkOptions`,void 0),X([I()],$.prototype,`chatManualRefreshInFlight`,void 0),X([I()],$.prototype,`chatHeaderControlsHidden`,void 0),X([I()],$.prototype,`chatMobileControlsOpen`,void 0),X([I()],$.prototype,`navDrawerOpen`,void 0),X([I()],$.prototype,`chatInputHistoryIndex`,void 0),X([I()],$.prototype,`sidebarOpen`,void 0),X([I()],$.prototype,`sidebarContent`,void 0),X([I()],$.prototype,`sidebarError`,void 0),X([I()],$.prototype,`splitRatio`,void 0),X([I()],$.prototype,`nodesLoading`,void 0),X([I()],$.prototype,`nodes`,void 0),X([I()],$.prototype,`devicesLoading`,void 0),X([I()],$.prototype,`devicesError`,void 0),X([I()],$.prototype,`devicesList`,void 0),X([I()],$.prototype,`execApprovalsLoading`,void 0),X([I()],$.prototype,`execApprovalsSaving`,void 0),X([I()],$.prototype,`execApprovalsDirty`,void 0),X([I()],$.prototype,`execApprovalsSnapshot`,void 0),X([I()],$.prototype,`execApprovalsForm`,void 0),X([I()],$.prototype,`execApprovalsSelectedAgent`,void 0),X([I()],$.prototype,`execApprovalsTarget`,void 0),X([I()],$.prototype,`execApprovalsTargetNodeId`,void 0),X([I()],$.prototype,`execApprovalQueue`,void 0),X([I()],$.prototype,`execApprovalBusy`,void 0),X([I()],$.prototype,`execApprovalError`,void 0),X([I()],$.prototype,`pendingGatewayUrl`,void 0),X([I()],$.prototype,`configLoading`,void 0),X([I()],$.prototype,`configRaw`,void 0),X([I()],$.prototype,`configRawOriginal`,void 0),X([I()],$.prototype,`configValid`,void 0),X([I()],$.prototype,`configIssues`,void 0),X([I()],$.prototype,`configSaving`,void 0),X([I()],$.prototype,`configApplying`,void 0),X([I()],$.prototype,`updateRunning`,void 0),X([I()],$.prototype,`applySessionKey`,void 0),X([I()],$.prototype,`configSnapshot`,void 0),X([I()],$.prototype,`configSchema`,void 0),X([I()],$.prototype,`configSchemaVersion`,void 0),X([I()],$.prototype,`configSchemaLoading`,void 0),X([I()],$.prototype,`configUiHints`,void 0),X([I()],$.prototype,`configForm`,void 0),X([I()],$.prototype,`configFormOriginal`,void 0),X([I()],$.prototype,`dreamingStatusLoading`,void 0),X([I()],$.prototype,`dreamingStatusError`,void 0),X([I()],$.prototype,`dreamingStatus`,void 0),X([I()],$.prototype,`dreamingModeSaving`,void 0),X([I()],$.prototype,`dreamingRestartConfirmOpen`,void 0),X([I()],$.prototype,`dreamingRestartConfirmLoading`,void 0),X([I()],$.prototype,`dreamingPendingEnabled`,void 0),X([I()],$.prototype,`dreamDiaryLoading`,void 0),X([I()],$.prototype,`dreamDiaryActionLoading`,void 0),X([I()],$.prototype,`dreamDiaryActionMessage`,void 0),X([I()],$.prototype,`dreamDiaryActionArchivePath`,void 0),X([I()],$.prototype,`dreamDiaryError`,void 0),X([I()],$.prototype,`dreamDiaryPath`,void 0),X([I()],$.prototype,`dreamDiaryContent`,void 0),X([I()],$.prototype,`wikiImportInsightsLoading`,void 0),X([I()],$.prototype,`wikiImportInsightsError`,void 0),X([I()],$.prototype,`wikiImportInsights`,void 0),X([I()],$.prototype,`wikiMemoryPalaceLoading`,void 0),X([I()],$.prototype,`wikiMemoryPalaceError`,void 0),X([I()],$.prototype,`wikiMemoryPalace`,void 0),X([I()],$.prototype,`configFormDirty`,void 0),X([I()],$.prototype,`configSettingsMode`,void 0),X([I()],$.prototype,`configFormMode`,void 0),X([I()],$.prototype,`configSearchQuery`,void 0),X([I()],$.prototype,`configActiveSection`,void 0),X([I()],$.prototype,`configActiveSubsection`,void 0),X([I()],$.prototype,`pendingUpdateExpectedVersion`,void 0),X([I()],$.prototype,`updateStatusBanner`,void 0),X([I()],$.prototype,`communicationsFormMode`,void 0),X([I()],$.prototype,`communicationsSearchQuery`,void 0),X([I()],$.prototype,`communicationsActiveSection`,void 0),X([I()],$.prototype,`communicationsActiveSubsection`,void 0),X([I()],$.prototype,`appearanceFormMode`,void 0),X([I()],$.prototype,`appearanceSearchQuery`,void 0),X([I()],$.prototype,`appearanceActiveSection`,void 0),X([I()],$.prototype,`appearanceActiveSubsection`,void 0),X([I()],$.prototype,`automationFormMode`,void 0),X([I()],$.prototype,`automationSearchQuery`,void 0),X([I()],$.prototype,`automationActiveSection`,void 0),X([I()],$.prototype,`automationActiveSubsection`,void 0),X([I()],$.prototype,`infrastructureFormMode`,void 0),X([I()],$.prototype,`infrastructureSearchQuery`,void 0),X([I()],$.prototype,`infrastructureActiveSection`,void 0),X([I()],$.prototype,`infrastructureActiveSubsection`,void 0),X([I()],$.prototype,`aiAgentsFormMode`,void 0),X([I()],$.prototype,`aiAgentsSearchQuery`,void 0),X([I()],$.prototype,`aiAgentsActiveSection`,void 0),X([I()],$.prototype,`aiAgentsActiveSubsection`,void 0),X([I()],$.prototype,`channelsLoading`,void 0),X([I()],$.prototype,`channelsSnapshot`,void 0),X([I()],$.prototype,`channelsError`,void 0),X([I()],$.prototype,`channelsLastSuccess`,void 0),X([I()],$.prototype,`whatsappLoginMessage`,void 0),X([I()],$.prototype,`whatsappLoginQrDataUrl`,void 0),X([I()],$.prototype,`whatsappLoginConnected`,void 0),X([I()],$.prototype,`whatsappBusy`,void 0),X([I()],$.prototype,`nostrProfileFormState`,void 0),X([I()],$.prototype,`nostrProfileAccountId`,void 0),X([I()],$.prototype,`presenceLoading`,void 0),X([I()],$.prototype,`presenceEntries`,void 0),X([I()],$.prototype,`presenceError`,void 0),X([I()],$.prototype,`presenceStatus`,void 0),X([I()],$.prototype,`agentsLoading`,void 0),X([I()],$.prototype,`agentsList`,void 0),X([I()],$.prototype,`agentsError`,void 0),X([I()],$.prototype,`agentsSelectedId`,void 0),X([I()],$.prototype,`toolsCatalogLoading`,void 0),X([I()],$.prototype,`toolsCatalogError`,void 0),X([I()],$.prototype,`toolsCatalogResult`,void 0),X([I()],$.prototype,`toolsEffectiveLoading`,void 0),X([I()],$.prototype,`toolsEffectiveLoadingKey`,void 0),X([I()],$.prototype,`toolsEffectiveResultKey`,void 0),X([I()],$.prototype,`toolsEffectiveError`,void 0),X([I()],$.prototype,`toolsEffectiveResult`,void 0),X([I()],$.prototype,`agentsPanel`,void 0),X([I()],$.prototype,`agentFilesLoading`,void 0),X([I()],$.prototype,`agentFilesError`,void 0),X([I()],$.prototype,`agentFilesList`,void 0),X([I()],$.prototype,`agentFileContents`,void 0),X([I()],$.prototype,`agentFileDrafts`,void 0),X([I()],$.prototype,`agentFileActive`,void 0),X([I()],$.prototype,`agentFileSaving`,void 0),X([I()],$.prototype,`agentIdentityLoading`,void 0),X([I()],$.prototype,`agentIdentityError`,void 0),X([I()],$.prototype,`agentIdentityById`,void 0),X([I()],$.prototype,`agentSkillsLoading`,void 0),X([I()],$.prototype,`agentSkillsError`,void 0),X([I()],$.prototype,`agentSkillsReport`,void 0),X([I()],$.prototype,`agentSkillsAgentId`,void 0),X([I()],$.prototype,`sessionsLoading`,void 0),X([I()],$.prototype,`sessionsResult`,void 0),X([I()],$.prototype,`sessionsError`,void 0),X([I()],$.prototype,`sessionsFilterActive`,void 0),X([I()],$.prototype,`sessionsFilterLimit`,void 0),X([I()],$.prototype,`sessionsIncludeGlobal`,void 0),X([I()],$.prototype,`sessionsIncludeUnknown`,void 0),X([I()],$.prototype,`sessionsShowArchived`,void 0),X([I()],$.prototype,`sessionsFiltersCollapsed`,void 0),X([I()],$.prototype,`sessionsHideCron`,void 0),X([I()],$.prototype,`sessionsSearchQuery`,void 0),X([I()],$.prototype,`sessionsSortColumn`,void 0),X([I()],$.prototype,`sessionsSortDir`,void 0),X([I()],$.prototype,`sessionsPage`,void 0),X([I()],$.prototype,`sessionsPageSize`,void 0),X([I()],$.prototype,`sessionsSelectedKeys`,void 0),X([I()],$.prototype,`sessionsExpandedCheckpointKey`,void 0),X([I()],$.prototype,`sessionsCheckpointItemsByKey`,void 0),X([I()],$.prototype,`sessionsCheckpointLoadingKey`,void 0),X([I()],$.prototype,`sessionsCheckpointBusyKey`,void 0),X([I()],$.prototype,`sessionsCheckpointErrorByKey`,void 0),X([I()],$.prototype,`usageLoading`,void 0),X([I()],$.prototype,`usageResult`,void 0),X([I()],$.prototype,`usageCostSummary`,void 0),X([I()],$.prototype,`usageError`,void 0),X([I()],$.prototype,`usageStartDate`,void 0),X([I()],$.prototype,`usageEndDate`,void 0),X([I()],$.prototype,`usageScope`,void 0),X([I()],$.prototype,`usageSelectedSessions`,void 0),X([I()],$.prototype,`usageSelectedDays`,void 0),X([I()],$.prototype,`usageSelectedHours`,void 0),X([I()],$.prototype,`usageChartMode`,void 0),X([I()],$.prototype,`usageDailyChartMode`,void 0),X([I()],$.prototype,`usageTimeSeriesMode`,void 0),X([I()],$.prototype,`usageTimeSeriesBreakdownMode`,void 0),X([I()],$.prototype,`usageTimeSeries`,void 0),X([I()],$.prototype,`usageTimeSeriesLoading`,void 0),X([I()],$.prototype,`usageTimeSeriesCursorStart`,void 0),X([I()],$.prototype,`usageTimeSeriesCursorEnd`,void 0),X([I()],$.prototype,`usageSessionLogs`,void 0),X([I()],$.prototype,`usageSessionLogsLoading`,void 0),X([I()],$.prototype,`usageSessionLogsExpanded`,void 0),X([I()],$.prototype,`usageQuery`,void 0),X([I()],$.prototype,`usageQueryDraft`,void 0),X([I()],$.prototype,`usageSessionSort`,void 0),X([I()],$.prototype,`usageSessionSortDir`,void 0),X([I()],$.prototype,`usageRecentSessions`,void 0),X([I()],$.prototype,`usageTimeZone`,void 0),X([I()],$.prototype,`usageContextExpanded`,void 0),X([I()],$.prototype,`usageHeaderPinned`,void 0),X([I()],$.prototype,`usageSessionsTab`,void 0),X([I()],$.prototype,`usageVisibleColumns`,void 0),X([I()],$.prototype,`usageLogFilterRoles`,void 0),X([I()],$.prototype,`usageLogFilterTools`,void 0),X([I()],$.prototype,`usageLogFilterHasTools`,void 0),X([I()],$.prototype,`usageLogFilterQuery`,void 0),X([I()],$.prototype,`cronLoading`,void 0),X([I()],$.prototype,`cronQuickCreateOpen`,void 0),X([I()],$.prototype,`cronQuickCreateStep`,void 0),X([I()],$.prototype,`cronQuickCreateDraft`,void 0),X([I()],$.prototype,`cronJobsLoadingMore`,void 0),X([I()],$.prototype,`cronJobs`,void 0),X([I()],$.prototype,`cronJobsTotal`,void 0),X([I()],$.prototype,`cronJobsHasMore`,void 0),X([I()],$.prototype,`cronJobsNextOffset`,void 0),X([I()],$.prototype,`cronJobsLimit`,void 0),X([I()],$.prototype,`cronJobsQuery`,void 0),X([I()],$.prototype,`cronJobsEnabledFilter`,void 0),X([I()],$.prototype,`cronJobsScheduleKindFilter`,void 0),X([I()],$.prototype,`cronJobsLastStatusFilter`,void 0),X([I()],$.prototype,`cronJobsSortBy`,void 0),X([I()],$.prototype,`cronJobsSortDir`,void 0),X([I()],$.prototype,`cronStatus`,void 0),X([I()],$.prototype,`cronError`,void 0),X([I()],$.prototype,`cronForm`,void 0),X([I()],$.prototype,`cronFormCollapsed`,void 0),X([I()],$.prototype,`cronFieldErrors`,void 0),X([I()],$.prototype,`cronEditingJobId`,void 0),X([I()],$.prototype,`cronRunsJobId`,void 0),X([I()],$.prototype,`cronRunsLoadingMore`,void 0),X([I()],$.prototype,`cronRuns`,void 0),X([I()],$.prototype,`cronRunsTotal`,void 0),X([I()],$.prototype,`cronRunsHasMore`,void 0),X([I()],$.prototype,`cronRunsNextOffset`,void 0),X([I()],$.prototype,`cronRunsLimit`,void 0),X([I()],$.prototype,`cronRunsScope`,void 0),X([I()],$.prototype,`cronRunsStatuses`,void 0),X([I()],$.prototype,`cronRunsDeliveryStatuses`,void 0),X([I()],$.prototype,`cronRunsStatusFilter`,void 0),X([I()],$.prototype,`cronRunsQuery`,void 0),X([I()],$.prototype,`cronRunsSortDir`,void 0),X([I()],$.prototype,`cronModelSuggestions`,void 0),X([I()],$.prototype,`cronBusy`,void 0),X([I()],$.prototype,`updateAvailable`,void 0),X([I()],$.prototype,`attentionItems`,void 0),X([I()],$.prototype,`paletteOpen`,void 0),X([I()],$.prototype,`paletteQuery`,void 0),X([I()],$.prototype,`paletteActiveIndex`,void 0),X([I()],$.prototype,`overviewShowGatewayToken`,void 0),X([I()],$.prototype,`overviewShowGatewayPassword`,void 0),X([I()],$.prototype,`overviewLogLines`,void 0),X([I()],$.prototype,`overviewLogCursor`,void 0),X([I()],$.prototype,`skillsLoading`,void 0),X([I()],$.prototype,`skillsReport`,void 0),X([I()],$.prototype,`skillsError`,void 0),X([I()],$.prototype,`skillsFilter`,void 0),X([I()],$.prototype,`skillsStatusFilter`,void 0),X([I()],$.prototype,`skillEdits`,void 0),X([I()],$.prototype,`skillsBusyKey`,void 0),X([I()],$.prototype,`skillMessages`,void 0),X([I()],$.prototype,`skillsDetailKey`,void 0),X([I()],$.prototype,`clawhubSearchQuery`,void 0),X([I()],$.prototype,`clawhubSearchResults`,void 0),X([I()],$.prototype,`clawhubSearchLoading`,void 0),X([I()],$.prototype,`clawhubSearchError`,void 0),X([I()],$.prototype,`clawhubDetail`,void 0),X([I()],$.prototype,`clawhubDetailSlug`,void 0),X([I()],$.prototype,`clawhubDetailLoading`,void 0),X([I()],$.prototype,`clawhubDetailError`,void 0),X([I()],$.prototype,`clawhubInstallSlug`,void 0),X([I()],$.prototype,`clawhubInstallMessage`,void 0),X([I()],$.prototype,`healthLoading`,void 0),X([I()],$.prototype,`healthResult`,void 0),X([I()],$.prototype,`healthError`,void 0),X([I()],$.prototype,`modelAuthStatusLoading`,void 0),X([I()],$.prototype,`modelAuthStatusResult`,void 0),X([I()],$.prototype,`modelAuthStatusError`,void 0),X([I()],$.prototype,`debugLoading`,void 0),X([I()],$.prototype,`debugStatus`,void 0),X([I()],$.prototype,`debugHealth`,void 0),X([I()],$.prototype,`debugModels`,void 0),X([I()],$.prototype,`debugHeartbeat`,void 0),X([I()],$.prototype,`debugCallMethod`,void 0),X([I()],$.prototype,`debugCallParams`,void 0),X([I()],$.prototype,`debugCallResult`,void 0),X([I()],$.prototype,`debugCallError`,void 0),X([I()],$.prototype,`webPushSupported`,void 0),X([I()],$.prototype,`webPushPermission`,void 0),X([I()],$.prototype,`webPushSubscribed`,void 0),X([I()],$.prototype,`webPushLoading`,void 0),X([I()],$.prototype,`logsLoading`,void 0),X([I()],$.prototype,`logsError`,void 0),X([I()],$.prototype,`logsFile`,void 0),X([I()],$.prototype,`logsEntries`,void 0),X([I()],$.prototype,`logsFilterText`,void 0),X([I()],$.prototype,`logsLevelFilters`,void 0),X([I()],$.prototype,`logsAutoFollow`,void 0),X([I()],$.prototype,`logsTruncated`,void 0),X([I()],$.prototype,`logsCursor`,void 0),X([I()],$.prototype,`logsLastFetchAt`,void 0),X([I()],$.prototype,`logsLimit`,void 0),X([I()],$.prototype,`logsMaxBytes`,void 0),X([I()],$.prototype,`logsAtBottom`,void 0),X([I()],$.prototype,`chatNewMessagesBelow`,void 0),customElements.get(`daocore-app`)||customElements.define(`daocore-app`,$),`serviceWorker`in navigator){let e=new URL(`./sw.js`,window.location.href);e.searchParams.set(`v`,`2026.5.97-49055735f9e1`),navigator.serviceWorker.register(e,{updateViaCache:`none`})}export{B as $,hh as A,Qp as B,kw as C,jg as D,Mg as E,gm as F,vm as G,im as H,_m as I,op as J,Rp as K,zp as L,$p as M,fm as N,Rg as O,Zp as P,qt as Q,nm as R,sD as S,Ng as T,tm as U,em as V,rm as W,Sa as X,Lf as Y,di as Z,J as _,IZ as a,xD as b,XJ as c,NU as d,z as et,jU as f,qj as g,hN as h,RZ as i,P as it,Xp as j,gh as k,PJ as l,LR as m,BZ as n,L as nt,FZ as o,UR as p,Lp as q,zZ as r,F as rt,LZ as s,VZ as t,R as tt,MU as u,AD as v,zv as w,gD as x,bD as y,um as z};
7383
+ //# sourceMappingURL=index-CoPmouB8.js.map
@@ -1,4 +1,4 @@
1
- import{_ as e,it as t,o as n,rt as r,tt as i}from"./index-B3XB6bSV.js";var a=!1;function o(n){let o=!a;return t`
1
+ import{_ as e,it as t,o as n,rt as r,tt as i}from"./index-CoPmouB8.js";var a=!1;function o(n){let o=!a;return t`
2
2
  <section class="card">
3
3
  <div class="row" style="justify-content: space-between;">
4
4
  <div>
@@ -54,4 +54,4 @@ import{_ as e,it as t,o as n,rt as r,tt as i}from"./index-B3XB6bSV.js";var a=!1;
54
54
  </div>
55
55
  </div>
56
56
  `}export{o as renderInstances};
57
- //# sourceMappingURL=instances-DxlwM05o.js.map
57
+ //# sourceMappingURL=instances-CMzbUBCW.js.map
@@ -1,4 +1,4 @@
1
- import{$ as e,it as t,rt as n,tt as r}from"./index-B3XB6bSV.js";var i=[`trace`,`debug`,`info`,`warn`,`error`,`fatal`];function a(e){if(!e)return``;let t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleTimeString()}function o(t,n){return n?e([t.message,t.subsystem,t.raw].filter(Boolean).join(` `)).includes(n):!0}function s(s){let c=e(s.filterText),l=i.some(e=>!s.levelFilters[e]),u=s.entries.filter(e=>e.level&&!s.levelFilters[e.level]?!1:o(e,c)),d=c||l?`filtered`:`visible`;return t`
1
+ import{$ as e,it as t,rt as n,tt as r}from"./index-CoPmouB8.js";var i=[`trace`,`debug`,`info`,`warn`,`error`,`fatal`];function a(e){if(!e)return``;let t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleTimeString()}function o(t,n){return n?e([t.message,t.subsystem,t.raw].filter(Boolean).join(` `)).includes(n):!0}function s(s){let c=e(s.filterText),l=i.some(e=>!s.levelFilters[e]),u=s.entries.filter(e=>e.level&&!s.levelFilters[e.level]?!1:o(e,c)),d=c||l?`filtered`:`visible`;return t`
2
2
  <section class="card">
3
3
  <div class="row" style="justify-content: space-between;">
4
4
  <div>
@@ -71,4 +71,4 @@ import{$ as e,it as t,rt as n,tt as r}from"./index-B3XB6bSV.js";var i=[`trace`,`
71
71
  </div>
72
72
  </section>
73
73
  `}export{s as renderLogs};
74
- //# sourceMappingURL=logs-C6ECFXFe.js.map
74
+ //# sourceMappingURL=logs-QiHU0yhv.js.map
@@ -1,4 +1,4 @@
1
- import{E as e,Q as t,T as n,et as r,it as i,k as a,rt as o,tt as s}from"./index-B3XB6bSV.js";function c(...e){let t=new Set;for(let n of e){if(!n)continue;if(Array.isArray(n)){for(let e of n){let n=e.trim();n&&t.add(n)}continue}let e=n.trim();e&&t.add(e)}return[...t].toSorted()}function l(e,t){let n=new Set(e);return t.every(e=>n.has(e))}function u(e){return{roles:c(e.roles,e.role),scopes:t(e.scopes)}}function d(e){let n=c(e.roles,e.role),r=Array.isArray(e.tokens)?e.tokens:e.tokens?Object.values(e.tokens):void 0;return{roles:r===void 0?n:c(r.filter(e=>!e.revokedAtMs).flatMap(e=>e.role??[])).filter(e=>n.includes(e)),scopes:t(e.scopes)}}function f(e,t){let n=u(e),r=t?d(t):null;return r?l(r.roles,n.roles)?l(r.scopes,n.scopes)?{kind:`re-approval`,requested:n,approved:r}:{kind:`scope-upgrade`,requested:n,approved:r}:{kind:`role-upgrade`,requested:n,approved:r}:{kind:`new-pairing`,requested:n,approved:null}}function p(e){let t=e?.agents??{},n=Array.isArray(t.list)?t.list:[],i=[];return n.forEach((e,t)=>{if(!e||typeof e!=`object`)return;let n=e,a=r(n.id)??``;if(!a)return;let o=r(n.name),s=n.default===!0;i.push({id:a,name:o,isDefault:s,index:t,record:n})}),i}function m(e,t){let n=new Set(t),i=[];for(let t of e){if(!(Array.isArray(t.commands)?t.commands:[]).some(e=>n.has(String(e))))continue;let e=r(t.nodeId)??``;if(!e)continue;let a=r(t.displayName)??e;i.push({id:e,label:a===e?e:`${a} · ${e}`})}return i.sort((e,t)=>e.label.localeCompare(t.label)),i}var h=`__defaults__`,g=[{value:`deny`,label:`Deny`},{value:`allowlist`,label:`Allowlist`},{value:`full`,label:`Full`}],_=[{value:`off`,label:`Off`},{value:`on-miss`,label:`On miss`},{value:`always`,label:`Always`}];function v(e){return e===`allowlist`||e===`full`||e===`deny`?e:`deny`}function y(e){return e===`always`||e===`off`||e===`on-miss`?e:`on-miss`}function b(e){let t=e?.defaults??{};return{security:v(t.security),ask:y(t.ask),askFallback:v(t.askFallback??`deny`),autoAllowSkills:t.autoAllowSkills??!1}}function x(e){return p(e).map(e=>({id:e.id,name:e.name,isDefault:e.isDefault}))}function S(e,t){let n=x(e),r=Object.keys(t?.agents??{}),i=new Map;n.forEach(e=>i.set(e.id,e)),r.forEach(e=>{i.has(e)||i.set(e,{id:e})});let a=Array.from(i.values());return a.length===0&&a.push({id:`main`,isDefault:!0}),a.sort((e,t)=>{if(e.isDefault&&!t.isDefault)return-1;if(!e.isDefault&&t.isDefault)return 1;let n=e.name?.trim()?e.name:e.id,r=t.name?.trim()?t.name:t.id;return n.localeCompare(r)}),a}function C(e,t){return e===h?h:e&&t.some(t=>t.id===e)?e:h}function w(e){let t=e.execApprovalsForm??e.execApprovalsSnapshot?.file??null,n=!!t,r=b(t),i=S(e.configForm,t),a=j(e.nodes),o=e.execApprovalsTarget,s=o===`node`&&e.execApprovalsTargetNodeId?e.execApprovalsTargetNodeId:null;o===`node`&&s&&!a.some(e=>e.id===s)&&(s=null);let c=C(e.execApprovalsSelectedAgent,i),l=c===h?null:(t?.agents??{})[c]??null,u=Array.isArray(l?.allowlist)?l.allowlist??[]:[];return{ready:n,disabled:e.execApprovalsSaving||e.execApprovalsLoading,dirty:e.execApprovalsDirty,loading:e.execApprovalsLoading,saving:e.execApprovalsSaving,form:t,defaults:r,selectedScope:c,selectedAgent:l,agents:i,allowlist:u,target:o,targetNodeId:s,targetNodes:a,onSelectScope:e.onExecApprovalsSelectAgent,onSelectTarget:e.onExecApprovalsTargetChange,onPatch:e.onExecApprovalsPatch,onRemove:e.onExecApprovalsRemove,onLoad:e.onLoadExecApprovals,onSave:e.onSaveExecApprovals}}function T(e){let t=e.ready,n=e.target!==`node`||!!e.targetNodeId;return i`
1
+ import{E as e,Q as t,T as n,et as r,it as i,k as a,rt as o,tt as s}from"./index-CoPmouB8.js";function c(...e){let t=new Set;for(let n of e){if(!n)continue;if(Array.isArray(n)){for(let e of n){let n=e.trim();n&&t.add(n)}continue}let e=n.trim();e&&t.add(e)}return[...t].toSorted()}function l(e,t){let n=new Set(e);return t.every(e=>n.has(e))}function u(e){return{roles:c(e.roles,e.role),scopes:t(e.scopes)}}function d(e){let n=c(e.roles,e.role),r=Array.isArray(e.tokens)?e.tokens:e.tokens?Object.values(e.tokens):void 0;return{roles:r===void 0?n:c(r.filter(e=>!e.revokedAtMs).flatMap(e=>e.role??[])).filter(e=>n.includes(e)),scopes:t(e.scopes)}}function f(e,t){let n=u(e),r=t?d(t):null;return r?l(r.roles,n.roles)?l(r.scopes,n.scopes)?{kind:`re-approval`,requested:n,approved:r}:{kind:`scope-upgrade`,requested:n,approved:r}:{kind:`role-upgrade`,requested:n,approved:r}:{kind:`new-pairing`,requested:n,approved:null}}function p(e){let t=e?.agents??{},n=Array.isArray(t.list)?t.list:[],i=[];return n.forEach((e,t)=>{if(!e||typeof e!=`object`)return;let n=e,a=r(n.id)??``;if(!a)return;let o=r(n.name),s=n.default===!0;i.push({id:a,name:o,isDefault:s,index:t,record:n})}),i}function m(e,t){let n=new Set(t),i=[];for(let t of e){if(!(Array.isArray(t.commands)?t.commands:[]).some(e=>n.has(String(e))))continue;let e=r(t.nodeId)??``;if(!e)continue;let a=r(t.displayName)??e;i.push({id:e,label:a===e?e:`${a} · ${e}`})}return i.sort((e,t)=>e.label.localeCompare(t.label)),i}var h=`__defaults__`,g=[{value:`deny`,label:`Deny`},{value:`allowlist`,label:`Allowlist`},{value:`full`,label:`Full`}],_=[{value:`off`,label:`Off`},{value:`on-miss`,label:`On miss`},{value:`always`,label:`Always`}];function v(e){return e===`allowlist`||e===`full`||e===`deny`?e:`deny`}function y(e){return e===`always`||e===`off`||e===`on-miss`?e:`on-miss`}function b(e){let t=e?.defaults??{};return{security:v(t.security),ask:y(t.ask),askFallback:v(t.askFallback??`deny`),autoAllowSkills:t.autoAllowSkills??!1}}function x(e){return p(e).map(e=>({id:e.id,name:e.name,isDefault:e.isDefault}))}function S(e,t){let n=x(e),r=Object.keys(t?.agents??{}),i=new Map;n.forEach(e=>i.set(e.id,e)),r.forEach(e=>{i.has(e)||i.set(e,{id:e})});let a=Array.from(i.values());return a.length===0&&a.push({id:`main`,isDefault:!0}),a.sort((e,t)=>{if(e.isDefault&&!t.isDefault)return-1;if(!e.isDefault&&t.isDefault)return 1;let n=e.name?.trim()?e.name:e.id,r=t.name?.trim()?t.name:t.id;return n.localeCompare(r)}),a}function C(e,t){return e===h?h:e&&t.some(t=>t.id===e)?e:h}function w(e){let t=e.execApprovalsForm??e.execApprovalsSnapshot?.file??null,n=!!t,r=b(t),i=S(e.configForm,t),a=j(e.nodes),o=e.execApprovalsTarget,s=o===`node`&&e.execApprovalsTargetNodeId?e.execApprovalsTargetNodeId:null;o===`node`&&s&&!a.some(e=>e.id===s)&&(s=null);let c=C(e.execApprovalsSelectedAgent,i),l=c===h?null:(t?.agents??{})[c]??null,u=Array.isArray(l?.allowlist)?l.allowlist??[]:[];return{ready:n,disabled:e.execApprovalsSaving||e.execApprovalsLoading,dirty:e.execApprovalsDirty,loading:e.execApprovalsLoading,saving:e.execApprovalsSaving,form:t,defaults:r,selectedScope:c,selectedAgent:l,agents:i,allowlist:u,target:o,targetNodeId:s,targetNodes:a,onSelectScope:e.onExecApprovalsSelectAgent,onSelectTarget:e.onExecApprovalsTargetChange,onPatch:e.onExecApprovalsPatch,onRemove:e.onExecApprovalsRemove,onLoad:e.onLoadExecApprovals,onSave:e.onSaveExecApprovals}}function T(e){let t=e.ready,n=e.target!==`node`||!!e.targetNodeId;return i`
2
2
  <section class="card">
3
3
  <div class="row" style="justify-content: space-between; align-items: center;">
4
4
  <div>
@@ -433,4 +433,4 @@ import{E as e,Q as t,T as n,et as r,it as i,k as a,rt as o,tt as s}from"./index-
433
433
  </div>
434
434
  </div>
435
435
  `}export{M as renderNodes};
436
- //# sourceMappingURL=nodes-Ci25CEEq.js.map
436
+ //# sourceMappingURL=nodes-tabyMKVi.js.map
@@ -1,4 +1,4 @@
1
- import{$ as e,O as t,V as n,Y as r,_ as i,d as a,et as o,f as s,it as c,k as l,rt as u,s as d,tt as f,u as p,w as m}from"./index-B3XB6bSV.js";var h=[`off`,`minimal`,`low`,`medium`,`high`],g=[``,`off`,`on`,`full`],_=[``,`on`,`off`],v=[``,`off`,`on`,`stream`],y=[10,25,50,100];function b(e,t){return Object.prototype.hasOwnProperty.call(e,t)?e[t]??null:null}function x(e,t){return(!e.modelProvider||e.modelProvider===t?.modelProvider)&&(!e.model||e.model===t?.model)}function S(e,t){let n=x(e,t),r=p(e.thinkingDefault??(n?t?.thinkingDefault:void 0)),i=e.thinkingLevels?.length?e.thinkingLevels:n&&t?.thinkingLevels?.length?t.thinkingLevels:(e.thinkingOptions?.length?e.thinkingOptions:n&&t?.thinkingOptions?.length?t.thinkingOptions:h).map(e=>({id:s(e),label:e}));return[{value:``,label:r},...i.map(e=>({value:s(e.id),label:a(e.id,e.label)}))]}function C(e,t){return!t||e.includes(t)?[...e]:[...e,t]}function w(e,t){return!t||e.some(e=>e.value===t)?[...e]:[...e,{value:t,label:a(t)}]}function T(){return g.map(e=>({value:e,label:f(e===``?`sessionsView.inherit`:e===`off`?`sessionsView.offExplicit`:`sessionsView.${e}`)}))}function ee(){return _.map(e=>({value:e,label:f(e===``?`sessionsView.inherit`:`sessionsView.${e}`)}))}function E(e){switch(e){case`running`:return f(`sessionsView.statusRunning`);case`done`:return f(`sessionsView.statusDone`);case`failed`:return f(`sessionsView.statusFailed`);case`killed`:return f(`sessionsView.statusKilled`);case`timeout`:return f(`sessionsView.statusTimeout`);default:return f(`sessionsView.statusUnknown`)}}function D(e){if(m(e))return{label:f(`sessionsView.statusLive`),tone:`live`};if(e.status){let t=e.status===`done`?`done`:`failed`;return{label:E(e.status),tone:t}}return e.hasActiveRun===!1?{label:f(`sessionsView.statusIdle`),tone:`idle`}:{label:f(`sessionsView.statusUnknown`),tone:`muted`}}function O(e){let t=D(e),n=`${f(`sessionsView.status`)}: ${t.label}`;return c`
1
+ import{$ as e,O as t,V as n,Y as r,_ as i,d as a,et as o,f as s,it as c,k as l,rt as u,s as d,tt as f,u as p,w as m}from"./index-CoPmouB8.js";var h=[`off`,`minimal`,`low`,`medium`,`high`],g=[``,`off`,`on`,`full`],_=[``,`on`,`off`],v=[``,`off`,`on`,`stream`],y=[10,25,50,100];function b(e,t){return Object.prototype.hasOwnProperty.call(e,t)?e[t]??null:null}function x(e,t){return(!e.modelProvider||e.modelProvider===t?.modelProvider)&&(!e.model||e.model===t?.model)}function S(e,t){let n=x(e,t),r=p(e.thinkingDefault??(n?t?.thinkingDefault:void 0)),i=e.thinkingLevels?.length?e.thinkingLevels:n&&t?.thinkingLevels?.length?t.thinkingLevels:(e.thinkingOptions?.length?e.thinkingOptions:n&&t?.thinkingOptions?.length?t.thinkingOptions:h).map(e=>({id:s(e),label:e}));return[{value:``,label:r},...i.map(e=>({value:s(e.id),label:a(e.id,e.label)}))]}function C(e,t){return!t||e.includes(t)?[...e]:[...e,t]}function w(e,t){return!t||e.some(e=>e.value===t)?[...e]:[...e,{value:t,label:a(t)}]}function T(){return g.map(e=>({value:e,label:f(e===``?`sessionsView.inherit`:e===`off`?`sessionsView.offExplicit`:`sessionsView.${e}`)}))}function ee(){return _.map(e=>({value:e,label:f(e===``?`sessionsView.inherit`:`sessionsView.${e}`)}))}function E(e){switch(e){case`running`:return f(`sessionsView.statusRunning`);case`done`:return f(`sessionsView.statusDone`);case`failed`:return f(`sessionsView.statusFailed`);case`killed`:return f(`sessionsView.statusKilled`);case`timeout`:return f(`sessionsView.statusTimeout`);default:return f(`sessionsView.statusUnknown`)}}function D(e){if(m(e))return{label:f(`sessionsView.statusLive`),tone:`live`};if(e.status){let t=e.status===`done`?`done`:`failed`;return{label:E(e.status),tone:t}}return e.hasActiveRun===!1?{label:f(`sessionsView.statusIdle`),tone:`idle`}:{label:f(`sessionsView.statusUnknown`),tone:`muted`}}function O(e){let t=D(e),n=`${f(`sessionsView.status`)}: ${t.label}`;return c`
2
2
  <span
3
3
  class="session-status-badge session-status-badge--${t.tone}"
4
4
  title=${n}
@@ -396,4 +396,4 @@ import{$ as e,O as t,V as n,Y as r,_ as i,d as a,et as o,f as s,it as c,k as l,r
396
396
  </div>
397
397
  </td>
398
398
  </tr>`]:[]]}export{B as renderSessions};
399
- //# sourceMappingURL=sessions-BZ92NJ5-.js.map
399
+ //# sourceMappingURL=sessions-Cb6W8cm7.js.map
@@ -1,4 +1,4 @@
1
- import{$ as e,T as t,it as n,p as r,rt as i,tt as a,v as o}from"./index-B3XB6bSV.js";import{i as s,n as c,r as l,t as u}from"./skills-shared-DC-j3T73.js";function d(e){return e?r(e,window.location.href):null}function f(e){!(e instanceof HTMLDialogElement)||e.open||(e.isConnected?e.showModal():queueMicrotask(()=>{e.isConnected&&!e.open&&e.showModal()}))}var p=[{id:`all`,label:`All`},{id:`ready`,label:`Ready`},{id:`needs-setup`,label:`Needs Setup`},{id:`disabled`,label:`Disabled`}];function m(e,t){switch(t){case`all`:return!0;case`ready`:return!e.disabled&&e.eligible;case`needs-setup`:return!e.disabled&&!e.eligible;case`disabled`:return e.disabled}throw Error(`Unsupported skills status filter`)}function h(e){return e.disabled?`muted`:e.eligible?`ok`:`warn`}function g(t){let r=t.report?.skills??[],o={all:r.length,ready:0,"needs-setup":0,disabled:0};for(let e of r)e.disabled?o.disabled++:e.eligible?o.ready++:o[`needs-setup`]++;let c=t.statusFilter===`all`?r:r.filter(e=>m(e,t.statusFilter)),l=e(t.filter),u=l?c.filter(t=>e([t.name,t.description,t.source].join(` `)).includes(l)):c,d=s(u),f=t.detailKey?r.find(e=>e.skillKey===t.detailKey)??null:null;return n`
1
+ import{$ as e,T as t,it as n,p as r,rt as i,tt as a,v as o}from"./index-CoPmouB8.js";import{i as s,n as c,r as l,t as u}from"./skills-shared-BtO99ARa.js";function d(e){return e?r(e,window.location.href):null}function f(e){!(e instanceof HTMLDialogElement)||e.open||(e.isConnected?e.showModal():queueMicrotask(()=>{e.isConnected&&!e.open&&e.showModal()}))}var p=[{id:`all`,label:`All`},{id:`ready`,label:`Ready`},{id:`needs-setup`,label:`Needs Setup`},{id:`disabled`,label:`Disabled`}];function m(e,t){switch(t){case`all`:return!0;case`ready`:return!e.disabled&&e.eligible;case`needs-setup`:return!e.disabled&&!e.eligible;case`disabled`:return e.disabled}throw Error(`Unsupported skills status filter`)}function h(e){return e.disabled?`muted`:e.eligible?`ok`:`warn`}function g(t){let r=t.report?.skills??[],o={all:r.length,ready:0,"needs-setup":0,disabled:0};for(let e of r)e.disabled?o.disabled++:e.eligible?o.ready++:o[`needs-setup`]++;let c=t.statusFilter===`all`?r:r.filter(e=>m(e,t.statusFilter)),l=e(t.filter),u=l?c.filter(t=>e([t.name,t.description,t.source].join(` `)).includes(l)):c,d=s(u),f=t.detailKey?r.find(e=>e.skillKey===t.detailKey)??null:null;return n`
2
2
  <section class="card">
3
3
  <div class="row" style="justify-content: space-between;">
4
4
  <div>
@@ -311,4 +311,4 @@ import{$ as e,T as t,it as n,p as r,rt as i,tt as a,v as o}from"./index-B3XB6bSV
311
311
  </div>
312
312
  </dialog>
313
313
  `}export{g as renderSkills};
314
- //# sourceMappingURL=skills-DyIrWhx0.js.map
314
+ //# sourceMappingURL=skills-m8BzGBav.js.map
@@ -1,4 +1,4 @@
1
- import{it as e,rt as t}from"./index-B3XB6bSV.js";var n=[{id:`workspace`,label:`Workspace Skills`,sources:[`daocore-workspace`]},{id:`built-in`,label:`Built-in Skills`,sources:[`daocore-bundled`]},{id:`installed`,label:`Installed Skills`,sources:[`daocore-managed`]},{id:`extra`,label:`Extra Skills`,sources:[`daocore-extra`]}];function r(e){let t=new Map;for(let e of n)t.set(e.id,{id:e.id,label:e.label,skills:[]});let r=n.find(e=>e.id===`built-in`),i={id:`other`,label:`Other Skills`,skills:[]};for(let a of e){let e=a.bundled?r:n.find(e=>e.sources.includes(a.source));e?t.get(e.id)?.skills.push(a):i.skills.push(a)}let a=n.map(e=>t.get(e.id)).filter(e=>!!(e&&e.skills.length>0));return i.skills.length>0&&a.push(i),a}function i(e){return[...e.missing.bins.map(e=>`bin:${e}`),...e.missing.env.map(e=>`env:${e}`),...e.missing.config.map(e=>`config:${e}`),...e.missing.os.map(e=>`os:${e}`)]}function a(e){let t=[];return e.disabled&&t.push(`disabled`),e.blockedByAllowlist&&t.push(`blocked by allowlist`),t}function o(n){let r=n.skill,i=!!n.showBundledBadge;return e`
1
+ import{it as e,rt as t}from"./index-CoPmouB8.js";var n=[{id:`workspace`,label:`Workspace Skills`,sources:[`daocore-workspace`]},{id:`built-in`,label:`Built-in Skills`,sources:[`daocore-bundled`]},{id:`installed`,label:`Installed Skills`,sources:[`daocore-managed`]},{id:`extra`,label:`Extra Skills`,sources:[`daocore-extra`]}];function r(e){let t=new Map;for(let e of n)t.set(e.id,{id:e.id,label:e.label,skills:[]});let r=n.find(e=>e.id===`built-in`),i={id:`other`,label:`Other Skills`,skills:[]};for(let a of e){let e=a.bundled?r:n.find(e=>e.sources.includes(a.source));e?t.get(e.id)?.skills.push(a):i.skills.push(a)}let a=n.map(e=>t.get(e.id)).filter(e=>!!(e&&e.skills.length>0));return i.skills.length>0&&a.push(i),a}function i(e){return[...e.missing.bins.map(e=>`bin:${e}`),...e.missing.env.map(e=>`env:${e}`),...e.missing.config.map(e=>`config:${e}`),...e.missing.os.map(e=>`os:${e}`)]}function a(e){let t=[];return e.disabled&&t.push(`disabled`),e.blockedByAllowlist&&t.push(`blocked by allowlist`),t}function o(n){let r=n.skill,i=!!n.showBundledBadge;return e`
2
2
  <div class="chip-row" style="margin-top: 6px;">
3
3
  <span class="chip">${r.source}</span>
4
4
  ${i?e` <span class="chip">bundled</span> `:t}
@@ -8,4 +8,4 @@ import{it as e,rt as t}from"./index-B3XB6bSV.js";var n=[{id:`workspace`,label:`W
8
8
  ${r.disabled?e` <span class="chip chip-warn">disabled</span> `:t}
9
9
  </div>
10
10
  `}export{r as i,a as n,o as r,i as t};
11
- //# sourceMappingURL=skills-shared-DC-j3T73.js.map
11
+ //# sourceMappingURL=skills-shared-BtO99ARa.js.map
@@ -195,7 +195,7 @@
195
195
  color: #0369a1;
196
196
  }
197
197
  </style>
198
- <script type="module" crossorigin src="./assets/index-B3XB6bSV.js"></script>
198
+ <script type="module" crossorigin src="./assets/index-CoPmouB8.js"></script>
199
199
  <link rel="stylesheet" crossorigin href="./assets/index-BimYwq-S.css">
200
200
  </head>
201
201
  <body>
@@ -2,7 +2,7 @@
2
2
  // Handles offline caching and push notifications.
3
3
 
4
4
  const CACHE_PREFIX = "daocore-control-";
5
- const EMBEDDED_CACHE_VERSION = "2026.5.95-d631bf21ee21";
5
+ const EMBEDDED_CACHE_VERSION = "2026.5.97-49055735f9e1";
6
6
  const URL_CACHE_VERSION = new URL(self.location.href).searchParams
7
7
  .get("v")
8
8
  ?.replace(/[^a-zA-Z0-9._-]/g, "-");
@@ -5,7 +5,7 @@ declare function describeIMessageMessageTool({
5
5
  accountId,
6
6
  currentChannelId
7
7
  }: Parameters<NonNullable<ChannelMessageActionAdapter["describeMessageTool"]>>[0]): {
8
- actions: ("permissions" | "timeout" | "search" | "reply" | "poll" | "reactions" | "broadcast" | "send" | "poll-vote" | "react" | "read" | "edit" | "unsend" | "sendWithEffect" | "renameGroup" | "setGroupIcon" | "addParticipant" | "removeParticipant" | "leaveGroup" | "sendAttachment" | "delete" | "pin" | "unpin" | "list-pins" | "thread-create" | "thread-list" | "thread-reply" | "sticker" | "sticker-search" | "member-info" | "role-info" | "emoji-list" | "emoji-upload" | "sticker-upload" | "role-add" | "role-remove" | "channel-info" | "channel-list" | "channel-create" | "channel-edit" | "channel-delete" | "channel-move" | "category-create" | "category-edit" | "category-delete" | "topic-create" | "topic-edit" | "voice-status" | "event-list" | "event-create" | "kick" | "ban" | "set-profile" | "set-presence" | "download-file" | "upload-file")[];
8
+ actions: ("permissions" | "timeout" | "search" | "reply" | "reactions" | "poll" | "broadcast" | "send" | "poll-vote" | "react" | "read" | "edit" | "unsend" | "sendWithEffect" | "renameGroup" | "setGroupIcon" | "addParticipant" | "removeParticipant" | "leaveGroup" | "sendAttachment" | "delete" | "pin" | "unpin" | "list-pins" | "thread-create" | "thread-list" | "thread-reply" | "sticker" | "sticker-search" | "member-info" | "role-info" | "emoji-list" | "emoji-upload" | "sticker-upload" | "role-add" | "role-remove" | "channel-info" | "channel-list" | "channel-create" | "channel-edit" | "channel-delete" | "channel-move" | "category-create" | "category-edit" | "category-delete" | "topic-create" | "topic-edit" | "voice-status" | "event-list" | "event-create" | "kick" | "ban" | "set-profile" | "set-presence" | "download-file" | "upload-file")[];
9
9
  } | null;
10
10
  //#endregion
11
11
  export { describeIMessageMessageTool as describeMessageTool };
@@ -1 +1 @@
1
- 2026-05-28T13:11:56.374Z
1
+ 2026-05-28T15:08:03.484Z
@@ -1167,33 +1167,33 @@
1167
1167
  "dist/control-ui-links-Bis3_euY.js",
1168
1168
  "dist/control-ui-shared-DyXRM8Tr.js",
1169
1169
  "dist/control-ui/apple-touch-icon.png",
1170
- "dist/control-ui/assets/agents-DhhhjVfj.js",
1170
+ "dist/control-ui/assets/agents-TcDckPid.js",
1171
1171
  "dist/control-ui/assets/ar-DmY3OKJ7.js",
1172
- "dist/control-ui/assets/channel-config-extras-DsWLp7oz.js",
1173
- "dist/control-ui/assets/channels-DhDjOrEc.js",
1174
- "dist/control-ui/assets/cron-1rfwzgga.js",
1172
+ "dist/control-ui/assets/channel-config-extras-Dx3phszd.js",
1173
+ "dist/control-ui/assets/channels-Dy2yk3Du.js",
1174
+ "dist/control-ui/assets/cron-u03_i0HS.js",
1175
1175
  "dist/control-ui/assets/de-nNWCMyC9.js",
1176
- "dist/control-ui/assets/debug-BfQ6tc5Z.js",
1176
+ "dist/control-ui/assets/debug-7KunYHyM.js",
1177
1177
  "dist/control-ui/assets/es-BcdhLNdf.js",
1178
1178
  "dist/control-ui/assets/fa-DbS2z7VZ.js",
1179
1179
  "dist/control-ui/assets/fr-CBqvw0rY.js",
1180
1180
  "dist/control-ui/assets/id-DXES9f6X.js",
1181
- "dist/control-ui/assets/index-B3XB6bSV.js",
1182
1181
  "dist/control-ui/assets/index-BimYwq-S.css",
1183
- "dist/control-ui/assets/instances-DxlwM05o.js",
1182
+ "dist/control-ui/assets/index-CoPmouB8.js",
1183
+ "dist/control-ui/assets/instances-CMzbUBCW.js",
1184
1184
  "dist/control-ui/assets/it-DpT4ZVOU.js",
1185
1185
  "dist/control-ui/assets/ja-JP-D8RXA_04.js",
1186
1186
  "dist/control-ui/assets/ko-5en8VO8w.js",
1187
- "dist/control-ui/assets/logs-C6ECFXFe.js",
1187
+ "dist/control-ui/assets/logs-QiHU0yhv.js",
1188
1188
  "dist/control-ui/assets/nl-Bb10QoRg.js",
1189
- "dist/control-ui/assets/nodes-Ci25CEEq.js",
1189
+ "dist/control-ui/assets/nodes-tabyMKVi.js",
1190
1190
  "dist/control-ui/assets/pl-Y8UIOEIm.js",
1191
1191
  "dist/control-ui/assets/preview-BBw3vauN.js",
1192
1192
  "dist/control-ui/assets/pt-BR-DDsy5M68.js",
1193
1193
  "dist/control-ui/assets/push-subscription-TTvs1whj.js",
1194
- "dist/control-ui/assets/sessions-BZ92NJ5-.js",
1195
- "dist/control-ui/assets/skills-DyIrWhx0.js",
1196
- "dist/control-ui/assets/skills-shared-DC-j3T73.js",
1194
+ "dist/control-ui/assets/sessions-Cb6W8cm7.js",
1195
+ "dist/control-ui/assets/skills-m8BzGBav.js",
1196
+ "dist/control-ui/assets/skills-shared-BtO99ARa.js",
1197
1197
  "dist/control-ui/assets/th-D_2DtFn6.js",
1198
1198
  "dist/control-ui/assets/tr-DBsYZTmE.js",
1199
1199
  "dist/control-ui/assets/uk-BUxHBc05.js",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gaodefa/daocore",
3
- "version": "2026.5.95",
3
+ "version": "2026.5.97",
4
4
  "description": "Multi-channel AI gateway with extensible messaging integrations",
5
5
  "keywords": [],
6
6
  "homepage": "https://github.com/openclaw/openclaw#readme",