@gaodefa/daocore 2026.5.68 → 2026.5.70
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/acp/control-plane/manager.d.ts +1 -2
- package/dist/{agent-command-DKqx29vm.d.ts → agent-command-D5KxwCVS.d.ts} +38 -2
- package/dist/{agent-harness-CGtBwZh6.d.ts → agent-harness-i84DCGrs.d.ts} +2 -2
- package/dist/{agent-harness-runtime-DMYJ4buZ.d.ts → agent-harness-runtime-f-n-v49w.d.ts} +3 -3
- package/dist/agents/pi-embedded-runner/tool-split.d.ts +1 -1
- package/dist/{api-C9Dmd2CA.d.ts → api-DR2ggiMh.d.ts} +1 -1
- package/dist/build-info.json +3 -3
- package/dist/{call-BAWIPJo2.d.ts → call-B_C_oeLt.d.ts} +1 -1
- package/dist/canvas-host/a2ui/.bundle.hash +1 -1
- package/dist/{channel-BoK62YYe.d.ts → channel-6Ur4knwV.d.ts} +1 -1
- package/dist/{channel-Bkp8v6zY.d.ts → channel-B6cs8XTu.d.ts} +1 -1
- package/dist/{channel-DpQ6_cvo.d.ts → channel-BA4tIj-V.d.ts} +1 -1
- package/dist/channel-BAmqPZ2U.d.ts +6 -0
- package/dist/{channel-C10lHKrC.d.ts → channel-BGDG24-r.d.ts} +1 -1
- package/dist/{channel-D9LDQOYt.d.ts → channel-Bg0U_v-2.d.ts} +1 -1
- package/dist/{channel-whyHp4eY.d.ts → channel-Bv5dnVMf.d.ts} +1 -1
- package/dist/{channel-DVGMasO6.d.ts → channel-CBQ2Z5DC.d.ts} +1 -1
- package/dist/{channel-BdhbzWTg.d.ts → channel-CGST1auC.d.ts} +1 -1
- package/dist/{channel-uP-mo8Q6.d.ts → channel-D0dx-dRf.d.ts} +1 -1
- package/dist/{channel-CZrble5P.d.ts → channel-DYXA0g9T.d.ts} +1 -1
- package/dist/{channel-Dl4eeuJ3.d.ts → channel-DcoW80yh.d.ts} +1 -1
- package/dist/{channel-hShoCuAc.d.ts → channel-DpzbGwHc.d.ts} +1 -1
- package/dist/{channel-Djgm5DE9.d.ts → channel-GdRd01F0.d.ts} +1 -1
- package/dist/{channel-D8X4fgB9.d.ts → channel-I0GM2uBu.d.ts} +1 -1
- package/dist/{channel-core-CbkDdNXh.d.ts → channel-core-CastyvGp.d.ts} +1 -1
- package/dist/{channel-entry-contract-DUSF3gce.d.ts → channel-entry-contract-D42_qkU5.d.ts} +2 -2
- package/dist/{channel-lifecycle-DCTZ2J_8.d.ts → channel-lifecycle-DCl2GbRW.d.ts} +0 -1
- package/dist/{channel-pIMjOo6Y.d.ts → channel-mq1OUoEw.d.ts} +1 -1
- package/dist/{channel-B6YcNFXw.d.ts → channel-nZgN4NRA.d.ts} +1 -1
- package/dist/{channel-pairing-pKisqGWj.d.ts → channel-pairing-BRqfYy30.d.ts} +1 -1
- package/dist/{channel-plugin-runtime-Cg67QAiE.d.ts → channel-plugin-runtime-Bl5UlXSV.d.ts} +1 -1
- package/dist/{channel.setup-BMXb23G7.d.ts → channel.setup-B0_HezV4.d.ts} +1 -1
- package/dist/{channel.setup-BdEXf9Ic.d.ts → channel.setup-C086lFEl.d.ts} +1 -1
- package/dist/{channel.setup-UZjcpncE.d.ts → channel.setup-Dxq2KPzh.d.ts} +1 -1
- package/dist/{cli-DYinYyHP.d.ts → cli-C1U-lTT9.d.ts} +1 -1
- package/dist/{cli-backend-DmBwqwqy.d.ts → cli-backend-6UP14NL8.d.ts} +1 -1
- package/dist/{cli-backend-CSCGROD2.d.ts → cli-backend-DPnuZtQT.d.ts} +1 -1
- package/dist/{cli-shared-CXpra3BN.d.ts → cli-shared-B9y-PoSw.d.ts} +1 -1
- package/dist/cli-startup-metadata.json +9 -9
- package/dist/{commands-CqcnXnk-.d.ts → commands-BAnAylSq.d.ts} +1 -1
- package/dist/{config-schema-Bqr7vPys.d.ts → config-schema-CwardMUs.d.ts} +1 -1
- package/dist/{contracts-testkit-DQ4aMv6G.d.ts → contracts-testkit-hciRyKaU.d.ts} +7 -7
- package/dist/control-ui/assets/{agents-BCBPOdTk.js → agents-ek4OnoPe.js} +2 -2
- package/dist/control-ui/assets/{channel-config-extras-Dk7ruu0p.js → channel-config-extras-BIW0Sn8k.js} +2 -2
- package/dist/control-ui/assets/{channels-CVYXE-w5.js → channels-CwQPxfgA.js} +2 -2
- package/dist/control-ui/assets/{cron-y2WKOhP8.js → cron-6VWSJqG0.js} +2 -2
- package/dist/control-ui/assets/{debug-DWqJJRJq.js → debug-0dc3uc2c.js} +2 -2
- package/dist/control-ui/assets/{index-CXACV4wu.js → index-CwM8LCEZ.js} +41 -22
- package/dist/control-ui/assets/{instances-DqZrFuhB.js → instances-BeL04kSz.js} +2 -2
- package/dist/control-ui/assets/{logs-CuT68Z9a.js → logs-CiQpEPBa.js} +2 -2
- package/dist/control-ui/assets/{nodes-BznvUGVP.js → nodes-DiiJtnVR.js} +2 -2
- package/dist/control-ui/assets/{sessions-rQTx8EYG.js → sessions-DHZ945CF.js} +2 -2
- package/dist/control-ui/assets/{skills-Dac-Vj_t.js → skills-B12ElwM9.js} +2 -2
- package/dist/control-ui/assets/{skills-shared-DpuwPMcC.js → skills-shared-Bxk8xnts.js} +2 -2
- package/dist/control-ui/index.html +1 -1
- package/dist/control-ui/sw.js +1 -1
- package/dist/{core-DIQ0fbwp.d.ts → core-BJHibRk_.d.ts} +2 -2
- package/dist/{daocore-runtime-JsdCNe3l.d.ts → daocore-runtime-6OhurwDQ.d.ts} +1 -1
- package/dist/{embedding-provider-56qUY6a4.d.ts → embedding-provider-BgBR3Mtq.d.ts} +1 -1
- package/dist/{embedding-provider-CfSvDhLk.d.ts → embedding-provider-Bj3W1hOr.d.ts} +1 -1
- package/dist/{embedding-provider-DV9KtS1H.d.ts → embedding-provider-DYlA3JB1.d.ts} +1 -1
- package/dist/entry.d.ts +1 -1
- package/dist/extensions/active-memory/index.d.ts +1 -1
- package/dist/extensions/admin-http-rpc/index.d.ts +1 -1
- package/dist/extensions/alibaba/index.d.ts +1 -1
- package/dist/extensions/anthropic/api.d.ts +3 -3
- package/dist/extensions/anthropic/cli-backend-api.d.ts +2 -2
- package/dist/extensions/anthropic/cli-backend.d.ts +1 -1
- package/dist/extensions/anthropic/cli-migration.d.ts +1 -1
- package/dist/extensions/anthropic/cli-shared.d.ts +1 -1
- package/dist/extensions/anthropic/contract-api.d.ts +1 -1
- package/dist/extensions/anthropic/doctor-contract-api.d.ts +1 -1
- package/dist/extensions/anthropic/index.d.ts +1 -1
- package/dist/extensions/anthropic/provider-contract-api.d.ts +1 -1
- package/dist/extensions/anthropic/provider-discovery.d.ts +1 -1
- package/dist/extensions/anthropic/provider-policy-api.d.ts +1 -1
- package/dist/extensions/anthropic/register.runtime.d.ts +1 -1
- package/dist/extensions/anthropic/replay-policy.d.ts +1 -1
- package/dist/extensions/anthropic/setup-api.d.ts +1 -1
- package/dist/extensions/anthropic/stream-wrappers.d.ts +1 -1
- package/dist/extensions/anthropic/test-api.d.ts +2 -2
- package/dist/extensions/arcee/index.d.ts +1 -1
- package/dist/extensions/azure-speech/index.d.ts +1 -1
- package/dist/extensions/azure-speech/speech-provider.d.ts +1 -1
- package/dist/extensions/bonjour/index.d.ts +1 -1
- package/dist/extensions/browser/cli-metadata.d.ts +1 -1
- package/dist/extensions/browser/index.d.ts +1 -1
- package/dist/extensions/browser/plugin-registration.d.ts +1 -1
- package/dist/extensions/browser/register.runtime.d.ts +2 -2
- package/dist/extensions/browser/runtime-api.d.ts +3 -3
- package/dist/extensions/browser/setup-api.d.ts +1 -1
- package/dist/extensions/browser/test-support.d.ts +1 -1
- package/dist/extensions/byteplus/index.d.ts +1 -1
- package/dist/extensions/byteplus/provider-discovery.d.ts +1 -1
- package/dist/extensions/canvas/cli-metadata.d.ts +1 -1
- package/dist/extensions/canvas/index.d.ts +1 -1
- package/dist/extensions/canvas/runtime-api.d.ts +2 -2
- package/dist/extensions/canvas/setup-api.d.ts +1 -1
- package/dist/extensions/cerebras/index.d.ts +1 -1
- package/dist/extensions/chutes/index.d.ts +1 -1
- package/dist/extensions/clickclack/api.d.ts +2 -2
- package/dist/extensions/clickclack/channel-plugin-api.d.ts +1 -1
- package/dist/extensions/clickclack/index.d.ts +2 -2
- package/dist/extensions/clickclack/package.json +3 -3
- package/dist/extensions/clickclack/runtime-api.d.ts +2 -2
- package/dist/extensions/cloudflare-ai-gateway/index.d.ts +1 -1
- package/dist/extensions/cloudflare-ai-gateway/stream-wrappers.d.ts +1 -1
- package/dist/extensions/comfy/index.d.ts +1 -1
- package/dist/extensions/copilot-proxy/index.d.ts +1 -1
- package/dist/extensions/copilot-proxy/runtime-api.d.ts +2 -2
- package/dist/extensions/deepgram/index.d.ts +1 -1
- package/dist/extensions/deepgram/realtime-transcription-provider.d.ts +1 -1
- package/dist/extensions/deepgram/test-api.d.ts +1 -1
- package/dist/extensions/deepinfra/api.d.ts +2 -2
- package/dist/extensions/deepinfra/embedding-provider.d.ts +1 -1
- package/dist/extensions/deepinfra/index.d.ts +1 -1
- package/dist/extensions/deepinfra/memory-embedding-adapter.d.ts +1 -1
- package/dist/extensions/deepinfra/speech-provider.d.ts +1 -1
- package/dist/extensions/deepseek/api.d.ts +1 -1
- package/dist/extensions/deepseek/index.d.ts +1 -1
- package/dist/extensions/deepseek/provider-discovery.d.ts +1 -1
- package/dist/extensions/deepseek/provider-policy-api.d.ts +1 -1
- package/dist/extensions/deepseek/stream.d.ts +1 -1
- package/dist/extensions/deepseek/thinking.d.ts +1 -1
- package/dist/extensions/device-pair/api.d.ts +3 -3
- package/dist/extensions/device-pair/index.d.ts +1 -1
- package/dist/extensions/device-pair/notify.d.ts +1 -1
- package/dist/extensions/document-extract/index.d.ts +1 -1
- package/dist/extensions/duckduckgo/index.d.ts +1 -1
- package/dist/extensions/elevenlabs/index.d.ts +1 -1
- package/dist/extensions/elevenlabs/realtime-transcription-provider.d.ts +1 -1
- package/dist/extensions/elevenlabs/setup-api.d.ts +1 -1
- package/dist/extensions/elevenlabs/speech-provider.d.ts +1 -1
- package/dist/extensions/elevenlabs/test-api.d.ts +2 -2
- package/dist/extensions/exa/index.d.ts +1 -1
- package/dist/extensions/fal/index.d.ts +1 -1
- package/dist/extensions/fal/provider-contract-api.d.ts +1 -1
- package/dist/extensions/fal/provider-registration.d.ts +1 -1
- package/dist/extensions/file-transfer/index.d.ts +1 -1
- package/dist/extensions/firecrawl/index.d.ts +1 -1
- package/dist/extensions/fireworks/index.d.ts +1 -1
- package/dist/extensions/fireworks/provider-policy-api.d.ts +1 -1
- package/dist/extensions/fireworks/stream.d.ts +1 -1
- package/dist/extensions/fireworks/thinking-policy.d.ts +1 -1
- package/dist/extensions/github-copilot/embeddings.d.ts +1 -1
- package/dist/extensions/github-copilot/index.d.ts +1 -1
- package/dist/extensions/github-copilot/models.d.ts +1 -1
- package/dist/extensions/github-copilot/register.runtime.d.ts +2 -2
- package/dist/extensions/github-copilot/stream.d.ts +1 -1
- package/dist/extensions/google/api.d.ts +5 -5
- package/dist/extensions/google/cli-backend.d.ts +1 -1
- package/dist/extensions/google/doctor-contract-api.d.ts +1 -1
- package/dist/extensions/google/embedding-batch.d.ts +1 -1
- package/dist/extensions/google/embedding-provider.d.ts +1 -1
- package/dist/extensions/google/gemini-cli-provider.d.ts +1 -1
- package/dist/extensions/google/index.d.ts +1 -1
- package/dist/extensions/google/memory-embedding-adapter.d.ts +1 -1
- package/dist/extensions/google/provider-contract-api.d.ts +1 -1
- package/dist/extensions/google/provider-hooks.d.ts +2 -2
- package/dist/extensions/google/provider-models.d.ts +1 -1
- package/dist/extensions/google/provider-policy-api.d.ts +1 -1
- package/dist/extensions/google/provider-policy.d.ts +1 -1
- package/dist/extensions/google/provider-registration.d.ts +1 -1
- package/dist/extensions/google/realtime-voice-provider.d.ts +1 -1
- package/dist/extensions/google/runtime-api.d.ts +3 -3
- package/dist/extensions/google/setup-api.d.ts +1 -1
- package/dist/extensions/google/speech-provider.d.ts +1 -1
- package/dist/extensions/google/test-api.d.ts +2 -2
- package/dist/extensions/google/thinking-api.d.ts +1 -1
- package/dist/extensions/google/thinking.d.ts +1 -1
- package/dist/extensions/google/transport-stream.d.ts +1 -1
- package/dist/extensions/gradium/index.d.ts +1 -1
- package/dist/extensions/gradium/speech-provider.d.ts +1 -1
- package/dist/extensions/groq/index.d.ts +1 -1
- package/dist/extensions/huggingface/index.d.ts +1 -1
- package/dist/extensions/image-generation-core/api.d.ts +4 -4
- package/dist/extensions/image-generation-core/runtime-api.d.ts +1 -1
- package/dist/extensions/imessage/api.d.ts +2 -2
- package/dist/extensions/imessage/channel-plugin-api.d.ts +1 -1
- package/dist/extensions/imessage/index.d.ts +2 -2
- package/dist/extensions/imessage/message-tool-api.d.ts +1 -1
- package/dist/extensions/imessage/runtime-api.d.ts +3 -3
- package/dist/extensions/imessage/setup-entry.d.ts +2 -2
- package/dist/extensions/imessage/test-api.d.ts +1 -1
- package/dist/extensions/inworld/index.d.ts +1 -1
- package/dist/extensions/inworld/speech-provider.d.ts +1 -1
- package/dist/extensions/irc/api.d.ts +1 -1
- package/dist/extensions/irc/channel-plugin-api.d.ts +1 -1
- package/dist/extensions/irc/index.d.ts +2 -2
- package/dist/extensions/irc/setup-entry.d.ts +2 -2
- package/dist/extensions/kilocode/index.d.ts +1 -1
- package/dist/extensions/kimi-coding/index.d.ts +1 -1
- package/dist/extensions/kimi-coding/stream.d.ts +1 -1
- package/dist/extensions/litellm/index.d.ts +1 -1
- package/dist/extensions/llm-task/api.d.ts +2 -2
- package/dist/extensions/llm-task/index.d.ts +1 -1
- package/dist/extensions/lmstudio/api.d.ts +1 -1
- package/dist/extensions/lmstudio/index.d.ts +1 -1
- package/dist/extensions/lmstudio/memory-embedding-adapter.d.ts +1 -1
- package/dist/extensions/mattermost/channel-plugin-api.d.ts +2 -2
- package/dist/extensions/mattermost/channel-plugin-runtime.d.ts +1 -1
- package/dist/extensions/mattermost/index.d.ts +2 -2
- package/dist/extensions/mattermost/package.json +3 -3
- package/dist/extensions/mattermost/runtime-api.d.ts +9 -9
- package/dist/extensions/mattermost/setup-entry.d.ts +2 -2
- package/dist/extensions/mattermost/slash-route-api.d.ts +1 -1
- package/dist/extensions/media-understanding-core/package.json +1 -1
- package/dist/extensions/memory-core/api.d.ts +1 -1
- package/dist/extensions/memory-core/cli-metadata.d.ts +1 -1
- package/dist/extensions/memory-core/index.d.ts +1 -1
- package/dist/extensions/memory-core/manager-runtime.d.ts +1 -1
- package/dist/extensions/memory-core/package.json +3 -3
- package/dist/extensions/memory-core/runtime-api.d.ts +2 -2
- package/dist/extensions/memory-wiki/api.d.ts +3 -3
- package/dist/extensions/memory-wiki/cli-metadata.d.ts +1 -1
- package/dist/extensions/memory-wiki/index.d.ts +1 -1
- package/dist/extensions/memory-wiki/package.json +3 -3
- package/dist/extensions/memory-wiki/setup-api.d.ts +1 -1
- package/dist/extensions/microsoft/index.d.ts +1 -1
- package/dist/extensions/microsoft/speech-provider.d.ts +1 -1
- package/dist/extensions/microsoft/test-api.d.ts +1 -1
- package/dist/extensions/microsoft-foundry/auth.d.ts +1 -1
- package/dist/extensions/microsoft-foundry/cli.d.ts +1 -1
- package/dist/extensions/microsoft-foundry/index.d.ts +1 -1
- package/dist/extensions/microsoft-foundry/onboard.d.ts +3 -3
- package/dist/extensions/microsoft-foundry/provider.d.ts +1 -1
- package/dist/extensions/microsoft-foundry/runtime.d.ts +1 -1
- package/dist/extensions/microsoft-foundry/shared-runtime.d.ts +1 -1
- package/dist/extensions/microsoft-foundry/shared.d.ts +1 -1
- package/dist/extensions/migrate-claude/apply.d.ts +1 -1
- package/dist/extensions/migrate-claude/config.d.ts +1 -1
- package/dist/extensions/migrate-claude/helpers.d.ts +1 -1
- package/dist/extensions/migrate-claude/index.d.ts +1 -1
- package/dist/extensions/migrate-claude/memory.d.ts +2 -2
- package/dist/extensions/migrate-claude/package.json +3 -3
- package/dist/extensions/migrate-claude/plan.d.ts +1 -1
- package/dist/extensions/migrate-claude/provider.d.ts +1 -1
- package/dist/extensions/migrate-claude/skills.d.ts +2 -2
- package/dist/extensions/migrate-claude/targets.d.ts +1 -1
- package/dist/extensions/migrate-hermes/apply.d.ts +1 -1
- package/dist/extensions/migrate-hermes/config.d.ts +1 -1
- package/dist/extensions/migrate-hermes/helpers.d.ts +1 -1
- package/dist/extensions/migrate-hermes/index.d.ts +1 -1
- package/dist/extensions/migrate-hermes/items.d.ts +1 -1
- package/dist/extensions/migrate-hermes/model.d.ts +1 -1
- package/dist/extensions/migrate-hermes/package.json +3 -3
- package/dist/extensions/migrate-hermes/plan.d.ts +1 -1
- package/dist/extensions/migrate-hermes/provider.d.ts +1 -1
- package/dist/extensions/migrate-hermes/secrets.d.ts +2 -2
- package/dist/extensions/migrate-hermes/skills.d.ts +2 -2
- package/dist/extensions/migrate-hermes/targets.d.ts +1 -1
- package/dist/extensions/minimax/index.d.ts +1 -1
- package/dist/extensions/minimax/provider-contract-api.d.ts +1 -1
- package/dist/extensions/minimax/provider-registration.d.ts +1 -1
- package/dist/extensions/minimax/speech-provider.d.ts +1 -1
- package/dist/extensions/mistral/embedding-provider.d.ts +1 -1
- package/dist/extensions/mistral/index.d.ts +1 -1
- package/dist/extensions/mistral/memory-embedding-adapter.d.ts +1 -1
- package/dist/extensions/mistral/realtime-transcription-provider.d.ts +1 -1
- package/dist/extensions/mistral/test-api.d.ts +1 -1
- package/dist/extensions/moonshot/index.d.ts +1 -1
- package/dist/extensions/moonshot/provider-contract-api.d.ts +1 -1
- package/dist/extensions/moonshot/provider-discovery.d.ts +1 -1
- package/dist/extensions/nvidia/index.d.ts +1 -1
- package/dist/extensions/oc-path/cli-metadata.d.ts +1 -1
- package/dist/extensions/oc-path/cli-registration.d.ts +1 -1
- package/dist/extensions/oc-path/index.d.ts +1 -1
- package/dist/extensions/oc-path/package.json +3 -3
- package/dist/extensions/ollama/api.d.ts +1 -1
- package/dist/extensions/ollama/index.d.ts +1 -1
- package/dist/extensions/ollama/provider-discovery.d.ts +1 -1
- package/dist/extensions/ollama/provider-policy-api.d.ts +1 -1
- package/dist/extensions/ollama/runtime-api.d.ts +1 -1
- package/dist/extensions/open-prose/index.d.ts +1 -1
- package/dist/extensions/open-prose/runtime-api.d.ts +2 -2
- package/dist/extensions/open-prose/skills/prose/SKILL.md +1 -1
- package/dist/extensions/openai/api.d.ts +4 -4
- package/dist/extensions/openai/embedding-batch.d.ts +1 -1
- package/dist/extensions/openai/embedding-provider.d.ts +1 -1
- package/dist/extensions/openai/index.d.ts +1 -1
- package/dist/extensions/openai/memory-embedding-adapter.d.ts +1 -1
- package/dist/extensions/openai/openai-codex-oauth.runtime.d.ts +1 -1
- package/dist/extensions/openai/openai-codex-provider.d.ts +1 -1
- package/dist/extensions/openai/openai-provider.d.ts +1 -1
- package/dist/extensions/openai/prompt-overlay.d.ts +1 -1
- package/dist/extensions/openai/provider-contract-api.d.ts +1 -1
- package/dist/extensions/openai/provider-policy-api.d.ts +1 -1
- package/dist/extensions/openai/realtime-transcription-provider.d.ts +1 -1
- package/dist/extensions/openai/realtime-voice-provider.d.ts +1 -1
- package/dist/extensions/openai/register.runtime.d.ts +6 -6
- package/dist/extensions/openai/replay-policy.d.ts +1 -1
- package/dist/extensions/openai/setup-api.d.ts +1 -1
- package/dist/extensions/openai/shared.d.ts +3 -3
- package/dist/extensions/openai/speech-provider.d.ts +1 -1
- package/dist/extensions/openai/test-api.d.ts +3 -3
- package/dist/extensions/openai/thinking-policy.d.ts +1 -1
- package/dist/extensions/openai/transport-policy.d.ts +1 -1
- package/dist/extensions/opencode/index.d.ts +1 -1
- package/dist/extensions/opencode/provider-policy-api.d.ts +1 -1
- package/dist/extensions/opencode-go/index.d.ts +1 -1
- package/dist/extensions/opencode-go/provider-catalog.d.ts +1 -1
- package/dist/extensions/opencode-go/stream.d.ts +1 -1
- package/dist/extensions/openrouter/api.d.ts +1 -1
- package/dist/extensions/openrouter/index.d.ts +1 -1
- package/dist/extensions/openrouter/provider-contract-api.d.ts +1 -1
- package/dist/extensions/openrouter/provider-policy-api.d.ts +1 -1
- package/dist/extensions/openrouter/speech-provider.d.ts +1 -1
- package/dist/extensions/openrouter/stream.d.ts +1 -1
- package/dist/extensions/openrouter/test-api.d.ts +1 -1
- package/dist/extensions/openrouter/thinking-policy.d.ts +1 -1
- package/dist/extensions/openrouter/video-generation-provider.d.ts +1 -1
- package/dist/extensions/openrouter/video-model-catalog.d.ts +1 -1
- package/dist/extensions/perplexity/index.d.ts +1 -1
- package/dist/extensions/phone-control/index.d.ts +1 -1
- package/dist/extensions/phone-control/runtime-api.d.ts +2 -2
- package/dist/extensions/policy/index.d.ts +1 -1
- package/dist/extensions/policy/package.json +3 -3
- package/dist/extensions/qianfan/index.d.ts +1 -1
- package/dist/extensions/qwen/api.d.ts +1 -1
- package/dist/extensions/qwen/index.d.ts +1 -1
- package/dist/extensions/qwen/stream.d.ts +1 -1
- package/dist/extensions/qwen-dashscope/daocore.plugin.json +97 -0
- package/dist/extensions/qwen-dashscope/index.d.ts +11 -0
- package/dist/extensions/qwen-dashscope/index.js +198 -0
- package/dist/extensions/qwen-dashscope/package.json +18 -0
- package/dist/extensions/runway/index.d.ts +1 -1
- package/dist/extensions/searxng/index.d.ts +1 -1
- package/dist/extensions/senseaudio/index.d.ts +1 -1
- package/dist/extensions/sglang/index.d.ts +1 -1
- package/dist/extensions/signal/api.d.ts +3 -3
- package/dist/extensions/signal/channel-entry.d.ts +2 -2
- package/dist/extensions/signal/channel-plugin-api.d.ts +1 -1
- package/dist/extensions/signal/index.d.ts +2 -2
- package/dist/extensions/signal/runtime-api.d.ts +6 -6
- package/dist/extensions/signal/setup-entry.d.ts +2 -2
- package/dist/extensions/skill-workshop/api.d.ts +2 -2
- package/dist/extensions/skill-workshop/index.d.ts +1 -1
- package/dist/extensions/speech-core/api.d.ts +3 -3
- package/dist/extensions/speech-core/runtime-api.d.ts +2 -2
- package/dist/extensions/stepfun/index.d.ts +1 -1
- package/dist/extensions/synthetic/index.d.ts +1 -1
- package/dist/extensions/talk-voice/api.d.ts +2 -2
- package/dist/extensions/talk-voice/index.d.ts +1 -1
- package/dist/extensions/tavily/index.d.ts +1 -1
- package/dist/extensions/tavily/skills/tavily/SKILL.md +1 -1
- package/dist/extensions/telegram/api.d.ts +4 -4
- package/dist/extensions/telegram/channel-plugin-api.d.ts +2 -2
- package/dist/extensions/telegram/contract-api.d.ts +1 -1
- package/dist/extensions/telegram/index.d.ts +2 -2
- package/dist/extensions/telegram/runtime-api.d.ts +3 -3
- package/dist/extensions/telegram/setup-entry.d.ts +2 -2
- package/dist/extensions/telegram/setup-plugin-api.d.ts +1 -1
- package/dist/extensions/tencent/index.d.ts +1 -1
- package/dist/extensions/tencent/provider-discovery.d.ts +1 -1
- package/dist/extensions/thread-ownership/api.d.ts +2 -2
- package/dist/extensions/thread-ownership/index.d.ts +1 -1
- package/dist/extensions/together/index.d.ts +1 -1
- package/dist/extensions/tokenjuice/index.d.ts +1 -1
- package/dist/extensions/tokenjuice/tool-result-middleware.d.ts +1 -1
- package/dist/extensions/tts-local-cli/index.d.ts +1 -1
- package/dist/extensions/tts-local-cli/speech-provider.d.ts +1 -1
- package/dist/extensions/venice/index.d.ts +1 -1
- package/dist/extensions/venice/stream.d.ts +1 -1
- package/dist/extensions/vercel-ai-gateway/index.d.ts +1 -1
- package/dist/extensions/vercel-ai-gateway/thinking.d.ts +1 -1
- package/dist/extensions/video-generation-core/api.d.ts +3 -3
- package/dist/extensions/video-generation-core/runtime-api.d.ts +1 -1
- package/dist/extensions/vllm/api.d.ts +1 -1
- package/dist/extensions/vllm/index.d.ts +1 -1
- package/dist/extensions/vllm/stream.d.ts +1 -1
- package/dist/extensions/volcengine/daocore.plugin.json +3 -0
- package/dist/extensions/volcengine/index.d.ts +1 -1
- package/dist/extensions/volcengine/index.js +160 -0
- package/dist/extensions/volcengine/provider-discovery.d.ts +1 -1
- package/dist/extensions/volcengine/speech-provider.d.ts +1 -1
- package/dist/extensions/voyage/embedding-batch.d.ts +1 -1
- package/dist/extensions/voyage/embedding-provider.d.ts +1 -1
- package/dist/extensions/voyage/index.d.ts +1 -1
- package/dist/extensions/voyage/memory-embedding-adapter.d.ts +1 -1
- package/dist/extensions/vydra/index.d.ts +1 -1
- package/dist/extensions/vydra/speech-provider.d.ts +1 -1
- package/dist/extensions/web-readability/index.d.ts +1 -1
- package/dist/extensions/webhooks/api.d.ts +2 -2
- package/dist/extensions/webhooks/index.d.ts +1 -1
- package/dist/extensions/webhooks/runtime-api.d.ts +2 -2
- package/dist/extensions/xai/api.d.ts +1 -1
- package/dist/extensions/xai/index.d.ts +1 -1
- package/dist/extensions/xai/provider-contract-api.d.ts +1 -1
- package/dist/extensions/xai/provider-discovery.d.ts +1 -1
- package/dist/extensions/xai/provider-models.d.ts +1 -1
- package/dist/extensions/xai/provider-policy-api.d.ts +1 -1
- package/dist/extensions/xai/realtime-transcription-provider.d.ts +1 -1
- package/dist/extensions/xai/setup-api.d.ts +1 -1
- package/dist/extensions/xai/speech-provider.d.ts +1 -1
- package/dist/extensions/xai/stream.d.ts +1 -1
- package/dist/extensions/xai/xai-oauth.d.ts +1 -1
- package/dist/extensions/xiaomi/index.d.ts +1 -1
- package/dist/extensions/xiaomi/speech-provider.d.ts +1 -1
- package/dist/extensions/xiaomi/stream.d.ts +1 -1
- package/dist/extensions/xiaomi/thinking.d.ts +1 -1
- package/dist/extensions/zai/index.d.ts +1 -1
- package/dist/gateway/protocol/index.d.ts +1 -1
- package/dist/{gateway-runtime-COtKzRqi.d.ts → gateway-runtime-CrdXVbIk.d.ts} +2 -2
- package/dist/{gemini-cli-provider-BQgviROv.d.ts → gemini-cli-provider-XUQaflpf.d.ts} +1 -1
- package/dist/{group-keys-B_lbVBmI.d.ts → group-keys-DnxWQtll.d.ts} +1 -1
- package/dist/{hook-runtime-UU80d5qW.d.ts → hook-runtime-Cm73yH0T.d.ts} +0 -1
- package/dist/{http-registry-Yo_NvKls.d.ts → http-registry-Bdabm0WI.d.ts} +2 -2
- package/dist/{image-generation-runtime-BIAvq6jv.d.ts → image-generation-runtime-CdClJMEJ.d.ts} +1 -1
- package/dist/{index-7GMgTC5k.d.ts → index-BKUhFJMP.d.ts} +3 -3
- package/dist/index.d.ts +1 -1
- package/dist/{interactive-dispatch-ChuCQxzf.d.ts → interactive-dispatch-DKvp0XdB.d.ts} +1 -1
- package/dist/{interactive-dispatch-DY_jVu-V.d.ts → interactive-dispatch-cy1KpaPM.d.ts} +1 -1
- package/dist/{loader-C-JyPvyF.d.ts → loader-BIPkbOY_.d.ts} +3 -3
- package/dist/{manager.core-DKeUsAcV.d.ts → manager-CSN9j9hh.d.ts} +8 -1
- package/dist/{manager-CknaUr2b.d.ts → manager-F8R-pdOf.d.ts} +3 -3
- package/dist/{memory-core-host-engine-storage-izjrNFNA.d.ts → memory-core-host-engine-storage-C6Slw7MW.d.ts} +1 -1
- package/dist/{memory-embedding-adapter-B3WLPdKc.d.ts → memory-embedding-adapter-DPYqp96z.d.ts} +1 -1
- package/dist/{migration-DVKbowM8.d.ts → migration-C8ZUtS2S.d.ts} +1 -1
- package/dist/{model-BSBoLWjJ.d.ts → model-DLxNIt-L.d.ts} +1 -1
- package/dist/{models-BvEw11kE.d.ts → models-B84PPECk.d.ts} +1 -1
- package/dist/{openai-codex-provider-C48t8ka8.d.ts → openai-codex-provider-DHdHwgtN.d.ts} +1 -1
- package/dist/{openai-provider-Df75q4KM.d.ts → openai-provider-Ctxluq-e.d.ts} +1 -1
- package/dist/{pairing-store-C-WQTUHq.d.ts → pairing-challenge-DD0D0sfM.d.ts} +34 -34
- package/dist/{plugin-DMYsMKAW.d.ts → plugin-BjnfVKZL.d.ts} +1 -1
- package/dist/{plugin-entry-DwVZtdM9.d.ts → plugin-entry-BxGTO4F2.d.ts} +1 -1
- package/dist/{plugin-runtime-Dx9WRWX8.d.ts → plugin-runtime-DE0eXqEi.d.ts} +2 -2
- package/dist/plugin-sdk/.boundary-entry-shims.stamp +1 -1
- package/dist/plugin-sdk/scripts/lib/plugin-sdk-doc-metadata.d.ts +107 -0
- package/dist/{plugin-service-mHunWjlo.d.ts → plugin-service-Cs1-tquY.d.ts} +2 -2
- package/dist/plugins/build-smoke-entry.d.ts +2 -2
- package/dist/plugins/loader.d.ts +1 -1
- package/dist/plugins/provider-discovery.runtime.d.ts +1 -1
- package/dist/plugins/provider-runtime.runtime.d.ts +1 -1
- package/dist/{prompt-overlay-D0r0EA6z.d.ts → prompt-overlay-DSPdoCmG.d.ts} +2 -2
- package/dist/{provider-api-key-auth-2Fp25hP8.d.ts → provider-api-key-auth-BcGX03NI.d.ts} +1 -1
- package/dist/{provider-auth-result-mIg6RY-l.d.ts → provider-auth-result--MEa-m3P.d.ts} +1 -1
- package/dist/{provider-catalog-runtime-B7e02aat.d.ts → provider-catalog-runtime-CTN6p7hY.d.ts} +3 -3
- package/dist/{provider-catalog-shared-D0mIMF1C.d.ts → provider-catalog-shared-p_62uEK3.d.ts} +1 -1
- package/dist/{provider-hook-runtime-CrtHxgL6.d.ts → provider-hook-runtime-vRo8Tm8t.d.ts} +1 -1
- package/dist/{provider-model-shared-BESf3jvo.d.ts → provider-model-shared-C7mH1HdZ.d.ts} +1 -1
- package/dist/{provider-models-B6wofKVD.d.ts → provider-models-D5JDMJ-N.d.ts} +1 -1
- package/dist/{provider-policy-0JjxJfxh.d.ts → provider-policy-yY3HBc6m.d.ts} +1 -1
- package/dist/{provider-registration-O7mvATZX.d.ts → provider-registration-8NOI7CjC.d.ts} +1 -1
- package/dist/{provider-registry-DcUASGbX.d.ts → provider-registry-Be_NpMQV.d.ts} +1 -1
- package/dist/{provider-registry-CtFVQxwM.d.ts → provider-registry-BpgjhCKG.d.ts} +1 -1
- package/dist/{provider-registry-DZxCJHb2.d.ts → provider-registry-D1g0ynPB.d.ts} +1 -1
- package/dist/{provider-runtime-CrrstiDP.d.ts → provider-runtime-CYEMCQzz.d.ts} +2 -2
- package/dist/{provider-self-hosted-setup-DKlGE8A7.d.ts → provider-self-hosted-setup-Bki2-T3v.d.ts} +1 -1
- package/dist/{provider-stream-C2vPdKh5.d.ts → provider-stream-CdCY7ky6.d.ts} +1 -1
- package/dist/{provider-stream-shared-CslVTt39.d.ts → provider-stream-shared-B_bcbUS7.d.ts} +1 -1
- package/dist/{providers.runtime-CHPPEG1J.d.ts → providers.runtime-DnL_dXHP.d.ts} +2 -2
- package/dist/{realtime-transcription-Brox5yj7.d.ts → realtime-transcription-kSpXi9wk.d.ts} +1 -1
- package/dist/{realtime-transcription-provider-WgtPbRJc.d.ts → realtime-transcription-provider-BGFoE8W8.d.ts} +1 -1
- package/dist/{realtime-transcription-provider-B9DWwCuO.d.ts → realtime-transcription-provider-BWNPj6h7.d.ts} +1 -1
- package/dist/{realtime-transcription-provider-CGhoGie3.d.ts → realtime-transcription-provider-D5nf5nM-.d.ts} +1 -1
- package/dist/{realtime-transcription-provider-Dau7Zk9V.d.ts → realtime-transcription-provider-DIirpas9.d.ts} +1 -1
- package/dist/{realtime-voice-C5Xiylos.d.ts → realtime-voice-DZV_9Mwb.d.ts} +1 -1
- package/dist/{realtime-voice-provider-DUPM9wyW.d.ts → realtime-voice-provider-BHGZ_28N.d.ts} +1 -1
- package/dist/{register.runtime-BcgdXzLA.d.ts → register.runtime-CslYALZr.d.ts} +1 -1
- package/dist/{registry-DnnBulh_.d.ts → registry-MFSlb_ho.d.ts} +5 -5
- package/dist/{registry-types-BQ26lhRo.d.ts → registry-types-CHlAt01d.d.ts} +4 -4
- package/dist/{runtime-3PDZU_1b.d.ts → runtime-DbTiSX85.d.ts} +1 -1
- package/dist/{runtime-api-9CEihqK3.d.ts → runtime-api-k3v6Q0lb2.d.ts} +1 -1
- package/dist/{runtime-api.actions-Blt2bAHw.d.ts → runtime-api.actions-C2-n4QQ5.d.ts} +1 -1
- package/dist/{runtime-api.send-BygcWA7R.d.ts → runtime-api.send-t0FX9tXf.d.ts} +1 -1
- package/dist/{runtime-doctor-DVYwKwIT.d.ts → runtime-doctor-_yVIDUi3.d.ts} +1 -0
- package/dist/{runtime-taskflow-Co1PrqbP.d.ts → runtime-taskflow-CRj_sEd7.d.ts} +4 -4
- package/dist/{send-BETlETJ5.d.ts → send-B5TXXeBz.d.ts} +1 -1
- package/dist/{send-CpcmWYrM.d.ts → send-DEMaBWpw.d.ts} +1 -0
- package/dist/{send.types-D_3tsfSL.d.ts → send.types-DywwIqYK.d.ts} +1 -0
- package/dist/server-close.runtime.d.ts +1 -1
- package/dist/{shared-2-FiBN51.d.ts → shared-DOgMz1o7.d.ts} +1 -1
- package/dist/{simple-completion-runtime-JMnVclQ6.d.ts → simple-completion-runtime-D_Hfsz89.d.ts} +1 -1
- package/dist/{speech-CmQkc7zi.d.ts → speech-Dlv90LKS.d.ts} +1 -1
- package/dist/{speech-core-CVkLGUxG.d.ts → speech-core-Dl8ePwqb.d.ts} +1 -1
- package/dist/{speech-provider-Cf1PVMAj.d.ts → speech-provider-Bewb9dWS.d.ts} +1 -1
- package/dist/{speech-provider-BhCRdoMK.d.ts → speech-provider-CFsYtB-b.d.ts} +1 -1
- package/dist/{speech-provider-ECom8JiZ.d.ts → speech-provider-CPsPmQVa.d.ts} +1 -1
- package/dist/{speech-provider-DdEPWhuR.d.ts → speech-provider-DIuuueTz.d.ts} +1 -1
- package/dist/{speech-provider-BEBH8vyF.d.ts → speech-provider-D_z5-DKg.d.ts} +1 -1
- package/dist/{speech-provider-B73iu4fH.d.ts → speech-provider-JPFxwpFF.d.ts} +1 -1
- package/dist/{stream-D8Ytt_tB.d.ts → stream-12_Wu8kB.d.ts} +1 -1
- package/dist/{stream-CYHgCxMh.d.ts → stream-C8ziTkgH.d.ts} +1 -1
- package/dist/{stream-DX9I-gkW.d.ts → stream-CDQgW9Jy.d.ts} +1 -1
- package/dist/{stream-m7GKt3W2.d.ts → stream-CZouukQo.d.ts} +1 -1
- package/dist/{stream-DjL6Gw2C.d.ts → stream-Da4kpTwX.d.ts} +1 -1
- package/dist/{stream-wrappers-UyEQes6p.d.ts → stream-wrappers-CL4gbphK.d.ts} +2 -2
- package/dist/{targets-D-0Biv4s.d.ts → targets-BbKYlN5d.d.ts} +1 -1
- package/dist/{targets-S-Pmze3w.d.ts → targets-DEU2Kt2g.d.ts} +1 -1
- package/dist/task-registry-control.runtime.d.ts +1 -1
- package/dist/{test-fixtures-xgg7UsEw.d.ts → test-fixtures-HY6a4nTW.d.ts} +0 -1
- package/dist/{thinking-policy-B31-nCQk.d.ts → thinking-policy-DjK35zQd.d.ts} +1 -1
- package/dist/{tool-plugin-B9aQw4fj.d.ts → tool-plugin-DGUqdEcE.d.ts} +2 -2
- package/dist/{tool-split-zov3PauL.d.ts → tool-split-HsRCRrII.d.ts} +1 -1
- package/dist/{transport-stream-3OMu_lV2.d.ts → transport-stream-CN6cbG2f.d.ts} +1 -1
- package/dist/{typed-cases-cPb0tZig.d.ts → typed-cases-D8uyQEzR.d.ts} +1 -1
- package/dist/{types-D3enA0Vx.d.ts → types-BSprrUjc.d.ts} +1 -1
- package/dist/{types-DHSQkzyq2.d.ts → types-M3Y2bFvZ2.d.ts} +3 -3
- package/dist/{types.public-DHQb4Kl9.d.ts → types.public-DuFOa-9T.d.ts} +1 -1
- package/dist/{video-generation-runtime-Dj060lga.d.ts → video-generation-runtime-Bv3CToHI.d.ts} +1 -1
- package/dist/{video-model-catalog-CQ-f89xh.d.ts → video-model-catalog-B0z3MYiX.d.ts} +1 -1
- package/dist/{webhook-targets-Bixk4LO_.d.ts → webhook-targets-t2TBHoxZ.d.ts} +1 -1
- package/package.json +1 -1
- package/dist/channel-DfP8Sc0t.d.ts +0 -6
- package/dist/manager-D058VQAp.d.ts +0 -10
- package/dist/postinstall-inventory.json +0 -11606
- package/dist/reply-runtime-DuaOZ9MH.d.ts +0 -34
- package/dist/server-plugins-BVVgDSdq.d.ts +0 -1
- package/dist/subagent-registry-BVVgDSdq.d.ts +0 -1
- package/dist/subagent-registry-read-BVVgDSdq.d.ts +0 -1
- package/dist/test-support-BVVgDSdq.d.ts +0 -1
- /package/dist/{accounts-CqgATPC-.d.ts → accounts-CqgATPC-2.d.ts} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./agents-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./agents-ek4OnoPe.js","./channel-config-extras-BIW0Sn8k.js","./skills-shared-Bxk8xnts.js","./channels-CwQPxfgA.js","./skills-B12ElwM9.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-pJJdaNGr.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`
|
|
@@ -1426,12 +1426,12 @@ https://github.com/highlightjs/highlight.js/issues/2277`),i=e,r=t),n===void 0&&(
|
|
|
1426
1426
|
outline-offset: 2px;
|
|
1427
1427
|
background: var(--accent, #007bff);
|
|
1428
1428
|
}
|
|
1429
|
-
`}render(){return F}connectedCallback(){super.connectedCallback(),this.setStaticAccessibilityAttributes(),this.addEventListener(`pointerdown`,this.handlePointerDown),this.addEventListener(`keydown`,this.handleKeyDown)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener(`pointerdown`,this.handlePointerDown),this.removeEventListener(`keydown`,this.handleKeyDown),this.stopDragging()}updated(){this.setAttribute(`aria-valuemin`,String(this.toAriaValue(this.minRatio))),this.setAttribute(`aria-valuemax`,String(this.toAriaValue(this.maxRatio))),this.setAttribute(`aria-valuenow`,String(this.toAriaValue(this.splitRatio))),this.label?this.setAttribute(`aria-label`,this.label):this.removeAttribute(`aria-label`)}stopDragging(){this.isDragging&&(this.isDragging=!1,this.classList.remove(`dragging`),this.releaseActivePointer(),document.removeEventListener(`pointermove`,this.handlePointerMove),document.removeEventListener(`pointerup`,this.handlePointerUp),document.removeEventListener(`pointercancel`,this.handlePointerUp))}emitResize(e){let t=this.clampRatio(e);this.dispatchEvent(new CustomEvent(`resize`,{detail:{splitRatio:t},bubbles:!0,composed:!0}))}clampRatio(e){return Math.max(this.minRatio,Math.min(this.maxRatio,e))}toAriaValue(e){return Math.round(e*100)}setStaticAccessibilityAttributes(){this.setAttribute(`role`,`separator`),this.setAttribute(`tabindex`,`0`),this.setAttribute(`aria-orientation`,`vertical`)}capturePointer(e){typeof this.setPointerCapture==`function`&&(this.setPointerCapture(e),this.activePointerId=e)}releaseActivePointer(){let e=this.activePointerId;this.activePointerId=null,!(e==null||typeof this.releasePointerCapture!=`function`)&&(typeof this.hasPointerCapture==`function`&&!this.hasPointerCapture(e)||this.releasePointerCapture(e))}};X([Ge({type:Number})],MB.prototype,`splitRatio`,void 0),X([Ge({type:Number})],MB.prototype,`minRatio`,void 0),X([Ge({type:Number})],MB.prototype,`maxRatio`,void 0),X([Ge({type:String})],MB.prototype,`label`,void 0),customElements.get(`resizable-divider`)||customElements.define(`resizable-divider`,MB);var NB=[`a[href]`,`button`,`input`,`select`,`textarea`,`summary`,`[contenteditable='true']`,`[role='button']`,`[role='listbox']`,`[role='option']`].join(`,`);function PB(e){return e?.phase===`done`||e?.phase===`interrupted`}var FB=new Map,IB=new Map,LB=`chat-slash-menu-listbox`,RB=`chat-slash-active-announcement`;function zB(e){return _B(FB,e,()=>new pB(e))}function BB(e){return _B(IB,e,()=>new Uj(e))}function VB(e){let t=e.realtimeTalkOptions,n=e.onRealtimeTalkOptionsChange;if(!e.realtimeTalkOptionsOpen||!t||!n)return F;let
|
|
1429
|
+
`}render(){return F}connectedCallback(){super.connectedCallback(),this.setStaticAccessibilityAttributes(),this.addEventListener(`pointerdown`,this.handlePointerDown),this.addEventListener(`keydown`,this.handleKeyDown)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener(`pointerdown`,this.handlePointerDown),this.removeEventListener(`keydown`,this.handleKeyDown),this.stopDragging()}updated(){this.setAttribute(`aria-valuemin`,String(this.toAriaValue(this.minRatio))),this.setAttribute(`aria-valuemax`,String(this.toAriaValue(this.maxRatio))),this.setAttribute(`aria-valuenow`,String(this.toAriaValue(this.splitRatio))),this.label?this.setAttribute(`aria-label`,this.label):this.removeAttribute(`aria-label`)}stopDragging(){this.isDragging&&(this.isDragging=!1,this.classList.remove(`dragging`),this.releaseActivePointer(),document.removeEventListener(`pointermove`,this.handlePointerMove),document.removeEventListener(`pointerup`,this.handlePointerUp),document.removeEventListener(`pointercancel`,this.handlePointerUp))}emitResize(e){let t=this.clampRatio(e);this.dispatchEvent(new CustomEvent(`resize`,{detail:{splitRatio:t},bubbles:!0,composed:!0}))}clampRatio(e){return Math.max(this.minRatio,Math.min(this.maxRatio,e))}toAriaValue(e){return Math.round(e*100)}setStaticAccessibilityAttributes(){this.setAttribute(`role`,`separator`),this.setAttribute(`tabindex`,`0`),this.setAttribute(`aria-orientation`,`vertical`)}capturePointer(e){typeof this.setPointerCapture==`function`&&(this.setPointerCapture(e),this.activePointerId=e)}releaseActivePointer(){let e=this.activePointerId;this.activePointerId=null,!(e==null||typeof this.releasePointerCapture!=`function`)&&(typeof this.hasPointerCapture==`function`&&!this.hasPointerCapture(e)||this.releasePointerCapture(e))}};X([Ge({type:Number})],MB.prototype,`splitRatio`,void 0),X([Ge({type:Number})],MB.prototype,`minRatio`,void 0),X([Ge({type:Number})],MB.prototype,`maxRatio`,void 0),X([Ge({type:String})],MB.prototype,`label`,void 0),customElements.get(`resizable-divider`)||customElements.define(`resizable-divider`,MB);var NB=[`a[href]`,`button`,`input`,`select`,`textarea`,`summary`,`[contenteditable='true']`,`[role='button']`,`[role='listbox']`,`[role='option']`].join(`,`);function PB(e){return e?.phase===`done`||e?.phase===`interrupted`}var FB=new Map,IB=new Map,LB=`chat-slash-menu-listbox`,RB=`chat-slash-active-announcement`;function zB(e){return _B(FB,e,()=>new pB(e))}function BB(e){return _B(IB,e,()=>new Uj(e))}function VB(e){let t=e.realtimeTalkOptions,n=e.onRealtimeTalkOptionsChange,r=e.availableRealtimeVoiceProviders??[];if(!e.realtimeTalkOptionsOpen||!t||!n)return F;let i=e=>t=>{let r=t.currentTarget.value;n({[e]:r})},a=t.vadThreshold===``,o=[`0.65`,`0.5`,`0.35`].includes(t.vadThreshold),s=!a&&!o,c=a?``:o?t.vadThreshold:`__custom`;return P`
|
|
1430
1430
|
<div class="agent-chat__talk-options" aria-label="Talk options">
|
|
1431
1431
|
<div class="agent-chat__talk-options-primary">
|
|
1432
1432
|
<label>
|
|
1433
1433
|
<span>Voice</span>
|
|
1434
|
-
<select .value=${t.voice} @change=${
|
|
1434
|
+
<select .value=${t.voice} @change=${i(`voice`)}>
|
|
1435
1435
|
<option value="">Default</option>
|
|
1436
1436
|
${[`alloy`,`ash`,`ballad`,`coral`,`echo`,`sage`,`shimmer`,`verse`,`marin`,`cedar`].map(e=>P`<option value=${e}>${e}</option>`)}
|
|
1437
1437
|
</select>
|
|
@@ -1440,7 +1440,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`),i=e,r=t),n===void 0&&(
|
|
|
1440
1440
|
<span>Model</span>
|
|
1441
1441
|
<input
|
|
1442
1442
|
.value=${t.model}
|
|
1443
|
-
@input=${
|
|
1443
|
+
@input=${i(`model`)}
|
|
1444
1444
|
placeholder="Auto"
|
|
1445
1445
|
spellcheck="false"
|
|
1446
1446
|
/>
|
|
@@ -1448,11 +1448,11 @@ https://github.com/highlightjs/highlight.js/issues/2277`),i=e,r=t),n===void 0&&(
|
|
|
1448
1448
|
<label>
|
|
1449
1449
|
<span>Sensitivity</span>
|
|
1450
1450
|
<select @change=${e=>{let t=e.currentTarget.value;t!==`__custom`&&n({vadThreshold:t})}}>
|
|
1451
|
-
<option value="" ?selected=${
|
|
1452
|
-
<option value="0.65" ?selected=${
|
|
1453
|
-
<option value="0.5" ?selected=${
|
|
1454
|
-
<option value="0.35" ?selected=${
|
|
1455
|
-
${
|
|
1451
|
+
<option value="" ?selected=${c===``}>Default</option>
|
|
1452
|
+
<option value="0.65" ?selected=${c===`0.65`}>Low</option>
|
|
1453
|
+
<option value="0.5" ?selected=${c===`0.5`}>Medium</option>
|
|
1454
|
+
<option value="0.35" ?selected=${c===`0.35`}>High</option>
|
|
1455
|
+
${s?P`<option value="__custom" selected>Custom</option>`:F}
|
|
1456
1456
|
</select>
|
|
1457
1457
|
</label>
|
|
1458
1458
|
</div>
|
|
@@ -1461,15 +1461,14 @@ https://github.com/highlightjs/highlight.js/issues/2277`),i=e,r=t),n===void 0&&(
|
|
|
1461
1461
|
<div class="agent-chat__talk-options-grid">
|
|
1462
1462
|
<label>
|
|
1463
1463
|
<span>Provider</span>
|
|
1464
|
-
<select .value=${t.provider} @change=${
|
|
1464
|
+
<select .value=${t.provider} @change=${i(`provider`)}>
|
|
1465
1465
|
<option value="">Auto</option>
|
|
1466
|
-
|
|
1467
|
-
<option value="google">Google</option>
|
|
1466
|
+
${r.map(e=>P`<option value=${e.id}>${e.label}</option>`)}
|
|
1468
1467
|
</select>
|
|
1469
1468
|
</label>
|
|
1470
1469
|
<label>
|
|
1471
1470
|
<span>Transport</span>
|
|
1472
|
-
<select .value=${t.transport} @change=${
|
|
1471
|
+
<select .value=${t.transport} @change=${i(`transport`)}>
|
|
1473
1472
|
<option value="">Auto</option>
|
|
1474
1473
|
<option value="webrtc">WebRTC</option>
|
|
1475
1474
|
<option value="gateway-relay">Gateway relay</option>
|
|
@@ -1478,7 +1477,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`),i=e,r=t),n===void 0&&(
|
|
|
1478
1477
|
</label>
|
|
1479
1478
|
<label>
|
|
1480
1479
|
<span>Reasoning</span>
|
|
1481
|
-
<select .value=${t.reasoningEffort} @change=${
|
|
1480
|
+
<select .value=${t.reasoningEffort} @change=${i(`reasoningEffort`)}>
|
|
1482
1481
|
<option value="">Default</option>
|
|
1483
1482
|
<option value="minimal">Minimal</option>
|
|
1484
1483
|
<option value="low">Low</option>
|
|
@@ -1494,7 +1493,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`),i=e,r=t),n===void 0&&(
|
|
|
1494
1493
|
max="1"
|
|
1495
1494
|
step="0.05"
|
|
1496
1495
|
.value=${t.vadThreshold}
|
|
1497
|
-
@input=${
|
|
1496
|
+
@input=${i(`vadThreshold`)}
|
|
1498
1497
|
placeholder="0.5"
|
|
1499
1498
|
/>
|
|
1500
1499
|
</label>
|
|
@@ -1505,7 +1504,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`),i=e,r=t),n===void 0&&(
|
|
|
1505
1504
|
min="1"
|
|
1506
1505
|
step="50"
|
|
1507
1506
|
.value=${t.silenceDurationMs}
|
|
1508
|
-
@input=${
|
|
1507
|
+
@input=${i(`silenceDurationMs`)}
|
|
1509
1508
|
placeholder="500"
|
|
1510
1509
|
/>
|
|
1511
1510
|
</label>
|
|
@@ -1516,10 +1515,30 @@ https://github.com/highlightjs/highlight.js/issues/2277`),i=e,r=t),n===void 0&&(
|
|
|
1516
1515
|
min="0"
|
|
1517
1516
|
step="50"
|
|
1518
1517
|
.value=${t.prefixPaddingMs}
|
|
1519
|
-
@input=${
|
|
1518
|
+
@input=${i(`prefixPaddingMs`)}
|
|
1520
1519
|
placeholder="300"
|
|
1521
1520
|
/>
|
|
1522
1521
|
</label>
|
|
1522
|
+
<label>
|
|
1523
|
+
<span>API Key</span>
|
|
1524
|
+
<input
|
|
1525
|
+
type="password"
|
|
1526
|
+
.value=${t.apiKey}
|
|
1527
|
+
@input=${i(`apiKey`)}
|
|
1528
|
+
placeholder="Use provider default"
|
|
1529
|
+
spellcheck="false"
|
|
1530
|
+
autocomplete="off"
|
|
1531
|
+
/>
|
|
1532
|
+
</label>
|
|
1533
|
+
<label>
|
|
1534
|
+
<span>Endpoint</span>
|
|
1535
|
+
<input
|
|
1536
|
+
.value=${t.endpoint}
|
|
1537
|
+
@input=${i(`endpoint`)}
|
|
1538
|
+
placeholder="Use provider default"
|
|
1539
|
+
spellcheck="false"
|
|
1540
|
+
/>
|
|
1541
|
+
</label>
|
|
1523
1542
|
</div>
|
|
1524
1543
|
</details>
|
|
1525
1544
|
</div>
|
|
@@ -7145,7 +7164,7 @@ ${e.pluginDescription}</pre
|
|
|
7145
7164
|
${J.x}
|
|
7146
7165
|
</button>
|
|
7147
7166
|
</span>
|
|
7148
|
-
`}var sQ=sq(()=>L(()=>import(`./agents-BCBPOdTk.js`),__vite__mapDeps([0,1,2]),import.meta.url),eQ),cQ=sq(()=>L(()=>import(`./channels-CVYXE-w5.js`),__vite__mapDeps([3,1]),import.meta.url),eQ),lQ=sq(()=>L(()=>import(`./cron-y2WKOhP8.js`),[],import.meta.url),eQ),uQ=sq(()=>L(()=>import(`./debug-DWqJJRJq.js`),[],import.meta.url),eQ),dQ=sq(()=>L(()=>import(`./instances-DqZrFuhB.js`),[],import.meta.url),eQ),fQ=sq(()=>L(()=>import(`./logs-CuT68Z9a.js`),[],import.meta.url),eQ),pQ=sq(()=>L(()=>import(`./nodes-BznvUGVP.js`),[],import.meta.url),eQ),mQ=sq(()=>L(()=>import(`./sessions-rQTx8EYG.js`),[],import.meta.url),eQ),hQ=sq(()=>L(()=>import(`./skills-Dac-Vj_t.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`
|
|
7167
|
+
`}var sQ=sq(()=>L(()=>import(`./agents-ek4OnoPe.js`),__vite__mapDeps([0,1,2]),import.meta.url),eQ),cQ=sq(()=>L(()=>import(`./channels-CwQPxfgA.js`),__vite__mapDeps([3,1]),import.meta.url),eQ),lQ=sq(()=>L(()=>import(`./cron-6VWSJqG0.js`),[],import.meta.url),eQ),uQ=sq(()=>L(()=>import(`./debug-0dc3uc2c.js`),[],import.meta.url),eQ),dQ=sq(()=>L(()=>import(`./instances-BeL04kSz.js`),[],import.meta.url),eQ),fQ=sq(()=>L(()=>import(`./logs-CiQpEPBa.js`),[],import.meta.url),eQ),pQ=sq(()=>L(()=>import(`./nodes-DiiJtnVR.js`),[],import.meta.url),eQ),mQ=sq(()=>L(()=>import(`./sessions-DHZ945CF.js`),[],import.meta.url),eQ),hQ=sq(()=>L(()=>import(`./skills-B12ElwM9.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`
|
|
7149
7168
|
${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} `)}})}
|
|
7150
7169
|
<div
|
|
7151
7170
|
class="shell ${s?`shell--chat`:``} ${c?`shell--chat-focus`:``} ${u?`shell--nav-collapsed`:``} ${l?`shell--nav-drawer-open`:``} ${e.onboarding?`shell--onboarding`:``}"
|
|
@@ -7322,7 +7341,7 @@ ${e.pluginDescription}</pre
|
|
|
7322
7341
|
${e.tab===`agents`?lq(sQ,t=>t.renderAgents({basePath:e.basePath??``,loading:e.agentsLoading,error:e.agentsError,agentsList:e.agentsList,selectedAgentId:A,activePanel:e.agentsPanel,config:{form:w,loading:e.configLoading,saving:e.configSaving,dirty:e.configFormDirty},channels:{snapshot:e.channelsSnapshot,loading:e.channelsLoading,error:e.channelsError,lastSuccess:e.channelsLastSuccess},cron:{status:e.cronStatus,jobs:e.cronJobs,loading:e.cronLoading,error:e.cronError},agentFiles:{list:e.agentFilesList,loading:e.agentFilesLoading,error:e.agentFilesError,active:e.agentFileActive,contents:e.agentFileContents,drafts:e.agentFileDrafts,saving:e.agentFileSaving},agentIdentityLoading:e.agentIdentityLoading,agentIdentityError:e.agentIdentityError,agentIdentityById:e.agentIdentityById,agentSkills:{report:e.agentSkillsReport,loading:e.agentSkillsLoading,error:e.agentSkillsError,agentId:e.agentSkillsAgentId,filter:e.skillsFilter},toolsCatalog:{loading:e.toolsCatalogLoading,error:e.toolsCatalogError,result:e.toolsCatalogResult},toolsEffective:{loading:e.toolsEffectiveLoading,error:e.toolsEffectiveError,result:e.toolsEffectiveResult},runtimeSessionKey:e.sessionKey,runtimeSessionMatchesSelectedAgent:j,modelCatalog:e.chatModelCatalog??[],onRefresh:async()=>{await yw(e);let t=e.agentsList?.agents?.map(e=>e.id)??[];t.length>0&&hw(e,t),Me(le()),Ne(e.agentsPanel)},onSelectAgent:t=>{e.agentsSelectedId!==t&&(e.agentsSelectedId=t,Fe(),mw(e,t),Me(t))},onSelectPanel:t=>{if(e.agentsPanel=t,t===`files`&&A&&e.agentFilesList?.agentId!==A&&(Pe(),dw(e,A)),t===`skills`&&A&&gw(e,A),t===`tools`&&A)if((e.toolsCatalogResult?.agentId!==A||e.toolsCatalogError)&&bw(e,A),A===Yg(e.sessionKey)){let t=Cw(e,{agentId:A,sessionKey:e.sessionKey});(e.toolsEffectiveResultKey!==t||e.toolsEffectiveError)&&xw(e,{agentId:A,sessionKey:e.sessionKey})}else Sw(e);Ne(t)},onLoadFiles:t=>dw(e,t),onSelectFile:t=>{e.agentFileActive=t,A&&fw(e,A,t)},onFileDraftChange:(t,n)=>{e.agentFileDrafts={...e.agentFileDrafts,[t]:n}},onFileReset:t=>{let n=e.agentFileContents[t]??``;e.agentFileDrafts={...e.agentFileDrafts,[t]:n}},onFileSave:t=>{A&&pw(e,A,t,e.agentFileDrafts[t]??e.agentFileContents[t]??``)},onToolsProfileChange:(t,n,r)=>{let i=me(t,!!(n||r));i&&(n?pa(e,[...i,`profile`],n):ga(e,[...i,`profile`]),r&&ga(e,[...i,`allow`]))},onToolsOverridesChange:(t,n,r)=>{let i=me(t,n.length>0||r.length>0);i&&(n.length>0?pa(e,[...i,`alsoAllow`],n):ga(e,[...i,`alsoAllow`]),r.length>0?pa(e,[...i,`deny`],r):ga(e,[...i,`deny`]))},onConfigReload:()=>Zi(e,{discardPendingChanges:!0}),onConfigSave:()=>Ew(e),onChannelsRefresh:()=>ti(e,!1),onCronRefresh:()=>e.loadCron(),onCronRunNow:t=>{let n=e.cronJobs.find(e=>e.id===t);n&&tT(e,n,`force`)},onSkillsFilterChange:t=>e.skillsFilter=t,onSkillsRefresh:()=>{A&&gw(e,A)},onAgentSkillToggle:(t,n,r)=>{let i=pe(t);if(i<0)return;let a=de()?.agents?.list,o=Array.isArray(a)?a[i]:void 0,s=n.trim();if(!s)return;let c=e.agentSkillsReport?.skills?.map(e=>e.name).filter(Boolean)??[],l=(Array.isArray(o?.skills)?o.skills.map(e=>String(e).trim()).filter(Boolean):void 0)??c,u=new Set(l);r?u.add(s):u.delete(s),pa(e,[`agents`,`list`,i,`skills`],[...u])},onAgentSkillsClear:t=>{let n=fe(t);n<0||ga(e,[`agents`,`list`,n,`skills`])},onAgentSkillsDisableAll:t=>{let n=pe(t);n<0||pa(e,[`agents`,`list`,n,`skills`],[])},onModelChange:(t,n)=>{let r=n?pe(t):fe(t);if(r<0)return;let{basePath:i,existing:a}=he(r);if(!n)ga(e,i);else if(a&&typeof a==`object`&&!Array.isArray(a)){let t=a.fallbacks;pa(e,i,{primary:n,...Array.isArray(t)?{fallbacks:t}:{}})}else pa(e,i,n);ww(e)},onModelFallbacksChange:(t,n)=>{let r=n.map(e=>e.trim()).filter(Boolean),i=Qp(de(),t),a=rm(i.entry?.model)??rm(i.defaults?.model),o=am(i.entry?.model,i.defaults?.model),s=r.length>0?a?pe(t):-1:(o?.length??0)>0||fe(t)>=0?pe(t):-1;if(s<0)return;let{basePath:c,existing:l}=he(s),u=(()=>{if(typeof l==`string`)return l.trim()||null;if(l&&typeof l==`object`&&!Array.isArray(l)){let e=l.primary;if(typeof e==`string`)return e.trim()||null}return null})()??a;if(r.length===0){u?pa(e,c,u):ga(e,c);return}u&&pa(e,c,{primary:u,fallbacks:r})},onSetDefault:t=>{ya(e,t)}})):F}
|
|
7323
7342
|
${e.tab===`skills`?lq(hQ,t=>t.renderSkills({connected:e.connected,loading:e.skillsLoading,report:e.skillsReport,error:e.skillsError,filter:e.skillsFilter,statusFilter:e.skillsStatusFilter,edits:e.skillEdits,messages:e.skillMessages,busyKey:e.skillsBusyKey,detailKey:e.skillsDetailKey,clawhubQuery:e.clawhubSearchQuery,clawhubResults:e.clawhubSearchResults,clawhubSearchLoading:e.clawhubSearchLoading,clawhubSearchError:e.clawhubSearchError,clawhubDetail:e.clawhubDetail,clawhubDetailSlug:e.clawhubDetailSlug,clawhubDetailLoading:e.clawhubDetailLoading,clawhubDetailError:e.clawhubDetailError,clawhubInstallSlug:e.clawhubInstallSlug,clawhubInstallMessage:e.clawhubInstallMessage,onFilterChange:t=>e.skillsFilter=t,onStatusFilterChange:t=>e.skillsStatusFilter=t,onRefresh:()=>bE(e,{clearMessages:!0}),onToggle:(t,n)=>CE(e,t,n),onEdit:(t,n)=>xE(e,t,n),onSaveKey:t=>wE(e,t),onInstall:(t,n,r)=>TE(e,t,n,r),onDetailOpen:t=>e.skillsDetailKey=t,onDetailClose:()=>e.skillsDetailKey=null,onClawHubQueryChange:t=>{yE(e,t),vQ&&clearTimeout(vQ),vQ=setTimeout(()=>EE(e,t),300)},onClawHubDetailOpen:t=>DE(e,t),onClawHubDetailClose:()=>OE(e),onClawHubInstall:t=>kE(e,t)})):F}
|
|
7324
7343
|
${e.tab===`nodes`?lq(pQ,t=>t.renderNodes({loading:e.nodesLoading,nodes:e.nodes,devicesLoading:e.devicesLoading,devicesError:e.devicesError,devicesList:e.devicesList,configForm:e.configForm??e.configSnapshot?.config,configLoading:e.configLoading,configSaving:e.configSaving,configDirty:e.configFormDirty,configFormMode:e.configFormMode,execApprovalsLoading:e.execApprovalsLoading,execApprovalsSaving:e.execApprovalsSaving,execApprovalsDirty:e.execApprovalsDirty,execApprovalsSnapshot:e.execApprovalsSnapshot,execApprovalsForm:e.execApprovalsForm,execApprovalsSelectedAgent:e.execApprovalsSelectedAgent,execApprovalsTarget:e.execApprovalsTarget,execApprovalsTargetNodeId:e.execApprovalsTargetNodeId,onRefresh:()=>jC(e),onDevicesRefresh:()=>uT(e),onDeviceApprove:t=>dT(e,t),onDeviceReject:t=>fT(e,t),onDeviceRotate:(t,n,r)=>pT(e,{deviceId:t,role:n,scopes:r}),onDeviceRevoke:(t,n)=>mT(e,{deviceId:t,role:n}),onLoadConfig:()=>Zi(e,{discardPendingChanges:!0}),onLoadExecApprovals:()=>sE(e,e.execApprovalsTarget===`node`&&e.execApprovalsTargetNodeId?{kind:`node`,nodeId:e.execApprovalsTargetNodeId}:{kind:`gateway`}),onBindDefault:t=>{t?pa(e,[`tools`,`exec`,`node`],t):ga(e,[`tools`,`exec`,`node`])},onBindAgent:(t,n)=>{let r=[`agents`,`list`,t,`tools`,`exec`,`node`];n?pa(e,r,n):ga(e,r)},onSaveBindings:()=>oa(e),onExecApprovalsTargetChange:(t,n)=>{e.execApprovalsTarget=t,e.execApprovalsTargetNodeId=n,e.execApprovalsSnapshot=null,e.execApprovalsForm=null,e.execApprovalsDirty=!1,e.execApprovalsSelectedAgent=null},onExecApprovalsSelectAgent:t=>{e.execApprovalsSelectedAgent=t},onExecApprovalsPatch:(t,n)=>uE(e,t,n),onExecApprovalsRemove:t=>dE(e,t),onSaveExecApprovals:()=>lE(e,e.execApprovalsTarget===`node`&&e.execApprovalsTargetNodeId?{kind:`node`,nodeId:e.execApprovalsTargetNodeId}:{kind:`gateway`})})):F}
|
|
7325
|
-
${e.tab===`chat`?LQ(e,`chat`,{messageCount:e.chatMessages.length,toolMessageCount:e.chatToolMessages.length,streamSegmentCount:e.chatStreamSegments.length,queueCount:e.chatQueue.length},()=>vV({sessionKey:e.sessionKey,onSessionKeyChange:t=>{$W(e,t)},thinkingLevel:e.chatThinkingLevel,showThinking:f,showToolCalls:p,loading:e.chatLoading,sending:e.chatSending,compactionStatus:e.compactionStatus,fallbackStatus:e.fallbackStatus,assistantAvatarUrl:b,messages:e.chatMessages,sideResult:e.chatSideResult,toolMessages:e.chatToolMessages,streamSegments:e.chatStreamSegments,stream:e.chatStream,streamStartedAt:e.chatStreamStartedAt,draft:e.chatMessage,queue:e.chatQueue,realtimeTalkActive:e.realtimeTalkActive,realtimeTalkStatus:e.realtimeTalkStatus,realtimeTalkDetail:e.realtimeTalkDetail,realtimeTalkTranscript:e.realtimeTalkTranscript,realtimeTalkConversation:e.realtimeTalkConversation,realtimeTalkOptionsOpen:e.realtimeTalkOptionsOpen,realtimeTalkOptions:e.realtimeTalkOptions,connected:e.connected,canSend:e.connected,disabledReason:o,error:e.lastError,runStatus:e.chatRunStatus,onDismissError:()=>eG(e),sessions:e.sessionsResult,focusMode:c,autoExpandToolCalls:!1,onRefresh:()=>(e.chatSideResult=null,e.resetToolStream(),WS(e,{awaitHistory:!0,scheduleScroll:!1})),onToggleFocusMode:()=>{e.onboarding||e.applySettings({...e.settings,chatFocusMode:!e.settings.chatFocusMode})},onChatScroll:t=>e.handleChatScroll(t),getDraft:()=>e.chatMessage,onDraftChange:t=>e.handleChatDraftChange(t),onRequestUpdate:n,onHistoryKeydown:t=>e.handleChatInputHistoryKey(t),attachments:e.chatAttachments,onAttachmentsChange:t=>e.chatAttachments=t,onSend:()=>e.handleSendChat(),onCompact:()=>e.handleSendChat(`/compact`,{restoreDraft:!0}),onOpenSessionCheckpoints:()=>{e.sessionsExpandedCheckpointKey=e.sessionKey,e.setTab(`sessions`),cS(e,{...gS(e)})},onToggleRealtimeTalk:()=>e.toggleRealtimeTalk(),onToggleRealtimeTalkOptions:()=>{e.realtimeTalkOptionsOpen=!e.realtimeTalkOptionsOpen},onRealtimeTalkOptionsChange:t=>e.updateRealtimeTalkOptions(t),canAbort:vS(e),onAbort:()=>void e.handleAbortChat({preserveDraft:!0}),onQueueRemove:t=>e.removeQueuedMessage(t),onQueueSteer:t=>void e.steerQueuedChatMessage(t),onDismissSideResult:()=>{e.chatSideResult=null},onNewSession:()=>void tG(e),onClearHistory:async()=>{if(!e.client||!e.connected)return;let t=vS(e);try{await e.client.request(`sessions.reset`,{key:e.sessionKey}),e.chatMessages=[],e.chatSideResult=null,Yv(e,{outcome:t?`interrupted`:void 0,sessionStatus:`killed`,runId:e.chatRunId,sessionKey:e.sessionKey,clearLocalRun:!0,clearChatStream:!0,clearToolStream:!0,clearSideResultTerminalRuns:!0,clearRunStatus:!t}),await Ex(e)}catch(t){e.lastError=String(t)}},agentsList:e.agentsList,currentAgentId:A??`main`,onAgentChange:t=>{$W(e,Jg({agentId:t}))},onNavigateToAgent:()=>{e.agentsSelectedId=A,e.setTab(`agents`)},onSessionSelect:t=>{$W(e,t)},showNewMessages:e.chatNewMessagesBelow&&!e.chatManualRefreshInFlight,onScrollToBottom:()=>e.scrollToBottom(),sidebarOpen:e.sidebarOpen,sidebarContent:e.sidebarContent,sidebarError:e.sidebarError,splitRatio:e.splitRatio,canvasPluginSurfaceUrl:e.hello?.pluginSurfaceUrls?.canvas??null,onOpenSidebar:t=>e.handleOpenSidebar(t),onCloseSidebar:()=>e.handleCloseSidebar(),onSplitRatioChange:t=>e.handleSplitRatioChange(t),assistantName:e.assistantName,assistantAvatar:y,userName:e.userName??null,userAvatar:e.userAvatar??null,localMediaPreviewRoots:e.localMediaPreviewRoots,embedSandboxMode:e.embedSandboxMode,allowExternalEmbedUrls:e.allowExternalEmbedUrls,assistantAttachmentAuthToken:FW(e),basePath:e.basePath??``})):F}
|
|
7344
|
+
${e.tab===`chat`?LQ(e,`chat`,{messageCount:e.chatMessages.length,toolMessageCount:e.chatToolMessages.length,streamSegmentCount:e.chatStreamSegments.length,queueCount:e.chatQueue.length},()=>vV({sessionKey:e.sessionKey,onSessionKeyChange:t=>{$W(e,t)},thinkingLevel:e.chatThinkingLevel,showThinking:f,showToolCalls:p,loading:e.chatLoading,sending:e.chatSending,compactionStatus:e.compactionStatus,fallbackStatus:e.fallbackStatus,assistantAvatarUrl:b,messages:e.chatMessages,sideResult:e.chatSideResult,toolMessages:e.chatToolMessages,streamSegments:e.chatStreamSegments,stream:e.chatStream,streamStartedAt:e.chatStreamStartedAt,draft:e.chatMessage,queue:e.chatQueue,realtimeTalkActive:e.realtimeTalkActive,realtimeTalkStatus:e.realtimeTalkStatus,realtimeTalkDetail:e.realtimeTalkDetail,realtimeTalkTranscript:e.realtimeTalkTranscript,realtimeTalkConversation:e.realtimeTalkConversation,realtimeTalkOptionsOpen:e.realtimeTalkOptionsOpen,realtimeTalkOptions:e.realtimeTalkOptions,availableRealtimeVoiceProviders:[{id:`openai`,label:`OpenAI`},{id:`google`,label:`Google`},{id:`qwen-dashscope`,label:`Qwen DashScope`},{id:`volcengine`,label:`Volcengine (Doubao)`}],connected:e.connected,canSend:e.connected,disabledReason:o,error:e.lastError,runStatus:e.chatRunStatus,onDismissError:()=>eG(e),sessions:e.sessionsResult,focusMode:c,autoExpandToolCalls:!1,onRefresh:()=>(e.chatSideResult=null,e.resetToolStream(),WS(e,{awaitHistory:!0,scheduleScroll:!1})),onToggleFocusMode:()=>{e.onboarding||e.applySettings({...e.settings,chatFocusMode:!e.settings.chatFocusMode})},onChatScroll:t=>e.handleChatScroll(t),getDraft:()=>e.chatMessage,onDraftChange:t=>e.handleChatDraftChange(t),onRequestUpdate:n,onHistoryKeydown:t=>e.handleChatInputHistoryKey(t),attachments:e.chatAttachments,onAttachmentsChange:t=>e.chatAttachments=t,onSend:()=>e.handleSendChat(),onCompact:()=>e.handleSendChat(`/compact`,{restoreDraft:!0}),onOpenSessionCheckpoints:()=>{e.sessionsExpandedCheckpointKey=e.sessionKey,e.setTab(`sessions`),cS(e,{...gS(e)})},onToggleRealtimeTalk:()=>e.toggleRealtimeTalk(),onToggleRealtimeTalkOptions:()=>{e.realtimeTalkOptionsOpen=!e.realtimeTalkOptionsOpen},onRealtimeTalkOptionsChange:t=>e.updateRealtimeTalkOptions(t),canAbort:vS(e),onAbort:()=>void e.handleAbortChat({preserveDraft:!0}),onQueueRemove:t=>e.removeQueuedMessage(t),onQueueSteer:t=>void e.steerQueuedChatMessage(t),onDismissSideResult:()=>{e.chatSideResult=null},onNewSession:()=>void tG(e),onClearHistory:async()=>{if(!e.client||!e.connected)return;let t=vS(e);try{await e.client.request(`sessions.reset`,{key:e.sessionKey}),e.chatMessages=[],e.chatSideResult=null,Yv(e,{outcome:t?`interrupted`:void 0,sessionStatus:`killed`,runId:e.chatRunId,sessionKey:e.sessionKey,clearLocalRun:!0,clearChatStream:!0,clearToolStream:!0,clearSideResultTerminalRuns:!0,clearRunStatus:!t}),await Ex(e)}catch(t){e.lastError=String(t)}},agentsList:e.agentsList,currentAgentId:A??`main`,onAgentChange:t=>{$W(e,Jg({agentId:t}))},onNavigateToAgent:()=>{e.agentsSelectedId=A,e.setTab(`agents`)},onSessionSelect:t=>{$W(e,t)},showNewMessages:e.chatNewMessagesBelow&&!e.chatManualRefreshInFlight,onScrollToBottom:()=>e.scrollToBottom(),sidebarOpen:e.sidebarOpen,sidebarContent:e.sidebarContent,sidebarError:e.sidebarError,splitRatio:e.splitRatio,canvasPluginSurfaceUrl:e.hello?.pluginSurfaceUrls?.canvas??null,onOpenSidebar:t=>e.handleOpenSidebar(t),onCloseSidebar:()=>e.handleCloseSidebar(),onSplitRatioChange:t=>e.handleSplitRatioChange(t),assistantName:e.assistantName,assistantAvatar:y,userName:e.userName??null,userAvatar:e.userAvatar??null,localMediaPreviewRoots:e.localMediaPreviewRoots,embedSandboxMode:e.embedSandboxMode,allowExternalEmbedUrls:e.allowExternalEmbedUrls,assistantAttachmentAuthToken:FW(e),basePath:e.basePath??``})):F}
|
|
7326
7345
|
${Rf(e.tab)&&e.tab!==`debug`&&e.tab!==`logs`?nQ(e,je()):je()}
|
|
7327
7346
|
${e.tab===`debug`?nQ(e,lq(uQ,t=>t.renderDebug({loading:e.debugLoading,status:e.debugStatus,health:e.debugHealth,models:e.debugModels,heartbeat:e.debugHeartbeat,eventLog:e.eventLog,methods:(e.hello?.features?.methods??[]).toSorted(),callMethod:e.debugCallMethod,callParams:e.debugCallParams,callResult:e.debugCallResult,callError:e.debugCallError,onCallMethodChange:t=>e.debugCallMethod=t,onCallParamsChange:t=>e.debugCallParams=t,onRefresh:()=>vC(e),onCall:()=>yC(e)}))):F}
|
|
7328
7347
|
${e.tab===`logs`?nQ(e,lq(fQ,t=>t.renderLogs({loading:e.logsLoading,error:e.logsError,file:e.logsFile,entries:e.logsEntries,filterText:e.logsFilterText,levelFilters:e.logsLevelFilters,autoFollow:e.logsAutoFollow,truncated:e.logsTruncated,onFilterTextChange:t=>e.logsFilterText=t,onLevelToggle:(t,n)=>{e.logsLevelFilters={...e.logsLevelFilters,[t]:n}},onToggleAutoFollow:t=>e.logsAutoFollow=t,onRefresh:()=>AC(e,{reset:!0}),onExport:(t,n)=>e.exportLogs(t,n),onScroll:t=>e.handleLogsScroll(t)}))):F}
|
|
@@ -7379,7 +7398,7 @@ ${e.pluginDescription}</pre
|
|
|
7379
7398
|
</div>
|
|
7380
7399
|
`}var YQ=1500;function XQ(){return{entries:[],nextEntryId:1,userEntryId:null,userEntryAwaitingFinal:!1,userEntryAwaitingFinalStartedAtMs:null,assistantEntryId:null}}function ZQ(e,t){let n=t.text;if(t.final?n.trim()===``:n===``)return e;let r=t.nowMs??Date.now();if(t.role===`assistant`){let i=e$(e,`user`,r);return QQ(i,t.role,i.assistantEntryId,n,t.final,r)}let i=e.userEntryId,a=i!==null&&t$(e,i,n,t.final,r),o=i===null||a?e$(e,`assistant`,r):e;return QQ(a&&i!==null?{...e$(o,`user`,r),userEntryId:null,userEntryAwaitingFinal:!1,userEntryAwaitingFinalStartedAtMs:null}:o,t.role,a?null:i,n,t.final,r)}function QQ(e,t,n,r,i,a){if(n===null){let n=`rt-${e.nextEntryId}`,o=[...e.entries,{id:n,role:t,text:r.trimStart(),isStreaming:!i}].slice(-60);return $Q({...e,entries:o,nextEntryId:e.nextEntryId+1},t,n,i,a)}let o=e.entries.findIndex(e=>e.id===n);if(o===-1)return QQ(e,t,null,r,i,a);let s=e.entries[o],c=n$(s.text,r,i),l=s.text===c&&s.isStreaming===!i?e.entries:e.entries.map((e,t)=>t===o?{...e,text:c,isStreaming:!i}:e);return $Q({...e,entries:l},t,n,i,a)}function $Q(e,t,n,r,i){return t===`user`?{...e,userEntryId:r?null:n,userEntryAwaitingFinal:!1,userEntryAwaitingFinalStartedAtMs:null}:{...e,assistantEntryId:r?null:n}}function e$(e,t,n=Date.now()){let r=t===`user`?e.userEntryId:e.assistantEntryId;if(r===null)return e;let i=e.entries.map(e=>e.id===r&&e.isStreaming?{...e,isStreaming:!1}:e);return t===`user`?{...e,entries:i,userEntryAwaitingFinal:!0,userEntryAwaitingFinalStartedAtMs:n}:{...e,entries:i,assistantEntryId:null}}function t$(e,t,n,r,i){let a=e.entries.find(e=>e.id===t);if(!a||a.isStreaming)return!1;let o=a.text;return!(o.trim()===``||n.trim()===``||n[0]&&/\s/.test(n[0])||n===o||n.startsWith(o)||o.endsWith(n)||r&&e.userEntryAwaitingFinal&&(e.userEntryAwaitingFinalStartedAtMs===null?1/0:i-e.userEntryAwaitingFinalStartedAtMs)<=YQ&&r$(o,n))}function n$(e,t,n){if(e.trim()===``)return t.trimStart();if(t===``||t===e||e.endsWith(t))return e;if(t.startsWith(e))return t;if(t[0]&&/\s/.test(t[0]))return`${e}${t}`;if(n&&r$(e,t))return t;let r=s$(e,t),i=r>0?t.slice(r):t;return i===``?e:`${e}${r>0||!c$(e,i)?``:` `}${i}`}function r$(e,t){let n=i$(e),r=i$(t);if(n.length===0||r.length===0||n[0]!==r[0])return!1;if(n.length>1&&r.length>1&&n[1]===r[1])return!0;let i=a$(e),a=a$(t),o=o$(i,a),s=Math.min(i.length,a.length);return o>=6&&o/Math.max(1,s)>=.45}function i$(e){return[...e.toLowerCase().matchAll(/[\p{L}\p{N}]+/gu)].map(e=>e[0])}function a$(e){return e.toLowerCase().replace(/\s+/g,` `).trim()}function o$(e,t){let n=Math.min(e.length,t.length),r=0;for(;r<n&&e[r]===t[r];)r+=1;return r}function s$(e,t){let n=e.toLowerCase(),r=t.toLowerCase(),i=Math.min(n.length,r.length);for(let e=i;e>=3;--e)if(n.endsWith(r.slice(0,e)))return e;return 0}function c$(e,t){let n=e.at(-1),r=t[0];return!n||!r||/\s/.test(n)||/\s/.test(r)?!1:/[\p{L}\p{N}.!?,:;)\]}"'’”]/u.test(n)&&/[\p{L}\p{N}]/u.test(r)}function l$(e){let t=u$(e);if(t)return t===`webrtc-sdp`?`webrtc`:t===`json-pcm-websocket`?`provider-websocket`:t}function u$(e){return e?.trim()||void 0}function d$(e){let t=``,n=32768;for(let r=0;r<e.length;r+=n){let i=e.subarray(r,r+n);t+=String.fromCharCode(...i)}return btoa(t)}function f$(e){let t=atob(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;e+=1)n[e]=t.charCodeAt(e);return n}function p$(e){let t=new Uint8Array(e.length*2),n=new DataView(t.buffer);for(let t=0;t<e.length;t+=1){let r=Math.max(-1,Math.min(1,e[t]??0));n.setInt16(t*2,r<0?r*32768:r*32767,!0)}return t}function m$(e){let t=new DataView(e.buffer,e.byteOffset,e.byteLength),n=new Float32Array(Math.floor(e.byteLength/2));for(let e=0;e<n.length;e+=1)n[e]=t.getInt16(e*2,!0)/32768;return n}var h$=class{constructor(){this.playhead=0,this.sources=new Set}get queuedUntil(){return this.playhead}get isPlaying(){return this.sources.size>0}play(e,t,n){if(!t)return;let r=m$(f$(e));if(r.length===0)return;let i=t.createBuffer(1,r.length,n);i.getChannelData(0).set(r);let a=t.createBufferSource();this.sources.add(a),a.addEventListener(`ended`,()=>this.sources.delete(a)),a.buffer=i,a.connect(t.destination);let o=Math.max(t.currentTime,this.playhead);a.start(o),this.playhead=o+i.duration}stop(e){for(let e of this.sources)try{e.stop()}catch{}this.sources.clear(),this.playhead=e?.currentTime??0}},g$=`daocore_agent_consult`;function _$(e,t){let n=0,r=0,i,a=y$(e,t);return r=>{if(!e.callbacks.onTalkEvent)return;let s=o(r);n+=1,e.callbacks.onTalkEvent({id:`${a}:${n}`,type:r.type,sessionId:a,turnId:s,captureId:r.captureId,seq:n,timestamp:new Date().toISOString(),mode:`realtime`,transport:t.transport,brain:`agent-consult`,provider:t.provider,final:r.final,callId:r.callId,itemId:r.itemId,parentId:r.parentId,payload:r.payload??null}),(r.type===`turn.ended`||r.type===`turn.cancelled`||r.type===`session.replaced`||r.type===`session.closed`)&&(i=void 0)};function o(e){return e.type===`turn.started`||v$(e.type)?(i=e.turnId??i??`turn-${++r}`,i):e.turnId}}function v$(e){return e===`turn.ended`||e===`turn.cancelled`||e.startsWith(`input.audio.`)||e.startsWith(`transcript.`)||e.startsWith(`output.`)||e.startsWith(`tool.`)}function y$(e,t){let n=t.sessionId;return typeof n==`string`&&n.trim()?n.trim():`relaySessionId`in t&&t.relaySessionId.trim()?t.relaySessionId:`${e.sessionKey}:${t.provider}:${t.transport}`}function b$(e){if(!e||typeof e!=`object`)return``;let t=e;return typeof t.text==`string`?t.text:(Array.isArray(t.content)?t.content:[]).map(e=>{if(!e||typeof e!=`object`)return``;let t=e;return t.type===`text`&&typeof t.text==`string`?t.text:``}).filter(Boolean).join(`
|
|
7381
7400
|
|
|
7382
|
-
`).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:``},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=`{
|
|
7401
|
+
`).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=`{
|
|
7383
7402
|
}
|
|
7384
|
-
`,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)&<.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:``},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)}}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.68-035897d3a9ac`),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};
|
|
7385
|
-
//# sourceMappingURL=index-
|
|
7403
|
+
`,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)&<.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.70-b3732f885717`),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};
|
|
7404
|
+
//# sourceMappingURL=index-CwM8LCEZ.js.map
|