From d06e00700e93f1d8a6760f282598ca60e60007ae Mon Sep 17 00:00:00 2001 From: i2cjak Date: Mon, 23 Nov 2026 14:21:38 -0500 Subject: [PATCH] Add favorite models (star to pin) across hub, GPUI, and web --- i18n/en.msg | 3 + i18n/es.msg | 3 + i18n/ja.msg | 3 + .../src/main/java/dev/backplane/mobile/Msg.kt | 5840 +++++++++-------- mobile/ios/Shared/TrCatalog.swift | 6 + native/gpui/src/main.rs | 4 +- native/gpui/src/screens/picker.rs | 341 +- native/host/src/bin/screen-audit.rs | 7 +- native/host/src/data/ext.rs | 5 + native/host/src/data/mod.rs | 7 +- native/host/src/data/tests.rs | 44 + native/host/src/data/webpolicy.rs | 2 + native/host/src/net/settings_sync.rs | 19 +- native/host/src/present/keys.rs | 19 +- native/host/src/settings/favorites.rs | 146 + native/host/src/settings/mod.rs | 2 + native/host/src/settings/models.rs | 102 + native/host/src/settings/set.rs | 77 +- native/host/src/state/policy.rs | 3 +- web/dist/assets/app.js | 40 +- web/dist/assets/pair.js | 2 +- web/dist/assets/style.css | 216 + web/dist/manifest.json | 38 +- web/src/app.ts | 70 + web/src/composer.ts | 429 +- web/src/model-picker-model.ts | 407 ++ web/src/shell.css | 216 + web/src/ws.ts | 1 + web/test/model-picker.test.ts | 156 + 29 files changed, 5248 insertions(+), 2960 deletions(-) create mode 100644 native/host/src/settings/favorites.rs create mode 100644 web/src/model-picker-model.ts create mode 100644 web/test/model-picker.test.ts diff --git a/i18n/en.msg b/i18n/en.msg index dfd59d4421..a64b29c5fb 100644 --- a/i18n/en.msg +++ b/i18n/en.msg @@ -2377,6 +2377,9 @@ gpui.no.models = No models gpui.picker.more = {n} more: search to find them gpui.picker.speed = Speed gpui.picker.speed.normal.only = {model} runs at Normal speed only +gpui.picker.favorites = Favorites +gpui.picker.favorite.add = Add to favorites +gpui.picker.favorite.remove = Remove from favorites gpui.speed.normal = Normal gpui.speed.fast = Fast gpui.speed.ultrafast = UltraFast diff --git a/i18n/es.msg b/i18n/es.msg index bd6709d8a1..2dfdca1126 100644 --- a/i18n/es.msg +++ b/i18n/es.msg @@ -2378,6 +2378,9 @@ gpui.no.models = Sin modelos gpui.picker.more = {n} más: busca para encontrarlos gpui.picker.speed = Velocidad gpui.picker.speed.normal.only = {model} solo funciona a velocidad Normal +gpui.picker.favorites = Favoritos +gpui.picker.favorite.add = Añadir a favoritos +gpui.picker.favorite.remove = Quitar de favoritos gpui.speed.normal = Normal gpui.speed.fast = Rápido gpui.speed.ultrafast = Ultrarrápido diff --git a/i18n/ja.msg b/i18n/ja.msg index 173df45ff1..7003d7780f 100644 --- a/i18n/ja.msg +++ b/i18n/ja.msg @@ -2400,6 +2400,9 @@ gpui.no.models = モデルがありません gpui.picker.more = ほか{n}件: 検索して探してください gpui.picker.speed = 速度 gpui.picker.speed.normal.only = {model}は標準の速度でのみ動きます +gpui.picker.favorites = お気に入り +gpui.picker.favorite.add = お気に入りに追加 +gpui.picker.favorite.remove = お気に入りから外す gpui.speed.normal = 標準 gpui.speed.fast = 高速 gpui.speed.ultrafast = 超高速 diff --git a/mobile/android/app/src/main/java/dev/backplane/mobile/Msg.kt b/mobile/android/app/src/main/java/dev/backplane/mobile/Msg.kt index 0c93ae9238..44a91983fd 100644 --- a/mobile/android/app/src/main/java/dev/backplane/mobile/Msg.kt +++ b/mobile/android/app/src/main/java/dev/backplane/mobile/Msg.kt @@ -2147,6 +2147,9 @@ object Msg { "gpui.c.kicad.the.editor.takes.the.whole", "gpui.c.kicad.closing", "gpui.c.kicad.closing.ask", + "gpui.c.solid.load.big", + "gpui.c.solid.loading.big", + "gpui.c.solid.big.next", "gpui.assets.missing", "gpui.connecting", "gpui.connected", @@ -2267,11 +2270,11 @@ object Msg { "gpui.badge", "gpui.ctx.click.again.to", "gpui.snooze.tomorrow", + ) + private fun keys9(): Array = arrayOf( "gpui.ctx.snooze", "gpui.goal.notes", "gpui.no.goal.yet.ask.an", - ) - private fun keys9(): Array = arrayOf( "gpui.edit.goal.notes", "gpui.projects.to.order", "gpui.projects.boards", @@ -2283,6 +2286,9 @@ object Msg { "gpui.picker.more", "gpui.picker.speed", "gpui.picker.speed.normal.only", + "gpui.picker.favorites", + "gpui.picker.favorite.add", + "gpui.picker.favorite.remove", "gpui.speed.normal", "gpui.speed.fast", "gpui.speed.ultrafast", @@ -2516,14 +2522,14 @@ object Msg { "notify.quiet.hours", "notify.a.push.waits.until.the", "notify.quiet.from.and.until", + ) + private fun keys10(): Array = arrayOf( "notify.hh.mm.hours", "notify.times.are.hh.mm.hours", "notify.quiet.hours.are.hh.mm", "notify.urgent.asks.come.through", "notify.an.approval.or.a.question", "notify.iphones.that.hear.a.push", - ) - private fun keys10(): Array = arrayOf( "notify.none.yet.an.iphone.registers", "notify.muted.hears.only.what.urgent", "notify.hears.alerts", @@ -2768,14 +2774,14 @@ object Msg { "gpui.f.ov.now", "gpui.f.ov.min", "gpui.f.ov.s", + ) + private fun keys11(): Array = arrayOf( "gpui.f.ov.measuring", "gpui.f.ov.title", "gpui.f.ov.body", "gpui.f.ov.took", "gpui.f.ov.here", "gpui.f.ov.failed.in", - ) - private fun keys11(): Array = arrayOf( "gpui.f.ov.failed", "gpui.f.usage.title", "gpui.f.usage.body", @@ -3020,14 +3026,14 @@ object Msg { "android.pair.photo", "android.pair.other", "android.pair.code.lead", + ) + private fun keys12(): Array = arrayOf( "android.pair.code", "android.pair.code.bad", "android.pair.link.bad", "android.pair.ask", "android.pair.ask.note", "android.terminals", - ) - private fun keys12(): Array = arrayOf( "android.search.hint", "android.projects.none", "android.project.add", @@ -3272,14 +3278,14 @@ object Msg { "android.hub.voice.err.action", "android.hub.voice.err.request", "android.hub.voice.err.term", + ) + private fun keys13(): Array = arrayOf( "android.hub.voice.err.key", "android.hub.voice.err.write", "android.hub.voice.err.start", "android.hub.voice.err.stopped", "android.hub.voice.err.missing", "android.hub.entry.step.files", - ) - private fun keys13(): Array = arrayOf( "android.hub.entry.step.base", "android.hub.entry.noreason", "android.hub.entry.retired", @@ -3524,14 +3530,14 @@ object Msg { "android.hub.accounts.usage.code", "android.hub.accounts.err.gone", "android.hub.accounts.err.provider", + ) + private fun keys14(): Array = arrayOf( "android.hub.accounts.err.add", "android.hub.accounts.err.gate", "android.hub.accounts.err.default", "android.hub.accounts.err.busy", "android.hub.accounts.err.select", "android.hub.accounts.err.check", - ) - private fun keys14(): Array = arrayOf( "android.hub.accounts.err.called", "android.hub.update.off", "android.hub.update.checking", @@ -3776,14 +3782,14 @@ object Msg { "android.sub.tool", "android.machine.on", "android.handoff.from", + ) + private fun keys15(): Array = arrayOf( "android.handoff.note", "android.queue.unsent", "android.mark.runs", "android.mark.also", "android.mark.newon", "android.google.signedin", - ) - private fun keys15(): Array = arrayOf( "android.google.back", "android.improve.search", "android.improve.nomatch", @@ -4028,14 +4034,14 @@ object Msg { "ios.settings.alerts", "ios.settings.sound", "ios.pair.ask.note", + ) + private fun keys16(): Array = arrayOf( "ios.projects.none.note", "ios.review.comment.field", "ios.project.badge", "ios.order.buy", "ios.diff.head", "ios.photo.choose", - ) - private fun keys16(): Array = arrayOf( "ios.close.lower", "ios.compare.close", "ios.badge.colour", @@ -4280,14 +4286,14 @@ object Msg { "gpui.f2.pair.phone", "gpui.f2.pair.phone.note", "gpui.f2.pair.phone.shown", + ) + private fun keys17(): Array = arrayOf( "gpui.f2.show.code", "gpui.f2.done.body", "gpui.f2.open.uber", "gpui.f2.setup.phone", "gpui.f2.setup.five", "gpui.swarm.row", - ) - private fun keys17(): Array = arrayOf( "gpui.swarm.held", "gpui.swarm.state.why", "gpui.swarm.new", @@ -4532,14 +4538,14 @@ object Msg { "gpui.mgmt.plan.openboard", "gpui.mgmt.plan.noboard", "gpui.mgmt.plan.drawn", + ) + private fun keys18(): Array = arrayOf( "gpui.pick.planonce", "gpui.pick.planonce.note", "hub.view.board.unlisted", "gpui.mgmt.bom.stocknote", "hub.order.pick.more", "hub.order.pick.phone", - ) - private fun keys18(): Array = arrayOf( "hub.order.pick.go", "gpui.plan.before.routing.desc", "gpui.mgmt.bom.shared", @@ -4784,14 +4790,14 @@ object Msg { "viewer.layout.refusal.linked", "viewer.layout.refusal.notondevice", "viewer.layout.refusal.starting", + ) + private fun keys19(): Array = arrayOf( "viewer.footprinteditor", "viewer.symboleditor", "web.clone.tab", "web.clone.repo.placeholder", "web.clone.private", "web.clone.signin", - ) - private fun keys19(): Array = arrayOf( "web.clone.signin.wait", "web.clone.signin.enter", "web.clone.signin.done", @@ -7112,6 +7118,9 @@ object Msg { "The editor takes the whole window; only this row stays", "KiCad is closing. The editor opens again once it has closed.", "KiCad is waiting for an answer before it closes: \"{title}\". Its window may be behind another one.", + "Load it anyway", + "Loading it anyway…", + "Loading it may take a while and a lot of memory.", "Assets missing in {dir}: {files}", "Connecting…", "Connected", @@ -7232,11 +7241,11 @@ object Msg { "Badge", "Click again to {what}", "Snooze tomorrow", + ) + private fun en9(): Array = arrayOf( "Snooze {when}", "GOAL & NOTES", "No goal yet. Ask an agent to write what this project is for, or edit .backplane/intent.md.", - ) - private fun en9(): Array = arrayOf( "Edit goal & notes", "TO ORDER ({n})", "BOARDS ({n})", @@ -7248,6 +7257,9 @@ object Msg { "{n} more: search to find them", "Speed", "{model} runs at Normal speed only", + "Favorites", + "Add to favorites", + "Remove from favorites", "Normal", "Fast", "UltraFast", @@ -7481,14 +7493,14 @@ object Msg { "Quiet hours", "A push waits until the end of quiet hours, in your time zone, and goes then as one.", "Quiet from and until", + ) + private fun en10(): Array = arrayOf( "HH:MM, 24 hours.", "Times are HH:MM, 24 hours, and not the same.", "Quiet hours are HH:MM to HH:MM, 24 hours, and not the same time twice.", "Urgent asks come through", "An approval or a question that blocks an agent is pushed in quiet hours, and to a muted phone.", "iPhones that hear a push", - ) - private fun en10(): Array = arrayOf( "None yet. An iPhone registers when its app opens with alerts allowed. An Android phone hears alerts while its app is connected, and follows the switches above.", "Muted: hears only what urgent asks let through.", "Hears alerts.", @@ -7733,14 +7745,14 @@ object Msg { "Now: {what}", "About {n, number} min left in this step.", "About {n, number} s left in this step.", + ) + private fun en11(): Array = arrayOf( "Measuring how long this step takes.", "Bringing your 0.14 work across…", "{what}. Backplane works meanwhile, and your 0.14 folder is only read.", "It took {n, number} s.", "Your 0.14 work is here", "{why}. Your 0.14 data in {from} is untouched. Retry picks up where it stopped: nothing comes twice.", - ) - private fun en11(): Array = arrayOf( "{why}. Your 0.14 data is untouched. Retry picks up where it stopped: nothing comes twice.", "Anonymous usage", "On unless you turn it off. Backplane sends anonymous counts: installs, updates, daily activity, and daily totals of threads, messages, model tokens, bot traffic, boards made and boards ordered, with a random install id, the version, the system and the day. Never your conversations, projects, files, names, paths or keys. Settings, Privacy changes it.", @@ -7985,14 +7997,14 @@ object Msg { "Choose a photo of the code", "Or use another paired hub", "Or the hub's address and short code", + ) + private fun en12(): Array = arrayOf( "Pair with code", "Check the hub address and the eight-character code.", "That is not a pairing link.", "Pair with this hub?", "A link opened this. Pair only with a hub you know.", "Terminals", - ) - private fun en12(): Array = arrayOf( "Search projects and threads", "No projects yet", "Add a project", @@ -8237,14 +8249,14 @@ object Msg { "unknown voice action", "unknown voice request", "a term to add", + ) + private fun en13(): Array = arrayOf( "that is not an OpenAI API key (they start with sk-)", "the key could not be written", "The voice helper could not start. Check that it is installed beside Backplane.", "The voice helper stopped before finishing. Try the download again.", "The voice helper is not installed beside Backplane.", "Design change · {files}", - ) - private fun en13(): Array = arrayOf( "Design before the edits · {files}", "The turn ended with an error; the agent gave no reason.", "This account's verified identity changed or disconnected. Check status and explicitly select an account to continue.", @@ -8489,14 +8501,14 @@ object Msg { "Claude's usage service answered {code}.", "that account is gone", "provider: claude or codex", + ) + private fun en14(): Array = arrayOf( "the account could not be added", "This thread uses a named account. Use updated Backplane web or desktop to continue; your draft is preserved.", "Check and reconnect this account before making it the default.", "Stop this account's active turns before changing its login.", "Reconnect and select this account before starting a turn", "This account's status check did not finish; start the turn again", - ) - private fun en14(): Array = arrayOf( "No account is called {name}. account_list shows them.", "Updates are off on this machine.", "Checking for updates.", @@ -8741,14 +8753,14 @@ object Msg { "tool", "on {name}", "‹ Handed over from {title}", + ) + private fun en15(): Array = arrayOf( "Note: {note}", "Unsent", "runs on {machine}", "also on {machines}", "New thread on {machine}", "Signed in.", - ) - private fun en15(): Array = arrayOf( "Back to Backplane", "Search projects…", "No project matches.", @@ -8993,14 +9005,14 @@ object Msg { "Alerts on this phone", "Alert sound", "A link opened this. Pair only with a hub you know.", + ) + private fun en16(): Array = arrayOf( "A project is a folder on your hub's computer. Add one to start a thread.", "A review comment", "Badge", "Buy now", "CHANGES", "Choose a photo", - ) - private fun en16(): Array = arrayOf( "close", "Close compare", "Colour", @@ -9245,14 +9257,14 @@ object Msg { "Pair a phone", "Optional. Get the app, then show the code here and scan it. The phone opens your uberbot.", "Scan this with the Backplane app, or type the short code and this address. It works once, for ten minutes. Treat it as a password.", + ) + private fun en17(): Array = arrayOf( "Show the code", "Press ? any time for keys.", "Open the uberbot", "Setup runs on a computer, in Settings, Setup there. This phone is paired with it.", "Six short steps: agents, design tools, your uberbot's name, where it lives and a first project.", "{n, plural, one {# member} other {# members}} · {w, number} working", - ) - private fun en17(): Array = arrayOf( "held: {why}", "{state}: {why}", "New swarm", @@ -9497,14 +9509,14 @@ object Msg { "Open board", "No routing plan for this board.", "The plan's corridors and planes are drawn on the board while this panel is open. Close it to hide them.", + ) + private fun en18(): Array = arrayOf( "Plan first, this turn only", "Claude proposes a plan and waits for Implement; the thread goes back to its own mode after.", "That board is not in this project's list yet.", "Stock and prices come from one distributor's catalogue. To check others, add their API keys in Settings › API keys and ask your agent.", "More parts of the project (optional)", "Answer \"all\", or say what to leave out and any parts to add.", - ) - private fun en18(): Array = arrayOf( "Add and continue", "On: before routing a board with 4 or more copper layers or more than 60 nets, the agent proposes a routing plan and routes only what you approve in the Plan panel beside the board. Off: agents route as you ask.", "Its sheet is used more than once and KiCad keeps one value for all of them: {others} has it too.", @@ -9749,14 +9761,14 @@ object Msg { "That layout is shown on its own machine only for now.", "That cannot be a tile here.", "The hub is starting.", + ) + private fun en19(): Array = arrayOf( "Footprint Editor", "Symbol Editor", "Clone from git", "https or ssh URL, or owner/repo", "private", "Sign in to GitHub", - ) - private fun en19(): Array = arrayOf( "Starting GitHub sign-in…", "Enter this code on GitHub:", "Signed in to GitHub", @@ -12077,6 +12089,9 @@ object Msg { "エディタがウィンドウ全体を使います。この行だけが残ります", "KiCad を閉じています。閉じ終わるとエディタがもう一度開きます。", "KiCad は閉じる前に応答を待っています:「{title}」。そのウィンドウが別のウィンドウの後ろにあるかもしれません。", + "それでも読み込む", + "それでも読み込み中…", + "読み込みには時間と多くのメモリがかかることがあります。", "{dir} にアセットがありません: {files}", "接続中…", "接続済み", @@ -12197,11 +12212,11 @@ object Msg { "バッジ", "もう一度クリックして{what}", "明日までスヌーズ", + ) + private fun ja9(): Array = arrayOf( "{when}スヌーズ", "目標とメモ", "目標はまだありません。このプロジェクトの目的をエージェントに書いてもらうか、.backplane/intent.md を編集してください。", - ) - private fun ja9(): Array = arrayOf( "目標とメモを編集", "注文するもの({n})", "基板({n})", @@ -12213,6 +12228,9 @@ object Msg { "ほか{n}件: 検索して探してください", "速度", "{model}は標準の速度でのみ動きます", + "お気に入り", + "お気に入りに追加", + "お気に入りから外す", "標準", "高速", "超高速", @@ -12446,14 +12464,14 @@ object Msg { "静かな時間帯", "プッシュは静かな時間帯が終わる(あなたのタイムゾーン)まで待ち、終わるとまとめて送られます。", "静かな時間帯の開始と終了", + ) + private fun ja10(): Array = arrayOf( "HH:MM(24時間表記)。", "時刻はHH:MM(24時間表記)で、同じ時刻にはできません。", "静かな時間帯はHH:MMからHH:MM(24時間表記)で、同じ時刻にはできません。", "緊急の確認は通す", "エージェントを止めている承認や質問は、静かな時間帯でも、ミュート中のスマートフォンにもプッシュされます。", "プッシュを受け取るiPhone", - ) - private fun ja10(): Array = arrayOf( "まだありません。iPhoneは通知を許可してアプリを開くと登録されます。Androidはアプリが接続されている間通知を受け取り、上のスイッチに従います。", "ミュート中: 緊急の確認だけ受け取ります。", "通知を受け取ります。", @@ -12698,14 +12716,14 @@ object Msg { "処理中: {what}", "このステップの残りは約{n, number}分です。", "このステップの残りは約{n, number}秒です。", + ) + private fun ja11(): Array = arrayOf( "このステップの所要時間を測っています。", "0.14の作業を移行しています…", "{what}。その間もBackplaneは使え、0.14のフォルダは読むだけです。", "{n, number}秒かかりました。", "0.14の作業を移行しました", "{why}。{from}にある0.14のデータには触れていません。再試行すると止まったところから続け、重複はしません。", - ) - private fun ja11(): Array = arrayOf( "{why}。0.14のデータには触れていません。再試行すると止まったところから続け、重複はしません。", "匿名の利用状況", "オフにしない限りオンです。Backplaneは匿名の集計を送ります:インストール、更新、日々の利用、そしてスレッド、メッセージ、モデルのトークン、ボットの通信量、作成した基板、注文した基板の1日ごとの合計で、ランダムなインストールID、バージョン、OS、日付が付きます。会話、プロジェクト、ファイル、名前、パス、キーを送ることはありません。設定 → プライバシーで変更できます。", @@ -12950,14 +12968,14 @@ object Msg { "コードの写真を選ぶ", "またはペアリング済みの別のハブを使う", "またはハブのアドレスと短いコード", + ) + private fun ja12(): Array = arrayOf( "コードでペアリング", "ハブのアドレスと8文字のコードを確認してください。", "ペアリングリンクではありません。", "このハブとペアリングしますか?", "リンクから開かれました。知っているハブとだけペアリングしてください。", "ターミナル", - ) - private fun ja12(): Array = arrayOf( "プロジェクトとスレッドを検索", "プロジェクトはまだありません", "プロジェクトを追加", @@ -13202,14 +13220,14 @@ object Msg { "不明な音声操作です", "不明な音声リクエストです", "追加する用語を入力してください", + ) + private fun ja13(): Array = arrayOf( "OpenAI APIキーではありません(sk-で始まります)", "キーを書き込めませんでした", "音声ヘルパーを起動できませんでした。Backplaneと同じ場所にインストールされているか確認してください。", "音声ヘルパーが途中で停止しました。もう一度ダウンロードしてください。", "音声ヘルパーがBackplaneと同じ場所にインストールされていません。", "設計の変更 · {files}", - ) - private fun ja13(): Array = arrayOf( "編集前の設計 · {files}", "ターンがエラーで終了しました。エージェントは理由を示していません。", "このアカウントの確認済みIDが変わったか、接続が切れました。状態を確認し、続けるにはアカウントを明示的に選択してください。", @@ -13454,14 +13472,14 @@ object Msg { "Claudeの使用状況サービスが{code}を返しました。", "そのアカウントはもうありません", "provider: claudeまたはcodex", + ) + private fun ja14(): Array = arrayOf( "アカウントを追加できませんでした", "このスレッドは名前付きアカウントを使います。続けるには最新のBackplaneのWeb版かデスクトップ版を使ってください。下書きは保持されます。", "デフォルトにする前に、このアカウントを確認して再接続してください。", "ログインを変更する前に、このアカウントで実行中のターンを停止してください。", "ターンを開始する前に、このアカウントを再接続して選択してください", "このアカウントの状態確認が完了しませんでした。ターンをもう一度開始してください", - ) - private fun ja14(): Array = arrayOf( "{name}という名前のアカウントはありません。account_listで一覧を表示できます。", "このマシンでは更新がオフです。", "更新を確認中です。", @@ -13706,14 +13724,14 @@ object Msg { "ツール", "{name} 上", "‹ {title} から引き継ぎ", + ) + private fun ja15(): Array = arrayOf( "メモ: {note}", "未送信", "{machine} で実行", "{machines} にもあり", "{machine} で新しいスレッド", "サインインしました。", - ) - private fun ja15(): Array = arrayOf( "Backplane に戻る", "プロジェクトを検索…", "一致するプロジェクトはありません。", @@ -13958,14 +13976,14 @@ object Msg { "この端末の通知", "通知音", "リンクから開きました。知っているハブとだけペアリングしてください。", + ) + private fun ja16(): Array = arrayOf( "プロジェクトはハブのコンピューター上のフォルダーです。追加するとスレッドを始められます。", "レビューコメント", "バッジ", "今すぐ購入", "変更", "写真を選ぶ", - ) - private fun ja16(): Array = arrayOf( "閉じる", "比較を閉じる", "色", @@ -14210,14 +14228,14 @@ object Msg { "スマホをペアリング", "任意です。アプリを入れてから、ここでコードを表示して読み取ってください。スマホはメインボットを開きます。", "Backplaneアプリでこれを読み取るか、短いコードとこのアドレスを入力してください。1回だけ、10分間有効です。パスワードと同じように扱ってください。", + ) + private fun ja17(): Array = arrayOf( "コードを表示", "? でいつでもキー一覧を表示できます。", "メインボットを開く", "セットアップはコンピュータの 設定 → セットアップ で行います。このスマホはそのコンピュータとペアリングされています。", "6つの短いステップ:エージェント、設計ツール、メインボットの名前、置き場所、最初のプロジェクト。", "メンバー{n, number}人 · 作業中{w, number}", - ) - private fun ja17(): Array = arrayOf( "保留:{why}", "{state}:{why}", "新しいスウォーム", @@ -14462,14 +14480,14 @@ object Msg { "基板を開く", "この基板の配線計画はありません。", "計画の配線経路とプレーンは、このパネルを開いている間だけ基板上に表示されます。閉じると消えます。", + ) + private fun ja18(): Array = arrayOf( "このターンだけ先に計画", "Claude が計画を提案し、「実装」を待ちます。その後スレッドは元のモードに戻ります。", "その基板はまだこのプロジェクトの一覧にありません。", "在庫と価格は一つの販売店のカタログから取得しています。他の販売店を確認するには、設定 › API キーでその API キーを追加し、エージェントに頼んでください。", "プロジェクトの他の部品(任意)", "「all」と答えるか、外すものと追加する部品を書いてください。", - ) - private fun ja18(): Array = arrayOf( "追加して続ける", "オン:銅箔層が4層以上、またはネットが60本を超える基板では、配線の前にエージェントが配線計画を提案し、基板の横の計画パネルで承認したものだけを配線します。オフ:エージェントは指示どおりに配線します。", "このシートは複数回使われており、KiCadはすべてに同じ値を持たせます:{others}にも同じ値が入りました。", @@ -14714,14 +14732,14 @@ object Msg { "そのレイアウトは今のところ元のマシンでのみ表示されます。", "ここではタイルにできません。", "ハブを起動しています。", + ) + private fun ja19(): Array = arrayOf( "フットプリントエディター", "シンボルエディター", "git からクローン", "https / ssh の URL、または owner/repo", "非公開", "GitHub にサインイン", - ) - private fun ja19(): Array = arrayOf( "GitHub のサインインを開始しています…", "このコードを GitHub に入力してください:", "GitHub にサインインしました", @@ -17042,6 +17060,9 @@ object Msg { "El editor ocupa toda la ventana; solo queda esta fila", "KiCad se está cerrando. El editor vuelve a abrirse cuando termine de cerrarse.", "KiCad espera una respuesta antes de cerrarse: «{title}». Su ventana puede estar detrás de otra.", + "Cargarlo de todos modos", + "Cargándolo de todos modos…", + "Cargarlo puede tardar y usar mucha memoria.", "Faltan recursos en {dir}: {files}", "Conectando…", "Conectado", @@ -17162,11 +17183,11 @@ object Msg { "Insignia", "Haz clic de nuevo para {what}", "Posponer mañana", + ) + private fun es9(): Array = arrayOf( "Posponer {when}", "OBJETIVO Y NOTAS", "Sin objetivo aún. Pide a un agente que escriba para qué es este proyecto, o edita .backplane/intent.md.", - ) - private fun es9(): Array = arrayOf( "Editar objetivo y notas", "POR PEDIR ({n})", "PLACAS ({n})", @@ -17178,6 +17199,9 @@ object Msg { "{n} más: busca para encontrarlos", "Velocidad", "{model} solo funciona a velocidad Normal", + "Favoritos", + "Añadir a favoritos", + "Quitar de favoritos", "Normal", "Rápido", "Ultrarrápido", @@ -17411,14 +17435,14 @@ object Msg { "Horas de silencio", "Una notificación push espera hasta el fin de las horas de silencio, en tu zona horaria, y se envía entonces junta.", "Silencio desde y hasta", + ) + private fun es10(): Array = arrayOf( "HH:MM, 24 horas.", "Las horas son HH:MM, 24 horas, y no la misma.", "Las horas de silencio son HH:MM a HH:MM, 24 horas, y no la misma hora dos veces.", "Las peticiones urgentes pasan", "Una aprobación o una pregunta que bloquea a un agente se envía en horas de silencio y a un teléfono silenciado.", "iPhones que reciben notificaciones push", - ) - private fun es10(): Array = arrayOf( "Ninguno aún. Un iPhone se registra cuando se abre su app con alertas permitidas. Un teléfono Android recibe alertas mientras su app está conectada y sigue los interruptores de arriba.", "Silenciado: solo oye lo que dejan pasar las peticiones urgentes.", "Recibe alertas.", @@ -17663,14 +17687,14 @@ object Msg { "Ahora: {what}", "Unos {n, number} min restantes en este paso.", "Unos {n, number} s restantes en este paso.", + ) + private fun es11(): Array = arrayOf( "Midiendo cuánto tarda este paso.", "Trayendo tu trabajo de 0.14…", "{what}. Backplane trabaja mientras tanto y tu carpeta 0.14 solo se lee.", "Tardó {n, number} s.", "Tu trabajo de 0.14 está aquí", "{why}. Tus datos de 0.14 en {from} están intactos. Reintentar retoma donde se detuvo: nada viene dos veces.", - ) - private fun es11(): Array = arrayOf( "{why}. Tus datos de 0.14 están intactos. Reintentar retoma donde se detuvo: nada viene dos veces.", "Uso anónimo", "Activado salvo que lo desactives. Backplane envía conteos anónimos: instalaciones, actualizaciones, actividad diaria y totales diarios de hilos, mensajes, tokens de modelo, tráfico de bots, placas creadas y placas pedidas, con un ID de instalación aleatorio, la versión, el sistema y el día. Nunca tus conversaciones, proyectos, archivos, nombres, rutas ni claves. Ajustes, Privacidad lo cambia.", @@ -17915,14 +17939,14 @@ object Msg { "Elegir una foto del código", "O usar otro hub vinculado", "O la dirección del hub y código corto", + ) + private fun es12(): Array = arrayOf( "Vincular con código", "Comprueba la dirección del hub y el código de ocho caracteres.", "Ese no es un enlace de vinculación.", "¿Vincular con este hub?", "Un enlace abrió esto. Vincula solo con un hub que conozcas.", "Terminales", - ) - private fun es12(): Array = arrayOf( "Buscar proyectos e hilos", "Sin proyectos aún", "Añadir un proyecto", @@ -18167,14 +18191,14 @@ object Msg { "acción de voz desconocida", "petición de voz desconocida", "un término para añadir", + ) + private fun es13(): Array = arrayOf( "esa no es una clave API de OpenAI (empiezan con sk-)", "no se pudo escribir la clave", "El asistente de voz no pudo iniciar. Comprueba que esté instalado junto a Backplane.", "El asistente de voz se detuvo antes de terminar. Intenta descargar de nuevo.", "El asistente de voz no está instalado junto a Backplane.", "Cambio de diseño · {files}", - ) - private fun es13(): Array = arrayOf( "Diseño antes de las ediciones · {files}", "El turno terminó con un error; el agente no dio motivo.", "La identidad verificada de esta cuenta cambió o se desconectó. Comprueba el estado y selecciona explícitamente una cuenta para continuar.", @@ -18419,14 +18443,14 @@ object Msg { "El servicio de uso de Claude respondió {code}.", "esa cuenta ya no está", "proveedor: claude o codex", + ) + private fun es14(): Array = arrayOf( "no se pudo añadir la cuenta", "Este hilo usa una cuenta con nombre. Usa Backplane web o escritorio actualizado para continuar; tu borrador se conserva.", "Comprueba y reconecta esta cuenta antes de hacerla la predeterminada.", "Detén los turnos activos de esta cuenta antes de cambiar su inicio de sesión.", "Reconecta y selecciona esta cuenta antes de iniciar un turno", "La comprobación de estado de esta cuenta no terminó; inicia el turno de nuevo", - ) - private fun es14(): Array = arrayOf( "Ninguna cuenta se llama {name}. account_list las muestra.", "Las actualizaciones están desactivadas en esta máquina.", "Buscando actualizaciones.", @@ -18671,14 +18695,14 @@ object Msg { "herramienta", "en {name}", "‹ Transferido desde {title}", + ) + private fun es15(): Array = arrayOf( "Nota: {note}", "Sin enviar", "se ejecuta en {machine}", "también en {machines}", "Nuevo hilo en {machine}", "Sesión iniciada.", - ) - private fun es15(): Array = arrayOf( "Volver a Backplane", "Buscar proyectos…", "Ningún proyecto coincide.", @@ -18923,14 +18947,14 @@ object Msg { "Alertas en este teléfono", "Sonido de alerta", "Un enlace abrió esto. Vincula solo con un hub que conozcas.", + ) + private fun es16(): Array = arrayOf( "Un proyecto es una carpeta en el ordenador de tu hub. Añade uno para iniciar un hilo.", "Un comentario de revisión", "Insignia", "Comprar ahora", "CAMBIOS", "Elegir una foto", - ) - private fun es16(): Array = arrayOf( "cerrar", "Cerrar comparación", "Color", @@ -19175,14 +19199,14 @@ object Msg { "Vincular un teléfono", "Opcional. Consigue la app, muestra el código aquí y escanéalo. El teléfono abre tu uberbot.", "Escanea esto con la app de Backplane, o escribe el código corto y esta dirección. Funciona una vez, durante diez minutos. Trátalo como una contraseña.", + ) + private fun es17(): Array = arrayOf( "Mostrar el código", "Pulsa ? en cualquier momento para ver los atajos.", "Abrir el uberbot", "La configuración se ejecuta en un ordenador, en Ajustes, Configuración allí. Este teléfono está vinculado a él.", "Seis pasos cortos: agentes, herramientas de diseño, el nombre de tu uberbot, dónde vive y un primer proyecto.", "{n, plural, one {# miembro} other {# miembros}} · {w, number} trabajando", - ) - private fun es17(): Array = arrayOf( "retenido: {why}", "{state}: {why}", "Nuevo enjambre", @@ -19427,14 +19451,14 @@ object Msg { "Abrir placa", "No hay plan de ruteo para esta placa.", "Los corredores y planos del plan se dibujan en la placa mientras este panel está abierto. Ciérralo para ocultarlos.", + ) + private fun es18(): Array = arrayOf( "Planificar primero, solo en este turno", "Claude propone un plan y espera a Implementar; después el hilo vuelve a su propio modo.", "Esa placa aún no está en la lista de este proyecto.", "El stock y los precios vienen del catálogo de un solo distribuidor. Para consultar otros, añade sus claves API en Ajustes › Claves API y pídeselo a tu agente.", "Más piezas del proyecto (opcional)", "Responde «all», o di qué dejar fuera y qué piezas añadir.", - ) - private fun es18(): Array = arrayOf( "Añadir y continuar", "Activado: antes de rutear una placa con 4 o más capas de cobre o más de 60 redes, el agente propone un plan de ruteo y solo rutea lo que apruebes en el panel Plan junto a la placa. Desactivado: los agentes rutean como les pidas.", "Su hoja se usa más de una vez y KiCad guarda un solo valor para todas: {others} también lo tiene.", @@ -19679,14 +19703,14 @@ object Msg { "Ese diseño solo se muestra por ahora en su propia máquina.", "Eso no puede ser un mosaico aquí.", "El hub se está iniciando.", + ) + private fun es19(): Array = arrayOf( "Editor de huellas", "Editor de símbolos", "Clonar desde git", "URL https o ssh, o propietario/repositorio", "privado", "Iniciar sesión en GitHub", - ) - private fun es19(): Array = arrayOf( "Iniciando sesión en GitHub…", "Introduce este código en GitHub:", "Sesión iniciada en GitHub", @@ -21523,6 +21547,9 @@ object Msg { "Exit full screen", "The editor takes the whole window; only this row stays", "KiCad is closing. The editor opens again once it has closed.", + "Load it anyway", + "Loading it anyway…", + "Loading it may take a while and a lot of memory.", "Connecting…", "Disconnected", "Hub is opening its log…", @@ -21623,11 +21650,14 @@ object Msg { "Edit goal & notes", "No threads yet.", "No models", + ) + private fun exactText7(): Array = arrayOf( "Speed", + "Favorites", + "Add to favorites", + "Remove from favorites", "Normal", "Fast", - ) - private fun exactText7(): Array = arrayOf( "UltraFast", "×2 cost", "×2.5 usage", @@ -21872,14 +21902,14 @@ object Msg { "Clones the repository and adds it as a project", "Projects and git", "Push commits to the remote automatically", + ) + private fun exactText8(): Array = arrayOf( "Backplane commits design files locally at each turn's end. On: it also pushes them to the branch's remote. Off: a project's page shows the commits not pushed, with Push.", "Backplane no longer pushes automatically. Turn it on in Settings if you want it.", "Keep Backplane's commits off my branch", "Off: at each turn's end and save, Backplane commits the design files an agent changed to your branch. On: it records the same changes on its own refs (refs/backplane/design/) and never commits to your branch or index, so your branch shows the design files as modified until you commit them yourself. /restore and the KiCad history work either way.", "Start page", "What a new Browser tab opens, yours and an agent's. An http or https address; a bare name like example.com gets https://.", - ) - private fun exactText8(): Array = arrayOf( "Opens", "Reset to default", "Blank", @@ -22124,14 +22154,14 @@ object Msg { "That message is no longer in this thread.", "load earlier", "This hub does not take pictures yet (update it).", + ) + private fun exactText9(): Array = arrayOf( "Choose a photo", "Take a photo", "That could not be done.", "The hub refused the secret", "not sent · retry", "ASKS", - ) - private fun exactText9(): Array = arrayOf( "ASKED", "Your answer", "Cannot be reached", @@ -22376,14 +22406,14 @@ object Msg { "Reach this hub by", "Local network address", "Add another", + ) + private fun exactText10(): Array = arrayOf( "Let the hub answer on the local network", "This link names only this computer (127.0.0.1): a phone or another computer cannot reach it. Start the hub with Tailscale on, or on an address they can reach, then make a new link.", "A hub on a copied log does not listen on the network.", "unknown action", "None yet. Make a code here and enter it on the other machine, or enter its code below.", "Rename a machine", - ) - private fun exactText10(): Array = arrayOf( "How this machine calls another: one word or a few, never the same as another's. Agents and the composer (~name) use it.", "Machine now called", "New name", @@ -22628,14 +22658,14 @@ object Msg { "Clone from git", "https or ssh URL, or owner/repo", "Sign in to GitHub", + ) + private fun exactText11(): Array = arrayOf( "Clone into", "Change folder", "Clone into this folder", "Folder name", "Start a thread", "Clone", - ) - private fun exactText11(): Array = arrayOf( "That folder is already a clone of this repository: it's added as it is.", "Reading your repositories…", "Enter this code on GitHub's sign-in page:", @@ -22880,14 +22910,14 @@ object Msg { "back office", "Switch model", "Costs are estimates at the model's API rates.", + ) + private fun exactText12(): Array = arrayOf( "Mail, routines and reports run in sessions of their own: they never fill this chat's context.", "Routines run as turns of this chat.", "50+ more turns at this rate", "nearly full at this rate", "about 1 more turn at this rate", "No reading yet: the first turn's result reports it.", - ) - private fun exactText12(): Array = arrayOf( "Dock at the right", "Dock at the bottom", "Close the panel", @@ -23132,14 +23162,14 @@ object Msg { "Invalid split ratio", "Tile already exists", "Unknown KiCad frame", + ) + private fun exactText13(): Array = arrayOf( "Invalid layout request", "Too many tiles open", "Too many sources in one layout", "That version is not in this project's history", "This page has no history", "That layout is shown on its own machine only for now.", - ) - private fun exactText13(): Array = arrayOf( "That cannot be a tile here.", "The hub is starting.", "Footprint Editor", @@ -23275,9 +23305,9 @@ object Msg { "Connect a provider in the Backplane desktop or mobile app under Settings → Accounts.", ) internal val exactText: Array by lazy { arrayOf(*exactText0(), *exactText1(), *exactText2(), *exactText3(), *exactText4(), *exactText5(), *exactText6(), *exactText7(), *exactText8(), *exactText9(), *exactText10(), *exactText11(), *exactText12(), *exactText13()) } - internal val exactKey: IntArray by lazy { intArrayOf(0, 1, 2, 3, 4, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 3157, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 43, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 3725, 61, 62, 63, 64, 66, 68, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 84, 85, 3764, 87, 88, 98, 99, 3086, 3763, 102, 103, 105, 106, 107, 109, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 155, 156, 157, 159, 161, 162, 163, 3206, 165, 166, 3208, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 3167, 183, 187, 189, 193, 194, 195, 197, 198, 199, 200, 201, 202, 206, 209, 213, 215, 216, 217, 219, 220, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 234, 235, 2973, 237, 238, 239, 240, 3724, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 260, 262, 263, 264, 265, 266, 267, 270, 271, 272, 273, 275, 279, 280, 281, 282, 286, 287, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 300, 301, 3178, 305, 306, 307, 308, 309, 310, 311, 313, 314, 315, 317, 319, 333, 3772, 336, 3771, 3774, 340, 3784, 342, 343, 344, 345, 354, 3155, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 2976, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 2968, 2969, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 453, 454, 455, 3185, 457, 458, 459, 460, 461, 2958, 463, 464, 465, 3088, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 556, 557, 558, 559, 560, 561, 562, 563, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 592, 628, 629, 630, 3193, 3194, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 651, 652, 3837, 654, 656, 657, 659, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 680, 681, 682, 683, 684, 686, 687, 689, 690, 692, 693, 694, 695, 698, 704, 724, 728, 729, 730, 731, 732, 3769, 734, 735, 736, 737, 3192, 739, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, 752, 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 781, 782, 783, 784, 785, 786, 787, 788, 789, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, 800, 801, 802, 803, 3752, 805, 806, 807, 808, 809, 810, 811, 812, 813, 814, 815, 816, 817, 818, 819, 820, 821, 822, 823, 824, 825, 826, 827, 828, 829, 832, 833, 834, 835, 836, 837, 838, 839, 840, 841, 843, 844, 845, 847, 848, 3188, 850, 852, 853, 854, 857, 858, 859, 860, 861, 862, 863, 864, 865, 866, 867, 3762, 869, 870, 871, 872, 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, 883, 884, 885, 886, 887, 888, 889, 890, 891, 892, 893, 894, 895, 896, 897, 898, 899, 900, 901, 3839, 903, 904, 907, 908, 909, 910, 911, 912, 913, 914, 915, 916, 917, 918, 919, 920, 921, 922, 923, 924, 925, 926, 927, 928, 929, 930, 931, 932, 933, 934, 935, 936, 937, 938, 939, 940, 941, 942, 943, 944, 945, 946, 947, 948, 949, 950, 951, 952, 953, 954, 955, 956, 957, 958, 959, 960, 961, 962, 3158, 964, 965, 966, 967, 968, 969, 3787, 971, 3013, 3070, 974, 975, 976, 978, 979, 987, 988, 989, 991, 992, 993, 995, 996, 997, 998, 999, 1000, 1001, 1002, 1003, 1005, 1006, 1007, 1008, 1009, 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 1018, 3790, 1020, 1021, 1022, 1025, 1029, 1030, 1031, 2965, 3039, 1034, 1035, 1036, 1037, 1038, 1039, 1040, 1041, 1042, 1043, 1045, 1046, 1049, 1050, 1051, 1052, 1053, 1054, 1055, 1056, 1057, 1058, 1059, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 1074, 1082, 1083, 1086, 1087, 1088, 1090, 1091, 1092, 3804, 1094, 1095, 1098, 1099, 1100, 3187, 1102, 1103, 1104, 1105, 1106, 1107, 1108, 1110, 1111, 1112, 1113, 1114, 1115, 1116, 3789, 1120, 1123, 1124, 1125, 1127, 1128, 1129, 1130, 1131, 1132, 1133, 1134, 1135, 1136, 1137, 1138, 1139, 1140, 1141, 1142, 1143, 1144, 1145, 1146, 1150, 1151, 1152, 1153, 1154, 1155, 1158, 1162, 1163, 1165, 1170, 1171, 1172, 1173, 1176, 1178, 1180, 1181, 1182, 1184, 1185, 1186, 1187, 1188, 1189, 1190, 1191, 1192, 1193, 1194, 1195, 1197, 1198, 1199, 1200, 1201, 1202, 1203, 1206, 1207, 1208, 1209, 1210, 1211, 1212, 1213, 1214, 1215, 1216, 1217, 1218, 1220, 1222, 1223, 2967, 1225, 1226, 1227, 1228, 1229, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1240, 1241, 1244, 1245, 1246, 1247, 1248, 1250, 1253, 1254, 1255, 1256, 1257, 1258, 1260, 1261, 1262, 1263, 1264, 1265, 1266, 1267, 1269, 1270, 1271, 1272, 1273, 1274, 1275, 1277, 1278, 1279, 1280, 1281, 1288, 1289, 1290, 1291, 1294, 1296, 1297, 1298, 1299, 1301, 1305, 1306, 1308, 1309, 1310, 1311, 1315, 1316, 1318, 1319, 1320, 1322, 1323, 1324, 1325, 1326, 1327, 1328, 1329, 1330, 1335, 1338, 1339, 1340, 1341, 1344, 1347, 1348, 1356, 1357, 3502, 1361, 1362, 1363, 1364, 1365, 1366, 3569, 1373, 1375, 1380, 1384, 1385, 3043, 1387, 1388, 1389, 1390, 1391, 1392, 1393, 1394, 1395, 1396, 1397, 1398, 1399, 1400, 1401, 1402, 1403, 1404, 1405, 1406, 1407, 1408, 1409, 1410, 1411, 1412, 2970, 1417, 1418, 1419, 1420, 1421, 1422, 1423, 1424, 1425, 1426, 1427, 1428, 1429, 1430, 1431, 1432, 1433, 3087, 3580, 1436, 1438, 1439, 1440, 1441, 1442, 1443, 1444, 1445, 1446, 1447, 1448, 1449, 1450, 1451, 1452, 1453, 1454, 1455, 1456, 1457, 1458, 1459, 1460, 1461, 1462, 1463, 1464, 1465, 1466, 1467, 1468, 1469, 3582, 1473, 1474, 1475, 1477, 1478, 1479, 1480, 1481, 1482, 1483, 1484, 1485, 1486, 1487, 1488, 1489, 1490, 1493, 1494, 3727, 1496, 1497, 1498, 3739, 3745, 1501, 1502, 1503, 1504, 1505, 1507, 1508, 1509, 1510, 1511, 1512, 1513, 1514, 1515, 1516, 1523, 1525, 1526, 1527, 1528, 1529, 1530, 1531, 1532, 1533, 1534, 1535, 1536, 1537, 1538, 1539, 1540, 1541, 1542, 1543, 1544, 1545, 1546, 1547, 1548, 1549, 1550, 1551, 1552, 1553, 1554, 1555, 1556, 1557, 1558, 1559, 1560, 1561, 1562, 1563, 1564, 1565, 1566, 1567, 1568, 1569, 1570, 1571, 1573, 1574, 1575, 1576, 1578, 1579, 1580, 1581, 1582, 1585, 1586, 1587, 1588, 1589, 1590, 1591, 1592, 1594, 1595, 1596, 1597, 1598, 1599, 1600, 1601, 1602, 1603, 1604, 1605, 1606, 1607, 1608, 1609, 1610, 1611, 1612, 1613, 1614, 1615, 1616, 1617, 1618, 1619, 1620, 1621, 1622, 1623, 1624, 1625, 1627, 1628, 1629, 1630, 1631, 1632, 1633, 1634, 3046, 1636, 1637, 1638, 1639, 1640, 1641, 1642, 1643, 1644, 1645, 1646, 1647, 1648, 1650, 1651, 1652, 1653, 1654, 1655, 1656, 1661, 1662, 1663, 1664, 1665, 1666, 1667, 1668, 3456, 1670, 1671, 1672, 1673, 3457, 1675, 1676, 1677, 1678, 1679, 1680, 1681, 1682, 1683, 1684, 1685, 1686, 2979, 1692, 1694, 1696, 1698, 1702, 1706, 1712, 1714, 1715, 1716, 1718, 1719, 1720, 1721, 1722, 1723, 1725, 1727, 1728, 1729, 1730, 1731, 1733, 1734, 3751, 1736, 1737, 1738, 1739, 1740, 1741, 1742, 1744, 1745, 1747, 1748, 1749, 1750, 1751, 1752, 1753, 1754, 1755, 1756, 1757, 1758, 1759, 1760, 1761, 1762, 1765, 1766, 1767, 1768, 1769, 1770, 1771, 1772, 1773, 1774, 1775, 1776, 1777, 1778, 1779, 1780, 1781, 1782, 1783, 1784, 1785, 1786, 1787, 1788, 1789, 1790, 1791, 1792, 1793, 1794, 1795, 1796, 1797, 1798, 1799, 1800, 1801, 1802, 1803, 1804, 1805, 1806, 1807, 1808, 1809, 1810, 1811, 1812, 1813, 1814, 1815, 1816, 1817, 1818, 1819, 1820, 1821, 1822, 1823, 1824, 1826, 1827, 3022, 1836, 1838, 1842, 3004, 1844, 1845, 3005, 1847, 1848, 1852, 3069, 1854, 1855, 1856, 1857, 1858, 1859, 1860, 1861, 1862, 1864, 1869, 1871, 1872, 1873, 1874, 1875, 1876, 3084, 1878, 1879, 1882, 1883, 1893, 1894, 1898, 1899, 1900, 1901, 1902, 1903, 1904, 1905, 1907, 1908, 1909, 1910, 1911, 1912, 1913, 1914, 1915, 1916, 1917, 1918, 1919, 1920, 1921, 1922, 1927, 1928, 1929, 1930, 1931, 1932, 1933, 1934, 1935, 1936, 1937, 1938, 1939, 1940, 1942, 1943, 1945, 1946, 1956, 1958, 1959, 1962, 1963, 1966, 1967, 1968, 1970, 1971, 1972, 1973, 1974, 1975, 1976, 1977, 1978, 1979, 1980, 1981, 1982, 1983, 1984, 1985, 1986, 1988, 1994, 1995, 1996, 1997, 2001, 3145, 2007, 2008, 2010, 2011, 2012, 2013, 3797, 3798, 2022, 2024, 2025, 2026, 2028, 2029, 2030, 2031, 2032, 2033, 2034, 2035, 2036, 2039, 2040, 2042, 2043, 2046, 2047, 3130, 3131, 3132, 2055, 3358, 2057, 2059, 2060, 2061, 2062, 2063, 2064, 2065, 2066, 2067, 2068, 2069, 2070, 2071, 2074, 2075, 2076, 2077, 2078, 2079, 2083, 2084, 2085, 2086, 2087, 2088, 2089, 2090, 2091, 2092, 2093, 2094, 2095, 2096, 2097, 2098, 2099, 2100, 2102, 2103, 2104, 2105, 2106, 2107, 2108, 2109, 2110, 2112, 2118, 2119, 2120, 2121, 2122, 2123, 2124, 2125, 3072, 2130, 2131, 2132, 2134, 2136, 2137, 2138, 2139, 2995, 3120, 3121, 3122, 3123, 3124, 2146, 2147, 2148, 2150, 2997, 2998, 2988, 2987, 2156, 2989, 2158, 2993, 2160, 3356, 2165, 2169, 2171, 2172, 2173, 2174, 2175, 2176, 2177, 2178, 2179, 2180, 2181, 3023, 2185, 2186, 2187, 2188, 3056, 2190, 2191, 2192, 2193, 2194, 2195, 2196, 2197, 2198, 2201, 3369, 2203, 2204, 2205, 2206, 3038, 2208, 2209, 2210, 2211, 2986, 2213, 3101, 2216, 2220, 2221, 3646, 2223, 2224, 3733, 3734, 2228, 3183, 2231, 3722, 2234, 2235, 2236, 2237, 2238, 3782, 2240, 3153, 2242, 3152, 2244, 2246, 2248, 2249, 2250, 2254, 2257, 2259, 2261, 2262, 2263, 2264, 2265, 2266, 2267, 2268, 2269, 2270, 2271, 2273, 2274, 2275, 3740, 2277, 2278, 2280, 3030, 3028, 3032, 2286, 2288, 2289, 2295, 2296, 2297, 2298, 3068, 2303, 2304, 2306, 2311, 2312, 3012, 3581, 2975, 2974, 2977, 3097, 3100, 2325, 2326, 2328, 2329, 2331, 2332, 2333, 2334, 2335, 2336, 2337, 2338, 2339, 3801, 2343, 2344, 2345, 2346, 2347, 2348, 2349, 2350, 2351, 2352, 2353, 2354, 2355, 2356, 2357, 2362, 2364, 2365, 2366, 2370, 2371, 2374, 2375, 2382, 2383, 2384, 2385, 2386, 2387, 2388, 2389, 2390, 2391, 2392, 2393, 2394, 2396, 2397, 2398, 2399, 2400, 2401, 2423, 2424, 2427, 2428, 2429, 2430, 2431, 2432, 2433, 2443, 2447, 2448, 2449, 2450, 2451, 2452, 2453, 2454, 2455, 2457, 2458, 2459, 2460, 2462, 2463, 2464, 2466, 2469, 2470, 2471, 2474, 2475, 2476, 2477, 2478, 2479, 2480, 2481, 2487, 2488, 2489, 2490, 2491, 2492, 2493, 2494, 2495, 2496, 2497, 2498, 2499, 2500, 2501, 2502, 2503, 2504, 2505, 2506, 2507, 2508, 2509, 2511, 2512, 2513, 2514, 2515, 2516, 2517, 2518, 2519, 2520, 2521, 2522, 2523, 2524, 2525, 2526, 2527, 2528, 2529, 2530, 2531, 2532, 2534, 2535, 2536, 2537, 3134, 2539, 2541, 2542, 2544, 2545, 2546, 2547, 2548, 2549, 2550, 2553, 2554, 2555, 2556, 2559, 2560, 2561, 2562, 2563, 2564, 2565, 2566, 2567, 2575, 2576, 2577, 2578, 2581, 2582, 2583, 2584, 2585, 2586, 2587, 2588, 2589, 2591, 2592, 2593, 2594, 2595, 2596, 2597, 2598, 2599, 2602, 2604, 2605, 2608, 2609, 2610, 2611, 2612, 2613, 2614, 2615, 2616, 2618, 2619, 2621, 2622, 2623, 2624, 2625, 2626, 2627, 2628, 2629, 2630, 2631, 2633, 2635, 2638, 2640, 3730, 2645, 2646, 2647, 2648, 2649, 2650, 2651, 2655, 2656, 2658, 2659, 2660, 2661, 2662, 2663, 2664, 2666, 2667, 2668, 2673, 2674, 2675, 2677, 2678, 2679, 2680, 2682, 2683, 2684, 2685, 2686, 2687, 2688, 2689, 2690, 2691, 2692, 2693, 2694, 3703, 2696, 2697, 2699, 3700, 2701, 2702, 3704, 3701, 2714, 2718, 3711, 3207, 3712, 2722, 3713, 2724, 2726, 3715, 2728, 3716, 2730, 2732, 3720, 3698, 3691, 3699, 2751, 2752, 2754, 2755, 2765, 2766, 2768, 2769, 2770, 2771, 2772, 2773, 2774, 2775, 2776, 2780, 2783, 2786, 2788, 2790, 2796, 2797, 2798, 2799, 2800, 2801, 2802, 2803, 2804, 2805, 2806, 2807, 2808, 3378, 2810, 2811, 2812, 2813, 2814, 2816, 2818, 2819, 3410, 2825, 2826, 2827, 2828, 2829, 2830, 2831, 2832, 2833, 2834, 2835, 2836, 2838, 2839, 2840, 2841, 2844, 2845, 2847, 2848, 2849, 2850, 3002, 2852, 2854, 2855, 2857, 2858, 2859, 2860, 2861, 2863, 2864, 2868, 2871, 2872, 2873, 2875, 2876, 2877, 2879, 2880, 2881, 2882, 2884, 2885, 2888, 2891, 2892, 2893, 2894, 2895, 2897, 2899, 2900, 2902, 2903, 2904, 2905, 2906, 2907, 2908, 2909, 2911, 2912, 2913, 2914, 2915, 2916, 2917, 2918, 2919, 2920, 2921, 2922, 2923, 2924, 2925, 2926, 2927, 2928, 2929, 2930, 2936, 2937, 2938, 2940, 2941, 2942, 2946, 2947, 2948, 2949, 2950, 2954, 2955, 2959, 2960, 2961, 2962, 2963, 2964, 2966, 2971, 2972, 2978, 2983, 2985, 2990, 2991, 2992, 2994, 2996, 2999, 3000, 3001, 3003, 3007, 3014, 3015, 3016, 3017, 3018, 3019, 3020, 3021, 3024, 3025, 3026, 3027, 3031, 3033, 3034, 3035, 3036, 3040, 3041, 3045, 3047, 3048, 3049, 3051, 3052, 3053, 3054, 3055, 3058, 3059, 3060, 3061, 3062, 3063, 3064, 3065, 3066, 3073, 3074, 3075, 3076, 3081, 3082, 3083, 3085, 3089, 3090, 3091, 3092, 3093, 3096, 3098, 3099, 3102, 3103, 3104, 3105, 3106, 3107, 3108, 3109, 3110, 3112, 3114, 3115, 3116, 3117, 3118, 3119, 3125, 3126, 3127, 3128, 3129, 3133, 3135, 3136, 3137, 3138, 3139, 3140, 3141, 3143, 3144, 3147, 3149, 3150, 3151, 3154, 3159, 3160, 3161, 3163, 3166, 3168, 3169, 3171, 3172, 3173, 3175, 3176, 3177, 3179, 3180, 3181, 3182, 3186, 3191, 3196, 3197, 3198, 3199, 3200, 3201, 3202, 3204, 3209, 3210, 3211, 3212, 3213, 3214, 3215, 3216, 3217, 3218, 3219, 3220, 3221, 3224, 3225, 3228, 3229, 3230, 3231, 3232, 3233, 3234, 3235, 3238, 3239, 3240, 3241, 3242, 3243, 3244, 3245, 3246, 3247, 3248, 3251, 3252, 3254, 3255, 3256, 3257, 3258, 3259, 3260, 3261, 3262, 3263, 3264, 3265, 3266, 3267, 3268, 3269, 3270, 3271, 3272, 3273, 3274, 3275, 3276, 3277, 3278, 3279, 3280, 3283, 3284, 3285, 3286, 3287, 3288, 3289, 3290, 3291, 3292, 3294, 3295, 3296, 3297, 3298, 3299, 3300, 3301, 3302, 3303, 3304, 3305, 3306, 3307, 3308, 3309, 3310, 3311, 3312, 3313, 3314, 3315, 3316, 3317, 3318, 3319, 3320, 3321, 3322, 3323, 3324, 3325, 3326, 3329, 3330, 3331, 3332, 3333, 3334, 3335, 3336, 3337, 3338, 3339, 3340, 3341, 3342, 3343, 3344, 3345, 3346, 3347, 3348, 3349, 3350, 3352, 3353, 3357, 3359, 3360, 3361, 3363, 3364, 3365, 3368, 3370, 3371, 3372, 3373, 3374, 3377, 3379, 3382, 3384, 3385, 3390, 3391, 3392, 3393, 3396, 3403, 3404, 3405, 3406, 3407, 3408, 3411, 3412, 3413, 3414, 3417, 3418, 3419, 3420, 3421, 3422, 3423, 3424, 3425, 3426, 3428, 3429, 3430, 3431, 3432, 3433, 3435, 3436, 3438, 3439, 3440, 3441, 3442, 3448, 3449, 3450, 3451, 3452, 3453, 3454, 3455, 3458, 3461, 3464, 3465, 3466, 3467, 3468, 3469, 3470, 3471, 3472, 3473, 3474, 3475, 3476, 3477, 3478, 3479, 3480, 3481, 3482, 3484, 3485, 3486, 3487, 3488, 3489, 3490, 3492, 3493, 3494, 3495, 3496, 3497, 3498, 3499, 3501, 3506, 3512, 3514, 3515, 3516, 3517, 3518, 3519, 3520, 3521, 3522, 3523, 3524, 3525, 3526, 3527, 3528, 3530, 3531, 3532, 3533, 3534, 3535, 3539, 3540, 3544, 3545, 3551, 3552, 3553, 3554, 3555, 3556, 3557, 3558, 3559, 3561, 3562, 3563, 3564, 3567, 3568, 3570, 3571, 3583, 3584, 3585, 3586, 3587, 3588, 3589, 3590, 3591, 3592, 3593, 3594, 3595, 3596, 3597, 3598, 3599, 3600, 3602, 3603, 3604, 3608, 3609, 3610, 3611, 3617, 3618, 3619, 3620, 3624, 3626, 3627, 3628, 3630, 3633, 3634, 3638, 3645, 3647, 3650, 3652, 3653, 3654, 3655, 3656, 3657, 3659, 3660, 3661, 3662, 3663, 3664, 3665, 3666, 3667, 3668, 3669, 3670, 3671, 3672, 3673, 3674, 3675, 3676, 3677, 3678, 3679, 3680, 3681, 3682, 3683, 3684, 3685, 3686, 3687, 3688, 3689, 3690, 3708, 3723, 3726, 3728, 3729, 3731, 3735, 3737, 3741, 3750, 3753, 3754, 3755, 3756, 3757, 3758, 3760, 3766, 3767, 3770, 3773, 3775, 3776, 3777, 3778, 3779, 3780, 3783, 3786, 3788, 3792, 3793, 3794, 3795, 3796, 3799, 3800, 3802, 3803, 3805, 3806, 3807, 3808, 3809, 3810, 3811, 3812, 3814, 3815, 3816, 3817, 3818, 3819, 3820, 3821, 3822, 3823, 3824, 3825, 3826, 3827, 3828, 3829, 3830, 3831, 3834, 3836, 3838, 3847, 3848, 3850, 3851, 3860, 3866, 3872, 3881, 3883, 3884, 3885, 3886, 3889, 3890, 3892, 3898, 3902, 3906, 3911, 3912, 3914, 3915, 3916, 3918, 3919, 3920, 3925, 3926, 3927, 3928, 3929, 3930, 3931, 3932, 3933, 3936, 3937, 3938, 3983, 3984, 3989, 3991, 3992, 3994, 4000, 4003, 4018, 4019, 4020, 4021, 4022, 4023, 4025, 4026, 4028, 4029, 4031, 4033, 4034, 4047, 4050, 4051, 4053, 4054, 4058, 4063, 4066, 4067, 4069, 4070, 4076, 4078, 4079, 4082, 4084, 4089, 4090, 4091, 4096, 4107, 4130, 4146, 4154, 4163, 4164, 4168, 4173, 4189, 4190, 4191, 4192, 4194, 4196, 4197, 4199, 4202, 4206, 4209, 4212, 4213, 4214, 4215, 4219, 4220, 4221, 4222, 4225, 4226, 4227, 4228, 4229, 4230, 4231, 4232, 4233, 4234, 4235, 4236, 4237, 4238, 4239, 4240, 4241, 4242, 4243, 4244, 4245, 4246, 4247, 4248, 4256, 4259, 4260, 4266, 4271, 4272, 4273, 4274, 4278, 4282, 4284, 4285, 4286, 4287, 4288, 4289, 4290, 4291, 4293, 4294, 4295, 4296, 4298, 4299, 4300, 4301, 4302, 4303, 4304, 4314, 4323, 4324, 4325, 4326, 4327, 4328, 4329, 4330, 4331, 4332, 4334, 4335, 4339, 4340, 4342, 4343, 4344, 4345, 4349, 4350, 4351, 4352, 4353, 4354, 4356, 4357, 4358, 4364, 4365, 4366, 4367, 4368, 4369, 4373, 4377, 4378, 4380, 4381, 4382, 4383, 4384, 4386, 4396, 4398, 4403, 4404, 4405, 4406, 4407, 4408, 4409, 4410, 4411, 4412, 4413, 4414, 4415, 4416, 4417, 4418, 4420, 4421, 4422, 4423, 4424, 4425, 4426, 4431, 4434, 4435, 4436, 4437, 4438, 4439, 4440, 4441, 4442, 4443, 4444, 4445, 4446, 4447, 4448, 4449, 4450, 4451, 4452, 4453, 4454, 4456, 4457, 4458, 4460, 4461, 4462, 4463, 4466, 4467, 4468, 4470, 4471, 4472, 4474, 4475, 4476, 4477, 4478, 4479, 4481, 4483, 4486, 4487, 4488, 4489, 4491, 4492, 4493, 4494, 4495, 4496, 4497, 4498, 4499, 4500, 4501, 4505, 4507, 4508, 4509, 4510, 4511, 4515, 4516, 4520, 4521, 4522, 4524, 4526, 4527, 4528, 4529, 4530, 4531, 4532, 4534, 4535, 4536, 4537, 4538, 4539, 4540, 4547, 4548, 4549, 4550, 4551, 4552, 4553, 4554, 4555, 4556, 4557, 4558, 4564, 4565, 4567, 4568, 4569, 4570, 4571, 4572, 4573, 4574, 4575, 4576, 4577, 4578, 4579, 4580, 4581, 4582, 4586, 4587, 4588, 4589, 4590, 4591, 4592, 4593, 4594, 4599, 4600, 4603, 4604, 4605, 4606, 4607, 4608, 4609, 4610, 4611, 4612, 4613, 4614, 4615, 4616, 4618, 4619, 4620, 4621, 4630, 4631, 4632, 4633, 4634, 4635, 4637, 4640, 4641, 4642, 4644, 4645, 4646, 4647, 4648, 4649, 4650, 4651, 4652, 4653, 4654, 4655, 4656, 4657, 4658, 4659, 4660, 4661, 4662, 4663, 4664, 4665, 4666, 4667, 4668, 4669, 4670, 4671, 4672, 4673, 4674, 4675, 4676, 4677, 4678, 4679, 4680, 4681, 4682, 4683, 4684, 4685, 4686, 4687, 4688, 4689, 4690, 4691, 4692, 4693, 4694, 4695, 4696, 4697, 4698, 4699, 4700, 4701, 4702, 4703, 4704, 4705, 4706, 4707, 4708, 4709, 4710, 4711, 4712, 4713, 4714, 4715, 4716, 4717, 4718, 4719, 4720, 4721, 4722, 4723, 4724, 4725, 4726, 4727, 4728, 4729, 4730, 4731, 4732, 4733, 4734, 4735, 4736, 4737, 4738, 4739, 4740, 4741, 4742, 4743, 4744, 4745, 4750, 4751, 4752, 4758, 4771, 4775, 4776, 4777, 4778, 4779, 4780, 4781, 4782, 4783, 4784, 4785, 4786, 4787, 4788, 4789, 4790, 4792, 4793, 4794, 4795, 4796, 4798, 4799, 4800, 4801, 4802, 4803, 4804, 4807, 4808, 4810, 4811, 4812, 4815, 4816, 4817, 4818, 4819, 4820, 4821, 4822, 4823, 4824, 4825, 4826, 4827, 4828, 4829, 4830, 4831, 4832, 4833, 4834, 4835, 4836, 4837, 4838, 4839, 4840, 4841, 4843, 4844, 4845, 4846, 4847, 4848, 4849, 4850, 4851, 4852, 4853, 4854, 4855, 4856, 4857, 4858, 4859, 4860, 4861, 4862, 4863, 4864, 4865, 4866, 4867, 4868, 4869, 4870, 4871, 4872, 4873, 4874, 4876, 4877, 4878, 4880, 4882, 4884, 4885, 4886, 4887, 4890, 4892, 4893, 4894, 4895, 4897, 4898, 4899, 4900, 4901, 4902, 4903, 4904, 4907, 4911, 4912, 4916, 4917, 4918, 4919, 4920, 4922, 4923) } - internal val templates: IntArray by lazy { intArrayOf(2363, 2842, 2654, 2653, 2652, 2874, 2896, 3376, 2617, 418, 2787, 2785, 2681, 2372, 2378, 2789, 2886, 2601, 2600, 285, 2330, 2791, 2898, 3226, 4178, 2540, 4921, 2590, 2050, 2368, 3710, 2115, 2717, 2373, 3227, 1336, 4198, 4218, 3709, 2558, 2715, 1867, 4193, 2126, 2164, 2170, 4560, 283, 2116, 4502, 3388, 3409, 2073, 2341, 3706, 452, 2749, 2781, 2782, 3389, 3705, 2750, 3637, 609, 1711, 3714, 1868, 2725, 3717, 2731, 3380, 616, 617, 2767, 3078, 3692, 1659, 2784, 3636, 303, 614, 69, 711, 621, 2340, 4216, 1121, 2482, 3459, 3832, 1242, 2199, 2569, 3381, 2162, 3721, 714, 1763, 1964, 2737, 2746, 2957, 4223, 3383, 3395, 136, 594, 596, 2557, 2712, 1865, 4211, 3029, 610, 2283, 2580, 3869, 1302, 4210, 3505, 3642, 3643, 158, 2080, 2082, 2117, 2837, 4359, 2168, 2367, 2510, 3631, 214, 284, 1276, 2014, 4791, 3500, 3509, 3510, 67, 83, 218, 619, 4596, 3529, 1360, 4305, 3354, 3719, 726, 1023, 1372, 2381, 2473, 2735, 4361, 89, 2380, 2395, 2910, 624, 1657, 1954, 2824, 4490, 3402, 1577, 2101, 2287, 2571, 4542, 3397, 3463, 3513, 650, 1888, 3924, 3162, 3504, 3550, 3614, 3833, 1317, 1866, 2045, 2419, 2706, 3852, 4561, 3416, 3462, 1841, 1863, 3351, 593, 1292, 1346, 1371, 1953, 3491, 3693, 221, 1701, 2738, 2935, 3080, 3148, 3437, 258, 591, 1026, 1379, 1965, 1989, 4131, 3434, 3560, 655, 1342, 1717, 2051, 3156, 3355, 3616, 3635, 710, 1283, 1370, 1382, 1658, 1732, 1895, 2369, 2472, 2570, 3939, 4217, 4427, 3415, 3483, 3629, 649, 699, 1044, 2606, 3174, 3293, 3696, 108, 184, 606, 721, 1081, 1969, 2049, 2111, 2166, 2405, 2486, 2742, 2778, 2822, 3944, 4473, 4814, 3375, 3446, 3607, 160, 623, 701, 1332, 1333, 1345, 1520, 1660, 2163, 2167, 2260, 2404, 2632, 4186, 4503, 3111, 3203, 3250, 3328, 3542, 3697, 3707, 703, 1183, 1572, 1897, 2255, 2258, 2485, 2743, 2763, 2764, 2932, 2933, 3954, 3974, 4207, 4464, 4797, 4813, 3615, 3632, 3738, 1378, 1492, 1584, 1703, 1955, 2425, 2437, 2762, 4150, 4208, 4504, 4595, 3077, 3079, 3094, 3612, 3625, 3791, 723, 1024, 1832, 2135, 2200, 2415, 2758, 2759, 3959, 4205, 4281, 4292, 3281, 3401, 91, 93, 595, 715, 1027, 1350, 1355, 2020, 2327, 2420, 2705, 2757, 2761, 3921, 4543, 4875, 3008, 3009, 3511, 3575, 3718, 94, 1251, 1259, 1353, 1377, 1519, 1583, 1880, 2183, 2215, 2465, 2483, 2733, 3861, 3862, 4204, 4370, 4433, 4879, 3327, 3366, 3367, 3445, 3601, 299, 599, 618, 700, 1109, 1117, 1175, 1367, 1518, 1626, 1948, 2127, 2133, 2151, 2218, 2435, 2440, 2442, 2665, 2698, 2756, 2934, 2951, 2952, 4175, 4201, 4318, 3010, 3164, 3541, 3574, 3743, 211, 585, 590, 605, 717, 720, 906, 990, 1084, 1159, 1334, 1470, 1524, 1705, 1886, 1906, 1926, 1961, 1991, 2072, 2310, 2418, 2484, 2939, 3888, 3940, 4158, 4544, 4562, 4563, 4762, 3071, 3427, 3622, 3623, 92, 96, 269, 603, 648, 712, 980, 1331, 1707, 1887, 1944, 2114, 2413, 2439, 2441, 2444, 2533, 2671, 2707, 2889, 2901, 4249, 4546, 4774, 2984, 3249, 3282, 3362, 3460, 3579, 3613, 208, 277, 316, 329, 330, 1287, 1352, 1376, 1521, 1522, 1949, 2019, 2044, 2113, 2217, 2245, 2293, 2407, 2422, 2434, 2708, 2711, 2792, 2793, 3859, 4559, 4757, 3006, 3394, 3398, 3447, 3503, 3658, 3695, 3748, 6, 244, 304, 600, 604, 1047, 1221, 1286, 1354, 1359, 1708, 1709, 1884, 1957, 1960, 2018, 2021, 2149, 2184, 2232, 2406, 2414, 2634, 2740, 2779, 2856, 3856, 3857, 3917, 4174, 4760, 4772, 4773, 3444, 3566, 3573, 3578, 3640, 3648, 268, 318, 322, 331, 583, 707, 722, 1076, 1160, 1164, 1284, 1285, 1312, 1517, 1710, 1828, 1889, 2009, 2219, 2225, 2377, 2403, 2409, 2436, 2568, 2669, 3922, 4147, 4200, 4263, 4362, 4432, 4643, 4761, 3057, 3142, 3507, 3508, 3606, 3639, 65, 210, 274, 587, 608, 613, 708, 713, 984, 1075, 1167, 1369, 1713, 1743, 1829, 1834, 1849, 1885, 2048, 2081, 2272, 2290, 2299, 2402, 2456, 2468, 2760, 4185, 3037, 3387, 3572, 3641, 3649, 3694, 90, 207, 288, 320, 323, 324, 349, 597, 607, 709, 855, 905, 1166, 1169, 1252, 1437, 1890, 2005, 2015, 2408, 2417, 2461, 2739, 2777, 2931, 2945, 3894, 4805, 4806, 4809, 4905, 3011, 3042, 3095, 3165, 3223, 3236, 3237, 3400, 3548, 3549, 3621, 3644, 3651, 3702, 110, 186, 190, 191, 212, 321, 327, 328, 352, 375, 580, 582, 589, 625, 727, 851, 977, 1077, 1118, 1147, 1243, 1304, 1314, 1746, 1830, 1831, 1839, 1950, 1951, 1952, 2041, 2251, 2253, 2279, 2291, 2292, 2314, 2376, 2410, 2411, 2467, 2573, 2574, 2657, 2672, 2704, 2709, 2710, 2747, 2794, 2795, 3840, 3858, 3904, 3958, 4203, 4297, 4315, 4333, 4360, 4430, 4465, 4517, 4541, 4602, 4842, 3044, 3146, 3170, 3184, 3205, 3386, 3399, 3543, 3547, 3577, 3605, 3736, 3746, 3747, 3759, 3761, 3768, 5, 8, 82, 185, 188, 192, 257, 276, 325, 326, 348, 351, 356, 598, 620, 658, 696, 705, 856, 985, 1048, 1122, 1148, 1149, 1168, 1179, 1239, 1383, 1491, 1649, 1693, 1704, 1850, 1881, 1947, 1993, 2006, 2027, 2247, 2252, 2302, 2308, 2309, 2316, 2421, 2607, 2643, 2817, 3905, 3913, 3943, 3960, 4127, 4162, 4176, 4224, 4264, 4316, 4355, 4518, 4545, 3067, 3113, 3189, 3190, 3195, 3253, 3537, 154, 259, 261, 347, 350, 353, 579, 602, 612, 702, 706, 982, 1078, 1381, 1593, 1833, 1925, 1987, 1990, 2300, 2313, 2379, 2426, 2572, 2620, 2862, 3863, 3910, 3976, 4143, 4514, 4601, 3443, 3536, 3538, 3546, 3565, 3576, 3744, 3765, 3785, 95, 196, 203, 204, 205, 242, 243, 346, 581, 586, 601, 615, 622, 626, 627, 691, 716, 725, 983, 986, 1085, 1089, 1161, 1174, 1204, 1349, 1471, 1506, 1688, 1689, 1691, 1726, 1851, 1891, 2230, 2305, 2315, 2416, 2438, 2446, 2953, 4129, 4159, 4160, 4250, 4275, 4313, 4428, 4484, 4525, 4881, 4906) } - internal val argNames: Map> by lazy { mapOf(5 to arrayOf("n"), 6 to arrayOf("n"), 7 to arrayOf("who"), 8 to arrayOf("title"), 65 to arrayOf("state"), 67 to arrayOf("listen"), 69 to arrayOf("listen"), 82 to arrayOf("version"), 83 to arrayOf("count", "plural"), 89 to arrayOf("size", "limit"), 90 to arrayOf("name"), 91 to arrayOf("dir"), 92 to arrayOf("dir"), 93 to arrayOf("name"), 94 to arrayOf("name"), 95 to arrayOf("path"), 96 to arrayOf("path"), 97 to arrayOf("name"), 108 to arrayOf("first"), 110 to arrayOf("n"), 136 to arrayOf("count", "plural"), 154 to arrayOf("tool"), 158 to arrayOf("n"), 160 to arrayOf("name"), 184 to arrayOf("pid", "cmd"), 185 to arrayOf("title", "ago"), 186 to arrayOf("name", "who", "n"), 188 to arrayOf("line"), 190 to arrayOf("n"), 191 to arrayOf("n"), 192 to arrayOf("n"), 196 to arrayOf("name"), 203 to arrayOf("when"), 204 to arrayOf("text", "when"), 205 to arrayOf("when"), 207 to arrayOf("count", "plural"), 208 to arrayOf("count", "plural"), 210 to arrayOf("took", "ago"), 211 to arrayOf("ago"), 212 to arrayOf("kind"), 214 to arrayOf("kind", "code", "why"), 218 to arrayOf("clock"), 221 to arrayOf("build"), 242 to arrayOf("step"), 243 to arrayOf("turn"), 244 to arrayOf("branch"), 257 to arrayOf("step", "total"), 258 to arrayOf("step", "total"), 259 to arrayOf("when"), 261 to arrayOf("tool"), 268 to arrayOf("count", "plural"), 269 to arrayOf("count", "total"), 274 to arrayOf("old", "new"), 276 to arrayOf("version"), 277 to arrayOf("count"), 278 to arrayOf("tag"), 283 to arrayOf("version"), 284 to arrayOf("old", "version"), 285 to arrayOf("version"), 288 to arrayOf("version"), 299 to arrayOf("project", "location"), 303 to arrayOf("account"), 304 to arrayOf("account"), 316 to arrayOf("n"), 318 to arrayOf("n"), 320 to arrayOf("minute"), 321 to arrayOf("time"), 322 to arrayOf("time"), 323 to arrayOf("clock"), 324 to arrayOf("clock", "took"), 325 to arrayOf("clock"), 326 to arrayOf("clock", "took"), 327 to arrayOf("clock"), 328 to arrayOf("clock", "took"), 329 to arrayOf("clock"), 330 to arrayOf("clock", "took"), 331 to arrayOf("clock"), 346 to arrayOf("target"), 347 to arrayOf("target"), 348 to arrayOf("target"), 349 to arrayOf("target"), 350 to arrayOf("target"), 351 to arrayOf("target"), 352 to arrayOf("target"), 353 to arrayOf("target"), 356 to arrayOf("name"), 375 to arrayOf("t"), 418 to arrayOf("minutes", "plural"), 452 to arrayOf("path"), 579 to arrayOf("count"), 580 to arrayOf("count"), 581 to arrayOf("title"), 582 to arrayOf("path"), 583 to arrayOf("path", "error"), 584 to arrayOf("first", "last", "count"), 585 to arrayOf("task", "step"), 586 to arrayOf("count"), 587 to arrayOf("path"), 588 to arrayOf("count", "plural"), 589 to arrayOf("label"), 590 to arrayOf("provider"), 591 to arrayOf("version"), 593 to arrayOf("key"), 594 to arrayOf("device"), 595 to arrayOf("kind", "device"), 596 to arrayOf("status"), 597 to arrayOf("kind", "title"), 598 to arrayOf("layer"), 599 to arrayOf("error"), 600 to arrayOf("page"), 601 to arrayOf("page", "kind", "total"), 602 to arrayOf("reason"), 603 to arrayOf("tag"), 604 to arrayOf("tag"), 605 to arrayOf("title"), 606 to arrayOf("title"), 607 to arrayOf("text", "time"), 608 to arrayOf("kind", "device"), 609 to arrayOf("device"), 610 to arrayOf("device"), 611 to arrayOf("word"), 612 to arrayOf("word", "kind", "count"), 613 to arrayOf("error"), 614 to arrayOf("count"), 615 to arrayOf("time", "relative", "rel", "zoned", "zone"), 616 to arrayOf("zone"), 617 to arrayOf("zone"), 618 to arrayOf("id", "state", "count", "age"), 619 to arrayOf("id"), 620 to arrayOf("name"), 621 to arrayOf("name"), 622 to arrayOf("clock", "count", "plural"), 623 to arrayOf("name"), 624 to arrayOf("name"), 625 to arrayOf("name"), 626 to arrayOf("count"), 627 to arrayOf("count"), 631 to arrayOf("name", "state"), 632 to arrayOf("author", "place", "state"), 633 to arrayOf("title", "state"), 648 to arrayOf("error"), 649 to arrayOf("error"), 650 to arrayOf("host"), 655 to arrayOf("email"), 658 to arrayOf("version"), 660 to arrayOf("first", "last", "count"), 661 to arrayOf("n"), 662 to arrayOf("n"), 691 to arrayOf("ref"), 696 to arrayOf("name"), 697 to arrayOf("name"), 699 to arrayOf("name"), 700 to arrayOf("name"), 701 to arrayOf("action"), 702 to arrayOf("label"), 703 to arrayOf("count", "plural"), 705 to arrayOf("path"), 706 to arrayOf("word", "kind", "count"), 707 to arrayOf("name"), 708 to arrayOf("name"), 709 to arrayOf("name"), 710 to arrayOf("name"), 711 to arrayOf("url"), 712 to arrayOf("count"), 713 to arrayOf("count"), 714 to arrayOf("device"), 715 to arrayOf("device"), 716 to arrayOf("count"), 717 to arrayOf("label"), 718 to arrayOf("label"), 719 to arrayOf("label"), 720 to arrayOf("title"), 721 to arrayOf("title"), 722 to arrayOf("state"), 723 to arrayOf("open", "kind"), 725 to arrayOf("count"), 726 to arrayOf("email"), 727 to arrayOf("email"), 851 to arrayOf("at", "count"), 855 to arrayOf("name"), 856 to arrayOf("name"), 905 to arrayOf("name"), 906 to arrayOf("name"), 977 to arrayOf("count"), 980 to arrayOf("name"), 981 to arrayOf("name", "count"), 982 to arrayOf("label", "n"), 983 to arrayOf("action"), 984 to arrayOf("count", "plural"), 985 to arrayOf("count"), 986 to arrayOf("waiting", "busy", "done"), 990 to arrayOf("count", "plural"), 1023 to arrayOf("name"), 1024 to arrayOf("name"), 1026 to arrayOf("seconds", "long"), 1027 to arrayOf("size", "triangles", "delayed", "waited", "built"), 1028 to arrayOf("size", "delayed", "waited"), 1044 to arrayOf("name"), 1047 to arrayOf("name"), 1048 to arrayOf("count"), 1075 to arrayOf("state"), 1076 to arrayOf("bytes"), 1077 to arrayOf("count"), 1078 to arrayOf("when"), 1079 to arrayOf("state", "name"), 1080 to arrayOf("name", "state"), 1081 to arrayOf("reason", "code"), 1084 to arrayOf("kind", "code"), 1085 to arrayOf("number"), 1089 to arrayOf("x", "y"), 1096 to arrayOf("state"), 1097 to arrayOf("label", "example"), 1109 to arrayOf("text"), 1117 to arrayOf("error"), 1118 to arrayOf("kind", "count"), 1121 to arrayOf("name"), 1122 to arrayOf("n"), 1147 to arrayOf("ago"), 1148 to arrayOf("name"), 1149 to arrayOf("kind", "place", "hub"), 1159 to arrayOf("label"), 1160 to arrayOf("word"), 1161 to arrayOf("count"), 1164 to arrayOf("hub"), 1166 to arrayOf("count"), 1167 to arrayOf("state"), 1168 to arrayOf("label"), 1169 to arrayOf("label"), 1174 to arrayOf("state", "text"), 1175 to arrayOf("text"), 1177 to arrayOf("question"), 1179 to arrayOf("label"), 1183 to arrayOf("title"), 1204 to arrayOf("count"), 1205 to arrayOf("name", "counts"), 1219 to arrayOf("n"), 1221 to arrayOf("mode"), 1238 to arrayOf("first", "last", "total"), 1239 to arrayOf("count"), 1242 to arrayOf("n"), 1243 to arrayOf("who", "name"), 1251 to arrayOf("name"), 1252 to arrayOf("when"), 1259 to arrayOf("why"), 1276 to arrayOf("name"), 1283 to arrayOf("kind"), 1284 to arrayOf("title"), 1285 to arrayOf("title"), 1286 to arrayOf("title"), 1287 to arrayOf("title"), 1292 to arrayOf("name"), 1302 to arrayOf("heard"), 1303 to arrayOf("out", "heard"), 1304 to arrayOf("heard"), 1312 to arrayOf("name", "mb"), 1314 to arrayOf("name"), 1317 to arrayOf("platform"), 1321 to arrayOf("heard", "out", "yes"), 1331 to arrayOf("name", "done", "total", "percent"), 1332 to arrayOf("name", "done"), 1333 to arrayOf("name"), 1334 to arrayOf("error"), 1336 to arrayOf("mb"), 1342 to arrayOf("mb"), 1345 to arrayOf("n"), 1346 to arrayOf("n"), 1349 to arrayOf("n"), 1350 to arrayOf("pct"), 1351 to arrayOf("px"), 1352 to arrayOf("version"), 1353 to arrayOf("tag"), 1354 to arrayOf("tag"), 1355 to arrayOf("hub"), 1359 to arrayOf("tag"), 1360 to arrayOf("tag"), 1367 to arrayOf("when"), 1369 to arrayOf("tag"), 1370 to arrayOf("tag", "when"), 1371 to arrayOf("tag"), 1372 to arrayOf("tag", "when"), 1376 to arrayOf("channel"), 1377 to arrayOf("tag"), 1378 to arrayOf("app", "hub"), 1379 to arrayOf("hub", "app"), 1381 to arrayOf("key"), 1382 to arrayOf("key"), 1383 to arrayOf("why"), 1437 to arrayOf("n"), 1470 to arrayOf("title"), 1471 to arrayOf("note"), 1491 to arrayOf("title"), 1492 to arrayOf("more"), 1506 to arrayOf("bots"), 1517 to arrayOf("name"), 1518 to arrayOf("name", "time"), 1519 to arrayOf("name", "n"), 1520 to arrayOf("name", "time", "n"), 1521 to arrayOf("to"), 1522 to arrayOf("to", "step"), 1524 to arrayOf("note"), 1572 to arrayOf("why"), 1577 to arrayOf("e"), 1583 to arrayOf("max"), 1584 to arrayOf("secs", "max", "mib"), 1593 to arrayOf("path"), 1626 to arrayOf("secs"), 1649 to arrayOf("pct", "scope"), 1657 to arrayOf("n"), 1658 to arrayOf("n"), 1659 to arrayOf("n"), 1660 to arrayOf("n"), 1688 to arrayOf("d", "h"), 1689 to arrayOf("h", "m"), 1690 to arrayOf("m"), 1691 to arrayOf("window", "pct"), 1693 to arrayOf("when"), 1695 to arrayOf("label", "e"), 1697 to arrayOf("from", "to", "total"), 1701 to arrayOf("messages", "lines", "left"), 1703 to arrayOf("pct", "view", "max"), 1704 to arrayOf("pct"), 1705 to arrayOf("done", "total"), 1707 to arrayOf("n"), 1708 to arrayOf("n"), 1709 to arrayOf("time"), 1710 to arrayOf("view", "max"), 1711 to arrayOf("view", "max"), 1713 to arrayOf("more"), 1717 to arrayOf("n"), 1726 to arrayOf("n"), 1732 to arrayOf("page"), 1743 to arrayOf("title"), 1746 to arrayOf("n"), 1763 to arrayOf("name"), 1828 to arrayOf("line"), 1829 to arrayOf("quote"), 1830 to arrayOf("n"), 1831 to arrayOf("n"), 1832 to arrayOf("n"), 1833 to arrayOf("n"), 1834 to arrayOf("n"), 1839 to arrayOf("held"), 1840 to arrayOf("machine"), 1841 to arrayOf("machine"), 1849 to arrayOf("count", "total"), 1850 to arrayOf("count"), 1851 to arrayOf("n"), 1863 to arrayOf("name"), 1865 to arrayOf("n", "c", "total"), 1866 to arrayOf("n", "c"), 1867 to arrayOf("n", "c", "total", "before"), 1868 to arrayOf("n", "c", "before"), 1880 to arrayOf("name"), 1881 to arrayOf("path"), 1884 to arrayOf("file"), 1885 to arrayOf("path", "n"), 1886 to arrayOf("why"), 1887 to arrayOf("n"), 1888 to arrayOf("name"), 1889 to arrayOf("name"), 1890 to arrayOf("name"), 1891 to arrayOf("n"), 1892 to arrayOf("shown", "n"), 1895 to arrayOf("path"), 1897 to arrayOf("n"), 1906 to arrayOf("status"), 1923 to arrayOf("name", "pct"), 1924 to arrayOf("name", "mb"), 1925 to arrayOf("name"), 1926 to arrayOf("name", "why"), 1944 to arrayOf("machine"), 1947 to arrayOf("n"), 1948 to arrayOf("ref"), 1949 to arrayOf("ref", "sheet"), 1950 to arrayOf("name"), 1951 to arrayOf("name"), 1952 to arrayOf("file", "folder"), 1953 to arrayOf("name", "error"), 1954 to arrayOf("name", "status"), 1955 to arrayOf("name", "error"), 1957 to arrayOf("name"), 1960 to arrayOf("code"), 1961 to arrayOf("error"), 1964 to arrayOf("error"), 1965 to arrayOf("error"), 1969 to arrayOf("error"), 1987 to arrayOf("done", "of"), 1989 to arrayOf("why"), 1990 to arrayOf("path"), 1991 to arrayOf("error"), 1992 to arrayOf("secs"), 1993 to arrayOf("secs"), 2005 to arrayOf("code"), 2006 to arrayOf("code"), 2009 to arrayOf("state"), 2014 to arrayOf("hide", "copy", "paste"), 2015 to arrayOf("n"), 2018 to arrayOf("name"), 2019 to arrayOf("name", "folder"), 2020 to arrayOf("name"), 2021 to arrayOf("name", "percent"), 2027 to arrayOf("folder"), 2037 to arrayOf("w", "h"), 2041 to arrayOf("path"), 2044 to arrayOf("why"), 2045 to arrayOf("mb"), 2048 to arrayOf("n"), 2049 to arrayOf("delete", "undo"), 2050 to arrayOf("delete", "undo"), 2051 to arrayOf("undo"), 2072 to arrayOf("what", "secs"), 2073 to arrayOf("file", "holder"), 2080 to arrayOf("what"), 2081 to arrayOf("what"), 2082 to arrayOf("editor", "why"), 2101 to arrayOf("files"), 2111 to arrayOf("why"), 2113 to arrayOf("title"), 2114 to arrayOf("title"), 2115 to arrayOf("version"), 2116 to arrayOf("version", "size", "folder"), 2117 to arrayOf("version", "size", "folder"), 2126 to arrayOf("title"), 2127 to arrayOf("dir", "files"), 2133 to arrayOf("why"), 2135 to arrayOf("code"), 2149 to arrayOf("origin"), 2151 to arrayOf("why"), 2162 to arrayOf("dir"), 2163 to arrayOf("path"), 2164 to arrayOf("home", "other"), 2166 to arrayOf("path"), 2167 to arrayOf("code", "log"), 2168 to arrayOf("log"), 2170 to arrayOf("addr"), 2183 to arrayOf("home"), 2184 to arrayOf("addr"), 2199 to arrayOf("dir", "why"), 2200 to arrayOf("dir"), 2215 to arrayOf("phase"), 2217 to arrayOf("why"), 2218 to arrayOf("what"), 2219 to arrayOf("code"), 2225 to arrayOf("label"), 2230 to arrayOf("kind"), 2232 to arrayOf("project"), 2245 to arrayOf("what"), 2247 to arrayOf("when"), 2251 to arrayOf("n"), 2252 to arrayOf("n"), 2253 to arrayOf("n"), 2255 to arrayOf("agent"), 2256 to arrayOf("effort"), 2258 to arrayOf("n"), 2260 to arrayOf("model"), 2272 to arrayOf("word"), 2279 to arrayOf("more", "step"), 2283 to arrayOf("name"), 2287 to arrayOf("max", "skipped"), 2290 to arrayOf("name"), 2291 to arrayOf("n"), 2292 to arrayOf("name"), 2293 to arrayOf("name"), 2299 to arrayOf("n"), 2300 to arrayOf("name"), 2302 to arrayOf("price"), 2305 to arrayOf("name"), 2307 to arrayOf("name"), 2308 to arrayOf("name"), 2309 to arrayOf("name"), 2310 to arrayOf("text"), 2313 to arrayOf("key"), 2314 to arrayOf("key"), 2315 to arrayOf("pct"), 2316 to arrayOf("when"), 2327 to arrayOf("n", "upstream"), 2330 to arrayOf("mb"), 2340 to arrayOf("path"), 2341 to arrayOf("path"), 2363 to arrayOf("id"), 2367 to arrayOf("model"), 2368 to arrayOf("platform"), 2369 to arrayOf("version"), 2372 to arrayOf("version", "from", "into"), 2373 to arrayOf("version", "from"), 2376 to arrayOf("version", "path"), 2377 to arrayOf("version", "path"), 2378 to arrayOf("version", "pin", "from"), 2379 to arrayOf("path"), 2380 to arrayOf("version", "path"), 2381 to arrayOf("version", "path", "set"), 2395 to arrayOf("turns", "input", "cread", "cwrite", "output", "cost"), 2402 to arrayOf("tool"), 2403 to arrayOf("tool"), 2404 to arrayOf("tool", "word"), 2405 to arrayOf("tool", "word"), 2406 to arrayOf("tool"), 2407 to arrayOf("tool"), 2408 to arrayOf("due"), 2409 to arrayOf("due"), 2410 to arrayOf("due"), 2411 to arrayOf("due"), 2412 to arrayOf("zone"), 2413 to arrayOf("zone"), 2414 to arrayOf("zone"), 2415 to arrayOf("zone"), 2416 to arrayOf("n"), 2417 to arrayOf("who"), 2418 to arrayOf("n", "who"), 2419 to arrayOf("harness"), 2420 to arrayOf("path"), 2421 to arrayOf("path"), 2422 to arrayOf("path"), 2425 to arrayOf("error", "line"), 2426 to arrayOf("label"), 2434 to arrayOf("who"), 2435 to arrayOf("who"), 2436 to arrayOf("label", "left", "when"), 2437 to arrayOf("left"), 2438 to arrayOf("name", "left"), 2439 to arrayOf("used"), 2440 to arrayOf("used", "limit"), 2441 to arrayOf("used", "reason"), 2442 to arrayOf("used", "limit", "reason"), 2444 to arrayOf("provider"), 2445 to arrayOf("used", "window", "pct"), 2446 to arrayOf("rate"), 2456 to arrayOf("n", "r"), 2461 to arrayOf("time", "n"), 2465 to arrayOf("n", "m"), 2467 to arrayOf("pct"), 2468 to arrayOf("cost", "n"), 2472 to arrayOf("in", "out", "cread", "cwrite"), 2473 to arrayOf("in", "out", "cread", "cwrite", "n"), 2482 to arrayOf("turns", "input", "cread", "cwrite", "output"), 2483 to arrayOf("left", "when"), 2484 to arrayOf("left", "when"), 2485 to arrayOf("left", "when"), 2486 to arrayOf("left", "when"), 2510 to arrayOf("n"), 2533 to arrayOf("when"), 2540 to arrayOf("phrase", "now"), 2551 to arrayOf("s"), 2557 to arrayOf("now"), 2558 to arrayOf("now", "nudge", "sent", "undone"), 2568 to arrayOf("e"), 2569 to arrayOf("a", "ams", "b", "bms"), 2570 to arrayOf("ms"), 2571 to arrayOf("e"), 2572 to arrayOf("t"), 2573 to arrayOf("t"), 2574 to arrayOf("t"), 2580 to arrayOf("why"), 2590 to arrayOf("apps"), 2600 to arrayOf("n"), 2601 to arrayOf("n", "k"), 2606 to arrayOf("stt", "conf"), 2607 to arrayOf("words"), 2617 to arrayOf("into"), 2620 to arrayOf("origin"), 2632 to arrayOf("url"), 2634 to arrayOf("url"), 2642 to arrayOf("i", "n"), 2643 to arrayOf("d", "n"), 2652 to arrayOf("version"), 2653 to arrayOf("version"), 2654 to arrayOf("version"), 2657 to arrayOf("path"), 2665 to arrayOf("addr"), 2669 to arrayOf("label"), 2671 to arrayOf("label"), 2672 to arrayOf("label"), 2676 to arrayOf("label"), 2681 to arrayOf("from"), 2698 to arrayOf("done", "of"), 2704 to arrayOf("n"), 2705 to arrayOf("t", "m"), 2706 to arrayOf("m"), 2707 to arrayOf("b", "m"), 2708 to arrayOf("r", "p"), 2709 to arrayOf("n"), 2710 to arrayOf("n"), 2711 to arrayOf("n"), 2712 to arrayOf("n"), 2715 to arrayOf("n"), 2717 to arrayOf("n"), 2725 to arrayOf("n"), 2731 to arrayOf("name", "gb", "path"), 2733 to arrayOf("path", "why"), 2735 to arrayOf("names"), 2737 to arrayOf("why"), 2738 to arrayOf("p", "pn", "t", "tn", "e", "en"), 2739 to arrayOf("done", "total"), 2740 to arrayOf("n"), 2741 to arrayOf("what"), 2742 to arrayOf("n"), 2743 to arrayOf("n"), 2746 to arrayOf("what"), 2747 to arrayOf("n"), 2749 to arrayOf("why", "from"), 2750 to arrayOf("why"), 2756 to arrayOf("path"), 2757 to arrayOf("path", "who"), 2758 to arrayOf("path"), 2759 to arrayOf("path", "cmd"), 2760 to arrayOf("version", "path"), 2761 to arrayOf("version", "path"), 2762 to arrayOf("version", "path", "who"), 2763 to arrayOf("version", "path"), 2764 to arrayOf("version", "path", "cmd"), 2767 to arrayOf("cmd"), 2777 to arrayOf("name", "version", "path"), 2778 to arrayOf("path", "why"), 2779 to arrayOf("name"), 2781 to arrayOf("version", "cli"), 2782 to arrayOf("cli"), 2784 to arrayOf("version"), 2785 to arrayOf("version"), 2787 to arrayOf("version"), 2789 to arrayOf("version"), 2791 to arrayOf("computer"), 2792 to arrayOf("version", "cli"), 2793 to arrayOf("cli"), 2794 to arrayOf("version", "cli"), 2795 to arrayOf("cli"), 2817 to arrayOf("n"), 2822 to arrayOf("code"), 2824 to arrayOf("e"), 2837 to arrayOf("n"), 2842 to arrayOf("channel"), 2856 to arrayOf("project"), 2862 to arrayOf("n"), 2874 to arrayOf("m"), 2886 to arrayOf("m"), 2889 to arrayOf("m"), 2896 to arrayOf("pages"), 2898 to arrayOf("name"), 2901 to arrayOf("name"), 2910 to arrayOf("d", "n"), 2931 to arrayOf("n", "tools"), 2932 to arrayOf("n", "tools", "d"), 2933 to arrayOf("n", "d"), 2934 to arrayOf("n", "what"), 2935 to arrayOf("n", "d", "what"), 2939 to arrayOf("head"), 2945 to arrayOf("name", "path"), 2951 to arrayOf("page", "net", "near"), 2952 to arrayOf("page", "what"), 2953 to arrayOf("ref"), 2957 to arrayOf("page"), 2980 to arrayOf("n"), 2981 to arrayOf("n"), 2982 to arrayOf("n"), 2984 to arrayOf("hub"), 3006 to arrayOf("project"), 3008 to arrayOf("n"), 3009 to arrayOf("n"), 3010 to arrayOf("word"), 3011 to arrayOf("n"), 3029 to arrayOf("name"), 3037 to arrayOf("answer"), 3042 to arrayOf("why"), 3044 to arrayOf("hub"), 3050 to arrayOf("from", "to"), 3057 to arrayOf("project"), 3067 to arrayOf("name"), 3071 to arrayOf("n"), 3077 to arrayOf("code"), 3078 to arrayOf("hub"), 3079 to arrayOf("hub"), 3080 to arrayOf("hub"), 3094 to arrayOf("n"), 3095 to arrayOf("n"), 3111 to arrayOf("status"), 3113 to arrayOf("status"), 3142 to arrayOf("project"), 3146 to arrayOf("code"), 3148 to arrayOf("why"), 3156 to arrayOf("title"), 3162 to arrayOf("title"), 3164 to arrayOf("q"), 3165 to arrayOf("title"), 3170 to arrayOf("room"), 3174 to arrayOf("q"), 3184 to arrayOf("title"), 3189 to arrayOf("n"), 3190 to arrayOf("n"), 3195 to arrayOf("at"), 3203 to arrayOf("size"), 3205 to arrayOf("n", "total"), 3222 to arrayOf("n"), 3223 to arrayOf("what"), 3226 to arrayOf("device"), 3227 to arrayOf("device"), 3236 to arrayOf("word", "count"), 3237 to arrayOf("heard"), 3249 to arrayOf("files"), 3250 to arrayOf("files"), 3253 to arrayOf("name"), 3281 to arrayOf("n"), 3282 to arrayOf("n"), 3293 to arrayOf("n"), 3327 to arrayOf("root"), 3328 to arrayOf("path"), 3351 to arrayOf("name"), 3354 to arrayOf("until"), 3355 to arrayOf("error"), 3362 to arrayOf("url"), 3366 to arrayOf("name"), 3367 to arrayOf("name"), 3375 to arrayOf("code", "hub", "until"), 3376 to arrayOf("url"), 3380 to arrayOf("kinds"), 3381 to arrayOf("address"), 3383 to arrayOf("address"), 3386 to arrayOf("url"), 3387 to arrayOf("url"), 3388 to arrayOf("url"), 3389 to arrayOf("url", "via"), 3394 to arrayOf("name"), 3395 to arrayOf("url", "check", "left"), 3397 to arrayOf("check"), 3398 to arrayOf("address"), 3399 to arrayOf("name"), 3400 to arrayOf("error"), 3401 to arrayOf("url"), 3402 to arrayOf("url"), 3409 to arrayOf("code", "address", "left"), 3415 to arrayOf("name"), 3416 to arrayOf("name"), 3427 to arrayOf("address"), 3434 to arrayOf("code", "body"), 3437 to arrayOf("code", "body"), 3443 to arrayOf("window", "used"), 3444 to arrayOf("window", "used", "when"), 3445 to arrayOf("window", "used"), 3446 to arrayOf("window", "used", "when"), 3447 to arrayOf("provider"), 3459 to arrayOf("label"), 3460 to arrayOf("when"), 3462 to arrayOf("provider"), 3463 to arrayOf("provider", "title", "why"), 3483 to arrayOf("reason"), 3491 to arrayOf("code"), 3500 to arrayOf("name"), 3503 to arrayOf("version"), 3504 to arrayOf("version"), 3505 to arrayOf("version"), 3507 to arrayOf("version"), 3508 to arrayOf("version"), 3509 to arrayOf("version"), 3510 to arrayOf("version", "why"), 3511 to arrayOf("version"), 3513 to arrayOf("code"), 3529 to arrayOf("name"), 3536 to arrayOf("count"), 3537 to arrayOf("title"), 3538 to arrayOf("name"), 3541 to arrayOf("n", "holder"), 3542 to arrayOf("n", "title"), 3543 to arrayOf("title"), 3546 to arrayOf("n"), 3547 to arrayOf("n"), 3548 to arrayOf("n"), 3549 to arrayOf("n"), 3550 to arrayOf("harness", "typed", "type", "remote", "host", "wt", "branch"), 3560 to arrayOf("pid"), 3565 to arrayOf("left"), 3566 to arrayOf("left"), 3572 to arrayOf("left"), 3573 to arrayOf("left"), 3574 to arrayOf("left"), 3575 to arrayOf("left"), 3576 to arrayOf("label", "left"), 3577 to arrayOf("when"), 3578 to arrayOf("used"), 3579 to arrayOf("used", "limit"), 3601 to arrayOf("tracking"), 3605 to arrayOf("total"), 3606 to arrayOf("price"), 3607 to arrayOf("price"), 3612 to arrayOf("n"), 3613 to arrayOf("parts"), 3614 to arrayOf("note"), 3615 to arrayOf("error"), 3616 to arrayOf("error", "parts"), 3621 to arrayOf("state"), 3622 to arrayOf("name", "path"), 3623 to arrayOf("name", "path", "why"), 3625 to arrayOf("code"), 3629 to arrayOf("detail"), 3631 to arrayOf("why"), 3632 to arrayOf("parts"), 3635 to arrayOf("build", "to"), 3636 to arrayOf("build"), 3637 to arrayOf("build", "skip"), 3639 to arrayOf("why"), 3640 to arrayOf("why"), 3641 to arrayOf("build"), 3642 to arrayOf("build", "why"), 3643 to arrayOf("build"), 3644 to arrayOf("build"), 3648 to arrayOf("build"), 3649 to arrayOf("build"), 3651 to arrayOf("build"), 3658 to arrayOf("build"), 3692 to arrayOf("step"), 3693 to arrayOf("p", "pt", "t", "tt", "e", "et"), 3694 to arrayOf("done", "total"), 3695 to arrayOf("n"), 3696 to arrayOf("n"), 3697 to arrayOf("n"), 3702 to arrayOf("n"), 3705 to arrayOf("why"), 3706 to arrayOf("why", "from"), 3707 to arrayOf("error"), 3709 to arrayOf("n"), 3710 to arrayOf("n"), 3714 to arrayOf("n"), 3717 to arrayOf("name", "gb", "path"), 3718 to arrayOf("path", "why"), 3719 to arrayOf("names"), 3721 to arrayOf("why"), 3732 to arrayOf("n", "total"), 3736 to arrayOf("title"), 3738 to arrayOf("n"), 3742 to arrayOf("name"), 3743 to arrayOf("title"), 3744 to arrayOf("note"), 3746 to arrayOf("machine"), 3747 to arrayOf("machines"), 3748 to arrayOf("machine"), 3759 to arrayOf("n"), 3761 to arrayOf("n"), 3765 to arrayOf("name"), 3768 to arrayOf("name"), 3785 to arrayOf("why"), 3791 to arrayOf("project"), 3832 to arrayOf("path"), 3833 to arrayOf("path"), 3835 to arrayOf("have", "total"), 3840 to arrayOf("n"), 3849 to arrayOf("hub"), 3852 to arrayOf("title"), 3856 to arrayOf("project"), 3857 to arrayOf("project"), 3858 to arrayOf("n"), 3859 to arrayOf("hub"), 3861 to arrayOf("n"), 3862 to arrayOf("n"), 3863 to arrayOf("model"), 3869 to arrayOf("name"), 3888 to arrayOf("word"), 3894 to arrayOf("answer"), 3904 to arrayOf("version", "build"), 3905 to arrayOf("hub"), 3910 to arrayOf("name"), 3913 to arrayOf("when", "who", "mark"), 3917 to arrayOf("who"), 3921 to arrayOf("time"), 3922 to arrayOf("address"), 3924 to arrayOf("kind", "name"), 3939 to arrayOf("title"), 3940 to arrayOf("query"), 3943 to arrayOf("room"), 3944 to arrayOf("query"), 3946 to arrayOf("n"), 3947 to arrayOf("n"), 3948 to arrayOf("n"), 3954 to arrayOf("size"), 3958 to arrayOf("n"), 3959 to arrayOf("n"), 3960 to arrayOf("n"), 3974 to arrayOf("status"), 3976 to arrayOf("status"), 4127 to arrayOf("code"), 4129 to arrayOf("n"), 4131 to arrayOf("why"), 4143 to arrayOf("done", "of"), 4147 to arrayOf("thread"), 4150 to arrayOf("n"), 4158 to arrayOf("title"), 4159 to arrayOf("note"), 4160 to arrayOf("label"), 4161 to arrayOf("machine"), 4162 to arrayOf("machine"), 4169 to arrayOf("at", "total"), 4170 to arrayOf("at", "total"), 4174 to arrayOf("machine"), 4175 to arrayOf("machine"), 4176 to arrayOf("machines"), 4178 to arrayOf("device"), 4185 to arrayOf("price"), 4186 to arrayOf("price"), 4193 to arrayOf("home"), 4198 to arrayOf("from"), 4200 to arrayOf("note"), 4201 to arrayOf("note"), 4203 to arrayOf("v"), 4204 to arrayOf("v"), 4205 to arrayOf("v", "who"), 4207 to arrayOf("who"), 4208 to arrayOf("v"), 4210 to arrayOf("v", "cmd"), 4211 to arrayOf("cmd"), 4216 to arrayOf("v", "path"), 4217 to arrayOf("v", "note"), 4218 to arrayOf("v"), 4223 to arrayOf("tool"), 4224 to arrayOf("tool"), 4249 to arrayOf("n", "w"), 4250 to arrayOf("why"), 4251 to arrayOf("state", "why"), 4263 to arrayOf("project"), 4264 to arrayOf("n"), 4275 to arrayOf("why"), 4281 to arrayOf("name"), 4292 to arrayOf("project"), 4297 to arrayOf("n"), 4305 to arrayOf("names"), 4313 to arrayOf("dest"), 4315 to arrayOf("repo"), 4316 to arrayOf("repo"), 4318 to arrayOf("url"), 4333 to arrayOf("time"), 4355 to arrayOf("group"), 4359 to arrayOf("project"), 4360 to arrayOf("n"), 4361 to arrayOf("n"), 4362 to arrayOf("n"), 4370 to arrayOf("n"), 4427 to arrayOf("n"), 4428 to arrayOf("n"), 4429 to arrayOf("a", "b"), 4430 to arrayOf("n"), 4432 to arrayOf("parts", "lines"), 4433 to arrayOf("n"), 4464 to arrayOf("what", "project", "fab"), 4465 to arrayOf("rev", "day"), 4473 to arrayOf("n"), 4484 to arrayOf("layer"), 4485 to arrayOf("n"), 4490 to arrayOf("board"), 4502 to arrayOf("others"), 4503 to arrayOf("must", "should", "notes"), 4504 to arrayOf("id", "w"), 4514 to arrayOf("what"), 4517 to arrayOf("why"), 4518 to arrayOf("why"), 4525 to arrayOf("n"), 4541 to arrayOf("price", "n"), 4542 to arrayOf("n", "need"), 4543 to arrayOf("n"), 4544 to arrayOf("n"), 4545 to arrayOf("cost"), 4546 to arrayOf("cost"), 4559 to arrayOf("day", "n"), 4560 to arrayOf("day"), 4561 to arrayOf("cost", "n", "lines"), 4562 to arrayOf("stock", "price"), 4563 to arrayOf("lines"), 4584 to arrayOf("host"), 4595 to arrayOf("n"), 4596 to arrayOf("a", "b"), 4597 to arrayOf("n"), 4598 to arrayOf("n"), 4601 to arrayOf("day"), 4602 to arrayOf("n"), 4643 to arrayOf("turn"), 4757 to arrayOf("text"), 4760 to arrayOf("repo", "dest"), 4761 to arrayOf("repo", "dest"), 4762 to arrayOf("repo"), 4767 to arrayOf("dir"), 4768 to arrayOf("dir"), 4772 to arrayOf("editor", "job", "secs"), 4773 to arrayOf("editor", "secs"), 4774 to arrayOf("editor"), 4791 to arrayOf("time"), 4797 to arrayOf("status"), 4805 to arrayOf("time"), 4806 to arrayOf("time", "dur"), 4809 to arrayOf("answer"), 4813 to arrayOf("type"), 4814 to arrayOf("max"), 4842 to arrayOf("bytes", "tokens"), 4875 to arrayOf("what"), 4879 to arrayOf("n"), 4881 to arrayOf("n"), 4905 to arrayOf("n"), 4906 to arrayOf("done", "total"), 4914 to arrayOf("v"), 4915 to arrayOf("x", "y"), 4921 to arrayOf("machine")) } + internal val exactKey: IntArray by lazy { intArrayOf(0, 1, 2, 3, 4, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 3163, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 43, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 3731, 61, 62, 63, 64, 66, 68, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 84, 85, 3770, 87, 88, 98, 99, 3092, 3769, 102, 103, 105, 106, 107, 109, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 155, 156, 157, 159, 161, 162, 163, 3212, 165, 166, 3214, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 3173, 183, 187, 189, 193, 194, 195, 197, 198, 199, 200, 201, 202, 206, 209, 213, 215, 216, 217, 219, 220, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 234, 235, 2979, 237, 238, 239, 240, 3730, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 260, 262, 263, 264, 265, 266, 267, 270, 271, 272, 273, 275, 279, 280, 281, 282, 286, 287, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 300, 301, 3184, 305, 306, 307, 308, 309, 310, 311, 313, 314, 315, 317, 319, 333, 3778, 336, 3777, 3780, 340, 3790, 342, 343, 344, 345, 354, 3161, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 2982, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 2974, 2975, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 453, 454, 455, 3191, 457, 458, 459, 460, 461, 2964, 463, 464, 465, 3094, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 556, 557, 558, 559, 560, 561, 562, 563, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 592, 628, 629, 630, 3199, 3200, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 651, 652, 3843, 654, 656, 657, 659, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 680, 681, 682, 683, 684, 686, 687, 689, 690, 692, 693, 694, 695, 698, 704, 724, 728, 729, 730, 731, 732, 3775, 734, 735, 736, 737, 3198, 739, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, 752, 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 781, 782, 783, 784, 785, 786, 787, 788, 789, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, 800, 801, 802, 803, 3758, 805, 806, 807, 808, 809, 810, 811, 812, 813, 814, 815, 816, 817, 818, 819, 820, 821, 822, 823, 824, 825, 826, 827, 828, 829, 832, 833, 834, 835, 836, 837, 838, 839, 840, 841, 843, 844, 845, 847, 848, 3194, 850, 852, 853, 854, 857, 858, 859, 860, 861, 862, 863, 864, 865, 866, 867, 3768, 869, 870, 871, 872, 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, 883, 884, 885, 886, 887, 888, 889, 890, 891, 892, 893, 894, 895, 896, 897, 898, 899, 900, 901, 3845, 903, 904, 907, 908, 909, 910, 911, 912, 913, 914, 915, 916, 917, 918, 919, 920, 921, 922, 923, 924, 925, 926, 927, 928, 929, 930, 931, 932, 933, 934, 935, 936, 937, 938, 939, 940, 941, 942, 943, 944, 945, 946, 947, 948, 949, 950, 951, 952, 953, 954, 955, 956, 957, 958, 959, 960, 961, 962, 3164, 964, 965, 966, 967, 968, 969, 3793, 971, 3019, 3076, 974, 975, 976, 978, 979, 987, 988, 989, 991, 992, 993, 995, 996, 997, 998, 999, 1000, 1001, 1002, 1003, 1005, 1006, 1007, 1008, 1009, 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 1018, 3796, 1020, 1021, 1022, 1025, 1029, 1030, 1031, 2971, 3045, 1034, 1035, 1036, 1037, 1038, 1039, 1040, 1041, 1042, 1043, 1045, 1046, 1049, 1050, 1051, 1052, 1053, 1054, 1055, 1056, 1057, 1058, 1059, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 1074, 1082, 1083, 1086, 1087, 1088, 1090, 1091, 1092, 3810, 1094, 1095, 1098, 1099, 1100, 3193, 1102, 1103, 1104, 1105, 1106, 1107, 1108, 1110, 1111, 1112, 1113, 1114, 1115, 1116, 3795, 1120, 1123, 1124, 1125, 1127, 1128, 1129, 1130, 1131, 1132, 1133, 1134, 1135, 1136, 1137, 1138, 1139, 1140, 1141, 1142, 1143, 1144, 1145, 1146, 1150, 1151, 1152, 1153, 1154, 1155, 1158, 1162, 1163, 1165, 1170, 1171, 1172, 1173, 1176, 1178, 1180, 1181, 1182, 1184, 1185, 1186, 1187, 1188, 1189, 1190, 1191, 1192, 1193, 1194, 1195, 1197, 1198, 1199, 1200, 1201, 1202, 1203, 1206, 1207, 1208, 1209, 1210, 1211, 1212, 1213, 1214, 1215, 1216, 1217, 1218, 1220, 1222, 1223, 2973, 1225, 1226, 1227, 1228, 1229, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1240, 1241, 1244, 1245, 1246, 1247, 1248, 1250, 1253, 1254, 1255, 1256, 1257, 1258, 1260, 1261, 1262, 1263, 1264, 1265, 1266, 1267, 1269, 1270, 1271, 1272, 1273, 1274, 1275, 1277, 1278, 1279, 1280, 1281, 1288, 1289, 1290, 1291, 1294, 1296, 1297, 1298, 1299, 1301, 1305, 1306, 1308, 1309, 1310, 1311, 1315, 1316, 1318, 1319, 1320, 1322, 1323, 1324, 1325, 1326, 1327, 1328, 1329, 1330, 1335, 1338, 1339, 1340, 1341, 1344, 1347, 1348, 1356, 1357, 3508, 1361, 1362, 1363, 1364, 1365, 1366, 3575, 1373, 1375, 1380, 1384, 1385, 3049, 1387, 1388, 1389, 1390, 1391, 1392, 1393, 1394, 1395, 1396, 1397, 1398, 1399, 1400, 1401, 1402, 1403, 1404, 1405, 1406, 1407, 1408, 1409, 1410, 1411, 1412, 2976, 1417, 1418, 1419, 1420, 1421, 1422, 1423, 1424, 1425, 1426, 1427, 1428, 1429, 1430, 1431, 1432, 1433, 3093, 3586, 1436, 1438, 1439, 1440, 1441, 1442, 1443, 1444, 1445, 1446, 1447, 1448, 1449, 1450, 1451, 1452, 1453, 1454, 1455, 1456, 1457, 1458, 1459, 1460, 1461, 1462, 1463, 1464, 1465, 1466, 1467, 1468, 1469, 3588, 1473, 1474, 1475, 1477, 1478, 1479, 1480, 1481, 1482, 1483, 1484, 1485, 1486, 1487, 1488, 1489, 1490, 1493, 1494, 3733, 1496, 1497, 1498, 3745, 3751, 1501, 1502, 1503, 1504, 1505, 1507, 1508, 1509, 1510, 1511, 1512, 1513, 1514, 1515, 1516, 1523, 1525, 1526, 1527, 1528, 1529, 1530, 1531, 1532, 1533, 1534, 1535, 1536, 1537, 1538, 1539, 1540, 1541, 1542, 1543, 1544, 1545, 1546, 1547, 1548, 1549, 1550, 1551, 1552, 1553, 1554, 1555, 1556, 1557, 1558, 1559, 1560, 1561, 1562, 1563, 1564, 1565, 1566, 1567, 1568, 1569, 1570, 1571, 1573, 1574, 1575, 1576, 1578, 1579, 1580, 1581, 1582, 1585, 1586, 1587, 1588, 1589, 1590, 1591, 1592, 1594, 1595, 1596, 1597, 1598, 1599, 1600, 1601, 1602, 1603, 1604, 1605, 1606, 1607, 1608, 1609, 1610, 1611, 1612, 1613, 1614, 1615, 1616, 1617, 1618, 1619, 1620, 1621, 1622, 1623, 1624, 1625, 1627, 1628, 1629, 1630, 1631, 1632, 1633, 1634, 3052, 1636, 1637, 1638, 1639, 1640, 1641, 1642, 1643, 1644, 1645, 1646, 1647, 1648, 1650, 1651, 1652, 1653, 1654, 1655, 1656, 1661, 1662, 1663, 1664, 1665, 1666, 1667, 1668, 3462, 1670, 1671, 1672, 1673, 3463, 1675, 1676, 1677, 1678, 1679, 1680, 1681, 1682, 1683, 1684, 1685, 1686, 2985, 1692, 1694, 1696, 1698, 1702, 1706, 1712, 1714, 1715, 1716, 1718, 1719, 1720, 1721, 1722, 1723, 1725, 1727, 1728, 1729, 1730, 1731, 1733, 1734, 3757, 1736, 1737, 1738, 1739, 1740, 1741, 1742, 1744, 1745, 1747, 1748, 1749, 1750, 1751, 1752, 1753, 1754, 1755, 1756, 1757, 1758, 1759, 1760, 1761, 1762, 1765, 1766, 1767, 1768, 1769, 1770, 1771, 1772, 1773, 1774, 1775, 1776, 1777, 1778, 1779, 1780, 1781, 1782, 1783, 1784, 1785, 1786, 1787, 1788, 1789, 1790, 1791, 1792, 1793, 1794, 1795, 1796, 1797, 1798, 1799, 1800, 1801, 1802, 1803, 1804, 1805, 1806, 1807, 1808, 1809, 1810, 1811, 1812, 1813, 1814, 1815, 1816, 1817, 1818, 1819, 1820, 1821, 1822, 1823, 1824, 1826, 1827, 3028, 1836, 1838, 1842, 3010, 1844, 1845, 3011, 1847, 1848, 1852, 3075, 1854, 1855, 1856, 1857, 1858, 1859, 1860, 1861, 1862, 1864, 1869, 1871, 1872, 1873, 1874, 1875, 1876, 3090, 1878, 1879, 1882, 1883, 1893, 1894, 1898, 1899, 1900, 1901, 1902, 1903, 1904, 1905, 1907, 1908, 1909, 1910, 1911, 1912, 1913, 1914, 1915, 1916, 1917, 1918, 1919, 1920, 1921, 1922, 1927, 1928, 1929, 1930, 1931, 1932, 1933, 1934, 1935, 1936, 1937, 1938, 1939, 1940, 1942, 1943, 1945, 1946, 1956, 1958, 1959, 1962, 1963, 1966, 1967, 1968, 1970, 1971, 1972, 1973, 1974, 1975, 1976, 1977, 1978, 1979, 1980, 1981, 1982, 1983, 1984, 1985, 1986, 1988, 1994, 1995, 1996, 1997, 2001, 3151, 2007, 2008, 2010, 2011, 2012, 2013, 3803, 3804, 2022, 2024, 2025, 2026, 2028, 2029, 2030, 2031, 2032, 2033, 2034, 2035, 2036, 2039, 2040, 2042, 2043, 2046, 2047, 3136, 3137, 3138, 2055, 3364, 2057, 2059, 2060, 2061, 2062, 2063, 2064, 2065, 2066, 2067, 2068, 2069, 2070, 2071, 2074, 2075, 2076, 2077, 2078, 2079, 2083, 2084, 2085, 2086, 2087, 2088, 2089, 2090, 2091, 2092, 2093, 2094, 2095, 2096, 2097, 2098, 2099, 2100, 2102, 2103, 2104, 2105, 2106, 2107, 2108, 2109, 2110, 2112, 2118, 2119, 2120, 2121, 2122, 2123, 2124, 2125, 2127, 2128, 2129, 3078, 2133, 2134, 2135, 2137, 2139, 2140, 2141, 2142, 3001, 3126, 3127, 3128, 3129, 3130, 2149, 2150, 2151, 2153, 3003, 3004, 2994, 2993, 2159, 2995, 2161, 2999, 2163, 3362, 2168, 2172, 2174, 2175, 2176, 2177, 2178, 2179, 2180, 2181, 2182, 2183, 2184, 3029, 2188, 2189, 2190, 2191, 3062, 2193, 2194, 2195, 2196, 2197, 2198, 2199, 2200, 2201, 2204, 3375, 2206, 2207, 2208, 2209, 3044, 2211, 2212, 2213, 2214, 2992, 2216, 3107, 2219, 2223, 2224, 3652, 2226, 2227, 3739, 3740, 2231, 3189, 2234, 3728, 2237, 2238, 2239, 2240, 2241, 3788, 2243, 3159, 2245, 3158, 2247, 2249, 2251, 2252, 2253, 2257, 2260, 2262, 2264, 2265, 2266, 2267, 2268, 2269, 2270, 2271, 2272, 2273, 2274, 2275, 2276, 2277, 2279, 2280, 2281, 3746, 2283, 2284, 2286, 3036, 3034, 3038, 2292, 2294, 2295, 2301, 2302, 2303, 2304, 3074, 2309, 2310, 2312, 2317, 2318, 3018, 3587, 2981, 2980, 2983, 3103, 3106, 2331, 2332, 2334, 2335, 2337, 2338, 2339, 2340, 2341, 2342, 2343, 2344, 2345, 3807, 2349, 2350, 2351, 2352, 2353, 2354, 2355, 2356, 2357, 2358, 2359, 2360, 2361, 2362, 2363, 2368, 2370, 2371, 2372, 2376, 2377, 2380, 2381, 2388, 2389, 2390, 2391, 2392, 2393, 2394, 2395, 2396, 2397, 2398, 2399, 2400, 2402, 2403, 2404, 2405, 2406, 2407, 2429, 2430, 2433, 2434, 2435, 2436, 2437, 2438, 2439, 2449, 2453, 2454, 2455, 2456, 2457, 2458, 2459, 2460, 2461, 2463, 2464, 2465, 2466, 2468, 2469, 2470, 2472, 2475, 2476, 2477, 2480, 2481, 2482, 2483, 2484, 2485, 2486, 2487, 2493, 2494, 2495, 2496, 2497, 2498, 2499, 2500, 2501, 2502, 2503, 2504, 2505, 2506, 2507, 2508, 2509, 2510, 2511, 2512, 2513, 2514, 2515, 2517, 2518, 2519, 2520, 2521, 2522, 2523, 2524, 2525, 2526, 2527, 2528, 2529, 2530, 2531, 2532, 2533, 2534, 2535, 2536, 2537, 2538, 2540, 2541, 2542, 2543, 3140, 2545, 2547, 2548, 2550, 2551, 2552, 2553, 2554, 2555, 2556, 2559, 2560, 2561, 2562, 2565, 2566, 2567, 2568, 2569, 2570, 2571, 2572, 2573, 2581, 2582, 2583, 2584, 2587, 2588, 2589, 2590, 2591, 2592, 2593, 2594, 2595, 2597, 2598, 2599, 2600, 2601, 2602, 2603, 2604, 2605, 2608, 2610, 2611, 2614, 2615, 2616, 2617, 2618, 2619, 2620, 2621, 2622, 2624, 2625, 2627, 2628, 2629, 2630, 2631, 2632, 2633, 2634, 2635, 2636, 2637, 2639, 2641, 2644, 2646, 3736, 2651, 2652, 2653, 2654, 2655, 2656, 2657, 2661, 2662, 2664, 2665, 2666, 2667, 2668, 2669, 2670, 2672, 2673, 2674, 2679, 2680, 2681, 2683, 2684, 2685, 2686, 2688, 2689, 2690, 2691, 2692, 2693, 2694, 2695, 2696, 2697, 2698, 2699, 2700, 3709, 2702, 2703, 2705, 3706, 2707, 2708, 3710, 3707, 2720, 2724, 3717, 3213, 3718, 2728, 3719, 2730, 2732, 3721, 2734, 3722, 2736, 2738, 3726, 3704, 3697, 3705, 2757, 2758, 2760, 2761, 2771, 2772, 2774, 2775, 2776, 2777, 2778, 2779, 2780, 2781, 2782, 2786, 2789, 2792, 2794, 2796, 2802, 2803, 2804, 2805, 2806, 2807, 2808, 2809, 2810, 2811, 2812, 2813, 2814, 3384, 2816, 2817, 2818, 2819, 2820, 2822, 2824, 2825, 3416, 2831, 2832, 2833, 2834, 2835, 2836, 2837, 2838, 2839, 2840, 2841, 2842, 2844, 2845, 2846, 2847, 2850, 2851, 2853, 2854, 2855, 2856, 3008, 2858, 2860, 2861, 2863, 2864, 2865, 2866, 2867, 2869, 2870, 2874, 2877, 2878, 2879, 2881, 2882, 2883, 2885, 2886, 2887, 2888, 2890, 2891, 2894, 2897, 2898, 2899, 2900, 2901, 2903, 2905, 2906, 2908, 2909, 2910, 2911, 2912, 2913, 2914, 2915, 2917, 2918, 2919, 2920, 2921, 2922, 2923, 2924, 2925, 2926, 2927, 2928, 2929, 2930, 2931, 2932, 2933, 2934, 2935, 2936, 2942, 2943, 2944, 2946, 2947, 2948, 2952, 2953, 2954, 2955, 2956, 2960, 2961, 2965, 2966, 2967, 2968, 2969, 2970, 2972, 2977, 2978, 2984, 2989, 2991, 2996, 2997, 2998, 3000, 3002, 3005, 3006, 3007, 3009, 3013, 3020, 3021, 3022, 3023, 3024, 3025, 3026, 3027, 3030, 3031, 3032, 3033, 3037, 3039, 3040, 3041, 3042, 3046, 3047, 3051, 3053, 3054, 3055, 3057, 3058, 3059, 3060, 3061, 3064, 3065, 3066, 3067, 3068, 3069, 3070, 3071, 3072, 3079, 3080, 3081, 3082, 3087, 3088, 3089, 3091, 3095, 3096, 3097, 3098, 3099, 3102, 3104, 3105, 3108, 3109, 3110, 3111, 3112, 3113, 3114, 3115, 3116, 3118, 3120, 3121, 3122, 3123, 3124, 3125, 3131, 3132, 3133, 3134, 3135, 3139, 3141, 3142, 3143, 3144, 3145, 3146, 3147, 3149, 3150, 3153, 3155, 3156, 3157, 3160, 3165, 3166, 3167, 3169, 3172, 3174, 3175, 3177, 3178, 3179, 3181, 3182, 3183, 3185, 3186, 3187, 3188, 3192, 3197, 3202, 3203, 3204, 3205, 3206, 3207, 3208, 3210, 3215, 3216, 3217, 3218, 3219, 3220, 3221, 3222, 3223, 3224, 3225, 3226, 3227, 3230, 3231, 3234, 3235, 3236, 3237, 3238, 3239, 3240, 3241, 3244, 3245, 3246, 3247, 3248, 3249, 3250, 3251, 3252, 3253, 3254, 3257, 3258, 3260, 3261, 3262, 3263, 3264, 3265, 3266, 3267, 3268, 3269, 3270, 3271, 3272, 3273, 3274, 3275, 3276, 3277, 3278, 3279, 3280, 3281, 3282, 3283, 3284, 3285, 3286, 3289, 3290, 3291, 3292, 3293, 3294, 3295, 3296, 3297, 3298, 3300, 3301, 3302, 3303, 3304, 3305, 3306, 3307, 3308, 3309, 3310, 3311, 3312, 3313, 3314, 3315, 3316, 3317, 3318, 3319, 3320, 3321, 3322, 3323, 3324, 3325, 3326, 3327, 3328, 3329, 3330, 3331, 3332, 3335, 3336, 3337, 3338, 3339, 3340, 3341, 3342, 3343, 3344, 3345, 3346, 3347, 3348, 3349, 3350, 3351, 3352, 3353, 3354, 3355, 3356, 3358, 3359, 3363, 3365, 3366, 3367, 3369, 3370, 3371, 3374, 3376, 3377, 3378, 3379, 3380, 3383, 3385, 3388, 3390, 3391, 3396, 3397, 3398, 3399, 3402, 3409, 3410, 3411, 3412, 3413, 3414, 3417, 3418, 3419, 3420, 3423, 3424, 3425, 3426, 3427, 3428, 3429, 3430, 3431, 3432, 3434, 3435, 3436, 3437, 3438, 3439, 3441, 3442, 3444, 3445, 3446, 3447, 3448, 3454, 3455, 3456, 3457, 3458, 3459, 3460, 3461, 3464, 3467, 3470, 3471, 3472, 3473, 3474, 3475, 3476, 3477, 3478, 3479, 3480, 3481, 3482, 3483, 3484, 3485, 3486, 3487, 3488, 3490, 3491, 3492, 3493, 3494, 3495, 3496, 3498, 3499, 3500, 3501, 3502, 3503, 3504, 3505, 3507, 3512, 3518, 3520, 3521, 3522, 3523, 3524, 3525, 3526, 3527, 3528, 3529, 3530, 3531, 3532, 3533, 3534, 3536, 3537, 3538, 3539, 3540, 3541, 3545, 3546, 3550, 3551, 3557, 3558, 3559, 3560, 3561, 3562, 3563, 3564, 3565, 3567, 3568, 3569, 3570, 3573, 3574, 3576, 3577, 3589, 3590, 3591, 3592, 3593, 3594, 3595, 3596, 3597, 3598, 3599, 3600, 3601, 3602, 3603, 3604, 3605, 3606, 3608, 3609, 3610, 3614, 3615, 3616, 3617, 3623, 3624, 3625, 3626, 3630, 3632, 3633, 3634, 3636, 3639, 3640, 3644, 3651, 3653, 3656, 3658, 3659, 3660, 3661, 3662, 3663, 3665, 3666, 3667, 3668, 3669, 3670, 3671, 3672, 3673, 3674, 3675, 3676, 3677, 3678, 3679, 3680, 3681, 3682, 3683, 3684, 3685, 3686, 3687, 3688, 3689, 3690, 3691, 3692, 3693, 3694, 3695, 3696, 3714, 3729, 3732, 3734, 3735, 3737, 3741, 3743, 3747, 3756, 3759, 3760, 3761, 3762, 3763, 3764, 3766, 3772, 3773, 3776, 3779, 3781, 3782, 3783, 3784, 3785, 3786, 3789, 3792, 3794, 3798, 3799, 3800, 3801, 3802, 3805, 3806, 3808, 3809, 3811, 3812, 3813, 3814, 3815, 3816, 3817, 3818, 3820, 3821, 3822, 3823, 3824, 3825, 3826, 3827, 3828, 3829, 3830, 3831, 3832, 3833, 3834, 3835, 3836, 3837, 3840, 3842, 3844, 3853, 3854, 3856, 3857, 3866, 3872, 3878, 3887, 3889, 3890, 3891, 3892, 3895, 3896, 3898, 3904, 3908, 3912, 3917, 3918, 3920, 3921, 3922, 3924, 3925, 3926, 3931, 3932, 3933, 3934, 3935, 3936, 3937, 3938, 3939, 3942, 3943, 3944, 3989, 3990, 3995, 3997, 3998, 4000, 4006, 4009, 4024, 4025, 4026, 4027, 4028, 4029, 4031, 4032, 4034, 4035, 4037, 4039, 4040, 4053, 4056, 4057, 4059, 4060, 4064, 4069, 4072, 4073, 4075, 4076, 4082, 4084, 4085, 4088, 4090, 4095, 4096, 4097, 4102, 4113, 4136, 4152, 4160, 4169, 4170, 4174, 4179, 4195, 4196, 4197, 4198, 4200, 4202, 4203, 4205, 4208, 4212, 4215, 4218, 4219, 4220, 4221, 4225, 4226, 4227, 4228, 4231, 4232, 4233, 4234, 4235, 4236, 4237, 4238, 4239, 4240, 4241, 4242, 4243, 4244, 4245, 4246, 4247, 4248, 4249, 4250, 4251, 4252, 4253, 4254, 4262, 4265, 4266, 4272, 4277, 4278, 4279, 4280, 4284, 4288, 4290, 4291, 4292, 4293, 4294, 4295, 4296, 4297, 4299, 4300, 4301, 4302, 4304, 4305, 4306, 4307, 4308, 4309, 4310, 4320, 4329, 4330, 4331, 4332, 4333, 4334, 4335, 4336, 4337, 4338, 4340, 4341, 4345, 4346, 4348, 4349, 4350, 4351, 4355, 4356, 4357, 4358, 4359, 4360, 4362, 4363, 4364, 4370, 4371, 4372, 4373, 4374, 4375, 4379, 4383, 4384, 4386, 4387, 4388, 4389, 4390, 4392, 4402, 4404, 4409, 4410, 4411, 4412, 4413, 4414, 4415, 4416, 4417, 4418, 4419, 4420, 4421, 4422, 4423, 4424, 4426, 4427, 4428, 4429, 4430, 4431, 4432, 4437, 4440, 4441, 4442, 4443, 4444, 4445, 4446, 4447, 4448, 4449, 4450, 4451, 4452, 4453, 4454, 4455, 4456, 4457, 4458, 4459, 4460, 4462, 4463, 4464, 4466, 4467, 4468, 4469, 4472, 4473, 4474, 4476, 4477, 4478, 4480, 4481, 4482, 4483, 4484, 4485, 4487, 4489, 4492, 4493, 4494, 4495, 4497, 4498, 4499, 4500, 4501, 4502, 4503, 4504, 4505, 4506, 4507, 4511, 4513, 4514, 4515, 4516, 4517, 4521, 4522, 4526, 4527, 4528, 4530, 4532, 4533, 4534, 4535, 4536, 4537, 4538, 4540, 4541, 4542, 4543, 4544, 4545, 4546, 4553, 4554, 4555, 4556, 4557, 4558, 4559, 4560, 4561, 4562, 4563, 4564, 4570, 4571, 4573, 4574, 4575, 4576, 4577, 4578, 4579, 4580, 4581, 4582, 4583, 4584, 4585, 4586, 4587, 4588, 4592, 4593, 4594, 4595, 4596, 4597, 4598, 4599, 4600, 4605, 4606, 4609, 4610, 4611, 4612, 4613, 4614, 4615, 4616, 4617, 4618, 4619, 4620, 4621, 4622, 4624, 4625, 4626, 4627, 4636, 4637, 4638, 4639, 4640, 4641, 4643, 4646, 4647, 4648, 4650, 4651, 4652, 4653, 4654, 4655, 4656, 4657, 4658, 4659, 4660, 4661, 4662, 4663, 4664, 4665, 4666, 4667, 4668, 4669, 4670, 4671, 4672, 4673, 4674, 4675, 4676, 4677, 4678, 4679, 4680, 4681, 4682, 4683, 4684, 4685, 4686, 4687, 4688, 4689, 4690, 4691, 4692, 4693, 4694, 4695, 4696, 4697, 4698, 4699, 4700, 4701, 4702, 4703, 4704, 4705, 4706, 4707, 4708, 4709, 4710, 4711, 4712, 4713, 4714, 4715, 4716, 4717, 4718, 4719, 4720, 4721, 4722, 4723, 4724, 4725, 4726, 4727, 4728, 4729, 4730, 4731, 4732, 4733, 4734, 4735, 4736, 4737, 4738, 4739, 4740, 4741, 4742, 4743, 4744, 4745, 4746, 4747, 4748, 4749, 4750, 4751, 4756, 4757, 4758, 4764, 4777, 4781, 4782, 4783, 4784, 4785, 4786, 4787, 4788, 4789, 4790, 4791, 4792, 4793, 4794, 4795, 4796, 4798, 4799, 4800, 4801, 4802, 4804, 4805, 4806, 4807, 4808, 4809, 4810, 4813, 4814, 4816, 4817, 4818, 4821, 4822, 4823, 4824, 4825, 4826, 4827, 4828, 4829, 4830, 4831, 4832, 4833, 4834, 4835, 4836, 4837, 4838, 4839, 4840, 4841, 4842, 4843, 4844, 4845, 4846, 4847, 4849, 4850, 4851, 4852, 4853, 4854, 4855, 4856, 4857, 4858, 4859, 4860, 4861, 4862, 4863, 4864, 4865, 4866, 4867, 4868, 4869, 4870, 4871, 4872, 4873, 4874, 4875, 4876, 4877, 4878, 4879, 4880, 4882, 4883, 4884, 4886, 4888, 4890, 4891, 4892, 4893, 4896, 4898, 4899, 4900, 4901, 4903, 4904, 4905, 4906, 4907, 4908, 4909, 4910, 4913, 4917, 4918, 4922, 4923, 4924, 4925, 4926, 4928, 4929) } + internal val templates: IntArray by lazy { intArrayOf(2369, 2848, 2660, 2659, 2658, 2880, 2902, 3382, 2623, 418, 2793, 2791, 2687, 2378, 2384, 2795, 2892, 2607, 2606, 285, 2336, 2797, 2904, 3232, 4184, 2546, 4927, 2596, 2050, 2374, 3716, 2115, 2723, 2379, 3233, 1336, 4204, 4224, 3715, 2564, 2721, 1867, 4199, 2126, 2167, 2173, 4566, 283, 2116, 4508, 3394, 3415, 2073, 2347, 3712, 452, 2755, 2787, 2788, 3395, 3711, 2756, 3643, 609, 1711, 3720, 1868, 2731, 3723, 2737, 3386, 616, 617, 2773, 3084, 3698, 1659, 2790, 3642, 303, 614, 69, 711, 621, 2346, 4222, 1121, 2488, 3465, 3838, 1242, 2202, 2575, 3387, 2165, 3727, 714, 1763, 1964, 2743, 2752, 2963, 4229, 3389, 3401, 136, 594, 596, 2563, 2718, 1865, 4217, 3035, 610, 2289, 2586, 3875, 1302, 4216, 3511, 3648, 3649, 158, 2080, 2082, 2117, 2843, 4365, 2171, 2373, 2516, 3637, 214, 284, 1276, 2014, 4797, 3506, 3515, 3516, 67, 83, 218, 619, 4602, 3535, 1360, 4311, 3360, 3725, 726, 1023, 1372, 2387, 2479, 2741, 4367, 89, 2386, 2401, 2916, 624, 1657, 1954, 2830, 4496, 3408, 1577, 2101, 2293, 2577, 4548, 3403, 3469, 3519, 650, 1888, 3930, 3168, 3510, 3556, 3620, 3839, 1317, 1866, 2045, 2425, 2712, 3858, 4567, 3422, 3468, 1841, 1863, 3357, 593, 1292, 1346, 1371, 1953, 3497, 3699, 221, 1701, 2744, 2941, 3086, 3154, 3443, 258, 591, 1026, 1379, 1965, 1989, 4137, 3440, 3566, 655, 1342, 1717, 2051, 3162, 3361, 3622, 3641, 710, 1283, 1370, 1382, 1658, 1732, 1895, 2375, 2478, 2576, 3945, 4223, 4433, 3421, 3489, 3635, 649, 699, 1044, 2612, 3180, 3299, 3702, 108, 184, 606, 721, 1081, 1969, 2049, 2111, 2169, 2411, 2492, 2748, 2784, 2828, 3950, 4479, 4820, 3381, 3452, 3613, 160, 623, 701, 1332, 1333, 1345, 1520, 1660, 2166, 2170, 2263, 2410, 2638, 4192, 4509, 3117, 3209, 3256, 3334, 3548, 3703, 3713, 703, 1183, 1572, 1897, 2258, 2261, 2491, 2749, 2769, 2770, 2938, 2939, 3960, 3980, 4213, 4470, 4803, 4819, 3621, 3638, 3744, 1378, 1492, 1584, 1703, 1955, 2431, 2443, 2768, 4156, 4214, 4510, 4601, 3083, 3085, 3100, 3618, 3631, 3797, 723, 1024, 1832, 2138, 2203, 2421, 2764, 2765, 3965, 4211, 4287, 4298, 3287, 3407, 91, 93, 595, 715, 1027, 1350, 1355, 2020, 2333, 2426, 2711, 2763, 2767, 3927, 4549, 4881, 3014, 3015, 3517, 3581, 3724, 94, 1251, 1259, 1353, 1377, 1519, 1583, 1880, 2186, 2218, 2471, 2489, 2739, 3867, 3868, 4210, 4376, 4439, 4885, 3333, 3372, 3373, 3451, 3607, 299, 599, 618, 700, 1109, 1117, 1175, 1367, 1518, 1626, 1948, 2130, 2136, 2154, 2221, 2441, 2446, 2448, 2671, 2704, 2762, 2940, 2957, 2958, 4181, 4207, 4324, 3016, 3170, 3547, 3580, 3749, 211, 585, 590, 605, 717, 720, 906, 990, 1084, 1159, 1334, 1470, 1524, 1705, 1886, 1906, 1926, 1961, 1991, 2072, 2316, 2424, 2490, 2945, 3894, 3946, 4164, 4550, 4568, 4569, 4768, 3077, 3433, 3628, 3629, 92, 96, 269, 603, 648, 712, 980, 1331, 1707, 1887, 1944, 2114, 2419, 2445, 2447, 2450, 2539, 2677, 2713, 2895, 2907, 4255, 4552, 4780, 2990, 3255, 3288, 3368, 3466, 3585, 3619, 208, 277, 316, 329, 330, 1287, 1352, 1376, 1521, 1522, 1949, 2019, 2044, 2113, 2220, 2248, 2299, 2413, 2428, 2440, 2714, 2717, 2798, 2799, 3865, 4565, 4763, 3012, 3400, 3404, 3453, 3509, 3664, 3701, 3754, 6, 244, 304, 600, 604, 1047, 1221, 1286, 1354, 1359, 1708, 1709, 1884, 1957, 1960, 2018, 2021, 2152, 2187, 2235, 2412, 2420, 2640, 2746, 2785, 2862, 3862, 3863, 3923, 4180, 4766, 4778, 4779, 3450, 3572, 3579, 3584, 3646, 3654, 268, 318, 322, 331, 583, 707, 722, 1076, 1160, 1164, 1284, 1285, 1312, 1517, 1710, 1828, 1889, 2009, 2222, 2228, 2383, 2409, 2415, 2442, 2574, 2675, 3928, 4153, 4206, 4269, 4368, 4438, 4649, 4767, 3063, 3148, 3513, 3514, 3612, 3645, 65, 210, 274, 587, 608, 613, 708, 713, 984, 1075, 1167, 1369, 1713, 1743, 1829, 1834, 1849, 1885, 2048, 2081, 2278, 2296, 2305, 2408, 2462, 2474, 2766, 4191, 3043, 3393, 3578, 3647, 3655, 3700, 90, 207, 288, 320, 323, 324, 349, 597, 607, 709, 855, 905, 1166, 1169, 1252, 1437, 1890, 2005, 2015, 2414, 2423, 2467, 2745, 2783, 2937, 2951, 3900, 4811, 4812, 4815, 4911, 3017, 3048, 3101, 3171, 3229, 3242, 3243, 3406, 3554, 3555, 3627, 3650, 3657, 3708, 110, 186, 190, 191, 212, 321, 327, 328, 352, 375, 580, 582, 589, 625, 727, 851, 977, 1077, 1118, 1147, 1243, 1304, 1314, 1746, 1830, 1831, 1839, 1950, 1951, 1952, 2041, 2254, 2256, 2285, 2297, 2298, 2320, 2382, 2416, 2417, 2473, 2579, 2580, 2663, 2678, 2710, 2715, 2716, 2753, 2800, 2801, 3846, 3864, 3910, 3964, 4209, 4303, 4321, 4339, 4366, 4436, 4471, 4523, 4547, 4608, 4848, 3050, 3152, 3176, 3190, 3211, 3392, 3405, 3549, 3553, 3583, 3611, 3742, 3752, 3753, 3765, 3767, 3774, 5, 8, 82, 185, 188, 192, 257, 276, 325, 326, 348, 351, 356, 598, 620, 658, 696, 705, 856, 985, 1048, 1122, 1148, 1149, 1168, 1179, 1239, 1383, 1491, 1649, 1693, 1704, 1850, 1881, 1947, 1993, 2006, 2027, 2250, 2255, 2308, 2314, 2315, 2322, 2427, 2613, 2649, 2823, 3911, 3919, 3949, 3966, 4133, 4168, 4182, 4230, 4270, 4322, 4361, 4524, 4551, 3073, 3119, 3195, 3196, 3201, 3259, 3543, 154, 259, 261, 347, 350, 353, 579, 602, 612, 702, 706, 982, 1078, 1381, 1593, 1833, 1925, 1987, 1990, 2306, 2319, 2385, 2432, 2578, 2626, 2868, 3869, 3916, 3982, 4149, 4520, 4607, 3449, 3542, 3544, 3552, 3571, 3582, 3750, 3771, 3791, 95, 196, 203, 204, 205, 242, 243, 346, 581, 586, 601, 615, 622, 626, 627, 691, 716, 725, 983, 986, 1085, 1089, 1161, 1174, 1204, 1349, 1471, 1506, 1688, 1689, 1691, 1726, 1851, 1891, 2233, 2311, 2321, 2422, 2444, 2452, 2959, 4135, 4165, 4166, 4256, 4281, 4319, 4434, 4490, 4531, 4887, 4912) } + internal val argNames: Map> by lazy { mapOf(5 to arrayOf("n"), 6 to arrayOf("n"), 7 to arrayOf("who"), 8 to arrayOf("title"), 65 to arrayOf("state"), 67 to arrayOf("listen"), 69 to arrayOf("listen"), 82 to arrayOf("version"), 83 to arrayOf("count", "plural"), 89 to arrayOf("size", "limit"), 90 to arrayOf("name"), 91 to arrayOf("dir"), 92 to arrayOf("dir"), 93 to arrayOf("name"), 94 to arrayOf("name"), 95 to arrayOf("path"), 96 to arrayOf("path"), 97 to arrayOf("name"), 108 to arrayOf("first"), 110 to arrayOf("n"), 136 to arrayOf("count", "plural"), 154 to arrayOf("tool"), 158 to arrayOf("n"), 160 to arrayOf("name"), 184 to arrayOf("pid", "cmd"), 185 to arrayOf("title", "ago"), 186 to arrayOf("name", "who", "n"), 188 to arrayOf("line"), 190 to arrayOf("n"), 191 to arrayOf("n"), 192 to arrayOf("n"), 196 to arrayOf("name"), 203 to arrayOf("when"), 204 to arrayOf("text", "when"), 205 to arrayOf("when"), 207 to arrayOf("count", "plural"), 208 to arrayOf("count", "plural"), 210 to arrayOf("took", "ago"), 211 to arrayOf("ago"), 212 to arrayOf("kind"), 214 to arrayOf("kind", "code", "why"), 218 to arrayOf("clock"), 221 to arrayOf("build"), 242 to arrayOf("step"), 243 to arrayOf("turn"), 244 to arrayOf("branch"), 257 to arrayOf("step", "total"), 258 to arrayOf("step", "total"), 259 to arrayOf("when"), 261 to arrayOf("tool"), 268 to arrayOf("count", "plural"), 269 to arrayOf("count", "total"), 274 to arrayOf("old", "new"), 276 to arrayOf("version"), 277 to arrayOf("count"), 278 to arrayOf("tag"), 283 to arrayOf("version"), 284 to arrayOf("old", "version"), 285 to arrayOf("version"), 288 to arrayOf("version"), 299 to arrayOf("project", "location"), 303 to arrayOf("account"), 304 to arrayOf("account"), 316 to arrayOf("n"), 318 to arrayOf("n"), 320 to arrayOf("minute"), 321 to arrayOf("time"), 322 to arrayOf("time"), 323 to arrayOf("clock"), 324 to arrayOf("clock", "took"), 325 to arrayOf("clock"), 326 to arrayOf("clock", "took"), 327 to arrayOf("clock"), 328 to arrayOf("clock", "took"), 329 to arrayOf("clock"), 330 to arrayOf("clock", "took"), 331 to arrayOf("clock"), 346 to arrayOf("target"), 347 to arrayOf("target"), 348 to arrayOf("target"), 349 to arrayOf("target"), 350 to arrayOf("target"), 351 to arrayOf("target"), 352 to arrayOf("target"), 353 to arrayOf("target"), 356 to arrayOf("name"), 375 to arrayOf("t"), 418 to arrayOf("minutes", "plural"), 452 to arrayOf("path"), 579 to arrayOf("count"), 580 to arrayOf("count"), 581 to arrayOf("title"), 582 to arrayOf("path"), 583 to arrayOf("path", "error"), 584 to arrayOf("first", "last", "count"), 585 to arrayOf("task", "step"), 586 to arrayOf("count"), 587 to arrayOf("path"), 588 to arrayOf("count", "plural"), 589 to arrayOf("label"), 590 to arrayOf("provider"), 591 to arrayOf("version"), 593 to arrayOf("key"), 594 to arrayOf("device"), 595 to arrayOf("kind", "device"), 596 to arrayOf("status"), 597 to arrayOf("kind", "title"), 598 to arrayOf("layer"), 599 to arrayOf("error"), 600 to arrayOf("page"), 601 to arrayOf("page", "kind", "total"), 602 to arrayOf("reason"), 603 to arrayOf("tag"), 604 to arrayOf("tag"), 605 to arrayOf("title"), 606 to arrayOf("title"), 607 to arrayOf("text", "time"), 608 to arrayOf("kind", "device"), 609 to arrayOf("device"), 610 to arrayOf("device"), 611 to arrayOf("word"), 612 to arrayOf("word", "kind", "count"), 613 to arrayOf("error"), 614 to arrayOf("count"), 615 to arrayOf("time", "relative", "rel", "zoned", "zone"), 616 to arrayOf("zone"), 617 to arrayOf("zone"), 618 to arrayOf("id", "state", "count", "age"), 619 to arrayOf("id"), 620 to arrayOf("name"), 621 to arrayOf("name"), 622 to arrayOf("clock", "count", "plural"), 623 to arrayOf("name"), 624 to arrayOf("name"), 625 to arrayOf("name"), 626 to arrayOf("count"), 627 to arrayOf("count"), 631 to arrayOf("name", "state"), 632 to arrayOf("author", "place", "state"), 633 to arrayOf("title", "state"), 648 to arrayOf("error"), 649 to arrayOf("error"), 650 to arrayOf("host"), 655 to arrayOf("email"), 658 to arrayOf("version"), 660 to arrayOf("first", "last", "count"), 661 to arrayOf("n"), 662 to arrayOf("n"), 691 to arrayOf("ref"), 696 to arrayOf("name"), 697 to arrayOf("name"), 699 to arrayOf("name"), 700 to arrayOf("name"), 701 to arrayOf("action"), 702 to arrayOf("label"), 703 to arrayOf("count", "plural"), 705 to arrayOf("path"), 706 to arrayOf("word", "kind", "count"), 707 to arrayOf("name"), 708 to arrayOf("name"), 709 to arrayOf("name"), 710 to arrayOf("name"), 711 to arrayOf("url"), 712 to arrayOf("count"), 713 to arrayOf("count"), 714 to arrayOf("device"), 715 to arrayOf("device"), 716 to arrayOf("count"), 717 to arrayOf("label"), 718 to arrayOf("label"), 719 to arrayOf("label"), 720 to arrayOf("title"), 721 to arrayOf("title"), 722 to arrayOf("state"), 723 to arrayOf("open", "kind"), 725 to arrayOf("count"), 726 to arrayOf("email"), 727 to arrayOf("email"), 851 to arrayOf("at", "count"), 855 to arrayOf("name"), 856 to arrayOf("name"), 905 to arrayOf("name"), 906 to arrayOf("name"), 977 to arrayOf("count"), 980 to arrayOf("name"), 981 to arrayOf("name", "count"), 982 to arrayOf("label", "n"), 983 to arrayOf("action"), 984 to arrayOf("count", "plural"), 985 to arrayOf("count"), 986 to arrayOf("waiting", "busy", "done"), 990 to arrayOf("count", "plural"), 1023 to arrayOf("name"), 1024 to arrayOf("name"), 1026 to arrayOf("seconds", "long"), 1027 to arrayOf("size", "triangles", "delayed", "waited", "built"), 1028 to arrayOf("size", "delayed", "waited"), 1044 to arrayOf("name"), 1047 to arrayOf("name"), 1048 to arrayOf("count"), 1075 to arrayOf("state"), 1076 to arrayOf("bytes"), 1077 to arrayOf("count"), 1078 to arrayOf("when"), 1079 to arrayOf("state", "name"), 1080 to arrayOf("name", "state"), 1081 to arrayOf("reason", "code"), 1084 to arrayOf("kind", "code"), 1085 to arrayOf("number"), 1089 to arrayOf("x", "y"), 1096 to arrayOf("state"), 1097 to arrayOf("label", "example"), 1109 to arrayOf("text"), 1117 to arrayOf("error"), 1118 to arrayOf("kind", "count"), 1121 to arrayOf("name"), 1122 to arrayOf("n"), 1147 to arrayOf("ago"), 1148 to arrayOf("name"), 1149 to arrayOf("kind", "place", "hub"), 1159 to arrayOf("label"), 1160 to arrayOf("word"), 1161 to arrayOf("count"), 1164 to arrayOf("hub"), 1166 to arrayOf("count"), 1167 to arrayOf("state"), 1168 to arrayOf("label"), 1169 to arrayOf("label"), 1174 to arrayOf("state", "text"), 1175 to arrayOf("text"), 1177 to arrayOf("question"), 1179 to arrayOf("label"), 1183 to arrayOf("title"), 1204 to arrayOf("count"), 1205 to arrayOf("name", "counts"), 1219 to arrayOf("n"), 1221 to arrayOf("mode"), 1238 to arrayOf("first", "last", "total"), 1239 to arrayOf("count"), 1242 to arrayOf("n"), 1243 to arrayOf("who", "name"), 1251 to arrayOf("name"), 1252 to arrayOf("when"), 1259 to arrayOf("why"), 1276 to arrayOf("name"), 1283 to arrayOf("kind"), 1284 to arrayOf("title"), 1285 to arrayOf("title"), 1286 to arrayOf("title"), 1287 to arrayOf("title"), 1292 to arrayOf("name"), 1302 to arrayOf("heard"), 1303 to arrayOf("out", "heard"), 1304 to arrayOf("heard"), 1312 to arrayOf("name", "mb"), 1314 to arrayOf("name"), 1317 to arrayOf("platform"), 1321 to arrayOf("heard", "out", "yes"), 1331 to arrayOf("name", "done", "total", "percent"), 1332 to arrayOf("name", "done"), 1333 to arrayOf("name"), 1334 to arrayOf("error"), 1336 to arrayOf("mb"), 1342 to arrayOf("mb"), 1345 to arrayOf("n"), 1346 to arrayOf("n"), 1349 to arrayOf("n"), 1350 to arrayOf("pct"), 1351 to arrayOf("px"), 1352 to arrayOf("version"), 1353 to arrayOf("tag"), 1354 to arrayOf("tag"), 1355 to arrayOf("hub"), 1359 to arrayOf("tag"), 1360 to arrayOf("tag"), 1367 to arrayOf("when"), 1369 to arrayOf("tag"), 1370 to arrayOf("tag", "when"), 1371 to arrayOf("tag"), 1372 to arrayOf("tag", "when"), 1376 to arrayOf("channel"), 1377 to arrayOf("tag"), 1378 to arrayOf("app", "hub"), 1379 to arrayOf("hub", "app"), 1381 to arrayOf("key"), 1382 to arrayOf("key"), 1383 to arrayOf("why"), 1437 to arrayOf("n"), 1470 to arrayOf("title"), 1471 to arrayOf("note"), 1491 to arrayOf("title"), 1492 to arrayOf("more"), 1506 to arrayOf("bots"), 1517 to arrayOf("name"), 1518 to arrayOf("name", "time"), 1519 to arrayOf("name", "n"), 1520 to arrayOf("name", "time", "n"), 1521 to arrayOf("to"), 1522 to arrayOf("to", "step"), 1524 to arrayOf("note"), 1572 to arrayOf("why"), 1577 to arrayOf("e"), 1583 to arrayOf("max"), 1584 to arrayOf("secs", "max", "mib"), 1593 to arrayOf("path"), 1626 to arrayOf("secs"), 1649 to arrayOf("pct", "scope"), 1657 to arrayOf("n"), 1658 to arrayOf("n"), 1659 to arrayOf("n"), 1660 to arrayOf("n"), 1688 to arrayOf("d", "h"), 1689 to arrayOf("h", "m"), 1690 to arrayOf("m"), 1691 to arrayOf("window", "pct"), 1693 to arrayOf("when"), 1695 to arrayOf("label", "e"), 1697 to arrayOf("from", "to", "total"), 1701 to arrayOf("messages", "lines", "left"), 1703 to arrayOf("pct", "view", "max"), 1704 to arrayOf("pct"), 1705 to arrayOf("done", "total"), 1707 to arrayOf("n"), 1708 to arrayOf("n"), 1709 to arrayOf("time"), 1710 to arrayOf("view", "max"), 1711 to arrayOf("view", "max"), 1713 to arrayOf("more"), 1717 to arrayOf("n"), 1726 to arrayOf("n"), 1732 to arrayOf("page"), 1743 to arrayOf("title"), 1746 to arrayOf("n"), 1763 to arrayOf("name"), 1828 to arrayOf("line"), 1829 to arrayOf("quote"), 1830 to arrayOf("n"), 1831 to arrayOf("n"), 1832 to arrayOf("n"), 1833 to arrayOf("n"), 1834 to arrayOf("n"), 1839 to arrayOf("held"), 1840 to arrayOf("machine"), 1841 to arrayOf("machine"), 1849 to arrayOf("count", "total"), 1850 to arrayOf("count"), 1851 to arrayOf("n"), 1863 to arrayOf("name"), 1865 to arrayOf("n", "c", "total"), 1866 to arrayOf("n", "c"), 1867 to arrayOf("n", "c", "total", "before"), 1868 to arrayOf("n", "c", "before"), 1880 to arrayOf("name"), 1881 to arrayOf("path"), 1884 to arrayOf("file"), 1885 to arrayOf("path", "n"), 1886 to arrayOf("why"), 1887 to arrayOf("n"), 1888 to arrayOf("name"), 1889 to arrayOf("name"), 1890 to arrayOf("name"), 1891 to arrayOf("n"), 1892 to arrayOf("shown", "n"), 1895 to arrayOf("path"), 1897 to arrayOf("n"), 1906 to arrayOf("status"), 1923 to arrayOf("name", "pct"), 1924 to arrayOf("name", "mb"), 1925 to arrayOf("name"), 1926 to arrayOf("name", "why"), 1944 to arrayOf("machine"), 1947 to arrayOf("n"), 1948 to arrayOf("ref"), 1949 to arrayOf("ref", "sheet"), 1950 to arrayOf("name"), 1951 to arrayOf("name"), 1952 to arrayOf("file", "folder"), 1953 to arrayOf("name", "error"), 1954 to arrayOf("name", "status"), 1955 to arrayOf("name", "error"), 1957 to arrayOf("name"), 1960 to arrayOf("code"), 1961 to arrayOf("error"), 1964 to arrayOf("error"), 1965 to arrayOf("error"), 1969 to arrayOf("error"), 1987 to arrayOf("done", "of"), 1989 to arrayOf("why"), 1990 to arrayOf("path"), 1991 to arrayOf("error"), 1992 to arrayOf("secs"), 1993 to arrayOf("secs"), 2005 to arrayOf("code"), 2006 to arrayOf("code"), 2009 to arrayOf("state"), 2014 to arrayOf("hide", "copy", "paste"), 2015 to arrayOf("n"), 2018 to arrayOf("name"), 2019 to arrayOf("name", "folder"), 2020 to arrayOf("name"), 2021 to arrayOf("name", "percent"), 2027 to arrayOf("folder"), 2037 to arrayOf("w", "h"), 2041 to arrayOf("path"), 2044 to arrayOf("why"), 2045 to arrayOf("mb"), 2048 to arrayOf("n"), 2049 to arrayOf("delete", "undo"), 2050 to arrayOf("delete", "undo"), 2051 to arrayOf("undo"), 2072 to arrayOf("what", "secs"), 2073 to arrayOf("file", "holder"), 2080 to arrayOf("what"), 2081 to arrayOf("what"), 2082 to arrayOf("editor", "why"), 2101 to arrayOf("files"), 2111 to arrayOf("why"), 2113 to arrayOf("title"), 2114 to arrayOf("title"), 2115 to arrayOf("version"), 2116 to arrayOf("version", "size", "folder"), 2117 to arrayOf("version", "size", "folder"), 2126 to arrayOf("title"), 2130 to arrayOf("dir", "files"), 2136 to arrayOf("why"), 2138 to arrayOf("code"), 2152 to arrayOf("origin"), 2154 to arrayOf("why"), 2165 to arrayOf("dir"), 2166 to arrayOf("path"), 2167 to arrayOf("home", "other"), 2169 to arrayOf("path"), 2170 to arrayOf("code", "log"), 2171 to arrayOf("log"), 2173 to arrayOf("addr"), 2186 to arrayOf("home"), 2187 to arrayOf("addr"), 2202 to arrayOf("dir", "why"), 2203 to arrayOf("dir"), 2218 to arrayOf("phase"), 2220 to arrayOf("why"), 2221 to arrayOf("what"), 2222 to arrayOf("code"), 2228 to arrayOf("label"), 2233 to arrayOf("kind"), 2235 to arrayOf("project"), 2248 to arrayOf("what"), 2250 to arrayOf("when"), 2254 to arrayOf("n"), 2255 to arrayOf("n"), 2256 to arrayOf("n"), 2258 to arrayOf("agent"), 2259 to arrayOf("effort"), 2261 to arrayOf("n"), 2263 to arrayOf("model"), 2278 to arrayOf("word"), 2285 to arrayOf("more", "step"), 2289 to arrayOf("name"), 2293 to arrayOf("max", "skipped"), 2296 to arrayOf("name"), 2297 to arrayOf("n"), 2298 to arrayOf("name"), 2299 to arrayOf("name"), 2305 to arrayOf("n"), 2306 to arrayOf("name"), 2308 to arrayOf("price"), 2311 to arrayOf("name"), 2313 to arrayOf("name"), 2314 to arrayOf("name"), 2315 to arrayOf("name"), 2316 to arrayOf("text"), 2319 to arrayOf("key"), 2320 to arrayOf("key"), 2321 to arrayOf("pct"), 2322 to arrayOf("when"), 2333 to arrayOf("n", "upstream"), 2336 to arrayOf("mb"), 2346 to arrayOf("path"), 2347 to arrayOf("path"), 2369 to arrayOf("id"), 2373 to arrayOf("model"), 2374 to arrayOf("platform"), 2375 to arrayOf("version"), 2378 to arrayOf("version", "from", "into"), 2379 to arrayOf("version", "from"), 2382 to arrayOf("version", "path"), 2383 to arrayOf("version", "path"), 2384 to arrayOf("version", "pin", "from"), 2385 to arrayOf("path"), 2386 to arrayOf("version", "path"), 2387 to arrayOf("version", "path", "set"), 2401 to arrayOf("turns", "input", "cread", "cwrite", "output", "cost"), 2408 to arrayOf("tool"), 2409 to arrayOf("tool"), 2410 to arrayOf("tool", "word"), 2411 to arrayOf("tool", "word"), 2412 to arrayOf("tool"), 2413 to arrayOf("tool"), 2414 to arrayOf("due"), 2415 to arrayOf("due"), 2416 to arrayOf("due"), 2417 to arrayOf("due"), 2418 to arrayOf("zone"), 2419 to arrayOf("zone"), 2420 to arrayOf("zone"), 2421 to arrayOf("zone"), 2422 to arrayOf("n"), 2423 to arrayOf("who"), 2424 to arrayOf("n", "who"), 2425 to arrayOf("harness"), 2426 to arrayOf("path"), 2427 to arrayOf("path"), 2428 to arrayOf("path"), 2431 to arrayOf("error", "line"), 2432 to arrayOf("label"), 2440 to arrayOf("who"), 2441 to arrayOf("who"), 2442 to arrayOf("label", "left", "when"), 2443 to arrayOf("left"), 2444 to arrayOf("name", "left"), 2445 to arrayOf("used"), 2446 to arrayOf("used", "limit"), 2447 to arrayOf("used", "reason"), 2448 to arrayOf("used", "limit", "reason"), 2450 to arrayOf("provider"), 2451 to arrayOf("used", "window", "pct"), 2452 to arrayOf("rate"), 2462 to arrayOf("n", "r"), 2467 to arrayOf("time", "n"), 2471 to arrayOf("n", "m"), 2473 to arrayOf("pct"), 2474 to arrayOf("cost", "n"), 2478 to arrayOf("in", "out", "cread", "cwrite"), 2479 to arrayOf("in", "out", "cread", "cwrite", "n"), 2488 to arrayOf("turns", "input", "cread", "cwrite", "output"), 2489 to arrayOf("left", "when"), 2490 to arrayOf("left", "when"), 2491 to arrayOf("left", "when"), 2492 to arrayOf("left", "when"), 2516 to arrayOf("n"), 2539 to arrayOf("when"), 2546 to arrayOf("phrase", "now"), 2557 to arrayOf("s"), 2563 to arrayOf("now"), 2564 to arrayOf("now", "nudge", "sent", "undone"), 2574 to arrayOf("e"), 2575 to arrayOf("a", "ams", "b", "bms"), 2576 to arrayOf("ms"), 2577 to arrayOf("e"), 2578 to arrayOf("t"), 2579 to arrayOf("t"), 2580 to arrayOf("t"), 2586 to arrayOf("why"), 2596 to arrayOf("apps"), 2606 to arrayOf("n"), 2607 to arrayOf("n", "k"), 2612 to arrayOf("stt", "conf"), 2613 to arrayOf("words"), 2623 to arrayOf("into"), 2626 to arrayOf("origin"), 2638 to arrayOf("url"), 2640 to arrayOf("url"), 2648 to arrayOf("i", "n"), 2649 to arrayOf("d", "n"), 2658 to arrayOf("version"), 2659 to arrayOf("version"), 2660 to arrayOf("version"), 2663 to arrayOf("path"), 2671 to arrayOf("addr"), 2675 to arrayOf("label"), 2677 to arrayOf("label"), 2678 to arrayOf("label"), 2682 to arrayOf("label"), 2687 to arrayOf("from"), 2704 to arrayOf("done", "of"), 2710 to arrayOf("n"), 2711 to arrayOf("t", "m"), 2712 to arrayOf("m"), 2713 to arrayOf("b", "m"), 2714 to arrayOf("r", "p"), 2715 to arrayOf("n"), 2716 to arrayOf("n"), 2717 to arrayOf("n"), 2718 to arrayOf("n"), 2721 to arrayOf("n"), 2723 to arrayOf("n"), 2731 to arrayOf("n"), 2737 to arrayOf("name", "gb", "path"), 2739 to arrayOf("path", "why"), 2741 to arrayOf("names"), 2743 to arrayOf("why"), 2744 to arrayOf("p", "pn", "t", "tn", "e", "en"), 2745 to arrayOf("done", "total"), 2746 to arrayOf("n"), 2747 to arrayOf("what"), 2748 to arrayOf("n"), 2749 to arrayOf("n"), 2752 to arrayOf("what"), 2753 to arrayOf("n"), 2755 to arrayOf("why", "from"), 2756 to arrayOf("why"), 2762 to arrayOf("path"), 2763 to arrayOf("path", "who"), 2764 to arrayOf("path"), 2765 to arrayOf("path", "cmd"), 2766 to arrayOf("version", "path"), 2767 to arrayOf("version", "path"), 2768 to arrayOf("version", "path", "who"), 2769 to arrayOf("version", "path"), 2770 to arrayOf("version", "path", "cmd"), 2773 to arrayOf("cmd"), 2783 to arrayOf("name", "version", "path"), 2784 to arrayOf("path", "why"), 2785 to arrayOf("name"), 2787 to arrayOf("version", "cli"), 2788 to arrayOf("cli"), 2790 to arrayOf("version"), 2791 to arrayOf("version"), 2793 to arrayOf("version"), 2795 to arrayOf("version"), 2797 to arrayOf("computer"), 2798 to arrayOf("version", "cli"), 2799 to arrayOf("cli"), 2800 to arrayOf("version", "cli"), 2801 to arrayOf("cli"), 2823 to arrayOf("n"), 2828 to arrayOf("code"), 2830 to arrayOf("e"), 2843 to arrayOf("n"), 2848 to arrayOf("channel"), 2862 to arrayOf("project"), 2868 to arrayOf("n"), 2880 to arrayOf("m"), 2892 to arrayOf("m"), 2895 to arrayOf("m"), 2902 to arrayOf("pages"), 2904 to arrayOf("name"), 2907 to arrayOf("name"), 2916 to arrayOf("d", "n"), 2937 to arrayOf("n", "tools"), 2938 to arrayOf("n", "tools", "d"), 2939 to arrayOf("n", "d"), 2940 to arrayOf("n", "what"), 2941 to arrayOf("n", "d", "what"), 2945 to arrayOf("head"), 2951 to arrayOf("name", "path"), 2957 to arrayOf("page", "net", "near"), 2958 to arrayOf("page", "what"), 2959 to arrayOf("ref"), 2963 to arrayOf("page"), 2986 to arrayOf("n"), 2987 to arrayOf("n"), 2988 to arrayOf("n"), 2990 to arrayOf("hub"), 3012 to arrayOf("project"), 3014 to arrayOf("n"), 3015 to arrayOf("n"), 3016 to arrayOf("word"), 3017 to arrayOf("n"), 3035 to arrayOf("name"), 3043 to arrayOf("answer"), 3048 to arrayOf("why"), 3050 to arrayOf("hub"), 3056 to arrayOf("from", "to"), 3063 to arrayOf("project"), 3073 to arrayOf("name"), 3077 to arrayOf("n"), 3083 to arrayOf("code"), 3084 to arrayOf("hub"), 3085 to arrayOf("hub"), 3086 to arrayOf("hub"), 3100 to arrayOf("n"), 3101 to arrayOf("n"), 3117 to arrayOf("status"), 3119 to arrayOf("status"), 3148 to arrayOf("project"), 3152 to arrayOf("code"), 3154 to arrayOf("why"), 3162 to arrayOf("title"), 3168 to arrayOf("title"), 3170 to arrayOf("q"), 3171 to arrayOf("title"), 3176 to arrayOf("room"), 3180 to arrayOf("q"), 3190 to arrayOf("title"), 3195 to arrayOf("n"), 3196 to arrayOf("n"), 3201 to arrayOf("at"), 3209 to arrayOf("size"), 3211 to arrayOf("n", "total"), 3228 to arrayOf("n"), 3229 to arrayOf("what"), 3232 to arrayOf("device"), 3233 to arrayOf("device"), 3242 to arrayOf("word", "count"), 3243 to arrayOf("heard"), 3255 to arrayOf("files"), 3256 to arrayOf("files"), 3259 to arrayOf("name"), 3287 to arrayOf("n"), 3288 to arrayOf("n"), 3299 to arrayOf("n"), 3333 to arrayOf("root"), 3334 to arrayOf("path"), 3357 to arrayOf("name"), 3360 to arrayOf("until"), 3361 to arrayOf("error"), 3368 to arrayOf("url"), 3372 to arrayOf("name"), 3373 to arrayOf("name"), 3381 to arrayOf("code", "hub", "until"), 3382 to arrayOf("url"), 3386 to arrayOf("kinds"), 3387 to arrayOf("address"), 3389 to arrayOf("address"), 3392 to arrayOf("url"), 3393 to arrayOf("url"), 3394 to arrayOf("url"), 3395 to arrayOf("url", "via"), 3400 to arrayOf("name"), 3401 to arrayOf("url", "check", "left"), 3403 to arrayOf("check"), 3404 to arrayOf("address"), 3405 to arrayOf("name"), 3406 to arrayOf("error"), 3407 to arrayOf("url"), 3408 to arrayOf("url"), 3415 to arrayOf("code", "address", "left"), 3421 to arrayOf("name"), 3422 to arrayOf("name"), 3433 to arrayOf("address"), 3440 to arrayOf("code", "body"), 3443 to arrayOf("code", "body"), 3449 to arrayOf("window", "used"), 3450 to arrayOf("window", "used", "when"), 3451 to arrayOf("window", "used"), 3452 to arrayOf("window", "used", "when"), 3453 to arrayOf("provider"), 3465 to arrayOf("label"), 3466 to arrayOf("when"), 3468 to arrayOf("provider"), 3469 to arrayOf("provider", "title", "why"), 3489 to arrayOf("reason"), 3497 to arrayOf("code"), 3506 to arrayOf("name"), 3509 to arrayOf("version"), 3510 to arrayOf("version"), 3511 to arrayOf("version"), 3513 to arrayOf("version"), 3514 to arrayOf("version"), 3515 to arrayOf("version"), 3516 to arrayOf("version", "why"), 3517 to arrayOf("version"), 3519 to arrayOf("code"), 3535 to arrayOf("name"), 3542 to arrayOf("count"), 3543 to arrayOf("title"), 3544 to arrayOf("name"), 3547 to arrayOf("n", "holder"), 3548 to arrayOf("n", "title"), 3549 to arrayOf("title"), 3552 to arrayOf("n"), 3553 to arrayOf("n"), 3554 to arrayOf("n"), 3555 to arrayOf("n"), 3556 to arrayOf("harness", "typed", "type", "remote", "host", "wt", "branch"), 3566 to arrayOf("pid"), 3571 to arrayOf("left"), 3572 to arrayOf("left"), 3578 to arrayOf("left"), 3579 to arrayOf("left"), 3580 to arrayOf("left"), 3581 to arrayOf("left"), 3582 to arrayOf("label", "left"), 3583 to arrayOf("when"), 3584 to arrayOf("used"), 3585 to arrayOf("used", "limit"), 3607 to arrayOf("tracking"), 3611 to arrayOf("total"), 3612 to arrayOf("price"), 3613 to arrayOf("price"), 3618 to arrayOf("n"), 3619 to arrayOf("parts"), 3620 to arrayOf("note"), 3621 to arrayOf("error"), 3622 to arrayOf("error", "parts"), 3627 to arrayOf("state"), 3628 to arrayOf("name", "path"), 3629 to arrayOf("name", "path", "why"), 3631 to arrayOf("code"), 3635 to arrayOf("detail"), 3637 to arrayOf("why"), 3638 to arrayOf("parts"), 3641 to arrayOf("build", "to"), 3642 to arrayOf("build"), 3643 to arrayOf("build", "skip"), 3645 to arrayOf("why"), 3646 to arrayOf("why"), 3647 to arrayOf("build"), 3648 to arrayOf("build", "why"), 3649 to arrayOf("build"), 3650 to arrayOf("build"), 3654 to arrayOf("build"), 3655 to arrayOf("build"), 3657 to arrayOf("build"), 3664 to arrayOf("build"), 3698 to arrayOf("step"), 3699 to arrayOf("p", "pt", "t", "tt", "e", "et"), 3700 to arrayOf("done", "total"), 3701 to arrayOf("n"), 3702 to arrayOf("n"), 3703 to arrayOf("n"), 3708 to arrayOf("n"), 3711 to arrayOf("why"), 3712 to arrayOf("why", "from"), 3713 to arrayOf("error"), 3715 to arrayOf("n"), 3716 to arrayOf("n"), 3720 to arrayOf("n"), 3723 to arrayOf("name", "gb", "path"), 3724 to arrayOf("path", "why"), 3725 to arrayOf("names"), 3727 to arrayOf("why"), 3738 to arrayOf("n", "total"), 3742 to arrayOf("title"), 3744 to arrayOf("n"), 3748 to arrayOf("name"), 3749 to arrayOf("title"), 3750 to arrayOf("note"), 3752 to arrayOf("machine"), 3753 to arrayOf("machines"), 3754 to arrayOf("machine"), 3765 to arrayOf("n"), 3767 to arrayOf("n"), 3771 to arrayOf("name"), 3774 to arrayOf("name"), 3791 to arrayOf("why"), 3797 to arrayOf("project"), 3838 to arrayOf("path"), 3839 to arrayOf("path"), 3841 to arrayOf("have", "total"), 3846 to arrayOf("n"), 3855 to arrayOf("hub"), 3858 to arrayOf("title"), 3862 to arrayOf("project"), 3863 to arrayOf("project"), 3864 to arrayOf("n"), 3865 to arrayOf("hub"), 3867 to arrayOf("n"), 3868 to arrayOf("n"), 3869 to arrayOf("model"), 3875 to arrayOf("name"), 3894 to arrayOf("word"), 3900 to arrayOf("answer"), 3910 to arrayOf("version", "build"), 3911 to arrayOf("hub"), 3916 to arrayOf("name"), 3919 to arrayOf("when", "who", "mark"), 3923 to arrayOf("who"), 3927 to arrayOf("time"), 3928 to arrayOf("address"), 3930 to arrayOf("kind", "name"), 3945 to arrayOf("title"), 3946 to arrayOf("query"), 3949 to arrayOf("room"), 3950 to arrayOf("query"), 3952 to arrayOf("n"), 3953 to arrayOf("n"), 3954 to arrayOf("n"), 3960 to arrayOf("size"), 3964 to arrayOf("n"), 3965 to arrayOf("n"), 3966 to arrayOf("n"), 3980 to arrayOf("status"), 3982 to arrayOf("status"), 4133 to arrayOf("code"), 4135 to arrayOf("n"), 4137 to arrayOf("why"), 4149 to arrayOf("done", "of"), 4153 to arrayOf("thread"), 4156 to arrayOf("n"), 4164 to arrayOf("title"), 4165 to arrayOf("note"), 4166 to arrayOf("label"), 4167 to arrayOf("machine"), 4168 to arrayOf("machine"), 4175 to arrayOf("at", "total"), 4176 to arrayOf("at", "total"), 4180 to arrayOf("machine"), 4181 to arrayOf("machine"), 4182 to arrayOf("machines"), 4184 to arrayOf("device"), 4191 to arrayOf("price"), 4192 to arrayOf("price"), 4199 to arrayOf("home"), 4204 to arrayOf("from"), 4206 to arrayOf("note"), 4207 to arrayOf("note"), 4209 to arrayOf("v"), 4210 to arrayOf("v"), 4211 to arrayOf("v", "who"), 4213 to arrayOf("who"), 4214 to arrayOf("v"), 4216 to arrayOf("v", "cmd"), 4217 to arrayOf("cmd"), 4222 to arrayOf("v", "path"), 4223 to arrayOf("v", "note"), 4224 to arrayOf("v"), 4229 to arrayOf("tool"), 4230 to arrayOf("tool"), 4255 to arrayOf("n", "w"), 4256 to arrayOf("why"), 4257 to arrayOf("state", "why"), 4269 to arrayOf("project"), 4270 to arrayOf("n"), 4281 to arrayOf("why"), 4287 to arrayOf("name"), 4298 to arrayOf("project"), 4303 to arrayOf("n"), 4311 to arrayOf("names"), 4319 to arrayOf("dest"), 4321 to arrayOf("repo"), 4322 to arrayOf("repo"), 4324 to arrayOf("url"), 4339 to arrayOf("time"), 4361 to arrayOf("group"), 4365 to arrayOf("project"), 4366 to arrayOf("n"), 4367 to arrayOf("n"), 4368 to arrayOf("n"), 4376 to arrayOf("n"), 4433 to arrayOf("n"), 4434 to arrayOf("n"), 4435 to arrayOf("a", "b"), 4436 to arrayOf("n"), 4438 to arrayOf("parts", "lines"), 4439 to arrayOf("n"), 4470 to arrayOf("what", "project", "fab"), 4471 to arrayOf("rev", "day"), 4479 to arrayOf("n"), 4490 to arrayOf("layer"), 4491 to arrayOf("n"), 4496 to arrayOf("board"), 4508 to arrayOf("others"), 4509 to arrayOf("must", "should", "notes"), 4510 to arrayOf("id", "w"), 4520 to arrayOf("what"), 4523 to arrayOf("why"), 4524 to arrayOf("why"), 4531 to arrayOf("n"), 4547 to arrayOf("price", "n"), 4548 to arrayOf("n", "need"), 4549 to arrayOf("n"), 4550 to arrayOf("n"), 4551 to arrayOf("cost"), 4552 to arrayOf("cost"), 4565 to arrayOf("day", "n"), 4566 to arrayOf("day"), 4567 to arrayOf("cost", "n", "lines"), 4568 to arrayOf("stock", "price"), 4569 to arrayOf("lines"), 4590 to arrayOf("host"), 4601 to arrayOf("n"), 4602 to arrayOf("a", "b"), 4603 to arrayOf("n"), 4604 to arrayOf("n"), 4607 to arrayOf("day"), 4608 to arrayOf("n"), 4649 to arrayOf("turn"), 4763 to arrayOf("text"), 4766 to arrayOf("repo", "dest"), 4767 to arrayOf("repo", "dest"), 4768 to arrayOf("repo"), 4773 to arrayOf("dir"), 4774 to arrayOf("dir"), 4778 to arrayOf("editor", "job", "secs"), 4779 to arrayOf("editor", "secs"), 4780 to arrayOf("editor"), 4797 to arrayOf("time"), 4803 to arrayOf("status"), 4811 to arrayOf("time"), 4812 to arrayOf("time", "dur"), 4815 to arrayOf("answer"), 4819 to arrayOf("type"), 4820 to arrayOf("max"), 4848 to arrayOf("bytes", "tokens"), 4881 to arrayOf("what"), 4885 to arrayOf("n"), 4887 to arrayOf("n"), 4911 to arrayOf("n"), 4912 to arrayOf("done", "total"), 4920 to arrayOf("v"), 4921 to arrayOf("x", "y"), 4927 to arrayOf("machine")) } val common_cancel: String get() = Tr.s(0) val common_delete: String get() = Tr.s(1) @@ -25406,2801 +25436,2807 @@ object Msg { val gpui_c_kicad_the_editor_takes_the_whole: String get() = Tr.s(2124) val gpui_c_kicad_closing: String get() = Tr.s(2125) fun gpui_c_kicad_closing_ask(title: Any): String = Tr.f(2126, arrayOf(title)) - fun gpui_assets_missing(dir: Any, files: Any): String = Tr.f(2127, arrayOf(dir, files)) - val gpui_connecting: String get() = Tr.s(2128) - val gpui_connected: String get() = Tr.s(2129) - val gpui_disconnected: String get() = Tr.s(2130) - val gpui_hub_is_opening_its_log: String get() = Tr.s(2131) - val gpui_hub_disconnected_draft_kept_reconnecting: String get() = Tr.s(2132) - fun gpui_hub_refused_it(why: Any): String = Tr.f(2133, arrayOf(why)) - val gpui_that_is_not_on_this: String get() = Tr.s(2134) - fun gpui_hub_view_refused(code: Any): String = Tr.f(2135, arrayOf(code)) - val gpui_no_reason_given: String get() = Tr.s(2136) - val gpui_this_invitation_names_only_its: String get() = Tr.s(2137) - val gpui_that_is_not_a_pairing: String get() = Tr.s(2138) - val gpui_paste_a_pairing_link_or: String get() = Tr.s(2139) - val gpui_check_the_hub_address_and: String get() = Tr.s(2140) - val gpui_that_code_is_not_correct: String get() = Tr.s(2141) - val gpui_this_invitation_expired_create_another: String get() = Tr.s(2142) - val gpui_this_invitation_has_already_been: String get() = Tr.s(2143) - val gpui_this_invitation_was_revoked_create: String get() = Tr.s(2144) - val gpui_too_many_attempts_wait_a: String get() = Tr.s(2145) - val gpui_this_hub_has_too_many: String get() = Tr.s(2146) - val gpui_the_hub_could_not_save: String get() = Tr.s(2147) - val gpui_the_hub_could_not_be: String get() = Tr.s(2148) - fun gpui_pair_pairing_with(origin: Any): String = Tr.f(2149, arrayOf(origin)) - val gpui_this_pairing_could_not_be: String get() = Tr.s(2150) - fun gpui_could_not_restart(why: Any): String = Tr.f(2151, arrayOf(why)) - val gpui_pair_with_this_hub: String get() = Tr.s(2152) - val gpui_a_link_opened_this_pair: String get() = Tr.s(2153) - val gpui_re_pair_this_device: String get() = Tr.s(2154) - val gpui_add_a_hub: String get() = Tr.s(2155) - val gpui_connect_to_your_backplane_hub: String get() = Tr.s(2156) - val gpui_this_device_was_revoked_make: String get() = Tr.s(2157) - val gpui_on_a_paired_machine_settings: String get() = Tr.s(2158) - val gpui_or_the_hub_s_address: String get() = Tr.s(2159) - val gpui_devices: String get() = Tr.s(2160) - val gpui_add_a_device: String get() = Tr.s(2161) - fun gpui_launch_hub_missing(dir: Any): String = Tr.f(2162, arrayOf(dir)) - fun gpui_launch_could_not_make(path: Any): String = Tr.f(2163, arrayOf(path)) - fun gpui_launch_elsewhere(home: Any, other: Any): String = Tr.f(2164, arrayOf(home, other)) - val gpui_no_free_port: String get() = Tr.s(2165) - fun gpui_launch_could_not_start(path: Any): String = Tr.f(2166, arrayOf(path)) - fun gpui_launch_stopped(code: Any, log: Any): String = Tr.f(2167, arrayOf(code, log)) - fun gpui_launch_no_answer(log: Any): String = Tr.f(2168, arrayOf(log)) - val gpui_that_address_did_not_answer: String get() = Tr.s(2169) - fun gpui_launch_unreachable(addr: Any): String = Tr.f(2170, arrayOf(addr)) - val gpui_no_folder_for_this_device: String get() = Tr.s(2171) - val gpui_no_folder_for_this_program: String get() = Tr.s(2172) - val gpui_choose_a_folder: String get() = Tr.s(2173) - val gpui_give_the_full_path_starting: String get() = Tr.s(2174) - val gpui_that_folder_belongs_to_backplane: String get() = Tr.s(2175) - val gpui_that_code_was_used_already: String get() = Tr.s(2176) - val gpui_that_code_expired_after_ten: String get() = Tr.s(2177) - val gpui_that_code_was_revoked_make: String get() = Tr.s(2178) - val gpui_too_many_tries_wait_a: String get() = Tr.s(2179) - val gpui_that_hub_has_too_many: String get() = Tr.s(2180) - val gpui_that_code_is_wrong_check: String get() = Tr.s(2181) - val gpui_ask_anything_bot_thread_project: String get() = Tr.s(2182) - fun gpui_first_starting(home: Any): String = Tr.f(2183, arrayOf(home)) - fun gpui_first_pairing(addr: Any): String = Tr.f(2184, arrayOf(addr)) - val gpui_give_the_other_computer_s: String get() = Tr.s(2185) - val gpui_type_the_short_code_from: String get() = Tr.s(2186) - val gpui_where_should_backplane_keep_your: String get() = Tr.s(2187) - val gpui_backplane_keeps_your_threads_settings: String get() = Tr.s(2188) - val gpui_use_this_folder: String get() = Tr.s(2189) - val gpui_choose_a_folder2: String get() = Tr.s(2190) - val gpui_connect_to_a_hub_on: String get() = Tr.s(2191) - val gpui_a_hub_is_the_backplane: String get() = Tr.s(2192) - val gpui_this_folder_already_has_a: String get() = Tr.s(2193) - val gpui_backplane_old_data_is: String get() = Tr.s(2194) - val gpui_install_guide: String get() = Tr.s(2195) - val gpui_folder: String get() = Tr.s(2196) - val gpui_pairing_link_or_address: String get() = Tr.s(2197) - val gpui_short_code: String get() = Tr.s(2198) - fun gpui_install_failed(dir: Any, why: Any): String = Tr.f(2199, arrayOf(dir, why)) - fun gpui_install_ask(dir: Any): String = Tr.f(2200, arrayOf(dir)) - val gpui_needed_for_updates_not_now: String get() = Tr.s(2201) - val gpui_this_computer: String get() = Tr.s(2202) - val gpui_the_choice_could_not_be: String get() = Tr.s(2203) - val gpui_the_hub_could_not_be2: String get() = Tr.s(2204) - val gpui_pair_this_device_with_a: String get() = Tr.s(2205) - val gpui_in_use: String get() = Tr.s(2206) - val gpui_use: String get() = Tr.s(2207) - val gpui_the_hub_on_this_computer: String get() = Tr.s(2208) - val gpui_hub_home_on: String get() = Tr.s(2209) - val gpui_hub_home: String get() = Tr.s(2210) - val gpui_hub_home_away: String get() = Tr.s(2211) - val gpui_hub: String get() = Tr.s(2212) - val gpui_the_hub_is_not_answering: String get() = Tr.s(2213) - val gpui_restart_hub: String get() = Tr.s(2214) - fun gpui_hubbar_starting_phase(phase: Any): String = Tr.f(2215, arrayOf(phase)) - val gpui_the_hub_is_starting: String get() = Tr.s(2216) - fun gpui_hubbar_down(why: Any): String = Tr.f(2217, arrayOf(why)) - fun gpui_hubbar_stuck(what: Any): String = Tr.f(2218, arrayOf(what)) - fun gpui_hubbar_said(code: Any): String = Tr.f(2219, arrayOf(code)) - val gpui_asked_the_guard_on_this: String get() = Tr.s(2220) - val gpui_the_hub_s_machine_cannot: String get() = Tr.s(2221) - val gpui_restart_in_safe_mode: String get() = Tr.s(2222) - val gpui_roll_back_hub: String get() = Tr.s(2223) - val gpui_asking: String get() = Tr.s(2224) - fun gpui_hubbar_click_again(label: Any): String = Tr.f(2225, arrayOf(label)) - val gpui_you_said: String get() = Tr.s(2226) - val gpui_agent_said: String get() = Tr.s(2227) - val gpui_action: String get() = Tr.s(2228) - val gpui_split: String get() = Tr.s(2229) - fun gpui_palette_open(kind: Any): String = Tr.f(2230, arrayOf(kind)) - val gpui_viewer: String get() = Tr.s(2231) - fun gpui_palette_new_thread_in(project: Any): String = Tr.f(2232, arrayOf(project)) - val gpui_conversation_history: String get() = Tr.s(2233) - val gpui_search_this_thread: String get() = Tr.s(2234) - val gpui_jump_to_a_thread_or: String get() = Tr.s(2235) - val gpui_jump_to_a_thread_run: String get() = Tr.s(2236) - val gpui_type_a_word_said_in: String get() = Tr.s(2237) - val gpui_approval: String get() = Tr.s(2238) - val gpui_question: String get() = Tr.s(2239) - val gpui_new_subthread: String get() = Tr.s(2240) - val gpui_move_to_top_level: String get() = Tr.s(2241) - val gpui_regenerate_title: String get() = Tr.s(2242) - val gpui_search_in_thread: String get() = Tr.s(2243) - val gpui_badge: String get() = Tr.s(2244) - fun gpui_ctx_click_again_to(what: Any): String = Tr.f(2245, arrayOf(what)) - val gpui_snooze_tomorrow: String get() = Tr.s(2246) - fun gpui_ctx_snooze(`when`: Any): String = Tr.f(2247, arrayOf(`when`)) - val gpui_goal_notes: String get() = Tr.s(2248) - val gpui_no_goal_yet_ask_an: String get() = Tr.s(2249) - val gpui_edit_goal_notes: String get() = Tr.s(2250) - fun gpui_projects_to_order(n: Any): String = Tr.f(2251, arrayOf(n)) - fun gpui_projects_boards(n: Any): String = Tr.f(2252, arrayOf(n)) - fun gpui_projects_threads(n: Any): String = Tr.f(2253, arrayOf(n)) - val gpui_no_threads_yet: String get() = Tr.s(2254) - fun gpui_picker_no_effort(agent: Any): String = Tr.f(2255, arrayOf(agent)) - fun gpui_picker_now(effort: Any): String = Tr.f(2256, arrayOf(effort)) - val gpui_no_models: String get() = Tr.s(2257) - fun gpui_picker_more(n: Any): String = Tr.f(2258, arrayOf(n)) - val gpui_picker_speed: String get() = Tr.s(2259) - fun gpui_picker_speed_normal_only(model: Any): String = Tr.f(2260, arrayOf(model)) - val gpui_speed_normal: String get() = Tr.s(2261) - val gpui_speed_fast: String get() = Tr.s(2262) - val gpui_speed_ultrafast: String get() = Tr.s(2263) - val gpui_speed_cost_x2: String get() = Tr.s(2264) - val gpui_speed_usage_x2half: String get() = Tr.s(2265) - val gpui_speed_usage_x8: String get() = Tr.s(2266) - val gpui_speed_priority_rate: String get() = Tr.s(2267) - val gpui_search_models: String get() = Tr.s(2268) - val gpui_to_do: String get() = Tr.s(2269) - val gpui_subagents: String get() = Tr.s(2270) - val gpui_add_an_item: String get() = Tr.s(2271) - fun gpui_panels_subagents(word: Any): String = Tr.f(2272, arrayOf(word)) - val gpui_panels_kind_task: String get() = Tr.s(2273) - val gpui_runs: String get() = Tr.s(2274) - val gpui_doing: String get() = Tr.s(2275) - val gpui_asked: String get() = Tr.s(2276) - val gpui_steps: String get() = Tr.s(2277) - val gpui_none_reported_yet: String get() = Tr.s(2278) - fun gpui_panels_earlier(more: Any, step: Any): String = Tr.f(2279, arrayOf(more, step)) - val gpui_reported: String get() = Tr.s(2280) - val gpui_paste_the_value: String get() = Tr.s(2281) - val gpui_a_secret_for_this_chat: String get() = Tr.s(2282) - fun gpui_sidebox_secret(name: Any): String = Tr.f(2283, arrayOf(name)) - val gpui_not_needed: String get() = Tr.s(2284) - val gpui_attachments_need_a_hub_on: String get() = Tr.s(2285) - val gpui_open_a_thread_to_attach: String get() = Tr.s(2286) - fun gpui_attach_first(max: Any, skipped: Any): String = Tr.f(2287, arrayOf(max, skipped)) - val gpui_img: String get() = Tr.s(2288) - val gpui_file: String get() = Tr.s(2289) - fun gpui_attach_uploading(name: Any): String = Tr.f(2290, arrayOf(name)) - fun gpui_timeline_more_rows(n: Number): String = Tr.f(2291, arrayOf(n)) - fun gpui_timeline_loading(name: Any): String = Tr.f(2292, arrayOf(name)) - fun gpui_timeline_could_not_load(name: Any): String = Tr.f(2293, arrayOf(name)) - val gpui_md_alert_note: String get() = Tr.s(2294) - val gpui_md_alert_tip: String get() = Tr.s(2295) - val gpui_md_alert_important: String get() = Tr.s(2296) - val gpui_md_alert_warning: String get() = Tr.s(2297) - val gpui_md_alert_caution: String get() = Tr.s(2298) - fun gpui_timeline_more_images(n: Number): String = Tr.f(2299, arrayOf(n)) - fun gpui_order_named(name: Any): String = Tr.f(2300, arrayOf(name)) - val gpui_buy_now: String get() = Tr.s(2301) - fun gpui_order_buy_now_price(price: Any): String = Tr.f(2302, arrayOf(price)) - val gpui_order_requote: String get() = Tr.s(2303) - val gpui_order_unavailable_line: String get() = Tr.s(2304) - fun gpui_badge_away(name: Any): String = Tr.f(2305, arrayOf(name)) - val gpui_badge_again: String get() = Tr.s(2306) - fun gpui_badge_on(name: Any): String = Tr.f(2307, arrayOf(name)) - fun gpui_badge_runs_on(name: Any): String = Tr.f(2308, arrayOf(name)) - fun gpui_badge_also_on(name: Any): String = Tr.f(2309, arrayOf(name)) - fun gpui_unsent_restore(text: Any): String = Tr.f(2310, arrayOf(text)) - val gpui_made_far_note: String get() = Tr.s(2311) - val gpui_picked_elsewhere: String get() = Tr.s(2312) - fun gpui_combo_key_model(key: Any): String = Tr.f(2313, arrayOf(key)) - fun gpui_combo_key_account(key: Any): String = Tr.f(2314, arrayOf(key)) - fun gpui_combo_left(pct: Any): String = Tr.f(2315, arrayOf(pct)) - fun gpui_combo_resets(`when`: Any): String = Tr.f(2316, arrayOf(`when`)) - val gpui_weekly: String get() = Tr.s(2317) - val gpui_state: String get() = Tr.s(2318) - val gpui_blocked: String get() = Tr.s(2319) - val gpui_finished: String get() = Tr.s(2320) - val gpui_inactive: String get() = Tr.s(2321) - val gpui_stalled: String get() = Tr.s(2322) - val gpui_the_right_spelling: String get() = Tr.s(2323) - val gpui_star_on_github: String get() = Tr.s(2324) - val gpui_star_dont_ask: String get() = Tr.s(2325) - val gpui_star_why: String get() = Tr.s(2326) - fun gpui_projects_unpushed(n: Number, upstream: Any): String = Tr.f(2327, arrayOf(n, upstream)) - val gpui_projects_push: String get() = Tr.s(2328) - val gpui_e_files_max_mb: String get() = Tr.s(2329) - fun gpui_e_files_max_note(mb: Any): String = Tr.f(2330, arrayOf(mb)) - val gpui_e_dev_replay: String get() = Tr.s(2331) - val gpui_e_dev_replay_note: String get() = Tr.s(2332) - val gpui_e_dev_replay_button: String get() = Tr.s(2333) - val gpui_e_dev_star: String get() = Tr.s(2334) - val gpui_e_dev_star_show: String get() = Tr.s(2335) - val gpui_e_about_updates: String get() = Tr.s(2336) - val gpui_e_about_frames: String get() = Tr.s(2337) - val gpui_e_about_cef: String get() = Tr.s(2338) - val gpui_e_about_notices: String get() = Tr.s(2339) - fun gpui_e_about_notices_here(path: Any): String = Tr.f(2340, arrayOf(path)) - fun gpui_e_about_notices_hub(path: Any): String = Tr.f(2341, arrayOf(path)) - val gpui_e_open_folder: String get() = Tr.s(2342) - val gpui_e_agents_thinking: String get() = Tr.s(2343) - val gpui_e_agents_thinking_note: String get() = Tr.s(2344) - val gpui_e_agents_recall: String get() = Tr.s(2345) - val gpui_e_agents_recall_note: String get() = Tr.s(2346) - val gpui_e_order_comes: String get() = Tr.s(2347) - val gpui_e_devices_local_machine: String get() = Tr.s(2348) - val gpui_e_rules_standing: String get() = Tr.s(2349) - val gpui_e_rules_words: String get() = Tr.s(2350) - val gpui_e_rules_eg: String get() = Tr.s(2351) - val gpui_e_rules_add: String get() = Tr.s(2352) - val gpui_e_board_doing: String get() = Tr.s(2353) - val gpui_e_board_todo: String get() = Tr.s(2354) - val gpui_e_board_what: String get() = Tr.s(2355) - val gpui_e_board_eg: String get() = Tr.s(2356) - val gpui_e_board_add: String get() = Tr.s(2357) - val gpui_e_tz_phone_again: String get() = Tr.s(2358) - val gpui_e_tz_machine_again: String get() = Tr.s(2359) - val gpui_e_tz_phone_auto: String get() = Tr.s(2360) - val gpui_e_tz_machine_auto: String get() = Tr.s(2361) - val gpui_e_privacy_note: String get() = Tr.s(2362) - fun gpui_e_privacy_note_id(id: Any): String = Tr.f(2363, arrayOf(id)) - val gpui_e_privacy_share: String get() = Tr.s(2364) - val gpui_e_privacy_reset: String get() = Tr.s(2365) - val gpui_e_privacy_report: String get() = Tr.s(2366) - fun gpui_e_writing_model_note(model: Any): String = Tr.f(2367, arrayOf(model)) - fun gpui_e_kicad_none(platform: Any): String = Tr.f(2368, arrayOf(platform)) - fun gpui_e_kicad_installing(version: Any): String = Tr.f(2369, arrayOf(version)) - val gpui_e_kicad_starting: String get() = Tr.s(2370) - val gpui_e_kicad_ask: String get() = Tr.s(2371) - fun gpui_e_kicad_ask_note(version: Any, from: Any, into: Any): String = Tr.f(2372, arrayOf(version, from, into)) - fun gpui_e_kicad_offer(version: Any, from: Any): String = Tr.f(2373, arrayOf(version, from)) - val gpui_e_kicad_own: String get() = Tr.s(2374) - val gpui_e_kicad_notfound: String get() = Tr.s(2375) - fun gpui_e_kicad_found_version(version: Any, path: Any): String = Tr.f(2376, arrayOf(version, path)) - fun gpui_e_kicad_found_stock(version: Any, path: Any): String = Tr.f(2377, arrayOf(version, path)) - fun gpui_e_kicad_offer_stock(version: Any, pin: Any, from: Any): String = Tr.f(2378, arrayOf(version, pin, from)) - fun gpui_e_kicad_found(path: Any): String = Tr.f(2379, arrayOf(path)) - fun gpui_e_kicad_just(version: Any, path: Any): String = Tr.f(2380, arrayOf(version, path)) - fun gpui_e_kicad_passed(version: Any, path: Any, set: Any): String = Tr.f(2381, arrayOf(version, path, set)) - val gpui_e_kicad_checking: String get() = Tr.s(2382) - val gpui_e_kicad_path_hint: String get() = Tr.s(2383) - val gpui_e_freecad_notfound: String get() = Tr.s(2384) - val gpui_e_freecad_notat: String get() = Tr.s(2385) - val gpui_e_freecad_path_hint: String get() = Tr.s(2386) - val gpui_e_keys_kept: String get() = Tr.s(2387) - val gpui_e_keys_again: String get() = Tr.s(2388) - val gpui_e_keys_forget_it: String get() = Tr.s(2389) - val gpui_e_keys_note: String get() = Tr.s(2390) - val gpui_e_fallback_unavailable: String get() = Tr.s(2391) - val gpui_e_fallback_provider: String get() = Tr.s(2392) - val gpui_e_fallback_provider_note: String get() = Tr.s(2393) - val gpui_e_fallback_add: String get() = Tr.s(2394) - fun gpui_e_usage_line(turns: Number, input: Any, cread: Any, cwrite: Any, output: Any, cost: Any): String = Tr.f(2395, arrayOf(turns, input, cread, cwrite, output, cost)) - val gpui_e_cost_not_reported: String get() = Tr.s(2396) - val gpui_e_usage_title: String get() = Tr.s(2397) - val gpui_e_usage_none: String get() = Tr.s(2398) - val gpui_e_usage_unknown: String get() = Tr.s(2399) - val gpui_e_usage_all: String get() = Tr.s(2400) - val gpui_e_page_back: String get() = Tr.s(2401) - fun gpui_e_rules_on_refuses(tool: Any): String = Tr.f(2402, arrayOf(tool)) - fun gpui_e_rules_off_refuses(tool: Any): String = Tr.f(2403, arrayOf(tool)) - fun gpui_e_rules_on_refuses_word(tool: Any, word: Any): String = Tr.f(2404, arrayOf(tool, word)) - fun gpui_e_rules_off_refuses_word(tool: Any, word: Any): String = Tr.f(2405, arrayOf(tool, word)) - fun gpui_e_rules_on_using(tool: Any): String = Tr.f(2406, arrayOf(tool)) - fun gpui_e_rules_off_using(tool: Any): String = Tr.f(2407, arrayOf(tool)) - fun gpui_e_board_doing_due(due: Any): String = Tr.f(2408, arrayOf(due)) - fun gpui_e_board_blocked_due(due: Any): String = Tr.f(2409, arrayOf(due)) - fun gpui_e_board_todo_due(due: Any): String = Tr.f(2410, arrayOf(due)) - fun gpui_e_board_done_due(due: Any): String = Tr.f(2411, arrayOf(due)) - fun gpui_e_tz_zone_set(zone: Any): String = Tr.f(2412, arrayOf(zone)) - fun gpui_e_tz_zone_phone(zone: Any): String = Tr.f(2413, arrayOf(zone)) - fun gpui_e_tz_zone_machine(zone: Any): String = Tr.f(2414, arrayOf(zone)) - fun gpui_e_tz_zone_none(zone: Any): String = Tr.f(2415, arrayOf(zone)) - fun gpui_e_subs_done(n: Any): String = Tr.f(2416, arrayOf(n)) - fun gpui_e_lock_starting(who: Any): String = Tr.f(2417, arrayOf(who)) - fun gpui_e_lock_position(n: Any, who: Any): String = Tr.f(2418, arrayOf(n, who)) - fun gpui_e_subs_where(harness: Any): String = Tr.f(2419, arrayOf(harness)) - fun gpui_e_picker_already(path: Any): String = Tr.f(2420, arrayOf(path)) - fun gpui_e_picker_create(path: Any): String = Tr.f(2421, arrayOf(path)) - fun gpui_e_picker_notdir(path: Any): String = Tr.f(2422, arrayOf(path)) - val gpui_e_picker_hint: String get() = Tr.s(2423) - val gpui_e_fab_nogoal: String get() = Tr.s(2424) - fun gpui_e_fab_unavailable_line(error: Any, line: Any): String = Tr.f(2425, arrayOf(error, line)) - fun gpui_e_fab_buy_label(label: Any): String = Tr.f(2426, arrayOf(label)) - val gpui_e_tools_back: String get() = Tr.s(2427) - val gpui_e_tools_back_tip: String get() = Tr.s(2428) - val gpui_e_status_working: String get() = Tr.s(2429) - val gpui_e_status_inactive: String get() = Tr.s(2430) - val gpui_e_status_finished: String get() = Tr.s(2431) - val gpui_e_status_waiting: String get() = Tr.s(2432) - val gpui_e_status_blocked: String get() = Tr.s(2433) - fun gpui_e_acct_saved(who: Any): String = Tr.f(2434, arrayOf(who)) - fun gpui_e_acct_cli(who: Any): String = Tr.f(2435, arrayOf(who)) - fun gpui_e_acct_window_resets(label: Any, left: Any, `when`: Any): String = Tr.f(2436, arrayOf(label, left, `when`)) - fun gpui_e_acct_default_left(left: Any): String = Tr.f(2437, arrayOf(left)) - fun gpui_e_acct_profile_left(name: Any, left: Any): String = Tr.f(2438, arrayOf(name, left)) - fun gpui_e_acct_extra_off(used: Any): String = Tr.f(2439, arrayOf(used)) - fun gpui_e_acct_extra_of_off(used: Any, limit: Any): String = Tr.f(2440, arrayOf(used, limit)) - fun gpui_e_acct_extra_off_why(used: Any, reason: Any): String = Tr.f(2441, arrayOf(used, reason)) - fun gpui_e_acct_extra_of_off_why(used: Any, limit: Any, reason: Any): String = Tr.f(2442, arrayOf(used, limit, reason)) - val gpui_e_tok_noreading: String get() = Tr.s(2443) - fun gpui_e_tok_notby(provider: Any): String = Tr.f(2444, arrayOf(provider)) - fun gpui_e_tok_ofwindow(used: Any, window: Any, pct: Any): String = Tr.f(2445, arrayOf(used, window, pct)) - fun gpui_e_tok_rate(rate: Any): String = Tr.f(2446, arrayOf(rate)) - val gpui_e_tok_held: String get() = Tr.s(2447) - val gpui_e_tok_room: String get() = Tr.s(2448) - val gpui_e_tok_noturn: String get() = Tr.s(2449) - val gpui_e_tok_tokens_label: String get() = Tr.s(2450) - val gpui_e_tok_nottold: String get() = Tr.s(2451) - val gpui_e_tok_input: String get() = Tr.s(2452) - val gpui_e_tok_cread: String get() = Tr.s(2453) - val gpui_e_tok_cwrite: String get() = Tr.s(2454) - val gpui_e_tok_output: String get() = Tr.s(2455) - fun gpui_e_tok_output_reasoning(n: Any, r: Any): String = Tr.f(2456, arrayOf(n, r)) - val gpui_e_tok_cost: String get() = Tr.s(2457) - val gpui_e_tok_notreported: String get() = Tr.s(2458) - val gpui_e_tok_speed: String get() = Tr.s(2459) - val gpui_e_tok_modeltime: String get() = Tr.s(2460) - fun gpui_e_tok_modeltime_steps(time: Any, n: Number): String = Tr.f(2461, arrayOf(time, n)) - val gpui_e_tok_turntime: String get() = Tr.s(2462) - val gpui_e_tok_noturns: String get() = Tr.s(2463) - val gpui_e_tok_turns: String get() = Tr.s(2464) - fun gpui_e_tok_turns_unknown(n: Any, m: Any): String = Tr.f(2465, arrayOf(n, m)) - val gpui_e_tok_hits: String get() = Tr.s(2466) - fun gpui_e_tok_hits_of(pct: Any): String = Tr.f(2467, arrayOf(pct)) - fun gpui_e_tok_cost_some(cost: Any, n: Any): String = Tr.f(2468, arrayOf(cost, n)) - val gpui_e_tok_avg: String get() = Tr.s(2469) - val gpui_e_tok_last: String get() = Tr.s(2470) - val gpui_e_tok_bymodel: String get() = Tr.s(2471) - fun gpui_e_tok_model_line(`in`: Any, out: Any, cread: Any, cwrite: Any): String = Tr.f(2472, arrayOf(`in`, out, cread, cwrite)) - fun gpui_e_tok_model_line_web(`in`: Any, out: Any, cread: Any, cwrite: Any, n: Any): String = Tr.f(2473, arrayOf(`in`, out, cread, cwrite, n)) - val gpui_e_tok_speed_note: String get() = Tr.s(2474) - val gpui_e_viewer_noproject: String get() = Tr.s(2475) - val gpui_e_viewer_remote_files: String get() = Tr.s(2476) - val gpui_e_viewer_remote_parts: String get() = Tr.s(2477) - val gpui_e_viewer_noparts: String get() = Tr.s(2478) - val gpui_e_order_how: String get() = Tr.s(2479) - val gpui_e_fallback_note: String get() = Tr.s(2480) - val gpui_e_fallback_model: String get() = Tr.s(2481) - fun gpui_e_usage_line_nocost(turns: Number, input: Any, cread: Any, cwrite: Any, output: Any): String = Tr.f(2482, arrayOf(turns, input, cread, cwrite, output)) - fun gpui_e_acct_weekly_resets(left: Any, `when`: Any): String = Tr.f(2483, arrayOf(left, `when`)) - fun gpui_e_acct_hour5_resets(left: Any, `when`: Any): String = Tr.f(2484, arrayOf(left, `when`)) - fun gpui_e_acct_opus_resets(left: Any, `when`: Any): String = Tr.f(2485, arrayOf(left, `when`)) - fun gpui_e_acct_sonnet_resets(left: Any, `when`: Any): String = Tr.f(2486, arrayOf(left, `when`)) - val notify_which_alerts_reach_you_quiet: String get() = Tr.s(2487) - val notify_notifications: String get() = Tr.s(2488) - val notify_phones: String get() = Tr.s(2489) - val notify_only_your_uberbot_pushes_to: String get() = Tr.s(2490) - val notify_quiet_hours: String get() = Tr.s(2491) - val notify_a_push_waits_until_the: String get() = Tr.s(2492) - val notify_quiet_from_and_until: String get() = Tr.s(2493) - val notify_hh_mm_hours: String get() = Tr.s(2494) - val notify_times_are_hh_mm_hours: String get() = Tr.s(2495) - val notify_quiet_hours_are_hh_mm: String get() = Tr.s(2496) - val notify_urgent_asks_come_through: String get() = Tr.s(2497) - val notify_an_approval_or_a_question: String get() = Tr.s(2498) - val notify_iphones_that_hear_a_push: String get() = Tr.s(2499) - val notify_none_yet_an_iphone_registers: String get() = Tr.s(2500) - val notify_muted_hears_only_what_urgent: String get() = Tr.s(2501) - val notify_hears_alerts: String get() = Tr.s(2502) - val notify_hears: String get() = Tr.s(2503) - val notify_muted: String get() = Tr.s(2504) - val gpui_e_failover_failover_order: String get() = Tr.s(2505) - val gpui_e_failover_applies_to_all_threads_bots: String get() = Tr.s(2506) - val gpui_e_failover_not_installed_on_this_machine: String get() = Tr.s(2507) - val gpui_e_failover_its_own_sign_in_on: String get() = Tr.s(2508) - val gpui_e_failover_account: String get() = Tr.s(2509) - fun gpui_e_failover_accounts_the_one_with_the(n: Any): String = Tr.f(2510, arrayOf(n)) - val gpui_e_failover_default_order: String get() = Tr.s(2511) - val gpui_e_failover_use_the_default_order: String get() = Tr.s(2512) - val gpui_e_failover_choose_an_installed_provider_and: String get() = Tr.s(2513) - val gpui_e_failover_add_to_the_order: String get() = Tr.s(2514) - val ring_ring: String get() = Tr.s(2515) - val ring_pebble_index_ring: String get() = Tr.s(2516) - val ring_test_event: String get() = Tr.s(2517) - val ring_recordings: String get() = Tr.s(2518) - val ring_search_what_you_said: String get() = Tr.s(2519) - val ring_copy_header: String get() = Tr.s(2520) - val ring_copy_both: String get() = Tr.s(2521) - val ring_set_up_again: String get() = Tr.s(2522) - val ring_show_all: String get() = Tr.s(2523) - val ring_hear_again_local: String get() = Tr.s(2524) - val ring_hear_again_openai: String get() = Tr.s(2525) - val ring_what_happened: String get() = Tr.s(2526) - val ring_send_again: String get() = Tr.s(2527) - val ring_no_recordings_yet: String get() = Tr.s(2528) - val hub_acct_claude_sync: String get() = Tr.s(2529) - val hub_acct_add_a_claude_sync_token: String get() = Tr.s(2530) - val hub_acct_connected_sync_token: String get() = Tr.s(2531) - val hub_acct_sync_token_ended: String get() = Tr.s(2532) - fun hub_acct_sync_token_ends(`when`: Any): String = Tr.f(2533, arrayOf(`when`)) - val gpui_e_telemetry_notice: String get() = Tr.s(2534) - val voice_cmd_sending: String get() = Tr.s(2535) - val voice_cmd_cleared: String get() = Tr.s(2536) - val voice_cmd_sent: String get() = Tr.s(2537) - val voice_cmd_undo: String get() = Tr.s(2538) - val settings_voice_cmd_send: String get() = Tr.s(2539) - fun settings_voice_cmd_send_note(phrase: Any, now: Any): String = Tr.f(2540, arrayOf(phrase, now)) - val settings_voice_cmd_off: String get() = Tr.s(2541) - val settings_voice_cmd_hint: String get() = Tr.s(2542) - val settings_voice_cmd_default: String get() = Tr.s(2543) - val settings_voice_cmds: String get() = Tr.s(2544) - val settings_voice_cmds_note: String get() = Tr.s(2545) - val voice_cmd_scratch: String get() = Tr.s(2546) - val voice_cmd_newline: String get() = Tr.s(2547) - val voice_cmd_cancel: String get() = Tr.s(2548) - val settings_voice_auto: String get() = Tr.s(2549) - val settings_voice_auto_note: String get() = Tr.s(2550) - fun voice_cmd_secs(s: Any): String = Tr.f(2551, arrayOf(s)) - val voice_eot_sending: String get() = Tr.s(2552) - val voice_eot_hold: String get() = Tr.s(2553) - val settings_voice_eot: String get() = Tr.s(2554) - val settings_voice_eot_note: String get() = Tr.s(2555) - val settings_voice_eot_eager: String get() = Tr.s(2556) - fun settings_voice_eot_eager_note(now: Any): String = Tr.f(2557, arrayOf(now)) - fun settings_voice_eot_eager_learned(now: Any, nudge: Any, sent: Any, undone: Any): String = Tr.f(2558, arrayOf(now, nudge, sent, undone)) - val settings_voice_eot_reset: String get() = Tr.s(2559) - val settings_voice_jev: String get() = Tr.s(2560) - val settings_voice_jev_set: String get() = Tr.s(2561) - val settings_voice_jev_unset: String get() = Tr.s(2562) - val settings_voice_jev_key: String get() = Tr.s(2563) - val settings_voice_jev_use: String get() = Tr.s(2564) - val settings_voice_jev_test: String get() = Tr.s(2565) - val settings_voice_jev_model: String get() = Tr.s(2566) - val settings_voice_jev_check: String get() = Tr.s(2567) - fun settings_voice_jev_failed(e: Any): String = Tr.f(2568, arrayOf(e)) - fun settings_voice_jev_result(a: Any, ams: Any, b: Any, bms: Any): String = Tr.f(2569, arrayOf(a, ams, b, bms)) - fun settings_voice_jev_last(ms: Any): String = Tr.f(2570, arrayOf(ms)) - fun settings_voice_jev_fallback(e: Any): String = Tr.f(2571, arrayOf(e)) - fun voice_eot_eager_label(t: Any): String = Tr.f(2572, arrayOf(t)) - fun voice_eot_default_label(t: Any): String = Tr.f(2573, arrayOf(t)) - fun voice_eot_patient_label(t: Any): String = Tr.f(2574, arrayOf(t)) - val voice_always_listening: String get() = Tr.s(2575) - val voice_always_paused: String get() = Tr.s(2576) - val voice_always_muted: String get() = Tr.s(2577) - val keys_always: String get() = Tr.s(2578) - val voice_always_status: String get() = Tr.s(2579) - fun voice_always_note_paused(why: Any): String = Tr.f(2580, arrayOf(why)) - val settings_voice_always: String get() = Tr.s(2581) - val settings_voice_always_note: String get() = Tr.s(2582) - val settings_voice_always_start: String get() = Tr.s(2583) - val settings_voice_always_start_note: String get() = Tr.s(2584) - val settings_voice_always_word1: String get() = Tr.s(2585) - val settings_voice_always_word2: String get() = Tr.s(2586) - val settings_voice_always_ms: String get() = Tr.s(2587) - val settings_voice_always_pause: String get() = Tr.s(2588) - val settings_voice_always_pause_note: String get() = Tr.s(2589) - fun settings_voice_always_pause_note2(apps: Any): String = Tr.f(2590, arrayOf(apps)) - val settings_voice_always_ignore: String get() = Tr.s(2591) - val settings_voice_always_lock: String get() = Tr.s(2592) - val settings_voice_always_call: String get() = Tr.s(2593) - val settings_voice_always_away: String get() = Tr.s(2594) - val settings_voice_always_saveapps: String get() = Tr.s(2595) - val settings_voice_always_target: String get() = Tr.s(2596) - val settings_voice_always_target_note: String get() = Tr.s(2597) - val settings_voice_always_open: String get() = Tr.s(2598) - val settings_voice_speaker: String get() = Tr.s(2599) - fun settings_voice_speaker_on(n: Any): String = Tr.f(2600, arrayOf(n)) - fun settings_voice_speaker_learning(n: Any, k: Any): String = Tr.f(2601, arrayOf(n, k)) - val settings_voice_speaker_reenrol: String get() = Tr.s(2602) - val voice_always_pill_listening: String get() = Tr.s(2603) - val voice_always_pill_paused: String get() = Tr.s(2604) - val voice_always_pill_listen: String get() = Tr.s(2605) - fun voice_mark_tip(stt: Any, conf: Any): String = Tr.f(2606, arrayOf(stt, conf)) - fun voice_mark_unsure(words: Any): String = Tr.f(2607, arrayOf(words)) - val voice_mark_edited: String get() = Tr.s(2608) - val gpui_side_old_chats_that_belong_to: String get() = Tr.s(2609) - val gpui_side_group_projects: String get() = Tr.s(2610) - val gpui_side_on_projects_with_nothing_going: String get() = Tr.s(2611) - val gpui_side_no_group: String get() = Tr.s(2612) - val gpui_e_freecad_install: String get() = Tr.s(2613) - val gpui_e_freecad_ask: String get() = Tr.s(2614) - val gpui_e_freecad_installing: String get() = Tr.s(2615) - val gpui_e_freecad_page: String get() = Tr.s(2616) - fun gpui_e_freecad_ask_note(into: Any): String = Tr.f(2617, arrayOf(into)) - val gpui_e_freecad_offer: String get() = Tr.s(2618) - val gpui_e_picker_clone_hint: String get() = Tr.s(2619) - fun gpui_e_picker_clone_typed(origin: Any): String = Tr.f(2620, arrayOf(origin)) - val settings_git_page: String get() = Tr.s(2621) - val settings_git_autopush: String get() = Tr.s(2622) - val settings_git_autopush_note: String get() = Tr.s(2623) - val settings_git_notice: String get() = Tr.s(2624) - val settings_git_offbranch: String get() = Tr.s(2625) - val settings_git_offbranch_note: String get() = Tr.s(2626) - val settings_browser_start: String get() = Tr.s(2627) - val settings_browser_start_note: String get() = Tr.s(2628) - val settings_browser_opens: String get() = Tr.s(2629) - val settings_browser_reset: String get() = Tr.s(2630) - val settings_browser_blank: String get() = Tr.s(2631) - fun settings_browser_now_default(url: Any): String = Tr.f(2632, arrayOf(url)) - val settings_browser_now_blank: String get() = Tr.s(2633) - fun settings_browser_now(url: Any): String = Tr.f(2634, arrayOf(url)) - val settings_browser_bad: String get() = Tr.s(2635) - val gpui_f_group_install: String get() = Tr.s(2636) - val gpui_f_group_agents: String get() = Tr.s(2637) - val gpui_f_group_cad: String get() = Tr.s(2638) - val gpui_f_group_devices: String get() = Tr.s(2639) - val gpui_f_group_first: String get() = Tr.s(2640) - val gpui_f_group_tour: String get() = Tr.s(2641) - fun gpui_f_counter(i: Number, n: Number): String = Tr.f(2642, arrayOf(i, n)) - fun gpui_f_progress(d: Number, n: Number): String = Tr.f(2643, arrayOf(d, n)) - val gpui_f_next: String get() = Tr.s(2644) - val gpui_f_skip_step: String get() = Tr.s(2645) - val gpui_f_finish_later: String get() = Tr.s(2646) - val gpui_f_end_setup: String get() = Tr.s(2647) - val gpui_f_finish_setup: String get() = Tr.s(2648) - val gpui_f_welcome: String get() = Tr.s(2649) - val gpui_f_welcome_body: String get() = Tr.s(2650) - val gpui_f_installed: String get() = Tr.s(2651) - fun gpui_f_install_body_linux(version: Any): String = Tr.f(2652, arrayOf(version)) - fun gpui_f_install_body_darwin(version: Any): String = Tr.f(2653, arrayOf(version)) - fun gpui_f_install_body_windows(version: Any): String = Tr.f(2654, arrayOf(version)) - val gpui_f_program: String get() = Tr.s(2655) - val gpui_f_terminal_command: String get() = Tr.s(2656) - fun gpui_f_found_at(path: Any): String = Tr.f(2657, arrayOf(path)) - val gpui_f_path_fix: String get() = Tr.s(2658) - val gpui_f_path_fix_windows: String get() = Tr.s(2659) - val gpui_f_updates: String get() = Tr.s(2660) - val gpui_f_updates_note: String get() = Tr.s(2661) - val gpui_f_home_title: String get() = Tr.s(2662) - val gpui_f_home_body: String get() = Tr.s(2663) - val gpui_f_data_folder: String get() = Tr.s(2664) - fun gpui_f_hub_listens(addr: Any): String = Tr.f(2665, arrayOf(addr)) - val gpui_f_other_folder: String get() = Tr.s(2666) - val gpui_f_other_folder_note: String get() = Tr.s(2667) - val gpui_f_choose_folder: String get() = Tr.s(2668) - fun gpui_f_installing(label: Any): String = Tr.f(2669, arrayOf(label)) - val gpui_f_starting: String get() = Tr.s(2670) - fun gpui_f_did_not_install(label: Any): String = Tr.f(2671, arrayOf(label)) - fun gpui_f_install_label(label: Any): String = Tr.f(2672, arrayOf(label)) - val gpui_f_winget_note: String get() = Tr.s(2673) - val gpui_f_runs_codex: String get() = Tr.s(2674) - val gpui_f_runs_vendor: String get() = Tr.s(2675) - fun gpui_f_get_label(label: Any): String = Tr.f(2676, arrayOf(label)) - val gpui_f_opens_download: String get() = Tr.s(2677) - val gpui_f_checking: String get() = Tr.s(2678) - val gpui_f_import_title: String get() = Tr.s(2679) - val gpui_f_import_copied: String get() = Tr.s(2680) - fun gpui_f_import_body(from: Any): String = Tr.f(2681, arrayOf(from)) - val gpui_f_import_nothing: String get() = Tr.s(2682) - val gpui_f_import_nothing_note: String get() = Tr.s(2683) - val gpui_f_import_what: String get() = Tr.s(2684) - val gpui_f_import_notcounted: String get() = Tr.s(2685) - val gpui_f_import_count: String get() = Tr.s(2686) - val gpui_f_import_counting: String get() = Tr.s(2687) - val gpui_f_import_reading: String get() = Tr.s(2688) - val gpui_f_import_nothing_new: String get() = Tr.s(2689) - val gpui_f_import_here_already: String get() = Tr.s(2690) - val gpui_f_import_count_again: String get() = Tr.s(2691) - val gpui_f_import_comes: String get() = Tr.s(2692) - val gpui_f_import_import: String get() = Tr.s(2693) - val gpui_f_import_import_note: String get() = Tr.s(2694) - val gpui_f_import_withkeys: String get() = Tr.s(2695) - val gpui_f_import_withkeys_note: String get() = Tr.s(2696) - val gpui_f_import_importing: String get() = Tr.s(2697) - fun gpui_f_import_events(done: Number, of: Number): String = Tr.f(2698, arrayOf(done, of)) - val gpui_f_import_imported: String get() = Tr.s(2699) - val gpui_f_import_nothing_came: String get() = Tr.s(2700) - val gpui_f_import_again: String get() = Tr.s(2701) - val gpui_f_import_again_note: String get() = Tr.s(2702) - val gpui_f_import_stopped: String get() = Tr.s(2703) - fun gpui_f_import_n_projects(n: Number): String = Tr.f(2704, arrayOf(n)) - fun gpui_f_import_n_threads(t: Number, m: Number): String = Tr.f(2705, arrayOf(t, m)) - fun gpui_f_import_n_newmsgs(m: Number): String = Tr.f(2706, arrayOf(m)) - fun gpui_f_import_n_bots(b: Number, m: Number): String = Tr.f(2707, arrayOf(b, m)) - fun gpui_f_import_n_rooms(r: Number, p: Number): String = Tr.f(2708, arrayOf(r, p)) - fun gpui_f_import_n_routines(n: Number): String = Tr.f(2709, arrayOf(n)) - fun gpui_f_import_n_settings(n: Number): String = Tr.f(2710, arrayOf(n)) - fun gpui_f_import_n_devices(n: Number): String = Tr.f(2711, arrayOf(n)) - fun gpui_f_import_n_subagents(n: Number): String = Tr.f(2712, arrayOf(n)) - val gpui_f_import_nothing_new_dot: String get() = Tr.s(2713) - val gpui_f_note_mailruns: String get() = Tr.s(2714) - fun gpui_f_note_mailruns_text(n: Number): String = Tr.f(2715, arrayOf(n)) - val gpui_f_note_routines: String get() = Tr.s(2716) - fun gpui_f_note_routines_text(n: Number): String = Tr.f(2717, arrayOf(n)) - val gpui_f_note_machines: String get() = Tr.s(2718) - val gpui_f_note_machines_text: String get() = Tr.s(2719) - val gpui_f_note_keys: String get() = Tr.s(2720) - val gpui_f_note_keys_text: String get() = Tr.s(2721) - val gpui_f_note_google: String get() = Tr.s(2722) - val gpui_f_note_google_text: String get() = Tr.s(2723) - val gpui_f_note_clashes: String get() = Tr.s(2724) - fun gpui_f_note_clashes_text(n: Number): String = Tr.f(2725, arrayOf(n)) - val gpui_f_note_fresh: String get() = Tr.s(2726) - val gpui_f_note_fresh_text: String get() = Tr.s(2727) - val gpui_f_note_running: String get() = Tr.s(2728) - val gpui_f_note_running_text: String get() = Tr.s(2729) - val gpui_f_note_botfolder: String get() = Tr.s(2730) - fun gpui_f_note_botfolder_text(name: Any, gb: Any, path: Any): String = Tr.f(2731, arrayOf(name, gb, path)) - val gpui_f_note_notcopied: String get() = Tr.s(2732) - fun gpui_f_note_notcopied_text(path: Any, why: Any): String = Tr.f(2733, arrayOf(path, why)) - val gpui_f_note_signin: String get() = Tr.s(2734) - fun gpui_f_note_signin_text(names: Any): String = Tr.f(2735, arrayOf(names)) - val gpui_f_note_accounts_text: String get() = Tr.s(2736) - fun gpui_f_note_vault_text(why: Any): String = Tr.f(2737, arrayOf(why)) - fun gpui_f_ov_counts(p: Number, pn: Number, t: Number, tn: Number, e: Number, en: Number): String = Tr.f(2738, arrayOf(p, pn, t, tn, e, en)) - fun gpui_f_ov_mb(done: Number, total: Number): String = Tr.f(2739, arrayOf(done, total)) - fun gpui_f_ov_files(n: Number): String = Tr.f(2740, arrayOf(n)) - fun gpui_f_ov_now(what: Any): String = Tr.f(2741, arrayOf(what)) - fun gpui_f_ov_min(n: Number): String = Tr.f(2742, arrayOf(n)) - fun gpui_f_ov_s(n: Number): String = Tr.f(2743, arrayOf(n)) - val gpui_f_ov_measuring: String get() = Tr.s(2744) - val gpui_f_ov_title: String get() = Tr.s(2745) - fun gpui_f_ov_body(what: Any): String = Tr.f(2746, arrayOf(what)) - fun gpui_f_ov_took(n: Number): String = Tr.f(2747, arrayOf(n)) - val gpui_f_ov_here: String get() = Tr.s(2748) - fun gpui_f_ov_failed_in(why: Any, from: Any): String = Tr.f(2749, arrayOf(why, from)) - fun gpui_f_ov_failed(why: Any): String = Tr.f(2750, arrayOf(why)) - val gpui_f_usage_title: String get() = Tr.s(2751) - val gpui_f_usage_body: String get() = Tr.s(2752) - val gpui_f_usage_share: String get() = Tr.s(2753) - val gpui_f_usage_saved: String get() = Tr.s(2754) - val gpui_f_usage_choose: String get() = Tr.s(2755) - fun gpui_f_agent_found_signed(path: Any): String = Tr.f(2756, arrayOf(path)) - fun gpui_f_agent_found_signed_who(path: Any, who: Any): String = Tr.f(2757, arrayOf(path, who)) - fun gpui_f_agent_found_notsigned(path: Any): String = Tr.f(2758, arrayOf(path)) - fun gpui_f_agent_found_howsign(path: Any, cmd: Any): String = Tr.f(2759, arrayOf(path, cmd)) - fun gpui_f_agent_version(version: Any, path: Any): String = Tr.f(2760, arrayOf(version, path)) - fun gpui_f_agent_version_signed(version: Any, path: Any): String = Tr.f(2761, arrayOf(version, path)) - fun gpui_f_agent_version_signed_who(version: Any, path: Any, who: Any): String = Tr.f(2762, arrayOf(version, path, who)) - fun gpui_f_agent_version_notsigned(version: Any, path: Any): String = Tr.f(2763, arrayOf(version, path)) - fun gpui_f_agent_version_howsign(version: Any, path: Any, cmd: Any): String = Tr.f(2764, arrayOf(version, path, cmd)) - val gpui_f_not_installed: String get() = Tr.s(2765) - val gpui_f_or_terminal: String get() = Tr.s(2766) - fun gpui_f_no_install_button(cmd: Any): String = Tr.f(2767, arrayOf(cmd)) - val gpui_f_check_again: String get() = Tr.s(2768) - val gpui_f_check_again_note: String get() = Tr.s(2769) - val gpui_f_check_again_one: String get() = Tr.s(2770) - val gpui_f_claude_title: String get() = Tr.s(2771) - val gpui_f_claude_body: String get() = Tr.s(2772) - val gpui_f_codex_title: String get() = Tr.s(2773) - val gpui_f_codex_body: String get() = Tr.s(2774) - val gpui_f_others_title: String get() = Tr.s(2775) - val gpui_f_others_body: String get() = Tr.s(2776) - fun gpui_f_tool_runs(name: Any, version: Any, path: Any): String = Tr.f(2777, arrayOf(name, version, path)) - fun gpui_f_tool_broken(path: Any, why: Any): String = Tr.f(2778, arrayOf(path, why)) - fun gpui_f_tool_notfound(name: Any): String = Tr.f(2779, arrayOf(name)) - val gpui_f_kicad_body: String get() = Tr.s(2780) - fun gpui_f_kicad_ok_v(version: Any, cli: Any): String = Tr.f(2781, arrayOf(version, cli)) - fun gpui_f_kicad_ok(cli: Any): String = Tr.f(2782, arrayOf(cli)) - val gpui_f_releases: String get() = Tr.s(2783) - fun gpui_f_kicad_auto(version: Any): String = Tr.f(2784, arrayOf(version)) - fun gpui_f_kicad_offer_stock_v(version: Any): String = Tr.f(2785, arrayOf(version)) - val gpui_f_kicad_offer_stock: String get() = Tr.s(2786) - fun gpui_f_kicad_offer_old_v(version: Any): String = Tr.f(2787, arrayOf(version)) - val gpui_f_kicad_offer_old: String get() = Tr.s(2788) - fun gpui_f_kicad_offer_broken_v(version: Any): String = Tr.f(2789, arrayOf(version)) - val gpui_f_kicad_offer_broken: String get() = Tr.s(2790) - fun gpui_f_kicad_nopackage(computer: Any): String = Tr.f(2791, arrayOf(computer)) - fun gpui_f_kicad_found_stock_v(version: Any, cli: Any): String = Tr.f(2792, arrayOf(version, cli)) - fun gpui_f_kicad_found_stock(cli: Any): String = Tr.f(2793, arrayOf(cli)) - fun gpui_f_kicad_found_v(version: Any, cli: Any): String = Tr.f(2794, arrayOf(version, cli)) - fun gpui_f_kicad_found_plain(cli: Any): String = Tr.f(2795, arrayOf(cli)) - val gpui_f_kicad_found: String get() = Tr.s(2796) - val gpui_f_stock_kicad: String get() = Tr.s(2797) - val gpui_f_stock_kicad_note: String get() = Tr.s(2798) - val gpui_f_download_kicad: String get() = Tr.s(2799) - val gpui_f_locate: String get() = Tr.s(2800) - val gpui_f_locate_kicad: String get() = Tr.s(2801) - val gpui_f_use_path: String get() = Tr.s(2802) - val gpui_f_hint_kicad: String get() = Tr.s(2803) - val gpui_f_freecad_body: String get() = Tr.s(2804) - val gpui_f_locate_freecad: String get() = Tr.s(2805) - val gpui_f_hint_freecad: String get() = Tr.s(2806) - val gpui_f_debian: String get() = Tr.s(2807) - val gpui_f_local_code: String get() = Tr.s(2808) - val gpui_f_only_this: String get() = Tr.s(2809) - val gpui_f_machine_title: String get() = Tr.s(2810) - val gpui_f_machine_body: String get() = Tr.s(2811) - val gpui_f_ts_on: String get() = Tr.s(2812) - val gpui_f_ts_off: String get() = Tr.s(2813) - val gpui_f_ts_none: String get() = Tr.s(2814) - val gpui_f_linked_machines: String get() = Tr.s(2815) - val gpui_f_none_yet: String get() = Tr.s(2816) - fun gpui_f_n_linked(n: Number): String = Tr.f(2817, arrayOf(n)) - val gpui_f_phone_title: String get() = Tr.s(2818) - val gpui_f_phone_body: String get() = Tr.s(2819) - val gpui_f_pairing_link: String get() = Tr.s(2820) - val gpui_f_make_another: String get() = Tr.s(2821) - fun gpui_f_short_code(code: Any): String = Tr.f(2822, arrayOf(code)) - val gpui_f_add_device: String get() = Tr.s(2823) - fun gpui_f_invite_failed(e: Any): String = Tr.f(2824, arrayOf(e)) - val gpui_f_invite_note: String get() = Tr.s(2825) - val gpui_f_show_qr: String get() = Tr.s(2826) - val gpui_f_android_app: String get() = Tr.s(2827) - val gpui_f_android_note: String get() = Tr.s(2828) - val gpui_f_download_apk: String get() = Tr.s(2829) - val gpui_f_iphone_app: String get() = Tr.s(2830) - val gpui_f_iphone_note: String get() = Tr.s(2831) - val gpui_f_ts_phone: String get() = Tr.s(2832) - val gpui_f_ts_phone_note: String get() = Tr.s(2833) - val gpui_f_app_store: String get() = Tr.s(2834) - val gpui_f_google_play: String get() = Tr.s(2835) - val gpui_f_paired_devices: String get() = Tr.s(2836) - fun gpui_f_n_paired(n: Number): String = Tr.f(2837, arrayOf(n)) - val gpui_f_remote_title: String get() = Tr.s(2838) - val gpui_f_cont_on: String get() = Tr.s(2839) - val gpui_f_cont_off: String get() = Tr.s(2840) - val gpui_f_remote_body_package: String get() = Tr.s(2841) - fun gpui_f_remote_body_channel(channel: Any): String = Tr.f(2842, arrayOf(channel)) - val gpui_f_cont_restart: String get() = Tr.s(2843) - val gpui_f_open_page: String get() = Tr.s(2844) - val gpui_f_open_page_note: String get() = Tr.s(2845) - val gpui_f_network_updates: String get() = Tr.s(2846) - val gpui_f_project_title: String get() = Tr.s(2847) - val gpui_f_project_body: String get() = Tr.s(2848) - val gpui_f_add_another: String get() = Tr.s(2849) - val gpui_f_path_folder: String get() = Tr.s(2850) - val gpui_f_add_project: String get() = Tr.s(2851) - val gpui_f_create_project: String get() = Tr.s(2852) - val gpui_f_full_path: String get() = Tr.s(2853) - val gpui_f_thread_title: String get() = Tr.s(2854) - val gpui_f_thread_body: String get() = Tr.s(2855) - fun gpui_f_new_thread_in(project: Any): String = Tr.f(2856, arrayOf(project)) - val gpui_f_new_thread_note: String get() = Tr.s(2857) - val gpui_f_start_thread: String get() = Tr.s(2858) - val gpui_f_first_message: String get() = Tr.s(2859) - val gpui_f_project_first: String get() = Tr.s(2860) - val gpui_f_go_project: String get() = Tr.s(2861) - fun gpui_f_n_so_far(n: Number): String = Tr.f(2862, arrayOf(n)) - val gpui_f_tour_viewers: String get() = Tr.s(2863) - val gpui_f_tour_viewers_body: String get() = Tr.s(2864) - val gpui_f_key_side: String get() = Tr.s(2865) - val gpui_f_key_diff: String get() = Tr.s(2866) - val gpui_f_tour_threed: String get() = Tr.s(2867) - val gpui_f_tour_threed_body: String get() = Tr.s(2868) - val gpui_f_key_threed: String get() = Tr.s(2869) - val gpui_f_tour_mech: String get() = Tr.s(2870) - val gpui_f_tour_mech_body: String get() = Tr.s(2871) - val gpui_f_tour_browser_body: String get() = Tr.s(2872) - val gpui_f_tour_thread: String get() = Tr.s(2873) - fun gpui_f_tour_thread_body(m: Any): String = Tr.f(2874, arrayOf(m)) - val gpui_f_tour_bots_body: String get() = Tr.s(2875) - val gpui_f_make_bot: String get() = Tr.s(2876) - val gpui_f_opens_form: String get() = Tr.s(2877) - val gpui_f_new_bot: String get() = Tr.s(2878) - val gpui_f_tour_space: String get() = Tr.s(2879) - val gpui_f_tour_space_body: String get() = Tr.s(2880) - val gpui_f_tour_rooms_body: String get() = Tr.s(2881) - val gpui_f_make_room: String get() = Tr.s(2882) - val gpui_f_new_room: String get() = Tr.s(2883) - val gpui_f_tour_routines_body: String get() = Tr.s(2884) - val gpui_f_tour_palette: String get() = Tr.s(2885) - fun gpui_f_tour_palette_body(m: Any): String = Tr.f(2886, arrayOf(m)) - val gpui_f_key_agent: String get() = Tr.s(2887) - val gpui_f_key_prevnext: String get() = Tr.s(2888) - fun gpui_f_key_prevnext_keys(m: Any): String = Tr.f(2889, arrayOf(m)) - val gpui_f_key_uber: String get() = Tr.s(2890) - val gpui_f_try_it: String get() = Tr.s(2891) - val gpui_f_try_palette: String get() = Tr.s(2892) - val gpui_f_open_palette: String get() = Tr.s(2893) - val gpui_f_try_settings: String get() = Tr.s(2894) - val gpui_f_open_settings: String get() = Tr.s(2895) - fun gpui_f_tour_settings_body(pages: Any): String = Tr.f(2896, arrayOf(pages)) - val gpui_f_uber_title: String get() = Tr.s(2897) - fun gpui_f_uber_is(name: Any): String = Tr.f(2898, arrayOf(name)) - val gpui_f_uber_pick: String get() = Tr.s(2899) - val gpui_f_uber_create: String get() = Tr.s(2900) - fun gpui_f_uber_make(name: Any): String = Tr.f(2901, arrayOf(name)) - val gpui_f_uber_create_btn: String get() = Tr.s(2902) - val gpui_f_all_set: String get() = Tr.s(2903) - val gpui_f_still_open: String get() = Tr.s(2904) - val gpui_f_skipped_dot: String get() = Tr.s(2905) - val gpui_f_not_done_dot: String get() = Tr.s(2906) - val gpui_f_skipped: String get() = Tr.s(2907) - val gpui_f_not_done: String get() = Tr.s(2908) - val gpui_f_setup_finished: String get() = Tr.s(2909) - fun gpui_f_setup_finished_note(d: Number, n: Number): String = Tr.f(2910, arrayOf(d, n)) - val gpui_f_run_again: String get() = Tr.s(2911) - val gpui_f_setup_unfinished: String get() = Tr.s(2912) - val gpui_f_resume: String get() = Tr.s(2913) - val gpui_f_start_again: String get() = Tr.s(2914) - val gpui_f_setup_note: String get() = Tr.s(2915) - val gpui_f_run_setup: String get() = Tr.s(2916) - val gpui_f_name_bpkicad: String get() = Tr.s(2917) - val gpui_f_name_kicad: String get() = Tr.s(2918) - val gpui_f_name_freecad: String get() = Tr.s(2919) - val gpui_f_name_claude: String get() = Tr.s(2920) - val gpui_f_name_codex: String get() = Tr.s(2921) - val gpui_f_name_grok: String get() = Tr.s(2922) - val gpui_f_name_muse: String get() = Tr.s(2923) - val gpui_f_name_opencode: String get() = Tr.s(2924) - val gpui_f_name_pi: String get() = Tr.s(2925) - val gpui_f_name_omp: String get() = Tr.s(2926) - val gpui_f_name_fedora: String get() = Tr.s(2927) - val gpui_f_name_arch: String get() = Tr.s(2928) - val gpui_f_name_homebrew: String get() = Tr.s(2929) - val gpui_f_name_winget: String get() = Tr.s(2930) - fun gpui_f_fold_tools(n: Number, tools: Any): String = Tr.f(2931, arrayOf(n, tools)) - fun gpui_f_fold_tools_steps(n: Number, tools: Any, d: Number): String = Tr.f(2932, arrayOf(n, tools, d)) - fun gpui_f_fold_steps(n: Number, d: Number): String = Tr.f(2933, arrayOf(n, d)) - fun gpui_f_fold_live(n: Number, what: Any): String = Tr.f(2934, arrayOf(n, what)) - fun gpui_f_fold_live_steps(n: Number, d: Number, what: Any): String = Tr.f(2935, arrayOf(n, d, what)) - val gpui_f_restart: String get() = Tr.s(2936) - val gpui_f_not_read: String get() = Tr.s(2937) - val gpui_f_needs: String get() = Tr.s(2938) - fun gpui_f_needs_head(head: Any): String = Tr.f(2939, arrayOf(head)) - val gpui_f_type_here: String get() = Tr.s(2940) - val gpui_f_or_type: String get() = Tr.s(2941) - val gpui_f_quote_files: String get() = Tr.s(2942) - val gpui_f_dictate: String get() = Tr.s(2943) - val gpui_f_inactive: String get() = Tr.s(2944) - fun gpui_f_tool_runs_nover(name: Any, path: Any): String = Tr.f(2945, arrayOf(name, path)) - val gpui_f2_aon_boat_learn: String get() = Tr.s(2946) - val gpui_f2_uberbot_what: String get() = Tr.s(2947) - val gpui_acct_account_name_optional: String get() = Tr.s(2948) - val gpui_follow_button: String get() = Tr.s(2949) - val gpui_follow_button_tip: String get() = Tr.s(2950) - fun gpui_follow_route(page: Any, net: Any, near: Any): String = Tr.f(2951, arrayOf(page, net, near)) - fun gpui_follow_edit(page: Any, what: Any): String = Tr.f(2952, arrayOf(page, what)) - fun gpui_follow_near(ref: Any): String = Tr.f(2953, arrayOf(ref)) - val gpui_follow_wait: String get() = Tr.s(2954) - val gpui_follow_paused: String get() = Tr.s(2955) - val gpui_follow_resume: String get() = Tr.s(2956) - fun gpui_follow_held(page: Any): String = Tr.f(2957, arrayOf(page)) - val android_mgmt_all: String get() = Tr.s(2958) - val android_mgmt_judged: String get() = Tr.s(2959) - val android_mgmt_fix: String get() = Tr.s(2960) - val android_mgmt_sent: String get() = Tr.s(2961) - val android_mcp: String get() = Tr.s(2962) - val android_alerts_ask: String get() = Tr.s(2963) - val android_alerts_allow: String get() = Tr.s(2964) - val android_alerts_later: String get() = Tr.s(2965) - val android_viewerbg: String get() = Tr.s(2966) - val android_viewerbg_auto: String get() = Tr.s(2967) - val android_viewerbg_light: String get() = Tr.s(2968) - val android_viewerbg_dark: String get() = Tr.s(2969) - val android_viewerbg_custom: String get() = Tr.s(2970) - val android_viewerbg_hex: String get() = Tr.s(2971) - val android_viewerbg_note: String get() = Tr.s(2972) - val android_state_working: String get() = Tr.s(2973) - val android_state_inactive: String get() = Tr.s(2974) - val android_state_finished: String get() = Tr.s(2975) - val android_state_settled: String get() = Tr.s(2976) - val android_state_stalled: String get() = Tr.s(2977) - val android_state_monitoring: String get() = Tr.s(2978) - val android_ago_now: String get() = Tr.s(2979) - fun android_ago_m(n: Any): String = Tr.f(2980, arrayOf(n)) - fun android_ago_h(n: Any): String = Tr.f(2981, arrayOf(n)) - fun android_ago_d(n: Any): String = Tr.f(2982, arrayOf(n)) - val android_room_gone: String get() = Tr.s(2983) - fun android_conn_connecting(hub: Any): String = Tr.f(2984, arrayOf(hub)) - val android_conn_offline: String get() = Tr.s(2985) - val android_hub: String get() = Tr.s(2986) - val android_hub_add: String get() = Tr.s(2987) - val android_pair_repair: String get() = Tr.s(2988) - val android_pair_revoked: String get() = Tr.s(2989) - val android_pair_paste: String get() = Tr.s(2990) - val android_pair_photo: String get() = Tr.s(2991) - val android_pair_other: String get() = Tr.s(2992) - val android_pair_code_lead: String get() = Tr.s(2993) - val android_pair_code: String get() = Tr.s(2994) - val android_pair_code_bad: String get() = Tr.s(2995) - val android_pair_link_bad: String get() = Tr.s(2996) - val android_pair_ask: String get() = Tr.s(2997) - val android_pair_ask_note: String get() = Tr.s(2998) - val android_terminals: String get() = Tr.s(2999) - val android_search_hint: String get() = Tr.s(3000) - val android_projects_none: String get() = Tr.s(3001) - val android_project_add: String get() = Tr.s(3002) - val android_kind_uberbot: String get() = Tr.s(3003) - val android_kind_bot: String get() = Tr.s(3004) - val android_kind_room: String get() = Tr.s(3005) - fun android_thread_new_in(project: Any): String = Tr.f(3006, arrayOf(project)) - val android_threads_none: String get() = Tr.s(3007) - fun android_kids_hide(n: Number): String = Tr.f(3008, arrayOf(n)) - fun android_kids_show(n: Number): String = Tr.f(3009, arrayOf(n)) - fun android_work_head(word: Any): String = Tr.f(3010, arrayOf(word)) - fun android_lock_waiting(n: Any): String = Tr.f(3011, arrayOf(n)) - val android_state_head: String get() = Tr.s(3012) - val android_unsettle: String get() = Tr.s(3013) - val android_mic_off: String get() = Tr.s(3014) - val android_picture_bad: String get() = Tr.s(3015) - val android_buy_failed: String get() = Tr.s(3016) - val android_photo_bad: String get() = Tr.s(3017) - val android_camera_failed: String get() = Tr.s(3018) - val android_camera_off: String get() = Tr.s(3019) - val android_message_gone: String get() = Tr.s(3020) - val android_load_earlier: String get() = Tr.s(3021) - val android_thread_empty: String get() = Tr.s(3022) - val android_composer_hint: String get() = Tr.s(3023) - val android_pictures_old: String get() = Tr.s(3024) - val android_photo_choose: String get() = Tr.s(3025) - val android_photo_take: String get() = Tr.s(3026) - val android_failed_generic: String get() = Tr.s(3027) - val android_secret_new: String get() = Tr.s(3028) - fun android_secret_named(name: Any): String = Tr.f(3029, arrayOf(name)) - val android_secret_paste: String get() = Tr.s(3030) - val android_secret_refused: String get() = Tr.s(3031) - val android_secret_notneeded: String get() = Tr.s(3032) - val android_send_retry: String get() = Tr.s(3033) - val android_ask_open: String get() = Tr.s(3034) - val android_ask_done: String get() = Tr.s(3035) - val android_ask_answer: String get() = Tr.s(3036) - fun android_ask_answered(answer: Any): String = Tr.f(3037, arrayOf(answer)) - val android_hub_use: String get() = Tr.s(3038) - val native_hub_home: String get() = Tr.s(3039) - val native_hub_unreachable: String get() = Tr.s(3040) - val android_online: String get() = Tr.s(3041) - fun android_offline(why: Any): String = Tr.f(3042, arrayOf(why)) - val android_accounts: String get() = Tr.s(3043) - fun android_hub_forget_ask(hub: Any): String = Tr.f(3044, arrayOf(hub)) - val android_hub_forget_note: String get() = Tr.s(3045) - val android_improve: String get() = Tr.s(3046) - val android_alerts_head: String get() = Tr.s(3047) - val android_alerts_note: String get() = Tr.s(3048) - val android_quiet_head: String get() = Tr.s(3049) - fun android_quiet_range(from: Any, to: Any): String = Tr.f(3050, arrayOf(from, to)) - val android_urgent_head: String get() = Tr.s(3051) - val android_quiet_note: String get() = Tr.s(3052) - val android_unpair: String get() = Tr.s(3053) - val android_updates_head: String get() = Tr.s(3054) - val android_option_beta: String get() = Tr.s(3055) - val android_folder_use: String get() = Tr.s(3056) - fun android_thread_new_title(project: Any): String = Tr.f(3057, arrayOf(project)) - val android_thread_new_hint: String get() = Tr.s(3058) - val android_start: String get() = Tr.s(3059) - val android_improve_ask: String get() = Tr.s(3060) - val android_improve_note: String get() = Tr.s(3061) - val android_improve_github: String get() = Tr.s(3062) - val android_project_head: String get() = Tr.s(3063) - val android_improve_thread: String get() = Tr.s(3064) - val android_improve_sent: String get() = Tr.s(3065) - val android_order_head: String get() = Tr.s(3066) - fun android_order_named(name: Any): String = Tr.f(3067, arrayOf(name)) - val android_buy_now: String get() = Tr.s(3068) - val android_design_change: String get() = Tr.s(3069) - val android_live_working: String get() = Tr.s(3070) - fun android_live_count(n: Number): String = Tr.f(3071, arrayOf(n)) - val android_connecting: String get() = Tr.s(3072) - val android_hub_unreachable: String get() = Tr.s(3073) - val android_pair_code_address: String get() = Tr.s(3074) - val android_pair_link_partial: String get() = Tr.s(3075) - val android_pair_link_none: String get() = Tr.s(3076) - fun android_fail_http(code: Any): String = Tr.f(3077, arrayOf(code)) - fun android_fail_reach(hub: Any): String = Tr.f(3078, arrayOf(hub)) - fun android_fail_timeout(hub: Any): String = Tr.f(3079, arrayOf(hub)) - fun android_fail_dns(hub: Any): String = Tr.f(3080, arrayOf(hub)) - val android_offline_word: String get() = Tr.s(3081) - val android_offline_cap: String get() = Tr.s(3082) - val android_proto_old: String get() = Tr.s(3083) - val android_hub_refused: String get() = Tr.s(3084) - val android_hub_noanswer: String get() = Tr.s(3085) - val android_thinking: String get() = Tr.s(3086) - val android_buy_it: String get() = Tr.s(3087) - val android_layers: String get() = Tr.s(3088) - val android_link_old: String get() = Tr.s(3089) - val android_link_nohere: String get() = Tr.s(3090) - val android_link_failed: String get() = Tr.s(3091) - val android_link_offline: String get() = Tr.s(3092) - val android_copied: String get() = Tr.s(3093) - fun android_history_title(n: Any): String = Tr.f(3094, arrayOf(n)) - fun android_settled_title(n: Any): String = Tr.f(3095, arrayOf(n)) - val android_dictate: String get() = Tr.s(3096) - val android_voice_spelling: String get() = Tr.s(3097) - val android_voice_head: String get() = Tr.s(3098) - val android_link_noapp: String get() = Tr.s(3099) - val android_star: String get() = Tr.s(3100) - val android_rescue_restart: String get() = Tr.s(3101) - val android_rescue_pairing: String get() = Tr.s(3102) - val android_rescue_asking: String get() = Tr.s(3103) - val android_rescue_norestart: String get() = Tr.s(3104) - val android_rescue_nostatus: String get() = Tr.s(3105) - val android_rescue_sent: String get() = Tr.s(3106) - val android_rescue_refused: String get() = Tr.s(3107) - val android_rescue_old: String get() = Tr.s(3108) - val android_rescue_unreachable: String get() = Tr.s(3109) - val android_rescue_noanswer: String get() = Tr.s(3110) - fun android_rescue_still(status: Any): String = Tr.f(3111, arrayOf(status)) - val android_rescue_waiting: String get() = Tr.s(3112) - fun android_rescue_is(status: Any): String = Tr.f(3113, arrayOf(status)) - val android_rescue_down: String get() = Tr.s(3114) - val android_rescue_safedegraded: String get() = Tr.s(3115) - val android_rescue_degraded: String get() = Tr.s(3116) - val android_rescue_safe: String get() = Tr.s(3117) - val android_rescue_up: String get() = Tr.s(3118) - val android_pair_local: String get() = Tr.s(3119) - val android_pair_wrong: String get() = Tr.s(3120) - val android_pair_expired: String get() = Tr.s(3121) - val android_pair_used: String get() = Tr.s(3122) - val android_pair_revokedcode: String get() = Tr.s(3123) - val android_pair_limited: String get() = Tr.s(3124) - val android_pair_required: String get() = Tr.s(3125) - val android_pair_unreachable: String get() = Tr.s(3126) - val android_pad_pen_hint: String get() = Tr.s(3127) - val android_pad_box_hint: String get() = Tr.s(3128) - val android_pad_eraser_hint: String get() = Tr.s(3129) - val android_pad_pen: String get() = Tr.s(3130) - val android_pad_box: String get() = Tr.s(3131) - val android_pad_eraser: String get() = Tr.s(3132) - val android_pad_paper: String get() = Tr.s(3133) - val android_undo: String get() = Tr.s(3134) - val android_pad_length: String get() = Tr.s(3135) - val android_machines_head: String get() = Tr.s(3136) - val android_devices_head: String get() = Tr.s(3137) - val android_mic_failed: String get() = Tr.s(3138) - val android_dictation_failed: String get() = Tr.s(3139) - val android_paste: String get() = Tr.s(3140) - val android_term_copy: String get() = Tr.s(3141) - fun android_terminals_in(project: Any): String = Tr.f(3142, arrayOf(project)) - val android_term_new: String get() = Tr.s(3143) - val android_terms_none: String get() = Tr.s(3144) - val android_term_failed: String get() = Tr.s(3145) - fun android_term_exited(code: Any): String = Tr.f(3146, arrayOf(code)) - val android_term_kind_shell: String get() = Tr.s(3147) - fun android_mesh_previous(why: Any): String = Tr.f(3148, arrayOf(why)) - val android_mesh_decoding: String get() = Tr.s(3149) - val android_mesh_bad: String get() = Tr.s(3150) - val android_viewer_a11y: String get() = Tr.s(3151) - val android_search_inthread: String get() = Tr.s(3152) - val android_thread_detach: String get() = Tr.s(3153) - val android_delete_more: String get() = Tr.s(3154) - val android_thread_rename: String get() = Tr.s(3155) - fun android_thread_delete_ask(title: Any): String = Tr.f(3156, arrayOf(title)) - val android_thread_delete: String get() = Tr.s(3157) - val android_keep: String get() = Tr.s(3158) - val android_badge_more: String get() = Tr.s(3159) - val android_project_remove_more: String get() = Tr.s(3160) - val android_project_rename: String get() = Tr.s(3161) - fun android_project_remove_ask(title: Any): String = Tr.f(3162, arrayOf(title)) - val android_searching: String get() = Tr.s(3163) - fun android_search_none(q: Any): String = Tr.f(3164, arrayOf(q)) - fun android_search_project(title: Any): String = Tr.f(3165, arrayOf(title)) - val android_history_head: String get() = Tr.s(3166) - val android_done: String get() = Tr.s(3167) - val android_you: String get() = Tr.s(3168) - val android_agent: String get() = Tr.s(3169) - fun android_room_post_to(room: Any): String = Tr.f(3170, arrayOf(room)) - val android_post: String get() = Tr.s(3171) - val android_find_head: String get() = Tr.s(3172) - val android_find_hint: String get() = Tr.s(3173) - fun android_find_none(q: Any): String = Tr.f(3174, arrayOf(q)) - val android_accounts_none: String get() = Tr.s(3175) - val android_account_name_hint: String get() = Tr.s(3176) - val android_account_add: String get() = Tr.s(3177) - val android_account: String get() = Tr.s(3178) - val android_signin_open: String get() = Tr.s(3179) - val android_copy_code: String get() = Tr.s(3180) - val android_code_paste: String get() = Tr.s(3181) - val android_code_send: String get() = Tr.s(3182) - val android_viewer_split: String get() = Tr.s(3183) - fun android_viewer_title(title: Any): String = Tr.f(3184, arrayOf(title)) - val android_viewer_board: String get() = Tr.s(3185) - val android_viewer_boards: String get() = Tr.s(3186) - val android_viewer_sheet: String get() = Tr.s(3187) - val android_viewer_sheets: String get() = Tr.s(3188) - fun android_viewer_sheets_n(n: Number): String = Tr.f(3189, arrayOf(n)) - fun ios_viewer_sheets_n(n: Number): String = Tr.f(3190, arrayOf(n)) - val android_viewer_change: String get() = Tr.s(3191) - val android_viewer_find: String get() = Tr.s(3192) - val android_viewer_noboard: String get() = Tr.s(3193) - val android_viewer_nosch: String get() = Tr.s(3194) - fun android_viewer_piece(at: Any): String = Tr.f(3195, arrayOf(at)) - val android_viewer_loading3d: String get() = Tr.s(3196) - val android_compare_close: String get() = Tr.s(3197) - val android_compare_none: String get() = Tr.s(3198) - val android_mech_none: String get() = Tr.s(3199) - val android_folder_empty: String get() = Tr.s(3200) - val android_file_bad: String get() = Tr.s(3201) - val android_file_noimage: String get() = Tr.s(3202) - fun android_file_nopreview(size: Any): String = Tr.f(3203, arrayOf(size)) - val android_pdf_bad: String get() = Tr.s(3204) - fun android_pdf_page(n: Any, total: Any): String = Tr.f(3205, arrayOf(n, total)) - val android_browser_takeover: String get() = Tr.s(3206) - val android_browser_keys: String get() = Tr.s(3207) - val android_browser_handback: String get() = Tr.s(3208) - val android_browser_page: String get() = Tr.s(3209) - val android_browser_none: String get() = Tr.s(3210) - val android_browser_driving: String get() = Tr.s(3211) - val android_changes_head: String get() = Tr.s(3212) - val android_diff_nogit: String get() = Tr.s(3213) - val android_diff_none: String get() = Tr.s(3214) - val android_checks_run: String get() = Tr.s(3215) - val android_nothing: String get() = Tr.s(3216) - val android_comments_none: String get() = Tr.s(3217) - val android_resolved: String get() = Tr.s(3218) - val android_reopen: String get() = Tr.s(3219) - val android_resolve: String get() = Tr.s(3220) - val android_comment_hint: String get() = Tr.s(3221) - fun android_probe_lit(n: Any): String = Tr.f(3222, arrayOf(n)) - fun android_fold_running(what: Any): String = Tr.f(3223, arrayOf(what)) - val android_hub_voice_unsupported_here: String get() = Tr.s(3224) - val android_hub_voice_mic_note_plain: String get() = Tr.s(3225) - fun android_hub_voice_mic_note_default(device: Any): String = Tr.f(3226, arrayOf(device)) - fun android_hub_voice_mic_note(device: Any): String = Tr.f(3227, arrayOf(device)) - val android_hub_voice_engine_pending: String get() = Tr.s(3228) - val android_hub_voice_dict_empty: String get() = Tr.s(3229) - val android_hub_voice_learned_empty: String get() = Tr.s(3230) - val android_hub_voice_pebble: String get() = Tr.s(3231) - val android_hub_voice_pebble_note: String get() = Tr.s(3232) - val android_hub_voice_noaudio_mic: String get() = Tr.s(3233) - val android_hub_voice_silent_mic: String get() = Tr.s(3234) - val android_hub_voice_skip: String get() = Tr.s(3235) - fun android_hub_voice_heard_many(word: Any, count: Any): String = Tr.f(3236, arrayOf(word, count)) - fun android_hub_voice_dropped(heard: Any): String = Tr.f(3237, arrayOf(heard)) - val android_hub_voice_err_copy: String get() = Tr.s(3238) - val android_hub_voice_err_busy: String get() = Tr.s(3239) - val android_hub_voice_err_setting: String get() = Tr.s(3240) - val android_hub_voice_err_action: String get() = Tr.s(3241) - val android_hub_voice_err_request: String get() = Tr.s(3242) - val android_hub_voice_err_term: String get() = Tr.s(3243) - val android_hub_voice_err_key: String get() = Tr.s(3244) - val android_hub_voice_err_write: String get() = Tr.s(3245) - val android_hub_voice_err_start: String get() = Tr.s(3246) - val android_hub_voice_err_stopped: String get() = Tr.s(3247) - val android_hub_voice_err_missing: String get() = Tr.s(3248) - fun android_hub_entry_step_files(files: Any): String = Tr.f(3249, arrayOf(files)) - fun android_hub_entry_step_base(files: Any): String = Tr.f(3250, arrayOf(files)) - val android_hub_entry_noreason: String get() = Tr.s(3251) - val android_hub_entry_retired: String get() = Tr.s(3252) - fun android_hub_viewer_layer(name: Any): String = Tr.f(3253, arrayOf(name)) - val android_hub_viewer_pads: String get() = Tr.s(3254) - val android_hub_viewer_vias: String get() = Tr.s(3255) - val android_hub_viewer_holes: String get() = Tr.s(3256) - val android_hub_viewer_margin: String get() = Tr.s(3257) - val android_hub_viewer_sch_page: String get() = Tr.s(3258) - val android_hub_viewer_sch_sheetfill: String get() = Tr.s(3259) - val android_hub_viewer_sch_bodyfill: String get() = Tr.s(3260) - val android_hub_viewer_sch_graphic: String get() = Tr.s(3261) - val android_hub_viewer_sch_note: String get() = Tr.s(3262) - val android_hub_viewer_sch_body: String get() = Tr.s(3263) - val android_hub_viewer_sch_pin: String get() = Tr.s(3264) - val android_hub_viewer_sch_pinname: String get() = Tr.s(3265) - val android_hub_viewer_sch_pinnumber: String get() = Tr.s(3266) - val android_hub_viewer_sch_field: String get() = Tr.s(3267) - val android_hub_viewer_sch_fieldother: String get() = Tr.s(3268) - val android_hub_viewer_sch_bus: String get() = Tr.s(3269) - val android_hub_viewer_sch_busentry: String get() = Tr.s(3270) - val android_hub_viewer_sch_wire: String get() = Tr.s(3271) - val android_hub_viewer_sch_noconnect: String get() = Tr.s(3272) - val android_hub_viewer_sch_junction: String get() = Tr.s(3273) - val android_hub_viewer_sch_sheetname: String get() = Tr.s(3274) - val android_hub_viewer_sch_sheetfile: String get() = Tr.s(3275) - val android_hub_viewer_sch_dnp: String get() = Tr.s(3276) - val android_hub_review_nokicad: String get() = Tr.s(3277) - val android_hub_review_wait: String get() = Tr.s(3278) - val android_hub_review_nosch: String get() = Tr.s(3279) - val android_hub_review_nofindings: String get() = Tr.s(3280) - fun android_hub_review_unticked(n: Any): String = Tr.f(3281, arrayOf(n)) - fun android_hub_review_customfailed(n: Any): String = Tr.f(3282, arrayOf(n)) - val android_hub_review_runthem: String get() = Tr.s(3283) - val android_hub_err_thread: String get() = Tr.s(3284) - val android_hub_err_project: String get() = Tr.s(3285) - val android_hub_err_room: String get() = Tr.s(3286) - val android_hub_err_method: String get() = Tr.s(3287) - val android_hub_err_attachment: String get() = Tr.s(3288) - val android_hub_err_noanswer: String get() = Tr.s(3289) - val android_hub_err_empty: String get() = Tr.s(3290) - val android_hub_err_oldapp: String get() = Tr.s(3291) - val android_hub_err_clientid: String get() = Tr.s(3292) - fun android_hub_err_images_max(n: Any): String = Tr.f(3293, arrayOf(n)) - val android_hub_err_images_kind: String get() = Tr.s(3294) - val android_hub_err_images_base64: String get() = Tr.s(3295) - val android_hub_err_images_size: String get() = Tr.s(3296) - val android_hub_err_images_store: String get() = Tr.s(3297) - val android_hub_err_folder_none: String get() = Tr.s(3298) - val android_hub_err_folder_read: String get() = Tr.s(3299) - val android_hub_err_notadded: String get() = Tr.s(3300) - val android_hub_err_nothread: String get() = Tr.s(3301) - val android_hub_err_env: String get() = Tr.s(3302) - val android_hub_err_channel: String get() = Tr.s(3303) - val android_hub_err_topic: String get() = Tr.s(3304) - val android_hub_err_tint: String get() = Tr.s(3305) - val android_hub_err_usage: String get() = Tr.s(3306) - val android_hub_err_nofolder: String get() = Tr.s(3307) - val android_hub_err_path: String get() = Tr.s(3308) - val android_hub_err_layer: String get() = Tr.s(3309) - val android_hub_err_compare: String get() = Tr.s(3310) - val android_hub_err_version: String get() = Tr.s(3311) - val android_hub_err_repo: String get() = Tr.s(3312) - val android_hub_err_toolbar: String get() = Tr.s(3313) - val android_hub_err_page: String get() = Tr.s(3314) - val android_hub_err_term_none: String get() = Tr.s(3315) - val android_hub_err_term_off: String get() = Tr.s(3316) - val android_hub_err_term_stopped: String get() = Tr.s(3317) - val android_hub_err_term_many: String get() = Tr.s(3318) - val android_hub_err_term_much: String get() = Tr.s(3319) - val android_hub_err_term_base64: String get() = Tr.s(3320) - val android_hub_err_busy: String get() = Tr.s(3321) - val android_hub_err_store: String get() = Tr.s(3322) - val android_hub_err_noagent: String get() = Tr.s(3323) - val android_hub_err_project_choose: String get() = Tr.s(3324) - val android_hub_err_project_retry: String get() = Tr.s(3325) - val android_hub_err_project_message: String get() = Tr.s(3326) - fun android_hub_err_project_already(root: Any): String = Tr.f(3327, arrayOf(root)) - fun android_hub_err_project_invalid(path: Any): String = Tr.f(3328, arrayOf(path)) - val android_hub_err_project_nofolder: String get() = Tr.s(3329) - val android_hub_err_project_unavailable: String get() = Tr.s(3330) - val android_hub_err_project_home: String get() = Tr.s(3331) - val android_hub_err_folder_gone: String get() = Tr.s(3332) - val android_hub_err_notfolder: String get() = Tr.s(3333) - val android_hub_err_file: String get() = Tr.s(3334) - val android_hub_err_utf8: String get() = Tr.s(3335) - val android_hub_err_parent: String get() = Tr.s(3336) - val android_hub_err_conversation: String get() = Tr.s(3337) - val android_hub_err_account_move: String get() = Tr.s(3338) - val android_hub_err_account_turn: String get() = Tr.s(3339) - val android_hub_err_account_agent: String get() = Tr.s(3340) - val android_hub_err_account_changed: String get() = Tr.s(3341) - val android_hub_err_account_none: String get() = Tr.s(3342) - val android_hub_err_intent_reload: String get() = Tr.s(3343) - val android_hub_err_intent_saving: String get() = Tr.s(3344) - val android_hub_err_intent_dir: String get() = Tr.s(3345) - val android_hub_err_intent_section: String get() = Tr.s(3346) - val android_hub_err_order_off: String get() = Tr.s(3347) - val android_hub_err_order_changed: String get() = Tr.s(3348) - val android_hub_err_order_upload: String get() = Tr.s(3349) - val android_hub_err_machine: String get() = Tr.s(3350) - fun android_hub_devices_used_by(name: Any): String = Tr.f(3351, arrayOf(name)) - val android_hub_devices_used: String get() = Tr.s(3352) - val android_hub_devices_revoked: String get() = Tr.s(3353) - fun android_hub_devices_expired(until: Any): String = Tr.f(3354, arrayOf(until)) - fun android_hub_devices_invite_failed(error: Any): String = Tr.f(3355, arrayOf(error)) - val android_hub_devices_add: String get() = Tr.s(3356) - val android_hub_devices_add_note: String get() = Tr.s(3357) - val android_hub_devices_retry: String get() = Tr.s(3358) - val android_hub_devices_lan: String get() = Tr.s(3359) - val android_hub_devices_lan_on: String get() = Tr.s(3360) - val android_hub_devices_lan_gone: String get() = Tr.s(3361) - fun android_hub_devices_lan_row(url: Any): String = Tr.f(3362, arrayOf(url)) - val android_hub_devices_lan_stop: String get() = Tr.s(3363) - val android_hub_devices_link_open: String get() = Tr.s(3364) - val android_hub_devices_link_used: String get() = Tr.s(3365) - fun android_hub_devices_link_open_by(name: Any): String = Tr.f(3366, arrayOf(name)) - fun android_hub_devices_link_used_by(name: Any): String = Tr.f(3367, arrayOf(name)) - val android_hub_devices_kind_tailnet: String get() = Tr.s(3368) - val android_hub_devices_kind_local: String get() = Tr.s(3369) - val android_hub_devices_tailnet_note: String get() = Tr.s(3370) - val android_hub_devices_lan_note: String get() = Tr.s(3371) - val android_hub_devices_reach: String get() = Tr.s(3372) - val android_hub_devices_lan_address: String get() = Tr.s(3373) - val android_hub_devices_another: String get() = Tr.s(3374) - fun android_hub_devices_qrnote(code: Any, hub: Any, until: Any): String = Tr.f(3375, arrayOf(code, hub, until)) - fun android_hub_devices_lan_offer(url: Any): String = Tr.f(3376, arrayOf(url)) - val android_hub_devices_lan_let: String get() = Tr.s(3377) - val android_hub_devices_only: String get() = Tr.s(3378) - val android_hub_devices_local_only: String get() = Tr.s(3379) - fun android_hub_devices_local_choose(kinds: Any): String = Tr.f(3380, arrayOf(kinds)) - fun android_hub_devices_lan_unknown(address: Any): String = Tr.f(3381, arrayOf(address)) - val android_hub_devices_lan_copy: String get() = Tr.s(3382) - fun android_hub_devices_lan_taken(address: Any): String = Tr.f(3383, arrayOf(address)) - val android_hub_devices_err_action: String get() = Tr.s(3384) - val android_hub_machines_none: String get() = Tr.s(3385) - fun android_hub_machines_paired(url: Any): String = Tr.f(3386, arrayOf(url)) - fun android_hub_machines_notyours(url: Any): String = Tr.f(3387, arrayOf(url)) - fun android_hub_machines_unpaired(url: Any): String = Tr.f(3388, arrayOf(url)) - fun android_hub_machines_via(url: Any, via: Any): String = Tr.f(3389, arrayOf(url, via)) - val android_hub_machines_rename: String get() = Tr.s(3390) - val android_hub_machines_rename_note: String get() = Tr.s(3391) - val android_hub_machines_rename_from: String get() = Tr.s(3392) - val android_hub_machines_rename_to: String get() = Tr.s(3393) - fun android_hub_machines_wants(name: Any): String = Tr.f(3394, arrayOf(name)) - fun android_hub_machines_request(url: Any, check: Any, left: Any): String = Tr.f(3395, arrayOf(url, check, left)) - val android_hub_machines_approve: String get() = Tr.s(3396) - fun android_hub_machines_waiting(check: Any): String = Tr.f(3397, arrayOf(check)) - fun android_hub_machines_pairing(address: Any): String = Tr.f(3398, arrayOf(address)) - fun android_hub_machines_status_linked(name: Any): String = Tr.f(3399, arrayOf(name)) - fun android_hub_machines_status_refused(error: Any): String = Tr.f(3400, arrayOf(error)) - fun android_hub_machines_found(url: Any): String = Tr.f(3401, arrayOf(url)) - fun android_hub_machines_found_other(url: Any): String = Tr.f(3402, arrayOf(url)) - val android_hub_machines_code_hint: String get() = Tr.s(3403) - val android_hub_machines_pair_title: String get() = Tr.s(3404) - val android_hub_machines_pair_note: String get() = Tr.s(3405) - val android_hub_machines_addr_hint: String get() = Tr.s(3406) - val android_hub_machines_code: String get() = Tr.s(3407) - val android_hub_machines_code_title: String get() = Tr.s(3408) - fun android_hub_machines_code_note(code: Any, address: Any, left: Any): String = Tr.f(3409, arrayOf(code, address, left)) - val android_hub_machines_code_another: String get() = Tr.s(3410) - val android_hub_machines_make: String get() = Tr.s(3411) - val android_hub_machines_make_note: String get() = Tr.s(3412) - val android_hub_machines_err_link: String get() = Tr.s(3413) - val android_hub_machines_err_which: String get() = Tr.s(3414) - fun android_hub_machines_err_called(name: Any): String = Tr.f(3415, arrayOf(name)) - fun android_hub_machines_err_taken(name: Any): String = Tr.f(3416, arrayOf(name)) - val android_hub_machines_err_invite: String get() = Tr.s(3417) - val android_hub_machines_err_codes: String get() = Tr.s(3418) - val android_hub_machines_err_record: String get() = Tr.s(3419) - val android_hub_machines_err_expired_answered: String get() = Tr.s(3420) - val android_hub_machines_err_secret: String get() = Tr.s(3421) - val android_hub_machines_err_approval: String get() = Tr.s(3422) - val android_hub_machines_err_expired: String get() = Tr.s(3423) - val android_hub_machines_err_address: String get() = Tr.s(3424) - val android_hub_machines_err_nocode: String get() = Tr.s(3425) - val android_hub_machines_err_already: String get() = Tr.s(3426) - fun android_hub_machines_err_noanswer(address: Any): String = Tr.f(3427, arrayOf(address)) - val android_hub_machines_err_nothing: String get() = Tr.s(3428) - val android_hub_machines_err_attempt: String get() = Tr.s(3429) - val android_hub_machines_err_invites: String get() = Tr.s(3430) - val android_hub_machines_err_invite_record: String get() = Tr.s(3431) - val android_hub_machines_err_invite_secret: String get() = Tr.s(3432) - val android_hub_machines_err_unusable: String get() = Tr.s(3433) - fun android_hub_machines_err_nolink(code: Any, body: Any): String = Tr.f(3434, arrayOf(code, body)) - val android_hub_machines_err_notlinked: String get() = Tr.s(3435) - val android_hub_machines_err_nocodeback: String get() = Tr.s(3436) - fun android_hub_machines_err_nocodegiven(code: Any, body: Any): String = Tr.f(3437, arrayOf(code, body)) - val android_hub_accounts_state_connected: String get() = Tr.s(3438) - val android_hub_accounts_state_expired: String get() = Tr.s(3439) - val android_hub_accounts_state_connecting: String get() = Tr.s(3440) - val android_hub_accounts_state_unchecked: String get() = Tr.s(3441) - val android_hub_accounts_state_none: String get() = Tr.s(3442) - fun android_hub_accounts_limit(window: Any, used: Any): String = Tr.f(3443, arrayOf(window, used)) - fun android_hub_accounts_limit_resets(window: Any, used: Any, `when`: Any): String = Tr.f(3444, arrayOf(window, used, `when`)) - fun android_hub_accounts_limit_stale(window: Any, used: Any): String = Tr.f(3445, arrayOf(window, used)) - fun android_hub_accounts_limit_resets_stale(window: Any, used: Any, `when`: Any): String = Tr.f(3446, arrayOf(window, used, `when`)) - fun android_hub_accounts_add(provider: Any): String = Tr.f(3447, arrayOf(provider)) - val android_hub_accounts_note: String get() = Tr.s(3448) - val android_hub_accounts_signin_starting: String get() = Tr.s(3449) - val android_hub_accounts_signin_paste: String get() = Tr.s(3450) - val android_hub_accounts_signin_device: String get() = Tr.s(3451) - val android_hub_accounts_signin_done: String get() = Tr.s(3452) - val android_hub_accounts_signin_expired: String get() = Tr.s(3453) - val android_hub_accounts_signin_cancelled: String get() = Tr.s(3454) - val android_hub_accounts_signin_failed: String get() = Tr.s(3455) - val android_hub_accounts_act_cancel: String get() = Tr.s(3456) - val android_hub_accounts_act_again: String get() = Tr.s(3457) - val android_hub_accounts_act_signin: String get() = Tr.s(3458) - fun android_hub_accounts_remove_ask(label: Any): String = Tr.f(3459, arrayOf(label)) - fun android_hub_accounts_hold_resets(`when`: Any): String = Tr.f(3460, arrayOf(`when`)) - val android_hub_accounts_hold: String get() = Tr.s(3461) - fun android_hub_accounts_alert_expired(provider: Any): String = Tr.f(3462, arrayOf(provider)) - fun android_hub_accounts_alert_needed(provider: Any, title: Any, why: Any): String = Tr.f(3463, arrayOf(provider, title, why)) - val android_hub_accounts_msg_expired: String get() = Tr.s(3464) - val android_hub_accounts_msg_expired_long: String get() = Tr.s(3465) - val android_hub_accounts_msg_generic: String get() = Tr.s(3466) - val android_hub_accounts_msg_nolimits: String get() = Tr.s(3467) - val android_hub_accounts_msg_nowindows: String get() = Tr.s(3468) - val android_hub_accounts_msg_signin: String get() = Tr.s(3469) - val android_hub_accounts_msg_directory: String get() = Tr.s(3470) - val android_hub_accounts_fail_code: String get() = Tr.s(3471) - val android_hub_accounts_fail_network: String get() = Tr.s(3472) - val android_hub_accounts_fail_storage: String get() = Tr.s(3473) - val android_hub_accounts_fail_cli: String get() = Tr.s(3474) - val android_hub_accounts_fail_dir: String get() = Tr.s(3475) - val android_hub_accounts_fail_verify: String get() = Tr.s(3476) - val android_hub_accounts_code_incomplete: String get() = Tr.s(3477) - val android_hub_accounts_code_other: String get() = Tr.s(3478) - val android_hub_accounts_msg_unverified: String get() = Tr.s(3479) - val android_hub_accounts_msg_registry: String get() = Tr.s(3480) - val android_hub_accounts_msg_identity: String get() = Tr.s(3481) - val android_hub_accounts_msg_subscription: String get() = Tr.s(3482) - fun android_hub_accounts_msg_refused(reason: Any): String = Tr.f(3483, arrayOf(reason)) - val android_hub_accounts_msg_toolarge: String get() = Tr.s(3484) - val android_hub_accounts_msg_closed: String get() = Tr.s(3485) - val android_hub_accounts_msg_timeout: String get() = Tr.s(3486) - val android_hub_accounts_msg_notusage: String get() = Tr.s(3487) - val android_hub_accounts_usage_unauthorized: String get() = Tr.s(3488) - val android_hub_accounts_usage_forbidden: String get() = Tr.s(3489) - val android_hub_accounts_usage_limited: String get() = Tr.s(3490) - fun android_hub_accounts_usage_code(code: Any): String = Tr.f(3491, arrayOf(code)) - val android_hub_accounts_err_gone: String get() = Tr.s(3492) - val android_hub_accounts_err_provider: String get() = Tr.s(3493) - val android_hub_accounts_err_add: String get() = Tr.s(3494) - val android_hub_accounts_err_gate: String get() = Tr.s(3495) - val android_hub_accounts_err_default: String get() = Tr.s(3496) - val android_hub_accounts_err_busy: String get() = Tr.s(3497) - val android_hub_accounts_err_select: String get() = Tr.s(3498) - val android_hub_accounts_err_check: String get() = Tr.s(3499) - fun android_hub_accounts_err_called(name: Any): String = Tr.f(3500, arrayOf(name)) - val android_hub_update_off: String get() = Tr.s(3501) - val android_hub_update_checking: String get() = Tr.s(3502) - fun android_hub_update_downloading(version: Any): String = Tr.f(3503, arrayOf(version)) - fun android_hub_update_waiting(version: Any): String = Tr.f(3504, arrayOf(version)) - fun android_hub_update_installing(version: Any): String = Tr.f(3505, arrayOf(version)) - val android_hub_update_failed: String get() = Tr.s(3506) - fun android_hub_update_row(version: Any): String = Tr.f(3507, arrayOf(version)) - fun android_hub_update_done(version: Any): String = Tr.f(3508, arrayOf(version)) - fun android_hub_update_rolledback(version: Any): String = Tr.f(3509, arrayOf(version)) - fun android_hub_update_rolledback_why(version: Any, why: Any): String = Tr.f(3510, arrayOf(version, why)) - fun android_hub_update_notstarted(version: Any): String = Tr.f(3511, arrayOf(version)) - val android_hub_update_turns: String get() = Tr.s(3512) - fun android_hub_update_err_feed(code: Any): String = Tr.f(3513, arrayOf(code)) - val android_hub_update_err_unpack: String get() = Tr.s(3514) - val android_hub_update_err_newer: String get() = Tr.s(3515) - val android_hub_update_err_nokey: String get() = Tr.s(3516) - val android_hub_update_err_untrusted: String get() = Tr.s(3517) - val android_hub_update_err_other: String get() = Tr.s(3518) - val android_hub_update_err_version: String get() = Tr.s(3519) - val android_hub_update_err_channel_tag: String get() = Tr.s(3520) - val android_hub_update_err_channel: String get() = Tr.s(3521) - val android_hub_update_err_file: String get() = Tr.s(3522) - val android_hub_update_err_checksum_bad: String get() = Tr.s(3523) - val android_hub_update_err_size_range: String get() = Tr.s(3524) - val android_hub_update_err_empty: String get() = Tr.s(3525) - val android_hub_update_err_listing: String get() = Tr.s(3526) - val android_hub_update_err_hardlink: String get() = Tr.s(3527) - val android_hub_update_err_link: String get() = Tr.s(3528) - fun android_hub_update_err_outside(name: Any): String = Tr.f(3529, arrayOf(name)) - val android_hub_update_err_norun: String get() = Tr.s(3530) - val android_hub_update_err_nohub: String get() = Tr.s(3531) - val android_hub_update_err_size: String get() = Tr.s(3532) - val android_hub_update_err_checksum: String get() = Tr.s(3533) - val android_hub_update_err_guard: String get() = Tr.s(3534) - val android_hub_update_err_guard_busy: String get() = Tr.s(3535) - fun android_hub_work_todo(count: Any): String = Tr.f(3536, arrayOf(count)) - fun android_hub_work_watch(title: Any): String = Tr.f(3537, arrayOf(title)) - fun android_hub_work_lock(name: Any): String = Tr.f(3538, arrayOf(name)) - val android_hub_work_release_done: String get() = Tr.s(3539) - val android_hub_work_flock: String get() = Tr.s(3540) - fun android_hub_work_position(n: Any, holder: Any): String = Tr.f(3541, arrayOf(n, holder)) - fun android_hub_work_position_job(n: Any, title: Any): String = Tr.f(3542, arrayOf(n, title)) - fun android_hub_work_job(title: Any): String = Tr.f(3543, arrayOf(title)) - val android_hub_work_subagent: String get() = Tr.s(3544) - val android_hub_work_said: String get() = Tr.s(3545) - fun android_hub_work_steps(n: Number): String = Tr.f(3546, arrayOf(n)) - fun android_hub_work_tokens(n: Any): String = Tr.f(3547, arrayOf(n)) - fun android_hub_work_tokens_k(n: Any): String = Tr.f(3548, arrayOf(n)) - fun android_hub_work_tokens_m(n: Any): String = Tr.f(3549, arrayOf(n)) - fun android_hub_work_where(harness: Any, typed: String, type: Any, remote: String, host: Any, wt: String, branch: Any): String = Tr.f(3550, arrayOf(harness, typed, type, remote, host, wt, branch)) - val android_hub_work_state_ended: String get() = Tr.s(3551) - val android_hub_work_word_launching: String get() = Tr.s(3552) - val android_hub_work_word_watching: String get() = Tr.s(3553) - val android_hub_work_word_timedout: String get() = Tr.s(3554) - val android_hub_work_word_cancelling: String get() = Tr.s(3555) - val android_hub_work_word_queued: String get() = Tr.s(3556) - val android_hub_work_word_unknown: String get() = Tr.s(3557) - val android_hub_work_word_completed: String get() = Tr.s(3558) - val android_hub_work_word_killed: String get() = Tr.s(3559) - fun android_hub_locks_outside(pid: Any): String = Tr.f(3560, arrayOf(pid)) - val android_hub_picker_notinstalled: String get() = Tr.s(3561) - val android_hub_picker_notinstalled_here: String get() = Tr.s(3562) - val android_hub_picker_notinstalled_agy: String get() = Tr.s(3563) - val android_hub_picker_cli: String get() = Tr.s(3564) - fun android_hub_picker_left(left: Any): String = Tr.f(3565, arrayOf(left)) - fun android_hub_picker_left_shared(left: Any): String = Tr.f(3566, arrayOf(left)) - val android_hub_picker_shared: String get() = Tr.s(3567) - val android_hub_picker_why_expired: String get() = Tr.s(3568) - val android_hub_picker_why_unchecked: String get() = Tr.s(3569) - val android_hub_picker_why_connecting: String get() = Tr.s(3570) - val android_hub_picker_why_none: String get() = Tr.s(3571) - fun android_hub_picker_window_fivehour(left: Any): String = Tr.f(3572, arrayOf(left)) - fun android_hub_picker_window_week(left: Any): String = Tr.f(3573, arrayOf(left)) - fun android_hub_picker_window_opus(left: Any): String = Tr.f(3574, arrayOf(left)) - fun android_hub_picker_window_sonnet(left: Any): String = Tr.f(3575, arrayOf(left)) - fun android_hub_picker_window(label: Any, left: Any): String = Tr.f(3576, arrayOf(label, left)) - fun android_hub_picker_resets(`when`: Any): String = Tr.f(3577, arrayOf(`when`)) - fun android_hub_picker_extra(used: Any): String = Tr.f(3578, arrayOf(used)) - fun android_hub_picker_extra_of(used: Any, limit: Any): String = Tr.f(3579, arrayOf(used, limit)) - val android_hub_picker_nolimit: String get() = Tr.s(3580) - val android_hub_status_blocked: String get() = Tr.s(3581) - val android_hub_order_step_details: String get() = Tr.s(3582) - val android_hub_order_step_quote: String get() = Tr.s(3583) - val android_hub_order_step_pay: String get() = Tr.s(3584) - val android_hub_order_step_made: String get() = Tr.s(3585) - val android_hub_order_step_shipped: String get() = Tr.s(3586) - val android_hub_order_line_asked: String get() = Tr.s(3587) - val android_hub_order_line_getting: String get() = Tr.s(3588) - val android_hub_order_line_reply: String get() = Tr.s(3589) - val android_hub_order_line_files: String get() = Tr.s(3590) - val android_hub_order_line_quoting: String get() = Tr.s(3591) - val android_hub_order_line_expired: String get() = Tr.s(3592) - val android_hub_order_line_failed: String get() = Tr.s(3593) - val android_hub_order_line_pilot: String get() = Tr.s(3594) - val android_hub_order_line_refunded: String get() = Tr.s(3595) - val android_hub_order_line_quoted: String get() = Tr.s(3596) - val android_hub_order_line_fix: String get() = Tr.s(3597) - val android_hub_order_line_paid: String get() = Tr.s(3598) - val android_hub_order_line_placed: String get() = Tr.s(3599) - val android_hub_order_line_shipped: String get() = Tr.s(3600) - fun android_hub_order_line_tracking(tracking: Any): String = Tr.f(3601, arrayOf(tracking)) - val android_hub_order_line_delivered: String get() = Tr.s(3602) - val android_hub_order_customs_ddp: String get() = Tr.s(3603) - val android_hub_order_customs: String get() = Tr.s(3604) - fun android_hub_order_buynow_total(total: Any): String = Tr.f(3605, arrayOf(total)) - fun android_hub_buy_from(price: Any): String = Tr.f(3606, arrayOf(price)) - fun android_hub_buy_last(price: Any): String = Tr.f(3607, arrayOf(price)) - val android_hub_buy_incomplete: String get() = Tr.s(3608) - val android_hub_buy_again: String get() = Tr.s(3609) - val android_hub_buy_ready: String get() = Tr.s(3610) - val android_hub_buy_ready_board: String get() = Tr.s(3611) - fun android_hub_buy_ready_boards(n: Any): String = Tr.f(3612, arrayOf(n)) - fun android_hub_buy_ready_parts(parts: Any): String = Tr.f(3613, arrayOf(parts)) - fun android_hub_buy_check(note: Any): String = Tr.f(3614, arrayOf(note)) - fun android_hub_buy_unavailable(error: Any): String = Tr.f(3615, arrayOf(error)) - fun android_hub_buy_unavailable_parts(error: Any, parts: Any): String = Tr.f(3616, arrayOf(error, parts)) - val android_hub_buy_ordered_paid: String get() = Tr.s(3617) - val android_hub_buy_ordered_placed: String get() = Tr.s(3618) - val android_hub_buy_ordered_shipped: String get() = Tr.s(3619) - val android_hub_buy_ordered_delivered: String get() = Tr.s(3620) - fun android_hub_buy_ordered(state: Any): String = Tr.f(3621, arrayOf(state)) - fun android_hub_buy_noestimate(name: Any, path: Any): String = Tr.f(3622, arrayOf(name, path)) - fun android_hub_buy_noestimate_why(name: Any, path: Any, why: Any): String = Tr.f(3623, arrayOf(name, path, why)) - val android_hub_buy_unreachable: String get() = Tr.s(3624) - fun android_hub_buy_said(code: Any): String = Tr.f(3625, arrayOf(code)) - val android_hub_ask_reject: String get() = Tr.s(3626) - val android_hub_ask_session: String get() = Tr.s(3627) - val android_hub_ask_decline: String get() = Tr.s(3628) - fun android_hub_ask_quote(detail: Any): String = Tr.f(3629, arrayOf(detail)) - val android_hub_guard_safe: String get() = Tr.s(3630) - fun android_hub_guard_safe_why(why: Any): String = Tr.f(3631, arrayOf(why)) - fun android_hub_guard_degraded(parts: Any): String = Tr.f(3632, arrayOf(parts)) - val android_hub_guard_temp: String get() = Tr.s(3633) - val android_hub_guard_disk: String get() = Tr.s(3634) - fun android_hub_guard_rolledback(build: Any, to: Any): String = Tr.f(3635, arrayOf(build, to)) - fun android_hub_guard_nostart(build: Any): String = Tr.f(3636, arrayOf(build)) - fun android_hub_guard_nostart_skip(build: Any, skip: Any): String = Tr.f(3637, arrayOf(build, skip)) - val android_hub_guard_down_retry: String get() = Tr.s(3638) - fun android_hub_guard_down(why: Any): String = Tr.f(3639, arrayOf(why)) - fun android_hub_guard_restarting(why: Any): String = Tr.f(3640, arrayOf(why)) - fun android_hub_guard_starting(build: Any): String = Tr.f(3641, arrayOf(build)) - fun android_hub_guard_safe_on(build: Any, why: Any): String = Tr.f(3642, arrayOf(build, why)) - fun android_hub_guard_safe_on_plain(build: Any): String = Tr.f(3643, arrayOf(build)) - fun android_hub_guard_running(build: Any): String = Tr.f(3644, arrayOf(build)) - val android_hub_guard_act_normal: String get() = Tr.s(3645) - val android_hub_guard_act_safe: String get() = Tr.s(3646) - val android_hub_guard_act_safe_note: String get() = Tr.s(3647) - fun android_hub_guard_act_rollback(build: Any): String = Tr.f(3648, arrayOf(build)) - fun android_hub_guard_act_rollback_note(build: Any): String = Tr.f(3649, arrayOf(build)) - val android_hub_guard_ans_noaction: String get() = Tr.s(3650) - fun android_hub_guard_ans_nobuild(build: Any): String = Tr.f(3651, arrayOf(build)) - val android_hub_guard_ans_noback: String get() = Tr.s(3652) - val android_hub_guard_ans_stopping: String get() = Tr.s(3653) - val android_hub_guard_ans_restarting: String get() = Tr.s(3654) - val android_hub_guard_ans_safe: String get() = Tr.s(3655) - val android_hub_guard_ans_rollingback: String get() = Tr.s(3656) - val android_hub_guard_ans_switching: String get() = Tr.s(3657) - fun android_hub_guard_ans_bad(build: Any): String = Tr.f(3658, arrayOf(build)) - val android_hub_guard_ans_updating: String get() = Tr.s(3659) - val android_hub_guard_ans_asked: String get() = Tr.s(3660) - val android_hub_guard_err_unreachable: String get() = Tr.s(3661) - val android_hub_guard_err_token: String get() = Tr.s(3662) - val android_hub_guard_err_disk: String get() = Tr.s(3663) - val android_hub_guard_err_here: String get() = Tr.s(3664) - val android_hub_guard_err_noanswer: String get() = Tr.s(3665) - val android_hub_guard_err_noguard: String get() = Tr.s(3666) - val android_hub_cmd_btw: String get() = Tr.s(3667) - val android_hub_cmd_give_desc: String get() = Tr.s(3668) - val android_hub_cmd_secret: String get() = Tr.s(3669) - val android_hub_cmd_intent: String get() = Tr.s(3670) - val android_hub_cmd_settle_desc: String get() = Tr.s(3671) - val android_hub_cmd_btw_empty: String get() = Tr.s(3672) - val android_hub_cmd_project: String get() = Tr.s(3673) - val android_hub_cmd_newproject: String get() = Tr.s(3674) - val android_hub_cmd_project_quote: String get() = Tr.s(3675) - val android_hub_cmd_project_existing: String get() = Tr.s(3676) - val android_hub_cmd_notcmd: String get() = Tr.s(3677) - val android_hub_link_screen: String get() = Tr.s(3678) - val android_hub_link_conversation: String get() = Tr.s(3679) - val android_hub_link_file: String get() = Tr.s(3680) - val android_hub_link_file_far: String get() = Tr.s(3681) - val android_hub_link_empty: String get() = Tr.s(3682) - val android_hub_link_unknown: String get() = Tr.s(3683) - val android_hub_link_project: String get() = Tr.s(3684) - val android_hub_link_project_far: String get() = Tr.s(3685) - val android_hub_link_thread: String get() = Tr.s(3686) - val android_hub_link_thread_far: String get() = Tr.s(3687) - val android_hub_link_noscreen: String get() = Tr.s(3688) - val android_hub_link_noproject: String get() = Tr.s(3689) - val android_hub_star_text: String get() = Tr.s(3690) - val android_hub_migrate_title: String get() = Tr.s(3691) - fun android_hub_migrate_body(step: String): String = Tr.f(3692, arrayOf(step)) - fun android_hub_migrate_writing(p: Any, pt: Any, t: Any, tt: Any, e: Any, et: Any): String = Tr.f(3693, arrayOf(p, pt, t, tt, e, et)) - fun android_hub_migrate_read(done: Any, total: Any): String = Tr.f(3694, arrayOf(done, total)) - fun android_hub_migrate_copied(n: Any): String = Tr.f(3695, arrayOf(n)) - fun android_hub_migrate_min(n: Any): String = Tr.f(3696, arrayOf(n)) - fun android_hub_migrate_sec(n: Any): String = Tr.f(3697, arrayOf(n)) - val android_hub_migrate_measuring: String get() = Tr.s(3698) - val android_hub_migrate_done: String get() = Tr.s(3699) - val android_hub_migrate_nothing: String get() = Tr.s(3700) - val android_hub_migrate_nothing_short: String get() = Tr.s(3701) - fun android_hub_migrate_took(n: Any): String = Tr.f(3702, arrayOf(n)) - val android_hub_migrate_keys: String get() = Tr.s(3703) - val android_hub_migrate_failed: String get() = Tr.s(3704) - fun android_hub_migrate_failed_body(why: Any): String = Tr.f(3705, arrayOf(why)) - fun android_hub_migrate_failed_body_from(why: Any, from: Any): String = Tr.f(3706, arrayOf(why, from)) - fun android_hub_migrate_unreadable(error: Any): String = Tr.f(3707, arrayOf(error)) - val android_hub_migrate_busy: String get() = Tr.s(3708) - fun android_hub_migrate_runs(n: Number): String = Tr.f(3709, arrayOf(n)) - fun android_hub_migrate_routines(n: Number): String = Tr.f(3710, arrayOf(n)) - val android_hub_migrate_machines: String get() = Tr.s(3711) - val android_hub_migrate_keystay: String get() = Tr.s(3712) - val android_hub_migrate_google: String get() = Tr.s(3713) - fun android_hub_migrate_clashes(n: Number): String = Tr.f(3714, arrayOf(n)) - val android_hub_migrate_fresh: String get() = Tr.s(3715) - val android_hub_migrate_running: String get() = Tr.s(3716) - fun android_hub_migrate_botfolder(name: Any, gb: Any, path: Any): String = Tr.f(3717, arrayOf(name, gb, path)) - fun android_hub_migrate_notcopied(path: Any, why: Any): String = Tr.f(3718, arrayOf(path, why)) - fun android_hub_migrate_signin(names: Any): String = Tr.f(3719, arrayOf(names)) - val android_hub_migrate_accounts: String get() = Tr.s(3720) - fun android_hub_migrate_vault(why: Any): String = Tr.f(3721, arrayOf(why)) - val android_hub_history_title: String get() = Tr.s(3722) - val android_hub_history_closed: String get() = Tr.s(3723) - val android_away: String get() = Tr.s(3724) - val android_open: String get() = Tr.s(3725) - val android_search_messages: String get() = Tr.s(3726) - val android_find_inthread: String get() = Tr.s(3727) - val android_find_error: String get() = Tr.s(3728) - val android_find_prev: String get() = Tr.s(3729) - val android_find_next: String get() = Tr.s(3730) - val android_find_nomatch: String get() = Tr.s(3731) - fun android_find_count(n: Number, total: Number): String = Tr.f(3732, arrayOf(n, total)) - val android_find_you: String get() = Tr.s(3733) - val android_find_agent: String get() = Tr.s(3734) - val android_sub_thread: String get() = Tr.s(3735) - fun android_sub_back(title: Any): String = Tr.f(3736, arrayOf(title)) - val android_sub_gone: String get() = Tr.s(3737) - fun android_sub_more(n: Number): String = Tr.f(3738, arrayOf(n)) - val android_sub_none: String get() = Tr.s(3739) - val android_sub_asked: String get() = Tr.s(3740) - val android_sub_tool: String get() = Tr.s(3741) - fun android_machine_on(name: Any): String = Tr.f(3742, arrayOf(name)) - fun android_handoff_from(title: Any): String = Tr.f(3743, arrayOf(title)) - fun android_handoff_note(note: Any): String = Tr.f(3744, arrayOf(note)) - val android_queue_unsent: String get() = Tr.s(3745) - fun android_mark_runs(machine: Any): String = Tr.f(3746, arrayOf(machine)) - fun android_mark_also(machines: Any): String = Tr.f(3747, arrayOf(machines)) - fun android_mark_newon(machine: Any): String = Tr.f(3748, arrayOf(machine)) - val android_google_signedin: String get() = Tr.s(3749) - val android_google_back: String get() = Tr.s(3750) - val android_improve_search: String get() = Tr.s(3751) - val android_improve_nomatch: String get() = Tr.s(3752) - val android_ring_head: String get() = Tr.s(3753) - val android_swarm_new: String get() = Tr.s(3754) - val android_swarm_topic: String get() = Tr.s(3755) - val android_swarm_goal: String get() = Tr.s(3756) - val android_swarm_seed: String get() = Tr.s(3757) - val android_swarm_member_add: String get() = Tr.s(3758) - fun android_swarm_member_n(n: Any): String = Tr.f(3759, arrayOf(n)) - val android_swarm_role: String get() = Tr.s(3760) - fun android_swarm_members(n: Number): String = Tr.f(3761, arrayOf(n)) - val android_swarm_pause: String get() = Tr.s(3762) - val android_swarm_resume: String get() = Tr.s(3763) - val android_swarm_stop: String get() = Tr.s(3764) - fun android_swarm_stop_ask(name: Any): String = Tr.f(3765, arrayOf(name)) - val android_swarm_stop_yes: String get() = Tr.s(3766) - val android_swarm_keep: String get() = Tr.s(3767) - fun android_swarm_remove_member(name: Any): String = Tr.f(3768, arrayOf(name)) - val android_swarm_state_active: String get() = Tr.s(3769) - val android_swarm_state_paused: String get() = Tr.s(3770) - val android_swarm_state_stopped: String get() = Tr.s(3771) - val android_swarm_state_done: String get() = Tr.s(3772) - val android_swarm_reason_circular: String get() = Tr.s(3773) - val android_swarm_reason_idle: String get() = Tr.s(3774) - val android_swarm_reason_budget: String get() = Tr.s(3775) - val android_swarm_reason_person: String get() = Tr.s(3776) - val android_swarm_reason_chatter: String get() = Tr.s(3777) - val android_swarm_tag_idea: String get() = Tr.s(3778) - val android_swarm_tag_critique: String get() = Tr.s(3779) - val android_swarm_tag_claim: String get() = Tr.s(3780) - val android_swarm_tag_done: String get() = Tr.s(3781) - val android_swarm_tag_question: String get() = Tr.s(3782) - val android_swarm_tag_synthesis: String get() = Tr.s(3783) - val android_swarm_waiting: String get() = Tr.s(3784) - fun android_swarm_held(why: Any): String = Tr.f(3785, arrayOf(why)) - val android_swarm_post_hint: String get() = Tr.s(3786) - val android_swarm_none: String get() = Tr.s(3787) - val android_swarm_gone: String get() = Tr.s(3788) - val android_swarm_provider: String get() = Tr.s(3789) - val android_swarm_model: String get() = Tr.s(3790) - fun android_buy_ask(project: Any): String = Tr.f(3791, arrayOf(project)) - val cat_cat: String get() = Tr.s(3792) - val cat_own: String get() = Tr.s(3793) - val cat_different: String get() = Tr.s(3794) - val cat_auto: String get() = Tr.s(3795) - val cat_color_bad: String get() = Tr.s(3796) - val android_copy_run: String get() = Tr.s(3797) - val android_copy_fullscreen: String get() = Tr.s(3798) - val android_term_chat_old: String get() = Tr.s(3799) - val android_browser_head: String get() = Tr.s(3800) - val android_clone_mode_folder: String get() = Tr.s(3801) - val android_clone_mode_git: String get() = Tr.s(3802) - val android_clone_repo_hint: String get() = Tr.s(3803) - val android_clone_private: String get() = Tr.s(3804) - val android_clone_signin: String get() = Tr.s(3805) - val android_clone_into: String get() = Tr.s(3806) - val android_clone_folder_change: String get() = Tr.s(3807) - val android_clone_folder_use: String get() = Tr.s(3808) - val android_clone_name_hint: String get() = Tr.s(3809) - val android_clone_thread: String get() = Tr.s(3810) - val android_clone_go: String get() = Tr.s(3811) - val android_clone_same: String get() = Tr.s(3812) - val android_clone_retry: String get() = Tr.s(3813) - val android_clone_loading: String get() = Tr.s(3814) - val android_clone_signin_code: String get() = Tr.s(3815) - val android_clone_signin_wait: String get() = Tr.s(3816) - val android_clone_signin_done: String get() = Tr.s(3817) - val android_clone_signin_failed: String get() = Tr.s(3818) - val android_clone_hint_nogh: String get() = Tr.s(3819) - val android_clone_hint_signedout: String get() = Tr.s(3820) - val android_clone_hint_error: String get() = Tr.s(3821) - val android_clone_phase_starting: String get() = Tr.s(3822) - val android_clone_phase_connecting: String get() = Tr.s(3823) - val android_clone_phase_counting: String get() = Tr.s(3824) - val android_clone_phase_compressing: String get() = Tr.s(3825) - val android_clone_phase_receiving: String get() = Tr.s(3826) - val android_clone_phase_resolving: String get() = Tr.s(3827) - val android_clone_phase_updating: String get() = Tr.s(3828) - val android_clone_phase_lfs: String get() = Tr.s(3829) - val android_clone_phase_adding: String get() = Tr.s(3830) - val android_clone_phase_cancelled: String get() = Tr.s(3831) - fun android_clone_busy(path: Any): String = Tr.f(3832, arrayOf(path)) - fun android_clone_file(path: Any): String = Tr.f(3833, arrayOf(path)) - val android_download_saved: String get() = Tr.s(3834) - fun android_download_of(have: Any, total: Any): String = Tr.f(3835, arrayOf(have, total)) - val android_download_share: String get() = Tr.s(3836) - val android_download_retry: String get() = Tr.s(3837) - val android_download_noapp: String get() = Tr.s(3838) - val android_download_button: String get() = Tr.s(3839) - fun ios_sections_running(n: Number): String = Tr.f(3840, arrayOf(n)) - val ios_alerts_ask: String get() = Tr.s(3841) - val ios_alerts_allow: String get() = Tr.s(3842) - val ios_alerts_later: String get() = Tr.s(3843) - val ios_viewerbg: String get() = Tr.s(3844) - val ios_viewerbg_auto: String get() = Tr.s(3845) - val ios_viewerbg_custom: String get() = Tr.s(3846) - val ios_viewerbg_color: String get() = Tr.s(3847) - val ios_viewerbg_note: String get() = Tr.s(3848) - fun ios_hub_use(hub: Any): String = Tr.f(3849, arrayOf(hub)) - val ios_thread_loading: String get() = Tr.s(3850) - val ios_hub_connecting: String get() = Tr.s(3851) - fun ios_project_remove_ask(title: Any): String = Tr.f(3852, arrayOf(title)) - val ios_side_room: String get() = Tr.s(3853) - val ios_side_bot: String get() = Tr.s(3854) - val ios_side_uber: String get() = Tr.s(3855) - fun ios_project_terms(project: Any): String = Tr.f(3856, arrayOf(project)) - fun ios_project_newthread(project: Any): String = Tr.f(3857, arrayOf(project)) - fun ios_lock_waiting(n: Number): String = Tr.f(3858, arrayOf(n)) - fun ios_conn_connecting(hub: Any): String = Tr.f(3859, arrayOf(hub)) - val ios_conn_offline: String get() = Tr.s(3860) - fun ios_kids_hide(n: Number): String = Tr.f(3861, arrayOf(n)) - fun ios_kids_show(n: Number): String = Tr.f(3862, arrayOf(n)) - fun ios_model_label(model: Any): String = Tr.f(3863, arrayOf(model)) - val ios_model_default: String get() = Tr.s(3864) - val ios_start: String get() = Tr.s(3865) - val ios_starting: String get() = Tr.s(3866) - val ios_room_missing: String get() = Tr.s(3867) - val ios_secret_new: String get() = Tr.s(3868) - fun ios_secret_named(name: Any): String = Tr.f(3869, arrayOf(name)) - val ios_secret_refused: String get() = Tr.s(3870) - val ios_find_gone: String get() = Tr.s(3871) - val ios_thread: String get() = Tr.s(3872) - val ios_state_working: String get() = Tr.s(3873) - val ios_state_inactive: String get() = Tr.s(3874) - val ios_state_blocked: String get() = Tr.s(3875) - val ios_state_stalled: String get() = Tr.s(3876) - val ios_state_monitoring: String get() = Tr.s(3877) - val ios_state_finished: String get() = Tr.s(3878) - val ios_state_active: String get() = Tr.s(3879) - val ios_composer_hint: String get() = Tr.s(3880) - val ios_dictate_stop: String get() = Tr.s(3881) - val ios_dictate: String get() = Tr.s(3882) - val ios_attach_pictures: String get() = Tr.s(3883) - val ios_attach_pictures_no: String get() = Tr.s(3884) - val ios_draw_no: String get() = Tr.s(3885) - val ios_attach_no: String get() = Tr.s(3886) - val ios_command_failed: String get() = Tr.s(3887) - fun ios_work_head(word: Any): String = Tr.f(3888, arrayOf(word)) - val ios_fold_open: String get() = Tr.s(3889) - val ios_fold_shut: String get() = Tr.s(3890) - val ios_step_design: String get() = Tr.s(3891) - val ios_ask_asks: String get() = Tr.s(3892) - val ios_ask_asked: String get() = Tr.s(3893) - fun ios_ask_answered(answer: Any): String = Tr.f(3894, arrayOf(answer)) - val ios_improve_sent: String get() = Tr.s(3895) - val ios_on: String get() = Tr.s(3896) - val ios_off: String get() = Tr.s(3897) - val ios_system: String get() = Tr.s(3898) - val ios_light: String get() = Tr.s(3899) - val ios_dark: String get() = Tr.s(3900) - val ios_conn_online: String get() = Tr.s(3901) - val ios_conn_connectingword: String get() = Tr.s(3902) - val ios_conn_offlineword: String get() = Tr.s(3903) - fun ios_version(version: Any, build: Any): String = Tr.f(3904, arrayOf(version, build)) - fun ios_hub_forget_ask(hub: Any): String = Tr.f(3905, arrayOf(hub)) - val ios_hub_this: String get() = Tr.s(3906) - val ios_update_stable: String get() = Tr.s(3907) - val ios_update_beta: String get() = Tr.s(3908) - val ios_order: String get() = Tr.s(3909) - fun ios_order_named(name: Any): String = Tr.f(3910, arrayOf(name)) - val ios_invite_machine: String get() = Tr.s(3911) - val ios_invite_device: String get() = Tr.s(3912) - fun ios_link_used(`when`: Any, who: Any, mark: String): String = Tr.f(3913, arrayOf(`when`, who, mark)) - val ios_link_amachine: String get() = Tr.s(3914) - val ios_link_adevice: String get() = Tr.s(3915) - val ios_link_revoked_never: String get() = Tr.s(3916) - fun ios_link_revoked_with(who: Any): String = Tr.f(3917, arrayOf(who)) - val ios_link_machine_linked: String get() = Tr.s(3918) - val ios_link_device_paired: String get() = Tr.s(3919) - val ios_link_expired: String get() = Tr.s(3920) - fun ios_link_open(time: Any): String = Tr.f(3921, arrayOf(time)) - fun ios_hub_address(address: Any): String = Tr.f(3922, arrayOf(address)) - val ios_share: String get() = Tr.s(3923) - fun ios_link_revoke_used(kind: String, name: Any): String = Tr.f(3924, arrayOf(kind, name)) - val ios_unnamed: String get() = Tr.s(3925) - val ios_link_revoke_open: String get() = Tr.s(3926) - val ios_devices_loadfail: String get() = Tr.s(3927) - val ios_invite_creating: String get() = Tr.s(3928) - val ios_invite_fail: String get() = Tr.s(3929) - val ios_invite_ready: String get() = Tr.s(3930) - val ios_invite_fail_conn: String get() = Tr.s(3931) - val ios_revoke_device_fail: String get() = Tr.s(3932) - val ios_revoke_link_fail: String get() = Tr.s(3933) - val ios_pair_repair: String get() = Tr.s(3934) - val ios_pair_connect_title: String get() = Tr.s(3935) - val ios_pair_paste: String get() = Tr.s(3936) - val ios_pair_paste_hint: String get() = Tr.s(3937) - val ios_pair_invalid: String get() = Tr.s(3938) - fun ios_thread_delete_ask(title: Any): String = Tr.f(3939, arrayOf(title)) - fun ios_search_none(query: Any): String = Tr.f(3940, arrayOf(query)) - val ios_you: String get() = Tr.s(3941) - val ios_agent: String get() = Tr.s(3942) - fun ios_room_post_to(room: Any): String = Tr.f(3943, arrayOf(room)) - fun ios_find_none(query: Any): String = Tr.f(3944, arrayOf(query)) - val ios_ago_now: String get() = Tr.s(3945) - fun ios_ago_m(n: Any): String = Tr.f(3946, arrayOf(n)) - fun ios_ago_h(n: Any): String = Tr.f(3947, arrayOf(n)) - fun ios_ago_d(n: Any): String = Tr.f(3948, arrayOf(n)) - val ios_mic_off: String get() = Tr.s(3949) - val ios_mic_failed: String get() = Tr.s(3950) - val ios_link_update: String get() = Tr.s(3951) - val ios_link_nothere: String get() = Tr.s(3952) - val ios_hub_notconnected: String get() = Tr.s(3953) - fun ios_preview_none(size: Any): String = Tr.f(3954, arrayOf(size)) - val ios_review_resolved: String get() = Tr.s(3955) - val ios_review_reopen: String get() = Tr.s(3956) - val ios_review_resolve: String get() = Tr.s(3957) - fun ios_settled_count(n: Any): String = Tr.f(3958, arrayOf(n)) - fun ios_history_count(n: Any): String = Tr.f(3959, arrayOf(n)) - fun ios_pad_colour(n: Any): String = Tr.f(3960, arrayOf(n)) - val ios_pad_pen: String get() = Tr.s(3961) - val ios_pad_box: String get() = Tr.s(3962) - val ios_pad_eraser: String get() = Tr.s(3963) - val ios_hub_restart: String get() = Tr.s(3964) - val ios_hub_refused_pairing: String get() = Tr.s(3965) - val ios_hub_asking: String get() = Tr.s(3966) - val ios_hub_restart_none: String get() = Tr.s(3967) - val ios_hub_status_fail: String get() = Tr.s(3968) - val ios_hub_sent: String get() = Tr.s(3969) - val ios_hub_refused: String get() = Tr.s(3970) - val ios_hub_cannot: String get() = Tr.s(3971) - val ios_hub_machine_unreachable: String get() = Tr.s(3972) - val ios_hub_noanswer: String get() = Tr.s(3973) - fun ios_hub_still(status: Any): String = Tr.f(3974, arrayOf(status)) - val ios_hub_waiting: String get() = Tr.s(3975) - fun ios_hub_is(status: Any): String = Tr.f(3976, arrayOf(status)) - val ios_hub_down: String get() = Tr.s(3977) - val ios_hub_up_safe_degraded: String get() = Tr.s(3978) - val ios_hub_up_degraded: String get() = Tr.s(3979) - val ios_hub_up_safe: String get() = Tr.s(3980) - val ios_hub_up: String get() = Tr.s(3981) - val ios_star: String get() = Tr.s(3982) - val ios_pad_length_example: String get() = Tr.s(3983) - val ios_pair_code_field: String get() = Tr.s(3984) - val ios_accounts: String get() = Tr.s(3985) - val ios_devices_add: String get() = Tr.s(3986) - val ios_hub_add: String get() = Tr.s(3987) - val ios_accounts_addsignin: String get() = Tr.s(3988) - val ios_devices_intro: String get() = Tr.s(3989) - val ios_project_add_first: String get() = Tr.s(3990) - val ios_settings_alerts: String get() = Tr.s(3991) - val ios_settings_sound: String get() = Tr.s(3992) - val ios_pair_ask_note: String get() = Tr.s(3993) - val ios_projects_none_note: String get() = Tr.s(3994) - val ios_review_comment_field: String get() = Tr.s(3995) - val ios_project_badge: String get() = Tr.s(3996) - val ios_order_buy: String get() = Tr.s(3997) - val ios_diff_head: String get() = Tr.s(3998) - val ios_photo_choose: String get() = Tr.s(3999) - val ios_close_lower: String get() = Tr.s(4000) - val ios_compare_close: String get() = Tr.s(4001) - val ios_badge_colour: String get() = Tr.s(4002) - val ios_pair_code_connect: String get() = Tr.s(4003) - val ios_history: String get() = Tr.s(4004) - val ios_copied: String get() = Tr.s(4005) - val ios_copy_code: String get() = Tr.s(4006) - val ios_copy_run: String get() = Tr.s(4007) - val ios_term_fullscreen: String get() = Tr.s(4008) - val ios_delete_dots: String get() = Tr.s(4009) - val ios_devices: String get() = Tr.s(4010) - val ios_pad_hint_eraser: String get() = Tr.s(4011) - val ios_pad_hint_pen: String get() = Tr.s(4012) - val ios_pad_hint_box: String get() = Tr.s(4013) - val ios_pad_paper: String get() = Tr.s(4014) - val ios_pair_invite_incomplete: String get() = Tr.s(4015) - val ios_pair_enter: String get() = Tr.s(4016) - val ios_pair_code_needhub: String get() = Tr.s(4017) - val ios_devices_none: String get() = Tr.s(4018) - val ios_invite_expired: String get() = Tr.s(4019) - val ios_invite_expires: String get() = Tr.s(4020) - val ios_project_folder: String get() = Tr.s(4021) - val ios_quiet_from: String get() = Tr.s(4022) - val ios_term_gone: String get() = Tr.s(4023) - val ios_hub: String get() = Tr.s(4024) - val ios_hub_address_field: String get() = Tr.s(4025) - val ios_badge_icon: String get() = Tr.s(4026) - val ios_improvements: String get() = Tr.s(4027) - val ios_quiet_note: String get() = Tr.s(4028) - val ios_term_end: String get() = Tr.s(4029) - val ios_browser_keys: String get() = Tr.s(4030) - val ios_devices_lastseen: String get() = Tr.s(4031) - val ios_pad_length_ask: String get() = Tr.s(4032) - val ios_licences: String get() = Tr.s(4033) - val ios_links_none: String get() = Tr.s(4034) - val ios_thread_older: String get() = Tr.s(4035) - val ios_mech_loading: String get() = Tr.s(4036) - val ios_thread_detach: String get() = Tr.s(4037) - val ios_accounts_name: String get() = Tr.s(4038) - val ios_term_newshell: String get() = Tr.s(4039) - val ios_accounts_none: String get() = Tr.s(4040) - val ios_browser_none: String get() = Tr.s(4041) - val ios_diff_none: String get() = Tr.s(4042) - val ios_review_comments_none: String get() = Tr.s(4043) - val ios_mech_none: String get() = Tr.s(4044) - val ios_projects_none: String get() = Tr.s(4045) - val ios_notconnected: String get() = Tr.s(4046) - val ios_term_none: String get() = Tr.s(4047) - val ios_threads_none: String get() = Tr.s(4048) - val ios_secret_notneeded: String get() = Tr.s(4049) - val ios_notpaired: String get() = Tr.s(4050) - val ios_send_failed: String get() = Tr.s(4051) - val ios_compare_none: String get() = Tr.s(4052) - val ios_settings_alerts_note: String get() = Tr.s(4053) - val ios_pair_howto: String get() = Tr.s(4054) - val ios_improve_github: String get() = Tr.s(4055) - val ios_signin_open: String get() = Tr.s(4056) - val ios_devices_paired: String get() = Tr.s(4057) - val ios_links: String get() = Tr.s(4058) - val ios_pair_ask: String get() = Tr.s(4059) - val ios_paste: String get() = Tr.s(4060) - val ios_signin_code_field: String get() = Tr.s(4061) - val ios_secret_value: String get() = Tr.s(4062) - val ios_viewer_picked: String get() = Tr.s(4063) - val ios_room_post: String get() = Tr.s(4064) - val ios_quiet: String get() = Tr.s(4065) - val ios_reconnect: String get() = Tr.s(4066) - val ios_picture_remove: String get() = Tr.s(4067) - val ios_project_rename: String get() = Tr.s(4068) - val ios_revoke_ask: String get() = Tr.s(4069) - val ios_revoke_link_ask: String get() = Tr.s(4070) - val ios_review_run: String get() = Tr.s(4071) - val ios_find: String get() = Tr.s(4072) - val ios_search_field: String get() = Tr.s(4073) - val ios_signin_send: String get() = Tr.s(4074) - val ios_improve_send: String get() = Tr.s(4075) - val ios_term_shell: String get() = Tr.s(4076) - val ios_thread_empty: String get() = Tr.s(4077) - val ios_improve_send_note: String get() = Tr.s(4078) - val ios_state: String get() = Tr.s(4079) - val ios_photo_take: String get() = Tr.s(4080) - val ios_terminals: String get() = Tr.s(4081) - val ios_term_screen: String get() = Tr.s(4082) - val ios_voice_spelling: String get() = Tr.s(4083) - val ios_revoke_note: String get() = Tr.s(4084) - val ios_file_unread: String get() = Tr.s(4085) - val ios_hub_proto: String get() = Tr.s(4086) - val ios_hub_forget_note: String get() = Tr.s(4087) - val ios_diff_nogit: String get() = Tr.s(4088) - val ios_thread_actions: String get() = Tr.s(4089) - val ios_quiet_to: String get() = Tr.s(4090) - val ios_pair_code_type: String get() = Tr.s(4091) - val ios_pad_undo: String get() = Tr.s(4092) - val ios_updates: String get() = Tr.s(4093) - val ios_quiet_urgent: String get() = Tr.s(4094) - val ios_use: String get() = Tr.s(4095) - val ios_pair_fresh: String get() = Tr.s(4096) - val ios_newthread_hint: String get() = Tr.s(4097) - val ios_improve_ask: String get() = Tr.s(4098) - val ios_find_field: String get() = Tr.s(4099) - val ios_browser_driving: String get() = Tr.s(4100) - val ios_ask_answer: String get() = Tr.s(4101) - val ios_pair_wrongcode: String get() = Tr.s(4102) - val ios_pair_expired: String get() = Tr.s(4103) - val ios_pair_used: String get() = Tr.s(4104) - val ios_pair_revoked: String get() = Tr.s(4105) - val ios_pair_ratelimited: String get() = Tr.s(4106) - val ios_pair_storage: String get() = Tr.s(4107) - val ios_pair_required: String get() = Tr.s(4108) - val ios_pair_unreachable: String get() = Tr.s(4109) - val ios_connecting: String get() = Tr.s(4110) - val ios_offline: String get() = Tr.s(4111) - val ios_hub_refused_plain: String get() = Tr.s(4112) - val ios_thinking: String get() = Tr.s(4113) - val ios_tab_board: String get() = Tr.s(4114) - val ios_tab_schematic: String get() = Tr.s(4115) - val ios_tab_split: String get() = Tr.s(4116) - val ios_tab_mech: String get() = Tr.s(4117) - val ios_tab_files: String get() = Tr.s(4118) - val ios_tab_diff: String get() = Tr.s(4119) - val ios_tab_review: String get() = Tr.s(4120) - val ios_tab_browser: String get() = Tr.s(4121) - val ios_review_checks: String get() = Tr.s(4122) - val ios_review_bom: String get() = Tr.s(4123) - val ios_review_comments: String get() = Tr.s(4124) - val ios_board_none: String get() = Tr.s(4125) - val ios_schematic_none: String get() = Tr.s(4126) - fun ios_term_exited(code: Any): String = Tr.f(4127, arrayOf(code)) - val ios_term_failed: String get() = Tr.s(4128) - fun ios_island_more(n: Number): String = Tr.f(4129, arrayOf(n)) - val ios_island_stale: String get() = Tr.s(4130) - fun ios_plot_previous(why: Any): String = Tr.f(4131, arrayOf(why)) - val ios_plot_decoding: String get() = Tr.s(4132) - val ios_plot_undecodable: String get() = Tr.s(4133) - val ios_plot_badref: String get() = Tr.s(4134) - val ios_plot_badmodel: String get() = Tr.s(4135) - val ios_plot_incomplete: String get() = Tr.s(4136) - val ios_plot_unexpected: String get() = Tr.s(4137) - val ios_part_bad: String get() = Tr.s(4138) - val ios_part_placement: String get() = Tr.s(4139) - val ios_part_triangles: String get() = Tr.s(4140) - val ios_part_incomplete: String get() = Tr.s(4141) - val ios_part_unexpected: String get() = Tr.s(4142) - fun ios_parts_progress(done: Number, of: Number): String = Tr.f(4143, arrayOf(done, of)) - val ios_hub_timeout: String get() = Tr.s(4144) - val ios_pair_local: String get() = Tr.s(4145) - val ios_search_messages: String get() = Tr.s(4146) - fun ios_sub_of(thread: Any): String = Tr.f(4147, arrayOf(thread)) - val ios_sub_thread: String get() = Tr.s(4148) - val ios_sub_gone: String get() = Tr.s(4149) - fun ios_sub_more(n: Number): String = Tr.f(4150, arrayOf(n)) - val ios_sub_none: String get() = Tr.s(4151) - val ios_sub_title: String get() = Tr.s(4152) - val ios_sub_tool: String get() = Tr.s(4153) - val ios_sub_reported: String get() = Tr.s(4154) - val ios_sub_ended: String get() = Tr.s(4155) - val ios_state_completed: String get() = Tr.s(4156) - val ios_handoff_open: String get() = Tr.s(4157) - fun ios_handoff_from(title: Any): String = Tr.f(4158, arrayOf(title)) - fun ios_handoff_note(note: Any): String = Tr.f(4159, arrayOf(note)) - fun ios_machine_away(label: Any): String = Tr.f(4160, arrayOf(label)) - fun ios_machine_on(machine: Any): String = Tr.f(4161, arrayOf(machine)) - fun ios_machine_runs(machine: Any): String = Tr.f(4162, arrayOf(machine)) - val ios_machine_every: String get() = Tr.s(4163) - val ios_thread_marked: String get() = Tr.s(4164) - val ios_find_bar: String get() = Tr.s(4165) - val ios_find_prev: String get() = Tr.s(4166) - val ios_find_next: String get() = Tr.s(4167) - val ios_find_close: String get() = Tr.s(4168) - fun ios_find_count(at: Number, total: Number): String = Tr.f(4169, arrayOf(at, total)) - fun ios_find_countmore(at: Number, total: Number): String = Tr.f(4170, arrayOf(at, total)) - val ios_queue_unsent: String get() = Tr.s(4171) - val ios_queue_refused: String get() = Tr.s(4172) - val ios_queue_sending: String get() = Tr.s(4173) - fun ios_newon(machine: Any): String = Tr.f(4174, arrayOf(machine)) - fun ios_newon_away(machine: Any): String = Tr.f(4175, arrayOf(machine)) - fun ios_machine_also(machines: Any): String = Tr.f(4176, arrayOf(machines)) - val ios_voice_mic_note: String get() = Tr.s(4177) - fun ios_voice_mic_note_device(device: Any): String = Tr.f(4178, arrayOf(device)) - val ios_voice_dict_empty: String get() = Tr.s(4179) - val ios_voice_learned_empty: String get() = Tr.s(4180) - val ios_voice_pebble: String get() = Tr.s(4181) - val ios_voice_pebble_note: String get() = Tr.s(4182) - val ios_devices_add_note: String get() = Tr.s(4183) - val ios_buy: String get() = Tr.s(4184) - fun ios_buy_from(price: Any): String = Tr.f(4185, arrayOf(price)) - fun ios_buy_last(price: Any): String = Tr.f(4186, arrayOf(price)) - val ios_buy_incomplete: String get() = Tr.s(4187) - val ios_improve_search: String get() = Tr.s(4188) - val android_notify_head: String get() = Tr.s(4189) - val gpui_keysheet_note: String get() = Tr.s(4190) - val gpui_keys_help: String get() = Tr.s(4191) - val gpui_f2_welcome_body: String get() = Tr.s(4192) - fun gpui_f2_data_folder_note(home: Any): String = Tr.f(4193, arrayOf(home)) - val gpui_f2_choose_another: String get() = Tr.s(4194) - val gpui_f2_usage_note: String get() = Tr.s(4195) - val gpui_f2_v014: String get() = Tr.s(4196) - val gpui_f2_v014_copied: String get() = Tr.s(4197) - fun gpui_f2_v014_found(from: Any): String = Tr.f(4198, arrayOf(from)) - val gpui_f2_agents_body: String get() = Tr.s(4199) - fun gpui_f2_installing(note: Any): String = Tr.f(4200, arrayOf(note)) - fun gpui_f2_install_failed(note: Any): String = Tr.f(4201, arrayOf(note)) - val gpui_f2_installed: String get() = Tr.s(4202) - fun gpui_f2_version(v: Any): String = Tr.f(4203, arrayOf(v)) - fun gpui_f2_v_connected(v: Any): String = Tr.f(4204, arrayOf(v)) - fun gpui_f2_v_connected_as(v: Any, who: Any): String = Tr.f(4205, arrayOf(v, who)) - val gpui_f2_i_connected: String get() = Tr.s(4206) - fun gpui_f2_i_connected_as(who: Any): String = Tr.f(4207, arrayOf(who)) - fun gpui_f2_v_notconnected(v: Any): String = Tr.f(4208, arrayOf(v)) - val gpui_f2_i_notconnected: String get() = Tr.s(4209) - fun gpui_f2_v_runcmd(v: Any, cmd: Any): String = Tr.f(4210, arrayOf(v, cmd)) - fun gpui_f2_i_runcmd(cmd: Any): String = Tr.f(4211, arrayOf(cmd)) - val gpui_f2_more_agents: String get() = Tr.s(4212) - val gpui_f2_check_after: String get() = Tr.s(4213) - val gpui_f2_tools: String get() = Tr.s(4214) - val gpui_f2_tools_body: String get() = Tr.s(4215) - fun gpui_f2_kicad_ok(v: Any, path: Any): String = Tr.f(4216, arrayOf(v, path)) - fun gpui_f2_kicad_installing(v: Any, note: Any): String = Tr.f(4217, arrayOf(v, note)) - fun gpui_f2_kicad_auto(v: Any): String = Tr.f(4218, arrayOf(v)) - val gpui_f2_kicad_nopkg: String get() = Tr.s(4219) - val gpui_f2_freecad_notfound: String get() = Tr.s(4220) - val gpui_f2_locate_kicad: String get() = Tr.s(4221) - val gpui_f2_locate_freecad: String get() = Tr.s(4222) - fun gpui_f2_locate_note(tool: Any): String = Tr.f(4223, arrayOf(tool)) - fun gpui_f2_path_to(tool: Any): String = Tr.f(4224, arrayOf(tool)) - val gpui_f2_alwayson: String get() = Tr.s(4225) - val gpui_f2_alwayson_body: String get() = Tr.s(4226) - val gpui_f2_aon_here: String get() = Tr.s(4227) - val gpui_f2_aon_here_note: String get() = Tr.s(4228) - val gpui_f2_aon_boat: String get() = Tr.s(4229) - val gpui_f2_aon_boat_note: String get() = Tr.s(4230) - val gpui_f2_aon_machine: String get() = Tr.s(4231) - val gpui_f2_aon_machine_note: String get() = Tr.s(4232) - val gpui_f2_chosen: String get() = Tr.s(4233) - val gpui_f2_choose: String get() = Tr.s(4234) - val gpui_f2_coming: String get() = Tr.s(4235) - val gpui_f2_coming_note: String get() = Tr.s(4236) - val gpui_f2_project_body: String get() = Tr.s(4237) - val gpui_f2_first_message_note: String get() = Tr.s(4238) - val gpui_f2_what_agent: String get() = Tr.s(4239) - val gpui_f2_folder_note: String get() = Tr.s(4240) - val gpui_f2_pair_phone: String get() = Tr.s(4241) - val gpui_f2_pair_phone_note: String get() = Tr.s(4242) - val gpui_f2_pair_phone_shown: String get() = Tr.s(4243) - val gpui_f2_show_code: String get() = Tr.s(4244) - val gpui_f2_done_body: String get() = Tr.s(4245) - val gpui_f2_open_uber: String get() = Tr.s(4246) - val gpui_f2_setup_phone: String get() = Tr.s(4247) - val gpui_f2_setup_five: String get() = Tr.s(4248) - fun gpui_swarm_row(n: Number, w: Number): String = Tr.f(4249, arrayOf(n, w)) - fun gpui_swarm_held(why: Any): String = Tr.f(4250, arrayOf(why)) - fun gpui_swarm_state_why(state: Any, why: Any): String = Tr.f(4251, arrayOf(state, why)) - val gpui_swarm_new: String get() = Tr.s(4252) - val gpui_swarm_add_member: String get() = Tr.s(4253) - val gpui_swarm_start: String get() = Tr.s(4254) - val gpui_swarm_topic: String get() = Tr.s(4255) - val gpui_swarm_goal: String get() = Tr.s(4256) - val gpui_swarm_seed: String get() = Tr.s(4257) - val gpui_swarm_role: String get() = Tr.s(4258) - val gpui_swarm_remove: String get() = Tr.s(4259) - val gpui_swarm_over: String get() = Tr.s(4260) - val gpui_swarm_none: String get() = Tr.s(4261) - val ios_swarm_new: String get() = Tr.s(4262) - fun ios_swarm_new_in(project: Any): String = Tr.f(4263, arrayOf(project)) - fun ios_swarm_members(n: Number): String = Tr.f(4264, arrayOf(n)) - val ios_swarm_state_paused: String get() = Tr.s(4265) - val ios_swarm_state_removed: String get() = Tr.s(4266) - val ios_swarm_tag_idea: String get() = Tr.s(4267) - val ios_swarm_tag_critique: String get() = Tr.s(4268) - val ios_swarm_tag_claim: String get() = Tr.s(4269) - val ios_swarm_tag_synthesis: String get() = Tr.s(4270) - val ios_swarm_reason_circular: String get() = Tr.s(4271) - val ios_swarm_reason_budget: String get() = Tr.s(4272) - val ios_swarm_reason_person: String get() = Tr.s(4273) - val ios_swarm_reason_chatter: String get() = Tr.s(4274) - fun ios_swarm_held(why: Any): String = Tr.f(4275, arrayOf(why)) - val ios_swarm_topic: String get() = Tr.s(4276) - val ios_swarm_goal: String get() = Tr.s(4277) - val ios_swarm_seed: String get() = Tr.s(4278) - val ios_swarm_role: String get() = Tr.s(4279) - val ios_swarm_add: String get() = Tr.s(4280) - fun ios_swarm_remove_ask(name: Any): String = Tr.f(4281, arrayOf(name)) - val ios_swarm_stop_ask: String get() = Tr.s(4282) - val ios_swarm_post: String get() = Tr.s(4283) - val ios_image_save: String get() = Tr.s(4284) - val ios_image_saved: String get() = Tr.s(4285) - val ios_image_denied: String get() = Tr.s(4286) - val ios_image_failed: String get() = Tr.s(4287) - val ios_image_incoming: String get() = Tr.s(4288) - val ios_image_loadfail: String get() = Tr.s(4289) - val ios_image_unavailable: String get() = Tr.s(4290) - val native_permission_photos_add: String get() = Tr.s(4291) - fun ios_buy_ask(project: Any): String = Tr.f(4292, arrayOf(project)) - val ios_settings_accounts_usage: String get() = Tr.s(4293) - val ios_settings_machines_devices: String get() = Tr.s(4294) - val ios_settings_alerts_on: String get() = Tr.s(4295) - val ios_settings_alerts_off: String get() = Tr.s(4296) - fun ios_settings_accounts_n(n: Number): String = Tr.f(4297, arrayOf(n)) - val hub_acct_this_hubs_sign_in: String get() = Tr.s(4298) - val hub_acct_no_usage_reading_yet: String get() = Tr.s(4299) - val hub_acct_this_hubs_claude_sign_in: String get() = Tr.s(4300) - val hub_acct_this_hubs_codex_sign_in: String get() = Tr.s(4301) - val hub_acct_claude_cli_login: String get() = Tr.s(4302) - val hub_acct_codex_cli_login: String get() = Tr.s(4303) - val hub_acct_fable_weekly: String get() = Tr.s(4304) - fun ios_acct_also(names: Any): String = Tr.f(4305, arrayOf(names)) - val ios_clone_mode: String get() = Tr.s(4306) - val ios_clone_repo_hint: String get() = Tr.s(4307) - val ios_clone_signin: String get() = Tr.s(4308) - val ios_clone_change: String get() = Tr.s(4309) - val ios_clone_name: String get() = Tr.s(4310) - val ios_clone_thread: String get() = Tr.s(4311) - val ios_clone_go: String get() = Tr.s(4312) - fun ios_clone_into(dest: Any): String = Tr.f(4313, arrayOf(dest)) - val ios_clone_same: String get() = Tr.s(4314) - fun ios_clone_title(repo: Any): String = Tr.f(4315, arrayOf(repo)) - fun ios_clone_cloned(repo: Any): String = Tr.f(4316, arrayOf(repo)) - val ios_clone_cancelled: String get() = Tr.s(4317) - fun ios_clone_code(url: Any): String = Tr.f(4318, arrayOf(url)) - val ios_clone_signin_starting: String get() = Tr.s(4319) - val ios_clone_signin_done: String get() = Tr.s(4320) - val ios_clone_signin_open: String get() = Tr.s(4321) - val ios_clone_loading: String get() = Tr.s(4322) - val mobile_tab_inbox: String get() = Tr.s(4323) - val mobile_tab_crew: String get() = Tr.s(4324) - val mobile_tab_bench: String get() = Tr.s(4325) - val mobile_inbox_clear: String get() = Tr.s(4326) - val mobile_inbox_clear_note: String get() = Tr.s(4327) - val mobile_inbox_talk_bub: String get() = Tr.s(4328) - val mobile_inbox_jump_in: String get() = Tr.s(4329) - val mobile_inbox_open_bench: String get() = Tr.s(4330) - val mobile_badge_pcb: String get() = Tr.s(4331) - val mobile_pill_waiting: String get() = Tr.s(4332) - fun mobile_snooze_wakes(time: Any): String = Tr.f(4333, arrayOf(time)) - val mobile_bench_all: String get() = Tr.s(4334) - val mobile_snooze_for: String get() = Tr.s(4335) - val sidebar_sections_needs: String get() = Tr.s(4336) - val sidebar_sections_pinned: String get() = Tr.s(4337) - val sidebar_sections_active: String get() = Tr.s(4338) - val sidebar_sections_quiet: String get() = Tr.s(4339) - val sidebar_sections_quiet_hint: String get() = Tr.s(4340) - val sidebar_sections_running_word: String get() = Tr.s(4341) - val sidebar_sections_recent: String get() = Tr.s(4342) - val sidebar_sections_limit: String get() = Tr.s(4343) - val sidebar_sections_cut: String get() = Tr.s(4344) - val sidebar_sections_monitoring: String get() = Tr.s(4345) - val sidebar_sections_stopped: String get() = Tr.s(4346) - val sidebar_sections_done: String get() = Tr.s(4347) - val sidebar_sections_failed: String get() = Tr.s(4348) - val sidebar_sections_rename: String get() = Tr.s(4349) - val sidebar_sections_pin: String get() = Tr.s(4350) - val sidebar_sections_unpin: String get() = Tr.s(4351) - val sidebar_sections_quiet_make: String get() = Tr.s(4352) - val sidebar_sections_quiet_back: String get() = Tr.s(4353) - val sidebar_sections_quiet_hint2: String get() = Tr.s(4354) - fun gpui_sections_move_to(group: Any): String = Tr.f(4355, arrayOf(group)) - val sidebar_sections_move: String get() = Tr.s(4356) - val sidebar_sections_new_group: String get() = Tr.s(4357) - val sidebar_sections_new_group_title: String get() = Tr.s(4358) - fun sidebar_sections_remove_ask(project: Any): String = Tr.f(4359, arrayOf(project)) - fun gpui_sections_running(n: Number): String = Tr.f(4360, arrayOf(n)) - fun gpui_sections_rest(n: Number): String = Tr.f(4361, arrayOf(n)) - fun gpui_projects_mech(n: Any): String = Tr.f(4362, arrayOf(n)) - val gpui_open_folder: String get() = Tr.s(4363) - val gpui_picker_none: String get() = Tr.s(4364) - val gpui_picker_key_select: String get() = Tr.s(4365) - val gpui_picker_key_into: String get() = Tr.s(4366) - val gpui_picker_key_complete: String get() = Tr.s(4367) - val gpui_picker_key_open: String get() = Tr.s(4368) - val gpui_picker_added: String get() = Tr.s(4369) - fun gpui_picker_more_typed(n: Any): String = Tr.f(4370, arrayOf(n)) - val gpui_clone_tab: String get() = Tr.s(4371) - val gpui_clone_change: String get() = Tr.s(4372) - val gpui_clone_thread: String get() = Tr.s(4373) - val gpui_clone_retry: String get() = Tr.s(4374) - val gpui_clone_signin: String get() = Tr.s(4375) - val gpui_clone_back: String get() = Tr.s(4376) - val gpui_clone_open_thread: String get() = Tr.s(4377) - val gpui_clone_open_project: String get() = Tr.s(4378) - val gpui_clone_private: String get() = Tr.s(4379) - val gpui_clone_loading: String get() = Tr.s(4380) - val gpui_clone_signin_list: String get() = Tr.s(4381) - val gpui_clone_signin_code: String get() = Tr.s(4382) - val gpui_clone_signin_asking: String get() = Tr.s(4383) - val gpui_clone_signin_done: String get() = Tr.s(4384) - val gpui_clone_cancel: String get() = Tr.s(4385) - val gpui_picker_key_pick: String get() = Tr.s(4386) - val gpui_clone_phase_connecting: String get() = Tr.s(4387) - val gpui_clone_phase_receiving: String get() = Tr.s(4388) - val gpui_clone_phase_resolving: String get() = Tr.s(4389) - val gpui_clone_phase_updating: String get() = Tr.s(4390) - val gpui_clone_phase_counting: String get() = Tr.s(4391) - val gpui_clone_phase_compressing: String get() = Tr.s(4392) - val gpui_clone_phase_lfs: String get() = Tr.s(4393) - val gpui_clone_phase_adding: String get() = Tr.s(4394) - val gpui_clone_phase_starting: String get() = Tr.s(4395) - val gpui_assembly: String get() = Tr.s(4396) - val gpui_mech: String get() = Tr.s(4397) - val gpui_readme: String get() = Tr.s(4398) - val gpui_board: String get() = Tr.s(4399) - val gpui_schematic: String get() = Tr.s(4400) - val gpui_view_three_d: String get() = Tr.s(4401) - val gpui_files: String get() = Tr.s(4402) - val gpui_usage_bot: String get() = Tr.s(4403) - val gpui_usage_tokens: String get() = Tr.s(4404) - val gpui_usage_accounts_tip: String get() = Tr.s(4405) - val gpui_usage_feeds: String get() = Tr.s(4406) - val gpui_usage_lanes: String get() = Tr.s(4407) - val gpui_usage_turn_live: String get() = Tr.s(4408) - val gpui_usage_chat: String get() = Tr.s(4409) - val gpui_usage_today: String get() = Tr.s(4410) - val gpui_usage_prefs: String get() = Tr.s(4411) - val gpui_usage_handover: String get() = Tr.s(4412) - val gpui_usage_none_waiting: String get() = Tr.s(4413) - val gpui_usage_session: String get() = Tr.s(4414) - val gpui_usage_last_handover: String get() = Tr.s(4415) - val gpui_usage_triage: String get() = Tr.s(4416) - val gpui_usage_office: String get() = Tr.s(4417) - val gpui_usage_office_lower: String get() = Tr.s(4418) - val gpui_usage_compact: String get() = Tr.s(4419) - val gpui_usage_switch: String get() = Tr.s(4420) - val gpui_usage_note: String get() = Tr.s(4421) - val gpui_usage_lanes_note: String get() = Tr.s(4422) - val gpui_usage_lanes_routines: String get() = Tr.s(4423) - val gpui_usage_turns_many: String get() = Tr.s(4424) - val gpui_usage_turns_full: String get() = Tr.s(4425) - val gpui_usage_turns_one: String get() = Tr.s(4426) - fun gpui_usage_turns_n(n: Any): String = Tr.f(4427, arrayOf(n)) - fun gpui_usage_left(n: Any): String = Tr.f(4428, arrayOf(n)) - fun gpui_usage_of(a: Any, b: Any): String = Tr.f(4429, arrayOf(a, b)) - fun gpui_usage_context(n: Any): String = Tr.f(4430, arrayOf(n)) - val gpui_usage_noread: String get() = Tr.s(4431) - fun gpui_mgmt_bom_summary(parts: Number, lines: Number): String = Tr.f(4432, arrayOf(parts, lines)) - fun gpui_mgmt_bom_more(n: Number): String = Tr.f(4433, arrayOf(n)) - val gpui_mgmt_dock_right: String get() = Tr.s(4434) - val gpui_mgmt_dock_bottom: String get() = Tr.s(4435) - val gpui_mgmt_close: String get() = Tr.s(4436) - val gpui_mgmt_bom_saved: String get() = Tr.s(4437) - val gpui_mgmt_bom_reading: String get() = Tr.s(4438) - val gpui_mgmt_bom_nomatch: String get() = Tr.s(4439) - val gpui_mgmt_bom_nompn: String get() = Tr.s(4440) - val gpui_mgmt_filter: String get() = Tr.s(4441) - val gpui_mgmt_bom_noparts: String get() = Tr.s(4442) - val gpui_mgmt_bom_dnp: String get() = Tr.s(4443) - val gpui_mgmt_fab_tab: String get() = Tr.s(4444) - val gpui_mgmt_fab_drc_current: String get() = Tr.s(4445) - val gpui_mgmt_fab_drc_stale: String get() = Tr.s(4446) - val gpui_mgmt_fab_drc_update: String get() = Tr.s(4447) - val gpui_mgmt_fab_drc_none: String get() = Tr.s(4448) - val gpui_mgmt_fab_drc_write: String get() = Tr.s(4449) - val gpui_mgmt_fab_drc_noproject: String get() = Tr.s(4450) - val gpui_mgmt_fab_tier_extra: String get() = Tr.s(4451) - val gpui_mgmt_fab_tier_free: String get() = Tr.s(4452) - val gpui_mgmt_fab_reading: String get() = Tr.s(4453) - val gpui_mgmt_fab_thefab: String get() = Tr.s(4454) - val gpui_mgmt_fab_refresh: String get() = Tr.s(4455) - val gpui_mgmt_fab_apply: String get() = Tr.s(4456) - val gpui_mgmt_fab_changed: String get() = Tr.s(4457) - val gpui_mgmt_fab_seen: String get() = Tr.s(4458) - val gpui_mgmt_fab_limit: String get() = Tr.s(4459) - val gpui_mgmt_fab_free: String get() = Tr.s(4460) - val gpui_mgmt_fab_extra: String get() = Tr.s(4461) - val gpui_mgmt_fab_readcol: String get() = Tr.s(4462) - val gpui_mgmt_fab_derived: String get() = Tr.s(4463) - fun gpui_mgmt_fab_suggestion(what: Any, project: Any, fab: Any): String = Tr.f(4464, arrayOf(what, project, fab)) - fun gpui_mgmt_fab_read(rev: Any, day: Any): String = Tr.f(4465, arrayOf(rev, day)) - val gpui_mgmt_fab_reviewing: String get() = Tr.s(4466) - val gpui_mgmt_fab_noreview: String get() = Tr.s(4467) - val gpui_mgmt_fab_findings: String get() = Tr.s(4468) - val gpui_mgmt_fab_reviewbtn: String get() = Tr.s(4469) - val gpui_mgmt_fab_judge: String get() = Tr.s(4470) - val gpui_mgmt_plan_reading: String get() = Tr.s(4471) - val gpui_mgmt_plan_none: String get() = Tr.s(4472) - fun gpui_mgmt_plan_awaiting(n: Number): String = Tr.f(4473, arrayOf(n)) - val gpui_mgmt_plan_nothing: String get() = Tr.s(4474) - val gpui_mgmt_plan_saved: String get() = Tr.s(4475) - val gpui_mgmt_plan_all: String get() = Tr.s(4476) - val gpui_mgmt_plan_stop: String get() = Tr.s(4477) - val gpui_mgmt_plan_hide: String get() = Tr.s(4478) - val gpui_mgmt_plan_show: String get() = Tr.s(4479) - val gpui_mgmt_plan_done: String get() = Tr.s(4480) - val gpui_mgmt_plan_layer: String get() = Tr.s(4481) - val gpui_mgmt_plan_reject: String get() = Tr.s(4482) - val gpui_mgmt_plan_keysnote: String get() = Tr.s(4483) - fun gpui_mgmt_plan_reference(layer: Any): String = Tr.f(4484, arrayOf(layer)) - fun gpui_mgmt_plan_nets(n: Number): String = Tr.f(4485, arrayOf(n)) - val gpui_mgmt_plan_tab: String get() = Tr.s(4486) - val gpui_mgmt_plan_before: String get() = Tr.s(4487) - val gpui_mgmt_plan_onwords: String get() = Tr.s(4488) - val gpui_mgmt_plan_offwords: String get() = Tr.s(4489) - fun gpui_mgmt_plan_elsewhere(board: Any): String = Tr.f(4490, arrayOf(board)) - val gpui_mgmt_plan_openboard: String get() = Tr.s(4491) - val gpui_mgmt_plan_noboard: String get() = Tr.s(4492) - val gpui_mgmt_plan_drawn: String get() = Tr.s(4493) - val gpui_pick_planonce: String get() = Tr.s(4494) - val gpui_pick_planonce_note: String get() = Tr.s(4495) - val hub_view_board_unlisted: String get() = Tr.s(4496) - val gpui_mgmt_bom_stocknote: String get() = Tr.s(4497) - val hub_order_pick_more: String get() = Tr.s(4498) - val hub_order_pick_phone: String get() = Tr.s(4499) - val hub_order_pick_go: String get() = Tr.s(4500) - val gpui_plan_before_routing_desc: String get() = Tr.s(4501) - fun gpui_mgmt_bom_shared(others: Any): String = Tr.f(4502, arrayOf(others)) - fun gpui_mgmt_fab_review(must: Any, should: Any, notes: Any): String = Tr.f(4503, arrayOf(must, should, notes)) - fun gpui_mgmt_fab_stackup(id: Any, w: Any): String = Tr.f(4504, arrayOf(id, w)) - val gpui_mgmt_fab_proposed: String get() = Tr.s(4505) - val gpui_mgmt_fab_use: String get() = Tr.s(4506) - val gpui_keys_mgmt_bom: String get() = Tr.s(4507) - val gpui_keys_mgmt_checks: String get() = Tr.s(4508) - val gpui_keys_mgmt_life: String get() = Tr.s(4509) - val gpui_mgmt_checks_reading: String get() = Tr.s(4510) - val gpui_mgmt_checks_searching: String get() = Tr.s(4511) - val gpui_mgmt_checks_run: String get() = Tr.s(4512) - val gpui_mgmt_checks_running: String get() = Tr.s(4513) - fun gpui_mgmt_checks_behind(what: Any): String = Tr.f(4514, arrayOf(what)) - val gpui_mgmt_checks_stale: String get() = Tr.s(4515) - val gpui_mgmt_checks_liveunsaved: String get() = Tr.s(4516) - fun gpui_mgmt_checks_waiting(why: Any): String = Tr.f(4517, arrayOf(why)) - fun gpui_mgmt_checks_failed(why: Any): String = Tr.f(4518, arrayOf(why)) - val gpui_mgmt_checks_all: String get() = Tr.s(4519) - val gpui_mgmt_checks_errors: String get() = Tr.s(4520) - val gpui_mgmt_checks_warnings: String get() = Tr.s(4521) - val gpui_mgmt_checks_excluded: String get() = Tr.s(4522) - val gpui_mgmt_checks_fix: String get() = Tr.s(4523) - val gpui_mgmt_checks_reexport: String get() = Tr.s(4524) - fun gpui_mgmt_checks_more(n: Number): String = Tr.f(4525, arrayOf(n)) - val gpui_mgmt_checks_fewer: String get() = Tr.s(4526) - val gpui_mgmt_checks_none: String get() = Tr.s(4527) - val gpui_mgmt_checks_nomatch: String get() = Tr.s(4528) - val gpui_mgmt_checks_library: String get() = Tr.s(4529) - val gpui_mgmt_checks_withlib: String get() = Tr.s(4530) - val gpui_mgmt_checks_fullrun: String get() = Tr.s(4531) - val gpui_mgmt_checks_allsources: String get() = Tr.s(4532) - val gpui_mgmt_checks_judged: String get() = Tr.s(4533) - val gpui_mgmt_bom_dnp_tip: String get() = Tr.s(4534) - val gpui_mgmt_bom_writing: String get() = Tr.s(4535) - val gpui_mgmt_bom_inkicad: String get() = Tr.s(4536) - val gpui_mgmt_bom_saved_file: String get() = Tr.s(4537) - val gpui_mgmt_bom_fab: String get() = Tr.s(4538) - val gpui_mgmt_bom_mpn_ph: String get() = Tr.s(4539) - val gpui_mgmt_bom_fab_ph: String get() = Tr.s(4540) - fun gpui_mgmt_bom_each(price: Any, n: Any): String = Tr.f(4541, arrayOf(price, n)) - fun gpui_mgmt_bom_out(n: Any, need: Any): String = Tr.f(4542, arrayOf(n, need)) - fun gpui_mgmt_bom_low(n: Any): String = Tr.f(4543, arrayOf(n)) - fun gpui_mgmt_bom_in(n: Any): String = Tr.f(4544, arrayOf(n)) - fun gpui_mgmt_bom_cost(cost: Any): String = Tr.f(4545, arrayOf(cost)) - fun gpui_mgmt_bom_cost_least(cost: Any): String = Tr.f(4546, arrayOf(cost)) - val gpui_mgmt_bom_checking: String get() = Tr.s(4547) - val gpui_mgmt_bom_notknown: String get() = Tr.s(4548) - val gpui_mgmt_bom_stock: String get() = Tr.s(4549) - val gpui_mgmt_bom_alts: String get() = Tr.s(4550) - val gpui_mgmt_bom_alts_looking: String get() = Tr.s(4551) - val gpui_mgmt_bom_alts_none: String get() = Tr.s(4552) - val gpui_mgmt_bom_alts_use: String get() = Tr.s(4553) - val gpui_mgmt_bom_class_basic: String get() = Tr.s(4554) - val gpui_mgmt_bom_class_extended: String get() = Tr.s(4555) - val gpui_mgmt_bom_class_preferred: String get() = Tr.s(4556) - val gpui_mgmt_bom_notinstock: String get() = Tr.s(4557) - val gpui_mgmt_bom_off: String get() = Tr.s(4558) - fun gpui_mgmt_life_since(day: Any, n: Number): String = Tr.f(4559, arrayOf(day, n)) - fun gpui_mgmt_life_one(day: Any): String = Tr.f(4560, arrayOf(day)) - fun gpui_mgmt_life_now(cost: Any, n: Any, lines: Any): String = Tr.f(4561, arrayOf(cost, n, lines)) - fun gpui_mgmt_life_part_now(stock: Any, price: Any): String = Tr.f(4562, arrayOf(stock, price)) - fun gpui_mgmt_life_instock(lines: Any): String = Tr.f(4563, arrayOf(lines)) - val gpui_mgmt_life_board: String get() = Tr.s(4564) - val gpui_mgmt_life_price: String get() = Tr.s(4565) - val gpui_mgmt_life_active: String get() = Tr.s(4566) - val gpui_mgmt_life_nrnd: String get() = Tr.s(4567) - val gpui_mgmt_life_eol: String get() = Tr.s(4568) - val gpui_mgmt_life_unknown: String get() = Tr.s(4569) - val gpui_mgmt_life_nolines: String get() = Tr.s(4570) - val gpui_mgmt_life_noread: String get() = Tr.s(4571) - val gpui_mgmt_life_reading: String get() = Tr.s(4572) - val gpui_mgmt_life_nopart: String get() = Tr.s(4573) - val gpui_mgmt_life_tab: String get() = Tr.s(4574) - val gpui_mgmt_bom_paused: String get() = Tr.s(4575) - val gpui_mgmt_bom_paused_tip: String get() = Tr.s(4576) - val gpui_keys_mgmt_fab: String get() = Tr.s(4577) - val gpui_mgmt_bom_putback: String get() = Tr.s(4578) - val gpui_mgmt_bom_nochange: String get() = Tr.s(4579) - val gpui_mgmt_bom_deferred: String get() = Tr.s(4580) - val gpui_mgmt_bom_inkicad_save: String get() = Tr.s(4581) - val gpui_mgmt_bom_undo_tip: String get() = Tr.s(4582) - val gpui_mgmt_bom_undo: String get() = Tr.s(4583) - fun gpui_mgmt_checks_on(host: Any): String = Tr.f(4584, arrayOf(host)) - val gpui_gerbers: String get() = Tr.s(4585) - val gpui_gerbers_vs: String get() = Tr.s(4586) - val gpui_gerbers_vs_tip: String get() = Tr.s(4587) - val gpui_gerbers_gerbview: String get() = Tr.s(4588) - val gpui_gerbers_gerbview_tip: String get() = Tr.s(4589) - val gpui_mgmt_bom_saved_state: String get() = Tr.s(4590) - val gpui_mgmt_bom_live_tip: String get() = Tr.s(4591) - val gpui_mgmt_bom_saved_tip: String get() = Tr.s(4592) - val gpui_mgmt_bom_price: String get() = Tr.s(4593) - val gpui_mgmt_bom_class: String get() = Tr.s(4594) - fun gpui_mgmt_life_unknown_n(n: Any): String = Tr.f(4595, arrayOf(n)) - fun gpui_mgmt_life_unknown_tip(a: Any, b: Any): String = Tr.f(4596, arrayOf(a, b)) - fun gpui_mgmt_bom_stock_out(n: Any): String = Tr.f(4597, arrayOf(n)) - fun gpui_mgmt_bom_stock_low(n: Any): String = Tr.f(4598, arrayOf(n)) - val gpui_gerbers_boardonly: String get() = Tr.s(4599) - val gpui_gerbers_gerbersonly: String get() = Tr.s(4600) - fun gpui_mgmt_life_price_since(day: Any): String = Tr.f(4601, arrayOf(day)) - fun gpui_streamer_account(n: Any): String = Tr.f(4602, arrayOf(n)) - val gpui_streamer_mode: String get() = Tr.s(4603) - val gpui_streamer_section: String get() = Tr.s(4604) - val gpui_streamer_off: String get() = Tr.s(4605) - val gpui_streamer_on: String get() = Tr.s(4606) - val gpui_streamer_tip: String get() = Tr.s(4607) - val gpui_streamer_shared: String get() = Tr.s(4608) - val gpui_streamer_qr: String get() = Tr.s(4609) - val gpui_streamer_note: String get() = Tr.s(4610) - val gpui_streamer_share: String get() = Tr.s(4611) - val gpui_streamer_apps: String get() = Tr.s(4612) - val gpui_streamer_apps_note: String get() = Tr.s(4613) - val gpui_streamer_linux: String get() = Tr.s(4614) - val gpui_streamer_mac: String get() = Tr.s(4615) - val gpui_streamer_win: String get() = Tr.s(4616) - val gpui_f2_uber_title: String get() = Tr.s(4617) - val gpui_f2_uber_body: String get() = Tr.s(4618) - val gpui_f2_uber_say: String get() = Tr.s(4619) - val gpui_f2_uber_here: String get() = Tr.s(4620) - val gpui_f2_uber_err_name: String get() = Tr.s(4621) - val gpui_f2_uber_err_color: String get() = Tr.s(4622) - val gpui_f2_uber_color: String get() = Tr.s(4623) - val gpui_f2_uber_own: String get() = Tr.s(4624) - val gpui_f2_uber_custom: String get() = Tr.s(4625) - val gpui_f2_uber_hex: String get() = Tr.s(4626) - val gpui_f2_uber_use: String get() = Tr.s(4627) - val gpui_f2_uber_shuffle: String get() = Tr.s(4628) - val gpui_f2_uber_auto: String get() = Tr.s(4629) - val gpui_f2_uber_savename: String get() = Tr.s(4630) - val gpui_f2_uber_p_ginger: String get() = Tr.s(4631) - val gpui_f2_uber_p_cream: String get() = Tr.s(4632) - val gpui_f2_uber_p_smoke: String get() = Tr.s(4633) - val gpui_f2_uber_p_midnight: String get() = Tr.s(4634) - val gpui_f2_uber_p_cocoa: String get() = Tr.s(4635) - val gpui_f2_uber_p_sky: String get() = Tr.s(4636) - val gpui_f2_uber_p_lilac: String get() = Tr.s(4637) - val gpui_f2_uber_p_rose: String get() = Tr.s(4638) - val gpui_f2_uber_p_mint: String get() = Tr.s(4639) - val gpui_f2_uber_p_cherry: String get() = Tr.s(4640) - val gpui_simulation: String get() = Tr.s(4641) - val gpui_c_sheets_find: String get() = Tr.s(4642) - fun history_snap(turn: Any): String = Tr.f(4643, arrayOf(turn)) - val history_ref_snap: String get() = Tr.s(4644) - val thread_restore_action: String get() = Tr.s(4645) - val thread_restore_ask: String get() = Tr.s(4646) - val thread_restore_note: String get() = Tr.s(4647) - val thread_restore_go: String get() = Tr.s(4648) - val mouse_mouseandtrackpad0: String get() = Tr.s(4649) - val mouse_zoomdirection1: String get() = Tr.s(4650) - val mouse_appliestothewheelandatrackpads2: String get() = Tr.s(4651) - val mouse_normal3: String get() = Tr.s(4652) - val mouse_inverted4: String get() = Tr.s(4653) - val mouse_boardandschematic5: String get() = Tr.s(4654) - val mouse_k3dandstep6: String get() = Tr.s(4655) - val mouse_changedfromitspreseteachinputd7: String get() = Tr.s(4656) - val mouse_apresetsetseveryinputbeloweach8: String get() = Tr.s(4657) - val mouse_legacy10: String get() = Tr.s(4658) - val mouse_leftdrag11: String get() = Tr.s(4659) - val mouse_middledrag12: String get() = Tr.s(4660) - val mouse_rightdrag13: String get() = Tr.s(4661) - val mouse_shiftleftdrag14: String get() = Tr.s(4662) - val mouse_ctrlleftdrag15: String get() = Tr.s(4663) - val mouse_altleftdrag16: String get() = Tr.s(4664) - val mouse_wheel17: String get() = Tr.s(4665) - val mouse_shiftwheel18: String get() = Tr.s(4666) - val mouse_ctrlwheel19: String get() = Tr.s(4667) - val mouse_altwheel20: String get() = Tr.s(4668) - val mouse_nothing21: String get() = Tr.s(4669) - val mouse_pan22: String get() = Tr.s(4670) - val mouse_pansideways23: String get() = Tr.s(4671) - val mouse_panupanddown24: String get() = Tr.s(4672) - val mouse_zoom25: String get() = Tr.s(4673) - val mouse_rotate26: String get() = Tr.s(4674) - val mouse_roll27: String get() = Tr.s(4675) - val mouse_select28: String get() = Tr.s(4676) - val mouse_aclickwithoutmovingwithnokeyhe29: String get() = Tr.s(4677) - val mouse_leftbutton30: String get() = Tr.s(4678) - val mouse_middlebutton31: String get() = Tr.s(4679) - val mouse_rightbutton32: String get() = Tr.s(4680) - val mouse_twofingerscroll33: String get() = Tr.s(4681) - val mouse_atrackpadstwofingerswithctrlhe34: String get() = Tr.s(4682) - val mouse_pans35: String get() = Tr.s(4683) - val mouse_isthewheel36: String get() = Tr.s(4684) - val mouse_pinch37: String get() = Tr.s(4685) - val mouse_atrackpadpinch38: String get() = Tr.s(4686) - val mouse_zooms39: String get() = Tr.s(4687) - val mouse_chooseaninputforitabove41: String get() = Tr.s(4688) - val mouse_nothingissettopan42: String get() = Tr.s(4689) - val mouse_nothingissettozoom43: String get() = Tr.s(4690) - val mouse_nothingissettorotate44: String get() = Tr.s(4691) - val gpui_review_mark: String get() = Tr.s(4692) - val gpui_review_mark_tip: String get() = Tr.s(4693) - val gpui_review_why: String get() = Tr.s(4694) - val gpui_review_allow: String get() = Tr.s(4695) - val gpui_review_allow_tip: String get() = Tr.s(4696) - val gpui_review_off: String get() = Tr.s(4697) - val gpui_review_again: String get() = Tr.s(4698) - val gpui_review_again_tip: String get() = Tr.s(4699) - val gpui_rail_no_board: String get() = Tr.s(4700) - val gpui_rail_no_schematic: String get() = Tr.s(4701) - val gpui_rail_split_needs_both: String get() = Tr.s(4702) - val gpui_rail_no_mech: String get() = Tr.s(4703) - val gpui_panestate_next_board: String get() = Tr.s(4704) - val gpui_panestate_next_schematic: String get() = Tr.s(4705) - val gpui_panestate_next_solid: String get() = Tr.s(4706) - val gpui_panestate_empty_gerbers: String get() = Tr.s(4707) - val gpui_panestate_next_gerbers: String get() = Tr.s(4708) - val gpui_panestate_gerbers_noboard: String get() = Tr.s(4709) - val gpui_panestate_gerbers_noboard_next: String get() = Tr.s(4710) - val gpui_panestate_empty_mech: String get() = Tr.s(4711) - val gpui_panestate_next_mech: String get() = Tr.s(4712) - val gpui_panestate_loading_split: String get() = Tr.s(4713) - val gpui_panestate_retrying: String get() = Tr.s(4714) - val gpui_hub_view_notready: String get() = Tr.s(4715) - val gpui_hub_view_staleconn: String get() = Tr.s(4716) - val gpui_hub_view_unavailable: String get() = Tr.s(4717) - val settings_designmode_label: String get() = Tr.s(4718) - val settings_designmode_viewer: String get() = Tr.s(4719) - val settings_designmode_kicad: String get() = Tr.s(4720) - val settings_designmode_note: String get() = Tr.s(4721) - val review_empty_title: String get() = Tr.s(4722) - val review_empty_next: String get() = Tr.s(4723) - val viewer_diff_threadchanges: String get() = Tr.s(4724) - val viewer_layout_refusal_locked: String get() = Tr.s(4725) - val viewer_layout_refusal_toosmall: String get() = Tr.s(4726) - val viewer_layout_refusal_onekicad: String get() = Tr.s(4727) - val viewer_layout_refusal_incompatibleoverlay: String get() = Tr.s(4728) - val viewer_layout_refusal_notfound: String get() = Tr.s(4729) - val viewer_layout_refusal_nooverlay: String get() = Tr.s(4730) - val viewer_layout_refusal_invalidsource: String get() = Tr.s(4731) - val viewer_layout_refusal_sametile: String get() = Tr.s(4732) - val viewer_layout_refusal_invalidratio: String get() = Tr.s(4733) - val viewer_layout_refusal_duplicateid: String get() = Tr.s(4734) - val viewer_layout_refusal_unknownframe: String get() = Tr.s(4735) - val viewer_layout_refusal_invalidinput: String get() = Tr.s(4736) - val viewer_layout_refusal_toomany: String get() = Tr.s(4737) - val viewer_layout_refusal_toomanysources: String get() = Tr.s(4738) - val viewer_layout_refusal_unresolvedversion: String get() = Tr.s(4739) - val viewer_layout_refusal_nohistory: String get() = Tr.s(4740) - val viewer_layout_refusal_linked: String get() = Tr.s(4741) - val viewer_layout_refusal_notondevice: String get() = Tr.s(4742) - val viewer_layout_refusal_starting: String get() = Tr.s(4743) - val viewer_footprinteditor: String get() = Tr.s(4744) - val viewer_symboleditor: String get() = Tr.s(4745) - val web_clone_tab: String get() = Tr.s(4746) - val web_clone_repo_placeholder: String get() = Tr.s(4747) - val web_clone_private: String get() = Tr.s(4748) - val web_clone_signin: String get() = Tr.s(4749) - val web_clone_signin_wait: String get() = Tr.s(4750) - val web_clone_signin_enter: String get() = Tr.s(4751) - val web_clone_signin_done: String get() = Tr.s(4752) - val web_clone_copied: String get() = Tr.s(4753) - val web_clone_change_folder: String get() = Tr.s(4754) - val web_clone_folder_name: String get() = Tr.s(4755) - val web_clone_start_thread: String get() = Tr.s(4756) - fun web_clone_first(text: Any): String = Tr.f(4757, arrayOf(text)) - val web_clone_same: String get() = Tr.s(4758) - val web_clone_go: String get() = Tr.s(4759) - fun web_clone_cloning(repo: Any, dest: Any): String = Tr.f(4760, arrayOf(repo, dest)) - fun web_clone_cloned(repo: Any, dest: Any): String = Tr.f(4761, arrayOf(repo, dest)) - fun web_clone_stopped(repo: Any): String = Tr.f(4762, arrayOf(repo)) - val web_clone_retry: String get() = Tr.s(4763) - val web_clone_back: String get() = Tr.s(4764) - val web_clone_open_thread: String get() = Tr.s(4765) - val web_clone_open_project: String get() = Tr.s(4766) - fun web_clone_add_dir(dir: Any): String = Tr.f(4767, arrayOf(dir)) - fun web_clone_use_dir(dir: Any): String = Tr.f(4768, arrayOf(dir)) - val web_clone_up: String get() = Tr.s(4769) - val web_clone_loading: String get() = Tr.s(4770) - val web_clone_no_folders: String get() = Tr.s(4771) - fun gpui_c_kicad_opening(editor: Any, job: Any, secs: Any): String = Tr.f(4772, arrayOf(editor, job, secs)) - fun gpui_c_kicad_openingbare(editor: Any, secs: Any): String = Tr.f(4773, arrayOf(editor, secs)) - fun gpui_c_kicad_openfailed(editor: Any): String = Tr.f(4774, arrayOf(editor)) - val viewer_tile_rail_add: String get() = Tr.s(4775) - val viewer_tile_add: String get() = Tr.s(4776) - val viewer_tile_maximize: String get() = Tr.s(4777) - val viewer_tile_restore: String get() = Tr.s(4778) - val viewer_tile_focus: String get() = Tr.s(4779) - val viewer_tile_embedded: String get() = Tr.s(4780) - val viewer_tile_simulation_single: String get() = Tr.s(4781) - val viewer_tile_add_tip: String get() = Tr.s(4782) - val viewer_tile_left: String get() = Tr.s(4783) - val viewer_tile_right: String get() = Tr.s(4784) - val viewer_tile_top: String get() = Tr.s(4785) - val viewer_tile_bottom: String get() = Tr.s(4786) - val web_pair_subtitle: String get() = Tr.s(4787) - val web_pair_name: String get() = Tr.s(4788) - val web_pair_request: String get() = Tr.s(4789) - val web_pair_code: String get() = Tr.s(4790) - fun web_pair_approve_in(time: Any): String = Tr.f(4791, arrayOf(time)) - val web_pair_expired: String get() = Tr.s(4792) - val web_pair_approved: String get() = Tr.s(4793) - val web_pair_denied: String get() = Tr.s(4794) - val web_pair_cancelled: String get() = Tr.s(4795) - val web_pair_requesting: String get() = Tr.s(4796) - fun web_pair_failed(status: Any): String = Tr.f(4797, arrayOf(status)) - val web_pair_ratelimited: String get() = Tr.s(4798) - val web_pair_nocode: String get() = Tr.s(4799) - val web_pair_unreachable: String get() = Tr.s(4800) - val web_chat_loading: String get() = Tr.s(4801) - val web_chat_choose: String get() = Tr.s(4802) - val web_chat_empty: String get() = Tr.s(4803) - val web_chat_streaming: String get() = Tr.s(4804) - fun web_chat_finished(time: Any): String = Tr.f(4805, arrayOf(time)) - fun web_chat_finished_dur(time: Any, dur: Any): String = Tr.f(4806, arrayOf(time, dur)) - val web_chat_answer_placeholder: String get() = Tr.s(4807) - val web_chat_answer_btn: String get() = Tr.s(4808) - fun web_chat_answered(answer: Any): String = Tr.f(4809, arrayOf(answer)) - val web_chat_review_mode: String get() = Tr.s(4810) - val web_composer_attach: String get() = Tr.s(4811) - val web_composer_voice: String get() = Tr.s(4812) - fun web_composer_unsupported(type: Any): String = Tr.f(4813, arrayOf(type)) - fun web_composer_maximages(max: Any): String = Tr.f(4814, arrayOf(max)) - val web_logout_failed: String get() = Tr.s(4815) - val thread_context_title: String get() = Tr.s(4816) - val thread_context_instructions: String get() = Tr.s(4817) - val thread_context_system: String get() = Tr.s(4818) - val thread_context_skills: String get() = Tr.s(4819) - val thread_context_mcp: String get() = Tr.s(4820) - val thread_context_mcp_short: String get() = Tr.s(4821) - val thread_context_reading: String get() = Tr.s(4822) - val thread_context_none_instructions: String get() = Tr.s(4823) - val thread_context_none_mcp: String get() = Tr.s(4824) - val thread_context_native_note: String get() = Tr.s(4825) - val thread_context_copy: String get() = Tr.s(4826) - val thread_context_copied: String get() = Tr.s(4827) - val thread_context_base: String get() = Tr.s(4828) - val thread_context_injected_label: String get() = Tr.s(4829) - val thread_context_index: String get() = Tr.s(4830) - val thread_context_scope_user: String get() = Tr.s(4831) - val thread_context_scope_bundled: String get() = Tr.s(4832) - val thread_context_native: String get() = Tr.s(4833) - val thread_context_injected: String get() = Tr.s(4834) - val thread_context_cross: String get() = Tr.s(4835) - val thread_context_explicit: String get() = Tr.s(4836) - val thread_context_untrusted: String get() = Tr.s(4837) - val thread_context_invalid: String get() = Tr.s(4838) - val thread_context_trust: String get() = Tr.s(4839) - val thread_context_enable: String get() = Tr.s(4840) - val thread_context_disable: String get() = Tr.s(4841) - fun thread_context_size(bytes: Any, tokens: Any): String = Tr.f(4842, arrayOf(bytes, tokens)) - val thread_context_unreachable: String get() = Tr.s(4843) - val gpui_planmode_top_once: String get() = Tr.s(4844) - val gpui_planmode_top_planning: String get() = Tr.s(4845) - val gpui_planmode_top_pending: String get() = Tr.s(4846) - val gpui_planmode_top_executing: String get() = Tr.s(4847) - val gpui_planmode_tip: String get() = Tr.s(4848) - val gpui_planmode_chip_building: String get() = Tr.s(4849) - val gpui_planmode_chip_once: String get() = Tr.s(4850) - val gpui_planmode_bar_once: String get() = Tr.s(4851) - val gpui_planmode_bar_always: String get() = Tr.s(4852) - val gpui_planmode_bar_planning: String get() = Tr.s(4853) - val gpui_planmode_bar_pending: String get() = Tr.s(4854) - val gpui_planmode_bar_executing: String get() = Tr.s(4855) - val gpui_planmode_scope_once: String get() = Tr.s(4856) - val gpui_planmode_scope_always: String get() = Tr.s(4857) - val gpui_ask_plan_ready: String get() = Tr.s(4858) - val gpui_ask_plan_revise: String get() = Tr.s(4859) - val gpui_ask_plan_sendrev: String get() = Tr.s(4860) - val gpui_ask_plan_reviseph: String get() = Tr.s(4861) - val gpui_mgmt_plan_st_blocked: String get() = Tr.s(4862) - val gpui_mgmt_plan_st_routing: String get() = Tr.s(4863) - val gpui_mgmt_plan_st_awaiting: String get() = Tr.s(4864) - val gpui_mgmt_plan_st_verified: String get() = Tr.s(4865) - val gpui_mgmt_plan_st_routed: String get() = Tr.s(4866) - val gpui_mgmt_plan_st_approved: String get() = Tr.s(4867) - val gpui_mgmt_plan_st_partial: String get() = Tr.s(4868) - val gpui_mgmt_plan_st_rejected: String get() = Tr.s(4869) - val gpui_mgmt_plan_st_empty: String get() = Tr.s(4870) - val gpui_mgmt_plan_refused: String get() = Tr.s(4871) - val gpui_mgmt_plan_emptysub: String get() = Tr.s(4872) - val gpui_mgmt_plan_verify: String get() = Tr.s(4873) - val gpui_mgmt_plan_reqplain: String get() = Tr.s(4874) - fun gpui_mgmt_plan_requested(what: Any): String = Tr.f(4875, arrayOf(what)) - val gpui_mgmt_plan_stackup: String get() = Tr.s(4876) - val gpui_keys_planmode: String get() = Tr.s(4877) - val gpui_keys_mgmt_plan: String get() = Tr.s(4878) - fun web_plan_awaiting(n: Any): String = Tr.f(4879, arrayOf(n)) - val web_plan_net_one: String get() = Tr.s(4880) - fun web_plan_nets(n: Any): String = Tr.f(4881, arrayOf(n)) - val gpui_mgmt_plan_view_canvas: String get() = Tr.s(4882) - val gpui_mgmt_plan_view_split: String get() = Tr.s(4883) - val gpui_mgmt_plan_view_list: String get() = Tr.s(4884) - val gpui_mgmt_plan_grid_all: String get() = Tr.s(4885) - val gpui_mgmt_plan_grid_pair: String get() = Tr.s(4886) - val gpui_mgmt_plan_grid_single: String get() = Tr.s(4887) - val gpui_mgmt_plan_expand: String get() = Tr.s(4888) - val gpui_mgmt_plan_compact: String get() = Tr.s(4889) - val gpui_mgmt_plan_sync: String get() = Tr.s(4890) - val gpui_mgmt_plan_fit: String get() = Tr.s(4891) - val gpui_mgmt_plan_lock: String get() = Tr.s(4892) - val gpui_mgmt_plan_unlock: String get() = Tr.s(4893) - val gpui_mgmt_plan_layer_move: String get() = Tr.s(4894) - val gpui_mgmt_plan_width: String get() = Tr.s(4895) - val gpui_mgmt_plan_addnote: String get() = Tr.s(4896) - val gpui_mgmt_plan_note_placeholder: String get() = Tr.s(4897) - val gpui_mgmt_plan_hint: String get() = Tr.s(4898) - val gpui_mgmt_plan_rejectlayer: String get() = Tr.s(4899) - val gpui_mgmt_plan_edited: String get() = Tr.s(4900) - val gpui_mgmt_plan_locked: String get() = Tr.s(4901) - val gpui_mgmt_plan_noitems: String get() = Tr.s(4902) - val gpui_mgmt_plan_stackup_short: String get() = Tr.s(4903) - val gpui_mgmt_plan_layer_short: String get() = Tr.s(4904) - fun gpui_mgmt_plan_awaiting_short(n: Any): String = Tr.f(4905, arrayOf(n)) - fun gpui_mgmt_plan_done_of(done: Any, total: Any): String = Tr.f(4906, arrayOf(done, total)) - val gpui_planmode_chip_review: String get() = Tr.s(4907) - val mobile_plan_steer: String get() = Tr.s(4908) - val mobile_plan_details: String get() = Tr.s(4909) - val mobile_plan_reset: String get() = Tr.s(4910) - val mobile_plan_removepoint: String get() = Tr.s(4911) - val mobile_plan_touchhint: String get() = Tr.s(4912) - val mobile_plan_copied: String get() = Tr.s(4913) - fun mobile_plan_widthmm(v: Any): String = Tr.f(4914, arrayOf(v)) - fun mobile_plan_coord(x: Any, y: Any): String = Tr.f(4915, arrayOf(x, y)) - val provider_notice_head: String get() = Tr.s(4916) - val provider_notice_text_none: String get() = Tr.s(4917) - val provider_notice_text_signedout: String get() = Tr.s(4918) - val provider_notice_button: String get() = Tr.s(4919) - val provider_notice_senderr: String get() = Tr.s(4920) - fun provider_notice_senderr_remote(machine: Any): String = Tr.f(4921, arrayOf(machine)) - val web_settings_providers: String get() = Tr.s(4922) - val web_settings_providers_browser: String get() = Tr.s(4923) + val gpui_c_solid_load_big: String get() = Tr.s(2127) + val gpui_c_solid_loading_big: String get() = Tr.s(2128) + val gpui_c_solid_big_next: String get() = Tr.s(2129) + fun gpui_assets_missing(dir: Any, files: Any): String = Tr.f(2130, arrayOf(dir, files)) + val gpui_connecting: String get() = Tr.s(2131) + val gpui_connected: String get() = Tr.s(2132) + val gpui_disconnected: String get() = Tr.s(2133) + val gpui_hub_is_opening_its_log: String get() = Tr.s(2134) + val gpui_hub_disconnected_draft_kept_reconnecting: String get() = Tr.s(2135) + fun gpui_hub_refused_it(why: Any): String = Tr.f(2136, arrayOf(why)) + val gpui_that_is_not_on_this: String get() = Tr.s(2137) + fun gpui_hub_view_refused(code: Any): String = Tr.f(2138, arrayOf(code)) + val gpui_no_reason_given: String get() = Tr.s(2139) + val gpui_this_invitation_names_only_its: String get() = Tr.s(2140) + val gpui_that_is_not_a_pairing: String get() = Tr.s(2141) + val gpui_paste_a_pairing_link_or: String get() = Tr.s(2142) + val gpui_check_the_hub_address_and: String get() = Tr.s(2143) + val gpui_that_code_is_not_correct: String get() = Tr.s(2144) + val gpui_this_invitation_expired_create_another: String get() = Tr.s(2145) + val gpui_this_invitation_has_already_been: String get() = Tr.s(2146) + val gpui_this_invitation_was_revoked_create: String get() = Tr.s(2147) + val gpui_too_many_attempts_wait_a: String get() = Tr.s(2148) + val gpui_this_hub_has_too_many: String get() = Tr.s(2149) + val gpui_the_hub_could_not_save: String get() = Tr.s(2150) + val gpui_the_hub_could_not_be: String get() = Tr.s(2151) + fun gpui_pair_pairing_with(origin: Any): String = Tr.f(2152, arrayOf(origin)) + val gpui_this_pairing_could_not_be: String get() = Tr.s(2153) + fun gpui_could_not_restart(why: Any): String = Tr.f(2154, arrayOf(why)) + val gpui_pair_with_this_hub: String get() = Tr.s(2155) + val gpui_a_link_opened_this_pair: String get() = Tr.s(2156) + val gpui_re_pair_this_device: String get() = Tr.s(2157) + val gpui_add_a_hub: String get() = Tr.s(2158) + val gpui_connect_to_your_backplane_hub: String get() = Tr.s(2159) + val gpui_this_device_was_revoked_make: String get() = Tr.s(2160) + val gpui_on_a_paired_machine_settings: String get() = Tr.s(2161) + val gpui_or_the_hub_s_address: String get() = Tr.s(2162) + val gpui_devices: String get() = Tr.s(2163) + val gpui_add_a_device: String get() = Tr.s(2164) + fun gpui_launch_hub_missing(dir: Any): String = Tr.f(2165, arrayOf(dir)) + fun gpui_launch_could_not_make(path: Any): String = Tr.f(2166, arrayOf(path)) + fun gpui_launch_elsewhere(home: Any, other: Any): String = Tr.f(2167, arrayOf(home, other)) + val gpui_no_free_port: String get() = Tr.s(2168) + fun gpui_launch_could_not_start(path: Any): String = Tr.f(2169, arrayOf(path)) + fun gpui_launch_stopped(code: Any, log: Any): String = Tr.f(2170, arrayOf(code, log)) + fun gpui_launch_no_answer(log: Any): String = Tr.f(2171, arrayOf(log)) + val gpui_that_address_did_not_answer: String get() = Tr.s(2172) + fun gpui_launch_unreachable(addr: Any): String = Tr.f(2173, arrayOf(addr)) + val gpui_no_folder_for_this_device: String get() = Tr.s(2174) + val gpui_no_folder_for_this_program: String get() = Tr.s(2175) + val gpui_choose_a_folder: String get() = Tr.s(2176) + val gpui_give_the_full_path_starting: String get() = Tr.s(2177) + val gpui_that_folder_belongs_to_backplane: String get() = Tr.s(2178) + val gpui_that_code_was_used_already: String get() = Tr.s(2179) + val gpui_that_code_expired_after_ten: String get() = Tr.s(2180) + val gpui_that_code_was_revoked_make: String get() = Tr.s(2181) + val gpui_too_many_tries_wait_a: String get() = Tr.s(2182) + val gpui_that_hub_has_too_many: String get() = Tr.s(2183) + val gpui_that_code_is_wrong_check: String get() = Tr.s(2184) + val gpui_ask_anything_bot_thread_project: String get() = Tr.s(2185) + fun gpui_first_starting(home: Any): String = Tr.f(2186, arrayOf(home)) + fun gpui_first_pairing(addr: Any): String = Tr.f(2187, arrayOf(addr)) + val gpui_give_the_other_computer_s: String get() = Tr.s(2188) + val gpui_type_the_short_code_from: String get() = Tr.s(2189) + val gpui_where_should_backplane_keep_your: String get() = Tr.s(2190) + val gpui_backplane_keeps_your_threads_settings: String get() = Tr.s(2191) + val gpui_use_this_folder: String get() = Tr.s(2192) + val gpui_choose_a_folder2: String get() = Tr.s(2193) + val gpui_connect_to_a_hub_on: String get() = Tr.s(2194) + val gpui_a_hub_is_the_backplane: String get() = Tr.s(2195) + val gpui_this_folder_already_has_a: String get() = Tr.s(2196) + val gpui_backplane_old_data_is: String get() = Tr.s(2197) + val gpui_install_guide: String get() = Tr.s(2198) + val gpui_folder: String get() = Tr.s(2199) + val gpui_pairing_link_or_address: String get() = Tr.s(2200) + val gpui_short_code: String get() = Tr.s(2201) + fun gpui_install_failed(dir: Any, why: Any): String = Tr.f(2202, arrayOf(dir, why)) + fun gpui_install_ask(dir: Any): String = Tr.f(2203, arrayOf(dir)) + val gpui_needed_for_updates_not_now: String get() = Tr.s(2204) + val gpui_this_computer: String get() = Tr.s(2205) + val gpui_the_choice_could_not_be: String get() = Tr.s(2206) + val gpui_the_hub_could_not_be2: String get() = Tr.s(2207) + val gpui_pair_this_device_with_a: String get() = Tr.s(2208) + val gpui_in_use: String get() = Tr.s(2209) + val gpui_use: String get() = Tr.s(2210) + val gpui_the_hub_on_this_computer: String get() = Tr.s(2211) + val gpui_hub_home_on: String get() = Tr.s(2212) + val gpui_hub_home: String get() = Tr.s(2213) + val gpui_hub_home_away: String get() = Tr.s(2214) + val gpui_hub: String get() = Tr.s(2215) + val gpui_the_hub_is_not_answering: String get() = Tr.s(2216) + val gpui_restart_hub: String get() = Tr.s(2217) + fun gpui_hubbar_starting_phase(phase: Any): String = Tr.f(2218, arrayOf(phase)) + val gpui_the_hub_is_starting: String get() = Tr.s(2219) + fun gpui_hubbar_down(why: Any): String = Tr.f(2220, arrayOf(why)) + fun gpui_hubbar_stuck(what: Any): String = Tr.f(2221, arrayOf(what)) + fun gpui_hubbar_said(code: Any): String = Tr.f(2222, arrayOf(code)) + val gpui_asked_the_guard_on_this: String get() = Tr.s(2223) + val gpui_the_hub_s_machine_cannot: String get() = Tr.s(2224) + val gpui_restart_in_safe_mode: String get() = Tr.s(2225) + val gpui_roll_back_hub: String get() = Tr.s(2226) + val gpui_asking: String get() = Tr.s(2227) + fun gpui_hubbar_click_again(label: Any): String = Tr.f(2228, arrayOf(label)) + val gpui_you_said: String get() = Tr.s(2229) + val gpui_agent_said: String get() = Tr.s(2230) + val gpui_action: String get() = Tr.s(2231) + val gpui_split: String get() = Tr.s(2232) + fun gpui_palette_open(kind: Any): String = Tr.f(2233, arrayOf(kind)) + val gpui_viewer: String get() = Tr.s(2234) + fun gpui_palette_new_thread_in(project: Any): String = Tr.f(2235, arrayOf(project)) + val gpui_conversation_history: String get() = Tr.s(2236) + val gpui_search_this_thread: String get() = Tr.s(2237) + val gpui_jump_to_a_thread_or: String get() = Tr.s(2238) + val gpui_jump_to_a_thread_run: String get() = Tr.s(2239) + val gpui_type_a_word_said_in: String get() = Tr.s(2240) + val gpui_approval: String get() = Tr.s(2241) + val gpui_question: String get() = Tr.s(2242) + val gpui_new_subthread: String get() = Tr.s(2243) + val gpui_move_to_top_level: String get() = Tr.s(2244) + val gpui_regenerate_title: String get() = Tr.s(2245) + val gpui_search_in_thread: String get() = Tr.s(2246) + val gpui_badge: String get() = Tr.s(2247) + fun gpui_ctx_click_again_to(what: Any): String = Tr.f(2248, arrayOf(what)) + val gpui_snooze_tomorrow: String get() = Tr.s(2249) + fun gpui_ctx_snooze(`when`: Any): String = Tr.f(2250, arrayOf(`when`)) + val gpui_goal_notes: String get() = Tr.s(2251) + val gpui_no_goal_yet_ask_an: String get() = Tr.s(2252) + val gpui_edit_goal_notes: String get() = Tr.s(2253) + fun gpui_projects_to_order(n: Any): String = Tr.f(2254, arrayOf(n)) + fun gpui_projects_boards(n: Any): String = Tr.f(2255, arrayOf(n)) + fun gpui_projects_threads(n: Any): String = Tr.f(2256, arrayOf(n)) + val gpui_no_threads_yet: String get() = Tr.s(2257) + fun gpui_picker_no_effort(agent: Any): String = Tr.f(2258, arrayOf(agent)) + fun gpui_picker_now(effort: Any): String = Tr.f(2259, arrayOf(effort)) + val gpui_no_models: String get() = Tr.s(2260) + fun gpui_picker_more(n: Any): String = Tr.f(2261, arrayOf(n)) + val gpui_picker_speed: String get() = Tr.s(2262) + fun gpui_picker_speed_normal_only(model: Any): String = Tr.f(2263, arrayOf(model)) + val gpui_picker_favorites: String get() = Tr.s(2264) + val gpui_picker_favorite_add: String get() = Tr.s(2265) + val gpui_picker_favorite_remove: String get() = Tr.s(2266) + val gpui_speed_normal: String get() = Tr.s(2267) + val gpui_speed_fast: String get() = Tr.s(2268) + val gpui_speed_ultrafast: String get() = Tr.s(2269) + val gpui_speed_cost_x2: String get() = Tr.s(2270) + val gpui_speed_usage_x2half: String get() = Tr.s(2271) + val gpui_speed_usage_x8: String get() = Tr.s(2272) + val gpui_speed_priority_rate: String get() = Tr.s(2273) + val gpui_search_models: String get() = Tr.s(2274) + val gpui_to_do: String get() = Tr.s(2275) + val gpui_subagents: String get() = Tr.s(2276) + val gpui_add_an_item: String get() = Tr.s(2277) + fun gpui_panels_subagents(word: Any): String = Tr.f(2278, arrayOf(word)) + val gpui_panels_kind_task: String get() = Tr.s(2279) + val gpui_runs: String get() = Tr.s(2280) + val gpui_doing: String get() = Tr.s(2281) + val gpui_asked: String get() = Tr.s(2282) + val gpui_steps: String get() = Tr.s(2283) + val gpui_none_reported_yet: String get() = Tr.s(2284) + fun gpui_panels_earlier(more: Any, step: Any): String = Tr.f(2285, arrayOf(more, step)) + val gpui_reported: String get() = Tr.s(2286) + val gpui_paste_the_value: String get() = Tr.s(2287) + val gpui_a_secret_for_this_chat: String get() = Tr.s(2288) + fun gpui_sidebox_secret(name: Any): String = Tr.f(2289, arrayOf(name)) + val gpui_not_needed: String get() = Tr.s(2290) + val gpui_attachments_need_a_hub_on: String get() = Tr.s(2291) + val gpui_open_a_thread_to_attach: String get() = Tr.s(2292) + fun gpui_attach_first(max: Any, skipped: Any): String = Tr.f(2293, arrayOf(max, skipped)) + val gpui_img: String get() = Tr.s(2294) + val gpui_file: String get() = Tr.s(2295) + fun gpui_attach_uploading(name: Any): String = Tr.f(2296, arrayOf(name)) + fun gpui_timeline_more_rows(n: Number): String = Tr.f(2297, arrayOf(n)) + fun gpui_timeline_loading(name: Any): String = Tr.f(2298, arrayOf(name)) + fun gpui_timeline_could_not_load(name: Any): String = Tr.f(2299, arrayOf(name)) + val gpui_md_alert_note: String get() = Tr.s(2300) + val gpui_md_alert_tip: String get() = Tr.s(2301) + val gpui_md_alert_important: String get() = Tr.s(2302) + val gpui_md_alert_warning: String get() = Tr.s(2303) + val gpui_md_alert_caution: String get() = Tr.s(2304) + fun gpui_timeline_more_images(n: Number): String = Tr.f(2305, arrayOf(n)) + fun gpui_order_named(name: Any): String = Tr.f(2306, arrayOf(name)) + val gpui_buy_now: String get() = Tr.s(2307) + fun gpui_order_buy_now_price(price: Any): String = Tr.f(2308, arrayOf(price)) + val gpui_order_requote: String get() = Tr.s(2309) + val gpui_order_unavailable_line: String get() = Tr.s(2310) + fun gpui_badge_away(name: Any): String = Tr.f(2311, arrayOf(name)) + val gpui_badge_again: String get() = Tr.s(2312) + fun gpui_badge_on(name: Any): String = Tr.f(2313, arrayOf(name)) + fun gpui_badge_runs_on(name: Any): String = Tr.f(2314, arrayOf(name)) + fun gpui_badge_also_on(name: Any): String = Tr.f(2315, arrayOf(name)) + fun gpui_unsent_restore(text: Any): String = Tr.f(2316, arrayOf(text)) + val gpui_made_far_note: String get() = Tr.s(2317) + val gpui_picked_elsewhere: String get() = Tr.s(2318) + fun gpui_combo_key_model(key: Any): String = Tr.f(2319, arrayOf(key)) + fun gpui_combo_key_account(key: Any): String = Tr.f(2320, arrayOf(key)) + fun gpui_combo_left(pct: Any): String = Tr.f(2321, arrayOf(pct)) + fun gpui_combo_resets(`when`: Any): String = Tr.f(2322, arrayOf(`when`)) + val gpui_weekly: String get() = Tr.s(2323) + val gpui_state: String get() = Tr.s(2324) + val gpui_blocked: String get() = Tr.s(2325) + val gpui_finished: String get() = Tr.s(2326) + val gpui_inactive: String get() = Tr.s(2327) + val gpui_stalled: String get() = Tr.s(2328) + val gpui_the_right_spelling: String get() = Tr.s(2329) + val gpui_star_on_github: String get() = Tr.s(2330) + val gpui_star_dont_ask: String get() = Tr.s(2331) + val gpui_star_why: String get() = Tr.s(2332) + fun gpui_projects_unpushed(n: Number, upstream: Any): String = Tr.f(2333, arrayOf(n, upstream)) + val gpui_projects_push: String get() = Tr.s(2334) + val gpui_e_files_max_mb: String get() = Tr.s(2335) + fun gpui_e_files_max_note(mb: Any): String = Tr.f(2336, arrayOf(mb)) + val gpui_e_dev_replay: String get() = Tr.s(2337) + val gpui_e_dev_replay_note: String get() = Tr.s(2338) + val gpui_e_dev_replay_button: String get() = Tr.s(2339) + val gpui_e_dev_star: String get() = Tr.s(2340) + val gpui_e_dev_star_show: String get() = Tr.s(2341) + val gpui_e_about_updates: String get() = Tr.s(2342) + val gpui_e_about_frames: String get() = Tr.s(2343) + val gpui_e_about_cef: String get() = Tr.s(2344) + val gpui_e_about_notices: String get() = Tr.s(2345) + fun gpui_e_about_notices_here(path: Any): String = Tr.f(2346, arrayOf(path)) + fun gpui_e_about_notices_hub(path: Any): String = Tr.f(2347, arrayOf(path)) + val gpui_e_open_folder: String get() = Tr.s(2348) + val gpui_e_agents_thinking: String get() = Tr.s(2349) + val gpui_e_agents_thinking_note: String get() = Tr.s(2350) + val gpui_e_agents_recall: String get() = Tr.s(2351) + val gpui_e_agents_recall_note: String get() = Tr.s(2352) + val gpui_e_order_comes: String get() = Tr.s(2353) + val gpui_e_devices_local_machine: String get() = Tr.s(2354) + val gpui_e_rules_standing: String get() = Tr.s(2355) + val gpui_e_rules_words: String get() = Tr.s(2356) + val gpui_e_rules_eg: String get() = Tr.s(2357) + val gpui_e_rules_add: String get() = Tr.s(2358) + val gpui_e_board_doing: String get() = Tr.s(2359) + val gpui_e_board_todo: String get() = Tr.s(2360) + val gpui_e_board_what: String get() = Tr.s(2361) + val gpui_e_board_eg: String get() = Tr.s(2362) + val gpui_e_board_add: String get() = Tr.s(2363) + val gpui_e_tz_phone_again: String get() = Tr.s(2364) + val gpui_e_tz_machine_again: String get() = Tr.s(2365) + val gpui_e_tz_phone_auto: String get() = Tr.s(2366) + val gpui_e_tz_machine_auto: String get() = Tr.s(2367) + val gpui_e_privacy_note: String get() = Tr.s(2368) + fun gpui_e_privacy_note_id(id: Any): String = Tr.f(2369, arrayOf(id)) + val gpui_e_privacy_share: String get() = Tr.s(2370) + val gpui_e_privacy_reset: String get() = Tr.s(2371) + val gpui_e_privacy_report: String get() = Tr.s(2372) + fun gpui_e_writing_model_note(model: Any): String = Tr.f(2373, arrayOf(model)) + fun gpui_e_kicad_none(platform: Any): String = Tr.f(2374, arrayOf(platform)) + fun gpui_e_kicad_installing(version: Any): String = Tr.f(2375, arrayOf(version)) + val gpui_e_kicad_starting: String get() = Tr.s(2376) + val gpui_e_kicad_ask: String get() = Tr.s(2377) + fun gpui_e_kicad_ask_note(version: Any, from: Any, into: Any): String = Tr.f(2378, arrayOf(version, from, into)) + fun gpui_e_kicad_offer(version: Any, from: Any): String = Tr.f(2379, arrayOf(version, from)) + val gpui_e_kicad_own: String get() = Tr.s(2380) + val gpui_e_kicad_notfound: String get() = Tr.s(2381) + fun gpui_e_kicad_found_version(version: Any, path: Any): String = Tr.f(2382, arrayOf(version, path)) + fun gpui_e_kicad_found_stock(version: Any, path: Any): String = Tr.f(2383, arrayOf(version, path)) + fun gpui_e_kicad_offer_stock(version: Any, pin: Any, from: Any): String = Tr.f(2384, arrayOf(version, pin, from)) + fun gpui_e_kicad_found(path: Any): String = Tr.f(2385, arrayOf(path)) + fun gpui_e_kicad_just(version: Any, path: Any): String = Tr.f(2386, arrayOf(version, path)) + fun gpui_e_kicad_passed(version: Any, path: Any, set: Any): String = Tr.f(2387, arrayOf(version, path, set)) + val gpui_e_kicad_checking: String get() = Tr.s(2388) + val gpui_e_kicad_path_hint: String get() = Tr.s(2389) + val gpui_e_freecad_notfound: String get() = Tr.s(2390) + val gpui_e_freecad_notat: String get() = Tr.s(2391) + val gpui_e_freecad_path_hint: String get() = Tr.s(2392) + val gpui_e_keys_kept: String get() = Tr.s(2393) + val gpui_e_keys_again: String get() = Tr.s(2394) + val gpui_e_keys_forget_it: String get() = Tr.s(2395) + val gpui_e_keys_note: String get() = Tr.s(2396) + val gpui_e_fallback_unavailable: String get() = Tr.s(2397) + val gpui_e_fallback_provider: String get() = Tr.s(2398) + val gpui_e_fallback_provider_note: String get() = Tr.s(2399) + val gpui_e_fallback_add: String get() = Tr.s(2400) + fun gpui_e_usage_line(turns: Number, input: Any, cread: Any, cwrite: Any, output: Any, cost: Any): String = Tr.f(2401, arrayOf(turns, input, cread, cwrite, output, cost)) + val gpui_e_cost_not_reported: String get() = Tr.s(2402) + val gpui_e_usage_title: String get() = Tr.s(2403) + val gpui_e_usage_none: String get() = Tr.s(2404) + val gpui_e_usage_unknown: String get() = Tr.s(2405) + val gpui_e_usage_all: String get() = Tr.s(2406) + val gpui_e_page_back: String get() = Tr.s(2407) + fun gpui_e_rules_on_refuses(tool: Any): String = Tr.f(2408, arrayOf(tool)) + fun gpui_e_rules_off_refuses(tool: Any): String = Tr.f(2409, arrayOf(tool)) + fun gpui_e_rules_on_refuses_word(tool: Any, word: Any): String = Tr.f(2410, arrayOf(tool, word)) + fun gpui_e_rules_off_refuses_word(tool: Any, word: Any): String = Tr.f(2411, arrayOf(tool, word)) + fun gpui_e_rules_on_using(tool: Any): String = Tr.f(2412, arrayOf(tool)) + fun gpui_e_rules_off_using(tool: Any): String = Tr.f(2413, arrayOf(tool)) + fun gpui_e_board_doing_due(due: Any): String = Tr.f(2414, arrayOf(due)) + fun gpui_e_board_blocked_due(due: Any): String = Tr.f(2415, arrayOf(due)) + fun gpui_e_board_todo_due(due: Any): String = Tr.f(2416, arrayOf(due)) + fun gpui_e_board_done_due(due: Any): String = Tr.f(2417, arrayOf(due)) + fun gpui_e_tz_zone_set(zone: Any): String = Tr.f(2418, arrayOf(zone)) + fun gpui_e_tz_zone_phone(zone: Any): String = Tr.f(2419, arrayOf(zone)) + fun gpui_e_tz_zone_machine(zone: Any): String = Tr.f(2420, arrayOf(zone)) + fun gpui_e_tz_zone_none(zone: Any): String = Tr.f(2421, arrayOf(zone)) + fun gpui_e_subs_done(n: Any): String = Tr.f(2422, arrayOf(n)) + fun gpui_e_lock_starting(who: Any): String = Tr.f(2423, arrayOf(who)) + fun gpui_e_lock_position(n: Any, who: Any): String = Tr.f(2424, arrayOf(n, who)) + fun gpui_e_subs_where(harness: Any): String = Tr.f(2425, arrayOf(harness)) + fun gpui_e_picker_already(path: Any): String = Tr.f(2426, arrayOf(path)) + fun gpui_e_picker_create(path: Any): String = Tr.f(2427, arrayOf(path)) + fun gpui_e_picker_notdir(path: Any): String = Tr.f(2428, arrayOf(path)) + val gpui_e_picker_hint: String get() = Tr.s(2429) + val gpui_e_fab_nogoal: String get() = Tr.s(2430) + fun gpui_e_fab_unavailable_line(error: Any, line: Any): String = Tr.f(2431, arrayOf(error, line)) + fun gpui_e_fab_buy_label(label: Any): String = Tr.f(2432, arrayOf(label)) + val gpui_e_tools_back: String get() = Tr.s(2433) + val gpui_e_tools_back_tip: String get() = Tr.s(2434) + val gpui_e_status_working: String get() = Tr.s(2435) + val gpui_e_status_inactive: String get() = Tr.s(2436) + val gpui_e_status_finished: String get() = Tr.s(2437) + val gpui_e_status_waiting: String get() = Tr.s(2438) + val gpui_e_status_blocked: String get() = Tr.s(2439) + fun gpui_e_acct_saved(who: Any): String = Tr.f(2440, arrayOf(who)) + fun gpui_e_acct_cli(who: Any): String = Tr.f(2441, arrayOf(who)) + fun gpui_e_acct_window_resets(label: Any, left: Any, `when`: Any): String = Tr.f(2442, arrayOf(label, left, `when`)) + fun gpui_e_acct_default_left(left: Any): String = Tr.f(2443, arrayOf(left)) + fun gpui_e_acct_profile_left(name: Any, left: Any): String = Tr.f(2444, arrayOf(name, left)) + fun gpui_e_acct_extra_off(used: Any): String = Tr.f(2445, arrayOf(used)) + fun gpui_e_acct_extra_of_off(used: Any, limit: Any): String = Tr.f(2446, arrayOf(used, limit)) + fun gpui_e_acct_extra_off_why(used: Any, reason: Any): String = Tr.f(2447, arrayOf(used, reason)) + fun gpui_e_acct_extra_of_off_why(used: Any, limit: Any, reason: Any): String = Tr.f(2448, arrayOf(used, limit, reason)) + val gpui_e_tok_noreading: String get() = Tr.s(2449) + fun gpui_e_tok_notby(provider: Any): String = Tr.f(2450, arrayOf(provider)) + fun gpui_e_tok_ofwindow(used: Any, window: Any, pct: Any): String = Tr.f(2451, arrayOf(used, window, pct)) + fun gpui_e_tok_rate(rate: Any): String = Tr.f(2452, arrayOf(rate)) + val gpui_e_tok_held: String get() = Tr.s(2453) + val gpui_e_tok_room: String get() = Tr.s(2454) + val gpui_e_tok_noturn: String get() = Tr.s(2455) + val gpui_e_tok_tokens_label: String get() = Tr.s(2456) + val gpui_e_tok_nottold: String get() = Tr.s(2457) + val gpui_e_tok_input: String get() = Tr.s(2458) + val gpui_e_tok_cread: String get() = Tr.s(2459) + val gpui_e_tok_cwrite: String get() = Tr.s(2460) + val gpui_e_tok_output: String get() = Tr.s(2461) + fun gpui_e_tok_output_reasoning(n: Any, r: Any): String = Tr.f(2462, arrayOf(n, r)) + val gpui_e_tok_cost: String get() = Tr.s(2463) + val gpui_e_tok_notreported: String get() = Tr.s(2464) + val gpui_e_tok_speed: String get() = Tr.s(2465) + val gpui_e_tok_modeltime: String get() = Tr.s(2466) + fun gpui_e_tok_modeltime_steps(time: Any, n: Number): String = Tr.f(2467, arrayOf(time, n)) + val gpui_e_tok_turntime: String get() = Tr.s(2468) + val gpui_e_tok_noturns: String get() = Tr.s(2469) + val gpui_e_tok_turns: String get() = Tr.s(2470) + fun gpui_e_tok_turns_unknown(n: Any, m: Any): String = Tr.f(2471, arrayOf(n, m)) + val gpui_e_tok_hits: String get() = Tr.s(2472) + fun gpui_e_tok_hits_of(pct: Any): String = Tr.f(2473, arrayOf(pct)) + fun gpui_e_tok_cost_some(cost: Any, n: Any): String = Tr.f(2474, arrayOf(cost, n)) + val gpui_e_tok_avg: String get() = Tr.s(2475) + val gpui_e_tok_last: String get() = Tr.s(2476) + val gpui_e_tok_bymodel: String get() = Tr.s(2477) + fun gpui_e_tok_model_line(`in`: Any, out: Any, cread: Any, cwrite: Any): String = Tr.f(2478, arrayOf(`in`, out, cread, cwrite)) + fun gpui_e_tok_model_line_web(`in`: Any, out: Any, cread: Any, cwrite: Any, n: Any): String = Tr.f(2479, arrayOf(`in`, out, cread, cwrite, n)) + val gpui_e_tok_speed_note: String get() = Tr.s(2480) + val gpui_e_viewer_noproject: String get() = Tr.s(2481) + val gpui_e_viewer_remote_files: String get() = Tr.s(2482) + val gpui_e_viewer_remote_parts: String get() = Tr.s(2483) + val gpui_e_viewer_noparts: String get() = Tr.s(2484) + val gpui_e_order_how: String get() = Tr.s(2485) + val gpui_e_fallback_note: String get() = Tr.s(2486) + val gpui_e_fallback_model: String get() = Tr.s(2487) + fun gpui_e_usage_line_nocost(turns: Number, input: Any, cread: Any, cwrite: Any, output: Any): String = Tr.f(2488, arrayOf(turns, input, cread, cwrite, output)) + fun gpui_e_acct_weekly_resets(left: Any, `when`: Any): String = Tr.f(2489, arrayOf(left, `when`)) + fun gpui_e_acct_hour5_resets(left: Any, `when`: Any): String = Tr.f(2490, arrayOf(left, `when`)) + fun gpui_e_acct_opus_resets(left: Any, `when`: Any): String = Tr.f(2491, arrayOf(left, `when`)) + fun gpui_e_acct_sonnet_resets(left: Any, `when`: Any): String = Tr.f(2492, arrayOf(left, `when`)) + val notify_which_alerts_reach_you_quiet: String get() = Tr.s(2493) + val notify_notifications: String get() = Tr.s(2494) + val notify_phones: String get() = Tr.s(2495) + val notify_only_your_uberbot_pushes_to: String get() = Tr.s(2496) + val notify_quiet_hours: String get() = Tr.s(2497) + val notify_a_push_waits_until_the: String get() = Tr.s(2498) + val notify_quiet_from_and_until: String get() = Tr.s(2499) + val notify_hh_mm_hours: String get() = Tr.s(2500) + val notify_times_are_hh_mm_hours: String get() = Tr.s(2501) + val notify_quiet_hours_are_hh_mm: String get() = Tr.s(2502) + val notify_urgent_asks_come_through: String get() = Tr.s(2503) + val notify_an_approval_or_a_question: String get() = Tr.s(2504) + val notify_iphones_that_hear_a_push: String get() = Tr.s(2505) + val notify_none_yet_an_iphone_registers: String get() = Tr.s(2506) + val notify_muted_hears_only_what_urgent: String get() = Tr.s(2507) + val notify_hears_alerts: String get() = Tr.s(2508) + val notify_hears: String get() = Tr.s(2509) + val notify_muted: String get() = Tr.s(2510) + val gpui_e_failover_failover_order: String get() = Tr.s(2511) + val gpui_e_failover_applies_to_all_threads_bots: String get() = Tr.s(2512) + val gpui_e_failover_not_installed_on_this_machine: String get() = Tr.s(2513) + val gpui_e_failover_its_own_sign_in_on: String get() = Tr.s(2514) + val gpui_e_failover_account: String get() = Tr.s(2515) + fun gpui_e_failover_accounts_the_one_with_the(n: Any): String = Tr.f(2516, arrayOf(n)) + val gpui_e_failover_default_order: String get() = Tr.s(2517) + val gpui_e_failover_use_the_default_order: String get() = Tr.s(2518) + val gpui_e_failover_choose_an_installed_provider_and: String get() = Tr.s(2519) + val gpui_e_failover_add_to_the_order: String get() = Tr.s(2520) + val ring_ring: String get() = Tr.s(2521) + val ring_pebble_index_ring: String get() = Tr.s(2522) + val ring_test_event: String get() = Tr.s(2523) + val ring_recordings: String get() = Tr.s(2524) + val ring_search_what_you_said: String get() = Tr.s(2525) + val ring_copy_header: String get() = Tr.s(2526) + val ring_copy_both: String get() = Tr.s(2527) + val ring_set_up_again: String get() = Tr.s(2528) + val ring_show_all: String get() = Tr.s(2529) + val ring_hear_again_local: String get() = Tr.s(2530) + val ring_hear_again_openai: String get() = Tr.s(2531) + val ring_what_happened: String get() = Tr.s(2532) + val ring_send_again: String get() = Tr.s(2533) + val ring_no_recordings_yet: String get() = Tr.s(2534) + val hub_acct_claude_sync: String get() = Tr.s(2535) + val hub_acct_add_a_claude_sync_token: String get() = Tr.s(2536) + val hub_acct_connected_sync_token: String get() = Tr.s(2537) + val hub_acct_sync_token_ended: String get() = Tr.s(2538) + fun hub_acct_sync_token_ends(`when`: Any): String = Tr.f(2539, arrayOf(`when`)) + val gpui_e_telemetry_notice: String get() = Tr.s(2540) + val voice_cmd_sending: String get() = Tr.s(2541) + val voice_cmd_cleared: String get() = Tr.s(2542) + val voice_cmd_sent: String get() = Tr.s(2543) + val voice_cmd_undo: String get() = Tr.s(2544) + val settings_voice_cmd_send: String get() = Tr.s(2545) + fun settings_voice_cmd_send_note(phrase: Any, now: Any): String = Tr.f(2546, arrayOf(phrase, now)) + val settings_voice_cmd_off: String get() = Tr.s(2547) + val settings_voice_cmd_hint: String get() = Tr.s(2548) + val settings_voice_cmd_default: String get() = Tr.s(2549) + val settings_voice_cmds: String get() = Tr.s(2550) + val settings_voice_cmds_note: String get() = Tr.s(2551) + val voice_cmd_scratch: String get() = Tr.s(2552) + val voice_cmd_newline: String get() = Tr.s(2553) + val voice_cmd_cancel: String get() = Tr.s(2554) + val settings_voice_auto: String get() = Tr.s(2555) + val settings_voice_auto_note: String get() = Tr.s(2556) + fun voice_cmd_secs(s: Any): String = Tr.f(2557, arrayOf(s)) + val voice_eot_sending: String get() = Tr.s(2558) + val voice_eot_hold: String get() = Tr.s(2559) + val settings_voice_eot: String get() = Tr.s(2560) + val settings_voice_eot_note: String get() = Tr.s(2561) + val settings_voice_eot_eager: String get() = Tr.s(2562) + fun settings_voice_eot_eager_note(now: Any): String = Tr.f(2563, arrayOf(now)) + fun settings_voice_eot_eager_learned(now: Any, nudge: Any, sent: Any, undone: Any): String = Tr.f(2564, arrayOf(now, nudge, sent, undone)) + val settings_voice_eot_reset: String get() = Tr.s(2565) + val settings_voice_jev: String get() = Tr.s(2566) + val settings_voice_jev_set: String get() = Tr.s(2567) + val settings_voice_jev_unset: String get() = Tr.s(2568) + val settings_voice_jev_key: String get() = Tr.s(2569) + val settings_voice_jev_use: String get() = Tr.s(2570) + val settings_voice_jev_test: String get() = Tr.s(2571) + val settings_voice_jev_model: String get() = Tr.s(2572) + val settings_voice_jev_check: String get() = Tr.s(2573) + fun settings_voice_jev_failed(e: Any): String = Tr.f(2574, arrayOf(e)) + fun settings_voice_jev_result(a: Any, ams: Any, b: Any, bms: Any): String = Tr.f(2575, arrayOf(a, ams, b, bms)) + fun settings_voice_jev_last(ms: Any): String = Tr.f(2576, arrayOf(ms)) + fun settings_voice_jev_fallback(e: Any): String = Tr.f(2577, arrayOf(e)) + fun voice_eot_eager_label(t: Any): String = Tr.f(2578, arrayOf(t)) + fun voice_eot_default_label(t: Any): String = Tr.f(2579, arrayOf(t)) + fun voice_eot_patient_label(t: Any): String = Tr.f(2580, arrayOf(t)) + val voice_always_listening: String get() = Tr.s(2581) + val voice_always_paused: String get() = Tr.s(2582) + val voice_always_muted: String get() = Tr.s(2583) + val keys_always: String get() = Tr.s(2584) + val voice_always_status: String get() = Tr.s(2585) + fun voice_always_note_paused(why: Any): String = Tr.f(2586, arrayOf(why)) + val settings_voice_always: String get() = Tr.s(2587) + val settings_voice_always_note: String get() = Tr.s(2588) + val settings_voice_always_start: String get() = Tr.s(2589) + val settings_voice_always_start_note: String get() = Tr.s(2590) + val settings_voice_always_word1: String get() = Tr.s(2591) + val settings_voice_always_word2: String get() = Tr.s(2592) + val settings_voice_always_ms: String get() = Tr.s(2593) + val settings_voice_always_pause: String get() = Tr.s(2594) + val settings_voice_always_pause_note: String get() = Tr.s(2595) + fun settings_voice_always_pause_note2(apps: Any): String = Tr.f(2596, arrayOf(apps)) + val settings_voice_always_ignore: String get() = Tr.s(2597) + val settings_voice_always_lock: String get() = Tr.s(2598) + val settings_voice_always_call: String get() = Tr.s(2599) + val settings_voice_always_away: String get() = Tr.s(2600) + val settings_voice_always_saveapps: String get() = Tr.s(2601) + val settings_voice_always_target: String get() = Tr.s(2602) + val settings_voice_always_target_note: String get() = Tr.s(2603) + val settings_voice_always_open: String get() = Tr.s(2604) + val settings_voice_speaker: String get() = Tr.s(2605) + fun settings_voice_speaker_on(n: Any): String = Tr.f(2606, arrayOf(n)) + fun settings_voice_speaker_learning(n: Any, k: Any): String = Tr.f(2607, arrayOf(n, k)) + val settings_voice_speaker_reenrol: String get() = Tr.s(2608) + val voice_always_pill_listening: String get() = Tr.s(2609) + val voice_always_pill_paused: String get() = Tr.s(2610) + val voice_always_pill_listen: String get() = Tr.s(2611) + fun voice_mark_tip(stt: Any, conf: Any): String = Tr.f(2612, arrayOf(stt, conf)) + fun voice_mark_unsure(words: Any): String = Tr.f(2613, arrayOf(words)) + val voice_mark_edited: String get() = Tr.s(2614) + val gpui_side_old_chats_that_belong_to: String get() = Tr.s(2615) + val gpui_side_group_projects: String get() = Tr.s(2616) + val gpui_side_on_projects_with_nothing_going: String get() = Tr.s(2617) + val gpui_side_no_group: String get() = Tr.s(2618) + val gpui_e_freecad_install: String get() = Tr.s(2619) + val gpui_e_freecad_ask: String get() = Tr.s(2620) + val gpui_e_freecad_installing: String get() = Tr.s(2621) + val gpui_e_freecad_page: String get() = Tr.s(2622) + fun gpui_e_freecad_ask_note(into: Any): String = Tr.f(2623, arrayOf(into)) + val gpui_e_freecad_offer: String get() = Tr.s(2624) + val gpui_e_picker_clone_hint: String get() = Tr.s(2625) + fun gpui_e_picker_clone_typed(origin: Any): String = Tr.f(2626, arrayOf(origin)) + val settings_git_page: String get() = Tr.s(2627) + val settings_git_autopush: String get() = Tr.s(2628) + val settings_git_autopush_note: String get() = Tr.s(2629) + val settings_git_notice: String get() = Tr.s(2630) + val settings_git_offbranch: String get() = Tr.s(2631) + val settings_git_offbranch_note: String get() = Tr.s(2632) + val settings_browser_start: String get() = Tr.s(2633) + val settings_browser_start_note: String get() = Tr.s(2634) + val settings_browser_opens: String get() = Tr.s(2635) + val settings_browser_reset: String get() = Tr.s(2636) + val settings_browser_blank: String get() = Tr.s(2637) + fun settings_browser_now_default(url: Any): String = Tr.f(2638, arrayOf(url)) + val settings_browser_now_blank: String get() = Tr.s(2639) + fun settings_browser_now(url: Any): String = Tr.f(2640, arrayOf(url)) + val settings_browser_bad: String get() = Tr.s(2641) + val gpui_f_group_install: String get() = Tr.s(2642) + val gpui_f_group_agents: String get() = Tr.s(2643) + val gpui_f_group_cad: String get() = Tr.s(2644) + val gpui_f_group_devices: String get() = Tr.s(2645) + val gpui_f_group_first: String get() = Tr.s(2646) + val gpui_f_group_tour: String get() = Tr.s(2647) + fun gpui_f_counter(i: Number, n: Number): String = Tr.f(2648, arrayOf(i, n)) + fun gpui_f_progress(d: Number, n: Number): String = Tr.f(2649, arrayOf(d, n)) + val gpui_f_next: String get() = Tr.s(2650) + val gpui_f_skip_step: String get() = Tr.s(2651) + val gpui_f_finish_later: String get() = Tr.s(2652) + val gpui_f_end_setup: String get() = Tr.s(2653) + val gpui_f_finish_setup: String get() = Tr.s(2654) + val gpui_f_welcome: String get() = Tr.s(2655) + val gpui_f_welcome_body: String get() = Tr.s(2656) + val gpui_f_installed: String get() = Tr.s(2657) + fun gpui_f_install_body_linux(version: Any): String = Tr.f(2658, arrayOf(version)) + fun gpui_f_install_body_darwin(version: Any): String = Tr.f(2659, arrayOf(version)) + fun gpui_f_install_body_windows(version: Any): String = Tr.f(2660, arrayOf(version)) + val gpui_f_program: String get() = Tr.s(2661) + val gpui_f_terminal_command: String get() = Tr.s(2662) + fun gpui_f_found_at(path: Any): String = Tr.f(2663, arrayOf(path)) + val gpui_f_path_fix: String get() = Tr.s(2664) + val gpui_f_path_fix_windows: String get() = Tr.s(2665) + val gpui_f_updates: String get() = Tr.s(2666) + val gpui_f_updates_note: String get() = Tr.s(2667) + val gpui_f_home_title: String get() = Tr.s(2668) + val gpui_f_home_body: String get() = Tr.s(2669) + val gpui_f_data_folder: String get() = Tr.s(2670) + fun gpui_f_hub_listens(addr: Any): String = Tr.f(2671, arrayOf(addr)) + val gpui_f_other_folder: String get() = Tr.s(2672) + val gpui_f_other_folder_note: String get() = Tr.s(2673) + val gpui_f_choose_folder: String get() = Tr.s(2674) + fun gpui_f_installing(label: Any): String = Tr.f(2675, arrayOf(label)) + val gpui_f_starting: String get() = Tr.s(2676) + fun gpui_f_did_not_install(label: Any): String = Tr.f(2677, arrayOf(label)) + fun gpui_f_install_label(label: Any): String = Tr.f(2678, arrayOf(label)) + val gpui_f_winget_note: String get() = Tr.s(2679) + val gpui_f_runs_codex: String get() = Tr.s(2680) + val gpui_f_runs_vendor: String get() = Tr.s(2681) + fun gpui_f_get_label(label: Any): String = Tr.f(2682, arrayOf(label)) + val gpui_f_opens_download: String get() = Tr.s(2683) + val gpui_f_checking: String get() = Tr.s(2684) + val gpui_f_import_title: String get() = Tr.s(2685) + val gpui_f_import_copied: String get() = Tr.s(2686) + fun gpui_f_import_body(from: Any): String = Tr.f(2687, arrayOf(from)) + val gpui_f_import_nothing: String get() = Tr.s(2688) + val gpui_f_import_nothing_note: String get() = Tr.s(2689) + val gpui_f_import_what: String get() = Tr.s(2690) + val gpui_f_import_notcounted: String get() = Tr.s(2691) + val gpui_f_import_count: String get() = Tr.s(2692) + val gpui_f_import_counting: String get() = Tr.s(2693) + val gpui_f_import_reading: String get() = Tr.s(2694) + val gpui_f_import_nothing_new: String get() = Tr.s(2695) + val gpui_f_import_here_already: String get() = Tr.s(2696) + val gpui_f_import_count_again: String get() = Tr.s(2697) + val gpui_f_import_comes: String get() = Tr.s(2698) + val gpui_f_import_import: String get() = Tr.s(2699) + val gpui_f_import_import_note: String get() = Tr.s(2700) + val gpui_f_import_withkeys: String get() = Tr.s(2701) + val gpui_f_import_withkeys_note: String get() = Tr.s(2702) + val gpui_f_import_importing: String get() = Tr.s(2703) + fun gpui_f_import_events(done: Number, of: Number): String = Tr.f(2704, arrayOf(done, of)) + val gpui_f_import_imported: String get() = Tr.s(2705) + val gpui_f_import_nothing_came: String get() = Tr.s(2706) + val gpui_f_import_again: String get() = Tr.s(2707) + val gpui_f_import_again_note: String get() = Tr.s(2708) + val gpui_f_import_stopped: String get() = Tr.s(2709) + fun gpui_f_import_n_projects(n: Number): String = Tr.f(2710, arrayOf(n)) + fun gpui_f_import_n_threads(t: Number, m: Number): String = Tr.f(2711, arrayOf(t, m)) + fun gpui_f_import_n_newmsgs(m: Number): String = Tr.f(2712, arrayOf(m)) + fun gpui_f_import_n_bots(b: Number, m: Number): String = Tr.f(2713, arrayOf(b, m)) + fun gpui_f_import_n_rooms(r: Number, p: Number): String = Tr.f(2714, arrayOf(r, p)) + fun gpui_f_import_n_routines(n: Number): String = Tr.f(2715, arrayOf(n)) + fun gpui_f_import_n_settings(n: Number): String = Tr.f(2716, arrayOf(n)) + fun gpui_f_import_n_devices(n: Number): String = Tr.f(2717, arrayOf(n)) + fun gpui_f_import_n_subagents(n: Number): String = Tr.f(2718, arrayOf(n)) + val gpui_f_import_nothing_new_dot: String get() = Tr.s(2719) + val gpui_f_note_mailruns: String get() = Tr.s(2720) + fun gpui_f_note_mailruns_text(n: Number): String = Tr.f(2721, arrayOf(n)) + val gpui_f_note_routines: String get() = Tr.s(2722) + fun gpui_f_note_routines_text(n: Number): String = Tr.f(2723, arrayOf(n)) + val gpui_f_note_machines: String get() = Tr.s(2724) + val gpui_f_note_machines_text: String get() = Tr.s(2725) + val gpui_f_note_keys: String get() = Tr.s(2726) + val gpui_f_note_keys_text: String get() = Tr.s(2727) + val gpui_f_note_google: String get() = Tr.s(2728) + val gpui_f_note_google_text: String get() = Tr.s(2729) + val gpui_f_note_clashes: String get() = Tr.s(2730) + fun gpui_f_note_clashes_text(n: Number): String = Tr.f(2731, arrayOf(n)) + val gpui_f_note_fresh: String get() = Tr.s(2732) + val gpui_f_note_fresh_text: String get() = Tr.s(2733) + val gpui_f_note_running: String get() = Tr.s(2734) + val gpui_f_note_running_text: String get() = Tr.s(2735) + val gpui_f_note_botfolder: String get() = Tr.s(2736) + fun gpui_f_note_botfolder_text(name: Any, gb: Any, path: Any): String = Tr.f(2737, arrayOf(name, gb, path)) + val gpui_f_note_notcopied: String get() = Tr.s(2738) + fun gpui_f_note_notcopied_text(path: Any, why: Any): String = Tr.f(2739, arrayOf(path, why)) + val gpui_f_note_signin: String get() = Tr.s(2740) + fun gpui_f_note_signin_text(names: Any): String = Tr.f(2741, arrayOf(names)) + val gpui_f_note_accounts_text: String get() = Tr.s(2742) + fun gpui_f_note_vault_text(why: Any): String = Tr.f(2743, arrayOf(why)) + fun gpui_f_ov_counts(p: Number, pn: Number, t: Number, tn: Number, e: Number, en: Number): String = Tr.f(2744, arrayOf(p, pn, t, tn, e, en)) + fun gpui_f_ov_mb(done: Number, total: Number): String = Tr.f(2745, arrayOf(done, total)) + fun gpui_f_ov_files(n: Number): String = Tr.f(2746, arrayOf(n)) + fun gpui_f_ov_now(what: Any): String = Tr.f(2747, arrayOf(what)) + fun gpui_f_ov_min(n: Number): String = Tr.f(2748, arrayOf(n)) + fun gpui_f_ov_s(n: Number): String = Tr.f(2749, arrayOf(n)) + val gpui_f_ov_measuring: String get() = Tr.s(2750) + val gpui_f_ov_title: String get() = Tr.s(2751) + fun gpui_f_ov_body(what: Any): String = Tr.f(2752, arrayOf(what)) + fun gpui_f_ov_took(n: Number): String = Tr.f(2753, arrayOf(n)) + val gpui_f_ov_here: String get() = Tr.s(2754) + fun gpui_f_ov_failed_in(why: Any, from: Any): String = Tr.f(2755, arrayOf(why, from)) + fun gpui_f_ov_failed(why: Any): String = Tr.f(2756, arrayOf(why)) + val gpui_f_usage_title: String get() = Tr.s(2757) + val gpui_f_usage_body: String get() = Tr.s(2758) + val gpui_f_usage_share: String get() = Tr.s(2759) + val gpui_f_usage_saved: String get() = Tr.s(2760) + val gpui_f_usage_choose: String get() = Tr.s(2761) + fun gpui_f_agent_found_signed(path: Any): String = Tr.f(2762, arrayOf(path)) + fun gpui_f_agent_found_signed_who(path: Any, who: Any): String = Tr.f(2763, arrayOf(path, who)) + fun gpui_f_agent_found_notsigned(path: Any): String = Tr.f(2764, arrayOf(path)) + fun gpui_f_agent_found_howsign(path: Any, cmd: Any): String = Tr.f(2765, arrayOf(path, cmd)) + fun gpui_f_agent_version(version: Any, path: Any): String = Tr.f(2766, arrayOf(version, path)) + fun gpui_f_agent_version_signed(version: Any, path: Any): String = Tr.f(2767, arrayOf(version, path)) + fun gpui_f_agent_version_signed_who(version: Any, path: Any, who: Any): String = Tr.f(2768, arrayOf(version, path, who)) + fun gpui_f_agent_version_notsigned(version: Any, path: Any): String = Tr.f(2769, arrayOf(version, path)) + fun gpui_f_agent_version_howsign(version: Any, path: Any, cmd: Any): String = Tr.f(2770, arrayOf(version, path, cmd)) + val gpui_f_not_installed: String get() = Tr.s(2771) + val gpui_f_or_terminal: String get() = Tr.s(2772) + fun gpui_f_no_install_button(cmd: Any): String = Tr.f(2773, arrayOf(cmd)) + val gpui_f_check_again: String get() = Tr.s(2774) + val gpui_f_check_again_note: String get() = Tr.s(2775) + val gpui_f_check_again_one: String get() = Tr.s(2776) + val gpui_f_claude_title: String get() = Tr.s(2777) + val gpui_f_claude_body: String get() = Tr.s(2778) + val gpui_f_codex_title: String get() = Tr.s(2779) + val gpui_f_codex_body: String get() = Tr.s(2780) + val gpui_f_others_title: String get() = Tr.s(2781) + val gpui_f_others_body: String get() = Tr.s(2782) + fun gpui_f_tool_runs(name: Any, version: Any, path: Any): String = Tr.f(2783, arrayOf(name, version, path)) + fun gpui_f_tool_broken(path: Any, why: Any): String = Tr.f(2784, arrayOf(path, why)) + fun gpui_f_tool_notfound(name: Any): String = Tr.f(2785, arrayOf(name)) + val gpui_f_kicad_body: String get() = Tr.s(2786) + fun gpui_f_kicad_ok_v(version: Any, cli: Any): String = Tr.f(2787, arrayOf(version, cli)) + fun gpui_f_kicad_ok(cli: Any): String = Tr.f(2788, arrayOf(cli)) + val gpui_f_releases: String get() = Tr.s(2789) + fun gpui_f_kicad_auto(version: Any): String = Tr.f(2790, arrayOf(version)) + fun gpui_f_kicad_offer_stock_v(version: Any): String = Tr.f(2791, arrayOf(version)) + val gpui_f_kicad_offer_stock: String get() = Tr.s(2792) + fun gpui_f_kicad_offer_old_v(version: Any): String = Tr.f(2793, arrayOf(version)) + val gpui_f_kicad_offer_old: String get() = Tr.s(2794) + fun gpui_f_kicad_offer_broken_v(version: Any): String = Tr.f(2795, arrayOf(version)) + val gpui_f_kicad_offer_broken: String get() = Tr.s(2796) + fun gpui_f_kicad_nopackage(computer: Any): String = Tr.f(2797, arrayOf(computer)) + fun gpui_f_kicad_found_stock_v(version: Any, cli: Any): String = Tr.f(2798, arrayOf(version, cli)) + fun gpui_f_kicad_found_stock(cli: Any): String = Tr.f(2799, arrayOf(cli)) + fun gpui_f_kicad_found_v(version: Any, cli: Any): String = Tr.f(2800, arrayOf(version, cli)) + fun gpui_f_kicad_found_plain(cli: Any): String = Tr.f(2801, arrayOf(cli)) + val gpui_f_kicad_found: String get() = Tr.s(2802) + val gpui_f_stock_kicad: String get() = Tr.s(2803) + val gpui_f_stock_kicad_note: String get() = Tr.s(2804) + val gpui_f_download_kicad: String get() = Tr.s(2805) + val gpui_f_locate: String get() = Tr.s(2806) + val gpui_f_locate_kicad: String get() = Tr.s(2807) + val gpui_f_use_path: String get() = Tr.s(2808) + val gpui_f_hint_kicad: String get() = Tr.s(2809) + val gpui_f_freecad_body: String get() = Tr.s(2810) + val gpui_f_locate_freecad: String get() = Tr.s(2811) + val gpui_f_hint_freecad: String get() = Tr.s(2812) + val gpui_f_debian: String get() = Tr.s(2813) + val gpui_f_local_code: String get() = Tr.s(2814) + val gpui_f_only_this: String get() = Tr.s(2815) + val gpui_f_machine_title: String get() = Tr.s(2816) + val gpui_f_machine_body: String get() = Tr.s(2817) + val gpui_f_ts_on: String get() = Tr.s(2818) + val gpui_f_ts_off: String get() = Tr.s(2819) + val gpui_f_ts_none: String get() = Tr.s(2820) + val gpui_f_linked_machines: String get() = Tr.s(2821) + val gpui_f_none_yet: String get() = Tr.s(2822) + fun gpui_f_n_linked(n: Number): String = Tr.f(2823, arrayOf(n)) + val gpui_f_phone_title: String get() = Tr.s(2824) + val gpui_f_phone_body: String get() = Tr.s(2825) + val gpui_f_pairing_link: String get() = Tr.s(2826) + val gpui_f_make_another: String get() = Tr.s(2827) + fun gpui_f_short_code(code: Any): String = Tr.f(2828, arrayOf(code)) + val gpui_f_add_device: String get() = Tr.s(2829) + fun gpui_f_invite_failed(e: Any): String = Tr.f(2830, arrayOf(e)) + val gpui_f_invite_note: String get() = Tr.s(2831) + val gpui_f_show_qr: String get() = Tr.s(2832) + val gpui_f_android_app: String get() = Tr.s(2833) + val gpui_f_android_note: String get() = Tr.s(2834) + val gpui_f_download_apk: String get() = Tr.s(2835) + val gpui_f_iphone_app: String get() = Tr.s(2836) + val gpui_f_iphone_note: String get() = Tr.s(2837) + val gpui_f_ts_phone: String get() = Tr.s(2838) + val gpui_f_ts_phone_note: String get() = Tr.s(2839) + val gpui_f_app_store: String get() = Tr.s(2840) + val gpui_f_google_play: String get() = Tr.s(2841) + val gpui_f_paired_devices: String get() = Tr.s(2842) + fun gpui_f_n_paired(n: Number): String = Tr.f(2843, arrayOf(n)) + val gpui_f_remote_title: String get() = Tr.s(2844) + val gpui_f_cont_on: String get() = Tr.s(2845) + val gpui_f_cont_off: String get() = Tr.s(2846) + val gpui_f_remote_body_package: String get() = Tr.s(2847) + fun gpui_f_remote_body_channel(channel: Any): String = Tr.f(2848, arrayOf(channel)) + val gpui_f_cont_restart: String get() = Tr.s(2849) + val gpui_f_open_page: String get() = Tr.s(2850) + val gpui_f_open_page_note: String get() = Tr.s(2851) + val gpui_f_network_updates: String get() = Tr.s(2852) + val gpui_f_project_title: String get() = Tr.s(2853) + val gpui_f_project_body: String get() = Tr.s(2854) + val gpui_f_add_another: String get() = Tr.s(2855) + val gpui_f_path_folder: String get() = Tr.s(2856) + val gpui_f_add_project: String get() = Tr.s(2857) + val gpui_f_create_project: String get() = Tr.s(2858) + val gpui_f_full_path: String get() = Tr.s(2859) + val gpui_f_thread_title: String get() = Tr.s(2860) + val gpui_f_thread_body: String get() = Tr.s(2861) + fun gpui_f_new_thread_in(project: Any): String = Tr.f(2862, arrayOf(project)) + val gpui_f_new_thread_note: String get() = Tr.s(2863) + val gpui_f_start_thread: String get() = Tr.s(2864) + val gpui_f_first_message: String get() = Tr.s(2865) + val gpui_f_project_first: String get() = Tr.s(2866) + val gpui_f_go_project: String get() = Tr.s(2867) + fun gpui_f_n_so_far(n: Number): String = Tr.f(2868, arrayOf(n)) + val gpui_f_tour_viewers: String get() = Tr.s(2869) + val gpui_f_tour_viewers_body: String get() = Tr.s(2870) + val gpui_f_key_side: String get() = Tr.s(2871) + val gpui_f_key_diff: String get() = Tr.s(2872) + val gpui_f_tour_threed: String get() = Tr.s(2873) + val gpui_f_tour_threed_body: String get() = Tr.s(2874) + val gpui_f_key_threed: String get() = Tr.s(2875) + val gpui_f_tour_mech: String get() = Tr.s(2876) + val gpui_f_tour_mech_body: String get() = Tr.s(2877) + val gpui_f_tour_browser_body: String get() = Tr.s(2878) + val gpui_f_tour_thread: String get() = Tr.s(2879) + fun gpui_f_tour_thread_body(m: Any): String = Tr.f(2880, arrayOf(m)) + val gpui_f_tour_bots_body: String get() = Tr.s(2881) + val gpui_f_make_bot: String get() = Tr.s(2882) + val gpui_f_opens_form: String get() = Tr.s(2883) + val gpui_f_new_bot: String get() = Tr.s(2884) + val gpui_f_tour_space: String get() = Tr.s(2885) + val gpui_f_tour_space_body: String get() = Tr.s(2886) + val gpui_f_tour_rooms_body: String get() = Tr.s(2887) + val gpui_f_make_room: String get() = Tr.s(2888) + val gpui_f_new_room: String get() = Tr.s(2889) + val gpui_f_tour_routines_body: String get() = Tr.s(2890) + val gpui_f_tour_palette: String get() = Tr.s(2891) + fun gpui_f_tour_palette_body(m: Any): String = Tr.f(2892, arrayOf(m)) + val gpui_f_key_agent: String get() = Tr.s(2893) + val gpui_f_key_prevnext: String get() = Tr.s(2894) + fun gpui_f_key_prevnext_keys(m: Any): String = Tr.f(2895, arrayOf(m)) + val gpui_f_key_uber: String get() = Tr.s(2896) + val gpui_f_try_it: String get() = Tr.s(2897) + val gpui_f_try_palette: String get() = Tr.s(2898) + val gpui_f_open_palette: String get() = Tr.s(2899) + val gpui_f_try_settings: String get() = Tr.s(2900) + val gpui_f_open_settings: String get() = Tr.s(2901) + fun gpui_f_tour_settings_body(pages: Any): String = Tr.f(2902, arrayOf(pages)) + val gpui_f_uber_title: String get() = Tr.s(2903) + fun gpui_f_uber_is(name: Any): String = Tr.f(2904, arrayOf(name)) + val gpui_f_uber_pick: String get() = Tr.s(2905) + val gpui_f_uber_create: String get() = Tr.s(2906) + fun gpui_f_uber_make(name: Any): String = Tr.f(2907, arrayOf(name)) + val gpui_f_uber_create_btn: String get() = Tr.s(2908) + val gpui_f_all_set: String get() = Tr.s(2909) + val gpui_f_still_open: String get() = Tr.s(2910) + val gpui_f_skipped_dot: String get() = Tr.s(2911) + val gpui_f_not_done_dot: String get() = Tr.s(2912) + val gpui_f_skipped: String get() = Tr.s(2913) + val gpui_f_not_done: String get() = Tr.s(2914) + val gpui_f_setup_finished: String get() = Tr.s(2915) + fun gpui_f_setup_finished_note(d: Number, n: Number): String = Tr.f(2916, arrayOf(d, n)) + val gpui_f_run_again: String get() = Tr.s(2917) + val gpui_f_setup_unfinished: String get() = Tr.s(2918) + val gpui_f_resume: String get() = Tr.s(2919) + val gpui_f_start_again: String get() = Tr.s(2920) + val gpui_f_setup_note: String get() = Tr.s(2921) + val gpui_f_run_setup: String get() = Tr.s(2922) + val gpui_f_name_bpkicad: String get() = Tr.s(2923) + val gpui_f_name_kicad: String get() = Tr.s(2924) + val gpui_f_name_freecad: String get() = Tr.s(2925) + val gpui_f_name_claude: String get() = Tr.s(2926) + val gpui_f_name_codex: String get() = Tr.s(2927) + val gpui_f_name_grok: String get() = Tr.s(2928) + val gpui_f_name_muse: String get() = Tr.s(2929) + val gpui_f_name_opencode: String get() = Tr.s(2930) + val gpui_f_name_pi: String get() = Tr.s(2931) + val gpui_f_name_omp: String get() = Tr.s(2932) + val gpui_f_name_fedora: String get() = Tr.s(2933) + val gpui_f_name_arch: String get() = Tr.s(2934) + val gpui_f_name_homebrew: String get() = Tr.s(2935) + val gpui_f_name_winget: String get() = Tr.s(2936) + fun gpui_f_fold_tools(n: Number, tools: Any): String = Tr.f(2937, arrayOf(n, tools)) + fun gpui_f_fold_tools_steps(n: Number, tools: Any, d: Number): String = Tr.f(2938, arrayOf(n, tools, d)) + fun gpui_f_fold_steps(n: Number, d: Number): String = Tr.f(2939, arrayOf(n, d)) + fun gpui_f_fold_live(n: Number, what: Any): String = Tr.f(2940, arrayOf(n, what)) + fun gpui_f_fold_live_steps(n: Number, d: Number, what: Any): String = Tr.f(2941, arrayOf(n, d, what)) + val gpui_f_restart: String get() = Tr.s(2942) + val gpui_f_not_read: String get() = Tr.s(2943) + val gpui_f_needs: String get() = Tr.s(2944) + fun gpui_f_needs_head(head: Any): String = Tr.f(2945, arrayOf(head)) + val gpui_f_type_here: String get() = Tr.s(2946) + val gpui_f_or_type: String get() = Tr.s(2947) + val gpui_f_quote_files: String get() = Tr.s(2948) + val gpui_f_dictate: String get() = Tr.s(2949) + val gpui_f_inactive: String get() = Tr.s(2950) + fun gpui_f_tool_runs_nover(name: Any, path: Any): String = Tr.f(2951, arrayOf(name, path)) + val gpui_f2_aon_boat_learn: String get() = Tr.s(2952) + val gpui_f2_uberbot_what: String get() = Tr.s(2953) + val gpui_acct_account_name_optional: String get() = Tr.s(2954) + val gpui_follow_button: String get() = Tr.s(2955) + val gpui_follow_button_tip: String get() = Tr.s(2956) + fun gpui_follow_route(page: Any, net: Any, near: Any): String = Tr.f(2957, arrayOf(page, net, near)) + fun gpui_follow_edit(page: Any, what: Any): String = Tr.f(2958, arrayOf(page, what)) + fun gpui_follow_near(ref: Any): String = Tr.f(2959, arrayOf(ref)) + val gpui_follow_wait: String get() = Tr.s(2960) + val gpui_follow_paused: String get() = Tr.s(2961) + val gpui_follow_resume: String get() = Tr.s(2962) + fun gpui_follow_held(page: Any): String = Tr.f(2963, arrayOf(page)) + val android_mgmt_all: String get() = Tr.s(2964) + val android_mgmt_judged: String get() = Tr.s(2965) + val android_mgmt_fix: String get() = Tr.s(2966) + val android_mgmt_sent: String get() = Tr.s(2967) + val android_mcp: String get() = Tr.s(2968) + val android_alerts_ask: String get() = Tr.s(2969) + val android_alerts_allow: String get() = Tr.s(2970) + val android_alerts_later: String get() = Tr.s(2971) + val android_viewerbg: String get() = Tr.s(2972) + val android_viewerbg_auto: String get() = Tr.s(2973) + val android_viewerbg_light: String get() = Tr.s(2974) + val android_viewerbg_dark: String get() = Tr.s(2975) + val android_viewerbg_custom: String get() = Tr.s(2976) + val android_viewerbg_hex: String get() = Tr.s(2977) + val android_viewerbg_note: String get() = Tr.s(2978) + val android_state_working: String get() = Tr.s(2979) + val android_state_inactive: String get() = Tr.s(2980) + val android_state_finished: String get() = Tr.s(2981) + val android_state_settled: String get() = Tr.s(2982) + val android_state_stalled: String get() = Tr.s(2983) + val android_state_monitoring: String get() = Tr.s(2984) + val android_ago_now: String get() = Tr.s(2985) + fun android_ago_m(n: Any): String = Tr.f(2986, arrayOf(n)) + fun android_ago_h(n: Any): String = Tr.f(2987, arrayOf(n)) + fun android_ago_d(n: Any): String = Tr.f(2988, arrayOf(n)) + val android_room_gone: String get() = Tr.s(2989) + fun android_conn_connecting(hub: Any): String = Tr.f(2990, arrayOf(hub)) + val android_conn_offline: String get() = Tr.s(2991) + val android_hub: String get() = Tr.s(2992) + val android_hub_add: String get() = Tr.s(2993) + val android_pair_repair: String get() = Tr.s(2994) + val android_pair_revoked: String get() = Tr.s(2995) + val android_pair_paste: String get() = Tr.s(2996) + val android_pair_photo: String get() = Tr.s(2997) + val android_pair_other: String get() = Tr.s(2998) + val android_pair_code_lead: String get() = Tr.s(2999) + val android_pair_code: String get() = Tr.s(3000) + val android_pair_code_bad: String get() = Tr.s(3001) + val android_pair_link_bad: String get() = Tr.s(3002) + val android_pair_ask: String get() = Tr.s(3003) + val android_pair_ask_note: String get() = Tr.s(3004) + val android_terminals: String get() = Tr.s(3005) + val android_search_hint: String get() = Tr.s(3006) + val android_projects_none: String get() = Tr.s(3007) + val android_project_add: String get() = Tr.s(3008) + val android_kind_uberbot: String get() = Tr.s(3009) + val android_kind_bot: String get() = Tr.s(3010) + val android_kind_room: String get() = Tr.s(3011) + fun android_thread_new_in(project: Any): String = Tr.f(3012, arrayOf(project)) + val android_threads_none: String get() = Tr.s(3013) + fun android_kids_hide(n: Number): String = Tr.f(3014, arrayOf(n)) + fun android_kids_show(n: Number): String = Tr.f(3015, arrayOf(n)) + fun android_work_head(word: Any): String = Tr.f(3016, arrayOf(word)) + fun android_lock_waiting(n: Any): String = Tr.f(3017, arrayOf(n)) + val android_state_head: String get() = Tr.s(3018) + val android_unsettle: String get() = Tr.s(3019) + val android_mic_off: String get() = Tr.s(3020) + val android_picture_bad: String get() = Tr.s(3021) + val android_buy_failed: String get() = Tr.s(3022) + val android_photo_bad: String get() = Tr.s(3023) + val android_camera_failed: String get() = Tr.s(3024) + val android_camera_off: String get() = Tr.s(3025) + val android_message_gone: String get() = Tr.s(3026) + val android_load_earlier: String get() = Tr.s(3027) + val android_thread_empty: String get() = Tr.s(3028) + val android_composer_hint: String get() = Tr.s(3029) + val android_pictures_old: String get() = Tr.s(3030) + val android_photo_choose: String get() = Tr.s(3031) + val android_photo_take: String get() = Tr.s(3032) + val android_failed_generic: String get() = Tr.s(3033) + val android_secret_new: String get() = Tr.s(3034) + fun android_secret_named(name: Any): String = Tr.f(3035, arrayOf(name)) + val android_secret_paste: String get() = Tr.s(3036) + val android_secret_refused: String get() = Tr.s(3037) + val android_secret_notneeded: String get() = Tr.s(3038) + val android_send_retry: String get() = Tr.s(3039) + val android_ask_open: String get() = Tr.s(3040) + val android_ask_done: String get() = Tr.s(3041) + val android_ask_answer: String get() = Tr.s(3042) + fun android_ask_answered(answer: Any): String = Tr.f(3043, arrayOf(answer)) + val android_hub_use: String get() = Tr.s(3044) + val native_hub_home: String get() = Tr.s(3045) + val native_hub_unreachable: String get() = Tr.s(3046) + val android_online: String get() = Tr.s(3047) + fun android_offline(why: Any): String = Tr.f(3048, arrayOf(why)) + val android_accounts: String get() = Tr.s(3049) + fun android_hub_forget_ask(hub: Any): String = Tr.f(3050, arrayOf(hub)) + val android_hub_forget_note: String get() = Tr.s(3051) + val android_improve: String get() = Tr.s(3052) + val android_alerts_head: String get() = Tr.s(3053) + val android_alerts_note: String get() = Tr.s(3054) + val android_quiet_head: String get() = Tr.s(3055) + fun android_quiet_range(from: Any, to: Any): String = Tr.f(3056, arrayOf(from, to)) + val android_urgent_head: String get() = Tr.s(3057) + val android_quiet_note: String get() = Tr.s(3058) + val android_unpair: String get() = Tr.s(3059) + val android_updates_head: String get() = Tr.s(3060) + val android_option_beta: String get() = Tr.s(3061) + val android_folder_use: String get() = Tr.s(3062) + fun android_thread_new_title(project: Any): String = Tr.f(3063, arrayOf(project)) + val android_thread_new_hint: String get() = Tr.s(3064) + val android_start: String get() = Tr.s(3065) + val android_improve_ask: String get() = Tr.s(3066) + val android_improve_note: String get() = Tr.s(3067) + val android_improve_github: String get() = Tr.s(3068) + val android_project_head: String get() = Tr.s(3069) + val android_improve_thread: String get() = Tr.s(3070) + val android_improve_sent: String get() = Tr.s(3071) + val android_order_head: String get() = Tr.s(3072) + fun android_order_named(name: Any): String = Tr.f(3073, arrayOf(name)) + val android_buy_now: String get() = Tr.s(3074) + val android_design_change: String get() = Tr.s(3075) + val android_live_working: String get() = Tr.s(3076) + fun android_live_count(n: Number): String = Tr.f(3077, arrayOf(n)) + val android_connecting: String get() = Tr.s(3078) + val android_hub_unreachable: String get() = Tr.s(3079) + val android_pair_code_address: String get() = Tr.s(3080) + val android_pair_link_partial: String get() = Tr.s(3081) + val android_pair_link_none: String get() = Tr.s(3082) + fun android_fail_http(code: Any): String = Tr.f(3083, arrayOf(code)) + fun android_fail_reach(hub: Any): String = Tr.f(3084, arrayOf(hub)) + fun android_fail_timeout(hub: Any): String = Tr.f(3085, arrayOf(hub)) + fun android_fail_dns(hub: Any): String = Tr.f(3086, arrayOf(hub)) + val android_offline_word: String get() = Tr.s(3087) + val android_offline_cap: String get() = Tr.s(3088) + val android_proto_old: String get() = Tr.s(3089) + val android_hub_refused: String get() = Tr.s(3090) + val android_hub_noanswer: String get() = Tr.s(3091) + val android_thinking: String get() = Tr.s(3092) + val android_buy_it: String get() = Tr.s(3093) + val android_layers: String get() = Tr.s(3094) + val android_link_old: String get() = Tr.s(3095) + val android_link_nohere: String get() = Tr.s(3096) + val android_link_failed: String get() = Tr.s(3097) + val android_link_offline: String get() = Tr.s(3098) + val android_copied: String get() = Tr.s(3099) + fun android_history_title(n: Any): String = Tr.f(3100, arrayOf(n)) + fun android_settled_title(n: Any): String = Tr.f(3101, arrayOf(n)) + val android_dictate: String get() = Tr.s(3102) + val android_voice_spelling: String get() = Tr.s(3103) + val android_voice_head: String get() = Tr.s(3104) + val android_link_noapp: String get() = Tr.s(3105) + val android_star: String get() = Tr.s(3106) + val android_rescue_restart: String get() = Tr.s(3107) + val android_rescue_pairing: String get() = Tr.s(3108) + val android_rescue_asking: String get() = Tr.s(3109) + val android_rescue_norestart: String get() = Tr.s(3110) + val android_rescue_nostatus: String get() = Tr.s(3111) + val android_rescue_sent: String get() = Tr.s(3112) + val android_rescue_refused: String get() = Tr.s(3113) + val android_rescue_old: String get() = Tr.s(3114) + val android_rescue_unreachable: String get() = Tr.s(3115) + val android_rescue_noanswer: String get() = Tr.s(3116) + fun android_rescue_still(status: Any): String = Tr.f(3117, arrayOf(status)) + val android_rescue_waiting: String get() = Tr.s(3118) + fun android_rescue_is(status: Any): String = Tr.f(3119, arrayOf(status)) + val android_rescue_down: String get() = Tr.s(3120) + val android_rescue_safedegraded: String get() = Tr.s(3121) + val android_rescue_degraded: String get() = Tr.s(3122) + val android_rescue_safe: String get() = Tr.s(3123) + val android_rescue_up: String get() = Tr.s(3124) + val android_pair_local: String get() = Tr.s(3125) + val android_pair_wrong: String get() = Tr.s(3126) + val android_pair_expired: String get() = Tr.s(3127) + val android_pair_used: String get() = Tr.s(3128) + val android_pair_revokedcode: String get() = Tr.s(3129) + val android_pair_limited: String get() = Tr.s(3130) + val android_pair_required: String get() = Tr.s(3131) + val android_pair_unreachable: String get() = Tr.s(3132) + val android_pad_pen_hint: String get() = Tr.s(3133) + val android_pad_box_hint: String get() = Tr.s(3134) + val android_pad_eraser_hint: String get() = Tr.s(3135) + val android_pad_pen: String get() = Tr.s(3136) + val android_pad_box: String get() = Tr.s(3137) + val android_pad_eraser: String get() = Tr.s(3138) + val android_pad_paper: String get() = Tr.s(3139) + val android_undo: String get() = Tr.s(3140) + val android_pad_length: String get() = Tr.s(3141) + val android_machines_head: String get() = Tr.s(3142) + val android_devices_head: String get() = Tr.s(3143) + val android_mic_failed: String get() = Tr.s(3144) + val android_dictation_failed: String get() = Tr.s(3145) + val android_paste: String get() = Tr.s(3146) + val android_term_copy: String get() = Tr.s(3147) + fun android_terminals_in(project: Any): String = Tr.f(3148, arrayOf(project)) + val android_term_new: String get() = Tr.s(3149) + val android_terms_none: String get() = Tr.s(3150) + val android_term_failed: String get() = Tr.s(3151) + fun android_term_exited(code: Any): String = Tr.f(3152, arrayOf(code)) + val android_term_kind_shell: String get() = Tr.s(3153) + fun android_mesh_previous(why: Any): String = Tr.f(3154, arrayOf(why)) + val android_mesh_decoding: String get() = Tr.s(3155) + val android_mesh_bad: String get() = Tr.s(3156) + val android_viewer_a11y: String get() = Tr.s(3157) + val android_search_inthread: String get() = Tr.s(3158) + val android_thread_detach: String get() = Tr.s(3159) + val android_delete_more: String get() = Tr.s(3160) + val android_thread_rename: String get() = Tr.s(3161) + fun android_thread_delete_ask(title: Any): String = Tr.f(3162, arrayOf(title)) + val android_thread_delete: String get() = Tr.s(3163) + val android_keep: String get() = Tr.s(3164) + val android_badge_more: String get() = Tr.s(3165) + val android_project_remove_more: String get() = Tr.s(3166) + val android_project_rename: String get() = Tr.s(3167) + fun android_project_remove_ask(title: Any): String = Tr.f(3168, arrayOf(title)) + val android_searching: String get() = Tr.s(3169) + fun android_search_none(q: Any): String = Tr.f(3170, arrayOf(q)) + fun android_search_project(title: Any): String = Tr.f(3171, arrayOf(title)) + val android_history_head: String get() = Tr.s(3172) + val android_done: String get() = Tr.s(3173) + val android_you: String get() = Tr.s(3174) + val android_agent: String get() = Tr.s(3175) + fun android_room_post_to(room: Any): String = Tr.f(3176, arrayOf(room)) + val android_post: String get() = Tr.s(3177) + val android_find_head: String get() = Tr.s(3178) + val android_find_hint: String get() = Tr.s(3179) + fun android_find_none(q: Any): String = Tr.f(3180, arrayOf(q)) + val android_accounts_none: String get() = Tr.s(3181) + val android_account_name_hint: String get() = Tr.s(3182) + val android_account_add: String get() = Tr.s(3183) + val android_account: String get() = Tr.s(3184) + val android_signin_open: String get() = Tr.s(3185) + val android_copy_code: String get() = Tr.s(3186) + val android_code_paste: String get() = Tr.s(3187) + val android_code_send: String get() = Tr.s(3188) + val android_viewer_split: String get() = Tr.s(3189) + fun android_viewer_title(title: Any): String = Tr.f(3190, arrayOf(title)) + val android_viewer_board: String get() = Tr.s(3191) + val android_viewer_boards: String get() = Tr.s(3192) + val android_viewer_sheet: String get() = Tr.s(3193) + val android_viewer_sheets: String get() = Tr.s(3194) + fun android_viewer_sheets_n(n: Number): String = Tr.f(3195, arrayOf(n)) + fun ios_viewer_sheets_n(n: Number): String = Tr.f(3196, arrayOf(n)) + val android_viewer_change: String get() = Tr.s(3197) + val android_viewer_find: String get() = Tr.s(3198) + val android_viewer_noboard: String get() = Tr.s(3199) + val android_viewer_nosch: String get() = Tr.s(3200) + fun android_viewer_piece(at: Any): String = Tr.f(3201, arrayOf(at)) + val android_viewer_loading3d: String get() = Tr.s(3202) + val android_compare_close: String get() = Tr.s(3203) + val android_compare_none: String get() = Tr.s(3204) + val android_mech_none: String get() = Tr.s(3205) + val android_folder_empty: String get() = Tr.s(3206) + val android_file_bad: String get() = Tr.s(3207) + val android_file_noimage: String get() = Tr.s(3208) + fun android_file_nopreview(size: Any): String = Tr.f(3209, arrayOf(size)) + val android_pdf_bad: String get() = Tr.s(3210) + fun android_pdf_page(n: Any, total: Any): String = Tr.f(3211, arrayOf(n, total)) + val android_browser_takeover: String get() = Tr.s(3212) + val android_browser_keys: String get() = Tr.s(3213) + val android_browser_handback: String get() = Tr.s(3214) + val android_browser_page: String get() = Tr.s(3215) + val android_browser_none: String get() = Tr.s(3216) + val android_browser_driving: String get() = Tr.s(3217) + val android_changes_head: String get() = Tr.s(3218) + val android_diff_nogit: String get() = Tr.s(3219) + val android_diff_none: String get() = Tr.s(3220) + val android_checks_run: String get() = Tr.s(3221) + val android_nothing: String get() = Tr.s(3222) + val android_comments_none: String get() = Tr.s(3223) + val android_resolved: String get() = Tr.s(3224) + val android_reopen: String get() = Tr.s(3225) + val android_resolve: String get() = Tr.s(3226) + val android_comment_hint: String get() = Tr.s(3227) + fun android_probe_lit(n: Any): String = Tr.f(3228, arrayOf(n)) + fun android_fold_running(what: Any): String = Tr.f(3229, arrayOf(what)) + val android_hub_voice_unsupported_here: String get() = Tr.s(3230) + val android_hub_voice_mic_note_plain: String get() = Tr.s(3231) + fun android_hub_voice_mic_note_default(device: Any): String = Tr.f(3232, arrayOf(device)) + fun android_hub_voice_mic_note(device: Any): String = Tr.f(3233, arrayOf(device)) + val android_hub_voice_engine_pending: String get() = Tr.s(3234) + val android_hub_voice_dict_empty: String get() = Tr.s(3235) + val android_hub_voice_learned_empty: String get() = Tr.s(3236) + val android_hub_voice_pebble: String get() = Tr.s(3237) + val android_hub_voice_pebble_note: String get() = Tr.s(3238) + val android_hub_voice_noaudio_mic: String get() = Tr.s(3239) + val android_hub_voice_silent_mic: String get() = Tr.s(3240) + val android_hub_voice_skip: String get() = Tr.s(3241) + fun android_hub_voice_heard_many(word: Any, count: Any): String = Tr.f(3242, arrayOf(word, count)) + fun android_hub_voice_dropped(heard: Any): String = Tr.f(3243, arrayOf(heard)) + val android_hub_voice_err_copy: String get() = Tr.s(3244) + val android_hub_voice_err_busy: String get() = Tr.s(3245) + val android_hub_voice_err_setting: String get() = Tr.s(3246) + val android_hub_voice_err_action: String get() = Tr.s(3247) + val android_hub_voice_err_request: String get() = Tr.s(3248) + val android_hub_voice_err_term: String get() = Tr.s(3249) + val android_hub_voice_err_key: String get() = Tr.s(3250) + val android_hub_voice_err_write: String get() = Tr.s(3251) + val android_hub_voice_err_start: String get() = Tr.s(3252) + val android_hub_voice_err_stopped: String get() = Tr.s(3253) + val android_hub_voice_err_missing: String get() = Tr.s(3254) + fun android_hub_entry_step_files(files: Any): String = Tr.f(3255, arrayOf(files)) + fun android_hub_entry_step_base(files: Any): String = Tr.f(3256, arrayOf(files)) + val android_hub_entry_noreason: String get() = Tr.s(3257) + val android_hub_entry_retired: String get() = Tr.s(3258) + fun android_hub_viewer_layer(name: Any): String = Tr.f(3259, arrayOf(name)) + val android_hub_viewer_pads: String get() = Tr.s(3260) + val android_hub_viewer_vias: String get() = Tr.s(3261) + val android_hub_viewer_holes: String get() = Tr.s(3262) + val android_hub_viewer_margin: String get() = Tr.s(3263) + val android_hub_viewer_sch_page: String get() = Tr.s(3264) + val android_hub_viewer_sch_sheetfill: String get() = Tr.s(3265) + val android_hub_viewer_sch_bodyfill: String get() = Tr.s(3266) + val android_hub_viewer_sch_graphic: String get() = Tr.s(3267) + val android_hub_viewer_sch_note: String get() = Tr.s(3268) + val android_hub_viewer_sch_body: String get() = Tr.s(3269) + val android_hub_viewer_sch_pin: String get() = Tr.s(3270) + val android_hub_viewer_sch_pinname: String get() = Tr.s(3271) + val android_hub_viewer_sch_pinnumber: String get() = Tr.s(3272) + val android_hub_viewer_sch_field: String get() = Tr.s(3273) + val android_hub_viewer_sch_fieldother: String get() = Tr.s(3274) + val android_hub_viewer_sch_bus: String get() = Tr.s(3275) + val android_hub_viewer_sch_busentry: String get() = Tr.s(3276) + val android_hub_viewer_sch_wire: String get() = Tr.s(3277) + val android_hub_viewer_sch_noconnect: String get() = Tr.s(3278) + val android_hub_viewer_sch_junction: String get() = Tr.s(3279) + val android_hub_viewer_sch_sheetname: String get() = Tr.s(3280) + val android_hub_viewer_sch_sheetfile: String get() = Tr.s(3281) + val android_hub_viewer_sch_dnp: String get() = Tr.s(3282) + val android_hub_review_nokicad: String get() = Tr.s(3283) + val android_hub_review_wait: String get() = Tr.s(3284) + val android_hub_review_nosch: String get() = Tr.s(3285) + val android_hub_review_nofindings: String get() = Tr.s(3286) + fun android_hub_review_unticked(n: Any): String = Tr.f(3287, arrayOf(n)) + fun android_hub_review_customfailed(n: Any): String = Tr.f(3288, arrayOf(n)) + val android_hub_review_runthem: String get() = Tr.s(3289) + val android_hub_err_thread: String get() = Tr.s(3290) + val android_hub_err_project: String get() = Tr.s(3291) + val android_hub_err_room: String get() = Tr.s(3292) + val android_hub_err_method: String get() = Tr.s(3293) + val android_hub_err_attachment: String get() = Tr.s(3294) + val android_hub_err_noanswer: String get() = Tr.s(3295) + val android_hub_err_empty: String get() = Tr.s(3296) + val android_hub_err_oldapp: String get() = Tr.s(3297) + val android_hub_err_clientid: String get() = Tr.s(3298) + fun android_hub_err_images_max(n: Any): String = Tr.f(3299, arrayOf(n)) + val android_hub_err_images_kind: String get() = Tr.s(3300) + val android_hub_err_images_base64: String get() = Tr.s(3301) + val android_hub_err_images_size: String get() = Tr.s(3302) + val android_hub_err_images_store: String get() = Tr.s(3303) + val android_hub_err_folder_none: String get() = Tr.s(3304) + val android_hub_err_folder_read: String get() = Tr.s(3305) + val android_hub_err_notadded: String get() = Tr.s(3306) + val android_hub_err_nothread: String get() = Tr.s(3307) + val android_hub_err_env: String get() = Tr.s(3308) + val android_hub_err_channel: String get() = Tr.s(3309) + val android_hub_err_topic: String get() = Tr.s(3310) + val android_hub_err_tint: String get() = Tr.s(3311) + val android_hub_err_usage: String get() = Tr.s(3312) + val android_hub_err_nofolder: String get() = Tr.s(3313) + val android_hub_err_path: String get() = Tr.s(3314) + val android_hub_err_layer: String get() = Tr.s(3315) + val android_hub_err_compare: String get() = Tr.s(3316) + val android_hub_err_version: String get() = Tr.s(3317) + val android_hub_err_repo: String get() = Tr.s(3318) + val android_hub_err_toolbar: String get() = Tr.s(3319) + val android_hub_err_page: String get() = Tr.s(3320) + val android_hub_err_term_none: String get() = Tr.s(3321) + val android_hub_err_term_off: String get() = Tr.s(3322) + val android_hub_err_term_stopped: String get() = Tr.s(3323) + val android_hub_err_term_many: String get() = Tr.s(3324) + val android_hub_err_term_much: String get() = Tr.s(3325) + val android_hub_err_term_base64: String get() = Tr.s(3326) + val android_hub_err_busy: String get() = Tr.s(3327) + val android_hub_err_store: String get() = Tr.s(3328) + val android_hub_err_noagent: String get() = Tr.s(3329) + val android_hub_err_project_choose: String get() = Tr.s(3330) + val android_hub_err_project_retry: String get() = Tr.s(3331) + val android_hub_err_project_message: String get() = Tr.s(3332) + fun android_hub_err_project_already(root: Any): String = Tr.f(3333, arrayOf(root)) + fun android_hub_err_project_invalid(path: Any): String = Tr.f(3334, arrayOf(path)) + val android_hub_err_project_nofolder: String get() = Tr.s(3335) + val android_hub_err_project_unavailable: String get() = Tr.s(3336) + val android_hub_err_project_home: String get() = Tr.s(3337) + val android_hub_err_folder_gone: String get() = Tr.s(3338) + val android_hub_err_notfolder: String get() = Tr.s(3339) + val android_hub_err_file: String get() = Tr.s(3340) + val android_hub_err_utf8: String get() = Tr.s(3341) + val android_hub_err_parent: String get() = Tr.s(3342) + val android_hub_err_conversation: String get() = Tr.s(3343) + val android_hub_err_account_move: String get() = Tr.s(3344) + val android_hub_err_account_turn: String get() = Tr.s(3345) + val android_hub_err_account_agent: String get() = Tr.s(3346) + val android_hub_err_account_changed: String get() = Tr.s(3347) + val android_hub_err_account_none: String get() = Tr.s(3348) + val android_hub_err_intent_reload: String get() = Tr.s(3349) + val android_hub_err_intent_saving: String get() = Tr.s(3350) + val android_hub_err_intent_dir: String get() = Tr.s(3351) + val android_hub_err_intent_section: String get() = Tr.s(3352) + val android_hub_err_order_off: String get() = Tr.s(3353) + val android_hub_err_order_changed: String get() = Tr.s(3354) + val android_hub_err_order_upload: String get() = Tr.s(3355) + val android_hub_err_machine: String get() = Tr.s(3356) + fun android_hub_devices_used_by(name: Any): String = Tr.f(3357, arrayOf(name)) + val android_hub_devices_used: String get() = Tr.s(3358) + val android_hub_devices_revoked: String get() = Tr.s(3359) + fun android_hub_devices_expired(until: Any): String = Tr.f(3360, arrayOf(until)) + fun android_hub_devices_invite_failed(error: Any): String = Tr.f(3361, arrayOf(error)) + val android_hub_devices_add: String get() = Tr.s(3362) + val android_hub_devices_add_note: String get() = Tr.s(3363) + val android_hub_devices_retry: String get() = Tr.s(3364) + val android_hub_devices_lan: String get() = Tr.s(3365) + val android_hub_devices_lan_on: String get() = Tr.s(3366) + val android_hub_devices_lan_gone: String get() = Tr.s(3367) + fun android_hub_devices_lan_row(url: Any): String = Tr.f(3368, arrayOf(url)) + val android_hub_devices_lan_stop: String get() = Tr.s(3369) + val android_hub_devices_link_open: String get() = Tr.s(3370) + val android_hub_devices_link_used: String get() = Tr.s(3371) + fun android_hub_devices_link_open_by(name: Any): String = Tr.f(3372, arrayOf(name)) + fun android_hub_devices_link_used_by(name: Any): String = Tr.f(3373, arrayOf(name)) + val android_hub_devices_kind_tailnet: String get() = Tr.s(3374) + val android_hub_devices_kind_local: String get() = Tr.s(3375) + val android_hub_devices_tailnet_note: String get() = Tr.s(3376) + val android_hub_devices_lan_note: String get() = Tr.s(3377) + val android_hub_devices_reach: String get() = Tr.s(3378) + val android_hub_devices_lan_address: String get() = Tr.s(3379) + val android_hub_devices_another: String get() = Tr.s(3380) + fun android_hub_devices_qrnote(code: Any, hub: Any, until: Any): String = Tr.f(3381, arrayOf(code, hub, until)) + fun android_hub_devices_lan_offer(url: Any): String = Tr.f(3382, arrayOf(url)) + val android_hub_devices_lan_let: String get() = Tr.s(3383) + val android_hub_devices_only: String get() = Tr.s(3384) + val android_hub_devices_local_only: String get() = Tr.s(3385) + fun android_hub_devices_local_choose(kinds: Any): String = Tr.f(3386, arrayOf(kinds)) + fun android_hub_devices_lan_unknown(address: Any): String = Tr.f(3387, arrayOf(address)) + val android_hub_devices_lan_copy: String get() = Tr.s(3388) + fun android_hub_devices_lan_taken(address: Any): String = Tr.f(3389, arrayOf(address)) + val android_hub_devices_err_action: String get() = Tr.s(3390) + val android_hub_machines_none: String get() = Tr.s(3391) + fun android_hub_machines_paired(url: Any): String = Tr.f(3392, arrayOf(url)) + fun android_hub_machines_notyours(url: Any): String = Tr.f(3393, arrayOf(url)) + fun android_hub_machines_unpaired(url: Any): String = Tr.f(3394, arrayOf(url)) + fun android_hub_machines_via(url: Any, via: Any): String = Tr.f(3395, arrayOf(url, via)) + val android_hub_machines_rename: String get() = Tr.s(3396) + val android_hub_machines_rename_note: String get() = Tr.s(3397) + val android_hub_machines_rename_from: String get() = Tr.s(3398) + val android_hub_machines_rename_to: String get() = Tr.s(3399) + fun android_hub_machines_wants(name: Any): String = Tr.f(3400, arrayOf(name)) + fun android_hub_machines_request(url: Any, check: Any, left: Any): String = Tr.f(3401, arrayOf(url, check, left)) + val android_hub_machines_approve: String get() = Tr.s(3402) + fun android_hub_machines_waiting(check: Any): String = Tr.f(3403, arrayOf(check)) + fun android_hub_machines_pairing(address: Any): String = Tr.f(3404, arrayOf(address)) + fun android_hub_machines_status_linked(name: Any): String = Tr.f(3405, arrayOf(name)) + fun android_hub_machines_status_refused(error: Any): String = Tr.f(3406, arrayOf(error)) + fun android_hub_machines_found(url: Any): String = Tr.f(3407, arrayOf(url)) + fun android_hub_machines_found_other(url: Any): String = Tr.f(3408, arrayOf(url)) + val android_hub_machines_code_hint: String get() = Tr.s(3409) + val android_hub_machines_pair_title: String get() = Tr.s(3410) + val android_hub_machines_pair_note: String get() = Tr.s(3411) + val android_hub_machines_addr_hint: String get() = Tr.s(3412) + val android_hub_machines_code: String get() = Tr.s(3413) + val android_hub_machines_code_title: String get() = Tr.s(3414) + fun android_hub_machines_code_note(code: Any, address: Any, left: Any): String = Tr.f(3415, arrayOf(code, address, left)) + val android_hub_machines_code_another: String get() = Tr.s(3416) + val android_hub_machines_make: String get() = Tr.s(3417) + val android_hub_machines_make_note: String get() = Tr.s(3418) + val android_hub_machines_err_link: String get() = Tr.s(3419) + val android_hub_machines_err_which: String get() = Tr.s(3420) + fun android_hub_machines_err_called(name: Any): String = Tr.f(3421, arrayOf(name)) + fun android_hub_machines_err_taken(name: Any): String = Tr.f(3422, arrayOf(name)) + val android_hub_machines_err_invite: String get() = Tr.s(3423) + val android_hub_machines_err_codes: String get() = Tr.s(3424) + val android_hub_machines_err_record: String get() = Tr.s(3425) + val android_hub_machines_err_expired_answered: String get() = Tr.s(3426) + val android_hub_machines_err_secret: String get() = Tr.s(3427) + val android_hub_machines_err_approval: String get() = Tr.s(3428) + val android_hub_machines_err_expired: String get() = Tr.s(3429) + val android_hub_machines_err_address: String get() = Tr.s(3430) + val android_hub_machines_err_nocode: String get() = Tr.s(3431) + val android_hub_machines_err_already: String get() = Tr.s(3432) + fun android_hub_machines_err_noanswer(address: Any): String = Tr.f(3433, arrayOf(address)) + val android_hub_machines_err_nothing: String get() = Tr.s(3434) + val android_hub_machines_err_attempt: String get() = Tr.s(3435) + val android_hub_machines_err_invites: String get() = Tr.s(3436) + val android_hub_machines_err_invite_record: String get() = Tr.s(3437) + val android_hub_machines_err_invite_secret: String get() = Tr.s(3438) + val android_hub_machines_err_unusable: String get() = Tr.s(3439) + fun android_hub_machines_err_nolink(code: Any, body: Any): String = Tr.f(3440, arrayOf(code, body)) + val android_hub_machines_err_notlinked: String get() = Tr.s(3441) + val android_hub_machines_err_nocodeback: String get() = Tr.s(3442) + fun android_hub_machines_err_nocodegiven(code: Any, body: Any): String = Tr.f(3443, arrayOf(code, body)) + val android_hub_accounts_state_connected: String get() = Tr.s(3444) + val android_hub_accounts_state_expired: String get() = Tr.s(3445) + val android_hub_accounts_state_connecting: String get() = Tr.s(3446) + val android_hub_accounts_state_unchecked: String get() = Tr.s(3447) + val android_hub_accounts_state_none: String get() = Tr.s(3448) + fun android_hub_accounts_limit(window: Any, used: Any): String = Tr.f(3449, arrayOf(window, used)) + fun android_hub_accounts_limit_resets(window: Any, used: Any, `when`: Any): String = Tr.f(3450, arrayOf(window, used, `when`)) + fun android_hub_accounts_limit_stale(window: Any, used: Any): String = Tr.f(3451, arrayOf(window, used)) + fun android_hub_accounts_limit_resets_stale(window: Any, used: Any, `when`: Any): String = Tr.f(3452, arrayOf(window, used, `when`)) + fun android_hub_accounts_add(provider: Any): String = Tr.f(3453, arrayOf(provider)) + val android_hub_accounts_note: String get() = Tr.s(3454) + val android_hub_accounts_signin_starting: String get() = Tr.s(3455) + val android_hub_accounts_signin_paste: String get() = Tr.s(3456) + val android_hub_accounts_signin_device: String get() = Tr.s(3457) + val android_hub_accounts_signin_done: String get() = Tr.s(3458) + val android_hub_accounts_signin_expired: String get() = Tr.s(3459) + val android_hub_accounts_signin_cancelled: String get() = Tr.s(3460) + val android_hub_accounts_signin_failed: String get() = Tr.s(3461) + val android_hub_accounts_act_cancel: String get() = Tr.s(3462) + val android_hub_accounts_act_again: String get() = Tr.s(3463) + val android_hub_accounts_act_signin: String get() = Tr.s(3464) + fun android_hub_accounts_remove_ask(label: Any): String = Tr.f(3465, arrayOf(label)) + fun android_hub_accounts_hold_resets(`when`: Any): String = Tr.f(3466, arrayOf(`when`)) + val android_hub_accounts_hold: String get() = Tr.s(3467) + fun android_hub_accounts_alert_expired(provider: Any): String = Tr.f(3468, arrayOf(provider)) + fun android_hub_accounts_alert_needed(provider: Any, title: Any, why: Any): String = Tr.f(3469, arrayOf(provider, title, why)) + val android_hub_accounts_msg_expired: String get() = Tr.s(3470) + val android_hub_accounts_msg_expired_long: String get() = Tr.s(3471) + val android_hub_accounts_msg_generic: String get() = Tr.s(3472) + val android_hub_accounts_msg_nolimits: String get() = Tr.s(3473) + val android_hub_accounts_msg_nowindows: String get() = Tr.s(3474) + val android_hub_accounts_msg_signin: String get() = Tr.s(3475) + val android_hub_accounts_msg_directory: String get() = Tr.s(3476) + val android_hub_accounts_fail_code: String get() = Tr.s(3477) + val android_hub_accounts_fail_network: String get() = Tr.s(3478) + val android_hub_accounts_fail_storage: String get() = Tr.s(3479) + val android_hub_accounts_fail_cli: String get() = Tr.s(3480) + val android_hub_accounts_fail_dir: String get() = Tr.s(3481) + val android_hub_accounts_fail_verify: String get() = Tr.s(3482) + val android_hub_accounts_code_incomplete: String get() = Tr.s(3483) + val android_hub_accounts_code_other: String get() = Tr.s(3484) + val android_hub_accounts_msg_unverified: String get() = Tr.s(3485) + val android_hub_accounts_msg_registry: String get() = Tr.s(3486) + val android_hub_accounts_msg_identity: String get() = Tr.s(3487) + val android_hub_accounts_msg_subscription: String get() = Tr.s(3488) + fun android_hub_accounts_msg_refused(reason: Any): String = Tr.f(3489, arrayOf(reason)) + val android_hub_accounts_msg_toolarge: String get() = Tr.s(3490) + val android_hub_accounts_msg_closed: String get() = Tr.s(3491) + val android_hub_accounts_msg_timeout: String get() = Tr.s(3492) + val android_hub_accounts_msg_notusage: String get() = Tr.s(3493) + val android_hub_accounts_usage_unauthorized: String get() = Tr.s(3494) + val android_hub_accounts_usage_forbidden: String get() = Tr.s(3495) + val android_hub_accounts_usage_limited: String get() = Tr.s(3496) + fun android_hub_accounts_usage_code(code: Any): String = Tr.f(3497, arrayOf(code)) + val android_hub_accounts_err_gone: String get() = Tr.s(3498) + val android_hub_accounts_err_provider: String get() = Tr.s(3499) + val android_hub_accounts_err_add: String get() = Tr.s(3500) + val android_hub_accounts_err_gate: String get() = Tr.s(3501) + val android_hub_accounts_err_default: String get() = Tr.s(3502) + val android_hub_accounts_err_busy: String get() = Tr.s(3503) + val android_hub_accounts_err_select: String get() = Tr.s(3504) + val android_hub_accounts_err_check: String get() = Tr.s(3505) + fun android_hub_accounts_err_called(name: Any): String = Tr.f(3506, arrayOf(name)) + val android_hub_update_off: String get() = Tr.s(3507) + val android_hub_update_checking: String get() = Tr.s(3508) + fun android_hub_update_downloading(version: Any): String = Tr.f(3509, arrayOf(version)) + fun android_hub_update_waiting(version: Any): String = Tr.f(3510, arrayOf(version)) + fun android_hub_update_installing(version: Any): String = Tr.f(3511, arrayOf(version)) + val android_hub_update_failed: String get() = Tr.s(3512) + fun android_hub_update_row(version: Any): String = Tr.f(3513, arrayOf(version)) + fun android_hub_update_done(version: Any): String = Tr.f(3514, arrayOf(version)) + fun android_hub_update_rolledback(version: Any): String = Tr.f(3515, arrayOf(version)) + fun android_hub_update_rolledback_why(version: Any, why: Any): String = Tr.f(3516, arrayOf(version, why)) + fun android_hub_update_notstarted(version: Any): String = Tr.f(3517, arrayOf(version)) + val android_hub_update_turns: String get() = Tr.s(3518) + fun android_hub_update_err_feed(code: Any): String = Tr.f(3519, arrayOf(code)) + val android_hub_update_err_unpack: String get() = Tr.s(3520) + val android_hub_update_err_newer: String get() = Tr.s(3521) + val android_hub_update_err_nokey: String get() = Tr.s(3522) + val android_hub_update_err_untrusted: String get() = Tr.s(3523) + val android_hub_update_err_other: String get() = Tr.s(3524) + val android_hub_update_err_version: String get() = Tr.s(3525) + val android_hub_update_err_channel_tag: String get() = Tr.s(3526) + val android_hub_update_err_channel: String get() = Tr.s(3527) + val android_hub_update_err_file: String get() = Tr.s(3528) + val android_hub_update_err_checksum_bad: String get() = Tr.s(3529) + val android_hub_update_err_size_range: String get() = Tr.s(3530) + val android_hub_update_err_empty: String get() = Tr.s(3531) + val android_hub_update_err_listing: String get() = Tr.s(3532) + val android_hub_update_err_hardlink: String get() = Tr.s(3533) + val android_hub_update_err_link: String get() = Tr.s(3534) + fun android_hub_update_err_outside(name: Any): String = Tr.f(3535, arrayOf(name)) + val android_hub_update_err_norun: String get() = Tr.s(3536) + val android_hub_update_err_nohub: String get() = Tr.s(3537) + val android_hub_update_err_size: String get() = Tr.s(3538) + val android_hub_update_err_checksum: String get() = Tr.s(3539) + val android_hub_update_err_guard: String get() = Tr.s(3540) + val android_hub_update_err_guard_busy: String get() = Tr.s(3541) + fun android_hub_work_todo(count: Any): String = Tr.f(3542, arrayOf(count)) + fun android_hub_work_watch(title: Any): String = Tr.f(3543, arrayOf(title)) + fun android_hub_work_lock(name: Any): String = Tr.f(3544, arrayOf(name)) + val android_hub_work_release_done: String get() = Tr.s(3545) + val android_hub_work_flock: String get() = Tr.s(3546) + fun android_hub_work_position(n: Any, holder: Any): String = Tr.f(3547, arrayOf(n, holder)) + fun android_hub_work_position_job(n: Any, title: Any): String = Tr.f(3548, arrayOf(n, title)) + fun android_hub_work_job(title: Any): String = Tr.f(3549, arrayOf(title)) + val android_hub_work_subagent: String get() = Tr.s(3550) + val android_hub_work_said: String get() = Tr.s(3551) + fun android_hub_work_steps(n: Number): String = Tr.f(3552, arrayOf(n)) + fun android_hub_work_tokens(n: Any): String = Tr.f(3553, arrayOf(n)) + fun android_hub_work_tokens_k(n: Any): String = Tr.f(3554, arrayOf(n)) + fun android_hub_work_tokens_m(n: Any): String = Tr.f(3555, arrayOf(n)) + fun android_hub_work_where(harness: Any, typed: String, type: Any, remote: String, host: Any, wt: String, branch: Any): String = Tr.f(3556, arrayOf(harness, typed, type, remote, host, wt, branch)) + val android_hub_work_state_ended: String get() = Tr.s(3557) + val android_hub_work_word_launching: String get() = Tr.s(3558) + val android_hub_work_word_watching: String get() = Tr.s(3559) + val android_hub_work_word_timedout: String get() = Tr.s(3560) + val android_hub_work_word_cancelling: String get() = Tr.s(3561) + val android_hub_work_word_queued: String get() = Tr.s(3562) + val android_hub_work_word_unknown: String get() = Tr.s(3563) + val android_hub_work_word_completed: String get() = Tr.s(3564) + val android_hub_work_word_killed: String get() = Tr.s(3565) + fun android_hub_locks_outside(pid: Any): String = Tr.f(3566, arrayOf(pid)) + val android_hub_picker_notinstalled: String get() = Tr.s(3567) + val android_hub_picker_notinstalled_here: String get() = Tr.s(3568) + val android_hub_picker_notinstalled_agy: String get() = Tr.s(3569) + val android_hub_picker_cli: String get() = Tr.s(3570) + fun android_hub_picker_left(left: Any): String = Tr.f(3571, arrayOf(left)) + fun android_hub_picker_left_shared(left: Any): String = Tr.f(3572, arrayOf(left)) + val android_hub_picker_shared: String get() = Tr.s(3573) + val android_hub_picker_why_expired: String get() = Tr.s(3574) + val android_hub_picker_why_unchecked: String get() = Tr.s(3575) + val android_hub_picker_why_connecting: String get() = Tr.s(3576) + val android_hub_picker_why_none: String get() = Tr.s(3577) + fun android_hub_picker_window_fivehour(left: Any): String = Tr.f(3578, arrayOf(left)) + fun android_hub_picker_window_week(left: Any): String = Tr.f(3579, arrayOf(left)) + fun android_hub_picker_window_opus(left: Any): String = Tr.f(3580, arrayOf(left)) + fun android_hub_picker_window_sonnet(left: Any): String = Tr.f(3581, arrayOf(left)) + fun android_hub_picker_window(label: Any, left: Any): String = Tr.f(3582, arrayOf(label, left)) + fun android_hub_picker_resets(`when`: Any): String = Tr.f(3583, arrayOf(`when`)) + fun android_hub_picker_extra(used: Any): String = Tr.f(3584, arrayOf(used)) + fun android_hub_picker_extra_of(used: Any, limit: Any): String = Tr.f(3585, arrayOf(used, limit)) + val android_hub_picker_nolimit: String get() = Tr.s(3586) + val android_hub_status_blocked: String get() = Tr.s(3587) + val android_hub_order_step_details: String get() = Tr.s(3588) + val android_hub_order_step_quote: String get() = Tr.s(3589) + val android_hub_order_step_pay: String get() = Tr.s(3590) + val android_hub_order_step_made: String get() = Tr.s(3591) + val android_hub_order_step_shipped: String get() = Tr.s(3592) + val android_hub_order_line_asked: String get() = Tr.s(3593) + val android_hub_order_line_getting: String get() = Tr.s(3594) + val android_hub_order_line_reply: String get() = Tr.s(3595) + val android_hub_order_line_files: String get() = Tr.s(3596) + val android_hub_order_line_quoting: String get() = Tr.s(3597) + val android_hub_order_line_expired: String get() = Tr.s(3598) + val android_hub_order_line_failed: String get() = Tr.s(3599) + val android_hub_order_line_pilot: String get() = Tr.s(3600) + val android_hub_order_line_refunded: String get() = Tr.s(3601) + val android_hub_order_line_quoted: String get() = Tr.s(3602) + val android_hub_order_line_fix: String get() = Tr.s(3603) + val android_hub_order_line_paid: String get() = Tr.s(3604) + val android_hub_order_line_placed: String get() = Tr.s(3605) + val android_hub_order_line_shipped: String get() = Tr.s(3606) + fun android_hub_order_line_tracking(tracking: Any): String = Tr.f(3607, arrayOf(tracking)) + val android_hub_order_line_delivered: String get() = Tr.s(3608) + val android_hub_order_customs_ddp: String get() = Tr.s(3609) + val android_hub_order_customs: String get() = Tr.s(3610) + fun android_hub_order_buynow_total(total: Any): String = Tr.f(3611, arrayOf(total)) + fun android_hub_buy_from(price: Any): String = Tr.f(3612, arrayOf(price)) + fun android_hub_buy_last(price: Any): String = Tr.f(3613, arrayOf(price)) + val android_hub_buy_incomplete: String get() = Tr.s(3614) + val android_hub_buy_again: String get() = Tr.s(3615) + val android_hub_buy_ready: String get() = Tr.s(3616) + val android_hub_buy_ready_board: String get() = Tr.s(3617) + fun android_hub_buy_ready_boards(n: Any): String = Tr.f(3618, arrayOf(n)) + fun android_hub_buy_ready_parts(parts: Any): String = Tr.f(3619, arrayOf(parts)) + fun android_hub_buy_check(note: Any): String = Tr.f(3620, arrayOf(note)) + fun android_hub_buy_unavailable(error: Any): String = Tr.f(3621, arrayOf(error)) + fun android_hub_buy_unavailable_parts(error: Any, parts: Any): String = Tr.f(3622, arrayOf(error, parts)) + val android_hub_buy_ordered_paid: String get() = Tr.s(3623) + val android_hub_buy_ordered_placed: String get() = Tr.s(3624) + val android_hub_buy_ordered_shipped: String get() = Tr.s(3625) + val android_hub_buy_ordered_delivered: String get() = Tr.s(3626) + fun android_hub_buy_ordered(state: Any): String = Tr.f(3627, arrayOf(state)) + fun android_hub_buy_noestimate(name: Any, path: Any): String = Tr.f(3628, arrayOf(name, path)) + fun android_hub_buy_noestimate_why(name: Any, path: Any, why: Any): String = Tr.f(3629, arrayOf(name, path, why)) + val android_hub_buy_unreachable: String get() = Tr.s(3630) + fun android_hub_buy_said(code: Any): String = Tr.f(3631, arrayOf(code)) + val android_hub_ask_reject: String get() = Tr.s(3632) + val android_hub_ask_session: String get() = Tr.s(3633) + val android_hub_ask_decline: String get() = Tr.s(3634) + fun android_hub_ask_quote(detail: Any): String = Tr.f(3635, arrayOf(detail)) + val android_hub_guard_safe: String get() = Tr.s(3636) + fun android_hub_guard_safe_why(why: Any): String = Tr.f(3637, arrayOf(why)) + fun android_hub_guard_degraded(parts: Any): String = Tr.f(3638, arrayOf(parts)) + val android_hub_guard_temp: String get() = Tr.s(3639) + val android_hub_guard_disk: String get() = Tr.s(3640) + fun android_hub_guard_rolledback(build: Any, to: Any): String = Tr.f(3641, arrayOf(build, to)) + fun android_hub_guard_nostart(build: Any): String = Tr.f(3642, arrayOf(build)) + fun android_hub_guard_nostart_skip(build: Any, skip: Any): String = Tr.f(3643, arrayOf(build, skip)) + val android_hub_guard_down_retry: String get() = Tr.s(3644) + fun android_hub_guard_down(why: Any): String = Tr.f(3645, arrayOf(why)) + fun android_hub_guard_restarting(why: Any): String = Tr.f(3646, arrayOf(why)) + fun android_hub_guard_starting(build: Any): String = Tr.f(3647, arrayOf(build)) + fun android_hub_guard_safe_on(build: Any, why: Any): String = Tr.f(3648, arrayOf(build, why)) + fun android_hub_guard_safe_on_plain(build: Any): String = Tr.f(3649, arrayOf(build)) + fun android_hub_guard_running(build: Any): String = Tr.f(3650, arrayOf(build)) + val android_hub_guard_act_normal: String get() = Tr.s(3651) + val android_hub_guard_act_safe: String get() = Tr.s(3652) + val android_hub_guard_act_safe_note: String get() = Tr.s(3653) + fun android_hub_guard_act_rollback(build: Any): String = Tr.f(3654, arrayOf(build)) + fun android_hub_guard_act_rollback_note(build: Any): String = Tr.f(3655, arrayOf(build)) + val android_hub_guard_ans_noaction: String get() = Tr.s(3656) + fun android_hub_guard_ans_nobuild(build: Any): String = Tr.f(3657, arrayOf(build)) + val android_hub_guard_ans_noback: String get() = Tr.s(3658) + val android_hub_guard_ans_stopping: String get() = Tr.s(3659) + val android_hub_guard_ans_restarting: String get() = Tr.s(3660) + val android_hub_guard_ans_safe: String get() = Tr.s(3661) + val android_hub_guard_ans_rollingback: String get() = Tr.s(3662) + val android_hub_guard_ans_switching: String get() = Tr.s(3663) + fun android_hub_guard_ans_bad(build: Any): String = Tr.f(3664, arrayOf(build)) + val android_hub_guard_ans_updating: String get() = Tr.s(3665) + val android_hub_guard_ans_asked: String get() = Tr.s(3666) + val android_hub_guard_err_unreachable: String get() = Tr.s(3667) + val android_hub_guard_err_token: String get() = Tr.s(3668) + val android_hub_guard_err_disk: String get() = Tr.s(3669) + val android_hub_guard_err_here: String get() = Tr.s(3670) + val android_hub_guard_err_noanswer: String get() = Tr.s(3671) + val android_hub_guard_err_noguard: String get() = Tr.s(3672) + val android_hub_cmd_btw: String get() = Tr.s(3673) + val android_hub_cmd_give_desc: String get() = Tr.s(3674) + val android_hub_cmd_secret: String get() = Tr.s(3675) + val android_hub_cmd_intent: String get() = Tr.s(3676) + val android_hub_cmd_settle_desc: String get() = Tr.s(3677) + val android_hub_cmd_btw_empty: String get() = Tr.s(3678) + val android_hub_cmd_project: String get() = Tr.s(3679) + val android_hub_cmd_newproject: String get() = Tr.s(3680) + val android_hub_cmd_project_quote: String get() = Tr.s(3681) + val android_hub_cmd_project_existing: String get() = Tr.s(3682) + val android_hub_cmd_notcmd: String get() = Tr.s(3683) + val android_hub_link_screen: String get() = Tr.s(3684) + val android_hub_link_conversation: String get() = Tr.s(3685) + val android_hub_link_file: String get() = Tr.s(3686) + val android_hub_link_file_far: String get() = Tr.s(3687) + val android_hub_link_empty: String get() = Tr.s(3688) + val android_hub_link_unknown: String get() = Tr.s(3689) + val android_hub_link_project: String get() = Tr.s(3690) + val android_hub_link_project_far: String get() = Tr.s(3691) + val android_hub_link_thread: String get() = Tr.s(3692) + val android_hub_link_thread_far: String get() = Tr.s(3693) + val android_hub_link_noscreen: String get() = Tr.s(3694) + val android_hub_link_noproject: String get() = Tr.s(3695) + val android_hub_star_text: String get() = Tr.s(3696) + val android_hub_migrate_title: String get() = Tr.s(3697) + fun android_hub_migrate_body(step: String): String = Tr.f(3698, arrayOf(step)) + fun android_hub_migrate_writing(p: Any, pt: Any, t: Any, tt: Any, e: Any, et: Any): String = Tr.f(3699, arrayOf(p, pt, t, tt, e, et)) + fun android_hub_migrate_read(done: Any, total: Any): String = Tr.f(3700, arrayOf(done, total)) + fun android_hub_migrate_copied(n: Any): String = Tr.f(3701, arrayOf(n)) + fun android_hub_migrate_min(n: Any): String = Tr.f(3702, arrayOf(n)) + fun android_hub_migrate_sec(n: Any): String = Tr.f(3703, arrayOf(n)) + val android_hub_migrate_measuring: String get() = Tr.s(3704) + val android_hub_migrate_done: String get() = Tr.s(3705) + val android_hub_migrate_nothing: String get() = Tr.s(3706) + val android_hub_migrate_nothing_short: String get() = Tr.s(3707) + fun android_hub_migrate_took(n: Any): String = Tr.f(3708, arrayOf(n)) + val android_hub_migrate_keys: String get() = Tr.s(3709) + val android_hub_migrate_failed: String get() = Tr.s(3710) + fun android_hub_migrate_failed_body(why: Any): String = Tr.f(3711, arrayOf(why)) + fun android_hub_migrate_failed_body_from(why: Any, from: Any): String = Tr.f(3712, arrayOf(why, from)) + fun android_hub_migrate_unreadable(error: Any): String = Tr.f(3713, arrayOf(error)) + val android_hub_migrate_busy: String get() = Tr.s(3714) + fun android_hub_migrate_runs(n: Number): String = Tr.f(3715, arrayOf(n)) + fun android_hub_migrate_routines(n: Number): String = Tr.f(3716, arrayOf(n)) + val android_hub_migrate_machines: String get() = Tr.s(3717) + val android_hub_migrate_keystay: String get() = Tr.s(3718) + val android_hub_migrate_google: String get() = Tr.s(3719) + fun android_hub_migrate_clashes(n: Number): String = Tr.f(3720, arrayOf(n)) + val android_hub_migrate_fresh: String get() = Tr.s(3721) + val android_hub_migrate_running: String get() = Tr.s(3722) + fun android_hub_migrate_botfolder(name: Any, gb: Any, path: Any): String = Tr.f(3723, arrayOf(name, gb, path)) + fun android_hub_migrate_notcopied(path: Any, why: Any): String = Tr.f(3724, arrayOf(path, why)) + fun android_hub_migrate_signin(names: Any): String = Tr.f(3725, arrayOf(names)) + val android_hub_migrate_accounts: String get() = Tr.s(3726) + fun android_hub_migrate_vault(why: Any): String = Tr.f(3727, arrayOf(why)) + val android_hub_history_title: String get() = Tr.s(3728) + val android_hub_history_closed: String get() = Tr.s(3729) + val android_away: String get() = Tr.s(3730) + val android_open: String get() = Tr.s(3731) + val android_search_messages: String get() = Tr.s(3732) + val android_find_inthread: String get() = Tr.s(3733) + val android_find_error: String get() = Tr.s(3734) + val android_find_prev: String get() = Tr.s(3735) + val android_find_next: String get() = Tr.s(3736) + val android_find_nomatch: String get() = Tr.s(3737) + fun android_find_count(n: Number, total: Number): String = Tr.f(3738, arrayOf(n, total)) + val android_find_you: String get() = Tr.s(3739) + val android_find_agent: String get() = Tr.s(3740) + val android_sub_thread: String get() = Tr.s(3741) + fun android_sub_back(title: Any): String = Tr.f(3742, arrayOf(title)) + val android_sub_gone: String get() = Tr.s(3743) + fun android_sub_more(n: Number): String = Tr.f(3744, arrayOf(n)) + val android_sub_none: String get() = Tr.s(3745) + val android_sub_asked: String get() = Tr.s(3746) + val android_sub_tool: String get() = Tr.s(3747) + fun android_machine_on(name: Any): String = Tr.f(3748, arrayOf(name)) + fun android_handoff_from(title: Any): String = Tr.f(3749, arrayOf(title)) + fun android_handoff_note(note: Any): String = Tr.f(3750, arrayOf(note)) + val android_queue_unsent: String get() = Tr.s(3751) + fun android_mark_runs(machine: Any): String = Tr.f(3752, arrayOf(machine)) + fun android_mark_also(machines: Any): String = Tr.f(3753, arrayOf(machines)) + fun android_mark_newon(machine: Any): String = Tr.f(3754, arrayOf(machine)) + val android_google_signedin: String get() = Tr.s(3755) + val android_google_back: String get() = Tr.s(3756) + val android_improve_search: String get() = Tr.s(3757) + val android_improve_nomatch: String get() = Tr.s(3758) + val android_ring_head: String get() = Tr.s(3759) + val android_swarm_new: String get() = Tr.s(3760) + val android_swarm_topic: String get() = Tr.s(3761) + val android_swarm_goal: String get() = Tr.s(3762) + val android_swarm_seed: String get() = Tr.s(3763) + val android_swarm_member_add: String get() = Tr.s(3764) + fun android_swarm_member_n(n: Any): String = Tr.f(3765, arrayOf(n)) + val android_swarm_role: String get() = Tr.s(3766) + fun android_swarm_members(n: Number): String = Tr.f(3767, arrayOf(n)) + val android_swarm_pause: String get() = Tr.s(3768) + val android_swarm_resume: String get() = Tr.s(3769) + val android_swarm_stop: String get() = Tr.s(3770) + fun android_swarm_stop_ask(name: Any): String = Tr.f(3771, arrayOf(name)) + val android_swarm_stop_yes: String get() = Tr.s(3772) + val android_swarm_keep: String get() = Tr.s(3773) + fun android_swarm_remove_member(name: Any): String = Tr.f(3774, arrayOf(name)) + val android_swarm_state_active: String get() = Tr.s(3775) + val android_swarm_state_paused: String get() = Tr.s(3776) + val android_swarm_state_stopped: String get() = Tr.s(3777) + val android_swarm_state_done: String get() = Tr.s(3778) + val android_swarm_reason_circular: String get() = Tr.s(3779) + val android_swarm_reason_idle: String get() = Tr.s(3780) + val android_swarm_reason_budget: String get() = Tr.s(3781) + val android_swarm_reason_person: String get() = Tr.s(3782) + val android_swarm_reason_chatter: String get() = Tr.s(3783) + val android_swarm_tag_idea: String get() = Tr.s(3784) + val android_swarm_tag_critique: String get() = Tr.s(3785) + val android_swarm_tag_claim: String get() = Tr.s(3786) + val android_swarm_tag_done: String get() = Tr.s(3787) + val android_swarm_tag_question: String get() = Tr.s(3788) + val android_swarm_tag_synthesis: String get() = Tr.s(3789) + val android_swarm_waiting: String get() = Tr.s(3790) + fun android_swarm_held(why: Any): String = Tr.f(3791, arrayOf(why)) + val android_swarm_post_hint: String get() = Tr.s(3792) + val android_swarm_none: String get() = Tr.s(3793) + val android_swarm_gone: String get() = Tr.s(3794) + val android_swarm_provider: String get() = Tr.s(3795) + val android_swarm_model: String get() = Tr.s(3796) + fun android_buy_ask(project: Any): String = Tr.f(3797, arrayOf(project)) + val cat_cat: String get() = Tr.s(3798) + val cat_own: String get() = Tr.s(3799) + val cat_different: String get() = Tr.s(3800) + val cat_auto: String get() = Tr.s(3801) + val cat_color_bad: String get() = Tr.s(3802) + val android_copy_run: String get() = Tr.s(3803) + val android_copy_fullscreen: String get() = Tr.s(3804) + val android_term_chat_old: String get() = Tr.s(3805) + val android_browser_head: String get() = Tr.s(3806) + val android_clone_mode_folder: String get() = Tr.s(3807) + val android_clone_mode_git: String get() = Tr.s(3808) + val android_clone_repo_hint: String get() = Tr.s(3809) + val android_clone_private: String get() = Tr.s(3810) + val android_clone_signin: String get() = Tr.s(3811) + val android_clone_into: String get() = Tr.s(3812) + val android_clone_folder_change: String get() = Tr.s(3813) + val android_clone_folder_use: String get() = Tr.s(3814) + val android_clone_name_hint: String get() = Tr.s(3815) + val android_clone_thread: String get() = Tr.s(3816) + val android_clone_go: String get() = Tr.s(3817) + val android_clone_same: String get() = Tr.s(3818) + val android_clone_retry: String get() = Tr.s(3819) + val android_clone_loading: String get() = Tr.s(3820) + val android_clone_signin_code: String get() = Tr.s(3821) + val android_clone_signin_wait: String get() = Tr.s(3822) + val android_clone_signin_done: String get() = Tr.s(3823) + val android_clone_signin_failed: String get() = Tr.s(3824) + val android_clone_hint_nogh: String get() = Tr.s(3825) + val android_clone_hint_signedout: String get() = Tr.s(3826) + val android_clone_hint_error: String get() = Tr.s(3827) + val android_clone_phase_starting: String get() = Tr.s(3828) + val android_clone_phase_connecting: String get() = Tr.s(3829) + val android_clone_phase_counting: String get() = Tr.s(3830) + val android_clone_phase_compressing: String get() = Tr.s(3831) + val android_clone_phase_receiving: String get() = Tr.s(3832) + val android_clone_phase_resolving: String get() = Tr.s(3833) + val android_clone_phase_updating: String get() = Tr.s(3834) + val android_clone_phase_lfs: String get() = Tr.s(3835) + val android_clone_phase_adding: String get() = Tr.s(3836) + val android_clone_phase_cancelled: String get() = Tr.s(3837) + fun android_clone_busy(path: Any): String = Tr.f(3838, arrayOf(path)) + fun android_clone_file(path: Any): String = Tr.f(3839, arrayOf(path)) + val android_download_saved: String get() = Tr.s(3840) + fun android_download_of(have: Any, total: Any): String = Tr.f(3841, arrayOf(have, total)) + val android_download_share: String get() = Tr.s(3842) + val android_download_retry: String get() = Tr.s(3843) + val android_download_noapp: String get() = Tr.s(3844) + val android_download_button: String get() = Tr.s(3845) + fun ios_sections_running(n: Number): String = Tr.f(3846, arrayOf(n)) + val ios_alerts_ask: String get() = Tr.s(3847) + val ios_alerts_allow: String get() = Tr.s(3848) + val ios_alerts_later: String get() = Tr.s(3849) + val ios_viewerbg: String get() = Tr.s(3850) + val ios_viewerbg_auto: String get() = Tr.s(3851) + val ios_viewerbg_custom: String get() = Tr.s(3852) + val ios_viewerbg_color: String get() = Tr.s(3853) + val ios_viewerbg_note: String get() = Tr.s(3854) + fun ios_hub_use(hub: Any): String = Tr.f(3855, arrayOf(hub)) + val ios_thread_loading: String get() = Tr.s(3856) + val ios_hub_connecting: String get() = Tr.s(3857) + fun ios_project_remove_ask(title: Any): String = Tr.f(3858, arrayOf(title)) + val ios_side_room: String get() = Tr.s(3859) + val ios_side_bot: String get() = Tr.s(3860) + val ios_side_uber: String get() = Tr.s(3861) + fun ios_project_terms(project: Any): String = Tr.f(3862, arrayOf(project)) + fun ios_project_newthread(project: Any): String = Tr.f(3863, arrayOf(project)) + fun ios_lock_waiting(n: Number): String = Tr.f(3864, arrayOf(n)) + fun ios_conn_connecting(hub: Any): String = Tr.f(3865, arrayOf(hub)) + val ios_conn_offline: String get() = Tr.s(3866) + fun ios_kids_hide(n: Number): String = Tr.f(3867, arrayOf(n)) + fun ios_kids_show(n: Number): String = Tr.f(3868, arrayOf(n)) + fun ios_model_label(model: Any): String = Tr.f(3869, arrayOf(model)) + val ios_model_default: String get() = Tr.s(3870) + val ios_start: String get() = Tr.s(3871) + val ios_starting: String get() = Tr.s(3872) + val ios_room_missing: String get() = Tr.s(3873) + val ios_secret_new: String get() = Tr.s(3874) + fun ios_secret_named(name: Any): String = Tr.f(3875, arrayOf(name)) + val ios_secret_refused: String get() = Tr.s(3876) + val ios_find_gone: String get() = Tr.s(3877) + val ios_thread: String get() = Tr.s(3878) + val ios_state_working: String get() = Tr.s(3879) + val ios_state_inactive: String get() = Tr.s(3880) + val ios_state_blocked: String get() = Tr.s(3881) + val ios_state_stalled: String get() = Tr.s(3882) + val ios_state_monitoring: String get() = Tr.s(3883) + val ios_state_finished: String get() = Tr.s(3884) + val ios_state_active: String get() = Tr.s(3885) + val ios_composer_hint: String get() = Tr.s(3886) + val ios_dictate_stop: String get() = Tr.s(3887) + val ios_dictate: String get() = Tr.s(3888) + val ios_attach_pictures: String get() = Tr.s(3889) + val ios_attach_pictures_no: String get() = Tr.s(3890) + val ios_draw_no: String get() = Tr.s(3891) + val ios_attach_no: String get() = Tr.s(3892) + val ios_command_failed: String get() = Tr.s(3893) + fun ios_work_head(word: Any): String = Tr.f(3894, arrayOf(word)) + val ios_fold_open: String get() = Tr.s(3895) + val ios_fold_shut: String get() = Tr.s(3896) + val ios_step_design: String get() = Tr.s(3897) + val ios_ask_asks: String get() = Tr.s(3898) + val ios_ask_asked: String get() = Tr.s(3899) + fun ios_ask_answered(answer: Any): String = Tr.f(3900, arrayOf(answer)) + val ios_improve_sent: String get() = Tr.s(3901) + val ios_on: String get() = Tr.s(3902) + val ios_off: String get() = Tr.s(3903) + val ios_system: String get() = Tr.s(3904) + val ios_light: String get() = Tr.s(3905) + val ios_dark: String get() = Tr.s(3906) + val ios_conn_online: String get() = Tr.s(3907) + val ios_conn_connectingword: String get() = Tr.s(3908) + val ios_conn_offlineword: String get() = Tr.s(3909) + fun ios_version(version: Any, build: Any): String = Tr.f(3910, arrayOf(version, build)) + fun ios_hub_forget_ask(hub: Any): String = Tr.f(3911, arrayOf(hub)) + val ios_hub_this: String get() = Tr.s(3912) + val ios_update_stable: String get() = Tr.s(3913) + val ios_update_beta: String get() = Tr.s(3914) + val ios_order: String get() = Tr.s(3915) + fun ios_order_named(name: Any): String = Tr.f(3916, arrayOf(name)) + val ios_invite_machine: String get() = Tr.s(3917) + val ios_invite_device: String get() = Tr.s(3918) + fun ios_link_used(`when`: Any, who: Any, mark: String): String = Tr.f(3919, arrayOf(`when`, who, mark)) + val ios_link_amachine: String get() = Tr.s(3920) + val ios_link_adevice: String get() = Tr.s(3921) + val ios_link_revoked_never: String get() = Tr.s(3922) + fun ios_link_revoked_with(who: Any): String = Tr.f(3923, arrayOf(who)) + val ios_link_machine_linked: String get() = Tr.s(3924) + val ios_link_device_paired: String get() = Tr.s(3925) + val ios_link_expired: String get() = Tr.s(3926) + fun ios_link_open(time: Any): String = Tr.f(3927, arrayOf(time)) + fun ios_hub_address(address: Any): String = Tr.f(3928, arrayOf(address)) + val ios_share: String get() = Tr.s(3929) + fun ios_link_revoke_used(kind: String, name: Any): String = Tr.f(3930, arrayOf(kind, name)) + val ios_unnamed: String get() = Tr.s(3931) + val ios_link_revoke_open: String get() = Tr.s(3932) + val ios_devices_loadfail: String get() = Tr.s(3933) + val ios_invite_creating: String get() = Tr.s(3934) + val ios_invite_fail: String get() = Tr.s(3935) + val ios_invite_ready: String get() = Tr.s(3936) + val ios_invite_fail_conn: String get() = Tr.s(3937) + val ios_revoke_device_fail: String get() = Tr.s(3938) + val ios_revoke_link_fail: String get() = Tr.s(3939) + val ios_pair_repair: String get() = Tr.s(3940) + val ios_pair_connect_title: String get() = Tr.s(3941) + val ios_pair_paste: String get() = Tr.s(3942) + val ios_pair_paste_hint: String get() = Tr.s(3943) + val ios_pair_invalid: String get() = Tr.s(3944) + fun ios_thread_delete_ask(title: Any): String = Tr.f(3945, arrayOf(title)) + fun ios_search_none(query: Any): String = Tr.f(3946, arrayOf(query)) + val ios_you: String get() = Tr.s(3947) + val ios_agent: String get() = Tr.s(3948) + fun ios_room_post_to(room: Any): String = Tr.f(3949, arrayOf(room)) + fun ios_find_none(query: Any): String = Tr.f(3950, arrayOf(query)) + val ios_ago_now: String get() = Tr.s(3951) + fun ios_ago_m(n: Any): String = Tr.f(3952, arrayOf(n)) + fun ios_ago_h(n: Any): String = Tr.f(3953, arrayOf(n)) + fun ios_ago_d(n: Any): String = Tr.f(3954, arrayOf(n)) + val ios_mic_off: String get() = Tr.s(3955) + val ios_mic_failed: String get() = Tr.s(3956) + val ios_link_update: String get() = Tr.s(3957) + val ios_link_nothere: String get() = Tr.s(3958) + val ios_hub_notconnected: String get() = Tr.s(3959) + fun ios_preview_none(size: Any): String = Tr.f(3960, arrayOf(size)) + val ios_review_resolved: String get() = Tr.s(3961) + val ios_review_reopen: String get() = Tr.s(3962) + val ios_review_resolve: String get() = Tr.s(3963) + fun ios_settled_count(n: Any): String = Tr.f(3964, arrayOf(n)) + fun ios_history_count(n: Any): String = Tr.f(3965, arrayOf(n)) + fun ios_pad_colour(n: Any): String = Tr.f(3966, arrayOf(n)) + val ios_pad_pen: String get() = Tr.s(3967) + val ios_pad_box: String get() = Tr.s(3968) + val ios_pad_eraser: String get() = Tr.s(3969) + val ios_hub_restart: String get() = Tr.s(3970) + val ios_hub_refused_pairing: String get() = Tr.s(3971) + val ios_hub_asking: String get() = Tr.s(3972) + val ios_hub_restart_none: String get() = Tr.s(3973) + val ios_hub_status_fail: String get() = Tr.s(3974) + val ios_hub_sent: String get() = Tr.s(3975) + val ios_hub_refused: String get() = Tr.s(3976) + val ios_hub_cannot: String get() = Tr.s(3977) + val ios_hub_machine_unreachable: String get() = Tr.s(3978) + val ios_hub_noanswer: String get() = Tr.s(3979) + fun ios_hub_still(status: Any): String = Tr.f(3980, arrayOf(status)) + val ios_hub_waiting: String get() = Tr.s(3981) + fun ios_hub_is(status: Any): String = Tr.f(3982, arrayOf(status)) + val ios_hub_down: String get() = Tr.s(3983) + val ios_hub_up_safe_degraded: String get() = Tr.s(3984) + val ios_hub_up_degraded: String get() = Tr.s(3985) + val ios_hub_up_safe: String get() = Tr.s(3986) + val ios_hub_up: String get() = Tr.s(3987) + val ios_star: String get() = Tr.s(3988) + val ios_pad_length_example: String get() = Tr.s(3989) + val ios_pair_code_field: String get() = Tr.s(3990) + val ios_accounts: String get() = Tr.s(3991) + val ios_devices_add: String get() = Tr.s(3992) + val ios_hub_add: String get() = Tr.s(3993) + val ios_accounts_addsignin: String get() = Tr.s(3994) + val ios_devices_intro: String get() = Tr.s(3995) + val ios_project_add_first: String get() = Tr.s(3996) + val ios_settings_alerts: String get() = Tr.s(3997) + val ios_settings_sound: String get() = Tr.s(3998) + val ios_pair_ask_note: String get() = Tr.s(3999) + val ios_projects_none_note: String get() = Tr.s(4000) + val ios_review_comment_field: String get() = Tr.s(4001) + val ios_project_badge: String get() = Tr.s(4002) + val ios_order_buy: String get() = Tr.s(4003) + val ios_diff_head: String get() = Tr.s(4004) + val ios_photo_choose: String get() = Tr.s(4005) + val ios_close_lower: String get() = Tr.s(4006) + val ios_compare_close: String get() = Tr.s(4007) + val ios_badge_colour: String get() = Tr.s(4008) + val ios_pair_code_connect: String get() = Tr.s(4009) + val ios_history: String get() = Tr.s(4010) + val ios_copied: String get() = Tr.s(4011) + val ios_copy_code: String get() = Tr.s(4012) + val ios_copy_run: String get() = Tr.s(4013) + val ios_term_fullscreen: String get() = Tr.s(4014) + val ios_delete_dots: String get() = Tr.s(4015) + val ios_devices: String get() = Tr.s(4016) + val ios_pad_hint_eraser: String get() = Tr.s(4017) + val ios_pad_hint_pen: String get() = Tr.s(4018) + val ios_pad_hint_box: String get() = Tr.s(4019) + val ios_pad_paper: String get() = Tr.s(4020) + val ios_pair_invite_incomplete: String get() = Tr.s(4021) + val ios_pair_enter: String get() = Tr.s(4022) + val ios_pair_code_needhub: String get() = Tr.s(4023) + val ios_devices_none: String get() = Tr.s(4024) + val ios_invite_expired: String get() = Tr.s(4025) + val ios_invite_expires: String get() = Tr.s(4026) + val ios_project_folder: String get() = Tr.s(4027) + val ios_quiet_from: String get() = Tr.s(4028) + val ios_term_gone: String get() = Tr.s(4029) + val ios_hub: String get() = Tr.s(4030) + val ios_hub_address_field: String get() = Tr.s(4031) + val ios_badge_icon: String get() = Tr.s(4032) + val ios_improvements: String get() = Tr.s(4033) + val ios_quiet_note: String get() = Tr.s(4034) + val ios_term_end: String get() = Tr.s(4035) + val ios_browser_keys: String get() = Tr.s(4036) + val ios_devices_lastseen: String get() = Tr.s(4037) + val ios_pad_length_ask: String get() = Tr.s(4038) + val ios_licences: String get() = Tr.s(4039) + val ios_links_none: String get() = Tr.s(4040) + val ios_thread_older: String get() = Tr.s(4041) + val ios_mech_loading: String get() = Tr.s(4042) + val ios_thread_detach: String get() = Tr.s(4043) + val ios_accounts_name: String get() = Tr.s(4044) + val ios_term_newshell: String get() = Tr.s(4045) + val ios_accounts_none: String get() = Tr.s(4046) + val ios_browser_none: String get() = Tr.s(4047) + val ios_diff_none: String get() = Tr.s(4048) + val ios_review_comments_none: String get() = Tr.s(4049) + val ios_mech_none: String get() = Tr.s(4050) + val ios_projects_none: String get() = Tr.s(4051) + val ios_notconnected: String get() = Tr.s(4052) + val ios_term_none: String get() = Tr.s(4053) + val ios_threads_none: String get() = Tr.s(4054) + val ios_secret_notneeded: String get() = Tr.s(4055) + val ios_notpaired: String get() = Tr.s(4056) + val ios_send_failed: String get() = Tr.s(4057) + val ios_compare_none: String get() = Tr.s(4058) + val ios_settings_alerts_note: String get() = Tr.s(4059) + val ios_pair_howto: String get() = Tr.s(4060) + val ios_improve_github: String get() = Tr.s(4061) + val ios_signin_open: String get() = Tr.s(4062) + val ios_devices_paired: String get() = Tr.s(4063) + val ios_links: String get() = Tr.s(4064) + val ios_pair_ask: String get() = Tr.s(4065) + val ios_paste: String get() = Tr.s(4066) + val ios_signin_code_field: String get() = Tr.s(4067) + val ios_secret_value: String get() = Tr.s(4068) + val ios_viewer_picked: String get() = Tr.s(4069) + val ios_room_post: String get() = Tr.s(4070) + val ios_quiet: String get() = Tr.s(4071) + val ios_reconnect: String get() = Tr.s(4072) + val ios_picture_remove: String get() = Tr.s(4073) + val ios_project_rename: String get() = Tr.s(4074) + val ios_revoke_ask: String get() = Tr.s(4075) + val ios_revoke_link_ask: String get() = Tr.s(4076) + val ios_review_run: String get() = Tr.s(4077) + val ios_find: String get() = Tr.s(4078) + val ios_search_field: String get() = Tr.s(4079) + val ios_signin_send: String get() = Tr.s(4080) + val ios_improve_send: String get() = Tr.s(4081) + val ios_term_shell: String get() = Tr.s(4082) + val ios_thread_empty: String get() = Tr.s(4083) + val ios_improve_send_note: String get() = Tr.s(4084) + val ios_state: String get() = Tr.s(4085) + val ios_photo_take: String get() = Tr.s(4086) + val ios_terminals: String get() = Tr.s(4087) + val ios_term_screen: String get() = Tr.s(4088) + val ios_voice_spelling: String get() = Tr.s(4089) + val ios_revoke_note: String get() = Tr.s(4090) + val ios_file_unread: String get() = Tr.s(4091) + val ios_hub_proto: String get() = Tr.s(4092) + val ios_hub_forget_note: String get() = Tr.s(4093) + val ios_diff_nogit: String get() = Tr.s(4094) + val ios_thread_actions: String get() = Tr.s(4095) + val ios_quiet_to: String get() = Tr.s(4096) + val ios_pair_code_type: String get() = Tr.s(4097) + val ios_pad_undo: String get() = Tr.s(4098) + val ios_updates: String get() = Tr.s(4099) + val ios_quiet_urgent: String get() = Tr.s(4100) + val ios_use: String get() = Tr.s(4101) + val ios_pair_fresh: String get() = Tr.s(4102) + val ios_newthread_hint: String get() = Tr.s(4103) + val ios_improve_ask: String get() = Tr.s(4104) + val ios_find_field: String get() = Tr.s(4105) + val ios_browser_driving: String get() = Tr.s(4106) + val ios_ask_answer: String get() = Tr.s(4107) + val ios_pair_wrongcode: String get() = Tr.s(4108) + val ios_pair_expired: String get() = Tr.s(4109) + val ios_pair_used: String get() = Tr.s(4110) + val ios_pair_revoked: String get() = Tr.s(4111) + val ios_pair_ratelimited: String get() = Tr.s(4112) + val ios_pair_storage: String get() = Tr.s(4113) + val ios_pair_required: String get() = Tr.s(4114) + val ios_pair_unreachable: String get() = Tr.s(4115) + val ios_connecting: String get() = Tr.s(4116) + val ios_offline: String get() = Tr.s(4117) + val ios_hub_refused_plain: String get() = Tr.s(4118) + val ios_thinking: String get() = Tr.s(4119) + val ios_tab_board: String get() = Tr.s(4120) + val ios_tab_schematic: String get() = Tr.s(4121) + val ios_tab_split: String get() = Tr.s(4122) + val ios_tab_mech: String get() = Tr.s(4123) + val ios_tab_files: String get() = Tr.s(4124) + val ios_tab_diff: String get() = Tr.s(4125) + val ios_tab_review: String get() = Tr.s(4126) + val ios_tab_browser: String get() = Tr.s(4127) + val ios_review_checks: String get() = Tr.s(4128) + val ios_review_bom: String get() = Tr.s(4129) + val ios_review_comments: String get() = Tr.s(4130) + val ios_board_none: String get() = Tr.s(4131) + val ios_schematic_none: String get() = Tr.s(4132) + fun ios_term_exited(code: Any): String = Tr.f(4133, arrayOf(code)) + val ios_term_failed: String get() = Tr.s(4134) + fun ios_island_more(n: Number): String = Tr.f(4135, arrayOf(n)) + val ios_island_stale: String get() = Tr.s(4136) + fun ios_plot_previous(why: Any): String = Tr.f(4137, arrayOf(why)) + val ios_plot_decoding: String get() = Tr.s(4138) + val ios_plot_undecodable: String get() = Tr.s(4139) + val ios_plot_badref: String get() = Tr.s(4140) + val ios_plot_badmodel: String get() = Tr.s(4141) + val ios_plot_incomplete: String get() = Tr.s(4142) + val ios_plot_unexpected: String get() = Tr.s(4143) + val ios_part_bad: String get() = Tr.s(4144) + val ios_part_placement: String get() = Tr.s(4145) + val ios_part_triangles: String get() = Tr.s(4146) + val ios_part_incomplete: String get() = Tr.s(4147) + val ios_part_unexpected: String get() = Tr.s(4148) + fun ios_parts_progress(done: Number, of: Number): String = Tr.f(4149, arrayOf(done, of)) + val ios_hub_timeout: String get() = Tr.s(4150) + val ios_pair_local: String get() = Tr.s(4151) + val ios_search_messages: String get() = Tr.s(4152) + fun ios_sub_of(thread: Any): String = Tr.f(4153, arrayOf(thread)) + val ios_sub_thread: String get() = Tr.s(4154) + val ios_sub_gone: String get() = Tr.s(4155) + fun ios_sub_more(n: Number): String = Tr.f(4156, arrayOf(n)) + val ios_sub_none: String get() = Tr.s(4157) + val ios_sub_title: String get() = Tr.s(4158) + val ios_sub_tool: String get() = Tr.s(4159) + val ios_sub_reported: String get() = Tr.s(4160) + val ios_sub_ended: String get() = Tr.s(4161) + val ios_state_completed: String get() = Tr.s(4162) + val ios_handoff_open: String get() = Tr.s(4163) + fun ios_handoff_from(title: Any): String = Tr.f(4164, arrayOf(title)) + fun ios_handoff_note(note: Any): String = Tr.f(4165, arrayOf(note)) + fun ios_machine_away(label: Any): String = Tr.f(4166, arrayOf(label)) + fun ios_machine_on(machine: Any): String = Tr.f(4167, arrayOf(machine)) + fun ios_machine_runs(machine: Any): String = Tr.f(4168, arrayOf(machine)) + val ios_machine_every: String get() = Tr.s(4169) + val ios_thread_marked: String get() = Tr.s(4170) + val ios_find_bar: String get() = Tr.s(4171) + val ios_find_prev: String get() = Tr.s(4172) + val ios_find_next: String get() = Tr.s(4173) + val ios_find_close: String get() = Tr.s(4174) + fun ios_find_count(at: Number, total: Number): String = Tr.f(4175, arrayOf(at, total)) + fun ios_find_countmore(at: Number, total: Number): String = Tr.f(4176, arrayOf(at, total)) + val ios_queue_unsent: String get() = Tr.s(4177) + val ios_queue_refused: String get() = Tr.s(4178) + val ios_queue_sending: String get() = Tr.s(4179) + fun ios_newon(machine: Any): String = Tr.f(4180, arrayOf(machine)) + fun ios_newon_away(machine: Any): String = Tr.f(4181, arrayOf(machine)) + fun ios_machine_also(machines: Any): String = Tr.f(4182, arrayOf(machines)) + val ios_voice_mic_note: String get() = Tr.s(4183) + fun ios_voice_mic_note_device(device: Any): String = Tr.f(4184, arrayOf(device)) + val ios_voice_dict_empty: String get() = Tr.s(4185) + val ios_voice_learned_empty: String get() = Tr.s(4186) + val ios_voice_pebble: String get() = Tr.s(4187) + val ios_voice_pebble_note: String get() = Tr.s(4188) + val ios_devices_add_note: String get() = Tr.s(4189) + val ios_buy: String get() = Tr.s(4190) + fun ios_buy_from(price: Any): String = Tr.f(4191, arrayOf(price)) + fun ios_buy_last(price: Any): String = Tr.f(4192, arrayOf(price)) + val ios_buy_incomplete: String get() = Tr.s(4193) + val ios_improve_search: String get() = Tr.s(4194) + val android_notify_head: String get() = Tr.s(4195) + val gpui_keysheet_note: String get() = Tr.s(4196) + val gpui_keys_help: String get() = Tr.s(4197) + val gpui_f2_welcome_body: String get() = Tr.s(4198) + fun gpui_f2_data_folder_note(home: Any): String = Tr.f(4199, arrayOf(home)) + val gpui_f2_choose_another: String get() = Tr.s(4200) + val gpui_f2_usage_note: String get() = Tr.s(4201) + val gpui_f2_v014: String get() = Tr.s(4202) + val gpui_f2_v014_copied: String get() = Tr.s(4203) + fun gpui_f2_v014_found(from: Any): String = Tr.f(4204, arrayOf(from)) + val gpui_f2_agents_body: String get() = Tr.s(4205) + fun gpui_f2_installing(note: Any): String = Tr.f(4206, arrayOf(note)) + fun gpui_f2_install_failed(note: Any): String = Tr.f(4207, arrayOf(note)) + val gpui_f2_installed: String get() = Tr.s(4208) + fun gpui_f2_version(v: Any): String = Tr.f(4209, arrayOf(v)) + fun gpui_f2_v_connected(v: Any): String = Tr.f(4210, arrayOf(v)) + fun gpui_f2_v_connected_as(v: Any, who: Any): String = Tr.f(4211, arrayOf(v, who)) + val gpui_f2_i_connected: String get() = Tr.s(4212) + fun gpui_f2_i_connected_as(who: Any): String = Tr.f(4213, arrayOf(who)) + fun gpui_f2_v_notconnected(v: Any): String = Tr.f(4214, arrayOf(v)) + val gpui_f2_i_notconnected: String get() = Tr.s(4215) + fun gpui_f2_v_runcmd(v: Any, cmd: Any): String = Tr.f(4216, arrayOf(v, cmd)) + fun gpui_f2_i_runcmd(cmd: Any): String = Tr.f(4217, arrayOf(cmd)) + val gpui_f2_more_agents: String get() = Tr.s(4218) + val gpui_f2_check_after: String get() = Tr.s(4219) + val gpui_f2_tools: String get() = Tr.s(4220) + val gpui_f2_tools_body: String get() = Tr.s(4221) + fun gpui_f2_kicad_ok(v: Any, path: Any): String = Tr.f(4222, arrayOf(v, path)) + fun gpui_f2_kicad_installing(v: Any, note: Any): String = Tr.f(4223, arrayOf(v, note)) + fun gpui_f2_kicad_auto(v: Any): String = Tr.f(4224, arrayOf(v)) + val gpui_f2_kicad_nopkg: String get() = Tr.s(4225) + val gpui_f2_freecad_notfound: String get() = Tr.s(4226) + val gpui_f2_locate_kicad: String get() = Tr.s(4227) + val gpui_f2_locate_freecad: String get() = Tr.s(4228) + fun gpui_f2_locate_note(tool: Any): String = Tr.f(4229, arrayOf(tool)) + fun gpui_f2_path_to(tool: Any): String = Tr.f(4230, arrayOf(tool)) + val gpui_f2_alwayson: String get() = Tr.s(4231) + val gpui_f2_alwayson_body: String get() = Tr.s(4232) + val gpui_f2_aon_here: String get() = Tr.s(4233) + val gpui_f2_aon_here_note: String get() = Tr.s(4234) + val gpui_f2_aon_boat: String get() = Tr.s(4235) + val gpui_f2_aon_boat_note: String get() = Tr.s(4236) + val gpui_f2_aon_machine: String get() = Tr.s(4237) + val gpui_f2_aon_machine_note: String get() = Tr.s(4238) + val gpui_f2_chosen: String get() = Tr.s(4239) + val gpui_f2_choose: String get() = Tr.s(4240) + val gpui_f2_coming: String get() = Tr.s(4241) + val gpui_f2_coming_note: String get() = Tr.s(4242) + val gpui_f2_project_body: String get() = Tr.s(4243) + val gpui_f2_first_message_note: String get() = Tr.s(4244) + val gpui_f2_what_agent: String get() = Tr.s(4245) + val gpui_f2_folder_note: String get() = Tr.s(4246) + val gpui_f2_pair_phone: String get() = Tr.s(4247) + val gpui_f2_pair_phone_note: String get() = Tr.s(4248) + val gpui_f2_pair_phone_shown: String get() = Tr.s(4249) + val gpui_f2_show_code: String get() = Tr.s(4250) + val gpui_f2_done_body: String get() = Tr.s(4251) + val gpui_f2_open_uber: String get() = Tr.s(4252) + val gpui_f2_setup_phone: String get() = Tr.s(4253) + val gpui_f2_setup_five: String get() = Tr.s(4254) + fun gpui_swarm_row(n: Number, w: Number): String = Tr.f(4255, arrayOf(n, w)) + fun gpui_swarm_held(why: Any): String = Tr.f(4256, arrayOf(why)) + fun gpui_swarm_state_why(state: Any, why: Any): String = Tr.f(4257, arrayOf(state, why)) + val gpui_swarm_new: String get() = Tr.s(4258) + val gpui_swarm_add_member: String get() = Tr.s(4259) + val gpui_swarm_start: String get() = Tr.s(4260) + val gpui_swarm_topic: String get() = Tr.s(4261) + val gpui_swarm_goal: String get() = Tr.s(4262) + val gpui_swarm_seed: String get() = Tr.s(4263) + val gpui_swarm_role: String get() = Tr.s(4264) + val gpui_swarm_remove: String get() = Tr.s(4265) + val gpui_swarm_over: String get() = Tr.s(4266) + val gpui_swarm_none: String get() = Tr.s(4267) + val ios_swarm_new: String get() = Tr.s(4268) + fun ios_swarm_new_in(project: Any): String = Tr.f(4269, arrayOf(project)) + fun ios_swarm_members(n: Number): String = Tr.f(4270, arrayOf(n)) + val ios_swarm_state_paused: String get() = Tr.s(4271) + val ios_swarm_state_removed: String get() = Tr.s(4272) + val ios_swarm_tag_idea: String get() = Tr.s(4273) + val ios_swarm_tag_critique: String get() = Tr.s(4274) + val ios_swarm_tag_claim: String get() = Tr.s(4275) + val ios_swarm_tag_synthesis: String get() = Tr.s(4276) + val ios_swarm_reason_circular: String get() = Tr.s(4277) + val ios_swarm_reason_budget: String get() = Tr.s(4278) + val ios_swarm_reason_person: String get() = Tr.s(4279) + val ios_swarm_reason_chatter: String get() = Tr.s(4280) + fun ios_swarm_held(why: Any): String = Tr.f(4281, arrayOf(why)) + val ios_swarm_topic: String get() = Tr.s(4282) + val ios_swarm_goal: String get() = Tr.s(4283) + val ios_swarm_seed: String get() = Tr.s(4284) + val ios_swarm_role: String get() = Tr.s(4285) + val ios_swarm_add: String get() = Tr.s(4286) + fun ios_swarm_remove_ask(name: Any): String = Tr.f(4287, arrayOf(name)) + val ios_swarm_stop_ask: String get() = Tr.s(4288) + val ios_swarm_post: String get() = Tr.s(4289) + val ios_image_save: String get() = Tr.s(4290) + val ios_image_saved: String get() = Tr.s(4291) + val ios_image_denied: String get() = Tr.s(4292) + val ios_image_failed: String get() = Tr.s(4293) + val ios_image_incoming: String get() = Tr.s(4294) + val ios_image_loadfail: String get() = Tr.s(4295) + val ios_image_unavailable: String get() = Tr.s(4296) + val native_permission_photos_add: String get() = Tr.s(4297) + fun ios_buy_ask(project: Any): String = Tr.f(4298, arrayOf(project)) + val ios_settings_accounts_usage: String get() = Tr.s(4299) + val ios_settings_machines_devices: String get() = Tr.s(4300) + val ios_settings_alerts_on: String get() = Tr.s(4301) + val ios_settings_alerts_off: String get() = Tr.s(4302) + fun ios_settings_accounts_n(n: Number): String = Tr.f(4303, arrayOf(n)) + val hub_acct_this_hubs_sign_in: String get() = Tr.s(4304) + val hub_acct_no_usage_reading_yet: String get() = Tr.s(4305) + val hub_acct_this_hubs_claude_sign_in: String get() = Tr.s(4306) + val hub_acct_this_hubs_codex_sign_in: String get() = Tr.s(4307) + val hub_acct_claude_cli_login: String get() = Tr.s(4308) + val hub_acct_codex_cli_login: String get() = Tr.s(4309) + val hub_acct_fable_weekly: String get() = Tr.s(4310) + fun ios_acct_also(names: Any): String = Tr.f(4311, arrayOf(names)) + val ios_clone_mode: String get() = Tr.s(4312) + val ios_clone_repo_hint: String get() = Tr.s(4313) + val ios_clone_signin: String get() = Tr.s(4314) + val ios_clone_change: String get() = Tr.s(4315) + val ios_clone_name: String get() = Tr.s(4316) + val ios_clone_thread: String get() = Tr.s(4317) + val ios_clone_go: String get() = Tr.s(4318) + fun ios_clone_into(dest: Any): String = Tr.f(4319, arrayOf(dest)) + val ios_clone_same: String get() = Tr.s(4320) + fun ios_clone_title(repo: Any): String = Tr.f(4321, arrayOf(repo)) + fun ios_clone_cloned(repo: Any): String = Tr.f(4322, arrayOf(repo)) + val ios_clone_cancelled: String get() = Tr.s(4323) + fun ios_clone_code(url: Any): String = Tr.f(4324, arrayOf(url)) + val ios_clone_signin_starting: String get() = Tr.s(4325) + val ios_clone_signin_done: String get() = Tr.s(4326) + val ios_clone_signin_open: String get() = Tr.s(4327) + val ios_clone_loading: String get() = Tr.s(4328) + val mobile_tab_inbox: String get() = Tr.s(4329) + val mobile_tab_crew: String get() = Tr.s(4330) + val mobile_tab_bench: String get() = Tr.s(4331) + val mobile_inbox_clear: String get() = Tr.s(4332) + val mobile_inbox_clear_note: String get() = Tr.s(4333) + val mobile_inbox_talk_bub: String get() = Tr.s(4334) + val mobile_inbox_jump_in: String get() = Tr.s(4335) + val mobile_inbox_open_bench: String get() = Tr.s(4336) + val mobile_badge_pcb: String get() = Tr.s(4337) + val mobile_pill_waiting: String get() = Tr.s(4338) + fun mobile_snooze_wakes(time: Any): String = Tr.f(4339, arrayOf(time)) + val mobile_bench_all: String get() = Tr.s(4340) + val mobile_snooze_for: String get() = Tr.s(4341) + val sidebar_sections_needs: String get() = Tr.s(4342) + val sidebar_sections_pinned: String get() = Tr.s(4343) + val sidebar_sections_active: String get() = Tr.s(4344) + val sidebar_sections_quiet: String get() = Tr.s(4345) + val sidebar_sections_quiet_hint: String get() = Tr.s(4346) + val sidebar_sections_running_word: String get() = Tr.s(4347) + val sidebar_sections_recent: String get() = Tr.s(4348) + val sidebar_sections_limit: String get() = Tr.s(4349) + val sidebar_sections_cut: String get() = Tr.s(4350) + val sidebar_sections_monitoring: String get() = Tr.s(4351) + val sidebar_sections_stopped: String get() = Tr.s(4352) + val sidebar_sections_done: String get() = Tr.s(4353) + val sidebar_sections_failed: String get() = Tr.s(4354) + val sidebar_sections_rename: String get() = Tr.s(4355) + val sidebar_sections_pin: String get() = Tr.s(4356) + val sidebar_sections_unpin: String get() = Tr.s(4357) + val sidebar_sections_quiet_make: String get() = Tr.s(4358) + val sidebar_sections_quiet_back: String get() = Tr.s(4359) + val sidebar_sections_quiet_hint2: String get() = Tr.s(4360) + fun gpui_sections_move_to(group: Any): String = Tr.f(4361, arrayOf(group)) + val sidebar_sections_move: String get() = Tr.s(4362) + val sidebar_sections_new_group: String get() = Tr.s(4363) + val sidebar_sections_new_group_title: String get() = Tr.s(4364) + fun sidebar_sections_remove_ask(project: Any): String = Tr.f(4365, arrayOf(project)) + fun gpui_sections_running(n: Number): String = Tr.f(4366, arrayOf(n)) + fun gpui_sections_rest(n: Number): String = Tr.f(4367, arrayOf(n)) + fun gpui_projects_mech(n: Any): String = Tr.f(4368, arrayOf(n)) + val gpui_open_folder: String get() = Tr.s(4369) + val gpui_picker_none: String get() = Tr.s(4370) + val gpui_picker_key_select: String get() = Tr.s(4371) + val gpui_picker_key_into: String get() = Tr.s(4372) + val gpui_picker_key_complete: String get() = Tr.s(4373) + val gpui_picker_key_open: String get() = Tr.s(4374) + val gpui_picker_added: String get() = Tr.s(4375) + fun gpui_picker_more_typed(n: Any): String = Tr.f(4376, arrayOf(n)) + val gpui_clone_tab: String get() = Tr.s(4377) + val gpui_clone_change: String get() = Tr.s(4378) + val gpui_clone_thread: String get() = Tr.s(4379) + val gpui_clone_retry: String get() = Tr.s(4380) + val gpui_clone_signin: String get() = Tr.s(4381) + val gpui_clone_back: String get() = Tr.s(4382) + val gpui_clone_open_thread: String get() = Tr.s(4383) + val gpui_clone_open_project: String get() = Tr.s(4384) + val gpui_clone_private: String get() = Tr.s(4385) + val gpui_clone_loading: String get() = Tr.s(4386) + val gpui_clone_signin_list: String get() = Tr.s(4387) + val gpui_clone_signin_code: String get() = Tr.s(4388) + val gpui_clone_signin_asking: String get() = Tr.s(4389) + val gpui_clone_signin_done: String get() = Tr.s(4390) + val gpui_clone_cancel: String get() = Tr.s(4391) + val gpui_picker_key_pick: String get() = Tr.s(4392) + val gpui_clone_phase_connecting: String get() = Tr.s(4393) + val gpui_clone_phase_receiving: String get() = Tr.s(4394) + val gpui_clone_phase_resolving: String get() = Tr.s(4395) + val gpui_clone_phase_updating: String get() = Tr.s(4396) + val gpui_clone_phase_counting: String get() = Tr.s(4397) + val gpui_clone_phase_compressing: String get() = Tr.s(4398) + val gpui_clone_phase_lfs: String get() = Tr.s(4399) + val gpui_clone_phase_adding: String get() = Tr.s(4400) + val gpui_clone_phase_starting: String get() = Tr.s(4401) + val gpui_assembly: String get() = Tr.s(4402) + val gpui_mech: String get() = Tr.s(4403) + val gpui_readme: String get() = Tr.s(4404) + val gpui_board: String get() = Tr.s(4405) + val gpui_schematic: String get() = Tr.s(4406) + val gpui_view_three_d: String get() = Tr.s(4407) + val gpui_files: String get() = Tr.s(4408) + val gpui_usage_bot: String get() = Tr.s(4409) + val gpui_usage_tokens: String get() = Tr.s(4410) + val gpui_usage_accounts_tip: String get() = Tr.s(4411) + val gpui_usage_feeds: String get() = Tr.s(4412) + val gpui_usage_lanes: String get() = Tr.s(4413) + val gpui_usage_turn_live: String get() = Tr.s(4414) + val gpui_usage_chat: String get() = Tr.s(4415) + val gpui_usage_today: String get() = Tr.s(4416) + val gpui_usage_prefs: String get() = Tr.s(4417) + val gpui_usage_handover: String get() = Tr.s(4418) + val gpui_usage_none_waiting: String get() = Tr.s(4419) + val gpui_usage_session: String get() = Tr.s(4420) + val gpui_usage_last_handover: String get() = Tr.s(4421) + val gpui_usage_triage: String get() = Tr.s(4422) + val gpui_usage_office: String get() = Tr.s(4423) + val gpui_usage_office_lower: String get() = Tr.s(4424) + val gpui_usage_compact: String get() = Tr.s(4425) + val gpui_usage_switch: String get() = Tr.s(4426) + val gpui_usage_note: String get() = Tr.s(4427) + val gpui_usage_lanes_note: String get() = Tr.s(4428) + val gpui_usage_lanes_routines: String get() = Tr.s(4429) + val gpui_usage_turns_many: String get() = Tr.s(4430) + val gpui_usage_turns_full: String get() = Tr.s(4431) + val gpui_usage_turns_one: String get() = Tr.s(4432) + fun gpui_usage_turns_n(n: Any): String = Tr.f(4433, arrayOf(n)) + fun gpui_usage_left(n: Any): String = Tr.f(4434, arrayOf(n)) + fun gpui_usage_of(a: Any, b: Any): String = Tr.f(4435, arrayOf(a, b)) + fun gpui_usage_context(n: Any): String = Tr.f(4436, arrayOf(n)) + val gpui_usage_noread: String get() = Tr.s(4437) + fun gpui_mgmt_bom_summary(parts: Number, lines: Number): String = Tr.f(4438, arrayOf(parts, lines)) + fun gpui_mgmt_bom_more(n: Number): String = Tr.f(4439, arrayOf(n)) + val gpui_mgmt_dock_right: String get() = Tr.s(4440) + val gpui_mgmt_dock_bottom: String get() = Tr.s(4441) + val gpui_mgmt_close: String get() = Tr.s(4442) + val gpui_mgmt_bom_saved: String get() = Tr.s(4443) + val gpui_mgmt_bom_reading: String get() = Tr.s(4444) + val gpui_mgmt_bom_nomatch: String get() = Tr.s(4445) + val gpui_mgmt_bom_nompn: String get() = Tr.s(4446) + val gpui_mgmt_filter: String get() = Tr.s(4447) + val gpui_mgmt_bom_noparts: String get() = Tr.s(4448) + val gpui_mgmt_bom_dnp: String get() = Tr.s(4449) + val gpui_mgmt_fab_tab: String get() = Tr.s(4450) + val gpui_mgmt_fab_drc_current: String get() = Tr.s(4451) + val gpui_mgmt_fab_drc_stale: String get() = Tr.s(4452) + val gpui_mgmt_fab_drc_update: String get() = Tr.s(4453) + val gpui_mgmt_fab_drc_none: String get() = Tr.s(4454) + val gpui_mgmt_fab_drc_write: String get() = Tr.s(4455) + val gpui_mgmt_fab_drc_noproject: String get() = Tr.s(4456) + val gpui_mgmt_fab_tier_extra: String get() = Tr.s(4457) + val gpui_mgmt_fab_tier_free: String get() = Tr.s(4458) + val gpui_mgmt_fab_reading: String get() = Tr.s(4459) + val gpui_mgmt_fab_thefab: String get() = Tr.s(4460) + val gpui_mgmt_fab_refresh: String get() = Tr.s(4461) + val gpui_mgmt_fab_apply: String get() = Tr.s(4462) + val gpui_mgmt_fab_changed: String get() = Tr.s(4463) + val gpui_mgmt_fab_seen: String get() = Tr.s(4464) + val gpui_mgmt_fab_limit: String get() = Tr.s(4465) + val gpui_mgmt_fab_free: String get() = Tr.s(4466) + val gpui_mgmt_fab_extra: String get() = Tr.s(4467) + val gpui_mgmt_fab_readcol: String get() = Tr.s(4468) + val gpui_mgmt_fab_derived: String get() = Tr.s(4469) + fun gpui_mgmt_fab_suggestion(what: Any, project: Any, fab: Any): String = Tr.f(4470, arrayOf(what, project, fab)) + fun gpui_mgmt_fab_read(rev: Any, day: Any): String = Tr.f(4471, arrayOf(rev, day)) + val gpui_mgmt_fab_reviewing: String get() = Tr.s(4472) + val gpui_mgmt_fab_noreview: String get() = Tr.s(4473) + val gpui_mgmt_fab_findings: String get() = Tr.s(4474) + val gpui_mgmt_fab_reviewbtn: String get() = Tr.s(4475) + val gpui_mgmt_fab_judge: String get() = Tr.s(4476) + val gpui_mgmt_plan_reading: String get() = Tr.s(4477) + val gpui_mgmt_plan_none: String get() = Tr.s(4478) + fun gpui_mgmt_plan_awaiting(n: Number): String = Tr.f(4479, arrayOf(n)) + val gpui_mgmt_plan_nothing: String get() = Tr.s(4480) + val gpui_mgmt_plan_saved: String get() = Tr.s(4481) + val gpui_mgmt_plan_all: String get() = Tr.s(4482) + val gpui_mgmt_plan_stop: String get() = Tr.s(4483) + val gpui_mgmt_plan_hide: String get() = Tr.s(4484) + val gpui_mgmt_plan_show: String get() = Tr.s(4485) + val gpui_mgmt_plan_done: String get() = Tr.s(4486) + val gpui_mgmt_plan_layer: String get() = Tr.s(4487) + val gpui_mgmt_plan_reject: String get() = Tr.s(4488) + val gpui_mgmt_plan_keysnote: String get() = Tr.s(4489) + fun gpui_mgmt_plan_reference(layer: Any): String = Tr.f(4490, arrayOf(layer)) + fun gpui_mgmt_plan_nets(n: Number): String = Tr.f(4491, arrayOf(n)) + val gpui_mgmt_plan_tab: String get() = Tr.s(4492) + val gpui_mgmt_plan_before: String get() = Tr.s(4493) + val gpui_mgmt_plan_onwords: String get() = Tr.s(4494) + val gpui_mgmt_plan_offwords: String get() = Tr.s(4495) + fun gpui_mgmt_plan_elsewhere(board: Any): String = Tr.f(4496, arrayOf(board)) + val gpui_mgmt_plan_openboard: String get() = Tr.s(4497) + val gpui_mgmt_plan_noboard: String get() = Tr.s(4498) + val gpui_mgmt_plan_drawn: String get() = Tr.s(4499) + val gpui_pick_planonce: String get() = Tr.s(4500) + val gpui_pick_planonce_note: String get() = Tr.s(4501) + val hub_view_board_unlisted: String get() = Tr.s(4502) + val gpui_mgmt_bom_stocknote: String get() = Tr.s(4503) + val hub_order_pick_more: String get() = Tr.s(4504) + val hub_order_pick_phone: String get() = Tr.s(4505) + val hub_order_pick_go: String get() = Tr.s(4506) + val gpui_plan_before_routing_desc: String get() = Tr.s(4507) + fun gpui_mgmt_bom_shared(others: Any): String = Tr.f(4508, arrayOf(others)) + fun gpui_mgmt_fab_review(must: Any, should: Any, notes: Any): String = Tr.f(4509, arrayOf(must, should, notes)) + fun gpui_mgmt_fab_stackup(id: Any, w: Any): String = Tr.f(4510, arrayOf(id, w)) + val gpui_mgmt_fab_proposed: String get() = Tr.s(4511) + val gpui_mgmt_fab_use: String get() = Tr.s(4512) + val gpui_keys_mgmt_bom: String get() = Tr.s(4513) + val gpui_keys_mgmt_checks: String get() = Tr.s(4514) + val gpui_keys_mgmt_life: String get() = Tr.s(4515) + val gpui_mgmt_checks_reading: String get() = Tr.s(4516) + val gpui_mgmt_checks_searching: String get() = Tr.s(4517) + val gpui_mgmt_checks_run: String get() = Tr.s(4518) + val gpui_mgmt_checks_running: String get() = Tr.s(4519) + fun gpui_mgmt_checks_behind(what: Any): String = Tr.f(4520, arrayOf(what)) + val gpui_mgmt_checks_stale: String get() = Tr.s(4521) + val gpui_mgmt_checks_liveunsaved: String get() = Tr.s(4522) + fun gpui_mgmt_checks_waiting(why: Any): String = Tr.f(4523, arrayOf(why)) + fun gpui_mgmt_checks_failed(why: Any): String = Tr.f(4524, arrayOf(why)) + val gpui_mgmt_checks_all: String get() = Tr.s(4525) + val gpui_mgmt_checks_errors: String get() = Tr.s(4526) + val gpui_mgmt_checks_warnings: String get() = Tr.s(4527) + val gpui_mgmt_checks_excluded: String get() = Tr.s(4528) + val gpui_mgmt_checks_fix: String get() = Tr.s(4529) + val gpui_mgmt_checks_reexport: String get() = Tr.s(4530) + fun gpui_mgmt_checks_more(n: Number): String = Tr.f(4531, arrayOf(n)) + val gpui_mgmt_checks_fewer: String get() = Tr.s(4532) + val gpui_mgmt_checks_none: String get() = Tr.s(4533) + val gpui_mgmt_checks_nomatch: String get() = Tr.s(4534) + val gpui_mgmt_checks_library: String get() = Tr.s(4535) + val gpui_mgmt_checks_withlib: String get() = Tr.s(4536) + val gpui_mgmt_checks_fullrun: String get() = Tr.s(4537) + val gpui_mgmt_checks_allsources: String get() = Tr.s(4538) + val gpui_mgmt_checks_judged: String get() = Tr.s(4539) + val gpui_mgmt_bom_dnp_tip: String get() = Tr.s(4540) + val gpui_mgmt_bom_writing: String get() = Tr.s(4541) + val gpui_mgmt_bom_inkicad: String get() = Tr.s(4542) + val gpui_mgmt_bom_saved_file: String get() = Tr.s(4543) + val gpui_mgmt_bom_fab: String get() = Tr.s(4544) + val gpui_mgmt_bom_mpn_ph: String get() = Tr.s(4545) + val gpui_mgmt_bom_fab_ph: String get() = Tr.s(4546) + fun gpui_mgmt_bom_each(price: Any, n: Any): String = Tr.f(4547, arrayOf(price, n)) + fun gpui_mgmt_bom_out(n: Any, need: Any): String = Tr.f(4548, arrayOf(n, need)) + fun gpui_mgmt_bom_low(n: Any): String = Tr.f(4549, arrayOf(n)) + fun gpui_mgmt_bom_in(n: Any): String = Tr.f(4550, arrayOf(n)) + fun gpui_mgmt_bom_cost(cost: Any): String = Tr.f(4551, arrayOf(cost)) + fun gpui_mgmt_bom_cost_least(cost: Any): String = Tr.f(4552, arrayOf(cost)) + val gpui_mgmt_bom_checking: String get() = Tr.s(4553) + val gpui_mgmt_bom_notknown: String get() = Tr.s(4554) + val gpui_mgmt_bom_stock: String get() = Tr.s(4555) + val gpui_mgmt_bom_alts: String get() = Tr.s(4556) + val gpui_mgmt_bom_alts_looking: String get() = Tr.s(4557) + val gpui_mgmt_bom_alts_none: String get() = Tr.s(4558) + val gpui_mgmt_bom_alts_use: String get() = Tr.s(4559) + val gpui_mgmt_bom_class_basic: String get() = Tr.s(4560) + val gpui_mgmt_bom_class_extended: String get() = Tr.s(4561) + val gpui_mgmt_bom_class_preferred: String get() = Tr.s(4562) + val gpui_mgmt_bom_notinstock: String get() = Tr.s(4563) + val gpui_mgmt_bom_off: String get() = Tr.s(4564) + fun gpui_mgmt_life_since(day: Any, n: Number): String = Tr.f(4565, arrayOf(day, n)) + fun gpui_mgmt_life_one(day: Any): String = Tr.f(4566, arrayOf(day)) + fun gpui_mgmt_life_now(cost: Any, n: Any, lines: Any): String = Tr.f(4567, arrayOf(cost, n, lines)) + fun gpui_mgmt_life_part_now(stock: Any, price: Any): String = Tr.f(4568, arrayOf(stock, price)) + fun gpui_mgmt_life_instock(lines: Any): String = Tr.f(4569, arrayOf(lines)) + val gpui_mgmt_life_board: String get() = Tr.s(4570) + val gpui_mgmt_life_price: String get() = Tr.s(4571) + val gpui_mgmt_life_active: String get() = Tr.s(4572) + val gpui_mgmt_life_nrnd: String get() = Tr.s(4573) + val gpui_mgmt_life_eol: String get() = Tr.s(4574) + val gpui_mgmt_life_unknown: String get() = Tr.s(4575) + val gpui_mgmt_life_nolines: String get() = Tr.s(4576) + val gpui_mgmt_life_noread: String get() = Tr.s(4577) + val gpui_mgmt_life_reading: String get() = Tr.s(4578) + val gpui_mgmt_life_nopart: String get() = Tr.s(4579) + val gpui_mgmt_life_tab: String get() = Tr.s(4580) + val gpui_mgmt_bom_paused: String get() = Tr.s(4581) + val gpui_mgmt_bom_paused_tip: String get() = Tr.s(4582) + val gpui_keys_mgmt_fab: String get() = Tr.s(4583) + val gpui_mgmt_bom_putback: String get() = Tr.s(4584) + val gpui_mgmt_bom_nochange: String get() = Tr.s(4585) + val gpui_mgmt_bom_deferred: String get() = Tr.s(4586) + val gpui_mgmt_bom_inkicad_save: String get() = Tr.s(4587) + val gpui_mgmt_bom_undo_tip: String get() = Tr.s(4588) + val gpui_mgmt_bom_undo: String get() = Tr.s(4589) + fun gpui_mgmt_checks_on(host: Any): String = Tr.f(4590, arrayOf(host)) + val gpui_gerbers: String get() = Tr.s(4591) + val gpui_gerbers_vs: String get() = Tr.s(4592) + val gpui_gerbers_vs_tip: String get() = Tr.s(4593) + val gpui_gerbers_gerbview: String get() = Tr.s(4594) + val gpui_gerbers_gerbview_tip: String get() = Tr.s(4595) + val gpui_mgmt_bom_saved_state: String get() = Tr.s(4596) + val gpui_mgmt_bom_live_tip: String get() = Tr.s(4597) + val gpui_mgmt_bom_saved_tip: String get() = Tr.s(4598) + val gpui_mgmt_bom_price: String get() = Tr.s(4599) + val gpui_mgmt_bom_class: String get() = Tr.s(4600) + fun gpui_mgmt_life_unknown_n(n: Any): String = Tr.f(4601, arrayOf(n)) + fun gpui_mgmt_life_unknown_tip(a: Any, b: Any): String = Tr.f(4602, arrayOf(a, b)) + fun gpui_mgmt_bom_stock_out(n: Any): String = Tr.f(4603, arrayOf(n)) + fun gpui_mgmt_bom_stock_low(n: Any): String = Tr.f(4604, arrayOf(n)) + val gpui_gerbers_boardonly: String get() = Tr.s(4605) + val gpui_gerbers_gerbersonly: String get() = Tr.s(4606) + fun gpui_mgmt_life_price_since(day: Any): String = Tr.f(4607, arrayOf(day)) + fun gpui_streamer_account(n: Any): String = Tr.f(4608, arrayOf(n)) + val gpui_streamer_mode: String get() = Tr.s(4609) + val gpui_streamer_section: String get() = Tr.s(4610) + val gpui_streamer_off: String get() = Tr.s(4611) + val gpui_streamer_on: String get() = Tr.s(4612) + val gpui_streamer_tip: String get() = Tr.s(4613) + val gpui_streamer_shared: String get() = Tr.s(4614) + val gpui_streamer_qr: String get() = Tr.s(4615) + val gpui_streamer_note: String get() = Tr.s(4616) + val gpui_streamer_share: String get() = Tr.s(4617) + val gpui_streamer_apps: String get() = Tr.s(4618) + val gpui_streamer_apps_note: String get() = Tr.s(4619) + val gpui_streamer_linux: String get() = Tr.s(4620) + val gpui_streamer_mac: String get() = Tr.s(4621) + val gpui_streamer_win: String get() = Tr.s(4622) + val gpui_f2_uber_title: String get() = Tr.s(4623) + val gpui_f2_uber_body: String get() = Tr.s(4624) + val gpui_f2_uber_say: String get() = Tr.s(4625) + val gpui_f2_uber_here: String get() = Tr.s(4626) + val gpui_f2_uber_err_name: String get() = Tr.s(4627) + val gpui_f2_uber_err_color: String get() = Tr.s(4628) + val gpui_f2_uber_color: String get() = Tr.s(4629) + val gpui_f2_uber_own: String get() = Tr.s(4630) + val gpui_f2_uber_custom: String get() = Tr.s(4631) + val gpui_f2_uber_hex: String get() = Tr.s(4632) + val gpui_f2_uber_use: String get() = Tr.s(4633) + val gpui_f2_uber_shuffle: String get() = Tr.s(4634) + val gpui_f2_uber_auto: String get() = Tr.s(4635) + val gpui_f2_uber_savename: String get() = Tr.s(4636) + val gpui_f2_uber_p_ginger: String get() = Tr.s(4637) + val gpui_f2_uber_p_cream: String get() = Tr.s(4638) + val gpui_f2_uber_p_smoke: String get() = Tr.s(4639) + val gpui_f2_uber_p_midnight: String get() = Tr.s(4640) + val gpui_f2_uber_p_cocoa: String get() = Tr.s(4641) + val gpui_f2_uber_p_sky: String get() = Tr.s(4642) + val gpui_f2_uber_p_lilac: String get() = Tr.s(4643) + val gpui_f2_uber_p_rose: String get() = Tr.s(4644) + val gpui_f2_uber_p_mint: String get() = Tr.s(4645) + val gpui_f2_uber_p_cherry: String get() = Tr.s(4646) + val gpui_simulation: String get() = Tr.s(4647) + val gpui_c_sheets_find: String get() = Tr.s(4648) + fun history_snap(turn: Any): String = Tr.f(4649, arrayOf(turn)) + val history_ref_snap: String get() = Tr.s(4650) + val thread_restore_action: String get() = Tr.s(4651) + val thread_restore_ask: String get() = Tr.s(4652) + val thread_restore_note: String get() = Tr.s(4653) + val thread_restore_go: String get() = Tr.s(4654) + val mouse_mouseandtrackpad0: String get() = Tr.s(4655) + val mouse_zoomdirection1: String get() = Tr.s(4656) + val mouse_appliestothewheelandatrackpads2: String get() = Tr.s(4657) + val mouse_normal3: String get() = Tr.s(4658) + val mouse_inverted4: String get() = Tr.s(4659) + val mouse_boardandschematic5: String get() = Tr.s(4660) + val mouse_k3dandstep6: String get() = Tr.s(4661) + val mouse_changedfromitspreseteachinputd7: String get() = Tr.s(4662) + val mouse_apresetsetseveryinputbeloweach8: String get() = Tr.s(4663) + val mouse_legacy10: String get() = Tr.s(4664) + val mouse_leftdrag11: String get() = Tr.s(4665) + val mouse_middledrag12: String get() = Tr.s(4666) + val mouse_rightdrag13: String get() = Tr.s(4667) + val mouse_shiftleftdrag14: String get() = Tr.s(4668) + val mouse_ctrlleftdrag15: String get() = Tr.s(4669) + val mouse_altleftdrag16: String get() = Tr.s(4670) + val mouse_wheel17: String get() = Tr.s(4671) + val mouse_shiftwheel18: String get() = Tr.s(4672) + val mouse_ctrlwheel19: String get() = Tr.s(4673) + val mouse_altwheel20: String get() = Tr.s(4674) + val mouse_nothing21: String get() = Tr.s(4675) + val mouse_pan22: String get() = Tr.s(4676) + val mouse_pansideways23: String get() = Tr.s(4677) + val mouse_panupanddown24: String get() = Tr.s(4678) + val mouse_zoom25: String get() = Tr.s(4679) + val mouse_rotate26: String get() = Tr.s(4680) + val mouse_roll27: String get() = Tr.s(4681) + val mouse_select28: String get() = Tr.s(4682) + val mouse_aclickwithoutmovingwithnokeyhe29: String get() = Tr.s(4683) + val mouse_leftbutton30: String get() = Tr.s(4684) + val mouse_middlebutton31: String get() = Tr.s(4685) + val mouse_rightbutton32: String get() = Tr.s(4686) + val mouse_twofingerscroll33: String get() = Tr.s(4687) + val mouse_atrackpadstwofingerswithctrlhe34: String get() = Tr.s(4688) + val mouse_pans35: String get() = Tr.s(4689) + val mouse_isthewheel36: String get() = Tr.s(4690) + val mouse_pinch37: String get() = Tr.s(4691) + val mouse_atrackpadpinch38: String get() = Tr.s(4692) + val mouse_zooms39: String get() = Tr.s(4693) + val mouse_chooseaninputforitabove41: String get() = Tr.s(4694) + val mouse_nothingissettopan42: String get() = Tr.s(4695) + val mouse_nothingissettozoom43: String get() = Tr.s(4696) + val mouse_nothingissettorotate44: String get() = Tr.s(4697) + val gpui_review_mark: String get() = Tr.s(4698) + val gpui_review_mark_tip: String get() = Tr.s(4699) + val gpui_review_why: String get() = Tr.s(4700) + val gpui_review_allow: String get() = Tr.s(4701) + val gpui_review_allow_tip: String get() = Tr.s(4702) + val gpui_review_off: String get() = Tr.s(4703) + val gpui_review_again: String get() = Tr.s(4704) + val gpui_review_again_tip: String get() = Tr.s(4705) + val gpui_rail_no_board: String get() = Tr.s(4706) + val gpui_rail_no_schematic: String get() = Tr.s(4707) + val gpui_rail_split_needs_both: String get() = Tr.s(4708) + val gpui_rail_no_mech: String get() = Tr.s(4709) + val gpui_panestate_next_board: String get() = Tr.s(4710) + val gpui_panestate_next_schematic: String get() = Tr.s(4711) + val gpui_panestate_next_solid: String get() = Tr.s(4712) + val gpui_panestate_empty_gerbers: String get() = Tr.s(4713) + val gpui_panestate_next_gerbers: String get() = Tr.s(4714) + val gpui_panestate_gerbers_noboard: String get() = Tr.s(4715) + val gpui_panestate_gerbers_noboard_next: String get() = Tr.s(4716) + val gpui_panestate_empty_mech: String get() = Tr.s(4717) + val gpui_panestate_next_mech: String get() = Tr.s(4718) + val gpui_panestate_loading_split: String get() = Tr.s(4719) + val gpui_panestate_retrying: String get() = Tr.s(4720) + val gpui_hub_view_notready: String get() = Tr.s(4721) + val gpui_hub_view_staleconn: String get() = Tr.s(4722) + val gpui_hub_view_unavailable: String get() = Tr.s(4723) + val settings_designmode_label: String get() = Tr.s(4724) + val settings_designmode_viewer: String get() = Tr.s(4725) + val settings_designmode_kicad: String get() = Tr.s(4726) + val settings_designmode_note: String get() = Tr.s(4727) + val review_empty_title: String get() = Tr.s(4728) + val review_empty_next: String get() = Tr.s(4729) + val viewer_diff_threadchanges: String get() = Tr.s(4730) + val viewer_layout_refusal_locked: String get() = Tr.s(4731) + val viewer_layout_refusal_toosmall: String get() = Tr.s(4732) + val viewer_layout_refusal_onekicad: String get() = Tr.s(4733) + val viewer_layout_refusal_incompatibleoverlay: String get() = Tr.s(4734) + val viewer_layout_refusal_notfound: String get() = Tr.s(4735) + val viewer_layout_refusal_nooverlay: String get() = Tr.s(4736) + val viewer_layout_refusal_invalidsource: String get() = Tr.s(4737) + val viewer_layout_refusal_sametile: String get() = Tr.s(4738) + val viewer_layout_refusal_invalidratio: String get() = Tr.s(4739) + val viewer_layout_refusal_duplicateid: String get() = Tr.s(4740) + val viewer_layout_refusal_unknownframe: String get() = Tr.s(4741) + val viewer_layout_refusal_invalidinput: String get() = Tr.s(4742) + val viewer_layout_refusal_toomany: String get() = Tr.s(4743) + val viewer_layout_refusal_toomanysources: String get() = Tr.s(4744) + val viewer_layout_refusal_unresolvedversion: String get() = Tr.s(4745) + val viewer_layout_refusal_nohistory: String get() = Tr.s(4746) + val viewer_layout_refusal_linked: String get() = Tr.s(4747) + val viewer_layout_refusal_notondevice: String get() = Tr.s(4748) + val viewer_layout_refusal_starting: String get() = Tr.s(4749) + val viewer_footprinteditor: String get() = Tr.s(4750) + val viewer_symboleditor: String get() = Tr.s(4751) + val web_clone_tab: String get() = Tr.s(4752) + val web_clone_repo_placeholder: String get() = Tr.s(4753) + val web_clone_private: String get() = Tr.s(4754) + val web_clone_signin: String get() = Tr.s(4755) + val web_clone_signin_wait: String get() = Tr.s(4756) + val web_clone_signin_enter: String get() = Tr.s(4757) + val web_clone_signin_done: String get() = Tr.s(4758) + val web_clone_copied: String get() = Tr.s(4759) + val web_clone_change_folder: String get() = Tr.s(4760) + val web_clone_folder_name: String get() = Tr.s(4761) + val web_clone_start_thread: String get() = Tr.s(4762) + fun web_clone_first(text: Any): String = Tr.f(4763, arrayOf(text)) + val web_clone_same: String get() = Tr.s(4764) + val web_clone_go: String get() = Tr.s(4765) + fun web_clone_cloning(repo: Any, dest: Any): String = Tr.f(4766, arrayOf(repo, dest)) + fun web_clone_cloned(repo: Any, dest: Any): String = Tr.f(4767, arrayOf(repo, dest)) + fun web_clone_stopped(repo: Any): String = Tr.f(4768, arrayOf(repo)) + val web_clone_retry: String get() = Tr.s(4769) + val web_clone_back: String get() = Tr.s(4770) + val web_clone_open_thread: String get() = Tr.s(4771) + val web_clone_open_project: String get() = Tr.s(4772) + fun web_clone_add_dir(dir: Any): String = Tr.f(4773, arrayOf(dir)) + fun web_clone_use_dir(dir: Any): String = Tr.f(4774, arrayOf(dir)) + val web_clone_up: String get() = Tr.s(4775) + val web_clone_loading: String get() = Tr.s(4776) + val web_clone_no_folders: String get() = Tr.s(4777) + fun gpui_c_kicad_opening(editor: Any, job: Any, secs: Any): String = Tr.f(4778, arrayOf(editor, job, secs)) + fun gpui_c_kicad_openingbare(editor: Any, secs: Any): String = Tr.f(4779, arrayOf(editor, secs)) + fun gpui_c_kicad_openfailed(editor: Any): String = Tr.f(4780, arrayOf(editor)) + val viewer_tile_rail_add: String get() = Tr.s(4781) + val viewer_tile_add: String get() = Tr.s(4782) + val viewer_tile_maximize: String get() = Tr.s(4783) + val viewer_tile_restore: String get() = Tr.s(4784) + val viewer_tile_focus: String get() = Tr.s(4785) + val viewer_tile_embedded: String get() = Tr.s(4786) + val viewer_tile_simulation_single: String get() = Tr.s(4787) + val viewer_tile_add_tip: String get() = Tr.s(4788) + val viewer_tile_left: String get() = Tr.s(4789) + val viewer_tile_right: String get() = Tr.s(4790) + val viewer_tile_top: String get() = Tr.s(4791) + val viewer_tile_bottom: String get() = Tr.s(4792) + val web_pair_subtitle: String get() = Tr.s(4793) + val web_pair_name: String get() = Tr.s(4794) + val web_pair_request: String get() = Tr.s(4795) + val web_pair_code: String get() = Tr.s(4796) + fun web_pair_approve_in(time: Any): String = Tr.f(4797, arrayOf(time)) + val web_pair_expired: String get() = Tr.s(4798) + val web_pair_approved: String get() = Tr.s(4799) + val web_pair_denied: String get() = Tr.s(4800) + val web_pair_cancelled: String get() = Tr.s(4801) + val web_pair_requesting: String get() = Tr.s(4802) + fun web_pair_failed(status: Any): String = Tr.f(4803, arrayOf(status)) + val web_pair_ratelimited: String get() = Tr.s(4804) + val web_pair_nocode: String get() = Tr.s(4805) + val web_pair_unreachable: String get() = Tr.s(4806) + val web_chat_loading: String get() = Tr.s(4807) + val web_chat_choose: String get() = Tr.s(4808) + val web_chat_empty: String get() = Tr.s(4809) + val web_chat_streaming: String get() = Tr.s(4810) + fun web_chat_finished(time: Any): String = Tr.f(4811, arrayOf(time)) + fun web_chat_finished_dur(time: Any, dur: Any): String = Tr.f(4812, arrayOf(time, dur)) + val web_chat_answer_placeholder: String get() = Tr.s(4813) + val web_chat_answer_btn: String get() = Tr.s(4814) + fun web_chat_answered(answer: Any): String = Tr.f(4815, arrayOf(answer)) + val web_chat_review_mode: String get() = Tr.s(4816) + val web_composer_attach: String get() = Tr.s(4817) + val web_composer_voice: String get() = Tr.s(4818) + fun web_composer_unsupported(type: Any): String = Tr.f(4819, arrayOf(type)) + fun web_composer_maximages(max: Any): String = Tr.f(4820, arrayOf(max)) + val web_logout_failed: String get() = Tr.s(4821) + val thread_context_title: String get() = Tr.s(4822) + val thread_context_instructions: String get() = Tr.s(4823) + val thread_context_system: String get() = Tr.s(4824) + val thread_context_skills: String get() = Tr.s(4825) + val thread_context_mcp: String get() = Tr.s(4826) + val thread_context_mcp_short: String get() = Tr.s(4827) + val thread_context_reading: String get() = Tr.s(4828) + val thread_context_none_instructions: String get() = Tr.s(4829) + val thread_context_none_mcp: String get() = Tr.s(4830) + val thread_context_native_note: String get() = Tr.s(4831) + val thread_context_copy: String get() = Tr.s(4832) + val thread_context_copied: String get() = Tr.s(4833) + val thread_context_base: String get() = Tr.s(4834) + val thread_context_injected_label: String get() = Tr.s(4835) + val thread_context_index: String get() = Tr.s(4836) + val thread_context_scope_user: String get() = Tr.s(4837) + val thread_context_scope_bundled: String get() = Tr.s(4838) + val thread_context_native: String get() = Tr.s(4839) + val thread_context_injected: String get() = Tr.s(4840) + val thread_context_cross: String get() = Tr.s(4841) + val thread_context_explicit: String get() = Tr.s(4842) + val thread_context_untrusted: String get() = Tr.s(4843) + val thread_context_invalid: String get() = Tr.s(4844) + val thread_context_trust: String get() = Tr.s(4845) + val thread_context_enable: String get() = Tr.s(4846) + val thread_context_disable: String get() = Tr.s(4847) + fun thread_context_size(bytes: Any, tokens: Any): String = Tr.f(4848, arrayOf(bytes, tokens)) + val thread_context_unreachable: String get() = Tr.s(4849) + val gpui_planmode_top_once: String get() = Tr.s(4850) + val gpui_planmode_top_planning: String get() = Tr.s(4851) + val gpui_planmode_top_pending: String get() = Tr.s(4852) + val gpui_planmode_top_executing: String get() = Tr.s(4853) + val gpui_planmode_tip: String get() = Tr.s(4854) + val gpui_planmode_chip_building: String get() = Tr.s(4855) + val gpui_planmode_chip_once: String get() = Tr.s(4856) + val gpui_planmode_bar_once: String get() = Tr.s(4857) + val gpui_planmode_bar_always: String get() = Tr.s(4858) + val gpui_planmode_bar_planning: String get() = Tr.s(4859) + val gpui_planmode_bar_pending: String get() = Tr.s(4860) + val gpui_planmode_bar_executing: String get() = Tr.s(4861) + val gpui_planmode_scope_once: String get() = Tr.s(4862) + val gpui_planmode_scope_always: String get() = Tr.s(4863) + val gpui_ask_plan_ready: String get() = Tr.s(4864) + val gpui_ask_plan_revise: String get() = Tr.s(4865) + val gpui_ask_plan_sendrev: String get() = Tr.s(4866) + val gpui_ask_plan_reviseph: String get() = Tr.s(4867) + val gpui_mgmt_plan_st_blocked: String get() = Tr.s(4868) + val gpui_mgmt_plan_st_routing: String get() = Tr.s(4869) + val gpui_mgmt_plan_st_awaiting: String get() = Tr.s(4870) + val gpui_mgmt_plan_st_verified: String get() = Tr.s(4871) + val gpui_mgmt_plan_st_routed: String get() = Tr.s(4872) + val gpui_mgmt_plan_st_approved: String get() = Tr.s(4873) + val gpui_mgmt_plan_st_partial: String get() = Tr.s(4874) + val gpui_mgmt_plan_st_rejected: String get() = Tr.s(4875) + val gpui_mgmt_plan_st_empty: String get() = Tr.s(4876) + val gpui_mgmt_plan_refused: String get() = Tr.s(4877) + val gpui_mgmt_plan_emptysub: String get() = Tr.s(4878) + val gpui_mgmt_plan_verify: String get() = Tr.s(4879) + val gpui_mgmt_plan_reqplain: String get() = Tr.s(4880) + fun gpui_mgmt_plan_requested(what: Any): String = Tr.f(4881, arrayOf(what)) + val gpui_mgmt_plan_stackup: String get() = Tr.s(4882) + val gpui_keys_planmode: String get() = Tr.s(4883) + val gpui_keys_mgmt_plan: String get() = Tr.s(4884) + fun web_plan_awaiting(n: Any): String = Tr.f(4885, arrayOf(n)) + val web_plan_net_one: String get() = Tr.s(4886) + fun web_plan_nets(n: Any): String = Tr.f(4887, arrayOf(n)) + val gpui_mgmt_plan_view_canvas: String get() = Tr.s(4888) + val gpui_mgmt_plan_view_split: String get() = Tr.s(4889) + val gpui_mgmt_plan_view_list: String get() = Tr.s(4890) + val gpui_mgmt_plan_grid_all: String get() = Tr.s(4891) + val gpui_mgmt_plan_grid_pair: String get() = Tr.s(4892) + val gpui_mgmt_plan_grid_single: String get() = Tr.s(4893) + val gpui_mgmt_plan_expand: String get() = Tr.s(4894) + val gpui_mgmt_plan_compact: String get() = Tr.s(4895) + val gpui_mgmt_plan_sync: String get() = Tr.s(4896) + val gpui_mgmt_plan_fit: String get() = Tr.s(4897) + val gpui_mgmt_plan_lock: String get() = Tr.s(4898) + val gpui_mgmt_plan_unlock: String get() = Tr.s(4899) + val gpui_mgmt_plan_layer_move: String get() = Tr.s(4900) + val gpui_mgmt_plan_width: String get() = Tr.s(4901) + val gpui_mgmt_plan_addnote: String get() = Tr.s(4902) + val gpui_mgmt_plan_note_placeholder: String get() = Tr.s(4903) + val gpui_mgmt_plan_hint: String get() = Tr.s(4904) + val gpui_mgmt_plan_rejectlayer: String get() = Tr.s(4905) + val gpui_mgmt_plan_edited: String get() = Tr.s(4906) + val gpui_mgmt_plan_locked: String get() = Tr.s(4907) + val gpui_mgmt_plan_noitems: String get() = Tr.s(4908) + val gpui_mgmt_plan_stackup_short: String get() = Tr.s(4909) + val gpui_mgmt_plan_layer_short: String get() = Tr.s(4910) + fun gpui_mgmt_plan_awaiting_short(n: Any): String = Tr.f(4911, arrayOf(n)) + fun gpui_mgmt_plan_done_of(done: Any, total: Any): String = Tr.f(4912, arrayOf(done, total)) + val gpui_planmode_chip_review: String get() = Tr.s(4913) + val mobile_plan_steer: String get() = Tr.s(4914) + val mobile_plan_details: String get() = Tr.s(4915) + val mobile_plan_reset: String get() = Tr.s(4916) + val mobile_plan_removepoint: String get() = Tr.s(4917) + val mobile_plan_touchhint: String get() = Tr.s(4918) + val mobile_plan_copied: String get() = Tr.s(4919) + fun mobile_plan_widthmm(v: Any): String = Tr.f(4920, arrayOf(v)) + fun mobile_plan_coord(x: Any, y: Any): String = Tr.f(4921, arrayOf(x, y)) + val provider_notice_head: String get() = Tr.s(4922) + val provider_notice_text_none: String get() = Tr.s(4923) + val provider_notice_text_signedout: String get() = Tr.s(4924) + val provider_notice_button: String get() = Tr.s(4925) + val provider_notice_senderr: String get() = Tr.s(4926) + fun provider_notice_senderr_remote(machine: Any): String = Tr.f(4927, arrayOf(machine)) + val web_settings_providers: String get() = Tr.s(4928) + val web_settings_providers_browser: String get() = Tr.s(4929) } diff --git a/mobile/ios/Shared/TrCatalog.swift b/mobile/ios/Shared/TrCatalog.swift index 20c76ca528..296c6058a0 100644 --- a/mobile/ios/Shared/TrCatalog.swift +++ b/mobile/ios/Shared/TrCatalog.swift @@ -2626,6 +2626,9 @@ gpui.c.kicad.exit.full.screen Exit full screen 全画面を終了 Salir de panta gpui.c.kicad.the.editor.takes.the.whole The editor takes the whole window; only this row stays エディタがウィンドウ全体を使います。この行だけが残ります El editor ocupa toda la ventana; solo queda esta fila gpui.c.kicad.closing KiCad is closing. The editor opens again once it has closed. KiCad を閉じています。閉じ終わるとエディタがもう一度開きます。 KiCad se está cerrando. El editor vuelve a abrirse cuando termine de cerrarse. gpui.c.kicad.closing.ask KiCad is waiting for an answer before it closes: "{title}". Its window may be behind another one. KiCad は閉じる前に応答を待っています:「{title}」。そのウィンドウが別のウィンドウの後ろにあるかもしれません。 KiCad espera una respuesta antes de cerrarse: «{title}». Su ventana puede estar detrás de otra. +gpui.c.solid.load.big Load it anyway それでも読み込む Cargarlo de todos modos +gpui.c.solid.loading.big Loading it anyway… それでも読み込み中… Cargándolo de todos modos… +gpui.c.solid.big.next Loading it may take a while and a lot of memory. 読み込みには時間と多くのメモリがかかることがあります。 Cargarlo puede tardar y usar mucha memoria. gpui.assets.missing Assets missing in {dir}: {files} {dir} にアセットがありません: {files} Faltan recursos en {dir}: {files} gpui.connecting Connecting… 接続中… Conectando… gpui.connected Connected 接続済み Conectado @@ -2760,6 +2763,9 @@ gpui.no.models No models モデルがありません Sin modelos gpui.picker.more {n} more: search to find them ほか{n}件: 検索して探してください {n} más: busca para encontrarlos gpui.picker.speed Speed 速度 Velocidad gpui.picker.speed.normal.only {model} runs at Normal speed only {model}は標準の速度でのみ動きます {model} solo funciona a velocidad Normal +gpui.picker.favorites Favorites お気に入り Favoritos +gpui.picker.favorite.add Add to favorites お気に入りに追加 Añadir a favoritos +gpui.picker.favorite.remove Remove from favorites お気に入りから外す Quitar de favoritos gpui.speed.normal Normal 標準 Normal gpui.speed.fast Fast 高速 Rápido gpui.speed.ultrafast UltraFast 超高速 Ultrarrápido diff --git a/native/gpui/src/main.rs b/native/gpui/src/main.rs index b85e6fd477..9e6e254686 100644 --- a/native/gpui/src/main.rs +++ b/native/gpui/src/main.rs @@ -166,7 +166,7 @@ impl Backplane { Event::Picture(r,timing)=>{ let t_apply=Instant::now();self.ui_epoch+=1; if let Some(w)=self.wake_at.take(){self.reconnected=true;self.m("net",serde_json::json!({"event":"reconnected","ms":(w.elapsed().as_secs_f64()*1e6).round()/1e3}));} - let mut r=r;let prev=self.data["thread"].take();self.data=r["shown"].take();mousecfg::apply(&self.data["mouse"]);crate::viewers::kicad_pane::test_hold_key(&mut self.data);self.picture_applied(cx);self.kicad_warm();screens::histbar::picture(self); + let mut r=r;let prev=self.data["thread"].take();self.data=r["shown"].take();mousecfg::apply(&self.data["mouse"]);crate::viewers::kicad_pane::test_hold_key(&mut self.data);screens::picker::reconcile_fav_pending(&self.data["thread"],&mut self.screens.pick.fav_pending);self.picker_migrate_local_favs();self.picture_applied(cx);self.kicad_warm();screens::histbar::picture(self); self.timeline_picture(prev,&r["window"]); if self.data["deleting"].is_object(){eprintln!("GPUI_LOG {{\"deleting\":{}}}",self.data["deleting"]["id"]);}let selected=string(&self.data["thread"],"id"); screens::accounts::thread_changed(self,&selected);if !selected.is_empty() {let selected=screens::attach::raw_id(&selected).to_string();self.picture_arrived(&selected,cx);self.selected=selected;} @@ -230,6 +230,8 @@ impl Backplane { Event::Rpc("project-push",ok,why)=>{ if !ok { self.error=why; } let pid=self.screens.projects.home.pid.clone(); if !pid.is_empty() { screens::projects::ask_home(self,&pid); } cx.notify(); }, Event::Rpc("hubchk",_,_)=>{cx.spawn(async move|this,cx|{for secs in [3,17] {cx.background_executor().timer(Duration::from_secs(secs)).await;if this.update(cx,|this,cx|this.ask_hub_update(cx)).is_err(){break}}}).detach();}, Event::Rpc("mgmt",ok,why)=>{self.screens.mgmt.error=if ok{String::new()}else{why};cx.notify();}, + Event::Rpc("models-fav",ok,why)=>self.picker_fav_replied(ok,&why,cx), + Event::Rpc("models-fav-migrate",ok,why)=>self.picker_fav_migrate_replied(ok,&why,cx), Event::Rpc(tag,ok,why)=>if tag=="term"{if !ok{self.error=format!("Terminal: {why}");}}else if tag=="google"{screens::google::done(self,ok,&why)}else if tag.starts_with("acct"){screens::accounts::done(self,tag,ok,&why,cx)}else if tag=="fileopen" {if !ok {self.error=why;}} else if tag=="plan" {screens::mgmt_plan::answered(self,ok,&why,cx)} else if tag.starts_with("files") {screens::filesui::rpc_done(self,tag,ok,&why,cx)} else {screens::settings::rpc_done(self,tag,ok,&why,cx)}, Event::PlotTooBig(n)=>self.screens.plot.too_big(n), Event::Refs(r)=>{ if r.get("resolved").is_some() { screens::histbar::resolved(self,&r,cx); } else { self.screens.plots[0].hist.refs=screens::plot::refs_of(&r); } cx.notify(); } diff --git a/native/gpui/src/screens/picker.rs b/native/gpui/src/screens/picker.rs index 9999724ff6..e6d62696a0 100644 --- a/native/gpui/src/screens/picker.rs +++ b/native/gpui/src/screens/picker.rs @@ -201,19 +201,160 @@ pub fn cap(col: usize, here: usize, n: usize) -> &'static str { /// What the menu keeps between frames: the search box, the scroll of the model list, the cursor once a key moved it (with its thread: a cursor moved on another thread is not this one's); /// where the chip and its row were last drawn (the menu floats from them, and a press on the chip is not a press outside the menu) and the height the open menu holds (screens/combo.rs `hold`). +#[derive(Clone, Debug, PartialEq)] +pub struct PendingFav { pub want: bool, pub seq: u64, pub acked: bool, pub acked_pictures: u8 } + #[derive(Default)] pub struct Pick { pub search: Option>, pub q: String, pub scroll: ScrollHandle, pub ascroll: ScrollHandle, pub cur: Option<(String, Cursor)>, pub row: std::rc::Rc>>, pub chip: std::rc::Rc>>, pub held: std::rc::Rc>, /// the speed dial: where its knob was drawn, the scroll not yet a detent, and whether the press now down has dragged it (then its click is not a click) pub dial: std::rc::Rc>>, pub wheel: std::rc::Rc>, pub dragged: std::rc::Rc>, /// the knob is held down (its own record: not every platform's pointer says which button a move carries) - pub held_dial: std::rc::Rc> } + pub held_dial: std::rc::Rc>, + /// optimistic pending favorite toggles (`"provider/model" -> PendingFav`) awaiting hub confirmation + pub fav_pending: std::collections::BTreeMap, + pub fav_seq: u64, + pub fav_inflight: std::collections::VecDeque<(String, u64)>, + pub fav_migrate_keys: Vec<(String, u64)>, + pub fav_migrated: bool } /// The provider in force (the marked choice of the provider section), "" when the hub lists none. pub fn provider_of(sections: &[Section]) -> String { sections.iter().find(|s| s.action == "provider").and_then(|s| s.choices.iter().find(|c| c.on)).map(|c| c.value.clone()).unwrap_or_default() } -pub fn fav_key(provider: &str, value: &str) -> String { format!("{provider}/{value}") } +pub fn norm_fav_pair_opt(provider: &str, model: &str) -> Option<(String, String)> { + if provider.chars().any(char::is_control) || model.chars().any(char::is_control) { + return None; + } + let p = bare(provider.trim()).trim().to_ascii_lowercase(); + let m = model.trim(); + if p.is_empty() || m.is_empty() || p.contains('/') || p.chars().any(char::is_whitespace) { + return None; + } + if p.len() + 1 + m.len() > 200 { + return None; + } + Some((p, m.to_string())) +} +pub fn norm_fav_key(provider: &str, model: &str) -> String { + format!("{}/{}", bare(provider.trim()).trim().to_ascii_lowercase(), model.trim()) +} +pub fn norm_fav_str(key: &str) -> String { + match key.split_once('/') { Some((p, m)) => norm_fav_key(p, m), None => key.trim().to_string() } +} +pub fn fav_key(provider: &str, value: &str) -> String { norm_fav_key(provider, value) } + +/// Legacy GPUI `local.favs` entries ready to migrate once when hub `picker.favorites` arrives empty. +pub fn legacy_favs_to_migrate(thread: &Value, local_favs: &[String], migrated: bool) -> Option> { + if migrated || local_favs.is_empty() { + return None; + } + let arr = thread["picker"]["favorites"].as_array()?; + if !arr.is_empty() { + return None; + } + let mut out: Vec = Vec::new(); + let mut seen = std::collections::HashSet::new(); + for raw in local_favs { + let Some((p, m)) = raw.split_once('/').and_then(|(p, m)| norm_fav_pair_opt(p, m)) else { continue }; + let k = format!("{p}/{m}"); + if seen.insert(k.clone()) { + out.push(k); + let encoded_len = serde_json::to_string(&out).map_or(usize::MAX, |s| s.len()); + if encoded_len > 4096 { + out.pop(); + break; + } + if out.len() >= 64 { + break; + } + } + } + (!out.is_empty()).then_some(out) +} + +/// Effective favorite model keys (`"provider/model"`), preferring hub's `thread.picker.favorites` over local fallback, with optimistic `pending` applied. +pub fn favorites_of(thread: &Value, local_fallback: &[String], pending: &std::collections::BTreeMap) -> Vec { + let mut out: Vec = Vec::new(); + fn push_unique(out: &mut Vec, k: String) { + if !k.is_empty() && k.contains('/') && !out.iter().any(|x| x == &k) { out.push(k); } + } + if let Some(arr) = thread["picker"]["favorites"].as_array() { + for v in arr { if let Some(s) = v.as_str() { push_unique(&mut out, norm_fav_str(s)); } } + } else { + for s in local_fallback { push_unique(&mut out, norm_fav_str(s)); } + } + for (k, p) in pending { + let nk = norm_fav_str(k); + if p.want { push_unique(&mut out, nk); } else { out.retain(|x| x != &nk); } + } + out +} + +/// Drop pending optimistic favorite toggles once the hub's `thread.picker.favorites` matches them or after acked pictures settle. +pub fn reconcile_fav_pending(thread: &Value, pending: &mut std::collections::BTreeMap) { + if let Some(arr) = thread["picker"]["favorites"].as_array() { + let hub: Vec = arr.iter().filter_map(Value::as_str).map(norm_fav_str).collect(); + pending.retain(|k, p| { + let nk = norm_fav_str(k); + if hub.iter().any(|x| x == &nk) == p.want { + return false; + } + if p.acked { + p.acked_pictures = p.acked_pictures.saturating_add(1); + if p.acked_pictures >= 2 { + return false; + } + } + true + }); + } else { + pending.retain(|_, p| !p.acked); + } +} + +#[derive(Clone, Debug, PartialEq)] +pub struct FavoriteItem { pub key: String, pub provider: String, pub model: String, pub label: String, pub note: String, pub on: bool, pub ok: bool, pub why: String } + +/// Resolve persisted favorite keys against `thread["picker"]` and `thread["pickerAgents"]`, filtered by search query `q`. +pub fn favorite_items(thread: &Value, favs: &[String], q: &str) -> Vec { + let mine = parse(&thread["picker"]); + let own = Cursor::own(&mine); + let own_prov = bare(&own.provider).to_ascii_lowercase(); + let words: Vec = q.trim().to_lowercase().split_whitespace().map(str::to_string).collect(); + let agents = &thread["pickerAgents"]; + let mut out = Vec::new(); + for raw in favs { + let nk = norm_fav_str(raw); + let Some((p, m)) = nk.split_once('/') else { continue }; + let (p, m) = (p.to_string(), m.to_string()); + if p.is_empty() || m.is_empty() { continue } + let (mut ok, mut why) = if let Some(a) = agents.get(&p).filter(|a| a.is_object()) { + (a["ok"].as_bool().unwrap_or(true), string(a, "why")) + } else { + let row = mine.iter().find(|s| s.action == "provider").and_then(|s| s.choices.iter().find(|c| bare(&c.value) == p)); + row.map_or((true, String::new()), |c| (c.ok, if c.ok { String::new() } else { c.note.clone() })) + }; + let in_own = p == own_prov; + let listed: Vec = if in_own { + mine.iter().find(|s| s.action == "model").map(|s| s.choices.clone()).unwrap_or_default() + } else { + choices(&agents[&p]["models"]) + }; + let has_catalog = listed.iter().any(|c| !c.value.is_empty()); + let choice = listed.into_iter().find(|c| c.value == m); + if ok && has_catalog && choice.is_none() { + ok = false; + /* i18n-ok: fallback reason for missing model */ why = "not available on this machine".into(); + } + let label = choice.as_ref().map(|c| c.label.clone()).filter(|s| !s.is_empty()).unwrap_or_else(|| m.clone()); + let note = choice.as_ref().map(|c| c.note.clone()).unwrap_or_default(); + /* i18n-ok: search haystack */ let hay = format!("{p} {m} {label} {note}").to_lowercase(); + if !words.iter().all(|w| hay.contains(w.as_str())) { continue } + out.push(FavoriteItem { key: nk, on: in_own && own.model == m, provider: p, model: m, label, note, ok, why }); + } + out +} /// How the menu lays out in the room it has: three columns when wide, the agents narrow beside the model list over the effort when less, one column at a time /// (agent, then model, then effort, a back control in each head) when narrower still. Everything scales with the person's text size, and nothing is taller @@ -248,7 +389,7 @@ pub fn arrange(sections: &[Section], provider: &str, q: &str, favs: &[String], k let out = sections.iter().map(|s| { if s.action != "model" { return s.clone() } let mut ch: Vec = s.choices.iter().filter(|c| { let hay = format!("{} {}", c.value, c.note).to_lowercase(); words.iter().all(|w| hay.contains(w.as_str())) }).cloned().collect(); - ch.sort_by_key(|c| !favs.iter().any(|f| *f == fav_key(provider, &c.value))); // stable: the rest keep the hub's order + ch.sort_by_key(|c| { let key = fav_key(provider, &c.value); !favs.iter().any(|f| norm_fav_str(f) == key) }); // stable: the rest keep the hub's order if ch.len() > CAP { hidden = ch.len() - CAP; let kept = ch.iter().skip(CAP).find(|c| c.value == keep).cloned(); ch.truncate(CAP); ch.extend(kept); } Section { choices: ch, ..s.clone() } }).collect(); @@ -294,13 +435,46 @@ pub fn view(cx: &mut Context, light: bool, thread: &Value, open: bool if !open { return None; } let c = |n: &str| theme::color(light, n); let z = |v: f32| px(v * f.s); - let Shown { cur, own, rows, hidden, .. } = shown(thread, pick, favs)?; + let eff_favs = favorites_of(thread, favs, &pick.fav_pending); + let fav_items = favorite_items(thread, &eff_favs, &pick.q); + let Shown { cur, own, rows, hidden, .. } = shown(thread, pick, &eff_favs)?; let provider = cur.provider.clone(); let drill = f.mode == Mode::Drill; // a column's head: its title (cut short, never over its keys), its keys; in a one-column menu a back control to the column before let plan_row = plan_once_row(cx, light, thread); // built before `head` borrows cx let nc = ncols(&rows, &cur.model); let speed_body = speed_dial(cx, light, &rows, &cur, &own, pick, f); // so is the dial + let fav_strip = (!fav_items.is_empty()).then(|| { + let mut chips = div().id("picker-fav-chips").max_h(px(110. * f.s)).overflow_y_scroll().px_3().pb_2().flex().flex_wrap().gap(z(6.)); + for (fi, item) in fav_items.iter().enumerate() { + let (fp, fm, ok) = (item.provider.clone(), item.model.clone(), item.ok); + let (fp2, fm2) = (fp.clone(), fm.clone()); + let mut tip_lines = vec![format!("{} · {}", item.provider, crate::i18n::trs(&item.label))]; + if !item.note.is_empty() { tip_lines.push(crate::i18n::trs(&item.note)); } + if !item.ok && !item.why.is_empty() { tip_lines.push(crate::i18n::trs(&item.why)); } + let main_btn = div().id(SharedString::from(format!("pick-fav-{fi}"))).flex().items_center().gap_2().px_2().py(px(3. * f.s)) + .when(ok, |d| d.cursor_pointer()).when(!ok, |d| d.opacity(0.55)) + .when(item.on, |d| d.child(div().text_color(c("accent")).child("✓"))) + .child(logo(&item.provider)) + .child(div().max_w(px(190. * f.s)).overflow_hidden().whitespace_nowrap().text_ellipsis().text_color(if item.on { c("accent") } else { c("text") }).child(crate::i18n::trs(&item.label))) + .tooltip(tip_of(tip_lines.join("\n"), light)) + .when(ok, |d| d.on_click(cx.listener(move |this, _, _, cx| this.picker_pick_favorite(&fp, &fm, cx)))); + let star_btn = div().id(SharedString::from(format!("pick-fav-star-{fi}"))).px(px(6. * f.s)).py(px(3. * f.s)).cursor_pointer() + .border_l_1().border_color(if item.on { c("accent") } else { c("line") }) + .text_color(c("accent")).hover(|s| s.bg(c("raise"))) + .tooltip(tip_of(crate::i18n::trs("Remove from favorites"), light)) + .child("★") + .on_click(cx.listener(move |this, _, _, cx| { cx.stop_propagation(); this.picker_toggle_fav(&fp2, &fm2, cx); })); + chips = chips.child(div().flex().items_center().border_1().border_color(if item.on { c("accent") } else { c("line") }) + .bg(if item.on { c("raise") } else { c("panel") }).hover(|st| st.bg(c("raise"))) + .child(main_btn).child(star_btn)); + } + div().id("picker-favorites").w_full().min_w_0().flex().flex_col().border_b_1().border_color(c("line")) + .child(div().px_3().pt_2().pb_1().flex().items_center().gap_1().text_size(z(11.)) + .child(div().text_color(c("accent")).child("★")) + /* i18n-ok: section title, drawn through trs */ .child(div().text_color(c("faint")).child(crate::i18n::trs("Favorites").to_uppercase()))) + .child(chips) + }); let head = |col: usize, title: &str| { let back = (drill && col > 0).then(|| div().id(SharedString::from(format!("pick-back-{col}"))).flex_shrink_0().pr_2().cursor_pointer().text_color(c("dim")).child("‹") .on_click(cx.listener(move |this, _, _, cx| this.picker_go(col - 1, cx)))); @@ -335,7 +509,7 @@ pub fn view(cx: &mut Context, light: bool, thread: &Value, open: bool for (ci, ch) in models.iter().enumerate() { let value = ch.value.clone(); let fav = fav_key(&provider, &ch.value); - let starred = favs.iter().any(|f| *f == fav); + let starred = eff_favs.iter().any(|f| *f == fav); let here = ch.value == cur.model; let full = if ch.note.is_empty() { crate::i18n::trs(&ch.label) } else { format!("{}\n{}", crate::i18n::trs(&ch.label), crate::i18n::trs(&ch.note)) }; let mut row = div().flex().items_center().hover(|st| st.bg(c("raise"))).when(here, |d| d.bg(c("raise"))) @@ -347,10 +521,13 @@ pub fn view(cx: &mut Context, light: bool, thread: &Value, open: bool .tooltip(tip_of(full, light)) .on_click(cx.listener(move |this, _, _, cx| { this.picker_press(1, &value, cx); if drill { this.picker_go(2, cx) } }))); if !ch.value.is_empty() { - let f2 = fav.clone(); - row = row.child(div().id(SharedString::from(format!("fav-{ci}"))).flex_shrink_0().px_2().py_1().cursor_pointer().text_color(if starred { c("accent") } else { c("faint") }) + let (fp, fm) = (provider.clone(), ch.value.clone()); + /* i18n-ok: star tip drawn through trs */ let tip = crate::i18n::trs(if starred { "Remove from favorites" } else { "Add to favorites" }); + row = row.child(div().id(SharedString::from(format!("fav-{ci}"))).flex_shrink_0().px_2().py_1().cursor_pointer() + .text_color(if starred { c("accent") } else { c("faint") }).when(!starred, |d| d.hover(|s| s.text_color(c("text")))) + .tooltip(tip_of(tip, light)) .child(if starred { "★" } else { "☆" }) - .on_click(cx.listener(move |this, _, _, cx| { this.local_press("fav", &f2, cx); }))); + .on_click(cx.listener(move |this, _, _, cx| { cx.stop_propagation(); this.picker_toggle_fav(&fp, &fm, cx); }))); } list = list.child(row); } @@ -390,7 +567,7 @@ pub fn view(cx: &mut Context, light: bool, thread: &Value, open: bool // as tall as the agent column in every mode (one column at a time too): stepping from column to column or a shorter list leaves the menu's height as it is; // "Plan first, this turn only" under the columns, in every mode let body = body.id("picker").w_full().min_w_0().min_h(px(agents_h)).text_size(z(12.)); - Some(div().w_full().min_w_0().flex().flex_col().child(body).children(plan_row.map(|r| div().pt_2().border_t_1().border_color(c("line")).child(r)).into_iter()).into_any_element()) + Some(div().w_full().min_w_0().flex().flex_col().children(fav_strip).child(body).children(plan_row.map(|r| div().pt_2().border_t_1().border_color(c("line")).child(r)).into_iter()).into_any_element()) } /// The speed dial under the effort meter: the knob, and beside it each detent's name and cost (a press picks it); the one in force lit. With Normal only @@ -534,7 +711,95 @@ impl Backplane { } /// The speed the cursor is on now (the dial's handlers read it as it is, not as it was drawn). fn picker_cur_speed(&self) -> String { self.picker_shown().map(|s| s.cur.speed).unwrap_or_default() } - fn picker_shown(&self) -> Option { shown(&self.data["thread"], &self.screens.pick, &self.local.favs) } + pub(crate) fn picker_favs(&self) -> Vec { favorites_of(&self.data["thread"], &self.local.favs, &self.screens.pick.fav_pending) } + fn picker_shown(&self) -> Option { let favs = self.picker_favs(); shown(&self.data["thread"], &self.screens.pick, &favs) } + pub(crate) fn picker_toggle_fav(&mut self, provider: &str, model: &str, cx: &mut Context) { + let Some((b, m)) = norm_fav_pair_opt(provider, model) else { return }; + let key = format!("{b}/{m}"); + let next = !self.picker_favs().iter().any(|f| f == &key); + self.screens.pick.fav_seq = self.screens.pick.fav_seq.saturating_add(1); + let seq = self.screens.pick.fav_seq; + self.screens.pick.fav_pending.insert(key.clone(), PendingFav { want: next, seq, acked: false, acked_pictures: 0 }); + self.screens.pick.fav_inflight.push_back((key, seq)); + let _ = self.tx.try_send(Command::Rpc("models.favorite".into(), super::settings::Secret(serde_json::json!({"provider": b, "model": m, "on": next})), "models-fav")); + cx.notify(); + } + pub(crate) fn picker_pick_favorite(&mut self, provider: &str, model: &str, cx: &mut Context) { + let Some(s) = self.picker_shown() else { return }; + let b = bare(provider); + let p = format!("@{b}"); + let all = for_provider(&self.data["thread"]["picker"], &self.data["thread"]["pickerAgents"], &p); + if !agent_ok(&all, &p) { return } + let mut c = s.cur.clone(); + c.provider = p; + c.model = model.to_string(); + c.col = 1; + self.picker_apply(c.clone(), &all, &s.own); + self.picker_store(c); + cx.notify(); + } + pub(crate) fn picker_fav_replied(&mut self, ok: bool, why: &str, cx: &mut Context) { + let entry = self.screens.pick.fav_inflight.pop_front(); + if !ok { + if let Some((key, seq)) = entry { + if self.screens.pick.fav_pending.get(&key).is_some_and(|p| p.seq == seq) { + self.screens.pick.fav_pending.remove(&key); + } + } else { + self.screens.pick.fav_pending.clear(); + } + if !why.is_empty() { self.error = why.to_string(); } + } else if let Some((key, seq)) = entry { + if self.data["thread"]["picker"]["favorites"].is_array() { + if let Some(p) = self.screens.pick.fav_pending.get_mut(&key).filter(|p| p.seq == seq) { + p.acked = true; + } + } else if self.screens.pick.fav_pending.get(&key).is_some_and(|p| p.seq == seq) { + self.screens.pick.fav_pending.remove(&key); + } + } + cx.notify(); + } + pub(crate) fn picker_migrate_local_favs(&mut self) { + if self.screens.pick.fav_migrated || self.local.favs.is_empty() { return } + let Some(arr) = self.data["thread"]["picker"]["favorites"].as_array() else { return }; + self.screens.pick.fav_migrated = true; + if !arr.is_empty() { return } + let Some(keys) = legacy_favs_to_migrate(&self.data["thread"], &self.local.favs, false) else { return }; + let Ok(val) = serde_json::to_string(&keys) else { return }; + self.screens.pick.fav_migrate_keys.clear(); + for k in keys { + self.screens.pick.fav_seq = self.screens.pick.fav_seq.saturating_add(1); + let seq = self.screens.pick.fav_seq; + self.screens.pick.fav_pending.insert(k.clone(), PendingFav { want: true, seq, acked: false, acked_pictures: 0 }); + self.screens.pick.fav_migrate_keys.push((k, seq)); + } + let _ = self.tx.try_send(Command::Rpc("setting.set".into(), super::settings::Secret(serde_json::json!({"key": "models.favorites", "value": val})), "models-fav-migrate")); + } + pub(crate) fn picker_fav_migrate_replied(&mut self, ok: bool, _why: &str, cx: &mut Context) { + let keys = std::mem::take(&mut self.screens.pick.fav_migrate_keys); + if ok { + self.local.favs.clear(); + self.local.save(); + let has_arr = self.data["thread"]["picker"]["favorites"].is_array(); + for (k, seq) in keys { + if has_arr { + if let Some(p) = self.screens.pick.fav_pending.get_mut(&k).filter(|p| p.seq == seq) { + p.acked = true; + } + } else if self.screens.pick.fav_pending.get(&k).is_some_and(|p| p.seq == seq) { + self.screens.pick.fav_pending.remove(&k); + } + } + } else { + for (k, seq) in keys { + if self.screens.pick.fav_pending.get(&k).is_some_and(|p| p.seq == seq) { + self.screens.pick.fav_pending.remove(&k); + } + } + } + cx.notify(); + } fn picker_store(&mut self, c: Cursor) { self.screens.pick.cur = Some((string(&self.data["thread"], "id"), c)); self.picker_reveal(); } /// Scroll the cursor's model into view. fn picker_reveal(&mut self) { @@ -784,4 +1049,60 @@ mod tests { let valid = Cursor { model: "gpt".into(), ..stale }; assert_eq!(model_applied(&valid, &codex_rows), "gpt"); } + #[test] fn favorites_merge_reconcile_resolve_across_providers_and_filter() { + assert_eq!(norm_fav_key("@Claude", "opus"), "claude/opus"); + assert_eq!(norm_fav_str(" @Codex/gpt "), "codex/gpt"); + assert_eq!(norm_fav_pair_opt("@Claude", "opus"), Some(("claude".into(), "opus".into()))); + assert_eq!(norm_fav_pair_opt("cl aude", "opus"), None); + assert_eq!(norm_fav_pair_opt("claude", "opus\n"), None); + + let (mut p, a) = fixture(); + p["favorites"] = serde_json::json!(["claude/sonnet", "codex/gpt"]); + let thread = serde_json::json!({"id":"t1","picker":p,"pickerAgents":a}); + let mut pending = std::collections::BTreeMap::new(); + pending.insert("claude/opus".into(), PendingFav { want: true, seq: 1, acked: false, acked_pictures: 0 }); + pending.insert("claude/sonnet".into(), PendingFav { want: false, seq: 2, acked: false, acked_pictures: 0 }); + let eff = favorites_of(&thread, &["claude/haiku".into()], &pending); + assert_eq!(eff, vec!["codex/gpt", "claude/opus"]); + + // Reconcile drops pending entries once the hub picture reflects them + let mut thread_after = thread.clone(); + thread_after["picker"]["favorites"] = serde_json::json!(["codex/gpt", "claude/opus"]); + reconcile_fav_pending(&thread_after, &mut pending); + assert!(pending.is_empty(), "{pending:?}"); + + // Acked pending entry drops after 2 mismatched pictures (e.g. remote device overwrote) or when favorites array is absent + pending.insert("claude/opus".into(), PendingFav { want: true, seq: 3, acked: true, acked_pictures: 0 }); + reconcile_fav_pending(&thread, &mut pending); + assert_eq!(pending.get("claude/opus").map(|x| x.acked_pictures), Some(1)); + reconcile_fav_pending(&thread, &mut pending); + assert!(pending.is_empty(), "{pending:?}"); + + // Fallback to local favs when hub picture lacks favorites, and drop acked pending without favorites array + let no_hub = serde_json::json!({"id":"t1","picker":{"provider":"claude","providers":[]},"pickerAgents":{}}); + pending.insert("claude/haiku".into(), PendingFav { want: true, seq: 4, acked: true, acked_pictures: 0 }); + pending.insert("claude/opus".into(), PendingFav { want: true, seq: 5, acked: false, acked_pictures: 0 }); + reconcile_fav_pending(&no_hub, &mut pending); + assert!(!pending.contains_key("claude/haiku") && pending.contains_key("claude/opus")); + pending.clear(); + assert_eq!(favorites_of(&no_hub, &["@Claude/opus".into()], &pending), vec!["claude/opus"]); + + // Legacy local.favs migration runs only when hub favorites array is present and empty + let mut empty_hub = thread.clone(); + empty_hub["picker"]["favorites"] = serde_json::json!([]); + assert_eq!(legacy_favs_to_migrate(&empty_hub, &["@Claude/opus".into(), "bad key/x".into(), "claude/opus".into()], false), Some(vec!["claude/opus".into()])); + assert_eq!(legacy_favs_to_migrate(&thread, &["claude/opus".into()], false), None); + assert_eq!(legacy_favs_to_migrate(&empty_hub, &["claude/opus".into()], true), None); + + // Resolve favorite items across providers, marking active, missing-from-catalog, and unavailable agents, and filtering by search + let items = favorite_items(&thread, &["claude/opus".into(), "claude/retired".into(), "codex/gpt".into(), "grok/grok-4".into()], ""); + assert_eq!(items.len(), 4); + assert!(items[0].on && items[0].ok && items[0].note == "Opus 5.5 · claude-opus-5-5"); + assert!(!items[1].ok && items[1].why == "not available on this machine"); + assert!(!items[2].on && items[2].ok && items[2].note == "GPT · fast"); + assert!(!items[3].ok && items[3].why == "not installed on this machine"); + let filtered = favorite_items(&thread, &["claude/opus".into(), "codex/gpt".into()], "fast"); + assert_eq!(filtered.len(), 1); + assert_eq!(filtered[0].key, "codex/gpt"); + } } diff --git a/native/host/src/bin/screen-audit.rs b/native/host/src/bin/screen-audit.rs index 6f68effbaf..9adddc423f 100644 --- a/native/host/src/bin/screen-audit.rs +++ b/native/host/src/bin/screen-audit.rs @@ -23,10 +23,15 @@ mod session { pub use crate::{composer, patch, select, pages}; } #[path="../present/tokstats.rs"] mod tokstats; #[path="../present/tz.rs"] mod tz; #[path="../present/keys.rs"] mod keys; +#[path="../settings/favorites.rs"] #[allow(dead_code)] mod favorites; #[path="../settings/order_view.rs"] mod order_view; #[path="../settings/model_compat.rs"] mod model_compat; // the speed dial's table (agents/speed.rs) asks for the detected models; the audit counts screens and detects none -mod settings { pub mod order { pub use crate::order_view::*; } pub mod models { pub fn info() -> String { String::new() } pub use crate::model_compat::{model_compatible, sanitize_model}; } } +mod settings { pub mod order { pub use crate::order_view::*; } pub mod models { + pub use crate::favorites::{FAVORITES_KEY, parse_favorite_keys}; + pub fn info() -> String { String::new() } + pub use crate::model_compat::{model_compatible, sanitize_model}; +} } #[path="../present/thread.rs"] mod thread; #[path="../present/window.rs"] mod window; #[path="../present/audit_files.rs"] mod files; diff --git a/native/host/src/data/ext.rs b/native/host/src/data/ext.rs index 2cc4bd05d4..e03fcc6209 100644 --- a/native/host/src/data/ext.rs +++ b/native/host/src/data/ext.rs @@ -68,6 +68,10 @@ async fn picker(hub: &Arc, p: &Value) -> Result { let model = crate::settings::models::sanitize_model(&provider, &raw_model, info.is_object().then_some(&info)); let models: Value = serde_json::from_str(&crate::settings::models::all_of(&info)).unwrap_or(Value::Null); let mut out = picker_sections_of(&info, &models, &provider, &model, &pick("effort", String::new()), &pick("speed", String::new()), &pick("runtime", "approval-required".into())); + let raw_favs = hub.setting(crate::settings::models::FAVORITES_KEY).await.unwrap_or_default(); + out["favorites"] = json!(crate::settings::models::favorite_rows(&info, &raw_favs, &provider, &model)); + out["favoriteKeys"] = json!(crate::settings::models::parse_favorite_keys(&raw_favs)); + out["agents"] = crate::present::keys::picker_agents(info.is_object().then_some(&info)); // a thread's: its account and what that has left, the one chip's words as the desktop draws it (a new thread has no account yet) if !th.is_empty() && p.get("provider").is_none() { let (extra, combo) = crate::statehost::policies().and_then(|x| x.with_state(|st| { let n = crate::hub::now_ms() / 1000; (crate::present::keys::account_sections(st, th, n), crate::present::keys::combo_of(st, th, n)) })).unwrap_or_default(); @@ -239,6 +243,7 @@ pub async fn call(hub: &Arc, c: &mut Conn, m: &str, p: &Value, is_browser: match r { Ok(_) => thread_now(hub, th).await.map(|t| json!({"thread":t})), Err(e) => Err(e) } } "thread.picker" => picker(hub, p).await, + "models.favorite" => rpc(hub, c, "models.favorite", p.clone()).await.map(result), "thread.planonce" => { let th = s(p, "thread"); if !known_any(hub, &*hub.model().await, th) { return Some(Err(err("unknown thread"))) } match rpc(hub, c, "thread.planonce", json!({"thread":th,"on":p["on"] == true})).await { diff --git a/native/host/src/data/mod.rs b/native/host/src/data/mod.rs index 34d2254abb..23c261b886 100644 --- a/native/host/src/data/mod.rs +++ b/native/host/src/data/mod.rs @@ -801,6 +801,10 @@ async fn deltas(hub: &Hub, lines: &[String], subs: &mut Subs) -> Vec { let t = s(&e, "key").rsplit_once('.').map(|x| x.1).unwrap_or(""); if !t.is_empty() && !upsert.contains(&t.to_string()) { upsert.push(t.to_string()) } } + "SettingSet" if s(&e, "key") == crate::settings::models::FAVORITES_KEY => { + let favs = crate::settings::models::parse_favorite_keys(s(&e, "value")); + for sub in subs.lists() { out.push(d(sub, "favorites", json!({"favorites": favs}))); } + } "ProjectCreated" | "ProjectRenamed" => projects.push((s(&e, "id").to_string(), true)), "ProjectRemoved" => projects.push((s(&e, "id").to_string(), false)), "MessagePosted" => { @@ -1110,7 +1114,8 @@ async fn socket_with_reg( }; let no_provider = crate::settings::provider_notice::for_hub(&hub).await.map_or(Value::Null, |n| n.json()); let mut no_provider_sent = no_provider.clone(); - let mut hello = json!({"t":"hello","proto":PROTO,"hub":host,"name":name,"version":hub.cfg.version,"epoch":hub.epoch,"now":now_ms(),"features":FEATURES,"theme":theme,"locale":locale,"hubOffer":hub_offer,"hubBack":hub.info_now()["hub.back"].as_str().unwrap_or(""),"commands":crate::session::composer::words(),"notice":notice,"migrating":migrating,"noProvider":no_provider}); if let Some(c) = z { hello["z"] = json!(c) } + let favorite_models = crate::settings::models::parse_favorite_keys(&hub.setting(crate::settings::models::FAVORITES_KEY).await.unwrap_or_default()); + let mut hello = json!({"t":"hello","proto":PROTO,"hub":host,"name":name,"version":hub.cfg.version,"epoch":hub.epoch,"now":now_ms(),"features":FEATURES,"theme":theme,"locale":locale,"favoriteModels":favorite_models,"hubOffer":hub_offer,"hubBack":hub.info_now()["hub.back"].as_str().unwrap_or(""),"commands":crate::session::composer::words(),"notice":notice,"migrating":migrating,"noProvider":no_provider}); if let Some(c) = z { hello["z"] = json!(c) } // the home (feature "home", net/home.rs): where the uberbot lives, as this hub sees it; `k:"home"` pushes follow it on a lists subscription let mut home_sent = crate::net::home::now(&hub).await; hello["home"] = home_sent.clone(); tx.send(pack(&hello, json_mode)).await?; diff --git a/native/host/src/data/tests.rs b/native/host/src/data/tests.rs index b8f6b80dcf..04ae9f886f 100644 --- a/native/host/src/data/tests.rs +++ b/native/host/src/data/tests.rs @@ -49,6 +49,7 @@ async fn up_with(name: &str, more: &str) -> (crate::hub::TestHub, u16) { let cfg = Cfg { home: dir.to_path_buf(), version: "0.14.0".into(), commit: "c".into(), listen: "x".into(), os: "linux".into(), arch: "x64".into() }; let hub = Hub::start(cfg, Arc::new(Canned { reply: json!({}) })).await.unwrap(); hub.register_rpc(Arc::new(Fake(hub.clone()))); + hub.register_rpc(Arc::new(crate::settings::set::ModelsFavoriteRpc)); let l = TcpListener::bind("127.0.0.1:0").await.unwrap(); let port = l.local_addr().unwrap().port(); { let hub = hub.clone(); tokio::spawn(async move { loop { let (st, _) = l.accept().await.unwrap(); let h = hub.clone(); tokio::spawn(async move { let _ = wire::serve_with(h, st, false).await; }); } }); } (crate::hub::TestHub { hub, _tmp: dir }, port) @@ -1576,3 +1577,46 @@ fn probed_models(installed: &[&str]) -> Value { with_refs_with(&mut none, Some(models_json)); assert!(none.get("refs").is_none(), "unresolved model ref must not attach refs: {none}"); } + +#[tokio::test(flavor = "multi_thread", worker_threads = 2)] async fn data_models_favorite_toggles_pushes_deltas_and_enriches_picker() { + let (_hub, port) = up("favorites").await; + let mut ws = open(port, "&enc=json").await; + let hello = next(&mut ws).await; + assert_eq!(hello["favoriteModels"], json!([])); + + let sub = ask(&mut ws, 1, "subscribe", json!({"topic":"lists"})).await; + assert_eq!(sub["ok"], true); + + let r1 = ask(&mut ws, 2, "models.favorite", json!({"provider":"claude","model":"opus"})).await; + assert_eq!(r1["ok"], true, "{r1}"); + assert_eq!(r1["result"], json!({"starred":true,"favorites":["claude/opus"]})); + + let push1 = loop { + let v = next(&mut ws).await; + if v["t"] == "d" && v["k"] == "favorites" { break v; } + }; + assert_eq!(push1["favorites"], json!(["claude/opus"])); + + let pk = ask(&mut ws, 3, "thread.picker", json!({"thread":"t1"})).await; + assert_eq!(pk["ok"], true, "{pk}"); + let picker = &pk["result"]["picker"]; + assert_eq!(picker["favoriteKeys"], json!(["claude/opus"])); + assert_eq!(picker["favorites"][0]["key"], "claude/opus"); + assert_eq!(picker["favorites"][0]["provider"], "claude"); + assert_eq!(picker["favorites"][0]["model"], "opus"); + assert!(picker["agents"]["claude"]["models"].is_array()); + + // A fresh connection sees persisted favoriteModels in hello + let mut ws2 = open(port, "&enc=json").await; + let hello2 = next(&mut ws2).await; + assert_eq!(hello2["favoriteModels"], json!(["claude/opus"])); + + // Unstarring clears and pushes empty favorites + let r2 = ask(&mut ws, 4, "models.favorite", json!({"provider":"claude","model":"opus","on":false})).await; + assert_eq!(r2["result"], json!({"starred":false,"favorites":[]})); + let push2 = loop { + let v = next(&mut ws).await; + if v["t"] == "d" && v["k"] == "favorites" { break v; } + }; + assert_eq!(push2["favorites"], json!([])); +} diff --git a/native/host/src/data/webpolicy.rs b/native/host/src/data/webpolicy.rs index f99856685b..fcce4fda00 100644 --- a/native/host/src/data/webpolicy.rs +++ b/native/host/src/data/webpolicy.rs @@ -28,6 +28,7 @@ fn classify(method: &str, params: &Value) -> Option { | "message.send" | "mgmt.bom.edit" | "mgmt.panel" + | "models.favorite" | "project.act" | "project.add" | "queue.act" @@ -219,6 +220,7 @@ mod tests { assert!(allowed("thread.act", &json!({"action":"rename"}))); assert!(allowed("thread.pick", &json!({"action":"model"}))); assert!(!allowed("thread.pick", &json!({"action":"account"}))); + assert_eq!(policy("models.favorite", &json!({"provider":"claude","model":"opus"})), Policy::Activity); assert!(!allowed("composer.run", &json!({"text":"/secret example"}))); assert!(allowed("composer.run", &json!({"text":"/settle"}))); assert_eq!(policy("devices.page", &Value::Null), Policy::Devices); diff --git a/native/host/src/net/settings_sync.rs b/native/host/src/net/settings_sync.rs index 72a9580fa2..1bcf329346 100644 --- a/native/host/src/net/settings_sync.rs +++ b/native/host/src/net/settings_sync.rs @@ -4,7 +4,7 @@ //! - theme (`ui.theme`, `theme`) //! - language (`ui.lang`, `lang`) //! - quiet hours & notifications (`notify.quiet`, `notify.quiet.urgent`, `notify.`) -//! - default models (`agent.provider`, `agent.model`, `agent.thinking`) +//! - default and favorite models (`agent.provider`, `agent.model`, `agent.thinking`, `models.favorites`) //! - project pins, icons, colors, and groups (`sidebar.view`, `sidebar.groups`, `sidebar.attention`, //! `sidebar.pin.*`, `sidebar.group.of.*`, `sidebar.group.name.*`, `sidebar.group.pick.*`, //! `sidebar.archived.*`, `sidebar.fold.*`, `project.icon.*`, `project.color.*`, `project.pick.*`) @@ -44,6 +44,7 @@ pub fn is_shared(key: &str) -> bool { | "agent.provider" | "agent.model" | "agent.thinking" + | "models.favorites" | "sidebar.view" | "sidebar.groups" | "sidebar.attention" @@ -80,6 +81,9 @@ pub fn value_ok(key: &str, value: &str) -> bool { if key == crate::push::QUIET_URGENT { return matches!(value, "" | "on" | "off"); } + if key == crate::settings::models::FAVORITES_KEY { + return crate::settings::models::favorites_value_ok(value); + } true } @@ -323,6 +327,7 @@ mod tests { "agent.provider", "agent.model", "agent.thinking", + "models.favorites", "sidebar.view", "sidebar.groups", "sidebar.attention", @@ -379,14 +384,18 @@ mod tests { remote.insert("ui.lang".into(), Entry { value: "ja".into(), at: 150 }); // older ignored remote.insert("sidebar.pin.org/repo".into(), Entry { value: "".into(), at: 120 }); // clear wins remote.insert("agent.model".into(), Entry { value: "opus".into(), at: 50 }); // missing locally -> taken + remote.insert("models.favorites".into(), Entry { value: r#"["claude/opus"]"#.into(), at: 60 }); // valid -> taken remote.insert("machine.id".into(), Entry { value: "evil".into(), at: 999 }); // not allowlisted -> ignored remote.insert("notify.quiet".into(), Entry { value: "not-a-window".into(), at: 999 }); // invalid -> ignored let evs = merge(&local, &remote); - assert_eq!(evs.len(), 3, "{evs:?}"); + assert_eq!(evs.len(), 4, "{evs:?}"); assert!(evs.iter().any(|e| e["key"] == "ui.theme" && e["value"] == "light" && e["at"] == 150)); assert!(evs.iter().any(|e| e["key"] == "sidebar.pin.org/repo" && e["value"] == "" && e["at"] == 120)); assert!(evs.iter().any(|e| e["key"] == "agent.model" && e["value"] == "opus" && e["at"] == 50)); + assert!(evs.iter().any(|e| e["key"] == "models.favorites" && e["value"] == r#"["claude/opus"]"# && e["at"] == 60)); + assert!(!value_ok("models.favorites", "not-json")); + assert!(value_ok("models.favorites", "")); } #[test] @@ -422,6 +431,7 @@ mod tests { a.commit_many(&[ json!({"$":"SettingSet","key":"ui.theme","value":"light","at":10}), json!({"$":"SettingSet","key":"notify.quiet","value":"22:00-07:00","at":10}), + json!({"$":"SettingSet","key":"models.favorites","value":r#"["claude/opus","codex/gpt-6"]"#,"at":10}), json!({"$":"SettingSet","key":"machine.id","value":"m-a","at":10}), ]) .await @@ -446,13 +456,15 @@ mod tests { assert_eq!(a.setting("ui.lang").await.as_deref(), Some("ja")); assert_eq!(b.setting("ui.lang").await.as_deref(), Some("ja")); assert_eq!(b.setting("notify.quiet").await.as_deref(), Some("22:00-07:00")); + assert_eq!(b.setting("models.favorites").await.as_deref(), Some(r#"["claude/opus","codex/gpt-6"]"#)); assert_eq!(a.setting("machine.id").await.as_deref(), Some("m-a")); assert_eq!(b.setting("machine.id").await.as_deref(), Some("m-b")); - // Offline edit on B (clearing notify.quiet + changing theme at newer timestamp) catches up on next round + // Offline edit on B (clearing notify.quiet + changing theme + clearing favorites at newer timestamp) catches up on next round b.commit_many(&[ json!({"$":"SettingSet","key":"notify.quiet","value":"","at":30}), json!({"$":"SettingSet","key":"ui.theme","value":"dark","at":30}), + json!({"$":"SettingSet","key":"models.favorites","value":"","at":30}), ]) .await .unwrap(); @@ -460,5 +472,6 @@ mod tests { apply_remote(&a, &parse_entries(&reply2["result"]["entries"])).await.unwrap(); assert_eq!(a.setting("notify.quiet").await, None); assert_eq!(a.setting("ui.theme").await.as_deref(), Some("dark")); + assert_eq!(a.setting("models.favorites").await, None); } } diff --git a/native/host/src/present/keys.rs b/native/host/src/present/keys.rs index 843148dd7d..62bd4038e9 100644 --- a/native/host/src/present/keys.rs +++ b/native/host/src/present/keys.rs @@ -342,6 +342,11 @@ pub fn with_speed(mut p: Value, models: Option<&Value>, provider: &str, model: & for k in ["chip", "label"] { let x = format!("{}{}{l}", p[k].as_str().unwrap_or(""), if k == "chip" { " / " } else { " \u{b7} " }); p[k] = json!(x) } } p["speeds"] = json!(d); p } +/// Attach persisted favorite model keys (`["provider/model", ...]`) onto the desktop picker payload. +pub fn with_favorites(mut p: Value, raw: &str) -> Value { + p["favorites"] = json!(crate::settings::models::parse_favorite_keys(raw)); + p +} /// The model menu once the hub's `models` info is known (Models.menu): the provider's default first, its models (each with its CLI's label as `note`, and the efforts it /// takes when they differ from the default's), and the thread's own when the list lacks it. @@ -477,7 +482,8 @@ pub fn keys(st: &State, id: &str, now_s: u64, why: &str, models_text: Option<&st let (models, agents) = picker_agents_of(models_text); let mine = models.as_deref().map(|i| info_for_thread(st, id, i)); let model = crate::settings::models::sanitize_model(&t.provider, &t.model, mine.as_ref()); - m.insert("picker".into(), with_speed(picker_with(&t.provider, &model, get(format!("effort.{id}")), get(format!("usage.{id}")), mine.as_ref()), mine.as_ref(), &t.provider, &model, get(format!("speed.{id}")))); + let p = with_speed(picker_with(&t.provider, &model, get(format!("effort.{id}")), get(format!("usage.{id}")), mine.as_ref()), mine.as_ref(), &t.provider, &model, get(format!("speed.{id}"))); + m.insert("picker".into(), with_favorites(p, get(crate::settings::models::FAVORITES_KEY.into()))); m.insert("pickerAgents".into(), agents); m.insert("claude".into(), json!(t.provider == "claude")); // "Plan first, this turn only" set (commands/plan.rs thread.planonce): the picker's toggle is on until the turn it was set for ends @@ -735,4 +741,15 @@ mod tests { assert_eq!(plan_mode(&st, "t1")["phase"], "off"); assert!(!st.settings.contains_key("plan.executing.t1")); } + #[test] fn keys_includes_normalized_picker_favorites_and_as_helper_strips_them() { + let mut st = State::new(); + for l in [ + r#"{"$":"ProjectCreated","id":"p1","title":"P","folder":"/p","at":1}"#, + r#"{"$":"ThreadCreated","id":"t1","project":"p1","title":"T","provider":"claude","model":"opus","at":1}"#, + r#"{"$":"SettingSet","key":"models.favorites","value":"[\"@Claude/opus\",\"codex/gpt-6\"]","at":2}"#, + ] { st.apply_line(l); } + let k = keys(&st, "t1", 10, "", None).unwrap(); + assert_eq!(k["picker"]["favorites"], json!(["claude/opus", "codex/gpt-6"])); + assert!(as_helper(&k["picker"]).get("favorites").is_none()); + } } diff --git a/native/host/src/settings/favorites.rs b/native/host/src/settings/favorites.rs new file mode 100644 index 0000000000..6f662d79c3 --- /dev/null +++ b/native/host/src/settings/favorites.rs @@ -0,0 +1,146 @@ +//! Persisted favorite models setting helpers (`models.favorites`), shared between settings, data, sync, and standalone audit bins. +use serde_json::Value; + +/// Persisted favorite models setting key (`["provider/model", ...]`), synced across machines and clients. +pub const FAVORITES_KEY: &str = "models.favorites"; +pub const MAX_FAVORITES: usize = 64; +pub const MAX_FAV_LEN: usize = 200; +pub const MAX_FAVORITES_BYTES: usize = 4096; + +/// Normalize a `(provider, model)` favorite pair. Rejects empty, whitespace/slash in provider, control characters, or overlong entries. +pub fn norm_fav_pair(provider: &str, model: &str) -> Option<(String, String)> { + if provider.chars().any(char::is_control) || model.chars().any(char::is_control) { + return None; + } + let p = provider.trim().trim_start_matches('@').to_ascii_lowercase(); + let m = model.trim(); + if p.is_empty() || m.is_empty() || p.contains('/') || p.chars().any(char::is_whitespace) { + return None; + } + if p.len() + 1 + m.len() > MAX_FAV_LEN { + return None; + } + Some((p, m.to_string())) +} + +pub fn fav_key(provider: &str, model: &str) -> Option { + norm_fav_pair(provider, model).map(|(p, m)| format!("{p}/{m}")) +} + +/// Parse `models.favorites` JSON string into ordered, deduplicated `(provider, model)` pairs. +pub fn parse_favorites(raw: &str) -> Vec<(String, String)> { + let s = raw.trim(); + if s.is_empty() { + return vec![]; + } + let Ok(Value::Array(items)) = serde_json::from_str::(s) else { + return vec![]; + }; + let mut out: Vec<(String, String)> = Vec::new(); + let mut seen = std::collections::HashSet::new(); + for item in items { + let pair = match item { + Value::String(text) => text.split_once('/').and_then(|(p, m)| norm_fav_pair(p, m)), + Value::Object(ref obj) => { + let p = obj.get("provider").and_then(Value::as_str).unwrap_or(""); + let m = obj.get("model").and_then(Value::as_str).unwrap_or(""); + norm_fav_pair(p, m) + } + _ => None, + }; + if let Some((p, m)) = pair { + let key = format!("{p}/{m}"); + if seen.insert(key) { + out.push((p, m)); + if out.len() >= MAX_FAVORITES { + break; + } + } + } + } + out +} + +pub fn parse_favorite_keys(raw: &str) -> Vec { + parse_favorites(raw).into_iter().map(|(p, m)| format!("{p}/{m}")).collect() +} + +/// Format favorite `(provider, model)` pairs for `SettingSet`. Empty list produces `""` so the setting clears cleanly. +pub fn format_favorites(favs: &[(String, String)]) -> String { + let mut norm: Vec = Vec::new(); + let mut seen = std::collections::HashSet::new(); + for (p, m) in favs { + if let Some((np, nm)) = norm_fav_pair(p, m) { + let k = format!("{np}/{nm}"); + if seen.insert(k.clone()) { + norm.push(k); + let encoded = serde_json::to_string(&norm).unwrap_or_default(); + if encoded.len() > MAX_FAVORITES_BYTES { + norm.pop(); + break; + } + if norm.len() >= MAX_FAVORITES { + break; + } + } + } + } + if norm.is_empty() { + String::new() + } else { + serde_json::to_string(&norm).unwrap_or_default() + } +} + +/// Validate a `models.favorites` setting value before storing or syncing. +pub fn favorites_value_ok(value: &str) -> bool { + if value.is_empty() { + return true; + } + if value.len() > MAX_FAVORITES_BYTES { + return false; + } + let Ok(Value::Array(items)) = serde_json::from_str::(value) else { + return false; + }; + if items.len() > MAX_FAVORITES { + return false; + } + items.iter().all(|item| { + item.as_str() + .and_then(|s| s.split_once('/')) + .and_then(|(p, m)| norm_fav_pair(p, m)) + .is_some() + }) +} + +/// Toggle or explicitly set `(provider, model)` in `raw`, returning `Ok((next_setting_value, now_starred, canonical_keys))` or an error reason. +pub fn toggle_favorite(raw: &str, provider: &str, model: &str, on: Option) -> Result<(String, bool, Vec), &'static str> { + let Some((np, nm)) = norm_fav_pair(provider, model) else { + return Err("invalid provider or model"); + }; + let mut list = parse_favorites(raw); + let idx = list.iter().position(|(p, m)| *p == np && *m == nm); + let want = on.unwrap_or_else(|| idx.is_none()); + match (idx, want) { + (Some(i), false) => { + list.remove(i); + } + (None, true) => { + if list.len() >= MAX_FAVORITES { + return Err("too many favorite models (max 64)"); + } + list.push((np, nm)); + let keys: Vec = list.iter().map(|(p, m)| format!("{p}/{m}")).collect(); + let next = serde_json::to_string(&keys).unwrap_or_default(); + if !favorites_value_ok(&next) { + return Err("favorite models list is full"); + } + return Ok((next, true, keys)); + } + _ => {} + } + let next = format_favorites(&list); + let keys = parse_favorite_keys(&next); + Ok((next, want, keys)) +} diff --git a/native/host/src/settings/mod.rs b/native/host/src/settings/mod.rs index de59e14301..05135efc2c 100644 --- a/native/host/src/settings/mod.rs +++ b/native/host/src/settings/mod.rs @@ -44,6 +44,7 @@ pub mod onboard; pub mod tools_install; pub mod models; pub mod model_compat; +pub mod favorites; pub mod models_probe; pub mod agent_versions; pub mod privacy; @@ -100,6 +101,7 @@ mod read_tests { /// Registers the handlers (after `open`). pub fn start(hub: Arc, agents: Option>) { hub.register_rpc(Arc::new(set::SettingSet { agents: agents.clone() })); + hub.register_rpc(Arc::new(set::ModelsFavoriteRpc)); hub.register_rpc(Arc::new(telemetry::TelemetryRpc)); hub.register_rpc(Arc::new(autopush::AutoPushRpc)); hub.register_rpc(Arc::new(browser_start::BrowserPage)); diff --git a/native/host/src/settings/models.rs b/native/host/src/settings/models.rs index c7c7c7e685..108d3bb053 100644 --- a/native/host/src/settings/models.rs +++ b/native/host/src/settings/models.rs @@ -112,6 +112,41 @@ pub fn default_now(chosen: &str, inventory: &str) -> String { default_agent(chosen, &info_value(), &connected(inventory)) } +pub use super::favorites::*; + +/// Enrich persisted favorite `(provider, model)` entries against `info` for `thread.picker`. +pub fn favorite_rows(info: &Value, raw_favs: &str, cur_provider: &str, cur_model: &str) -> Vec { + let cp = cur_provider.trim().trim_start_matches('@').to_ascii_lowercase(); + let cm = cur_model.trim(); + let info_opt = info.is_object().then_some(info); + parse_favorites(raw_favs) + .into_iter() + .map(|(p, m)| { + let note = info["about"][&p]["labels"][&m].as_str().unwrap_or(""); + let (mut ok, mut why) = crate::present::keys::agent_ok(info_opt, &p); + if ok { + if let Some(arr) = info.get(&p).and_then(Value::as_array) { + let has_catalog = arr.iter().filter_map(Value::as_str).any(|s| !s.is_empty()); + if has_catalog && !arr.iter().filter_map(Value::as_str).any(|s| s == m) { + ok = false; + why = "not available on this machine".to_string(); + } + } + } + json!({ + "key": format!("{p}/{m}"), + "provider": p, + "model": m, + "label": m, + "note": note, + "on": p == cp && m == cm, + "ok": ok, + "why": why, + }) + }) + .collect() +} + #[cfg(test)] mod tests { /// The JS hub's `models` info with no agent CLI installed (build/gpui/results/parity-current/recA/session-mobile.json). @@ -134,6 +169,73 @@ mod tests { let m = serde_json::json!({"codex":["gpt-6"],"about":{"codex":{"cli":"/bin/codex","labels":{"gpt-6":"GPT 6"}}}}); assert_eq!(serde_json::from_str::(&super::all_of(&m)).unwrap()["codex"][0]["ok"], true); } + #[test] fn favorites_normalize_dedup_toggle_validate_and_enrich() { + assert_eq!(super::norm_fav_pair(" @Claude ", " opus "), Some(("claude".into(), "opus".into()))); + assert_eq!(super::norm_fav_pair("", "opus"), None); + assert_eq!(super::norm_fav_pair("claude", ""), None); + assert_eq!(super::norm_fav_pair("claude/sub", "opus"), None); + assert_eq!(super::norm_fav_pair("cl aude", "opus"), None); + assert_eq!(super::norm_fav_pair("claude", "opus\n"), None); + assert_eq!(super::fav_key("@Codex", "gpt-6"), Some("codex/gpt-6".into())); + + let parsed = super::parse_favorites(r#"["@Claude/opus","codex/gpt-6","claude/opus",{"provider":"@Grok","model":"grok-4"},"bad"]"#); + assert_eq!(parsed, vec![("claude".into(), "opus".into()), ("codex".into(), "gpt-6".into()), ("grok".into(), "grok-4".into())]); + assert_eq!(super::parse_favorites("not-json"), vec![]); + assert_eq!(super::format_favorites(&[]), ""); + + let (v1, starred1, k1) = super::toggle_favorite("", "@Claude", "opus", None).unwrap(); + assert!(starred1); + assert_eq!(k1, vec!["claude/opus"]); + assert_eq!(v1, r#"["claude/opus"]"#); + + let (v2, starred2, k2) = super::toggle_favorite(&v1, "codex", "gpt-6", Some(true)).unwrap(); + assert!(starred2); + assert_eq!(k2, vec!["claude/opus", "codex/gpt-6"]); + // idempotent re-star preserves order + let (v2_again, s_again, k_again) = super::toggle_favorite(&v2, "claude", "opus", Some(true)).unwrap(); + assert!(s_again); + assert_eq!(k_again, vec!["claude/opus", "codex/gpt-6"]); + assert_eq!(v2_again, v2); + + let (v3, starred3, k3) = super::toggle_favorite(&v2, "claude", "opus", None).unwrap(); + assert!(!starred3); + assert_eq!(k3, vec!["codex/gpt-6"]); + let (v4, starred4, k4) = super::toggle_favorite(&v3, "codex", "gpt-6", Some(false)).unwrap(); + assert!(!starred4); + assert!(k4.is_empty()); + assert_eq!(v4, ""); + + // At the 64-favorite cap, adding a 65th returns an error instead of evicting + let sixty_four: Vec = (0..super::MAX_FAVORITES).map(|i| format!("claude/m{i}")).collect(); + let raw_64 = serde_json::to_string(&sixty_four).unwrap(); + assert!(super::favorites_value_ok(&raw_64)); + assert!(super::toggle_favorite(&raw_64, "codex", "gpt-6", Some(true)).is_err()); + assert_eq!(super::parse_favorite_keys(&raw_64).len(), super::MAX_FAVORITES); + + // Exceeding 4096 bytes returns an error and format_favorites respects the byte cap + let long_model = "m".repeat(180); + let long_pairs: Vec<(String, String)> = (0..22).map(|i| ("claude".into(), format!("{i:02}-{long_model}"))).collect(); + let bounded = super::format_favorites(&long_pairs); + assert!(super::favorites_value_ok(&bounded) && bounded.len() <= super::MAX_FAVORITES_BYTES); + assert!(super::toggle_favorite(&bounded, "claude", &format!("99-{long_model}"), Some(true)).is_err()); + + assert!(super::favorites_value_ok("")); + assert!(super::favorites_value_ok(r#"["claude/opus","codex/gpt-6"]"#)); + assert!(!super::favorites_value_ok("not-json")); + assert!(!super::favorites_value_ok(r#"["claude/"]"#)); + assert!(!super::favorites_value_ok(r#"["/opus"]"#)); + assert!(!super::favorites_value_ok(r#"[123]"#)); + + let info = serde_json::json!({"probed":true,"claude":["opus","sonnet"],"about":{"claude":{"cli":"/bin/claude","labels":{"opus":"Opus 5.5"}},"grok":{"cli":"","labels":{}}}}); + let rows = super::favorite_rows(&info, r#"["claude/opus","claude/retired","grok/grok-4"]"#, "claude", "opus"); + assert_eq!(rows.len(), 3); + assert_eq!(rows[0], serde_json::json!({"key":"claude/opus","provider":"claude","model":"opus","label":"opus","note":"Opus 5.5","on":true,"ok":true,"why":""})); + assert_eq!(rows[1]["ok"], false); + assert_eq!(rows[1]["why"], "not available on this machine"); + assert_eq!(rows[2]["ok"], false); + assert_eq!(rows[2]["on"], false); + assert_eq!(rows[2]["why"], "not installed on this machine"); + } } /// The picker as the hub draws it (present/keys.rs) from this detection: here, not beside keys.rs, whose tests also build into the small bins without `settings`. diff --git a/native/host/src/settings/set.rs b/native/host/src/settings/set.rs index 3c63e1a946..b138bf399d 100644 --- a/native/host/src/settings/set.rs +++ b/native/host/src/settings/set.rs @@ -8,6 +8,11 @@ use std::sync::Arc; pub const ACCOUNT_GATE: &str = "This thread uses a named account. Use updated Backplane web or desktop to continue; your draft is preserved."; +static FAVORITES_LOCK: std::sync::OnceLock> = std::sync::OnceLock::new(); +fn favorites_lock() -> &'static tokio::sync::Mutex<()> { + FAVORITES_LOCK.get_or_init(|| tokio::sync::Mutex::new(())) +} + pub struct SettingSet { pub agents: Option> } impl RpcHandler for SettingSet { fn methods(&self) -> &'static [&'static str] { &["setting.set"] } @@ -20,6 +25,7 @@ impl RpcHandler for SettingSet { if key == crate::push::QUIET && !(value.is_empty() || value == "off" || crate::push::window(value).is_some()) { return vec![json!({"t":"reply","id":id,"ok":false,"error":"quiet hours are HH:MM-HH:MM, or off"})] } if key == crate::push::QUIET_URGENT && !matches!(value, "" | "on" | "off") { return vec![json!({"t":"reply","id":id,"ok":false,"error":"urgent is on or off"})] } if key == super::browser_start::KEY && !super::browser_start::storable(value) { return vec![json!({"t":"reply","id":id,"ok":false,"error":super::browser_start::BAD})] } + if key == super::models::FAVORITES_KEY && !super::models::favorites_value_ok(value) { return vec![json!({"t":"reply","id":id,"ok":false,"error":"invalid models.favorites"})] } if key.starts_with("peer.own.") { return vec![json!({"t":"reply","id":id,"ok":false,"error":"that setting is the hub's own"})] } // a zone is only right once its rule is known: person.tz goes through zone.set (settings/zone.rs), which looks the rule up and refuses a name that is not a zone if key == "person.tz" { if let Some(z) = hub.rpc_for("zone.set") { return z.call(hub, _who, id, "zone.set", &json!({"zone": value})).await } } @@ -32,6 +38,7 @@ impl RpcHandler for SettingSet { return vec![json!({"t":"reply","id":id,"ok":false,"error":format!("model {value} is not compatible with provider {eff_prov}")})]; } } + let _fav_guard = if key == super::models::FAVORITES_KEY { Some(favorites_lock().lock().await) } else { None }; let at = now_ms() / 1000; let mut batch = vec![json!({"$":"SettingSet","key":key,"value":value,"at":at})]; if key == "agent.provider" { @@ -71,6 +78,36 @@ impl RpcHandler for SettingSet { } } +/// Toggle or set a favorite `(provider, model)` entry in `models.favorites` and sync across connected devices. +pub struct ModelsFavoriteRpc; +impl RpcHandler for ModelsFavoriteRpc { + fn methods(&self) -> &'static [&'static str] { &["models.favorite"] } + fn call<'a>(&'a self, hub: &'a Arc, _who: &'a Caller, id: &'a Value, _method: &'a str, p: &'a Value) -> Fut<'a, Vec> { + Box::pin(async move { + let provider = p.get("provider").and_then(Value::as_str).unwrap_or(""); + let model = p.get("model").and_then(Value::as_str).unwrap_or(""); + let on = p.get("on").and_then(Value::as_bool); + let _fav_guard = favorites_lock().lock().await; + let cur = hub.setting(super::models::FAVORITES_KEY).await.unwrap_or_default(); + let (next, starred, keys) = match super::models::toggle_favorite(&cur, provider, model, on) { + Ok(v) => v, + Err(why) => return vec![json!({"t":"reply","id":id,"ok":false,"error":why})], + }; + if !super::models::favorites_value_ok(&next) { + return vec![json!({"t":"reply","id":id,"ok":false,"error":"invalid models.favorites"})]; + } + let at = now_ms() / 1000; + match hub.commit_many(&[json!({"$":"SettingSet","key":super::models::FAVORITES_KEY,"value":next,"at":at})]).await { + Ok(_) => { + crate::net::settings_sync::push_now(hub.clone()); + vec![json!({"t":"reply","id":id,"ok":true,"result":{"starred":starred,"favorites":keys}})] + } + Err(e) => vec![json!({"t":"reply","id":id,"ok":false,"error":format!("{e:#}")})], + } + }) + } +} + #[cfg(test)] mod tests { use super::*; @@ -79,7 +116,7 @@ mod tests { Hub::start(Cfg { home: home.to_path_buf(), version: "0.1.0-dev".into(), commit: "c".into(), listen: "x".into(), os: "linux".into(), arch: "x64".into() }, Arc::new(Canned { reply: json!({}) })).await.unwrap() } async fn call(hub: &Arc, m: &'static str, p: Value) -> Value { - hub.register_rpc(Arc::new(SettingSet { agents: None })); hub.register_rpc(Arc::new(telemetry::TelemetryRpc)); + hub.register_rpc(Arc::new(SettingSet { agents: None })); hub.register_rpc(Arc::new(ModelsFavoriteRpc)); hub.register_rpc(Arc::new(telemetry::TelemetryRpc)); let h = hub.rpc_for(m).unwrap(); h.call(hub, &Caller { gen: "1".into(), client: 1 }, &json!(5), m, &p).await.remove(0) } // the tour's Skip: the app sends setting.set onboard.done=1 (and onboard.uber=1); it must be answered, logged and still there after a restart @@ -160,4 +197,42 @@ mod tests { assert_eq!(hub.setting("text.model").await, None); let _ = std::fs::remove_dir_all(&home); } + + #[tokio::test(flavor = "multi_thread")] async fn models_favorite_toggles_persists_across_restart_and_validates() { + let home = crate::plat::tmp::dir("set-favs"); + let hub = start(&home).await; + + assert_eq!(call(&hub, "setting.set", json!({"key":"models.favorites","value":"not-json"})).await["ok"], false); + assert_eq!(call(&hub, "models.favorite", json!({"provider":"","model":"opus"})).await["ok"], false); + + let r1 = call(&hub, "models.favorite", json!({"provider":"@Claude","model":"opus"})).await; + assert_eq!(r1["ok"], true); + assert_eq!(r1["result"], json!({"starred":true,"favorites":["claude/opus"]})); + + let r2 = call(&hub, "models.favorite", json!({"provider":"codex","model":"gpt-6","on":true})).await; + assert_eq!(r2["ok"], true); + assert_eq!(r2["result"], json!({"starred":true,"favorites":["claude/opus","codex/gpt-6"]})); + assert_eq!(hub.setting("models.favorites").await.as_deref(), Some(r#"["claude/opus","codex/gpt-6"]"#)); + + drop(hub); + let again = start(&home).await; + assert_eq!(again.setting("models.favorites").await.as_deref(), Some(r#"["claude/opus","codex/gpt-6"]"#)); + + let r3 = call(&again, "models.favorite", json!({"provider":"claude","model":"opus"})).await; + assert_eq!(r3["result"], json!({"starred":false,"favorites":["codex/gpt-6"]})); + let r4 = call(&again, "models.favorite", json!({"provider":"codex","model":"gpt-6","on":false})).await; + assert_eq!(r4["result"], json!({"starred":false,"favorites":[]})); + assert_eq!(again.setting("models.favorites").await, None); + + // Concurrent toggles serialize without overwriting each other + let (c1, c2) = tokio::join!( + call(&again, "models.favorite", json!({"provider":"claude","model":"opus","on":true})), + call(&again, "models.favorite", json!({"provider":"codex","model":"gpt-6","on":true})), + ); + assert_eq!(c1["ok"], true); + assert_eq!(c2["ok"], true); + let saved = crate::settings::models::parse_favorite_keys(&again.setting("models.favorites").await.unwrap_or_default()); + assert_eq!(saved.len(), 2, "{saved:?}"); + assert!(saved.contains(&"claude/opus".to_string()) && saved.contains(&"codex/gpt-6".to_string()), "{saved:?}"); + } } diff --git a/native/host/src/state/policy.rs b/native/host/src/state/policy.rs index d8bfe153bb..5e9cab8629 100644 --- a/native/host/src/state/policy.rs +++ b/native/host/src/state/policy.rs @@ -38,7 +38,7 @@ pub fn lean_keeps(k: &str) -> bool { // the Context panel's readings (present/tokstats.rs): one short string a thread, and the epoch that names the thread totals' key; a provider's day (`.dv.`, Settings › Accounts) if ["tok.epoch", "tok.recount"].contains(&k) || ["turn.last.", "turn.speed.", "turn.models.", "turn.live.", "turn.tier."].iter().any(|p| k.starts_with(p)) || (k.starts_with("tok.") && [".t.", ".td.", ".tr.", ".bl.", ".dv."].iter().any(|p| k.starts_with(&format!("tok{p}")) || k.contains(p))) { return true } // the Settings pages' values (present/settings.rs): short strings, one per control - if ["web.enabled", "settle.idle.minutes", "settle.personal.minutes", "settle.done", "restart.continue", "thread.env", "agent.provider", "agent.model", "telemetry.share", "telemetry.usage.asked", "telemetry.asked", "telemetry.usage.generation", "telemetry.choice.revision", "telemetry.reset", "telemetry.notice", "onboard.usage", "update.channel", "text.provider", "text.model", "kicad.path", "freecad.path", "kicad.ipc", "viewer.board3d", "plan.routing", "fallback.chain", "fallback.on", "fallback.add.provider", "fallback.add.model", "recall.bots", "browser.start"].contains(&k) || ["push.webhook.", "notify.", "tz.rule."].iter().any(|p| k.starts_with(p)) { return true } + if ["web.enabled", "settle.idle.minutes", "settle.personal.minutes", "settle.done", "restart.continue", "thread.env", "agent.provider", "agent.model", "models.favorites", "telemetry.share", "telemetry.usage.asked", "telemetry.asked", "telemetry.usage.generation", "telemetry.choice.revision", "telemetry.reset", "telemetry.notice", "onboard.usage", "update.channel", "text.provider", "text.model", "kicad.path", "freecad.path", "kicad.ipc", "viewer.board3d", "plan.routing", "fallback.chain", "fallback.on", "fallback.add.provider", "fallback.add.model", "recall.bots", "browser.start"].contains(&k) || ["push.webhook.", "notify.", "tz.rule."].iter().any(|p| k.starts_with(p)) { return true } // Settings, Voice (voice/page.rs, drawn by present/settings.rs from this copy): the engine, the model and the microphone, and the dictionary's // entries and learned fixes (a short line each, a removed one is gone, `blank_gone`). Without them every choice there looked unchosen (matrix S09). if k.starts_with("mouse.") { return true } @@ -269,6 +269,7 @@ mod tests { for k in ["allowance.claude", "allowance.codex", "accounts.inventory"] { assert!(lean_keeps(k), "{k}: the composer's limits chip reads it"); } for k in ["rule.r1", "board.b1"] { assert!(lean_keeps(k), "{k}: Settings, Rules and task board lists it"); } for k in ["room.need.r1", "room.member.r1.thread:t1"] { assert!(lean_keeps(k), "{k}: a swarm's Needs you row says why from it (present/swarm_need.rs)"); } + assert!(lean_keeps("models.favorites"), "the thread view and data/1 picker read favorite models from it"); assert!(lean_keeps("plan.routing"), "Settings › CAD draws the Plan before routing switch from it"); assert!(lean_keeps("halt.t1.oom5-1"), "the thread view draws a halt card from it"); assert!(lean_keeps("review.ro.t1"), "the thread view draws the review bar from it (#1305)"); diff --git a/web/dist/assets/app.js b/web/dist/assets/app.js index cabf49ef40..4dfba26390 100644 --- a/web/dist/assets/app.js +++ b/web/dist/assets/app.js @@ -1,16 +1,16 @@ -function nn(e=Date.now(),t=Math.random){let n=Math.floor(t()*1099511627776).toString(36);return`w${e}-${n}`.replace(/[^A-Za-z0-9_-]/g,"").slice(0,64)}function Yn(e){return e==="done"||e==="failed"||e==="cancelled"}function Xn(e,t){if(!e||e.id!==t.id)return!0;let n=Yn(e.state),i=Yn(t.state);if(n!==i)return i;return(t.ended??0)>=(e.ended??0)}function Zn(e){if(e.state!=="done")return!1;if(typeof e.hold==="boolean")return!e.hold;return(e.notes??[]).length===0}var Ct={en:{"agy.signout":"Sign out","android.hub.machines.approve":"Approve","android.load.earlier":"load earlier","approval.dismiss":"Dismiss","approval.implement":"Implement","ask.plan":"Proposed plan","bots.new":"New bot","bots.rooms":"Rooms","bots.tab.browser":"Browser","common.cancel":"Cancel","common.close":"Close","common.copy":"Copy","common.delete":"Delete","common.refresh":"Refresh","common.remove":"Remove","common.save":"Save","composer.placeholder":"Ask anything: @bot, >thread, %project, #room, $skill, /btw","composer.send":"Send","composer.stop":"Stop","gpui.acct.connected":"Connected","gpui.acct.not.connected":"Not connected","gpui.acct.sign.in.expired":"Sign-in expired","gpui.ask.plan.ready":"Ready for review","gpui.ask.plan.revise":"Revise","gpui.ask.plan.reviseph":"What should change in the plan?","gpui.ask.plan.sendrev":"Send revision","gpui.b.in.reply.to":"↩ In reply to: {quote}","gpui.b.replying.to":"↩ Replying to: {line}","gpui.bots.recall.off":"Off","gpui.bots.recall.on":"On","gpui.c.solid.big.next":"Loading it may take a while and a lot of memory.","gpui.c.solid.load.big":"Load it anyway","gpui.c.solid.loading.big":"Loading it anyway…","gpui.c.term.collapse":"Collapse","gpui.c.term.expand":"Expand","gpui.commands":"Commands","gpui.e.open.folder":"Open folder","gpui.filter.projects.and.threads":"Filter projects and threads","gpui.fold.or.unfold.the.sidebar":"Fold or unfold the sidebar","gpui.follow.paused":"Following paused","gpui.follow.wait":"Following: waiting for the agent's next edit","gpui.gerbers":"Gerbers","gpui.improvements":"Improvements","gpui.jump.to.a.thread.run":"Jump to a thread, run a command or find what was said","gpui.mgmt.bom.dnp":"DNP","gpui.mgmt.bom.nompn":"no MPN","gpui.mgmt.checks.all":"All","gpui.mgmt.checks.fix":"Fix with agent","gpui.mgmt.checks.run":"Run","gpui.mgmt.close":"Close the panel","gpui.mgmt.fab.apply":"Apply","gpui.mgmt.fab.changed":"Changed since you last looked","gpui.mgmt.fab.derived":"* worked out from the fab's page (a mil in mm, a ring from a diameter). Dimmed: the rigid board's value, where this board's page says nothing else. A date opens the page it was read from.","gpui.mgmt.fab.extra":"Costs more","gpui.mgmt.fab.findings":"Findings","gpui.mgmt.fab.free":"Base price","gpui.mgmt.fab.judge":"Datasheets","gpui.mgmt.fab.limit":"Limit","gpui.mgmt.fab.readcol":"Read","gpui.mgmt.fab.refresh":"Refresh","gpui.mgmt.fab.reviewbtn":"Review","gpui.mgmt.fab.seen":"Seen","gpui.mgmt.fab.thefab":"The fab","gpui.mgmt.fab.use":"Use","gpui.mgmt.life.nopart":"No reading of this part yet.","gpui.mgmt.life.reading":"Reading its history…","gpui.mgmt.plan.addnote":"Add note","gpui.mgmt.plan.all":"Approve all","gpui.mgmt.plan.before":"Plan before routing","gpui.mgmt.plan.compact":"Compact","gpui.mgmt.plan.done":"done","gpui.mgmt.plan.drawn":"The plan's corridors and planes are drawn on the board while this panel is open. Close it to hide them.","gpui.mgmt.plan.edited":"Edited","gpui.mgmt.plan.elsewhere":"A routing plan for {board} awaits your approval","gpui.mgmt.plan.emptysub":"Layers, corridors, and planes appear here once a plan is proposed.","gpui.mgmt.plan.expand":"Expand","gpui.mgmt.plan.fit":"Fit","gpui.mgmt.plan.grid.all":"All layers","gpui.mgmt.plan.grid.pair":"Side by side","gpui.mgmt.plan.grid.single":"Single","gpui.mgmt.plan.hide":"Hide done","gpui.mgmt.plan.hint":"Drag waypoints to steer · Click + on edge to insert · Right-click vertex to remove","gpui.mgmt.plan.keysnote":"On this KiCad version, approve from this panel: in plan view KiCad's A, R and W keys aren't the plan's yet (A opens Add Footprint). Update KiCad.","gpui.mgmt.plan.layer":"Approve layer","gpui.mgmt.plan.layer.short":"Layer","gpui.mgmt.plan.lock":"Lock","gpui.mgmt.plan.locked":"Locked","gpui.mgmt.plan.noboard":"No routing plan for this board.","gpui.mgmt.plan.noitems":"No corridors or planes on this layer","gpui.mgmt.plan.note.placeholder":"Steering note for router…","gpui.mgmt.plan.nothing":"Nothing awaits your approval","gpui.mgmt.plan.offwords":"Agents route as you ask. Turn it on to have them propose a routing plan first and route only what you approve here.","gpui.mgmt.plan.onwords":"Before routing a board with 4 or more copper layers or more than 60 nets, the agent proposes corridors and plane regions here. It routes only what you approve.","gpui.mgmt.plan.reading":"Reading the routing plan…","gpui.mgmt.plan.reference":"over {layer}","gpui.mgmt.plan.refused":"KiCad refused","gpui.mgmt.plan.reject":"Reject","gpui.mgmt.plan.rejectlayer":"Reject layer","gpui.mgmt.plan.reqplain":"Approval requested","gpui.mgmt.plan.requested":"Approval requested: {what}","gpui.mgmt.plan.saved":"saved plan","gpui.mgmt.plan.show":"Show done","gpui.mgmt.plan.st.approved":"Approved","gpui.mgmt.plan.st.awaiting":"Awaiting review","gpui.mgmt.plan.st.blocked":"Blocked","gpui.mgmt.plan.st.empty":"Empty","gpui.mgmt.plan.st.partial":"Partial","gpui.mgmt.plan.st.rejected":"Rejected","gpui.mgmt.plan.st.routed":"Routed","gpui.mgmt.plan.st.routing":"Routing","gpui.mgmt.plan.st.verified":"Verified","gpui.mgmt.plan.stackup.short":"Stackup","gpui.mgmt.plan.stop":"Stop routing","gpui.mgmt.plan.sync":"Link zoom","gpui.mgmt.plan.tab":"Plan","gpui.mgmt.plan.unlock":"Unlock","gpui.mgmt.plan.verify":"Verify","gpui.mgmt.plan.view.canvas":"Canvas","gpui.mgmt.plan.view.list":"List","gpui.mgmt.plan.view.split":"Split","gpui.mgmt.plan.width":"Width","gpui.next.thread":"Next thread","gpui.nothing.matches":"Nothing matches","gpui.planmode.bar.always":"Plan mode — explores and proposes a plan before editing","gpui.planmode.bar.executing":"Building the approved plan","gpui.planmode.bar.once":"Plan mode (1 turn) — explores and proposes a plan before editing","gpui.planmode.bar.pending":"Proposed plan awaits review below","gpui.planmode.bar.planning":"Planning — drafting a plan before edits","gpui.planmode.chip.building":"Building","gpui.planmode.chip.once":"Plan · 1t","gpui.planmode.scope.always":"Always","gpui.planmode.scope.once":"1 turn","gpui.planmode.tip":"Plan before acting (1 turn, always, or off)","gpui.planmode.top.executing":"Building plan","gpui.planmode.top.once":"Plan (1 turn)","gpui.planmode.top.pending":"Review plan","gpui.planmode.top.planning":"Planning","gpui.previous.thread":"Previous thread","gpui.rail.no.board":"No board in this project","gpui.rail.no.mech":"No mechanical parts in this project","gpui.rail.no.schematic":"No schematic in this project","gpui.rail.split.needs.both":"Split needs a board and a schematic","gpui.settings.group.agents":"Agents and tools","gpui.settings.group.general":"General","home.away":"Home ({name}) is away","home.away.queued":"Home ({name}) is away · {n} queued","home.away.since":"Home ({name}) is away since {time}","home.away.since.queued":"Home ({name}) is away since {time} · {n} queued","home.machine":"Home machine","home.move.failed":"Home move failed","home.move.failed.note":"Home move failed: {note}","home.move.here":"Make this machine the home","home.moving":"Moving home to {to}…","home.moving.step":"Moving home to {to}: {step}","hub.back.crash":"Backplane is back after it stopped unexpectedly","hub.restarting":"Restarting Backplane…","hub.restarting.build":"Restarting Backplane… (new build {build})","hub.stopped":"Backplane stopped","ios.hub.address.field":"Hub address","menu.pin":"Pin","menu.settle":"Settle","menu.unpin":"Unpin","menu.wake":"Wake","model.col.agent":"Agent","native.pair.connect":"Connect","native.thread.model":"Model","notify.settled":"Settled","palette.archive":"Archive thread","palette.command.placeholder":"Type a command or a thread","palette.diff":"Diff: what this thread changed","palette.newthread":"New thread","palette.settings":"Settings","palette.terminal":"Terminal","palette.unarchive":"Unarchive thread","phone.unsettle":"Unsettle","provider.notice.button":"Open Settings → Accounts","provider.notice.head":"No AI provider connected","provider.notice.senderr":"No AI provider connected yet. Open Settings → Accounts to connect Claude, Codex, Antigravity, or another provider.","provider.notice.senderr.remote":"No AI provider connected on {machine}. Open Settings → Accounts on {machine} to connect Claude, Codex, Antigravity, or another provider.","provider.notice.text.none":"Connect Claude, Codex, Antigravity, or another provider to start chatting.","provider.notice.text.signedout":"Sign in to Claude, Codex, or another provider in Settings → Accounts to start chatting.","reply.action":"Reply","reply.cancel":"Cancel reply","reply.to":"In reply to:","rooms.new":"New room","secret.you":"You","settings.appearance":"Appearance","settings.lang":"Language","settings.lang.auto":"Automatic","settings.lang.en":"English","settings.lang.es":"Español","settings.lang.ja":"日本語","settings.theme":"Theme","settings.theme.dark":"Dark","settings.theme.light":"Light","sheet.rename":"Rename thread","sidebar.add.project":"Add project","sidebar.search.projects":"Search projects","thread.context.base":"Backplane","thread.context.copied":"Prompt copied.","thread.context.copy":"Copy prompt","thread.context.disable":"Disable","thread.context.enable":"Enable","thread.context.index":"Available skills index","thread.context.injected.label":"Injected project instructions","thread.context.instructions":"Instructions","thread.context.mcp":"Project MCPs","thread.context.native.note":"Backplane’s launch prompt. Native files are loaded by the provider.","thread.context.none.instructions":"No project instructions found.","thread.context.none.mcp":"No project MCP configurations found.","thread.context.reading":"Reading thread context…","thread.context.size":"{bytes} B · ≈{tokens} tokens","thread.context.skills":"Skills","thread.context.system":"System Prompt","thread.context.title":"Context & Prompt","thread.context.trust":"Trust and enable","thread.new":"New thread","tools.pinned":"Pinned","tools.retry":"Retry","tour.title.bots":"Bots","viewer.board":"Board","viewer.diff":"Diff","viewer.files":"Files","viewer.mech":"Mech","viewer.review":"Review","viewer.schematic":"Schematic","viewer.solid":"3D","web.chat.answer.btn":"Answer","web.chat.answer.placeholder":"Type answer…","web.chat.answered":"Answered: {answer}","web.chat.choose":"Choose a project thread on the left to begin.","web.chat.empty":"No messages yet. Type below to start a turn.","web.chat.finished":"Finished {time}","web.chat.finished.dur":"Finished {time} · {dur}","web.chat.loading":"Loading messages…","web.chat.review.mode":"Review mode","web.chat.streaming":"Streaming…","web.clone.add.dir":"Add {dir}","web.clone.back":"Back","web.clone.change.folder":"Change folder","web.clone.cloned":"Cloned {repo} into {dest}","web.clone.cloning":"Cloning {repo} into {dest}","web.clone.copied":"Copied","web.clone.first":"First message: {text}","web.clone.folder.name":"Folder name","web.clone.go":"Clone","web.clone.loading":"Loading…","web.clone.no.folders":"No folders here","web.clone.open.project":"Open the project","web.clone.open.thread":"Open the thread","web.clone.private":"private","web.clone.repo.placeholder":"https or ssh URL, or owner/repo","web.clone.retry":"Try again","web.clone.same":"Already cloned there: it is added as it is.","web.clone.signin":"Sign in to GitHub","web.clone.signin.done":"Signed in to GitHub","web.clone.signin.enter":"Enter this code on GitHub:","web.clone.signin.wait":"Starting GitHub sign-in…","web.clone.start.thread":"Start a thread","web.clone.stopped":"Stopped cloning {repo}","web.clone.tab":"Clone from git","web.clone.up":"Up","web.clone.use.dir":"Use {dir}","web.composer.attach":"Attach image","web.composer.maximages":"At most {max} images per message.","web.composer.unsupported":"Unsupported image type: {type}","web.composer.voice":"Voice dictation","web.logout.failed":"Could not confirm sign-out. Try again.","web.pair.approve.in":"Approve on desktop or paired phone · expires in {time}","web.pair.approved":"Approved. Opening Backplane…","web.pair.cancelled":"Cancelled.","web.pair.code":"Comparison code","web.pair.denied":"Pairing request was denied.","web.pair.expired":"Pairing code expired. Request a new code to try again.","web.pair.failed":"Pairing request failed ({status})","web.pair.name":"Browser name","web.pair.nocode":"Hub did not return a comparison code.","web.pair.ratelimited":"Too many pairing attempts. Wait a moment and try again.","web.pair.request":"Request pairing","web.pair.requesting":"Requesting pairing code…","web.pair.subtitle":"Pair this browser with your hub. Approve the 6-digit code in Backplane › Settings › Devices.","web.pair.unreachable":"Could not reach the hub. Check your tailnet connection.","web.plan.awaiting":"{n} awaiting approval","web.plan.net.one":"1 net","web.plan.nets":"{n} nets","web.settings.providers":"AI providers","web.settings.providers.browser":"Connect a provider in the Backplane desktop or mobile app under Settings → Accounts."},es:{"agy.signout":"Cerrar sesión","android.hub.machines.approve":"Aprobar","android.load.earlier":"cargar anteriores","approval.dismiss":"Descartar","approval.implement":"Implementar","ask.plan":"Plan propuesto","bots.new":"Nuevo bot","bots.rooms":"Salas","bots.tab.browser":"Navegador","common.cancel":"Cancelar","common.close":"Cerrar","common.copy":"Copiar","common.delete":"Eliminar","common.refresh":"Actualizar","common.remove":"Quitar","common.save":"Guardar","composer.placeholder":"Pregunta lo que sea: @bot, >hilo, %proyecto, #sala, $skill, /btw","composer.send":"Enviar","composer.stop":"Detener","gpui.acct.connected":"Conectado","gpui.acct.not.connected":"No conectado","gpui.acct.sign.in.expired":"Sesión caducada","gpui.ask.plan.ready":"Listo para revisar","gpui.ask.plan.revise":"Revisar","gpui.ask.plan.reviseph":"¿Qué debería cambiar en el plan?","gpui.ask.plan.sendrev":"Enviar revisión","gpui.b.in.reply.to":"↩ En respuesta a: {quote}","gpui.b.replying.to":"↩ Respondiendo a: {line}","gpui.bots.recall.off":"Desactivado","gpui.bots.recall.on":"Activado","gpui.c.solid.big.next":"Cargarlo puede tardar y usar mucha memoria.","gpui.c.solid.load.big":"Cargarlo de todos modos","gpui.c.solid.loading.big":"Cargándolo de todos modos…","gpui.c.term.collapse":"Contraer","gpui.c.term.expand":"Expandir","gpui.commands":"Comandos","gpui.e.open.folder":"Abrir carpeta","gpui.filter.projects.and.threads":"Filtrar proyectos e hilos","gpui.fold.or.unfold.the.sidebar":"Plegar o desplegar la barra lateral","gpui.follow.paused":"Seguimiento en pausa","gpui.follow.wait":"Siguiendo: esperando la próxima edición del agente","gpui.gerbers":"Gerbers","gpui.improvements":"Mejoras","gpui.jump.to.a.thread.run":"Saltar a un hilo, ejecutar un comando o buscar lo dicho","gpui.mgmt.bom.dnp":"DNP","gpui.mgmt.bom.nompn":"sin MPN","gpui.mgmt.checks.all":"Todas","gpui.mgmt.checks.fix":"Corregir con agente","gpui.mgmt.checks.run":"Ejecutar","gpui.mgmt.close":"Cerrar el panel","gpui.mgmt.fab.apply":"Aplicar","gpui.mgmt.fab.changed":"Cambió desde la última vez que miraste","gpui.mgmt.fab.derived":"* calculado desde la página del fabricante (un mil en mm, un anillo desde un diámetro). Atenuado: el valor de la placa rígida, cuando la página de esta placa no dice otra cosa. Una fecha abre la página de la que se leyó.","gpui.mgmt.fab.extra":"Cuesta más","gpui.mgmt.fab.findings":"Hallazgos","gpui.mgmt.fab.free":"Precio base","gpui.mgmt.fab.judge":"Hojas de datos","gpui.mgmt.fab.limit":"Límite","gpui.mgmt.fab.readcol":"Leído","gpui.mgmt.fab.refresh":"Actualizar","gpui.mgmt.fab.reviewbtn":"Revisar","gpui.mgmt.fab.seen":"Visto","gpui.mgmt.fab.thefab":"El fabricante","gpui.mgmt.fab.use":"Usar","gpui.mgmt.life.nopart":"Sin lectura de esta pieza aún.","gpui.mgmt.life.reading":"Leyendo su historial…","gpui.mgmt.plan.addnote":"Añadir nota","gpui.mgmt.plan.all":"Aprobar todo","gpui.mgmt.plan.before":"Planificar antes de rutear","gpui.mgmt.plan.compact":"Compacto","gpui.mgmt.plan.done":"hecho","gpui.mgmt.plan.drawn":"Los corredores y planos del plan se dibujan en la placa mientras este panel está abierto. Ciérralo para ocultarlos.","gpui.mgmt.plan.edited":"Editado","gpui.mgmt.plan.elsewhere":"Un plan de ruteo para {board} espera tu aprobación","gpui.mgmt.plan.emptysub":"Las capas, corredores y planos aparecerán aquí cuando se proponga un plan.","gpui.mgmt.plan.expand":"Expandir","gpui.mgmt.plan.fit":"Ajustar","gpui.mgmt.plan.grid.all":"Todas las capas","gpui.mgmt.plan.grid.pair":"Lado a lado","gpui.mgmt.plan.grid.single":"Única","gpui.mgmt.plan.hide":"Ocultar hechos","gpui.mgmt.plan.hint":"Arrastra vértices para guiar · Clic en + del borde para insertar · Clic derecho en vértice para quitar","gpui.mgmt.plan.keysnote":"En esta versión de KiCad, aprueba desde este panel: en la vista de plan las teclas A, R y W de KiCad aún no son del plan (A abre Añadir Huella). Actualiza KiCad.","gpui.mgmt.plan.layer":"Aprobar capa","gpui.mgmt.plan.layer.short":"Capa","gpui.mgmt.plan.lock":"Bloquear","gpui.mgmt.plan.locked":"Bloqueado","gpui.mgmt.plan.noboard":"No hay plan de ruteo para esta placa.","gpui.mgmt.plan.noitems":"Sin corredores ni planos en esta capa","gpui.mgmt.plan.note.placeholder":"Nota de guiado para el router…","gpui.mgmt.plan.nothing":"Nada espera tu aprobación","gpui.mgmt.plan.offwords":"Los agentes rutean como les pidas. Actívalo para que primero propongan un plan de ruteo y ruteen solo lo que apruebes aquí.","gpui.mgmt.plan.onwords":"Antes de rutear una placa con 4 o más capas de cobre o más de 60 redes, el agente propone aquí corredores y regiones de plano. Solo rutea lo que apruebes.","gpui.mgmt.plan.reading":"Leyendo el plan de ruteo…","gpui.mgmt.plan.reference":"sobre {layer}","gpui.mgmt.plan.refused":"KiCad lo rechazó","gpui.mgmt.plan.reject":"Rechazar","gpui.mgmt.plan.rejectlayer":"Rechazar capa","gpui.mgmt.plan.reqplain":"Aprobación solicitada","gpui.mgmt.plan.requested":"Aprobación solicitada: {what}","gpui.mgmt.plan.saved":"plan guardado","gpui.mgmt.plan.show":"Mostrar hechos","gpui.mgmt.plan.st.approved":"Aprobado","gpui.mgmt.plan.st.awaiting":"Esperando revisión","gpui.mgmt.plan.st.blocked":"Bloqueado","gpui.mgmt.plan.st.empty":"Vacío","gpui.mgmt.plan.st.partial":"Parcial","gpui.mgmt.plan.st.rejected":"Rechazado","gpui.mgmt.plan.st.routed":"Ruteado","gpui.mgmt.plan.st.routing":"Ruteando","gpui.mgmt.plan.st.verified":"Verificado","gpui.mgmt.plan.stackup.short":"Apilamiento","gpui.mgmt.plan.stop":"Detener ruteo","gpui.mgmt.plan.sync":"Vincular zoom","gpui.mgmt.plan.tab":"Plan","gpui.mgmt.plan.unlock":"Desbloquear","gpui.mgmt.plan.verify":"Verificar","gpui.mgmt.plan.view.canvas":"Lienzo","gpui.mgmt.plan.view.list":"Lista","gpui.mgmt.plan.view.split":"Dividido","gpui.mgmt.plan.width":"Ancho","gpui.next.thread":"Hilo siguiente","gpui.nothing.matches":"Nada coincide","gpui.planmode.bar.always":"Modo plan — explora y propone un plan antes de editar","gpui.planmode.bar.executing":"Ejecutando el plan aprobado","gpui.planmode.bar.once":"Modo plan (1 turno) — explora y propone un plan antes de editar","gpui.planmode.bar.pending":"El plan propuesto espera revisión abajo","gpui.planmode.bar.planning":"Planificando — redactando un plan antes de editar","gpui.planmode.chip.building":"Ejecutando","gpui.planmode.chip.once":"Plan · 1t","gpui.planmode.scope.always":"Siempre","gpui.planmode.scope.once":"1 turno","gpui.planmode.tip":"Planificar antes de actuar (1 turno, siempre u off)","gpui.planmode.top.executing":"Ejecutando plan","gpui.planmode.top.once":"Plan (1 turno)","gpui.planmode.top.pending":"Revisar plan","gpui.planmode.top.planning":"Planificando","gpui.previous.thread":"Hilo anterior","gpui.rail.no.board":"Este proyecto no tiene placa","gpui.rail.no.mech":"Este proyecto no tiene piezas mecánicas","gpui.rail.no.schematic":"Este proyecto no tiene esquema","gpui.rail.split.needs.both":"La vista dividida requiere una placa y un esquema","gpui.settings.group.agents":"Agentes y herramientas","gpui.settings.group.general":"General","home.away":"El inicio ({name}) no está disponible","home.away.queued":"El inicio ({name}) no está disponible · {n} en cola","home.away.since":"El inicio ({name}) no está disponible desde las {time}","home.away.since.queued":"El inicio ({name}) no está disponible desde las {time} · {n} en cola","home.machine":"Máquina de inicio","home.move.failed":"No se pudo mover el inicio","home.move.failed.note":"No se pudo mover el inicio: {note}","home.move.here":"Hacer de esta máquina el inicio","home.moving":"Moviendo el inicio a {to}…","home.moving.step":"Moviendo el inicio a {to}: {step}","hub.back.crash":"Backplane volvió tras detenerse de forma inesperada","hub.restarting":"Reiniciando Backplane…","hub.restarting.build":"Reiniciando Backplane… (nueva compilación {build})","hub.stopped":"Backplane se detuvo","ios.hub.address.field":"Dirección del hub","menu.pin":"Fijar","menu.settle":"Cerrar","menu.unpin":"Desfijar","menu.wake":"Despertar","model.col.agent":"Agente","native.pair.connect":"Conectar","native.thread.model":"Modelo","notify.settled":"Cerrado","palette.archive":"Archivar hilo","palette.command.placeholder":"Escribe un comando o un hilo","palette.diff":"Diff: qué cambió este hilo","palette.newthread":"Nuevo hilo","palette.settings":"Ajustes","palette.terminal":"Terminal","palette.unarchive":"Desarchivar hilo","phone.unsettle":"Reabrir","provider.notice.button":"Abrir Configuración → Cuentas","provider.notice.head":"No hay ningún proveedor de IA conectado","provider.notice.senderr":"Aún no hay ningún proveedor de IA conectado. Abre Configuración → Cuentas para conectar Claude, Codex, Antigravity u otro proveedor.","provider.notice.senderr.remote":"No hay ningún proveedor de IA conectado en {machine}. Abre Configuración → Cuentas en {machine} para conectar Claude, Codex, Antigravity u otro proveedor.","provider.notice.text.none":"Conecta Claude, Codex, Antigravity u otro proveedor para empezar a chatear.","provider.notice.text.signedout":"Inicia sesión en Claude, Codex u otro proveedor en Configuración → Cuentas para empezar a chatear.","reply.action":"Responder","reply.cancel":"Cancelar respuesta","reply.to":"En respuesta a:","rooms.new":"Nueva sala","secret.you":"Tú","settings.appearance":"Apariencia","settings.lang":"Idioma","settings.lang.auto":"Automático","settings.lang.en":"English","settings.lang.es":"Español","settings.lang.ja":"日本語","settings.theme":"Tema","settings.theme.dark":"Oscuro","settings.theme.light":"Claro","sheet.rename":"Renombrar hilo","sidebar.add.project":"Añadir proyecto","sidebar.search.projects":"Buscar proyectos","thread.context.base":"Backplane","thread.context.copied":"Se copiaron las instrucciones.","thread.context.copy":"Copiar instrucciones","thread.context.disable":"Desactivar","thread.context.enable":"Activar","thread.context.index":"Índice de habilidades disponibles","thread.context.injected.label":"Instrucciones del proyecto añadidas","thread.context.instructions":"Instrucciones","thread.context.mcp":"MCP del proyecto","thread.context.native.note":"Instrucciones de inicio de Backplane. El proveedor carga los archivos nativos.","thread.context.none.instructions":"No se encontraron instrucciones del proyecto.","thread.context.none.mcp":"No se encontraron configuraciones MCP del proyecto.","thread.context.reading":"Leyendo el contexto del hilo…","thread.context.size":"{bytes} B · ≈{tokens} tokens","thread.context.skills":"Habilidades","thread.context.system":"Instrucciones del sistema","thread.context.title":"Contexto e instrucciones","thread.context.trust":"Confiar y activar","thread.new":"Nuevo hilo","tools.pinned":"Fijado","tools.retry":"Reintentar","tour.title.bots":"Bots","viewer.board":"Placa","viewer.diff":"Diff","viewer.files":"Archivos","viewer.mech":"Mech","viewer.review":"Revisión","viewer.schematic":"Esquemático","viewer.solid":"3D","web.chat.answer.btn":"Responder","web.chat.answer.placeholder":"Escribe una respuesta…","web.chat.answered":"Respondido: {answer}","web.chat.choose":"Elige un hilo de proyecto a la izquierda para empezar.","web.chat.empty":"Aún no hay mensajes. Escribe abajo para iniciar un turno.","web.chat.finished":"Terminado {time}","web.chat.finished.dur":"Terminado {time} · {dur}","web.chat.loading":"Cargando mensajes…","web.chat.review.mode":"Modo de revisión","web.chat.streaming":"Transmitiendo…","web.clone.add.dir":"Añadir {dir}","web.clone.back":"Atrás","web.clone.change.folder":"Cambiar carpeta","web.clone.cloned":"{repo} clonado en {dest}","web.clone.cloning":"Clonando {repo} en {dest}","web.clone.copied":"Copiado","web.clone.first":"Primer mensaje: {text}","web.clone.folder.name":"Nombre de la carpeta","web.clone.go":"Clonar","web.clone.loading":"Cargando…","web.clone.no.folders":"No hay carpetas aquí","web.clone.open.project":"Abrir el proyecto","web.clone.open.thread":"Abrir el hilo","web.clone.private":"privado","web.clone.repo.placeholder":"URL https o ssh, o propietario/repositorio","web.clone.retry":"Reintentar","web.clone.same":"Ya está clonado ahí: se añade tal cual.","web.clone.signin":"Iniciar sesión en GitHub","web.clone.signin.done":"Sesión iniciada en GitHub","web.clone.signin.enter":"Introduce este código en GitHub:","web.clone.signin.wait":"Iniciando sesión en GitHub…","web.clone.start.thread":"Empezar un hilo","web.clone.stopped":"Se detuvo la clonación de {repo}","web.clone.tab":"Clonar desde git","web.clone.up":"Subir","web.clone.use.dir":"Usar {dir}","web.composer.attach":"Adjuntar imagen","web.composer.maximages":"Como máximo {max} imágenes por mensaje.","web.composer.unsupported":"Tipo de imagen no compatible: {type}","web.composer.voice":"Dictado por voz","web.logout.failed":"No se pudo confirmar el cierre de sesión. Inténtalo de nuevo.","web.pair.approve.in":"Aprueba en el escritorio o en un teléfono vinculado · caduca en {time}","web.pair.approved":"Aprobado. Abriendo Backplane…","web.pair.cancelled":"Cancelado.","web.pair.code":"Código de comparación","web.pair.denied":"Se rechazó la solicitud de vinculación.","web.pair.expired":"El código de vinculación caducó. Solicita uno nuevo para intentarlo otra vez.","web.pair.failed":"Falló la solicitud de vinculación ({status})","web.pair.name":"Nombre del navegador","web.pair.nocode":"El hub no devolvió un código de comparación.","web.pair.ratelimited":"Demasiados intentos de vinculación. Espera un momento e inténtalo de nuevo.","web.pair.request":"Solicitar vinculación","web.pair.requesting":"Solicitando código de vinculación…","web.pair.subtitle":"Vincula este navegador con tu hub. Aprueba el código de 6 dígitos en Backplane › Ajustes › Dispositivos.","web.pair.unreachable":"No se pudo conectar con el hub. Comprueba tu conexión de tailnet.","web.plan.awaiting":"{n} esperando aprobación","web.plan.net.one":"1 red","web.plan.nets":"{n} redes","web.settings.providers":"Proveedores de IA","web.settings.providers.browser":"Conecta un proveedor en la aplicación de escritorio o móvil de Backplane en Configuración → Cuentas."},ja:{"agy.signout":"サインアウト","android.hub.machines.approve":"承認","android.load.earlier":"以前のメッセージを読み込む","approval.dismiss":"閉じる","approval.implement":"実装","ask.plan":"提案されたプラン","bots.new":"新しいボット","bots.rooms":"ルーム","bots.tab.browser":"ブラウザ","common.cancel":"キャンセル","common.close":"閉じる","common.copy":"コピー","common.delete":"削除","common.refresh":"更新","common.remove":"削除","common.save":"保存","composer.placeholder":"何でも質問:@bot、>thread、%project、#room、$skill、/btw","composer.send":"送信","composer.stop":"停止","gpui.acct.connected":"接続済み","gpui.acct.not.connected":"未接続","gpui.acct.sign.in.expired":"サインインの期限切れ","gpui.ask.plan.ready":"確認待ち","gpui.ask.plan.revise":"修正","gpui.ask.plan.reviseph":"計画のどこを変更しますか?","gpui.ask.plan.sendrev":"修正を送る","gpui.b.in.reply.to":"↩ 返信先:{quote}","gpui.b.replying.to":"↩ 返信中:{line}","gpui.bots.recall.off":"オフ","gpui.bots.recall.on":"オン","gpui.c.solid.big.next":"読み込みには時間と多くのメモリがかかることがあります。","gpui.c.solid.load.big":"それでも読み込む","gpui.c.solid.loading.big":"それでも読み込み中…","gpui.c.term.collapse":"折りたたむ","gpui.c.term.expand":"展開","gpui.commands":"コマンド","gpui.e.open.folder":"フォルダを開く","gpui.filter.projects.and.threads":"プロジェクトとスレッドを絞り込む","gpui.fold.or.unfold.the.sidebar":"サイドバーを折りたたむ/開く","gpui.follow.paused":"追従を一時停止中","gpui.follow.wait":"追従中: エージェントの次の編集を待っています","gpui.gerbers":"ガーバー","gpui.improvements":"改善","gpui.jump.to.a.thread.run":"スレッドへ移動、コマンドを実行、または発言を検索","gpui.mgmt.bom.dnp":"実装しない","gpui.mgmt.bom.nompn":"MPNなし","gpui.mgmt.checks.all":"すべて","gpui.mgmt.checks.fix":"エージェントに直してもらう","gpui.mgmt.checks.run":"実行","gpui.mgmt.close":"パネルを閉じる","gpui.mgmt.fab.apply":"適用","gpui.mgmt.fab.changed":"前回見てから変わったところ","gpui.mgmt.fab.derived":"* 製造元のページから計算した値です(milをmmに、径からランドを)。薄い色の項目はリジッド基板の値です(この基板のページに記載がないもの)。日付を押すと読んだページが開きます。","gpui.mgmt.fab.extra":"追加料金","gpui.mgmt.fab.findings":"指摘","gpui.mgmt.fab.free":"基本料金","gpui.mgmt.fab.judge":"データシート","gpui.mgmt.fab.limit":"項目","gpui.mgmt.fab.readcol":"読んだ日","gpui.mgmt.fab.refresh":"再読み込み","gpui.mgmt.fab.reviewbtn":"レビュー","gpui.mgmt.fab.seen":"確認済み","gpui.mgmt.fab.thefab":"製造元","gpui.mgmt.fab.use":"使う","gpui.mgmt.life.nopart":"この部品の記録はまだありません。","gpui.mgmt.life.reading":"履歴を読んでいます…","gpui.mgmt.plan.addnote":"メモを追加","gpui.mgmt.plan.all":"すべて承認","gpui.mgmt.plan.before":"配線前に計画する","gpui.mgmt.plan.compact":"標準","gpui.mgmt.plan.done":"完了","gpui.mgmt.plan.drawn":"計画の配線経路とプレーンは、このパネルを開いている間だけ基板上に表示されます。閉じると消えます。","gpui.mgmt.plan.edited":"編集済み","gpui.mgmt.plan.elsewhere":"{board}の配線計画が承認を待っています","gpui.mgmt.plan.emptysub":"計画が提案されると、レイヤー・コリドー・ベタ領域がここに表示されます。","gpui.mgmt.plan.expand":"拡大","gpui.mgmt.plan.fit":"全体表示","gpui.mgmt.plan.grid.all":"全レイヤー","gpui.mgmt.plan.grid.pair":"並べて表示","gpui.mgmt.plan.grid.single":"単一","gpui.mgmt.plan.hide":"完了を隠す","gpui.mgmt.plan.hint":"頂点をドラッグして誘導 · 辺の + をクリックで追加 · 頂点を右クリックで削除","gpui.mgmt.plan.keysnote":"このバージョンのKiCadでは、このパネルから承認してください。プランビューでのKiCadのA・R・Wキーはまだ計画のものではありません(Aはフットプリントの追加を開きます)。KiCadを更新してください。","gpui.mgmt.plan.layer":"層を承認","gpui.mgmt.plan.layer.short":"レイヤー","gpui.mgmt.plan.lock":"ロック","gpui.mgmt.plan.locked":"ロック中","gpui.mgmt.plan.noboard":"この基板の配線計画はありません。","gpui.mgmt.plan.noitems":"このレイヤーにコリドーまたはプレーンがありません","gpui.mgmt.plan.note.placeholder":"ルーターへの指示メモ…","gpui.mgmt.plan.nothing":"承認待ちはありません","gpui.mgmt.plan.offwords":"エージェントは指示どおりに配線します。オンにすると、まず配線計画を提案し、ここで承認したものだけを配線します。","gpui.mgmt.plan.onwords":"銅箔層が4層以上、またはネットが60本を超える基板では、配線の前にエージェントがここで配線経路とプレーン領域を提案します。承認したものだけを配線します。","gpui.mgmt.plan.reading":"配線計画を読んでいます…","gpui.mgmt.plan.reference":"基準 {layer}","gpui.mgmt.plan.refused":"KiCad が拒否しました","gpui.mgmt.plan.reject":"却下","gpui.mgmt.plan.rejectlayer":"レイヤーを却下","gpui.mgmt.plan.reqplain":"承認が求められています","gpui.mgmt.plan.requested":"承認が求められています: {what}","gpui.mgmt.plan.saved":"保存された計画","gpui.mgmt.plan.show":"完了を表示","gpui.mgmt.plan.st.approved":"承認済み","gpui.mgmt.plan.st.awaiting":"承認待ち","gpui.mgmt.plan.st.blocked":"ブロック","gpui.mgmt.plan.st.empty":"空","gpui.mgmt.plan.st.partial":"一部完了","gpui.mgmt.plan.st.rejected":"却下","gpui.mgmt.plan.st.routed":"配線済み","gpui.mgmt.plan.st.routing":"配線中","gpui.mgmt.plan.st.verified":"検証済み","gpui.mgmt.plan.stackup.short":"スタックアップ","gpui.mgmt.plan.stop":"配線を止める","gpui.mgmt.plan.sync":"ズーム連動","gpui.mgmt.plan.tab":"計画","gpui.mgmt.plan.unlock":"ロック解除","gpui.mgmt.plan.verify":"検証","gpui.mgmt.plan.view.canvas":"キャンバス","gpui.mgmt.plan.view.list":"リスト","gpui.mgmt.plan.view.split":"分割","gpui.mgmt.plan.width":"幅","gpui.next.thread":"次のスレッド","gpui.nothing.matches":"一致するものはありません","gpui.planmode.bar.always":"計画モード — 編集前に調査して計画を提案します","gpui.planmode.bar.executing":"承認された計画を実行しています","gpui.planmode.bar.once":"計画モード (1回) — 編集前に調査して計画を提案します","gpui.planmode.bar.pending":"提案された計画が下のレビューを待っています","gpui.planmode.bar.planning":"計画中 — 編集前の計画を作成しています","gpui.planmode.chip.building":"実行中","gpui.planmode.chip.once":"計画 · 1回","gpui.planmode.scope.always":"常時","gpui.planmode.scope.once":"1回","gpui.planmode.tip":"実行前に計画を作成 (1回・常時・オフ)","gpui.planmode.top.executing":"計画を実行中","gpui.planmode.top.once":"計画 (1回)","gpui.planmode.top.pending":"計画を確認","gpui.planmode.top.planning":"計画中","gpui.previous.thread":"前のスレッド","gpui.rail.no.board":"このプロジェクトには基板がありません","gpui.rail.no.mech":"このプロジェクトには機械部品がありません","gpui.rail.no.schematic":"このプロジェクトには回路図がありません","gpui.rail.split.needs.both":"分割表示には基板と回路図が必要です","gpui.settings.group.agents":"エージェントとツール","gpui.settings.group.general":"一般","home.away":"ホーム({name})はオフラインです","home.away.queued":"ホーム({name})はオフラインです · {n} 件待機中","home.away.since":"ホーム({name})は {time} からオフラインです","home.away.since.queued":"ホーム({name})は {time} からオフラインです · {n} 件待機中","home.machine":"ホームマシン","home.move.failed":"ホームの移動に失敗しました","home.move.failed.note":"ホームの移動に失敗しました: {note}","home.move.here":"このマシンをホームにする","home.moving":"ホームを {to} へ移動中…","home.moving.step":"ホームを {to} へ移動中: {step}","hub.back.crash":"予期せず停止したBackplaneが戻りました","hub.restarting":"Backplaneを再起動しています…","hub.restarting.build":"Backplaneを再起動しています…(新しいビルド {build})","hub.stopped":"Backplaneは停止しました","ios.hub.address.field":"ハブのアドレス","menu.pin":"ピン留め","menu.settle":"完了","menu.unpin":"ピン留めを解除","menu.wake":"再開","model.col.agent":"エージェント","native.pair.connect":"接続","native.thread.model":"モデル","notify.settled":"完了","palette.archive":"スレッドをアーカイブ","palette.command.placeholder":"コマンドまたはスレッドを入力","palette.diff":"差分:このスレッドの変更","palette.newthread":"新しいスレッド","palette.settings":"設定","palette.terminal":"ターミナル","palette.unarchive":"スレッドのアーカイブを解除","phone.unsettle":"未完了に戻す","provider.notice.button":"設定 → アカウントを開く","provider.notice.head":"AI プロバイダーが接続されていません","provider.notice.senderr":"AI プロバイダーがまだ接続されていません。設定 → アカウントを開いて、Claude、Codex、Antigravity などのプロバイダーを接続してください。","provider.notice.senderr.remote":"{machine} に AI プロバイダーが接続されていません。{machine} で設定 → アカウントを開いて、Claude、Codex、Antigravity などのプロバイダーを接続してください。","provider.notice.text.none":"チャットを始めるには、Claude、Codex、Antigravity などのプロバイダーを接続してください。","provider.notice.text.signedout":"チャットを始めるには、設定 → アカウントで Claude、Codex などのプロバイダーにサインインしてください。","reply.action":"返信","reply.cancel":"返信をやめる","reply.to":"返信先:","rooms.new":"新しいルーム","secret.you":"あなた","settings.appearance":"外観","settings.lang":"言語","settings.lang.auto":"自動","settings.lang.en":"English","settings.lang.es":"Español","settings.lang.ja":"日本語","settings.theme":"テーマ","settings.theme.dark":"ダーク","settings.theme.light":"ライト","sheet.rename":"スレッド名を変更","sidebar.add.project":"プロジェクトを追加","sidebar.search.projects":"プロジェクトを検索","thread.context.base":"Backplane","thread.context.copied":"プロンプトをコピーしました。","thread.context.copy":"プロンプトをコピー","thread.context.disable":"無効にする","thread.context.enable":"有効にする","thread.context.index":"利用可能なスキルの一覧","thread.context.injected.label":"追加されたプロジェクトの指示","thread.context.instructions":"指示","thread.context.mcp":"プロジェクトの MCP","thread.context.native.note":"Backplane が起動時に渡すプロンプトです。ネイティブファイルはプロバイダーが読み込みます。","thread.context.none.instructions":"プロジェクトの指示が見つかりません。","thread.context.none.mcp":"プロジェクトの MCP 設定が見つかりません。","thread.context.reading":"スレッドのコンテキストを読み込み中…","thread.context.size":"{bytes} B・約{tokens}トークン","thread.context.skills":"スキル","thread.context.system":"システムプロンプト","thread.context.title":"コンテキストとプロンプト","thread.context.trust":"承認して有効にする","thread.new":"新しいスレッド","tools.pinned":"固定中","tools.retry":"再試行","tour.title.bots":"ボット","viewer.board":"基板","viewer.diff":"差分","viewer.files":"ファイル","viewer.mech":"Mech","viewer.review":"レビュー","viewer.schematic":"回路図","viewer.solid":"3D","web.chat.answer.btn":"回答","web.chat.answer.placeholder":"回答を入力…","web.chat.answered":"回答済み: {answer}","web.chat.choose":"左側からプロジェクトのスレッドを選んで開始してください。","web.chat.empty":"まだメッセージはありません。下に入力して開始してください。","web.chat.finished":"完了 {time}","web.chat.finished.dur":"完了 {time} · {dur}","web.chat.loading":"メッセージを読み込んでいます…","web.chat.review.mode":"レビューモード","web.chat.streaming":"受信中…","web.clone.add.dir":"{dir} を追加","web.clone.back":"戻る","web.clone.change.folder":"フォルダを変更","web.clone.cloned":"{repo} を {dest} にクローンしました","web.clone.cloning":"{repo} を {dest} にクローン中","web.clone.copied":"コピーしました","web.clone.first":"最初のメッセージ: {text}","web.clone.folder.name":"フォルダ名","web.clone.go":"クローン","web.clone.loading":"読み込み中…","web.clone.no.folders":"フォルダがありません","web.clone.open.project":"プロジェクトを開く","web.clone.open.thread":"スレッドを開く","web.clone.private":"非公開","web.clone.repo.placeholder":"https / ssh の URL、または owner/repo","web.clone.retry":"もう一度","web.clone.same":"すでにそこにクローンされています: そのまま追加します。","web.clone.signin":"GitHub にサインイン","web.clone.signin.done":"GitHub にサインインしました","web.clone.signin.enter":"このコードを GitHub に入力してください:","web.clone.signin.wait":"GitHub のサインインを開始しています…","web.clone.start.thread":"スレッドを開始","web.clone.stopped":"{repo} のクローンを中止しました","web.clone.tab":"git からクローン","web.clone.up":"上へ","web.clone.use.dir":"{dir} を使う","web.composer.attach":"画像を添付","web.composer.maximages":"1 件のメッセージに添付できる画像は最大 {max} 枚です。","web.composer.unsupported":"未対応の画像形式です: {type}","web.composer.voice":"音声入力","web.logout.failed":"サインアウトを確認できませんでした。もう一度お試しください。","web.pair.approve.in":"デスクトップまたはペアリング済みの端末で承認してください · 有効期限 {time}","web.pair.approved":"承認されました。Backplane を開いています…","web.pair.cancelled":"キャンセルしました。","web.pair.code":"確認コード","web.pair.denied":"ペアリングのリクエストが拒否されました。","web.pair.expired":"ペアリングコードの有効期限が切れました。新しいコードをリクエストしてください。","web.pair.failed":"ペアリングのリクエストに失敗しました ({status})","web.pair.name":"ブラウザー名","web.pair.nocode":"ハブから確認コードが返されませんでした。","web.pair.ratelimited":"ペアリングの試行回数が多すぎます。しばらく待ってからやり直してください。","web.pair.request":"ペアリングをリクエスト","web.pair.requesting":"ペアリングコードをリクエストしています…","web.pair.subtitle":"このブラウザーをハブとペアリングします。Backplane › 設定 › デバイス で 6 桁のコードを承認してください。","web.pair.unreachable":"ハブに接続できませんでした。tailnet の接続を確認してください。","web.plan.awaiting":"{n} 件が承認待ち","web.plan.net.one":"1 ネット","web.plan.nets":"{n} ネット","web.settings.providers":"AI プロバイダー","web.settings.providers.browser":"Backplane のデスクトップまたはモバイルアプリの設定 → アカウントからプロバイダーを接続してください。"}};function Qn(e,t){if(!t)return e;return e.replace(/\{([a-zA-Z0-9_.-]+)\}/g,(n,i)=>Object.prototype.hasOwnProperty.call(t,i)?String(t[i]):n)}var xt=Fs(),sn=new Set,an=new Map;for(let[e,t]of Object.entries(Ct.en||{}))if(typeof t==="string"&&!an.has(t))an.set(t,e);function Fs(){let e=typeof navigator<"u"&&navigator.language?navigator.language.toLowerCase():"en";if(e.startsWith("ja"))return"ja";if(e.startsWith("es"))return"es";return"en"}function ei(){if(typeof document<"u"&&document.documentElement)document.documentElement.lang=xt}ei();function Ot(e){return sn.add(e),()=>{sn.delete(e)}}function ct(e){if(!e)return!1;let t=e.toLowerCase(),n=t.startsWith("ja")?"ja":t.startsWith("es")?"es":t.startsWith("en")?"en":"";if(!n)return!1;let i=n!==xt;if(xt=n,ei(),i)for(let s of sn)s(xt);return i}function h(e,t,n){let s=(Ct[xt]||Ct.en||{})[e]??Ct.en?.[e]??t??e;return Qn(s,n)}function pe(e){if(!e)return"";let t=an.get(e);if(!t)return e;return h(t,e)}function J(e,t="",n=""){let i=document.createElement(e);if(t)i.className=t;if(n)i.textContent=n;return i}function Fe(e,t="",n){let i=J("button",t,e);if(i.type="button",n)i.addEventListener("click",n);return i}function $s(e){let t=e.replace(/[\\/]+$/,"");if(!t)return e||"/";let n=t.split(/[\\/]/);return n[n.length-1]||t}function Gs(e,t){let n=e.includes("\\")&&!e.includes("/")?"\\":"/";return e.endsWith(n)?e+t:e+n+t}class rn{hub;actionLabel;action;root;pathInput;upBtn;listEl;errEl;actBtn;path="";parent=null;gen=0;busy=!1;constructor(e,t,n,i=[]){this.hub=e;this.actionLabel=t;this.action=n;this.root=J("div","bp-fb"),this.root.setAttribute("data-testid","folder-browser");let s=J("div","bp-fb-head");this.upBtn=Fe("↑","bp-btn-ghost bp-fb-up",()=>{if(this.parent)this.go(this.parent)}),this.upBtn.title=h("web.clone.up","Up"),this.upBtn.setAttribute("aria-label",h("web.clone.up","Up")),this.pathInput=J("input","bp-input bp-fb-path"),this.pathInput.spellcheck=!1,this.pathInput.setAttribute("data-testid","folder-path"),this.pathInput.addEventListener("keydown",(r)=>{if(r.key==="Enter"){r.preventDefault();let o=this.pathInput.value.trim();if(o)this.go(o)}}),s.append(this.upBtn,this.pathInput),this.listEl=J("div","bp-fb-list"),this.errEl=J("div","bp-ap-err bp-hidden");let a=J("div","bp-ap-foot");this.actBtn=Fe("","primary",()=>{this.run()}),this.actBtn.setAttribute("data-testid","folder-act"),a.append(...i,this.actBtn),this.root.append(s,this.listEl,this.errEl,a)}currentPath(){return this.path}async go(e){let t=++this.gen;this.setError(""),this.listEl.replaceChildren(J("div","bp-fb-empty",h("web.clone.loading","Loading…")));try{let n=await this.hub.rpc("dirs.list",{path:e});if(t!==this.gen)return;this.path=n.path,this.parent=n.parent??null,this.render(n.dirs??[])}catch(n){if(t!==this.gen)return;this.setError(pe(n instanceof Error?n.message:String(n))),this.render(null)}}refreshLocale(){this.upBtn.title=h("web.clone.up","Up"),this.updateAct()}render(e){if(this.pathInput.value=this.path,this.upBtn.disabled=!this.parent,this.updateAct(),e===null){this.listEl.replaceChildren();return}if(e.length===0){this.listEl.replaceChildren(J("div","bp-fb-empty",h("web.clone.no.folders","No folders here")));return}let t=document.createDocumentFragment();for(let n of e){let i=Fe("","bp-fb-row",()=>{this.go(Gs(this.path,n))});i.append(J("span","bp-fb-icon","▸"),J("span","bp-fb-name",n)),t.appendChild(i)}this.listEl.replaceChildren(t),this.listEl.scrollTop=0}updateAct(){this.actBtn.textContent=this.path?this.actionLabel($s(this.path)):this.actionLabel("…"),this.actBtn.disabled=!this.path||this.busy}async run(){if(!this.path||this.busy)return;this.busy=!0,this.updateAct(),this.setError("");try{await this.action(this.path)}catch(e){this.setError(pe(e instanceof Error?e.message:String(e)))}finally{this.busy=!1,this.updateAct()}}setError(e){this.errEl.textContent=e,this.errEl.classList.toggle("bp-hidden",!e)}}class on{container;host;backdrop=null;bodyEl=null;tabsEl=null;mode="folder";repoText="";repoValue="";firstText="";wantThread=!0;userParent="";nameText="";nameTouched=!1;dest=null;destGen=0;destPending=!1;destTimer=null;repos=null;reposGen=0;reposTimer=null;showSuggest=!1;suggestIdx=-1;startErr="";starting=!1;picking=!1;jobId="";job=null;specs=new Map;signin=null;copied=!1;repoInput=null;suggestEl=null;destEl=null;signinEl=null;cloneBtn=null;jobEl=null;constructor(e,t){this.container=e;this.host=t}isOpen(){return this.backdrop!==null}open(e={}){let t=this.host.hub.hasFeature("clone"),n=!e.repo&&Boolean(this.jobId)&&(!this.job||this.job.state==="running"||this.job.state==="done");if(!this.backdrop)this.build();if(!n)this.jobId="",this.job=null,this.resetForm();if(e.repo!==void 0||e.text!==void 0)this.repoText=(e.repo??"").trim(),this.repoValue="",this.firstText=(e.text??"").trim();if(this.mode=t&&(e.mode==="clone"||n)?"clone":"folder",this.render(),n){if(this.job)this.maybeGo(this.job);this.reconcile()}else if(this.mode==="clone"&&this.repoText)this.askDest()}reconcile(){let e=this.jobId;if(!e)return;this.host.hub.rpc("clone.status",{id:e}).then((t)=>this.apply(t)).catch(()=>{})}close(){if(this.reposTimer!==null)window.clearTimeout(this.reposTimer);if(this.destTimer!==null)window.clearTimeout(this.destTimer);this.reposTimer=null,this.destTimer=null,this.backdrop?.remove(),this.backdrop=null,this.bodyEl=null,this.tabsEl=null}escape(){if(this.picking){this.picking=!1,this.render();return}if(this.showSuggest){this.showSuggest=!1,this.renderSuggest();return}this.close()}refreshLocale(){if(this.backdrop)this.render()}handleFrame(e){if(e.k==="clone"){let t=e.clone;if(t)this.apply(t)}else if(e.k==="clone.repos"){if(this.isOpen()&&this.mode==="clone"&&!this.jobId)this.askRepos(0)}else if(e.k==="clone.signin"){if(!this.signin)return;let t=this.signin.state;if(this.signin=e.signin??null,this.signin?.state==="cancelled")this.signin=null;if(t!=="done"&&this.signin?.state==="done")this.askRepos(0);this.renderSignin()}}build(){let e=J("div","bp-modal-backdrop");e.setAttribute("data-testid","add-project");let t=J("div","bp-modal bp-ap"),n=J("div","bp-modal-head"),i=J("h2","",h("sidebar.add.project","Add project")),s=Fe("×","icon",()=>this.close());s.title=h("common.close","Close"),s.setAttribute("aria-label",h("common.close","Close")),n.append(i,s),this.tabsEl=J("div","bp-ap-tabs"),this.bodyEl=J("div","bp-modal-body bp-ap-body"),t.append(n,this.tabsEl,this.bodyEl),e.appendChild(t),e.addEventListener("mousedown",(a)=>{if(a.target===e)this.close()}),this.container.appendChild(e),this.backdrop=e}resetForm(){this.repoText="",this.repoValue="",this.firstText="",this.wantThread=!0,this.userParent="",this.nameText="",this.nameTouched=!1,this.dest=null,this.destPending=!1,this.repos=null,this.showSuggest=!1,this.suggestIdx=-1,this.startErr="",this.starting=!1,this.picking=!1,this.signin=null,this.copied=!1}render(){if(!this.bodyEl||!this.tabsEl||!this.backdrop)return;let e=this.backdrop.querySelector(".bp-modal-head h2");if(e)e.textContent=h("sidebar.add.project","Add project");if(this.renderTabs(),this.repoInput=null,this.suggestEl=null,this.destEl=null,this.signinEl=null,this.cloneBtn=null,this.jobEl=null,this.mode==="folder")this.renderFolder();else if(this.jobId&&this.job)this.renderJobView();else if(this.picking)this.renderPickParent();else this.renderCloneForm()}renderTabs(){if(!this.tabsEl)return;if(!this.host.hub.hasFeature("clone")){this.tabsEl.classList.add("bp-hidden");return}this.tabsEl.classList.remove("bp-hidden");let e=(t,n)=>{let i=Fe(n,"bp-ap-tab"+(this.mode===t?" on":""),()=>{if(this.mode===t)return;if(this.mode=t,this.render(),t==="clone"&&!this.jobId&&this.repos===null)this.askRepos(0)});return i.setAttribute("data-testid",`ap-tab-${t}`),i.setAttribute("aria-pressed",String(this.mode===t)),i};this.tabsEl.replaceChildren(e("folder",h("gpui.e.open.folder","Open folder")),e("clone",h("web.clone.tab","Clone from git")))}renderFolder(){let e=new rn(this.host.hub,(t)=>h("web.clone.add.dir","Add {dir}",{dir:t}),async(t)=>{let n=await this.host.hub.rpc("project.add",{path:t},30000);if(this.close(),n.project)this.host.onProjectAdded(n.project)});this.bodyEl.replaceChildren(e.root),e.go("")}renderCloneForm(){let e=this.bodyEl,t=J("div","bp-ap-form"),n=J("div","bp-ap-repo"),i=J("input","bp-input");i.type="text",i.spellcheck=!1,i.autocomplete="off",i.placeholder=h("web.clone.repo.placeholder","https or ssh URL, or owner/repo"),i.setAttribute("aria-label",h("web.clone.repo.placeholder","https or ssh URL, or owner/repo")),i.setAttribute("data-testid","clone-repo"),i.value=this.repoText,i.addEventListener("input",()=>{if(this.repoText=i.value,this.repoValue="",this.showSuggest=!0,this.suggestIdx=-1,this.startErr="",!this.nameTouched)this.nameText="";this.askRepos(200),this.askDest(250)}),i.addEventListener("focus",()=>{if(this.showSuggest=!0,this.repos===null)this.askRepos(0);else this.renderSuggest()}),i.addEventListener("blur",()=>{window.setTimeout(()=>{if(document.activeElement!==i)this.showSuggest=!1,this.renderSuggest()},120)}),i.addEventListener("keydown",(p)=>this.repoKey(p)),this.repoInput=i,this.suggestEl=J("div","bp-ap-suggest bp-hidden"),this.suggestEl.setAttribute("data-testid","clone-suggest"),n.append(i,this.suggestEl),this.signinEl=J("div","bp-ap-signin bp-hidden"),this.signinEl.setAttribute("data-testid","clone-signin"),this.destEl=J("div","bp-ap-dest"),this.destEl.setAttribute("data-testid","clone-dest");let s=J("label","bp-ap-check"),a=J("input");a.type="checkbox",a.checked=this.wantThread,a.setAttribute("data-testid","clone-thread"),a.addEventListener("change",()=>{this.wantThread=a.checked}),s.append(a,J("span","",h("web.clone.start.thread","Start a thread")));let r=[n,this.signinEl,this.destEl,s];if(this.firstText)r.push(J("div","bp-ap-first bp-dim",h("web.clone.first","First message: {text}",{text:this.firstText})));let o=J("div","bp-ap-err"+(this.startErr?"":" bp-hidden"),this.startErr);o.setAttribute("data-testid","clone-start-error");let l=J("div","bp-ap-foot");this.cloneBtn=Fe(h("web.clone.go","Clone"),"primary",()=>{this.startClone()}),this.cloneBtn.setAttribute("data-testid","clone-go"),l.append(this.cloneBtn),r.push(o,l),t.append(...r),e.replaceChildren(t),this.renderSuggest(),this.renderSignin(),this.renderDest(),window.setTimeout(()=>{if(this.repoInput===i&&!this.repoText)i.focus()},0)}repoKey(e){let t=this.repos?.repos??[],n=this.showSuggest&&t.length>0;if(e.key==="ArrowDown"&&n)e.preventDefault(),this.suggestIdx=Math.min(t.length-1,this.suggestIdx+1),this.renderSuggest();else if(e.key==="ArrowUp"&&n)e.preventDefault(),this.suggestIdx=Math.max(-1,this.suggestIdx-1),this.renderSuggest();else if(e.key==="Enter"){e.preventDefault();let i=n&&this.suggestIdx>=0?t[this.suggestIdx]:void 0;if(i)this.pickRepo(i);else if(this.canStart())this.startClone()}}pickRepo(e){if(this.repoText=e.name,this.repoValue=e.value,this.showSuggest=!1,this.suggestIdx=-1,this.startErr="",!this.nameTouched)this.nameText="";if(this.repoInput)this.repoInput.value=e.name;this.renderSuggest(),this.askDest()}repoArg(){return this.repoValue||this.repoText.trim()}askRepos(e){if(this.reposTimer!==null)window.clearTimeout(this.reposTimer);this.reposTimer=window.setTimeout(()=>{this.reposTimer=null;let t=++this.reposGen,n=this.repoValue?"":this.repoText.trim();this.host.hub.rpc("clone.repos",{q:n,limit:12},30000).then((i)=>{if(t!==this.reposGen)return;this.repos=i,this.renderSuggest(),this.renderSignin()}).catch(()=>{if(t!==this.reposGen)return;this.repos={repos:[],state:"error",hint:"Couldn't list your GitHub repositories."},this.renderSuggest()})},e)}renderSuggest(){let e=this.suggestEl;if(!e)return;let t=this.repos,n=t?.repos??[],i=[];if(this.showSuggest&&!this.repoValue){if(n.forEach((s,a)=>{let r=Fe("","bp-ap-sug"+(a===this.suggestIdx?" active":""));r.setAttribute("data-testid","clone-suggestion"),r.addEventListener("mousedown",(l)=>l.preventDefault()),r.addEventListener("click",()=>this.pickRepo(s));let o=J("div","bp-ap-sug-top");if(o.append(J("span","bp-ap-sug-name",s.name)),s.private)o.append(J("span","bp-ap-tag",h("web.clone.private","private")));if(r.append(o),s.description)r.append(J("div","bp-ap-sug-desc",s.description));i.push(r)}),n.length===0&&t){if(t.loading)i.push(J("div","bp-ap-sug-note",h("web.clone.loading","Loading…")));else if(t.hint){let s=J("div","bp-ap-sug-note");if(s.append(J("span","",pe(t.hint))),t.state==="signedout"){let a=Fe(h("web.clone.signin","Sign in to GitHub"),"bp-btn-line",()=>{this.startSignin()});a.addEventListener("mousedown",(r)=>r.preventDefault()),a.setAttribute("data-testid","clone-signin-btn"),s.append(a)}i.push(s)}}}e.replaceChildren(...i),e.classList.toggle("bp-hidden",i.length===0)}askDest(e=0){if(this.destTimer!==null)window.clearTimeout(this.destTimer);this.destPending=!0,this.updateCloneBtn(),this.destTimer=window.setTimeout(()=>{this.destTimer=null;let t=++this.destGen,n=this.repoArg();if(!n){this.dest=null,this.destPending=!1,this.renderDest();return}let i={repo:n};if(this.userParent)i.parent=this.userParent;if(this.nameTouched&&this.nameText.trim())i.name=this.nameText.trim();else if(this.userParent)i.name="";this.host.hub.rpc("clone.dest",i).then((s)=>{if(t!==this.destGen)return;if(this.dest=s,this.destPending=!1,!this.nameTouched&&s.folder)this.nameText=s.folder;this.renderDest()}).catch((s)=>{if(t!==this.destGen)return;this.dest={ok:!1,error:s instanceof Error?s.message:String(s)},this.destPending=!1,this.renderDest()})},e)}renderDest(){let e=this.destEl;if(!e)return;let t=this.dest,n=[];if(t&&!t.repo){if(t.error&&this.repoText.trim())n.push(this.errLine(pe(t.error)))}else if(t){let r=J("div","bp-ap-where"),o=J("span","bp-ap-dest-path",t.destShown||t.dest||t.defaultParentShown||"");o.setAttribute("data-testid","clone-dest-shown");let l=Fe(h("web.clone.change.folder","Change folder"),"bp-btn-line",()=>{this.picking=!0,this.render()});l.setAttribute("data-testid","clone-change-folder"),r.append(o,l),n.push(r);let p=J("label","bp-ap-name");p.append(J("span","bp-ap-lbl",h("web.clone.folder.name","Folder name")));let c=J("input","bp-input");if(c.type="text",c.spellcheck=!1,c.value=this.nameText,c.setAttribute("data-testid","clone-name"),c.addEventListener("input",()=>{this.nameText=c.value,this.nameTouched=c.value.trim()!=="",this.startErr="",this.askDest(250)}),c.addEventListener("keydown",(u)=>{if(u.key==="Enter"&&this.canStart())u.preventDefault(),this.startClone()}),p.append(c),n.push(p),!t.ok&&t.error)n.push(this.errLine(pe(t.error)));else if(t.same)n.push(J("div","bp-ap-note bp-dim",h("web.clone.same","Already cloned there: it is added as it is.")))}let i=document.activeElement,s=i&&e.contains(i)&&i.getAttribute("data-testid")==="clone-name",a=s?i.selectionStart:null;if(e.replaceChildren(...n),e.classList.toggle("bp-hidden",n.length===0),s){let r=e.querySelector('[data-testid="clone-name"]');if(r){if(r.focus(),a!==null)r.setSelectionRange(a,a)}}this.updateCloneBtn()}errLine(e){let t=J("div","bp-ap-err",e);return t.setAttribute("data-testid","clone-dest-error"),t}canStart(){return Boolean(this.dest?.ok&&this.dest.repo&&!this.destPending&&!this.starting&&this.repoArg())}updateCloneBtn(){if(this.cloneBtn)this.cloneBtn.disabled=!this.canStart()}renderPickParent(){let e=this.dest?.parent||this.userParent||this.dest?.defaultParent||"",t=Fe(h("web.clone.back","Back"),"bp-btn-line",()=>{this.picking=!1,this.render()}),n=new rn(this.host.hub,(i)=>h("web.clone.use.dir","Use {dir}",{dir:i}),async(i)=>{this.userParent=i,this.picking=!1,this.render(),this.askDest()},[t]);this.bodyEl.replaceChildren(n.root),n.go(e)}async startClone(){if(!this.canStart()||!this.dest)return;this.starting=!0,this.startErr="",this.updateCloneBtn();let e={repo:this.repoArg(),thread:this.wantThread,text:this.firstText},t=nn();this.jobId=t,this.job=null,this.specs.set(t,e);try{let n=await this.host.hub.rpc("clone.start",{id:t,repo:e.repo,parent:this.dest.parent??"",name:this.dest.folder??this.nameText.trim(),thread:e.thread,text:e.text});this.starting=!1,this.apply(n)}catch(n){this.starting=!1;let i=pe(n instanceof Error?n.message:String(n));if(this.jobId===t&&!this.job){let s=await this.host.hub.rpc("clone.status",{id:t}).catch(()=>null);if(s&&s.id===t){this.apply(s);return}}if(this.jobId===t&&!this.job){if(this.jobId="",this.startErr=i,this.mode==="clone")this.render()}}}async retry(e,t){let n=this.specs.get(e.id)??{repo:e.origin||e.repo||"",thread:!0,text:""},i=nn(),s=this.jobId;this.jobId=i,this.specs.set(i,n),t.disabled=!0;try{let a=await this.host.hub.rpc("clone.start",{id:i,repo:n.repo,dest:e.dest??"",thread:n.thread,text:n.text});this.apply(a)}catch(a){let r=pe(a instanceof Error?a.message:String(a));if(this.jobId!==i)return;if(!this.job||this.job.id!==i){let o=await this.host.hub.rpc("clone.status",{id:i}).catch(()=>null);if(o&&o.id===i){this.apply(o);return}}if(this.jobId===i&&(!this.job||this.job.id!==i))this.jobId=s,t.disabled=!1,this.showJobError(r)}}apply(e){if(!e||e.id!==this.jobId)return;if(!Xn(this.job,e))return;if(this.job=e,this.copied=!1,this.isOpen()&&this.mode==="clone")if(this.jobEl&&this.jobEl.isConnected)this.renderJob();else this.render();this.maybeGo(e)}maybeGo(e){if(this.isOpen()&&e.id===this.jobId&&Zn(e))this.goTo(e)}renderJobView(){this.jobEl=J("div","bp-ap-job"),this.jobEl.setAttribute("data-testid","clone-job"),this.signinEl=J("div","bp-ap-signin bp-hidden"),this.signinEl.setAttribute("data-testid","clone-signin"),this.bodyEl.replaceChildren(this.jobEl,this.signinEl),this.renderJob(),this.renderSignin()}renderJob(){let e=this.jobEl,t=this.job;if(!e||!t)return;let n=t.destShown||t.dest||"",i=t.repo||"",s=t.state==="done"?h("web.clone.cloned","Cloned {repo} into {dest}",{repo:i,dest:n}):t.state==="cancelled"?h("web.clone.stopped","Stopped cloning {repo}",{repo:i}):h("web.clone.cloning","Cloning {repo} into {dest}",{repo:i,dest:n}),a=[J("div","bp-ap-job-title",s)];if(t.state==="running"){let r=J("div","bp-ap-phase",pe(t.phase||""));r.setAttribute("data-testid","clone-phase");let o=J("div","bp-ap-bar"+(typeof t.pct==="number"?"":" indeterminate")),l=J("div","bp-ap-bar-fill");if(typeof t.pct==="number")l.style.width=`${Math.max(0,Math.min(100,t.pct))}%`;if(o.appendChild(l),o.setAttribute("role","progressbar"),typeof t.pct==="number")o.setAttribute("aria-valuenow",String(t.pct));if(a.push(r,o),t.detail)a.push(J("div","bp-ap-detail bp-dim",t.detail));let p=J("div","bp-ap-foot"),c=Fe(h("common.cancel","Cancel"),"bp-btn-line",()=>{this.host.hub.rpc("clone.cancel",{id:t.id}).then((u)=>this.apply(u)).catch(()=>{})});c.setAttribute("data-testid","clone-cancel"),p.append(c),a.push(p)}else if(t.state==="failed"||t.state==="cancelled"){if(t.state==="failed"&&t.error){let p=J("div","bp-ap-err",pe(t.error));p.setAttribute("data-testid","clone-error"),a.push(p)}let r=J("div","bp-ap-foot"),o=Fe(h("web.clone.back","Back"),"bp-btn-line",()=>{this.jobId="",this.job=null,this.signin=null,this.render(),this.askDest()});if(r.append(o),t.signin){let p=Fe(h("web.clone.signin","Sign in to GitHub"),"bp-btn-line",()=>{this.startSignin()});p.setAttribute("data-testid","clone-signin-btn"),r.append(p)}let l=Fe(h("web.clone.retry","Try again"),"primary",()=>{this.retry(t,l)});l.setAttribute("data-testid","clone-retry"),r.append(l),a.push(r)}else if(t.state==="done"){let r=t.notes??[];if(r.length>0){let c=J("ul","bp-ap-notes");c.setAttribute("data-testid","clone-notes");for(let u of r)c.appendChild(J("li","",pe(u)));a.push(c)}let o=J("div","bp-ap-foot"),l=t.thread?h("web.clone.open.thread","Open the thread"):h("web.clone.open.project","Open the project"),p=Fe(l,"primary",()=>this.goTo(t));p.setAttribute("data-testid","clone-open"),o.append(p),a.push(o)}e.replaceChildren(...a)}showJobError(e){if(!this.jobEl)return;this.jobEl.querySelector(".bp-ap-job-err")?.remove();let t=J("div","bp-ap-err bp-ap-job-err",e);this.jobEl.appendChild(t)}goTo(e){this.jobId="",this.job=null,this.close(),this.host.onCloneDone(e)}async startSignin(){this.signin={state:"starting"},this.copied=!1,this.renderSignin();try{let e=await this.host.hub.rpc("clone.signin",{restart:!0},30000);if(!this.signin||this.signin.state==="starting")this.signin=e}catch(e){this.signin={state:"failed",error:e instanceof Error?e.message:String(e)}}if(this.signin?.state==="done")this.askRepos(0);this.renderSignin()}renderSignin(){let e=this.signinEl;if(!e)return;let t=this.signin,n=[];if(t&&t.state){if(t.state==="starting"||t.state==="waiting"&&!t.code)n.push(J("div","bp-dim",h("web.clone.signin.wait","Starting GitHub sign-in…")));else if(t.state==="waiting"){n.push(J("div","",h("web.clone.signin.enter","Enter this code on GitHub:")));let i=J("div","bp-ap-code-row"),s=J("span","bp-ap-code",t.code||"");s.setAttribute("data-testid","clone-signin-code");let a=Fe(this.copied?h("web.clone.copied","Copied"):h("common.copy","Copy"),"bp-btn-line",()=>{navigator.clipboard?.writeText(t.code||"").then(()=>{this.copied=!0,this.renderSignin()}).catch(()=>{})});if(i.append(s,a),n.push(i),t.url){let r=J("a","bp-ap-link",t.url);r.href=t.url,r.target="_blank",r.rel="noopener noreferrer",r.setAttribute("data-testid","clone-signin-url"),n.push(r)}}else if(t.state==="done")n.push(J("div","bp-ok",h("web.clone.signin.done","Signed in to GitHub")));else if(t.state==="failed")n.push(J("div","bp-ap-err",pe(t.error||"")))}e.replaceChildren(...n),e.classList.toggle("bp-hidden",n.length===0)}}function Os(e){try{let t=new URL(e,window.location.origin);if(t.protocol==="https:"||t.protocol==="http:")return t.href}catch{}return null}function kt(e,t){let n=/(`[^`]+`|\*\*[^*]+\*\*|\*[^*]+\*|\[([^\]]+)\]\(([^)]+)\))/g,i=0,s;while((s=n.exec(t))!==null){if(s.index>i)e.appendChild(document.createTextNode(t.slice(i,s.index)));let a=s[0];if(a.startsWith("`")&&a.endsWith("`")){let r=document.createElement("code");r.className="bp-code-inline",r.textContent=a.slice(1,-1),e.appendChild(r)}else if(a.startsWith("**")&&a.endsWith("**")){let r=document.createElement("strong");r.textContent=a.slice(2,-2),e.appendChild(r)}else if(a.startsWith("*")&&a.endsWith("*")){let r=document.createElement("em");r.textContent=a.slice(1,-1),e.appendChild(r)}else if(a.startsWith("[")){let r=s[2]??"",o=Os(s[3]??"");if(o){let l=document.createElement("a");l.href=o,l.target="_blank",l.rel="noopener noreferrer",l.textContent=r,e.appendChild(l)}else e.appendChild(document.createTextNode(r))}i=n.lastIndex}if(i=(e.ended??0)}function oi(e){if(e.state!=="done")return!1;if(typeof e.hold==="boolean")return!e.hold;return(e.notes??[]).length===0}var Mt={en:{"agy.signout":"Sign out","android.hub.machines.approve":"Approve","android.load.earlier":"load earlier","approval.dismiss":"Dismiss","approval.implement":"Implement","ask.plan":"Proposed plan","bots.new":"New bot","bots.rooms":"Rooms","bots.tab.browser":"Browser","common.cancel":"Cancel","common.close":"Close","common.copy":"Copy","common.delete":"Delete","common.refresh":"Refresh","common.remove":"Remove","common.save":"Save","composer.model.tip":"Choose the model and effort","composer.placeholder":"Ask anything: @bot, >thread, %project, #room, $skill, /btw","composer.send":"Send","composer.stop":"Stop","gpui.acct.connected":"Connected","gpui.acct.not.connected":"Not connected","gpui.acct.sign.in.expired":"Sign-in expired","gpui.ask.plan.ready":"Ready for review","gpui.ask.plan.revise":"Revise","gpui.ask.plan.reviseph":"What should change in the plan?","gpui.ask.plan.sendrev":"Send revision","gpui.b.in.reply.to":"↩ In reply to: {quote}","gpui.b.replying.to":"↩ Replying to: {line}","gpui.bots.recall.off":"Off","gpui.bots.recall.on":"On","gpui.c.solid.big.next":"Loading it may take a while and a lot of memory.","gpui.c.solid.load.big":"Load it anyway","gpui.c.solid.loading.big":"Loading it anyway…","gpui.c.term.collapse":"Collapse","gpui.c.term.expand":"Expand","gpui.commands":"Commands","gpui.e.open.folder":"Open folder","gpui.filter.projects.and.threads":"Filter projects and threads","gpui.fold.or.unfold.the.sidebar":"Fold or unfold the sidebar","gpui.follow.paused":"Following paused","gpui.follow.wait":"Following: waiting for the agent's next edit","gpui.gerbers":"Gerbers","gpui.improvements":"Improvements","gpui.jump.to.a.thread.run":"Jump to a thread, run a command or find what was said","gpui.mgmt.bom.dnp":"DNP","gpui.mgmt.bom.nompn":"no MPN","gpui.mgmt.checks.all":"All","gpui.mgmt.checks.fix":"Fix with agent","gpui.mgmt.checks.run":"Run","gpui.mgmt.close":"Close the panel","gpui.mgmt.fab.apply":"Apply","gpui.mgmt.fab.changed":"Changed since you last looked","gpui.mgmt.fab.derived":"* worked out from the fab's page (a mil in mm, a ring from a diameter). Dimmed: the rigid board's value, where this board's page says nothing else. A date opens the page it was read from.","gpui.mgmt.fab.extra":"Costs more","gpui.mgmt.fab.findings":"Findings","gpui.mgmt.fab.free":"Base price","gpui.mgmt.fab.judge":"Datasheets","gpui.mgmt.fab.limit":"Limit","gpui.mgmt.fab.readcol":"Read","gpui.mgmt.fab.refresh":"Refresh","gpui.mgmt.fab.reviewbtn":"Review","gpui.mgmt.fab.seen":"Seen","gpui.mgmt.fab.thefab":"The fab","gpui.mgmt.fab.use":"Use","gpui.mgmt.life.nopart":"No reading of this part yet.","gpui.mgmt.life.reading":"Reading its history…","gpui.mgmt.plan.addnote":"Add note","gpui.mgmt.plan.all":"Approve all","gpui.mgmt.plan.before":"Plan before routing","gpui.mgmt.plan.compact":"Compact","gpui.mgmt.plan.done":"done","gpui.mgmt.plan.drawn":"The plan's corridors and planes are drawn on the board while this panel is open. Close it to hide them.","gpui.mgmt.plan.edited":"Edited","gpui.mgmt.plan.elsewhere":"A routing plan for {board} awaits your approval","gpui.mgmt.plan.emptysub":"Layers, corridors, and planes appear here once a plan is proposed.","gpui.mgmt.plan.expand":"Expand","gpui.mgmt.plan.fit":"Fit","gpui.mgmt.plan.grid.all":"All layers","gpui.mgmt.plan.grid.pair":"Side by side","gpui.mgmt.plan.grid.single":"Single","gpui.mgmt.plan.hide":"Hide done","gpui.mgmt.plan.hint":"Drag waypoints to steer · Click + on edge to insert · Right-click vertex to remove","gpui.mgmt.plan.keysnote":"On this KiCad version, approve from this panel: in plan view KiCad's A, R and W keys aren't the plan's yet (A opens Add Footprint). Update KiCad.","gpui.mgmt.plan.layer":"Approve layer","gpui.mgmt.plan.layer.short":"Layer","gpui.mgmt.plan.lock":"Lock","gpui.mgmt.plan.locked":"Locked","gpui.mgmt.plan.noboard":"No routing plan for this board.","gpui.mgmt.plan.noitems":"No corridors or planes on this layer","gpui.mgmt.plan.note.placeholder":"Steering note for router…","gpui.mgmt.plan.nothing":"Nothing awaits your approval","gpui.mgmt.plan.offwords":"Agents route as you ask. Turn it on to have them propose a routing plan first and route only what you approve here.","gpui.mgmt.plan.onwords":"Before routing a board with 4 or more copper layers or more than 60 nets, the agent proposes corridors and plane regions here. It routes only what you approve.","gpui.mgmt.plan.reading":"Reading the routing plan…","gpui.mgmt.plan.reference":"over {layer}","gpui.mgmt.plan.refused":"KiCad refused","gpui.mgmt.plan.reject":"Reject","gpui.mgmt.plan.rejectlayer":"Reject layer","gpui.mgmt.plan.reqplain":"Approval requested","gpui.mgmt.plan.requested":"Approval requested: {what}","gpui.mgmt.plan.saved":"saved plan","gpui.mgmt.plan.show":"Show done","gpui.mgmt.plan.st.approved":"Approved","gpui.mgmt.plan.st.awaiting":"Awaiting review","gpui.mgmt.plan.st.blocked":"Blocked","gpui.mgmt.plan.st.empty":"Empty","gpui.mgmt.plan.st.partial":"Partial","gpui.mgmt.plan.st.rejected":"Rejected","gpui.mgmt.plan.st.routed":"Routed","gpui.mgmt.plan.st.routing":"Routing","gpui.mgmt.plan.st.verified":"Verified","gpui.mgmt.plan.stackup.short":"Stackup","gpui.mgmt.plan.stop":"Stop routing","gpui.mgmt.plan.sync":"Link zoom","gpui.mgmt.plan.tab":"Plan","gpui.mgmt.plan.unlock":"Unlock","gpui.mgmt.plan.verify":"Verify","gpui.mgmt.plan.view.canvas":"Canvas","gpui.mgmt.plan.view.list":"List","gpui.mgmt.plan.view.split":"Split","gpui.mgmt.plan.width":"Width","gpui.next.thread":"Next thread","gpui.no.models":"No models","gpui.nothing.matches":"Nothing matches","gpui.picker.favorite.add":"Add to favorites","gpui.picker.favorite.remove":"Remove from favorites","gpui.picker.favorites":"Favorites","gpui.planmode.bar.always":"Plan mode — explores and proposes a plan before editing","gpui.planmode.bar.executing":"Building the approved plan","gpui.planmode.bar.once":"Plan mode (1 turn) — explores and proposes a plan before editing","gpui.planmode.bar.pending":"Proposed plan awaits review below","gpui.planmode.bar.planning":"Planning — drafting a plan before edits","gpui.planmode.chip.building":"Building","gpui.planmode.chip.once":"Plan · 1t","gpui.planmode.scope.always":"Always","gpui.planmode.scope.once":"1 turn","gpui.planmode.tip":"Plan before acting (1 turn, always, or off)","gpui.planmode.top.executing":"Building plan","gpui.planmode.top.once":"Plan (1 turn)","gpui.planmode.top.pending":"Review plan","gpui.planmode.top.planning":"Planning","gpui.previous.thread":"Previous thread","gpui.rail.no.board":"No board in this project","gpui.rail.no.mech":"No mechanical parts in this project","gpui.rail.no.schematic":"No schematic in this project","gpui.rail.split.needs.both":"Split needs a board and a schematic","gpui.search.models":"Search models","gpui.settings.group.agents":"Agents and tools","gpui.settings.group.general":"General","home.away":"Home ({name}) is away","home.away.queued":"Home ({name}) is away · {n} queued","home.away.since":"Home ({name}) is away since {time}","home.away.since.queued":"Home ({name}) is away since {time} · {n} queued","home.machine":"Home machine","home.move.failed":"Home move failed","home.move.failed.note":"Home move failed: {note}","home.move.here":"Make this machine the home","home.moving":"Moving home to {to}…","home.moving.step":"Moving home to {to}: {step}","hub.back.crash":"Backplane is back after it stopped unexpectedly","hub.restarting":"Restarting Backplane…","hub.restarting.build":"Restarting Backplane… (new build {build})","hub.stopped":"Backplane stopped","ios.hub.address.field":"Hub address","menu.pin":"Pin","menu.settle":"Settle","menu.unpin":"Unpin","menu.wake":"Wake","model.col.agent":"Agent","model.col.effort":"Effort","native.pair.connect":"Connect","native.thread.model":"Model","notify.settled":"Settled","palette.archive":"Archive thread","palette.command.placeholder":"Type a command or a thread","palette.diff":"Diff: what this thread changed","palette.newthread":"New thread","palette.settings":"Settings","palette.terminal":"Terminal","palette.unarchive":"Unarchive thread","phone.unsettle":"Unsettle","provider.notice.button":"Open Settings → Accounts","provider.notice.head":"No AI provider connected","provider.notice.senderr":"No AI provider connected yet. Open Settings → Accounts to connect Claude, Codex, Antigravity, or another provider.","provider.notice.senderr.remote":"No AI provider connected on {machine}. Open Settings → Accounts on {machine} to connect Claude, Codex, Antigravity, or another provider.","provider.notice.text.none":"Connect Claude, Codex, Antigravity, or another provider to start chatting.","provider.notice.text.signedout":"Sign in to Claude, Codex, or another provider in Settings → Accounts to start chatting.","reply.action":"Reply","reply.cancel":"Cancel reply","reply.to":"In reply to:","rooms.new":"New room","secret.you":"You","settings.appearance":"Appearance","settings.lang":"Language","settings.lang.auto":"Automatic","settings.lang.en":"English","settings.lang.es":"Español","settings.lang.ja":"日本語","settings.theme":"Theme","settings.theme.dark":"Dark","settings.theme.light":"Light","sheet.rename":"Rename thread","sidebar.add.project":"Add project","sidebar.search.projects":"Search projects","thread.context.base":"Backplane","thread.context.copied":"Prompt copied.","thread.context.copy":"Copy prompt","thread.context.disable":"Disable","thread.context.enable":"Enable","thread.context.index":"Available skills index","thread.context.injected.label":"Injected project instructions","thread.context.instructions":"Instructions","thread.context.mcp":"Project MCPs","thread.context.native.note":"Backplane’s launch prompt. Native files are loaded by the provider.","thread.context.none.instructions":"No project instructions found.","thread.context.none.mcp":"No project MCP configurations found.","thread.context.reading":"Reading thread context…","thread.context.size":"{bytes} B · ≈{tokens} tokens","thread.context.skills":"Skills","thread.context.system":"System Prompt","thread.context.title":"Context & Prompt","thread.context.trust":"Trust and enable","thread.new":"New thread","tools.pinned":"Pinned","tools.retry":"Retry","tour.title.bots":"Bots","viewer.board":"Board","viewer.diff":"Diff","viewer.files":"Files","viewer.mech":"Mech","viewer.review":"Review","viewer.schematic":"Schematic","viewer.solid":"3D","web.chat.answer.btn":"Answer","web.chat.answer.placeholder":"Type answer…","web.chat.answered":"Answered: {answer}","web.chat.choose":"Choose a project thread on the left to begin.","web.chat.empty":"No messages yet. Type below to start a turn.","web.chat.finished":"Finished {time}","web.chat.finished.dur":"Finished {time} · {dur}","web.chat.loading":"Loading messages…","web.chat.review.mode":"Review mode","web.chat.streaming":"Streaming…","web.clone.add.dir":"Add {dir}","web.clone.back":"Back","web.clone.change.folder":"Change folder","web.clone.cloned":"Cloned {repo} into {dest}","web.clone.cloning":"Cloning {repo} into {dest}","web.clone.copied":"Copied","web.clone.first":"First message: {text}","web.clone.folder.name":"Folder name","web.clone.go":"Clone","web.clone.loading":"Loading…","web.clone.no.folders":"No folders here","web.clone.open.project":"Open the project","web.clone.open.thread":"Open the thread","web.clone.private":"private","web.clone.repo.placeholder":"https or ssh URL, or owner/repo","web.clone.retry":"Try again","web.clone.same":"Already cloned there: it is added as it is.","web.clone.signin":"Sign in to GitHub","web.clone.signin.done":"Signed in to GitHub","web.clone.signin.enter":"Enter this code on GitHub:","web.clone.signin.wait":"Starting GitHub sign-in…","web.clone.start.thread":"Start a thread","web.clone.stopped":"Stopped cloning {repo}","web.clone.tab":"Clone from git","web.clone.up":"Up","web.clone.use.dir":"Use {dir}","web.composer.attach":"Attach image","web.composer.maximages":"At most {max} images per message.","web.composer.unsupported":"Unsupported image type: {type}","web.composer.voice":"Voice dictation","web.logout.failed":"Could not confirm sign-out. Try again.","web.pair.approve.in":"Approve on desktop or paired phone · expires in {time}","web.pair.approved":"Approved. Opening Backplane…","web.pair.cancelled":"Cancelled.","web.pair.code":"Comparison code","web.pair.denied":"Pairing request was denied.","web.pair.expired":"Pairing code expired. Request a new code to try again.","web.pair.failed":"Pairing request failed ({status})","web.pair.name":"Browser name","web.pair.nocode":"Hub did not return a comparison code.","web.pair.ratelimited":"Too many pairing attempts. Wait a moment and try again.","web.pair.request":"Request pairing","web.pair.requesting":"Requesting pairing code…","web.pair.subtitle":"Pair this browser with your hub. Approve the 6-digit code in Backplane › Settings › Devices.","web.pair.unreachable":"Could not reach the hub. Check your tailnet connection.","web.plan.awaiting":"{n} awaiting approval","web.plan.net.one":"1 net","web.plan.nets":"{n} nets","web.settings.providers":"AI providers","web.settings.providers.browser":"Connect a provider in the Backplane desktop or mobile app under Settings → Accounts."},es:{"agy.signout":"Cerrar sesión","android.hub.machines.approve":"Aprobar","android.load.earlier":"cargar anteriores","approval.dismiss":"Descartar","approval.implement":"Implementar","ask.plan":"Plan propuesto","bots.new":"Nuevo bot","bots.rooms":"Salas","bots.tab.browser":"Navegador","common.cancel":"Cancelar","common.close":"Cerrar","common.copy":"Copiar","common.delete":"Eliminar","common.refresh":"Actualizar","common.remove":"Quitar","common.save":"Guardar","composer.model.tip":"Elegir el modelo y el esfuerzo","composer.placeholder":"Pregunta lo que sea: @bot, >hilo, %proyecto, #sala, $skill, /btw","composer.send":"Enviar","composer.stop":"Detener","gpui.acct.connected":"Conectado","gpui.acct.not.connected":"No conectado","gpui.acct.sign.in.expired":"Sesión caducada","gpui.ask.plan.ready":"Listo para revisar","gpui.ask.plan.revise":"Revisar","gpui.ask.plan.reviseph":"¿Qué debería cambiar en el plan?","gpui.ask.plan.sendrev":"Enviar revisión","gpui.b.in.reply.to":"↩ En respuesta a: {quote}","gpui.b.replying.to":"↩ Respondiendo a: {line}","gpui.bots.recall.off":"Desactivado","gpui.bots.recall.on":"Activado","gpui.c.solid.big.next":"Cargarlo puede tardar y usar mucha memoria.","gpui.c.solid.load.big":"Cargarlo de todos modos","gpui.c.solid.loading.big":"Cargándolo de todos modos…","gpui.c.term.collapse":"Contraer","gpui.c.term.expand":"Expandir","gpui.commands":"Comandos","gpui.e.open.folder":"Abrir carpeta","gpui.filter.projects.and.threads":"Filtrar proyectos e hilos","gpui.fold.or.unfold.the.sidebar":"Plegar o desplegar la barra lateral","gpui.follow.paused":"Seguimiento en pausa","gpui.follow.wait":"Siguiendo: esperando la próxima edición del agente","gpui.gerbers":"Gerbers","gpui.improvements":"Mejoras","gpui.jump.to.a.thread.run":"Saltar a un hilo, ejecutar un comando o buscar lo dicho","gpui.mgmt.bom.dnp":"DNP","gpui.mgmt.bom.nompn":"sin MPN","gpui.mgmt.checks.all":"Todas","gpui.mgmt.checks.fix":"Corregir con agente","gpui.mgmt.checks.run":"Ejecutar","gpui.mgmt.close":"Cerrar el panel","gpui.mgmt.fab.apply":"Aplicar","gpui.mgmt.fab.changed":"Cambió desde la última vez que miraste","gpui.mgmt.fab.derived":"* calculado desde la página del fabricante (un mil en mm, un anillo desde un diámetro). Atenuado: el valor de la placa rígida, cuando la página de esta placa no dice otra cosa. Una fecha abre la página de la que se leyó.","gpui.mgmt.fab.extra":"Cuesta más","gpui.mgmt.fab.findings":"Hallazgos","gpui.mgmt.fab.free":"Precio base","gpui.mgmt.fab.judge":"Hojas de datos","gpui.mgmt.fab.limit":"Límite","gpui.mgmt.fab.readcol":"Leído","gpui.mgmt.fab.refresh":"Actualizar","gpui.mgmt.fab.reviewbtn":"Revisar","gpui.mgmt.fab.seen":"Visto","gpui.mgmt.fab.thefab":"El fabricante","gpui.mgmt.fab.use":"Usar","gpui.mgmt.life.nopart":"Sin lectura de esta pieza aún.","gpui.mgmt.life.reading":"Leyendo su historial…","gpui.mgmt.plan.addnote":"Añadir nota","gpui.mgmt.plan.all":"Aprobar todo","gpui.mgmt.plan.before":"Planificar antes de rutear","gpui.mgmt.plan.compact":"Compacto","gpui.mgmt.plan.done":"hecho","gpui.mgmt.plan.drawn":"Los corredores y planos del plan se dibujan en la placa mientras este panel está abierto. Ciérralo para ocultarlos.","gpui.mgmt.plan.edited":"Editado","gpui.mgmt.plan.elsewhere":"Un plan de ruteo para {board} espera tu aprobación","gpui.mgmt.plan.emptysub":"Las capas, corredores y planos aparecerán aquí cuando se proponga un plan.","gpui.mgmt.plan.expand":"Expandir","gpui.mgmt.plan.fit":"Ajustar","gpui.mgmt.plan.grid.all":"Todas las capas","gpui.mgmt.plan.grid.pair":"Lado a lado","gpui.mgmt.plan.grid.single":"Única","gpui.mgmt.plan.hide":"Ocultar hechos","gpui.mgmt.plan.hint":"Arrastra vértices para guiar · Clic en + del borde para insertar · Clic derecho en vértice para quitar","gpui.mgmt.plan.keysnote":"En esta versión de KiCad, aprueba desde este panel: en la vista de plan las teclas A, R y W de KiCad aún no son del plan (A abre Añadir Huella). Actualiza KiCad.","gpui.mgmt.plan.layer":"Aprobar capa","gpui.mgmt.plan.layer.short":"Capa","gpui.mgmt.plan.lock":"Bloquear","gpui.mgmt.plan.locked":"Bloqueado","gpui.mgmt.plan.noboard":"No hay plan de ruteo para esta placa.","gpui.mgmt.plan.noitems":"Sin corredores ni planos en esta capa","gpui.mgmt.plan.note.placeholder":"Nota de guiado para el router…","gpui.mgmt.plan.nothing":"Nada espera tu aprobación","gpui.mgmt.plan.offwords":"Los agentes rutean como les pidas. Actívalo para que primero propongan un plan de ruteo y ruteen solo lo que apruebes aquí.","gpui.mgmt.plan.onwords":"Antes de rutear una placa con 4 o más capas de cobre o más de 60 redes, el agente propone aquí corredores y regiones de plano. Solo rutea lo que apruebes.","gpui.mgmt.plan.reading":"Leyendo el plan de ruteo…","gpui.mgmt.plan.reference":"sobre {layer}","gpui.mgmt.plan.refused":"KiCad lo rechazó","gpui.mgmt.plan.reject":"Rechazar","gpui.mgmt.plan.rejectlayer":"Rechazar capa","gpui.mgmt.plan.reqplain":"Aprobación solicitada","gpui.mgmt.plan.requested":"Aprobación solicitada: {what}","gpui.mgmt.plan.saved":"plan guardado","gpui.mgmt.plan.show":"Mostrar hechos","gpui.mgmt.plan.st.approved":"Aprobado","gpui.mgmt.plan.st.awaiting":"Esperando revisión","gpui.mgmt.plan.st.blocked":"Bloqueado","gpui.mgmt.plan.st.empty":"Vacío","gpui.mgmt.plan.st.partial":"Parcial","gpui.mgmt.plan.st.rejected":"Rechazado","gpui.mgmt.plan.st.routed":"Ruteado","gpui.mgmt.plan.st.routing":"Ruteando","gpui.mgmt.plan.st.verified":"Verificado","gpui.mgmt.plan.stackup.short":"Apilamiento","gpui.mgmt.plan.stop":"Detener ruteo","gpui.mgmt.plan.sync":"Vincular zoom","gpui.mgmt.plan.tab":"Plan","gpui.mgmt.plan.unlock":"Desbloquear","gpui.mgmt.plan.verify":"Verificar","gpui.mgmt.plan.view.canvas":"Lienzo","gpui.mgmt.plan.view.list":"Lista","gpui.mgmt.plan.view.split":"Dividido","gpui.mgmt.plan.width":"Ancho","gpui.next.thread":"Hilo siguiente","gpui.no.models":"Sin modelos","gpui.nothing.matches":"Nada coincide","gpui.picker.favorite.add":"Añadir a favoritos","gpui.picker.favorite.remove":"Quitar de favoritos","gpui.picker.favorites":"Favoritos","gpui.planmode.bar.always":"Modo plan — explora y propone un plan antes de editar","gpui.planmode.bar.executing":"Ejecutando el plan aprobado","gpui.planmode.bar.once":"Modo plan (1 turno) — explora y propone un plan antes de editar","gpui.planmode.bar.pending":"El plan propuesto espera revisión abajo","gpui.planmode.bar.planning":"Planificando — redactando un plan antes de editar","gpui.planmode.chip.building":"Ejecutando","gpui.planmode.chip.once":"Plan · 1t","gpui.planmode.scope.always":"Siempre","gpui.planmode.scope.once":"1 turno","gpui.planmode.tip":"Planificar antes de actuar (1 turno, siempre u off)","gpui.planmode.top.executing":"Ejecutando plan","gpui.planmode.top.once":"Plan (1 turno)","gpui.planmode.top.pending":"Revisar plan","gpui.planmode.top.planning":"Planificando","gpui.previous.thread":"Hilo anterior","gpui.rail.no.board":"Este proyecto no tiene placa","gpui.rail.no.mech":"Este proyecto no tiene piezas mecánicas","gpui.rail.no.schematic":"Este proyecto no tiene esquema","gpui.rail.split.needs.both":"La vista dividida requiere una placa y un esquema","gpui.search.models":"Buscar modelos","gpui.settings.group.agents":"Agentes y herramientas","gpui.settings.group.general":"General","home.away":"El inicio ({name}) no está disponible","home.away.queued":"El inicio ({name}) no está disponible · {n} en cola","home.away.since":"El inicio ({name}) no está disponible desde las {time}","home.away.since.queued":"El inicio ({name}) no está disponible desde las {time} · {n} en cola","home.machine":"Máquina de inicio","home.move.failed":"No se pudo mover el inicio","home.move.failed.note":"No se pudo mover el inicio: {note}","home.move.here":"Hacer de esta máquina el inicio","home.moving":"Moviendo el inicio a {to}…","home.moving.step":"Moviendo el inicio a {to}: {step}","hub.back.crash":"Backplane volvió tras detenerse de forma inesperada","hub.restarting":"Reiniciando Backplane…","hub.restarting.build":"Reiniciando Backplane… (nueva compilación {build})","hub.stopped":"Backplane se detuvo","ios.hub.address.field":"Dirección del hub","menu.pin":"Fijar","menu.settle":"Cerrar","menu.unpin":"Desfijar","menu.wake":"Despertar","model.col.agent":"Agente","model.col.effort":"Esfuerzo","native.pair.connect":"Conectar","native.thread.model":"Modelo","notify.settled":"Cerrado","palette.archive":"Archivar hilo","palette.command.placeholder":"Escribe un comando o un hilo","palette.diff":"Diff: qué cambió este hilo","palette.newthread":"Nuevo hilo","palette.settings":"Ajustes","palette.terminal":"Terminal","palette.unarchive":"Desarchivar hilo","phone.unsettle":"Reabrir","provider.notice.button":"Abrir Configuración → Cuentas","provider.notice.head":"No hay ningún proveedor de IA conectado","provider.notice.senderr":"Aún no hay ningún proveedor de IA conectado. Abre Configuración → Cuentas para conectar Claude, Codex, Antigravity u otro proveedor.","provider.notice.senderr.remote":"No hay ningún proveedor de IA conectado en {machine}. Abre Configuración → Cuentas en {machine} para conectar Claude, Codex, Antigravity u otro proveedor.","provider.notice.text.none":"Conecta Claude, Codex, Antigravity u otro proveedor para empezar a chatear.","provider.notice.text.signedout":"Inicia sesión en Claude, Codex u otro proveedor en Configuración → Cuentas para empezar a chatear.","reply.action":"Responder","reply.cancel":"Cancelar respuesta","reply.to":"En respuesta a:","rooms.new":"Nueva sala","secret.you":"Tú","settings.appearance":"Apariencia","settings.lang":"Idioma","settings.lang.auto":"Automático","settings.lang.en":"English","settings.lang.es":"Español","settings.lang.ja":"日本語","settings.theme":"Tema","settings.theme.dark":"Oscuro","settings.theme.light":"Claro","sheet.rename":"Renombrar hilo","sidebar.add.project":"Añadir proyecto","sidebar.search.projects":"Buscar proyectos","thread.context.base":"Backplane","thread.context.copied":"Se copiaron las instrucciones.","thread.context.copy":"Copiar instrucciones","thread.context.disable":"Desactivar","thread.context.enable":"Activar","thread.context.index":"Índice de habilidades disponibles","thread.context.injected.label":"Instrucciones del proyecto añadidas","thread.context.instructions":"Instrucciones","thread.context.mcp":"MCP del proyecto","thread.context.native.note":"Instrucciones de inicio de Backplane. El proveedor carga los archivos nativos.","thread.context.none.instructions":"No se encontraron instrucciones del proyecto.","thread.context.none.mcp":"No se encontraron configuraciones MCP del proyecto.","thread.context.reading":"Leyendo el contexto del hilo…","thread.context.size":"{bytes} B · ≈{tokens} tokens","thread.context.skills":"Habilidades","thread.context.system":"Instrucciones del sistema","thread.context.title":"Contexto e instrucciones","thread.context.trust":"Confiar y activar","thread.new":"Nuevo hilo","tools.pinned":"Fijado","tools.retry":"Reintentar","tour.title.bots":"Bots","viewer.board":"Placa","viewer.diff":"Diff","viewer.files":"Archivos","viewer.mech":"Mech","viewer.review":"Revisión","viewer.schematic":"Esquemático","viewer.solid":"3D","web.chat.answer.btn":"Responder","web.chat.answer.placeholder":"Escribe una respuesta…","web.chat.answered":"Respondido: {answer}","web.chat.choose":"Elige un hilo de proyecto a la izquierda para empezar.","web.chat.empty":"Aún no hay mensajes. Escribe abajo para iniciar un turno.","web.chat.finished":"Terminado {time}","web.chat.finished.dur":"Terminado {time} · {dur}","web.chat.loading":"Cargando mensajes…","web.chat.review.mode":"Modo de revisión","web.chat.streaming":"Transmitiendo…","web.clone.add.dir":"Añadir {dir}","web.clone.back":"Atrás","web.clone.change.folder":"Cambiar carpeta","web.clone.cloned":"{repo} clonado en {dest}","web.clone.cloning":"Clonando {repo} en {dest}","web.clone.copied":"Copiado","web.clone.first":"Primer mensaje: {text}","web.clone.folder.name":"Nombre de la carpeta","web.clone.go":"Clonar","web.clone.loading":"Cargando…","web.clone.no.folders":"No hay carpetas aquí","web.clone.open.project":"Abrir el proyecto","web.clone.open.thread":"Abrir el hilo","web.clone.private":"privado","web.clone.repo.placeholder":"URL https o ssh, o propietario/repositorio","web.clone.retry":"Reintentar","web.clone.same":"Ya está clonado ahí: se añade tal cual.","web.clone.signin":"Iniciar sesión en GitHub","web.clone.signin.done":"Sesión iniciada en GitHub","web.clone.signin.enter":"Introduce este código en GitHub:","web.clone.signin.wait":"Iniciando sesión en GitHub…","web.clone.start.thread":"Empezar un hilo","web.clone.stopped":"Se detuvo la clonación de {repo}","web.clone.tab":"Clonar desde git","web.clone.up":"Subir","web.clone.use.dir":"Usar {dir}","web.composer.attach":"Adjuntar imagen","web.composer.maximages":"Como máximo {max} imágenes por mensaje.","web.composer.unsupported":"Tipo de imagen no compatible: {type}","web.composer.voice":"Dictado por voz","web.logout.failed":"No se pudo confirmar el cierre de sesión. Inténtalo de nuevo.","web.pair.approve.in":"Aprueba en el escritorio o en un teléfono vinculado · caduca en {time}","web.pair.approved":"Aprobado. Abriendo Backplane…","web.pair.cancelled":"Cancelado.","web.pair.code":"Código de comparación","web.pair.denied":"Se rechazó la solicitud de vinculación.","web.pair.expired":"El código de vinculación caducó. Solicita uno nuevo para intentarlo otra vez.","web.pair.failed":"Falló la solicitud de vinculación ({status})","web.pair.name":"Nombre del navegador","web.pair.nocode":"El hub no devolvió un código de comparación.","web.pair.ratelimited":"Demasiados intentos de vinculación. Espera un momento e inténtalo de nuevo.","web.pair.request":"Solicitar vinculación","web.pair.requesting":"Solicitando código de vinculación…","web.pair.subtitle":"Vincula este navegador con tu hub. Aprueba el código de 6 dígitos en Backplane › Ajustes › Dispositivos.","web.pair.unreachable":"No se pudo conectar con el hub. Comprueba tu conexión de tailnet.","web.plan.awaiting":"{n} esperando aprobación","web.plan.net.one":"1 red","web.plan.nets":"{n} redes","web.settings.providers":"Proveedores de IA","web.settings.providers.browser":"Conecta un proveedor en la aplicación de escritorio o móvil de Backplane en Configuración → Cuentas."},ja:{"agy.signout":"サインアウト","android.hub.machines.approve":"承認","android.load.earlier":"以前のメッセージを読み込む","approval.dismiss":"閉じる","approval.implement":"実装","ask.plan":"提案されたプラン","bots.new":"新しいボット","bots.rooms":"ルーム","bots.tab.browser":"ブラウザ","common.cancel":"キャンセル","common.close":"閉じる","common.copy":"コピー","common.delete":"削除","common.refresh":"更新","common.remove":"削除","common.save":"保存","composer.model.tip":"モデルと推論の強さを選択","composer.placeholder":"何でも質問:@bot、>thread、%project、#room、$skill、/btw","composer.send":"送信","composer.stop":"停止","gpui.acct.connected":"接続済み","gpui.acct.not.connected":"未接続","gpui.acct.sign.in.expired":"サインインの期限切れ","gpui.ask.plan.ready":"確認待ち","gpui.ask.plan.revise":"修正","gpui.ask.plan.reviseph":"計画のどこを変更しますか?","gpui.ask.plan.sendrev":"修正を送る","gpui.b.in.reply.to":"↩ 返信先:{quote}","gpui.b.replying.to":"↩ 返信中:{line}","gpui.bots.recall.off":"オフ","gpui.bots.recall.on":"オン","gpui.c.solid.big.next":"読み込みには時間と多くのメモリがかかることがあります。","gpui.c.solid.load.big":"それでも読み込む","gpui.c.solid.loading.big":"それでも読み込み中…","gpui.c.term.collapse":"折りたたむ","gpui.c.term.expand":"展開","gpui.commands":"コマンド","gpui.e.open.folder":"フォルダを開く","gpui.filter.projects.and.threads":"プロジェクトとスレッドを絞り込む","gpui.fold.or.unfold.the.sidebar":"サイドバーを折りたたむ/開く","gpui.follow.paused":"追従を一時停止中","gpui.follow.wait":"追従中: エージェントの次の編集を待っています","gpui.gerbers":"ガーバー","gpui.improvements":"改善","gpui.jump.to.a.thread.run":"スレッドへ移動、コマンドを実行、または発言を検索","gpui.mgmt.bom.dnp":"実装しない","gpui.mgmt.bom.nompn":"MPNなし","gpui.mgmt.checks.all":"すべて","gpui.mgmt.checks.fix":"エージェントに直してもらう","gpui.mgmt.checks.run":"実行","gpui.mgmt.close":"パネルを閉じる","gpui.mgmt.fab.apply":"適用","gpui.mgmt.fab.changed":"前回見てから変わったところ","gpui.mgmt.fab.derived":"* 製造元のページから計算した値です(milをmmに、径からランドを)。薄い色の項目はリジッド基板の値です(この基板のページに記載がないもの)。日付を押すと読んだページが開きます。","gpui.mgmt.fab.extra":"追加料金","gpui.mgmt.fab.findings":"指摘","gpui.mgmt.fab.free":"基本料金","gpui.mgmt.fab.judge":"データシート","gpui.mgmt.fab.limit":"項目","gpui.mgmt.fab.readcol":"読んだ日","gpui.mgmt.fab.refresh":"再読み込み","gpui.mgmt.fab.reviewbtn":"レビュー","gpui.mgmt.fab.seen":"確認済み","gpui.mgmt.fab.thefab":"製造元","gpui.mgmt.fab.use":"使う","gpui.mgmt.life.nopart":"この部品の記録はまだありません。","gpui.mgmt.life.reading":"履歴を読んでいます…","gpui.mgmt.plan.addnote":"メモを追加","gpui.mgmt.plan.all":"すべて承認","gpui.mgmt.plan.before":"配線前に計画する","gpui.mgmt.plan.compact":"標準","gpui.mgmt.plan.done":"完了","gpui.mgmt.plan.drawn":"計画の配線経路とプレーンは、このパネルを開いている間だけ基板上に表示されます。閉じると消えます。","gpui.mgmt.plan.edited":"編集済み","gpui.mgmt.plan.elsewhere":"{board}の配線計画が承認を待っています","gpui.mgmt.plan.emptysub":"計画が提案されると、レイヤー・コリドー・ベタ領域がここに表示されます。","gpui.mgmt.plan.expand":"拡大","gpui.mgmt.plan.fit":"全体表示","gpui.mgmt.plan.grid.all":"全レイヤー","gpui.mgmt.plan.grid.pair":"並べて表示","gpui.mgmt.plan.grid.single":"単一","gpui.mgmt.plan.hide":"完了を隠す","gpui.mgmt.plan.hint":"頂点をドラッグして誘導 · 辺の + をクリックで追加 · 頂点を右クリックで削除","gpui.mgmt.plan.keysnote":"このバージョンのKiCadでは、このパネルから承認してください。プランビューでのKiCadのA・R・Wキーはまだ計画のものではありません(Aはフットプリントの追加を開きます)。KiCadを更新してください。","gpui.mgmt.plan.layer":"層を承認","gpui.mgmt.plan.layer.short":"レイヤー","gpui.mgmt.plan.lock":"ロック","gpui.mgmt.plan.locked":"ロック中","gpui.mgmt.plan.noboard":"この基板の配線計画はありません。","gpui.mgmt.plan.noitems":"このレイヤーにコリドーまたはプレーンがありません","gpui.mgmt.plan.note.placeholder":"ルーターへの指示メモ…","gpui.mgmt.plan.nothing":"承認待ちはありません","gpui.mgmt.plan.offwords":"エージェントは指示どおりに配線します。オンにすると、まず配線計画を提案し、ここで承認したものだけを配線します。","gpui.mgmt.plan.onwords":"銅箔層が4層以上、またはネットが60本を超える基板では、配線の前にエージェントがここで配線経路とプレーン領域を提案します。承認したものだけを配線します。","gpui.mgmt.plan.reading":"配線計画を読んでいます…","gpui.mgmt.plan.reference":"基準 {layer}","gpui.mgmt.plan.refused":"KiCad が拒否しました","gpui.mgmt.plan.reject":"却下","gpui.mgmt.plan.rejectlayer":"レイヤーを却下","gpui.mgmt.plan.reqplain":"承認が求められています","gpui.mgmt.plan.requested":"承認が求められています: {what}","gpui.mgmt.plan.saved":"保存された計画","gpui.mgmt.plan.show":"完了を表示","gpui.mgmt.plan.st.approved":"承認済み","gpui.mgmt.plan.st.awaiting":"承認待ち","gpui.mgmt.plan.st.blocked":"ブロック","gpui.mgmt.plan.st.empty":"空","gpui.mgmt.plan.st.partial":"一部完了","gpui.mgmt.plan.st.rejected":"却下","gpui.mgmt.plan.st.routed":"配線済み","gpui.mgmt.plan.st.routing":"配線中","gpui.mgmt.plan.st.verified":"検証済み","gpui.mgmt.plan.stackup.short":"スタックアップ","gpui.mgmt.plan.stop":"配線を止める","gpui.mgmt.plan.sync":"ズーム連動","gpui.mgmt.plan.tab":"計画","gpui.mgmt.plan.unlock":"ロック解除","gpui.mgmt.plan.verify":"検証","gpui.mgmt.plan.view.canvas":"キャンバス","gpui.mgmt.plan.view.list":"リスト","gpui.mgmt.plan.view.split":"分割","gpui.mgmt.plan.width":"幅","gpui.next.thread":"次のスレッド","gpui.no.models":"モデルがありません","gpui.nothing.matches":"一致するものはありません","gpui.picker.favorite.add":"お気に入りに追加","gpui.picker.favorite.remove":"お気に入りから外す","gpui.picker.favorites":"お気に入り","gpui.planmode.bar.always":"計画モード — 編集前に調査して計画を提案します","gpui.planmode.bar.executing":"承認された計画を実行しています","gpui.planmode.bar.once":"計画モード (1回) — 編集前に調査して計画を提案します","gpui.planmode.bar.pending":"提案された計画が下のレビューを待っています","gpui.planmode.bar.planning":"計画中 — 編集前の計画を作成しています","gpui.planmode.chip.building":"実行中","gpui.planmode.chip.once":"計画 · 1回","gpui.planmode.scope.always":"常時","gpui.planmode.scope.once":"1回","gpui.planmode.tip":"実行前に計画を作成 (1回・常時・オフ)","gpui.planmode.top.executing":"計画を実行中","gpui.planmode.top.once":"計画 (1回)","gpui.planmode.top.pending":"計画を確認","gpui.planmode.top.planning":"計画中","gpui.previous.thread":"前のスレッド","gpui.rail.no.board":"このプロジェクトには基板がありません","gpui.rail.no.mech":"このプロジェクトには機械部品がありません","gpui.rail.no.schematic":"このプロジェクトには回路図がありません","gpui.rail.split.needs.both":"分割表示には基板と回路図が必要です","gpui.search.models":"モデルを検索","gpui.settings.group.agents":"エージェントとツール","gpui.settings.group.general":"一般","home.away":"ホーム({name})はオフラインです","home.away.queued":"ホーム({name})はオフラインです · {n} 件待機中","home.away.since":"ホーム({name})は {time} からオフラインです","home.away.since.queued":"ホーム({name})は {time} からオフラインです · {n} 件待機中","home.machine":"ホームマシン","home.move.failed":"ホームの移動に失敗しました","home.move.failed.note":"ホームの移動に失敗しました: {note}","home.move.here":"このマシンをホームにする","home.moving":"ホームを {to} へ移動中…","home.moving.step":"ホームを {to} へ移動中: {step}","hub.back.crash":"予期せず停止したBackplaneが戻りました","hub.restarting":"Backplaneを再起動しています…","hub.restarting.build":"Backplaneを再起動しています…(新しいビルド {build})","hub.stopped":"Backplaneは停止しました","ios.hub.address.field":"ハブのアドレス","menu.pin":"ピン留め","menu.settle":"完了","menu.unpin":"ピン留めを解除","menu.wake":"再開","model.col.agent":"エージェント","model.col.effort":"推論の強さ","native.pair.connect":"接続","native.thread.model":"モデル","notify.settled":"完了","palette.archive":"スレッドをアーカイブ","palette.command.placeholder":"コマンドまたはスレッドを入力","palette.diff":"差分:このスレッドの変更","palette.newthread":"新しいスレッド","palette.settings":"設定","palette.terminal":"ターミナル","palette.unarchive":"スレッドのアーカイブを解除","phone.unsettle":"未完了に戻す","provider.notice.button":"設定 → アカウントを開く","provider.notice.head":"AI プロバイダーが接続されていません","provider.notice.senderr":"AI プロバイダーがまだ接続されていません。設定 → アカウントを開いて、Claude、Codex、Antigravity などのプロバイダーを接続してください。","provider.notice.senderr.remote":"{machine} に AI プロバイダーが接続されていません。{machine} で設定 → アカウントを開いて、Claude、Codex、Antigravity などのプロバイダーを接続してください。","provider.notice.text.none":"チャットを始めるには、Claude、Codex、Antigravity などのプロバイダーを接続してください。","provider.notice.text.signedout":"チャットを始めるには、設定 → アカウントで Claude、Codex などのプロバイダーにサインインしてください。","reply.action":"返信","reply.cancel":"返信をやめる","reply.to":"返信先:","rooms.new":"新しいルーム","secret.you":"あなた","settings.appearance":"外観","settings.lang":"言語","settings.lang.auto":"自動","settings.lang.en":"English","settings.lang.es":"Español","settings.lang.ja":"日本語","settings.theme":"テーマ","settings.theme.dark":"ダーク","settings.theme.light":"ライト","sheet.rename":"スレッド名を変更","sidebar.add.project":"プロジェクトを追加","sidebar.search.projects":"プロジェクトを検索","thread.context.base":"Backplane","thread.context.copied":"プロンプトをコピーしました。","thread.context.copy":"プロンプトをコピー","thread.context.disable":"無効にする","thread.context.enable":"有効にする","thread.context.index":"利用可能なスキルの一覧","thread.context.injected.label":"追加されたプロジェクトの指示","thread.context.instructions":"指示","thread.context.mcp":"プロジェクトの MCP","thread.context.native.note":"Backplane が起動時に渡すプロンプトです。ネイティブファイルはプロバイダーが読み込みます。","thread.context.none.instructions":"プロジェクトの指示が見つかりません。","thread.context.none.mcp":"プロジェクトの MCP 設定が見つかりません。","thread.context.reading":"スレッドのコンテキストを読み込み中…","thread.context.size":"{bytes} B・約{tokens}トークン","thread.context.skills":"スキル","thread.context.system":"システムプロンプト","thread.context.title":"コンテキストとプロンプト","thread.context.trust":"承認して有効にする","thread.new":"新しいスレッド","tools.pinned":"固定中","tools.retry":"再試行","tour.title.bots":"ボット","viewer.board":"基板","viewer.diff":"差分","viewer.files":"ファイル","viewer.mech":"Mech","viewer.review":"レビュー","viewer.schematic":"回路図","viewer.solid":"3D","web.chat.answer.btn":"回答","web.chat.answer.placeholder":"回答を入力…","web.chat.answered":"回答済み: {answer}","web.chat.choose":"左側からプロジェクトのスレッドを選んで開始してください。","web.chat.empty":"まだメッセージはありません。下に入力して開始してください。","web.chat.finished":"完了 {time}","web.chat.finished.dur":"完了 {time} · {dur}","web.chat.loading":"メッセージを読み込んでいます…","web.chat.review.mode":"レビューモード","web.chat.streaming":"受信中…","web.clone.add.dir":"{dir} を追加","web.clone.back":"戻る","web.clone.change.folder":"フォルダを変更","web.clone.cloned":"{repo} を {dest} にクローンしました","web.clone.cloning":"{repo} を {dest} にクローン中","web.clone.copied":"コピーしました","web.clone.first":"最初のメッセージ: {text}","web.clone.folder.name":"フォルダ名","web.clone.go":"クローン","web.clone.loading":"読み込み中…","web.clone.no.folders":"フォルダがありません","web.clone.open.project":"プロジェクトを開く","web.clone.open.thread":"スレッドを開く","web.clone.private":"非公開","web.clone.repo.placeholder":"https / ssh の URL、または owner/repo","web.clone.retry":"もう一度","web.clone.same":"すでにそこにクローンされています: そのまま追加します。","web.clone.signin":"GitHub にサインイン","web.clone.signin.done":"GitHub にサインインしました","web.clone.signin.enter":"このコードを GitHub に入力してください:","web.clone.signin.wait":"GitHub のサインインを開始しています…","web.clone.start.thread":"スレッドを開始","web.clone.stopped":"{repo} のクローンを中止しました","web.clone.tab":"git からクローン","web.clone.up":"上へ","web.clone.use.dir":"{dir} を使う","web.composer.attach":"画像を添付","web.composer.maximages":"1 件のメッセージに添付できる画像は最大 {max} 枚です。","web.composer.unsupported":"未対応の画像形式です: {type}","web.composer.voice":"音声入力","web.logout.failed":"サインアウトを確認できませんでした。もう一度お試しください。","web.pair.approve.in":"デスクトップまたはペアリング済みの端末で承認してください · 有効期限 {time}","web.pair.approved":"承認されました。Backplane を開いています…","web.pair.cancelled":"キャンセルしました。","web.pair.code":"確認コード","web.pair.denied":"ペアリングのリクエストが拒否されました。","web.pair.expired":"ペアリングコードの有効期限が切れました。新しいコードをリクエストしてください。","web.pair.failed":"ペアリングのリクエストに失敗しました ({status})","web.pair.name":"ブラウザー名","web.pair.nocode":"ハブから確認コードが返されませんでした。","web.pair.ratelimited":"ペアリングの試行回数が多すぎます。しばらく待ってからやり直してください。","web.pair.request":"ペアリングをリクエスト","web.pair.requesting":"ペアリングコードをリクエストしています…","web.pair.subtitle":"このブラウザーをハブとペアリングします。Backplane › 設定 › デバイス で 6 桁のコードを承認してください。","web.pair.unreachable":"ハブに接続できませんでした。tailnet の接続を確認してください。","web.plan.awaiting":"{n} 件が承認待ち","web.plan.net.one":"1 ネット","web.plan.nets":"{n} ネット","web.settings.providers":"AI プロバイダー","web.settings.providers.browser":"Backplane のデスクトップまたはモバイルアプリの設定 → アカウントからプロバイダーを接続してください。"}};function li(e,t){if(!t)return e;return e.replace(/\{([a-zA-Z0-9_.-]+)\}/g,(n,i)=>Object.prototype.hasOwnProperty.call(t,i)?String(t[i]):n)}var Tt=tr(),pn=new Set,un=new Map;for(let[e,t]of Object.entries(Mt.en||{}))if(typeof t==="string"&&!un.has(t))un.set(t,e);function tr(){let e=typeof navigator<"u"&&navigator.language?navigator.language.toLowerCase():"en";if(e.startsWith("ja"))return"ja";if(e.startsWith("es"))return"es";return"en"}function ci(){if(typeof document<"u"&&document.documentElement)document.documentElement.lang=Tt}ci();function Jt(e){return pn.add(e),()=>{pn.delete(e)}}function gt(e){if(!e)return!1;let t=e.toLowerCase(),n=t.startsWith("ja")?"ja":t.startsWith("es")?"es":t.startsWith("en")?"en":"";if(!n)return!1;let i=n!==Tt;if(Tt=n,ci(),i)for(let r of pn)r(Tt);return i}function h(e,t,n){let r=(Mt[Tt]||Mt.en||{})[e]??Mt.en?.[e]??t??e;return li(r,n)}function pe(e){if(!e)return"";let t=un.get(e);if(!t)return e;return h(t,e)}function X(e,t="",n=""){let i=document.createElement(e);if(t)i.className=t;if(n)i.textContent=n;return i}function $e(e,t="",n){let i=X("button",t,e);if(i.type="button",n)i.addEventListener("click",n);return i}function nr(e){let t=e.replace(/[\\/]+$/,"");if(!t)return e||"/";let n=t.split(/[\\/]/);return n[n.length-1]||t}function ir(e,t){let n=e.includes("\\")&&!e.includes("/")?"\\":"/";return e.endsWith(n)?e+t:e+n+t}class mn{hub;actionLabel;action;root;pathInput;upBtn;listEl;errEl;actBtn;path="";parent=null;gen=0;busy=!1;constructor(e,t,n,i=[]){this.hub=e;this.actionLabel=t;this.action=n;this.root=X("div","bp-fb"),this.root.setAttribute("data-testid","folder-browser");let r=X("div","bp-fb-head");this.upBtn=$e("↑","bp-btn-ghost bp-fb-up",()=>{if(this.parent)this.go(this.parent)}),this.upBtn.title=h("web.clone.up","Up"),this.upBtn.setAttribute("aria-label",h("web.clone.up","Up")),this.pathInput=X("input","bp-input bp-fb-path"),this.pathInput.spellcheck=!1,this.pathInput.setAttribute("data-testid","folder-path"),this.pathInput.addEventListener("keydown",(a)=>{if(a.key==="Enter"){a.preventDefault();let o=this.pathInput.value.trim();if(o)this.go(o)}}),r.append(this.upBtn,this.pathInput),this.listEl=X("div","bp-fb-list"),this.errEl=X("div","bp-ap-err bp-hidden");let s=X("div","bp-ap-foot");this.actBtn=$e("","primary",()=>{this.run()}),this.actBtn.setAttribute("data-testid","folder-act"),s.append(...i,this.actBtn),this.root.append(r,this.listEl,this.errEl,s)}currentPath(){return this.path}async go(e){let t=++this.gen;this.setError(""),this.listEl.replaceChildren(X("div","bp-fb-empty",h("web.clone.loading","Loading…")));try{let n=await this.hub.rpc("dirs.list",{path:e});if(t!==this.gen)return;this.path=n.path,this.parent=n.parent??null,this.render(n.dirs??[])}catch(n){if(t!==this.gen)return;this.setError(pe(n instanceof Error?n.message:String(n))),this.render(null)}}refreshLocale(){this.upBtn.title=h("web.clone.up","Up"),this.updateAct()}render(e){if(this.pathInput.value=this.path,this.upBtn.disabled=!this.parent,this.updateAct(),e===null){this.listEl.replaceChildren();return}if(e.length===0){this.listEl.replaceChildren(X("div","bp-fb-empty",h("web.clone.no.folders","No folders here")));return}let t=document.createDocumentFragment();for(let n of e){let i=$e("","bp-fb-row",()=>{this.go(ir(this.path,n))});i.append(X("span","bp-fb-icon","▸"),X("span","bp-fb-name",n)),t.appendChild(i)}this.listEl.replaceChildren(t),this.listEl.scrollTop=0}updateAct(){this.actBtn.textContent=this.path?this.actionLabel(nr(this.path)):this.actionLabel("…"),this.actBtn.disabled=!this.path||this.busy}async run(){if(!this.path||this.busy)return;this.busy=!0,this.updateAct(),this.setError("");try{await this.action(this.path)}catch(e){this.setError(pe(e instanceof Error?e.message:String(e)))}finally{this.busy=!1,this.updateAct()}}setError(e){this.errEl.textContent=e,this.errEl.classList.toggle("bp-hidden",!e)}}class hn{container;host;backdrop=null;bodyEl=null;tabsEl=null;mode="folder";repoText="";repoValue="";firstText="";wantThread=!0;userParent="";nameText="";nameTouched=!1;dest=null;destGen=0;destPending=!1;destTimer=null;repos=null;reposGen=0;reposTimer=null;showSuggest=!1;suggestIdx=-1;startErr="";starting=!1;picking=!1;jobId="";job=null;specs=new Map;signin=null;copied=!1;repoInput=null;suggestEl=null;destEl=null;signinEl=null;cloneBtn=null;jobEl=null;constructor(e,t){this.container=e;this.host=t}isOpen(){return this.backdrop!==null}open(e={}){let t=this.host.hub.hasFeature("clone"),n=!e.repo&&Boolean(this.jobId)&&(!this.job||this.job.state==="running"||this.job.state==="done");if(!this.backdrop)this.build();if(!n)this.jobId="",this.job=null,this.resetForm();if(e.repo!==void 0||e.text!==void 0)this.repoText=(e.repo??"").trim(),this.repoValue="",this.firstText=(e.text??"").trim();if(this.mode=t&&(e.mode==="clone"||n)?"clone":"folder",this.render(),n){if(this.job)this.maybeGo(this.job);this.reconcile()}else if(this.mode==="clone"&&this.repoText)this.askDest()}reconcile(){let e=this.jobId;if(!e)return;this.host.hub.rpc("clone.status",{id:e}).then((t)=>this.apply(t)).catch(()=>{})}close(){if(this.reposTimer!==null)window.clearTimeout(this.reposTimer);if(this.destTimer!==null)window.clearTimeout(this.destTimer);this.reposTimer=null,this.destTimer=null,this.backdrop?.remove(),this.backdrop=null,this.bodyEl=null,this.tabsEl=null}escape(){if(this.picking){this.picking=!1,this.render();return}if(this.showSuggest){this.showSuggest=!1,this.renderSuggest();return}this.close()}refreshLocale(){if(this.backdrop)this.render()}handleFrame(e){if(e.k==="clone"){let t=e.clone;if(t)this.apply(t)}else if(e.k==="clone.repos"){if(this.isOpen()&&this.mode==="clone"&&!this.jobId)this.askRepos(0)}else if(e.k==="clone.signin"){if(!this.signin)return;let t=this.signin.state;if(this.signin=e.signin??null,this.signin?.state==="cancelled")this.signin=null;if(t!=="done"&&this.signin?.state==="done")this.askRepos(0);this.renderSignin()}}build(){let e=X("div","bp-modal-backdrop");e.setAttribute("data-testid","add-project");let t=X("div","bp-modal bp-ap"),n=X("div","bp-modal-head"),i=X("h2","",h("sidebar.add.project","Add project")),r=$e("×","icon",()=>this.close());r.title=h("common.close","Close"),r.setAttribute("aria-label",h("common.close","Close")),n.append(i,r),this.tabsEl=X("div","bp-ap-tabs"),this.bodyEl=X("div","bp-modal-body bp-ap-body"),t.append(n,this.tabsEl,this.bodyEl),e.appendChild(t),e.addEventListener("mousedown",(s)=>{if(s.target===e)this.close()}),this.container.appendChild(e),this.backdrop=e}resetForm(){this.repoText="",this.repoValue="",this.firstText="",this.wantThread=!0,this.userParent="",this.nameText="",this.nameTouched=!1,this.dest=null,this.destPending=!1,this.repos=null,this.showSuggest=!1,this.suggestIdx=-1,this.startErr="",this.starting=!1,this.picking=!1,this.signin=null,this.copied=!1}render(){if(!this.bodyEl||!this.tabsEl||!this.backdrop)return;let e=this.backdrop.querySelector(".bp-modal-head h2");if(e)e.textContent=h("sidebar.add.project","Add project");if(this.renderTabs(),this.repoInput=null,this.suggestEl=null,this.destEl=null,this.signinEl=null,this.cloneBtn=null,this.jobEl=null,this.mode==="folder")this.renderFolder();else if(this.jobId&&this.job)this.renderJobView();else if(this.picking)this.renderPickParent();else this.renderCloneForm()}renderTabs(){if(!this.tabsEl)return;if(!this.host.hub.hasFeature("clone")){this.tabsEl.classList.add("bp-hidden");return}this.tabsEl.classList.remove("bp-hidden");let e=(t,n)=>{let i=$e(n,"bp-ap-tab"+(this.mode===t?" on":""),()=>{if(this.mode===t)return;if(this.mode=t,this.render(),t==="clone"&&!this.jobId&&this.repos===null)this.askRepos(0)});return i.setAttribute("data-testid",`ap-tab-${t}`),i.setAttribute("aria-pressed",String(this.mode===t)),i};this.tabsEl.replaceChildren(e("folder",h("gpui.e.open.folder","Open folder")),e("clone",h("web.clone.tab","Clone from git")))}renderFolder(){let e=new mn(this.host.hub,(t)=>h("web.clone.add.dir","Add {dir}",{dir:t}),async(t)=>{let n=await this.host.hub.rpc("project.add",{path:t},30000);if(this.close(),n.project)this.host.onProjectAdded(n.project)});this.bodyEl.replaceChildren(e.root),e.go("")}renderCloneForm(){let e=this.bodyEl,t=X("div","bp-ap-form"),n=X("div","bp-ap-repo"),i=X("input","bp-input");i.type="text",i.spellcheck=!1,i.autocomplete="off",i.placeholder=h("web.clone.repo.placeholder","https or ssh URL, or owner/repo"),i.setAttribute("aria-label",h("web.clone.repo.placeholder","https or ssh URL, or owner/repo")),i.setAttribute("data-testid","clone-repo"),i.value=this.repoText,i.addEventListener("input",()=>{if(this.repoText=i.value,this.repoValue="",this.showSuggest=!0,this.suggestIdx=-1,this.startErr="",!this.nameTouched)this.nameText="";this.askRepos(200),this.askDest(250)}),i.addEventListener("focus",()=>{if(this.showSuggest=!0,this.repos===null)this.askRepos(0);else this.renderSuggest()}),i.addEventListener("blur",()=>{window.setTimeout(()=>{if(document.activeElement!==i)this.showSuggest=!1,this.renderSuggest()},120)}),i.addEventListener("keydown",(p)=>this.repoKey(p)),this.repoInput=i,this.suggestEl=X("div","bp-ap-suggest bp-hidden"),this.suggestEl.setAttribute("data-testid","clone-suggest"),n.append(i,this.suggestEl),this.signinEl=X("div","bp-ap-signin bp-hidden"),this.signinEl.setAttribute("data-testid","clone-signin"),this.destEl=X("div","bp-ap-dest"),this.destEl.setAttribute("data-testid","clone-dest");let r=X("label","bp-ap-check"),s=X("input");s.type="checkbox",s.checked=this.wantThread,s.setAttribute("data-testid","clone-thread"),s.addEventListener("change",()=>{this.wantThread=s.checked}),r.append(s,X("span","",h("web.clone.start.thread","Start a thread")));let a=[n,this.signinEl,this.destEl,r];if(this.firstText)a.push(X("div","bp-ap-first bp-dim",h("web.clone.first","First message: {text}",{text:this.firstText})));let o=X("div","bp-ap-err"+(this.startErr?"":" bp-hidden"),this.startErr);o.setAttribute("data-testid","clone-start-error");let c=X("div","bp-ap-foot");this.cloneBtn=$e(h("web.clone.go","Clone"),"primary",()=>{this.startClone()}),this.cloneBtn.setAttribute("data-testid","clone-go"),c.append(this.cloneBtn),a.push(o,c),t.append(...a),e.replaceChildren(t),this.renderSuggest(),this.renderSignin(),this.renderDest(),window.setTimeout(()=>{if(this.repoInput===i&&!this.repoText)i.focus()},0)}repoKey(e){let t=this.repos?.repos??[],n=this.showSuggest&&t.length>0;if(e.key==="ArrowDown"&&n)e.preventDefault(),this.suggestIdx=Math.min(t.length-1,this.suggestIdx+1),this.renderSuggest();else if(e.key==="ArrowUp"&&n)e.preventDefault(),this.suggestIdx=Math.max(-1,this.suggestIdx-1),this.renderSuggest();else if(e.key==="Enter"){e.preventDefault();let i=n&&this.suggestIdx>=0?t[this.suggestIdx]:void 0;if(i)this.pickRepo(i);else if(this.canStart())this.startClone()}}pickRepo(e){if(this.repoText=e.name,this.repoValue=e.value,this.showSuggest=!1,this.suggestIdx=-1,this.startErr="",!this.nameTouched)this.nameText="";if(this.repoInput)this.repoInput.value=e.name;this.renderSuggest(),this.askDest()}repoArg(){return this.repoValue||this.repoText.trim()}askRepos(e){if(this.reposTimer!==null)window.clearTimeout(this.reposTimer);this.reposTimer=window.setTimeout(()=>{this.reposTimer=null;let t=++this.reposGen,n=this.repoValue?"":this.repoText.trim();this.host.hub.rpc("clone.repos",{q:n,limit:12},30000).then((i)=>{if(t!==this.reposGen)return;this.repos=i,this.renderSuggest(),this.renderSignin()}).catch(()=>{if(t!==this.reposGen)return;this.repos={repos:[],state:"error",hint:"Couldn't list your GitHub repositories."},this.renderSuggest()})},e)}renderSuggest(){let e=this.suggestEl;if(!e)return;let t=this.repos,n=t?.repos??[],i=[];if(this.showSuggest&&!this.repoValue){if(n.forEach((r,s)=>{let a=$e("","bp-ap-sug"+(s===this.suggestIdx?" active":""));a.setAttribute("data-testid","clone-suggestion"),a.addEventListener("mousedown",(c)=>c.preventDefault()),a.addEventListener("click",()=>this.pickRepo(r));let o=X("div","bp-ap-sug-top");if(o.append(X("span","bp-ap-sug-name",r.name)),r.private)o.append(X("span","bp-ap-tag",h("web.clone.private","private")));if(a.append(o),r.description)a.append(X("div","bp-ap-sug-desc",r.description));i.push(a)}),n.length===0&&t){if(t.loading)i.push(X("div","bp-ap-sug-note",h("web.clone.loading","Loading…")));else if(t.hint){let r=X("div","bp-ap-sug-note");if(r.append(X("span","",pe(t.hint))),t.state==="signedout"){let s=$e(h("web.clone.signin","Sign in to GitHub"),"bp-btn-line",()=>{this.startSignin()});s.addEventListener("mousedown",(a)=>a.preventDefault()),s.setAttribute("data-testid","clone-signin-btn"),r.append(s)}i.push(r)}}}e.replaceChildren(...i),e.classList.toggle("bp-hidden",i.length===0)}askDest(e=0){if(this.destTimer!==null)window.clearTimeout(this.destTimer);this.destPending=!0,this.updateCloneBtn(),this.destTimer=window.setTimeout(()=>{this.destTimer=null;let t=++this.destGen,n=this.repoArg();if(!n){this.dest=null,this.destPending=!1,this.renderDest();return}let i={repo:n};if(this.userParent)i.parent=this.userParent;if(this.nameTouched&&this.nameText.trim())i.name=this.nameText.trim();else if(this.userParent)i.name="";this.host.hub.rpc("clone.dest",i).then((r)=>{if(t!==this.destGen)return;if(this.dest=r,this.destPending=!1,!this.nameTouched&&r.folder)this.nameText=r.folder;this.renderDest()}).catch((r)=>{if(t!==this.destGen)return;this.dest={ok:!1,error:r instanceof Error?r.message:String(r)},this.destPending=!1,this.renderDest()})},e)}renderDest(){let e=this.destEl;if(!e)return;let t=this.dest,n=[];if(t&&!t.repo){if(t.error&&this.repoText.trim())n.push(this.errLine(pe(t.error)))}else if(t){let a=X("div","bp-ap-where"),o=X("span","bp-ap-dest-path",t.destShown||t.dest||t.defaultParentShown||"");o.setAttribute("data-testid","clone-dest-shown");let c=$e(h("web.clone.change.folder","Change folder"),"bp-btn-line",()=>{this.picking=!0,this.render()});c.setAttribute("data-testid","clone-change-folder"),a.append(o,c),n.push(a);let p=X("label","bp-ap-name");p.append(X("span","bp-ap-lbl",h("web.clone.folder.name","Folder name")));let l=X("input","bp-input");if(l.type="text",l.spellcheck=!1,l.value=this.nameText,l.setAttribute("data-testid","clone-name"),l.addEventListener("input",()=>{this.nameText=l.value,this.nameTouched=l.value.trim()!=="",this.startErr="",this.askDest(250)}),l.addEventListener("keydown",(u)=>{if(u.key==="Enter"&&this.canStart())u.preventDefault(),this.startClone()}),p.append(l),n.push(p),!t.ok&&t.error)n.push(this.errLine(pe(t.error)));else if(t.same)n.push(X("div","bp-ap-note bp-dim",h("web.clone.same","Already cloned there: it is added as it is.")))}let i=document.activeElement,r=i&&e.contains(i)&&i.getAttribute("data-testid")==="clone-name",s=r?i.selectionStart:null;if(e.replaceChildren(...n),e.classList.toggle("bp-hidden",n.length===0),r){let a=e.querySelector('[data-testid="clone-name"]');if(a){if(a.focus(),s!==null)a.setSelectionRange(s,s)}}this.updateCloneBtn()}errLine(e){let t=X("div","bp-ap-err",e);return t.setAttribute("data-testid","clone-dest-error"),t}canStart(){return Boolean(this.dest?.ok&&this.dest.repo&&!this.destPending&&!this.starting&&this.repoArg())}updateCloneBtn(){if(this.cloneBtn)this.cloneBtn.disabled=!this.canStart()}renderPickParent(){let e=this.dest?.parent||this.userParent||this.dest?.defaultParent||"",t=$e(h("web.clone.back","Back"),"bp-btn-line",()=>{this.picking=!1,this.render()}),n=new mn(this.host.hub,(i)=>h("web.clone.use.dir","Use {dir}",{dir:i}),async(i)=>{this.userParent=i,this.picking=!1,this.render(),this.askDest()},[t]);this.bodyEl.replaceChildren(n.root),n.go(e)}async startClone(){if(!this.canStart()||!this.dest)return;this.starting=!0,this.startErr="",this.updateCloneBtn();let e={repo:this.repoArg(),thread:this.wantThread,text:this.firstText},t=dn();this.jobId=t,this.job=null,this.specs.set(t,e);try{let n=await this.host.hub.rpc("clone.start",{id:t,repo:e.repo,parent:this.dest.parent??"",name:this.dest.folder??this.nameText.trim(),thread:e.thread,text:e.text});this.starting=!1,this.apply(n)}catch(n){this.starting=!1;let i=pe(n instanceof Error?n.message:String(n));if(this.jobId===t&&!this.job){let r=await this.host.hub.rpc("clone.status",{id:t}).catch(()=>null);if(r&&r.id===t){this.apply(r);return}}if(this.jobId===t&&!this.job){if(this.jobId="",this.startErr=i,this.mode==="clone")this.render()}}}async retry(e,t){let n=this.specs.get(e.id)??{repo:e.origin||e.repo||"",thread:!0,text:""},i=dn(),r=this.jobId;this.jobId=i,this.specs.set(i,n),t.disabled=!0;try{let s=await this.host.hub.rpc("clone.start",{id:i,repo:n.repo,dest:e.dest??"",thread:n.thread,text:n.text});this.apply(s)}catch(s){let a=pe(s instanceof Error?s.message:String(s));if(this.jobId!==i)return;if(!this.job||this.job.id!==i){let o=await this.host.hub.rpc("clone.status",{id:i}).catch(()=>null);if(o&&o.id===i){this.apply(o);return}}if(this.jobId===i&&(!this.job||this.job.id!==i))this.jobId=r,t.disabled=!1,this.showJobError(a)}}apply(e){if(!e||e.id!==this.jobId)return;if(!ai(this.job,e))return;if(this.job=e,this.copied=!1,this.isOpen()&&this.mode==="clone")if(this.jobEl&&this.jobEl.isConnected)this.renderJob();else this.render();this.maybeGo(e)}maybeGo(e){if(this.isOpen()&&e.id===this.jobId&&oi(e))this.goTo(e)}renderJobView(){this.jobEl=X("div","bp-ap-job"),this.jobEl.setAttribute("data-testid","clone-job"),this.signinEl=X("div","bp-ap-signin bp-hidden"),this.signinEl.setAttribute("data-testid","clone-signin"),this.bodyEl.replaceChildren(this.jobEl,this.signinEl),this.renderJob(),this.renderSignin()}renderJob(){let e=this.jobEl,t=this.job;if(!e||!t)return;let n=t.destShown||t.dest||"",i=t.repo||"",r=t.state==="done"?h("web.clone.cloned","Cloned {repo} into {dest}",{repo:i,dest:n}):t.state==="cancelled"?h("web.clone.stopped","Stopped cloning {repo}",{repo:i}):h("web.clone.cloning","Cloning {repo} into {dest}",{repo:i,dest:n}),s=[X("div","bp-ap-job-title",r)];if(t.state==="running"){let a=X("div","bp-ap-phase",pe(t.phase||""));a.setAttribute("data-testid","clone-phase");let o=X("div","bp-ap-bar"+(typeof t.pct==="number"?"":" indeterminate")),c=X("div","bp-ap-bar-fill");if(typeof t.pct==="number")c.style.width=`${Math.max(0,Math.min(100,t.pct))}%`;if(o.appendChild(c),o.setAttribute("role","progressbar"),typeof t.pct==="number")o.setAttribute("aria-valuenow",String(t.pct));if(s.push(a,o),t.detail)s.push(X("div","bp-ap-detail bp-dim",t.detail));let p=X("div","bp-ap-foot"),l=$e(h("common.cancel","Cancel"),"bp-btn-line",()=>{this.host.hub.rpc("clone.cancel",{id:t.id}).then((u)=>this.apply(u)).catch(()=>{})});l.setAttribute("data-testid","clone-cancel"),p.append(l),s.push(p)}else if(t.state==="failed"||t.state==="cancelled"){if(t.state==="failed"&&t.error){let p=X("div","bp-ap-err",pe(t.error));p.setAttribute("data-testid","clone-error"),s.push(p)}let a=X("div","bp-ap-foot"),o=$e(h("web.clone.back","Back"),"bp-btn-line",()=>{this.jobId="",this.job=null,this.signin=null,this.render(),this.askDest()});if(a.append(o),t.signin){let p=$e(h("web.clone.signin","Sign in to GitHub"),"bp-btn-line",()=>{this.startSignin()});p.setAttribute("data-testid","clone-signin-btn"),a.append(p)}let c=$e(h("web.clone.retry","Try again"),"primary",()=>{this.retry(t,c)});c.setAttribute("data-testid","clone-retry"),a.append(c),s.push(a)}else if(t.state==="done"){let a=t.notes??[];if(a.length>0){let l=X("ul","bp-ap-notes");l.setAttribute("data-testid","clone-notes");for(let u of a)l.appendChild(X("li","",pe(u)));s.push(l)}let o=X("div","bp-ap-foot"),c=t.thread?h("web.clone.open.thread","Open the thread"):h("web.clone.open.project","Open the project"),p=$e(c,"primary",()=>this.goTo(t));p.setAttribute("data-testid","clone-open"),o.append(p),s.push(o)}e.replaceChildren(...s)}showJobError(e){if(!this.jobEl)return;this.jobEl.querySelector(".bp-ap-job-err")?.remove();let t=X("div","bp-ap-err bp-ap-job-err",e);this.jobEl.appendChild(t)}goTo(e){this.jobId="",this.job=null,this.close(),this.host.onCloneDone(e)}async startSignin(){this.signin={state:"starting"},this.copied=!1,this.renderSignin();try{let e=await this.host.hub.rpc("clone.signin",{restart:!0},30000);if(!this.signin||this.signin.state==="starting")this.signin=e}catch(e){this.signin={state:"failed",error:e instanceof Error?e.message:String(e)}}if(this.signin?.state==="done")this.askRepos(0);this.renderSignin()}renderSignin(){let e=this.signinEl;if(!e)return;let t=this.signin,n=[];if(t&&t.state){if(t.state==="starting"||t.state==="waiting"&&!t.code)n.push(X("div","bp-dim",h("web.clone.signin.wait","Starting GitHub sign-in…")));else if(t.state==="waiting"){n.push(X("div","",h("web.clone.signin.enter","Enter this code on GitHub:")));let i=X("div","bp-ap-code-row"),r=X("span","bp-ap-code",t.code||"");r.setAttribute("data-testid","clone-signin-code");let s=$e(this.copied?h("web.clone.copied","Copied"):h("common.copy","Copy"),"bp-btn-line",()=>{navigator.clipboard?.writeText(t.code||"").then(()=>{this.copied=!0,this.renderSignin()}).catch(()=>{})});if(i.append(r,s),n.push(i),t.url){let a=X("a","bp-ap-link",t.url);a.href=t.url,a.target="_blank",a.rel="noopener noreferrer",a.setAttribute("data-testid","clone-signin-url"),n.push(a)}}else if(t.state==="done")n.push(X("div","bp-ok",h("web.clone.signin.done","Signed in to GitHub")));else if(t.state==="failed")n.push(X("div","bp-ap-err",pe(t.error||"")))}e.replaceChildren(...n),e.classList.toggle("bp-hidden",n.length===0)}}function sr(e){try{let t=new URL(e,window.location.origin);if(t.protocol==="https:"||t.protocol==="http:")return t.href}catch{}return null}function Bt(e,t){let n=/(`[^`]+`|\*\*[^*]+\*\*|\*[^*]+\*|\[([^\]]+)\]\(([^)]+)\))/g,i=0,r;while((r=n.exec(t))!==null){if(r.index>i)e.appendChild(document.createTextNode(t.slice(i,r.index)));let s=r[0];if(s.startsWith("`")&&s.endsWith("`")){let a=document.createElement("code");a.className="bp-code-inline",a.textContent=s.slice(1,-1),e.appendChild(a)}else if(s.startsWith("**")&&s.endsWith("**")){let a=document.createElement("strong");a.textContent=s.slice(2,-2),e.appendChild(a)}else if(s.startsWith("*")&&s.endsWith("*")){let a=document.createElement("em");a.textContent=s.slice(1,-1),e.appendChild(a)}else if(s.startsWith("[")){let a=r[2]??"",o=sr(r[3]??"");if(o){let c=document.createElement("a");c.href=o,c.target="_blank",c.rel="noopener noreferrer",c.textContent=a,e.appendChild(c)}else e.appendChild(document.createTextNode(a))}i=n.lastIndex}if(i{navigator.clipboard?.writeText(c).then(()=>{f.textContent="✓",window.setTimeout(()=>{f.textContent=b},1200)}).catch(()=>{})}),d.append(m,f);let g=document.createElement("pre"),y=document.createElement("code");y.textContent=c,g.appendChild(y),u.append(d,g),t.appendChild(u);continue}if(!s.trim()){i++;continue}let a=/^(#{1,4})\s+(.+)$/.exec(s);if(a){let l=document.createElement(`h${Math.min(4,a[1].length+1)}`);l.className="bp-md-h",kt(l,a[2]),t.appendChild(l),i++;continue}if(s.startsWith("> ")){let l=document.createElement("blockquote");l.className="bp-md-quote";let p=[];while(i "))p.push(n[i].slice(2)),i++;kt(l,p.join(` -`)),t.appendChild(l);continue}if(/^\s*[-*]\s+/.test(s)){let l=document.createElement("ul");l.className="bp-md-list";while(i ")&&!/^\s*[-*]\s+/.test(n[i])&&!/^\s*\d+\.\s+/.test(n[i]))r.push(n[i]),i++;let o=document.createElement("p");o.className="bp-md-p";for(let l=0;l0)o.appendChild(document.createElement("br"));kt(o,r[l])}t.appendChild(o)}return t}var Vs=new Set(["(","[",'"',"'","`"]);function Us(e){return/[\p{L}\p{N}\-_\/+\[]/u.test(e)}function Ws(e){return/[\p{L}\p{N}\-_\/]/u.test(e)}function _s(e){return/[\p{L}\p{N}]/u.test(e)}function ti(e,t){if(!e)return[];let n=(t??[]).filter((a)=>a.kind==="model"&&a.word&&a.label);if(n.length===0)return[{kind:"text",text:e}];let i=[],s=0;while(sr)a=c,r=u,o=l;break}p=c+1}}if(o===null)break;if(a>s)i.push({kind:"text",text:e.slice(s,a)});i.push({kind:"model",word:o.word,label:o.label}),s=r}if(s3600000)return"";let t=Math.max(1,Math.round(e/1000));if(t<60)return`${t}s`;let n=Math.floor(t/60),i=t%60;return i>0?`${n}m ${i}s`:`${n}m`}function Ks(e,t){let n=document.createDocumentFragment(),i=ti(e,t),s=h("native.thread.model","Model").toLowerCase();for(let a of i){if(a.kind==="text"){n.appendChild(document.createTextNode(a.text));continue}let r=document.createElement("span");r.className="bp-ref-chip bp-ref-model",r.title=a.word,r.setAttribute("data-ref-word",a.word);let o=document.createElement("span");o.className="bp-ref-sigil",o.textContent="&";let l=document.createElement("span");l.className="bp-ref-label",l.textContent=a.label;let p=document.createElement("span");p.className="bp-ref-kind",p.textContent=s,r.append(o,l,p),n.appendChild(r)}return n}function Js(e){e.addEventListener("copy",(t)=>{let n=typeof window<"u"?window.getSelection():null;if(!n||n.rangeCount===0||n.isCollapsed)return;let i=n.getRangeAt(0);if(!e.contains(i.commonAncestorContainer))return;let s=i.commonAncestorContainer,o=(s.nodeType===Node.ELEMENT_NODE?s:s.parentElement)?.closest(".bp-ref-chip[data-ref-word]")?.getAttribute("data-ref-word"),l;if(o)l=o;else{let p=i.cloneContents(),c=p.querySelectorAll(".bp-ref-chip[data-ref-word]");if(c.length===0)return;for(let d of c){let m=d.getAttribute("data-ref-word")||d.textContent||"";d.replaceWith(document.createTextNode(m))}let u=p.querySelectorAll(".bp-entry");for(let d=1;d{if(!this.loadingOlder&&this.hasMore)this.loadingOlder=!0,this.cb.onLoadOlder()}),this.scrollEl.addEventListener("scroll",()=>{if(this.pinnedToBottom=this.isNearBottom(),this.hasMore&&!this.loadingOlder&&this.scrollEl.scrollTop<48)this.loadingOlder=!0,this.cb.onLoadOlder()}),typeof ResizeObserver<"u"){let n=0;new ResizeObserver(()=>{let s=this.scrollEl.clientHeight;if(n>0&&s!==n&&this.pinnedToBottom)this.scrollToBottom();n=s}).observe(this.scrollEl)}this.listEl=document.createElement("div"),this.listEl.className="bp-timeline-list",Js(this.scrollEl),this.scrollEl.append(this.olderBtn,this.listEl),e.append(this.bannerEl,this.scrollEl)}setLoading(e){this.thread=e,this.entries=[],this.hasMore=!1,this.loadingOlder=!1,this.review=null,this.unanswered=null,this.btwNote=null,this.liveNodes.clear(),this.planExpanded.clear(),this.planRevisingId="",this.planReviseDrafts.clear(),this.renderBanners(),this.olderBtn.classList.add("bp-hidden");let t=document.createElement("div");t.className="bp-empty-state",t.textContent=h("web.chat.loading","Loading messages…"),this.listEl.replaceChildren(t)}setError(e,t,n){this.thread=e,this.entries=[],this.hasMore=!1,this.loadingOlder=!1,this.review=null,this.unanswered=null,this.btwNote=null,this.liveNodes.clear(),this.planExpanded.clear(),this.planRevisingId="",this.planReviseDrafts.clear(),this.renderBanners(),this.olderBtn.classList.add("bp-hidden");let i=document.createElement("div");i.className="bp-empty-state";let s=document.createElement("div");s.className="bp-bad",s.textContent=t;let a=document.createElement("button");a.type="button",a.textContent=h("tools.retry","Retry"),a.addEventListener("click",n),i.append(s,a),this.listEl.replaceChildren(i)}getEntries(){return this.entries.slice()}refreshLocale(){let e=this.scrollEl.scrollTop;if(this.olderBtn.textContent=h("android.load.earlier","Load earlier"),this.renderBanners(),this.thread&&this.entries.length>0)this.renderEntries(!1);this.scrollEl.scrollTop=e}setThread(e,t,n,i,s){if((this.thread?.id??"")!==(e?.id??""))this.planExpanded.clear(),this.planRevisingId="",this.planReviseDrafts.clear();this.thread=e,this.entries=t.filter((a)=>!ln(a)),this.hasMore=n,this.loadingOlder=!1,this.review=i,this.unanswered=s,this.btwNote=null,this.renderBanners(),this.renderEntries(!0)}updateThreadMeta(e){if(!this.thread||this.thread.id!==e.id)return;this.thread=e}setReview(e){this.review=e,this.renderBanners()}setUnanswered(e){this.unanswered=e,this.renderBanners()}setNoProvider(e){this.noProvider=e,this.renderBanners()}showBtw(e,t){this.btwNote={q:e,a:t},this.renderBanners()}prependEntries(e,t){this.loadingOlder=!1;let n=this.scrollEl.scrollHeight,i=new Set(this.entries.map((a)=>a.id)),s=e.filter((a)=>!ln(a)&&!i.has(a.id));this.entries=[...s,...this.entries],this.hasMore=t,this.renderEntries(!1),this.scrollEl.scrollTop+=this.scrollEl.scrollHeight-n}clearLoadingOlder(){this.loadingOlder=!1}upsertEntry(e){if(ln(e))return;let t=this.isNearBottom()||e.kind==="user"&&Boolean(e.clientId),n=this.entries.findIndex((i)=>i.id===e.id);if(n<0&&e.clientId)n=this.entries.findIndex((i)=>i.clientId&&i.clientId===e.clientId);if(n>=0)this.entries[n]=e;else this.entries.push(e);this.renderEntries(t)}goTo(e){let t=this.scrollEl.querySelector(`[data-entry-id="${CSS.escape(e)}"]`);if(!t)return!1;return t.scrollIntoView({block:"center",behavior:"smooth"}),t.classList.remove("bp-entry-flash"),t.offsetWidth,t.classList.add("bp-entry-flash"),window.setTimeout(()=>t.classList.remove("bp-entry-flash"),1200),!0}removeEntry(e){let t=this.entries.filter((n)=>n.id!==e);if(t.length!==this.entries.length)this.entries=t,this.renderEntries(!1)}appendLiveText(e,t,n){let i=this.isNearBottom(),s=this.entries.find((r)=>r.id===e);if(!s){s={id:e,kind:"assistant",text:t,at:n,live:!0},this.entries.push(s),this.renderEntries(i);return}s.text+=t,s.live=!0;let a=this.liveNodes.get(e);if(a){if(a.replaceChildren(St(s.text)),i)this.scrollToBottom()}else this.renderEntries(i)}isNearBottom(){let e=this.scrollEl;return e.scrollHeight-e.scrollTop-e.clientHeight<80}scrollToBottom(){this.pinnedToBottom=!0,this.scrollEl.scrollTop=this.scrollEl.scrollHeight}renderBanners(){let e=document.createDocumentFragment();if(this.noProvider&&!this.thread?.id.includes("~")){let t=document.createElement("div");t.className="bp-banner bp-no-provider",t.setAttribute("data-testid","no-provider-banner");let n=document.createElement("div");n.className="bp-no-provider-body";let i=document.createElement("strong");if(i.textContent=pe(this.noProvider.head),n.appendChild(i),this.noProvider.text){let r=document.createElement("span");r.className="bp-dim",r.textContent=pe(this.noProvider.text),n.appendChild(r)}let s=document.createElement("div");s.className="bp-banner-actions";let a=document.createElement("button");a.type="button",a.className="primary",a.setAttribute("data-testid","no-provider-accounts-btn"),a.textContent=pe(this.noProvider.button),a.addEventListener("click",()=>this.cb.onOpenAccounts?.()),s.appendChild(a),t.append(n,s),e.appendChild(t)}if(this.review&&(this.review.text||this.review.button)){let t=document.createElement("div");t.className="bp-banner bp-review-bar",t.setAttribute("data-testid","review-bar");let n=document.createElement("span");if(n.textContent=this.review.text||h("web.chat.review.mode","Review mode"),t.appendChild(n),this.review.button){let i=document.createElement("button");i.type="button",i.textContent=this.review.button,i.addEventListener("click",()=>this.cb.onToggleReview(!(this.review?.on??!0))),t.appendChild(i)}e.appendChild(t)}if(this.unanswered&&(this.unanswered.head||this.unanswered.text)){let t=document.createElement("div");t.className="bp-banner bp-unanswered",t.setAttribute("data-testid","unanswered-notice");let n=document.createElement("div");if(n.className="bp-unanswered-body",this.unanswered.head){let i=document.createElement("strong");i.textContent=this.unanswered.head,n.appendChild(i)}if(this.unanswered.text){let i=document.createElement("span");i.textContent=this.unanswered.text,n.appendChild(i)}if(t.appendChild(n),this.unanswered.buttons?.length){let i=document.createElement("div");i.className="bp-banner-actions";for(let s of this.unanswered.buttons){let a=document.createElement("button");if(a.type="button",s.primary)a.className="primary";a.textContent=s.label,a.addEventListener("click",()=>this.cb.onUnansweredAction(s.action,s.value)),i.appendChild(a)}t.appendChild(i)}e.appendChild(t)}if(this.btwNote){let t=document.createElement("div");t.className="bp-banner bp-btw-banner";let n=document.createElement("div"),i=document.createElement("div");i.className="bp-dim",i.textContent=`/btw ${this.btwNote.q}`;let s=document.createElement("div");s.appendChild(St(this.btwNote.a)),n.append(i,s);let a=document.createElement("button");a.type="button",a.className="icon",a.textContent="×",a.addEventListener("click",()=>{this.btwNote=null,this.renderBanners()}),t.append(n,a),e.appendChild(t)}this.bannerEl.replaceChildren(e)}makeEntryActions(e,t,n){let i=document.createElement("div");i.className="bp-entry-foot"+(t?" user":"");let s=document.createElement("button");s.type="button",s.className="bp-entry-act";let a=h("common.copy","Copy"),r=document.createElement("span");r.textContent=a,s.append(At(["M9 9h11v11H9z","M5 15H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v1"]),r),s.addEventListener("click",()=>{navigator.clipboard?.writeText(e.text||"").then(()=>{r.textContent="✓",window.setTimeout(()=>{r.textContent=a},1000)}).catch(()=>{})});let o=document.createElement("button");o.type="button",o.className="bp-entry-act";let l=document.createElement("span");l.textContent=h("reply.action","Reply"),o.append(At(["M9 17l-5-5 5-5","M20 18v-2a4 4 0 0 0-4-4H4"]),l),o.addEventListener("click",()=>this.cb.onReplyEntry(e));let p=!e.live&&!e.id.startsWith("local-")&&!e.id.startsWith("live:"),c=document.createElement("span");c.className="bp-entry-time";let u=zs(e.at);if(t)c.textContent=u,i.append(s,...p?[o]:[],c);else{let d=n&&e.at?qs(cn(e.at)-cn(n)):"",m=u?d?h("web.chat.finished.dur","Finished {time} · {dur}",{time:u,dur:d}):h("web.chat.finished","Finished {time}",{time:u}):"";c.textContent=e.live?h("web.chat.streaming","Streaming…"):m,i.append(c,s,...p?[o]:[])}return i}closePlanRevise(){let e=this.planRevisingId;if(!e)return!1;this.planRevisingId="";let t=this.scrollEl.scrollTop;return this.renderEntries(!1),this.scrollEl.scrollTop=t,this.listEl.querySelector(`[data-testid="ask-${CSS.escape(e)}"] [data-testid="plan-revise"]`)?.focus(),!0}renderEntries(e){let t=null,n=typeof document<"u"?document.activeElement:null;if(n instanceof HTMLTextAreaElement&&n.classList.contains("bp-plan-revise-input")&&this.listEl.contains(n)&&this.planRevisingId)this.planReviseDrafts.set(this.planRevisingId,n.value),t={askId:this.planRevisingId,start:n.selectionStart,end:n.selectionEnd,dir:n.selectionDirection};this.olderBtn.classList.toggle("bp-hidden",!this.hasMore),this.liveNodes.clear();let i=document.createDocumentFragment();if(!this.thread){let a=document.createElement("div");a.className="bp-empty-state",a.textContent=h("web.chat.choose","Choose a project thread on the left to begin."),i.appendChild(a),this.listEl.replaceChildren(i);return}if(this.entries.length===0){let a=document.createElement("div");a.className="bp-empty-state",a.textContent=h("web.chat.empty","No messages yet. Type below to start a turn."),i.appendChild(a),this.listEl.replaceChildren(i);return}let s=0;for(let a of this.entries){if(a.kind==="user"&&a.at)s=a.at;let r=document.createElement("article");if(r.className=`bp-entry bp-entry-${a.kind}`+(a.live?" is-live":""),r.setAttribute("data-entry-id",a.id),a.kind==="tool"&&a.tool){let c=document.createElement("div");c.className=`bp-tool-pill bp-tool-${a.tool.state||"done"}`;let u=document.createElement("span");if(u.className="bp-tool-name",u.textContent=a.tool.name,c.appendChild(u),a.tool.summary){let d=document.createElement("span");d.className="bp-tool-summary",d.textContent=a.tool.summary,c.appendChild(d)}r.appendChild(c),i.appendChild(r);continue}if(a.kind==="ask"&&a.ask){let c=a.ask;if(c.kind==="plan"){r.appendChild(this.renderPlanAsk(c)),i.appendChild(r);continue}let u=document.createElement("div");u.className="bp-ask-card",u.setAttribute("data-testid",`ask-${c.id}`);let d=document.createElement("div");if(d.className="bp-ask-q",d.textContent=c.question,u.appendChild(d),c.state==="open"){let m=document.createElement("div");if(m.className="bp-ask-opts",c.options&&c.options.length>0)for(let f of c.options){let b=document.createElement("button");b.type="button",b.textContent=f.label,b.addEventListener("click",()=>this.cb.onAnswerAsk(c.id,f.id)),m.appendChild(b)}else{let f=document.createElement("input");f.type="text",f.className="bp-input",f.placeholder=h("web.chat.answer.placeholder","Type answer…");let b=document.createElement("button");b.type="button",b.className="primary",b.textContent=h("web.chat.answer.btn","Answer"),b.addEventListener("click",()=>{if(f.value.trim())this.cb.onAnswerAsk(c.id,f.value.trim())}),m.append(f,b)}u.appendChild(m)}else{let m=document.createElement("div");m.className="bp-ask-answered",m.textContent=h("web.chat.answered","Answered: {answer}",{answer:c.answered??""}),u.appendChild(m)}r.appendChild(u),i.appendChild(r);continue}let o=Boolean(a.text&&a.text.trim().length>0),l=Boolean(a.images&&a.images.length>0),p=Boolean(a.attachments&&a.attachments.length>0);if(!o&&!l&&!p&&!a.live)continue;if(a.replyTo?.quote){let c=document.createElement("div");c.className="bp-reply-quote",c.textContent=h("gpui.b.in.reply.to","↩ In reply to: {quote}",{quote:a.replyTo.quote});let u=a.replyTo.id;c.setAttribute("role","button"),c.tabIndex=0,c.setAttribute("data-testid","entry-reply-quote");let d=()=>{if(this.cb.onGoToEntry)this.cb.onGoToEntry(u);else this.goTo(u)};c.addEventListener("click",d),c.addEventListener("keydown",(m)=>{if(m.key==="Enter"||m.key===" ")m.preventDefault(),d()}),r.appendChild(c)}if(o||a.live){let c=document.createElement("div");if(c.className="bp-entry-body",a.kind==="user")c.appendChild(Ks(a.text||"",a.refs));else c.appendChild(St(a.text||""));if(a.live)this.liveNodes.set(a.id,c);r.appendChild(c)}if(p&&a.attachments){let c=document.createElement("div");c.className="bp-entry-images";for(let u of a.attachments)if(u.previewUrl){let d=document.createElement("img");d.className="bp-reply-img",d.src=u.previewUrl,d.alt=u.name||"attachment",c.appendChild(d)}else if(u.path||u.name){let d=document.createElement("span");d.className="bp-tool-pill",d.textContent=u.name||u.path||"image",c.appendChild(d)}if(c.childElementCount>0)r.appendChild(c)}if(a.images&&a.images.length>0){let c=document.createElement("div");c.className="bp-entry-images";for(let u of a.images){let d=document.createElement("img");d.className="bp-reply-img",d.alt=u;let m=`${a.id}|${u}`,f=this.imageCache.get(m);if(f)d.src=f;else this.cb.onLoadImage(a.id,u).then((b)=>{if(!b)return;let g=b.url??(b.mime&&b.data?`data:${b.mime};base64,${b.data}`:"");if(!g)return;this.imageCache.set(m,g),d.src=g});c.appendChild(d)}r.appendChild(c)}r.appendChild(this.makeEntryActions(a,a.kind==="user",a.kind==="assistant"?s:void 0)),i.appendChild(r)}if(this.listEl.replaceChildren(i),t&&this.planRevisingId===t.askId){let a=this.listEl.querySelector(`[data-testid="ask-${CSS.escape(t.askId)}"] .bp-plan-revise-input`);if(a){if(a.focus({preventScroll:!0}),t.start!==null&&t.end!==null)a.setSelectionRange(t.start,t.end,t.dir??void 0)}}if(e&&!t)this.scrollToBottom()}renderPlanAsk(e){let t=this.planExpanded.has(e.id),n=e.state==="open"&&this.planRevisingId===e.id,i=document.createElement("div");i.className="bp-ask-card bp-ask-plan",i.setAttribute("data-testid",`ask-${e.id}`);let s=document.createElement("div");s.className="bp-plan-head";let a=At(["M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z","M14 2v6h6","M16 13H8","M16 17H8","M10 9H8"]);a.classList.add("bp-plan-head-ic");let r=document.createElement("span");if(r.className="bp-plan-title",r.textContent=!e.head||e.head==="Proposed plan"?h("ask.plan","Proposed plan"):pe(e.head),s.append(a,r),e.state==="open"){let c=document.createElement("span");c.className="bp-plan-badge",c.textContent=h("gpui.ask.plan.ready","Ready for review"),s.appendChild(c)}let o=document.createElement("span");if(o.className="bp-mgmt-flex1",s.appendChild(o),e.question){let c=document.createElement("button");c.type="button",c.className="bp-plan-head-btn";let u=h("common.copy","Copy"),d=document.createElement("span");d.textContent=u,c.append(At(["M9 9h11v11H9z","M5 15H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v1"]),d),c.addEventListener("click",()=>{navigator.clipboard?.writeText(e.question).then(()=>{c.classList.add("copied"),d.textContent=h("web.clone.copied","Copied"),window.setTimeout(()=>{c.classList.remove("copied"),d.textContent=u},1200)}).catch(()=>{})}),s.appendChild(c)}let l=document.createElement("button");l.type="button",l.className="bp-plan-head-btn",l.setAttribute("data-testid","plan-expand"),l.textContent=t?h("gpui.c.term.collapse","Collapse"):h("gpui.c.term.expand","Expand"),l.addEventListener("click",()=>{if(this.planExpanded.has(e.id))this.planExpanded.delete(e.id);else this.planExpanded.add(e.id);let c=this.scrollEl.scrollTop;this.renderEntries(!1),this.scrollEl.scrollTop=c}),s.appendChild(l),i.appendChild(s);let p=document.createElement("div");if(p.className="bp-plan-body"+(t?" is-expanded":""),p.setAttribute("data-testid","plan-body"),p.appendChild(St(e.question||"")),i.appendChild(p),e.state==="open"){let c=document.createElement("div");c.className="bp-plan-actions";let u=e.options?.find((b)=>b.id==="implement"||b.id.endsWith("|implement")),d=document.createElement("button");if(d.type="button",d.className="primary",d.setAttribute("data-testid","plan-implement"),d.textContent=u?.label&&u.label!=="Implement"?pe(u.label):h("approval.implement","Implement"),d.addEventListener("click",()=>{this.planRevisingId="",this.planReviseDrafts.delete(e.id),this.cb.onAnswerAsk(e.id,u?.id??"implement")}),c.appendChild(d),e.revise!==!1){let b=document.createElement("button");b.type="button",b.className="bp-plan-revise-btn"+(n?" active":""),b.setAttribute("data-testid","plan-revise"),b.append(At(["M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7","M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"]),document.createTextNode(h("gpui.ask.plan.revise","Revise"))),b.addEventListener("click",()=>{let g=this.planRevisingId!==e.id;this.planRevisingId=g?e.id:"";let y=this.scrollEl.scrollTop;if(this.renderEntries(!1),this.scrollEl.scrollTop=y,g)this.listEl.querySelector(`[data-testid="ask-${CSS.escape(e.id)}"] .bp-plan-revise-input`)?.focus()}),c.appendChild(b)}let m=e.options?.find((b)=>b.id==="dismiss"||b.id.endsWith("|dismiss")),f=document.createElement("button");if(f.type="button",f.className="bp-plan-dismiss-btn",f.setAttribute("data-testid","plan-dismiss"),f.textContent=m?.label&&m.label!=="Dismiss"?pe(m.label):h("approval.dismiss","Dismiss"),f.addEventListener("click",()=>{this.planRevisingId="",this.planReviseDrafts.delete(e.id),this.cb.onAnswerAsk(e.id,m?.id??"dismiss")}),c.appendChild(f),i.appendChild(c),n){let b=document.createElement("div");b.className="bp-plan-revise",b.setAttribute("data-testid","plan-revise-drawer");let g=document.createElement("textarea");g.rows=2,g.className="bp-input bp-plan-revise-input",g.placeholder=h("gpui.ask.plan.reviseph","What should change in the plan?"),g.value=this.planReviseDrafts.get(e.id)??"";let y=document.createElement("button");y.type="button",y.className="bp-plan-revise-send",y.setAttribute("data-testid","plan-revise-send"),y.textContent=h("gpui.ask.plan.sendrev","Send revision"),y.disabled=g.value.trim().length===0;let w=()=>{let N=g.value.trim();if(!N)return;this.planRevisingId="",this.planReviseDrafts.delete(e.id),this.cb.onAnswerAsk(e.id,`revise:${N}`)},x=()=>{this.closePlanRevise()};b.addEventListener("keydown",(N)=>{if(N.key==="Escape")N.preventDefault(),N.stopPropagation(),x()}),g.addEventListener("input",()=>{this.planReviseDrafts.set(e.id,g.value),y.disabled=g.value.trim().length===0}),g.addEventListener("keydown",(N)=>{if(N.key==="Enter"&&!N.shiftKey)N.preventDefault(),w()}),y.addEventListener("click",w);let A=document.createElement("button");A.type="button",A.className="bp-btn-ghost",A.textContent=h("common.cancel","Cancel"),A.addEventListener("click",x),b.append(g,y,A),i.appendChild(b)}}else{let c=document.createElement("div");c.className="bp-ask-answered",c.textContent=h("web.chat.answered","Answered: {answer}",{answer:e.answered??""}),i.appendChild(c)}return i}}var ii={claude:{viewBox:"0 0 24 24",d:"m4.7144 15.9555 4.7174-2.6471.079-.2307-.079-.1275h-.2307l-.7893-.0486-2.6956-.0729-2.3375-.0971-2.2646-.1214-.5707-.1215-.5343-.7042.0546-.3522.4797-.3218.686.0608 1.5179.1032 2.2767.1578 1.6514.0972 2.4468.255h.3886l.0546-.1579-.1336-.0971-.1032-.0972L6.973 9.8356l-2.55-1.6879-1.3356-.9714-.7225-.4918-.3643-.4614-.1578-1.0078.6557-.7225.8803.0607.2246.0607.8925.686 1.9064 1.4754 2.4893 1.8336.3643.3035.1457-.1032.0182-.0728-.164-.2733-1.3539-2.4467-1.445-2.4893-.6435-1.032-.17-.6194c-.0607-.255-.1032-.4674-.1032-.7285L6.287.1335 6.6997 0l.9957.1336.419.3642.6192 1.4147 1.0018 2.2282 1.5543 3.0296.4553.8985.2429.8318.091.255h.1579v-.1457l.1275-1.706.2368-2.0947.2307-2.6957.0789-.7589.3764-.9107.7468-.4918.5828.2793.4797.686-.0668.4433-.2853 1.8517-.5586 2.9021-.3643 1.9429h.2125l.2429-.2429.9835-1.3053 1.6514-2.0643.7286-.8196.85-.9046.5464-.4311h1.0321l.759 1.1293-.34 1.1657-1.0625 1.3478-.8804 1.1414-1.2628 1.7-.7893 1.36.0729.1093.1882-.0183 2.8535-.607 1.5421-.2794 1.8396-.3157.8318.3886.091.3946-.3278.8075-1.967.4857-2.3072.4614-3.4364.8136-.0425.0304.0486.0607 1.5482.1457.6618.0364h1.621l3.0175.2247.7892.522.4736.6376-.079.4857-1.2142.6193-1.6393-.3886-3.825-.9107-1.3113-.3279h-.1822v.1093l1.0929 1.0686 2.0035 1.8092 2.5075 2.3314.1275.5768-.3218.4554-.34-.0486-2.2039-1.6575-.85-.7468-1.9246-1.621h-.1275v.17l.4432.6496 2.3436 3.5214.1214 1.0807-.17.3521-.6071.2125-.6679-.1214-1.3721-1.9246L14.38 17.959l-1.1414-1.9428-.1397.079-.674 7.2552-.3156.3703-.7286.2793-.6071-.4614-.3218-.7468.3218-1.4753.3886-1.9246.3157-1.53.2853-1.9004.17-.6314-.0121-.0425-.1397.0182-1.4328 1.9672-2.1796 2.9446-1.7243 1.8456-.4128.164-.7164-.3704.0667-.6618.4008-.5889 2.386-3.0357 1.4389-1.882.929-1.0868-.0062-.1579h-.0546l-6.3385 4.1164-1.1293.1457-.4857-.4554.0608-.7467.2307-.2429 1.9064-1.3114Z"},codex:{viewBox:"0 0 256 260",d:"M239.184 106.203a64.716 64.716 0 0 0-5.576-53.103C219.452 28.459 191 15.784 163.213 21.74A65.586 65.586 0 0 0 52.096 45.22a64.716 64.716 0 0 0-43.23 31.36c-14.31 24.602-11.061 55.634 8.033 76.74a64.665 64.665 0 0 0 5.525 53.102c14.174 24.65 42.644 37.324 70.446 31.36a64.72 64.72 0 0 0 48.754 21.744c28.481.025 53.714-18.361 62.414-45.481a64.767 64.767 0 0 0 43.229-31.36c14.137-24.558 10.875-55.423-8.083-76.483Zm-97.56 136.338a48.397 48.397 0 0 1-31.105-11.255l1.535-.87l51.67-29.825a8.595 8.595 0 0 0 4.247-7.367v-72.85l21.845 12.636c.218.111.37.32.409.563v60.367c-.056 26.818-21.783 48.545-48.601 48.601Zm-104.466-44.61a48.345 48.345 0 0 1-5.781-32.589l1.534.921l51.722 29.826a8.339 8.339 0 0 0 8.441 0l63.181-36.425v25.221a.87.87 0 0 1-.358.665l-52.335 30.184c-23.257 13.398-52.97 5.431-66.404-17.803ZM23.549 85.38a48.499 48.499 0 0 1 25.58-21.333v61.39a8.288 8.288 0 0 0 4.195 7.316l62.874 36.272l-21.845 12.636a.819.819 0 0 1-.767 0L41.353 151.53c-23.211-13.454-31.171-43.144-17.804-66.405v.256Zm179.466 41.695l-63.08-36.63L161.73 77.86a.819.819 0 0 1 .768 0l52.233 30.184a48.6 48.6 0 0 1-7.316 87.635v-61.391a8.544 8.544 0 0 0-4.4-7.213Zm21.742-32.69l-1.535-.922l-51.619-30.081a8.39 8.39 0 0 0-8.492 0L99.98 99.808V74.587a.716.716 0 0 1 .307-.665l52.233-30.133a48.652 48.652 0 0 1 72.236 50.391v.205ZM88.061 139.097l-21.845-12.585a.87.87 0 0 1-.41-.614V65.685a48.652 48.652 0 0 1 79.757-37.346l-1.535.87l-51.67 29.825a8.595 8.595 0 0 0-4.246 7.367l-.051 72.697Zm11.868-25.58L128.067 97.3l28.188 16.218v32.434l-28.086 16.218l-28.188-16.218l-.052-32.434Z"},grok:{viewBox:"0 0 24 24",d:"M9.497 15.122 L16.811 9.491 C17.169 9.215 17.682 9.323 17.852 9.751 C18.752 12.013 18.35 14.73 16.561 16.596 C14.772 18.462 12.283 18.871 10.007 17.939 L7.522 19.139 C11.087 21.68 15.416 21.052 18.121 18.229 C20.267 15.991 20.931 12.941 20.31 10.19 L20.315 10.196 C19.414 6.155 20.537 4.54 22.837 1.237 C22.891 1.159 22.946 1.08 23 1 L19.974 4.156 L19.974 4.146 L9.495 15.124 M7.987 16.49 C5.429 13.941 5.87 9.996 8.053 7.721 C9.667 6.037 12.313 5.35 14.622 6.361 L17.102 5.166 C16.655 4.829 16.082 4.467 15.425 4.213 C12.455 2.938 8.9 3.573 6.485 6.088 C4.163 8.51 3.433 12.234 4.687 15.411 C5.624 17.786 4.088 19.466 2.541 21.162 C1.993 21.763 1.443 22.364 1 23 L7.985 16.492"},muse:{viewBox:"0 0 24 24",d:"M10.73.032c-1.333 0-2.032 1.016-2.032 2.285 0 2.223 2.127 4.953 4.318 4.953 1.301 0 2-.953 2-2.254 0-2.254-2.095-4.984-4.286-4.984m8.413 2.984c-1.968 0-3.397 2.73-3.397 4.825 0 1.556.794 3.016 2.254 3.016 2 0 3.365-2.762 3.365-4.794 0-1.523-.762-3.047-2.222-3.047M4.857 4.159c-1.968 0-3.778 1.016-3.778 2.54 0 1.65 2.16 2.793 4.254 2.793 1.873 0 3.778-.92 3.778-2.508 0-1.682-2.159-2.825-4.254-2.825m-.222 6.476C2.413 10.635 0 13.175 0 15.397c0 1.301.825 2.159 2.095 2.159 2.19 0 4.603-2.508 4.603-4.794 0-1.27-.761-2.127-2.063-2.127m16.667.698c-2.223 0-5.016 1.62-5.016 3.651 0 1.238 1.047 2.19 2.698 2.19 2.159 0 5.016-1.587 5.016-3.682 0-1.302-1.08-2.159-2.698-2.159M7.619 16c-1.524 0-2.38 1.746-2.38 3.429 0 2.063 1.269 4.54 3.047 4.54 1.524 0 2.38-1.81 2.38-3.461C10.667 18.57 9.46 16 7.62 16m6.571 1.016c-1.333 0-2.476.667-2.476 2.032 0 2.095 2.667 4.063 4.92 4.063 1.366 0 2.54-.73 2.54-2.063 0-2.032-2.698-4.032-4.984-4.032"},antigravity:{viewBox:"0 0 24 24",d:"M20.197 20.618 C21.318 21.459 23 20.898 21.459 19.357 C16.834 14.873 17.815 2.541 12.07 2.541 C6.325 2.541 7.306 14.873 2.682 19.357 C1 21.038 2.822 21.459 3.943 20.618 C8.287 17.675 8.006 12.49 12.07 12.49 C16.134 12.49 15.853 17.675 20.197 20.618 Z"},opencode:{viewBox:"0 0 24 24",d:"M22 24H2V0h20zM17 4.8H7v14.4h10z"},pi:{viewBox:"0 0 24 24",d:"M0 0v24h6v-6h6v-6H6V6h6v6h6V0Zm18 12v12h6V12Z"},omp:{viewBox:"0 0 24 24",d:"M1.44 3.86 L22.56 3.86 C23 3.86 23 3.86 23 4.3 L23 6.06 C23 6.5 23 6.5 22.56 6.5 L1.44 6.5 C1 6.5 1 6.5 1 6.06 L1 4.3 C1 3.86 1 3.86 1.44 3.86 Z M4.74 6.5 L6.5 6.5 C6.94 6.5 6.94 6.5 6.94 6.94 L6.94 19.7 C6.94 20.14 6.94 20.14 6.5 20.14 L4.74 20.14 C4.3 20.14 4.3 20.14 4.3 19.7 L4.3 6.94 C4.3 6.5 4.3 6.5 4.74 6.5 Z M15.74 6.5 L17.5 6.5 C17.94 6.5 17.94 6.5 17.94 6.94 L17.94 13.32 C17.94 13.76 17.94 13.76 17.5 13.76 L15.74 13.76 C15.3 13.76 15.3 13.76 15.3 13.32 L15.3 6.94 C15.3 6.5 15.3 6.5 15.74 6.5 Z M15.08 14.64 L18.16 14.64 C18.82 14.64 18.82 14.64 18.82 15.3 L18.82 17.5 C18.82 18.16 18.82 18.16 18.16 18.16 L15.08 18.16 C14.42 18.16 14.42 18.16 14.42 17.5 L14.42 15.3 C14.42 14.64 14.42 14.64 15.08 14.64 Z"}};var Vt="http://www.w3.org/2000/svg",si=4,ai=new Set(["image/png","image/jpeg","image/webp","image/gif"]);function Ut(e){let t=document.createElementNS(Vt,"svg");t.setAttribute("viewBox","0 0 24 24"),t.setAttribute("width","15"),t.setAttribute("height","15"),t.setAttribute("fill","none"),t.setAttribute("stroke","currentColor"),t.setAttribute("stroke-width","1.8"),t.setAttribute("aria-hidden","true");for(let n of e){let i=document.createElementNS(Vt,"path");i.setAttribute("d",n),t.appendChild(i)}return t}function pn(){return Ut(["M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z","M14 2v6h6","M16 13H8","M16 17H8","M10 9H8"])}function ri(){return Ut(["M6 4l14 8-14 8z"])}function Ys(e){let t=(e||"").toLowerCase();if(t.includes("claude")||t.includes("anthropic"))return{mark:"claude",glyph:"A",color:"#d97757",title:"Claude"};if(t.includes("codex")||t.includes("openai"))return{mark:"codex",glyph:"O",color:"#10a37f",title:"Codex"};if(t.includes("gemini")||t.includes("antigravity")||t==="agy")return{mark:"antigravity",glyph:"G",color:"#4285f4",title:"Antigravity"};if(t.includes("grok"))return{mark:"grok",glyph:"X",color:"#6b7280",title:"Grok"};if(t.includes("muse"))return{mark:"muse",glyph:"M",color:"#8b5cf6",title:"Muse"};if(t.includes("opencode"))return{mark:"opencode",glyph:"C",color:"#2563eb",title:"OpenCode"};if(t.includes("omp")||t.includes("oh-my-pi"))return{mark:"omp",glyph:"Ω",color:"#c026d3",title:"Oh My Pi"};if(t==="pi"||t.startsWith("pi/")||t.startsWith("@pi"))return{mark:"pi",glyph:"π",color:"#db2777",title:"Pi"};return{glyph:"●",color:"var(--accent)",title:e||"Model"}}function Xs(e){let t=ii[e];if(!t||!t.d)return null;let n=document.createElementNS(Vt,"svg");n.setAttribute("viewBox",t.viewBox||"0 0 24 24"),n.setAttribute("width","14"),n.setAttribute("height","14"),n.setAttribute("fill","currentColor"),n.setAttribute("aria-hidden","true");let i=document.createElementNS(Vt,"path");return i.setAttribute("d",t.d),n.appendChild(i),n}class un{popupEl;attachStripEl;planBarEl;fileInput;textarea;memoryEl;memoryFill;memoryText;providerMarkEl;modelTextEl;ctxEl;planChipBtn;planChipIconHost;planChipLbl;attachBtn;voiceBtn;sendBtn;stopBtn;errorEl;replyEl;cb;commands=[];popupMode="none";filteredSlash=[];mentionItems=[];popupIdx=0;enabled=!1;attachments=[];planMode=null;constructor(e,t){this.cb=t;let n=document.createElement("div");n.className="bp-composer",n.setAttribute("data-testid","composer");let i=document.createElement("div");i.className="bp-composer-inner",this.popupEl=document.createElement("div"),this.popupEl.className="bp-composer-popup bp-hidden",this.popupEl.setAttribute("data-testid","slash-menu"),this.errorEl=document.createElement("div"),this.errorEl.className="bp-composer-err bp-hidden",this.replyEl=document.createElement("div"),this.replyEl.className="bp-reply-strip bp-hidden",this.replyEl.setAttribute("data-testid","composer-reply"),this.attachStripEl=document.createElement("div"),this.attachStripEl.className="bp-attach-strip bp-hidden",this.attachStripEl.setAttribute("data-testid","composer-attachments"),this.planBarEl=document.createElement("div"),this.planBarEl.className="bp-plan-bar bp-hidden",this.planBarEl.setAttribute("data-testid","composer-plan-bar"),this.fileInput=document.createElement("input"),this.fileInput.type="file",this.fileInput.accept="image/png,image/jpeg,image/webp,image/gif",this.fileInput.multiple=!0,this.fileInput.className="bp-hidden",this.fileInput.setAttribute("data-testid","composer-file-input"),this.fileInput.addEventListener("change",()=>{if(this.fileInput.files)this.addFiles(Array.from(this.fileInput.files));this.fileInput.value=""}),this.textarea=document.createElement("textarea"),this.textarea.className="bp-composer-input",this.textarea.rows=2,this.textarea.placeholder=h("composer.placeholder","Ask anything: @bot, >thread, %project, #room, $skill, /btw"),this.textarea.setAttribute("data-testid","composer-input");let s=document.createElement("div");s.className="bp-composer-bar";let a=document.createElement("div");a.className="bp-composer-model",this.providerMarkEl=document.createElement("span"),this.providerMarkEl.className="bp-provider-mark",this.providerMarkEl.textContent="●",this.modelTextEl=document.createElement("span"),this.modelTextEl.className="bp-model-text",this.modelTextEl.textContent="default",this.ctxEl=document.createElement("span"),this.ctxEl.className="bp-ctx-pct bp-hidden",this.ctxEl.setAttribute("data-testid","composer-ctx"),a.append(this.providerMarkEl,this.modelTextEl,this.ctxEl),this.planChipBtn=document.createElement("button"),this.planChipBtn.type="button",this.planChipBtn.className="bp-plan-chip bp-hidden",this.planChipBtn.setAttribute("data-testid","composer-plan-chip"),this.planChipBtn.setAttribute("aria-pressed","false"),this.planChipIconHost=document.createElement("span"),this.planChipIconHost.className="bp-plan-chip-ic",this.planChipIconHost.appendChild(pn()),this.planChipLbl=document.createElement("span"),this.planChipLbl.textContent=h("gpui.mgmt.plan.tab","Plan"),this.planChipBtn.append(this.planChipIconHost,this.planChipLbl),this.planChipBtn.addEventListener("click",()=>this.cb.onCyclePlanMode?.()),this.memoryEl=document.createElement("div"),this.memoryEl.className="bp-composer-memory bp-hidden",this.memoryEl.setAttribute("data-testid","composer-memory");let r=document.createElement("div");r.className="bp-memory-meter",this.memoryFill=document.createElement("div"),this.memoryFill.className="bp-memory-fill",r.appendChild(this.memoryFill),this.memoryText=document.createElement("span"),this.memoryEl.append(r,this.memoryText);let o=document.createElement("div");o.className="bp-composer-btns",this.attachBtn=document.createElement("button"),this.attachBtn.type="button",this.attachBtn.className="icon bp-composer-tool",this.attachBtn.title=h("web.composer.attach","Attach image"),this.attachBtn.setAttribute("aria-label",h("web.composer.attach","Attach image")),this.attachBtn.setAttribute("data-testid","composer-attach"),this.attachBtn.appendChild(Ut(["M21.44 11.05l-9.19 9.19a6 6 0 0 1-8.49-8.49l9.19-9.19a4 4 0 0 1 5.66 5.66l-9.2 9.19a2 2 0 0 1-2.83-2.83l8.49-8.48"])),this.attachBtn.addEventListener("click",()=>this.fileInput.click()),this.voiceBtn=document.createElement("button"),this.voiceBtn.type="button",this.voiceBtn.className="icon bp-composer-tool",this.voiceBtn.title=h("web.composer.voice","Voice dictation"),this.voiceBtn.setAttribute("aria-label",h("web.composer.voice","Voice dictation")),this.voiceBtn.setAttribute("data-testid","composer-voice"),this.voiceBtn.appendChild(Ut(["M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z","M19 10v2a7 7 0 0 1-14 0v-2","M12 19v4","M8 23h8"])),this.voiceBtn.addEventListener("click",()=>this.cb.onToggleVoice?.()),this.stopBtn=document.createElement("button"),this.stopBtn.type="button",this.stopBtn.className="primary stop bp-hidden",this.stopBtn.textContent=h("composer.stop","Stop"),this.stopBtn.setAttribute("data-testid","composer-stop"),this.stopBtn.addEventListener("click",()=>this.cb.onInterrupt()),this.sendBtn=document.createElement("button"),this.sendBtn.type="button",this.sendBtn.className="primary bp-send-btn",this.sendBtn.textContent=h("composer.send","Send"),this.sendBtn.setAttribute("data-testid","composer-send"),this.sendBtn.addEventListener("click",()=>this.submit()),o.append(this.attachBtn,this.voiceBtn,this.stopBtn,this.sendBtn),s.append(a,this.planChipBtn,this.memoryEl,o),i.append(this.popupEl,this.errorEl,this.replyEl,this.attachStripEl,this.planBarEl,this.fileInput,this.textarea,s),n.appendChild(i),e.appendChild(n),this.textarea.addEventListener("paste",(l)=>{let p=l.clipboardData?.items;if(!p)return;let c=[];for(let u=0;u0)l.preventDefault(),this.addFiles(c)}),this.textarea.addEventListener("input",()=>{this.autoGrow(),this.clearError(),this.updatePopups()}),this.textarea.addEventListener("keydown",(l)=>{if(this.popupMode!=="none"){let p=this.popupMode==="slash"?this.filteredSlash.length:this.mentionItems.length;if(l.key==="ArrowDown"){l.preventDefault(),this.popupIdx=(this.popupIdx+1)%Math.max(1,p),this.renderPopup();return}if(l.key==="ArrowUp"){l.preventDefault(),this.popupIdx=(this.popupIdx-1+Math.max(1,p))%Math.max(1,p),this.renderPopup();return}if(l.key==="Tab"||l.key==="Enter"&&!l.shiftKey&&this.shouldCompleteOnEnter()){l.preventDefault(),this.applyPopupChoice(this.popupIdx);return}if(l.key==="Escape"){l.preventDefault(),this.closePopup();return}}if(l.key==="Tab"&&l.shiftKey&&this.planMode!==null){l.preventDefault(),this.cb.onCyclePlanMode?.();return}if(l.key==="Enter"&&!l.shiftKey)l.preventDefault(),this.submit()})}setCommands(e){this.commands=e.map((t)=>({...t,word:t.word.replace(/^\//,"")}))}setModelChip(e,t,n){let i=Ys(t),s=i.mark?Xs(i.mark):null;if(s)this.providerMarkEl.replaceChildren(s);else this.providerMarkEl.textContent=i.glyph;if(this.providerMarkEl.style.color=i.color,this.providerMarkEl.title=i.title,this.modelTextEl.textContent=e||"default",typeof n==="number"&&Number.isFinite(n)&&n>=0)this.ctxEl.textContent=`ctx ${Math.round(n)}%`,this.ctxEl.classList.remove("bp-hidden");else this.ctxEl.textContent="",this.ctxEl.classList.add("bp-hidden")}setFeatures(e,t){this.attachBtn.classList.toggle("bp-hidden",!e),this.voiceBtn.classList.toggle("bp-hidden",!t)}setVoiceRecording(e){this.voiceBtn.classList.toggle("recording",e),this.voiceBtn.setAttribute("aria-pressed",e?"true":"false")}setVoiceLevel(e){this.voiceBtn.setAttribute("data-level",String(e))}getDraft(){return this.textarea.value}getCaret(){return this.textarea.selectionStart??this.textarea.value.length}setMemory(e){if(this.memoryEl.classList.toggle("bp-hidden",!e),!e)return;let t=e.total??0,n=t>0?Math.min(1,(e.done??0)/t):1;this.memoryFill.style.width=`${Math.round(n*100)}%`,this.memoryFill.dataset.state=e.state??"",this.memoryText.textContent=e.line??"",this.memoryEl.title=[e.status,e.lines,e.viewLine].filter(Boolean).join(` -`)}setPlanMode(e){if(this.planMode=e,this.textarea.classList.remove("is-plan","is-plan-exec"),this.sendBtn.classList.remove("is-plan","is-plan-exec"),this.planChipBtn.classList.remove("is-plan","is-exec"),this.planBarEl.classList.remove("is-exec"),!e){this.planChipBtn.classList.add("bp-hidden"),this.planChipBtn.setAttribute("aria-pressed","false"),this.planBarEl.classList.add("bp-hidden"),this.planBarEl.replaceChildren(),this.sendBtn.textContent=h("composer.send","Send");return}let t=e.phase,n=t!=="off",i=t==="armed"||t==="planning"||t==="pending",s=t==="executing";this.planChipBtn.classList.remove("bp-hidden"),this.planChipBtn.classList.toggle("is-plan",i),this.planChipBtn.classList.toggle("is-exec",s),this.planChipBtn.setAttribute("aria-pressed",n?"true":"false");let a=`${h("gpui.planmode.tip","Plan before acting (1 turn, always, or off)")} · Shift+Tab`;if(this.planChipBtn.title=a,this.planChipBtn.setAttribute("aria-label",a),this.planChipIconHost.replaceChildren(s?ri():pn()),this.planChipLbl.textContent=s?h("gpui.planmode.chip.building","Building"):t==="pending"?h("gpui.mgmt.fab.reviewbtn","Review"):i&&e.once?h("gpui.planmode.chip.once","Plan · 1t"):h("gpui.mgmt.plan.tab","Plan"),this.textarea.classList.toggle("is-plan",i),this.textarea.classList.toggle("is-plan-exec",s),this.sendBtn.classList.toggle("is-plan",i),this.sendBtn.classList.toggle("is-plan-exec",s),this.sendBtn.textContent=i?h("gpui.mgmt.plan.tab","Plan"):h("composer.send","Send"),!n){this.planBarEl.classList.add("bp-hidden"),this.planBarEl.replaceChildren();return}this.planBarEl.classList.remove("bp-hidden"),this.planBarEl.classList.toggle("is-exec",s);let r=document.createElement("span");r.className="bp-plan-bar-ic",r.appendChild(s?ri():pn());let o=document.createElement("span");o.className="bp-plan-bar-text",o.textContent=t==="armed"&&e.once?h("gpui.planmode.bar.once","Plan mode (1 turn) — explores and proposes a plan before editing"):t==="armed"?h("gpui.planmode.bar.always","Plan mode — explores and proposes a plan before editing"):t==="planning"?h("gpui.planmode.bar.planning","Planning — drafting a plan before edits"):t==="pending"?h("gpui.planmode.bar.pending","Proposed plan awaits review below"):h("gpui.planmode.bar.executing","Building the approved plan");let l=[r,o];if(t==="armed"||t==="planning"){let p=document.createElement("div");p.className="bp-plan-scopes";let c=(u,d,m,f)=>{let b=document.createElement("button");return b.type="button",b.className="bp-plan-scope-btn"+(d?" active":""),b.textContent=u,b.disabled=!this.enabled,b.setAttribute("data-testid",f),b.addEventListener("click",()=>this.cb.onSetPlanMode?.(m)),b};p.append(c(h("gpui.planmode.scope.once","1 turn"),e.once,"once","plan-scope-once"),c(h("gpui.planmode.scope.always","Always"),!e.once,"always","plan-scope-always"),c(h("gpui.bots.recall.off","Off"),!1,"off","plan-scope-off")),l.push(p)}this.planBarEl.replaceChildren(...l)}setState(e,t){this.enabled=e,this.textarea.disabled=!e,this.sendBtn.disabled=!e,this.attachBtn.disabled=!e,this.voiceBtn.disabled=!e,this.planChipBtn.disabled=!e,this.planBarEl.querySelectorAll(".bp-plan-scope-btn").forEach((n)=>{n.disabled=!e}),this.stopBtn.classList.toggle("bp-hidden",!t)}setDraft(e){this.textarea.value=e,this.autoGrow(),this.textarea.focus()}setReply(e,t,n){if(!e){this.replyEl.replaceChildren(),this.replyEl.classList.add("bp-hidden");return}let i=document.createElement("button");i.type="button",i.className="bp-reply-strip-body",i.setAttribute("data-testid","composer-reply-go");let s=document.createElement("span");s.className="bp-reply-strip-who",s.textContent=e.who;let a=document.createElement("span");if(a.className="bp-reply-strip-line",a.textContent=h("gpui.b.replying.to","↩ Replying to: {line}",{line:e.line}),i.append(s,a),t)i.addEventListener("click",t);let r=document.createElement("button");r.type="button",r.className="icon bp-reply-strip-drop",r.textContent="×";let o=h("reply.cancel","Cancel reply");if(r.title=o,r.setAttribute("aria-label",o),r.setAttribute("data-testid","composer-reply-drop"),n)r.addEventListener("click",n);this.replyEl.replaceChildren(i,r),this.replyEl.classList.remove("bp-hidden"),this.textarea.focus()}prependDraft(e){let t=this.textarea.value;this.textarea.value=t?`${e} -${t}`:e,this.autoGrow(),this.textarea.focus()}showError(e,t){let n=document.createElement("span");if(n.textContent=pe(e),t){let i=document.createElement("button");i.type="button",i.className="bp-composer-err-act",i.setAttribute("data-testid","composer-err-accounts"),i.textContent=t.label,i.addEventListener("click",t.onClick),this.errorEl.replaceChildren(n,i)}else this.errorEl.replaceChildren(n);this.errorEl.classList.remove("bp-hidden")}clearError(){this.errorEl.replaceChildren(),this.errorEl.classList.add("bp-hidden")}focus(){this.textarea.focus()}refreshLocale(){this.textarea.placeholder=h("composer.placeholder","Ask anything: @bot, >thread, %project, #room, $skill, /btw"),this.attachBtn.title=h("web.composer.attach","Attach image"),this.attachBtn.setAttribute("aria-label",h("web.composer.attach","Attach image")),this.voiceBtn.title=h("web.composer.voice","Voice dictation"),this.voiceBtn.setAttribute("aria-label",h("web.composer.voice","Voice dictation")),this.sendBtn.textContent=h("composer.send","Send"),this.stopBtn.textContent=h("composer.stop","Stop"),this.setPlanMode(this.planMode)}autoGrow(){this.textarea.style.height="auto",this.textarea.style.height=`${Math.min(180,Math.max(54,this.textarea.scrollHeight))}px`}shouldCompleteOnEnter(){if(this.popupMode==="mention")return!0;if(this.popupMode==="slash"){let e=this.textarea.value;return e.startsWith("/")&&!e.includes(" ")}return!1}updatePopups(){let e=this.textarea.value;if(e.startsWith("/")&&!e.includes(" ")&&!e.includes(` -`)){let n=e.slice(1).toLowerCase();if(this.filteredSlash=this.commands.filter((i)=>i.word.toLowerCase().startsWith(n)),this.filteredSlash.length>0){this.popupMode="slash",this.popupIdx=Math.min(this.popupIdx,this.filteredSlash.length-1),this.renderPopup();return}}let t=/(?:^|\s)([@>%#])([a-zA-Z0-9._-]{1,32})$/.exec(e.slice(0,this.textarea.selectionStart));if(t){let n=t[1],i=t[2];this.cb.onQueryMentions(i,n).then((s)=>{if(s.length>0)this.mentionItems=s,this.popupMode="mention",this.popupIdx=0,this.renderPopup();else if(this.popupMode==="mention")this.closePopup()});return}this.closePopup()}closePopup(){this.popupMode="none",this.popupEl.classList.add("bp-hidden"),this.popupEl.replaceChildren()}renderPopup(){let e=document.createDocumentFragment();if(this.popupMode==="slash")this.filteredSlash.forEach((t,n)=>{let i=document.createElement("button");i.type="button",i.className="bp-popup-row"+(n===this.popupIdx?" active":""),i.setAttribute("data-testid",`slash-item-${t.word}`);let s=document.createElement("span");s.className="bp-popup-name",s.textContent=`/${t.word}`;let a=document.createElement("span");a.className="bp-popup-desc",a.textContent=t.desc||t.label,i.append(s,a),i.addEventListener("mousedown",(r)=>{r.preventDefault(),this.applyPopupChoice(n)}),e.appendChild(i)});else if(this.popupMode==="mention")this.mentionItems.forEach((t,n)=>{let i=document.createElement("button");i.type="button",i.className="bp-popup-row"+(n===this.popupIdx?" active":"");let s=document.createElement("span");s.className="bp-popup-name",s.textContent=t.word||`${t.sigil}${t.label}`;let a=document.createElement("span");a.className="bp-popup-desc",a.textContent=t.detail||t.label,i.append(s,a),i.addEventListener("mousedown",(r)=>{r.preventDefault(),this.applyPopupChoice(n)}),e.appendChild(i)});this.popupEl.replaceChildren(e),this.popupEl.classList.remove("bp-hidden")}applyPopupChoice(e){if(this.popupMode==="slash"){let t=this.filteredSlash[e];if(t)this.textarea.value=`/${t.word} `,this.autoGrow(),this.textarea.focus();this.closePopup()}else if(this.popupMode==="mention"){let t=this.mentionItems[e];if(t){let n=this.textarea.selectionStart,i=this.textarea.value.slice(0,n),s=this.textarea.value.slice(n),a=i.replace(/([@>%#][a-zA-Z0-9._-]{1,32})$/,`${t.word} `);this.textarea.value=a+s,this.textarea.selectionStart=this.textarea.selectionEnd=a.length,this.textarea.focus()}this.closePopup()}}async addFiles(e){this.clearError();for(let t of e){if(!ai.has(t.type)){this.showError(h("web.composer.unsupported","Unsupported image type: {type}",{type:t.type||t.name}));continue}if(this.attachments.length>=si){this.showError(h("web.composer.maximages","At most {max} images per message.",{max:si}));break}let n=await new Promise((s,a)=>{let r=new FileReader;r.onload=()=>s(String(r.result||"")),r.onerror=()=>a(Error("read failed")),r.readAsDataURL(t)}).catch(()=>""),i=n.indexOf(",");if(i<0)continue;this.attachments.push({name:t.name||`image-${this.attachments.length+1}.png`,mime:t.type,data:n.slice(i+1),previewUrl:n})}this.renderAttachments()}renderAttachments(){if(this.attachments.length===0){this.attachStripEl.classList.add("bp-hidden"),this.attachStripEl.replaceChildren();return}let e=document.createDocumentFragment();this.attachments.forEach((t,n)=>{let i=document.createElement("div");i.className="bp-attach-chip";let s=document.createElement("img");s.src=t.previewUrl,s.alt=t.name,s.className="bp-attach-thumb";let a=document.createElement("button");a.type="button",a.className="icon bp-attach-rm",a.textContent="×",a.title=h("common.remove","Remove"),a.addEventListener("click",()=>{this.attachments.splice(n,1),this.renderAttachments()}),i.append(s,a),e.appendChild(i)}),this.attachStripEl.replaceChildren(e),this.attachStripEl.classList.remove("bp-hidden")}submit(){if(!this.enabled)return;let e=this.textarea.value.trim();if(!e&&this.attachments.length===0)return;if(this.closePopup(),this.clearError(),e.startsWith("/")&&this.attachments.length===0){let n=e.slice(1).split(/\s+/)[0]?.toLowerCase()??"";if(this.commands.some((i)=>i.word.toLowerCase()===n)){this.textarea.value="",this.autoGrow(),this.cb.onRunCommand(e);return}}let t=this.attachments.map(({name:n,mime:i,data:s})=>({name:n,mime:i,data:s}));this.attachments=[],this.renderAttachments(),this.textarea.value="",this.autoGrow(),this.cb.onSend(e,t)}}async function oi(e,t=fetch){let n=await t("/auth/web/logout",{method:"POST",credentials:"same-origin",redirect:"error",headers:{"Content-Type":"application/json"},body:"{}"});if(n.status!==200||(await n.json()).state!=="revoked")throw Error("Logout was not confirmed");e()}var Zs=new Set(["bom","checks","life","plan","fab"]);function Wt(e){if(!e||!Array.isArray(e.panels))return[];return e.panels.filter((t)=>t&&typeof t.id==="string"&&Zs.has(t.id))}function mi(e){let t=e?.badge?.n??0;if(!Number.isFinite(t)||t<=0)return null;return{text:t>99?"99+":String(Math.floor(t)),tone:e?.badge?.tone==="bad"?"bad":"warn"}}function _t(e,t=22){let n=e.join(", ");if(n.length<=t)return n;let i="";for(let s=0;s0?` +${o}`.length:0)>t)return i?`${i} +${e.length-s}`:`${e[0]} +${e.length-1}`;i=r}return i}function dt(e){if(!Number.isFinite(e)||e<0)return"?";if(e<1000)return String(Math.round(e));if(e<1e6){let n=e/1000;return n<10?`${n.toFixed(1).replace(/\.0$/,"")}k`:`${Math.round(n)}k`}let t=e/1e6;return t<10?`${t.toFixed(1).replace(/\.0$/,"")}M`:`${Math.round(t)}M`}function pt(e){if(!Number.isFinite(e))return"";if(e>=1)return`$${e.toFixed(2)}`;let t=e.toFixed(4).replace(/0+$/,"");return(t.split(".")[1]??"").length<2?`$${e.toFixed(2)}`:`$${t}`}var Qs=new Set(["0201","0402","0603","0805","1206","1210","1812","2010","2512"]),ea=new Set(["QFN","DFN","SOT","SOIC","SOP","SSOP","TSSOP","MSOP","QFP","LQFP","TQFP","BGA","WLCSP","SOD","TO","SON","LGA"]);function hi(e){if(!e)return"";let t=e.indexOf(":"),i=(t>=0?e.slice(t+1):e).split("_");for(let r of i)if(Qs.has(r))return r;let s=i[0]??"",a=s.replace(/[^a-zA-Z].*$/,"").toUpperCase();if(ea.has(a)){let r=s.split("-");if(r.length>=2&&/^\d+$/.test(r[1]))return`${r[0]}-${r[1]}`;return r[0]}return i.slice(0,2).join("_")}function bi(e){let t=e?.status??"";if(!t)return null;let n=typeof e?.stock==="number"?e.stock:-1;if(t==="checking")return{text:"…",tone:"faint"};if(t==="unknown")return{text:"?",tone:"faint"};if(t==="out")return{text:`out ${dt(Math.max(n,0))}`,tone:"bad"};if(t==="low")return{text:`low ${dt(n)}`,tone:"warn"};return{text:dt(n),tone:"ok"}}function gi(e,t){let n=t.trim().toLowerCase().split(/\s+/).filter(Boolean);if(n.length===0)return e;return e.filter((i)=>{let s=[(i.refs??[]).join(" "),i.value??"",i.footprint??"",i.mpn??"",i.fab??""].join(" ").toLowerCase();return n.every((a)=>a==="dnp"&&Boolean(i.dnp)||s.includes(a))})}function fi(e,t){if(!t)return e;return e.filter((n)=>n.source===t)}function hn(e){if(e==="active")return{label:"Active",tone:"ok"};if(e==="nrnd")return{label:"NRND",tone:"warn"};if(e==="eol")return{label:"EOL",tone:"bad"};return{label:"Unknown",tone:"faint"}}function zt(e){if(!Number.isFinite(e)||e<=0)return"";let t=new Date(e*1000),n=t.getUTCFullYear(),i=String(t.getUTCMonth()+1).padStart(2,"0"),s=String(t.getUTCDate()).padStart(2,"0");return`${n}-${i}-${s}`}function vi(e){return e.state==="routed"||e.state==="verified"}function yi(e){switch(e.state){case"approved":return"✓";case"edited":return"✎";case"verified":return"✓✓";case"routed":return"100%";case"rejected":case"failed":return"✗";case"routing":return typeof e.routed==="number"&&typeof e.total==="number"&&e.total>0?`${e.routed}/${e.total}`:"…";case"blocked":return`⚠ ${Math.max(1,e.problems??1)}`;default:return""}}function wi(e){switch(e.status){case"blocked":return{key:"gpui.mgmt.plan.st.blocked",label:"Blocked",tone:"bad"};case"routing":return{key:"gpui.mgmt.plan.st.routing",label:"Routing",tone:"accent"};case"awaiting":return{key:"gpui.mgmt.plan.st.awaiting",label:"Awaiting review",tone:"warn"};case"verified":return{key:"gpui.mgmt.plan.st.verified",label:"Verified",tone:"ok"};case"routed":return{key:"gpui.mgmt.plan.st.routed",label:"Routed",tone:"ok"};case"ready":return{key:"gpui.mgmt.plan.st.approved",label:"Approved",tone:"accent"};case"partial":return{key:"gpui.mgmt.plan.st.partial",label:"Partial",tone:"warn"};case"rejected":return{key:"gpui.mgmt.plan.st.rejected",label:"Rejected",tone:"bad"};default:if((e.blocked??0)>0)return{key:"gpui.mgmt.plan.st.blocked",label:"Blocked",tone:"bad"};if(e.routing)return{key:"gpui.mgmt.plan.st.routing",label:"Routing",tone:"accent"};if((e.awaiting??0)>0)return{key:"gpui.mgmt.plan.st.awaiting",label:"Awaiting review",tone:"warn"};return{key:"gpui.mgmt.plan.st.empty",label:"Empty",tone:"faint"}}}function Ei(e){let t=e.done??0,n=e.approved??0,i=e.awaiting??0,s=e.blocked??0,a=0;if(typeof e.total!=="number"){for(let r of e.layers??[])for(let o of r.items??[])if(o.state==="routed"||o.state==="verified")t+=1;else if(o.state==="routing")a+=1;else if(o.state==="approved")n+=1}else if(e.routing)a=Math.max(0,e.total-(t+n+i+s));return[{count:t,tone:"ok"},{count:a,tone:"accent"},{count:n,tone:"input"},{count:i,tone:"warn"},{count:s,tone:"bad"}]}function Ci(e){switch(e){case"current":return{text:"The fab's limits are in the DRC rules",button:null};case"stale":return{text:"The DRC rules have older fab limits",button:"Update"};case"none":return{text:"The fab's limits are not in the DRC rules",button:"Write"};default:return{text:"No KiCad project for DRC rules",button:null}}}function xi(e){return e==="extra"?"costs-more limits":"base-price limits"}function bn(e,t){return e.watchGen===t.watchGen&&e.editGen===t.editGen&&e.project!==""&&e.project===t.project&&e.editId!==""&&e.editId===t.editId}function ki(e){return{project:e.project,refs:e.refs.slice(),field:e.field,value:e.was}}function gn(e,t){return e.watchGen===t.watchGen&&e.project!==""&&e.project===t.project&&e.threadId!==""&&e.threadId===t.threadId&&e.threadGen===t.threadGen}var li=["#f59e0b","#38bdf8","#c084fc","#2dd4bf","#ef4444","#a3e635","#f97316","#ec4899"],ci=["#14b8a6","#f59e0b","#c084fc","#22c55e","#38bdf8","#ef4444","#e879f9","#84cc16"];function Si(e){let t=2166136261;for(let n=0;n>>0;return t}function Lt(e,t=""){let n=t.trim().toLowerCase();if(n&&n!=="#5a7a9a"&&n!=="#8a8a8a")return t;let i=e.toUpperCase();if(i.includes("3V3A")||i.includes("AVDD")||i.includes("VDDA"))return"#38bdf8";if(i.includes("1V8")||i.includes("1.8V"))return"#c084fc";if(i.includes("2V5")||i.includes("2.5V"))return"#a3e635";if(i.includes("3V3")||i.includes("3.3V")||i.includes("VCC"))return"#f59e0b";if(i.includes("5V")||i.startsWith("+5"))return"#ef4444";if(i.includes("12V")||i.includes("24V"))return"#f97316";if(i.includes("VBAT")||i.includes("VIN"))return"#ec4899";if(i.includes("GND"))return"#2dd4bf";return li[Si(i)%li.length]}function ut(e,t=""){let n=t.trim().toLowerCase();if(n&&n!=="#8a8a8a")return t;return ci[Si(e)%ci.length]}function Ai(e,t,n,i=14){let s=Math.max(1,Math.abs(e[2]-e[0])),a=Math.max(1,Math.abs(e[3]-e[1])),r=Math.max(20,t-i*2),o=Math.max(20,n-i*2),l=Math.max(0.05,Math.min(200,Math.min(r/s,o/a)));return{cx:(e[0]+e[2])*0.5,cy:(e[1]+e[3])*0.5,scale:l,fitted:l,touched:!1}}function Ve(e,t,n,i,s){return[i*0.5+(t-e.cx)*e.scale,s*0.5+(n-e.cy)*e.scale]}function qt(e,t,n,i,s){let a=Math.max(0.0001,e.scale);return[e.cx+(t-i*0.5)/a,e.cy+(n-s*0.5)/a]}function Li(e,t,n){let i=Math.max(0.0001,e.scale);return{...e,cx:e.cx-t/i,cy:e.cy-n/i,touched:!0}}function Pi(e,t,n,i,s,a){let r=Math.max(0.02,e.fitted*0.35),o=Math.max(40,e.fitted*24),l=Math.max(r,Math.min(o,e.scale*t)),[p,c]=qt(e,n,i,s,a);return{...e,cx:p-(n-s*0.5)/l,cy:c-(i-a*0.5)/l,scale:l,touched:!0}}function Ni(e,t,n,i){let s=e.map((r)=>[r[0],r[1]]);if(s.length===0)return[n];let a=i&&t+1>=s.length?s.length:Math.min(t+1,s.length);return s.splice(a,0,[n[0],n[1]]),s}function fn(e,t,n){let i=n?3:2;if(e.length<=i||t<0||t>=e.length)return null;let s=e.map((a)=>[a[0],a[1]]);return s.splice(t,1),s}function ta(e,t,n,i,s,a){let r=s-n,o=a-i,l=r*r+o*o;if(l<0.000001)return(e-n)*(e-n)+(t-i)*(t-i);let p=Math.max(0,Math.min(1,((e-n)*r+(t-i)*o)/l)),c=n+p*r,u=i+p*o;return(e-c)*(e-c)+(t-u)*(t-u)}function di(e,t,n){if(n.length<3)return!1;let i=!1;for(let s=0,a=n.length-1;st!==p>t&&e<(l-r)*(t-o)/(p-o+0.000000000001)+r)i=!i}return i}function vn(e,t){return Math.max(5,Math.min(32,e*t))}function Kt(e,t,n,i,s,a,r,o,l){if(i){for(let d of e){if(d.layer!==n||d.id!==i||d.locked)continue;let m=d.path??[];for(let f=0;f=3)for(let f=0;f=0;d--){let m=t[d];if(m.layer!==n)continue;let f=m.outline??[];if(!di(c,u,f))continue;if(!(m.holes??[]).some((g)=>di(c,u,g)))return{kind:"region",id:m.id}}return null}function mt(e){let t=null,n=null,i=[];for(let a of e){if(!a.layer)continue;i.push(a.layer);let r=a.items??[],o=r.filter((p)=>p.kind==="corridor").length,l=r.filter((p)=>p.kind==="plane").length;if((o>0||a.role==="signal")&&(!t||o>t.count))t={count:o,layer:a.layer};if((l>0||a.role==="power"||a.role==="plane")&&(!n||l>n.count))n={count:l,layer:a.layer}}let s=[];if(t)s.push(t.layer);if(n&&!s.includes(n.layer))s.push(n.layer);for(let a of i){if(s.length>=2)break;if(!s.includes(a))s.push(a)}return s}function pi(e,t){if(!e||e.length===0)return null;if(e.length===1)return e[0];let n=Math.max(0,Math.min(1,t)),i=0;for(let r=1;r=s&&o>0.000000001){let l=(s-a)/o;return[e[r-1][0]+(e[r][0]-e[r-1][0])*l,e[r-1][1]+(e[r][1]-e[r-1][1])*l]}a+=o}return e[e.length-1]}function st(e,t,n){for(let i of t??[])if(i.layer===e&&i.title)return i.title;for(let i of n??[])if(i.layer===e&&i.title)return i.title;return e}function Mi(e,t,n){if(e==="split"&&n.length>0)return t.filter((i)=>n.includes(i.layer));return t}function mn(e,t){return!(e[2]<=t[0]||e[0]>=t[2]||e[3]<=t[1]||e[1]>=t[3])}function ui(e,t,n){if(n.length<3)return!1;let i=!1;for(let s=0,a=n.length-1;st!==p>t&&e<(l-r)*(t-o)/(p-o+0.000000000001)+r)i=!i}return i}function Ti(e,t){if(e.length<3)return null;let n=1/0,i=1/0,s=-1/0,a=-1/0,r=0,o=0;for(let p of e)n=Math.min(n,p[0]),i=Math.min(i,p[1]),s=Math.max(s,p[0]),a=Math.max(a,p[1]),r+=p[0],o+=p[1];let l=[[(n+s)*0.5,(i+a)*0.5],[r/e.length,o/e.length]];for(let p of[0.5,0.25,0.75,0.125,0.875])for(let c of[0.5,0.25,0.75,0.125,0.875])l.push([n+(s-n)*c,i+(a-i)*p]);for(let p of l)if(ui(p[0],p[1],e)&&!t.some((c)=>ui(p[0],p[1],c)))return p;return null}function Bi(e,t,n,i,s,a){let r=[];for(let c of e){let u=c.nets??0,d=c.path??[];if(u<=0||d.length<2)continue;let m=0;for(let f=1;f{let d=c.sel||c.hov?1:0,m=u.sel||u.hov?1:0;if(m!==d)return m-d;if(u.nets!==c.nets)return u.nets-c.nets;return c.b.id.localeCompare(u.b.id)});let o=[],l=[],p=(c,u,d,m,f)=>[c-d*0.5-f,u-m*0.5-f,c+d*0.5+f,u+m*0.5+f];for(let c of r){let u=c.b.name||"",d=String(c.nets),m=u?`${u} · ${c.nets}`:d,f=(c.sel||c.hov||c.pxLen>=95)&&u?[m,d]:[d],b=null,g=(w,x)=>Math.max(x*0.5+3,Math.min(Math.max(x*0.5+3,n-x*0.5-3),w)),y=(w,x)=>Math.max(x*0.5+3,Math.min(Math.max(x*0.5+3,i-x*0.5-3),w));e:for(let w of f){let x=Math.max(16,w.length*5.9+10),A=15;for(let N of[0.5,0.35,0.65,0.22,0.78]){let S=pi(c.pts,N);if(!S)continue;let[M,B]=Ve(t,S[0],S[1],n,i),R=g(M,x),U=y(B,15),D=p(R,U,x,15,2);if(!o.some((re)=>mn(D,re))){b={id:c.b.id,text:w,cx:R,cy:U,pw:x,ph:15,col:c.col,sel:c.sel};break e}}}if(!b){let w=pi(c.pts,0.5);if(w){let[x,A]=Ve(t,w[0],w[1],n,i),N=Math.max(16,d.length*6.5+8),S=15,M=g(x,N);for(let B of[-18,18]){let R=y(A+B,15);if(!o.some((U)=>mn(p(M,R,N,15,2),U))){b={id:c.b.id,text:d,cx:M,cy:R,pw:N,ph:15,col:c.col,sel:c.sel};break}}}}if(b)o.push(p(b.cx,b.cy,b.pw,b.ph,2)),l.push(b)}return l}function Ii(e,t,n,i,s,a=[]){let r=new Set(s),o=[];for(let c of e){if(!c.r||!c.b||c.b.length!==4)continue;let[u,d]=Ve(t,c.b[0],c.b[1],n,i),[m,f]=Ve(t,c.b[2],c.b[3],n,i),b=Math.abs(m-u),g=Math.abs(f-d);if(b<13||g<9)continue;let y=(u+m)*0.5,w=(d+f)*0.5;if(y<8||y>n-8||w<8||w>i-8)continue;o.push({text:c.r,cx:y,cy:w,bw:c.r.length*5.8+4,bh:11,score:b*g+(r.has(c.r)?1e4:0)})}o.sort((c,u)=>u.score-c.score);let l=[...a],p=[];for(let c of o){let u=[c.cx-c.bw*0.5,c.cy-c.bh*0.5,c.cx+c.bw*0.5,c.cy+c.bh*0.5];if(!l.some((m)=>mn(u,m)))l.push(u),p.push({text:c.text,cx:c.cx,cy:c.cy})}return p}function Ri(e){if(!e||typeof e!=="object")return null;let t=e;if(t.panel&&typeof t.panel==="object")return t.panel;if(t.result&&typeof t.result==="object"){let n=t.result.panel;if(n&&typeof n==="object")return n}return null}function Jt(e,t){if(!t||t.length===0)return e;let n=new Map;for(let a of e)if(a.layer)n.set(a.layer,a);let i=[],s=new Set;for(let a of t){if(!a.layer)continue;s.add(a.layer);let r=n.get(a.layer);if(r)i.push(r);else i.push({layer:a.layer,index:a.index,title:a.title||`L${a.index} · ${a.layer}`,subtitle:a.subtitle||"",role:a.role,status:"proposed",done:0,approved:0,total:0,items:[]})}for(let a of e)if(a.layer&&!s.has(a.layer))i.push(a);return i}function ji(e,t,n,i,s,a,r,o){return e===t&&n===i&&s===a&&(o===void 0||r>=o)}var Di="#111917",na="#16201d",ia="rgba(212, 224, 219, 0.92)",sa="rgba(61, 80, 73, 0.72)",aa="rgba(82, 107, 97, 0.85)";var Hi="#f59e0b",ra="#eef5f2",Fi="#ef4444";function at(e,t){let n=e.trim().replace(/^#/,"");if(n.length===6){let i=parseInt(n.slice(0,2),16),s=parseInt(n.slice(2,4),16),a=parseInt(n.slice(4,6),16);if(!Number.isNaN(i)&&!Number.isNaN(s)&&!Number.isNaN(a))return`rgba(${i}, ${s}, ${a}, ${t})`}return`rgba(20, 184, 166, ${t})`}function oa(e,t,n){let i=0.14,s=0.45,a=0.85,r=!1;switch(e){case"approved":case"routing":i=0.16,s=0.51,a=0.91;break;case"edited":i=0.2,s=0.56,a=0.95;break;case"routed":case"verified":i=0.08,s=0.26,a=0.59;break;case"rejected":case"failed":i=0.05,s=0.13,a=0.27;break;case"blocked":i=0.18,s=0.48,a=0.88,r=!0;break}if(t)i=Math.min(0.35,i+0.1),s=Math.min(0.71,s+0.12),a=1;else if(n)i=Math.min(0.28,i+0.06),s=Math.min(0.63,s+0.07);return{glow:i,body:s,core:a,bad:r}}function la(e,t,n){let i=0.27,s=0.83,a=!1;switch(e){case"approved":case"routing":i=0.36,s=0.91;break;case"edited":i=0.38,s=0.95;break;case"routed":case"verified":i=0.16,s=0.54;break;case"rejected":case"failed":i=0.08,s=0.27;break;case"blocked":i=0.31,s=0.94,a=!0;break}if(t)i=Math.min(0.53,i+0.12),s=1;else if(n)i=Math.min(0.45,i+0.06),s=Math.min(1,s+0.1);return{fill:i,edge:s,bad:a}}function ca(e){let t=e.items??[];if(t.some((n)=>n.state==="blocked"||n.state==="failed"))return{key:"gpui.mgmt.plan.st.blocked",label:"Blocked",tone:"bad"};if(t.some((n)=>n.state==="routing"))return{key:"gpui.mgmt.plan.st.routing",label:"Routing",tone:"accent"};if(t.some((n)=>n.state==="proposed"||n.state==="edited"))return{key:"gpui.mgmt.plan.st.awaiting",label:"Awaiting review",tone:"warn"};if(t.length>0&&t.every((n)=>n.state==="routed"||n.state==="verified"))return{key:"gpui.mgmt.plan.st.routed",label:"Routed",tone:"ok"};if(t.length>0&&t.every((n)=>n.state==="approved"||n.state==="routed"||n.state==="verified"))return{key:"gpui.mgmt.plan.st.approved",label:"Approved",tone:"accent"};return{key:"gpui.mgmt.plan.st.empty",label:"Empty",tone:"faint"}}class yn{root;cb;state=null;cards=new Map;renderedLayerKey="";sharedCam=null;layerCams=new Map;hover=null;selectedVertex=null;drag=null;downPos=null;rafPending=0;constructor(e){this.cb=e,this.root=document.createElement("div"),this.root.className="bp-plan-canvas-grid",this.root.tabIndex=0,this.root.setAttribute("data-testid","mgmt-plan-canvas-grid"),this.root.addEventListener("keydown",(t)=>this.onKeyDown(t))}isDragging(){return this.drag!==null}fitAll(){this.sharedCam=null,this.layerCams.clear(),this.scheduleDraw()}destroy(){if(this.rafPending)cancelAnimationFrame(this.rafPending),this.rafPending=0;for(let e of this.cards.values())e.ro.disconnect();this.cards.clear(),this.root.replaceChildren()}visibleLayers(e){let t=Jt(e.layers,e.copperLayers);if(t.length===0)return[];if(e.gridMode==="all")return t;if(e.gridMode==="single"){let s=e.shownLayers.find((r)=>t.some((o)=>o.layer===r))??mt(t)[0]??t[0]?.layer,a=t.find((r)=>r.layer===s);return a?[a]:[]}let n=e.shownLayers.length>0&&e.shownLayers.every((s)=>t.some((a)=>a.layer===s))?e.shownLayers.slice(0,2):mt(t),i=[];for(let s of n){let a=t.find((r)=>r.layer===s);if(a)i.push(a)}return i.length>0?i:t.slice(0,2)}update(e,t){this.state=e;let n=this.visibleLayers(e);this.root.classList.toggle("two-cols",t&&n.length>1);let i=n.map((s)=>s.layer).join("|");if(i!==this.renderedLayerKey){this.renderedLayerKey=i;for(let s of this.cards.values())s.ro.disconnect();this.cards.clear(),this.root.replaceChildren();for(let s of n){let a=this.buildCard(s);this.cards.set(s.layer,a),this.root.appendChild(a.el)}}else for(let s of n){let a=this.cards.get(s.layer);if(a)this.syncCardHeaderAndLegend(a,s)}this.scheduleDraw()}effectiveBbox(e){let t=e.bbox;if(!t||t.length!==4||Math.abs(t[2]-t[0])<0.5||Math.abs(t[3]-t[1])<0.5)return[0,0,100,70];return t}getCam(e,t,n){let i=this.state,s=i?.syncZoom?this.sharedCam:this.layerCams.get(e)??null;if(s&&s.touched)return s;return Ai(i?this.effectiveBbox(i.board):[0,0,100,70],t,n,14)}setCam(e,t){if(this.state?.syncZoom)this.sharedCam=t;else this.layerCams.set(e,t)}buildCard(e){let t=document.createElement("section");t.className="bp-plan-card",t.setAttribute("data-testid",`mgmt-plan-card-${e.layer}`);let n=document.createElement("div");n.className="bp-plan-card-head";let i=document.createElement("div");i.className="bp-plan-card-head-top";let s=document.createElement("span"),a=e.role==="power"||(e.items?.length??0)>0&&(e.items??[]).every((w)=>w.kind==="plane");s.className="bp-plan-card-bar "+(a?"pwr":"sig");let r=document.createElement("span");r.className="bp-plan-card-title";let o=document.createElement("span");o.className="bp-plan-status-badge";let l=document.createElement("button");l.type="button",l.className="bp-mgmt-btn bp-plan-mini-btn",l.textContent="✓",l.title=h("gpui.mgmt.plan.layer","Approve layer"),l.addEventListener("click",(w)=>{w.stopPropagation(),this.cb.onApproveLayer(e.layer,!0)});let p=document.createElement("button");p.type="button",p.className="bp-mgmt-btn bp-plan-mini-btn",p.textContent="✗",p.title=h("gpui.mgmt.plan.rejectlayer","Reject layer"),p.addEventListener("click",(w)=>{w.stopPropagation(),this.cb.onApproveLayer(e.layer,!1)}),i.append(s,r,o,l,p);let c=document.createElement("div");c.className="bp-plan-card-sub",n.append(i,c);let u=document.createElement("div");u.className="bp-plan-card-canvas-wrap";let d=document.createElement("canvas");d.className="bp-plan-card-canvas",d.setAttribute("data-testid",`mgmt-plan-canvas-${e.layer}`);let m=document.createElement("div");m.className="bp-plan-hover-hud bp-hidden",u.append(d,m);let f=document.createElement("div");f.className="bp-plan-legend bp-hidden",t.append(n,u,f);let b=d.getContext("2d"),g=new ResizeObserver(()=>this.scheduleDraw());g.observe(u),this.attachPointerListeners(d,e.layer);let y={layer:e.layer,el:t,canvas:d,ctx:b,legendEl:f,okBtn:l,noBtn:p,statusEl:o,titleEl:r,subtitleEl:c,hoverHudEl:m,ro:g};return this.syncCardHeaderAndLegend(y,e),y}syncCardHeaderAndLegend(e,t){e.titleEl.textContent=st(t.layer,this.state?.copperLayers,this.state?.layers)||t.title||t.layer;let n=t.subtitle||t.stackup||"";e.subtitleEl.textContent=n,e.subtitleEl.classList.toggle("bp-hidden",!n);let i=t.items??[],s=ca(t);e.statusEl.className=`bp-plan-card-status tone-${s.tone==="warn"?"dim":s.tone}`,e.statusEl.textContent=i.length>0?h(s.key,s.label):"",e.statusEl.classList.toggle("bp-hidden",i.length===0);let a=i.some((o)=>o.state==="proposed"||o.state==="edited");if(e.okBtn)e.okBtn.classList.toggle("bp-hidden",!a);if(e.noBtn)e.noBtn.classList.toggle("bp-hidden",!a);let r=(this.state?.regions??[]).filter((o)=>o.layer===t.layer);if(r.length===0)e.legendEl.classList.add("bp-hidden"),e.legendEl.replaceChildren();else{e.legendEl.classList.remove("bp-hidden");let o=document.createDocumentFragment();for(let l of r){let p=document.createElement("button");p.type="button";let c=this.state?.selectedId===l.id;p.className="bp-plan-legend-chip"+(c?" active":"");let u=document.createElement("span");u.className="bp-plan-legend-sw",u.style.background=Lt(l.net||l.id,l.color||"");let d=document.createElement("span");d.textContent=l.net||l.id,p.append(u,d),p.addEventListener("click",()=>{this.cb.onSelect(l.id),this.cb.onFocusItem(l.id)}),o.appendChild(p)}e.legendEl.replaceChildren(o)}}attachPointerListeners(e,t){e.addEventListener("contextmenu",(i)=>i.preventDefault()),e.addEventListener("dblclick",()=>this.fitAll()),e.addEventListener("pointerdown",(i)=>{let s=this.state;if(!s)return;this.root.focus({preventScroll:!0});let a=e.getBoundingClientRect(),r=i.clientX-a.left,o=i.clientY-a.top,l=Math.max(1,a.width),p=Math.max(1,a.height),c=this.getCam(t,l,p),u=Kt(s.bands,s.regions,t,s.selectedId,c,l,p,r,o);if(i.button===2){if(u?.kind==="vertex"){let d=this.getItemPts(u.id,u.isPlane),m=fn(d,u.idx,u.isPlane);if(m)this.selectedVertex=null,this.cb.onCommitFields(u.id,{[u.isPlane?"outline":"path"]:m})}return}if(i.button!==0)return;if(e.setPointerCapture(i.pointerId),this.downPos={x:i.clientX,y:i.clientY},u?.kind==="vertex"){let d=this.getItemPts(u.id,u.isPlane),m=d.map((f)=>[f[0],f[1]]);this.selectedVertex={id:u.id,idx:u.idx},this.drag={layer:t,kind:"vertex",id:u.id,isPlane:u.isPlane,idx:u.idx,pts:d.map((f)=>[f[0],f[1]]),origPts:m,moved:!1},this.scheduleDraw()}else if(u?.kind==="midpoint"){let d=this.getItemPts(u.id,u.isPlane),m=d.map((g)=>[g[0],g[1]]),f=Ni(d,u.segIdx,u.pos,u.isPlane),b=u.isPlane&&u.segIdx+1>=d.length?f.length-1:Math.min(u.segIdx+1,f.length-1);this.selectedVertex={id:u.id,idx:b},this.patchLocalItem(u.id,u.isPlane,f),this.drag={layer:t,kind:"vertex",id:u.id,isPlane:u.isPlane,idx:b,pts:f,origPts:m,moved:!0},this.scheduleDraw()}else this.selectedVertex=null,this.drag={layer:t,kind:"pan",lastX:r,lastY:o}}),e.addEventListener("pointermove",(i)=>{let s=this.state;if(!s)return;let a=e.getBoundingClientRect(),r=i.clientX-a.left,o=i.clientY-a.top,l=Math.max(1,a.width),p=Math.max(1,a.height);if(this.drag&&this.drag.layer===t){if(this.drag.kind==="pan"){let A=this.getCam(t,l,p);this.setCam(t,Li(A,r-this.drag.lastX,o-this.drag.lastY)),this.drag.lastX=r,this.drag.lastY=o,this.scheduleDraw();return}if(this.downPos&&Math.hypot(i.clientX-this.downPos.x,i.clientY-this.downPos.y)<1.5&&!this.drag.moved)return;let b=this.getCam(t,l,p),[g,y]=qt(b,r,o,l,p),w=[Math.round(g*1000)/1000,Math.round(y*1000)/1000];this.drag.moved=!0,this.drag.pts[this.drag.idx]=w;let x=this.drag.pts.map((A)=>[A[0],A[1]]);this.patchLocalItem(this.drag.id,this.drag.isPlane,x),this.scheduleDraw();return}let c=this.getCam(t,l,p),u=Kt(s.bands,s.regions,t,s.selectedId,c,l,p,r,o),d=this.hover?.hit?"id"in this.hover.hit?this.hover.hit.id:"":"",m=this.hover?.hit.kind??"",f=u?u.id:"";if(this.hover=u?{layer:t,hit:u}:null,e.style.cursor=u?"pointer":"crosshair",d!==f||(u?.kind??"")!==m)this.syncHoverHud(t),this.scheduleDraw()}),e.addEventListener("pointerleave",()=>{if(this.hover?.layer===t)this.hover=null,this.syncHoverHud(t),this.scheduleDraw()});let n=()=>{let i=this.drag;if(!i||i.layer!==t)return;if(this.drag=null,this.downPos=null,i.kind==="vertex"&&i.moved){let s=i.origPts.map((a)=>[a[0],a[1]]);this.patchLocalItem(i.id,i.isPlane,s)}this.cb.onDragEnd?.(),this.scheduleDraw()};e.addEventListener("pointercancel",n),e.addEventListener("lostpointercapture",n),e.addEventListener("pointerup",(i)=>{let s=this.state,a=this.drag,r=this.downPos;if(this.drag=null,this.downPos=null,e.hasPointerCapture(i.pointerId))e.releasePointerCapture(i.pointerId);if(a&&a.kind==="vertex"&&a.layer===t){if(a.moved)this.cb.onCommitFields(a.id,{[a.isPlane?"outline":"path"]:a.pts});else this.cb.onDragEnd?.(),this.scheduleDraw();return}if(s&&r&&Math.hypot(i.clientX-r.x,i.clientY-r.y)<4.5){let o=e.getBoundingClientRect(),l=i.clientX-o.left,p=i.clientY-o.top,c=Math.max(1,o.width),u=Math.max(1,o.height),d=this.getCam(t,c,u),m=Kt(s.bands,s.regions,t,s.selectedId,d,c,u,l,p);if(m&&(m.kind==="band"||m.kind==="region")){this.cb.onSelect(m.id),this.cb.onFocusItem(m.id);return}if(!m&&s.selectedId){this.cb.onSelect("");return}}this.cb.onDragEnd?.()}),e.addEventListener("wheel",(i)=>{i.preventDefault();let s=e.getBoundingClientRect(),a=i.clientX-s.left,r=i.clientY-s.top,o=Math.max(1,s.width),l=Math.max(1,s.height),p=this.getCam(t,o,l),c=Math.max(0.65,Math.min(1.55,1-i.deltaY*0.002));this.setCam(t,Pi(p,c,a,r,o,l)),this.scheduleDraw()},{passive:!1})}patchLocalItem(e,t,n){let i=this.state;if(!i)return;if(t){let s=i.regions.find((a)=>a.id===e);if(s){if(s.outline=n,s.edited=!0,s.state==="proposed")s.state="edited"}}else{let s=i.bands.find((a)=>a.id===e);if(s){if(s.path=n,s.edited=!0,s.state==="proposed")s.state="edited"}}}getItemPts(e,t){let n=this.state;if(!n)return[];if(t)return(n.regions.find((i)=>i.id===e)?.outline??[]).map((i)=>[i[0],i[1]]);return(n.bands.find((i)=>i.id===e)?.path??[]).map((i)=>[i[0],i[1]])}syncHoverHud(e){let t=this.cards.get(e),n=this.state;if(!t||!n)return;if(!this.hover||this.hover.layer!==e){t.hoverHudEl.classList.add("bp-hidden"),t.hoverHudEl.textContent="";return}let i=this.hover.hit.id,s=n.bands.find((o)=>o.id===i),a=n.regions.find((o)=>o.id===i),r="";if(s)r=`${s.name||i} · ${s.nets??0}n · ${(s.width??1.5).toFixed(2)}mm`;else if(a)r=a.reference?`${a.net||i} · ${a.reference}`:a.net||i;if(!r)t.hoverHudEl.classList.add("bp-hidden");else t.hoverHudEl.classList.remove("bp-hidden"),t.hoverHudEl.textContent=r}onKeyDown(e){let t=this.state;if(!t)return;if(e.key==="0"||e.key==="Home"){e.preventDefault(),this.fitAll();return}if(e.key==="Escape"){this.selectedVertex=null,this.cb.onSelect("");return}if(!t.selectedId)return;let n=t.bands.find((r)=>r.id===t.selectedId),i=t.regions.find((r)=>r.id===t.selectedId),s=Boolean(n?.locked??i?.locked),a=e.key.toLowerCase();if(a==="a")e.preventDefault(),this.cb.onQuickApprove([t.selectedId],!0);else if(a==="r")e.preventDefault(),this.cb.onQuickApprove([t.selectedId],!1);else if(a==="l")e.preventDefault(),this.cb.onCommitFields(t.selectedId,{locked:!s});else if(a==="w"&&n&&!s){e.preventDefault();let r=e.shiftKey?-0.25:0.25,o=Math.round(Math.max(0.15,Math.min(25,(n.width??1.5)+r))*100)/100;this.cb.onCommitFields(t.selectedId,{width:o})}else if((e.key==="Delete"||e.key==="Backspace")&&!s&&this.selectedVertex?.id===t.selectedId){e.preventDefault();let r=Boolean(i),o=this.getItemPts(t.selectedId,r),l=fn(o,this.selectedVertex.idx,r);if(l)this.selectedVertex=null,this.cb.onCommitFields(t.selectedId,{[r?"outline":"path"]:l})}}scheduleDraw(){if(this.rafPending)return;this.rafPending=requestAnimationFrame(()=>{this.rafPending=0,this.drawAll()})}drawAll(){let e=this.state;if(!e)return;let t=Math.max(0.45,Math.min(1.25,Math.abs(this.effectiveBbox(e.board)[3]-this.effectiveBbox(e.board)[1])/Math.max(1,Math.abs(this.effectiveBbox(e.board)[2]-this.effectiveBbox(e.board)[0]))));for(let n of this.cards.values()){let i=n.canvas.parentElement;if(!i)continue;let s=Math.max(120,Math.round(i.clientWidth)),a=Math.max(165,Math.min(250,Math.round(s*t)));n.canvas.style.height=`${a}px`;let r=Math.max(1,window.devicePixelRatio||1),o=Math.round(s*r),l=Math.round(a*r);if(n.canvas.width!==o||n.canvas.height!==l)n.canvas.width=o,n.canvas.height=l;n.ctx.setTransform(r,0,0,r,0,0),this.drawLayer(n.ctx,n.layer,s,a,e)}}drawLayer(e,t,n,i,s){let a=this.getCam(t,n,i),r=(b,g)=>Ve(a,b,g,n,i);e.fillStyle=Di,e.fillRect(0,0,n,i);let o=(s.board.outline??[]).filter((b)=>b.length>=3);if(e.fillStyle=na,o.length>0){e.beginPath();for(let b of o){for(let g=0;gb.layer===t),p=this.hover?.layer===t?this.hover.hit:null;for(let b of l){let g=b.outline??[];if(g.length<3)continue;let y=s.selectedId===b.id,w=p?.id===b.id,x=la(b.state||"proposed",y,w),A=Lt(b.net||b.id,b.color||"");e.beginPath();for(let S=0;SB)B=D;if(re>R)R=re}if(Math.abs(B-S)>=38&&Math.abs(R-M)>=18){let U=Ti(g,b.holes??[]);if(U){let[D,re]=r(U[0],U[1]);e.fillStyle=at(A,y?0.91:0.67),e.font="bold 10px ui-monospace, 'SFMono-Regular', Menlo, monospace",e.textAlign="center",e.textBaseline="middle",e.fillText(N,D,re)}}}}if(e.strokeStyle=ia,e.lineWidth=1.25,e.lineCap="round",e.lineJoin="round",o.length>0){e.beginPath();for(let b of o){for(let g=0;gb.layer===t),d=Bi(u,a,n,i,s.selectedId,p?.id??""),m=d.map((b)=>[b.cx-b.pw*0.5-1,b.cy-b.ph*0.5-1,b.cx+b.pw*0.5+1,b.cy+b.ph*0.5+1]),f=[];for(let b of u){for(let g of b.from??[])f.push(g);for(let g of b.to??[])f.push(g)}e.fillStyle="rgba(143, 163, 155, 0.72)",e.font="9.5px ui-monospace, 'SFMono-Regular', Menlo, monospace",e.textAlign="center",e.textBaseline="middle";for(let b of Ii(c,a,n,i,f,m))e.fillText(b.text,b.cx,b.cy);for(let b of u){let g=b.guides??[];if(g.length===0)continue;let y=s.selectedId===b.id||p?.id===b.id,w=ut(b.name||b.id,b.color||"");e.strokeStyle=at(w,y?0.38:0.17),e.lineWidth=y?1:0.7,e.beginPath();for(let x of g){let[A,N]=r(x[0],x[1]),[S,M]=r(x[2],x[3]);e.moveTo(A,N),e.lineTo(S,M)}e.stroke()}for(let b of u){let g=b.path??[];if(g.length<2)continue;let y=s.selectedId===b.id,w=p?.id===b.id,x=oa(b.state||"proposed",y,w),A=ut(b.name||b.id,b.color||""),N=vn(b.width??1.5,a.scale),S=()=>{e.beginPath();for(let M=0;M{let w=y?g.length:Math.max(0,g.length-1);for(let x=0;xn.id===e))return;if(this.openPanel!==e)this.togglePanel(e)}getTabs(){return Wt(this.getStateInfo())}isOpen(){return this.openPanel!==""}closePanel(){if(!this.openPanel)return;if(this.openPanel="",this.project)this.cb.hub.rpc("mgmt.panel",{project:this.project,open:""}).catch(()=>{});this.render()}clear(){this.watchGen++,this.bomEditGen++,this.askedProject="",this.digest="",this.project="",this.openPanel="",this.errorMsg="",this.bomEditingId="",this.bomLastUndo=null,this.bomEditStatus="",this.checksStatus="",this.planStatus="",this.planSelectedId="",this.planStackupOpen=!1,this.planShownLayers=[],this.planOptimistic.clear(),this.planOptimisticRev=void 0,this.planHydratedKey="",this.planHydrateAskedKey="",this.planHydrateGen++,this.planHydratedRev=void 0,this.planRenderDeferred=!1,this.planHydratedBoard=null,this.planHydratedDraw=null,this.planNoteOpen=!1,this.planMoveLayerOpen=!1,this.planCanvas?.destroy(),this.planCanvas=null,this.planCommitFields=null,this.fabStatus="",this.render()}async watchProject(e){if(!e||!this.cb.hub.hasFeature("mgmt")){this.clear();return}if(e===this.askedProject&&this.digest){this.render();return}let t=++this.watchGen;if(this.askedProject=e,this.project!==e)this.bomEditGen++,this.digest="",this.project="",this.openPanel="",this.errorMsg="",this.bomSelectedId="",this.bomEditingId="",this.bomEditStatus="",this.bomLastUndo=null,this.checksSelectedId="",this.checksStatus="",this.planStatus="",this.planSelectedId="",this.planStackupOpen=!1,this.planShownLayers=[],this.planOptimistic.clear(),this.planOptimisticRev=void 0,this.planHydratedKey="",this.planHydrateAskedKey="",this.planHydrateGen++,this.planHydratedRev=void 0,this.planRenderDeferred=!1,this.planHydratedBoard=null,this.planHydratedDraw=null,this.planNoteOpen=!1,this.planMoveLayerOpen=!1,this.planCanvas?.destroy(),this.planCanvas=null,this.planCommitFields=null,this.fabStatus="",this.lifeSelectedKey="",this.lifePartSamples=null,this.render();try{let n=await this.cb.hub.rpc("mgmt.watch",{project:e});if(t!==this.watchGen)return;let i=typeof n.digest==="string"?n.digest:"";if(!i){this.render();return}if(this.digest=i,this.project=typeof n.project==="string"&&n.project?n.project:e,n.state&&typeof n.state==="object")this.infos.set(`mgmt.state.${i}`,n.state);if(n.data&&typeof n.data==="object"){for(let[s,a]of Object.entries(n.data))if(a&&typeof a==="object")this.infos.set(`mgmt.${s}.${i}`,a)}this.errorMsg="",this.render()}catch{if(t===this.watchGen)this.render()}}handleInfo(e){let t=!1;for(let[n,i]of Object.entries(e)){if(!n.startsWith("mgmt.")&&!n.startsWith("kicad.checks."))continue;if(i===""||i===null||i===void 0){if(this.infos.delete(n))t=!0;continue}if(typeof i==="string")try{let s=JSON.parse(i);if(s&&typeof s==="object")this.infos.set(n,s),t=!0}catch{}else if(typeof i==="object")this.infos.set(n,i),t=!0}if(t)this.render()}getStateInfo(){if(!this.digest)return null;return this.infos.get(`mgmt.state.${this.digest}`)??null}getPanelData(e){if(!this.digest)return null;return this.infos.get(`mgmt.${e}.${this.digest}`)??null}togglePanel(e){let t=this.openPanel===e?"":e;if(this.openPanel=t,this.errorMsg="",this.render(),this.project)this.cb.hub.rpc("mgmt.panel",{project:this.project,open:t}).catch((n)=>{this.errorMsg=n instanceof Error?n.message:"Could not update panel",this.render()})}render(){if(this.openPanel==="plan"&&this.planCanvas?.isDragging()){this.planRenderDeferred=!0;return}this.planRenderDeferred=!1;let e=this.getStateInfo(),t=Wt(e);if(!this.digest||t.length===0){this.planCanvas?.destroy(),this.planCanvas=null,this.panelEl.classList.remove("bp-plan-expanded"),this.stripEl.classList.add("bp-hidden"),this.panelEl.classList.add("bp-hidden"),this.panelEl.removeAttribute("data-testid"),this.panelEl.replaceChildren(),this.stripEl.replaceChildren(),this.cb.onOpenChange?.(!1);return}this.stripEl.classList.remove("bp-hidden");let n=document.createDocumentFragment(),i=document.createElement("div");i.className="bp-mgmt-tabs";for(let r of t){let o=document.createElement("button");o.type="button";let l=this.openPanel===r.id;o.className="bp-mgmt-tab"+(l?" active":""),o.setAttribute("data-testid",`mgmt-tab-${r.id}`),o.setAttribute("aria-pressed",l?"true":"false");let p=document.createElement("span");p.textContent=pe(r.label),o.appendChild(p);let c=this.getPanelData(r.id),u=mi(c);if(u){let d=document.createElement("span");d.className=`bp-mgmt-badge bp-tone-${u.tone}`,d.textContent=u.text,o.appendChild(d)}o.addEventListener("click",()=>this.togglePanel(r.id)),i.appendChild(o)}if(n.appendChild(i),this.openPanel){let r=document.createElement("button");r.type="button",r.className="icon bp-mgmt-close",r.textContent="×",r.title=h("gpui.mgmt.close","Close the panel"),r.setAttribute("aria-label",h("gpui.mgmt.close","Close the panel")),r.setAttribute("data-testid","mgmt-close"),r.addEventListener("click",()=>this.closePanel()),n.appendChild(r)}if(this.stripEl.replaceChildren(n),!this.openPanel){this.planCanvas?.destroy(),this.planCanvas=null,this.panelEl.classList.remove("bp-plan-expanded"),this.panelEl.classList.add("bp-hidden"),this.panelEl.removeAttribute("data-testid"),this.panelEl.replaceChildren(),this.cb.onOpenChange?.(!1);return}if(this.openPanel!=="plan")this.planCanvas?.destroy(),this.planCanvas=null,this.panelEl.classList.remove("bp-plan-expanded");else this.panelEl.classList.toggle("bp-plan-expanded",this.planExpanded);this.panelEl.classList.remove("bp-hidden"),this.panelEl.setAttribute("data-testid",`mgmt-panel-${this.openPanel}`),this.cb.onOpenChange?.(!0);let s=this.openPanel==="plan"&&this.planCanvas!==null&&document.activeElement instanceof HTMLElement&&this.panelEl.contains(document.activeElement)&&(document.activeElement===this.planCanvas.root||this.planCanvas.root.contains(document.activeElement)),a=document.createDocumentFragment();if(this.errorMsg){let r=document.createElement("div");r.className="bp-mgmt-note bp-tone-bad",r.textContent=this.errorMsg,a.appendChild(r)}switch(this.openPanel){case"bom":a.appendChild(this.renderBom());break;case"checks":a.appendChild(this.renderChecks());break;case"life":a.appendChild(this.renderLife());break;case"plan":a.appendChild(this.renderPlan());break;case"fab":a.appendChild(this.renderFab());break}if(this.panelEl.replaceChildren(a),s)this.planCanvas?.root.focus({preventScroll:!0})}renderBom(){let e=document.createElement("div");e.className="bp-mgmt-body";let t=this.getPanelData("bom");if(!t)return e.appendChild(this.makeEmpty("Reading the schematic…")),e;let n=Array.isArray(t.lines)?t.lines:[],i=document.createElement("div");i.className="bp-mgmt-head";let s=document.createElement("span");s.className="bp-dim",s.textContent=`${t.parts??0} parts · ${n.length} lines`;let a=document.createElement("span"),r=t.source==="kicad";if(a.className="bp-mgmt-pill"+(r?" accent":""),a.textContent=r?"live":"saved",i.append(s,a),(t.priced??0)>0&&(t.checking??0)===0&&typeof t.cost==="number"){let p=document.createElement("span");p.className="bp-dim",p.textContent=(t.priced??0)<(t.lookups??0)?`≥ ${pt(t.cost)}/board`:`${pt(t.cost)}/board`,i.appendChild(p)}if(t.paused){let p=document.createElement("span");p.className="bp-mgmt-faint",p.textContent="Stock check paused",i.appendChild(p)}if(e.appendChild(i),t.stock_note){let p=document.createElement("div");p.className="bp-mgmt-note bp-mgmt-faint",p.textContent=pe(t.stock_note),e.appendChild(p)}let o=this.bomEditingId?n.find((p)=>p.id===this.bomEditingId)??null:null;if(o)e.appendChild(this.renderBomEditor(o));else{let p=document.createElement("div");p.className="bp-mgmt-filter-row";let c=document.createElement("input");c.type="text",c.className="bp-mgmt-filter",c.placeholder="Filter BOM (ref, value, footprint, MPN, dnp)…",c.value=this.bomFilter,c.setAttribute("data-testid","mgmt-bom-filter"),c.addEventListener("input",()=>{this.bomFilter=c.value,this.renderBomRows(l,n)}),p.appendChild(c),e.appendChild(p)}let l=document.createElement("div");return l.className="bp-mgmt-rows",l.setAttribute("data-testid","mgmt-bom-rows"),this.renderBomRows(l,n),e.appendChild(l),e}renderBomRows(e,t){let n=gi(t,this.bomFilter);if(n.length===0){e.replaceChildren(this.makeEmpty(t.length===0?"No parts found.":"No matching lines."));return}let i=t.some((a)=>Boolean(a.mpn)||Boolean(a.fab)),s=document.createDocumentFragment();for(let a of n){let r=Array.isArray(a.refs)?a.refs:[],o=document.createElement("div");o.className="bp-mgmt-row"+(this.bomSelectedId===a.id?" active":"")+(a.dnp?" faint":""),o.setAttribute("data-testid",`mgmt-bom-row-${a.id}`);let l=document.createElement("div");l.className="bp-mgmt-row-line";let p=document.createElement("span");if(p.className="bp-mgmt-strong bp-mgmt-flex1",p.textContent=_t(r,24),l.appendChild(p),a.dnp){let b=document.createElement("span");b.className="bp-mgmt-pill",b.textContent=h("gpui.mgmt.bom.dnp","DNP"),l.appendChild(b)}else{let b=bi(a.stock);if(b){let g=document.createElement("span");g.className=`bp-tone-${b.tone}`,g.textContent=b.text,l.appendChild(g)}}let c=document.createElement("button");c.type="button",c.className="bp-mgmt-btn",c.textContent="Edit",c.addEventListener("click",(b)=>{b.stopPropagation(),this.bomEditGen++,this.bomEditingId=a.id,this.bomEditDraft=a.mpn??"",this.bomEditStatus="",this.bomLastUndo=null,this.render()}),l.appendChild(c);let u=document.createElement("div");u.className="bp-mgmt-row-sub";let d=[`${a.qty??r.length}×`,a.value??"",hi(a.footprint??"")].filter(Boolean).join(" · "),m=document.createElement("span");m.className="bp-dim",m.textContent=d;let f=document.createElement("span");if(f.className="bp-mgmt-flex1",a.mpn)f.textContent=a.mpn;else if(i&&!a.dnp)f.className+=" bp-tone-warn",f.textContent=h("gpui.mgmt.bom.nompn","no MPN");if(u.append(m,f),!a.dnp&&typeof a.stock?.price==="number"){let b=document.createElement("span");b.className="bp-dim",b.textContent=pt(a.stock.price),u.appendChild(b)}if(!a.dnp&&a.stock?.class){let b=document.createElement("span");b.className="bp-mgmt-faint",b.textContent=pe(a.stock.class),u.appendChild(b)}o.append(l,u),o.addEventListener("click",()=>{this.bomSelectedId=a.id,this.renderBomRows(e,t)}),s.appendChild(o)}e.replaceChildren(s)}renderBomEditor(e){let t=document.createElement("div");t.className="bp-mgmt-editor",t.setAttribute("data-testid","mgmt-bom-edit");let n=Array.isArray(e.refs)?e.refs:[],i=document.createElement("div");i.className="bp-mgmt-row-line";let s=document.createElement("span");s.className="bp-mgmt-strong",s.textContent=_t(n,30);let a=document.createElement("button");a.type="button",a.className="icon",a.textContent="×",a.addEventListener("click",()=>{this.bomEditGen++,this.bomEditingId="",this.bomLastUndo=null,this.bomEditStatus="",this.render()}),i.append(s,a);let r=document.createElement("input");r.type="text",r.className="bp-mgmt-filter",r.placeholder="MPN",r.value=this.bomEditDraft,r.addEventListener("input",()=>{this.bomEditDraft=r.value});let o=()=>({watchGen:this.watchGen,editGen:this.bomEditGen,project:this.project,editId:this.bomEditingId}),l=async(d,m=!1)=>{let f=o();this.bomEditStatus="Writing…",this.render();try{let b=await this.cb.hub.rpc("mgmt.bom.edit",d);if(!bn(f,o()))return;this.bomLastUndo=!m&&(b.changed??0)>0?{project:d.project,editId:f.editId,refs:d.refs.slice(),field:d.field,was:typeof b.was==="string"?b.was:d.field==="mpn"?e.mpn??"":e.dnp?"yes":"no"}:null,this.bomEditStatus=m?"Restored":(b.changed??0)===0?"No change":b.via==="kicad"?"Updated in KiCad":"Saved to schematic"}catch(b){if(!bn(f,o()))return;this.bomEditStatus=b instanceof Error?b.message:"Could not save edit"}this.render()},p=document.createElement("div");p.className="bp-mgmt-btn-row";let c=document.createElement("button");c.type="button",c.className="primary bp-mgmt-btn",c.textContent="Save MPN",c.addEventListener("click",()=>{l({project:this.project,refs:n.slice(),field:"mpn",value:this.bomEditDraft.trim()})});let u=document.createElement("button");if(u.type="button",u.className="bp-mgmt-btn",u.textContent=e.dnp?"Clear DNP":"Mark DNP",u.addEventListener("click",()=>{l({project:this.project,refs:n.slice(),field:"dnp",value:e.dnp?"no":"yes"})}),p.append(c,u),this.bomLastUndo&&this.bomLastUndo.project===this.project&&this.bomLastUndo.editId===this.bomEditingId){let d=this.bomLastUndo,m=document.createElement("button");m.type="button",m.className="bp-mgmt-btn",m.textContent="Undo",m.addEventListener("click",()=>{l(ki(d),!0)}),p.appendChild(m)}if(t.append(i,r,p),this.bomEditStatus){let d=document.createElement("div");d.className="bp-mgmt-faint",d.textContent=this.bomEditStatus,t.appendChild(d)}return t}renderChecks(){let e=document.createElement("div");e.className="bp-mgmt-body";let t=this.getPanelData("checks");if(!t)return e.appendChild(this.makeEmpty("Reading checks…")),e;let n=Array.isArray(t.groups)?t.groups:[],i=Array.from(new Set(n.map((d)=>d.source).filter(Boolean))),s=(d)=>t.sources?.[d]?.label||d.toUpperCase(),a=(d)=>t.sources?.[d]?.judged===!0,r=document.createElement("div");r.className="bp-mgmt-head bp-mgmt-scroll-x";let o=document.createElement("button");o.type="button",o.className="bp-mgmt-btn"+(this.checksSource===""?" active":""),o.textContent=h("gpui.mgmt.checks.all","All"),o.addEventListener("click",()=>{this.checksSource="",this.render()}),r.appendChild(o);for(let d of i){let m=document.createElement("button");m.type="button",m.className="bp-mgmt-btn"+(this.checksSource===d?" active":""),m.textContent=s(d)+(a(d)?" · judged":""),m.addEventListener("click",()=>{this.checksSource=this.checksSource===d?"":d,this.render()}),r.appendChild(m)}let l=document.createElement("span");l.className="bp-mgmt-flex1";let p=document.createElement("button");if(p.type="button",p.className="bp-mgmt-btn",p.textContent=h("gpui.mgmt.checks.run","Run"),p.addEventListener("click",()=>{let d=this.watchGen,m=this.project;this.checksStatus="Running checks…",this.render(),this.cb.hub.rpc("kicad.checks.run",{project:m}).then(()=>{if(d!==this.watchGen||m!==this.project)return;this.checksStatus="",this.render()}).catch((f)=>{if(d!==this.watchGen||m!==this.project)return;this.checksStatus=f instanceof Error?f.message:"Could not run checks",this.render()})}),r.append(l,p),e.appendChild(r),this.checksStatus){let d=document.createElement("div");d.className="bp-mgmt-note bp-dim",d.textContent=this.checksStatus,e.appendChild(d)}let c=document.createElement("div");c.className="bp-mgmt-rows",c.setAttribute("data-testid","mgmt-checks-rows");let u=fi(n,this.checksSource);if(u.length===0)c.appendChild(this.makeEmpty("No check findings."));else for(let d of u){let m=d.severity==="error"?"bad":d.severity==="warning"?"warn":"faint",f=document.createElement("div");f.className="bp-mgmt-group-head";let b=document.createElement("span");b.className=`bp-mgmt-dot bp-tone-bg-${m}`;let g=document.createElement("span");g.className="bp-mgmt-flex1",g.textContent=`${s(d.source)} · ${d.rule}`;let y=document.createElement("span");y.className=`bp-tone-${m}`,y.textContent=String(d.n),f.append(b,g,y),c.appendChild(f);for(let w of d.rows??[]){let x=document.createElement("div");x.className="bp-mgmt-row"+(this.checksSelectedId===w.id?" active":"");let A=document.createElement("div");if(A.textContent=pe(w.title??""),x.appendChild(A),w.names||this.checksSelectedId===w.id){let N=document.createElement("div");N.className="bp-mgmt-row-sub";let S=document.createElement("span");if(S.className="bp-dim bp-mgmt-flex1",S.textContent=w.names??"",N.appendChild(S),this.checksSelectedId===w.id){let M=document.createElement("button");M.type="button",M.className="bp-mgmt-btn accent",M.textContent=h("gpui.mgmt.checks.fix","Fix with agent"),M.addEventListener("click",(B)=>{B.stopPropagation();let R={watchGen:this.watchGen,project:this.project,threadId:this.cb.getThreadId(),threadGen:this.cb.getThreadGen()};this.cb.hub.rpc("kicad.checks.fix",{project:R.project,id:w.id}).then((U)=>{let D={watchGen:this.watchGen,project:this.project,threadId:this.cb.getThreadId(),threadGen:this.cb.getThreadGen()};if(!gn(R,D))return;if(U.text)this.cb.onSendText(U.text),this.checksStatus="Sent to agent",this.render()}).catch((U)=>{let D={watchGen:this.watchGen,project:this.project,threadId:this.cb.getThreadId(),threadGen:this.cb.getThreadGen()};if(!gn(R,D))return;this.checksStatus=U instanceof Error?U.message:"Could not send finding",this.render()})}),N.appendChild(M)}x.appendChild(N)}x.addEventListener("click",()=>{this.checksSelectedId=w.id,this.cb.hub.rpc("kicad.checks.focus",{project:this.project,id:w.id}).catch(()=>{}),this.render()}),c.appendChild(x)}}return e.appendChild(c),e}renderLife(){let e=document.createElement("div");e.className="bp-mgmt-body";let t=this.getPanelData("life");if(!t)return e.appendChild(this.makeEmpty("Reading lifecycle…")),e;let n=document.createElement("div");n.className="bp-mgmt-head";let i=t.counts??{};for(let l of["active","nrnd","eol"]){let p=i[l]??0,c=hn(l),u=document.createElement("span");u.className=p>0?`bp-tone-${c.tone}`:"bp-mgmt-faint",u.textContent=`${c.label} ${p}`,n.appendChild(u)}if((i.unknown??0)>0){let l=document.createElement("span");l.className="bp-mgmt-faint",l.textContent=`${i.unknown} unknown`,n.appendChild(l)}if(t.since){let l=document.createElement("span");l.className="bp-mgmt-flex1";let p=document.createElement("span");p.className="bp-mgmt-faint",p.textContent=`since ${zt(t.since)} (${t.samples??0})`,n.append(l,p)}e.appendChild(n);let s=document.createElement("div");s.className="bp-mgmt-rows",s.setAttribute("data-testid","mgmt-life-rows");let a=t.bom?.cost??[],r=t.bom?.instock??[],o=t.bom?.lines??0;if(a.length===0)s.appendChild(this.makeEmpty(o===0?"No line has an MPN or fab part number to follow yet.":"No reading of the fab's stock yet: the BOM panel's lookups start it."));else{let l=a[a.length-1],p=r[r.length-1],c=document.createElement("div");c.className="bp-mgmt-note bp-dim",c.textContent=`Parts/board: ${pt(l[1])} · ${Math.round(p?.[1]??0)}/${o} lines in stock (${zt(l[0])})`,s.appendChild(c)}for(let l of t.parts??[]){let p=this.lifeSelectedKey===l.key,c=hn(l.lifecycle??"unknown"),u=document.createElement("div");u.className="bp-mgmt-row"+(p?" active":"");let d=document.createElement("div");d.className="bp-mgmt-row-line";let m=document.createElement("span");m.className="bp-mgmt-strong",m.textContent=_t(l.refs??[],14);let f=document.createElement("span");f.className="bp-mgmt-flex1 bp-dim",f.textContent=l.mpn||l.key;let b=document.createElement("span");if(b.className=`bp-tone-${c.tone}`,b.textContent=c.label,d.append(m,f,b),typeof l.stock==="number"){let g=document.createElement("span");g.className="bp-dim",g.textContent=dt(l.stock),d.appendChild(g)}if(u.appendChild(d),p){let g=document.createElement("div");if(g.className="bp-mgmt-row-sub bp-mgmt-faint",this.lifePartLoading)g.textContent=h("gpui.mgmt.life.reading","Reading its history…");else if(this.lifePartSamples&&this.lifePartSamples.length>0){let y=this.lifePartSamples[this.lifePartSamples.length-1];g.textContent=`${this.lifePartSamples.length} samples · latest ${y.at?zt(y.at):""}`+(typeof y.stock==="number"?` · stock ${dt(y.stock)}`:"")+(typeof y.price==="number"?` · ${pt(y.price)}`:"")}else g.textContent=h("gpui.mgmt.life.nopart","No reading of this part yet.");u.appendChild(g)}u.addEventListener("click",()=>{if(this.lifeSelectedKey===l.key){this.lifeSelectedKey="",this.lifePartSamples=null,this.render();return}this.lifeSelectedKey=l.key,this.lifePartSamples=null,this.lifePartLoading=!0,this.render(),this.cb.hub.rpc("mgmt.life.part",{project:this.project,key:l.key}).then((g)=>{if(this.lifeSelectedKey!==l.key)return;this.lifePartLoading=!1,this.lifePartSamples=Array.isArray(g.samples)?g.samples:[],this.render()}).catch(()=>{if(this.lifeSelectedKey!==l.key)return;this.lifePartLoading=!1,this.lifePartSamples=[],this.render()})}),s.appendChild(u)}return e.appendChild(s),e}renderPlan(){let e=document.createElement("div");e.className="bp-mgmt-body";let t=this.getPanelData("plan");if(!t)return e.appendChild(this.makeEmpty(h("gpui.mgmt.plan.reading","Reading the routing plan…"))),e;let n=(E,k)=>{let j=this.watchGen,T=this.project;this.planStatus="",this.cb.hub.rpc(E,{pro:T,...k}).catch((q)=>{if(j!==this.watchGen||T!==this.project)return;this.planOptimistic.clear(),this.planStatus=q instanceof Error?q.message:h("gpui.mgmt.plan.refused","KiCad refused"),this.render()})};if(t.revision!==this.planOptimisticRev)this.planOptimisticRev=t.revision,this.planOptimistic.clear();let i=`${this.project}:${t.revision??0}`;if(t.board_trimmed&&this.planHydrateAskedKey!==i&&this.project){this.planHydrateAskedKey=i;let E=this.watchGen,k=++this.planHydrateGen,j=this.project,T=t.revision??0;this.cb.hub.rpc("plan.get",{pro:j,board:!0}).then((q)=>{let ne=Ri(q);if(!ne)return;let H=typeof ne.revision==="number"?ne.revision:T;if(!ji(E,this.watchGen,k,this.planHydrateGen,j,this.project,H,this.planHydratedRev))return;this.planHydratedRev=H,this.planHydratedKey=`${j}:${H}`,this.planHydratedBoard=ne.board??null,this.planHydratedDraw=ne.draw??null,this.render()}).catch(()=>{})}let s=t.on===!0,a=document.createElement("div");a.className="bp-plan-header";let r=document.createElement("div");r.className="bp-plan-toggle";let o=document.createElement("span");o.className="bp-mgmt-strong",o.textContent=h("gpui.mgmt.plan.before","Plan before routing"),o.title=s?h("gpui.mgmt.plan.onwords","Before routing a board with 4 or more copper layers or more than 60 nets, the agent proposes corridors and plane regions here. It routes only what you approve."):h("gpui.mgmt.plan.offwords","Agents route as you ask. Turn it on to have them propose a routing plan first and route only what you approve here."),r.appendChild(o);let l=t.awaiting??0,p=t.blocked??0,c=t.done??0,u=t.total??0,d=t.revision??0,m=t.empty?[]:Ei(t),f=m.reduce((E,k)=>E+k.count,0);if(!t.empty){let E=wi(t),k=document.createElement("span");if(k.className=`bp-plan-status-badge tone-${E.tone}`,k.textContent=h(E.key,E.label),r.appendChild(k),d>0){let T=document.createElement("span");T.className="bp-dim",T.textContent=`v${d}`,r.appendChild(T)}let j=document.createElement("span");if(j.className="bp-plan-header-counts bp-mgmt-flex1 "+(l>0?"bp-tone-warn":p>0?"bp-tone-bad":"bp-dim"),j.textContent=u>0?`${c}/${u} ${h("gpui.mgmt.plan.done","done")}`:l>0?h("web.plan.awaiting","{n} awaiting approval",{n:l}):h("gpui.mgmt.plan.nothing","Nothing awaits your approval"),r.appendChild(j),!t.live){let T=document.createElement("span");T.className="bp-mgmt-pill",T.textContent=h("gpui.mgmt.plan.saved","saved plan"),r.appendChild(T)}}else{let E=document.createElement("span");E.className="bp-mgmt-flex1",r.appendChild(E)}let b=document.createElement("button");b.type="button",b.className="bp-mgmt-btn bp-plan-chip-btn"+(s?" active":""),b.setAttribute("data-testid","mgmt-plan-on"),b.setAttribute("aria-pressed",s?"true":"false"),b.textContent=h("gpui.bots.recall.on","On"),b.addEventListener("click",()=>n("plan.enable",{on:!0}));let g=document.createElement("button");if(g.type="button",g.className="bp-mgmt-btn bp-plan-chip-btn"+(!s?" active":""),g.setAttribute("data-testid","mgmt-plan-off"),g.setAttribute("aria-pressed",!s?"true":"false"),g.textContent=h("gpui.bots.recall.off","Off"),g.addEventListener("click",()=>n("plan.enable",{on:!1})),r.append(b,g),a.appendChild(r),f>0){let E=document.createElement("div");E.className="bp-plan-segbar";for(let k of m){if(k.count<=0)continue;let j=document.createElement("div");j.className=`bp-plan-seg bp-tone-bg-${k.tone}`,j.style.flexGrow=String(k.count),E.appendChild(j)}a.appendChild(E)}e.appendChild(a);for(let E of t.elsewhere??[]){let k=document.createElement("div");k.className="bp-plan-elsewhere";let j=document.createElement("span");j.className="bp-tone-warn bp-mgmt-flex1",j.textContent=h("gpui.mgmt.plan.elsewhere","A routing plan for {board} awaits your approval",{board:E.name||E.rel||""}),k.appendChild(j),e.appendChild(k)}if(t.empty){let E=document.createElement("div");E.className="bp-mgmt-note";let k=document.createElement("div");k.className="bp-dim",k.textContent=h("gpui.mgmt.plan.noboard","No routing plan for this board.");let j=document.createElement("div");return j.className="bp-mgmt-faint",j.textContent=h("gpui.mgmt.plan.emptysub","Layers, corridors, and planes appear here once a plan is proposed."),E.append(k,j),e.appendChild(E),e}let y=t.stackup_summary??"",w=Array.isArray(t.impedances)?t.impedances:[],x=Boolean(y)||w.length>0,A=document.createElement("div");if(A.className="bp-mgmt-head",l>0){let E=document.createElement("button");E.type="button",E.className="primary bp-mgmt-btn",E.setAttribute("data-testid","mgmt-plan-approve-all"),E.textContent=h("gpui.mgmt.plan.all","Approve all"),E.addEventListener("click",()=>n("plan.approve",{layer:"",ids:[],approve:!0})),A.appendChild(E)}if(t.routing){let E=document.createElement("button");E.type="button",E.className="bp-mgmt-btn",E.setAttribute("data-testid","mgmt-plan-stop"),E.textContent=h("gpui.mgmt.plan.stop","Stop routing"),E.addEventListener("click",()=>n("plan.stop",{})),A.appendChild(E)}if(t.live&&c>0){let E=document.createElement("button");E.type="button",E.className="bp-mgmt-btn",E.setAttribute("data-testid","mgmt-plan-verify"),E.textContent=h("gpui.mgmt.plan.verify","Verify"),E.addEventListener("click",()=>n("plan.verify",{})),A.appendChild(E)}let N=document.createElement("span");if(N.className="bp-mgmt-flex1",A.appendChild(N),x){let E=document.createElement("button");E.type="button",E.className="bp-mgmt-btn bp-plan-chip-btn"+(this.planStackupOpen?" active":""),E.setAttribute("data-testid","mgmt-plan-stackup-toggle"),E.setAttribute("aria-expanded",this.planStackupOpen?"true":"false"),E.textContent=`${h("gpui.mgmt.plan.stackup.short","Stackup")} ${this.planStackupOpen?"▾":"▸"}`,E.addEventListener("click",()=>{this.planStackupOpen=!this.planStackupOpen,this.render()}),A.appendChild(E)}let S=document.createElement("button");S.type="button",S.className="bp-mgmt-btn",S.setAttribute("data-testid","mgmt-plan-hide"),S.textContent=this.planHideDone?h("gpui.mgmt.plan.show","Show done"):h("gpui.mgmt.plan.hide","Hide done"),S.addEventListener("click",()=>{this.planHideDone=!this.planHideDone,this.render()}),A.appendChild(S),e.appendChild(A);let M=Array.isArray(t.asks)?t.asks:[];if(M.length>0){let E=M.map((ne)=>ne.what||"").filter(Boolean).join(", "),k=M[0]?.note||"",j=document.createElement("div");j.className="bp-plan-elsewhere";let T=document.createElement("div");T.className="bp-plan-ask-col";let q=document.createElement("div");if(q.className="bp-tone-warn",q.textContent=E?h("gpui.mgmt.plan.requested","Approval requested: {what}",{what:E}):h("gpui.mgmt.plan.reqplain","Approval requested"),T.appendChild(q),k){let ne=document.createElement("div");ne.className="bp-dim",ne.textContent=k,T.appendChild(ne)}j.appendChild(T),e.appendChild(j)}if(this.planStatus){let E=document.createElement("div");E.className="bp-mgmt-note bp-plan-err bp-tone-bad";let k=document.createElement("span");k.className="bp-mgmt-flex1",k.textContent=this.planStatus==="KiCad refused"?h("gpui.mgmt.plan.refused","KiCad refused"):pe(this.planStatus);let j=document.createElement("button");j.type="button",j.className="icon",j.textContent="×",j.title=h("common.close","Close"),j.addEventListener("click",()=>{this.planStatus="",this.render()}),E.append(k,j),e.appendChild(E)}if(t.keys_note){let E=document.createElement("div");E.className="bp-mgmt-note bp-dim";let k="On this KiCad version, approve from this panel: in plan view KiCad's A, R and W keys aren't the plan's yet (A opens Add Footprint). Update KiCad.";E.textContent=t.keys_note===k?h("gpui.mgmt.plan.keysnote",k):pe(t.keys_note),e.appendChild(E)}if(x&&this.planStackupOpen){let E=document.createElement("div");if(E.className="bp-plan-stackup-body",E.setAttribute("data-testid","mgmt-plan-stackup-body"),y){let k=document.createElement("div");k.className="bp-dim",k.textContent=y,E.appendChild(k)}for(let k of w){let j=document.createElement("div");j.className="bp-mgmt-faint",j.textContent=`· ${k}`,E.appendChild(j)}e.appendChild(E)}let B=(E,k,j,T)=>{let q=document.createElement("button");return q.type="button",q.className="bp-mgmt-btn bp-plan-chip-btn"+(k?" active":""),q.setAttribute("data-testid",j),q.setAttribute("aria-pressed",k?"true":"false"),q.textContent=E,q.addEventListener("click",T),q},R=document.createElement("div");if(R.className="bp-plan-viewbar",R.append(B(h("gpui.mgmt.plan.view.canvas","Canvas"),this.planViewMode==="canvas","mgmt-plan-view-canvas",()=>{this.planViewMode="canvas",this.render()}),B(h("gpui.mgmt.plan.view.split","Split"),this.planViewMode==="split","mgmt-plan-view-split",()=>{this.planViewMode="split",this.render()}),B(h("gpui.mgmt.plan.view.list","List"),this.planViewMode==="list","mgmt-plan-view-list",()=>{this.planViewMode="list",this.render()})),this.planViewMode!=="list"){let E=document.createElement("span");E.className="bp-plan-sep";let k=document.createElement("span");k.className="bp-plan-sep";let j=document.createElement("button");j.type="button",j.className="bp-mgmt-btn bp-plan-mini-btn",j.setAttribute("data-testid","mgmt-plan-fit"),j.textContent=h("gpui.mgmt.plan.fit","Fit"),j.addEventListener("click",()=>this.planCanvas?.fitAll()),R.append(E,B(h("gpui.mgmt.plan.grid.pair","Side by side"),this.planGridMode==="pair","mgmt-plan-grid-pair",()=>{this.planGridMode="pair",this.render()}),B(h("gpui.mgmt.plan.grid.all","All layers"),this.planGridMode==="all","mgmt-plan-grid-all",()=>{this.planGridMode="all",this.render()}),B(h("gpui.mgmt.plan.grid.single","Single"),this.planGridMode==="single","mgmt-plan-grid-single",()=>{this.planGridMode="single",this.render()}),k,B(h("gpui.mgmt.plan.sync","Link zoom"),this.planSyncZoom,"mgmt-plan-sync",()=>{this.planSyncZoom=!this.planSyncZoom,this.render()}),j)}let U=document.createElement("span");U.className="bp-mgmt-flex1";let D=document.createElement("button");D.type="button",D.className="bp-mgmt-btn bp-plan-mini-btn",D.setAttribute("data-testid","mgmt-plan-expand"),D.textContent=this.planExpanded?h("gpui.mgmt.plan.compact","Compact"):h("gpui.mgmt.plan.expand","Expand"),D.addEventListener("click",()=>{this.planExpanded=!this.planExpanded,this.render()}),R.append(U,D),e.appendChild(R);let re=Boolean(this.planHydratedBoard)&&this.planHydratedKey.startsWith(`${this.project}:`)&&(this.planHydratedKey===i||this.planHydratedRev!==void 0&&this.planHydratedRev>=(t.revision??0)),me=re&&this.planHydratedBoard?this.planHydratedBoard:t.board??{bbox:[0,0,100,70],outline:[],parts:[]},oe=re&&this.planHydratedDraw?this.planHydratedDraw:t.draw??{bands:[],regions:[]},Ee=(oe.bands??[]).map((E)=>{let k=this.planOptimistic.get(E.id);if(!k)return{...E};return{...E,...k,edited:!0,state:E.state==="proposed"?"edited":E.state}}),Ae=(oe.regions??[]).map((E)=>{let k=this.planOptimistic.get(E.id);if(!k)return{...E};return{...E,...k,edited:!0,state:E.state==="proposed"?"edited":E.state}}),Me=[],he=(t.layers??[]).map((E)=>{let k=[];for(let j of E.items??[]){let T=this.planOptimistic.get(j.id);if(!T){k.push(j);continue}let q={...j,width:typeof T.width==="number"?T.width:j.width,locked:typeof T.locked==="boolean"?T.locked:j.locked,edited:!0,state:j.state==="proposed"?"edited":j.state};if(typeof T.layer==="string"&&T.layer!==E.layer)Me.push({target:T.layer,item:q});else k.push(q)}return{...E,items:k}});for(let E of Me){let k=he.find((j)=>j.layer===E.target);if(k)k.items=[...k.items??[],E.item]}let be=Jt(he,t.copper_layers),I=this.planGridMode==="all"?be.map((E)=>E.layer):this.planGridMode==="single"?[this.planShownLayers.find((E)=>be.some((k)=>k.layer===E))??mt(be)[0]??be[0]?.layer??""].filter(Boolean):this.planShownLayers.length>0&&this.planShownLayers.every((E)=>be.some((k)=>k.layer===E))?this.planShownLayers.slice(0,2):mt(be);if(this.planViewMode!=="list"&&this.planGridMode!=="all"&&be.length>1){let E=document.createElement("div");E.className="bp-plan-layerbar";for(let k of be){let j=I.includes(k.layer),T=(k.items??[]).length,q=st(k.layer,t.copper_layers,be)||k.title||k.layer,ne=T>0?`${q} · ${T}`:q,H=B(ne,j,`mgmt-plan-layerpill-${k.layer}`,()=>{if(this.planGridMode==="single")this.planShownLayers=[k.layer];else if(this.planGridMode==="pair"){if(!I.includes(k.layer))this.planShownLayers=I.length>=2?[I[0],k.layer]:[...I,k.layer]}else this.planGridMode="single",this.planShownLayers=[k.layer];this.render()});if(T===0&&!j)H.classList.add("empty-layer");E.appendChild(H)}e.appendChild(E)}let le=(E,k)=>{let j=this.planOptimistic.get(E)??{};if(this.planOptimistic.set(E,{...j,...k}),typeof k.layer==="string"){if(this.planGridMode==="single")this.planShownLayers=[k.layer];else if(this.planGridMode==="pair"&&!I.includes(k.layer))this.planShownLayers=I.length>=2?[I[0],k.layer]:[...I,k.layer]}let T=typeof t.revision==="number"?t.revision:void 0;this.render(),n("plan.update",{ops:[{op:"set",id:E,fields:k}],...T!==void 0?{base:T}:{}})};if(this.planCommitFields=le,this.planSelectedId){let E="",k=null;for(let j of he){let T=(j.items??[]).find((q)=>q.id===this.planSelectedId);if(T){E=j.layer,k=T;break}}if(k){let j=st(E,t.copper_layers,be),T=document.createElement("div");T.className="bp-plan-inspector",T.setAttribute("data-testid","mgmt-plan-inspector");let q=document.createElement("div");q.className="bp-plan-ins-row";let ne=document.createElement("span");ne.className="bp-plan-ins-sw",ne.style.background=k.kind==="corridor"?ut(k.name||k.id,k.color||""):Lt(k.name||k.id,k.color||"");let H=document.createElement("span");H.className="bp-mgmt-strong",H.textContent=k.name||k.id;let K=document.createElement("span");if(K.className="bp-dim",K.textContent=j,q.append(ne,H,K),k.edited||k.state==="edited"){let Y=document.createElement("span");Y.className="bp-plan-ins-pill warn",Y.textContent=h("gpui.mgmt.plan.edited","Edited"),q.appendChild(Y)}if(k.locked){let Y=document.createElement("span");Y.className="bp-plan-ins-pill",Y.textContent=h("gpui.mgmt.plan.locked","Locked"),q.appendChild(Y)}let je=document.createElement("span");je.className="bp-mgmt-flex1",q.appendChild(je);let Le=document.createElement("button");if(Le.type="button",Le.className="bp-mgmt-btn bp-plan-mini-btn",Le.setAttribute("data-testid","mgmt-plan-lock"),Le.textContent=k.locked?h("gpui.mgmt.plan.unlock","Unlock"):h("gpui.mgmt.plan.lock","Lock"),Le.addEventListener("click",()=>le(k.id,{locked:!k.locked})),q.appendChild(Le),k.state==="proposed"||k.state==="edited"){let Y=document.createElement("button");Y.type="button",Y.className="primary bp-mgmt-btn bp-plan-mini-btn",Y.textContent=h("android.hub.machines.approve","Approve"),Y.addEventListener("click",()=>n("plan.approve",{layer:"",ids:[k.id],approve:!0}));let ye=document.createElement("button");ye.type="button",ye.className="bp-mgmt-btn bp-plan-mini-btn",ye.textContent=h("gpui.mgmt.plan.reject","Reject"),ye.addEventListener("click",()=>n("plan.approve",{layer:"",ids:[k.id],approve:!1})),q.append(Y,ye)}let ue=document.createElement("button");ue.type="button",ue.className="bp-mgmt-btn bp-plan-mini-btn",ue.setAttribute("data-testid","mgmt-plan-note-toggle"),ue.textContent=h("gpui.mgmt.plan.addnote","Add note"),ue.addEventListener("click",()=>{this.planNoteOpen=!this.planNoteOpen,this.render()});let Pe=document.createElement("button");if(Pe.type="button",Pe.className="icon",Pe.textContent="×",Pe.addEventListener("click",()=>{this.planSelectedId="",this.planNoteOpen=!1,this.planMoveLayerOpen=!1,this.render()}),q.append(ue,Pe),T.appendChild(q),!k.locked){let Y=document.createElement("div");if(Y.className="bp-plan-ins-row",k.kind==="corridor"){let te=typeof k.width==="number"?k.width:1.5,ke=document.createElement("span");ke.className="bp-dim",ke.textContent=h("gpui.mgmt.plan.width","Width");let De=document.createElement("button");De.type="button",De.className="bp-mgmt-btn bp-plan-mini-btn",De.setAttribute("data-testid","mgmt-plan-w-down"),De.textContent="-",De.addEventListener("click",()=>{let Ue=Math.round(Math.max(0.15,te-0.25)*100)/100;le(k.id,{width:Ue})});let ae=document.createElement("span");ae.className="bp-plan-ins-val",ae.textContent=`${te.toFixed(2)}mm`;let fe=document.createElement("button");fe.type="button",fe.className="bp-mgmt-btn bp-plan-mini-btn",fe.setAttribute("data-testid","mgmt-plan-w-up"),fe.textContent="+",fe.addEventListener("click",()=>{let Ue=Math.round(Math.min(25,te+0.25)*100)/100;le(k.id,{width:Ue})});let _e=document.createElement("span");_e.className="bp-plan-sep",Y.append(ke,De,ae,fe,_e)}let ye=(t.copper_layers??[]).length>0?(t.copper_layers??[]).map((te)=>te.layer):he.map((te)=>te.layer);if(ye.length>0){let te=document.createElement("span");te.className="bp-dim",te.textContent=h("gpui.mgmt.plan.layer.short","Layer"),Y.appendChild(te),Y.appendChild(B(`${j} ${this.planMoveLayerOpen?"▴":"▾"}`,this.planMoveLayerOpen,"mgmt-plan-move-toggle",()=>{this.planMoveLayerOpen=!this.planMoveLayerOpen,this.render()}))}if(T.appendChild(Y),this.planMoveLayerOpen&&ye.length>0){let te=document.createElement("div");te.className="bp-plan-ins-row";for(let ke of ye){let De=st(ke,t.copper_layers,be);te.appendChild(B(De,ke===E,`mgmt-plan-move-${ke}`,()=>{if(this.planMoveLayerOpen=!1,ke!==E)le(k.id,{layer:ke});else this.render()}))}T.appendChild(te)}}if(this.planNoteOpen){let Y=document.createElement("form");Y.className="bp-plan-note-form";let ye=document.createElement("input");ye.type="text",ye.className="bp-plan-note-input",ye.setAttribute("data-testid","mgmt-plan-note-input"),ye.placeholder=h("gpui.mgmt.plan.note.placeholder","Steering note for router…");let te=document.createElement("button");te.type="submit",te.className="primary bp-mgmt-btn bp-plan-mini-btn",te.setAttribute("data-testid","mgmt-plan-note-submit"),te.textContent=h("gpui.mgmt.plan.addnote","Add note"),Y.append(ye,te),Y.addEventListener("submit",(ke)=>{ke.preventDefault();let De=ye.value.trim();if(!De)return;ye.value="",this.planNoteOpen=!1;let ae=typeof t.revision==="number"?t.revision:void 0;this.render(),n("plan.update",{ops:[{op:"note",target:k.id,text:De}],...ae!==void 0?{base:ae}:{}})}),T.appendChild(Y)}if(this.planViewMode!=="list"&&!k.locked){let Y=document.createElement("div");Y.className="bp-plan-hint",Y.textContent=h("gpui.mgmt.plan.hint","Drag waypoints to steer · Click + on edge to insert · Right-click vertex to remove"),T.appendChild(Y)}e.appendChild(T)}}let ie=document.createElement("div");ie.className="bp-mgmt-rows"+(this.planViewMode==="split"?" bp-plan-split-list":""),ie.setAttribute("data-testid","mgmt-plan-rows");let Z=h("gpui.mgmt.plan.done","done"),ce=Mi(this.planViewMode,he,I);if(this.planViewMode==="split"&&ce.length===0){let E=document.createElement("div");E.className="bp-dim",E.style.padding="6px 8px",E.style.fontSize="11px",E.textContent=h("gpui.mgmt.plan.noitems","No corridors or planes on this layer"),ie.appendChild(E)}for(let E of ce){let k=E.items??[],j=st(E.layer,t.copper_layers,be)||E.layer;if(this.planViewMode==="split"){if(ce.length>1){let T=document.createElement("div");T.className="bp-plan-split-divider";let q=E.role==="power"||E.role==="plane",ne=document.createElement("span");ne.className="bp-plan-card-bar "+(q?"pwr":"sig");let H=document.createElement("span");H.className="bp-mgmt-strong",H.textContent=j;let K=document.createElement("span");K.className="bp-dim",K.textContent=`${E.done??0}/${k.length} ${Z}`,T.append(ne,H,K),ie.appendChild(T)}}else{let T=document.createElement("div");T.className="bp-mgmt-group-head bp-plan-layer-head";let q=document.createElement("div");q.className="bp-mgmt-row-line";let ne=document.createElement("span");ne.className="bp-mgmt-strong",ne.textContent=j;let H=document.createElement("span");if(H.className="bp-dim bp-mgmt-flex1",H.textContent=`${E.role?`${E.role} · `:""}${E.done??0}/${k.length} ${Z}`,q.append(ne,H),E.status!=="approved"&&k.length>0){let K=document.createElement("button");K.type="button",K.className="bp-mgmt-btn",K.textContent=h("gpui.mgmt.plan.layer","Approve layer"),K.addEventListener("click",()=>n("plan.approve",{layer:E.layer,ids:[],approve:!0}));let je=document.createElement("button");je.type="button",je.className="bp-mgmt-btn",je.textContent=h("gpui.mgmt.plan.reject","Reject"),je.addEventListener("click",()=>n("plan.approve",{layer:E.layer,ids:[],approve:!1})),q.append(K,je)}if(T.appendChild(q),E.stackup){let K=document.createElement("div");K.className="bp-plan-layer-stackup",K.textContent=E.stackup,T.appendChild(K)}ie.appendChild(T)}for(let T of k){if(this.planHideDone&&vi(T))continue;let q=this.planSelectedId===T.id,ne=document.createElement("div");ne.className="bp-mgmt-row bp-plan-row"+(q?" active":""),ne.setAttribute("data-testid",`mgmt-plan-row-${T.id}`);let H=document.createElement("div");H.className="bp-mgmt-row-line";let K=document.createElement("span");K.className=`bp-plan-swatch bp-plan-st-${T.state||"proposed"}`,K.style.setProperty("--swatch-color",T.color||"#8a8a8a");let je=document.createElement("span");je.className="bp-mgmt-flex1"+(T.state==="blocked"||T.state==="failed"?" bp-tone-bad":T.state==="edited"?" bp-tone-warn":T.state==="rejected"||T.state==="routed"||T.state==="verified"?" bp-dim":""),je.textContent=`${T.name||T.id}${T.locked?" \uD83D\uDD12":""}`;let Le=[];if(T.kind==="plane"){if(T.reference)Le.push(h("gpui.mgmt.plan.reference","over {layer}",{layer:T.reference}))}else{let Y=T.nets??0;Le.push(Y===1?h("web.plan.net.one","1 net"):h("web.plan.nets","{n} nets",{n:Y}))}if(typeof T.width==="number"&&Number.isFinite(T.width))Le.push(`${T.width.toFixed(2)}mm`);if(T.impedance)Le.push(T.impedance);let ue=Le.join(" · "),Pe=document.createElement("span");if(Pe.className="bp-plan-mark "+(T.state==="blocked"||T.state==="failed"?"bp-tone-bad":T.state==="verified"||T.state==="routed"?"bp-tone-ok":T.state==="approved"?"bp-tone-accent":"bp-dim"),Pe.textContent=yi(T),H.append(K,je,Pe),T.state==="proposed"||T.state==="edited"){let Y=document.createElement("button");Y.type="button",Y.className="bp-mgmt-btn",Y.textContent="✓",Y.title=h("gpui.mgmt.plan.layer","Approve layer"),Y.addEventListener("click",(te)=>{te.stopPropagation(),n("plan.approve",{layer:"",ids:[T.id],approve:!0})});let ye=document.createElement("button");ye.type="button",ye.className="bp-mgmt-btn",ye.textContent="✗",ye.title=h("gpui.mgmt.plan.reject","Reject"),ye.addEventListener("click",(te)=>{te.stopPropagation(),n("plan.approve",{layer:"",ids:[T.id],approve:!1})}),H.append(Y,ye)}if(ne.appendChild(H),ue){let Y=document.createElement("div");Y.className="bp-mgmt-row-sub bp-plan-detail bp-dim",Y.textContent=ue,ne.appendChild(Y)}if(T.state==="routing"&&typeof T.total==="number"&&T.total>0){let Y=document.createElement("div");Y.className="bp-plan-microbar";let ye=document.createElement("div");ye.className="bp-plan-microbar-fill";let te=Math.max(0,Math.min(100,Math.round((T.routed??0)/T.total*100)));ye.style.width=`${te}%`,Y.appendChild(ye),ne.appendChild(Y)}if(T.problem_text){let Y=document.createElement("div");Y.className="bp-plan-problem",Y.textContent=T.problem_text,ne.appendChild(Y)}ne.addEventListener("click",()=>{this.planSelectedId=T.id,n("plan.focus",{id:T.id}),this.render()}),ie.appendChild(ne)}}if(this.planViewMode!=="list"){if(!this.planCanvas)this.planCanvas=new yn({onSelect:(T)=>{if(this.planSelectedId=T,!T)this.planNoteOpen=!1;this.render()},onFocusItem:(T)=>{n("plan.focus",{id:T})},onDragEnd:()=>{if(this.planRenderDeferred)this.planRenderDeferred=!1,this.render()},onCommitFields:(T,q)=>{(this.planCommitFields??le)(T,q)},onApproveLayer:(T,q)=>{n("plan.approve",{layer:T,ids:[],approve:q})},onQuickApprove:(T,q)=>{n("plan.approve",{layer:"",ids:T,approve:q})}});let E=this.panelEl.parentElement?.classList.contains("bp-has-viewer")===!1,k=this.planExpanded||this.panelEl.clientWidth>=540||E;this.planCanvas.update({gridMode:this.planGridMode,syncZoom:this.planSyncZoom,shownLayers:I,selectedId:this.planSelectedId,board:me,bands:Ee,regions:Ae,layers:be,copperLayers:t.copper_layers},k);let j=document.createElement("div");j.className="bp-plan-canvas-scroll",j.appendChild(this.planCanvas.root),e.appendChild(j)}if(this.planViewMode!=="canvas")e.appendChild(ie);if((t.draw?.bands?.length??0)>0||(t.draw?.regions?.length??0)>0){let E=document.createElement("div");E.className="bp-plan-footer",E.textContent=h("gpui.mgmt.plan.drawn","The plan's corridors and planes are drawn on the board while this panel is open. Close it to hide them."),e.appendChild(E)}return e}renderFab(){let e=document.createElement("div");e.className="bp-mgmt-body";let t=this.getPanelData("fab");if(!t)return e.appendChild(this.makeEmpty("Reading the fab's profile…")),e;if(t.error){let w=document.createElement("div");return w.className="bp-mgmt-note bp-tone-warn",w.textContent=t.error,e.appendChild(w),e}let n=(w,x={})=>{let A=this.watchGen,N=this.project;this.fabStatus="",this.cb.hub.rpc("fab.profile",{pro:N,action:w,...x}).catch((S)=>{if(A!==this.watchGen||N!==this.project)return;this.fabStatus=S instanceof Error?S.message:"Fab action failed",this.render()})},i=document.createElement("div");i.className="bp-mgmt-head";let s=document.createElement("span");s.className="bp-mgmt-strong",s.textContent=h("gpui.mgmt.fab.thefab","The fab");let a=document.createElement("span");a.className="bp-dim bp-mgmt-flex1",a.textContent=`rev ${t.rev??0}${t.updated?` · ${t.updated}`:""}${t.board?` · ${t.board}`:""} · ${xi(t.tier??"")}`;let r=document.createElement("button");if(r.type="button",r.className="bp-mgmt-btn",r.textContent=h("gpui.mgmt.fab.refresh","Refresh"),r.addEventListener("click",()=>n("refresh")),i.append(s,a,r),e.appendChild(i),this.fabStatus){let w=document.createElement("div");w.className="bp-mgmt-note bp-tone-bad",w.textContent=this.fabStatus,e.appendChild(w)}let o=document.createElement("div");o.className="bp-mgmt-rows",o.setAttribute("data-testid","mgmt-fab-rows");let l=t.review,p=document.createElement("div");p.className="bp-mgmt-row";let c=document.createElement("div");c.className="bp-mgmt-row-line";let u=document.createElement("span"),d=(l?.counts?.error??0)>0;if(u.className="bp-mgmt-flex1 "+(d?"bp-tone-bad":"bp-dim"),u.textContent=l?.running?"Reviewing the design…":l?.at==null?"No design review yet":`${l.counts?.error??0} must-fix · ${l.counts?.warning??0} should-fix · ${l.counts?.info??0} notes${l.scope?` (${l.scope})`:""}`,c.appendChild(u),l?.at!=null){let w=document.createElement("button");w.type="button",w.className="bp-mgmt-btn",w.textContent=h("gpui.mgmt.fab.findings","Findings"),w.addEventListener("click",()=>this.togglePanel("checks")),c.appendChild(w)}if(!l?.running){let w=document.createElement("button");w.type="button",w.className="bp-mgmt-btn",w.textContent=h("gpui.mgmt.fab.reviewbtn","Review"),w.addEventListener("click",()=>n("review")),c.appendChild(w)}if(l?.judge){let w=document.createElement("button");w.type="button",w.className="bp-mgmt-btn",w.textContent=h("gpui.mgmt.fab.judge","Datasheets"),w.addEventListener("click",()=>{if(l.judge)this.cb.onSendText(l.judge)}),c.appendChild(w)}p.appendChild(c),o.appendChild(p);let m=Ci(t.drc?.state??""),f=document.createElement("div");f.className="bp-mgmt-row";let b=document.createElement("div");b.className="bp-mgmt-row-line";let g=document.createElement("span");if(g.className="bp-mgmt-flex1 "+(m.button?"bp-tone-warn":"bp-dim"),g.textContent=m.text,b.appendChild(g),m.button){let w=document.createElement("button");w.type="button",w.className="bp-mgmt-btn",w.textContent=m.button,w.addEventListener("click",()=>n("drc")),b.appendChild(w)}f.appendChild(b),o.appendChild(f);for(let w of t.conflicts??[]){let x=document.createElement("div");x.className="bp-mgmt-row bp-tone-bad",x.textContent=w,o.appendChild(x)}for(let w of t.suggestions??[]){let x=document.createElement("div");x.className="bp-mgmt-row";let A=document.createElement("div");A.className="bp-mgmt-row-line";let N=document.createElement("span");N.className="bp-mgmt-flex1 bp-tone-warn",N.textContent=`${w.label||w.key}: board ${w.project??"?"} mm, fab ${w.fab??"?"} mm`;let S=document.createElement("button");S.type="button",S.className="bp-mgmt-btn",S.textContent=h("gpui.mgmt.fab.apply","Apply"),S.addEventListener("click",()=>n("apply",{key:w.key})),A.append(N,S),x.appendChild(A),o.appendChild(x)}if(t.stackup?.chosen){let w=document.createElement("div");w.className="bp-mgmt-row";let x=document.createElement("div");x.className="bp-mgmt-row-line";let A=t.stackup.by==="proposed",N=document.createElement("span");if(N.className="bp-mgmt-flex1 "+(A?"bp-tone-warn":"bp-dim"),N.textContent=`${A?"Proposed: ":""}${t.stackup.chosen}${t.stackup.outer_50_mm?` (50Ω ${t.stackup.outer_50_mm} mm)`:""}`,x.appendChild(N),A){let S=t.stackup.chosen,M=document.createElement("button");M.type="button",M.className="bp-mgmt-btn",M.textContent=h("gpui.mgmt.fab.use","Use"),M.addEventListener("click",()=>n("stackup",{id:S})),x.appendChild(M)}w.appendChild(x),o.appendChild(w)}if(Array.isArray(t.changed)&&t.changed.length>0){let w=document.createElement("div");w.className="bp-mgmt-row";let x=document.createElement("div");x.className="bp-mgmt-row-line";let A=document.createElement("span");A.className="bp-mgmt-flex1 bp-tone-warn",A.textContent=h("gpui.mgmt.fab.changed","Changed since you last looked");let N=document.createElement("button");N.type="button",N.className="bp-mgmt-btn",N.textContent=h("gpui.mgmt.fab.seen","Seen"),N.addEventListener("click",()=>n("seen")),x.append(A,N),w.appendChild(x);for(let S of t.changed.slice(0,12)){let M=document.createElement("div");M.className="bp-mgmt-faint",M.textContent=S,w.appendChild(M)}o.appendChild(w)}let y=Array.isArray(t.limits)?t.limits:[];if(y.length>0){let w=document.createElement("div");w.className="bp-mgmt-group-head";let x=document.createElement("span");x.className="bp-mgmt-flex1",x.textContent=h("gpui.mgmt.fab.limit","Limit");let A=document.createElement("span");A.className="bp-mgmt-col",A.textContent=h("gpui.mgmt.fab.free","Base price");let N=document.createElement("span");N.className="bp-mgmt-col",N.textContent=h("gpui.mgmt.fab.extra","Costs more");let S=document.createElement("span");S.className="bp-mgmt-col bp-mgmt-col-read",S.textContent=h("gpui.mgmt.fab.readcol","Read"),w.append(x,A,N,S),o.appendChild(w);for(let B of y){let R=document.createElement("div");R.className="bp-mgmt-row";let U=document.createElement("div");U.className="bp-mgmt-row-line";let D=document.createElement("span");D.className="bp-mgmt-flex1"+(B.changed?" bp-tone-warn":B.inherited?" bp-dim":""),D.textContent=`${B.changed?"• ":""}${B.label??""}`;let re=document.createElement("span");re.className="bp-mgmt-col",re.textContent=B.free?.text||"—";let me=document.createElement("span");me.className="bp-mgmt-col bp-dim",me.textContent=B.extra?.text||"—";let oe=B.free&&typeof B.free==="object"?B.free:B.extra,Ee=oe?.fetched??"",Ae=Boolean(Ee)&&oe?.confidence!=="published",Me=Ee?Ae?`${Ee}*`:Ee:"—",he=oe?.source??"",be;if(he.startsWith("https://")&&Ee){let I=document.createElement("a");I.className="bp-mgmt-col bp-mgmt-col-read bp-mgmt-read-link",I.href=he,I.target="_blank",I.rel="noopener noreferrer",I.textContent=Me,be=I}else{let I=document.createElement("span");I.className="bp-mgmt-col bp-mgmt-col-read bp-mgmt-faint",I.textContent=Me,be=I}U.append(D,re,me,be),R.appendChild(U),o.appendChild(R)}let M=document.createElement("div");M.className="bp-mgmt-note bp-mgmt-faint",M.textContent=h("gpui.mgmt.fab.derived","* worked out from the fab's page. Dimmed: the rigid board's value. A date opens the source page."),o.appendChild(M)}return e.appendChild(o),e}makeEmpty(e){let t=document.createElement("div");return t.className="bp-mgmt-note bp-mgmt-faint",t.textContent=e,t}}var da={trs:(e)=>e,t:(e,t)=>t},pa=new Set(["/settle"]);function $i(e,t){let n=t.trim().toLowerCase();if(!n)return 1;let i=e.toLowerCase();if(i.startsWith(n))return 3;if(i.split(/[^a-z0-9]+/i).some((r)=>r.startsWith(n)))return 2;let a=0;for(let r=0;r0||e.status==="waiting")return{urgency:3,want:"waiting"};if(e.status==="asking")return{urgency:2,want:"question"};if(e.status==="failed"||e.state==="failed")return{urgency:1,want:"failed"};return{urgency:0,want:""}}function Oi(e){let t=e.status||e.state;if(t==="active"||t==="working")return"bp-dot-work";if(t==="finished")return"bp-dot-done";if(t==="waiting"||t==="asking"||t==="blocked"||t==="failed"||(e.waiting??0)>0)return"bp-dot-need";return"bp-dot-idle"}function Vi(e,t){let n=t.trim().split(/\s+/)[0]?.toLowerCase()??"";if(!n)return null;let i=e.toLowerCase();if(i.length!==e.length)return null;let s=i.indexOf(n);if(s<0)return null;return[s,s+n.length]}function Ui(e,t=da){let{t:n,trs:i}=t,s=[],a=new Map;for(let o of e.projects)a.set(o.id,o.title||o.id);let r=e.threads.find((o)=>o.id===e.selectedThreadId)??null;for(let o of e.railItems){if(o.state==="disabled"||o.id==="commands")continue;if(!r&&o.id!=="terminal")continue;s.push({label:i(o.label),place:o.id==="terminal"?"":"viewer",kind:"action",shortcut:o.key?o.key.toUpperCase():void 0,action:{type:"rail",id:o.id}})}if(r)s.push({label:r.pinned?n("menu.unpin","Unpin"):n("menu.pin","Pin"),place:"",kind:"action",action:{type:"thread-act",action:r.pinned?"unpin":"pin"}}),s.push({label:r.settled?n("phone.unsettle","Unsettle"):n("menu.settle","Settle"),place:"",kind:"action",action:{type:"thread-act",action:r.settled?"unsettle":"settle"}}),s.push({label:r.archived?n("palette.unarchive","Unarchive"):n("palette.archive","Archive"),place:"",kind:"action",action:{type:"thread-act",action:r.archived?"unarchive":"archive"}}),s.push({label:n("sheet.rename","Rename thread"),place:"",kind:"action",action:{type:"rename"}}),s.push({label:n("gpui.previous.thread","Previous thread"),place:"",kind:"action",action:{type:"prev-thread"}}),s.push({label:n("gpui.next.thread","Next thread"),place:"",kind:"action",action:{type:"next-thread"}});if(r)for(let o of e.commands){if(!o.word)continue;let l=pa.has(o.word.toLowerCase());s.push({label:o.label?`${o.word} — ${o.label}`:o.word,place:o.desc||"command",kind:"command",action:{type:"command",word:o.word,runDirectly:l}})}s.push({label:n("gpui.improvements","Improvements"),place:"",kind:"action",action:{type:"improvements"}}),s.push({label:n("palette.settings","Settings"),place:"",kind:"action",action:{type:"settings"}}),s.push({label:n("gpui.fold.or.unfold.the.sidebar","Fold or unfold the sidebar"),place:"",kind:"action",action:{type:"sidebar"}});for(let o of e.projects)s.push({label:`New thread in ${o.title||o.id}`,place:"",kind:"action",action:{type:"new-thread",projectId:o.id}});for(let o of e.threads){let{urgency:l,want:p}=Gi(o);s.push({label:o.title||"Untitled thread",place:o.project?a.get(o.project)??"":"",kind:"thread",urgency:l,want:p,dotClass:Oi(o),action:{type:"thread",id:o.id}})}for(let o of e.bots){if(!o.name||!o.thread)continue;s.push({label:o.name,place:"",kind:"bot",action:{type:"thread",id:o.thread}})}return s}function Wi(e,t,n,i=[],s=10,a=14){let r=t.trim(),o=r.length===0,l=e.slice();if(n?.threads&&n.threads.length>0){let d=new Map;for(let f of i)d.set(f.id,f.title||f.id);let m=new Set;for(let f of l)if(f.action.type==="thread")m.add(f.action.id);for(let f of n.threads){if(!f.id||m.has(f.id))continue;m.add(f.id);let{urgency:b,want:g}=Gi(f);l.push({label:f.title||"Untitled thread",place:f.project?d.get(f.project)??"":"",kind:"thread",urgency:b,want:g,dotClass:Oi(f),action:{type:"thread",id:f.id}})}}let p=[];for(let d=0;d0)p.push({score:g,index:d,item:m})}p.sort((d,m)=>{if(o){let g=(m.item.urgency??0)-(d.item.urgency??0);if(g!==0)return g}if(m.score!==d.score)return m.score-d.score;let f=d.item.kind==="thread"?0:1,b=m.item.kind==="thread"?0:1;if(f!==b)return f-b;return d.index-m.index});let c=new Set,u=[];for(let d of p){let m=`${d.item.label}\x00${d.item.place}\x00${d.item.kind}`;if(c.has(m))continue;if(c.add(m),u.push(d.item),u.length>=s)break}if(n?.messages&&n.messages.length>0&&u.length{if(r.target===t)this.close()}),s.addEventListener("input",()=>{this.query=s.value,this.activeIdx=0,this.renderList(),this.scheduleSearch()}),s.addEventListener("keydown",(r)=>{if(r.key==="Escape")r.preventDefault(),r.stopPropagation(),this.close();else if(r.key==="ArrowDown"){if(r.preventDefault(),this.listed.length>0)this.activeIdx=(this.activeIdx+1)%this.listed.length,this.renderList(!0)}else if(r.key==="ArrowUp"){if(r.preventDefault(),this.listed.length>0)this.activeIdx=(this.activeIdx-1+this.listed.length)%this.listed.length,this.renderList(!0)}else if(r.key==="Enter")r.preventDefault(),this.runAt(this.activeIdx)}),this.backdrop=t,this.inputEl=s,this.listEl=a,this.root.appendChild(t),this.renderList(),this.query.trim().length>=2)this.scheduleSearch();s.focus()}close(){if(this.searchTimer!==null)window.clearTimeout(this.searchTimer),this.searchTimer=null;if(this.searchGen++,this.backdrop)this.backdrop.remove(),this.backdrop=null,this.inputEl=null,this.listEl=null;this.prevFocus?.focus(),this.prevFocus=null}scheduleSearch(){if(this.searchTimer!==null)window.clearTimeout(this.searchTimer),this.searchTimer=null;let e=this.query.trim();if(e.length<2){this.searchHits=null,this.searchHitsQuery="";return}if(e===this.searchHitsQuery)return;let t=++this.searchGen;this.searchTimer=window.setTimeout(()=>{this.searchTimer=null,this.cb.onSearch(e).then((n)=>{if(t!==this.searchGen||!this.backdrop)return;if(this.query.trim()!==e)return;this.searchHits=n,this.searchHitsQuery=e,this.renderList()}).catch(()=>{})},180)}runAt(e){let t=this.listed[e];if(!t)return;this.close(),this.cb.onExecute(t.action)}renderList(e=!1){if(!this.listEl)return;let t=this.cb.getState(),n=Ui(t,{t:h,trs:pe}),i=this.query.trim()===this.searchHitsQuery?this.searchHits:null;if(this.listed=Wi(n,this.query,i,t.projects),this.activeIdx>=this.listed.length)this.activeIdx=Math.max(0,this.listed.length-1);if(this.listed.length===0){let r=document.createElement("div");r.className="bp-palette-empty",r.textContent=h("gpui.nothing.matches","Nothing matches"),this.listEl.replaceChildren(r);return}let s=document.createDocumentFragment(),a=null;for(let r=0;r0)p.appendChild(document.createTextNode(o.label.slice(0,d)));let f=document.createElement("strong");if(f.className="bp-palette-mark",f.textContent=o.label.slice(d,m),p.appendChild(f),m{if(this.activeIdx!==r)this.activeIdx=r,this.updateActiveClass()}),l.addEventListener("click",()=>this.runAt(r)),r===this.activeIdx)a=l;s.appendChild(l)}if(this.listEl.replaceChildren(s),e&&a)a.scrollIntoView({block:"nearest"})}updateActiveClass(){if(!this.listEl)return;let e=this.listEl.children;for(let t=0;tthis.onPress(e.id));return a}render(){let e=this.items.filter((r)=>r.group!=="tools"),t=this.items.filter((r)=>r.group==="tools"),n=document.createElement("div");n.className="bp-rail-pages";let i;for(let r of e){if(i!==void 0&&r.group!==i){let o=document.createElement("div");o.className="bp-rail-rule",n.appendChild(o)}i=r.group,n.appendChild(this.renderButton(r))}let s=()=>{let r=n.scrollLeft>2,o=n.scrollLeft+n.clientWidth0){let r=document.createElement("div");r.className="bp-rail-tools";for(let o of t)r.appendChild(this.renderButton(o));a.appendChild(r)}this.el.replaceChildren(a)}}var ha=new Set(["resume","raise","retry","move","signin"]);function Ki(e){if(!e||typeof e!=="object")return null;let t=e,n=(a)=>typeof a==="string"?a:"",i=(Array.isArray(t.actions)?t.actions:[]).filter((a)=>Boolean(a)&&typeof a==="object").map((a)=>({label:n(a.label),act:n(a.act),room:n(a.room),thread:n(a.thread)})),s={line:n(t.line),why:n(t.why),actions:i};return s.line||i.length?s:null}function Yt(e,t){if(e.act==="board")return t&&e.room?{kind:"board",room:e.room}:null;if(e.act==="open")return e.thread?{kind:"thread",id:e.thread}:null;if(ha.has(e.act)){let n={room:e.room,action:e.act};if(e.thread)n.thread=e.thread;return{kind:"call",method:"swarm.act",params:n}}return null}function Ji(e){let t=e&&typeof e==="object"?e.open:void 0;if(typeof t!=="string")return null;let n=t.indexOf(":"),i=n<0?"":t.slice(n+1);if(!i)return null;if(t.startsWith("account:"))return{kind:"account",id:i};if(t.startsWith("thread:"))return{kind:"thread",id:i};return null}var Sn=[{id:"general",label:"General"},{id:"ai",label:"Agents and tools"},{id:"connect",label:"Connect"}],ht=[{id:"appearance",group:"general",title:"Appearance",subtitle:"Kept in this browser only. Never sent to the hub.",icon:"sun",keywords:["theme","dark","light","auto","color","language","locale","english","espanol","japanese"]},{id:"providers",group:"ai",title:"AI providers",subtitle:"Account sign-ins live in the desktop or mobile app.",icon:"cpu",keywords:["accounts","claude","codex","antigravity","grok","openai","anthropic","signin","login","model"]},{id:"devices",group:"connect",title:"Devices & browser",subtitle:"This browser session and paired devices on this hub.",icon:"link",keywords:["sign out","logout","session","cookie","revoke","paired","phone","browser","pair"]},{id:"home",group:"connect",title:"Home machine",subtitle:"Which machine hosts your always-on hub and bots.",icon:"globe",keywords:["host","boat","move","online","away","queued","linked"]}];function Yi(e){if(e==="dark"||e==="light"||e==="auto")return e;return"auto"}function Xi(e){if(e==="en"||e==="es"||e==="ja"||e==="auto")return e;return"auto"}function Pt(e,t){if(e==="dark"||e==="light")return e;return t==="light"?"light":"dark"}function Zi(e){return e.trim().toLowerCase().split(/\s+/).filter(Boolean)}function kn(e,t){if(t.length===0)return!0;let n=e.toLowerCase();return t.every((i)=>n.includes(i))}function Qi(e,t){let n=Zi(t);if(n.length===0)return[];return e.filter((i)=>{let s=[i.groupLabel,i.pageTitle,i.rowTitle,i.rowDetail,...i.keywords??[]].join(" ");return kn(s,n)})}function An(e,t,n){let i=Zi(n);if(i.length===0)return e.map((r)=>({page:r,hits:[]}));let s=new Map(Sn.map((r)=>[r.id,r.label])),a=[];for(let r of e){let l=t.filter((c)=>c.pageId===r.id).filter((c)=>kn([c.rowTitle,c.rowDetail,c.pageTitle,c.groupLabel,...c.keywords??[]].join(" "),i));if(kn([s.get(r.group)??"",r.title,r.subtitle,...r.keywords].join(" "),i)||l.length>0){let c=[];for(let u of l){if(!c.includes(u.rowTitle))c.push(u.rowTitle);if(c.length>=2)break}a.push({page:r,hits:c})}}return a}function ba(e){let n=document.createElementNS("http://www.w3.org/2000/svg","svg");n.setAttribute("viewBox","0 0 24 24"),n.setAttribute("width","15"),n.setAttribute("height","15"),n.setAttribute("fill","none"),n.setAttribute("stroke","currentColor"),n.setAttribute("stroke-width","1.75"),n.setAttribute("stroke-linecap","square"),n.setAttribute("stroke-linejoin","miter"),n.setAttribute("aria-hidden","true");let i=(s,a)=>{let r=document.createElementNS("http://www.w3.org/2000/svg",s);for(let[o,l]of Object.entries(a))r.setAttribute(o,l);n.appendChild(r)};switch(e){case"sun":i("circle",{cx:"12",cy:"12",r:"4"}),i("path",{d:"M12 2v2m0 16v2M4.93 4.93l1.41 1.41m11.32 11.32 1.41 1.41M2 12h2m16 0h2M4.93 19.07l1.41-1.41m11.32-11.32 1.41-1.41"});break;case"cpu":i("rect",{x:"5",y:"5",width:"14",height:"14"}),i("rect",{x:"9",y:"9",width:"6",height:"6"}),i("path",{d:"M9 2v3m6-3v3M9 19v3m6-3v3M2 9h3m-3 6h3M19 9h3m-3 6h3"});break;case"link":i("path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"}),i("path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"});break;case"globe":i("circle",{cx:"12",cy:"12",r:"10"}),i("path",{d:"M2 12h20M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"});break}return n}function ga(){let t=document.createElementNS("http://www.w3.org/2000/svg","svg");t.setAttribute("viewBox","0 0 24 24"),t.setAttribute("width","13"),t.setAttribute("height","13"),t.setAttribute("fill","none"),t.setAttribute("stroke","currentColor"),t.setAttribute("stroke-width","1.75"),t.setAttribute("aria-hidden","true");let n=document.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx","11"),n.setAttribute("cy","11"),n.setAttribute("r","7");let i=document.createElementNS("http://www.w3.org/2000/svg","path");return i.setAttribute("d","m20 20-3.5-3.5"),t.append(n,i),t}function Xt(e,t){switch(e){case"general":return h("gpui.settings.group.general",t);case"ai":return h("gpui.settings.group.agents",t);case"connect":return h("native.pair.connect",t)}}function rt(e,t){switch(e){case"appearance":return h("settings.appearance",t);case"providers":return h("web.settings.providers",t);case"devices":return t;case"home":return h("home.machine",t)}}class Ln{backdrop;titleEl;badgeEl;closeBtn;navListEl;searchInput;searchClearBtn;paneEl;cb;openState=!1;activePage="appearance";forceProviders=!1;query="";searchBrowseAll=!1;devicesLoaded=!1;devicesLoading=!1;devicesRows=[];devicesError="";loadGen=0;constructor(e,t){this.cb=t,this.backdrop=document.createElement("div"),this.backdrop.className="bp-modal-backdrop bp-hidden",this.backdrop.setAttribute("data-testid","settings-modal");let n=document.createElement("div");n.className="bp-modal bp-settings-modal",n.setAttribute("role","dialog"),n.setAttribute("aria-modal","true"),n.setAttribute("aria-labelledby","bp-settings-title");let i=document.createElement("div");i.className="bp-modal-head";let s=document.createElement("div");s.className="bp-settings-head-title",this.titleEl=document.createElement("h2"),this.titleEl.id="bp-settings-title",this.titleEl.textContent=h("palette.settings","Settings"),this.badgeEl=document.createElement("span"),this.badgeEl.className="bp-settings-badge",this.badgeEl.textContent="Browser",s.append(this.titleEl,this.badgeEl),this.closeBtn=document.createElement("button"),this.closeBtn.type="button",this.closeBtn.className="icon",this.closeBtn.textContent="×",this.closeBtn.setAttribute("aria-label",h("common.close","Close")),this.closeBtn.addEventListener("click",()=>this.close()),i.append(s,this.closeBtn);let a=document.createElement("div");a.className="bp-settings-body";let r=document.createElement("aside");r.className="bp-settings-nav";let o=document.createElement("div");o.className="bp-settings-search";let l=document.createElement("span");l.className="bp-settings-search-icon",l.appendChild(ga()),this.searchInput=document.createElement("input"),this.searchInput.type="text",this.searchInput.className="bp-settings-search-input",this.searchInput.placeholder="Search settings…",this.searchInput.setAttribute("aria-label","Search settings"),this.searchInput.setAttribute("data-testid","settings-search"),this.searchClearBtn=document.createElement("button"),this.searchClearBtn.type="button",this.searchClearBtn.className="bp-settings-search-clear bp-hidden",this.searchClearBtn.textContent="×",this.searchClearBtn.title="Clear search",this.searchClearBtn.setAttribute("aria-label","Clear search"),o.append(l,this.searchInput,this.searchClearBtn),this.navListEl=document.createElement("nav"),this.navListEl.className="bp-settings-nav-list",this.navListEl.setAttribute("aria-label","Settings sections"),r.append(o,this.navListEl),this.paneEl=document.createElement("div"),this.paneEl.className="bp-settings-pane",a.append(r,this.paneEl),n.append(i,a),this.backdrop.appendChild(n),this.backdrop.addEventListener("click",(p)=>{if(p.target===this.backdrop)this.close()}),this.searchInput.addEventListener("input",()=>{this.query=this.searchInput.value,this.searchBrowseAll=this.query.trim().length>0,this.syncSearchClear(),this.render()}),this.searchInput.addEventListener("keydown",(p)=>{if(p.key==="Enter"){let c=An(ht,this.buildSearchItems(),this.query);if(c.length>0)p.preventDefault(),this.activePage=c[0].page.id,this.searchBrowseAll=!1,this.render()}else if(p.key==="Escape"&&this.query.trim().length>0)p.preventDefault(),p.stopPropagation(),this.clearSearch()}),this.searchClearBtn.addEventListener("click",()=>{this.clearSearch(),this.searchInput.focus()}),e.appendChild(this.backdrop)}isOpen(){return this.openState}handleEscape(){if(!this.openState)return;if(this.query.trim().length>0)this.clearSearch(),this.searchInput.focus();else this.close()}async open(e){if(this.openState=!0,e)this.activePage=e;this.backdrop.classList.remove("bp-hidden"),this.render(),this.loadDevices(),window.setTimeout(()=>{if(this.openState)this.searchInput.focus()},0)}async openToAccounts(){this.forceProviders=!0,this.query="",this.searchInput.value="",this.searchBrowseAll=!1,this.syncSearchClear(),await this.open("providers")}close(){this.openState=!1,this.forceProviders=!1,this.query="",this.searchInput.value="",this.searchBrowseAll=!1,this.syncSearchClear(),this.backdrop.classList.add("bp-hidden")}refreshLocale(){if(this.titleEl.textContent=h("palette.settings","Settings"),this.closeBtn.setAttribute("aria-label",h("common.close","Close")),this.openState)this.render()}async refresh(){if(!this.openState)return;this.render(),await this.loadDevices()}clearSearch(){this.query="",this.searchInput.value="",this.searchBrowseAll=!1,this.syncSearchClear(),this.render()}syncSearchClear(){this.searchClearBtn.classList.toggle("bp-hidden",this.query.length===0)}async loadDevices(){let e=++this.loadGen;if(this.devicesLoading=!this.devicesLoaded,this.devicesLoading&&this.openState)this.renderPane();try{let t=await this.cb.onLoadDevices();if(e!==this.loadGen)return;this.devicesRows=t,this.devicesError="",this.devicesLoaded=!0}catch(t){if(e!==this.loadGen)return;let n=t instanceof Error&&t.message?t.message:"Not available from a browser";this.devicesError=`${n} — manage paired devices in Backplane › Settings › Devices on desktop or a paired phone.`,this.devicesRows=[],this.devicesLoaded=!0}finally{if(e===this.loadGen){if(this.devicesLoading=!1,this.openState)this.render()}}}buildSearchItems(){let e=this.cb.onGetHome?.()??null,t=this.cb.onGetNoProvider?.()??null,n=Xt("general","General"),i=Xt("ai","Agents and tools"),s=Xt("connect","Connect"),a=rt("appearance","Appearance"),r=rt("providers","AI providers"),o=rt("devices","Devices & browser"),l=rt("home","Home machine"),p=[{pageId:"appearance",pageTitle:a,groupLabel:n,rowTitle:h("settings.theme","Theme"),rowDetail:"Auto (follow hub), Dark, or Light in this browser.",keywords:["theme","dark","light","auto","appearance","colors"]},{pageId:"appearance",pageTitle:a,groupLabel:n,rowTitle:h("settings.lang","Language"),rowDetail:"Interface language for this browser.",keywords:["locale","english","espanol","japanese","language"]},{pageId:"providers",pageTitle:r,groupLabel:i,rowTitle:t?pe(t.head):"Provider connections",rowDetail:"Connect Claude, Codex, Antigravity, or other AI providers in Settings → Accounts.",keywords:["accounts","claude","codex","antigravity","grok","openai","signin"]},{pageId:"devices",pageTitle:o,groupLabel:s,rowTitle:"This browser",rowDetail:"Sign out and revoke this browser's session cookie.",keywords:["logout","sign out","session","cookie"]},{pageId:"devices",pageTitle:o,groupLabel:s,rowTitle:"Paired devices",rowDetail:this.devicesRows.map((c)=>`${c.title||c.head||""} ${c.detail||c.text||""}`).join(" ")||"Paired phones and browsers on this hub.",keywords:["phone","pair","revoke","browser"]},{pageId:"home",pageTitle:l,groupLabel:s,rowTitle:e?.name?`${e.name}`:l,rowDetail:"Which machine hosts your always-on hub and bots.",keywords:["boat","move","online","away","queued","machine"]}];for(let c of this.devicesRows){let u=c.title||c.head||"";if(u)p.push({pageId:"devices",pageTitle:o,groupLabel:s,rowTitle:u,rowDetail:c.detail||c.text||"",keywords:["paired","device"]})}return p}render(){this.renderNav(),this.renderPane()}renderNav(){let e=document.createDocumentFragment(),t=An(ht,this.buildSearchItems(),this.query),n=this.cb.onGetNoProvider?.()??null,i=this.cb.onGetHome?.()??null;if(t.length===0){let a=document.createElement("div");a.className="bp-settings-nav-empty",a.setAttribute("data-testid","settings-nav-empty"),a.textContent="No matching settings",e.appendChild(a),this.navListEl.replaceChildren(e);return}let s="";for(let a of t){let r=a.page;if(r.group!==s){s=r.group;let d=Sn.find((m)=>m.id===r.group);if(d){let m=document.createElement("div");m.className="bp-settings-group",m.textContent=Xt(d.id,d.label),e.appendChild(m)}}let o=document.createElement("button");o.type="button";let l=!this.searchBrowseAll&&r.id===this.activePage;o.className="bp-settings-nav-item"+(l?" active":""),o.setAttribute("data-testid",`settings-nav-${r.id}`);let p=document.createElement("div");p.className="bp-settings-nav-row";let c=document.createElement("span");c.className="bp-settings-nav-icon",c.appendChild(ba(r.icon));let u=document.createElement("span");if(u.className="bp-settings-nav-label",u.textContent=rt(r.id,r.title),p.append(c,u),r.id==="providers"&&(n||this.forceProviders)){let d=document.createElement("span");d.className="bp-settings-nav-dot warn",d.title="Action needed",p.appendChild(d)}else if(r.id==="home"&&i){let d=document.createElement("span");d.className="bp-settings-nav-dot "+(i.moving?.state==="failed"?"bad":i.online?"ok":"warn"),p.appendChild(d)}if(o.appendChild(p),a.hits.length>0)for(let d of a.hits){let m=document.createElement("div");m.className="bp-settings-hit",m.textContent=d,o.appendChild(m)}o.addEventListener("click",()=>{this.activePage=r.id,this.searchBrowseAll=!1,this.render()}),e.appendChild(o)}this.navListEl.replaceChildren(e)}renderPane(){let e=document.createDocumentFragment(),t=this.query.trim();if(t&&this.searchBrowseAll){this.renderSearchResults(e,t),this.paneEl.replaceChildren(e);return}let n=ht.find((r)=>r.id===this.activePage)??ht[0],i=document.createElement("div");i.className="bp-settings-pane-head";let s=document.createElement("h3");s.textContent=rt(n.id,n.title);let a=document.createElement("div");switch(a.className="bp-settings-pane-sub",a.textContent=n.subtitle,i.append(s,a),e.appendChild(i),n.id){case"appearance":this.renderAppearancePage(e);break;case"providers":this.renderProvidersPage(e);break;case"devices":this.renderDevicesPage(e);break;case"home":this.renderHomePage(e);break}this.paneEl.replaceChildren(e)}renderSearchResults(e,t){let n=Qi(this.buildSearchItems(),t),i=document.createElement("div");i.className="bp-settings-pane-head";let s=document.createElement("h3");s.textContent="Search results";let a=document.createElement("div");if(a.className="bp-settings-pane-sub",a.textContent=n.length===0?`No settings match "${t}".`:`${n.length} matching ${n.length===1?"setting":"settings"} for "${t}"`,i.append(s,a),e.appendChild(i),n.length===0){let o=document.createElement("div");o.className="bp-settings-empty",o.textContent="Try searching for theme, language, providers, sign out, devices, or home.",e.appendChild(o);return}let r=Array.from(new Set(n.map((o)=>o.pageId)));for(let o of r){let l=ht.find((m)=>m.id===o);if(!l)continue;let p=document.createElement("div");p.className="bp-settings-search-sec";let c=document.createElement("div");c.className="bp-settings-subhead",c.textContent=rt(l.id,l.title);let u=document.createElement("button");u.type="button",u.className="bp-settings-search-open",u.textContent="Open page ›",u.addEventListener("click",()=>{this.activePage=o,this.searchBrowseAll=!1,this.render()}),p.append(c,u),e.appendChild(p);let d=new Set(n.filter((m)=>m.pageId===o).map((m)=>m.rowTitle));if(o==="appearance")this.renderAppearancePage(e,d);else if(o==="providers")this.renderProvidersPage(e);else if(o==="devices")this.renderDevicesPage(e,d);else if(o==="home")this.renderHomePage(e)}}renderAppearancePage(e,t){let n=this.cb.onGetThemePref?.()??"auto",i=this.cb.onGetHubTheme?.()??"dark",s=Pt(n,i),a=this.cb.onGetLocalePref?.()??"auto",r=h("settings.theme","Theme"),o=h("settings.lang","Language");if(!t||t.has(r)){let l=h("settings.theme.dark","Dark"),p=h("settings.theme.light","Light"),c=n==="auto"?`Following hub theme (${i==="light"?p:l}). Stored in this browser only.`:`Using ${s==="light"?p:l} in this browser. Select Auto to follow the hub.`;e.appendChild(this.makeSegmentedRow(r,c,[{value:"auto",label:"Auto"},{value:"dark",label:l},{value:"light",label:p}],n,"settings-theme",(u)=>{this.cb.onSetThemePref?.(u),this.render()}))}if(!t||t.has(o))e.appendChild(this.makeSegmentedRow(o,"Interface language for this browser. Automatic follows the hub or browser language.",[{value:"auto",label:h("settings.lang.auto","Automatic")},{value:"en",label:h("settings.lang.en","English")},{value:"es",label:h("settings.lang.es","Español")},{value:"ja",label:h("settings.lang.ja","日本語")}],a,"settings-locale",(l)=>{this.cb.onSetLocalePref?.(l),this.render()}))}makeSegmentedRow(e,t,n,i,s,a){let r=document.createElement("div");r.className="bp-settings-row";let o=document.createElement("div");o.className="bp-settings-row-info";let l=document.createElement("div");l.className="bp-settings-row-title",l.textContent=e;let p=document.createElement("div");p.className="bp-settings-row-detail",p.textContent=t,o.append(l,p);let c=document.createElement("div");c.className="bp-chip-group",c.setAttribute("role","group"),c.setAttribute("aria-label",e);for(let u of n){let d=document.createElement("button");d.type="button";let m=u.value===i;d.className="bp-chip"+(m?" active":""),d.textContent=u.label,d.setAttribute("aria-pressed",m?"true":"false"),d.setAttribute("data-testid",`${s}-${u.value}`),d.addEventListener("click",()=>a(u.value)),c.appendChild(d)}return r.append(o,c),r}renderProvidersPage(e){let t=this.cb.onGetNoProvider?.()??null,n=document.createElement("section");if(n.className="bp-settings-section",n.setAttribute("data-testid","settings-providers"),t||this.forceProviders){let i=document.createElement("div");i.className="bp-settings-notice warn";let s=document.createElement("div");s.className="bp-settings-row-info";let a=document.createElement("div");a.className="bp-settings-row-title",a.textContent=t?pe(t.head):h("provider.notice.head","No AI provider connected");let r=document.createElement("div");r.className="bp-settings-row-detail",r.textContent=h("web.settings.providers.browser","Connect a provider in the Backplane desktop or mobile app under Settings → Accounts."),s.append(a,r);let o=document.createElement("div");o.className="bp-set-btns";let l=document.createElement("a");l.className="bp-link-btn primary",l.href=t?.url||"backplane://settings/accounts",l.setAttribute("data-testid","settings-open-accounts"),l.textContent=t?pe(t.button):h("provider.notice.button","Open Settings → Accounts"),o.appendChild(l),i.append(s,o),n.appendChild(i)}else{let i=document.createElement("div");i.className="bp-settings-row";let s=document.createElement("div");s.className="bp-settings-row-info";let a=document.createElement("div");a.className="bp-settings-row-title-wrap";let r=document.createElement("span");r.className="bp-settings-row-title",r.textContent="Provider connections";let o=document.createElement("span");o.className="bp-status-pill ok",o.textContent=h("gpui.acct.connected","Connected"),a.append(r,o);let l=document.createElement("div");l.className="bp-settings-row-detail",l.textContent="Provider sign-ins, fallback order, API keys, and usage limits are managed in the Backplane desktop or mobile app.",s.append(a,l);let p=document.createElement("div");p.className="bp-set-btns";let c=document.createElement("a");c.className="bp-link-btn",c.href="backplane://settings/accounts",c.setAttribute("data-testid","settings-open-accounts"),c.textContent=h("provider.notice.button","Open Settings → Accounts"),p.appendChild(c),i.append(s,p),n.appendChild(i)}e.appendChild(n)}renderDevicesPage(e,t){let n=!t||t.has("This browser"),i=!t||t.has("Paired devices")||this.devicesRows.some((r)=>t.has(r.title||r.head||""));if(n){let r=document.createElement("div");r.className="bp-settings-subhead",r.textContent="This browser",e.appendChild(r);let o=document.createElement("div");o.className="bp-settings-row";let l=document.createElement("div");l.className="bp-settings-row-info";let p=document.createElement("div");p.className="bp-settings-row-title",p.textContent="Browser session";let c=document.createElement("div");c.className="bp-settings-row-detail",c.textContent="Sign out and revoke this browser's session cookie.",l.append(p,c);let u=document.createElement("button");u.type="button",u.className="primary stop",u.textContent=h("agy.signout","Sign out"),u.setAttribute("data-testid","logout-btn"),u.addEventListener("click",()=>{u.disabled=!0,this.cb.onLogout().catch(()=>{c.setAttribute("role","alert"),c.className="bp-settings-row-detail bp-bad",c.textContent=h("web.logout.failed","Could not confirm sign-out. Try again."),u.disabled=!1})}),o.append(l,u),e.appendChild(o)}if(!i)return;let s=document.createElement("div");if(s.className="bp-settings-subhead",s.textContent="Paired devices",e.appendChild(s),this.devicesLoading){let r=document.createElement("div");r.className="bp-settings-empty",r.textContent="Loading paired devices…",e.appendChild(r);return}if(this.devicesError){let r=document.createElement("div");r.className="bp-settings-notice bad";let o=document.createElement("div");o.className="bp-settings-row-detail",o.textContent=this.devicesError,r.appendChild(o),e.appendChild(r);return}let a=!t||t.has("Paired devices")?this.devicesRows:this.devicesRows.filter((r)=>t.has(r.title||r.head||""));if(a.length===0){let r=document.createElement("div");r.className="bp-settings-empty",r.textContent="No paired devices listed.",e.appendChild(r)}else for(let r of a){let o=document.createElement("div");o.className="bp-settings-row";let l=document.createElement("div");l.className="bp-settings-row-info";let p=document.createElement("div");p.className="bp-settings-row-title-wrap";let c=document.createElement("span");c.className="bp-settings-row-title",c.textContent=r.title||r.head||"",p.appendChild(c);let u=r.detail||r.text||"";if(u){let d=document.createElement("span"),m=u.toLowerCase();d.className="bp-status-pill "+(m.includes("this browser")?"accent":"neutral"),d.textContent=u,p.appendChild(d)}if(l.appendChild(p),o.appendChild(l),r.buttons?.length){let d=document.createElement("div");d.className="bp-set-btns";for(let m of r.buttons){let f=document.createElement("button");if(f.type="button",m.primary)f.className="primary";if(m.danger)f.className="primary stop";f.textContent=m.label||h("common.remove","Remove"),f.addEventListener("click",()=>{f.disabled=!0,this.cb.onDevicesAct(m.action,m.value).finally(()=>{this.refresh()})}),d.appendChild(f)}o.appendChild(d)}e.appendChild(o)}if(!t){let r=document.createElement("div");r.className="bp-settings-footnote",r.textContent="Pair new browsers or phones, configure Tailscale HTTPS forwarding, or revoke access in desktop or mobile Settings → Devices.",e.appendChild(r)}}renderHomePage(e){let t=this.cb.onGetHome?.()??null,n=document.createElement("section");if(n.className="bp-settings-section",n.setAttribute("data-testid","settings-home"),!t){let d=document.createElement("div");d.className="bp-settings-empty",d.textContent="Single-hub mode — this hub is running locally without linked home machines.",n.appendChild(d),e.appendChild(n);return}let i=document.createElement("div");i.className="bp-settings-row";let s=document.createElement("div");s.className="bp-settings-row-info";let a=document.createElement("div");a.className="bp-settings-row-title-wrap";let r=document.createElement("span");r.className="bp-settings-row-title",r.textContent=t.name||(t.kind==="boat"?"Boat":"This machine"),a.appendChild(r);let o=document.createElement("span");o.className="bp-status-pill neutral",o.textContent=t.kind==="local"?"This machine":t.kind==="boat"?"Boat":"Linked machine",a.appendChild(o);let l=document.createElement("span"),p="Online",c="ok";if(t.moving?.state==="moving")p="Moving",c="accent";else if(t.moving?.state==="failed")p="Move failed",c="bad";else if(!t.online)p="Away",c="warn";l.className=`bp-status-pill ${c}`,l.textContent=p,a.appendChild(l);let u=document.createElement("div");if(u.className="bp-settings-row-detail",t.moving?.state==="moving")u.textContent=t.moving.step?h("home.moving.step","Moving home to {to}: {step}").replace("{to}",t.moving.to).replace("{step}",t.moving.step):h("home.moving","Moving home to {to}…").replace("{to}",t.moving.to);else if(t.moving?.state==="failed")u.textContent=t.moving.note?h("home.move.failed.note","Home move failed: {note}").replace("{note}",t.moving.note):h("home.move.failed","Home move failed");else if(!t.online)u.textContent=t.queuedCount>0?h("home.away.queued","Home ({name}) is away · {n} queued").replace("{name}",t.name||"home").replace("{n}",String(t.queuedCount)):h("home.away","Home ({name}) is away").replace("{name}",t.name||"home");else u.textContent="Your active home hub is online and serving threads and bots.";if(s.append(a,u),i.appendChild(s),t.canMoveHere&&this.cb.onMoveHomeHere){let d=document.createElement("button");d.type="button",d.className="primary",d.textContent=h("home.move.here","Make this machine the home"),d.setAttribute("data-testid","home-move-here-btn"),d.addEventListener("click",()=>{d.disabled=!0,this.cb.onMoveHomeHere?.().finally(()=>{this.refresh()})}),i.appendChild(d)}n.appendChild(i),e.appendChild(n)}}function xe(e,t,n){let i=document.createElement(e);if(t)i.className=t;if(n)i.textContent=n;return i}function Nt(e,t,n=!1){let i=xe("button",n?"primary":"bp-btn-ghost",e);return i.type="button",i.addEventListener("click",t),i}function Pn(e){return xe("pre","bp-context-code",e)}function fa(e){return xe("span",`bp-context-badge ${e==="Native"||e==="Enabled"?"active":e==="Untrusted"||e==="Invalid"?"warn":""}`,pe(e))}function Zt(e,t){let n=xe("div","bp-context-row");return n.append(xe("strong",void 0,e),fa(t)),n}class Nn{fetchContext;dialog=xe("dialog","bp-context");title=xe("h2");cwd=xe("div","bp-context-path");tabs=xe("div","bp-context-tabs");body=xe("div","bp-context-body");notice=xe("p","bp-context-notice");current;thread="";requestId=0;tab=0;busy=!1;constructor(e,t){this.fetchContext=t;let n=xe("div","bp-context-head"),i=xe("div");i.append(this.title,this.cwd),this.title.id="bp-context-title",this.dialog.setAttribute("aria-labelledby",this.title.id),this.notice.setAttribute("role","status"),n.append(i,Nt(h("common.refresh","Refresh"),()=>{this.load()}),Nt(h("common.close","Close"),()=>this.dialog.close())),this.dialog.append(n,this.tabs,this.notice,this.body),this.dialog.addEventListener("close",()=>{this.requestId++}),e.append(this.dialog)}open(e){if(this.thread=e,this.tab=0,this.current=void 0,this.busy=!1,this.title.textContent=h("thread.context.title","Context & Prompt"),this.cwd.textContent="",!this.dialog.open)this.dialog.showModal();this.render(),this.load()}async load(e){if(this.busy)return;let t=++this.requestId;this.busy=!0,this.notice.textContent=h("thread.context.reading","Reading thread context…"),this.render();try{let n=await this.fetchContext(this.thread,e);if(t!==this.requestId)return;this.current=n,this.cwd.textContent=n.cwd,this.notice.textContent=""}catch(n){if(t===this.requestId)this.notice.textContent=String(n)}finally{if(t===this.requestId)this.busy=!1,this.render()}}render(){let e=[h("thread.context.instructions","Instructions"),h("thread.context.system","System Prompt"),h("thread.context.skills","Skills"),h("thread.context.mcp","Project MCPs")];this.tabs.replaceChildren(...e.map((n,i)=>{let s=Nt(n,()=>{this.tab=i,this.render(),this.body.scrollTop=0,this.tabs.children[i].focus()});return s.setAttribute("aria-pressed",String(i===this.tab)),s})),this.body.replaceChildren();let t=this.current;if(!t)return;switch(this.tab){case 0:this.instructions(t.instructions);break;case 1:this.prompt(t);break;case 2:this.skills(t.skills);break;case 3:this.mcps(t.mcp);break}}instructions(e){if(!e.length)this.body.append(xe("p","bp-dim",h("thread.context.none.instructions","No project instructions found.")));for(let t of e){let n=xe("details","bp-context-card"),i=xe("summary");if(i.append(Zt(t.path,t.status),xe("small","bp-dim",h("thread.context.size","{bytes} B · ≈{tokens} tokens",{bytes:t.bytes,tokens:t.estimated_tokens}))),n.append(i,Pn(t.preview)),t.note)n.append(xe("small","bp-dim",t.note));this.body.append(n)}}prompt(e){let t=xe("div","bp-context-row"),n=Nt(h("thread.context.copy","Copy prompt"),()=>{navigator.clipboard.writeText(e.prompt).then(()=>{this.notice.textContent=h("thread.context.copied","Prompt copied.")}).catch((i)=>{this.notice.textContent=String(i)})});t.append(xe("p","bp-dim",h("thread.context.native.note","Backplane’s launch prompt. Native files are loaded by the provider.")),n),this.body.append(t);for(let[i,s]of[[h("thread.context.base","Backplane"),e.sections.base],[h("thread.context.injected.label","Injected project instructions"),e.sections.instructions],[h("thread.context.index","Available skills index"),e.sections.skills]])if(s)this.body.append(xe("h3",void 0,i),Pn(s))}skills(e){for(let t of["Project","User","Bundled"]){let n=e.filter((i)=>i.scope===t);if(!n.length)continue;this.body.append(xe("h3",void 0,pe(t)));for(let i of n){let s=xe("article","bp-context-card");s.append(Zt(i.name,i.status),xe("p",void 0,i.description),xe("small","bp-context-path",[i.source,i.provider,i.model].filter(Boolean).join(" · ")),xe("small","bp-context-path",i.path)),this.body.append(s)}}}mcps(e){if(!e.length)this.body.append(xe("p","bp-dim",h("thread.context.none.mcp","No project MCP configurations found.")));for(let t of e){let n=xe("article","bp-context-card");n.append(Zt(t.path,t.state));for(let s of t.servers){let a=s.url||[s.command,...s.args].map((r)=>JSON.stringify(r)).join(" ");if(n.append(Zt(s.name,s.status),Pn(a)),s.cwd)n.append(xe("small","bp-context-path",s.cwd))}if(t.error)n.append(xe("p","bp-warn",t.error));let i=t.state==="Untrusted"?"trust":t.state==="Enabled"?"disable":t.state==="Disabled"?"enable":"";if(i){let s=i==="trust"?h("thread.context.trust","Trust and enable"):i==="disable"?h("thread.context.disable","Disable"):h("thread.context.enable","Enable"),a=Nt(s,()=>{this.load({action:i,path:t.path,sha256:t.sha256})},i==="trust");a.disabled=this.busy;let r=xe("div","bp-context-actions");r.append(a),n.append(r)}this.body.append(n)}}}function va(e){if(e.wake)return{icon:"◷",label:"Snoozed",tone:"dim"};let t=(e.label??"").trim(),n=(e.tone??"").trim();if(t){let s=t.toLowerCase();return{icon:s==="approve"||s==="sign in"?"!":s==="input"?"?":s==="failed"||s==="stopped"?"×":s==="working"||s==="running"?"▸":s==="waiting"?"◌":s==="done"?"✓":"•",label:t,tone:n==="bad"?s==="failed"||s==="stopped"?"bad-out":"bad":n==="run"?"run":n==="wait"?"wait":n==="ok"?"ok":"dim"}}let i=e.word||"";if(i==="needs"){if(e.want==="approval")return{icon:"!",label:"Approve",tone:"bad"};if(e.want==="sign-in")return{icon:"!",label:"Sign in",tone:"bad"};return{icon:"?",label:"Input",tone:"bad"}}if(i==="failed"||e.status==="failed"||e.state==="fail")return{icon:"×",label:"Failed",tone:"bad-out"};if(i==="cut"||i==="interrupted")return{icon:"×",label:"Stopped",tone:"bad-out"};if(i==="running"||e.status==="active"||e.status==="working"||e.state==="run")return{icon:"▸",label:"Working",tone:"run"};if(i==="monitoring"||i==="limit"||e.status==="waiting")return{icon:"◌",label:"Waiting",tone:"wait"};if(i==="done"||e.status==="finished")return{icon:"✓",label:"Done",tone:"ok"};return null}var es="http://www.w3.org/2000/svg";function ot(e,t=14,n=""){let i=document.createElementNS(es,"svg");if(i.setAttribute("viewBox","0 0 24 24"),i.setAttribute("width",String(t)),i.setAttribute("height",String(t)),i.setAttribute("fill","none"),i.setAttribute("stroke","currentColor"),i.setAttribute("stroke-width","1.75"),i.setAttribute("stroke-linecap","square"),i.setAttribute("stroke-linejoin","miter"),i.setAttribute("aria-hidden","true"),n)i.classList.add(...n.split(" "));for(let s of e){let a=document.createElementNS(es,"path");a.setAttribute("d",s),i.appendChild(a)}return i}function ts(){return ot(["M3 6h6l2 2h10v11H3z"],14,"bp-folder-icon")}function ns(e=14,t="bp-folder-icon bp-hw-icon"){return ot(["M3 3h18v18H3z","M9 3v6h6","M9 21v-6","M15 9a2 2 0 1 0 0-4 2 2 0 0 0 0 4z","M9 15a2 2 0 1 0 0-4 2 2 0 0 0 0 4z"],e,t)}function ya(e=13){return ot(["M6 6h12v12H6z","M9 2v4","M15 2v4","M9 18v4","M15 18v4","M2 9h4","M2 15h4","M18 9h4","M18 15h4"],e)}function wa(e=15){return ot(["M4 10V4l4 3h8l4-3v6l-2 9H6z","M9 13h1","M14 13h1","M11 16h2"],e,"bp-cat-glyph")}function Ea(e=11){return ot(["M4 12l5 5 11-11"],e)}function Ca(e=11){return ot(["M12 22a10 10 0 1 0 0-20 10 10 0 0 0 0 20z","M12 6v6l4 2"],e)}function xa(e=11){return ot(["M12 17v5","M8 4h8l-1 5 3 3v2H6v-2l3-3z"],e,"bp-pin-icon")}function is(e){if(!e)return"";let t=e<10000000000?e*1000:e,n=Math.max(0,Math.floor((Date.now()-t)/1000));if(n<60)return"now";if(n<3600)return`${Math.floor(n/60)}m`;if(n<86400)return`${Math.floor(n/3600)}h`;return`${Math.floor(n/86400)}d`}function ka(e){let t=e.replace(/^@/,"").trim();if(!t)return"?";let n=t.split(/[\s_-]+/).filter(Boolean);if(n.length>=2)return(n[0][0]+n[1][0]).toUpperCase();return t.slice(0,2).toUpperCase()}function Mn(e){if(e==="wait"||e==="error")return"bp-mood-wait";if(e==="work"||e==="talk")return"bp-mood-work";return"bp-mood-idle"}function Ze(e){let t=e.lastIndexOf("|");return t>=0?e.slice(t+1):e}class Tn{el;hostLabel;homeBanner;crewEl;filterInput;listEl;connEl;filterText="";allFilter="all";snoozeMenuRowId="";collapsedProjects=new Set;addShown=!1;sections=null;projects=[];threads=[];bots=[];rooms=[];selectedThreadId="";cb;needErr=new Map;needBusy=new Set;constructor(e,t){this.el=e,this.cb=t;let n=document.createElement("div");n.className="bp-side-host";let i=document.createElement("div");i.className="bp-side-host-left",this.hostLabel=document.createElement("span"),this.hostLabel.textContent="This computer";let s=document.createElement("span");s.className="bp-dim",s.textContent="›",i.append(this.hostLabel,s);let a=document.createElement("button");a.type="button",a.className="icon bp-side-collapse",a.textContent="‹",a.title="Collapse sidebar",a.setAttribute("aria-label","Collapse sidebar"),a.setAttribute("data-testid","sidebar-collapse"),a.addEventListener("click",()=>this.cb.onCollapseSidebar?.()),n.append(i,a);let r=document.createElement("div");r.className="bp-side-head",this.filterInput=document.createElement("input"),this.filterInput.type="search",this.filterInput.className="bp-input bp-side-search";let o=h("sidebar.search.projects","Search projects, threads…");this.filterInput.placeholder=o,this.filterInput.setAttribute("aria-label",o),this.filterInput.setAttribute("data-testid","sidebar-filter"),this.filterInput.addEventListener("input",()=>{this.filterText=this.filterInput.value.trim().toLowerCase(),this.render()});let l=document.createElement("button");l.type="button",l.className="icon bp-side-add",l.textContent="+",l.title=h("thread.new","New thread"),l.setAttribute("aria-label",h("thread.new","New thread")),l.setAttribute("data-testid","sidebar-new-thread"),l.addEventListener("click",()=>{let c=this.firstProjectId();if(c)this.cb.onNewThread(c)}),r.append(this.filterInput,l),this.homeBanner=document.createElement("div"),this.homeBanner.className="bp-side-home bp-hidden",this.homeBanner.setAttribute("data-testid","home-away-banner"),this.homeBanner.style.padding="6px 10px",this.homeBanner.style.fontSize="11px",this.homeBanner.style.borderBottom="1px solid var(--line, #2a2a2a)",this.crewEl=document.createElement("div"),this.crewEl.className="bp-crew-band bp-hidden",this.crewEl.setAttribute("data-testid","sidebar-crew"),this.listEl=document.createElement("div"),this.listEl.className="bp-side-list",this.listEl.setAttribute("data-testid","sidebar-list");let p=document.createElement("div");p.className="bp-side-footer",this.connEl=document.createElement("span"),this.connEl.className="bp-conn-status",this.connEl.textContent="Connecting…",this.connEl.setAttribute("data-testid","conn-status"),p.appendChild(this.connEl),this.el.append(n,r,this.homeBanner,this.crewEl,this.listEl,p)}setHome(e){if(!e){this.homeBanner.classList.add("bp-hidden"),this.homeBanner.textContent="";return}let t="",n=!1;if(e.moving?.state==="moving")t=e.moving.step?h("home.moving.step","Moving home to {to}: {step}").replace("{to}",e.moving.to).replace("{step}",e.moving.step):h("home.moving","Moving home to {to}…").replace("{to}",e.moving.to);else if(e.moving?.state==="failed")t=e.moving.note?h("home.move.failed.note","Home move failed: {note}").replace("{note}",e.moving.note):h("home.move.failed","Home move failed"),n=!0;else if(!e.online){let i=e.name||"home",s="";if(e.awaySince&&e.awaySince>0){let a=new Date(e.awaySince);s=`${String(a.getHours()).padStart(2,"0")}:${String(a.getMinutes()).padStart(2,"0")}`}if(s&&e.queuedCount>0)t=h("home.away.since.queued","Home ({name}) is away since {time} · {n} queued").replace("{name}",i).replace("{time}",s).replace("{n}",String(e.queuedCount));else if(s)t=h("home.away.since","Home ({name}) is away since {time}").replace("{name}",i).replace("{time}",s);else if(e.queuedCount>0)t=h("home.away.queued","Home ({name}) is away · {n} queued").replace("{name}",i).replace("{n}",String(e.queuedCount));else t=h("home.away","Home ({name}) is away").replace("{name}",i)}if(!t)this.homeBanner.classList.add("bp-hidden"),this.homeBanner.textContent="";else this.homeBanner.textContent=t,this.homeBanner.className=n?"bp-side-home bp-bad":"bp-side-home bp-dim",this.homeBanner.classList.remove("bp-hidden")}setHostName(e){this.hostLabel.textContent=e||"This computer"}setConnStatus(e,t){this.connEl.textContent=e,this.connEl.className=`bp-conn-status ${t}`.trim()}setData(e,t,n,i){this.projects=e,this.threads=t,this.bots=n,this.rooms=i,this.render()}setSections(e,t,n){this.sections=e,this.bots=t,this.rooms=n,this.render()}setSelected(e){this.selectedThreadId=e,this.render()}focusFilter(){this.filterInput.focus()}firstProjectId(){if(this.sections){for(let e of this.sections)if(e.kind==="projects"&&e.rows.length>0){let t=e.rows[0];if(t.id&&!t.off)return t.id}}return this.projects[0]?.id??""}refreshLocale(){let e=h("sidebar.search.projects","Search projects, threads…");this.filterInput.placeholder=e,this.filterInput.setAttribute("aria-label",e),this.render()}renderCrewBand(e){let t=this.bots.find((l)=>l.uber),n=this.bots.filter((l)=>!l.uber&&(!e||l.name.toLowerCase().includes(e))),i=this.rooms.filter((l)=>!e||l.name.toLowerCase().includes(e)),s=Boolean(t&&(!e||t.name.toLowerCase().includes(e))),a=n.length>0||Boolean(this.cb.onNewBot)&&!e,r=i.length>0||Boolean(this.cb.onNewRoom)&&!e;if(!s&&!a&&!r){this.crewEl.classList.add("bp-hidden"),this.crewEl.replaceChildren();return}let o=document.createDocumentFragment();if(s&&t){let l=document.createElement("button");l.type="button",l.className="bp-crew-uber"+(t.thread===this.selectedThreadId?" active":""),l.setAttribute("data-testid",`crew-uber-${t.id}`);let p=document.createElement("span");if(p.className=`bp-crew-uber-avatar ${Mn(t.mood)}`,t.color)p.style.color=t.color;p.appendChild(wa(14));let c=document.createElement("span");c.className="bp-crew-uber-meta";let u=document.createElement("span");if(u.className="bp-crew-uber-name",u.textContent=t.name,c.appendChild(u),t.note){let d=document.createElement("span");d.className=`bp-crew-uber-note ${Mn(t.mood)}`,d.textContent=t.note,c.appendChild(d)}if(l.append(p,c),t.mood==="wait"||t.mood==="error"){let d=document.createElement("span");d.className="bp-status-pill bp-pill-bad",d.textContent="? Input",l.appendChild(d)}l.addEventListener("click",()=>this.cb.onSelectBot(t)),o.appendChild(l)}if(a){let l=document.createElement("div");l.className="bp-crew-bots",l.setAttribute("data-testid","crew-bots");let p=document.createElement("span");p.className="bp-crew-lbl",p.textContent=h("tour.title.bots","Bots").toUpperCase(),l.appendChild(p);let c=document.createElement("div");c.className="bp-crew-bot-tiles";for(let u of n){let d=document.createElement("button");if(d.type="button",d.className=`bp-crew-bot-tile ${Mn(u.mood)}`+(u.thread===this.selectedThreadId?" active":""),d.title=u.note?`@${u.name} — ${u.note}`:`@${u.name}`,d.setAttribute("aria-label",`@${u.name}`),d.setAttribute("data-testid",`crew-bot-${u.id}`),u.color)d.style.setProperty("--bot-c",u.color);let m=document.createElement("span");if(m.className="bp-crew-bot-init",m.textContent=ka(u.name),d.appendChild(m),u.mood==="wait"||u.mood==="error"){let f=document.createElement("span");f.className="bp-crew-bot-wait",d.appendChild(f)}d.addEventListener("click",()=>this.cb.onSelectBot(u)),c.appendChild(d)}if(this.cb.onNewBot&&!e){let u=document.createElement("button");u.type="button",u.className="bp-crew-bot-tile bp-crew-add",u.textContent="+",u.title=h("bots.new","New bot"),u.setAttribute("aria-label",h("bots.new","New bot")),u.setAttribute("data-testid","crew-new-bot"),u.addEventListener("click",()=>this.cb.onNewBot?.()),c.appendChild(u)}l.appendChild(c),o.appendChild(l)}if(r){let l=document.createElement("div");l.className="bp-crew-rooms",l.setAttribute("data-testid","crew-rooms");for(let p of i){let c=document.createElement("button");c.type="button",c.className="bp-crew-room-chip",c.setAttribute("data-testid",`crew-room-${p.id}`);let u=document.createElement("span");u.className="bp-dim",u.textContent="#";let d=document.createElement("span");if(d.textContent=p.name,c.append(u,d),p.members!==void 0&&p.members>0){let m=document.createElement("span");m.className="bp-crew-room-cnt",m.textContent=String(p.members),c.appendChild(m)}c.title=p.members?`#${p.name} (${p.members})`:`#${p.name}`,c.addEventListener("click",()=>this.cb.onSelectRoom?.(p)),l.appendChild(c)}if(this.cb.onNewRoom&&!e){let p=document.createElement("button");p.type="button",p.className="bp-crew-room-chip bp-crew-add",p.textContent="+",p.title=h("rooms.new","New room"),p.setAttribute("aria-label",h("rooms.new","New room")),p.setAttribute("data-testid","crew-new-room"),p.addEventListener("click",()=>this.cb.onNewRoom?.()),l.appendChild(p)}o.appendChild(l)}this.crewEl.classList.remove("bp-hidden"),this.crewEl.replaceChildren(o)}projectsHead(e){let t=document.createElement("div");if(t.className="bp-side-section-head",!this.cb.onAddProject||this.addShown)return t.textContent=e,t;this.addShown=!0,t.classList.add("bp-side-section-row");let n=document.createElement("span");n.textContent=e;let i=document.createElement("button");i.type="button",i.className="bp-side-sec-plus bp-side-sec-btn",i.textContent="+";let s=h("sidebar.add.project","Add project");return i.title=s,i.setAttribute("aria-label",s),i.setAttribute("data-testid","sidebar-add-project"),i.addEventListener("click",(a)=>{a.stopPropagation(),this.cb.onAddProject?.()}),t.append(n,i),t}renderStatusPill(e,t){let n=document.createElement("span");if(n.className=`bp-status-pill bp-pill-${e.tone}`,n.textContent=`${e.icon} ${e.label}`,t)n.title=t;return n}renderRowActions(e){if(e.off)return null;let t=Array.isArray(e.snooze)&&e.snooze.length>0&&Boolean(this.cb.onSnoozeRow),n=Boolean(e.wake)&&Boolean(this.cb.onSnoozeRow),i=Boolean(e.settle);if(!t&&!n&&!i)return null;let s=document.createElement("span");if(s.className="bp-row-acts",n&&e.wake){let a=document.createElement("button");a.type="button",a.className="bp-row-act-btn bp-wake-btn",a.textContent=h("menu.wake","Wake"),a.title=h("menu.wake","Wake snoozed thread"),a.setAttribute("data-testid",`wake-row-${e.id}`),a.addEventListener("click",(r)=>{r.stopPropagation(),this.cb.onSnoozeRow?.(e.wake)}),s.appendChild(a)}if(t&&e.snooze){let a=document.createElement("button");a.type="button",a.className="bp-row-act-btn bp-snooze-btn",a.title=h("menu.snooze","Snooze thread"),a.setAttribute("aria-label",h("menu.snooze","Snooze thread")),a.setAttribute("data-testid",`snooze-row-${e.id}`),a.appendChild(Ca(11)),a.addEventListener("click",(r)=>{r.stopPropagation(),this.snoozeMenuRowId=this.snoozeMenuRowId===e.id?"":e.id,this.render()}),s.appendChild(a)}if(i&&e.settle){let a=document.createElement("button");a.type="button",a.className="bp-row-act-btn bp-settle-btn",a.title=h("menu.settle","Settle"),a.setAttribute("aria-label",h("menu.settle","Settle")),a.setAttribute("data-testid",`settle-row-${e.id}`),a.appendChild(Ea(11)),a.addEventListener("click",(r)=>{r.stopPropagation(),this.cb.onThreadAct(Ze(e.settle),"settle")}),s.appendChild(a)}return s}renderSectionThreadRow(e,t,n=!1){let i=document.createElement("div");i.className="bp-thread-row"+(n?" bp-inbox-row":"")+(e.id===this.selectedThreadId||Ze(e.id)===this.selectedThreadId?" active":"")+(e.off?" bp-dim":""),i.setAttribute("data-thread-id",e.id),i.setAttribute("data-testid",`thread-row-${e.id}`);let s=va(e),a=this.renderRowActions(e);if(n){let c=document.createElement("div");c.className="bp-inbox-main";let u=document.createElement("div");u.className="bp-inbox-top";let d=document.createElement("div");if(d.className="bp-thread-title",d.textContent=e.title||"Untitled thread",u.appendChild(d),a)u.appendChild(a);let m=document.createElement("div");if(m.className="bp-inbox-meta",s)m.appendChild(this.renderStatusPill(s,e.say));if(e.project){let f=document.createElement("span");f.className="bp-inbox-proj",f.textContent=e.project,m.appendChild(f)}if(e.ago){let f=document.createElement("span");if(f.className="bp-thread-age",f.textContent=e.ago,e.pinned)f.title=h("tools.pinned","Pinned");m.appendChild(f)}c.append(u,m),i.appendChild(c)}else{if(t){let u=document.createElement("span");u.className="bp-tree-branch",u.setAttribute("aria-hidden","true"),i.appendChild(u)}if(s)i.appendChild(this.renderStatusPill(s,e.say));let c=document.createElement("div");if(c.className="bp-thread-title",c.textContent=e.title||"Untitled thread",i.appendChild(c),a)i.appendChild(a);if(e.ago){let u=document.createElement("span");if(u.className="bp-thread-age",u.textContent=e.ago,e.pinned)u.title=h("tools.pinned","Pinned");i.appendChild(u)}}let r=e.nav||e.id;if(!e.off&&r&&!r.startsWith("@room:"))i.addEventListener("click",()=>this.cb.onSelectThread(Ze(r)));let o=this.snoozeMenuRowId===e.id&&Array.isArray(e.snooze)&&e.snooze.length>0,l=e.kind==="swarm"?Ki(e.need):null;if(!l&&!o)return i;let p=document.createElement("div");if(p.className="bp-need-wrap",p.appendChild(i),o&&e.snooze){let c=document.createElement("div");c.className="bp-snooze-bar"+(t?" nested":""),c.setAttribute("data-testid",`snooze-bar-${e.id}`);let u=document.createElement("span");u.className="bp-dim",u.textContent="Snooze:",c.appendChild(u);for(let d of e.snooze){let m=document.createElement("button");m.type="button",m.className="bp-snooze-opt",m.textContent=d.label,m.addEventListener("click",(f)=>{f.stopPropagation(),this.snoozeMenuRowId="",this.cb.onSnoozeRow?.(d.value),this.render()}),c.appendChild(m)}p.appendChild(c)}if(l){let c=document.createElement("div");c.className="bp-need"+(t?" nested":"")+(e.off?" bp-dim":""),c.setAttribute("data-testid",`need-${e.id}`);let u=document.createElement("span");u.className="bp-need-line",u.textContent=l.line,u.title=l.line,c.appendChild(u);for(let m of l.actions){if(!Yt(m,Boolean(this.cb.hasRoomView)))continue;let f=document.createElement("button");f.type="button",f.className="bp-need-btn",f.textContent=m.label,f.setAttribute("data-testid",`need-${m.act}-${e.id}`),f.disabled=Boolean(e.off)||this.needBusy.has(e.id)||!this.cb.onNeedAct,f.addEventListener("click",(b)=>{b.stopPropagation();let g=this.cb.onNeedAct;if(!g)return;this.needErr.delete(e.id),this.needBusy.add(e.id),this.render(),g(m).catch((y)=>{this.needErr.set(e.id,y instanceof Error?y.message:String(y))}).finally(()=>{this.needBusy.delete(e.id),this.render()})}),c.appendChild(f)}p.appendChild(c);let d=this.needErr.get(e.id);if(d){let m=document.createElement("div");m.className="bp-need-err"+(t?" nested":""),m.textContent=d,p.appendChild(m)}}return p}renderHubSections(e,t){let n=this.sections??[],i=new Set;for(let r of n)if(r.kind==="threads")for(let o of r.rows)i.add(o.id),i.add(Ze(o.id));else if(r.kind==="projects")for(let o of r.rows)for(let l of o.threads??[])i.add(l.id),i.add(Ze(l.id));let s=this.selectedThreadId?this.threads.find((r)=>r.id===this.selectedThreadId)??null:null,a=!1;for(let r of n)if(r.kind==="projects"&&(r.rows.length>0||(r.count??0)>0))a=!0;for(let r of n){if(r.kind==="bub")continue;if(r.kind==="threads"){let o=Boolean(r.fold&&r.toggle),l=r.rows.filter((c)=>{if(!t)return!0;return`${c.title} ${c.project??""}`.toLowerCase().includes(t)});if(!o&&l.length===0)continue;if(o&&t&&l.length===0)continue;if(o&&!t&&(r.count??l.length)===0)continue;let p=document.createElement("section");if(p.className=`bp-side-section bp-side-inbox bp-sec-${r.id}`,p.setAttribute("data-section-id",r.id),o){let c=document.createElement("button");c.type="button",c.className="bp-side-section-head bp-side-section-toggle";let u=t?l.length:r.count??l.length,d=r.open||Boolean(t)?"▾":"▸";if(c.textContent=`${d} ${r.title.toUpperCase()} (${u})`,r.hint)c.title=r.hint;c.setAttribute("data-testid",`section-toggle-${r.id}`),c.addEventListener("click",()=>{if(r.toggle)this.cb.onToggleSection?.(r.toggle)}),p.appendChild(c)}else{let c=document.createElement("div");c.className="bp-side-section-head"+(r.id==="needs"?" bp-head-needs":r.id==="running"?" bp-head-running":""),c.textContent=`${r.title.toUpperCase()} ${l.length}`,p.appendChild(c)}if(!o||Boolean(r.open)||Boolean(t))for(let c of l)p.appendChild(this.renderSectionThreadRow(c,!1,!0));e.appendChild(p);continue}if(r.kind==="projects"){let o=r.rows,l=o.filter((d)=>{if(!t)return!0;if((d.title||d.id).toLowerCase().includes(t))return!0;if((d.threads??[]).some((m)=>m.title.toLowerCase().includes(t)))return!0;if((d.swarms??[]).some((m)=>m.title.toLowerCase().includes(t)))return!0;return!1}),p=Boolean(r.fold&&r.toggle);if(t&&l.length===0)continue;if(!p&&r.id!=="active"&&l.length===0)continue;let c=document.createElement("section");if(c.className=`bp-side-section bp-sec-${r.id}`,c.setAttribute("data-section-id",r.id),p){let d=document.createElement("button");d.type="button",d.className="bp-side-section-head bp-side-section-toggle";let m=t?l.length:r.count??l.length,f=r.open||Boolean(t)?"▾":"▸";if(d.textContent=`${f} ${r.title.toUpperCase()} (${m})`,r.hint)d.title=r.hint;d.setAttribute("data-testid",`section-toggle-${r.id}`),d.addEventListener("click",()=>{if(r.toggle)this.cb.onToggleSection?.(r.toggle)}),c.appendChild(d)}else c.appendChild(this.projectsHead(r.title.toUpperCase()));if(!p||Boolean(r.open)||Boolean(t)){if(r.id==="all"&&!t){let d=o.some((f)=>f.hasBoard||f.hasSchematic),m=o.some((f)=>!f.hasBoard&&!f.hasSchematic);if(d&&m){let f=document.createElement("div");f.className="bp-proj-filter",f.setAttribute("data-testid","all-projects-filter");let b=[{id:"all",label:"All"},{id:"hw",label:"Boards"},{id:"sw",label:"Code"}];for(let g of b){let y=document.createElement("button");y.type="button",y.className="bp-proj-filter-btn"+(this.allFilter===g.id?" active":""),y.textContent=g.label,y.addEventListener("click",()=>{this.allFilter=g.id,this.render()}),f.appendChild(y)}if(c.appendChild(f),this.allFilter==="hw")l=l.filter((g)=>g.hasBoard||g.hasSchematic);else if(this.allFilter==="sw")l=l.filter((g)=>!g.hasBoard&&!g.hasSchematic)}}if(r.id==="active"&&!a&&!t){let d=document.createElement("div");d.className="bp-side-empty",d.textContent="No projects yet.",c.appendChild(d)}for(let d of l){let m=document.createElement("div");if(m.className="bp-proj-group"+(d.off||r.id==="quiet"?" bp-dim":""),m.setAttribute("data-project-id",d.id),d.nav||d.key)m.setAttribute("data-project-key",d.nav||d.key||"");let f=document.createElement("div");f.className="bp-proj-head";let b=document.createElement("button");b.type="button",b.className="bp-proj-toggle";let y=Boolean(d.hasBoard||d.hasSchematic)?ns(14):ts();if(d.css)y.style.color=d.css;let w=document.createElement("span");if(w.className="bp-proj-name",w.textContent=d.title||d.id,b.append(y,w),d.fold==="project-fold"&&d.nav)b.addEventListener("click",()=>this.cb.onToggleProjectFold?.(d.nav));let x=document.createElement("div");if(x.className="bp-proj-meta",(d.needsCount??0)>0){let S=document.createElement("span");S.className="bp-proj-badge-need",S.textContent=String(d.needsCount),S.title=`${d.needsCount} needing you`,x.appendChild(S)}if((d.running??0)>0){let S=document.createElement("span");S.className="bp-proj-badge-run",S.textContent=String(d.running),S.title=`${d.running} running`,x.appendChild(S)}if(d.pinned&&r.id!=="pinned")x.appendChild(xa(11));let A=document.createElement("div");if(A.className="bp-proj-acts",!d.off&&this.cb.onQuickOpenViewer){if(d.hasBoard){let S=document.createElement("button");S.type="button",S.className="bp-proj-quick",S.title=h("viewer.board","Open Board"),S.setAttribute("aria-label",`Open Board (${d.title})`),S.setAttribute("data-testid",`quick-board-${d.id}`),S.appendChild(ns(13,"")),S.addEventListener("click",(M)=>{M.stopPropagation(),this.cb.onQuickOpenViewer?.(Ze(d.id),"board")}),A.appendChild(S)}if(d.hasSchematic){let S=document.createElement("button");S.type="button",S.className="bp-proj-quick",S.title=h("viewer.schematic","Open Schematic"),S.setAttribute("aria-label",`Open Schematic (${d.title})`),S.setAttribute("data-testid",`quick-sch-${d.id}`),S.appendChild(ya(13)),S.addEventListener("click",(M)=>{M.stopPropagation(),this.cb.onQuickOpenViewer?.(Ze(d.id),"schematic")}),A.appendChild(S)}}let N=document.createElement("button");if(N.type="button",N.className="icon bp-proj-add",N.title=h("thread.new","New thread"),N.textContent="+",N.setAttribute("data-testid",`new-thread-${d.id}`),d.off)N.disabled=!0;if(N.addEventListener("click",(S)=>{S.stopPropagation(),this.cb.onNewThread(Ze(d.id))}),A.appendChild(N),f.append(b,x,A),m.appendChild(f),!d.folded||Boolean(t)){let S=Boolean(t)&&(d.title||d.id).toLowerCase().includes(t);for(let M of d.swarms??[]){if(t&&!S&&!M.title.toLowerCase().includes(t))continue;m.appendChild(this.renderSectionThreadRow(M,!0))}for(let M of d.threads??[]){if(t&&!S&&!M.title.toLowerCase().includes(t))continue;m.appendChild(this.renderSectionThreadRow(M,!0))}if(s&&s.project===Ze(d.id)&&!i.has(s.id)&&(!t||S||s.title.toLowerCase().includes(t)))m.appendChild(this.renderSectionThreadRow({id:s.id,title:s.title,status:s.status,state:s.state,ago:is(s.updatedAt),pinned:s.pinned,nav:s.id},!0))}c.appendChild(m)}}e.appendChild(c)}}}render(){this.addShown=!1;let e=this.filterText;this.renderCrewBand(e);let t=document.createDocumentFragment();if(this.sections!==null)this.renderHubSections(t,e);else{let n=new Map;for(let i of this.threads){if(i.archived||i.swarm)continue;if(e){if(!`${i.title} ${i.preview??""}`.toLowerCase().includes(e))continue}let s=n.get(i.project)??[];s.push(i),n.set(i.project,s)}if(t.appendChild(this.projectsHead("RECENT")),this.projects.length===0&&this.threads.length===0){let i=document.createElement("div");i.className="bp-side-empty",i.textContent="No projects yet.",t.appendChild(i)}for(let i of this.projects){let s=n.get(i.id)??[];if(e&&s.length===0&&!i.title.toLowerCase().includes(e))continue;let a=document.createElement("section");a.className="bp-proj-group",a.setAttribute("data-project-id",i.id);let r=document.createElement("div");r.className="bp-proj-head";let o=document.createElement("button");o.type="button",o.className="bp-proj-toggle";let l=this.collapsedProjects.has(i.id)&&!e,p=ts();if(i.css)p.style.color=i.css;let c=document.createElement("span");c.className="bp-proj-name",c.textContent=i.title||i.id,o.append(p,c),o.addEventListener("click",()=>{if(this.collapsedProjects.has(i.id))this.collapsedProjects.delete(i.id);else this.collapsedProjects.add(i.id);this.render()});let u=document.createElement("button");if(u.type="button",u.className="icon bp-proj-add",u.title=h("thread.new","New thread"),u.textContent="+",u.setAttribute("data-testid",`new-thread-${i.id}`),u.addEventListener("click",(d)=>{d.stopPropagation(),this.cb.onNewThread(i.id)}),r.append(o,u),a.appendChild(r),!l)for(let d of s)a.appendChild(this.renderSectionThreadRow({id:d.id,title:d.title,status:d.status,state:d.state,ago:is(d.updatedAt),pinned:d.pinned,nav:d.id},!0));t.appendChild(a)}}this.listEl.replaceChildren(t)}}function Sa(e){try{return new URL(e,window.location.origin).searchParams.get("s")||""}catch{return""}}function Mt(e){if(!e)return;for(let t of e.getTracks())try{t.stop()}catch{}}function Aa(e,t){if(t===16000){let a=new Int16Array(e.length);for(let r=0;r0?l/p:0));s[a]=c<0?c*32768:c*32767}return s}class Bn{hub;cb;active=!1;starting=!1;sessionGen=0;activeGen=0;abortedGen=0;threadId="";sessionKey="";stream=null;audioCtx=null;processor=null;pendingPcm=[];postChain=Promise.resolve();stopDrain=Promise.resolve();mark=0;constructor(e,t){this.hub=e,this.cb=t}isRecording(){return this.active||this.starting}async toggle(){if(this.active||this.starting)await this.stop();else await this.start()}async start(){if(this.active||this.starting)return;let e=this.cb.getThreadId();if(!e)return;if(!navigator.mediaDevices?.getUserMedia){this.cb.showError("Microphone access is not available in this browser.");return}let t=++this.sessionGen;this.starting=!0,this.threadId=e,this.sessionKey="",this.pendingPcm=[],this.mark=this.cb.getCaret(),this.cb.setRecording(!0);let n;try{n=await navigator.mediaDevices.getUserMedia({audio:!0})}catch{if(t===this.sessionGen)this.starting=!1,this.cb.setRecording(!1),this.cb.showError("Microphone permission denied.");return}if(t!==this.sessionGen||this.cb.getThreadId()!==e){Mt(n);return}if(this.stream=n,await this.stopDrain,t!==this.sessionGen||this.cb.getThreadId()!==e){if(Mt(n),this.stream===n)this.stream=null;return}try{let i=await this.hub.rpc("voice.start",{thread:e,draft:this.cb.getDraft(),caret:this.mark});if(t!==this.sessionGen||this.cb.getThreadId()!==e){if(Mt(n),this.stream===n)this.stream=null;if(!this.active&&!this.starting)this.hub.rpc("voice.stop",{thread:e}).catch(()=>{});return}let s=i.session||(i.path?Sa(i.path):"");if(!s)throw Error("Hub did not return a voice session.");this.sessionKey=s,this.activeGen=t,this.starting=!1,this.active=!0,this.startCapture(n,t)}catch(i){if(t===this.sessionGen)this.cleanupAudio(),this.starting=!1,this.active=!1,this.cb.setRecording(!1),this.cb.showError(i instanceof Error?i.message:"Could not start voice dictation.");else if(Mt(n),this.stream===n)this.stream=null}}async stop(){if(!this.active&&!this.starting)return;let e=this.activeGen,t=this.active,n=this.threadId,i=this.sessionKey;this.sessionGen++,this.starting=!1,this.active=!1,this.sessionKey="",this.cb.setRecording(!1),this.cb.setLevel(0),this.cleanupAudio();let a=this.stopDrain.then(async()=>{if(t&&i){let r=new Int16Array(this.pendingPcm);this.pendingPcm=[],this.enqueuePost(i,new Uint8Array(r.buffer),!0,e),await this.postChain}else this.pendingPcm=[];if(t&&n)await this.hub.rpc("voice.stop",{thread:n}).catch(()=>{})});this.stopDrain=a,await a}cancel(){if(!this.active&&!this.starting)return;let e=this.active,t=this.threadId;if(this.abortedGen=Math.max(this.abortedGen,this.sessionGen),this.sessionGen++,this.starting=!1,this.active=!1,this.sessionKey="",this.pendingPcm=[],this.cb.setRecording(!1),this.cb.setLevel(0),this.cleanupAudio(),e&&t&&this.hub.getState()==="connected")this.hub.rpc("voice.stop",{thread:t}).catch(()=>{})}handleFrame(e){let t=String(e.ev??""),n=String(e.thread??"");if(n&&this.cb.getThreadId()&&n!==this.cb.getThreadId())return;if(t==="draft"&&typeof e.text==="string")this.cb.setDraft(e.text),this.mark=e.text.length;else if(t==="edit"){let i=this.cb.getDraft(),s=Number(e.del??0),a=String(e.ins??""),r=Math.max(0,Math.min(i.length,this.mark)),o=Math.max(0,r-s),l=i.slice(0,o)+a+i.slice(r);this.mark=o+a.length,this.cb.setDraft(l)}else if(t==="level")this.cb.setLevel(Math.max(0,Math.min(100,Number(e.v??0))));else if(t==="view"){let i=e.view;if(i&&i.on===!1&&(this.active||this.starting))this.stop()}}startCapture(e,t){let i=new(window.AudioContext||window.webkitAudioContext),s=i.createMediaStreamSource(e),a=i.createScriptProcessor(4096,1,1);a.onaudioprocess=(r)=>{if(!this.active||t!==this.sessionGen||!this.sessionKey)return;let o=Aa(r.inputBuffer.getChannelData(0),i.sampleRate);for(let l=0;l=3200){let l=new Int16Array(this.pendingPcm.splice(0,3200));this.enqueuePost(this.sessionKey,new Uint8Array(l.buffer),!1,t)}},s.connect(a),a.connect(i.destination),this.audioCtx=i,this.processor=a}enqueuePost(e,t,n,i){this.postChain=this.postChain.then(async()=>{if(i<=this.abortedGen)return;try{let s={"Content-Type":"application/octet-stream","X-Voice-Session":e};if(n)s["X-Voice-End"]="1";let a=await fetch("/voice/in",{method:"POST",credentials:"same-origin",headers:s,body:t});if(!a.ok&&!n&&i===this.sessionGen&&this.active)this.failUpload(`Voice upload failed (${a.status}).`)}catch{if(!n&&i===this.sessionGen&&this.active)this.failUpload("Voice upload failed.")}})}failUpload(e){this.abortedGen=Math.max(this.abortedGen,this.sessionGen),this.sessionGen++,this.active=!1,this.starting=!1,this.sessionKey="",this.pendingPcm=[],this.cleanupAudio(),this.cb.setRecording(!1),this.cb.setLevel(0),this.cb.showError(e)}cleanupAudio(){if(this.processor)this.processor.disconnect(),this.processor.onaudioprocess=null,this.processor=null;if(this.audioCtx)this.audioCtx.close().catch(()=>{}),this.audioCtx=null;Mt(this.stream),this.stream=null}}var ss=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258],as=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],rs=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],os=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],La=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function Tt(e,t){let n=new Int32Array(16),i=0;for(let o=0;o0){if(n[l]++,l>i)i=l}}let s=new Int32Array(16),a=0;for(let o=1;o<=15;o++)s[o]=a,a+=n[o];let r=new Int32Array(a);for(let o=0;o0)r[s[l]++]=o}return{counts:n,symbols:r,maxBits:i}}var Pa=(()=>{let e=new Uint8Array(288);return e.fill(8,0,144),e.fill(9,144,256),e.fill(7,256,280),e.fill(8,280,288),Tt(e,288)})(),Na=(()=>{let e=new Uint8Array(32);return e.fill(5),Tt(e,32)})();class In{win=new Uint8Array(32768);winPos=0;feed(e,t=16777216){let n=0,i=0,s=0,a=(u)=>{while(s=e.length)throw Error("truncated deflate frame");i|=e[n++]<>>=u,s-=u,d},r=(u)=>{let d=0,m=0,f=0;for(let b=1;b<=u.maxBits;b++){d|=a(1);let g=u.counts[b];if(d-g{let d=l+u;if(d>t)throw Error("inflated frame exceeds limit");if(d<=o.length)return;let m=o.length;while(m{p(1),o[l++]=u,this.win[this.winPos]=u,this.winPos=this.winPos+1&32767};while(n0){if(n>=e.length&&s<3)break;let u=a(1),d=a(2);if(d===0){if(i=0,s=0,n+4>e.length)throw Error("truncated stored block");let m=e[n]|e[n+1]<<8,f=e[n+2]|e[n+3]<<8;if(n+=4,(m^65535)!==f)throw Error("invalid stored block length");if(n+m>e.length)throw Error("truncated stored payload");p(m);for(let b=0;b=e.length)break}else if(d===1||d===2){let m=Pa,f=Na;if(d===2){let b=a(5)+257,g=a(5)+1,y=a(4)+4,w=new Uint8Array(19);for(let M=0;MA)throw Error("code length overflow");for(let U=0;UA)throw Error("code length overflow");S+=B}else if(M===18){let B=a(7)+11;if(S+B>A)throw Error("code length overflow");S+=B}else throw Error("invalid code length symbol")}m=Tt(N,b),f=Tt(N.subarray(b),g)}while(!0){let b=r(m);if(b<256)c(b);else if(b===256)break;else{let g=b-257;if(g>=ss.length)throw Error("invalid length symbol");let y=ss[g]+(as[g]?a(as[g]):0),w=r(f);if(w>=rs.length)throw Error("invalid distance symbol");let x=rs[w]+(os[w]?a(os[w]):0);p(y);let A=this.winPos-x&32767;for(let N=0;N{this.stateListeners.delete(e)}}onFrame(e){return this.frameListeners.add(e),()=>{this.frameListeners.delete(e)}}onBinary(e){return this.binaryListeners.add(e),()=>{this.binaryListeners.delete(e)}}rpc(e,t={},n=20000){return new Promise((i,s)=>{if(!this.ws||this.ws.readyState!==WebSocket.OPEN){s(Error("Not connected to hub"));return}let a=this.nextId++,r=window.setTimeout(()=>{this.pending.delete(a),s(Error(`RPC timeout: ${e}`))},n);this.pending.set(a,{resolve:i,reject:s,timer:r}),this.ws.send(JSON.stringify({id:a,m:e,p:t}))})}setState(e){this.state=e;for(let t of this.stateListeners)t(e,this.hello)}rejectAllPending(e){for(let[,t]of this.pending)window.clearTimeout(t.timer),t.reject(Error(e));this.pending.clear()}openSocket(){if(this.closed)return;this.inflater=null;let t=`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/ws?data=1&enc=json&z=deflate`,n=new WebSocket(t);n.binaryType="arraybuffer",this.ws=n;let i=(s)=>{let a;try{a=JSON.parse(s)}catch{return}if(a.t==="hub.restarting")this.restarting={reason:String(a.reason??""),build:String(a.build??""),text:String(a.text??""),at:Date.now()};if(a.t==="hello")this.restarting=null,this.hello=a,this.features=new Set(this.hello.features??[]),this.inflater=this.hello.z==="deflate"?new In:null,this.reconnectDelay=500,this.setState("connected");else if(a.t==="reply"&&typeof a.id==="number"){let r=this.pending.get(a.id);if(r)if(this.pending.delete(a.id),window.clearTimeout(r.timer),a.ok)r.resolve(a.result??{});else{let o=a.error,l=typeof o==="string"?o:o&&typeof o==="object"&&("message"in o)?String(o.message):"Request failed",p=typeof a.errorCode==="string"?a.errorCode:void 0,c=typeof a.machine==="string"?a.machine:void 0,u=typeof a.thread==="string"?a.thread:void 0;r.reject(new Bt(l,{code:p,machine:c,thread:u}))}return}for(let r of this.frameListeners)r(a)};n.addEventListener("message",(s)=>{if(s.data instanceof ArrayBuffer){if(this.inflater){let a;try{a=this.inflater.feed(new Uint8Array(s.data))}catch{n.close();return}if(a.length>0&&a[0]===123)i(this.textDecoder.decode(a));else{let r=a.buffer.slice(a.byteOffset,a.byteOffset+a.byteLength);for(let o of this.binaryListeners)o(r)}return}for(let a of this.binaryListeners)a(s.data);return}if(typeof s.data!=="string")return;i(s.data)}),n.addEventListener("close",(s)=>{if(this.ws===n)this.ws=null;if(this.rejectAllPending("Connection closed"),this.closed)return;if(s.code===4001||s.code===4401||s.code===1008){this.handleRevoked();return}this.probeSessionOrReconnect()}),n.addEventListener("error",()=>{})}async probeSessionOrReconnect(){try{let t=await fetch("/",{method:"GET",credentials:"same-origin",cache:"no-store"});if(t.status===401||t.status===403){this.handleRevoked();return}if(t.ok){if((await t.text()).includes('id="pair-root"')){this.handleRevoked();return}}}catch{}this.setState("reconnecting");let e=this.reconnectDelay;this.reconnectDelay=Math.min(8000,Math.round(this.reconnectDelay*1.6)),this.reconnectTimer=window.setTimeout(()=>{this.reconnectTimer=null,this.openSocket()},e)}handleRevoked(){this.closed=!0,this.setState("revoked"),window.location.replace("/")}}var Ma=new TextDecoder;function ls(e){return e.length>7&&e[0]>=160&&e[0]<=183&&e[1]===1&&e[2]===100&&e[3]===112&&e[4]===108&&e[5]===111&&e[6]===116}function cs(e){let t=0,n=0;function i(r){if(r<=23)return r;if(r===24){if(t>=e.length)return null;return e[t++]}if(r===25){if(t+2>e.length)return null;let o=e[t]<<8|e[t+1];return t+=2,o}if(r===26){if(t+4>e.length)return null;let o=(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0;return t+=4,o}return null}function s(r){if(n++,r>32||n>400000||t>=e.length)return null;let o=e[t++],l=o>>5,p=i(o&31);if(p===null)return null;switch(l){case 0:return p;case 1:return-1-p;case 2:{if(t+p>e.length)return null;let c=e.subarray(t,t+p);return t+=p,c}case 3:{if(t+p>e.length)return null;let c=Ma.decode(e.subarray(t,t+p));return t+=p,c}case 4:{if(p>e.length)return null;let c=Array(p);for(let u=0;u=this.b.length)return this.ok=!1,0;let n=this.b[this.i++],i=7*t;if(i>=28&&(n&240)!==0)return this.ok=!1,0;if(e=(e|(n&127)<>>0,n<128)return e}return this.ok=!1,0}nextI32(){let e=this.nextU32();return e>>>1^-(e&1)}}function ps(e){let t=0xcbf29ce484222325n,n=0x100000001b3n,i=0xffffffffffffffffn;for(let s=0;stypeof e[b]==="number"?e[b]:g,n=t("l",0),i=t("c",0),s=t("a",255)/255,a=t("m",1),r=t("w",0),o=r/2,l=a===0&&r!==0,p=e.d instanceof Uint8Array?e.d:new Uint8Array(0),c=new ds(p),u=[],d=[],m=0,f=0;while(c.more()){let b=c.nextU32(),g=u.length,y=1/0,w=1/0,x=-1/0,A=-1/0;if(a===2)m=m+c.nextI32()|0,f=f+c.nextI32()|0,u.push(m,f),y=x=m,w=A=f;else{let S=Math.min(c.nextU32(),1048576);for(let M=0;Mx)x=m;if(fA)A=f}}let N=(u.length-g)/2;if(N>0){let S=a===2||N===1?2:a===0?0:1,M=a===0?0:o;d.push({info:b,x0:y-M,y0:w-M,x1:x+M,y1:A+M,at:g,n:N,kind:S})}}return{layer:n,color:i,alpha:s,mode:a,r:o,own:l,pts:new Float32Array(u),pieces:d}}function us(e,t,n){let i=(r)=>Array.isArray(r)&&r.length>=4?[Number(r[0])||0,Number(r[1])||0,Number(r[2])||0,Number(r[3])||0]:[0,0,0,0],s=Array.isArray(e.cs)?e.cs:[],a=[];for(let r=0;r=0&&o0){n.delete(o.h),n.set(o.h,l);while(n.size>1024){let p=n.keys().next().value;if(p!==void 0)n.delete(p);else break}}}}return{key:typeof e.key==="string"?e.key:"",fam:typeof e.fam==="string"?e.fam:"",base:typeof e.base==="string"?e.base:"",box:i(e.box),edge:i(e.edge),thick:typeof e.thick==="number"?e.thick:1600,note:typeof e.note==="string"?e.note:"",warn:typeof e.warn==="number"?e.warn!==0:!1,chunks:a}}function ms(e,t,n,i=!0){if(n.width<=0||n.height<=0||n.naturalWidth<=0||n.naturalHeight<=0)return null;let s=Math.min(n.width/n.naturalWidth,n.height/n.naturalHeight),a=n.naturalWidth*s,r=n.naturalHeight*s,o=n.left+(n.width-a)/2,l=i?n.top:n.top+(n.height-r)/2,p=(e-o)/a,c=(t-l)/r;if(p<0||p>1||c<0||c>1)return null;return{x:Math.max(0,Math.min(1000,Math.round(p*1000))),y:Math.max(0,Math.min(1000,Math.round(c*1000)))}}var hs=[["Enter","Enter"],["Tab","Tab"],["Bksp","Backspace"],["Esc","Escape"],["↑","ArrowUp"],["↓","ArrowDown"],["←","ArrowLeft"],["→","ArrowRight"]];function bs(e){let t=e.trim();if(!t)return"";if(/^[a-zA-Z][a-zA-Z0-9+.-]*:/.test(t))return t;return`https://${t}`}class jn{tail=Promise.resolve();enqueue(e){let t=this.tail.then(e,e);return this.tail=t.catch(()=>{}),t}}function gs(e,t,n){let i=!0,s=!1,a=!1,r="",o=!1,l=!1,p=-1,c=null,u=new jn,d=document.createElement("div");d.className="bp-pane bp-browser-pane",d.setAttribute("data-testid","pane-browser");let m=document.createElement("div");m.className="bp-pane-bar bp-browser-nav";function f(Z,ce,E){let k=document.createElement("button");if(k.type="button",k.className="bp-v-btn",k.textContent=Z,k.setAttribute("data-testid",ce),E)k.title=E;return k}let b=f("←","browser-back","Back"),g=f("→","browser-forward","Forward"),y=f("↻","browser-reload","Reload"),w=document.createElement("form");w.className="bp-browser-url-form";let x=document.createElement("input");x.type="text",x.className="bp-browser-input",x.placeholder="https://…",x.autocomplete="off",x.spellcheck=!1,x.setAttribute("data-testid","browser-url");let A=f("Go","browser-go","Navigate");A.type="submit",w.append(x,A);let N=f("Take over","browser-takeover");N.classList.add("is-primary"),m.append(b,g,y,w,N);let S=document.createElement("div");S.className="bp-browser-drive-bar",S.hidden=!0;let M=document.createElement("div");M.className="bp-browser-keys-row";let B=document.createElement("input");B.type="text",B.className="bp-browser-input",B.placeholder="Type text or press Enter/Tab/Arrows…",B.autocomplete="off",B.spellcheck=!1,B.setAttribute("data-testid","browser-keys");let R=f("Send","browser-type-send");M.append(B,R);let U=document.createElement("div");U.className="bp-browser-quick-keys";for(let[Z,ce]of hs){let E=f(Z,`browser-key-${ce}`);E.addEventListener("click",()=>he("press",{key:ce})),U.append(E)}S.append(M,U);let D=document.createElement("div");D.className="bp-browser-err",D.setAttribute("data-testid","browser-error"),D.hidden=!0;let re=document.createElement("div");re.className="bp-browser-stage",re.setAttribute("data-testid","browser-stage");let me=document.createElement("img");me.className="bp-browser-img",me.alt="Hub browser screen",me.draggable=!1,me.hidden=!0,me.setAttribute("data-testid","browser-frame");let oe=document.createElement("div");oe.className="bp-pane-empty",oe.setAttribute("data-testid","browser-empty"),oe.textContent="Loading browser screen…",re.append(me,oe);let Ee=document.createElement("div");Ee.className="bp-browser-hint",Ee.textContent="You have the page: click to tap, scroll to wheel, type in the key box. Hand it back when done.",Ee.hidden=!0,d.append(m,S,D,re,Ee),e.replaceChildren(d);function Ae(Z){D.textContent=Z,D.hidden=!Z}function Me(){S.hidden=!s,Ee.hidden=!s,N.textContent=s?"Hand back":"Take over",N.setAttribute("data-testid",s?"browser-handback":"browser-takeover"),N.classList.toggle("is-on",s),me.classList.toggle("is-driving",s)}function he(Z,ce={},E){u.enqueue(async()=>{if(!i)return;Ae("");try{if(await t.hub.rpc("browser",{thread:n,op:Z,...ce}),!i)return;E?.(),le()}catch(k){if(!i)return;Ae(k instanceof Error?k.message:String(k))}})}function be(Z){he("toolbar",{command:Z},()=>{s=!0,Me()})}b.addEventListener("click",()=>be("back")),g.addEventListener("click",()=>be("forward")),y.addEventListener("click",()=>be("reload")),w.addEventListener("submit",(Z)=>{Z.preventDefault();let ce=bs(x.value);if(!ce)return;if(x.value=ce,!s)he("takeover",{},()=>{s=!0,Me()});he("navigate",{url:ce},()=>{s=!0,Me()})}),N.addEventListener("click",()=>{if(s)he("handback",{},()=>{s=!1,Me()});else he("takeover",{},()=>{s=!0,Me(),B.focus()})});function I(){let Z=B.value;if(!Z)return;B.value="",he("type",{text:Z})}R.addEventListener("click",I),B.addEventListener("keydown",(Z)=>{if(!s)return;if(Z.key==="Enter"){if(Z.preventDefault(),B.value)I();he("press",{key:"Enter"});return}if(Z.key==="Tab"||Z.key==="Escape"||Z.key==="ArrowUp"||Z.key==="ArrowDown"||Z.key==="ArrowLeft"||Z.key==="ArrowRight"||Z.key==="Backspace"&&B.value==="")Z.preventDefault(),he("press",{key:Z.key})}),me.addEventListener("click",(Z)=>{if(!s||!a)return;let ce=me.getBoundingClientRect(),E=ms(Z.clientX,Z.clientY,{left:ce.left,top:ce.top,width:ce.width,height:ce.height,naturalWidth:me.naturalWidth,naturalHeight:me.naturalHeight});if(!E)return;he("click",E)}),me.addEventListener("wheel",(Z)=>{if(!s||!a)return;Z.preventDefault();let ce=Math.round(Z.deltaX),E=Math.round(Z.deltaY);if(ce===0&&E===0)return;he("scroll",{dx:ce,dy:E})},{passive:!1});async function le(){if(!i)return;if(o){l=!0;return}o=!0;try{do{l=!1,c=new AbortController;let Z=await fetch(`/bots/${encodeURIComponent(n)}/screen.jpg`,{credentials:"same-origin",cache:"no-store",signal:c.signal});if(!i)return;if(Z.ok){let ce=await Z.blob();if(!i)return;let E=URL.createObjectURL(ce),k=r;if(r=E,me.src=E,me.hidden=!1,oe.hidden=!0,a=!0,k)URL.revokeObjectURL(k)}else if(!a)me.hidden=!0,oe.hidden=!1,oe.textContent="No browser page yet. An agent opens one when it needs the web."}while(i&&l)}catch{if(!i)return;if(!a)me.hidden=!0,oe.hidden=!1,oe.textContent="No browser page yet. An agent opens one when it needs the web."}finally{c=null,o=!1}}let ie=t.hub.onFrame((Z)=>{if(!i)return;if(Z.t==="shot"&&Z.bot===n){if(typeof Z.n==="number"){if(Z.n===p)return;p=Z.n}le()}});return le(),{destroy(){if(i=!1,ie(),c?.abort(),r)URL.revokeObjectURL(r),r=""}}}function z(e,t,n){let i=document.createElement(e);if(t)i.className=t;if(n!==void 0)i.textContent=n;return i}function Qt(e){if(!Number.isFinite(e)||e<0)return"";if(e<1024)return`${e} B`;if(e<1048576)return`${Math.round(e/1024)} KB`;return`${(e/1048576).toFixed(1)} MB`}function vs(e){let t=e.lastIndexOf(".");return t>=0?e.slice(t+1).toLowerCase():""}function Ba(e){return["png","jpg","jpeg","gif","webp","svg","bmp","ico"].includes(e)}function fs(e){return["txt","md","markdown","json","toml","yaml","yml","xml","csv","tsv","rs","ts","tsx","js","mjs","cjs","jsx","css","html","htm","sh","bash","py","c","h","cc","cpp","hpp","go","java","kt","swift","rb","lua","sql","ini","cfg","conf","env","gitignore","lock","log","gbr","gtl","gbl","gts","gbs","gto","gbo","gm1","drl","pos","net","kicad_pro","kicad_prl","kicad_dru","kicad_sym","kicad_mod","kicad_wks"].includes(e)}function Ia(e){let t=vs(e);if(t==="kicad_pcb")return"board";if(t==="kicad_sch")return"schematic";if(t==="step"||t==="stp"||t==="glb")return"mech";return null}function ys(e,t,n,i){let s=!0,a="",r="",o=z("div","bp-pane bp-files-pane");o.setAttribute("data-testid","pane-files");let l=z("div","bp-pane-bar"),p=z("div","bp-files-crumbs"),c=z("button","bp-v-btn","Refresh");c.type="button",c.addEventListener("click",()=>void g(a)),l.append(p,c);let u=z("div","bp-files-split"),d=z("div","bp-files-list");d.setAttribute("data-testid","files-list");let m=z("div","bp-files-preview");m.setAttribute("data-testid","files-preview"),m.append(z("div","bp-pane-empty","Select a file to preview")),u.append(d,m),o.append(l,u),e.replaceChildren(o);function f(){p.replaceChildren();let y=z("button","bp-crumb-btn","project");if(y.type="button",y.addEventListener("click",()=>void g("")),p.append(y),!a)return;let w=a.split("/").filter(Boolean),x="";for(let A of w){x=x?`${x}/${A}`:A;let N=x;p.append(z("span","bp-vh-sep","/"));let S=z("button","bp-crumb-btn",A);S.type="button",S.addEventListener("click",()=>void g(N)),p.append(S)}}async function b(y,w,x){r=y,m.replaceChildren();let A=z("div","bp-files-prev-head");A.append(z("span","bp-files-prev-name",y));let N=z("div","bp-files-prev-acts"),S=Ia(w);if(S){let U=z("button","bp-v-btn is-primary",`Open in ${S}`);U.type="button",U.setAttribute("data-testid","files-open-viewer"),U.addEventListener("click",()=>i(S,y)),N.append(U)}let M=`/files/get?thread=${encodeURIComponent(n)}&path=${encodeURIComponent(y)}`,B=z("a","bp-v-btn","Download");B.href=M,B.download=w,N.append(B),A.append(N),m.append(A);let R=vs(w);if(Ba(R)){let U=z("div","bp-files-img-wrap"),D=document.createElement("img");D.className="bp-files-img",D.alt=w,D.src=M,U.append(D),m.append(U);return}if(x>524288&&!fs(R)){m.append(z("div","bp-pane-empty",`Binary file (${Qt(x)}). Use Download to save.`));return}if(fs(R)||x<=65536){let U=z("div","bp-pane-empty","Loading…");m.append(U);try{let D=await fetch(M,{credentials:"same-origin"});if(!s||r!==y)return;if(!D.ok){U.textContent=`Could not load file (${D.status})`;return}if((D.headers.get("content-type")||"").startsWith("image/")){U.remove();let ie=document.createElement("img");ie.className="bp-files-img",ie.alt=w,ie.src=M,m.append(ie);return}let me=262144,oe=[],Ee=0,Ae=!1;if(D.body){let ie=D.body.getReader();try{while(!0){let{done:Z,value:ce}=await ie.read();if(Z||!ce)break;if(Ee+ce.byteLength>me){let E=me-Ee;if(E>0)oe.push(ce.subarray(0,E)),Ee+=E;Ae=!0,await ie.cancel();break}oe.push(ce),Ee+=ce.byteLength}}finally{ie.releaseLock()}}if(!s||r!==y)return;let Me=new Uint8Array(Ee),he=0;for(let ie of oe)Me.set(ie,he),he+=ie.byteLength;let be=!1;for(let ie=0;ieA.dir===N.dir?A.name.localeCompare(N.name):A.dir?-1:1),d.replaceChildren(),y){let A=z("button","bp-file-row is-dir");A.type="button",A.append(z("span","bp-file-icon","↰"),z("span","bp-file-name",".."));let N=y.includes("/")?y.slice(0,y.lastIndexOf("/")):"";A.addEventListener("click",()=>void g(N)),d.append(A)}if(x.length===0){d.append(z("div","bp-pane-empty","Empty folder"));return}for(let A of x){let N=y?`${y}/${A.name}`:A.name,S=z("button","bp-file-row"+(A.dir?" is-dir":"")+(N===r?" is-sel":""));S.type="button",S.setAttribute("data-testid",`file-row-${A.name}`),S.append(z("span","bp-file-icon",A.dir?"▸":"·"),z("span","bp-file-name",A.name),z("span","bp-file-size",A.dir?"":Qt(A.size))),S.addEventListener("click",()=>{if(A.dir)g(N);else d.querySelectorAll(".bp-file-row.is-sel").forEach((M)=>M.classList.remove("is-sel")),S.classList.add("is-sel"),b(N,A.name,A.size)}),d.append(S)}}catch(w){if(!s)return;d.replaceChildren(z("div","bp-pane-empty",w instanceof Error?w.message:String(w)))}}return g(""),{destroy(){s=!1}}}function ws(e,t,n){let i=!0,s=z("div","bp-pane bp-diff-pane");s.setAttribute("data-testid","pane-diff");let a=z("div","bp-pane-bar"),r=z("span","bp-diff-summary","Loading diff…"),o=z("button","bp-v-btn","Refresh");o.type="button",o.addEventListener("click",()=>void p()),a.append(r,o);let l=z("div","bp-diff-body");l.setAttribute("data-testid","diff-body"),s.append(a,l),e.replaceChildren(s);async function p(){r.textContent="Loading diff…",l.replaceChildren();try{let c=await t.hub.rpc("viewer.diff",{thread:n});if(!i)return;if(c?.nogit){r.textContent="Not a git repository",l.append(z("div","bp-pane-empty","This project is not a git repository."));return}let u=typeof c?.diff==="string"?c.diff:"";if(!u.trim()){r.textContent="Clean working tree",l.append(z("div","bp-pane-empty","No uncommitted changes."));return}let d=u.split(` -`),m=0,f=0,b=0,g=document.createDocumentFragment(),y=z("div","bp-diff-file");for(let w of d){if(w.startsWith("diff --git ")){if(y.childNodes.length>0)g.append(y);y=z("div","bp-diff-file"),m++;let x=w.match(/ b\/(.+)$/);y.append(z("div","bp-diff-file-head",x?x[1]:w));continue}if(w.startsWith("index ")||w.startsWith("--- ")||w.startsWith("+++ "))y.append(z("div","bp-diff-line is-meta",w));else if(w.startsWith("@@"))y.append(z("div","bp-diff-line is-hunk",w));else if(w.startsWith("+"))f++,y.append(z("div","bp-diff-line is-add",w));else if(w.startsWith("-"))b++,y.append(z("div","bp-diff-line is-del",w));else y.append(z("div","bp-diff-line",w))}if(y.childNodes.length>0)g.append(y);r.textContent=`${m||1} file${m===1?"":"s"} · +${f} -${b}`,l.append(g)}catch(c){if(!i)return;r.textContent="Diff unavailable",l.append(z("div","bp-pane-empty",c instanceof Error?c.message:String(c)))}}return p(),{destroy(){i=!1}}}function Es(e,t,n){let i=!0,s="checks",a=z("div","bp-pane bp-review-pane");a.setAttribute("data-testid","pane-review");let r=z("div","bp-pane-bar"),o=z("div","bp-review-tabs"),l=z("button","bp-v-btn is-on","Checks"),p=z("button","bp-v-btn","BOM"),c=z("button","bp-v-btn","Comments");l.type=p.type=c.type="button",o.append(l,p,c);let u=z("button","bp-v-btn","Refresh");u.type="button",u.addEventListener("click",()=>void b()),r.append(o,u);let d=z("div","bp-review-body");d.setAttribute("data-testid","review-body"),a.append(r,d),e.replaceChildren(a);function m(g){s=g,l.classList.toggle("is-on",s==="checks"),p.classList.toggle("is-on",s==="bom"),c.classList.toggle("is-on",s==="comments"),b()}l.addEventListener("click",()=>m("checks")),p.addEventListener("click",()=>m("bom")),c.addEventListener("click",()=>m("comments"));function f(g){let y=z("div","bp-review-md"),w=g.split(` -`),x=0;while(x{M.preventDefault();let B=N.value.trim();if(!B)return;S.disabled=!0,t.hub.rpc("review.comment",{thread:n,text:B}).then(()=>{N.value="",S.disabled=!1,b()},()=>{S.disabled=!1})}),d.append(A),x.length===0){d.append(z("div","bp-pane-empty","No review comments yet."));return}for(let M of x){let B=z("div","bp-review-comment"+(M.resolved?" is-resolved":"")),R=[M.by||"review",M.file,M.layer,M.item].filter(Boolean).join(" · ");B.append(z("div","bp-review-comment-meta",R),z("div","bp-review-comment-text",M.text)),d.append(B)}return}let g=await t.hub.rpc("review.page",{thread:n,page:s});if(!i)return;let y=g?.report||{};if(d.replaceChildren(),y.line||y.gate){let w=z("div","bp-review-gate",[y.gate,y.line].filter(Boolean).join(" · "));d.append(w)}if(y.err)d.append(z("div","bp-review-err",y.err));if(Array.isArray(y.tasks)&&y.tasks.length>0){let w=z("div","bp-review-tasks");y.tasks.forEach((x,A)=>{let N=z("label","bp-review-task"),S=document.createElement("input");S.type="checkbox",S.checked=!!(x.done??x.checked);let M=typeof x.index==="number"?x.index:A;S.addEventListener("change",()=>{t.hub.rpc("review.tick",{thread:n,index:M}).then(()=>void b(),()=>{})}),N.append(S,z("span",void 0,x.text||x.label||`Item ${A+1}`)),w.append(N)}),d.append(w)}if(y.md&&y.md.trim())d.append(f(y.md));else if(!y.err&&(!y.tasks||y.tasks.length===0))d.append(z("div","bp-pane-empty",`No ${s==="bom"?"BOM":"design checks"} report available.`))}catch(g){if(!i)return;d.replaceChildren(z("div","bp-pane-empty",g instanceof Error?g.message:String(g)))}}return b(),{destroy(){i=!1}}}function Cs(e,t){let n=e>>>16&255,i=e>>>8&255,s=e&255;return t>=0.999?`rgb(${n},${i},${s})`:`rgba(${n},${i},${s},${t.toFixed(3)})`}class Dn{canvas;ctx;frame=null;masks={off:0,dim:0,lift:255};highlights=new Set;lightTheme=!1;cx=0;cy=0;scale=0.0001;fittedKey="";fitW=0;fitH=0;userMoved=!1;dirty=!1;rafId=0;pointers=new Map;dragStart=null;pinchStart=null;resizeObs;cbs;constructor(e,t={}){this.cbs=t,this.canvas=document.createElement("canvas"),this.canvas.className="bp-viewer-canvas",this.canvas.style.width="100%",this.canvas.style.height="100%",this.canvas.style.display="block",this.canvas.style.touchAction="none",e.appendChild(this.canvas);let n=this.canvas.getContext("2d");if(!n)throw Error("Canvas2D unavailable");this.ctx=n,this.resizeObs=new ResizeObserver(()=>this.scheduleDraw()),this.resizeObs.observe(this.canvas),this.canvas.addEventListener("pointerdown",this.onPointerDown),this.canvas.addEventListener("pointermove",this.onPointerMove),this.canvas.addEventListener("pointerup",this.onPointerUp),this.canvas.addEventListener("pointercancel",this.onPointerUp),this.canvas.addEventListener("wheel",this.onWheel,{passive:!1}),this.canvas.addEventListener("dblclick",this.onDblClick)}setTheme(e){if(this.lightTheme!==e)this.lightTheme=e,this.scheduleDraw()}setFrame(e){if(this.frame=e,e&&e.key!==this.fittedKey)this.fittedKey=e.key,this.fit();else this.scheduleDraw()}setLayers(e){this.masks=e,this.scheduleDraw()}setHighlights(e){this.highlights.clear();for(let[t,n]of e)this.highlights.add(`${t}:${n}`);this.scheduleDraw()}presentMask(){if(!this.frame)return 0;let e=0;for(let t of this.frame.chunks)if(t.layer<32)e=(e|1<>>0;return e>>>0}presentColors(){let e=new Map;if(!this.frame)return e;for(let t of this.frame.chunks)if(!e.has(t.layer))e.set(t.layer,t.color);return e}applyFit(e,t){if(!this.frame||e<10||t<10)return;let n=this.frame.box,i=Math.max(n[2]-n[0],1000),s=Math.max(n[3]-n[1],1000);this.cx=(n[0]+n[2])*0.5,this.cy=(n[1]+n[3])*0.5,this.scale=Math.min(e/i,t/s)*0.92,this.fitW=e,this.fitH=t,this.userMoved=!1}fit(){if(!this.frame)return;this.userMoved=!1,this.fitW=0,this.fitH=0;let e=this.canvas.getBoundingClientRect();if(e.width>=10&&e.height>=10)this.applyFit(e.width,e.height);this.scheduleDraw()}zoomToBoxMm(e){let t=e[0]*1000,n=e[1]*1000,i=e[2]*1000,s=e[3]*1000,a=Math.max(i-t,1000),r=Math.max(s-n,1000),o=this.canvas.getBoundingClientRect(),l=Math.max(o.width,200),p=Math.max(o.height,200);this.cx=(t+i)*0.5,this.cy=(n+s)*0.5,this.scale=Math.min(l/a,p/r)*0.85,this.userMoved=!0,this.scheduleDraw()}scheduleDraw(){if(this.dirty)return;this.dirty=!0,this.rafId=requestAnimationFrame(()=>{this.dirty=!1,this.rafId=0,this.draw()})}draw(){let e=this.canvas.getBoundingClientRect(),t=Math.max(1,Math.round(e.width)),n=Math.max(1,Math.round(e.height)),i=Math.min(window.devicePixelRatio||1,2),s=Math.round(t*i),a=Math.round(n*i);if(this.canvas.width!==s||this.canvas.height!==a)this.canvas.width=s,this.canvas.height=a;let r=this.ctx;r.setTransform(i,0,0,i,0,0),r.fillStyle=this.lightTheme?"#f5f4ef":"#08090b",r.fillRect(0,0,t,n);let o=this.frame;if(!o)return;if(!this.userMoved&&t>=10&&n>=10&&(Math.abs(this.fitW-t)>2||Math.abs(this.fitH-n)>2))this.applyFit(t,n);let l=t*0.5,p=n*0.5,c=this.scale,u=this.cx,d=this.cy,m=u-l/c,f=u+l/c,b=d-p/c,g=d+p/c,{off:y,dim:w,lift:x}=this.masks,A=[],N=[];for(let M=0;M>>B&1)===1)continue;if(B===x)N.push(M);else A.push(M)}let S=A.concat(N);r.lineCap="round",r.lineJoin="round";for(let M=0;M>>R.layer&1)===1,D=R.alpha*(U?0.25:1);if(D<=0.01)continue;this.drawChunk(r,R,D,m,b,f,g,u,d,c,l,p)}if(this.highlights.size>0){r.fillStyle=this.lightTheme?"rgba(245,244,239,0.72)":"rgba(8,9,11,0.72)",r.fillRect(0,0,t,n);let M=this.lightTheme?"rgba(27,29,33,0.77)":"rgba(217,221,228,0.77)";for(let B=0;Ba||g.y1r)continue;if(g.n<3)continue;let y=(d[g.at]-o)*p+c,w=(d[g.at+1]-l)*p+u;e.moveTo(y,w);for(let x=1;x0)e.fill()}else if(t.mode===2){let f=Math.max(0.75,t.r*p);e.fillStyle=m,e.beginPath();let b=0;for(let g=0;ga||y.y1r)continue;let w=(d[y.at]-o)*p+c,x=(d[y.at+1]-l)*p+u;e.moveTo(w+f,x),e.arc(w,x,f,0,Math.PI*2),b++}if(b>0)e.fill()}else{e.strokeStyle=m,e.lineWidth=Math.max(1,t.r*2*p),e.beginPath();let f=0;for(let b=0;ba||g.y1r)continue;let y=(d[g.at]-o)*p+c,w=(d[g.at+1]-l)*p+u;if(g.n===1)e.moveTo(y,w),e.lineTo(y+0.01,w);else{e.moveTo(y,w);for(let x=1;x0)e.stroke()}}drawLitPieces(e,t,n,i,s,a,r,o,l,p,c,u,d){let m=t.pts,f=Cs(t.color,t.alpha);for(let b=0;br||g.y1o)continue;let y=(m[g.at]-l)*c+u,w=(m[g.at+1]-p)*c+d;if(g.kind===2){let x=Math.max(1.5,t.r*c);e.fillStyle=f,e.beginPath(),e.arc(y,w,x,0,Math.PI*2),e.fill(),e.strokeStyle=i,e.lineWidth=1.5,e.stroke()}else if(g.kind===0&&g.n>=3){e.fillStyle=f,e.beginPath(),e.moveTo(y,w);for(let x=1;x=0;c--){let u=n.chunks[c];if(u.layer<32&&(p>>>u.layer&1)===1)continue;for(let d=0;dm.x1+r||am.y1+r)continue;let f=(m.x1-m.x0+1)*(m.y1-m.y0+1);if(f{if(this.canvas.setPointerCapture(e.pointerId),this.pointers.set(e.pointerId,{x:e.clientX,y:e.clientY}),this.pointers.size===1)this.dragStart={x:e.clientX,y:e.clientY,cx:this.cx,cy:this.cy,moved:!1},this.pinchStart=null;else if(this.pointers.size===2){let[t,n]=Array.from(this.pointers.values());this.pinchStart={dist:Math.hypot(n.x-t.x,n.y-t.y)||1,midX:(t.x+n.x)*0.5,midY:(t.y+n.y)*0.5,scale:this.scale,cx:this.cx,cy:this.cy},this.dragStart=null}};onPointerMove=(e)=>{if(!this.pointers.has(e.pointerId))return;if(this.pointers.set(e.pointerId,{x:e.clientX,y:e.clientY}),this.pointers.size===2&&this.pinchStart){let[t,n]=Array.from(this.pointers.values()),i=Math.hypot(n.x-t.x,n.y-t.y)||1,s=(t.x+n.x)*0.5,a=(t.y+n.y)*0.5,r=i/this.pinchStart.dist,o=Math.max(0.0000001,Math.min(2,this.pinchStart.scale*r)),l=this.canvas.getBoundingClientRect(),p=this.pinchStart.midX-l.left-l.width*0.5,c=this.pinchStart.midY-l.top-l.height*0.5,u=s-l.left-l.width*0.5,d=a-l.top-l.height*0.5;this.scale=o,this.cx=this.pinchStart.cx+p/this.pinchStart.scale-u/o,this.cy=this.pinchStart.cy+c/this.pinchStart.scale-d/o,this.userMoved=!0,this.cbs.onUserMove?.(),this.scheduleDraw();return}if(this.dragStart&&this.pointers.size===1){let t=e.clientX-this.dragStart.x,n=e.clientY-this.dragStart.y;if(Math.hypot(t,n)>3)this.dragStart.moved=!0;if(this.dragStart.moved)this.cx=this.dragStart.cx-t/this.scale,this.cy=this.dragStart.cy-n/this.scale,this.userMoved=!0,this.cbs.onUserMove?.(),this.scheduleDraw()}};onPointerUp=(e)=>{let t=this.dragStart&&!this.dragStart.moved&&this.pointers.size===1;if(this.pointers.delete(e.pointerId),this.pointers.size<2)this.pinchStart=null;if(this.pointers.size===0)this.dragStart=null;if(t&&this.cbs.onPick){let n=this.canvas.getBoundingClientRect(),i=this.hitTest(e.clientX-n.left,e.clientY-n.top);this.cbs.onPick(i)}};onWheel=(e)=>{e.preventDefault();let t=this.canvas.getBoundingClientRect(),n=e.clientX-t.left-t.width*0.5,i=e.clientY-t.top-t.height*0.5,s=e.deltaY<0?1.16:0.8620689655172414,a=Math.max(0.0000001,Math.min(2,this.scale*s));this.cx+=n/this.scale-n/a,this.cy+=i/this.scale-i/a,this.scale=a,this.userMoved=!0,this.cbs.onUserMove?.(),this.scheduleDraw()};onDblClick=()=>{this.fit()};destroy(){if(this.rafId)cancelAnimationFrame(this.rafId);this.resizeObs.disconnect(),this.canvas.removeEventListener("pointerdown",this.onPointerDown),this.canvas.removeEventListener("pointermove",this.onPointerMove),this.canvas.removeEventListener("pointerup",this.onPointerUp),this.canvas.removeEventListener("pointercancel",this.onPointerUp),this.canvas.removeEventListener("wheel",this.onWheel),this.canvas.removeEventListener("dblclick",this.onDblClick),this.canvas.remove()}}var xs=[{id:"fit",label:"Fit"},{id:"iso",label:"Iso"},{id:"top",label:"Top"},{id:"bottom",label:"Bottom"},{id:"front",label:"Front"},{id:"right",label:"Right"},{id:"back",label:"Back"},{id:"left",label:"Left"}];function ks(e){switch(e){case"top":return{yaw:0,pitch:Math.PI*0.499};case"bottom":return{yaw:0,pitch:-Math.PI*0.499};case"front":return{yaw:0,pitch:0};case"right":return{yaw:Math.PI*0.5,pitch:0};case"back":return{yaw:Math.PI,pitch:0};case"left":return{yaw:-Math.PI*0.5,pitch:0};case"iso":case"fit":default:return{yaw:0.6,pitch:0.7}}}function Hn(e,t,n,i){if(!e||!t||!n||!i)return!1;if(!e.startsWith(t))return!1;let s=e.slice(t.length).split(` -`),a=(s[0]||"").split("\t");if(a[0]!=="git"||a[2]!==n)return!1;let r=s[1]||a.slice(4).join("\t");if(!r)return!1;let o=r.replace(/\\/g,"/"),l=i.replace(/\\/g,"/");if(l.startsWith("/")||/^[A-Za-z]:\//.test(l))return o===l;return o===l||o.endsWith(`/${l}`)}class Fn{refs=[];index=-1;lastCommit="";highlightEdits=!1;playing=!1;setRefs(e){if(this.refs=e,this.index>=e.length)this.index=-1,this.highlightEdits=!1}isLive(){return this.index<0||this.index>=this.refs.length}activeRef(){return this.isLive()?null:this.refs[this.index]}step(e){if(this.refs.length===0)return!1;let t=this.index;if(e>0)this.index=Math.min(this.refs.length-1,this.index+1);else this.index=Math.max(-1,this.index-1);if(this.index===-1)this.playing=!1,this.highlightEdits=!1;else this.lastCommit=this.refs[this.index].commit,this.highlightEdits=!0;return this.index!==t}selectCommit(e){if(!e)return this.goLive();let t=this.refs.findIndex((i)=>i.commit===e);if(t<0)return!1;let n=this.index!==t||!this.highlightEdits;return this.index=t,this.lastCommit=e,this.highlightEdits=!0,n}goLive(){let e=this.index!==-1||this.playing||this.highlightEdits;return this.index=-1,this.playing=!1,this.highlightEdits=!1,e}toggleHighlight(){if(this.highlightEdits)return this.goLive(),!1;if(this.refs.length===0)return!1;let e=this.lastCommit?this.refs.findIndex((t)=>t.commit===this.lastCommit):0;return this.index=e>=0?e:0,this.lastCommit=this.refs[this.index].commit,this.highlightEdits=!0,!0}compareRequest(){let e=this.activeRef();if(!e||!this.highlightEdits)return null;return{commit:e.commit,bits:0}}}var Ra=`#version 300 es +`),i=0;while(i{navigator.clipboard?.writeText(l).then(()=>{f.textContent="✓",window.setTimeout(()=>{f.textContent=b},1200)}).catch(()=>{})}),d.append(m,f);let g=document.createElement("pre"),y=document.createElement("code");y.textContent=l,g.appendChild(y),u.append(d,g),t.appendChild(u);continue}if(!r.trim()){i++;continue}let s=/^(#{1,4})\s+(.+)$/.exec(r);if(s){let c=document.createElement(`h${Math.min(4,s[1].length+1)}`);c.className="bp-md-h",Bt(c,s[2]),t.appendChild(c),i++;continue}if(r.startsWith("> ")){let c=document.createElement("blockquote");c.className="bp-md-quote";let p=[];while(i "))p.push(n[i].slice(2)),i++;Bt(c,p.join(` +`)),t.appendChild(c);continue}if(/^\s*[-*]\s+/.test(r)){let c=document.createElement("ul");c.className="bp-md-list";while(i ")&&!/^\s*[-*]\s+/.test(n[i])&&!/^\s*\d+\.\s+/.test(n[i]))a.push(n[i]),i++;let o=document.createElement("p");o.className="bp-md-p";for(let c=0;c0)o.appendChild(document.createElement("br"));Bt(o,a[c])}t.appendChild(o)}return t}var rr=new Set(["(","[",'"',"'","`"]);function ar(e){return/[\p{L}\p{N}\-_\/+\[]/u.test(e)}function or(e){return/[\p{L}\p{N}\-_\/]/u.test(e)}function lr(e){return/[\p{L}\p{N}]/u.test(e)}function di(e,t){if(!e)return[];let n=(t??[]).filter((s)=>s.kind==="model"&&s.word&&s.label);if(n.length===0)return[{kind:"text",text:e}];let i=[],r=0;while(ra)s=l,a=u,o=c;break}p=l+1}}if(o===null)break;if(s>r)i.push({kind:"text",text:e.slice(r,s)});i.push({kind:"model",word:o.word,label:o.label}),r=a}if(r3600000)return"";let t=Math.max(1,Math.round(e/1000));if(t<60)return`${t}s`;let n=Math.floor(t/60),i=t%60;return i>0?`${n}m ${i}s`:`${n}m`}function pr(e,t){let n=document.createDocumentFragment(),i=di(e,t),r=h("native.thread.model","Model").toLowerCase();for(let s of i){if(s.kind==="text"){n.appendChild(document.createTextNode(s.text));continue}let a=document.createElement("span");a.className="bp-ref-chip bp-ref-model",a.title=s.word,a.setAttribute("data-ref-word",s.word);let o=document.createElement("span");o.className="bp-ref-sigil",o.textContent="&";let c=document.createElement("span");c.className="bp-ref-label",c.textContent=s.label;let p=document.createElement("span");p.className="bp-ref-kind",p.textContent=r,a.append(o,c,p),n.appendChild(a)}return n}function ur(e){e.addEventListener("copy",(t)=>{let n=typeof window<"u"?window.getSelection():null;if(!n||n.rangeCount===0||n.isCollapsed)return;let i=n.getRangeAt(0);if(!e.contains(i.commonAncestorContainer))return;let r=i.commonAncestorContainer,o=(r.nodeType===Node.ELEMENT_NODE?r:r.parentElement)?.closest(".bp-ref-chip[data-ref-word]")?.getAttribute("data-ref-word"),c;if(o)c=o;else{let p=i.cloneContents(),l=p.querySelectorAll(".bp-ref-chip[data-ref-word]");if(l.length===0)return;for(let d of l){let m=d.getAttribute("data-ref-word")||d.textContent||"";d.replaceWith(document.createTextNode(m))}let u=p.querySelectorAll(".bp-entry");for(let d=1;d{if(!this.loadingOlder&&this.hasMore)this.loadingOlder=!0,this.cb.onLoadOlder()}),this.scrollEl.addEventListener("scroll",()=>{if(this.pinnedToBottom=this.isNearBottom(),this.hasMore&&!this.loadingOlder&&this.scrollEl.scrollTop<48)this.loadingOlder=!0,this.cb.onLoadOlder()}),typeof ResizeObserver<"u"){let n=0;new ResizeObserver(()=>{let r=this.scrollEl.clientHeight;if(n>0&&r!==n&&this.pinnedToBottom)this.scrollToBottom();n=r}).observe(this.scrollEl)}this.listEl=document.createElement("div"),this.listEl.className="bp-timeline-list",ur(this.scrollEl),this.scrollEl.append(this.olderBtn,this.listEl),e.append(this.bannerEl,this.scrollEl)}setLoading(e){this.thread=e,this.entries=[],this.hasMore=!1,this.loadingOlder=!1,this.review=null,this.unanswered=null,this.btwNote=null,this.liveNodes.clear(),this.planExpanded.clear(),this.planRevisingId="",this.planReviseDrafts.clear(),this.renderBanners(),this.olderBtn.classList.add("bp-hidden");let t=document.createElement("div");t.className="bp-empty-state",t.textContent=h("web.chat.loading","Loading messages…"),this.listEl.replaceChildren(t)}setError(e,t,n){this.thread=e,this.entries=[],this.hasMore=!1,this.loadingOlder=!1,this.review=null,this.unanswered=null,this.btwNote=null,this.liveNodes.clear(),this.planExpanded.clear(),this.planRevisingId="",this.planReviseDrafts.clear(),this.renderBanners(),this.olderBtn.classList.add("bp-hidden");let i=document.createElement("div");i.className="bp-empty-state";let r=document.createElement("div");r.className="bp-bad",r.textContent=t;let s=document.createElement("button");s.type="button",s.textContent=h("tools.retry","Retry"),s.addEventListener("click",n),i.append(r,s),this.listEl.replaceChildren(i)}getEntries(){return this.entries.slice()}refreshLocale(){let e=this.scrollEl.scrollTop;if(this.olderBtn.textContent=h("android.load.earlier","Load earlier"),this.renderBanners(),this.thread&&this.entries.length>0)this.renderEntries(!1);this.scrollEl.scrollTop=e}setThread(e,t,n,i,r){if((this.thread?.id??"")!==(e?.id??""))this.planExpanded.clear(),this.planRevisingId="",this.planReviseDrafts.clear();this.thread=e,this.entries=t.filter((s)=>!bn(s)),this.hasMore=n,this.loadingOlder=!1,this.review=i,this.unanswered=r,this.btwNote=null,this.renderBanners(),this.renderEntries(!0)}updateThreadMeta(e){if(!this.thread||this.thread.id!==e.id)return;this.thread=e}setReview(e){this.review=e,this.renderBanners()}setUnanswered(e){this.unanswered=e,this.renderBanners()}setNoProvider(e){this.noProvider=e,this.renderBanners()}showBtw(e,t){this.btwNote={q:e,a:t},this.renderBanners()}prependEntries(e,t){this.loadingOlder=!1;let n=this.scrollEl.scrollHeight,i=new Set(this.entries.map((s)=>s.id)),r=e.filter((s)=>!bn(s)&&!i.has(s.id));this.entries=[...r,...this.entries],this.hasMore=t,this.renderEntries(!1),this.scrollEl.scrollTop+=this.scrollEl.scrollHeight-n}clearLoadingOlder(){this.loadingOlder=!1}upsertEntry(e){if(bn(e))return;let t=this.isNearBottom()||e.kind==="user"&&Boolean(e.clientId),n=this.entries.findIndex((i)=>i.id===e.id);if(n<0&&e.clientId)n=this.entries.findIndex((i)=>i.clientId&&i.clientId===e.clientId);if(n>=0)this.entries[n]=e;else this.entries.push(e);this.renderEntries(t)}goTo(e){let t=this.scrollEl.querySelector(`[data-entry-id="${CSS.escape(e)}"]`);if(!t)return!1;return t.scrollIntoView({block:"center",behavior:"smooth"}),t.classList.remove("bp-entry-flash"),t.offsetWidth,t.classList.add("bp-entry-flash"),window.setTimeout(()=>t.classList.remove("bp-entry-flash"),1200),!0}removeEntry(e){let t=this.entries.filter((n)=>n.id!==e);if(t.length!==this.entries.length)this.entries=t,this.renderEntries(!1)}appendLiveText(e,t,n){let i=this.isNearBottom(),r=this.entries.find((a)=>a.id===e);if(!r){r={id:e,kind:"assistant",text:t,at:n,live:!0},this.entries.push(r),this.renderEntries(i);return}r.text+=t,r.live=!0;let s=this.liveNodes.get(e);if(s){if(s.replaceChildren(It(r.text)),i)this.scrollToBottom()}else this.renderEntries(i)}isNearBottom(){let e=this.scrollEl;return e.scrollHeight-e.scrollTop-e.clientHeight<80}scrollToBottom(){this.pinnedToBottom=!0,this.scrollEl.scrollTop=this.scrollEl.scrollHeight}renderBanners(){let e=document.createDocumentFragment();if(this.noProvider&&!this.thread?.id.includes("~")){let t=document.createElement("div");t.className="bp-banner bp-no-provider",t.setAttribute("data-testid","no-provider-banner");let n=document.createElement("div");n.className="bp-no-provider-body";let i=document.createElement("strong");if(i.textContent=pe(this.noProvider.head),n.appendChild(i),this.noProvider.text){let a=document.createElement("span");a.className="bp-dim",a.textContent=pe(this.noProvider.text),n.appendChild(a)}let r=document.createElement("div");r.className="bp-banner-actions";let s=document.createElement("button");s.type="button",s.className="primary",s.setAttribute("data-testid","no-provider-accounts-btn"),s.textContent=pe(this.noProvider.button),s.addEventListener("click",()=>this.cb.onOpenAccounts?.()),r.appendChild(s),t.append(n,r),e.appendChild(t)}if(this.review&&(this.review.text||this.review.button)){let t=document.createElement("div");t.className="bp-banner bp-review-bar",t.setAttribute("data-testid","review-bar");let n=document.createElement("span");if(n.textContent=this.review.text||h("web.chat.review.mode","Review mode"),t.appendChild(n),this.review.button){let i=document.createElement("button");i.type="button",i.textContent=this.review.button,i.addEventListener("click",()=>this.cb.onToggleReview(!(this.review?.on??!0))),t.appendChild(i)}e.appendChild(t)}if(this.unanswered&&(this.unanswered.head||this.unanswered.text)){let t=document.createElement("div");t.className="bp-banner bp-unanswered",t.setAttribute("data-testid","unanswered-notice");let n=document.createElement("div");if(n.className="bp-unanswered-body",this.unanswered.head){let i=document.createElement("strong");i.textContent=this.unanswered.head,n.appendChild(i)}if(this.unanswered.text){let i=document.createElement("span");i.textContent=this.unanswered.text,n.appendChild(i)}if(t.appendChild(n),this.unanswered.buttons?.length){let i=document.createElement("div");i.className="bp-banner-actions";for(let r of this.unanswered.buttons){let s=document.createElement("button");if(s.type="button",r.primary)s.className="primary";s.textContent=r.label,s.addEventListener("click",()=>this.cb.onUnansweredAction(r.action,r.value)),i.appendChild(s)}t.appendChild(i)}e.appendChild(t)}if(this.btwNote){let t=document.createElement("div");t.className="bp-banner bp-btw-banner";let n=document.createElement("div"),i=document.createElement("div");i.className="bp-dim",i.textContent=`/btw ${this.btwNote.q}`;let r=document.createElement("div");r.appendChild(It(this.btwNote.a)),n.append(i,r);let s=document.createElement("button");s.type="button",s.className="icon",s.textContent="×",s.addEventListener("click",()=>{this.btwNote=null,this.renderBanners()}),t.append(n,s),e.appendChild(t)}this.bannerEl.replaceChildren(e)}makeEntryActions(e,t,n){let i=document.createElement("div");i.className="bp-entry-foot"+(t?" user":"");let r=document.createElement("button");r.type="button",r.className="bp-entry-act";let s=h("common.copy","Copy"),a=document.createElement("span");a.textContent=s,r.append(Rt(["M9 9h11v11H9z","M5 15H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v1"]),a),r.addEventListener("click",()=>{navigator.clipboard?.writeText(e.text||"").then(()=>{a.textContent="✓",window.setTimeout(()=>{a.textContent=s},1000)}).catch(()=>{})});let o=document.createElement("button");o.type="button",o.className="bp-entry-act";let c=document.createElement("span");c.textContent=h("reply.action","Reply"),o.append(Rt(["M9 17l-5-5 5-5","M20 18v-2a4 4 0 0 0-4-4H4"]),c),o.addEventListener("click",()=>this.cb.onReplyEntry(e));let p=!e.live&&!e.id.startsWith("local-")&&!e.id.startsWith("live:"),l=document.createElement("span");l.className="bp-entry-time";let u=cr(e.at);if(t)l.textContent=u,i.append(r,...p?[o]:[],l);else{let d=n&&e.at?dr(gn(e.at)-gn(n)):"",m=u?d?h("web.chat.finished.dur","Finished {time} · {dur}",{time:u,dur:d}):h("web.chat.finished","Finished {time}",{time:u}):"";l.textContent=e.live?h("web.chat.streaming","Streaming…"):m,i.append(l,r,...p?[o]:[])}return i}closePlanRevise(){let e=this.planRevisingId;if(!e)return!1;this.planRevisingId="";let t=this.scrollEl.scrollTop;return this.renderEntries(!1),this.scrollEl.scrollTop=t,this.listEl.querySelector(`[data-testid="ask-${CSS.escape(e)}"] [data-testid="plan-revise"]`)?.focus(),!0}renderEntries(e){let t=null,n=typeof document<"u"?document.activeElement:null;if(n instanceof HTMLTextAreaElement&&n.classList.contains("bp-plan-revise-input")&&this.listEl.contains(n)&&this.planRevisingId)this.planReviseDrafts.set(this.planRevisingId,n.value),t={askId:this.planRevisingId,start:n.selectionStart,end:n.selectionEnd,dir:n.selectionDirection};this.olderBtn.classList.toggle("bp-hidden",!this.hasMore),this.liveNodes.clear();let i=document.createDocumentFragment();if(!this.thread){let s=document.createElement("div");s.className="bp-empty-state",s.textContent=h("web.chat.choose","Choose a project thread on the left to begin."),i.appendChild(s),this.listEl.replaceChildren(i);return}if(this.entries.length===0){let s=document.createElement("div");s.className="bp-empty-state",s.textContent=h("web.chat.empty","No messages yet. Type below to start a turn."),i.appendChild(s),this.listEl.replaceChildren(i);return}let r=0;for(let s of this.entries){if(s.kind==="user"&&s.at)r=s.at;let a=document.createElement("article");if(a.className=`bp-entry bp-entry-${s.kind}`+(s.live?" is-live":""),a.setAttribute("data-entry-id",s.id),s.kind==="tool"&&s.tool){let l=document.createElement("div");l.className=`bp-tool-pill bp-tool-${s.tool.state||"done"}`;let u=document.createElement("span");if(u.className="bp-tool-name",u.textContent=s.tool.name,l.appendChild(u),s.tool.summary){let d=document.createElement("span");d.className="bp-tool-summary",d.textContent=s.tool.summary,l.appendChild(d)}a.appendChild(l),i.appendChild(a);continue}if(s.kind==="ask"&&s.ask){let l=s.ask;if(l.kind==="plan"){a.appendChild(this.renderPlanAsk(l)),i.appendChild(a);continue}let u=document.createElement("div");u.className="bp-ask-card",u.setAttribute("data-testid",`ask-${l.id}`);let d=document.createElement("div");if(d.className="bp-ask-q",d.textContent=l.question,u.appendChild(d),l.state==="open"){let m=document.createElement("div");if(m.className="bp-ask-opts",l.options&&l.options.length>0)for(let f of l.options){let b=document.createElement("button");b.type="button",b.textContent=f.label,b.addEventListener("click",()=>this.cb.onAnswerAsk(l.id,f.id)),m.appendChild(b)}else{let f=document.createElement("input");f.type="text",f.className="bp-input",f.placeholder=h("web.chat.answer.placeholder","Type answer…");let b=document.createElement("button");b.type="button",b.className="primary",b.textContent=h("web.chat.answer.btn","Answer"),b.addEventListener("click",()=>{if(f.value.trim())this.cb.onAnswerAsk(l.id,f.value.trim())}),m.append(f,b)}u.appendChild(m)}else{let m=document.createElement("div");m.className="bp-ask-answered",m.textContent=h("web.chat.answered","Answered: {answer}",{answer:l.answered??""}),u.appendChild(m)}a.appendChild(u),i.appendChild(a);continue}let o=Boolean(s.text&&s.text.trim().length>0),c=Boolean(s.images&&s.images.length>0),p=Boolean(s.attachments&&s.attachments.length>0);if(!o&&!c&&!p&&!s.live)continue;if(s.replyTo?.quote){let l=document.createElement("div");l.className="bp-reply-quote",l.textContent=h("gpui.b.in.reply.to","↩ In reply to: {quote}",{quote:s.replyTo.quote});let u=s.replyTo.id;l.setAttribute("role","button"),l.tabIndex=0,l.setAttribute("data-testid","entry-reply-quote");let d=()=>{if(this.cb.onGoToEntry)this.cb.onGoToEntry(u);else this.goTo(u)};l.addEventListener("click",d),l.addEventListener("keydown",(m)=>{if(m.key==="Enter"||m.key===" ")m.preventDefault(),d()}),a.appendChild(l)}if(o||s.live){let l=document.createElement("div");if(l.className="bp-entry-body",s.kind==="user")l.appendChild(pr(s.text||"",s.refs));else l.appendChild(It(s.text||""));if(s.live)this.liveNodes.set(s.id,l);a.appendChild(l)}if(p&&s.attachments){let l=document.createElement("div");l.className="bp-entry-images";for(let u of s.attachments)if(u.previewUrl){let d=document.createElement("img");d.className="bp-reply-img",d.src=u.previewUrl,d.alt=u.name||"attachment",l.appendChild(d)}else if(u.path||u.name){let d=document.createElement("span");d.className="bp-tool-pill",d.textContent=u.name||u.path||"image",l.appendChild(d)}if(l.childElementCount>0)a.appendChild(l)}if(s.images&&s.images.length>0){let l=document.createElement("div");l.className="bp-entry-images";for(let u of s.images){let d=document.createElement("img");d.className="bp-reply-img",d.alt=u;let m=`${s.id}|${u}`,f=this.imageCache.get(m);if(f)d.src=f;else this.cb.onLoadImage(s.id,u).then((b)=>{if(!b)return;let g=b.url??(b.mime&&b.data?`data:${b.mime};base64,${b.data}`:"");if(!g)return;this.imageCache.set(m,g),d.src=g});l.appendChild(d)}a.appendChild(l)}a.appendChild(this.makeEntryActions(s,s.kind==="user",s.kind==="assistant"?r:void 0)),i.appendChild(a)}if(this.listEl.replaceChildren(i),t&&this.planRevisingId===t.askId){let s=this.listEl.querySelector(`[data-testid="ask-${CSS.escape(t.askId)}"] .bp-plan-revise-input`);if(s){if(s.focus({preventScroll:!0}),t.start!==null&&t.end!==null)s.setSelectionRange(t.start,t.end,t.dir??void 0)}}if(e&&!t)this.scrollToBottom()}renderPlanAsk(e){let t=this.planExpanded.has(e.id),n=e.state==="open"&&this.planRevisingId===e.id,i=document.createElement("div");i.className="bp-ask-card bp-ask-plan",i.setAttribute("data-testid",`ask-${e.id}`);let r=document.createElement("div");r.className="bp-plan-head";let s=Rt(["M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z","M14 2v6h6","M16 13H8","M16 17H8","M10 9H8"]);s.classList.add("bp-plan-head-ic");let a=document.createElement("span");if(a.className="bp-plan-title",a.textContent=!e.head||e.head==="Proposed plan"?h("ask.plan","Proposed plan"):pe(e.head),r.append(s,a),e.state==="open"){let l=document.createElement("span");l.className="bp-plan-badge",l.textContent=h("gpui.ask.plan.ready","Ready for review"),r.appendChild(l)}let o=document.createElement("span");if(o.className="bp-mgmt-flex1",r.appendChild(o),e.question){let l=document.createElement("button");l.type="button",l.className="bp-plan-head-btn";let u=h("common.copy","Copy"),d=document.createElement("span");d.textContent=u,l.append(Rt(["M9 9h11v11H9z","M5 15H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v1"]),d),l.addEventListener("click",()=>{navigator.clipboard?.writeText(e.question).then(()=>{l.classList.add("copied"),d.textContent=h("web.clone.copied","Copied"),window.setTimeout(()=>{l.classList.remove("copied"),d.textContent=u},1200)}).catch(()=>{})}),r.appendChild(l)}let c=document.createElement("button");c.type="button",c.className="bp-plan-head-btn",c.setAttribute("data-testid","plan-expand"),c.textContent=t?h("gpui.c.term.collapse","Collapse"):h("gpui.c.term.expand","Expand"),c.addEventListener("click",()=>{if(this.planExpanded.has(e.id))this.planExpanded.delete(e.id);else this.planExpanded.add(e.id);let l=this.scrollEl.scrollTop;this.renderEntries(!1),this.scrollEl.scrollTop=l}),r.appendChild(c),i.appendChild(r);let p=document.createElement("div");if(p.className="bp-plan-body"+(t?" is-expanded":""),p.setAttribute("data-testid","plan-body"),p.appendChild(It(e.question||"")),i.appendChild(p),e.state==="open"){let l=document.createElement("div");l.className="bp-plan-actions";let u=e.options?.find((b)=>b.id==="implement"||b.id.endsWith("|implement")),d=document.createElement("button");if(d.type="button",d.className="primary",d.setAttribute("data-testid","plan-implement"),d.textContent=u?.label&&u.label!=="Implement"?pe(u.label):h("approval.implement","Implement"),d.addEventListener("click",()=>{this.planRevisingId="",this.planReviseDrafts.delete(e.id),this.cb.onAnswerAsk(e.id,u?.id??"implement")}),l.appendChild(d),e.revise!==!1){let b=document.createElement("button");b.type="button",b.className="bp-plan-revise-btn"+(n?" active":""),b.setAttribute("data-testid","plan-revise"),b.append(Rt(["M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7","M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"]),document.createTextNode(h("gpui.ask.plan.revise","Revise"))),b.addEventListener("click",()=>{let g=this.planRevisingId!==e.id;this.planRevisingId=g?e.id:"";let y=this.scrollEl.scrollTop;if(this.renderEntries(!1),this.scrollEl.scrollTop=y,g)this.listEl.querySelector(`[data-testid="ask-${CSS.escape(e.id)}"] .bp-plan-revise-input`)?.focus()}),l.appendChild(b)}let m=e.options?.find((b)=>b.id==="dismiss"||b.id.endsWith("|dismiss")),f=document.createElement("button");if(f.type="button",f.className="bp-plan-dismiss-btn",f.setAttribute("data-testid","plan-dismiss"),f.textContent=m?.label&&m.label!=="Dismiss"?pe(m.label):h("approval.dismiss","Dismiss"),f.addEventListener("click",()=>{this.planRevisingId="",this.planReviseDrafts.delete(e.id),this.cb.onAnswerAsk(e.id,m?.id??"dismiss")}),l.appendChild(f),i.appendChild(l),n){let b=document.createElement("div");b.className="bp-plan-revise",b.setAttribute("data-testid","plan-revise-drawer");let g=document.createElement("textarea");g.rows=2,g.className="bp-input bp-plan-revise-input",g.placeholder=h("gpui.ask.plan.reviseph","What should change in the plan?"),g.value=this.planReviseDrafts.get(e.id)??"";let y=document.createElement("button");y.type="button",y.className="bp-plan-revise-send",y.setAttribute("data-testid","plan-revise-send"),y.textContent=h("gpui.ask.plan.sendrev","Send revision"),y.disabled=g.value.trim().length===0;let w=()=>{let M=g.value.trim();if(!M)return;this.planRevisingId="",this.planReviseDrafts.delete(e.id),this.cb.onAnswerAsk(e.id,`revise:${M}`)},C=()=>{this.closePlanRevise()};b.addEventListener("keydown",(M)=>{if(M.key==="Escape")M.preventDefault(),M.stopPropagation(),C()}),g.addEventListener("input",()=>{this.planReviseDrafts.set(e.id,g.value),y.disabled=g.value.trim().length===0}),g.addEventListener("keydown",(M)=>{if(M.key==="Enter"&&!M.shiftKey)M.preventDefault(),w()}),y.addEventListener("click",w);let L=document.createElement("button");L.type="button",L.className="bp-btn-ghost",L.textContent=h("common.cancel","Cancel"),L.addEventListener("click",C),b.append(g,y,L),i.appendChild(b)}}else{let l=document.createElement("div");l.className="bp-ask-answered",l.textContent=h("web.chat.answered","Answered: {answer}",{answer:e.answered??""}),i.appendChild(l)}return i}}var mr={claude:"Claude Code",codex:"Codex CLI",grok:"Grok CLI",muse:"Muse Code",antigravity:"Google Antigravity",opencode:"OpenCode",pi:"Pi",omp:"Oh My Pi"};var ui=/[\x00-\x1f\x7f]/,hr=/\s/;function vt(e){return e.trim().replace(/^@+/,"").toLowerCase()}function dt(e,t){if(ui.test(e)||ui.test(t))return"";let n=vt(e),i=t.trim();if(!n||!i||n.includes("/")||hr.test(n))return"";if(n.length+1+i.length>200)return"";return`${n}/${i}`}function mi(e){let t=e.indexOf("/");if(t<=0)return null;let n=e.slice(0,t),i=e.slice(t+1);if(!dt(n,i))return null;return{provider:vt(n),model:i.trim()}}function nt(e){if(!Array.isArray(e))return[];let t=[],n=new Set;for(let i of e){if(typeof i!=="string")continue;let r=mi(i);if(!r)continue;let s=`${r.provider}/${r.model}`;if(!n.has(s)){if(n.add(s),t.push(s),t.length>=64)break}}return t}function vn(e,t,n,i){let r=dt(t,n),s=nt(e);if(!r)return{keys:s,starred:!1};let a=s.indexOf(r),o=i!==void 0?i:a<0;if(o&&a<0){if(s.length>=64)return{keys:s,starred:!1};s.push(r)}else if(!o&&a>=0)s.splice(a,1);return{keys:s,starred:o}}function Qe(e){return e&&typeof e==="object"&&!Array.isArray(e)?e:null}function ft(e){return Array.isArray(e)?e:[]}function Se(e){return typeof e==="string"?e:""}function br(e){return mr[e]??e}function hi(e,t,n,i){let r=new Map;for(let a of e)r.set(a.provider,a);let s=[];for(let a of nt(t)){let o=mi(a);if(!o)continue;let c=r.get(o.provider),p=Boolean(c&&c.models.some((m)=>m.value!=="")),l=c?.models.find((m)=>m.value===o.model),u=l?l.ok&&(c?.ok??!0):c?.ok??!0,d=l?.why||c?.why||"";if(u&&p&&!l)u=!1,d="not available on this machine";s.push({key:a,provider:o.provider,model:o.model,label:l?.label||o.model,note:l?.note||"",on:o.provider===n&&o.model===i,ok:u,why:d})}return s}function bi(e,t=[]){let n=Qe(e),i=Qe(n?.picker)??n??{},r=ft(i.sections).map(Qe).filter((N)=>Boolean(N)),s=(N)=>r.find((Z)=>Se(Z.action)===N),a=s("provider"),o=s("model"),c=s("effort"),p=ft(a?.choices).map(Qe).filter((N)=>Boolean(N)),l=ft(o?.choices).map(Qe).filter((N)=>Boolean(N)),u=ft(c?.choices).map(Qe).filter((N)=>Boolean(N)),d=Se(i.chip),m=Se(p.find((N)=>N.on===!0)?.value)||d.split("/")[0]?.trim()||"claude",f=vt(m)||"claude",b=Se(l.find((N)=>N.on===!0)?.value),g=Se(u.find((N)=>N.on===!0)?.value),y=u.map((N)=>({value:Se(N.value),label:Se(N.label)||"auto",on:N.on===!0})),w=Qe(i.agents),C=[],L=new Set,M=(N)=>{let Z=vt(N);if(Z&&!L.has(Z))L.add(Z),C.push(Z)};for(let N of p)M(Se(N.value)||Se(N.label));if(w)for(let N of Object.keys(w))M(N);M(f);let P=C.map((N)=>{let Z=p.find((ee)=>vt(Se(ee.value)||Se(ee.label))===N),oe=Qe(w?.[N]),se=oe?oe.ok!==!1:Z?Z.ok!==!1:!0,ye=Se(oe?.why)||Se(Z?.why),Pe=ft(oe?.models).map(Qe).filter((ee)=>Boolean(ee)),Ee;if(Pe.length>0)Ee=Pe.map((ee)=>{let re=Se(ee.value),I=Se(ee.label)||(re===""?"default":re),ue=Se(ee.note);return{value:re,label:I,note:ue,on:N===f&&re===b,ok:ee.ok!==!1&&se,why:Se(ee.why)||ye}});else if(N===f&&l.length>0)Ee=l.map((ee)=>{let re=Se(ee.value),I=Se(ee.label);return{value:re,label:re===""?"default":re,note:I&&I!==re?I:"",on:ee.on===!0,ok:ee.ok!==!1&&se,why:Se(ee.why)||ye}});else if(se)Ee=[{value:"",label:"default",note:"",on:N===f&&b==="",ok:!0,why:""}];else Ee=[];if(N===f&&b&&!Ee.some((ee)=>ee.value===b)){let ee=l.find((I)=>Se(I.value)===b),re=Se(ee?.label);Ee.push({value:b,label:b,note:re&&re!==b?re:"",on:!0,ok:!0,why:""})}return{provider:N,label:br(N),ok:se,why:ye,models:Ee}}),T=Array.isArray(i.favoriteKeys),R=ft(i.favorites).map(Qe).filter((N)=>Boolean(N)),D=T?nt(i.favoriteKeys):R.length>0?nt(R.map((N)=>Se(N.key)||dt(Se(N.provider),Se(N.model)))):nt(t),O=R.length>0?R.map((N)=>{let Z=vt(Se(N.provider)),oe=Se(N.model).trim(),se=dt(Z,oe);if(!se)return null;return{key:se,provider:Z,model:oe,label:Se(N.label)||oe,note:Se(N.note),on:N.on===!0||Z===f&&oe===b,ok:N.ok!==!1,why:Se(N.why)}}).filter((N)=>Boolean(N)):hi(P,D,f,b);return{chip:d,provider:f,model:b,effort:g,efforts:y,providers:P,favoriteKeys:D,favorites:O}}function jt(e,t){let n=nt(t);return{...e,favoriteKeys:n,favorites:hi(e.providers,n,e.provider,e.model)}}function gi(e,t){let n=t.trim().toLowerCase().split(/\s+/).filter(Boolean),i=(o)=>{if(n.length===0)return!0;let c=o.toLowerCase();return n.every((p)=>c.includes(p))},r=new Set(e.favoriteKeys),s=e.favorites.filter((o)=>i(`${o.provider} ${o.model} ${o.label} ${o.note}`)),a=[];for(let o of e.providers){let c=o.models.filter((p)=>i(`${o.provider} ${o.label} ${p.value} ${p.label} ${p.note}`)).map((p)=>{let l=p.value?dt(o.provider,p.value):"";return{...p,provider:o.provider,starrable:p.value!=="",starred:Boolean(l&&r.has(l))}});if(c.length>0||n.length===0&&!o.ok&&o.why)a.push({provider:o.provider,label:o.label,ok:o.ok,why:o.why,models:c})}return{favorites:s,groups:a,efforts:e.efforts}}var fi={claude:{viewBox:"0 0 24 24",d:"m4.7144 15.9555 4.7174-2.6471.079-.2307-.079-.1275h-.2307l-.7893-.0486-2.6956-.0729-2.3375-.0971-2.2646-.1214-.5707-.1215-.5343-.7042.0546-.3522.4797-.3218.686.0608 1.5179.1032 2.2767.1578 1.6514.0972 2.4468.255h.3886l.0546-.1579-.1336-.0971-.1032-.0972L6.973 9.8356l-2.55-1.6879-1.3356-.9714-.7225-.4918-.3643-.4614-.1578-1.0078.6557-.7225.8803.0607.2246.0607.8925.686 1.9064 1.4754 2.4893 1.8336.3643.3035.1457-.1032.0182-.0728-.164-.2733-1.3539-2.4467-1.445-2.4893-.6435-1.032-.17-.6194c-.0607-.255-.1032-.4674-.1032-.7285L6.287.1335 6.6997 0l.9957.1336.419.3642.6192 1.4147 1.0018 2.2282 1.5543 3.0296.4553.8985.2429.8318.091.255h.1579v-.1457l.1275-1.706.2368-2.0947.2307-2.6957.0789-.7589.3764-.9107.7468-.4918.5828.2793.4797.686-.0668.4433-.2853 1.8517-.5586 2.9021-.3643 1.9429h.2125l.2429-.2429.9835-1.3053 1.6514-2.0643.7286-.8196.85-.9046.5464-.4311h1.0321l.759 1.1293-.34 1.1657-1.0625 1.3478-.8804 1.1414-1.2628 1.7-.7893 1.36.0729.1093.1882-.0183 2.8535-.607 1.5421-.2794 1.8396-.3157.8318.3886.091.3946-.3278.8075-1.967.4857-2.3072.4614-3.4364.8136-.0425.0304.0486.0607 1.5482.1457.6618.0364h1.621l3.0175.2247.7892.522.4736.6376-.079.4857-1.2142.6193-1.6393-.3886-3.825-.9107-1.3113-.3279h-.1822v.1093l1.0929 1.0686 2.0035 1.8092 2.5075 2.3314.1275.5768-.3218.4554-.34-.0486-2.2039-1.6575-.85-.7468-1.9246-1.621h-.1275v.17l.4432.6496 2.3436 3.5214.1214 1.0807-.17.3521-.6071.2125-.6679-.1214-1.3721-1.9246L14.38 17.959l-1.1414-1.9428-.1397.079-.674 7.2552-.3156.3703-.7286.2793-.6071-.4614-.3218-.7468.3218-1.4753.3886-1.9246.3157-1.53.2853-1.9004.17-.6314-.0121-.0425-.1397.0182-1.4328 1.9672-2.1796 2.9446-1.7243 1.8456-.4128.164-.7164-.3704.0667-.6618.4008-.5889 2.386-3.0357 1.4389-1.882.929-1.0868-.0062-.1579h-.0546l-6.3385 4.1164-1.1293.1457-.4857-.4554.0608-.7467.2307-.2429 1.9064-1.3114Z"},codex:{viewBox:"0 0 256 260",d:"M239.184 106.203a64.716 64.716 0 0 0-5.576-53.103C219.452 28.459 191 15.784 163.213 21.74A65.586 65.586 0 0 0 52.096 45.22a64.716 64.716 0 0 0-43.23 31.36c-14.31 24.602-11.061 55.634 8.033 76.74a64.665 64.665 0 0 0 5.525 53.102c14.174 24.65 42.644 37.324 70.446 31.36a64.72 64.72 0 0 0 48.754 21.744c28.481.025 53.714-18.361 62.414-45.481a64.767 64.767 0 0 0 43.229-31.36c14.137-24.558 10.875-55.423-8.083-76.483Zm-97.56 136.338a48.397 48.397 0 0 1-31.105-11.255l1.535-.87l51.67-29.825a8.595 8.595 0 0 0 4.247-7.367v-72.85l21.845 12.636c.218.111.37.32.409.563v60.367c-.056 26.818-21.783 48.545-48.601 48.601Zm-104.466-44.61a48.345 48.345 0 0 1-5.781-32.589l1.534.921l51.722 29.826a8.339 8.339 0 0 0 8.441 0l63.181-36.425v25.221a.87.87 0 0 1-.358.665l-52.335 30.184c-23.257 13.398-52.97 5.431-66.404-17.803ZM23.549 85.38a48.499 48.499 0 0 1 25.58-21.333v61.39a8.288 8.288 0 0 0 4.195 7.316l62.874 36.272l-21.845 12.636a.819.819 0 0 1-.767 0L41.353 151.53c-23.211-13.454-31.171-43.144-17.804-66.405v.256Zm179.466 41.695l-63.08-36.63L161.73 77.86a.819.819 0 0 1 .768 0l52.233 30.184a48.6 48.6 0 0 1-7.316 87.635v-61.391a8.544 8.544 0 0 0-4.4-7.213Zm21.742-32.69l-1.535-.922l-51.619-30.081a8.39 8.39 0 0 0-8.492 0L99.98 99.808V74.587a.716.716 0 0 1 .307-.665l52.233-30.133a48.652 48.652 0 0 1 72.236 50.391v.205ZM88.061 139.097l-21.845-12.585a.87.87 0 0 1-.41-.614V65.685a48.652 48.652 0 0 1 79.757-37.346l-1.535.87l-51.67 29.825a8.595 8.595 0 0 0-4.246 7.367l-.051 72.697Zm11.868-25.58L128.067 97.3l28.188 16.218v32.434l-28.086 16.218l-28.188-16.218l-.052-32.434Z"},grok:{viewBox:"0 0 24 24",d:"M9.497 15.122 L16.811 9.491 C17.169 9.215 17.682 9.323 17.852 9.751 C18.752 12.013 18.35 14.73 16.561 16.596 C14.772 18.462 12.283 18.871 10.007 17.939 L7.522 19.139 C11.087 21.68 15.416 21.052 18.121 18.229 C20.267 15.991 20.931 12.941 20.31 10.19 L20.315 10.196 C19.414 6.155 20.537 4.54 22.837 1.237 C22.891 1.159 22.946 1.08 23 1 L19.974 4.156 L19.974 4.146 L9.495 15.124 M7.987 16.49 C5.429 13.941 5.87 9.996 8.053 7.721 C9.667 6.037 12.313 5.35 14.622 6.361 L17.102 5.166 C16.655 4.829 16.082 4.467 15.425 4.213 C12.455 2.938 8.9 3.573 6.485 6.088 C4.163 8.51 3.433 12.234 4.687 15.411 C5.624 17.786 4.088 19.466 2.541 21.162 C1.993 21.763 1.443 22.364 1 23 L7.985 16.492"},muse:{viewBox:"0 0 24 24",d:"M10.73.032c-1.333 0-2.032 1.016-2.032 2.285 0 2.223 2.127 4.953 4.318 4.953 1.301 0 2-.953 2-2.254 0-2.254-2.095-4.984-4.286-4.984m8.413 2.984c-1.968 0-3.397 2.73-3.397 4.825 0 1.556.794 3.016 2.254 3.016 2 0 3.365-2.762 3.365-4.794 0-1.523-.762-3.047-2.222-3.047M4.857 4.159c-1.968 0-3.778 1.016-3.778 2.54 0 1.65 2.16 2.793 4.254 2.793 1.873 0 3.778-.92 3.778-2.508 0-1.682-2.159-2.825-4.254-2.825m-.222 6.476C2.413 10.635 0 13.175 0 15.397c0 1.301.825 2.159 2.095 2.159 2.19 0 4.603-2.508 4.603-4.794 0-1.27-.761-2.127-2.063-2.127m16.667.698c-2.223 0-5.016 1.62-5.016 3.651 0 1.238 1.047 2.19 2.698 2.19 2.159 0 5.016-1.587 5.016-3.682 0-1.302-1.08-2.159-2.698-2.159M7.619 16c-1.524 0-2.38 1.746-2.38 3.429 0 2.063 1.269 4.54 3.047 4.54 1.524 0 2.38-1.81 2.38-3.461C10.667 18.57 9.46 16 7.62 16m6.571 1.016c-1.333 0-2.476.667-2.476 2.032 0 2.095 2.667 4.063 4.92 4.063 1.366 0 2.54-.73 2.54-2.063 0-2.032-2.698-4.032-4.984-4.032"},antigravity:{viewBox:"0 0 24 24",d:"M20.197 20.618 C21.318 21.459 23 20.898 21.459 19.357 C16.834 14.873 17.815 2.541 12.07 2.541 C6.325 2.541 7.306 14.873 2.682 19.357 C1 21.038 2.822 21.459 3.943 20.618 C8.287 17.675 8.006 12.49 12.07 12.49 C16.134 12.49 15.853 17.675 20.197 20.618 Z"},opencode:{viewBox:"0 0 24 24",d:"M22 24H2V0h20zM17 4.8H7v14.4h10z"},pi:{viewBox:"0 0 24 24",d:"M0 0v24h6v-6h6v-6H6V6h6v6h6V0Zm18 12v12h6V12Z"},omp:{viewBox:"0 0 24 24",d:"M1.44 3.86 L22.56 3.86 C23 3.86 23 3.86 23 4.3 L23 6.06 C23 6.5 23 6.5 22.56 6.5 L1.44 6.5 C1 6.5 1 6.5 1 6.06 L1 4.3 C1 3.86 1 3.86 1.44 3.86 Z M4.74 6.5 L6.5 6.5 C6.94 6.5 6.94 6.5 6.94 6.94 L6.94 19.7 C6.94 20.14 6.94 20.14 6.5 20.14 L4.74 20.14 C4.3 20.14 4.3 20.14 4.3 19.7 L4.3 6.94 C4.3 6.5 4.3 6.5 4.74 6.5 Z M15.74 6.5 L17.5 6.5 C17.94 6.5 17.94 6.5 17.94 6.94 L17.94 13.32 C17.94 13.76 17.94 13.76 17.5 13.76 L15.74 13.76 C15.3 13.76 15.3 13.76 15.3 13.32 L15.3 6.94 C15.3 6.5 15.3 6.5 15.74 6.5 Z M15.08 14.64 L18.16 14.64 C18.82 14.64 18.82 14.64 18.82 15.3 L18.82 17.5 C18.82 18.16 18.82 18.16 18.16 18.16 L15.08 18.16 C14.42 18.16 14.42 18.16 14.42 17.5 L14.42 15.3 C14.42 14.64 14.42 14.64 15.08 14.64 Z"}};var yt="http://www.w3.org/2000/svg",vi=4,yi=new Set(["image/png","image/jpeg","image/webp","image/gif"]);function Xt(e){let t=document.createElementNS(yt,"svg");t.setAttribute("viewBox","0 0 24 24"),t.setAttribute("width","15"),t.setAttribute("height","15"),t.setAttribute("fill","none"),t.setAttribute("stroke","currentColor"),t.setAttribute("stroke-width","1.8"),t.setAttribute("aria-hidden","true");for(let n of e){let i=document.createElementNS(yt,"path");i.setAttribute("d",n),t.appendChild(i)}return t}function yn(){return Xt(["M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z","M14 2v6h6","M16 13H8","M16 17H8","M10 9H8"])}function wi(){return Xt(["M6 4l14 8-14 8z"])}function Ei(e){let t=document.createElementNS(yt,"svg");t.setAttribute("viewBox","0 0 24 24"),t.setAttribute("width","13"),t.setAttribute("height","13"),t.setAttribute("fill",e?"currentColor":"none"),t.setAttribute("stroke","currentColor"),t.setAttribute("stroke-width","1.8"),t.setAttribute("stroke-linejoin","round"),t.setAttribute("aria-hidden","true");let n=document.createElementNS(yt,"path");return n.setAttribute("d","M12 2.5l2.9 6 6.6.9-4.8 4.6 1.2 6.5L12 17.4l-5.9 3.1 1.2-6.5-4.8-4.6 6.6-.9z"),t.appendChild(n),t}function ki(e){let t=(e||"").toLowerCase();if(t.includes("claude")||t.includes("anthropic"))return{mark:"claude",glyph:"A",color:"#d97757",title:"Claude"};if(t.includes("codex")||t.includes("openai"))return{mark:"codex",glyph:"O",color:"#10a37f",title:"Codex"};if(t.includes("gemini")||t.includes("antigravity")||t==="agy")return{mark:"antigravity",glyph:"G",color:"#4285f4",title:"Antigravity"};if(t.includes("grok"))return{mark:"grok",glyph:"X",color:"#6b7280",title:"Grok"};if(t.includes("muse"))return{mark:"muse",glyph:"M",color:"#8b5cf6",title:"Muse"};if(t.includes("opencode"))return{mark:"opencode",glyph:"C",color:"#2563eb",title:"OpenCode"};if(t.includes("omp")||t.includes("oh-my-pi"))return{mark:"omp",glyph:"Ω",color:"#c026d3",title:"Oh My Pi"};if(t==="pi"||t.startsWith("pi/")||t.startsWith("@pi"))return{mark:"pi",glyph:"π",color:"#db2777",title:"Pi"};return{glyph:"●",color:"var(--accent)",title:e||"Model"}}function Ci(e){let t=fi[e];if(!t||!t.d)return null;let n=document.createElementNS(yt,"svg");n.setAttribute("viewBox",t.viewBox||"0 0 24 24"),n.setAttribute("width","14"),n.setAttribute("height","14"),n.setAttribute("fill","currentColor"),n.setAttribute("aria-hidden","true");let i=document.createElementNS(yt,"path");return i.setAttribute("d",t.d),n.appendChild(i),n}class wn{popupEl;attachStripEl;planBarEl;fileInput;textarea;memoryEl;memoryFill;memoryText;modelBtn;providerMarkEl;modelTextEl;ctxEl;modelPickerEl;modelSearchInput;modelPickerBodyEl;modelPickerEffortsEl;modelPickerOpen=!1;modelPickerLoading=!1;modelPickerSnap=null;modelPickerQuery="";modelPickerFocusIdx=-1;onDocMouseDown;planChipBtn;planChipIconHost;planChipLbl;attachBtn;voiceBtn;sendBtn;stopBtn;errorEl;replyEl;cb;commands=[];popupMode="none";filteredSlash=[];mentionItems=[];popupIdx=0;enabled=!1;attachments=[];planMode=null;constructor(e,t){this.cb=t;let n=document.createElement("div");n.className="bp-composer",n.setAttribute("data-testid","composer");let i=document.createElement("div");i.className="bp-composer-inner",this.popupEl=document.createElement("div"),this.popupEl.className="bp-composer-popup bp-hidden",this.popupEl.setAttribute("data-testid","slash-menu"),this.errorEl=document.createElement("div"),this.errorEl.className="bp-composer-err bp-hidden",this.replyEl=document.createElement("div"),this.replyEl.className="bp-reply-strip bp-hidden",this.replyEl.setAttribute("data-testid","composer-reply"),this.attachStripEl=document.createElement("div"),this.attachStripEl.className="bp-attach-strip bp-hidden",this.attachStripEl.setAttribute("data-testid","composer-attachments"),this.planBarEl=document.createElement("div"),this.planBarEl.className="bp-plan-bar bp-hidden",this.planBarEl.setAttribute("data-testid","composer-plan-bar"),this.fileInput=document.createElement("input"),this.fileInput.type="file",this.fileInput.accept="image/png,image/jpeg,image/webp,image/gif",this.fileInput.multiple=!0,this.fileInput.className="bp-hidden",this.fileInput.setAttribute("data-testid","composer-file-input"),this.fileInput.addEventListener("change",()=>{if(this.fileInput.files)this.addFiles(Array.from(this.fileInput.files));this.fileInput.value=""}),this.textarea=document.createElement("textarea"),this.textarea.className="bp-composer-input",this.textarea.rows=2,this.textarea.placeholder=h("composer.placeholder","Ask anything: @bot, >thread, %project, #room, $skill, /btw"),this.textarea.setAttribute("data-testid","composer-input");let r=document.createElement("div");r.className="bp-composer-bar";let s=document.createElement("button");s.type="button",s.className="bp-composer-model",s.setAttribute("data-testid","composer-model-chip"),s.setAttribute("aria-haspopup","dialog"),s.setAttribute("aria-expanded","false"),s.title=h("composer.model.tip","Choose the model and effort"),this.modelBtn=s,this.providerMarkEl=document.createElement("span"),this.providerMarkEl.className="bp-provider-mark",this.providerMarkEl.textContent="●",this.modelTextEl=document.createElement("span"),this.modelTextEl.className="bp-model-text",this.modelTextEl.textContent="default",this.ctxEl=document.createElement("span"),this.ctxEl.className="bp-ctx-pct bp-hidden",this.ctxEl.setAttribute("data-testid","composer-ctx");let a=document.createElement("span");a.className="bp-model-caret",a.textContent="▾",s.append(this.providerMarkEl,this.modelTextEl,this.ctxEl,a),s.addEventListener("click",()=>{this.toggleModelPicker()}),this.modelPickerEl=document.createElement("div"),this.modelPickerEl.className="bp-model-picker bp-hidden",this.modelPickerEl.setAttribute("data-testid","model-picker"),this.modelPickerEl.setAttribute("role","dialog");let o=document.createElement("div");o.className="bp-mp-search-wrap",this.modelSearchInput=document.createElement("input"),this.modelSearchInput.type="search",this.modelSearchInput.className="bp-mp-search",this.modelSearchInput.placeholder=h("gpui.search.models","Search models"),this.modelSearchInput.setAttribute("data-testid","model-picker-search"),this.modelSearchInput.addEventListener("input",()=>{this.modelPickerQuery=this.modelSearchInput.value,this.modelPickerFocusIdx=-1,this.renderModelPicker()}),this.modelSearchInput.addEventListener("keydown",(l)=>{if(l.key==="Escape"){l.preventDefault(),l.stopPropagation(),this.closeModelPicker(),this.textarea.focus();return}if(l.key==="ArrowDown"||l.key==="ArrowUp"){let u=this.modelPickerFocusableButtons();if(u.length===0)return;l.preventDefault();let d=l.key==="ArrowDown"?1:-1;this.modelPickerFocusIdx=this.modelPickerFocusIdx<0?d>0?0:u.length-1:(this.modelPickerFocusIdx+d+u.length)%u.length,this.updateModelPickerKbdFocus(u);return}if(l.key==="Enter"){let u=this.modelPickerFocusableButtons(),d=this.modelPickerFocusIdx>=0&&this.modelPickerFocusIdxthis.cb.onCyclePlanMode?.()),this.memoryEl=document.createElement("div"),this.memoryEl.className="bp-composer-memory bp-hidden",this.memoryEl.setAttribute("data-testid","composer-memory");let c=document.createElement("div");c.className="bp-memory-meter",this.memoryFill=document.createElement("div"),this.memoryFill.className="bp-memory-fill",c.appendChild(this.memoryFill),this.memoryText=document.createElement("span"),this.memoryEl.append(c,this.memoryText);let p=document.createElement("div");p.className="bp-composer-btns",this.attachBtn=document.createElement("button"),this.attachBtn.type="button",this.attachBtn.className="icon bp-composer-tool",this.attachBtn.title=h("web.composer.attach","Attach image"),this.attachBtn.setAttribute("aria-label",h("web.composer.attach","Attach image")),this.attachBtn.setAttribute("data-testid","composer-attach"),this.attachBtn.appendChild(Xt(["M21.44 11.05l-9.19 9.19a6 6 0 0 1-8.49-8.49l9.19-9.19a4 4 0 0 1 5.66 5.66l-9.2 9.19a2 2 0 0 1-2.83-2.83l8.49-8.48"])),this.attachBtn.addEventListener("click",()=>this.fileInput.click()),this.voiceBtn=document.createElement("button"),this.voiceBtn.type="button",this.voiceBtn.className="icon bp-composer-tool",this.voiceBtn.title=h("web.composer.voice","Voice dictation"),this.voiceBtn.setAttribute("aria-label",h("web.composer.voice","Voice dictation")),this.voiceBtn.setAttribute("data-testid","composer-voice"),this.voiceBtn.appendChild(Xt(["M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z","M19 10v2a7 7 0 0 1-14 0v-2","M12 19v4","M8 23h8"])),this.voiceBtn.addEventListener("click",()=>this.cb.onToggleVoice?.()),this.stopBtn=document.createElement("button"),this.stopBtn.type="button",this.stopBtn.className="primary stop bp-hidden",this.stopBtn.textContent=h("composer.stop","Stop"),this.stopBtn.setAttribute("data-testid","composer-stop"),this.stopBtn.addEventListener("click",()=>this.cb.onInterrupt()),this.sendBtn=document.createElement("button"),this.sendBtn.type="button",this.sendBtn.className="primary bp-send-btn",this.sendBtn.textContent=h("composer.send","Send"),this.sendBtn.setAttribute("data-testid","composer-send"),this.sendBtn.addEventListener("click",()=>this.submit()),p.append(this.attachBtn,this.voiceBtn,this.stopBtn,this.sendBtn),r.append(s,this.planChipBtn,this.memoryEl,p),i.append(this.modelPickerEl,this.popupEl,this.errorEl,this.replyEl,this.attachStripEl,this.planBarEl,this.fileInput,this.textarea,r),n.appendChild(i),e.appendChild(n),this.onDocMouseDown=(l)=>{if(!this.modelPickerEl.isConnected){document.removeEventListener("mousedown",this.onDocMouseDown);return}if(!this.modelPickerOpen)return;let u=l.target;if(u&&(this.modelPickerEl.contains(u)||this.modelBtn.contains(u)))return;this.closeModelPicker()},document.addEventListener("mousedown",this.onDocMouseDown),this.textarea.addEventListener("paste",(l)=>{let u=l.clipboardData?.items;if(!u)return;let d=[];for(let m=0;m0)l.preventDefault(),this.addFiles(d)}),this.textarea.addEventListener("input",()=>{this.autoGrow(),this.clearError(),this.updatePopups()}),this.textarea.addEventListener("keydown",(l)=>{if(this.popupMode!=="none"){let u=this.popupMode==="slash"?this.filteredSlash.length:this.mentionItems.length;if(l.key==="ArrowDown"){l.preventDefault(),this.popupIdx=(this.popupIdx+1)%Math.max(1,u),this.renderPopup();return}if(l.key==="ArrowUp"){l.preventDefault(),this.popupIdx=(this.popupIdx-1+Math.max(1,u))%Math.max(1,u),this.renderPopup();return}if(l.key==="Tab"||l.key==="Enter"&&!l.shiftKey&&this.shouldCompleteOnEnter()){l.preventDefault(),this.applyPopupChoice(this.popupIdx);return}if(l.key==="Escape"){l.preventDefault(),this.closePopup();return}}if(l.key==="Tab"&&l.shiftKey&&this.planMode!==null){l.preventDefault(),this.cb.onCyclePlanMode?.();return}if(l.key==="Enter"&&!l.shiftKey)l.preventDefault(),this.submit()})}setCommands(e){this.commands=e.map((t)=>({...t,word:t.word.replace(/^\//,"")}))}setModelChip(e,t,n){let i=ki(t),r=i.mark?Ci(i.mark):null;if(r)this.providerMarkEl.replaceChildren(r);else this.providerMarkEl.textContent=i.glyph;if(this.providerMarkEl.style.color=i.color,this.providerMarkEl.title=i.title,this.modelTextEl.textContent=e||"default",typeof n==="number"&&Number.isFinite(n)&&n>=0)this.ctxEl.textContent=`ctx ${Math.round(n)}%`,this.ctxEl.classList.remove("bp-hidden");else this.ctxEl.textContent="",this.ctxEl.classList.add("bp-hidden")}setFeatures(e,t){this.attachBtn.classList.toggle("bp-hidden",!e),this.voiceBtn.classList.toggle("bp-hidden",!t)}setVoiceRecording(e){this.voiceBtn.classList.toggle("recording",e),this.voiceBtn.setAttribute("aria-pressed",e?"true":"false")}setVoiceLevel(e){this.voiceBtn.setAttribute("data-level",String(e))}getDraft(){return this.textarea.value}getCaret(){return this.textarea.selectionStart??this.textarea.value.length}setMemory(e){if(this.memoryEl.classList.toggle("bp-hidden",!e),!e)return;let t=e.total??0,n=t>0?Math.min(1,(e.done??0)/t):1;this.memoryFill.style.width=`${Math.round(n*100)}%`,this.memoryFill.dataset.state=e.state??"",this.memoryText.textContent=e.line??"",this.memoryEl.title=[e.status,e.lines,e.viewLine].filter(Boolean).join(` +`)}setPlanMode(e){if(this.planMode=e,this.textarea.classList.remove("is-plan","is-plan-exec"),this.sendBtn.classList.remove("is-plan","is-plan-exec"),this.planChipBtn.classList.remove("is-plan","is-exec"),this.planBarEl.classList.remove("is-exec"),!e){this.planChipBtn.classList.add("bp-hidden"),this.planChipBtn.setAttribute("aria-pressed","false"),this.planBarEl.classList.add("bp-hidden"),this.planBarEl.replaceChildren(),this.sendBtn.textContent=h("composer.send","Send");return}let t=e.phase,n=t!=="off",i=t==="armed"||t==="planning"||t==="pending",r=t==="executing";this.planChipBtn.classList.remove("bp-hidden"),this.planChipBtn.classList.toggle("is-plan",i),this.planChipBtn.classList.toggle("is-exec",r),this.planChipBtn.setAttribute("aria-pressed",n?"true":"false");let s=`${h("gpui.planmode.tip","Plan before acting (1 turn, always, or off)")} · Shift+Tab`;if(this.planChipBtn.title=s,this.planChipBtn.setAttribute("aria-label",s),this.planChipIconHost.replaceChildren(r?wi():yn()),this.planChipLbl.textContent=r?h("gpui.planmode.chip.building","Building"):t==="pending"?h("gpui.mgmt.fab.reviewbtn","Review"):i&&e.once?h("gpui.planmode.chip.once","Plan · 1t"):h("gpui.mgmt.plan.tab","Plan"),this.textarea.classList.toggle("is-plan",i),this.textarea.classList.toggle("is-plan-exec",r),this.sendBtn.classList.toggle("is-plan",i),this.sendBtn.classList.toggle("is-plan-exec",r),this.sendBtn.textContent=i?h("gpui.mgmt.plan.tab","Plan"):h("composer.send","Send"),!n){this.planBarEl.classList.add("bp-hidden"),this.planBarEl.replaceChildren();return}this.planBarEl.classList.remove("bp-hidden"),this.planBarEl.classList.toggle("is-exec",r);let a=document.createElement("span");a.className="bp-plan-bar-ic",a.appendChild(r?wi():yn());let o=document.createElement("span");o.className="bp-plan-bar-text",o.textContent=t==="armed"&&e.once?h("gpui.planmode.bar.once","Plan mode (1 turn) — explores and proposes a plan before editing"):t==="armed"?h("gpui.planmode.bar.always","Plan mode — explores and proposes a plan before editing"):t==="planning"?h("gpui.planmode.bar.planning","Planning — drafting a plan before edits"):t==="pending"?h("gpui.planmode.bar.pending","Proposed plan awaits review below"):h("gpui.planmode.bar.executing","Building the approved plan");let c=[a,o];if(t==="armed"||t==="planning"){let p=document.createElement("div");p.className="bp-plan-scopes";let l=(u,d,m,f)=>{let b=document.createElement("button");return b.type="button",b.className="bp-plan-scope-btn"+(d?" active":""),b.textContent=u,b.disabled=!this.enabled,b.setAttribute("data-testid",f),b.addEventListener("click",()=>this.cb.onSetPlanMode?.(m)),b};p.append(l(h("gpui.planmode.scope.once","1 turn"),e.once,"once","plan-scope-once"),l(h("gpui.planmode.scope.always","Always"),!e.once,"always","plan-scope-always"),l(h("gpui.bots.recall.off","Off"),!1,"off","plan-scope-off")),c.push(p)}this.planBarEl.replaceChildren(...c)}setState(e,t){if(this.enabled=e,this.textarea.disabled=!e,this.sendBtn.disabled=!e,this.attachBtn.disabled=!e,this.voiceBtn.disabled=!e,this.modelBtn.disabled=!e,!e)this.closeModelPicker();this.planChipBtn.disabled=!e,this.planBarEl.querySelectorAll(".bp-plan-scope-btn").forEach((n)=>{n.disabled=!e}),this.stopBtn.classList.toggle("bp-hidden",!t)}destroy(){document.removeEventListener("mousedown",this.onDocMouseDown)}isModelPickerOpen(){return this.modelPickerOpen}closeModelPicker(){if(!this.modelPickerOpen)return;this.modelPickerOpen=!1,this.modelPickerFocusIdx=-1,this.modelPickerEl.classList.add("bp-hidden"),this.modelBtn.classList.remove("is-open"),this.modelBtn.setAttribute("aria-expanded","false")}modelPickerFocusableButtons(){return Array.from(this.modelPickerBodyEl.querySelectorAll(".bp-mp-row-main:not(:disabled)"))}updateModelPickerKbdFocus(e){e.forEach((t,n)=>{let i=n===this.modelPickerFocusIdx;if(t.classList.toggle("is-kbd",i),i)t.scrollIntoView({block:"nearest"})})}updateFavoriteModels(e){if(!this.modelPickerSnap)return;if(this.modelPickerSnap=jt(this.modelPickerSnap,e),this.modelPickerOpen)this.renderModelPicker()}async toggleModelPicker(){if(!this.enabled)return;if(this.modelPickerOpen){this.closeModelPicker();return}this.closePopup(),this.modelPickerOpen=!0,this.modelPickerQuery="",this.modelPickerFocusIdx=-1,this.modelSearchInput.value="",this.modelPickerEl.classList.remove("bp-hidden"),this.modelBtn.classList.add("is-open"),this.modelBtn.setAttribute("aria-expanded","true"),this.modelPickerLoading=!0,this.renderModelPicker(),this.modelSearchInput.focus(),await this.reloadModelPicker()}async reloadModelPicker(){if(!this.cb.onLoadModelPicker){this.modelPickerLoading=!1,this.renderModelPicker();return}try{let e=await this.cb.onLoadModelPicker();if(!this.modelPickerOpen)return;this.modelPickerSnap=bi(e,this.cb.getFavoriteModels?.()??[])}catch{}finally{if(this.modelPickerLoading=!1,this.modelPickerOpen)this.renderModelPicker()}}async toggleFavoriteInPicker(e,t){if(!this.modelPickerSnap)return;let n=this.modelPickerSnap,i=dt(e,t);if(!i)return;let r=n.favoriteKeys.includes(i),s=vn(n.favoriteKeys,e,t);if(s.keys.length===n.favoriteKeys.length&&s.starred===r)return;if(this.modelPickerSnap=jt(n,s.keys),this.renderModelPicker(),!this.cb.onToggleFavorite)return;try{let a=await this.cb.onToggleFavorite(e,t,s.starred);if(Array.isArray(a)&&this.modelPickerSnap){if(this.modelPickerSnap=jt(this.modelPickerSnap,nt(a)),this.modelPickerOpen)this.renderModelPicker()}}catch(a){if(this.modelPickerSnap){let o=this.cb.getFavoriteModels?.(),c=Array.isArray(o)?nt(o):vn(this.modelPickerSnap.favoriteKeys,e,t,!s.starred).keys;if(this.modelPickerSnap=jt(this.modelPickerSnap,c),this.modelPickerOpen)this.renderModelPicker()}this.showError(a instanceof Error&&a.message?a.message:"Could not update favorite model")}}renderProviderGlyph(e){let t=ki(e),n=document.createElement("span");n.className="bp-mp-mark",n.style.color=t.color,n.title=t.title;let i=t.mark?Ci(t.mark):null;if(i)n.appendChild(i);else n.textContent=t.glyph;return n}makeStarButton(e,t,n,i="model-star"){let r=document.createElement("button");r.type="button",r.className="bp-mp-star"+(n?" is-starred":"");let s=n?h("gpui.picker.favorite.remove","Remove from favorites"):h("gpui.picker.favorite.add","Add to favorites");return r.title=s,r.setAttribute("aria-label",s),r.setAttribute("aria-pressed",n?"true":"false"),r.setAttribute("data-testid",`${i}-${e}-${t}`),r.appendChild(Ei(n)),r.addEventListener("click",(a)=>{a.preventDefault(),a.stopPropagation(),this.toggleFavoriteInPicker(e,t)}),r}renderModelPicker(){if(!this.modelPickerOpen)return;if(this.modelPickerFocusIdx=-1,!this.modelPickerSnap){let i=document.createElement("div");i.className="bp-mp-empty",i.textContent=this.modelPickerLoading?"…":h("gpui.no.models","No models"),this.modelPickerBodyEl.replaceChildren(i),this.modelPickerEffortsEl.classList.add("bp-hidden"),this.modelPickerEffortsEl.replaceChildren();return}let e=gi(this.modelPickerSnap,this.modelPickerQuery),t=document.createDocumentFragment();if(e.favorites.length>0){let i=document.createElement("div");i.className="bp-mp-section bp-mp-favorites",i.setAttribute("data-testid","model-picker-favorites");let r=document.createElement("div");r.className="bp-mp-head";let s=document.createElement("span");s.className="bp-mp-head-star",s.appendChild(Ei(!0));let a=document.createElement("span");a.textContent=h("gpui.picker.favorites","Favorites"),r.append(s,a),i.appendChild(r);for(let o of e.favorites){let c=document.createElement("div");c.className="bp-mp-row"+(o.on?" is-active":"")+(!o.ok?" is-disabled":""),c.setAttribute("data-testid",`model-fav-row-${o.provider}-${o.model}`);let p=document.createElement("button");if(p.type="button",p.className="bp-mp-row-main",p.disabled=!o.ok,!o.ok&&o.why)p.title=o.why;let l=document.createElement("span");l.className="bp-mp-check",l.textContent=o.on?"✓":"";let u=document.createElement("span");u.className="bp-mp-name",u.textContent=o.label;let d=document.createElement("span");d.className="bp-mp-note",d.textContent=!o.ok&&o.why?pe(o.why):o.note&&o.note!==o.label?pe(o.note):o.provider,p.append(l,this.renderProviderGlyph(o.provider),u,d),p.addEventListener("click",()=>{if(!o.ok)return;this.closeModelPicker(),this.textarea.focus(),this.cb.onSelectModel?.(o.provider,o.model)}),c.append(p,this.makeStarButton(o.provider,o.model,!0,"model-fav-star")),i.appendChild(c)}t.appendChild(i)}let n=document.createElement("div");if(n.className="bp-mp-groups",n.setAttribute("data-testid","model-picker-groups"),e.groups.length===0){let i=document.createElement("div");i.className="bp-mp-empty",i.textContent=this.modelPickerQuery.trim()?h("gpui.nothing.matches","Nothing matches"):h("gpui.no.models","No models"),n.appendChild(i)}else for(let i of e.groups){let r=document.createElement("div");r.className="bp-mp-group";let s=document.createElement("div");s.className="bp-mp-group-head";let a=document.createElement("span");if(a.className="bp-mp-group-title",a.textContent=i.label,s.append(this.renderProviderGlyph(i.provider),a),!i.ok&&i.why){let o=document.createElement("span");o.className="bp-mp-group-why",o.textContent=pe(i.why),s.appendChild(o)}r.appendChild(s);for(let o of i.models){let c=document.createElement("div");c.className="bp-mp-row"+(o.on?" is-active":"")+(!o.ok?" is-disabled":""),c.setAttribute("data-testid",`model-row-${i.provider}-${o.value||"default"}`);let p=document.createElement("button");if(p.type="button",p.className="bp-mp-row-main",p.disabled=!o.ok,!o.ok&&o.why)p.title=o.why;let l=document.createElement("span");l.className="bp-mp-check",l.textContent=o.on?"✓":"";let u=document.createElement("span");u.className="bp-mp-name",u.textContent=o.label;let d=document.createElement("span");if(d.className="bp-mp-note",d.textContent=o.note&&o.note!==o.label?pe(o.note):"",p.append(l,u,d),p.addEventListener("click",()=>{if(!o.ok)return;this.closeModelPicker(),this.textarea.focus(),this.cb.onSelectModel?.(i.provider,o.value)}),c.appendChild(p),o.starrable)c.appendChild(this.makeStarButton(i.provider,o.value,o.starred));r.appendChild(c)}n.appendChild(r)}if(t.appendChild(n),this.modelPickerBodyEl.replaceChildren(t),e.efforts.length>0){let i=document.createDocumentFragment(),r=document.createElement("span");r.className="bp-mp-efforts-lbl",r.textContent=h("model.col.effort","Effort"),i.appendChild(r);for(let s of e.efforts){let a=document.createElement("button");a.type="button",a.className="bp-mp-effort"+(s.on?" active":""),a.textContent=s.label,a.addEventListener("click",()=>{Promise.resolve(this.cb.onSelectEffort?.(s.value)).then(()=>{if(this.modelPickerOpen)this.reloadModelPicker()})}),i.appendChild(a)}this.modelPickerEffortsEl.replaceChildren(i),this.modelPickerEffortsEl.classList.remove("bp-hidden")}else this.modelPickerEffortsEl.classList.add("bp-hidden"),this.modelPickerEffortsEl.replaceChildren()}setDraft(e){this.textarea.value=e,this.autoGrow(),this.textarea.focus()}setReply(e,t,n){if(!e){this.replyEl.replaceChildren(),this.replyEl.classList.add("bp-hidden");return}let i=document.createElement("button");i.type="button",i.className="bp-reply-strip-body",i.setAttribute("data-testid","composer-reply-go");let r=document.createElement("span");r.className="bp-reply-strip-who",r.textContent=e.who;let s=document.createElement("span");if(s.className="bp-reply-strip-line",s.textContent=h("gpui.b.replying.to","↩ Replying to: {line}",{line:e.line}),i.append(r,s),t)i.addEventListener("click",t);let a=document.createElement("button");a.type="button",a.className="icon bp-reply-strip-drop",a.textContent="×";let o=h("reply.cancel","Cancel reply");if(a.title=o,a.setAttribute("aria-label",o),a.setAttribute("data-testid","composer-reply-drop"),n)a.addEventListener("click",n);this.replyEl.replaceChildren(i,a),this.replyEl.classList.remove("bp-hidden"),this.textarea.focus()}prependDraft(e){let t=this.textarea.value;this.textarea.value=t?`${e} +${t}`:e,this.autoGrow(),this.textarea.focus()}showError(e,t){let n=document.createElement("span");if(n.textContent=pe(e),t){let i=document.createElement("button");i.type="button",i.className="bp-composer-err-act",i.setAttribute("data-testid","composer-err-accounts"),i.textContent=t.label,i.addEventListener("click",t.onClick),this.errorEl.replaceChildren(n,i)}else this.errorEl.replaceChildren(n);this.errorEl.classList.remove("bp-hidden")}clearError(){this.errorEl.replaceChildren(),this.errorEl.classList.add("bp-hidden")}focus(){this.textarea.focus()}refreshLocale(){if(this.textarea.placeholder=h("composer.placeholder","Ask anything: @bot, >thread, %project, #room, $skill, /btw"),this.attachBtn.title=h("web.composer.attach","Attach image"),this.attachBtn.setAttribute("aria-label",h("web.composer.attach","Attach image")),this.voiceBtn.title=h("web.composer.voice","Voice dictation"),this.voiceBtn.setAttribute("aria-label",h("web.composer.voice","Voice dictation")),this.modelBtn.title=h("composer.model.tip","Choose the model and effort"),this.modelSearchInput.placeholder=h("gpui.search.models","Search models"),this.sendBtn.textContent=h("composer.send","Send"),this.stopBtn.textContent=h("composer.stop","Stop"),this.setPlanMode(this.planMode),this.modelPickerOpen)this.renderModelPicker()}autoGrow(){this.textarea.style.height="auto",this.textarea.style.height=`${Math.min(180,Math.max(54,this.textarea.scrollHeight))}px`}shouldCompleteOnEnter(){if(this.popupMode==="mention")return!0;if(this.popupMode==="slash"){let e=this.textarea.value;return e.startsWith("/")&&!e.includes(" ")}return!1}updatePopups(){let e=this.textarea.value;if(e.startsWith("/")&&!e.includes(" ")&&!e.includes(` +`)){let n=e.slice(1).toLowerCase();if(this.filteredSlash=this.commands.filter((i)=>i.word.toLowerCase().startsWith(n)),this.filteredSlash.length>0){this.popupMode="slash",this.popupIdx=Math.min(this.popupIdx,this.filteredSlash.length-1),this.renderPopup();return}}let t=/(?:^|\s)([@>%#])([a-zA-Z0-9._-]{1,32})$/.exec(e.slice(0,this.textarea.selectionStart));if(t){let n=t[1],i=t[2];this.cb.onQueryMentions(i,n).then((r)=>{if(r.length>0)this.mentionItems=r,this.popupMode="mention",this.popupIdx=0,this.renderPopup();else if(this.popupMode==="mention")this.closePopup()});return}this.closePopup()}closePopup(){this.popupMode="none",this.popupEl.classList.add("bp-hidden"),this.popupEl.replaceChildren()}renderPopup(){let e=document.createDocumentFragment();if(this.popupMode==="slash")this.filteredSlash.forEach((t,n)=>{let i=document.createElement("button");i.type="button",i.className="bp-popup-row"+(n===this.popupIdx?" active":""),i.setAttribute("data-testid",`slash-item-${t.word}`);let r=document.createElement("span");r.className="bp-popup-name",r.textContent=`/${t.word}`;let s=document.createElement("span");s.className="bp-popup-desc",s.textContent=t.desc||t.label,i.append(r,s),i.addEventListener("mousedown",(a)=>{a.preventDefault(),this.applyPopupChoice(n)}),e.appendChild(i)});else if(this.popupMode==="mention")this.mentionItems.forEach((t,n)=>{let i=document.createElement("button");i.type="button",i.className="bp-popup-row"+(n===this.popupIdx?" active":"");let r=document.createElement("span");r.className="bp-popup-name",r.textContent=t.word||`${t.sigil}${t.label}`;let s=document.createElement("span");s.className="bp-popup-desc",s.textContent=t.detail||t.label,i.append(r,s),i.addEventListener("mousedown",(a)=>{a.preventDefault(),this.applyPopupChoice(n)}),e.appendChild(i)});this.popupEl.replaceChildren(e),this.popupEl.classList.remove("bp-hidden")}applyPopupChoice(e){if(this.popupMode==="slash"){let t=this.filteredSlash[e];if(t)this.textarea.value=`/${t.word} `,this.autoGrow(),this.textarea.focus();this.closePopup()}else if(this.popupMode==="mention"){let t=this.mentionItems[e];if(t){let n=this.textarea.selectionStart,i=this.textarea.value.slice(0,n),r=this.textarea.value.slice(n),s=i.replace(/([@>%#][a-zA-Z0-9._-]{1,32})$/,`${t.word} `);this.textarea.value=s+r,this.textarea.selectionStart=this.textarea.selectionEnd=s.length,this.textarea.focus()}this.closePopup()}}async addFiles(e){this.clearError();for(let t of e){if(!yi.has(t.type)){this.showError(h("web.composer.unsupported","Unsupported image type: {type}",{type:t.type||t.name}));continue}if(this.attachments.length>=vi){this.showError(h("web.composer.maximages","At most {max} images per message.",{max:vi}));break}let n=await new Promise((r,s)=>{let a=new FileReader;a.onload=()=>r(String(a.result||"")),a.onerror=()=>s(Error("read failed")),a.readAsDataURL(t)}).catch(()=>""),i=n.indexOf(",");if(i<0)continue;this.attachments.push({name:t.name||`image-${this.attachments.length+1}.png`,mime:t.type,data:n.slice(i+1),previewUrl:n})}this.renderAttachments()}renderAttachments(){if(this.attachments.length===0){this.attachStripEl.classList.add("bp-hidden"),this.attachStripEl.replaceChildren();return}let e=document.createDocumentFragment();this.attachments.forEach((t,n)=>{let i=document.createElement("div");i.className="bp-attach-chip";let r=document.createElement("img");r.src=t.previewUrl,r.alt=t.name,r.className="bp-attach-thumb";let s=document.createElement("button");s.type="button",s.className="icon bp-attach-rm",s.textContent="×",s.title=h("common.remove","Remove"),s.addEventListener("click",()=>{this.attachments.splice(n,1),this.renderAttachments()}),i.append(r,s),e.appendChild(i)}),this.attachStripEl.replaceChildren(e),this.attachStripEl.classList.remove("bp-hidden")}submit(){if(!this.enabled)return;let e=this.textarea.value.trim();if(!e&&this.attachments.length===0)return;if(this.closePopup(),this.clearError(),e.startsWith("/")&&this.attachments.length===0){let n=e.slice(1).split(/\s+/)[0]?.toLowerCase()??"";if(this.commands.some((i)=>i.word.toLowerCase()===n)){this.textarea.value="",this.autoGrow(),this.cb.onRunCommand(e);return}}let t=this.attachments.map(({name:n,mime:i,data:r})=>({name:n,mime:i,data:r}));this.attachments=[],this.renderAttachments(),this.textarea.value="",this.autoGrow(),this.cb.onSend(e,t)}}async function xi(e,t=fetch){let n=await t("/auth/web/logout",{method:"POST",credentials:"same-origin",redirect:"error",headers:{"Content-Type":"application/json"},body:"{}"});if(n.status!==200||(await n.json()).state!=="revoked")throw Error("Logout was not confirmed");e()}var gr=new Set(["bom","checks","life","plan","fab"]);function Yt(e){if(!e||!Array.isArray(e.panels))return[];return e.panels.filter((t)=>t&&typeof t.id==="string"&&gr.has(t.id))}function Mi(e){let t=e?.badge?.n??0;if(!Number.isFinite(t)||t<=0)return null;return{text:t>99?"99+":String(Math.floor(t)),tone:e?.badge?.tone==="bad"?"bad":"warn"}}function Zt(e,t=22){let n=e.join(", ");if(n.length<=t)return n;let i="";for(let r=0;r0?` +${o}`.length:0)>t)return i?`${i} +${e.length-r}`:`${e[0]} +${e.length-1}`;i=a}return i}function wt(e){if(!Number.isFinite(e)||e<0)return"?";if(e<1000)return String(Math.round(e));if(e<1e6){let n=e/1000;return n<10?`${n.toFixed(1).replace(/\.0$/,"")}k`:`${Math.round(n)}k`}let t=e/1e6;return t<10?`${t.toFixed(1).replace(/\.0$/,"")}M`:`${Math.round(t)}M`}function Et(e){if(!Number.isFinite(e))return"";if(e>=1)return`$${e.toFixed(2)}`;let t=e.toFixed(4).replace(/0+$/,"");return(t.split(".")[1]??"").length<2?`$${e.toFixed(2)}`:`$${t}`}var fr=new Set(["0201","0402","0603","0805","1206","1210","1812","2010","2512"]),vr=new Set(["QFN","DFN","SOT","SOIC","SOP","SSOP","TSSOP","MSOP","QFP","LQFP","TQFP","BGA","WLCSP","SOD","TO","SON","LGA"]);function Ti(e){if(!e)return"";let t=e.indexOf(":"),i=(t>=0?e.slice(t+1):e).split("_");for(let a of i)if(fr.has(a))return a;let r=i[0]??"",s=r.replace(/[^a-zA-Z].*$/,"").toUpperCase();if(vr.has(s)){let a=r.split("-");if(a.length>=2&&/^\d+$/.test(a[1]))return`${a[0]}-${a[1]}`;return a[0]}return i.slice(0,2).join("_")}function Bi(e){let t=e?.status??"";if(!t)return null;let n=typeof e?.stock==="number"?e.stock:-1;if(t==="checking")return{text:"…",tone:"faint"};if(t==="unknown")return{text:"?",tone:"faint"};if(t==="out")return{text:`out ${wt(Math.max(n,0))}`,tone:"bad"};if(t==="low")return{text:`low ${wt(n)}`,tone:"warn"};return{text:wt(n),tone:"ok"}}function Ii(e,t){let n=t.trim().toLowerCase().split(/\s+/).filter(Boolean);if(n.length===0)return e;return e.filter((i)=>{let r=[(i.refs??[]).join(" "),i.value??"",i.footprint??"",i.mpn??"",i.fab??""].join(" ").toLowerCase();return n.every((s)=>s==="dnp"&&Boolean(i.dnp)||r.includes(s))})}function Ri(e,t){if(!t)return e;return e.filter((n)=>n.source===t)}function kn(e){if(e==="active")return{label:"Active",tone:"ok"};if(e==="nrnd")return{label:"NRND",tone:"warn"};if(e==="eol")return{label:"EOL",tone:"bad"};return{label:"Unknown",tone:"faint"}}function Qt(e){if(!Number.isFinite(e)||e<=0)return"";let t=new Date(e*1000),n=t.getUTCFullYear(),i=String(t.getUTCMonth()+1).padStart(2,"0"),r=String(t.getUTCDate()).padStart(2,"0");return`${n}-${i}-${r}`}function ji(e){return e.state==="routed"||e.state==="verified"}function Di(e){switch(e.state){case"approved":return"✓";case"edited":return"✎";case"verified":return"✓✓";case"routed":return"100%";case"rejected":case"failed":return"✗";case"routing":return typeof e.routed==="number"&&typeof e.total==="number"&&e.total>0?`${e.routed}/${e.total}`:"…";case"blocked":return`⚠ ${Math.max(1,e.problems??1)}`;default:return""}}function Hi(e){switch(e.status){case"blocked":return{key:"gpui.mgmt.plan.st.blocked",label:"Blocked",tone:"bad"};case"routing":return{key:"gpui.mgmt.plan.st.routing",label:"Routing",tone:"accent"};case"awaiting":return{key:"gpui.mgmt.plan.st.awaiting",label:"Awaiting review",tone:"warn"};case"verified":return{key:"gpui.mgmt.plan.st.verified",label:"Verified",tone:"ok"};case"routed":return{key:"gpui.mgmt.plan.st.routed",label:"Routed",tone:"ok"};case"ready":return{key:"gpui.mgmt.plan.st.approved",label:"Approved",tone:"accent"};case"partial":return{key:"gpui.mgmt.plan.st.partial",label:"Partial",tone:"warn"};case"rejected":return{key:"gpui.mgmt.plan.st.rejected",label:"Rejected",tone:"bad"};default:if((e.blocked??0)>0)return{key:"gpui.mgmt.plan.st.blocked",label:"Blocked",tone:"bad"};if(e.routing)return{key:"gpui.mgmt.plan.st.routing",label:"Routing",tone:"accent"};if((e.awaiting??0)>0)return{key:"gpui.mgmt.plan.st.awaiting",label:"Awaiting review",tone:"warn"};return{key:"gpui.mgmt.plan.st.empty",label:"Empty",tone:"faint"}}}function Fi(e){let t=e.done??0,n=e.approved??0,i=e.awaiting??0,r=e.blocked??0,s=0;if(typeof e.total!=="number"){for(let a of e.layers??[])for(let o of a.items??[])if(o.state==="routed"||o.state==="verified")t+=1;else if(o.state==="routing")s+=1;else if(o.state==="approved")n+=1}else if(e.routing)s=Math.max(0,e.total-(t+n+i+r));return[{count:t,tone:"ok"},{count:s,tone:"accent"},{count:n,tone:"input"},{count:i,tone:"warn"},{count:r,tone:"bad"}]}function $i(e){switch(e){case"current":return{text:"The fab's limits are in the DRC rules",button:null};case"stale":return{text:"The DRC rules have older fab limits",button:"Update"};case"none":return{text:"The fab's limits are not in the DRC rules",button:"Write"};default:return{text:"No KiCad project for DRC rules",button:null}}}function Gi(e){return e==="extra"?"costs-more limits":"base-price limits"}function Cn(e,t){return e.watchGen===t.watchGen&&e.editGen===t.editGen&&e.project!==""&&e.project===t.project&&e.editId!==""&&e.editId===t.editId}function Oi(e){return{project:e.project,refs:e.refs.slice(),field:e.field,value:e.was}}function xn(e,t){return e.watchGen===t.watchGen&&e.project!==""&&e.project===t.project&&e.threadId!==""&&e.threadId===t.threadId&&e.threadGen===t.threadGen}var Pi=["#f59e0b","#38bdf8","#c084fc","#2dd4bf","#ef4444","#a3e635","#f97316","#ec4899"],Si=["#14b8a6","#f59e0b","#c084fc","#22c55e","#38bdf8","#ef4444","#e879f9","#84cc16"];function Vi(e){let t=2166136261;for(let n=0;n>>0;return t}function Dt(e,t=""){let n=t.trim().toLowerCase();if(n&&n!=="#5a7a9a"&&n!=="#8a8a8a")return t;let i=e.toUpperCase();if(i.includes("3V3A")||i.includes("AVDD")||i.includes("VDDA"))return"#38bdf8";if(i.includes("1V8")||i.includes("1.8V"))return"#c084fc";if(i.includes("2V5")||i.includes("2.5V"))return"#a3e635";if(i.includes("3V3")||i.includes("3.3V")||i.includes("VCC"))return"#f59e0b";if(i.includes("5V")||i.startsWith("+5"))return"#ef4444";if(i.includes("12V")||i.includes("24V"))return"#f97316";if(i.includes("VBAT")||i.includes("VIN"))return"#ec4899";if(i.includes("GND"))return"#2dd4bf";return Pi[Vi(i)%Pi.length]}function kt(e,t=""){let n=t.trim().toLowerCase();if(n&&n!=="#8a8a8a")return t;return Si[Vi(e)%Si.length]}function Ui(e,t,n,i=14){let r=Math.max(1,Math.abs(e[2]-e[0])),s=Math.max(1,Math.abs(e[3]-e[1])),a=Math.max(20,t-i*2),o=Math.max(20,n-i*2),c=Math.max(0.05,Math.min(200,Math.min(a/r,o/s)));return{cx:(e[0]+e[2])*0.5,cy:(e[1]+e[3])*0.5,scale:c,fitted:c,touched:!1}}function We(e,t,n,i,r){return[i*0.5+(t-e.cx)*e.scale,r*0.5+(n-e.cy)*e.scale]}function en(e,t,n,i,r){let s=Math.max(0.0001,e.scale);return[e.cx+(t-i*0.5)/s,e.cy+(n-r*0.5)/s]}function Wi(e,t,n){let i=Math.max(0.0001,e.scale);return{...e,cx:e.cx-t/i,cy:e.cy-n/i,touched:!0}}function _i(e,t,n,i,r,s){let a=Math.max(0.02,e.fitted*0.35),o=Math.max(40,e.fitted*24),c=Math.max(a,Math.min(o,e.scale*t)),[p,l]=en(e,n,i,r,s);return{...e,cx:p-(n-r*0.5)/c,cy:l-(i-s*0.5)/c,scale:c,touched:!0}}function zi(e,t,n,i){let r=e.map((a)=>[a[0],a[1]]);if(r.length===0)return[n];let s=i&&t+1>=r.length?r.length:Math.min(t+1,r.length);return r.splice(s,0,[n[0],n[1]]),r}function Pn(e,t,n){let i=n?3:2;if(e.length<=i||t<0||t>=e.length)return null;let r=e.map((s)=>[s[0],s[1]]);return r.splice(t,1),r}function yr(e,t,n,i,r,s){let a=r-n,o=s-i,c=a*a+o*o;if(c<0.000001)return(e-n)*(e-n)+(t-i)*(t-i);let p=Math.max(0,Math.min(1,((e-n)*a+(t-i)*o)/c)),l=n+p*a,u=i+p*o;return(e-l)*(e-l)+(t-u)*(t-u)}function Ai(e,t,n){if(n.length<3)return!1;let i=!1;for(let r=0,s=n.length-1;rt!==p>t&&e<(c-a)*(t-o)/(p-o+0.000000000001)+a)i=!i}return i}function Sn(e,t){return Math.max(5,Math.min(32,e*t))}function tn(e,t,n,i,r,s,a,o,c){if(i){for(let d of e){if(d.layer!==n||d.id!==i||d.locked)continue;let m=d.path??[];for(let f=0;f=3)for(let f=0;f=0;d--){let m=t[d];if(m.layer!==n)continue;let f=m.outline??[];if(!Ai(l,u,f))continue;if(!(m.holes??[]).some((g)=>Ai(l,u,g)))return{kind:"region",id:m.id}}return null}function Ct(e){let t=null,n=null,i=[];for(let s of e){if(!s.layer)continue;i.push(s.layer);let a=s.items??[],o=a.filter((p)=>p.kind==="corridor").length,c=a.filter((p)=>p.kind==="plane").length;if((o>0||s.role==="signal")&&(!t||o>t.count))t={count:o,layer:s.layer};if((c>0||s.role==="power"||s.role==="plane")&&(!n||c>n.count))n={count:c,layer:s.layer}}let r=[];if(t)r.push(t.layer);if(n&&!r.includes(n.layer))r.push(n.layer);for(let s of i){if(r.length>=2)break;if(!r.includes(s))r.push(s)}return r}function Li(e,t){if(!e||e.length===0)return null;if(e.length===1)return e[0];let n=Math.max(0,Math.min(1,t)),i=0;for(let a=1;a=r&&o>0.000000001){let c=(r-s)/o;return[e[a-1][0]+(e[a][0]-e[a-1][0])*c,e[a-1][1]+(e[a][1]-e[a-1][1])*c]}s+=o}return e[e.length-1]}function pt(e,t,n){for(let i of t??[])if(i.layer===e&&i.title)return i.title;for(let i of n??[])if(i.layer===e&&i.title)return i.title;return e}function qi(e,t,n){if(e==="split"&&n.length>0)return t.filter((i)=>n.includes(i.layer));return t}function En(e,t){return!(e[2]<=t[0]||e[0]>=t[2]||e[3]<=t[1]||e[1]>=t[3])}function Ni(e,t,n){if(n.length<3)return!1;let i=!1;for(let r=0,s=n.length-1;rt!==p>t&&e<(c-a)*(t-o)/(p-o+0.000000000001)+a)i=!i}return i}function Ki(e,t){if(e.length<3)return null;let n=1/0,i=1/0,r=-1/0,s=-1/0,a=0,o=0;for(let p of e)n=Math.min(n,p[0]),i=Math.min(i,p[1]),r=Math.max(r,p[0]),s=Math.max(s,p[1]),a+=p[0],o+=p[1];let c=[[(n+r)*0.5,(i+s)*0.5],[a/e.length,o/e.length]];for(let p of[0.5,0.25,0.75,0.125,0.875])for(let l of[0.5,0.25,0.75,0.125,0.875])c.push([n+(r-n)*l,i+(s-i)*p]);for(let p of c)if(Ni(p[0],p[1],e)&&!t.some((l)=>Ni(p[0],p[1],l)))return p;return null}function Ji(e,t,n,i,r,s){let a=[];for(let l of e){let u=l.nets??0,d=l.path??[];if(u<=0||d.length<2)continue;let m=0;for(let f=1;f{let d=l.sel||l.hov?1:0,m=u.sel||u.hov?1:0;if(m!==d)return m-d;if(u.nets!==l.nets)return u.nets-l.nets;return l.b.id.localeCompare(u.b.id)});let o=[],c=[],p=(l,u,d,m,f)=>[l-d*0.5-f,u-m*0.5-f,l+d*0.5+f,u+m*0.5+f];for(let l of a){let u=l.b.name||"",d=String(l.nets),m=u?`${u} · ${l.nets}`:d,f=(l.sel||l.hov||l.pxLen>=95)&&u?[m,d]:[d],b=null,g=(w,C)=>Math.max(C*0.5+3,Math.min(Math.max(C*0.5+3,n-C*0.5-3),w)),y=(w,C)=>Math.max(C*0.5+3,Math.min(Math.max(C*0.5+3,i-C*0.5-3),w));e:for(let w of f){let C=Math.max(16,w.length*5.9+10),L=15;for(let M of[0.5,0.35,0.65,0.22,0.78]){let P=Li(l.pts,M);if(!P)continue;let[T,R]=We(t,P[0],P[1],n,i),D=g(T,C),O=y(R,15),N=p(D,O,C,15,2);if(!o.some((Z)=>En(N,Z))){b={id:l.b.id,text:w,cx:D,cy:O,pw:C,ph:15,col:l.col,sel:l.sel};break e}}}if(!b){let w=Li(l.pts,0.5);if(w){let[C,L]=We(t,w[0],w[1],n,i),M=Math.max(16,d.length*6.5+8),P=15,T=g(C,M);for(let R of[-18,18]){let D=y(L+R,15);if(!o.some((O)=>En(p(T,D,M,15,2),O))){b={id:l.b.id,text:d,cx:T,cy:D,pw:M,ph:15,col:l.col,sel:l.sel};break}}}}if(b)o.push(p(b.cx,b.cy,b.pw,b.ph,2)),c.push(b)}return c}function Xi(e,t,n,i,r,s=[]){let a=new Set(r),o=[];for(let l of e){if(!l.r||!l.b||l.b.length!==4)continue;let[u,d]=We(t,l.b[0],l.b[1],n,i),[m,f]=We(t,l.b[2],l.b[3],n,i),b=Math.abs(m-u),g=Math.abs(f-d);if(b<13||g<9)continue;let y=(u+m)*0.5,w=(d+f)*0.5;if(y<8||y>n-8||w<8||w>i-8)continue;o.push({text:l.r,cx:y,cy:w,bw:l.r.length*5.8+4,bh:11,score:b*g+(a.has(l.r)?1e4:0)})}o.sort((l,u)=>u.score-l.score);let c=[...s],p=[];for(let l of o){let u=[l.cx-l.bw*0.5,l.cy-l.bh*0.5,l.cx+l.bw*0.5,l.cy+l.bh*0.5];if(!c.some((m)=>En(u,m)))c.push(u),p.push({text:l.text,cx:l.cx,cy:l.cy})}return p}function Yi(e){if(!e||typeof e!=="object")return null;let t=e;if(t.panel&&typeof t.panel==="object")return t.panel;if(t.result&&typeof t.result==="object"){let n=t.result.panel;if(n&&typeof n==="object")return n}return null}function nn(e,t){if(!t||t.length===0)return e;let n=new Map;for(let s of e)if(s.layer)n.set(s.layer,s);let i=[],r=new Set;for(let s of t){if(!s.layer)continue;r.add(s.layer);let a=n.get(s.layer);if(a)i.push(a);else i.push({layer:s.layer,index:s.index,title:s.title||`L${s.index} · ${s.layer}`,subtitle:s.subtitle||"",role:s.role,status:"proposed",done:0,approved:0,total:0,items:[]})}for(let s of e)if(s.layer&&!r.has(s.layer))i.push(s);return i}function Zi(e,t,n,i,r,s,a,o){return e===t&&n===i&&r===s&&(o===void 0||a>=o)}var Qi="#111917",wr="#16201d",Er="rgba(212, 224, 219, 0.92)",kr="rgba(61, 80, 73, 0.72)",Cr="rgba(82, 107, 97, 0.85)";var es="#f59e0b",xr="#eef5f2",ts="#ef4444";function ut(e,t){let n=e.trim().replace(/^#/,"");if(n.length===6){let i=parseInt(n.slice(0,2),16),r=parseInt(n.slice(2,4),16),s=parseInt(n.slice(4,6),16);if(!Number.isNaN(i)&&!Number.isNaN(r)&&!Number.isNaN(s))return`rgba(${i}, ${r}, ${s}, ${t})`}return`rgba(20, 184, 166, ${t})`}function Pr(e,t,n){let i=0.14,r=0.45,s=0.85,a=!1;switch(e){case"approved":case"routing":i=0.16,r=0.51,s=0.91;break;case"edited":i=0.2,r=0.56,s=0.95;break;case"routed":case"verified":i=0.08,r=0.26,s=0.59;break;case"rejected":case"failed":i=0.05,r=0.13,s=0.27;break;case"blocked":i=0.18,r=0.48,s=0.88,a=!0;break}if(t)i=Math.min(0.35,i+0.1),r=Math.min(0.71,r+0.12),s=1;else if(n)i=Math.min(0.28,i+0.06),r=Math.min(0.63,r+0.07);return{glow:i,body:r,core:s,bad:a}}function Sr(e,t,n){let i=0.27,r=0.83,s=!1;switch(e){case"approved":case"routing":i=0.36,r=0.91;break;case"edited":i=0.38,r=0.95;break;case"routed":case"verified":i=0.16,r=0.54;break;case"rejected":case"failed":i=0.08,r=0.27;break;case"blocked":i=0.31,r=0.94,s=!0;break}if(t)i=Math.min(0.53,i+0.12),r=1;else if(n)i=Math.min(0.45,i+0.06),r=Math.min(1,r+0.1);return{fill:i,edge:r,bad:s}}function Ar(e){let t=e.items??[];if(t.some((n)=>n.state==="blocked"||n.state==="failed"))return{key:"gpui.mgmt.plan.st.blocked",label:"Blocked",tone:"bad"};if(t.some((n)=>n.state==="routing"))return{key:"gpui.mgmt.plan.st.routing",label:"Routing",tone:"accent"};if(t.some((n)=>n.state==="proposed"||n.state==="edited"))return{key:"gpui.mgmt.plan.st.awaiting",label:"Awaiting review",tone:"warn"};if(t.length>0&&t.every((n)=>n.state==="routed"||n.state==="verified"))return{key:"gpui.mgmt.plan.st.routed",label:"Routed",tone:"ok"};if(t.length>0&&t.every((n)=>n.state==="approved"||n.state==="routed"||n.state==="verified"))return{key:"gpui.mgmt.plan.st.approved",label:"Approved",tone:"accent"};return{key:"gpui.mgmt.plan.st.empty",label:"Empty",tone:"faint"}}class An{root;cb;state=null;cards=new Map;renderedLayerKey="";sharedCam=null;layerCams=new Map;hover=null;selectedVertex=null;drag=null;downPos=null;rafPending=0;constructor(e){this.cb=e,this.root=document.createElement("div"),this.root.className="bp-plan-canvas-grid",this.root.tabIndex=0,this.root.setAttribute("data-testid","mgmt-plan-canvas-grid"),this.root.addEventListener("keydown",(t)=>this.onKeyDown(t))}isDragging(){return this.drag!==null}fitAll(){this.sharedCam=null,this.layerCams.clear(),this.scheduleDraw()}destroy(){if(this.rafPending)cancelAnimationFrame(this.rafPending),this.rafPending=0;for(let e of this.cards.values())e.ro.disconnect();this.cards.clear(),this.root.replaceChildren()}visibleLayers(e){let t=nn(e.layers,e.copperLayers);if(t.length===0)return[];if(e.gridMode==="all")return t;if(e.gridMode==="single"){let r=e.shownLayers.find((a)=>t.some((o)=>o.layer===a))??Ct(t)[0]??t[0]?.layer,s=t.find((a)=>a.layer===r);return s?[s]:[]}let n=e.shownLayers.length>0&&e.shownLayers.every((r)=>t.some((s)=>s.layer===r))?e.shownLayers.slice(0,2):Ct(t),i=[];for(let r of n){let s=t.find((a)=>a.layer===r);if(s)i.push(s)}return i.length>0?i:t.slice(0,2)}update(e,t){this.state=e;let n=this.visibleLayers(e);this.root.classList.toggle("two-cols",t&&n.length>1);let i=n.map((r)=>r.layer).join("|");if(i!==this.renderedLayerKey){this.renderedLayerKey=i;for(let r of this.cards.values())r.ro.disconnect();this.cards.clear(),this.root.replaceChildren();for(let r of n){let s=this.buildCard(r);this.cards.set(r.layer,s),this.root.appendChild(s.el)}}else for(let r of n){let s=this.cards.get(r.layer);if(s)this.syncCardHeaderAndLegend(s,r)}this.scheduleDraw()}effectiveBbox(e){let t=e.bbox;if(!t||t.length!==4||Math.abs(t[2]-t[0])<0.5||Math.abs(t[3]-t[1])<0.5)return[0,0,100,70];return t}getCam(e,t,n){let i=this.state,r=i?.syncZoom?this.sharedCam:this.layerCams.get(e)??null;if(r&&r.touched)return r;return Ui(i?this.effectiveBbox(i.board):[0,0,100,70],t,n,14)}setCam(e,t){if(this.state?.syncZoom)this.sharedCam=t;else this.layerCams.set(e,t)}buildCard(e){let t=document.createElement("section");t.className="bp-plan-card",t.setAttribute("data-testid",`mgmt-plan-card-${e.layer}`);let n=document.createElement("div");n.className="bp-plan-card-head";let i=document.createElement("div");i.className="bp-plan-card-head-top";let r=document.createElement("span"),s=e.role==="power"||(e.items?.length??0)>0&&(e.items??[]).every((w)=>w.kind==="plane");r.className="bp-plan-card-bar "+(s?"pwr":"sig");let a=document.createElement("span");a.className="bp-plan-card-title";let o=document.createElement("span");o.className="bp-plan-status-badge";let c=document.createElement("button");c.type="button",c.className="bp-mgmt-btn bp-plan-mini-btn",c.textContent="✓",c.title=h("gpui.mgmt.plan.layer","Approve layer"),c.addEventListener("click",(w)=>{w.stopPropagation(),this.cb.onApproveLayer(e.layer,!0)});let p=document.createElement("button");p.type="button",p.className="bp-mgmt-btn bp-plan-mini-btn",p.textContent="✗",p.title=h("gpui.mgmt.plan.rejectlayer","Reject layer"),p.addEventListener("click",(w)=>{w.stopPropagation(),this.cb.onApproveLayer(e.layer,!1)}),i.append(r,a,o,c,p);let l=document.createElement("div");l.className="bp-plan-card-sub",n.append(i,l);let u=document.createElement("div");u.className="bp-plan-card-canvas-wrap";let d=document.createElement("canvas");d.className="bp-plan-card-canvas",d.setAttribute("data-testid",`mgmt-plan-canvas-${e.layer}`);let m=document.createElement("div");m.className="bp-plan-hover-hud bp-hidden",u.append(d,m);let f=document.createElement("div");f.className="bp-plan-legend bp-hidden",t.append(n,u,f);let b=d.getContext("2d"),g=new ResizeObserver(()=>this.scheduleDraw());g.observe(u),this.attachPointerListeners(d,e.layer);let y={layer:e.layer,el:t,canvas:d,ctx:b,legendEl:f,okBtn:c,noBtn:p,statusEl:o,titleEl:a,subtitleEl:l,hoverHudEl:m,ro:g};return this.syncCardHeaderAndLegend(y,e),y}syncCardHeaderAndLegend(e,t){e.titleEl.textContent=pt(t.layer,this.state?.copperLayers,this.state?.layers)||t.title||t.layer;let n=t.subtitle||t.stackup||"";e.subtitleEl.textContent=n,e.subtitleEl.classList.toggle("bp-hidden",!n);let i=t.items??[],r=Ar(t);e.statusEl.className=`bp-plan-card-status tone-${r.tone==="warn"?"dim":r.tone}`,e.statusEl.textContent=i.length>0?h(r.key,r.label):"",e.statusEl.classList.toggle("bp-hidden",i.length===0);let s=i.some((o)=>o.state==="proposed"||o.state==="edited");if(e.okBtn)e.okBtn.classList.toggle("bp-hidden",!s);if(e.noBtn)e.noBtn.classList.toggle("bp-hidden",!s);let a=(this.state?.regions??[]).filter((o)=>o.layer===t.layer);if(a.length===0)e.legendEl.classList.add("bp-hidden"),e.legendEl.replaceChildren();else{e.legendEl.classList.remove("bp-hidden");let o=document.createDocumentFragment();for(let c of a){let p=document.createElement("button");p.type="button";let l=this.state?.selectedId===c.id;p.className="bp-plan-legend-chip"+(l?" active":"");let u=document.createElement("span");u.className="bp-plan-legend-sw",u.style.background=Dt(c.net||c.id,c.color||"");let d=document.createElement("span");d.textContent=c.net||c.id,p.append(u,d),p.addEventListener("click",()=>{this.cb.onSelect(c.id),this.cb.onFocusItem(c.id)}),o.appendChild(p)}e.legendEl.replaceChildren(o)}}attachPointerListeners(e,t){e.addEventListener("contextmenu",(i)=>i.preventDefault()),e.addEventListener("dblclick",()=>this.fitAll()),e.addEventListener("pointerdown",(i)=>{let r=this.state;if(!r)return;this.root.focus({preventScroll:!0});let s=e.getBoundingClientRect(),a=i.clientX-s.left,o=i.clientY-s.top,c=Math.max(1,s.width),p=Math.max(1,s.height),l=this.getCam(t,c,p),u=tn(r.bands,r.regions,t,r.selectedId,l,c,p,a,o);if(i.button===2){if(u?.kind==="vertex"){let d=this.getItemPts(u.id,u.isPlane),m=Pn(d,u.idx,u.isPlane);if(m)this.selectedVertex=null,this.cb.onCommitFields(u.id,{[u.isPlane?"outline":"path"]:m})}return}if(i.button!==0)return;if(e.setPointerCapture(i.pointerId),this.downPos={x:i.clientX,y:i.clientY},u?.kind==="vertex"){let d=this.getItemPts(u.id,u.isPlane),m=d.map((f)=>[f[0],f[1]]);this.selectedVertex={id:u.id,idx:u.idx},this.drag={layer:t,kind:"vertex",id:u.id,isPlane:u.isPlane,idx:u.idx,pts:d.map((f)=>[f[0],f[1]]),origPts:m,moved:!1},this.scheduleDraw()}else if(u?.kind==="midpoint"){let d=this.getItemPts(u.id,u.isPlane),m=d.map((g)=>[g[0],g[1]]),f=zi(d,u.segIdx,u.pos,u.isPlane),b=u.isPlane&&u.segIdx+1>=d.length?f.length-1:Math.min(u.segIdx+1,f.length-1);this.selectedVertex={id:u.id,idx:b},this.patchLocalItem(u.id,u.isPlane,f),this.drag={layer:t,kind:"vertex",id:u.id,isPlane:u.isPlane,idx:b,pts:f,origPts:m,moved:!0},this.scheduleDraw()}else this.selectedVertex=null,this.drag={layer:t,kind:"pan",lastX:a,lastY:o}}),e.addEventListener("pointermove",(i)=>{let r=this.state;if(!r)return;let s=e.getBoundingClientRect(),a=i.clientX-s.left,o=i.clientY-s.top,c=Math.max(1,s.width),p=Math.max(1,s.height);if(this.drag&&this.drag.layer===t){if(this.drag.kind==="pan"){let L=this.getCam(t,c,p);this.setCam(t,Wi(L,a-this.drag.lastX,o-this.drag.lastY)),this.drag.lastX=a,this.drag.lastY=o,this.scheduleDraw();return}if(this.downPos&&Math.hypot(i.clientX-this.downPos.x,i.clientY-this.downPos.y)<1.5&&!this.drag.moved)return;let b=this.getCam(t,c,p),[g,y]=en(b,a,o,c,p),w=[Math.round(g*1000)/1000,Math.round(y*1000)/1000];this.drag.moved=!0,this.drag.pts[this.drag.idx]=w;let C=this.drag.pts.map((L)=>[L[0],L[1]]);this.patchLocalItem(this.drag.id,this.drag.isPlane,C),this.scheduleDraw();return}let l=this.getCam(t,c,p),u=tn(r.bands,r.regions,t,r.selectedId,l,c,p,a,o),d=this.hover?.hit?"id"in this.hover.hit?this.hover.hit.id:"":"",m=this.hover?.hit.kind??"",f=u?u.id:"";if(this.hover=u?{layer:t,hit:u}:null,e.style.cursor=u?"pointer":"crosshair",d!==f||(u?.kind??"")!==m)this.syncHoverHud(t),this.scheduleDraw()}),e.addEventListener("pointerleave",()=>{if(this.hover?.layer===t)this.hover=null,this.syncHoverHud(t),this.scheduleDraw()});let n=()=>{let i=this.drag;if(!i||i.layer!==t)return;if(this.drag=null,this.downPos=null,i.kind==="vertex"&&i.moved){let r=i.origPts.map((s)=>[s[0],s[1]]);this.patchLocalItem(i.id,i.isPlane,r)}this.cb.onDragEnd?.(),this.scheduleDraw()};e.addEventListener("pointercancel",n),e.addEventListener("lostpointercapture",n),e.addEventListener("pointerup",(i)=>{let r=this.state,s=this.drag,a=this.downPos;if(this.drag=null,this.downPos=null,e.hasPointerCapture(i.pointerId))e.releasePointerCapture(i.pointerId);if(s&&s.kind==="vertex"&&s.layer===t){if(s.moved)this.cb.onCommitFields(s.id,{[s.isPlane?"outline":"path"]:s.pts});else this.cb.onDragEnd?.(),this.scheduleDraw();return}if(r&&a&&Math.hypot(i.clientX-a.x,i.clientY-a.y)<4.5){let o=e.getBoundingClientRect(),c=i.clientX-o.left,p=i.clientY-o.top,l=Math.max(1,o.width),u=Math.max(1,o.height),d=this.getCam(t,l,u),m=tn(r.bands,r.regions,t,r.selectedId,d,l,u,c,p);if(m&&(m.kind==="band"||m.kind==="region")){this.cb.onSelect(m.id),this.cb.onFocusItem(m.id);return}if(!m&&r.selectedId){this.cb.onSelect("");return}}this.cb.onDragEnd?.()}),e.addEventListener("wheel",(i)=>{i.preventDefault();let r=e.getBoundingClientRect(),s=i.clientX-r.left,a=i.clientY-r.top,o=Math.max(1,r.width),c=Math.max(1,r.height),p=this.getCam(t,o,c),l=Math.max(0.65,Math.min(1.55,1-i.deltaY*0.002));this.setCam(t,_i(p,l,s,a,o,c)),this.scheduleDraw()},{passive:!1})}patchLocalItem(e,t,n){let i=this.state;if(!i)return;if(t){let r=i.regions.find((s)=>s.id===e);if(r){if(r.outline=n,r.edited=!0,r.state==="proposed")r.state="edited"}}else{let r=i.bands.find((s)=>s.id===e);if(r){if(r.path=n,r.edited=!0,r.state==="proposed")r.state="edited"}}}getItemPts(e,t){let n=this.state;if(!n)return[];if(t)return(n.regions.find((i)=>i.id===e)?.outline??[]).map((i)=>[i[0],i[1]]);return(n.bands.find((i)=>i.id===e)?.path??[]).map((i)=>[i[0],i[1]])}syncHoverHud(e){let t=this.cards.get(e),n=this.state;if(!t||!n)return;if(!this.hover||this.hover.layer!==e){t.hoverHudEl.classList.add("bp-hidden"),t.hoverHudEl.textContent="";return}let i=this.hover.hit.id,r=n.bands.find((o)=>o.id===i),s=n.regions.find((o)=>o.id===i),a="";if(r)a=`${r.name||i} · ${r.nets??0}n · ${(r.width??1.5).toFixed(2)}mm`;else if(s)a=s.reference?`${s.net||i} · ${s.reference}`:s.net||i;if(!a)t.hoverHudEl.classList.add("bp-hidden");else t.hoverHudEl.classList.remove("bp-hidden"),t.hoverHudEl.textContent=a}onKeyDown(e){let t=this.state;if(!t)return;if(e.key==="0"||e.key==="Home"){e.preventDefault(),this.fitAll();return}if(e.key==="Escape"){this.selectedVertex=null,this.cb.onSelect("");return}if(!t.selectedId)return;let n=t.bands.find((a)=>a.id===t.selectedId),i=t.regions.find((a)=>a.id===t.selectedId),r=Boolean(n?.locked??i?.locked),s=e.key.toLowerCase();if(s==="a")e.preventDefault(),this.cb.onQuickApprove([t.selectedId],!0);else if(s==="r")e.preventDefault(),this.cb.onQuickApprove([t.selectedId],!1);else if(s==="l")e.preventDefault(),this.cb.onCommitFields(t.selectedId,{locked:!r});else if(s==="w"&&n&&!r){e.preventDefault();let a=e.shiftKey?-0.25:0.25,o=Math.round(Math.max(0.15,Math.min(25,(n.width??1.5)+a))*100)/100;this.cb.onCommitFields(t.selectedId,{width:o})}else if((e.key==="Delete"||e.key==="Backspace")&&!r&&this.selectedVertex?.id===t.selectedId){e.preventDefault();let a=Boolean(i),o=this.getItemPts(t.selectedId,a),c=Pn(o,this.selectedVertex.idx,a);if(c)this.selectedVertex=null,this.cb.onCommitFields(t.selectedId,{[a?"outline":"path"]:c})}}scheduleDraw(){if(this.rafPending)return;this.rafPending=requestAnimationFrame(()=>{this.rafPending=0,this.drawAll()})}drawAll(){let e=this.state;if(!e)return;let t=Math.max(0.45,Math.min(1.25,Math.abs(this.effectiveBbox(e.board)[3]-this.effectiveBbox(e.board)[1])/Math.max(1,Math.abs(this.effectiveBbox(e.board)[2]-this.effectiveBbox(e.board)[0]))));for(let n of this.cards.values()){let i=n.canvas.parentElement;if(!i)continue;let r=Math.max(120,Math.round(i.clientWidth)),s=Math.max(165,Math.min(250,Math.round(r*t)));n.canvas.style.height=`${s}px`;let a=Math.max(1,window.devicePixelRatio||1),o=Math.round(r*a),c=Math.round(s*a);if(n.canvas.width!==o||n.canvas.height!==c)n.canvas.width=o,n.canvas.height=c;n.ctx.setTransform(a,0,0,a,0,0),this.drawLayer(n.ctx,n.layer,r,s,e)}}drawLayer(e,t,n,i,r){let s=this.getCam(t,n,i),a=(b,g)=>We(s,b,g,n,i);e.fillStyle=Qi,e.fillRect(0,0,n,i);let o=(r.board.outline??[]).filter((b)=>b.length>=3);if(e.fillStyle=wr,o.length>0){e.beginPath();for(let b of o){for(let g=0;gb.layer===t),p=this.hover?.layer===t?this.hover.hit:null;for(let b of c){let g=b.outline??[];if(g.length<3)continue;let y=r.selectedId===b.id,w=p?.id===b.id,C=Sr(b.state||"proposed",y,w),L=Dt(b.net||b.id,b.color||"");e.beginPath();for(let P=0;PR)R=N;if(Z>D)D=Z}if(Math.abs(R-P)>=38&&Math.abs(D-T)>=18){let O=Ki(g,b.holes??[]);if(O){let[N,Z]=a(O[0],O[1]);e.fillStyle=ut(L,y?0.91:0.67),e.font="bold 10px ui-monospace, 'SFMono-Regular', Menlo, monospace",e.textAlign="center",e.textBaseline="middle",e.fillText(M,N,Z)}}}}if(e.strokeStyle=Er,e.lineWidth=1.25,e.lineCap="round",e.lineJoin="round",o.length>0){e.beginPath();for(let b of o){for(let g=0;gb.layer===t),d=Ji(u,s,n,i,r.selectedId,p?.id??""),m=d.map((b)=>[b.cx-b.pw*0.5-1,b.cy-b.ph*0.5-1,b.cx+b.pw*0.5+1,b.cy+b.ph*0.5+1]),f=[];for(let b of u){for(let g of b.from??[])f.push(g);for(let g of b.to??[])f.push(g)}e.fillStyle="rgba(143, 163, 155, 0.72)",e.font="9.5px ui-monospace, 'SFMono-Regular', Menlo, monospace",e.textAlign="center",e.textBaseline="middle";for(let b of Xi(l,s,n,i,f,m))e.fillText(b.text,b.cx,b.cy);for(let b of u){let g=b.guides??[];if(g.length===0)continue;let y=r.selectedId===b.id||p?.id===b.id,w=kt(b.name||b.id,b.color||"");e.strokeStyle=ut(w,y?0.38:0.17),e.lineWidth=y?1:0.7,e.beginPath();for(let C of g){let[L,M]=a(C[0],C[1]),[P,T]=a(C[2],C[3]);e.moveTo(L,M),e.lineTo(P,T)}e.stroke()}for(let b of u){let g=b.path??[];if(g.length<2)continue;let y=r.selectedId===b.id,w=p?.id===b.id,C=Pr(b.state||"proposed",y,w),L=kt(b.name||b.id,b.color||""),M=Sn(b.width??1.5,s.scale),P=()=>{e.beginPath();for(let T=0;T{let w=y?g.length:Math.max(0,g.length-1);for(let C=0;Cn.id===e))return;if(this.openPanel!==e)this.togglePanel(e)}getTabs(){return Yt(this.getStateInfo())}isOpen(){return this.openPanel!==""}closePanel(){if(!this.openPanel)return;if(this.openPanel="",this.project)this.cb.hub.rpc("mgmt.panel",{project:this.project,open:""}).catch(()=>{});this.render()}clear(){this.watchGen++,this.bomEditGen++,this.askedProject="",this.digest="",this.project="",this.openPanel="",this.errorMsg="",this.bomEditingId="",this.bomLastUndo=null,this.bomEditStatus="",this.checksStatus="",this.planStatus="",this.planSelectedId="",this.planStackupOpen=!1,this.planShownLayers=[],this.planOptimistic.clear(),this.planOptimisticRev=void 0,this.planHydratedKey="",this.planHydrateAskedKey="",this.planHydrateGen++,this.planHydratedRev=void 0,this.planRenderDeferred=!1,this.planHydratedBoard=null,this.planHydratedDraw=null,this.planNoteOpen=!1,this.planMoveLayerOpen=!1,this.planCanvas?.destroy(),this.planCanvas=null,this.planCommitFields=null,this.fabStatus="",this.render()}async watchProject(e){if(!e||!this.cb.hub.hasFeature("mgmt")){this.clear();return}if(e===this.askedProject&&this.digest){this.render();return}let t=++this.watchGen;if(this.askedProject=e,this.project!==e)this.bomEditGen++,this.digest="",this.project="",this.openPanel="",this.errorMsg="",this.bomSelectedId="",this.bomEditingId="",this.bomEditStatus="",this.bomLastUndo=null,this.checksSelectedId="",this.checksStatus="",this.planStatus="",this.planSelectedId="",this.planStackupOpen=!1,this.planShownLayers=[],this.planOptimistic.clear(),this.planOptimisticRev=void 0,this.planHydratedKey="",this.planHydrateAskedKey="",this.planHydrateGen++,this.planHydratedRev=void 0,this.planRenderDeferred=!1,this.planHydratedBoard=null,this.planHydratedDraw=null,this.planNoteOpen=!1,this.planMoveLayerOpen=!1,this.planCanvas?.destroy(),this.planCanvas=null,this.planCommitFields=null,this.fabStatus="",this.lifeSelectedKey="",this.lifePartSamples=null,this.render();try{let n=await this.cb.hub.rpc("mgmt.watch",{project:e});if(t!==this.watchGen)return;let i=typeof n.digest==="string"?n.digest:"";if(!i){this.render();return}if(this.digest=i,this.project=typeof n.project==="string"&&n.project?n.project:e,n.state&&typeof n.state==="object")this.infos.set(`mgmt.state.${i}`,n.state);if(n.data&&typeof n.data==="object"){for(let[r,s]of Object.entries(n.data))if(s&&typeof s==="object")this.infos.set(`mgmt.${r}.${i}`,s)}this.errorMsg="",this.render()}catch{if(t===this.watchGen)this.render()}}handleInfo(e){let t=!1;for(let[n,i]of Object.entries(e)){if(!n.startsWith("mgmt.")&&!n.startsWith("kicad.checks."))continue;if(i===""||i===null||i===void 0){if(this.infos.delete(n))t=!0;continue}if(typeof i==="string")try{let r=JSON.parse(i);if(r&&typeof r==="object")this.infos.set(n,r),t=!0}catch{}else if(typeof i==="object")this.infos.set(n,i),t=!0}if(t)this.render()}getStateInfo(){if(!this.digest)return null;return this.infos.get(`mgmt.state.${this.digest}`)??null}getPanelData(e){if(!this.digest)return null;return this.infos.get(`mgmt.${e}.${this.digest}`)??null}togglePanel(e){let t=this.openPanel===e?"":e;if(this.openPanel=t,this.errorMsg="",this.render(),this.project)this.cb.hub.rpc("mgmt.panel",{project:this.project,open:t}).catch((n)=>{this.errorMsg=n instanceof Error?n.message:"Could not update panel",this.render()})}render(){if(this.openPanel==="plan"&&this.planCanvas?.isDragging()){this.planRenderDeferred=!0;return}this.planRenderDeferred=!1;let e=this.getStateInfo(),t=Yt(e);if(!this.digest||t.length===0){this.planCanvas?.destroy(),this.planCanvas=null,this.panelEl.classList.remove("bp-plan-expanded"),this.stripEl.classList.add("bp-hidden"),this.panelEl.classList.add("bp-hidden"),this.panelEl.removeAttribute("data-testid"),this.panelEl.replaceChildren(),this.stripEl.replaceChildren(),this.cb.onOpenChange?.(!1);return}this.stripEl.classList.remove("bp-hidden");let n=document.createDocumentFragment(),i=document.createElement("div");i.className="bp-mgmt-tabs";for(let a of t){let o=document.createElement("button");o.type="button";let c=this.openPanel===a.id;o.className="bp-mgmt-tab"+(c?" active":""),o.setAttribute("data-testid",`mgmt-tab-${a.id}`),o.setAttribute("aria-pressed",c?"true":"false");let p=document.createElement("span");p.textContent=pe(a.label),o.appendChild(p);let l=this.getPanelData(a.id),u=Mi(l);if(u){let d=document.createElement("span");d.className=`bp-mgmt-badge bp-tone-${u.tone}`,d.textContent=u.text,o.appendChild(d)}o.addEventListener("click",()=>this.togglePanel(a.id)),i.appendChild(o)}if(n.appendChild(i),this.openPanel){let a=document.createElement("button");a.type="button",a.className="icon bp-mgmt-close",a.textContent="×",a.title=h("gpui.mgmt.close","Close the panel"),a.setAttribute("aria-label",h("gpui.mgmt.close","Close the panel")),a.setAttribute("data-testid","mgmt-close"),a.addEventListener("click",()=>this.closePanel()),n.appendChild(a)}if(this.stripEl.replaceChildren(n),!this.openPanel){this.planCanvas?.destroy(),this.planCanvas=null,this.panelEl.classList.remove("bp-plan-expanded"),this.panelEl.classList.add("bp-hidden"),this.panelEl.removeAttribute("data-testid"),this.panelEl.replaceChildren(),this.cb.onOpenChange?.(!1);return}if(this.openPanel!=="plan")this.planCanvas?.destroy(),this.planCanvas=null,this.panelEl.classList.remove("bp-plan-expanded");else this.panelEl.classList.toggle("bp-plan-expanded",this.planExpanded);this.panelEl.classList.remove("bp-hidden"),this.panelEl.setAttribute("data-testid",`mgmt-panel-${this.openPanel}`),this.cb.onOpenChange?.(!0);let r=this.openPanel==="plan"&&this.planCanvas!==null&&document.activeElement instanceof HTMLElement&&this.panelEl.contains(document.activeElement)&&(document.activeElement===this.planCanvas.root||this.planCanvas.root.contains(document.activeElement)),s=document.createDocumentFragment();if(this.errorMsg){let a=document.createElement("div");a.className="bp-mgmt-note bp-tone-bad",a.textContent=this.errorMsg,s.appendChild(a)}switch(this.openPanel){case"bom":s.appendChild(this.renderBom());break;case"checks":s.appendChild(this.renderChecks());break;case"life":s.appendChild(this.renderLife());break;case"plan":s.appendChild(this.renderPlan());break;case"fab":s.appendChild(this.renderFab());break}if(this.panelEl.replaceChildren(s),r)this.planCanvas?.root.focus({preventScroll:!0})}renderBom(){let e=document.createElement("div");e.className="bp-mgmt-body";let t=this.getPanelData("bom");if(!t)return e.appendChild(this.makeEmpty("Reading the schematic…")),e;let n=Array.isArray(t.lines)?t.lines:[],i=document.createElement("div");i.className="bp-mgmt-head";let r=document.createElement("span");r.className="bp-dim",r.textContent=`${t.parts??0} parts · ${n.length} lines`;let s=document.createElement("span"),a=t.source==="kicad";if(s.className="bp-mgmt-pill"+(a?" accent":""),s.textContent=a?"live":"saved",i.append(r,s),(t.priced??0)>0&&(t.checking??0)===0&&typeof t.cost==="number"){let p=document.createElement("span");p.className="bp-dim",p.textContent=(t.priced??0)<(t.lookups??0)?`≥ ${Et(t.cost)}/board`:`${Et(t.cost)}/board`,i.appendChild(p)}if(t.paused){let p=document.createElement("span");p.className="bp-mgmt-faint",p.textContent="Stock check paused",i.appendChild(p)}if(e.appendChild(i),t.stock_note){let p=document.createElement("div");p.className="bp-mgmt-note bp-mgmt-faint",p.textContent=pe(t.stock_note),e.appendChild(p)}let o=this.bomEditingId?n.find((p)=>p.id===this.bomEditingId)??null:null;if(o)e.appendChild(this.renderBomEditor(o));else{let p=document.createElement("div");p.className="bp-mgmt-filter-row";let l=document.createElement("input");l.type="text",l.className="bp-mgmt-filter",l.placeholder="Filter BOM (ref, value, footprint, MPN, dnp)…",l.value=this.bomFilter,l.setAttribute("data-testid","mgmt-bom-filter"),l.addEventListener("input",()=>{this.bomFilter=l.value,this.renderBomRows(c,n)}),p.appendChild(l),e.appendChild(p)}let c=document.createElement("div");return c.className="bp-mgmt-rows",c.setAttribute("data-testid","mgmt-bom-rows"),this.renderBomRows(c,n),e.appendChild(c),e}renderBomRows(e,t){let n=Ii(t,this.bomFilter);if(n.length===0){e.replaceChildren(this.makeEmpty(t.length===0?"No parts found.":"No matching lines."));return}let i=t.some((s)=>Boolean(s.mpn)||Boolean(s.fab)),r=document.createDocumentFragment();for(let s of n){let a=Array.isArray(s.refs)?s.refs:[],o=document.createElement("div");o.className="bp-mgmt-row"+(this.bomSelectedId===s.id?" active":"")+(s.dnp?" faint":""),o.setAttribute("data-testid",`mgmt-bom-row-${s.id}`);let c=document.createElement("div");c.className="bp-mgmt-row-line";let p=document.createElement("span");if(p.className="bp-mgmt-strong bp-mgmt-flex1",p.textContent=Zt(a,24),c.appendChild(p),s.dnp){let b=document.createElement("span");b.className="bp-mgmt-pill",b.textContent=h("gpui.mgmt.bom.dnp","DNP"),c.appendChild(b)}else{let b=Bi(s.stock);if(b){let g=document.createElement("span");g.className=`bp-tone-${b.tone}`,g.textContent=b.text,c.appendChild(g)}}let l=document.createElement("button");l.type="button",l.className="bp-mgmt-btn",l.textContent="Edit",l.addEventListener("click",(b)=>{b.stopPropagation(),this.bomEditGen++,this.bomEditingId=s.id,this.bomEditDraft=s.mpn??"",this.bomEditStatus="",this.bomLastUndo=null,this.render()}),c.appendChild(l);let u=document.createElement("div");u.className="bp-mgmt-row-sub";let d=[`${s.qty??a.length}×`,s.value??"",Ti(s.footprint??"")].filter(Boolean).join(" · "),m=document.createElement("span");m.className="bp-dim",m.textContent=d;let f=document.createElement("span");if(f.className="bp-mgmt-flex1",s.mpn)f.textContent=s.mpn;else if(i&&!s.dnp)f.className+=" bp-tone-warn",f.textContent=h("gpui.mgmt.bom.nompn","no MPN");if(u.append(m,f),!s.dnp&&typeof s.stock?.price==="number"){let b=document.createElement("span");b.className="bp-dim",b.textContent=Et(s.stock.price),u.appendChild(b)}if(!s.dnp&&s.stock?.class){let b=document.createElement("span");b.className="bp-mgmt-faint",b.textContent=pe(s.stock.class),u.appendChild(b)}o.append(c,u),o.addEventListener("click",()=>{this.bomSelectedId=s.id,this.renderBomRows(e,t)}),r.appendChild(o)}e.replaceChildren(r)}renderBomEditor(e){let t=document.createElement("div");t.className="bp-mgmt-editor",t.setAttribute("data-testid","mgmt-bom-edit");let n=Array.isArray(e.refs)?e.refs:[],i=document.createElement("div");i.className="bp-mgmt-row-line";let r=document.createElement("span");r.className="bp-mgmt-strong",r.textContent=Zt(n,30);let s=document.createElement("button");s.type="button",s.className="icon",s.textContent="×",s.addEventListener("click",()=>{this.bomEditGen++,this.bomEditingId="",this.bomLastUndo=null,this.bomEditStatus="",this.render()}),i.append(r,s);let a=document.createElement("input");a.type="text",a.className="bp-mgmt-filter",a.placeholder="MPN",a.value=this.bomEditDraft,a.addEventListener("input",()=>{this.bomEditDraft=a.value});let o=()=>({watchGen:this.watchGen,editGen:this.bomEditGen,project:this.project,editId:this.bomEditingId}),c=async(d,m=!1)=>{let f=o();this.bomEditStatus="Writing…",this.render();try{let b=await this.cb.hub.rpc("mgmt.bom.edit",d);if(!Cn(f,o()))return;this.bomLastUndo=!m&&(b.changed??0)>0?{project:d.project,editId:f.editId,refs:d.refs.slice(),field:d.field,was:typeof b.was==="string"?b.was:d.field==="mpn"?e.mpn??"":e.dnp?"yes":"no"}:null,this.bomEditStatus=m?"Restored":(b.changed??0)===0?"No change":b.via==="kicad"?"Updated in KiCad":"Saved to schematic"}catch(b){if(!Cn(f,o()))return;this.bomEditStatus=b instanceof Error?b.message:"Could not save edit"}this.render()},p=document.createElement("div");p.className="bp-mgmt-btn-row";let l=document.createElement("button");l.type="button",l.className="primary bp-mgmt-btn",l.textContent="Save MPN",l.addEventListener("click",()=>{c({project:this.project,refs:n.slice(),field:"mpn",value:this.bomEditDraft.trim()})});let u=document.createElement("button");if(u.type="button",u.className="bp-mgmt-btn",u.textContent=e.dnp?"Clear DNP":"Mark DNP",u.addEventListener("click",()=>{c({project:this.project,refs:n.slice(),field:"dnp",value:e.dnp?"no":"yes"})}),p.append(l,u),this.bomLastUndo&&this.bomLastUndo.project===this.project&&this.bomLastUndo.editId===this.bomEditingId){let d=this.bomLastUndo,m=document.createElement("button");m.type="button",m.className="bp-mgmt-btn",m.textContent="Undo",m.addEventListener("click",()=>{c(Oi(d),!0)}),p.appendChild(m)}if(t.append(i,a,p),this.bomEditStatus){let d=document.createElement("div");d.className="bp-mgmt-faint",d.textContent=this.bomEditStatus,t.appendChild(d)}return t}renderChecks(){let e=document.createElement("div");e.className="bp-mgmt-body";let t=this.getPanelData("checks");if(!t)return e.appendChild(this.makeEmpty("Reading checks…")),e;let n=Array.isArray(t.groups)?t.groups:[],i=Array.from(new Set(n.map((d)=>d.source).filter(Boolean))),r=(d)=>t.sources?.[d]?.label||d.toUpperCase(),s=(d)=>t.sources?.[d]?.judged===!0,a=document.createElement("div");a.className="bp-mgmt-head bp-mgmt-scroll-x";let o=document.createElement("button");o.type="button",o.className="bp-mgmt-btn"+(this.checksSource===""?" active":""),o.textContent=h("gpui.mgmt.checks.all","All"),o.addEventListener("click",()=>{this.checksSource="",this.render()}),a.appendChild(o);for(let d of i){let m=document.createElement("button");m.type="button",m.className="bp-mgmt-btn"+(this.checksSource===d?" active":""),m.textContent=r(d)+(s(d)?" · judged":""),m.addEventListener("click",()=>{this.checksSource=this.checksSource===d?"":d,this.render()}),a.appendChild(m)}let c=document.createElement("span");c.className="bp-mgmt-flex1";let p=document.createElement("button");if(p.type="button",p.className="bp-mgmt-btn",p.textContent=h("gpui.mgmt.checks.run","Run"),p.addEventListener("click",()=>{let d=this.watchGen,m=this.project;this.checksStatus="Running checks…",this.render(),this.cb.hub.rpc("kicad.checks.run",{project:m}).then(()=>{if(d!==this.watchGen||m!==this.project)return;this.checksStatus="",this.render()}).catch((f)=>{if(d!==this.watchGen||m!==this.project)return;this.checksStatus=f instanceof Error?f.message:"Could not run checks",this.render()})}),a.append(c,p),e.appendChild(a),this.checksStatus){let d=document.createElement("div");d.className="bp-mgmt-note bp-dim",d.textContent=this.checksStatus,e.appendChild(d)}let l=document.createElement("div");l.className="bp-mgmt-rows",l.setAttribute("data-testid","mgmt-checks-rows");let u=Ri(n,this.checksSource);if(u.length===0)l.appendChild(this.makeEmpty("No check findings."));else for(let d of u){let m=d.severity==="error"?"bad":d.severity==="warning"?"warn":"faint",f=document.createElement("div");f.className="bp-mgmt-group-head";let b=document.createElement("span");b.className=`bp-mgmt-dot bp-tone-bg-${m}`;let g=document.createElement("span");g.className="bp-mgmt-flex1",g.textContent=`${r(d.source)} · ${d.rule}`;let y=document.createElement("span");y.className=`bp-tone-${m}`,y.textContent=String(d.n),f.append(b,g,y),l.appendChild(f);for(let w of d.rows??[]){let C=document.createElement("div");C.className="bp-mgmt-row"+(this.checksSelectedId===w.id?" active":"");let L=document.createElement("div");if(L.textContent=pe(w.title??""),C.appendChild(L),w.names||this.checksSelectedId===w.id){let M=document.createElement("div");M.className="bp-mgmt-row-sub";let P=document.createElement("span");if(P.className="bp-dim bp-mgmt-flex1",P.textContent=w.names??"",M.appendChild(P),this.checksSelectedId===w.id){let T=document.createElement("button");T.type="button",T.className="bp-mgmt-btn accent",T.textContent=h("gpui.mgmt.checks.fix","Fix with agent"),T.addEventListener("click",(R)=>{R.stopPropagation();let D={watchGen:this.watchGen,project:this.project,threadId:this.cb.getThreadId(),threadGen:this.cb.getThreadGen()};this.cb.hub.rpc("kicad.checks.fix",{project:D.project,id:w.id}).then((O)=>{let N={watchGen:this.watchGen,project:this.project,threadId:this.cb.getThreadId(),threadGen:this.cb.getThreadGen()};if(!xn(D,N))return;if(O.text)this.cb.onSendText(O.text),this.checksStatus="Sent to agent",this.render()}).catch((O)=>{let N={watchGen:this.watchGen,project:this.project,threadId:this.cb.getThreadId(),threadGen:this.cb.getThreadGen()};if(!xn(D,N))return;this.checksStatus=O instanceof Error?O.message:"Could not send finding",this.render()})}),M.appendChild(T)}C.appendChild(M)}C.addEventListener("click",()=>{this.checksSelectedId=w.id,this.cb.hub.rpc("kicad.checks.focus",{project:this.project,id:w.id}).catch(()=>{}),this.render()}),l.appendChild(C)}}return e.appendChild(l),e}renderLife(){let e=document.createElement("div");e.className="bp-mgmt-body";let t=this.getPanelData("life");if(!t)return e.appendChild(this.makeEmpty("Reading lifecycle…")),e;let n=document.createElement("div");n.className="bp-mgmt-head";let i=t.counts??{};for(let c of["active","nrnd","eol"]){let p=i[c]??0,l=kn(c),u=document.createElement("span");u.className=p>0?`bp-tone-${l.tone}`:"bp-mgmt-faint",u.textContent=`${l.label} ${p}`,n.appendChild(u)}if((i.unknown??0)>0){let c=document.createElement("span");c.className="bp-mgmt-faint",c.textContent=`${i.unknown} unknown`,n.appendChild(c)}if(t.since){let c=document.createElement("span");c.className="bp-mgmt-flex1";let p=document.createElement("span");p.className="bp-mgmt-faint",p.textContent=`since ${Qt(t.since)} (${t.samples??0})`,n.append(c,p)}e.appendChild(n);let r=document.createElement("div");r.className="bp-mgmt-rows",r.setAttribute("data-testid","mgmt-life-rows");let s=t.bom?.cost??[],a=t.bom?.instock??[],o=t.bom?.lines??0;if(s.length===0)r.appendChild(this.makeEmpty(o===0?"No line has an MPN or fab part number to follow yet.":"No reading of the fab's stock yet: the BOM panel's lookups start it."));else{let c=s[s.length-1],p=a[a.length-1],l=document.createElement("div");l.className="bp-mgmt-note bp-dim",l.textContent=`Parts/board: ${Et(c[1])} · ${Math.round(p?.[1]??0)}/${o} lines in stock (${Qt(c[0])})`,r.appendChild(l)}for(let c of t.parts??[]){let p=this.lifeSelectedKey===c.key,l=kn(c.lifecycle??"unknown"),u=document.createElement("div");u.className="bp-mgmt-row"+(p?" active":"");let d=document.createElement("div");d.className="bp-mgmt-row-line";let m=document.createElement("span");m.className="bp-mgmt-strong",m.textContent=Zt(c.refs??[],14);let f=document.createElement("span");f.className="bp-mgmt-flex1 bp-dim",f.textContent=c.mpn||c.key;let b=document.createElement("span");if(b.className=`bp-tone-${l.tone}`,b.textContent=l.label,d.append(m,f,b),typeof c.stock==="number"){let g=document.createElement("span");g.className="bp-dim",g.textContent=wt(c.stock),d.appendChild(g)}if(u.appendChild(d),p){let g=document.createElement("div");if(g.className="bp-mgmt-row-sub bp-mgmt-faint",this.lifePartLoading)g.textContent=h("gpui.mgmt.life.reading","Reading its history…");else if(this.lifePartSamples&&this.lifePartSamples.length>0){let y=this.lifePartSamples[this.lifePartSamples.length-1];g.textContent=`${this.lifePartSamples.length} samples · latest ${y.at?Qt(y.at):""}`+(typeof y.stock==="number"?` · stock ${wt(y.stock)}`:"")+(typeof y.price==="number"?` · ${Et(y.price)}`:"")}else g.textContent=h("gpui.mgmt.life.nopart","No reading of this part yet.");u.appendChild(g)}u.addEventListener("click",()=>{if(this.lifeSelectedKey===c.key){this.lifeSelectedKey="",this.lifePartSamples=null,this.render();return}this.lifeSelectedKey=c.key,this.lifePartSamples=null,this.lifePartLoading=!0,this.render(),this.cb.hub.rpc("mgmt.life.part",{project:this.project,key:c.key}).then((g)=>{if(this.lifeSelectedKey!==c.key)return;this.lifePartLoading=!1,this.lifePartSamples=Array.isArray(g.samples)?g.samples:[],this.render()}).catch(()=>{if(this.lifeSelectedKey!==c.key)return;this.lifePartLoading=!1,this.lifePartSamples=[],this.render()})}),r.appendChild(u)}return e.appendChild(r),e}renderPlan(){let e=document.createElement("div");e.className="bp-mgmt-body";let t=this.getPanelData("plan");if(!t)return e.appendChild(this.makeEmpty(h("gpui.mgmt.plan.reading","Reading the routing plan…"))),e;let n=(k,x)=>{let H=this.watchGen,B=this.project;this.planStatus="",this.cb.hub.rpc(k,{pro:B,...x}).catch((K)=>{if(H!==this.watchGen||B!==this.project)return;this.planOptimistic.clear(),this.planStatus=K instanceof Error?K.message:h("gpui.mgmt.plan.refused","KiCad refused"),this.render()})};if(t.revision!==this.planOptimisticRev)this.planOptimisticRev=t.revision,this.planOptimistic.clear();let i=`${this.project}:${t.revision??0}`;if(t.board_trimmed&&this.planHydrateAskedKey!==i&&this.project){this.planHydrateAskedKey=i;let k=this.watchGen,x=++this.planHydrateGen,H=this.project,B=t.revision??0;this.cb.hub.rpc("plan.get",{pro:H,board:!0}).then((K)=>{let ie=Yi(K);if(!ie)return;let we=typeof ie.revision==="number"?ie.revision:B;if(!Zi(k,this.watchGen,x,this.planHydrateGen,H,this.project,we,this.planHydratedRev))return;this.planHydratedRev=we,this.planHydratedKey=`${H}:${we}`,this.planHydratedBoard=ie.board??null,this.planHydratedDraw=ie.draw??null,this.render()}).catch(()=>{})}let r=t.on===!0,s=document.createElement("div");s.className="bp-plan-header";let a=document.createElement("div");a.className="bp-plan-toggle";let o=document.createElement("span");o.className="bp-mgmt-strong",o.textContent=h("gpui.mgmt.plan.before","Plan before routing"),o.title=r?h("gpui.mgmt.plan.onwords","Before routing a board with 4 or more copper layers or more than 60 nets, the agent proposes corridors and plane regions here. It routes only what you approve."):h("gpui.mgmt.plan.offwords","Agents route as you ask. Turn it on to have them propose a routing plan first and route only what you approve here."),a.appendChild(o);let c=t.awaiting??0,p=t.blocked??0,l=t.done??0,u=t.total??0,d=t.revision??0,m=t.empty?[]:Fi(t),f=m.reduce((k,x)=>k+x.count,0);if(!t.empty){let k=Hi(t),x=document.createElement("span");if(x.className=`bp-plan-status-badge tone-${k.tone}`,x.textContent=h(k.key,k.label),a.appendChild(x),d>0){let B=document.createElement("span");B.className="bp-dim",B.textContent=`v${d}`,a.appendChild(B)}let H=document.createElement("span");if(H.className="bp-plan-header-counts bp-mgmt-flex1 "+(c>0?"bp-tone-warn":p>0?"bp-tone-bad":"bp-dim"),H.textContent=u>0?`${l}/${u} ${h("gpui.mgmt.plan.done","done")}`:c>0?h("web.plan.awaiting","{n} awaiting approval",{n:c}):h("gpui.mgmt.plan.nothing","Nothing awaits your approval"),a.appendChild(H),!t.live){let B=document.createElement("span");B.className="bp-mgmt-pill",B.textContent=h("gpui.mgmt.plan.saved","saved plan"),a.appendChild(B)}}else{let k=document.createElement("span");k.className="bp-mgmt-flex1",a.appendChild(k)}let b=document.createElement("button");b.type="button",b.className="bp-mgmt-btn bp-plan-chip-btn"+(r?" active":""),b.setAttribute("data-testid","mgmt-plan-on"),b.setAttribute("aria-pressed",r?"true":"false"),b.textContent=h("gpui.bots.recall.on","On"),b.addEventListener("click",()=>n("plan.enable",{on:!0}));let g=document.createElement("button");if(g.type="button",g.className="bp-mgmt-btn bp-plan-chip-btn"+(!r?" active":""),g.setAttribute("data-testid","mgmt-plan-off"),g.setAttribute("aria-pressed",!r?"true":"false"),g.textContent=h("gpui.bots.recall.off","Off"),g.addEventListener("click",()=>n("plan.enable",{on:!1})),a.append(b,g),s.appendChild(a),f>0){let k=document.createElement("div");k.className="bp-plan-segbar";for(let x of m){if(x.count<=0)continue;let H=document.createElement("div");H.className=`bp-plan-seg bp-tone-bg-${x.tone}`,H.style.flexGrow=String(x.count),k.appendChild(H)}s.appendChild(k)}e.appendChild(s);for(let k of t.elsewhere??[]){let x=document.createElement("div");x.className="bp-plan-elsewhere";let H=document.createElement("span");H.className="bp-tone-warn bp-mgmt-flex1",H.textContent=h("gpui.mgmt.plan.elsewhere","A routing plan for {board} awaits your approval",{board:k.name||k.rel||""}),x.appendChild(H),e.appendChild(x)}if(t.empty){let k=document.createElement("div");k.className="bp-mgmt-note";let x=document.createElement("div");x.className="bp-dim",x.textContent=h("gpui.mgmt.plan.noboard","No routing plan for this board.");let H=document.createElement("div");return H.className="bp-mgmt-faint",H.textContent=h("gpui.mgmt.plan.emptysub","Layers, corridors, and planes appear here once a plan is proposed."),k.append(x,H),e.appendChild(k),e}let y=t.stackup_summary??"",w=Array.isArray(t.impedances)?t.impedances:[],C=Boolean(y)||w.length>0,L=document.createElement("div");if(L.className="bp-mgmt-head",c>0){let k=document.createElement("button");k.type="button",k.className="primary bp-mgmt-btn",k.setAttribute("data-testid","mgmt-plan-approve-all"),k.textContent=h("gpui.mgmt.plan.all","Approve all"),k.addEventListener("click",()=>n("plan.approve",{layer:"",ids:[],approve:!0})),L.appendChild(k)}if(t.routing){let k=document.createElement("button");k.type="button",k.className="bp-mgmt-btn",k.setAttribute("data-testid","mgmt-plan-stop"),k.textContent=h("gpui.mgmt.plan.stop","Stop routing"),k.addEventListener("click",()=>n("plan.stop",{})),L.appendChild(k)}if(t.live&&l>0){let k=document.createElement("button");k.type="button",k.className="bp-mgmt-btn",k.setAttribute("data-testid","mgmt-plan-verify"),k.textContent=h("gpui.mgmt.plan.verify","Verify"),k.addEventListener("click",()=>n("plan.verify",{})),L.appendChild(k)}let M=document.createElement("span");if(M.className="bp-mgmt-flex1",L.appendChild(M),C){let k=document.createElement("button");k.type="button",k.className="bp-mgmt-btn bp-plan-chip-btn"+(this.planStackupOpen?" active":""),k.setAttribute("data-testid","mgmt-plan-stackup-toggle"),k.setAttribute("aria-expanded",this.planStackupOpen?"true":"false"),k.textContent=`${h("gpui.mgmt.plan.stackup.short","Stackup")} ${this.planStackupOpen?"▾":"▸"}`,k.addEventListener("click",()=>{this.planStackupOpen=!this.planStackupOpen,this.render()}),L.appendChild(k)}let P=document.createElement("button");P.type="button",P.className="bp-mgmt-btn",P.setAttribute("data-testid","mgmt-plan-hide"),P.textContent=this.planHideDone?h("gpui.mgmt.plan.show","Show done"):h("gpui.mgmt.plan.hide","Hide done"),P.addEventListener("click",()=>{this.planHideDone=!this.planHideDone,this.render()}),L.appendChild(P),e.appendChild(L);let T=Array.isArray(t.asks)?t.asks:[];if(T.length>0){let k=T.map((ie)=>ie.what||"").filter(Boolean).join(", "),x=T[0]?.note||"",H=document.createElement("div");H.className="bp-plan-elsewhere";let B=document.createElement("div");B.className="bp-plan-ask-col";let K=document.createElement("div");if(K.className="bp-tone-warn",K.textContent=k?h("gpui.mgmt.plan.requested","Approval requested: {what}",{what:k}):h("gpui.mgmt.plan.reqplain","Approval requested"),B.appendChild(K),x){let ie=document.createElement("div");ie.className="bp-dim",ie.textContent=x,B.appendChild(ie)}H.appendChild(B),e.appendChild(H)}if(this.planStatus){let k=document.createElement("div");k.className="bp-mgmt-note bp-plan-err bp-tone-bad";let x=document.createElement("span");x.className="bp-mgmt-flex1",x.textContent=this.planStatus==="KiCad refused"?h("gpui.mgmt.plan.refused","KiCad refused"):pe(this.planStatus);let H=document.createElement("button");H.type="button",H.className="icon",H.textContent="×",H.title=h("common.close","Close"),H.addEventListener("click",()=>{this.planStatus="",this.render()}),k.append(x,H),e.appendChild(k)}if(t.keys_note){let k=document.createElement("div");k.className="bp-mgmt-note bp-dim";let x="On this KiCad version, approve from this panel: in plan view KiCad's A, R and W keys aren't the plan's yet (A opens Add Footprint). Update KiCad.";k.textContent=t.keys_note===x?h("gpui.mgmt.plan.keysnote",x):pe(t.keys_note),e.appendChild(k)}if(C&&this.planStackupOpen){let k=document.createElement("div");if(k.className="bp-plan-stackup-body",k.setAttribute("data-testid","mgmt-plan-stackup-body"),y){let x=document.createElement("div");x.className="bp-dim",x.textContent=y,k.appendChild(x)}for(let x of w){let H=document.createElement("div");H.className="bp-mgmt-faint",H.textContent=`· ${x}`,k.appendChild(H)}e.appendChild(k)}let R=(k,x,H,B)=>{let K=document.createElement("button");return K.type="button",K.className="bp-mgmt-btn bp-plan-chip-btn"+(x?" active":""),K.setAttribute("data-testid",H),K.setAttribute("aria-pressed",x?"true":"false"),K.textContent=k,K.addEventListener("click",B),K},D=document.createElement("div");if(D.className="bp-plan-viewbar",D.append(R(h("gpui.mgmt.plan.view.canvas","Canvas"),this.planViewMode==="canvas","mgmt-plan-view-canvas",()=>{this.planViewMode="canvas",this.render()}),R(h("gpui.mgmt.plan.view.split","Split"),this.planViewMode==="split","mgmt-plan-view-split",()=>{this.planViewMode="split",this.render()}),R(h("gpui.mgmt.plan.view.list","List"),this.planViewMode==="list","mgmt-plan-view-list",()=>{this.planViewMode="list",this.render()})),this.planViewMode!=="list"){let k=document.createElement("span");k.className="bp-plan-sep";let x=document.createElement("span");x.className="bp-plan-sep";let H=document.createElement("button");H.type="button",H.className="bp-mgmt-btn bp-plan-mini-btn",H.setAttribute("data-testid","mgmt-plan-fit"),H.textContent=h("gpui.mgmt.plan.fit","Fit"),H.addEventListener("click",()=>this.planCanvas?.fitAll()),D.append(k,R(h("gpui.mgmt.plan.grid.pair","Side by side"),this.planGridMode==="pair","mgmt-plan-grid-pair",()=>{this.planGridMode="pair",this.render()}),R(h("gpui.mgmt.plan.grid.all","All layers"),this.planGridMode==="all","mgmt-plan-grid-all",()=>{this.planGridMode="all",this.render()}),R(h("gpui.mgmt.plan.grid.single","Single"),this.planGridMode==="single","mgmt-plan-grid-single",()=>{this.planGridMode="single",this.render()}),x,R(h("gpui.mgmt.plan.sync","Link zoom"),this.planSyncZoom,"mgmt-plan-sync",()=>{this.planSyncZoom=!this.planSyncZoom,this.render()}),H)}let O=document.createElement("span");O.className="bp-mgmt-flex1";let N=document.createElement("button");N.type="button",N.className="bp-mgmt-btn bp-plan-mini-btn",N.setAttribute("data-testid","mgmt-plan-expand"),N.textContent=this.planExpanded?h("gpui.mgmt.plan.compact","Compact"):h("gpui.mgmt.plan.expand","Expand"),N.addEventListener("click",()=>{this.planExpanded=!this.planExpanded,this.render()}),D.append(O,N),e.appendChild(D);let Z=Boolean(this.planHydratedBoard)&&this.planHydratedKey.startsWith(`${this.project}:`)&&(this.planHydratedKey===i||this.planHydratedRev!==void 0&&this.planHydratedRev>=(t.revision??0)),oe=Z&&this.planHydratedBoard?this.planHydratedBoard:t.board??{bbox:[0,0,100,70],outline:[],parts:[]},se=Z&&this.planHydratedDraw?this.planHydratedDraw:t.draw??{bands:[],regions:[]},ye=(se.bands??[]).map((k)=>{let x=this.planOptimistic.get(k.id);if(!x)return{...k};return{...k,...x,edited:!0,state:k.state==="proposed"?"edited":k.state}}),Pe=(se.regions??[]).map((k)=>{let x=this.planOptimistic.get(k.id);if(!x)return{...k};return{...k,...x,edited:!0,state:k.state==="proposed"?"edited":k.state}}),Ee=[],ee=(t.layers??[]).map((k)=>{let x=[];for(let H of k.items??[]){let B=this.planOptimistic.get(H.id);if(!B){x.push(H);continue}let K={...H,width:typeof B.width==="number"?B.width:H.width,locked:typeof B.locked==="boolean"?B.locked:H.locked,edited:!0,state:H.state==="proposed"?"edited":H.state};if(typeof B.layer==="string"&&B.layer!==k.layer)Ee.push({target:B.layer,item:K});else x.push(K)}return{...k,items:x}});for(let k of Ee){let x=ee.find((H)=>H.layer===k.target);if(x)x.items=[...x.items??[],k.item]}let re=nn(ee,t.copper_layers),I=this.planGridMode==="all"?re.map((k)=>k.layer):this.planGridMode==="single"?[this.planShownLayers.find((k)=>re.some((x)=>x.layer===k))??Ct(re)[0]??re[0]?.layer??""].filter(Boolean):this.planShownLayers.length>0&&this.planShownLayers.every((k)=>re.some((x)=>x.layer===k))?this.planShownLayers.slice(0,2):Ct(re);if(this.planViewMode!=="list"&&this.planGridMode!=="all"&&re.length>1){let k=document.createElement("div");k.className="bp-plan-layerbar";for(let x of re){let H=I.includes(x.layer),B=(x.items??[]).length,K=pt(x.layer,t.copper_layers,re)||x.title||x.layer,ie=B>0?`${K} · ${B}`:K,we=R(ie,H,`mgmt-plan-layerpill-${x.layer}`,()=>{if(this.planGridMode==="single")this.planShownLayers=[x.layer];else if(this.planGridMode==="pair"){if(!I.includes(x.layer))this.planShownLayers=I.length>=2?[I[0],x.layer]:[...I,x.layer]}else this.planGridMode="single",this.planShownLayers=[x.layer];this.render()});if(B===0&&!H)we.classList.add("empty-layer");k.appendChild(we)}e.appendChild(k)}let ue=(k,x)=>{let H=this.planOptimistic.get(k)??{};if(this.planOptimistic.set(k,{...H,...x}),typeof x.layer==="string"){if(this.planGridMode==="single")this.planShownLayers=[x.layer];else if(this.planGridMode==="pair"&&!I.includes(x.layer))this.planShownLayers=I.length>=2?[I[0],x.layer]:[...I,x.layer]}let B=typeof t.revision==="number"?t.revision:void 0;this.render(),n("plan.update",{ops:[{op:"set",id:k,fields:x}],...B!==void 0?{base:B}:{}})};if(this.planCommitFields=ue,this.planSelectedId){let k="",x=null;for(let H of ee){let B=(H.items??[]).find((K)=>K.id===this.planSelectedId);if(B){k=H.layer,x=B;break}}if(x){let H=pt(k,t.copper_layers,re),B=document.createElement("div");B.className="bp-plan-inspector",B.setAttribute("data-testid","mgmt-plan-inspector");let K=document.createElement("div");K.className="bp-plan-ins-row";let ie=document.createElement("span");ie.className="bp-plan-ins-sw",ie.style.background=x.kind==="corridor"?kt(x.name||x.id,x.color||""):Dt(x.name||x.id,x.color||"");let we=document.createElement("span");we.className="bp-mgmt-strong",we.textContent=x.name||x.id;let j=document.createElement("span");if(j.className="bp-dim",j.textContent=H,K.append(ie,we,j),x.edited||x.state==="edited"){let q=document.createElement("span");q.className="bp-plan-ins-pill warn",q.textContent=h("gpui.mgmt.plan.edited","Edited"),K.appendChild(q)}if(x.locked){let q=document.createElement("span");q.className="bp-plan-ins-pill",q.textContent=h("gpui.mgmt.plan.locked","Locked"),K.appendChild(q)}let ne=document.createElement("span");ne.className="bp-mgmt-flex1",K.appendChild(ne);let Ne=document.createElement("button");if(Ne.type="button",Ne.className="bp-mgmt-btn bp-plan-mini-btn",Ne.setAttribute("data-testid","mgmt-plan-lock"),Ne.textContent=x.locked?h("gpui.mgmt.plan.unlock","Unlock"):h("gpui.mgmt.plan.lock","Lock"),Ne.addEventListener("click",()=>ue(x.id,{locked:!x.locked})),K.appendChild(Ne),x.state==="proposed"||x.state==="edited"){let q=document.createElement("button");q.type="button",q.className="primary bp-mgmt-btn bp-plan-mini-btn",q.textContent=h("android.hub.machines.approve","Approve"),q.addEventListener("click",()=>n("plan.approve",{layer:"",ids:[x.id],approve:!0}));let he=document.createElement("button");he.type="button",he.className="bp-mgmt-btn bp-plan-mini-btn",he.textContent=h("gpui.mgmt.plan.reject","Reject"),he.addEventListener("click",()=>n("plan.approve",{layer:"",ids:[x.id],approve:!1})),K.append(q,he)}let Ae=document.createElement("button");Ae.type="button",Ae.className="bp-mgmt-btn bp-plan-mini-btn",Ae.setAttribute("data-testid","mgmt-plan-note-toggle"),Ae.textContent=h("gpui.mgmt.plan.addnote","Add note"),Ae.addEventListener("click",()=>{this.planNoteOpen=!this.planNoteOpen,this.render()});let Me=document.createElement("button");if(Me.type="button",Me.className="icon",Me.textContent="×",Me.addEventListener("click",()=>{this.planSelectedId="",this.planNoteOpen=!1,this.planMoveLayerOpen=!1,this.render()}),K.append(Ae,Me),B.appendChild(K),!x.locked){let q=document.createElement("div");if(q.className="bp-plan-ins-row",x.kind==="corridor"){let ae=typeof x.width==="number"?x.width:1.5,Re=document.createElement("span");Re.className="bp-dim",Re.textContent=h("gpui.mgmt.plan.width","Width");let je=document.createElement("button");je.type="button",je.className="bp-mgmt-btn bp-plan-mini-btn",je.setAttribute("data-testid","mgmt-plan-w-down"),je.textContent="-",je.addEventListener("click",()=>{let et=Math.round(Math.max(0.15,ae-0.25)*100)/100;ue(x.id,{width:et})});let He=document.createElement("span");He.className="bp-plan-ins-val",He.textContent=`${ae.toFixed(2)}mm`;let be=document.createElement("button");be.type="button",be.className="bp-mgmt-btn bp-plan-mini-btn",be.setAttribute("data-testid","mgmt-plan-w-up"),be.textContent="+",be.addEventListener("click",()=>{let et=Math.round(Math.min(25,ae+0.25)*100)/100;ue(x.id,{width:et})});let ge=document.createElement("span");ge.className="bp-plan-sep",q.append(Re,je,He,be,ge)}let he=(t.copper_layers??[]).length>0?(t.copper_layers??[]).map((ae)=>ae.layer):ee.map((ae)=>ae.layer);if(he.length>0){let ae=document.createElement("span");ae.className="bp-dim",ae.textContent=h("gpui.mgmt.plan.layer.short","Layer"),q.appendChild(ae),q.appendChild(R(`${H} ${this.planMoveLayerOpen?"▴":"▾"}`,this.planMoveLayerOpen,"mgmt-plan-move-toggle",()=>{this.planMoveLayerOpen=!this.planMoveLayerOpen,this.render()}))}if(B.appendChild(q),this.planMoveLayerOpen&&he.length>0){let ae=document.createElement("div");ae.className="bp-plan-ins-row";for(let Re of he){let je=pt(Re,t.copper_layers,re);ae.appendChild(R(je,Re===k,`mgmt-plan-move-${Re}`,()=>{if(this.planMoveLayerOpen=!1,Re!==k)ue(x.id,{layer:Re});else this.render()}))}B.appendChild(ae)}}if(this.planNoteOpen){let q=document.createElement("form");q.className="bp-plan-note-form";let he=document.createElement("input");he.type="text",he.className="bp-plan-note-input",he.setAttribute("data-testid","mgmt-plan-note-input"),he.placeholder=h("gpui.mgmt.plan.note.placeholder","Steering note for router…");let ae=document.createElement("button");ae.type="submit",ae.className="primary bp-mgmt-btn bp-plan-mini-btn",ae.setAttribute("data-testid","mgmt-plan-note-submit"),ae.textContent=h("gpui.mgmt.plan.addnote","Add note"),q.append(he,ae),q.addEventListener("submit",(Re)=>{Re.preventDefault();let je=he.value.trim();if(!je)return;he.value="",this.planNoteOpen=!1;let He=typeof t.revision==="number"?t.revision:void 0;this.render(),n("plan.update",{ops:[{op:"note",target:x.id,text:je}],...He!==void 0?{base:He}:{}})}),B.appendChild(q)}if(this.planViewMode!=="list"&&!x.locked){let q=document.createElement("div");q.className="bp-plan-hint",q.textContent=h("gpui.mgmt.plan.hint","Drag waypoints to steer · Click + on edge to insert · Right-click vertex to remove"),B.appendChild(q)}e.appendChild(B)}}let le=document.createElement("div");le.className="bp-mgmt-rows"+(this.planViewMode==="split"?" bp-plan-split-list":""),le.setAttribute("data-testid","mgmt-plan-rows");let Q=h("gpui.mgmt.plan.done","done"),me=qi(this.planViewMode,ee,I);if(this.planViewMode==="split"&&me.length===0){let k=document.createElement("div");k.className="bp-dim",k.style.padding="6px 8px",k.style.fontSize="11px",k.textContent=h("gpui.mgmt.plan.noitems","No corridors or planes on this layer"),le.appendChild(k)}for(let k of me){let x=k.items??[],H=pt(k.layer,t.copper_layers,re)||k.layer;if(this.planViewMode==="split"){if(me.length>1){let B=document.createElement("div");B.className="bp-plan-split-divider";let K=k.role==="power"||k.role==="plane",ie=document.createElement("span");ie.className="bp-plan-card-bar "+(K?"pwr":"sig");let we=document.createElement("span");we.className="bp-mgmt-strong",we.textContent=H;let j=document.createElement("span");j.className="bp-dim",j.textContent=`${k.done??0}/${x.length} ${Q}`,B.append(ie,we,j),le.appendChild(B)}}else{let B=document.createElement("div");B.className="bp-mgmt-group-head bp-plan-layer-head";let K=document.createElement("div");K.className="bp-mgmt-row-line";let ie=document.createElement("span");ie.className="bp-mgmt-strong",ie.textContent=H;let we=document.createElement("span");if(we.className="bp-dim bp-mgmt-flex1",we.textContent=`${k.role?`${k.role} · `:""}${k.done??0}/${x.length} ${Q}`,K.append(ie,we),k.status!=="approved"&&x.length>0){let j=document.createElement("button");j.type="button",j.className="bp-mgmt-btn",j.textContent=h("gpui.mgmt.plan.layer","Approve layer"),j.addEventListener("click",()=>n("plan.approve",{layer:k.layer,ids:[],approve:!0}));let ne=document.createElement("button");ne.type="button",ne.className="bp-mgmt-btn",ne.textContent=h("gpui.mgmt.plan.reject","Reject"),ne.addEventListener("click",()=>n("plan.approve",{layer:k.layer,ids:[],approve:!1})),K.append(j,ne)}if(B.appendChild(K),k.stackup){let j=document.createElement("div");j.className="bp-plan-layer-stackup",j.textContent=k.stackup,B.appendChild(j)}le.appendChild(B)}for(let B of x){if(this.planHideDone&&ji(B))continue;let K=this.planSelectedId===B.id,ie=document.createElement("div");ie.className="bp-mgmt-row bp-plan-row"+(K?" active":""),ie.setAttribute("data-testid",`mgmt-plan-row-${B.id}`);let we=document.createElement("div");we.className="bp-mgmt-row-line";let j=document.createElement("span");j.className=`bp-plan-swatch bp-plan-st-${B.state||"proposed"}`,j.style.setProperty("--swatch-color",B.color||"#8a8a8a");let ne=document.createElement("span");ne.className="bp-mgmt-flex1"+(B.state==="blocked"||B.state==="failed"?" bp-tone-bad":B.state==="edited"?" bp-tone-warn":B.state==="rejected"||B.state==="routed"||B.state==="verified"?" bp-dim":""),ne.textContent=`${B.name||B.id}${B.locked?" \uD83D\uDD12":""}`;let Ne=[];if(B.kind==="plane"){if(B.reference)Ne.push(h("gpui.mgmt.plan.reference","over {layer}",{layer:B.reference}))}else{let q=B.nets??0;Ne.push(q===1?h("web.plan.net.one","1 net"):h("web.plan.nets","{n} nets",{n:q}))}if(typeof B.width==="number"&&Number.isFinite(B.width))Ne.push(`${B.width.toFixed(2)}mm`);if(B.impedance)Ne.push(B.impedance);let Ae=Ne.join(" · "),Me=document.createElement("span");if(Me.className="bp-plan-mark "+(B.state==="blocked"||B.state==="failed"?"bp-tone-bad":B.state==="verified"||B.state==="routed"?"bp-tone-ok":B.state==="approved"?"bp-tone-accent":"bp-dim"),Me.textContent=Di(B),we.append(j,ne,Me),B.state==="proposed"||B.state==="edited"){let q=document.createElement("button");q.type="button",q.className="bp-mgmt-btn",q.textContent="✓",q.title=h("gpui.mgmt.plan.layer","Approve layer"),q.addEventListener("click",(ae)=>{ae.stopPropagation(),n("plan.approve",{layer:"",ids:[B.id],approve:!0})});let he=document.createElement("button");he.type="button",he.className="bp-mgmt-btn",he.textContent="✗",he.title=h("gpui.mgmt.plan.reject","Reject"),he.addEventListener("click",(ae)=>{ae.stopPropagation(),n("plan.approve",{layer:"",ids:[B.id],approve:!1})}),we.append(q,he)}if(ie.appendChild(we),Ae){let q=document.createElement("div");q.className="bp-mgmt-row-sub bp-plan-detail bp-dim",q.textContent=Ae,ie.appendChild(q)}if(B.state==="routing"&&typeof B.total==="number"&&B.total>0){let q=document.createElement("div");q.className="bp-plan-microbar";let he=document.createElement("div");he.className="bp-plan-microbar-fill";let ae=Math.max(0,Math.min(100,Math.round((B.routed??0)/B.total*100)));he.style.width=`${ae}%`,q.appendChild(he),ie.appendChild(q)}if(B.problem_text){let q=document.createElement("div");q.className="bp-plan-problem",q.textContent=B.problem_text,ie.appendChild(q)}ie.addEventListener("click",()=>{this.planSelectedId=B.id,n("plan.focus",{id:B.id}),this.render()}),le.appendChild(ie)}}if(this.planViewMode!=="list"){if(!this.planCanvas)this.planCanvas=new An({onSelect:(B)=>{if(this.planSelectedId=B,!B)this.planNoteOpen=!1;this.render()},onFocusItem:(B)=>{n("plan.focus",{id:B})},onDragEnd:()=>{if(this.planRenderDeferred)this.planRenderDeferred=!1,this.render()},onCommitFields:(B,K)=>{(this.planCommitFields??ue)(B,K)},onApproveLayer:(B,K)=>{n("plan.approve",{layer:B,ids:[],approve:K})},onQuickApprove:(B,K)=>{n("plan.approve",{layer:"",ids:B,approve:K})}});let k=this.panelEl.parentElement?.classList.contains("bp-has-viewer")===!1,x=this.planExpanded||this.panelEl.clientWidth>=540||k;this.planCanvas.update({gridMode:this.planGridMode,syncZoom:this.planSyncZoom,shownLayers:I,selectedId:this.planSelectedId,board:oe,bands:ye,regions:Pe,layers:re,copperLayers:t.copper_layers},x);let H=document.createElement("div");H.className="bp-plan-canvas-scroll",H.appendChild(this.planCanvas.root),e.appendChild(H)}if(this.planViewMode!=="canvas")e.appendChild(le);if((t.draw?.bands?.length??0)>0||(t.draw?.regions?.length??0)>0){let k=document.createElement("div");k.className="bp-plan-footer",k.textContent=h("gpui.mgmt.plan.drawn","The plan's corridors and planes are drawn on the board while this panel is open. Close it to hide them."),e.appendChild(k)}return e}renderFab(){let e=document.createElement("div");e.className="bp-mgmt-body";let t=this.getPanelData("fab");if(!t)return e.appendChild(this.makeEmpty("Reading the fab's profile…")),e;if(t.error){let w=document.createElement("div");return w.className="bp-mgmt-note bp-tone-warn",w.textContent=t.error,e.appendChild(w),e}let n=(w,C={})=>{let L=this.watchGen,M=this.project;this.fabStatus="",this.cb.hub.rpc("fab.profile",{pro:M,action:w,...C}).catch((P)=>{if(L!==this.watchGen||M!==this.project)return;this.fabStatus=P instanceof Error?P.message:"Fab action failed",this.render()})},i=document.createElement("div");i.className="bp-mgmt-head";let r=document.createElement("span");r.className="bp-mgmt-strong",r.textContent=h("gpui.mgmt.fab.thefab","The fab");let s=document.createElement("span");s.className="bp-dim bp-mgmt-flex1",s.textContent=`rev ${t.rev??0}${t.updated?` · ${t.updated}`:""}${t.board?` · ${t.board}`:""} · ${Gi(t.tier??"")}`;let a=document.createElement("button");if(a.type="button",a.className="bp-mgmt-btn",a.textContent=h("gpui.mgmt.fab.refresh","Refresh"),a.addEventListener("click",()=>n("refresh")),i.append(r,s,a),e.appendChild(i),this.fabStatus){let w=document.createElement("div");w.className="bp-mgmt-note bp-tone-bad",w.textContent=this.fabStatus,e.appendChild(w)}let o=document.createElement("div");o.className="bp-mgmt-rows",o.setAttribute("data-testid","mgmt-fab-rows");let c=t.review,p=document.createElement("div");p.className="bp-mgmt-row";let l=document.createElement("div");l.className="bp-mgmt-row-line";let u=document.createElement("span"),d=(c?.counts?.error??0)>0;if(u.className="bp-mgmt-flex1 "+(d?"bp-tone-bad":"bp-dim"),u.textContent=c?.running?"Reviewing the design…":c?.at==null?"No design review yet":`${c.counts?.error??0} must-fix · ${c.counts?.warning??0} should-fix · ${c.counts?.info??0} notes${c.scope?` (${c.scope})`:""}`,l.appendChild(u),c?.at!=null){let w=document.createElement("button");w.type="button",w.className="bp-mgmt-btn",w.textContent=h("gpui.mgmt.fab.findings","Findings"),w.addEventListener("click",()=>this.togglePanel("checks")),l.appendChild(w)}if(!c?.running){let w=document.createElement("button");w.type="button",w.className="bp-mgmt-btn",w.textContent=h("gpui.mgmt.fab.reviewbtn","Review"),w.addEventListener("click",()=>n("review")),l.appendChild(w)}if(c?.judge){let w=document.createElement("button");w.type="button",w.className="bp-mgmt-btn",w.textContent=h("gpui.mgmt.fab.judge","Datasheets"),w.addEventListener("click",()=>{if(c.judge)this.cb.onSendText(c.judge)}),l.appendChild(w)}p.appendChild(l),o.appendChild(p);let m=$i(t.drc?.state??""),f=document.createElement("div");f.className="bp-mgmt-row";let b=document.createElement("div");b.className="bp-mgmt-row-line";let g=document.createElement("span");if(g.className="bp-mgmt-flex1 "+(m.button?"bp-tone-warn":"bp-dim"),g.textContent=m.text,b.appendChild(g),m.button){let w=document.createElement("button");w.type="button",w.className="bp-mgmt-btn",w.textContent=m.button,w.addEventListener("click",()=>n("drc")),b.appendChild(w)}f.appendChild(b),o.appendChild(f);for(let w of t.conflicts??[]){let C=document.createElement("div");C.className="bp-mgmt-row bp-tone-bad",C.textContent=w,o.appendChild(C)}for(let w of t.suggestions??[]){let C=document.createElement("div");C.className="bp-mgmt-row";let L=document.createElement("div");L.className="bp-mgmt-row-line";let M=document.createElement("span");M.className="bp-mgmt-flex1 bp-tone-warn",M.textContent=`${w.label||w.key}: board ${w.project??"?"} mm, fab ${w.fab??"?"} mm`;let P=document.createElement("button");P.type="button",P.className="bp-mgmt-btn",P.textContent=h("gpui.mgmt.fab.apply","Apply"),P.addEventListener("click",()=>n("apply",{key:w.key})),L.append(M,P),C.appendChild(L),o.appendChild(C)}if(t.stackup?.chosen){let w=document.createElement("div");w.className="bp-mgmt-row";let C=document.createElement("div");C.className="bp-mgmt-row-line";let L=t.stackup.by==="proposed",M=document.createElement("span");if(M.className="bp-mgmt-flex1 "+(L?"bp-tone-warn":"bp-dim"),M.textContent=`${L?"Proposed: ":""}${t.stackup.chosen}${t.stackup.outer_50_mm?` (50Ω ${t.stackup.outer_50_mm} mm)`:""}`,C.appendChild(M),L){let P=t.stackup.chosen,T=document.createElement("button");T.type="button",T.className="bp-mgmt-btn",T.textContent=h("gpui.mgmt.fab.use","Use"),T.addEventListener("click",()=>n("stackup",{id:P})),C.appendChild(T)}w.appendChild(C),o.appendChild(w)}if(Array.isArray(t.changed)&&t.changed.length>0){let w=document.createElement("div");w.className="bp-mgmt-row";let C=document.createElement("div");C.className="bp-mgmt-row-line";let L=document.createElement("span");L.className="bp-mgmt-flex1 bp-tone-warn",L.textContent=h("gpui.mgmt.fab.changed","Changed since you last looked");let M=document.createElement("button");M.type="button",M.className="bp-mgmt-btn",M.textContent=h("gpui.mgmt.fab.seen","Seen"),M.addEventListener("click",()=>n("seen")),C.append(L,M),w.appendChild(C);for(let P of t.changed.slice(0,12)){let T=document.createElement("div");T.className="bp-mgmt-faint",T.textContent=P,w.appendChild(T)}o.appendChild(w)}let y=Array.isArray(t.limits)?t.limits:[];if(y.length>0){let w=document.createElement("div");w.className="bp-mgmt-group-head";let C=document.createElement("span");C.className="bp-mgmt-flex1",C.textContent=h("gpui.mgmt.fab.limit","Limit");let L=document.createElement("span");L.className="bp-mgmt-col",L.textContent=h("gpui.mgmt.fab.free","Base price");let M=document.createElement("span");M.className="bp-mgmt-col",M.textContent=h("gpui.mgmt.fab.extra","Costs more");let P=document.createElement("span");P.className="bp-mgmt-col bp-mgmt-col-read",P.textContent=h("gpui.mgmt.fab.readcol","Read"),w.append(C,L,M,P),o.appendChild(w);for(let R of y){let D=document.createElement("div");D.className="bp-mgmt-row";let O=document.createElement("div");O.className="bp-mgmt-row-line";let N=document.createElement("span");N.className="bp-mgmt-flex1"+(R.changed?" bp-tone-warn":R.inherited?" bp-dim":""),N.textContent=`${R.changed?"• ":""}${R.label??""}`;let Z=document.createElement("span");Z.className="bp-mgmt-col",Z.textContent=R.free?.text||"—";let oe=document.createElement("span");oe.className="bp-mgmt-col bp-dim",oe.textContent=R.extra?.text||"—";let se=R.free&&typeof R.free==="object"?R.free:R.extra,ye=se?.fetched??"",Pe=Boolean(ye)&&se?.confidence!=="published",Ee=ye?Pe?`${ye}*`:ye:"—",ee=se?.source??"",re;if(ee.startsWith("https://")&&ye){let I=document.createElement("a");I.className="bp-mgmt-col bp-mgmt-col-read bp-mgmt-read-link",I.href=ee,I.target="_blank",I.rel="noopener noreferrer",I.textContent=Ee,re=I}else{let I=document.createElement("span");I.className="bp-mgmt-col bp-mgmt-col-read bp-mgmt-faint",I.textContent=Ee,re=I}O.append(N,Z,oe,re),D.appendChild(O),o.appendChild(D)}let T=document.createElement("div");T.className="bp-mgmt-note bp-mgmt-faint",T.textContent=h("gpui.mgmt.fab.derived","* worked out from the fab's page. Dimmed: the rigid board's value. A date opens the source page."),o.appendChild(T)}return e.appendChild(o),e}makeEmpty(e){let t=document.createElement("div");return t.className="bp-mgmt-note bp-mgmt-faint",t.textContent=e,t}}var Lr={trs:(e)=>e,t:(e,t)=>t},Nr=new Set(["/settle"]);function ns(e,t){let n=t.trim().toLowerCase();if(!n)return 1;let i=e.toLowerCase();if(i.startsWith(n))return 3;if(i.split(/[^a-z0-9]+/i).some((a)=>a.startsWith(n)))return 2;let s=0;for(let a=0;a0||e.status==="waiting")return{urgency:3,want:"waiting"};if(e.status==="asking")return{urgency:2,want:"question"};if(e.status==="failed"||e.state==="failed")return{urgency:1,want:"failed"};return{urgency:0,want:""}}function ss(e){let t=e.status||e.state;if(t==="active"||t==="working")return"bp-dot-work";if(t==="finished")return"bp-dot-done";if(t==="waiting"||t==="asking"||t==="blocked"||t==="failed"||(e.waiting??0)>0)return"bp-dot-need";return"bp-dot-idle"}function rs(e,t){let n=t.trim().split(/\s+/)[0]?.toLowerCase()??"";if(!n)return null;let i=e.toLowerCase();if(i.length!==e.length)return null;let r=i.indexOf(n);if(r<0)return null;return[r,r+n.length]}function as(e,t=Lr){let{t:n,trs:i}=t,r=[],s=new Map;for(let o of e.projects)s.set(o.id,o.title||o.id);let a=e.threads.find((o)=>o.id===e.selectedThreadId)??null;for(let o of e.railItems){if(o.state==="disabled"||o.id==="commands")continue;if(!a&&o.id!=="terminal")continue;r.push({label:i(o.label),place:o.id==="terminal"?"":"viewer",kind:"action",shortcut:o.key?o.key.toUpperCase():void 0,action:{type:"rail",id:o.id}})}if(a)r.push({label:a.pinned?n("menu.unpin","Unpin"):n("menu.pin","Pin"),place:"",kind:"action",action:{type:"thread-act",action:a.pinned?"unpin":"pin"}}),r.push({label:a.settled?n("phone.unsettle","Unsettle"):n("menu.settle","Settle"),place:"",kind:"action",action:{type:"thread-act",action:a.settled?"unsettle":"settle"}}),r.push({label:a.archived?n("palette.unarchive","Unarchive"):n("palette.archive","Archive"),place:"",kind:"action",action:{type:"thread-act",action:a.archived?"unarchive":"archive"}}),r.push({label:n("sheet.rename","Rename thread"),place:"",kind:"action",action:{type:"rename"}}),r.push({label:n("gpui.previous.thread","Previous thread"),place:"",kind:"action",action:{type:"prev-thread"}}),r.push({label:n("gpui.next.thread","Next thread"),place:"",kind:"action",action:{type:"next-thread"}});if(a)for(let o of e.commands){if(!o.word)continue;let c=Nr.has(o.word.toLowerCase());r.push({label:o.label?`${o.word} — ${o.label}`:o.word,place:o.desc||"command",kind:"command",action:{type:"command",word:o.word,runDirectly:c}})}r.push({label:n("gpui.improvements","Improvements"),place:"",kind:"action",action:{type:"improvements"}}),r.push({label:n("palette.settings","Settings"),place:"",kind:"action",action:{type:"settings"}}),r.push({label:n("gpui.fold.or.unfold.the.sidebar","Fold or unfold the sidebar"),place:"",kind:"action",action:{type:"sidebar"}});for(let o of e.projects)r.push({label:`New thread in ${o.title||o.id}`,place:"",kind:"action",action:{type:"new-thread",projectId:o.id}});for(let o of e.threads){let{urgency:c,want:p}=is(o);r.push({label:o.title||"Untitled thread",place:o.project?s.get(o.project)??"":"",kind:"thread",urgency:c,want:p,dotClass:ss(o),action:{type:"thread",id:o.id}})}for(let o of e.bots){if(!o.name||!o.thread)continue;r.push({label:o.name,place:"",kind:"bot",action:{type:"thread",id:o.thread}})}return r}function os(e,t,n,i=[],r=10,s=14){let a=t.trim(),o=a.length===0,c=e.slice();if(n?.threads&&n.threads.length>0){let d=new Map;for(let f of i)d.set(f.id,f.title||f.id);let m=new Set;for(let f of c)if(f.action.type==="thread")m.add(f.action.id);for(let f of n.threads){if(!f.id||m.has(f.id))continue;m.add(f.id);let{urgency:b,want:g}=is(f);c.push({label:f.title||"Untitled thread",place:f.project?d.get(f.project)??"":"",kind:"thread",urgency:b,want:g,dotClass:ss(f),action:{type:"thread",id:f.id}})}}let p=[];for(let d=0;d0)p.push({score:g,index:d,item:m})}p.sort((d,m)=>{if(o){let g=(m.item.urgency??0)-(d.item.urgency??0);if(g!==0)return g}if(m.score!==d.score)return m.score-d.score;let f=d.item.kind==="thread"?0:1,b=m.item.kind==="thread"?0:1;if(f!==b)return f-b;return d.index-m.index});let l=new Set,u=[];for(let d of p){let m=`${d.item.label}\x00${d.item.place}\x00${d.item.kind}`;if(l.has(m))continue;if(l.add(m),u.push(d.item),u.length>=r)break}if(n?.messages&&n.messages.length>0&&u.length{if(a.target===t)this.close()}),r.addEventListener("input",()=>{this.query=r.value,this.activeIdx=0,this.renderList(),this.scheduleSearch()}),r.addEventListener("keydown",(a)=>{if(a.key==="Escape")a.preventDefault(),a.stopPropagation(),this.close();else if(a.key==="ArrowDown"){if(a.preventDefault(),this.listed.length>0)this.activeIdx=(this.activeIdx+1)%this.listed.length,this.renderList(!0)}else if(a.key==="ArrowUp"){if(a.preventDefault(),this.listed.length>0)this.activeIdx=(this.activeIdx-1+this.listed.length)%this.listed.length,this.renderList(!0)}else if(a.key==="Enter")a.preventDefault(),this.runAt(this.activeIdx)}),this.backdrop=t,this.inputEl=r,this.listEl=s,this.root.appendChild(t),this.renderList(),this.query.trim().length>=2)this.scheduleSearch();r.focus()}close(){if(this.searchTimer!==null)window.clearTimeout(this.searchTimer),this.searchTimer=null;if(this.searchGen++,this.backdrop)this.backdrop.remove(),this.backdrop=null,this.inputEl=null,this.listEl=null;this.prevFocus?.focus(),this.prevFocus=null}scheduleSearch(){if(this.searchTimer!==null)window.clearTimeout(this.searchTimer),this.searchTimer=null;let e=this.query.trim();if(e.length<2){this.searchHits=null,this.searchHitsQuery="";return}if(e===this.searchHitsQuery)return;let t=++this.searchGen;this.searchTimer=window.setTimeout(()=>{this.searchTimer=null,this.cb.onSearch(e).then((n)=>{if(t!==this.searchGen||!this.backdrop)return;if(this.query.trim()!==e)return;this.searchHits=n,this.searchHitsQuery=e,this.renderList()}).catch(()=>{})},180)}runAt(e){let t=this.listed[e];if(!t)return;this.close(),this.cb.onExecute(t.action)}renderList(e=!1){if(!this.listEl)return;let t=this.cb.getState(),n=as(t,{t:h,trs:pe}),i=this.query.trim()===this.searchHitsQuery?this.searchHits:null;if(this.listed=os(n,this.query,i,t.projects),this.activeIdx>=this.listed.length)this.activeIdx=Math.max(0,this.listed.length-1);if(this.listed.length===0){let a=document.createElement("div");a.className="bp-palette-empty",a.textContent=h("gpui.nothing.matches","Nothing matches"),this.listEl.replaceChildren(a);return}let r=document.createDocumentFragment(),s=null;for(let a=0;a0)p.appendChild(document.createTextNode(o.label.slice(0,d)));let f=document.createElement("strong");if(f.className="bp-palette-mark",f.textContent=o.label.slice(d,m),p.appendChild(f),m{if(this.activeIdx!==a)this.activeIdx=a,this.updateActiveClass()}),c.addEventListener("click",()=>this.runAt(a)),a===this.activeIdx)s=c;r.appendChild(c)}if(this.listEl.replaceChildren(r),e&&s)s.scrollIntoView({block:"nearest"})}updateActiveClass(){if(!this.listEl)return;let e=this.listEl.children;for(let t=0;tthis.onPress(e.id));return s}render(){let e=this.items.filter((a)=>a.group!=="tools"),t=this.items.filter((a)=>a.group==="tools"),n=document.createElement("div");n.className="bp-rail-pages";let i;for(let a of e){if(i!==void 0&&a.group!==i){let o=document.createElement("div");o.className="bp-rail-rule",n.appendChild(o)}i=a.group,n.appendChild(this.renderButton(a))}let r=()=>{let a=n.scrollLeft>2,o=n.scrollLeft+n.clientWidth0){let a=document.createElement("div");a.className="bp-rail-tools";for(let o of t)a.appendChild(this.renderButton(o));s.appendChild(a)}this.el.replaceChildren(s)}}var Br=new Set(["resume","raise","retry","move","signin"]);function ps(e){if(!e||typeof e!=="object")return null;let t=e,n=(s)=>typeof s==="string"?s:"",i=(Array.isArray(t.actions)?t.actions:[]).filter((s)=>Boolean(s)&&typeof s==="object").map((s)=>({label:n(s.label),act:n(s.act),room:n(s.room),thread:n(s.thread)})),r={line:n(t.line),why:n(t.why),actions:i};return r.line||i.length?r:null}function sn(e,t){if(e.act==="board")return t&&e.room?{kind:"board",room:e.room}:null;if(e.act==="open")return e.thread?{kind:"thread",id:e.thread}:null;if(Br.has(e.act)){let n={room:e.room,action:e.act};if(e.thread)n.thread=e.thread;return{kind:"call",method:"swarm.act",params:n}}return null}function us(e){let t=e&&typeof e==="object"?e.open:void 0;if(typeof t!=="string")return null;let n=t.indexOf(":"),i=n<0?"":t.slice(n+1);if(!i)return null;if(t.startsWith("account:"))return{kind:"account",id:i};if(t.startsWith("thread:"))return{kind:"thread",id:i};return null}var In=[{id:"general",label:"General"},{id:"ai",label:"Agents and tools"},{id:"connect",label:"Connect"}],xt=[{id:"appearance",group:"general",title:"Appearance",subtitle:"Kept in this browser only. Never sent to the hub.",icon:"sun",keywords:["theme","dark","light","auto","color","language","locale","english","espanol","japanese"]},{id:"providers",group:"ai",title:"AI providers",subtitle:"Account sign-ins live in the desktop or mobile app.",icon:"cpu",keywords:["accounts","claude","codex","antigravity","grok","openai","anthropic","signin","login","model"]},{id:"devices",group:"connect",title:"Devices & browser",subtitle:"This browser session and paired devices on this hub.",icon:"link",keywords:["sign out","logout","session","cookie","revoke","paired","phone","browser","pair"]},{id:"home",group:"connect",title:"Home machine",subtitle:"Which machine hosts your always-on hub and bots.",icon:"globe",keywords:["host","boat","move","online","away","queued","linked"]}];function ms(e){if(e==="dark"||e==="light"||e==="auto")return e;return"auto"}function hs(e){if(e==="en"||e==="es"||e==="ja"||e==="auto")return e;return"auto"}function Ht(e,t){if(e==="dark"||e==="light")return e;return t==="light"?"light":"dark"}function bs(e){return e.trim().toLowerCase().split(/\s+/).filter(Boolean)}function Bn(e,t){if(t.length===0)return!0;let n=e.toLowerCase();return t.every((i)=>n.includes(i))}function gs(e,t){let n=bs(t);if(n.length===0)return[];return e.filter((i)=>{let r=[i.groupLabel,i.pageTitle,i.rowTitle,i.rowDetail,...i.keywords??[]].join(" ");return Bn(r,n)})}function Rn(e,t,n){let i=bs(n);if(i.length===0)return e.map((a)=>({page:a,hits:[]}));let r=new Map(In.map((a)=>[a.id,a.label])),s=[];for(let a of e){let c=t.filter((l)=>l.pageId===a.id).filter((l)=>Bn([l.rowTitle,l.rowDetail,l.pageTitle,l.groupLabel,...l.keywords??[]].join(" "),i));if(Bn([r.get(a.group)??"",a.title,a.subtitle,...a.keywords].join(" "),i)||c.length>0){let l=[];for(let u of c){if(!l.includes(u.rowTitle))l.push(u.rowTitle);if(l.length>=2)break}s.push({page:a,hits:l})}}return s}function Ir(e){let n=document.createElementNS("http://www.w3.org/2000/svg","svg");n.setAttribute("viewBox","0 0 24 24"),n.setAttribute("width","15"),n.setAttribute("height","15"),n.setAttribute("fill","none"),n.setAttribute("stroke","currentColor"),n.setAttribute("stroke-width","1.75"),n.setAttribute("stroke-linecap","square"),n.setAttribute("stroke-linejoin","miter"),n.setAttribute("aria-hidden","true");let i=(r,s)=>{let a=document.createElementNS("http://www.w3.org/2000/svg",r);for(let[o,c]of Object.entries(s))a.setAttribute(o,c);n.appendChild(a)};switch(e){case"sun":i("circle",{cx:"12",cy:"12",r:"4"}),i("path",{d:"M12 2v2m0 16v2M4.93 4.93l1.41 1.41m11.32 11.32 1.41 1.41M2 12h2m16 0h2M4.93 19.07l1.41-1.41m11.32-11.32 1.41-1.41"});break;case"cpu":i("rect",{x:"5",y:"5",width:"14",height:"14"}),i("rect",{x:"9",y:"9",width:"6",height:"6"}),i("path",{d:"M9 2v3m6-3v3M9 19v3m6-3v3M2 9h3m-3 6h3M19 9h3m-3 6h3"});break;case"link":i("path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"}),i("path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"});break;case"globe":i("circle",{cx:"12",cy:"12",r:"10"}),i("path",{d:"M2 12h20M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"});break}return n}function Rr(){let t=document.createElementNS("http://www.w3.org/2000/svg","svg");t.setAttribute("viewBox","0 0 24 24"),t.setAttribute("width","13"),t.setAttribute("height","13"),t.setAttribute("fill","none"),t.setAttribute("stroke","currentColor"),t.setAttribute("stroke-width","1.75"),t.setAttribute("aria-hidden","true");let n=document.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx","11"),n.setAttribute("cy","11"),n.setAttribute("r","7");let i=document.createElementNS("http://www.w3.org/2000/svg","path");return i.setAttribute("d","m20 20-3.5-3.5"),t.append(n,i),t}function rn(e,t){switch(e){case"general":return h("gpui.settings.group.general",t);case"ai":return h("gpui.settings.group.agents",t);case"connect":return h("native.pair.connect",t)}}function mt(e,t){switch(e){case"appearance":return h("settings.appearance",t);case"providers":return h("web.settings.providers",t);case"devices":return t;case"home":return h("home.machine",t)}}class jn{backdrop;titleEl;badgeEl;closeBtn;navListEl;searchInput;searchClearBtn;paneEl;cb;openState=!1;activePage="appearance";forceProviders=!1;query="";searchBrowseAll=!1;devicesLoaded=!1;devicesLoading=!1;devicesRows=[];devicesError="";loadGen=0;constructor(e,t){this.cb=t,this.backdrop=document.createElement("div"),this.backdrop.className="bp-modal-backdrop bp-hidden",this.backdrop.setAttribute("data-testid","settings-modal");let n=document.createElement("div");n.className="bp-modal bp-settings-modal",n.setAttribute("role","dialog"),n.setAttribute("aria-modal","true"),n.setAttribute("aria-labelledby","bp-settings-title");let i=document.createElement("div");i.className="bp-modal-head";let r=document.createElement("div");r.className="bp-settings-head-title",this.titleEl=document.createElement("h2"),this.titleEl.id="bp-settings-title",this.titleEl.textContent=h("palette.settings","Settings"),this.badgeEl=document.createElement("span"),this.badgeEl.className="bp-settings-badge",this.badgeEl.textContent="Browser",r.append(this.titleEl,this.badgeEl),this.closeBtn=document.createElement("button"),this.closeBtn.type="button",this.closeBtn.className="icon",this.closeBtn.textContent="×",this.closeBtn.setAttribute("aria-label",h("common.close","Close")),this.closeBtn.addEventListener("click",()=>this.close()),i.append(r,this.closeBtn);let s=document.createElement("div");s.className="bp-settings-body";let a=document.createElement("aside");a.className="bp-settings-nav";let o=document.createElement("div");o.className="bp-settings-search";let c=document.createElement("span");c.className="bp-settings-search-icon",c.appendChild(Rr()),this.searchInput=document.createElement("input"),this.searchInput.type="text",this.searchInput.className="bp-settings-search-input",this.searchInput.placeholder="Search settings…",this.searchInput.setAttribute("aria-label","Search settings"),this.searchInput.setAttribute("data-testid","settings-search"),this.searchClearBtn=document.createElement("button"),this.searchClearBtn.type="button",this.searchClearBtn.className="bp-settings-search-clear bp-hidden",this.searchClearBtn.textContent="×",this.searchClearBtn.title="Clear search",this.searchClearBtn.setAttribute("aria-label","Clear search"),o.append(c,this.searchInput,this.searchClearBtn),this.navListEl=document.createElement("nav"),this.navListEl.className="bp-settings-nav-list",this.navListEl.setAttribute("aria-label","Settings sections"),a.append(o,this.navListEl),this.paneEl=document.createElement("div"),this.paneEl.className="bp-settings-pane",s.append(a,this.paneEl),n.append(i,s),this.backdrop.appendChild(n),this.backdrop.addEventListener("click",(p)=>{if(p.target===this.backdrop)this.close()}),this.searchInput.addEventListener("input",()=>{this.query=this.searchInput.value,this.searchBrowseAll=this.query.trim().length>0,this.syncSearchClear(),this.render()}),this.searchInput.addEventListener("keydown",(p)=>{if(p.key==="Enter"){let l=Rn(xt,this.buildSearchItems(),this.query);if(l.length>0)p.preventDefault(),this.activePage=l[0].page.id,this.searchBrowseAll=!1,this.render()}else if(p.key==="Escape"&&this.query.trim().length>0)p.preventDefault(),p.stopPropagation(),this.clearSearch()}),this.searchClearBtn.addEventListener("click",()=>{this.clearSearch(),this.searchInput.focus()}),e.appendChild(this.backdrop)}isOpen(){return this.openState}handleEscape(){if(!this.openState)return;if(this.query.trim().length>0)this.clearSearch(),this.searchInput.focus();else this.close()}async open(e){if(this.openState=!0,e)this.activePage=e;this.backdrop.classList.remove("bp-hidden"),this.render(),this.loadDevices(),window.setTimeout(()=>{if(this.openState)this.searchInput.focus()},0)}async openToAccounts(){this.forceProviders=!0,this.query="",this.searchInput.value="",this.searchBrowseAll=!1,this.syncSearchClear(),await this.open("providers")}close(){this.openState=!1,this.forceProviders=!1,this.query="",this.searchInput.value="",this.searchBrowseAll=!1,this.syncSearchClear(),this.backdrop.classList.add("bp-hidden")}refreshLocale(){if(this.titleEl.textContent=h("palette.settings","Settings"),this.closeBtn.setAttribute("aria-label",h("common.close","Close")),this.openState)this.render()}async refresh(){if(!this.openState)return;this.render(),await this.loadDevices()}clearSearch(){this.query="",this.searchInput.value="",this.searchBrowseAll=!1,this.syncSearchClear(),this.render()}syncSearchClear(){this.searchClearBtn.classList.toggle("bp-hidden",this.query.length===0)}async loadDevices(){let e=++this.loadGen;if(this.devicesLoading=!this.devicesLoaded,this.devicesLoading&&this.openState)this.renderPane();try{let t=await this.cb.onLoadDevices();if(e!==this.loadGen)return;this.devicesRows=t,this.devicesError="",this.devicesLoaded=!0}catch(t){if(e!==this.loadGen)return;let n=t instanceof Error&&t.message?t.message:"Not available from a browser";this.devicesError=`${n} — manage paired devices in Backplane › Settings › Devices on desktop or a paired phone.`,this.devicesRows=[],this.devicesLoaded=!0}finally{if(e===this.loadGen){if(this.devicesLoading=!1,this.openState)this.render()}}}buildSearchItems(){let e=this.cb.onGetHome?.()??null,t=this.cb.onGetNoProvider?.()??null,n=rn("general","General"),i=rn("ai","Agents and tools"),r=rn("connect","Connect"),s=mt("appearance","Appearance"),a=mt("providers","AI providers"),o=mt("devices","Devices & browser"),c=mt("home","Home machine"),p=[{pageId:"appearance",pageTitle:s,groupLabel:n,rowTitle:h("settings.theme","Theme"),rowDetail:"Auto (follow hub), Dark, or Light in this browser.",keywords:["theme","dark","light","auto","appearance","colors"]},{pageId:"appearance",pageTitle:s,groupLabel:n,rowTitle:h("settings.lang","Language"),rowDetail:"Interface language for this browser.",keywords:["locale","english","espanol","japanese","language"]},{pageId:"providers",pageTitle:a,groupLabel:i,rowTitle:t?pe(t.head):"Provider connections",rowDetail:"Connect Claude, Codex, Antigravity, or other AI providers in Settings → Accounts.",keywords:["accounts","claude","codex","antigravity","grok","openai","signin"]},{pageId:"devices",pageTitle:o,groupLabel:r,rowTitle:"This browser",rowDetail:"Sign out and revoke this browser's session cookie.",keywords:["logout","sign out","session","cookie"]},{pageId:"devices",pageTitle:o,groupLabel:r,rowTitle:"Paired devices",rowDetail:this.devicesRows.map((l)=>`${l.title||l.head||""} ${l.detail||l.text||""}`).join(" ")||"Paired phones and browsers on this hub.",keywords:["phone","pair","revoke","browser"]},{pageId:"home",pageTitle:c,groupLabel:r,rowTitle:e?.name?`${e.name}`:c,rowDetail:"Which machine hosts your always-on hub and bots.",keywords:["boat","move","online","away","queued","machine"]}];for(let l of this.devicesRows){let u=l.title||l.head||"";if(u)p.push({pageId:"devices",pageTitle:o,groupLabel:r,rowTitle:u,rowDetail:l.detail||l.text||"",keywords:["paired","device"]})}return p}render(){this.renderNav(),this.renderPane()}renderNav(){let e=document.createDocumentFragment(),t=Rn(xt,this.buildSearchItems(),this.query),n=this.cb.onGetNoProvider?.()??null,i=this.cb.onGetHome?.()??null;if(t.length===0){let s=document.createElement("div");s.className="bp-settings-nav-empty",s.setAttribute("data-testid","settings-nav-empty"),s.textContent="No matching settings",e.appendChild(s),this.navListEl.replaceChildren(e);return}let r="";for(let s of t){let a=s.page;if(a.group!==r){r=a.group;let d=In.find((m)=>m.id===a.group);if(d){let m=document.createElement("div");m.className="bp-settings-group",m.textContent=rn(d.id,d.label),e.appendChild(m)}}let o=document.createElement("button");o.type="button";let c=!this.searchBrowseAll&&a.id===this.activePage;o.className="bp-settings-nav-item"+(c?" active":""),o.setAttribute("data-testid",`settings-nav-${a.id}`);let p=document.createElement("div");p.className="bp-settings-nav-row";let l=document.createElement("span");l.className="bp-settings-nav-icon",l.appendChild(Ir(a.icon));let u=document.createElement("span");if(u.className="bp-settings-nav-label",u.textContent=mt(a.id,a.title),p.append(l,u),a.id==="providers"&&(n||this.forceProviders)){let d=document.createElement("span");d.className="bp-settings-nav-dot warn",d.title="Action needed",p.appendChild(d)}else if(a.id==="home"&&i){let d=document.createElement("span");d.className="bp-settings-nav-dot "+(i.moving?.state==="failed"?"bad":i.online?"ok":"warn"),p.appendChild(d)}if(o.appendChild(p),s.hits.length>0)for(let d of s.hits){let m=document.createElement("div");m.className="bp-settings-hit",m.textContent=d,o.appendChild(m)}o.addEventListener("click",()=>{this.activePage=a.id,this.searchBrowseAll=!1,this.render()}),e.appendChild(o)}this.navListEl.replaceChildren(e)}renderPane(){let e=document.createDocumentFragment(),t=this.query.trim();if(t&&this.searchBrowseAll){this.renderSearchResults(e,t),this.paneEl.replaceChildren(e);return}let n=xt.find((a)=>a.id===this.activePage)??xt[0],i=document.createElement("div");i.className="bp-settings-pane-head";let r=document.createElement("h3");r.textContent=mt(n.id,n.title);let s=document.createElement("div");switch(s.className="bp-settings-pane-sub",s.textContent=n.subtitle,i.append(r,s),e.appendChild(i),n.id){case"appearance":this.renderAppearancePage(e);break;case"providers":this.renderProvidersPage(e);break;case"devices":this.renderDevicesPage(e);break;case"home":this.renderHomePage(e);break}this.paneEl.replaceChildren(e)}renderSearchResults(e,t){let n=gs(this.buildSearchItems(),t),i=document.createElement("div");i.className="bp-settings-pane-head";let r=document.createElement("h3");r.textContent="Search results";let s=document.createElement("div");if(s.className="bp-settings-pane-sub",s.textContent=n.length===0?`No settings match "${t}".`:`${n.length} matching ${n.length===1?"setting":"settings"} for "${t}"`,i.append(r,s),e.appendChild(i),n.length===0){let o=document.createElement("div");o.className="bp-settings-empty",o.textContent="Try searching for theme, language, providers, sign out, devices, or home.",e.appendChild(o);return}let a=Array.from(new Set(n.map((o)=>o.pageId)));for(let o of a){let c=xt.find((m)=>m.id===o);if(!c)continue;let p=document.createElement("div");p.className="bp-settings-search-sec";let l=document.createElement("div");l.className="bp-settings-subhead",l.textContent=mt(c.id,c.title);let u=document.createElement("button");u.type="button",u.className="bp-settings-search-open",u.textContent="Open page ›",u.addEventListener("click",()=>{this.activePage=o,this.searchBrowseAll=!1,this.render()}),p.append(l,u),e.appendChild(p);let d=new Set(n.filter((m)=>m.pageId===o).map((m)=>m.rowTitle));if(o==="appearance")this.renderAppearancePage(e,d);else if(o==="providers")this.renderProvidersPage(e);else if(o==="devices")this.renderDevicesPage(e,d);else if(o==="home")this.renderHomePage(e)}}renderAppearancePage(e,t){let n=this.cb.onGetThemePref?.()??"auto",i=this.cb.onGetHubTheme?.()??"dark",r=Ht(n,i),s=this.cb.onGetLocalePref?.()??"auto",a=h("settings.theme","Theme"),o=h("settings.lang","Language");if(!t||t.has(a)){let c=h("settings.theme.dark","Dark"),p=h("settings.theme.light","Light"),l=n==="auto"?`Following hub theme (${i==="light"?p:c}). Stored in this browser only.`:`Using ${r==="light"?p:c} in this browser. Select Auto to follow the hub.`;e.appendChild(this.makeSegmentedRow(a,l,[{value:"auto",label:"Auto"},{value:"dark",label:c},{value:"light",label:p}],n,"settings-theme",(u)=>{this.cb.onSetThemePref?.(u),this.render()}))}if(!t||t.has(o))e.appendChild(this.makeSegmentedRow(o,"Interface language for this browser. Automatic follows the hub or browser language.",[{value:"auto",label:h("settings.lang.auto","Automatic")},{value:"en",label:h("settings.lang.en","English")},{value:"es",label:h("settings.lang.es","Español")},{value:"ja",label:h("settings.lang.ja","日本語")}],s,"settings-locale",(c)=>{this.cb.onSetLocalePref?.(c),this.render()}))}makeSegmentedRow(e,t,n,i,r,s){let a=document.createElement("div");a.className="bp-settings-row";let o=document.createElement("div");o.className="bp-settings-row-info";let c=document.createElement("div");c.className="bp-settings-row-title",c.textContent=e;let p=document.createElement("div");p.className="bp-settings-row-detail",p.textContent=t,o.append(c,p);let l=document.createElement("div");l.className="bp-chip-group",l.setAttribute("role","group"),l.setAttribute("aria-label",e);for(let u of n){let d=document.createElement("button");d.type="button";let m=u.value===i;d.className="bp-chip"+(m?" active":""),d.textContent=u.label,d.setAttribute("aria-pressed",m?"true":"false"),d.setAttribute("data-testid",`${r}-${u.value}`),d.addEventListener("click",()=>s(u.value)),l.appendChild(d)}return a.append(o,l),a}renderProvidersPage(e){let t=this.cb.onGetNoProvider?.()??null,n=document.createElement("section");if(n.className="bp-settings-section",n.setAttribute("data-testid","settings-providers"),t||this.forceProviders){let i=document.createElement("div");i.className="bp-settings-notice warn";let r=document.createElement("div");r.className="bp-settings-row-info";let s=document.createElement("div");s.className="bp-settings-row-title",s.textContent=t?pe(t.head):h("provider.notice.head","No AI provider connected");let a=document.createElement("div");a.className="bp-settings-row-detail",a.textContent=h("web.settings.providers.browser","Connect a provider in the Backplane desktop or mobile app under Settings → Accounts."),r.append(s,a);let o=document.createElement("div");o.className="bp-set-btns";let c=document.createElement("a");c.className="bp-link-btn primary",c.href=t?.url||"backplane://settings/accounts",c.setAttribute("data-testid","settings-open-accounts"),c.textContent=t?pe(t.button):h("provider.notice.button","Open Settings → Accounts"),o.appendChild(c),i.append(r,o),n.appendChild(i)}else{let i=document.createElement("div");i.className="bp-settings-row";let r=document.createElement("div");r.className="bp-settings-row-info";let s=document.createElement("div");s.className="bp-settings-row-title-wrap";let a=document.createElement("span");a.className="bp-settings-row-title",a.textContent="Provider connections";let o=document.createElement("span");o.className="bp-status-pill ok",o.textContent=h("gpui.acct.connected","Connected"),s.append(a,o);let c=document.createElement("div");c.className="bp-settings-row-detail",c.textContent="Provider sign-ins, fallback order, API keys, and usage limits are managed in the Backplane desktop or mobile app.",r.append(s,c);let p=document.createElement("div");p.className="bp-set-btns";let l=document.createElement("a");l.className="bp-link-btn",l.href="backplane://settings/accounts",l.setAttribute("data-testid","settings-open-accounts"),l.textContent=h("provider.notice.button","Open Settings → Accounts"),p.appendChild(l),i.append(r,p),n.appendChild(i)}e.appendChild(n)}renderDevicesPage(e,t){let n=!t||t.has("This browser"),i=!t||t.has("Paired devices")||this.devicesRows.some((a)=>t.has(a.title||a.head||""));if(n){let a=document.createElement("div");a.className="bp-settings-subhead",a.textContent="This browser",e.appendChild(a);let o=document.createElement("div");o.className="bp-settings-row";let c=document.createElement("div");c.className="bp-settings-row-info";let p=document.createElement("div");p.className="bp-settings-row-title",p.textContent="Browser session";let l=document.createElement("div");l.className="bp-settings-row-detail",l.textContent="Sign out and revoke this browser's session cookie.",c.append(p,l);let u=document.createElement("button");u.type="button",u.className="primary stop",u.textContent=h("agy.signout","Sign out"),u.setAttribute("data-testid","logout-btn"),u.addEventListener("click",()=>{u.disabled=!0,this.cb.onLogout().catch(()=>{l.setAttribute("role","alert"),l.className="bp-settings-row-detail bp-bad",l.textContent=h("web.logout.failed","Could not confirm sign-out. Try again."),u.disabled=!1})}),o.append(c,u),e.appendChild(o)}if(!i)return;let r=document.createElement("div");if(r.className="bp-settings-subhead",r.textContent="Paired devices",e.appendChild(r),this.devicesLoading){let a=document.createElement("div");a.className="bp-settings-empty",a.textContent="Loading paired devices…",e.appendChild(a);return}if(this.devicesError){let a=document.createElement("div");a.className="bp-settings-notice bad";let o=document.createElement("div");o.className="bp-settings-row-detail",o.textContent=this.devicesError,a.appendChild(o),e.appendChild(a);return}let s=!t||t.has("Paired devices")?this.devicesRows:this.devicesRows.filter((a)=>t.has(a.title||a.head||""));if(s.length===0){let a=document.createElement("div");a.className="bp-settings-empty",a.textContent="No paired devices listed.",e.appendChild(a)}else for(let a of s){let o=document.createElement("div");o.className="bp-settings-row";let c=document.createElement("div");c.className="bp-settings-row-info";let p=document.createElement("div");p.className="bp-settings-row-title-wrap";let l=document.createElement("span");l.className="bp-settings-row-title",l.textContent=a.title||a.head||"",p.appendChild(l);let u=a.detail||a.text||"";if(u){let d=document.createElement("span"),m=u.toLowerCase();d.className="bp-status-pill "+(m.includes("this browser")?"accent":"neutral"),d.textContent=u,p.appendChild(d)}if(c.appendChild(p),o.appendChild(c),a.buttons?.length){let d=document.createElement("div");d.className="bp-set-btns";for(let m of a.buttons){let f=document.createElement("button");if(f.type="button",m.primary)f.className="primary";if(m.danger)f.className="primary stop";f.textContent=m.label||h("common.remove","Remove"),f.addEventListener("click",()=>{f.disabled=!0,this.cb.onDevicesAct(m.action,m.value).finally(()=>{this.refresh()})}),d.appendChild(f)}o.appendChild(d)}e.appendChild(o)}if(!t){let a=document.createElement("div");a.className="bp-settings-footnote",a.textContent="Pair new browsers or phones, configure Tailscale HTTPS forwarding, or revoke access in desktop or mobile Settings → Devices.",e.appendChild(a)}}renderHomePage(e){let t=this.cb.onGetHome?.()??null,n=document.createElement("section");if(n.className="bp-settings-section",n.setAttribute("data-testid","settings-home"),!t){let d=document.createElement("div");d.className="bp-settings-empty",d.textContent="Single-hub mode — this hub is running locally without linked home machines.",n.appendChild(d),e.appendChild(n);return}let i=document.createElement("div");i.className="bp-settings-row";let r=document.createElement("div");r.className="bp-settings-row-info";let s=document.createElement("div");s.className="bp-settings-row-title-wrap";let a=document.createElement("span");a.className="bp-settings-row-title",a.textContent=t.name||(t.kind==="boat"?"Boat":"This machine"),s.appendChild(a);let o=document.createElement("span");o.className="bp-status-pill neutral",o.textContent=t.kind==="local"?"This machine":t.kind==="boat"?"Boat":"Linked machine",s.appendChild(o);let c=document.createElement("span"),p="Online",l="ok";if(t.moving?.state==="moving")p="Moving",l="accent";else if(t.moving?.state==="failed")p="Move failed",l="bad";else if(!t.online)p="Away",l="warn";c.className=`bp-status-pill ${l}`,c.textContent=p,s.appendChild(c);let u=document.createElement("div");if(u.className="bp-settings-row-detail",t.moving?.state==="moving")u.textContent=t.moving.step?h("home.moving.step","Moving home to {to}: {step}").replace("{to}",t.moving.to).replace("{step}",t.moving.step):h("home.moving","Moving home to {to}…").replace("{to}",t.moving.to);else if(t.moving?.state==="failed")u.textContent=t.moving.note?h("home.move.failed.note","Home move failed: {note}").replace("{note}",t.moving.note):h("home.move.failed","Home move failed");else if(!t.online)u.textContent=t.queuedCount>0?h("home.away.queued","Home ({name}) is away · {n} queued").replace("{name}",t.name||"home").replace("{n}",String(t.queuedCount)):h("home.away","Home ({name}) is away").replace("{name}",t.name||"home");else u.textContent="Your active home hub is online and serving threads and bots.";if(r.append(s,u),i.appendChild(r),t.canMoveHere&&this.cb.onMoveHomeHere){let d=document.createElement("button");d.type="button",d.className="primary",d.textContent=h("home.move.here","Make this machine the home"),d.setAttribute("data-testid","home-move-here-btn"),d.addEventListener("click",()=>{d.disabled=!0,this.cb.onMoveHomeHere?.().finally(()=>{this.refresh()})}),i.appendChild(d)}n.appendChild(i),e.appendChild(n)}}function xe(e,t,n){let i=document.createElement(e);if(t)i.className=t;if(n)i.textContent=n;return i}function Ft(e,t,n=!1){let i=xe("button",n?"primary":"bp-btn-ghost",e);return i.type="button",i.addEventListener("click",t),i}function Dn(e){return xe("pre","bp-context-code",e)}function jr(e){return xe("span",`bp-context-badge ${e==="Native"||e==="Enabled"?"active":e==="Untrusted"||e==="Invalid"?"warn":""}`,pe(e))}function an(e,t){let n=xe("div","bp-context-row");return n.append(xe("strong",void 0,e),jr(t)),n}class Hn{fetchContext;dialog=xe("dialog","bp-context");title=xe("h2");cwd=xe("div","bp-context-path");tabs=xe("div","bp-context-tabs");body=xe("div","bp-context-body");notice=xe("p","bp-context-notice");current;thread="";requestId=0;tab=0;busy=!1;constructor(e,t){this.fetchContext=t;let n=xe("div","bp-context-head"),i=xe("div");i.append(this.title,this.cwd),this.title.id="bp-context-title",this.dialog.setAttribute("aria-labelledby",this.title.id),this.notice.setAttribute("role","status"),n.append(i,Ft(h("common.refresh","Refresh"),()=>{this.load()}),Ft(h("common.close","Close"),()=>this.dialog.close())),this.dialog.append(n,this.tabs,this.notice,this.body),this.dialog.addEventListener("close",()=>{this.requestId++}),e.append(this.dialog)}open(e){if(this.thread=e,this.tab=0,this.current=void 0,this.busy=!1,this.title.textContent=h("thread.context.title","Context & Prompt"),this.cwd.textContent="",!this.dialog.open)this.dialog.showModal();this.render(),this.load()}async load(e){if(this.busy)return;let t=++this.requestId;this.busy=!0,this.notice.textContent=h("thread.context.reading","Reading thread context…"),this.render();try{let n=await this.fetchContext(this.thread,e);if(t!==this.requestId)return;this.current=n,this.cwd.textContent=n.cwd,this.notice.textContent=""}catch(n){if(t===this.requestId)this.notice.textContent=String(n)}finally{if(t===this.requestId)this.busy=!1,this.render()}}render(){let e=[h("thread.context.instructions","Instructions"),h("thread.context.system","System Prompt"),h("thread.context.skills","Skills"),h("thread.context.mcp","Project MCPs")];this.tabs.replaceChildren(...e.map((n,i)=>{let r=Ft(n,()=>{this.tab=i,this.render(),this.body.scrollTop=0,this.tabs.children[i].focus()});return r.setAttribute("aria-pressed",String(i===this.tab)),r})),this.body.replaceChildren();let t=this.current;if(!t)return;switch(this.tab){case 0:this.instructions(t.instructions);break;case 1:this.prompt(t);break;case 2:this.skills(t.skills);break;case 3:this.mcps(t.mcp);break}}instructions(e){if(!e.length)this.body.append(xe("p","bp-dim",h("thread.context.none.instructions","No project instructions found.")));for(let t of e){let n=xe("details","bp-context-card"),i=xe("summary");if(i.append(an(t.path,t.status),xe("small","bp-dim",h("thread.context.size","{bytes} B · ≈{tokens} tokens",{bytes:t.bytes,tokens:t.estimated_tokens}))),n.append(i,Dn(t.preview)),t.note)n.append(xe("small","bp-dim",t.note));this.body.append(n)}}prompt(e){let t=xe("div","bp-context-row"),n=Ft(h("thread.context.copy","Copy prompt"),()=>{navigator.clipboard.writeText(e.prompt).then(()=>{this.notice.textContent=h("thread.context.copied","Prompt copied.")}).catch((i)=>{this.notice.textContent=String(i)})});t.append(xe("p","bp-dim",h("thread.context.native.note","Backplane’s launch prompt. Native files are loaded by the provider.")),n),this.body.append(t);for(let[i,r]of[[h("thread.context.base","Backplane"),e.sections.base],[h("thread.context.injected.label","Injected project instructions"),e.sections.instructions],[h("thread.context.index","Available skills index"),e.sections.skills]])if(r)this.body.append(xe("h3",void 0,i),Dn(r))}skills(e){for(let t of["Project","User","Bundled"]){let n=e.filter((i)=>i.scope===t);if(!n.length)continue;this.body.append(xe("h3",void 0,pe(t)));for(let i of n){let r=xe("article","bp-context-card");r.append(an(i.name,i.status),xe("p",void 0,i.description),xe("small","bp-context-path",[i.source,i.provider,i.model].filter(Boolean).join(" · ")),xe("small","bp-context-path",i.path)),this.body.append(r)}}}mcps(e){if(!e.length)this.body.append(xe("p","bp-dim",h("thread.context.none.mcp","No project MCP configurations found.")));for(let t of e){let n=xe("article","bp-context-card");n.append(an(t.path,t.state));for(let r of t.servers){let s=r.url||[r.command,...r.args].map((a)=>JSON.stringify(a)).join(" ");if(n.append(an(r.name,r.status),Dn(s)),r.cwd)n.append(xe("small","bp-context-path",r.cwd))}if(t.error)n.append(xe("p","bp-warn",t.error));let i=t.state==="Untrusted"?"trust":t.state==="Enabled"?"disable":t.state==="Disabled"?"enable":"";if(i){let r=i==="trust"?h("thread.context.trust","Trust and enable"):i==="disable"?h("thread.context.disable","Disable"):h("thread.context.enable","Enable"),s=Ft(r,()=>{this.load({action:i,path:t.path,sha256:t.sha256})},i==="trust");s.disabled=this.busy;let a=xe("div","bp-context-actions");a.append(s),n.append(a)}this.body.append(n)}}}function Dr(e){if(e.wake)return{icon:"◷",label:"Snoozed",tone:"dim"};let t=(e.label??"").trim(),n=(e.tone??"").trim();if(t){let r=t.toLowerCase();return{icon:r==="approve"||r==="sign in"?"!":r==="input"?"?":r==="failed"||r==="stopped"?"×":r==="working"||r==="running"?"▸":r==="waiting"?"◌":r==="done"?"✓":"•",label:t,tone:n==="bad"?r==="failed"||r==="stopped"?"bad-out":"bad":n==="run"?"run":n==="wait"?"wait":n==="ok"?"ok":"dim"}}let i=e.word||"";if(i==="needs"){if(e.want==="approval")return{icon:"!",label:"Approve",tone:"bad"};if(e.want==="sign-in")return{icon:"!",label:"Sign in",tone:"bad"};return{icon:"?",label:"Input",tone:"bad"}}if(i==="failed"||e.status==="failed"||e.state==="fail")return{icon:"×",label:"Failed",tone:"bad-out"};if(i==="cut"||i==="interrupted")return{icon:"×",label:"Stopped",tone:"bad-out"};if(i==="running"||e.status==="active"||e.status==="working"||e.state==="run")return{icon:"▸",label:"Working",tone:"run"};if(i==="monitoring"||i==="limit"||e.status==="waiting")return{icon:"◌",label:"Waiting",tone:"wait"};if(i==="done"||e.status==="finished")return{icon:"✓",label:"Done",tone:"ok"};return null}var fs="http://www.w3.org/2000/svg";function ht(e,t=14,n=""){let i=document.createElementNS(fs,"svg");if(i.setAttribute("viewBox","0 0 24 24"),i.setAttribute("width",String(t)),i.setAttribute("height",String(t)),i.setAttribute("fill","none"),i.setAttribute("stroke","currentColor"),i.setAttribute("stroke-width","1.75"),i.setAttribute("stroke-linecap","square"),i.setAttribute("stroke-linejoin","miter"),i.setAttribute("aria-hidden","true"),n)i.classList.add(...n.split(" "));for(let r of e){let s=document.createElementNS(fs,"path");s.setAttribute("d",r),i.appendChild(s)}return i}function vs(){return ht(["M3 6h6l2 2h10v11H3z"],14,"bp-folder-icon")}function ys(e=14,t="bp-folder-icon bp-hw-icon"){return ht(["M3 3h18v18H3z","M9 3v6h6","M9 21v-6","M15 9a2 2 0 1 0 0-4 2 2 0 0 0 0 4z","M9 15a2 2 0 1 0 0-4 2 2 0 0 0 0 4z"],e,t)}function Hr(e=13){return ht(["M6 6h12v12H6z","M9 2v4","M15 2v4","M9 18v4","M15 18v4","M2 9h4","M2 15h4","M18 9h4","M18 15h4"],e)}function Fr(e=15){return ht(["M4 10V4l4 3h8l4-3v6l-2 9H6z","M9 13h1","M14 13h1","M11 16h2"],e,"bp-cat-glyph")}function $r(e=11){return ht(["M4 12l5 5 11-11"],e)}function Gr(e=11){return ht(["M12 22a10 10 0 1 0 0-20 10 10 0 0 0 0 20z","M12 6v6l4 2"],e)}function Or(e=11){return ht(["M12 17v5","M8 4h8l-1 5 3 3v2H6v-2l3-3z"],e,"bp-pin-icon")}function ws(e){if(!e)return"";let t=e<10000000000?e*1000:e,n=Math.max(0,Math.floor((Date.now()-t)/1000));if(n<60)return"now";if(n<3600)return`${Math.floor(n/60)}m`;if(n<86400)return`${Math.floor(n/3600)}h`;return`${Math.floor(n/86400)}d`}function Vr(e){let t=e.replace(/^@/,"").trim();if(!t)return"?";let n=t.split(/[\s_-]+/).filter(Boolean);if(n.length>=2)return(n[0][0]+n[1][0]).toUpperCase();return t.slice(0,2).toUpperCase()}function Fn(e){if(e==="wait"||e==="error")return"bp-mood-wait";if(e==="work"||e==="talk")return"bp-mood-work";return"bp-mood-idle"}function it(e){let t=e.lastIndexOf("|");return t>=0?e.slice(t+1):e}class $n{el;hostLabel;homeBanner;crewEl;filterInput;listEl;connEl;filterText="";allFilter="all";snoozeMenuRowId="";collapsedProjects=new Set;addShown=!1;sections=null;projects=[];threads=[];bots=[];rooms=[];selectedThreadId="";cb;needErr=new Map;needBusy=new Set;constructor(e,t){this.el=e,this.cb=t;let n=document.createElement("div");n.className="bp-side-host";let i=document.createElement("div");i.className="bp-side-host-left",this.hostLabel=document.createElement("span"),this.hostLabel.textContent="This computer";let r=document.createElement("span");r.className="bp-dim",r.textContent="›",i.append(this.hostLabel,r);let s=document.createElement("button");s.type="button",s.className="icon bp-side-collapse",s.textContent="‹",s.title="Collapse sidebar",s.setAttribute("aria-label","Collapse sidebar"),s.setAttribute("data-testid","sidebar-collapse"),s.addEventListener("click",()=>this.cb.onCollapseSidebar?.()),n.append(i,s);let a=document.createElement("div");a.className="bp-side-head",this.filterInput=document.createElement("input"),this.filterInput.type="search",this.filterInput.className="bp-input bp-side-search";let o=h("sidebar.search.projects","Search projects, threads…");this.filterInput.placeholder=o,this.filterInput.setAttribute("aria-label",o),this.filterInput.setAttribute("data-testid","sidebar-filter"),this.filterInput.addEventListener("input",()=>{this.filterText=this.filterInput.value.trim().toLowerCase(),this.render()});let c=document.createElement("button");c.type="button",c.className="icon bp-side-add",c.textContent="+",c.title=h("thread.new","New thread"),c.setAttribute("aria-label",h("thread.new","New thread")),c.setAttribute("data-testid","sidebar-new-thread"),c.addEventListener("click",()=>{let l=this.firstProjectId();if(l)this.cb.onNewThread(l)}),a.append(this.filterInput,c),this.homeBanner=document.createElement("div"),this.homeBanner.className="bp-side-home bp-hidden",this.homeBanner.setAttribute("data-testid","home-away-banner"),this.homeBanner.style.padding="6px 10px",this.homeBanner.style.fontSize="11px",this.homeBanner.style.borderBottom="1px solid var(--line, #2a2a2a)",this.crewEl=document.createElement("div"),this.crewEl.className="bp-crew-band bp-hidden",this.crewEl.setAttribute("data-testid","sidebar-crew"),this.listEl=document.createElement("div"),this.listEl.className="bp-side-list",this.listEl.setAttribute("data-testid","sidebar-list");let p=document.createElement("div");p.className="bp-side-footer",this.connEl=document.createElement("span"),this.connEl.className="bp-conn-status",this.connEl.textContent="Connecting…",this.connEl.setAttribute("data-testid","conn-status"),p.appendChild(this.connEl),this.el.append(n,a,this.homeBanner,this.crewEl,this.listEl,p)}setHome(e){if(!e){this.homeBanner.classList.add("bp-hidden"),this.homeBanner.textContent="";return}let t="",n=!1;if(e.moving?.state==="moving")t=e.moving.step?h("home.moving.step","Moving home to {to}: {step}").replace("{to}",e.moving.to).replace("{step}",e.moving.step):h("home.moving","Moving home to {to}…").replace("{to}",e.moving.to);else if(e.moving?.state==="failed")t=e.moving.note?h("home.move.failed.note","Home move failed: {note}").replace("{note}",e.moving.note):h("home.move.failed","Home move failed"),n=!0;else if(!e.online){let i=e.name||"home",r="";if(e.awaySince&&e.awaySince>0){let s=new Date(e.awaySince);r=`${String(s.getHours()).padStart(2,"0")}:${String(s.getMinutes()).padStart(2,"0")}`}if(r&&e.queuedCount>0)t=h("home.away.since.queued","Home ({name}) is away since {time} · {n} queued").replace("{name}",i).replace("{time}",r).replace("{n}",String(e.queuedCount));else if(r)t=h("home.away.since","Home ({name}) is away since {time}").replace("{name}",i).replace("{time}",r);else if(e.queuedCount>0)t=h("home.away.queued","Home ({name}) is away · {n} queued").replace("{name}",i).replace("{n}",String(e.queuedCount));else t=h("home.away","Home ({name}) is away").replace("{name}",i)}if(!t)this.homeBanner.classList.add("bp-hidden"),this.homeBanner.textContent="";else this.homeBanner.textContent=t,this.homeBanner.className=n?"bp-side-home bp-bad":"bp-side-home bp-dim",this.homeBanner.classList.remove("bp-hidden")}setHostName(e){this.hostLabel.textContent=e||"This computer"}setConnStatus(e,t){this.connEl.textContent=e,this.connEl.className=`bp-conn-status ${t}`.trim()}setData(e,t,n,i){this.projects=e,this.threads=t,this.bots=n,this.rooms=i,this.render()}setSections(e,t,n){this.sections=e,this.bots=t,this.rooms=n,this.render()}setSelected(e){this.selectedThreadId=e,this.render()}focusFilter(){this.filterInput.focus()}firstProjectId(){if(this.sections){for(let e of this.sections)if(e.kind==="projects"&&e.rows.length>0){let t=e.rows[0];if(t.id&&!t.off)return t.id}}return this.projects[0]?.id??""}refreshLocale(){let e=h("sidebar.search.projects","Search projects, threads…");this.filterInput.placeholder=e,this.filterInput.setAttribute("aria-label",e),this.render()}renderCrewBand(e){let t=this.bots.find((c)=>c.uber),n=this.bots.filter((c)=>!c.uber&&(!e||c.name.toLowerCase().includes(e))),i=this.rooms.filter((c)=>!e||c.name.toLowerCase().includes(e)),r=Boolean(t&&(!e||t.name.toLowerCase().includes(e))),s=n.length>0||Boolean(this.cb.onNewBot)&&!e,a=i.length>0||Boolean(this.cb.onNewRoom)&&!e;if(!r&&!s&&!a){this.crewEl.classList.add("bp-hidden"),this.crewEl.replaceChildren();return}let o=document.createDocumentFragment();if(r&&t){let c=document.createElement("button");c.type="button",c.className="bp-crew-uber"+(t.thread===this.selectedThreadId?" active":""),c.setAttribute("data-testid",`crew-uber-${t.id}`);let p=document.createElement("span");if(p.className=`bp-crew-uber-avatar ${Fn(t.mood)}`,t.color)p.style.color=t.color;p.appendChild(Fr(14));let l=document.createElement("span");l.className="bp-crew-uber-meta";let u=document.createElement("span");if(u.className="bp-crew-uber-name",u.textContent=t.name,l.appendChild(u),t.note){let d=document.createElement("span");d.className=`bp-crew-uber-note ${Fn(t.mood)}`,d.textContent=t.note,l.appendChild(d)}if(c.append(p,l),t.mood==="wait"||t.mood==="error"){let d=document.createElement("span");d.className="bp-status-pill bp-pill-bad",d.textContent="? Input",c.appendChild(d)}c.addEventListener("click",()=>this.cb.onSelectBot(t)),o.appendChild(c)}if(s){let c=document.createElement("div");c.className="bp-crew-bots",c.setAttribute("data-testid","crew-bots");let p=document.createElement("span");p.className="bp-crew-lbl",p.textContent=h("tour.title.bots","Bots").toUpperCase(),c.appendChild(p);let l=document.createElement("div");l.className="bp-crew-bot-tiles";for(let u of n){let d=document.createElement("button");if(d.type="button",d.className=`bp-crew-bot-tile ${Fn(u.mood)}`+(u.thread===this.selectedThreadId?" active":""),d.title=u.note?`@${u.name} — ${u.note}`:`@${u.name}`,d.setAttribute("aria-label",`@${u.name}`),d.setAttribute("data-testid",`crew-bot-${u.id}`),u.color)d.style.setProperty("--bot-c",u.color);let m=document.createElement("span");if(m.className="bp-crew-bot-init",m.textContent=Vr(u.name),d.appendChild(m),u.mood==="wait"||u.mood==="error"){let f=document.createElement("span");f.className="bp-crew-bot-wait",d.appendChild(f)}d.addEventListener("click",()=>this.cb.onSelectBot(u)),l.appendChild(d)}if(this.cb.onNewBot&&!e){let u=document.createElement("button");u.type="button",u.className="bp-crew-bot-tile bp-crew-add",u.textContent="+",u.title=h("bots.new","New bot"),u.setAttribute("aria-label",h("bots.new","New bot")),u.setAttribute("data-testid","crew-new-bot"),u.addEventListener("click",()=>this.cb.onNewBot?.()),l.appendChild(u)}c.appendChild(l),o.appendChild(c)}if(a){let c=document.createElement("div");c.className="bp-crew-rooms",c.setAttribute("data-testid","crew-rooms");for(let p of i){let l=document.createElement("button");l.type="button",l.className="bp-crew-room-chip",l.setAttribute("data-testid",`crew-room-${p.id}`);let u=document.createElement("span");u.className="bp-dim",u.textContent="#";let d=document.createElement("span");if(d.textContent=p.name,l.append(u,d),p.members!==void 0&&p.members>0){let m=document.createElement("span");m.className="bp-crew-room-cnt",m.textContent=String(p.members),l.appendChild(m)}l.title=p.members?`#${p.name} (${p.members})`:`#${p.name}`,l.addEventListener("click",()=>this.cb.onSelectRoom?.(p)),c.appendChild(l)}if(this.cb.onNewRoom&&!e){let p=document.createElement("button");p.type="button",p.className="bp-crew-room-chip bp-crew-add",p.textContent="+",p.title=h("rooms.new","New room"),p.setAttribute("aria-label",h("rooms.new","New room")),p.setAttribute("data-testid","crew-new-room"),p.addEventListener("click",()=>this.cb.onNewRoom?.()),c.appendChild(p)}o.appendChild(c)}this.crewEl.classList.remove("bp-hidden"),this.crewEl.replaceChildren(o)}projectsHead(e){let t=document.createElement("div");if(t.className="bp-side-section-head",!this.cb.onAddProject||this.addShown)return t.textContent=e,t;this.addShown=!0,t.classList.add("bp-side-section-row");let n=document.createElement("span");n.textContent=e;let i=document.createElement("button");i.type="button",i.className="bp-side-sec-plus bp-side-sec-btn",i.textContent="+";let r=h("sidebar.add.project","Add project");return i.title=r,i.setAttribute("aria-label",r),i.setAttribute("data-testid","sidebar-add-project"),i.addEventListener("click",(s)=>{s.stopPropagation(),this.cb.onAddProject?.()}),t.append(n,i),t}renderStatusPill(e,t){let n=document.createElement("span");if(n.className=`bp-status-pill bp-pill-${e.tone}`,n.textContent=`${e.icon} ${e.label}`,t)n.title=t;return n}renderRowActions(e){if(e.off)return null;let t=Array.isArray(e.snooze)&&e.snooze.length>0&&Boolean(this.cb.onSnoozeRow),n=Boolean(e.wake)&&Boolean(this.cb.onSnoozeRow),i=Boolean(e.settle);if(!t&&!n&&!i)return null;let r=document.createElement("span");if(r.className="bp-row-acts",n&&e.wake){let s=document.createElement("button");s.type="button",s.className="bp-row-act-btn bp-wake-btn",s.textContent=h("menu.wake","Wake"),s.title=h("menu.wake","Wake snoozed thread"),s.setAttribute("data-testid",`wake-row-${e.id}`),s.addEventListener("click",(a)=>{a.stopPropagation(),this.cb.onSnoozeRow?.(e.wake)}),r.appendChild(s)}if(t&&e.snooze){let s=document.createElement("button");s.type="button",s.className="bp-row-act-btn bp-snooze-btn",s.title=h("menu.snooze","Snooze thread"),s.setAttribute("aria-label",h("menu.snooze","Snooze thread")),s.setAttribute("data-testid",`snooze-row-${e.id}`),s.appendChild(Gr(11)),s.addEventListener("click",(a)=>{a.stopPropagation(),this.snoozeMenuRowId=this.snoozeMenuRowId===e.id?"":e.id,this.render()}),r.appendChild(s)}if(i&&e.settle){let s=document.createElement("button");s.type="button",s.className="bp-row-act-btn bp-settle-btn",s.title=h("menu.settle","Settle"),s.setAttribute("aria-label",h("menu.settle","Settle")),s.setAttribute("data-testid",`settle-row-${e.id}`),s.appendChild($r(11)),s.addEventListener("click",(a)=>{a.stopPropagation(),this.cb.onThreadAct(it(e.settle),"settle")}),r.appendChild(s)}return r}renderSectionThreadRow(e,t,n=!1){let i=document.createElement("div");i.className="bp-thread-row"+(n?" bp-inbox-row":"")+(e.id===this.selectedThreadId||it(e.id)===this.selectedThreadId?" active":"")+(e.off?" bp-dim":""),i.setAttribute("data-thread-id",e.id),i.setAttribute("data-testid",`thread-row-${e.id}`);let r=Dr(e),s=this.renderRowActions(e);if(n){let l=document.createElement("div");l.className="bp-inbox-main";let u=document.createElement("div");u.className="bp-inbox-top";let d=document.createElement("div");if(d.className="bp-thread-title",d.textContent=e.title||"Untitled thread",u.appendChild(d),s)u.appendChild(s);let m=document.createElement("div");if(m.className="bp-inbox-meta",r)m.appendChild(this.renderStatusPill(r,e.say));if(e.project){let f=document.createElement("span");f.className="bp-inbox-proj",f.textContent=e.project,m.appendChild(f)}if(e.ago){let f=document.createElement("span");if(f.className="bp-thread-age",f.textContent=e.ago,e.pinned)f.title=h("tools.pinned","Pinned");m.appendChild(f)}l.append(u,m),i.appendChild(l)}else{if(t){let u=document.createElement("span");u.className="bp-tree-branch",u.setAttribute("aria-hidden","true"),i.appendChild(u)}if(r)i.appendChild(this.renderStatusPill(r,e.say));let l=document.createElement("div");if(l.className="bp-thread-title",l.textContent=e.title||"Untitled thread",i.appendChild(l),s)i.appendChild(s);if(e.ago){let u=document.createElement("span");if(u.className="bp-thread-age",u.textContent=e.ago,e.pinned)u.title=h("tools.pinned","Pinned");i.appendChild(u)}}let a=e.nav||e.id;if(!e.off&&a&&!a.startsWith("@room:"))i.addEventListener("click",()=>this.cb.onSelectThread(it(a)));let o=this.snoozeMenuRowId===e.id&&Array.isArray(e.snooze)&&e.snooze.length>0,c=e.kind==="swarm"?ps(e.need):null;if(!c&&!o)return i;let p=document.createElement("div");if(p.className="bp-need-wrap",p.appendChild(i),o&&e.snooze){let l=document.createElement("div");l.className="bp-snooze-bar"+(t?" nested":""),l.setAttribute("data-testid",`snooze-bar-${e.id}`);let u=document.createElement("span");u.className="bp-dim",u.textContent="Snooze:",l.appendChild(u);for(let d of e.snooze){let m=document.createElement("button");m.type="button",m.className="bp-snooze-opt",m.textContent=d.label,m.addEventListener("click",(f)=>{f.stopPropagation(),this.snoozeMenuRowId="",this.cb.onSnoozeRow?.(d.value),this.render()}),l.appendChild(m)}p.appendChild(l)}if(c){let l=document.createElement("div");l.className="bp-need"+(t?" nested":"")+(e.off?" bp-dim":""),l.setAttribute("data-testid",`need-${e.id}`);let u=document.createElement("span");u.className="bp-need-line",u.textContent=c.line,u.title=c.line,l.appendChild(u);for(let m of c.actions){if(!sn(m,Boolean(this.cb.hasRoomView)))continue;let f=document.createElement("button");f.type="button",f.className="bp-need-btn",f.textContent=m.label,f.setAttribute("data-testid",`need-${m.act}-${e.id}`),f.disabled=Boolean(e.off)||this.needBusy.has(e.id)||!this.cb.onNeedAct,f.addEventListener("click",(b)=>{b.stopPropagation();let g=this.cb.onNeedAct;if(!g)return;this.needErr.delete(e.id),this.needBusy.add(e.id),this.render(),g(m).catch((y)=>{this.needErr.set(e.id,y instanceof Error?y.message:String(y))}).finally(()=>{this.needBusy.delete(e.id),this.render()})}),l.appendChild(f)}p.appendChild(l);let d=this.needErr.get(e.id);if(d){let m=document.createElement("div");m.className="bp-need-err"+(t?" nested":""),m.textContent=d,p.appendChild(m)}}return p}renderHubSections(e,t){let n=this.sections??[],i=new Set;for(let a of n)if(a.kind==="threads")for(let o of a.rows)i.add(o.id),i.add(it(o.id));else if(a.kind==="projects")for(let o of a.rows)for(let c of o.threads??[])i.add(c.id),i.add(it(c.id));let r=this.selectedThreadId?this.threads.find((a)=>a.id===this.selectedThreadId)??null:null,s=!1;for(let a of n)if(a.kind==="projects"&&(a.rows.length>0||(a.count??0)>0))s=!0;for(let a of n){if(a.kind==="bub")continue;if(a.kind==="threads"){let o=Boolean(a.fold&&a.toggle),c=a.rows.filter((l)=>{if(!t)return!0;return`${l.title} ${l.project??""}`.toLowerCase().includes(t)});if(!o&&c.length===0)continue;if(o&&t&&c.length===0)continue;if(o&&!t&&(a.count??c.length)===0)continue;let p=document.createElement("section");if(p.className=`bp-side-section bp-side-inbox bp-sec-${a.id}`,p.setAttribute("data-section-id",a.id),o){let l=document.createElement("button");l.type="button",l.className="bp-side-section-head bp-side-section-toggle";let u=t?c.length:a.count??c.length,d=a.open||Boolean(t)?"▾":"▸";if(l.textContent=`${d} ${a.title.toUpperCase()} (${u})`,a.hint)l.title=a.hint;l.setAttribute("data-testid",`section-toggle-${a.id}`),l.addEventListener("click",()=>{if(a.toggle)this.cb.onToggleSection?.(a.toggle)}),p.appendChild(l)}else{let l=document.createElement("div");l.className="bp-side-section-head"+(a.id==="needs"?" bp-head-needs":a.id==="running"?" bp-head-running":""),l.textContent=`${a.title.toUpperCase()} ${c.length}`,p.appendChild(l)}if(!o||Boolean(a.open)||Boolean(t))for(let l of c)p.appendChild(this.renderSectionThreadRow(l,!1,!0));e.appendChild(p);continue}if(a.kind==="projects"){let o=a.rows,c=o.filter((d)=>{if(!t)return!0;if((d.title||d.id).toLowerCase().includes(t))return!0;if((d.threads??[]).some((m)=>m.title.toLowerCase().includes(t)))return!0;if((d.swarms??[]).some((m)=>m.title.toLowerCase().includes(t)))return!0;return!1}),p=Boolean(a.fold&&a.toggle);if(t&&c.length===0)continue;if(!p&&a.id!=="active"&&c.length===0)continue;let l=document.createElement("section");if(l.className=`bp-side-section bp-sec-${a.id}`,l.setAttribute("data-section-id",a.id),p){let d=document.createElement("button");d.type="button",d.className="bp-side-section-head bp-side-section-toggle";let m=t?c.length:a.count??c.length,f=a.open||Boolean(t)?"▾":"▸";if(d.textContent=`${f} ${a.title.toUpperCase()} (${m})`,a.hint)d.title=a.hint;d.setAttribute("data-testid",`section-toggle-${a.id}`),d.addEventListener("click",()=>{if(a.toggle)this.cb.onToggleSection?.(a.toggle)}),l.appendChild(d)}else l.appendChild(this.projectsHead(a.title.toUpperCase()));if(!p||Boolean(a.open)||Boolean(t)){if(a.id==="all"&&!t){let d=o.some((f)=>f.hasBoard||f.hasSchematic),m=o.some((f)=>!f.hasBoard&&!f.hasSchematic);if(d&&m){let f=document.createElement("div");f.className="bp-proj-filter",f.setAttribute("data-testid","all-projects-filter");let b=[{id:"all",label:"All"},{id:"hw",label:"Boards"},{id:"sw",label:"Code"}];for(let g of b){let y=document.createElement("button");y.type="button",y.className="bp-proj-filter-btn"+(this.allFilter===g.id?" active":""),y.textContent=g.label,y.addEventListener("click",()=>{this.allFilter=g.id,this.render()}),f.appendChild(y)}if(l.appendChild(f),this.allFilter==="hw")c=c.filter((g)=>g.hasBoard||g.hasSchematic);else if(this.allFilter==="sw")c=c.filter((g)=>!g.hasBoard&&!g.hasSchematic)}}if(a.id==="active"&&!s&&!t){let d=document.createElement("div");d.className="bp-side-empty",d.textContent="No projects yet.",l.appendChild(d)}for(let d of c){let m=document.createElement("div");if(m.className="bp-proj-group"+(d.off||a.id==="quiet"?" bp-dim":""),m.setAttribute("data-project-id",d.id),d.nav||d.key)m.setAttribute("data-project-key",d.nav||d.key||"");let f=document.createElement("div");f.className="bp-proj-head";let b=document.createElement("button");b.type="button",b.className="bp-proj-toggle";let y=Boolean(d.hasBoard||d.hasSchematic)?ys(14):vs();if(d.css)y.style.color=d.css;let w=document.createElement("span");if(w.className="bp-proj-name",w.textContent=d.title||d.id,b.append(y,w),d.fold==="project-fold"&&d.nav)b.addEventListener("click",()=>this.cb.onToggleProjectFold?.(d.nav));let C=document.createElement("div");if(C.className="bp-proj-meta",(d.needsCount??0)>0){let P=document.createElement("span");P.className="bp-proj-badge-need",P.textContent=String(d.needsCount),P.title=`${d.needsCount} needing you`,C.appendChild(P)}if((d.running??0)>0){let P=document.createElement("span");P.className="bp-proj-badge-run",P.textContent=String(d.running),P.title=`${d.running} running`,C.appendChild(P)}if(d.pinned&&a.id!=="pinned")C.appendChild(Or(11));let L=document.createElement("div");if(L.className="bp-proj-acts",!d.off&&this.cb.onQuickOpenViewer){if(d.hasBoard){let P=document.createElement("button");P.type="button",P.className="bp-proj-quick",P.title=h("viewer.board","Open Board"),P.setAttribute("aria-label",`Open Board (${d.title})`),P.setAttribute("data-testid",`quick-board-${d.id}`),P.appendChild(ys(13,"")),P.addEventListener("click",(T)=>{T.stopPropagation(),this.cb.onQuickOpenViewer?.(it(d.id),"board")}),L.appendChild(P)}if(d.hasSchematic){let P=document.createElement("button");P.type="button",P.className="bp-proj-quick",P.title=h("viewer.schematic","Open Schematic"),P.setAttribute("aria-label",`Open Schematic (${d.title})`),P.setAttribute("data-testid",`quick-sch-${d.id}`),P.appendChild(Hr(13)),P.addEventListener("click",(T)=>{T.stopPropagation(),this.cb.onQuickOpenViewer?.(it(d.id),"schematic")}),L.appendChild(P)}}let M=document.createElement("button");if(M.type="button",M.className="icon bp-proj-add",M.title=h("thread.new","New thread"),M.textContent="+",M.setAttribute("data-testid",`new-thread-${d.id}`),d.off)M.disabled=!0;if(M.addEventListener("click",(P)=>{P.stopPropagation(),this.cb.onNewThread(it(d.id))}),L.appendChild(M),f.append(b,C,L),m.appendChild(f),!d.folded||Boolean(t)){let P=Boolean(t)&&(d.title||d.id).toLowerCase().includes(t);for(let T of d.swarms??[]){if(t&&!P&&!T.title.toLowerCase().includes(t))continue;m.appendChild(this.renderSectionThreadRow(T,!0))}for(let T of d.threads??[]){if(t&&!P&&!T.title.toLowerCase().includes(t))continue;m.appendChild(this.renderSectionThreadRow(T,!0))}if(r&&r.project===it(d.id)&&!i.has(r.id)&&(!t||P||r.title.toLowerCase().includes(t)))m.appendChild(this.renderSectionThreadRow({id:r.id,title:r.title,status:r.status,state:r.state,ago:ws(r.updatedAt),pinned:r.pinned,nav:r.id},!0))}l.appendChild(m)}}e.appendChild(l)}}}render(){this.addShown=!1;let e=this.filterText;this.renderCrewBand(e);let t=document.createDocumentFragment();if(this.sections!==null)this.renderHubSections(t,e);else{let n=new Map;for(let i of this.threads){if(i.archived||i.swarm)continue;if(e){if(!`${i.title} ${i.preview??""}`.toLowerCase().includes(e))continue}let r=n.get(i.project)??[];r.push(i),n.set(i.project,r)}if(t.appendChild(this.projectsHead("RECENT")),this.projects.length===0&&this.threads.length===0){let i=document.createElement("div");i.className="bp-side-empty",i.textContent="No projects yet.",t.appendChild(i)}for(let i of this.projects){let r=n.get(i.id)??[];if(e&&r.length===0&&!i.title.toLowerCase().includes(e))continue;let s=document.createElement("section");s.className="bp-proj-group",s.setAttribute("data-project-id",i.id);let a=document.createElement("div");a.className="bp-proj-head";let o=document.createElement("button");o.type="button",o.className="bp-proj-toggle";let c=this.collapsedProjects.has(i.id)&&!e,p=vs();if(i.css)p.style.color=i.css;let l=document.createElement("span");l.className="bp-proj-name",l.textContent=i.title||i.id,o.append(p,l),o.addEventListener("click",()=>{if(this.collapsedProjects.has(i.id))this.collapsedProjects.delete(i.id);else this.collapsedProjects.add(i.id);this.render()});let u=document.createElement("button");if(u.type="button",u.className="icon bp-proj-add",u.title=h("thread.new","New thread"),u.textContent="+",u.setAttribute("data-testid",`new-thread-${i.id}`),u.addEventListener("click",(d)=>{d.stopPropagation(),this.cb.onNewThread(i.id)}),a.append(o,u),s.appendChild(a),!c)for(let d of r)s.appendChild(this.renderSectionThreadRow({id:d.id,title:d.title,status:d.status,state:d.state,ago:ws(d.updatedAt),pinned:d.pinned,nav:d.id},!0));t.appendChild(s)}}this.listEl.replaceChildren(t)}}function Ur(e){try{return new URL(e,window.location.origin).searchParams.get("s")||""}catch{return""}}function $t(e){if(!e)return;for(let t of e.getTracks())try{t.stop()}catch{}}function Wr(e,t){if(t===16000){let s=new Int16Array(e.length);for(let a=0;a0?c/p:0));r[s]=l<0?l*32768:l*32767}return r}class Gn{hub;cb;active=!1;starting=!1;sessionGen=0;activeGen=0;abortedGen=0;threadId="";sessionKey="";stream=null;audioCtx=null;processor=null;pendingPcm=[];postChain=Promise.resolve();stopDrain=Promise.resolve();mark=0;constructor(e,t){this.hub=e,this.cb=t}isRecording(){return this.active||this.starting}async toggle(){if(this.active||this.starting)await this.stop();else await this.start()}async start(){if(this.active||this.starting)return;let e=this.cb.getThreadId();if(!e)return;if(!navigator.mediaDevices?.getUserMedia){this.cb.showError("Microphone access is not available in this browser.");return}let t=++this.sessionGen;this.starting=!0,this.threadId=e,this.sessionKey="",this.pendingPcm=[],this.mark=this.cb.getCaret(),this.cb.setRecording(!0);let n;try{n=await navigator.mediaDevices.getUserMedia({audio:!0})}catch{if(t===this.sessionGen)this.starting=!1,this.cb.setRecording(!1),this.cb.showError("Microphone permission denied.");return}if(t!==this.sessionGen||this.cb.getThreadId()!==e){$t(n);return}if(this.stream=n,await this.stopDrain,t!==this.sessionGen||this.cb.getThreadId()!==e){if($t(n),this.stream===n)this.stream=null;return}try{let i=await this.hub.rpc("voice.start",{thread:e,draft:this.cb.getDraft(),caret:this.mark});if(t!==this.sessionGen||this.cb.getThreadId()!==e){if($t(n),this.stream===n)this.stream=null;if(!this.active&&!this.starting)this.hub.rpc("voice.stop",{thread:e}).catch(()=>{});return}let r=i.session||(i.path?Ur(i.path):"");if(!r)throw Error("Hub did not return a voice session.");this.sessionKey=r,this.activeGen=t,this.starting=!1,this.active=!0,this.startCapture(n,t)}catch(i){if(t===this.sessionGen)this.cleanupAudio(),this.starting=!1,this.active=!1,this.cb.setRecording(!1),this.cb.showError(i instanceof Error?i.message:"Could not start voice dictation.");else if($t(n),this.stream===n)this.stream=null}}async stop(){if(!this.active&&!this.starting)return;let e=this.activeGen,t=this.active,n=this.threadId,i=this.sessionKey;this.sessionGen++,this.starting=!1,this.active=!1,this.sessionKey="",this.cb.setRecording(!1),this.cb.setLevel(0),this.cleanupAudio();let s=this.stopDrain.then(async()=>{if(t&&i){let a=new Int16Array(this.pendingPcm);this.pendingPcm=[],this.enqueuePost(i,new Uint8Array(a.buffer),!0,e),await this.postChain}else this.pendingPcm=[];if(t&&n)await this.hub.rpc("voice.stop",{thread:n}).catch(()=>{})});this.stopDrain=s,await s}cancel(){if(!this.active&&!this.starting)return;let e=this.active,t=this.threadId;if(this.abortedGen=Math.max(this.abortedGen,this.sessionGen),this.sessionGen++,this.starting=!1,this.active=!1,this.sessionKey="",this.pendingPcm=[],this.cb.setRecording(!1),this.cb.setLevel(0),this.cleanupAudio(),e&&t&&this.hub.getState()==="connected")this.hub.rpc("voice.stop",{thread:t}).catch(()=>{})}handleFrame(e){let t=String(e.ev??""),n=String(e.thread??"");if(n&&this.cb.getThreadId()&&n!==this.cb.getThreadId())return;if(t==="draft"&&typeof e.text==="string")this.cb.setDraft(e.text),this.mark=e.text.length;else if(t==="edit"){let i=this.cb.getDraft(),r=Number(e.del??0),s=String(e.ins??""),a=Math.max(0,Math.min(i.length,this.mark)),o=Math.max(0,a-r),c=i.slice(0,o)+s+i.slice(a);this.mark=o+s.length,this.cb.setDraft(c)}else if(t==="level")this.cb.setLevel(Math.max(0,Math.min(100,Number(e.v??0))));else if(t==="view"){let i=e.view;if(i&&i.on===!1&&(this.active||this.starting))this.stop()}}startCapture(e,t){let i=new(window.AudioContext||window.webkitAudioContext),r=i.createMediaStreamSource(e),s=i.createScriptProcessor(4096,1,1);s.onaudioprocess=(a)=>{if(!this.active||t!==this.sessionGen||!this.sessionKey)return;let o=Wr(a.inputBuffer.getChannelData(0),i.sampleRate);for(let c=0;c=3200){let c=new Int16Array(this.pendingPcm.splice(0,3200));this.enqueuePost(this.sessionKey,new Uint8Array(c.buffer),!1,t)}},r.connect(s),s.connect(i.destination),this.audioCtx=i,this.processor=s}enqueuePost(e,t,n,i){this.postChain=this.postChain.then(async()=>{if(i<=this.abortedGen)return;try{let r={"Content-Type":"application/octet-stream","X-Voice-Session":e};if(n)r["X-Voice-End"]="1";let s=await fetch("/voice/in",{method:"POST",credentials:"same-origin",headers:r,body:t});if(!s.ok&&!n&&i===this.sessionGen&&this.active)this.failUpload(`Voice upload failed (${s.status}).`)}catch{if(!n&&i===this.sessionGen&&this.active)this.failUpload("Voice upload failed.")}})}failUpload(e){this.abortedGen=Math.max(this.abortedGen,this.sessionGen),this.sessionGen++,this.active=!1,this.starting=!1,this.sessionKey="",this.pendingPcm=[],this.cleanupAudio(),this.cb.setRecording(!1),this.cb.setLevel(0),this.cb.showError(e)}cleanupAudio(){if(this.processor)this.processor.disconnect(),this.processor.onaudioprocess=null,this.processor=null;if(this.audioCtx)this.audioCtx.close().catch(()=>{}),this.audioCtx=null;$t(this.stream),this.stream=null}}var Es=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258],ks=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],Cs=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],xs=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],_r=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function Gt(e,t){let n=new Int32Array(16),i=0;for(let o=0;o0){if(n[c]++,c>i)i=c}}let r=new Int32Array(16),s=0;for(let o=1;o<=15;o++)r[o]=s,s+=n[o];let a=new Int32Array(s);for(let o=0;o0)a[r[c]++]=o}return{counts:n,symbols:a,maxBits:i}}var zr=(()=>{let e=new Uint8Array(288);return e.fill(8,0,144),e.fill(9,144,256),e.fill(7,256,280),e.fill(8,280,288),Gt(e,288)})(),qr=(()=>{let e=new Uint8Array(32);return e.fill(5),Gt(e,32)})();class On{win=new Uint8Array(32768);winPos=0;feed(e,t=16777216){let n=0,i=0,r=0,s=(u)=>{while(r=e.length)throw Error("truncated deflate frame");i|=e[n++]<>>=u,r-=u,d},a=(u)=>{let d=0,m=0,f=0;for(let b=1;b<=u.maxBits;b++){d|=s(1);let g=u.counts[b];if(d-g{let d=c+u;if(d>t)throw Error("inflated frame exceeds limit");if(d<=o.length)return;let m=o.length;while(m{p(1),o[c++]=u,this.win[this.winPos]=u,this.winPos=this.winPos+1&32767};while(n0){if(n>=e.length&&r<3)break;let u=s(1),d=s(2);if(d===0){if(i=0,r=0,n+4>e.length)throw Error("truncated stored block");let m=e[n]|e[n+1]<<8,f=e[n+2]|e[n+3]<<8;if(n+=4,(m^65535)!==f)throw Error("invalid stored block length");if(n+m>e.length)throw Error("truncated stored payload");p(m);for(let b=0;b=e.length)break}else if(d===1||d===2){let m=zr,f=qr;if(d===2){let b=s(5)+257,g=s(5)+1,y=s(4)+4,w=new Uint8Array(19);for(let T=0;TL)throw Error("code length overflow");for(let O=0;OL)throw Error("code length overflow");P+=R}else if(T===18){let R=s(7)+11;if(P+R>L)throw Error("code length overflow");P+=R}else throw Error("invalid code length symbol")}m=Gt(M,b),f=Gt(M.subarray(b),g)}while(!0){let b=a(m);if(b<256)l(b);else if(b===256)break;else{let g=b-257;if(g>=Es.length)throw Error("invalid length symbol");let y=Es[g]+(ks[g]?s(ks[g]):0),w=a(f);if(w>=Cs.length)throw Error("invalid distance symbol");let C=Cs[w]+(xs[w]?s(xs[w]):0);p(y);let L=this.winPos-C&32767;for(let M=0;M{this.stateListeners.delete(e)}}onFrame(e){return this.frameListeners.add(e),()=>{this.frameListeners.delete(e)}}onBinary(e){return this.binaryListeners.add(e),()=>{this.binaryListeners.delete(e)}}rpc(e,t={},n=20000){return new Promise((i,r)=>{if(!this.ws||this.ws.readyState!==WebSocket.OPEN){r(Error("Not connected to hub"));return}let s=this.nextId++,a=window.setTimeout(()=>{this.pending.delete(s),r(Error(`RPC timeout: ${e}`))},n);this.pending.set(s,{resolve:i,reject:r,timer:a}),this.ws.send(JSON.stringify({id:s,m:e,p:t}))})}setState(e){this.state=e;for(let t of this.stateListeners)t(e,this.hello)}rejectAllPending(e){for(let[,t]of this.pending)window.clearTimeout(t.timer),t.reject(Error(e));this.pending.clear()}openSocket(){if(this.closed)return;this.inflater=null;let t=`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/ws?data=1&enc=json&z=deflate`,n=new WebSocket(t);n.binaryType="arraybuffer",this.ws=n;let i=(r)=>{let s;try{s=JSON.parse(r)}catch{return}if(s.t==="hub.restarting")this.restarting={reason:String(s.reason??""),build:String(s.build??""),text:String(s.text??""),at:Date.now()};if(s.t==="hello")this.restarting=null,this.hello=s,this.features=new Set(this.hello.features??[]),this.inflater=this.hello.z==="deflate"?new On:null,this.reconnectDelay=500,this.setState("connected");else if(s.t==="reply"&&typeof s.id==="number"){let a=this.pending.get(s.id);if(a)if(this.pending.delete(s.id),window.clearTimeout(a.timer),s.ok)a.resolve(s.result??{});else{let o=s.error,c=typeof o==="string"?o:o&&typeof o==="object"&&("message"in o)?String(o.message):"Request failed",p=typeof s.errorCode==="string"?s.errorCode:void 0,l=typeof s.machine==="string"?s.machine:void 0,u=typeof s.thread==="string"?s.thread:void 0;a.reject(new Ot(c,{code:p,machine:l,thread:u}))}return}for(let a of this.frameListeners)a(s)};n.addEventListener("message",(r)=>{if(r.data instanceof ArrayBuffer){if(this.inflater){let s;try{s=this.inflater.feed(new Uint8Array(r.data))}catch{n.close();return}if(s.length>0&&s[0]===123)i(this.textDecoder.decode(s));else{let a=s.buffer.slice(s.byteOffset,s.byteOffset+s.byteLength);for(let o of this.binaryListeners)o(a)}return}for(let s of this.binaryListeners)s(r.data);return}if(typeof r.data!=="string")return;i(r.data)}),n.addEventListener("close",(r)=>{if(this.ws===n)this.ws=null;if(this.rejectAllPending("Connection closed"),this.closed)return;if(r.code===4001||r.code===4401||r.code===1008){this.handleRevoked();return}this.probeSessionOrReconnect()}),n.addEventListener("error",()=>{})}async probeSessionOrReconnect(){try{let t=await fetch("/",{method:"GET",credentials:"same-origin",cache:"no-store"});if(t.status===401||t.status===403){this.handleRevoked();return}if(t.ok){if((await t.text()).includes('id="pair-root"')){this.handleRevoked();return}}}catch{}this.setState("reconnecting");let e=this.reconnectDelay;this.reconnectDelay=Math.min(8000,Math.round(this.reconnectDelay*1.6)),this.reconnectTimer=window.setTimeout(()=>{this.reconnectTimer=null,this.openSocket()},e)}handleRevoked(){this.closed=!0,this.setState("revoked"),window.location.replace("/")}}var Kr=new TextDecoder;function Ps(e){return e.length>7&&e[0]>=160&&e[0]<=183&&e[1]===1&&e[2]===100&&e[3]===112&&e[4]===108&&e[5]===111&&e[6]===116}function Ss(e){let t=0,n=0;function i(a){if(a<=23)return a;if(a===24){if(t>=e.length)return null;return e[t++]}if(a===25){if(t+2>e.length)return null;let o=e[t]<<8|e[t+1];return t+=2,o}if(a===26){if(t+4>e.length)return null;let o=(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0;return t+=4,o}return null}function r(a){if(n++,a>32||n>400000||t>=e.length)return null;let o=e[t++],c=o>>5,p=i(o&31);if(p===null)return null;switch(c){case 0:return p;case 1:return-1-p;case 2:{if(t+p>e.length)return null;let l=e.subarray(t,t+p);return t+=p,l}case 3:{if(t+p>e.length)return null;let l=Kr.decode(e.subarray(t,t+p));return t+=p,l}case 4:{if(p>e.length)return null;let l=Array(p);for(let u=0;u=this.b.length)return this.ok=!1,0;let n=this.b[this.i++],i=7*t;if(i>=28&&(n&240)!==0)return this.ok=!1,0;if(e=(e|(n&127)<>>0,n<128)return e}return this.ok=!1,0}nextI32(){let e=this.nextU32();return e>>>1^-(e&1)}}function Ls(e){let t=0xcbf29ce484222325n,n=0x100000001b3n,i=0xffffffffffffffffn;for(let r=0;rtypeof e[b]==="number"?e[b]:g,n=t("l",0),i=t("c",0),r=t("a",255)/255,s=t("m",1),a=t("w",0),o=a/2,c=s===0&&a!==0,p=e.d instanceof Uint8Array?e.d:new Uint8Array(0),l=new As(p),u=[],d=[],m=0,f=0;while(l.more()){let b=l.nextU32(),g=u.length,y=1/0,w=1/0,C=-1/0,L=-1/0;if(s===2)m=m+l.nextI32()|0,f=f+l.nextI32()|0,u.push(m,f),y=C=m,w=L=f;else{let P=Math.min(l.nextU32(),1048576);for(let T=0;TC)C=m;if(fL)L=f}}let M=(u.length-g)/2;if(M>0){let P=s===2||M===1?2:s===0?0:1,T=s===0?0:o;d.push({info:b,x0:y-T,y0:w-T,x1:C+T,y1:L+T,at:g,n:M,kind:P})}}return{layer:n,color:i,alpha:r,mode:s,r:o,own:c,pts:new Float32Array(u),pieces:d}}function Ns(e,t,n){let i=(a)=>Array.isArray(a)&&a.length>=4?[Number(a[0])||0,Number(a[1])||0,Number(a[2])||0,Number(a[3])||0]:[0,0,0,0],r=Array.isArray(e.cs)?e.cs:[],s=[];for(let a=0;a=0&&o0){n.delete(o.h),n.set(o.h,c);while(n.size>1024){let p=n.keys().next().value;if(p!==void 0)n.delete(p);else break}}}}return{key:typeof e.key==="string"?e.key:"",fam:typeof e.fam==="string"?e.fam:"",base:typeof e.base==="string"?e.base:"",box:i(e.box),edge:i(e.edge),thick:typeof e.thick==="number"?e.thick:1600,note:typeof e.note==="string"?e.note:"",warn:typeof e.warn==="number"?e.warn!==0:!1,chunks:s}}function Ms(e,t,n,i=!0){if(n.width<=0||n.height<=0||n.naturalWidth<=0||n.naturalHeight<=0)return null;let r=Math.min(n.width/n.naturalWidth,n.height/n.naturalHeight),s=n.naturalWidth*r,a=n.naturalHeight*r,o=n.left+(n.width-s)/2,c=i?n.top:n.top+(n.height-a)/2,p=(e-o)/s,l=(t-c)/a;if(p<0||p>1||l<0||l>1)return null;return{x:Math.max(0,Math.min(1000,Math.round(p*1000))),y:Math.max(0,Math.min(1000,Math.round(l*1000)))}}var Ts=[["Enter","Enter"],["Tab","Tab"],["Bksp","Backspace"],["Esc","Escape"],["↑","ArrowUp"],["↓","ArrowDown"],["←","ArrowLeft"],["→","ArrowRight"]];function Bs(e){let t=e.trim();if(!t)return"";if(/^[a-zA-Z][a-zA-Z0-9+.-]*:/.test(t))return t;return`https://${t}`}class Un{tail=Promise.resolve();enqueue(e){let t=this.tail.then(e,e);return this.tail=t.catch(()=>{}),t}}function Is(e,t,n){let i=!0,r=!1,s=!1,a="",o=!1,c=!1,p=-1,l=null,u=new Un,d=document.createElement("div");d.className="bp-pane bp-browser-pane",d.setAttribute("data-testid","pane-browser");let m=document.createElement("div");m.className="bp-pane-bar bp-browser-nav";function f(Q,me,k){let x=document.createElement("button");if(x.type="button",x.className="bp-v-btn",x.textContent=Q,x.setAttribute("data-testid",me),k)x.title=k;return x}let b=f("←","browser-back","Back"),g=f("→","browser-forward","Forward"),y=f("↻","browser-reload","Reload"),w=document.createElement("form");w.className="bp-browser-url-form";let C=document.createElement("input");C.type="text",C.className="bp-browser-input",C.placeholder="https://…",C.autocomplete="off",C.spellcheck=!1,C.setAttribute("data-testid","browser-url");let L=f("Go","browser-go","Navigate");L.type="submit",w.append(C,L);let M=f("Take over","browser-takeover");M.classList.add("is-primary"),m.append(b,g,y,w,M);let P=document.createElement("div");P.className="bp-browser-drive-bar",P.hidden=!0;let T=document.createElement("div");T.className="bp-browser-keys-row";let R=document.createElement("input");R.type="text",R.className="bp-browser-input",R.placeholder="Type text or press Enter/Tab/Arrows…",R.autocomplete="off",R.spellcheck=!1,R.setAttribute("data-testid","browser-keys");let D=f("Send","browser-type-send");T.append(R,D);let O=document.createElement("div");O.className="bp-browser-quick-keys";for(let[Q,me]of Ts){let k=f(Q,`browser-key-${me}`);k.addEventListener("click",()=>ee("press",{key:me})),O.append(k)}P.append(T,O);let N=document.createElement("div");N.className="bp-browser-err",N.setAttribute("data-testid","browser-error"),N.hidden=!0;let Z=document.createElement("div");Z.className="bp-browser-stage",Z.setAttribute("data-testid","browser-stage");let oe=document.createElement("img");oe.className="bp-browser-img",oe.alt="Hub browser screen",oe.draggable=!1,oe.hidden=!0,oe.setAttribute("data-testid","browser-frame");let se=document.createElement("div");se.className="bp-pane-empty",se.setAttribute("data-testid","browser-empty"),se.textContent="Loading browser screen…",Z.append(oe,se);let ye=document.createElement("div");ye.className="bp-browser-hint",ye.textContent="You have the page: click to tap, scroll to wheel, type in the key box. Hand it back when done.",ye.hidden=!0,d.append(m,P,N,Z,ye),e.replaceChildren(d);function Pe(Q){N.textContent=Q,N.hidden=!Q}function Ee(){P.hidden=!r,ye.hidden=!r,M.textContent=r?"Hand back":"Take over",M.setAttribute("data-testid",r?"browser-handback":"browser-takeover"),M.classList.toggle("is-on",r),oe.classList.toggle("is-driving",r)}function ee(Q,me={},k){u.enqueue(async()=>{if(!i)return;Pe("");try{if(await t.hub.rpc("browser",{thread:n,op:Q,...me}),!i)return;k?.(),ue()}catch(x){if(!i)return;Pe(x instanceof Error?x.message:String(x))}})}function re(Q){ee("toolbar",{command:Q},()=>{r=!0,Ee()})}b.addEventListener("click",()=>re("back")),g.addEventListener("click",()=>re("forward")),y.addEventListener("click",()=>re("reload")),w.addEventListener("submit",(Q)=>{Q.preventDefault();let me=Bs(C.value);if(!me)return;if(C.value=me,!r)ee("takeover",{},()=>{r=!0,Ee()});ee("navigate",{url:me},()=>{r=!0,Ee()})}),M.addEventListener("click",()=>{if(r)ee("handback",{},()=>{r=!1,Ee()});else ee("takeover",{},()=>{r=!0,Ee(),R.focus()})});function I(){let Q=R.value;if(!Q)return;R.value="",ee("type",{text:Q})}D.addEventListener("click",I),R.addEventListener("keydown",(Q)=>{if(!r)return;if(Q.key==="Enter"){if(Q.preventDefault(),R.value)I();ee("press",{key:"Enter"});return}if(Q.key==="Tab"||Q.key==="Escape"||Q.key==="ArrowUp"||Q.key==="ArrowDown"||Q.key==="ArrowLeft"||Q.key==="ArrowRight"||Q.key==="Backspace"&&R.value==="")Q.preventDefault(),ee("press",{key:Q.key})}),oe.addEventListener("click",(Q)=>{if(!r||!s)return;let me=oe.getBoundingClientRect(),k=Ms(Q.clientX,Q.clientY,{left:me.left,top:me.top,width:me.width,height:me.height,naturalWidth:oe.naturalWidth,naturalHeight:oe.naturalHeight});if(!k)return;ee("click",k)}),oe.addEventListener("wheel",(Q)=>{if(!r||!s)return;Q.preventDefault();let me=Math.round(Q.deltaX),k=Math.round(Q.deltaY);if(me===0&&k===0)return;ee("scroll",{dx:me,dy:k})},{passive:!1});async function ue(){if(!i)return;if(o){c=!0;return}o=!0;try{do{c=!1,l=new AbortController;let Q=await fetch(`/bots/${encodeURIComponent(n)}/screen.jpg`,{credentials:"same-origin",cache:"no-store",signal:l.signal});if(!i)return;if(Q.ok){let me=await Q.blob();if(!i)return;let k=URL.createObjectURL(me),x=a;if(a=k,oe.src=k,oe.hidden=!1,se.hidden=!0,s=!0,x)URL.revokeObjectURL(x)}else if(!s)oe.hidden=!0,se.hidden=!1,se.textContent="No browser page yet. An agent opens one when it needs the web."}while(i&&c)}catch{if(!i)return;if(!s)oe.hidden=!0,se.hidden=!1,se.textContent="No browser page yet. An agent opens one when it needs the web."}finally{l=null,o=!1}}let le=t.hub.onFrame((Q)=>{if(!i)return;if(Q.t==="shot"&&Q.bot===n){if(typeof Q.n==="number"){if(Q.n===p)return;p=Q.n}ue()}});return ue(),{destroy(){if(i=!1,le(),l?.abort(),a)URL.revokeObjectURL(a),a=""}}}function _(e,t,n){let i=document.createElement(e);if(t)i.className=t;if(n!==void 0)i.textContent=n;return i}function on(e){if(!Number.isFinite(e)||e<0)return"";if(e<1024)return`${e} B`;if(e<1048576)return`${Math.round(e/1024)} KB`;return`${(e/1048576).toFixed(1)} MB`}function js(e){let t=e.lastIndexOf(".");return t>=0?e.slice(t+1).toLowerCase():""}function Xr(e){return["png","jpg","jpeg","gif","webp","svg","bmp","ico"].includes(e)}function Rs(e){return["txt","md","markdown","json","toml","yaml","yml","xml","csv","tsv","rs","ts","tsx","js","mjs","cjs","jsx","css","html","htm","sh","bash","py","c","h","cc","cpp","hpp","go","java","kt","swift","rb","lua","sql","ini","cfg","conf","env","gitignore","lock","log","gbr","gtl","gbl","gts","gbs","gto","gbo","gm1","drl","pos","net","kicad_pro","kicad_prl","kicad_dru","kicad_sym","kicad_mod","kicad_wks"].includes(e)}function Yr(e){let t=js(e);if(t==="kicad_pcb")return"board";if(t==="kicad_sch")return"schematic";if(t==="step"||t==="stp"||t==="glb")return"mech";return null}function Ds(e,t,n,i){let r=!0,s="",a="",o=_("div","bp-pane bp-files-pane");o.setAttribute("data-testid","pane-files");let c=_("div","bp-pane-bar"),p=_("div","bp-files-crumbs"),l=_("button","bp-v-btn","Refresh");l.type="button",l.addEventListener("click",()=>void g(s)),c.append(p,l);let u=_("div","bp-files-split"),d=_("div","bp-files-list");d.setAttribute("data-testid","files-list");let m=_("div","bp-files-preview");m.setAttribute("data-testid","files-preview"),m.append(_("div","bp-pane-empty","Select a file to preview")),u.append(d,m),o.append(c,u),e.replaceChildren(o);function f(){p.replaceChildren();let y=_("button","bp-crumb-btn","project");if(y.type="button",y.addEventListener("click",()=>void g("")),p.append(y),!s)return;let w=s.split("/").filter(Boolean),C="";for(let L of w){C=C?`${C}/${L}`:L;let M=C;p.append(_("span","bp-vh-sep","/"));let P=_("button","bp-crumb-btn",L);P.type="button",P.addEventListener("click",()=>void g(M)),p.append(P)}}async function b(y,w,C){a=y,m.replaceChildren();let L=_("div","bp-files-prev-head");L.append(_("span","bp-files-prev-name",y));let M=_("div","bp-files-prev-acts"),P=Yr(w);if(P){let O=_("button","bp-v-btn is-primary",`Open in ${P}`);O.type="button",O.setAttribute("data-testid","files-open-viewer"),O.addEventListener("click",()=>i(P,y)),M.append(O)}let T=`/files/get?thread=${encodeURIComponent(n)}&path=${encodeURIComponent(y)}`,R=_("a","bp-v-btn","Download");R.href=T,R.download=w,M.append(R),L.append(M),m.append(L);let D=js(w);if(Xr(D)){let O=_("div","bp-files-img-wrap"),N=document.createElement("img");N.className="bp-files-img",N.alt=w,N.src=T,O.append(N),m.append(O);return}if(C>524288&&!Rs(D)){m.append(_("div","bp-pane-empty",`Binary file (${on(C)}). Use Download to save.`));return}if(Rs(D)||C<=65536){let O=_("div","bp-pane-empty","Loading…");m.append(O);try{let N=await fetch(T,{credentials:"same-origin"});if(!r||a!==y)return;if(!N.ok){O.textContent=`Could not load file (${N.status})`;return}if((N.headers.get("content-type")||"").startsWith("image/")){O.remove();let le=document.createElement("img");le.className="bp-files-img",le.alt=w,le.src=T,m.append(le);return}let oe=262144,se=[],ye=0,Pe=!1;if(N.body){let le=N.body.getReader();try{while(!0){let{done:Q,value:me}=await le.read();if(Q||!me)break;if(ye+me.byteLength>oe){let k=oe-ye;if(k>0)se.push(me.subarray(0,k)),ye+=k;Pe=!0,await le.cancel();break}se.push(me),ye+=me.byteLength}}finally{le.releaseLock()}}if(!r||a!==y)return;let Ee=new Uint8Array(ye),ee=0;for(let le of se)Ee.set(le,ee),ee+=le.byteLength;let re=!1;for(let le=0;leL.dir===M.dir?L.name.localeCompare(M.name):L.dir?-1:1),d.replaceChildren(),y){let L=_("button","bp-file-row is-dir");L.type="button",L.append(_("span","bp-file-icon","↰"),_("span","bp-file-name",".."));let M=y.includes("/")?y.slice(0,y.lastIndexOf("/")):"";L.addEventListener("click",()=>void g(M)),d.append(L)}if(C.length===0){d.append(_("div","bp-pane-empty","Empty folder"));return}for(let L of C){let M=y?`${y}/${L.name}`:L.name,P=_("button","bp-file-row"+(L.dir?" is-dir":"")+(M===a?" is-sel":""));P.type="button",P.setAttribute("data-testid",`file-row-${L.name}`),P.append(_("span","bp-file-icon",L.dir?"▸":"·"),_("span","bp-file-name",L.name),_("span","bp-file-size",L.dir?"":on(L.size))),P.addEventListener("click",()=>{if(L.dir)g(M);else d.querySelectorAll(".bp-file-row.is-sel").forEach((T)=>T.classList.remove("is-sel")),P.classList.add("is-sel"),b(M,L.name,L.size)}),d.append(P)}}catch(w){if(!r)return;d.replaceChildren(_("div","bp-pane-empty",w instanceof Error?w.message:String(w)))}}return g(""),{destroy(){r=!1}}}function Hs(e,t,n){let i=!0,r=_("div","bp-pane bp-diff-pane");r.setAttribute("data-testid","pane-diff");let s=_("div","bp-pane-bar"),a=_("span","bp-diff-summary","Loading diff…"),o=_("button","bp-v-btn","Refresh");o.type="button",o.addEventListener("click",()=>void p()),s.append(a,o);let c=_("div","bp-diff-body");c.setAttribute("data-testid","diff-body"),r.append(s,c),e.replaceChildren(r);async function p(){a.textContent="Loading diff…",c.replaceChildren();try{let l=await t.hub.rpc("viewer.diff",{thread:n});if(!i)return;if(l?.nogit){a.textContent="Not a git repository",c.append(_("div","bp-pane-empty","This project is not a git repository."));return}let u=typeof l?.diff==="string"?l.diff:"";if(!u.trim()){a.textContent="Clean working tree",c.append(_("div","bp-pane-empty","No uncommitted changes."));return}let d=u.split(` +`),m=0,f=0,b=0,g=document.createDocumentFragment(),y=_("div","bp-diff-file");for(let w of d){if(w.startsWith("diff --git ")){if(y.childNodes.length>0)g.append(y);y=_("div","bp-diff-file"),m++;let C=w.match(/ b\/(.+)$/);y.append(_("div","bp-diff-file-head",C?C[1]:w));continue}if(w.startsWith("index ")||w.startsWith("--- ")||w.startsWith("+++ "))y.append(_("div","bp-diff-line is-meta",w));else if(w.startsWith("@@"))y.append(_("div","bp-diff-line is-hunk",w));else if(w.startsWith("+"))f++,y.append(_("div","bp-diff-line is-add",w));else if(w.startsWith("-"))b++,y.append(_("div","bp-diff-line is-del",w));else y.append(_("div","bp-diff-line",w))}if(y.childNodes.length>0)g.append(y);a.textContent=`${m||1} file${m===1?"":"s"} · +${f} -${b}`,c.append(g)}catch(l){if(!i)return;a.textContent="Diff unavailable",c.append(_("div","bp-pane-empty",l instanceof Error?l.message:String(l)))}}return p(),{destroy(){i=!1}}}function Fs(e,t,n){let i=!0,r="checks",s=_("div","bp-pane bp-review-pane");s.setAttribute("data-testid","pane-review");let a=_("div","bp-pane-bar"),o=_("div","bp-review-tabs"),c=_("button","bp-v-btn is-on","Checks"),p=_("button","bp-v-btn","BOM"),l=_("button","bp-v-btn","Comments");c.type=p.type=l.type="button",o.append(c,p,l);let u=_("button","bp-v-btn","Refresh");u.type="button",u.addEventListener("click",()=>void b()),a.append(o,u);let d=_("div","bp-review-body");d.setAttribute("data-testid","review-body"),s.append(a,d),e.replaceChildren(s);function m(g){r=g,c.classList.toggle("is-on",r==="checks"),p.classList.toggle("is-on",r==="bom"),l.classList.toggle("is-on",r==="comments"),b()}c.addEventListener("click",()=>m("checks")),p.addEventListener("click",()=>m("bom")),l.addEventListener("click",()=>m("comments"));function f(g){let y=_("div","bp-review-md"),w=g.split(` +`),C=0;while(C{T.preventDefault();let R=M.value.trim();if(!R)return;P.disabled=!0,t.hub.rpc("review.comment",{thread:n,text:R}).then(()=>{M.value="",P.disabled=!1,b()},()=>{P.disabled=!1})}),d.append(L),C.length===0){d.append(_("div","bp-pane-empty","No review comments yet."));return}for(let T of C){let R=_("div","bp-review-comment"+(T.resolved?" is-resolved":"")),D=[T.by||"review",T.file,T.layer,T.item].filter(Boolean).join(" · ");R.append(_("div","bp-review-comment-meta",D),_("div","bp-review-comment-text",T.text)),d.append(R)}return}let g=await t.hub.rpc("review.page",{thread:n,page:r});if(!i)return;let y=g?.report||{};if(d.replaceChildren(),y.line||y.gate){let w=_("div","bp-review-gate",[y.gate,y.line].filter(Boolean).join(" · "));d.append(w)}if(y.err)d.append(_("div","bp-review-err",y.err));if(Array.isArray(y.tasks)&&y.tasks.length>0){let w=_("div","bp-review-tasks");y.tasks.forEach((C,L)=>{let M=_("label","bp-review-task"),P=document.createElement("input");P.type="checkbox",P.checked=!!(C.done??C.checked);let T=typeof C.index==="number"?C.index:L;P.addEventListener("change",()=>{t.hub.rpc("review.tick",{thread:n,index:T}).then(()=>void b(),()=>{})}),M.append(P,_("span",void 0,C.text||C.label||`Item ${L+1}`)),w.append(M)}),d.append(w)}if(y.md&&y.md.trim())d.append(f(y.md));else if(!y.err&&(!y.tasks||y.tasks.length===0))d.append(_("div","bp-pane-empty",`No ${r==="bom"?"BOM":"design checks"} report available.`))}catch(g){if(!i)return;d.replaceChildren(_("div","bp-pane-empty",g instanceof Error?g.message:String(g)))}}return b(),{destroy(){i=!1}}}function $s(e,t){let n=e>>>16&255,i=e>>>8&255,r=e&255;return t>=0.999?`rgb(${n},${i},${r})`:`rgba(${n},${i},${r},${t.toFixed(3)})`}class Wn{canvas;ctx;frame=null;masks={off:0,dim:0,lift:255};highlights=new Set;lightTheme=!1;cx=0;cy=0;scale=0.0001;fittedKey="";fitW=0;fitH=0;userMoved=!1;dirty=!1;rafId=0;pointers=new Map;dragStart=null;pinchStart=null;resizeObs;cbs;constructor(e,t={}){this.cbs=t,this.canvas=document.createElement("canvas"),this.canvas.className="bp-viewer-canvas",this.canvas.style.width="100%",this.canvas.style.height="100%",this.canvas.style.display="block",this.canvas.style.touchAction="none",e.appendChild(this.canvas);let n=this.canvas.getContext("2d");if(!n)throw Error("Canvas2D unavailable");this.ctx=n,this.resizeObs=new ResizeObserver(()=>this.scheduleDraw()),this.resizeObs.observe(this.canvas),this.canvas.addEventListener("pointerdown",this.onPointerDown),this.canvas.addEventListener("pointermove",this.onPointerMove),this.canvas.addEventListener("pointerup",this.onPointerUp),this.canvas.addEventListener("pointercancel",this.onPointerUp),this.canvas.addEventListener("wheel",this.onWheel,{passive:!1}),this.canvas.addEventListener("dblclick",this.onDblClick)}setTheme(e){if(this.lightTheme!==e)this.lightTheme=e,this.scheduleDraw()}setFrame(e){if(this.frame=e,e&&e.key!==this.fittedKey)this.fittedKey=e.key,this.fit();else this.scheduleDraw()}setLayers(e){this.masks=e,this.scheduleDraw()}setHighlights(e){this.highlights.clear();for(let[t,n]of e)this.highlights.add(`${t}:${n}`);this.scheduleDraw()}presentMask(){if(!this.frame)return 0;let e=0;for(let t of this.frame.chunks)if(t.layer<32)e=(e|1<>>0;return e>>>0}presentColors(){let e=new Map;if(!this.frame)return e;for(let t of this.frame.chunks)if(!e.has(t.layer))e.set(t.layer,t.color);return e}applyFit(e,t){if(!this.frame||e<10||t<10)return;let n=this.frame.box,i=Math.max(n[2]-n[0],1000),r=Math.max(n[3]-n[1],1000);this.cx=(n[0]+n[2])*0.5,this.cy=(n[1]+n[3])*0.5,this.scale=Math.min(e/i,t/r)*0.92,this.fitW=e,this.fitH=t,this.userMoved=!1}fit(){if(!this.frame)return;this.userMoved=!1,this.fitW=0,this.fitH=0;let e=this.canvas.getBoundingClientRect();if(e.width>=10&&e.height>=10)this.applyFit(e.width,e.height);this.scheduleDraw()}zoomToBoxMm(e){let t=e[0]*1000,n=e[1]*1000,i=e[2]*1000,r=e[3]*1000,s=Math.max(i-t,1000),a=Math.max(r-n,1000),o=this.canvas.getBoundingClientRect(),c=Math.max(o.width,200),p=Math.max(o.height,200);this.cx=(t+i)*0.5,this.cy=(n+r)*0.5,this.scale=Math.min(c/s,p/a)*0.85,this.userMoved=!0,this.scheduleDraw()}scheduleDraw(){if(this.dirty)return;this.dirty=!0,this.rafId=requestAnimationFrame(()=>{this.dirty=!1,this.rafId=0,this.draw()})}draw(){let e=this.canvas.getBoundingClientRect(),t=Math.max(1,Math.round(e.width)),n=Math.max(1,Math.round(e.height)),i=Math.min(window.devicePixelRatio||1,2),r=Math.round(t*i),s=Math.round(n*i);if(this.canvas.width!==r||this.canvas.height!==s)this.canvas.width=r,this.canvas.height=s;let a=this.ctx;a.setTransform(i,0,0,i,0,0),a.fillStyle=this.lightTheme?"#f5f4ef":"#08090b",a.fillRect(0,0,t,n);let o=this.frame;if(!o)return;if(!this.userMoved&&t>=10&&n>=10&&(Math.abs(this.fitW-t)>2||Math.abs(this.fitH-n)>2))this.applyFit(t,n);let c=t*0.5,p=n*0.5,l=this.scale,u=this.cx,d=this.cy,m=u-c/l,f=u+c/l,b=d-p/l,g=d+p/l,{off:y,dim:w,lift:C}=this.masks,L=[],M=[];for(let T=0;T>>R&1)===1)continue;if(R===C)M.push(T);else L.push(T)}let P=L.concat(M);a.lineCap="round",a.lineJoin="round";for(let T=0;T>>D.layer&1)===1,N=D.alpha*(O?0.25:1);if(N<=0.01)continue;this.drawChunk(a,D,N,m,b,f,g,u,d,l,c,p)}if(this.highlights.size>0){a.fillStyle=this.lightTheme?"rgba(245,244,239,0.72)":"rgba(8,9,11,0.72)",a.fillRect(0,0,t,n);let T=this.lightTheme?"rgba(27,29,33,0.77)":"rgba(217,221,228,0.77)";for(let R=0;Rs||g.y1a)continue;if(g.n<3)continue;let y=(d[g.at]-o)*p+l,w=(d[g.at+1]-c)*p+u;e.moveTo(y,w);for(let C=1;C0)e.fill()}else if(t.mode===2){let f=Math.max(0.75,t.r*p);e.fillStyle=m,e.beginPath();let b=0;for(let g=0;gs||y.y1a)continue;let w=(d[y.at]-o)*p+l,C=(d[y.at+1]-c)*p+u;e.moveTo(w+f,C),e.arc(w,C,f,0,Math.PI*2),b++}if(b>0)e.fill()}else{e.strokeStyle=m,e.lineWidth=Math.max(1,t.r*2*p),e.beginPath();let f=0;for(let b=0;bs||g.y1a)continue;let y=(d[g.at]-o)*p+l,w=(d[g.at+1]-c)*p+u;if(g.n===1)e.moveTo(y,w),e.lineTo(y+0.01,w);else{e.moveTo(y,w);for(let C=1;C0)e.stroke()}}drawLitPieces(e,t,n,i,r,s,a,o,c,p,l,u,d){let m=t.pts,f=$s(t.color,t.alpha);for(let b=0;ba||g.y1o)continue;let y=(m[g.at]-c)*l+u,w=(m[g.at+1]-p)*l+d;if(g.kind===2){let C=Math.max(1.5,t.r*l);e.fillStyle=f,e.beginPath(),e.arc(y,w,C,0,Math.PI*2),e.fill(),e.strokeStyle=i,e.lineWidth=1.5,e.stroke()}else if(g.kind===0&&g.n>=3){e.fillStyle=f,e.beginPath(),e.moveTo(y,w);for(let C=1;C=0;l--){let u=n.chunks[l];if(u.layer<32&&(p>>>u.layer&1)===1)continue;for(let d=0;dm.x1+a||sm.y1+a)continue;let f=(m.x1-m.x0+1)*(m.y1-m.y0+1);if(f{if(this.canvas.setPointerCapture(e.pointerId),this.pointers.set(e.pointerId,{x:e.clientX,y:e.clientY}),this.pointers.size===1)this.dragStart={x:e.clientX,y:e.clientY,cx:this.cx,cy:this.cy,moved:!1},this.pinchStart=null;else if(this.pointers.size===2){let[t,n]=Array.from(this.pointers.values());this.pinchStart={dist:Math.hypot(n.x-t.x,n.y-t.y)||1,midX:(t.x+n.x)*0.5,midY:(t.y+n.y)*0.5,scale:this.scale,cx:this.cx,cy:this.cy},this.dragStart=null}};onPointerMove=(e)=>{if(!this.pointers.has(e.pointerId))return;if(this.pointers.set(e.pointerId,{x:e.clientX,y:e.clientY}),this.pointers.size===2&&this.pinchStart){let[t,n]=Array.from(this.pointers.values()),i=Math.hypot(n.x-t.x,n.y-t.y)||1,r=(t.x+n.x)*0.5,s=(t.y+n.y)*0.5,a=i/this.pinchStart.dist,o=Math.max(0.0000001,Math.min(2,this.pinchStart.scale*a)),c=this.canvas.getBoundingClientRect(),p=this.pinchStart.midX-c.left-c.width*0.5,l=this.pinchStart.midY-c.top-c.height*0.5,u=r-c.left-c.width*0.5,d=s-c.top-c.height*0.5;this.scale=o,this.cx=this.pinchStart.cx+p/this.pinchStart.scale-u/o,this.cy=this.pinchStart.cy+l/this.pinchStart.scale-d/o,this.userMoved=!0,this.cbs.onUserMove?.(),this.scheduleDraw();return}if(this.dragStart&&this.pointers.size===1){let t=e.clientX-this.dragStart.x,n=e.clientY-this.dragStart.y;if(Math.hypot(t,n)>3)this.dragStart.moved=!0;if(this.dragStart.moved)this.cx=this.dragStart.cx-t/this.scale,this.cy=this.dragStart.cy-n/this.scale,this.userMoved=!0,this.cbs.onUserMove?.(),this.scheduleDraw()}};onPointerUp=(e)=>{let t=this.dragStart&&!this.dragStart.moved&&this.pointers.size===1;if(this.pointers.delete(e.pointerId),this.pointers.size<2)this.pinchStart=null;if(this.pointers.size===0)this.dragStart=null;if(t&&this.cbs.onPick){let n=this.canvas.getBoundingClientRect(),i=this.hitTest(e.clientX-n.left,e.clientY-n.top);this.cbs.onPick(i)}};onWheel=(e)=>{e.preventDefault();let t=this.canvas.getBoundingClientRect(),n=e.clientX-t.left-t.width*0.5,i=e.clientY-t.top-t.height*0.5,r=e.deltaY<0?1.16:0.8620689655172414,s=Math.max(0.0000001,Math.min(2,this.scale*r));this.cx+=n/this.scale-n/s,this.cy+=i/this.scale-i/s,this.scale=s,this.userMoved=!0,this.cbs.onUserMove?.(),this.scheduleDraw()};onDblClick=()=>{this.fit()};destroy(){if(this.rafId)cancelAnimationFrame(this.rafId);this.resizeObs.disconnect(),this.canvas.removeEventListener("pointerdown",this.onPointerDown),this.canvas.removeEventListener("pointermove",this.onPointerMove),this.canvas.removeEventListener("pointerup",this.onPointerUp),this.canvas.removeEventListener("pointercancel",this.onPointerUp),this.canvas.removeEventListener("wheel",this.onWheel),this.canvas.removeEventListener("dblclick",this.onDblClick),this.canvas.remove()}}var Gs=[{id:"fit",label:"Fit"},{id:"iso",label:"Iso"},{id:"top",label:"Top"},{id:"bottom",label:"Bottom"},{id:"front",label:"Front"},{id:"right",label:"Right"},{id:"back",label:"Back"},{id:"left",label:"Left"}];function Os(e){switch(e){case"top":return{yaw:0,pitch:Math.PI*0.499};case"bottom":return{yaw:0,pitch:-Math.PI*0.499};case"front":return{yaw:0,pitch:0};case"right":return{yaw:Math.PI*0.5,pitch:0};case"back":return{yaw:Math.PI,pitch:0};case"left":return{yaw:-Math.PI*0.5,pitch:0};case"iso":case"fit":default:return{yaw:0.6,pitch:0.7}}}function _n(e,t,n,i){if(!e||!t||!n||!i)return!1;if(!e.startsWith(t))return!1;let r=e.slice(t.length).split(` +`),s=(r[0]||"").split("\t");if(s[0]!=="git"||s[2]!==n)return!1;let a=r[1]||s.slice(4).join("\t");if(!a)return!1;let o=a.replace(/\\/g,"/"),c=i.replace(/\\/g,"/");if(c.startsWith("/")||/^[A-Za-z]:\//.test(c))return o===c;return o===c||o.endsWith(`/${c}`)}class zn{refs=[];index=-1;lastCommit="";highlightEdits=!1;playing=!1;setRefs(e){if(this.refs=e,this.index>=e.length)this.index=-1,this.highlightEdits=!1}isLive(){return this.index<0||this.index>=this.refs.length}activeRef(){return this.isLive()?null:this.refs[this.index]}step(e){if(this.refs.length===0)return!1;let t=this.index;if(e>0)this.index=Math.min(this.refs.length-1,this.index+1);else this.index=Math.max(-1,this.index-1);if(this.index===-1)this.playing=!1,this.highlightEdits=!1;else this.lastCommit=this.refs[this.index].commit,this.highlightEdits=!0;return this.index!==t}selectCommit(e){if(!e)return this.goLive();let t=this.refs.findIndex((i)=>i.commit===e);if(t<0)return!1;let n=this.index!==t||!this.highlightEdits;return this.index=t,this.lastCommit=e,this.highlightEdits=!0,n}goLive(){let e=this.index!==-1||this.playing||this.highlightEdits;return this.index=-1,this.playing=!1,this.highlightEdits=!1,e}toggleHighlight(){if(this.highlightEdits)return this.goLive(),!1;if(this.refs.length===0)return!1;let e=this.lastCommit?this.refs.findIndex((t)=>t.commit===this.lastCommit):0;return this.index=e>=0?e:0,this.lastCommit=this.refs[this.index].commit,this.highlightEdits=!0,!0}compareRequest(){let e=this.activeRef();if(!e||!this.highlightEdits)return null;return{commit:e.commit,bits:0}}}var Zr=`#version 300 es precision highp float; out vec2 vUv; void main() { @@ -19,7 +19,7 @@ void main() { vUv = vec2(x * 0.5 + 0.5, 1.0 - (y * 0.5 + 0.5)); gl_Position = vec4(x, y, 0.0, 1.0); } -`,ja=`#version 300 es +`,Qr=`#version 300 es precision highp float; in vec2 vUv; uniform vec3 uBgTop; @@ -36,7 +36,7 @@ void main() { vec3 lin = mix(uBgTop, uBgBot, clamp(vUv.y, 0.0, 1.0)); outColor = vec4(linearToSrgb(clamp(lin, 0.0, 1.0)), 1.0); } -`,Da=`#version 300 es +`,ea=`#version 300 es precision highp float; layout(location = 0) in vec3 aPos; layout(location = 1) in vec3 aNrm; @@ -54,7 +54,7 @@ void main() { vCol = aCol; gl_Position = uMvp * vec4(aPos, 1.0); } -`,Ha=`#version 300 es +`,ta=`#version 300 es precision highp float; in vec3 vPos; in vec3 vNrm; @@ -150,8 +150,8 @@ void main() { rgb = rgb / (vec3(1.0) + max(rgb - vec3(0.8), vec3(0.0)) * 0.28); outColor = vec4(linearToSrgb(clamp(rgb, 0.0, 1.0)), alpha * uFade); } -`;function ze(e){let t=e/255;return t<=0.04045?t/12.92:Math.pow((t+0.055)/1.055,2.4)}var Fa=[ze(77),ze(83),ze(94)],$a=[ze(53),ze(58),ze(67)],Ga=[ze(245),ze(246),ze(248)],Oa=[ze(225),ze(228),ze(233)];function Ss(e,t,n){let i=e.createShader(t);if(!i)throw Error("createShader failed");if(e.shaderSource(i,n),e.compileShader(i),!e.getShaderParameter(i,e.COMPILE_STATUS)){let s=e.getShaderInfoLog(i)||"shader compile error";throw e.deleteShader(i),Error(s)}return i}function As(e,t,n){let i=Ss(e,e.VERTEX_SHADER,t),s=Ss(e,e.FRAGMENT_SHADER,n),a=e.createProgram();if(!a)throw Error("createProgram failed");if(e.attachShader(a,i),e.attachShader(a,s),e.linkProgram(a),e.deleteShader(i),e.deleteShader(s),!e.getProgramParameter(a,e.LINK_STATUS)){let r=e.getProgramInfoLog(a)||"program link error";throw e.deleteProgram(a),Error(r)}return a}function Va(e,t){let n=new Float32Array(16);for(let i=0;i<4;i++)for(let s=0;s<4;s++)n[i*4+s]=e[0+s]*t[i*4+0]+e[4+s]*t[i*4+1]+e[8+s]*t[i*4+2]+e[12+s]*t[i*4+3];return n}function Ua(e,t,n,i){let s=1/Math.tan(e*0.5),a=1/(n-i),r=new Float32Array(16);return r[0]=s/t,r[5]=s,r[10]=(i+n)*a,r[11]=-1,r[14]=2*i*n*a,r}function Ls(e){let t=Math.hypot(e[0],e[1],e[2])||1;return[e[0]/t,e[1]/t,e[2]/t]}function Ps(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function $n(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}class Gn{canvas;gl=null;bgProg=null;bgVao=null;uBgTop=null;uBgBot=null;prog=null;uMvp=null;uEye=null;uRight=null;uUp=null;uFwd=null;uFade=null;worker=null;boardBatch=null;partBatches=[];activeKey="";lastMeshId="";nextJobId=1;partsTotal=0;partsDone=0;center=[0,0,0];target=[0,0,0];radius=50;dist=120;yaw=0.6;pitch=0.7;lightTheme=!1;dirty=!1;rafId=0;pointers=new Map;pinchDist=0;resizeObs;cbs;constructor(e,t={}){this.cbs=t,this.canvas=document.createElement("canvas"),this.canvas.className="bp-viewer-canvas",this.canvas.style.width="100%",this.canvas.style.height="100%",this.canvas.style.display="block",this.canvas.style.touchAction="none",e.appendChild(this.canvas);let n=this.canvas.getContext("webgl2",{antialias:!0,alpha:!1,preserveDrawingBuffer:!0});if(n)this.gl=n,this.bgProg=As(n,Ra,ja),this.bgVao=n.createVertexArray(),this.uBgTop=n.getUniformLocation(this.bgProg,"uBgTop"),this.uBgBot=n.getUniformLocation(this.bgProg,"uBgBot"),this.prog=As(n,Da,Ha),this.uMvp=n.getUniformLocation(this.prog,"uMvp"),this.uEye=n.getUniformLocation(this.prog,"uEye"),this.uRight=n.getUniformLocation(this.prog,"uRight"),this.uUp=n.getUniformLocation(this.prog,"uUp"),this.uFwd=n.getUniformLocation(this.prog,"uFwd"),this.uFade=n.getUniformLocation(this.prog,"uFade"),n.enable(n.DEPTH_TEST),n.blendFunc(n.SRC_ALPHA,n.ONE_MINUS_SRC_ALPHA);else this.cbs.onStatus?.("WebGL2 is unavailable in this browser");try{this.worker=new Worker("/assets/mesh-worker.js",{type:"module"}),this.worker.onmessage=(i)=>this.onWorkerMessage(i.data)}catch{this.cbs.onStatus?.("3D worker unavailable")}this.resizeObs=new ResizeObserver(()=>this.scheduleDraw()),this.resizeObs.observe(this.canvas),this.canvas.addEventListener("pointerdown",this.onPointerDown),this.canvas.addEventListener("pointermove",this.onPointerMove),this.canvas.addEventListener("pointerup",this.onPointerUp),this.canvas.addEventListener("pointercancel",this.onPointerUp),this.canvas.addEventListener("wheel",this.onWheel,{passive:!1}),this.canvas.addEventListener("dblclick",this.onDblClick),this.canvas.addEventListener("contextmenu",this.onContextMenu)}keptToken(){return this.activeKey&&this.lastMeshId?`${this.activeKey} ${this.lastMeshId}`:""}setTheme(e){if(this.lightTheme!==e)this.lightTheme=e,this.scheduleDraw()}handleFrame(e){let t=typeof e.key==="string"?e.key:"";if(!t)return;if(e.mesh instanceof Uint8Array&&typeof e.n==="number"&&!e.part){this.activeKey=t,this.lastMeshId=ps(e.mesh),this.clearParts(),this.cbs.onStatus?.("Building 3D model…");let n=new Uint8Array(e.mesh),i=e.faces instanceof Uint8Array?new Uint8Array(e.faces):void 0,s=[n.buffer];if(i)s.push(i.buffer);this.worker?.postMessage({id:this.nextJobId++,kind:"solid",key:t,n:e.n,mesh:n,faces:i},s);return}if(e.parts&&typeof e.parts==="object"&&!Array.isArray(e.parts)&&!(e.parts instanceof Uint8Array)){if(this.activeKey&&t!==this.activeKey)return;if(this.activeKey=t,this.clearParts(),this.partsTotal=typeof e.parts.of==="number"?e.parts.of:0,this.partsDone=0,this.partsTotal>0)this.cbs.onStatus?.(`Loading parts 0/${this.partsTotal}…`);this.scheduleDraw();return}if(typeof e.part==="string"&&e.mesh instanceof Uint8Array&&e.at instanceof Uint8Array&&typeof e.n==="number"){if(this.activeKey&&t!==this.activeKey)return;let n=new Uint8Array(e.mesh),i=new Uint8Array(e.at),s=e.faces instanceof Uint8Array?new Uint8Array(e.faces):void 0,a=[n.buffer,i.buffer];if(s)a.push(s.buffer);this.worker?.postMessage({id:this.nextJobId++,kind:"part",key:t,partId:e.part,n:e.n,mesh:n,at:i,faces:s,refs:Array.isArray(e.refs)?e.refs:[],done:typeof e.done==="number"?e.done:0},a)}}onWorkerMessage(e){if(e.error){this.cbs.onStatus?.(e.error);return}if(e.key!==this.activeKey||!this.gl)return;if(e.kind==="solid")this.deleteBatch(this.boardBatch),this.boardBatch=this.uploadBatch(e.positions,e.normals,e.colors,0),this.center=[e.center[0],e.center[1],e.center[2]],this.target=[e.center[0],e.center[1],e.center[2]],this.radius=e.radius,this.fit(),this.cbs.onStatus?.(""),this.scheduleDraw();else if(e.kind==="part"){let t=this.uploadBatch(e.positions,e.normals,e.colors,performance.now());if(t)this.partBatches.push(t);if(this.partsDone=e.done||this.partsDone+1,this.partsTotal>0&&this.partsDone>>24===0)a++;else r++;let o=a>0?new Float32Array(a*9):null,l=a>0?new Float32Array(a*9):null,p=a>0?new Float32Array(a*12):null,c=r>0?new Float32Array(r*9):null,u=r>0?new Float32Array(r*9):null,d=r>0?new Float32Array(r*12):null,m=0,f=0;for(let y=0;y>>24&255,A=1-x/255,N=(w>>>16&255)/255,S=(w>>>8&255)/255,M=(w&255)/255,B=y*9;if(x===0&&o&&l&&p){let R=m*9;for(let D=0;D<9;D++)o[R+D]=e[B+D],l[R+D]=t[B+D];let U=m*12;for(let D=0;D<3;D++)p[U+D*4]=N,p[U+D*4+1]=S,p[U+D*4+2]=M,p[U+D*4+3]=1;m++}else if(c&&u&&d){let R=f*9;for(let D=0;D<9;D++)c[R+D]=e[B+D],u[R+D]=t[B+D];let U=f*12;for(let D=0;D<3;D++)d[U+D*4]=N,d[U+D*4+1]=S,d[U+D*4+2]=M,d[U+D*4+3]=A;f++}}let b=o&&l&&p?this.createSubBatch(o,l,p,a*3):null,g=c&&u&&d?this.createSubBatch(c,u,d,r*3):null;if(!b&&!g)return null;return{opaque:b,translucent:g,fadeStartMs:i}}deleteSubBatch(e){let t=this.gl;if(!t||!e)return;t.deleteVertexArray(e.vao),t.deleteBuffer(e.posBuf),t.deleteBuffer(e.nrmBuf),t.deleteBuffer(e.colBuf)}deleteBatch(e){if(!e)return;this.deleteSubBatch(e.opaque),this.deleteSubBatch(e.translucent)}clearParts(){for(let e of this.partBatches)this.deleteBatch(e);this.partBatches=[]}fit(){this.setView("fit")}setView(e){let t=35*Math.PI/180;this.dist=this.radius/Math.sin(t*0.5)*1.15,this.target=[this.center[0],this.center[1],this.center[2]];let{yaw:n,pitch:i}=ks(e);this.yaw=n,this.pitch=i,this.scheduleDraw()}snapPng(){return this.draw(performance.now()),new Promise((e)=>{this.canvas.toBlob((t)=>e(t),"image/png")})}scheduleDraw(){if(this.dirty)return;this.dirty=!0,this.rafId=requestAnimationFrame((e)=>{if(this.dirty=!1,this.rafId=0,this.draw(e))this.scheduleDraw()})}drawSubBatch(e){if(!e||!this.gl)return;this.gl.bindVertexArray(e.vao),this.gl.drawArrays(this.gl.TRIANGLES,0,e.vertCount)}draw(e){let t=this.gl;if(!t||!this.prog)return!1;let n=this.canvas.getBoundingClientRect(),i=Math.max(1,Math.round(n.width)),s=Math.max(1,Math.round(n.height)),a=Math.min(window.devicePixelRatio||1,2),r=Math.round(i*a),o=Math.round(s*a);if(this.canvas.width!==r||this.canvas.height!==o)this.canvas.width=r,this.canvas.height=o;if(t.viewport(0,0,r,o),!this.boardBatch&&this.partBatches.length===0)return!1;if(t.depthMask(!0),t.clear(t.DEPTH_BUFFER_BIT),this.bgProg&&this.bgVao){t.disable(t.DEPTH_TEST),t.disable(t.BLEND),t.depthMask(!1),t.useProgram(this.bgProg);let R=this.lightTheme?Ga:Fa,U=this.lightTheme?Oa:$a;t.uniform3f(this.uBgTop,R[0],R[1],R[2]),t.uniform3f(this.uBgBot,U[0],U[1],U[2]),t.bindVertexArray(this.bgVao),t.drawArrays(t.TRIANGLE_STRIP,0,4),t.bindVertexArray(null)}let l=Math.cos(this.pitch),p=Math.sin(this.pitch),c=Math.cos(this.yaw),u=Math.sin(this.yaw),d=[this.target[0]+this.dist*l*u,this.target[1]-this.dist*l*c,this.target[2]+this.dist*p],m=Ls([this.target[0]-d[0],this.target[1]-d[1],this.target[2]-d[2]]),f=Math.abs(m[2])>0.99?[0,1,0]:[0,0,1],b=Ls(Ps(m,f)),g=Ps(b,m),y=new Float32Array([b[0],g[0],-m[0],0,b[1],g[1],-m[1],0,b[2],g[2],-m[2],0,-$n(b,d),-$n(g,d),$n(m,d),1]),w=Math.max(0.05,this.dist*0.01),x=Math.max(this.dist*10,this.radius*20),A=Ua(35*Math.PI/180,r/o,w,x),N=Va(A,y);t.useProgram(this.prog),t.uniformMatrix4fv(this.uMvp,!1,N),t.uniform3f(this.uEye,d[0],d[1],d[2]),t.uniform3f(this.uRight,b[0],b[1],b[2]),t.uniform3f(this.uUp,g[0],g[1],g[2]),t.uniform3f(this.uFwd,m[0],m[1],m[2]);let S=!1,M=[],B=[];for(let R of this.partBatches){let U=e-R.fadeStartMs,D=R.fadeStartMs===0?1:Math.min(1,Math.max(0,U/300));if(D<1){if(S=!0,D>0)B.push({batch:R,fade:D})}else M.push(R)}if(t.enable(t.DEPTH_TEST),t.depthMask(!0),t.disable(t.BLEND),t.uniform1f(this.uFade,1),this.boardBatch)this.drawSubBatch(this.boardBatch.opaque);for(let R of M)this.drawSubBatch(R.opaque);if(t.depthMask(!1),t.enable(t.BLEND),t.uniform1f(this.uFade,1),this.boardBatch)this.drawSubBatch(this.boardBatch.translucent);for(let R of M)this.drawSubBatch(R.translucent);for(let{batch:R,fade:U}of B)t.uniform1f(this.uFade,U),this.drawSubBatch(R.opaque),this.drawSubBatch(R.translucent);return t.depthMask(!0),t.bindVertexArray(null),S}onPointerDown=(e)=>{if(this.canvas.setPointerCapture(e.pointerId),this.pointers.set(e.pointerId,{x:e.clientX,y:e.clientY,button:e.button,shift:e.shiftKey}),this.pointers.size===2){let[t,n]=Array.from(this.pointers.values());this.pinchDist=Math.hypot(n.x-t.x,n.y-t.y)||1}};onPointerMove=(e)=>{let t=this.pointers.get(e.pointerId);if(!t)return;let n=e.clientX-t.x,i=e.clientY-t.y;if(t.x=e.clientX,t.y=e.clientY,this.pointers.size===2){let[s,a]=Array.from(this.pointers.values()),r=Math.hypot(a.x-s.x,a.y-s.y)||1;if(this.pinchDist>0)this.dist=Math.max(this.radius*0.05,Math.min(this.radius*20,this.dist*(this.pinchDist/r)));this.pinchDist=r,this.cbs.onUserMove?.(),this.scheduleDraw();return}if(t.button===2||t.button===1||t.shift){let s=this.dist*0.0014,a=Math.cos(this.yaw),r=Math.sin(this.yaw);this.target[0]-=n*a*s,this.target[1]-=n*r*s,this.target[2]+=i*s}else this.yaw+=n*0.008,this.pitch=Math.max(-Math.PI*0.49,Math.min(Math.PI*0.49,this.pitch+i*0.008));this.cbs.onUserMove?.(),this.scheduleDraw()};onPointerUp=(e)=>{if(this.pointers.delete(e.pointerId),this.pointers.size<2)this.pinchDist=0};onWheel=(e)=>{e.preventDefault();let t=e.deltaY<0?0.8620689655172414:1.16;this.dist=Math.max(this.radius*0.05,Math.min(this.radius*20,this.dist*t)),this.cbs.onUserMove?.(),this.scheduleDraw()};onDblClick=()=>{this.fit()};onContextMenu=(e)=>{e.preventDefault()};destroy(){if(this.rafId)cancelAnimationFrame(this.rafId);if(this.resizeObs.disconnect(),this.canvas.removeEventListener("pointerdown",this.onPointerDown),this.canvas.removeEventListener("pointermove",this.onPointerMove),this.canvas.removeEventListener("pointerup",this.onPointerUp),this.canvas.removeEventListener("pointercancel",this.onPointerUp),this.canvas.removeEventListener("wheel",this.onWheel),this.canvas.removeEventListener("dblclick",this.onDblClick),this.canvas.removeEventListener("contextmenu",this.onContextMenu),this.deleteBatch(this.boardBatch),this.clearParts(),this.gl){if(this.bgVao)this.gl.deleteVertexArray(this.bgVao);if(this.bgProg)this.gl.deleteProgram(this.bgProg);if(this.prog)this.gl.deleteProgram(this.prog)}this.worker?.terminate(),this.canvas.remove()}}var Ns=64,Wa=16777216;function _a(e,t){switch(e){case"board":case"3d":return t.board!==!1;case"schematic":return t.schematic!==!1;case"mech":return t.mech!==!1;case"gerbers":return t.gerbers!==!1;default:return!0}}function It(e){if(!e)return"";let t=e.replace(/\\/g,"/").replace(/\/+$/,""),n=t.lastIndexOf("/");return n>=0?t.slice(n+1):t}function Ms(e){switch(e){case"board":return h("viewer.board","Board");case"schematic":return h("viewer.schematic","Schematic");case"3d":return h("viewer.solid","3D");case"gerbers":return h("gpui.gerbers","Gerbers");case"mech":return h("viewer.mech","Mech");case"files":return h("viewer.files","Files");case"diff":return h("viewer.diff","Diff");case"review":return h("viewer.review","Review");case"browser":return h("bots.tab.browser","Browser");case"terminal":return h("viewer.terminal","Terminal");default:return e?e.charAt(0).toUpperCase()+e.slice(1):""}}function On(e){return e==="board"||e==="schematic"||e==="gerbers"}function za(e){return e==="files"||e==="diff"||e==="review"||e==="browser"||e==="terminal"}function Vn(e,t){let n=document.createElement("div");n.className="bp-vh";let i=document.createElement("div");i.className="bp-vh-title";let s=document.createElement("span");s.className="bp-vh-page";let a=document.createElement("span");a.className="bp-vh-sep",a.textContent="·",a.hidden=!0;let r=document.createElement("span");r.className="bp-vh-file",r.hidden=!0,i.append(s,a,r);let o=document.createElement("div");o.className="bp-vh-actions",n.append(i,o);let l=document.createElement("div");l.className="bp-solid-bar",l.setAttribute("data-testid","solid-presets-bar"),l.hidden=!0;let p=document.createElement("div");p.className="bp-v-banner",p.hidden=!0;let c=document.createElement("div");c.className="bp-v-stage-wrap";let u=document.createElement("div");u.className="bp-v-stage";let d=document.createElement("div");d.className="bp-v-overlay",d.hidden=!0;let m=document.createElement("div");m.className="bp-v-layers",m.hidden=!0;let f=document.createElement("div");f.className="bp-v-info",f.hidden=!0,c.append(u,d,m,f);let b=document.createElement("div");b.className="bp-history-bar",b.setAttribute("data-testid","viewer-history-bar"),b.hidden=!0,e.replaceChildren(n,l,p,c,b);let g="",y="",w=0,x=!1,A=new Set,N=[],S=0,M=new Map,B=new Map,R={},U=[],D="",re="",me=!1,oe=!1,Ee=0,Ae=!1,Me=0,he="",be=0,I=null,le=null,ie=null,Z=null,ce=null,E=new Fn,k=0,j=!1,T="",q="",ne="",H="";document.addEventListener("click",(F)=>{if(!j)return;if(F.target instanceof Node&&b.contains(F.target))return;j=!1,ue()}),document.addEventListener("keydown",(F)=>{if(j&&F.key==="Escape")j=!1,ue()});function K(){if(k)window.clearInterval(k),k=0;E.playing=!1}function je(){let F=y==="3d"||y==="mech";if(l.hidden=!F,!F)return;if(l.childElementCount>0)return;for(let _ of xs){let O=document.createElement("button");O.type="button",O.className="bp-v-btn",O.textContent=_.label,O.setAttribute("data-testid",`solid-view-${_.id}`),O.addEventListener("click",()=>{ie?.setView(_.id)}),l.append(O)}let W=document.createElement("button");W.type="button",W.className="bp-v-btn",W.textContent="Snap view",W.setAttribute("data-testid","solid-snap"),W.addEventListener("click",()=>{if(!ie)return;ie.snapPng().then((_)=>{if(!_)return;let O=URL.createObjectURL(_),G=document.createElement("a");G.href=O;let Q=(De()||y||"view").replace(/[^a-zA-Z0-9._-]/g,"_");G.download=`${Q}-snap.png`,G.click(),setTimeout(()=>URL.revokeObjectURL(O),1000)})}),l.append(W)}async function Le(){if(!g||y!=="board"&&y!=="schematic")return;ue();let F=E.compareRequest();if(!F){T="",q="",ne="",H="",await Ge(!1);return}let W=`${y}|${F.commit}|${F.bits}|${re}`;if(W===H&&A.size>0){ke(E.highlightEdits?`Comparing against ${E.activeRef()?.label||F.commit.slice(0,7)} (edits highlighted)`:`Comparing against ${E.activeRef()?.label||F.commit.slice(0,7)}`,!1);return}let _=++w;A.clear(),M.clear(),Ye(),x=!0,T="",q=F.commit,ne="",H=W;try{let O=re||(y==="schematic"?R.sch:R.pcb)||"";if(!O){let Ce=await t.hub.rpc("viewer.files",{thread:g});if(_!==w)return;R=Ce||{},ae(),O=(y==="schematic"?R.sch:R.pcb)||""}if(!O)throw Error(`Unable to resolve ${y} file path for compare`);let G=await t.hub.rpc("viewer.compare",{thread:g,kind:y,commit:F.commit,bits:F.bits,...re?{path:re}:{}});if(_!==w)return;let Q=typeof G?.root==="string"?G.root:"",X=y==="schematic"?"1":"0";T=Q?`${X}|${Q}|diff -`:`${X}|`,q=F.commit,ne=O.startsWith("/")||/^[A-Za-z]:[\\/]/.test(O)||!Q?O:`${Q.replace(/\/+$/,"")}/${O.replace(/^\/+/,"")}`,x=!1;let ge=N;Ye();for(let Ce of ge)if(Ce.kind==="bin")$e(Ce.buf);else We(Ce.key,Ce.none,Ce.retryable,Ce.big);ke(E.highlightEdits?`Comparing against ${E.activeRef()?.label||F.commit.slice(0,7)} (edits highlighted)`:`Viewing snapshot: ${E.activeRef()?.label||F.commit.slice(0,7)}`,!1)}catch(O){if(_!==w)return;x=!1,T="",q="",ne="",H="",Ye(),ke(O instanceof Error?O.message:String(O),!0)}}function ue(){let F=y==="board"||y==="schematic";if(b.hidden=!F,!F)return;let W=document.createElement("div");W.className="bp-history-group";let _=document.createElement("button");_.type="button",_.className="bp-v-btn",_.textContent="<",_.title="Older snapshot",_.disabled=E.refs.length===0||E.index>=E.refs.length-1,_.setAttribute("data-testid","history-prev"),_.addEventListener("click",()=>{if(K(),E.step(1))Le()});let O=document.createElement("button");O.type="button",O.className="bp-v-btn"+(E.playing?" is-on":""),O.textContent=E.playing?"⏸":"▶",O.title=E.playing?"Pause history":"Play history",O.disabled=E.refs.length===0,O.setAttribute("data-testid","history-play"),O.addEventListener("click",()=>{if(E.playing){K(),ue();return}if(E.refs.length===0)return;if(E.playing=!0,E.isLive())E.index=E.refs.length-1,Le();else ue();k=window.setInterval(()=>{if(!E.playing||y!=="board"&&y!=="schematic"){K(),ue();return}if(E.step(-1))Le();else K(),ue()},1400)});let G=document.createElement("button");G.type="button",G.className="bp-v-btn",G.textContent=">",G.title="Newer snapshot",G.disabled=E.isLive(),G.setAttribute("data-testid","history-next"),G.addEventListener("click",()=>{if(K(),E.step(-1))Le()});let Q=document.createElement("button");Q.type="button",Q.className="bp-v-btn"+(E.isLive()?" is-on":""),Q.textContent="Live",Q.setAttribute("data-testid","history-live"),Q.addEventListener("click",()=>{if(K(),E.goLive())ke("",!1),Le()});let X=document.createElement("span");X.className="bp-history-label",X.setAttribute("data-testid","history-label");let ge=E.activeRef();X.textContent=ge?ge.label||ge.commit.slice(0,7):E.refs.length>0?`Live (${E.refs.length} saved)`:"Live",W.append(_,O,G,Q,X);let Ce=document.createElement("div");Ce.className="bp-history-group";let Ne=document.createElement("button");Ne.type="button",Ne.className="bp-v-btn"+(E.highlightEdits?" is-on":""),Ne.textContent="Highlight edits",Ne.disabled=E.refs.length===0,Ne.setAttribute("data-testid","history-highlight"),Ne.addEventListener("click",()=>{K(),E.toggleHighlight(),Le()});let Re=document.createElement("div");Re.className="bp-history-menu-wrap";let we=document.createElement("button");if(we.type="button",we.className="bp-v-btn"+(j||!E.isLive()?" is-on":""),we.disabled=E.refs.length===0,we.setAttribute("data-testid","history-compare"),we.setAttribute("aria-haspopup","menu"),we.setAttribute("aria-expanded",String(j)),we.textContent=ge?`Compare: ${ge.label||ge.commit.slice(0,7)} ▾`:"Compare ▾",we.addEventListener("click",(Te)=>{Te.stopPropagation(),j=!j,ue()}),Re.append(we),j&&E.refs.length>0){let Te=document.createElement("div");Te.className="bp-history-menu",Te.setAttribute("role","menu"),Te.setAttribute("data-testid","history-compare-menu");let qe=(Ie,vt,Ft)=>{let Ke=document.createElement("button");Ke.type="button",Ke.className="bp-history-menu-item"+(Ft?" is-active":""),Ke.setAttribute("role","menuitem"),Ke.setAttribute("data-commit",vt),Ke.textContent=Ie,Ke.addEventListener("click",()=>{if(j=!1,K(),E.selectCommit(vt)){if(E.isLive())ke("",!1);Le()}else ue()}),Te.append(Ke)};qe("Live (working tree)","",E.isLive());for(let Ie of E.refs)qe(Ie.label||Ie.commit.slice(0,7),Ie.commit,ge?.commit===Ie.commit);Re.append(Te)}Ce.append(Ne,Re),b.replaceChildren(W,Ce)}async function Pe(F){if(!F)return;try{let W=await t.hub.rpc("viewer.refs",{thread:F});if(F!==g)return;E.setRefs(Array.isArray(W?.refs)?W.refs:[]),ue()}catch{if(F!==g)return;E.setRefs([]),ue()}}function Y(){return document.documentElement.classList.contains("light")}let ye=new MutationObserver(()=>{let F=Y();le?.setTheme(F),ie?.setTheme(F),ce?.setTheme(F)});ye.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]});function te(F,W="",_=!1,O=""){if(F==="none"){d.hidden=!0,d.replaceChildren();return}d.hidden=!1,d.className=`bp-v-overlay is-${F}`;let G=document.createElement("div");G.className="bp-v-state-card";let Q=document.createElement("div");if(Q.className="bp-v-state-msg",Q.textContent=W,G.append(Q),_){let X=document.createElement("button");X.type="button",X.className="bp-v-btn is-primary",X.textContent=h("tools.retry","Retry"),X.addEventListener("click",()=>void Ge(!0)),G.append(X)}if(O){let X=document.createElement("div");X.className="bp-v-state-msg",X.textContent=h("gpui.c.solid.big.next","Loading it may take a while and a lot of memory.");let ge=document.createElement("button");ge.type="button",ge.className="bp-v-btn is-primary",ge.textContent=h("gpui.c.solid.load.big","Load it anyway"),ge.addEventListener("click",()=>{te("loading",h("gpui.c.solid.loading.big","Loading it anyway…")),t.hub.rpc("kicad.big",{key:O}).catch(()=>te("error",W,!1,O))}),G.append(X,ge)}d.replaceChildren(G)}function ke(F,W){p.textContent=F,p.hidden=!F,p.classList.toggle("is-warn",W)}function De(){if(re)return It(re);if(y==="board"||y==="3d")return It(R.pcb);if(y==="schematic")return It(R.sch);if(y==="mech")return It(D);return""}function ae(){s.textContent=Ms(y);let F=De();if(a.hidden=!F,r.hidden=!F,r.textContent=F,o.replaceChildren(),y==="mech"&&U.length>1){let _=document.createElement("select");_.className="bp-v-select",_.setAttribute("aria-label",h("viewer.mech","Mech"));for(let O of U){let G=document.createElement("option");G.value=O,G.textContent=It(O),G.selected=O===D,_.append(G)}_.addEventListener("change",()=>{D=_.value,ae(),Ge(!1)}),o.append(_)}if(On(y)){let _=document.createElement("button");_.type="button",_.className="bp-v-btn"+(Ae?" is-on":""),_.textContent=I?.layerHead||"Layers",_.setAttribute("data-testid","viewer-layers-btn"),_.addEventListener("click",()=>{if(Ae=!Ae,m.hidden=!Ae,_.classList.toggle("is-on",Ae),Ae)_e("","")}),o.append(_)}if(y==="board"||y==="schematic"||y==="3d"||y==="mech"||y==="gerbers"){let _=document.createElement("button");_.type="button",_.className="bp-v-btn",_.textContent="Fit",_.setAttribute("data-testid","viewer-fit-btn"),_.addEventListener("click",()=>{le?.fit(),ie?.fit()}),o.append(_)}if((y==="board"||y==="schematic")&&t.hub.hasFeature("follow")){let _=document.createElement("button");_.type="button",_.className="bp-v-btn"+(me&&!oe?" is-on":""),_.textContent=me?oe?h("gpui.follow.paused","Follow (paused)"):"Follow agent":"Follow agent",_.setAttribute("data-testid","viewer-follow-btn"),_.addEventListener("click",()=>void nt()),o.append(_)}let W=document.createElement("button");W.type="button",W.className="bp-v-btn bp-v-close",W.textContent="✕",W.title=h("common.close","Close"),W.setAttribute("aria-label",h("common.close","Close")),W.setAttribute("data-testid","viewer-close-btn"),W.addEventListener("click",()=>t.closeViewer()),o.append(W)}function fe(){if(!I){m.replaceChildren();return}let F=document.createDocumentFragment(),W=document.createElement("div");W.className="bp-v-layers-head";let _=document.createElement("span");if(_.textContent=I.layerHead||"Layers",W.append(_),I.layerReset){let X=document.createElement("button");X.type="button",X.className="bp-v-btn",X.textContent="Reset",X.addEventListener("click",()=>void _e("reset","")),W.append(X)}if(F.append(W),I.layerModes){let X=document.createElement("div");X.className="bp-v-layers-modes",["All","Dim","Only"].forEach((ge,Ce)=>{let Ne=document.createElement("button");Ne.type="button",Ne.className="bp-v-btn"+(I?.layerMode===Ce?" is-on":""),Ne.textContent=ge,Ne.addEventListener("click",()=>void _e("mode",String(Ce))),X.append(Ne)}),F.append(X)}let O=le?.presentColors()??new Map,G=(I.layerList||[]).concat(I.layerMarks||[]),Q=document.createElement("div");Q.className="bp-v-layers-list";for(let X of G){let ge=O.get(X.layer);if(ge===void 0)continue;let Ce=document.createElement("div");Ce.className="bp-v-layer-row"+(X.active?" is-focus":"");let Ne=document.createElement("input");Ne.type="checkbox",Ne.checked=X.on!==!1,Ne.addEventListener("change",()=>void _e("toggle",String(X.layer)));let Re=document.createElement("span");Re.className="bp-v-layer-swatch";let we=ge>>>16&255,Te=ge>>>8&255,qe=ge&255;Re.style.background=X.on!==!1?`rgb(${we},${Te},${qe})`:`rgba(${we},${Te},${qe},0.2)`;let Ie=document.createElement("button");Ie.type="button",Ie.className="bp-v-layer-name",Ie.textContent=X.name,Ie.addEventListener("click",()=>void _e("pick",String(X.layer))),Ce.append(Ne,Re,Ie),Q.append(Ce)}F.append(Q),m.replaceChildren(F)}async function _e(F,W){if(!On(y))return;let _=w;try{let O=await t.hub.rpc("viewer.layers",{kind:y,present:be,off:Me,focus:he,...F?{action:F,value:W}:{}});if(_!==w||!O)return;Me=Number(O.own)||0,he=typeof O.focus==="string"?O.focus:"",I=O;let G={off:Number(O.off)||0,dim:Number(O.dim)||0,lift:typeof O.lift==="number"?O.lift:255};if(le?.setLayers(G),ae(),Ae)fe()}catch{}}async function Ue(){if(!me||oe||!g||!t.hub.hasFeature("follow"))return;oe=!0,ae();try{await t.hub.rpc("viewer.follow",{thread:g,action:"pause"})}catch{}}async function nt(){if(!g||!t.hub.hasFeature("follow"))return;let F=!me?"on":oe?"resume":"off";try{let W=await t.hub.rpc("viewer.follow",{thread:g,action:F});if(me=!!W.on,oe=!!W.paused,ae(),W.on&&!W.paused&&W.focus&&Array.isArray(W.focus.box)&&W.focus.box.length===4&&(W.seq||0)>Ee)Ee=W.seq||Ee,le?.zoomToBoxMm([W.focus.box[0],W.focus.box[1],W.focus.box[2],W.focus.box[3]])}catch{}}function de(){f.hidden=!0,f.replaceChildren(),le?.setHighlights([])}function gt(F){let W=F.split(";").filter(Boolean),_=W.shift()||F,O=[],G="",Q="";for(let Re of W){if(Re.startsWith("g="))continue;let we=Re.indexOf("=");if(we>0){let Te=Re.slice(0,we),qe=Re.slice(we+1);if((Te==="ref"||Te==="symbol")&&!G)G=qe;if(Te==="net"&&!Q)Q=qe;O.push([Te,qe])}else O.push([Re,""])}let X=document.createElement("div");X.className="bp-v-info-head";let ge=document.createElement("span");ge.className="bp-v-info-title",ge.textContent=_;let Ce=document.createElement("button");Ce.type="button",Ce.className="bp-v-info-x",Ce.textContent="×",Ce.setAttribute("aria-label","Clear selection"),Ce.addEventListener("click",de),X.append(ge,Ce);let Ne=document.createElement("div");Ne.className="bp-v-info-rows";for(let[Re,we]of O){let Te=document.createElement("span");Te.className="bp-v-info-chip",Te.textContent=we?`${Re}: ${we}`:Re,Ne.append(Te)}return f.replaceChildren(X,...O.length>0?[Ne]:[]),f.hidden=!1,{ref:G||void 0,net:Q||void 0}}async function Je(F){if(!F){de();return}let W=Array.from(A)[0]||"";if(!W)return;let _=w;try{let O=await t.hub.rpc("viewer.info",{key:W,at:F.at,idx:F.idx});if(_!==w)return;let G=typeof O.info==="string"?O.info:"";if(!G){de();return}let{ref:Q,net:X}=gt(G),ge=[];if(Q)ge.push(["ref",Q]);if(X)ge.push(["net",X]);let Ce=[[F.at,F.idx]];for(let[Ne,Re]of ge){let we=await t.hub.rpc("viewer.probe",{key:W,name:Ne,value:Re});if(_!==w)return;if(Array.isArray(we.matches))for(let Te of we.matches)Ce.push(Te)}le?.setHighlights(Ce)}catch{de()}}function ft(){Z?.destroy(),Z=null,ce?.destroy(),ce=null,le?.destroy(),le=null,ie?.destroy(),ie=null,u.replaceChildren(),Ae=!1,m.hidden=!0,f.hidden=!0,f.replaceChildren(),ke("",!1),te("none")}function Ye(){N=[],S=0}async function Ge(F){if(!g||!y)return;let W=++w;if(A.clear(),x=!1,Ye(),ft(),ae(),je(),ue(),(y==="board"||y==="schematic")&&g)Pe(g);if(za(y)){if(t.hub.rpc("viewer.watch",{thread:g,kind:""}).catch(()=>{}),y==="files")Z=ys(u,t,g,(G,Q)=>{if(y=G,re=Q,G==="mech")D=Q;Ge(!1)});else if(y==="diff")Z=ws(u,t,g);else if(y==="review")Z=Es(u,t,g);else if(y==="browser")Z=gs(u,t,g);else if(y==="terminal")te("loading","Loading terminal…"),import("/assets/terminal.js").then((Q)=>{if(W!==w)return;if(te("none"),Q?.mountTerminalPane)ce=Q.mountTerminalPane(u,t,g,Y());else te("error","Terminal chunk missing",!0)},(Q)=>{if(W!==w)return;te("error",Q instanceof Error?Q.message:String(Q),!0)});return}if(te("loading","Loading…"),!R.root)try{let G=await t.hub.rpc("viewer.files",{thread:g});if(W!==w)return;R=G||{},ae()}catch{}if(y==="gerbers"&&R.hasGerbers===!1){te("empty","No Gerbers in this project",!1);return}let _=Y();if(y==="3d"||y==="mech")ie=new Gn(u,{onStatus:(G,Q)=>{if(Q)te("none"),ke(G,!1);else if(G)te("loading",G);else te("none"),ke("",!1)},onUserMove:()=>void Ue()}),ie.setTheme(_);else if(y==="board"||y==="schematic"||y==="gerbers")le=new Dn(u,{onPick:(G)=>void Je(G),onUserMove:()=>void Ue()}),le.setTheme(_);else{te("empty",`${Ms(y)} is not available in this viewer`,!1);return}let O={thread:g};if(F)O.force=!0;if(y==="mech"){if(U.length===0)try{let G=await t.hub.rpc("mech.list",{thread:g});if(W!==w)return;if(U=Array.isArray(G.parts)?G.parts:[],!D)D=G.primary||U[0]||"";ae()}catch(G){if(W!==w)return;te("error",G instanceof Error?G.message:String(G),!0);return}if(!D){te("empty",h("gpui.rail.no.mech","No mechanical parts in this project"),!1);return}O.kind="3d",O.path=D}else{if(O.kind=y,re&&(y==="board"||y==="schematic"))O.path=re;if(y==="3d"&&!F&&ie){let G=ie.keptToken();if(G)O.kept=G}if((y==="board"||y==="schematic"||y==="gerbers")&&!F&&t.hub.hasFeature("keptChunks"))O.keptChunks=Array.from(B.keys())}x=!0,T="",q="",ne="",H="";try{let G=await t.hub.rpc("viewer.watch",O);if(W!==w)return;A=new Set(Array.isArray(G.keys)?G.keys:[]),x=!1;let Q=N;Ye();for(let X of Q)if(X.kind==="bin")$e(X.buf);else We(X.key,X.none,X.retryable,X.big)}catch(G){if(W!==w)return;x=!1,A.clear(),Ye();let Q=G instanceof Error?G.message:String(G),X=/no gerbers|not in this project|another machine/i.test(Q);te(X?"empty":"error",Q,!X)}}function We(F,W,_,O=!1){if(x){if(N.length{if(F.t==="plot"&&typeof F.none==="string"&&typeof F.key==="string")We(F.key,F.none,F.retryable===!0)}),Oe=Ot(()=>{if(y)ae()}),Ht=(F)=>{if(F.key==="Escape"&&y&&!f.hidden)de()};return window.addEventListener("keydown",Ht),{open(F,W){if(W!==g){if(g=W,R={},U=[],D="",M.clear(),me=!1,oe=!1,Ee=0,Me=0,he="",be=0,I=null,t.hub.hasFeature("follow"))t.hub.rpc("viewer.follow",{thread:W}).then((_)=>{if(W!==g)return;if(me=!!_.on,oe=!!_.paused,Ee=Number(_.seq)||0,y)ae()}).catch(()=>{})}if(F!==y)K(),E.goLive(),Me=0,he="",be=0,I=null;y=F,re="",Ge(!1)},reconcileHas(F){if(y&&!_a(y,F))t.closeViewer()},close(){if(w++,x=!1,K(),j=!1,T="",q="",ne="",H="",E.goLive(),l.hidden=!0,b.hidden=!0,Ye(),g)t.hub.rpc("viewer.watch",{thread:g,kind:""}).catch(()=>{});y="",A.clear(),ft()}}}var Ts="http://www.w3.org/2000/svg";function Rt(e){let t=document.createElementNS(Ts,"svg");t.setAttribute("viewBox","0 0 24 24"),t.setAttribute("width","13"),t.setAttribute("height","13"),t.setAttribute("fill","none"),t.setAttribute("stroke","currentColor"),t.setAttribute("stroke-width","1.8"),t.setAttribute("aria-hidden","true");for(let n of e){let i=document.createElementNS(Ts,"path");i.setAttribute("d",n),t.appendChild(i)}return t}function qa(e){if(!e)return"bp-dot-idle";let t=e.status||e.state;if(t==="active"||t==="working")return"bp-dot-work";if(t==="finished")return"bp-dot-done";if(t==="waiting"||t==="asking"||t==="blocked"||t==="failed"||(e.waiting??0)>0)return"bp-dot-need";return"bp-dot-idle"}function Bs(e,t){if(!e)return!0;if(t==="board"||t==="3d")return e.board!==!1;if(t==="schematic")return e.schematic!==!1;if(t==="mech")return e.mech!==!1;if(t==="gerbers")return e.gerbers!==!1;return!0}var jt="dark",en=(()=>{try{return Yi(localStorage.getItem("bp.theme.pref"))}catch{return"auto"}})(),Un=null,bt=(()=>{try{return Xi(localStorage.getItem("bp.locale"))}catch{return"auto"}})();function Ds(){let e=Pt(en,jt);document.documentElement.classList.toggle("light",e==="light");try{localStorage.setItem("bp.theme",e)}catch{}}function Is(e){if(!e)return;jt=e==="light"?"light":"dark",Ds()}function Rs(){if(bt!=="auto")ct(bt);else if(Un)ct(Un);else if(typeof navigator<"u"&&navigator.language){if(!ct(navigator.language))ct("en")}}function Ka(){return`web-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,8)}`}function js(){let e=document.getElementById("root");if(!e)return;try{if(localStorage.getItem("bp.theme")==="light")jt="light";if(Pt(en,jt)==="light")document.documentElement.classList.add("light");if(bt!=="auto")ct(bt)}catch{}let t=document.createElement("header");t.className="bp-topbar",t.setAttribute("data-testid","topbar");let n=document.createElement("button");n.type="button",n.className="icon bp-side-toggle",n.textContent="☰",n.title="Toggle sidebar",n.setAttribute("aria-label","Toggle sidebar");let i=document.createElement("div");i.className="bp-brand";let s=document.createElement("img");s.src="/assets/favicon.svg",s.alt="Backplane",s.className="bp-logo";let a=document.createElement("span");a.className="bp-brand-name bp-hide-phone",a.textContent="Backplane";let r=document.createElement("span");r.className="bp-crumb-sep bp-hide-phone",r.textContent="/";let o=document.createElement("span");o.className="bp-crumb-proj bp-hide-phone";let l=document.createElement("span");l.className="bp-crumb-sep bp-hide-phone",l.textContent="/";let p=document.createElement("span");p.className="bp-crumb-thread",p.setAttribute("data-testid","thread-title");let c=document.createElement("span");c.className="bp-plan-top-badge bp-hidden",c.setAttribute("data-testid","plan-top-badge"),i.append(s,a,r,o,l,p,c);let u=document.createElement("div");u.className="bp-top-state bp-hide-phone bp-hidden";let d=document.createElement("span");d.className="bp-top-state-lbl",d.textContent="STATE";let m=document.createElement("span");m.className="bp-dot bp-dot-idle";let f=document.createElement("span");f.className="bp-top-state-word",u.append(d,m,f);let b=document.createElement("div");b.className="bp-top-acts bp-hide-phone bp-hidden";let g=document.createElement("button");g.type="button",g.className="bp-btn-ghost bp-top-act";let y=document.createElement("span");y.textContent=h("menu.pin","Pin"),g.append(Rt(["M12 17v5","M9 3h6l1 7 3 3H5l3-3 1-7z"]),y);let w=document.createElement("button");w.type="button",w.className="bp-btn-ghost bp-top-act";let x=document.createElement("span");x.textContent=h("menu.settle","Settle"),w.append(Rt(["M12 22a10 10 0 1 0 0-20 10 10 0 0 0 0 20z","M9 12l2 2 4-4"]),x);let A=document.createElement("div");A.className="bp-menu-wrap";let N=document.createElement("button");N.type="button",N.className="bp-btn-ghost bp-top-act",N.textContent="▾",N.title="Thread menu",N.setAttribute("aria-label","Thread menu"),N.setAttribute("data-testid","thread-menu-btn");let S=document.createElement("div");S.className="bp-popover bp-hidden",S.setAttribute("data-testid","thread-menu"),A.append(N,S),b.append(g,w,A);let M=document.createElement("div");M.className="bp-top-right";let B=document.createElement("button");B.type="button",B.className="bp-btn-ghost bp-top-act bp-hide-tablet",B.setAttribute("data-testid","improvements-btn");let R=document.createElement("span");R.textContent=h("gpui.improvements","Improvements"),B.append(Rt(["M12 2l2.4 7.4H22l-6.2 4.5 2.4 7.4L12 16.8l-6.2 4.5 2.4-7.4L2 9.4h7.6z"]),R);let U=document.createElement("button");U.type="button",U.className="bp-cmd-box bp-hide-tablet",U.textContent="> Jump or run a command";let D=document.createElement("button");D.type="button",D.className="icon bp-top-icon",D.title="Search",D.setAttribute("aria-label","Search"),D.appendChild(Rt(["M11 19a8 8 0 1 0 0-16 8 8 0 0 0 0 16z","M21 21l-4.3-4.3"]));let re=document.createElement("button");re.type="button",re.className="icon bp-top-icon",re.title=h("palette.settings","Settings"),re.setAttribute("aria-label",h("palette.settings","Settings")),re.setAttribute("data-testid","settings-btn"),re.appendChild(Rt(["M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6z","M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 1 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 1 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 1 1-2.83-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 1 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 1 1 2.83-2.83l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 1 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 1 1 2.83 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9c.26.6.85 1 1.51 1H21a2 2 0 1 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z"])),M.append(B,U,D,re),t.append(n,i,u,b,M);let me=document.createElement("div");me.className="bp-body";let oe=document.createElement("aside");oe.className="bp-sidebar",oe.setAttribute("data-testid","sidebar");let Ee=document.createElement("main");Ee.className="bp-center";let Ae=document.createElement("div");Ae.className="bp-right-area bp-hidden",Ae.setAttribute("data-testid","right-area");let Me=document.createElement("div");Me.className="bp-right-top";let he=document.createElement("section");he.className="bp-viewer-pane bp-hidden",he.setAttribute("data-testid","viewer-pane"),Me.appendChild(he),Ae.appendChild(Me);let be=document.createElement("nav");be.className="bp-rail",be.setAttribute("aria-label","Viewer rail"),be.setAttribute("data-testid","viewer-rail"),me.append(oe,Ee,Ae,be),e.append(t,me);let I=new Rn,le=null,ie=new Set,Z=0,ce=null,E=[],k=[],j=[],T=[],q=[],ne=[],H="",K=0,je=0,Le=null,ue=null,Pe="",Y=null,ye=20,te={},ke=new Map;function De(v,C){ke.delete(v),ke.set(v,C);while(ke.size>ye){let L=ke.keys().next().value;if(L!==void 0)ke.delete(L);else break}}let ae=new Tn(oe,{onSelectThread:(v)=>{if(v===H&&Le!==null){oe.classList.remove("bp-sidebar-open");return}Ie(v)},onNewThread:(v)=>{$t(v)},onSelectBot:(v)=>{Ie(v.thread)},onQuickOpenViewer:(v,C)=>{let L=k.find((V)=>V.project===v&&!V.archived&&!V.swarm);(async()=>{if(L)await Ie(L.id);else await $t(v);if(H)Pe=C,$e.setActive(C),Y?.open(C,H)})()},onThreadAct:(v,C)=>{Qe(v,C)},onSnoozeRow:(v)=>{I.rpc("sidebar.act",{action:"row-snooze",value:v}).then(()=>we()).catch(()=>{})},onToggleSection:(v)=>{if(ie.has(v))ie.delete(v);else ie.add(v);we()},onToggleProjectFold:(v)=>{I.rpc("sidebar.act",{action:"project-fold",value:v}).then(()=>we()).catch(()=>{})},onCollapseSidebar:()=>{oe.classList.remove("bp-sidebar-open"),oe.classList.add("bp-sidebar-collapsed")},onNeedAct:async(v)=>{let C=Yt(v,!1);if(!C)return;if(C.kind==="thread"){Ie(C.id);return}if(C.kind!=="call")return;let L=Ji(await I.rpc(C.method,C.params));if(L?.kind==="thread")Ie(L.id);we()},hasRoomView:!1,onAddProject:()=>We.open({mode:"folder"})}),fe=new dn(Ee,{onLoadOlder:()=>{Ke()},onGoToEntry:(v)=>{Ft(v)},onOpenAccounts:()=>{F()},onAnswerAsk:(v,C)=>{I.rpc("ask.answer",{ask:v,answer:C}).catch((L)=>{de.showError(L instanceof Error?L.message:"Could not send answer")})},onToggleReview:(v)=>{if(!H)return;let C=K;I.rpc("thread.review",{thread:H,on:v}).then((L)=>{if(C===K)fe.setReview(L.review??null)}).catch(()=>{})},onUnansweredAction:(v,C)=>{if(!H)return;if(v==="again"||v==="thread-again")I.rpc("thread.again",{thread:H,value:C}).catch(()=>{});else I.rpc("thread.act",{thread:H,action:v,value:C}).catch(()=>{})},onReplyEntry:(v)=>{if(!I.hasFeature("reply")){let C=(v.text||"").split(` -`)[0]?.slice(0,100)??"";if(C)de.prependDraft(`> ${C} -`);return}if(!v.text||!v.text.trim()||v.live||v.id.startsWith("local-"))return;yt({id:v.id,text:v.text,role:v.kind==="user"?"user":"assistant"})},onLoadImage:async(v,C)=>{try{let L={entry:v,path:C};if(I.hasFeature("blobs"))L.metaOnly=!0;let P=await I.rpc("message.image",L);if(P.blob&&P.blob.startsWith("/blob/"))return{url:P.blob};if(P.mime&&P.data)return{mime:P.mime,data:P.data}}catch{}return null}});function _e(v){if(!v)return null;if(v.planMode)return v.planMode;if(v.provider==="claude")return{phase:"off",interaction:"default",once:!1};return null}function Ue(v,C){if(!H)return;let L=K,P=H;I.rpc(v,C).then((V)=>{if(L!==K||H!==P)return;if(V.thread){let ee=k.findIndex((ve)=>ve.id===V.thread.id);if(ee>=0)k[ee]=V.thread;else k.unshift(V.thread);ae.setData(E,k,j,T),fe.updateThreadMeta(V.thread),G(),de.setState(!0,V.thread.state==="working")}}).catch((V)=>{if(L===K&&H===P)de.showError(V instanceof Error?V.message:"Could not change Plan mode")})}let nt,de=new un(Ee,{onSend:(v,C)=>{_n(v,C)},onRunCommand:(v)=>{zn(v)},onInterrupt:()=>{if(H)I.rpc("turn.interrupt",{thread:H}).catch(()=>{})},onQueryMentions:async(v,C)=>{try{return(await I.rpc("mentions.list",{q:v,kind:C,limit:10})).items??[]}catch{return[]}},onToggleVoice:()=>{nt.toggle()},onCyclePlanMode:()=>{let v=k.find((L)=>L.id===H)??null,C=_e(v);if(!C||!H)return;if(C.interaction!=="plan")Ue("thread.planonce",{thread:H,on:!0});else if(C.once)Ue("thread.pick",{thread:H,action:"interaction",value:"plan"});else Ue("thread.pick",{thread:H,action:"interaction",value:"default"})},onSetPlanMode:(v)=>{if(!H)return;if(v==="once")Ue("thread.planonce",{thread:H,on:!0});else if(v==="always")Ue("thread.pick",{thread:H,action:"interaction",value:"plan"});else Ue("thread.pick",{thread:H,action:"interaction",value:"default"})}});nt=new Bn(I,{getThreadId:()=>H,getDraft:()=>de.getDraft(),getCaret:()=>de.getCaret(),setDraft:(v)=>de.setDraft(v),setRecording:(v)=>de.setVoiceRecording(v),setLevel:(v)=>de.setVoiceLevel(v),showError:(v)=>de.showError(v)});function gt(){let v=Pe!=="",C=Je.isOpen();Ae.classList.toggle("bp-hidden",!v&&!C),Ae.classList.toggle("bp-has-viewer",v),Ae.classList.toggle("bp-has-mgmt",C)}let Je=new wn(Me,Ae,{hub:I,getThreadId:()=>H,getThreadGen:()=>K,onSendText:(v)=>{_n(v)},onOpenChange:()=>gt()});function ft(v){let C=window.prompt("Rename thread",v.title||"");if(!C||!C.trim())return;I.rpc("thread.act",{thread:v.id,action:"rename",title:C.trim()}).then((L)=>{if(L.thread)k=k.map((P)=>P.id===L.thread.id?L.thread:P),G(),we()}).catch((L)=>{de.showError(L instanceof Error?L.message:"Could not rename thread")})}function Ye(v){switch(v.type){case"thread":Ie(v.id);break;case"rail":if(!H&&v.id!=="terminal")break;if(Pe===v.id)Q();else X(v.id);break;case"thread-act":if(H)Qe(H,v.action);break;case"new-thread":$t(v.projectId);break;case"rename":{let C=k.find((L)=>L.id===H);if(C)ft(C);break}case"prev-thread":case"next-thread":{let C=k.filter((ee)=>!ee.archived&&!ee.swarm);if(C.length<2)break;let L=C.findIndex((ee)=>ee.id===H),P=v.type==="next-thread"?1:-1,V=C[(L<0?0:L+P+C.length)%C.length];if(V)Ie(V.id);break}case"command":if(v.runDirectly)zn(v.word);else de.setDraft(`${v.word} `),de.focus();break;case"improvements":O();break;case"settings":Oe.open();break;case"sidebar":oe.classList.toggle("bp-sidebar-open"),oe.classList.toggle("bp-sidebar-collapsed");break}}let Ge=new En(e,{getState:()=>({selectedThreadId:H,threads:k,projects:E,bots:j,railItems:q,commands:ne}),onSearch:async(v)=>{if(!I.hasFeature("search"))return{threads:[],projects:[],messages:[]};return I.rpc("search",{q:v,limit:20})},onExecute:Ye}),We=new on(e,{hub:I,onProjectAdded:(v)=>{if(we(),v.id)$t(v.id)},onCloneDone:(v)=>{if(we(),v.thread)Ie(v.thread)}}),$e=new xn(be,(v)=>{if(v==="commands"){Ge.open();return}if(!H)return;if(Pe===v)Q();else X(v)}),it=null,Dt=null,Oe=new Ln(e,{onLoadDevices:async()=>(await I.rpc("devices.page",{})).rows??[],onDevicesAct:async(v,C)=>{await I.rpc("devices.page.act",{action:v,value:C})},onGetHome:()=>it,onMoveHomeHere:async()=>{await I.rpc("home.move",{to:"back"})},onGetNoProvider:()=>Dt,onGetThemePref:()=>en,onSetThemePref:(v)=>{en=v;try{if(v==="auto")localStorage.removeItem("bp.theme.pref");else localStorage.setItem("bp.theme.pref",v)}catch{}Ds()},onGetHubTheme:()=>jt,onGetLocalePref:()=>bt,onSetLocalePref:(v)=>{bt=v;try{if(v==="auto")localStorage.removeItem("bp.locale");else localStorage.setItem("bp.locale",v)}catch{}Rs()},onLogout:()=>oi(()=>{I.disconnect(),window.location.replace("/")})});function Ht(v){if(Dt=v,fe.setNoProvider(v),Oe.isOpen())Oe.refresh()}function F(){Oe.openToAccounts()}function W(v,C){let L=v instanceof Error?v.message:C,P=v instanceof Bt?v:null,V=P?.code,ee=P?.machine,ve=V==="no_provider_remote"&&ee?h("provider.notice.senderr.remote","No AI provider connected on {machine}. Open Settings → Accounts on {machine} to connect Claude, Codex, Antigravity, or another provider.").replaceAll("{machine}",ee):L;de.showError(ve,_i(L,V)?{label:h("provider.notice.button","Open Settings → Accounts"),onClick:F}:void 0)}g.addEventListener("click",()=>{let v=k.find((C)=>C.id===H);if(v)Qe(v.id,v.pinned?"unpin":"pin")}),w.addEventListener("click",()=>{let v=k.find((C)=>C.id===H);if(v)Qe(v.id,v.settled?"unsettle":"settle")});let _=new Nn(e,(v,C)=>C?I.rpc("thread.context.mcp",{thread:v,...C}):I.rpc("thread.context",{thread:v}));N.addEventListener("click",(v)=>{v.stopPropagation();let C=k.find((V)=>V.id===H);if(!C)return;if(!S.classList.contains("bp-hidden")){S.classList.add("bp-hidden");return}let L=[{label:"Rename…",run:()=>ft(C)},{label:C.pinned?h("menu.unpin","Unpin"):h("menu.pin","Pin"),run:()=>{Qe(C.id,C.pinned?"unpin":"pin")}},{label:C.settled?h("phone.unsettle","Unsettle"):h("menu.settle","Settle"),run:()=>{Qe(C.id,C.settled?"unsettle":"settle")}},{label:C.archived?"Unarchive":"Archive",run:()=>{Qe(C.id,C.archived?"unarchive":"archive")}},{label:"Delete",danger:!0,run:()=>{if(window.confirm("Delete this thread?"))Qe(C.id,"delete")}}];if(I.hasFeature("threadContext"))L.unshift({label:h("thread.context.title","Context & Prompt"),run:()=>_.open(C.id)});let P=document.createDocumentFragment();for(let V of L){let ee=document.createElement("button");ee.type="button",ee.className="bp-popover-item"+(V.danger?" danger":""),ee.textContent=V.label,ee.addEventListener("click",()=>{S.classList.add("bp-hidden"),V.run()}),P.appendChild(ee)}S.replaceChildren(P),S.classList.remove("bp-hidden")}),document.addEventListener("click",()=>S.classList.add("bp-hidden"));async function O(){let v=document.createElement("div");v.className="bp-modal-backdrop",v.setAttribute("data-testid","improvements-modal");let C=document.createElement("div");C.className="bp-modal";let L=document.createElement("div");L.className="bp-modal-head";let P=document.createElement("h2");P.textContent=h("gpui.improvements","Improvements");let V=document.createElement("button");V.type="button",V.className="icon",V.textContent="×",V.addEventListener("click",()=>v.remove()),L.append(P,V);let ee=document.createElement("div");ee.className="bp-modal-body",ee.textContent="Loading…",C.append(L,ee),v.appendChild(C),v.addEventListener("click",(ve)=>{if(ve.target===v)v.remove()}),e.appendChild(v);try{let ve=await I.rpc("improvements.projects",{}),He=ve.projects??[];if(He.length===0){ee.textContent="No projects available for Improvements.";return}let et=document.createDocumentFragment();for(let Se of He){let se=document.createElement("div");se.className="bp-set-row";let Xe=document.createElement("div");Xe.className="bp-set-info",Xe.textContent=Se.title||Se.name||Se.id;let tt=document.createElement("button");tt.type="button",tt.className=Se.id===ve.project?"primary":"",tt.textContent=Se.id===ve.project?"Active":"Select",tt.addEventListener("click",()=>{I.rpc("improvements.project",{project:Se.id}).then(()=>v.remove()).catch(()=>{})}),se.append(Xe,tt),et.appendChild(se)}ee.replaceChildren(et)}catch(ve){ee.textContent=ve instanceof Error?ve.message:"Could not load Improvements."}}B.addEventListener("click",()=>{O()}),U.addEventListener("click",()=>Ge.open()),D.addEventListener("click",()=>Ge.open()),re.addEventListener("click",()=>{Oe.open()}),n.addEventListener("click",()=>{oe.classList.toggle("bp-sidebar-open"),oe.classList.toggle("bp-sidebar-collapsed")});function G(){let v=k.find((P)=>P.id===H)??null,C=v?E.find((P)=>P.id===v.project):void 0;o.textContent=C?.title??"",r.classList.toggle("bp-hidden",!C),l.classList.toggle("bp-hidden",!v),p.textContent=v?v.title||"Untitled thread":"";let L=_e(v);if(de.setPlanMode(L),!L||L.phase==="off")c.classList.add("bp-hidden"),c.classList.remove("is-exec"),c.textContent="";else c.classList.remove("bp-hidden"),c.classList.toggle("is-exec",L.phase==="executing"),c.title=h("gpui.planmode.tip","Plan before acting (1 turn, always, or off)"),c.textContent=L.phase==="armed"&&L.once?h("gpui.planmode.top.once","Plan (1 turn)"):L.phase==="armed"?h("gpui.mgmt.plan.tab","Plan"):L.phase==="planning"?h("gpui.planmode.top.planning","Planning"):L.phase==="pending"?h("gpui.planmode.top.pending","Review plan"):h("gpui.planmode.top.executing","Building plan");if(u.classList.toggle("bp-hidden",!v),b.classList.toggle("bp-hidden",!v),v){m.className=`bp-dot ${qa(v)}`,f.textContent=v.status||v.state||"idle",y.textContent=v.pinned?h("menu.unpin","Unpin"):h("menu.pin","Pin"),x.textContent=v.settled?h("phone.unsettle","Unsettle"):h("menu.settle","Settle");let P=v;de.setModelChip(v.chip||v.model||"default",v.provider,P.ctxPct??P.contextPct),de.setMemory(v.memory)}else de.setModelChip("default"),de.setMemory(null)}function Q(v=!0){if(je++,Pe="",$e.setActive(""),he.classList.add("bp-hidden"),Y?.close(),gt(),v&&H&&I.getState()==="connected")I.rpc("viewer.watch",{thread:H,kind:""}).catch(()=>{})}function X(v){if(je++,Pe=v,$e.setActive(v),he.classList.remove("bp-hidden"),gt(),!Y&&typeof Vn==="function")Y=Vn(he,{hub:I,getThreadId:()=>H,closeViewer:()=>Q(!0)});if(Y)Y.open(v,H);else{let C=document.createElement("div");C.className="bp-viewer-placeholder";let L=document.createElement("div");L.className="bp-viewer-bar";let P=document.createElement("span");P.textContent=v.toUpperCase();let V=document.createElement("button");V.type="button",V.className="icon",V.textContent="×",V.addEventListener("click",()=>Q(!0)),L.append(P,V);let ee=document.createElement("div");ee.className="bp-dim bp-viewer-msg",ee.textContent=`Viewer pane (${v}).`,C.append(L,ee),he.replaceChildren(C)}}async function ge(v,C){if(!v||!I.hasFeature("rail")){if(C===K)q=[],$e.setItems([]);return}let L=++je;try{let P=await I.rpc("viewer.rail",{thread:v,page:Pe});if(C!==K||L!==je)return;let V=Array.isArray(P.rail)?P.rail:Array.isArray(P.items)?P.items:[];if(q=V,$e.setItems(V),P.has){if(Y?.reconcileHas?.(P.has),Pe&&!Bs(P.has,Pe))Q(!0)}}catch{if(C===K&&L===je)q=[],$e.setItems([])}}function Ce(v){for(let C of v)if(C.kind==="threads"){for(let L of C.rows)if(!L.off&&(L.nav||L.id)&&!(L.nav||"").startsWith("@room:"))return L.nav||L.id}else if(C.kind==="projects"){for(let L of C.rows)for(let P of L.threads??[])if(!P.off&&(P.nav||P.id)&&!(P.nav||"").startsWith("@room:"))return P.nav||P.id}return""}function Ne(v,C){for(let L of v)if(L.kind==="threads"){if(L.rows.some((P)=>(P.nav||P.id)===C))return!0}else if(L.kind==="projects"){for(let P of L.rows)if((P.threads??[]).some((V)=>(V.nav||V.id)===C))return!0}return!1}function Re(v){let C=[];for(let L of v){if(L.kind!=="projects")continue;for(let P of L.rows)C.push({id:P.id,title:P.title,css:P.css,color:P.color})}if(C.length>0)E=C}async function we(){if(!I.hasFeature("sections"))return!1;let v=++Z;try{let C=await I.rpc("sidebar.sections",{open:Array.from(ie)});if(v!==Z)return!0;let L=Array.isArray(C.sections)?C.sections:[];return le=L,Re(L),ae.setData(E,k,j,T),ae.setSections(L,j,T),G(),!0}catch{return!1}}function Te(){if(!I.hasFeature("sections"))return;if(ce!==null)window.clearTimeout(ce);ce=window.setTimeout(()=>{ce=null,we()},150)}async function qe(){if(Le=null,I.hasFeature("bots"))try{let C=await I.rpc("bots.list",{});j=C.bots??[],T=C.rooms??[]}catch{}if(I.hasFeature("shell")){let C=await I.rpc("shell.sync",{have:te,settled:25}),L=new Set(C.removed??[]),P=new Set((C.projects??[]).map((V)=>V.id));if(L.size>0||P.size>0)E=[...E.filter((V)=>!L.has(V.id)&&!P.has(V.id)),...C.projects??[]],k=[...k.filter((V)=>!L.has(V.project)&&!P.has(V.project)),...C.threads??[]];else if(Array.isArray(C.threads)&&C.threads.length>0){let V=new Map(k.map((ee)=>[ee.id,ee]));for(let ee of C.threads)V.set(ee.id,ee);k=Array.from(V.values())}if(C.sections!==void 0){let V=Array.isArray(C.sections)?C.sections:Array.isArray(C.sections?.sections)?C.sections.sections:null;if(V)le=V,Re(V)}if(C.h)te=C.h;ae.setData(E,k,j,T),ae.setSections(le,j,T)}else if(I.hasFeature("sections")){let[C,L]=await Promise.all([I.rpc("sidebar.sections",{open:Array.from(ie)}).catch(()=>null),I.rpc("threads.list",{limit:200,archived:!1}).catch(()=>({threads:[]}))]);if(k=L.threads??[],C&&Array.isArray(C.sections)){let P=C.sections;if(!P.some((ee)=>ee.kind==="projects"&&ee.rows.length>0)){let ee=P.find((ve)=>ve.kind==="projects"&&ve.fold&&ve.toggle&&(ve.count??0)>0);if(ee?.toggle&&!ie.has(ee.toggle)){ie.add(ee.toggle);let ve=await I.rpc("sidebar.sections",{open:Array.from(ie)}).catch(()=>null);if(ve&&Array.isArray(ve.sections))P=ve.sections}}le=P,Re(P),ae.setData(E,k,j,T),ae.setSections(P,j,T)}else le=null,E=(await I.rpc("projects.list",{limit:100})).projects??[],ae.setSections(null,j,T),ae.setData(E,k,j,T);await I.rpc("subscribe",{topic:"lists"}).catch(()=>{})}else{le=null;let[C,L]=await Promise.all([I.rpc("projects.list",{limit:100}),I.rpc("threads.list",{limit:200,archived:!1})]);E=C.projects??[],k=L.threads??[],ae.setSections(null,j,T),ae.setData(E,k,j,T),await I.rpc("subscribe",{topic:"lists"}).catch(()=>{})}let v=H;if(!v){let C="";try{C=localStorage.getItem("bp.lastThread")||""}catch{}if(C&&(le&&Ne(le,C)||k.some((L)=>L.id===C)))v=C;else if(le)v=Ce(le);if(!v)v=(k.find((P)=>!P.archived&&!P.swarm&&!P.settled)??k.find((P)=>!P.archived&&!P.swarm))?.id??""}if(v&&(le&&Ne(le,v)||k.some((C)=>C.id===v)))await Ie(v);else H="",q=[],$e.setItems([]),de.setState(!1,!1),G()}async function Ie(v){if(H&&H!==v){nt.cancel();let Se=fe.getEntries();if(Se.length>0){let se=ke.get(H);De(H,{entries:Se,ids:se?.ids??Se.map((Xe)=>Xe.id),olderCursor:ue,review:se?.review??null,unanswered:se?.unanswered??null,rail:se?.rail??q,hashes:se?.hashes??{}})}}let C=++K;je++,yt(null);let L=Le;if(Le=null,L!==null)I.rpc("unsubscribe",{sub:L}).catch(()=>{});H=v;let P=ke.get(v);ue=P?.olderCursor??null;try{localStorage.setItem("bp.lastThread",v)}catch{}ae.setSelected(v),oe.classList.remove("bp-sidebar-open"),G();let V=k.find((Se)=>Se.id===v)??null;if(P)fe.setThread(V,P.entries,Boolean(P.olderCursor),P.review,P.unanswered),q=P.rail,$e.setItems(P.rail);else fe.setLoading(V),q=[],$e.setItems([]);if(de.setState(!0,V?.state==="working"),I.hasFeature("open")){let Se={};if(P){for(let[Be,Et]of Object.entries(P.hashes))Se[Be]=Et;for(let Be of P.entries)if(Be.h)Se[Be.id]=Be.h}let se;try{se=await I.rpc("thread.open",{thread:v,limit:40,have:Se})}catch(Be){if(C===K){let Et=Be instanceof Error&&Be.message?Be.message:"Could not load messages.";fe.setError(V,Et,()=>{Ie(v)})}return}if(C!==K){if(se.sub!==void 0&&se.sub!==null)I.rpc("unsubscribe",{sub:se.sub}).catch(()=>{});return}if(Le=se.sub??null,se.thread){V=se.thread;let Be=k.findIndex((Et)=>Et.id===se.thread.id);if(Be>=0)k[Be]=se.thread;else k.unshift(se.thread);G(),de.setState(!0,V.state==="working")}if("next"in se)ue=se.next??null;let Xe=new Map;if(P)for(let Be of P.entries)Xe.set(Be.id,Be);for(let Be of se.entries??[])Xe.set(Be.id,Be);let tt=se.ids??P?.ids??(se.entries??[]).map((Be)=>Be.id),Kn=tt.map((Be)=>Xe.get(Be)).filter((Be)=>Boolean(Be)),wt=P?.rail??[];if(se.rail!==void 0){if(Array.isArray(se.rail))wt=se.rail;else if(wt=Array.isArray(se.rail?.rail)?se.rail.rail:Array.isArray(se.rail?.items)?se.rail.items:[],se.rail?.has){if(Y?.reconcileHas?.(se.rail.has),Pe&&!Bs(se.rail.has,Pe))Q(!0)}}q=wt,$e.setItems(wt);let tn=P?.review??null;if(I.hasFeature("reviewmode"))try{let Be=await I.rpc("thread.review",{thread:v});if(C!==K)return;tn=Be.review??null}catch{}if(C!==K)return;let Jn="unanswered"in se?se.unanswered??null:P?.unanswered??null,Hs=se.h??P?.hashes??{};if(De(v,{entries:Kn,ids:tt,olderCursor:ue,review:tn,unanswered:Jn,rail:wt,hashes:Hs}),fe.setThread(V,Kn,Boolean(ue),tn,Jn),vt(v,C),Pe)X(Pe);return}let ee;try{ee=await I.rpc("thread.entries",{thread:v,limit:40})}catch(Se){if(C===K){let se=Se instanceof Error&&Se.message?Se.message:"Could not load messages.";fe.setError(V,se,()=>{Ie(v)})}return}if(C!==K)return;if(ee.thread){let Se=k.findIndex((se)=>se.id===ee.thread.id);if(Se>=0)k[Se]=ee.thread;else k.unshift(ee.thread);G()}ue=ee.next??null;let ve=null;if(I.hasFeature("reviewmode"))try{let Se=await I.rpc("thread.review",{thread:v});if(C!==K)return;ve=Se.review??null}catch{}if(C!==K)return;let He=ee.entries??[],et=ee.unanswered??null;De(v,{entries:He,ids:He.map((Se)=>Se.id),olderCursor:ue,review:ve,unanswered:et,rail:P?.rail??[],hashes:P?.hashes??{}}),fe.setThread(V,He,Boolean(ue),ve,et);try{let se=(await I.rpc("subscribe",{topic:"thread",thread:v})).sub??null;if(se!==null){if(C!==K){I.rpc("unsubscribe",{sub:se}).catch(()=>{});return}Le=se}}catch{}if(C!==K)return;if(ge(v,C),vt(v,C),Pe)X(Pe)}async function vt(v,C){if(!v||!I.hasFeature("mgmt")){if(C===K)Je.clear();return}let L=k.find((V)=>V.id===v),P=L?.project?E.find((V)=>V.id===L.project)?.root??"":"";if(!P&&I.hasFeature("viewers"))try{let V=await I.rpc("viewer.files",{thread:v});if(C!==K)return;P=V.pcb||V.sch||V.root||""}catch{}if(C!==K)return;if(P)await Je.watchProject(P);else Je.clear()}async function Ft(v){let C=K;for(let L=0;L<25&&C===K;L++){if(fe.goTo(v))return;if(!ue)return;let P=ue;if(await Ke(),ue===P)return}}async function Ke(){if(!H||!ue){fe.clearLoadingOlder();return}let v=K,C=H,L=ue;try{let P=await I.rpc("thread.entries",{thread:C,limit:40,before:L});if(v!==K||H!==C)return;ue=P.next??null,fe.prependEntries(P.entries??[],Boolean(ue))}catch{if(v===K)fe.clearLoadingOlder()}}async function $t(v){try{let C=await I.rpc("thread.create",{project:v});if(C.thread)k=[C.thread,...k.filter((L)=>L.id!==C.thread.id)],ae.setData(E,k,j,T),we(),await Ie(C.thread.id),de.focus()}catch(C){W(C,"Could not create thread")}}let lt=null;function Wn(v){return(v.split(` -`).map((C)=>C.trim()).find((C)=>C.length>0)??"").slice(0,200)}function yt(v){lt=v,de.setReply(v?{who:v.role==="user"?h("secret.you","You"):h("model.col.agent","Agent"),line:Wn(v.text)}:null,()=>{if(lt)Ft(lt.id)},()=>yt(null))}async function _n(v,C=[]){if(!H)return;let L=K,P=H,V=Ka(),ee=`local-${V}`,ve=lt&&v.trim()&&I.hasFeature("reply")?lt:null;if(ve)yt(null);fe.upsertEntry({id:ee,kind:"user",text:v,at:Date.now(),clientId:V,...ve?{replyTo:{id:ve.id,quote:Wn(ve.text)}}:{},attachments:C.map((He)=>({name:He.name,mime:He.mime,previewUrl:`data:${He.mime};base64,${He.data}`}))});try{let He={thread:P,text:v,clientId:V};if(C.length>0)He.attachments=C;if(ve)He.replyTo={id:ve.id,text:ve.text};let et=await I.rpc("message.send",He);if(L!==K||H!==P)return;if(et.entry)fe.upsertEntry(et.entry)}catch(He){if(L===K&&H===P){if(fe.removeEntry(ee),de.setDraft(v),ve&&!lt)yt(ve);W(He,"Failed to send message")}}}async function zn(v){if(!H)return;let C=K,L=H;try{let P=await I.rpc("composer.run",{thread:L,text:v});if(C!==K||H!==L)return;if(P.error)de.setDraft(v),W(new Bt(P.error,{code:P.errorCode,machine:P.machine}),P.error);else if(P.kind==="btw"&&typeof P.a==="string")fe.showBtw(P.q??"",P.a);else if(P.kind==="edit"&&typeof P.text==="string")de.setDraft(P.text);else if(P.kind==="project")We.open({mode:"folder"});else if(P.kind==="clone")We.open({mode:"clone",repo:P.repo??"",text:P.text??""})}catch(P){if(C===K&&H===L)de.setDraft(v),W(P,"Command refused")}}async function Qe(v,C){try{let L=await I.rpc("thread.act",{thread:v,action:C});if(L.thread){if(k=k.map((P)=>P.id===L.thread.id?L.thread:P),ae.setData(E,k,j,T),L.thread.id===H)fe.updateThreadMeta(L.thread),G()}we()}catch(L){de.showError(L instanceof Error?L.message:`Action "${C}" not allowed`)}}function qn(v,C){if(!v||!v.text||C-v.at>=300000)return"";let L=v.build.split("-").pop()??"";if(v.reason==="build"&&L)return h("hub.restarting.build",v.text,{build:L});if(v.reason==="stop")return h("hub.stopped",v.text);return h("hub.restarting",v.text)}function Gt(v){if(v==="connected")ae.setConnStatus(h("gpui.acct.connected","Connected"),"bp-ok");else if(v==="reconnecting"&&qn(I.restarting,Date.now()))ae.setConnStatus(qn(I.restarting,Date.now()),"");else if(v==="reconnecting")ae.setConnStatus("Reconnecting…","bp-warn");else if(v==="revoked")ae.setConnStatus(h("gpui.acct.sign.in.expired","Sign-in expired"),"bp-bad");else ae.setConnStatus("Connecting…","")}Ot(()=>{Gt(I.getState()),R.textContent=h("gpui.improvements","Improvements"),re.title=h("palette.settings","Settings"),re.setAttribute("aria-label",h("palette.settings","Settings")),G(),ae.refreshLocale(),fe.refreshLocale(),de.refreshLocale(),$e.render(),Oe.refreshLocale(),We.refreshLocale()}),I.onState((v,C)=>{if(v==="connected"&&C){if(C.locale)Un=C.locale,Rs();if(C.theme)Is(C.theme);if(C.name)ae.setHostName(C.name);if(it=C.home??null,ae.setHome(it),Ht(Cn(C.noProvider)),Oe.isOpen())Oe.refresh();Gt(v);let L=typeof C.hubBack==="string"?String(C.hubBack):"";if(L)try{let P=JSON.parse(L);if(P.reason==="crash")ae.setConnStatus(h("hub.back.crash",P.text??""),"bp-warn"),window.setTimeout(()=>Gt(I.getState()),6000)}catch{}if(de.setFeatures(I.hasFeature("images"),I.hasFeature("voice")),Array.isArray(C.commands))ne=C.commands,de.setCommands(ne);else ne=[];qe(),We.reconcile()}else nt.cancel(),Gt(v)}),I.onFrame((v)=>{if(v.t==="voice"){nt.handleFrame(v);return}if(v.t==="info"&&v.info&&typeof v.info==="object"){let L=v.info;if(Object.prototype.hasOwnProperty.call(L,"provider.notice"))Ht(Cn(L["provider.notice"]));Je.handleInfo(L);return}if(v.t!=="d")return;let C=v;if(C.k==="clone"||C.k==="clone.repos"||C.k==="clone.signin"){We.handleFrame(C);return}switch(C.k){case"project":{let L=C.project;if(!L)break;let P=E.findIndex((V)=>V.id===L.id);if(P>=0)E[P]=L;else E.unshift(L);ae.setData(E,k,j,T),G(),Te();break}case"thread":{let L=C.thread;if(!L)break;let P=k.findIndex((V)=>V.id===L.id);if(P>=0)k[P]=L;else k.unshift(L);if(ae.setData(E,k,j,T),L.id===H)fe.updateThreadMeta(L),G(),de.setState(!0,L.state==="working");Te();break}case"thread.removed":{let L=String(C.id??"");k=k.filter((P)=>P.id!==L),ae.setData(E,k,j,T),Te();break}case"entry":{if(C.thread===H&&C.entry)fe.upsertEntry(C.entry);break}case"text":{if(C.thread===H)fe.appendLiveText(String(C.entry??""),String(C.append??""),Number(C.at??Date.now()));break}case"turn":{if(C.thread===H){let L=String(C.state??"idle");de.setState(!0,L==="working"),ge(H,K)}Te();break}case"btw":{if(C.thread===H)fe.showBtw(String(C.q??""),String(C.a??""));break}case"unanswered":{if(C.thread===H)fe.setUnanswered(C.unanswered??null);break}case"theme":{if(typeof C.theme==="string")Is(C.theme);break}case"home":{if(it=C.home??null,ae.setHome(it),Oe.isOpen())Oe.refresh();break}default:break}}),window.addEventListener("keydown",(v)=>{let C=v.key.toLowerCase();if((v.ctrlKey||v.metaKey)&&(C==="k"||v.shiftKey&&C==="p"))if(v.preventDefault(),Ge.isOpen())Ge.close();else Ge.open();else if(v.key==="Escape"){if(Ge.isOpen())Ge.close();else if(We.isOpen())We.escape();else if(Oe.isOpen())Oe.handleEscape();else if(fe.closePlanRevise());else if(Je.isOpen())Je.closePanel()}}),I.connect()}if(document.readyState==="loading")document.addEventListener("DOMContentLoaded",js);else js(); +`;function Ke(e){let t=e/255;return t<=0.04045?t/12.92:Math.pow((t+0.055)/1.055,2.4)}var na=[Ke(77),Ke(83),Ke(94)],ia=[Ke(53),Ke(58),Ke(67)],sa=[Ke(245),Ke(246),Ke(248)],ra=[Ke(225),Ke(228),Ke(233)];function Vs(e,t,n){let i=e.createShader(t);if(!i)throw Error("createShader failed");if(e.shaderSource(i,n),e.compileShader(i),!e.getShaderParameter(i,e.COMPILE_STATUS)){let r=e.getShaderInfoLog(i)||"shader compile error";throw e.deleteShader(i),Error(r)}return i}function Us(e,t,n){let i=Vs(e,e.VERTEX_SHADER,t),r=Vs(e,e.FRAGMENT_SHADER,n),s=e.createProgram();if(!s)throw Error("createProgram failed");if(e.attachShader(s,i),e.attachShader(s,r),e.linkProgram(s),e.deleteShader(i),e.deleteShader(r),!e.getProgramParameter(s,e.LINK_STATUS)){let a=e.getProgramInfoLog(s)||"program link error";throw e.deleteProgram(s),Error(a)}return s}function aa(e,t){let n=new Float32Array(16);for(let i=0;i<4;i++)for(let r=0;r<4;r++)n[i*4+r]=e[0+r]*t[i*4+0]+e[4+r]*t[i*4+1]+e[8+r]*t[i*4+2]+e[12+r]*t[i*4+3];return n}function oa(e,t,n,i){let r=1/Math.tan(e*0.5),s=1/(n-i),a=new Float32Array(16);return a[0]=r/t,a[5]=r,a[10]=(i+n)*s,a[11]=-1,a[14]=2*i*n*s,a}function Ws(e){let t=Math.hypot(e[0],e[1],e[2])||1;return[e[0]/t,e[1]/t,e[2]/t]}function _s(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function qn(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}class Kn{canvas;gl=null;bgProg=null;bgVao=null;uBgTop=null;uBgBot=null;prog=null;uMvp=null;uEye=null;uRight=null;uUp=null;uFwd=null;uFade=null;worker=null;boardBatch=null;partBatches=[];activeKey="";lastMeshId="";nextJobId=1;partsTotal=0;partsDone=0;center=[0,0,0];target=[0,0,0];radius=50;dist=120;yaw=0.6;pitch=0.7;lightTheme=!1;dirty=!1;rafId=0;pointers=new Map;pinchDist=0;resizeObs;cbs;constructor(e,t={}){this.cbs=t,this.canvas=document.createElement("canvas"),this.canvas.className="bp-viewer-canvas",this.canvas.style.width="100%",this.canvas.style.height="100%",this.canvas.style.display="block",this.canvas.style.touchAction="none",e.appendChild(this.canvas);let n=this.canvas.getContext("webgl2",{antialias:!0,alpha:!1,preserveDrawingBuffer:!0});if(n)this.gl=n,this.bgProg=Us(n,Zr,Qr),this.bgVao=n.createVertexArray(),this.uBgTop=n.getUniformLocation(this.bgProg,"uBgTop"),this.uBgBot=n.getUniformLocation(this.bgProg,"uBgBot"),this.prog=Us(n,ea,ta),this.uMvp=n.getUniformLocation(this.prog,"uMvp"),this.uEye=n.getUniformLocation(this.prog,"uEye"),this.uRight=n.getUniformLocation(this.prog,"uRight"),this.uUp=n.getUniformLocation(this.prog,"uUp"),this.uFwd=n.getUniformLocation(this.prog,"uFwd"),this.uFade=n.getUniformLocation(this.prog,"uFade"),n.enable(n.DEPTH_TEST),n.blendFunc(n.SRC_ALPHA,n.ONE_MINUS_SRC_ALPHA);else this.cbs.onStatus?.("WebGL2 is unavailable in this browser");try{this.worker=new Worker("/assets/mesh-worker.js",{type:"module"}),this.worker.onmessage=(i)=>this.onWorkerMessage(i.data)}catch{this.cbs.onStatus?.("3D worker unavailable")}this.resizeObs=new ResizeObserver(()=>this.scheduleDraw()),this.resizeObs.observe(this.canvas),this.canvas.addEventListener("pointerdown",this.onPointerDown),this.canvas.addEventListener("pointermove",this.onPointerMove),this.canvas.addEventListener("pointerup",this.onPointerUp),this.canvas.addEventListener("pointercancel",this.onPointerUp),this.canvas.addEventListener("wheel",this.onWheel,{passive:!1}),this.canvas.addEventListener("dblclick",this.onDblClick),this.canvas.addEventListener("contextmenu",this.onContextMenu)}keptToken(){return this.activeKey&&this.lastMeshId?`${this.activeKey} ${this.lastMeshId}`:""}setTheme(e){if(this.lightTheme!==e)this.lightTheme=e,this.scheduleDraw()}handleFrame(e){let t=typeof e.key==="string"?e.key:"";if(!t)return;if(e.mesh instanceof Uint8Array&&typeof e.n==="number"&&!e.part){this.activeKey=t,this.lastMeshId=Ls(e.mesh),this.clearParts(),this.cbs.onStatus?.("Building 3D model…");let n=new Uint8Array(e.mesh),i=e.faces instanceof Uint8Array?new Uint8Array(e.faces):void 0,r=[n.buffer];if(i)r.push(i.buffer);this.worker?.postMessage({id:this.nextJobId++,kind:"solid",key:t,n:e.n,mesh:n,faces:i},r);return}if(e.parts&&typeof e.parts==="object"&&!Array.isArray(e.parts)&&!(e.parts instanceof Uint8Array)){if(this.activeKey&&t!==this.activeKey)return;if(this.activeKey=t,this.clearParts(),this.partsTotal=typeof e.parts.of==="number"?e.parts.of:0,this.partsDone=0,this.partsTotal>0)this.cbs.onStatus?.(`Loading parts 0/${this.partsTotal}…`);this.scheduleDraw();return}if(typeof e.part==="string"&&e.mesh instanceof Uint8Array&&e.at instanceof Uint8Array&&typeof e.n==="number"){if(this.activeKey&&t!==this.activeKey)return;let n=new Uint8Array(e.mesh),i=new Uint8Array(e.at),r=e.faces instanceof Uint8Array?new Uint8Array(e.faces):void 0,s=[n.buffer,i.buffer];if(r)s.push(r.buffer);this.worker?.postMessage({id:this.nextJobId++,kind:"part",key:t,partId:e.part,n:e.n,mesh:n,at:i,faces:r,refs:Array.isArray(e.refs)?e.refs:[],done:typeof e.done==="number"?e.done:0},s)}}onWorkerMessage(e){if(e.error){this.cbs.onStatus?.(e.error);return}if(e.key!==this.activeKey||!this.gl)return;if(e.kind==="solid")this.deleteBatch(this.boardBatch),this.boardBatch=this.uploadBatch(e.positions,e.normals,e.colors,0),this.center=[e.center[0],e.center[1],e.center[2]],this.target=[e.center[0],e.center[1],e.center[2]],this.radius=e.radius,this.fit(),this.cbs.onStatus?.(""),this.scheduleDraw();else if(e.kind==="part"){let t=this.uploadBatch(e.positions,e.normals,e.colors,performance.now());if(t)this.partBatches.push(t);if(this.partsDone=e.done||this.partsDone+1,this.partsTotal>0&&this.partsDone>>24===0)s++;else a++;let o=s>0?new Float32Array(s*9):null,c=s>0?new Float32Array(s*9):null,p=s>0?new Float32Array(s*12):null,l=a>0?new Float32Array(a*9):null,u=a>0?new Float32Array(a*9):null,d=a>0?new Float32Array(a*12):null,m=0,f=0;for(let y=0;y>>24&255,L=1-C/255,M=(w>>>16&255)/255,P=(w>>>8&255)/255,T=(w&255)/255,R=y*9;if(C===0&&o&&c&&p){let D=m*9;for(let N=0;N<9;N++)o[D+N]=e[R+N],c[D+N]=t[R+N];let O=m*12;for(let N=0;N<3;N++)p[O+N*4]=M,p[O+N*4+1]=P,p[O+N*4+2]=T,p[O+N*4+3]=1;m++}else if(l&&u&&d){let D=f*9;for(let N=0;N<9;N++)l[D+N]=e[R+N],u[D+N]=t[R+N];let O=f*12;for(let N=0;N<3;N++)d[O+N*4]=M,d[O+N*4+1]=P,d[O+N*4+2]=T,d[O+N*4+3]=L;f++}}let b=o&&c&&p?this.createSubBatch(o,c,p,s*3):null,g=l&&u&&d?this.createSubBatch(l,u,d,a*3):null;if(!b&&!g)return null;return{opaque:b,translucent:g,fadeStartMs:i}}deleteSubBatch(e){let t=this.gl;if(!t||!e)return;t.deleteVertexArray(e.vao),t.deleteBuffer(e.posBuf),t.deleteBuffer(e.nrmBuf),t.deleteBuffer(e.colBuf)}deleteBatch(e){if(!e)return;this.deleteSubBatch(e.opaque),this.deleteSubBatch(e.translucent)}clearParts(){for(let e of this.partBatches)this.deleteBatch(e);this.partBatches=[]}fit(){this.setView("fit")}setView(e){let t=35*Math.PI/180;this.dist=this.radius/Math.sin(t*0.5)*1.15,this.target=[this.center[0],this.center[1],this.center[2]];let{yaw:n,pitch:i}=Os(e);this.yaw=n,this.pitch=i,this.scheduleDraw()}snapPng(){return this.draw(performance.now()),new Promise((e)=>{this.canvas.toBlob((t)=>e(t),"image/png")})}scheduleDraw(){if(this.dirty)return;this.dirty=!0,this.rafId=requestAnimationFrame((e)=>{if(this.dirty=!1,this.rafId=0,this.draw(e))this.scheduleDraw()})}drawSubBatch(e){if(!e||!this.gl)return;this.gl.bindVertexArray(e.vao),this.gl.drawArrays(this.gl.TRIANGLES,0,e.vertCount)}draw(e){let t=this.gl;if(!t||!this.prog)return!1;let n=this.canvas.getBoundingClientRect(),i=Math.max(1,Math.round(n.width)),r=Math.max(1,Math.round(n.height)),s=Math.min(window.devicePixelRatio||1,2),a=Math.round(i*s),o=Math.round(r*s);if(this.canvas.width!==a||this.canvas.height!==o)this.canvas.width=a,this.canvas.height=o;if(t.viewport(0,0,a,o),!this.boardBatch&&this.partBatches.length===0)return!1;if(t.depthMask(!0),t.clear(t.DEPTH_BUFFER_BIT),this.bgProg&&this.bgVao){t.disable(t.DEPTH_TEST),t.disable(t.BLEND),t.depthMask(!1),t.useProgram(this.bgProg);let D=this.lightTheme?sa:na,O=this.lightTheme?ra:ia;t.uniform3f(this.uBgTop,D[0],D[1],D[2]),t.uniform3f(this.uBgBot,O[0],O[1],O[2]),t.bindVertexArray(this.bgVao),t.drawArrays(t.TRIANGLE_STRIP,0,4),t.bindVertexArray(null)}let c=Math.cos(this.pitch),p=Math.sin(this.pitch),l=Math.cos(this.yaw),u=Math.sin(this.yaw),d=[this.target[0]+this.dist*c*u,this.target[1]-this.dist*c*l,this.target[2]+this.dist*p],m=Ws([this.target[0]-d[0],this.target[1]-d[1],this.target[2]-d[2]]),f=Math.abs(m[2])>0.99?[0,1,0]:[0,0,1],b=Ws(_s(m,f)),g=_s(b,m),y=new Float32Array([b[0],g[0],-m[0],0,b[1],g[1],-m[1],0,b[2],g[2],-m[2],0,-qn(b,d),-qn(g,d),qn(m,d),1]),w=Math.max(0.05,this.dist*0.01),C=Math.max(this.dist*10,this.radius*20),L=oa(35*Math.PI/180,a/o,w,C),M=aa(L,y);t.useProgram(this.prog),t.uniformMatrix4fv(this.uMvp,!1,M),t.uniform3f(this.uEye,d[0],d[1],d[2]),t.uniform3f(this.uRight,b[0],b[1],b[2]),t.uniform3f(this.uUp,g[0],g[1],g[2]),t.uniform3f(this.uFwd,m[0],m[1],m[2]);let P=!1,T=[],R=[];for(let D of this.partBatches){let O=e-D.fadeStartMs,N=D.fadeStartMs===0?1:Math.min(1,Math.max(0,O/300));if(N<1){if(P=!0,N>0)R.push({batch:D,fade:N})}else T.push(D)}if(t.enable(t.DEPTH_TEST),t.depthMask(!0),t.disable(t.BLEND),t.uniform1f(this.uFade,1),this.boardBatch)this.drawSubBatch(this.boardBatch.opaque);for(let D of T)this.drawSubBatch(D.opaque);if(t.depthMask(!1),t.enable(t.BLEND),t.uniform1f(this.uFade,1),this.boardBatch)this.drawSubBatch(this.boardBatch.translucent);for(let D of T)this.drawSubBatch(D.translucent);for(let{batch:D,fade:O}of R)t.uniform1f(this.uFade,O),this.drawSubBatch(D.opaque),this.drawSubBatch(D.translucent);return t.depthMask(!0),t.bindVertexArray(null),P}onPointerDown=(e)=>{if(this.canvas.setPointerCapture(e.pointerId),this.pointers.set(e.pointerId,{x:e.clientX,y:e.clientY,button:e.button,shift:e.shiftKey}),this.pointers.size===2){let[t,n]=Array.from(this.pointers.values());this.pinchDist=Math.hypot(n.x-t.x,n.y-t.y)||1}};onPointerMove=(e)=>{let t=this.pointers.get(e.pointerId);if(!t)return;let n=e.clientX-t.x,i=e.clientY-t.y;if(t.x=e.clientX,t.y=e.clientY,this.pointers.size===2){let[r,s]=Array.from(this.pointers.values()),a=Math.hypot(s.x-r.x,s.y-r.y)||1;if(this.pinchDist>0)this.dist=Math.max(this.radius*0.05,Math.min(this.radius*20,this.dist*(this.pinchDist/a)));this.pinchDist=a,this.cbs.onUserMove?.(),this.scheduleDraw();return}if(t.button===2||t.button===1||t.shift){let r=this.dist*0.0014,s=Math.cos(this.yaw),a=Math.sin(this.yaw);this.target[0]-=n*s*r,this.target[1]-=n*a*r,this.target[2]+=i*r}else this.yaw+=n*0.008,this.pitch=Math.max(-Math.PI*0.49,Math.min(Math.PI*0.49,this.pitch+i*0.008));this.cbs.onUserMove?.(),this.scheduleDraw()};onPointerUp=(e)=>{if(this.pointers.delete(e.pointerId),this.pointers.size<2)this.pinchDist=0};onWheel=(e)=>{e.preventDefault();let t=e.deltaY<0?0.8620689655172414:1.16;this.dist=Math.max(this.radius*0.05,Math.min(this.radius*20,this.dist*t)),this.cbs.onUserMove?.(),this.scheduleDraw()};onDblClick=()=>{this.fit()};onContextMenu=(e)=>{e.preventDefault()};destroy(){if(this.rafId)cancelAnimationFrame(this.rafId);if(this.resizeObs.disconnect(),this.canvas.removeEventListener("pointerdown",this.onPointerDown),this.canvas.removeEventListener("pointermove",this.onPointerMove),this.canvas.removeEventListener("pointerup",this.onPointerUp),this.canvas.removeEventListener("pointercancel",this.onPointerUp),this.canvas.removeEventListener("wheel",this.onWheel),this.canvas.removeEventListener("dblclick",this.onDblClick),this.canvas.removeEventListener("contextmenu",this.onContextMenu),this.deleteBatch(this.boardBatch),this.clearParts(),this.gl){if(this.bgVao)this.gl.deleteVertexArray(this.bgVao);if(this.bgProg)this.gl.deleteProgram(this.bgProg);if(this.prog)this.gl.deleteProgram(this.prog)}this.worker?.terminate(),this.canvas.remove()}}var zs=64,la=16777216;function ca(e,t){switch(e){case"board":case"3d":return t.board!==!1;case"schematic":return t.schematic!==!1;case"mech":return t.mech!==!1;case"gerbers":return t.gerbers!==!1;default:return!0}}function Vt(e){if(!e)return"";let t=e.replace(/\\/g,"/").replace(/\/+$/,""),n=t.lastIndexOf("/");return n>=0?t.slice(n+1):t}function qs(e){switch(e){case"board":return h("viewer.board","Board");case"schematic":return h("viewer.schematic","Schematic");case"3d":return h("viewer.solid","3D");case"gerbers":return h("gpui.gerbers","Gerbers");case"mech":return h("viewer.mech","Mech");case"files":return h("viewer.files","Files");case"diff":return h("viewer.diff","Diff");case"review":return h("viewer.review","Review");case"browser":return h("bots.tab.browser","Browser");case"terminal":return h("viewer.terminal","Terminal");default:return e?e.charAt(0).toUpperCase()+e.slice(1):""}}function Jn(e){return e==="board"||e==="schematic"||e==="gerbers"}function da(e){return e==="files"||e==="diff"||e==="review"||e==="browser"||e==="terminal"}function Xn(e,t){let n=document.createElement("div");n.className="bp-vh";let i=document.createElement("div");i.className="bp-vh-title";let r=document.createElement("span");r.className="bp-vh-page";let s=document.createElement("span");s.className="bp-vh-sep",s.textContent="·",s.hidden=!0;let a=document.createElement("span");a.className="bp-vh-file",a.hidden=!0,i.append(r,s,a);let o=document.createElement("div");o.className="bp-vh-actions",n.append(i,o);let c=document.createElement("div");c.className="bp-solid-bar",c.setAttribute("data-testid","solid-presets-bar"),c.hidden=!0;let p=document.createElement("div");p.className="bp-v-banner",p.hidden=!0;let l=document.createElement("div");l.className="bp-v-stage-wrap";let u=document.createElement("div");u.className="bp-v-stage";let d=document.createElement("div");d.className="bp-v-overlay",d.hidden=!0;let m=document.createElement("div");m.className="bp-v-layers",m.hidden=!0;let f=document.createElement("div");f.className="bp-v-info",f.hidden=!0,l.append(u,d,m,f);let b=document.createElement("div");b.className="bp-history-bar",b.setAttribute("data-testid","viewer-history-bar"),b.hidden=!0,e.replaceChildren(n,c,p,l,b);let g="",y="",w=0,C=!1,L=new Set,M=[],P=0,T=new Map,R=new Map,D={},O=[],N="",Z="",oe=!1,se=!1,ye=0,Pe=!1,Ee=0,ee="",re=0,I=null,ue=null,le=null,Q=null,me=null,k=new zn,x=0,H=!1,B="",K="",ie="",we="";document.addEventListener("click",(G)=>{if(!H)return;if(G.target instanceof Node&&b.contains(G.target))return;H=!1,Ae()}),document.addEventListener("keydown",(G)=>{if(H&&G.key==="Escape")H=!1,Ae()});function j(){if(x)window.clearInterval(x),x=0;k.playing=!1}function ne(){let G=y==="3d"||y==="mech";if(c.hidden=!G,!G)return;if(c.childElementCount>0)return;for(let U of Gs){let V=document.createElement("button");V.type="button",V.className="bp-v-btn",V.textContent=U.label,V.setAttribute("data-testid",`solid-view-${U.id}`),V.addEventListener("click",()=>{le?.setView(U.id)}),c.append(V)}let W=document.createElement("button");W.type="button",W.className="bp-v-btn",W.textContent="Snap view",W.setAttribute("data-testid","solid-snap"),W.addEventListener("click",()=>{if(!le)return;le.snapPng().then((U)=>{if(!U)return;let V=URL.createObjectURL(U),z=document.createElement("a");z.href=V;let Y=(je()||y||"view").replace(/[^a-zA-Z0-9._-]/g,"_");z.download=`${Y}-snap.png`,z.click(),setTimeout(()=>URL.revokeObjectURL(V),1000)})}),c.append(W)}async function Ne(){if(!g||y!=="board"&&y!=="schematic")return;Ae();let G=k.compareRequest();if(!G){B="",K="",ie="",we="",await lt(!1);return}let W=`${y}|${G.commit}|${G.bits}|${Z}`;if(W===we&&L.size>0){Re(k.highlightEdits?`Comparing against ${k.activeRef()?.label||G.commit.slice(0,7)} (edits highlighted)`:`Comparing against ${k.activeRef()?.label||G.commit.slice(0,7)}`,!1);return}let U=++w;L.clear(),T.clear(),Ye(),C=!0,B="",K=G.commit,ie="",we=W;try{let V=Z||(y==="schematic"?D.sch:D.pcb)||"";if(!V){let ke=await t.hub.rpc("viewer.files",{thread:g});if(U!==w)return;D=ke||{},He(),V=(y==="schematic"?D.sch:D.pcb)||""}if(!V)throw Error(`Unable to resolve ${y} file path for compare`);let z=await t.hub.rpc("viewer.compare",{thread:g,kind:y,commit:G.commit,bits:G.bits,...Z?{path:Z}:{}});if(U!==w)return;let Y=typeof z?.root==="string"?z.root:"",J=y==="schematic"?"1":"0";B=Y?`${J}|${Y}|diff +`:`${J}|`,K=G.commit,ie=V.startsWith("/")||/^[A-Za-z]:[\\/]/.test(V)||!Y?V:`${Y.replace(/\/+$/,"")}/${V.replace(/^\/+/,"")}`,C=!1;let fe=M;Ye();for(let ke of fe)if(ke.kind==="bin")qe(ke.buf);else _e(ke.key,ke.none,ke.retryable,ke.big);Re(k.highlightEdits?`Comparing against ${k.activeRef()?.label||G.commit.slice(0,7)} (edits highlighted)`:`Viewing snapshot: ${k.activeRef()?.label||G.commit.slice(0,7)}`,!1)}catch(V){if(U!==w)return;C=!1,B="",K="",ie="",we="",Ye(),Re(V instanceof Error?V.message:String(V),!0)}}function Ae(){let G=y==="board"||y==="schematic";if(b.hidden=!G,!G)return;let W=document.createElement("div");W.className="bp-history-group";let U=document.createElement("button");U.type="button",U.className="bp-v-btn",U.textContent="<",U.title="Older snapshot",U.disabled=k.refs.length===0||k.index>=k.refs.length-1,U.setAttribute("data-testid","history-prev"),U.addEventListener("click",()=>{if(j(),k.step(1))Ne()});let V=document.createElement("button");V.type="button",V.className="bp-v-btn"+(k.playing?" is-on":""),V.textContent=k.playing?"⏸":"▶",V.title=k.playing?"Pause history":"Play history",V.disabled=k.refs.length===0,V.setAttribute("data-testid","history-play"),V.addEventListener("click",()=>{if(k.playing){j(),Ae();return}if(k.refs.length===0)return;if(k.playing=!0,k.isLive())k.index=k.refs.length-1,Ne();else Ae();x=window.setInterval(()=>{if(!k.playing||y!=="board"&&y!=="schematic"){j(),Ae();return}if(k.step(-1))Ne();else j(),Ae()},1400)});let z=document.createElement("button");z.type="button",z.className="bp-v-btn",z.textContent=">",z.title="Newer snapshot",z.disabled=k.isLive(),z.setAttribute("data-testid","history-next"),z.addEventListener("click",()=>{if(j(),k.step(-1))Ne()});let Y=document.createElement("button");Y.type="button",Y.className="bp-v-btn"+(k.isLive()?" is-on":""),Y.textContent="Live",Y.setAttribute("data-testid","history-live"),Y.addEventListener("click",()=>{if(j(),k.goLive())Re("",!1),Ne()});let J=document.createElement("span");J.className="bp-history-label",J.setAttribute("data-testid","history-label");let fe=k.activeRef();J.textContent=fe?fe.label||fe.commit.slice(0,7):k.refs.length>0?`Live (${k.refs.length} saved)`:"Live",W.append(U,V,z,Y,J);let ke=document.createElement("div");ke.className="bp-history-group";let Te=document.createElement("button");Te.type="button",Te.className="bp-v-btn"+(k.highlightEdits?" is-on":""),Te.textContent="Highlight edits",Te.disabled=k.refs.length===0,Te.setAttribute("data-testid","history-highlight"),Te.addEventListener("click",()=>{j(),k.toggleHighlight(),Ne()});let De=document.createElement("div");De.className="bp-history-menu-wrap";let Be=document.createElement("button");if(Be.type="button",Be.className="bp-v-btn"+(H||!k.isLive()?" is-on":""),Be.disabled=k.refs.length===0,Be.setAttribute("data-testid","history-compare"),Be.setAttribute("aria-haspopup","menu"),Be.setAttribute("aria-expanded",String(H)),Be.textContent=fe?`Compare: ${fe.label||fe.commit.slice(0,7)} ▾`:"Compare ▾",Be.addEventListener("click",(Ce)=>{Ce.stopPropagation(),H=!H,Ae()}),De.append(Be),H&&k.refs.length>0){let Ce=document.createElement("div");Ce.className="bp-history-menu",Ce.setAttribute("role","menu"),Ce.setAttribute("data-testid","history-compare-menu");let Ve=(Ue,Ge,zt)=>{let Ze=document.createElement("button");Ze.type="button",Ze.className="bp-history-menu-item"+(zt?" is-active":""),Ze.setAttribute("role","menuitem"),Ze.setAttribute("data-commit",Ge),Ze.textContent=Ue,Ze.addEventListener("click",()=>{if(H=!1,j(),k.selectCommit(Ge)){if(k.isLive())Re("",!1);Ne()}else Ae()}),Ce.append(Ze)};Ve("Live (working tree)","",k.isLive());for(let Ue of k.refs)Ve(Ue.label||Ue.commit.slice(0,7),Ue.commit,fe?.commit===Ue.commit);De.append(Ce)}ke.append(Te,De),b.replaceChildren(W,ke)}async function Me(G){if(!G)return;try{let W=await t.hub.rpc("viewer.refs",{thread:G});if(G!==g)return;k.setRefs(Array.isArray(W?.refs)?W.refs:[]),Ae()}catch{if(G!==g)return;k.setRefs([]),Ae()}}function q(){return document.documentElement.classList.contains("light")}let he=new MutationObserver(()=>{let G=q();ue?.setTheme(G),le?.setTheme(G),me?.setTheme(G)});he.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]});function ae(G,W="",U=!1,V=""){if(G==="none"){d.hidden=!0,d.replaceChildren();return}d.hidden=!1,d.className=`bp-v-overlay is-${G}`;let z=document.createElement("div");z.className="bp-v-state-card";let Y=document.createElement("div");if(Y.className="bp-v-state-msg",Y.textContent=W,z.append(Y),U){let J=document.createElement("button");J.type="button",J.className="bp-v-btn is-primary",J.textContent=h("tools.retry","Retry"),J.addEventListener("click",()=>void lt(!0)),z.append(J)}if(V){let J=document.createElement("div");J.className="bp-v-state-msg",J.textContent=h("gpui.c.solid.big.next","Loading it may take a while and a lot of memory.");let fe=document.createElement("button");fe.type="button",fe.className="bp-v-btn is-primary",fe.textContent=h("gpui.c.solid.load.big","Load it anyway"),fe.addEventListener("click",()=>{ae("loading",h("gpui.c.solid.loading.big","Loading it anyway…")),t.hub.rpc("kicad.big",{key:V}).catch(()=>ae("error",W,!1,V))}),z.append(J,fe)}d.replaceChildren(z)}function Re(G,W){p.textContent=G,p.hidden=!G,p.classList.toggle("is-warn",W)}function je(){if(Z)return Vt(Z);if(y==="board"||y==="3d")return Vt(D.pcb);if(y==="schematic")return Vt(D.sch);if(y==="mech")return Vt(N);return""}function He(){r.textContent=qs(y);let G=je();if(s.hidden=!G,a.hidden=!G,a.textContent=G,o.replaceChildren(),y==="mech"&&O.length>1){let U=document.createElement("select");U.className="bp-v-select",U.setAttribute("aria-label",h("viewer.mech","Mech"));for(let V of O){let z=document.createElement("option");z.value=V,z.textContent=Vt(V),z.selected=V===N,U.append(z)}U.addEventListener("change",()=>{N=U.value,He(),lt(!1)}),o.append(U)}if(Jn(y)){let U=document.createElement("button");U.type="button",U.className="bp-v-btn"+(Pe?" is-on":""),U.textContent=I?.layerHead||"Layers",U.setAttribute("data-testid","viewer-layers-btn"),U.addEventListener("click",()=>{if(Pe=!Pe,m.hidden=!Pe,U.classList.toggle("is-on",Pe),Pe)ge("","")}),o.append(U)}if(y==="board"||y==="schematic"||y==="3d"||y==="mech"||y==="gerbers"){let U=document.createElement("button");U.type="button",U.className="bp-v-btn",U.textContent="Fit",U.setAttribute("data-testid","viewer-fit-btn"),U.addEventListener("click",()=>{ue?.fit(),le?.fit()}),o.append(U)}if((y==="board"||y==="schematic")&&t.hub.hasFeature("follow")){let U=document.createElement("button");U.type="button",U.className="bp-v-btn"+(oe&&!se?" is-on":""),U.textContent=oe?se?h("gpui.follow.paused","Follow (paused)"):"Follow agent":"Follow agent",U.setAttribute("data-testid","viewer-follow-btn"),U.addEventListener("click",()=>void st()),o.append(U)}let W=document.createElement("button");W.type="button",W.className="bp-v-btn bp-v-close",W.textContent="✕",W.title=h("common.close","Close"),W.setAttribute("aria-label",h("common.close","Close")),W.setAttribute("data-testid","viewer-close-btn"),W.addEventListener("click",()=>t.closeViewer()),o.append(W)}function be(){if(!I){m.replaceChildren();return}let G=document.createDocumentFragment(),W=document.createElement("div");W.className="bp-v-layers-head";let U=document.createElement("span");if(U.textContent=I.layerHead||"Layers",W.append(U),I.layerReset){let J=document.createElement("button");J.type="button",J.className="bp-v-btn",J.textContent="Reset",J.addEventListener("click",()=>void ge("reset","")),W.append(J)}if(G.append(W),I.layerModes){let J=document.createElement("div");J.className="bp-v-layers-modes",["All","Dim","Only"].forEach((fe,ke)=>{let Te=document.createElement("button");Te.type="button",Te.className="bp-v-btn"+(I?.layerMode===ke?" is-on":""),Te.textContent=fe,Te.addEventListener("click",()=>void ge("mode",String(ke))),J.append(Te)}),G.append(J)}let V=ue?.presentColors()??new Map,z=(I.layerList||[]).concat(I.layerMarks||[]),Y=document.createElement("div");Y.className="bp-v-layers-list";for(let J of z){let fe=V.get(J.layer);if(fe===void 0)continue;let ke=document.createElement("div");ke.className="bp-v-layer-row"+(J.active?" is-focus":"");let Te=document.createElement("input");Te.type="checkbox",Te.checked=J.on!==!1,Te.addEventListener("change",()=>void ge("toggle",String(J.layer)));let De=document.createElement("span");De.className="bp-v-layer-swatch";let Be=fe>>>16&255,Ce=fe>>>8&255,Ve=fe&255;De.style.background=J.on!==!1?`rgb(${Be},${Ce},${Ve})`:`rgba(${Be},${Ce},${Ve},0.2)`;let Ue=document.createElement("button");Ue.type="button",Ue.className="bp-v-layer-name",Ue.textContent=J.name,Ue.addEventListener("click",()=>void ge("pick",String(J.layer))),ke.append(Te,De,Ue),Y.append(ke)}G.append(Y),m.replaceChildren(G)}async function ge(G,W){if(!Jn(y))return;let U=w;try{let V=await t.hub.rpc("viewer.layers",{kind:y,present:re,off:Ee,focus:ee,...G?{action:G,value:W}:{}});if(U!==w||!V)return;Ee=Number(V.own)||0,ee=typeof V.focus==="string"?V.focus:"",I=V;let z={off:Number(V.off)||0,dim:Number(V.dim)||0,lift:typeof V.lift==="number"?V.lift:255};if(ue?.setLayers(z),He(),Pe)be()}catch{}}async function et(){if(!oe||se||!g||!t.hub.hasFeature("follow"))return;se=!0,He();try{await t.hub.rpc("viewer.follow",{thread:g,action:"pause"})}catch{}}async function st(){if(!g||!t.hub.hasFeature("follow"))return;let G=!oe?"on":se?"resume":"off";try{let W=await t.hub.rpc("viewer.follow",{thread:g,action:G});if(oe=!!W.on,se=!!W.paused,He(),W.on&&!W.paused&&W.focus&&Array.isArray(W.focus.box)&&W.focus.box.length===4&&(W.seq||0)>ye)ye=W.seq||ye,ue?.zoomToBoxMm([W.focus.box[0],W.focus.box[1],W.focus.box[2],W.focus.box[3]])}catch{}}function Je(){f.hidden=!0,f.replaceChildren(),ue?.setHighlights([])}function de(G){let W=G.split(";").filter(Boolean),U=W.shift()||G,V=[],z="",Y="";for(let De of W){if(De.startsWith("g="))continue;let Be=De.indexOf("=");if(Be>0){let Ce=De.slice(0,Be),Ve=De.slice(Be+1);if((Ce==="ref"||Ce==="symbol")&&!z)z=Ve;if(Ce==="net"&&!Y)Y=Ve;V.push([Ce,Ve])}else V.push([De,""])}let J=document.createElement("div");J.className="bp-v-info-head";let fe=document.createElement("span");fe.className="bp-v-info-title",fe.textContent=U;let ke=document.createElement("button");ke.type="button",ke.className="bp-v-info-x",ke.textContent="×",ke.setAttribute("aria-label","Clear selection"),ke.addEventListener("click",Je),J.append(fe,ke);let Te=document.createElement("div");Te.className="bp-v-info-rows";for(let[De,Be]of V){let Ce=document.createElement("span");Ce.className="bp-v-info-chip",Ce.textContent=Be?`${De}: ${Be}`:De,Te.append(Ce)}return f.replaceChildren(J,...V.length>0?[Te]:[]),f.hidden=!1,{ref:z||void 0,net:Y||void 0}}async function St(G){if(!G){Je();return}let W=Array.from(L)[0]||"";if(!W)return;let U=w;try{let V=await t.hub.rpc("viewer.info",{key:W,at:G.at,idx:G.idx});if(U!==w)return;let z=typeof V.info==="string"?V.info:"";if(!z){Je();return}let{ref:Y,net:J}=de(z),fe=[];if(Y)fe.push(["ref",Y]);if(J)fe.push(["net",J]);let ke=[[G.at,G.idx]];for(let[Te,De]of fe){let Be=await t.hub.rpc("viewer.probe",{key:W,name:Te,value:De});if(U!==w)return;if(Array.isArray(Be.matches))for(let Ce of Be.matches)ke.push(Ce)}ue?.setHighlights(ke)}catch{Je()}}function Xe(){Q?.destroy(),Q=null,me?.destroy(),me=null,ue?.destroy(),ue=null,le?.destroy(),le=null,u.replaceChildren(),Pe=!1,m.hidden=!0,f.hidden=!0,f.replaceChildren(),Re("",!1),ae("none")}function Ye(){M=[],P=0}async function lt(G){if(!g||!y)return;let W=++w;if(L.clear(),C=!1,Ye(),Xe(),He(),ne(),Ae(),(y==="board"||y==="schematic")&&g)Me(g);if(da(y)){if(t.hub.rpc("viewer.watch",{thread:g,kind:""}).catch(()=>{}),y==="files")Q=Ds(u,t,g,(z,Y)=>{if(y=z,Z=Y,z==="mech")N=Y;lt(!1)});else if(y==="diff")Q=Hs(u,t,g);else if(y==="review")Q=Fs(u,t,g);else if(y==="browser")Q=Is(u,t,g);else if(y==="terminal")ae("loading","Loading terminal…"),import("/assets/terminal.js").then((Y)=>{if(W!==w)return;if(ae("none"),Y?.mountTerminalPane)me=Y.mountTerminalPane(u,t,g,q());else ae("error","Terminal chunk missing",!0)},(Y)=>{if(W!==w)return;ae("error",Y instanceof Error?Y.message:String(Y),!0)});return}if(ae("loading","Loading…"),!D.root)try{let z=await t.hub.rpc("viewer.files",{thread:g});if(W!==w)return;D=z||{},He()}catch{}if(y==="gerbers"&&D.hasGerbers===!1){ae("empty","No Gerbers in this project",!1);return}let U=q();if(y==="3d"||y==="mech")le=new Kn(u,{onStatus:(z,Y)=>{if(Y)ae("none"),Re(z,!1);else if(z)ae("loading",z);else ae("none"),Re("",!1)},onUserMove:()=>void et()}),le.setTheme(U);else if(y==="board"||y==="schematic"||y==="gerbers")ue=new Wn(u,{onPick:(z)=>void St(z),onUserMove:()=>void et()}),ue.setTheme(U);else{ae("empty",`${qs(y)} is not available in this viewer`,!1);return}let V={thread:g};if(G)V.force=!0;if(y==="mech"){if(O.length===0)try{let z=await t.hub.rpc("mech.list",{thread:g});if(W!==w)return;if(O=Array.isArray(z.parts)?z.parts:[],!N)N=z.primary||O[0]||"";He()}catch(z){if(W!==w)return;ae("error",z instanceof Error?z.message:String(z),!0);return}if(!N){ae("empty",h("gpui.rail.no.mech","No mechanical parts in this project"),!1);return}V.kind="3d",V.path=N}else{if(V.kind=y,Z&&(y==="board"||y==="schematic"))V.path=Z;if(y==="3d"&&!G&&le){let z=le.keptToken();if(z)V.kept=z}if((y==="board"||y==="schematic"||y==="gerbers")&&!G&&t.hub.hasFeature("keptChunks"))V.keptChunks=Array.from(R.keys())}C=!0,B="",K="",ie="",we="";try{let z=await t.hub.rpc("viewer.watch",V);if(W!==w)return;L=new Set(Array.isArray(z.keys)?z.keys:[]),C=!1;let Y=M;Ye();for(let J of Y)if(J.kind==="bin")qe(J.buf);else _e(J.key,J.none,J.retryable,J.big)}catch(z){if(W!==w)return;C=!1,L.clear(),Ye();let Y=z instanceof Error?z.message:String(z),J=/no gerbers|not in this project|another machine/i.test(Y);ae(J?"empty":"error",Y,!J)}}function _e(G,W,U,V=!1){if(C){if(M.length{if(G.t==="plot"&&typeof G.none==="string"&&typeof G.key==="string")_e(G.key,G.none,G.retryable===!0)}),_t=Jt(()=>{if(y)He()}),Oe=(G)=>{if(G.key==="Escape"&&y&&!f.hidden)Je()};return window.addEventListener("keydown",Oe),{open(G,W){if(W!==g){if(g=W,D={},O=[],N="",T.clear(),oe=!1,se=!1,ye=0,Ee=0,ee="",re=0,I=null,t.hub.hasFeature("follow"))t.hub.rpc("viewer.follow",{thread:W}).then((U)=>{if(W!==g)return;if(oe=!!U.on,se=!!U.paused,ye=Number(U.seq)||0,y)He()}).catch(()=>{})}if(G!==y)j(),k.goLive(),Ee=0,ee="",re=0,I=null;y=G,Z="",lt(!1)},reconcileHas(G){if(y&&!ca(y,G))t.closeViewer()},close(){if(w++,C=!1,j(),H=!1,B="",K="",ie="",we="",k.goLive(),c.hidden=!0,b.hidden=!0,Ye(),g)t.hub.rpc("viewer.watch",{thread:g,kind:""}).catch(()=>{});y="",L.clear(),Xe()}}}var Ks="http://www.w3.org/2000/svg";function Ut(e){let t=document.createElementNS(Ks,"svg");t.setAttribute("viewBox","0 0 24 24"),t.setAttribute("width","13"),t.setAttribute("height","13"),t.setAttribute("fill","none"),t.setAttribute("stroke","currentColor"),t.setAttribute("stroke-width","1.8"),t.setAttribute("aria-hidden","true");for(let n of e){let i=document.createElementNS(Ks,"path");i.setAttribute("d",n),t.appendChild(i)}return t}function pa(e){if(!e)return"bp-dot-idle";let t=e.status||e.state;if(t==="active"||t==="working")return"bp-dot-work";if(t==="finished")return"bp-dot-done";if(t==="waiting"||t==="asking"||t==="blocked"||t==="failed"||(e.waiting??0)>0)return"bp-dot-need";return"bp-dot-idle"}function Js(e,t){if(!e)return!0;if(t==="board"||t==="3d")return e.board!==!1;if(t==="schematic")return e.schematic!==!1;if(t==="mech")return e.mech!==!1;if(t==="gerbers")return e.gerbers!==!1;return!0}var Wt="dark",ln=(()=>{try{return ms(localStorage.getItem("bp.theme.pref"))}catch{return"auto"}})(),Yn=null,Pt=(()=>{try{return hs(localStorage.getItem("bp.locale"))}catch{return"auto"}})();function Qs(){let e=Ht(ln,Wt);document.documentElement.classList.toggle("light",e==="light");try{localStorage.setItem("bp.theme",e)}catch{}}function Xs(e){if(!e)return;Wt=e==="light"?"light":"dark",Qs()}function Ys(){if(Pt!=="auto")gt(Pt);else if(Yn)gt(Yn);else if(typeof navigator<"u"&&navigator.language){if(!gt(navigator.language))gt("en")}}function ua(){return`web-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,8)}`}function Zs(){let e=document.getElementById("root");if(!e)return;try{if(localStorage.getItem("bp.theme")==="light")Wt="light";if(Ht(ln,Wt)==="light")document.documentElement.classList.add("light");if(Pt!=="auto")gt(Pt)}catch{}let t=document.createElement("header");t.className="bp-topbar",t.setAttribute("data-testid","topbar");let n=document.createElement("button");n.type="button",n.className="icon bp-side-toggle",n.textContent="☰",n.title="Toggle sidebar",n.setAttribute("aria-label","Toggle sidebar");let i=document.createElement("div");i.className="bp-brand";let r=document.createElement("img");r.src="/assets/favicon.svg",r.alt="Backplane",r.className="bp-logo";let s=document.createElement("span");s.className="bp-brand-name bp-hide-phone",s.textContent="Backplane";let a=document.createElement("span");a.className="bp-crumb-sep bp-hide-phone",a.textContent="/";let o=document.createElement("span");o.className="bp-crumb-proj bp-hide-phone";let c=document.createElement("span");c.className="bp-crumb-sep bp-hide-phone",c.textContent="/";let p=document.createElement("span");p.className="bp-crumb-thread",p.setAttribute("data-testid","thread-title");let l=document.createElement("span");l.className="bp-plan-top-badge bp-hidden",l.setAttribute("data-testid","plan-top-badge"),i.append(r,s,a,o,c,p,l);let u=document.createElement("div");u.className="bp-top-state bp-hide-phone bp-hidden";let d=document.createElement("span");d.className="bp-top-state-lbl",d.textContent="STATE";let m=document.createElement("span");m.className="bp-dot bp-dot-idle";let f=document.createElement("span");f.className="bp-top-state-word",u.append(d,m,f);let b=document.createElement("div");b.className="bp-top-acts bp-hide-phone bp-hidden";let g=document.createElement("button");g.type="button",g.className="bp-btn-ghost bp-top-act";let y=document.createElement("span");y.textContent=h("menu.pin","Pin"),g.append(Ut(["M12 17v5","M9 3h6l1 7 3 3H5l3-3 1-7z"]),y);let w=document.createElement("button");w.type="button",w.className="bp-btn-ghost bp-top-act";let C=document.createElement("span");C.textContent=h("menu.settle","Settle"),w.append(Ut(["M12 22a10 10 0 1 0 0-20 10 10 0 0 0 0 20z","M9 12l2 2 4-4"]),C);let L=document.createElement("div");L.className="bp-menu-wrap";let M=document.createElement("button");M.type="button",M.className="bp-btn-ghost bp-top-act",M.textContent="▾",M.title="Thread menu",M.setAttribute("aria-label","Thread menu"),M.setAttribute("data-testid","thread-menu-btn");let P=document.createElement("div");P.className="bp-popover bp-hidden",P.setAttribute("data-testid","thread-menu"),L.append(M,P),b.append(g,w,L);let T=document.createElement("div");T.className="bp-top-right";let R=document.createElement("button");R.type="button",R.className="bp-btn-ghost bp-top-act bp-hide-tablet",R.setAttribute("data-testid","improvements-btn");let D=document.createElement("span");D.textContent=h("gpui.improvements","Improvements"),R.append(Ut(["M12 2l2.4 7.4H22l-6.2 4.5 2.4 7.4L12 16.8l-6.2 4.5 2.4-7.4L2 9.4h7.6z"]),D);let O=document.createElement("button");O.type="button",O.className="bp-cmd-box bp-hide-tablet",O.textContent="> Jump or run a command";let N=document.createElement("button");N.type="button",N.className="icon bp-top-icon",N.title="Search",N.setAttribute("aria-label","Search"),N.appendChild(Ut(["M11 19a8 8 0 1 0 0-16 8 8 0 0 0 0 16z","M21 21l-4.3-4.3"]));let Z=document.createElement("button");Z.type="button",Z.className="icon bp-top-icon",Z.title=h("palette.settings","Settings"),Z.setAttribute("aria-label",h("palette.settings","Settings")),Z.setAttribute("data-testid","settings-btn"),Z.appendChild(Ut(["M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6z","M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 1 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 1 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 1 1-2.83-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 1 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 1 1 2.83-2.83l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 1 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 1 1 2.83 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9c.26.6.85 1 1.51 1H21a2 2 0 1 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z"])),T.append(R,O,N,Z),t.append(n,i,u,b,T);let oe=document.createElement("div");oe.className="bp-body";let se=document.createElement("aside");se.className="bp-sidebar",se.setAttribute("data-testid","sidebar");let ye=document.createElement("main");ye.className="bp-center";let Pe=document.createElement("div");Pe.className="bp-right-area bp-hidden",Pe.setAttribute("data-testid","right-area");let Ee=document.createElement("div");Ee.className="bp-right-top";let ee=document.createElement("section");ee.className="bp-viewer-pane bp-hidden",ee.setAttribute("data-testid","viewer-pane"),Ee.appendChild(ee),Pe.appendChild(Ee);let re=document.createElement("nav");re.className="bp-rail",re.setAttribute("aria-label","Viewer rail"),re.setAttribute("data-testid","viewer-rail"),oe.append(se,ye,Pe,re),e.append(t,oe);let I=new Vn,ue=null,le=new Set,Q=0,me=null,k=[],x=[],H=[],B=[],K=[],ie=[],we=[],j="",ne=0,Ne=0,Ae=null,Me=null,q="",he=null,ae=20,Re={},je=new Map;function He(v,E){je.delete(v),je.set(v,E);while(je.size>ae){let A=je.keys().next().value;if(A!==void 0)je.delete(A);else break}}let be=new $n(se,{onSelectThread:(v)=>{if(v===j&&Ae!==null){se.classList.remove("bp-sidebar-open");return}Ge(v)},onNewThread:(v)=>{qt(v)},onSelectBot:(v)=>{Ge(v.thread)},onQuickOpenViewer:(v,E)=>{let A=x.find((F)=>F.project===v&&!F.archived&&!F.swarm);(async()=>{if(A)await Ge(A.id);else await qt(v);if(j)q=E,ze.setActive(E),he?.open(E,j)})()},onThreadAct:(v,E)=>{rt(v,E)},onSnoozeRow:(v)=>{I.rpc("sidebar.act",{action:"row-snooze",value:v}).then(()=>Ce()).catch(()=>{})},onToggleSection:(v)=>{if(le.has(v))le.delete(v);else le.add(v);Ce()},onToggleProjectFold:(v)=>{I.rpc("sidebar.act",{action:"project-fold",value:v}).then(()=>Ce()).catch(()=>{})},onCollapseSidebar:()=>{se.classList.remove("bp-sidebar-open"),se.classList.add("bp-sidebar-collapsed")},onNeedAct:async(v)=>{let E=sn(v,!1);if(!E)return;if(E.kind==="thread"){Ge(E.id);return}if(E.kind!=="call")return;let A=us(await I.rpc(E.method,E.params));if(A?.kind==="thread")Ge(A.id);Ce()},hasRoomView:!1,onAddProject:()=>qe.open({mode:"folder"})}),ge=new fn(ye,{onLoadOlder:()=>{Zn()},onGoToEntry:(v)=>{Ze(v)},onOpenAccounts:()=>{W()},onAnswerAsk:(v,E)=>{I.rpc("ask.answer",{ask:v,answer:E}).catch((A)=>{de.showError(A instanceof Error?A.message:"Could not send answer")})},onToggleReview:(v)=>{if(!j)return;let E=ne;I.rpc("thread.review",{thread:j,on:v}).then((A)=>{if(E===ne)ge.setReview(A.review??null)}).catch(()=>{})},onUnansweredAction:(v,E)=>{if(!j)return;if(v==="again"||v==="thread-again")I.rpc("thread.again",{thread:j,value:E}).catch(()=>{});else I.rpc("thread.act",{thread:j,action:v,value:E}).catch(()=>{})},onReplyEntry:(v)=>{if(!I.hasFeature("reply")){let E=(v.text||"").split(` +`)[0]?.slice(0,100)??"";if(E)de.prependDraft(`> ${E} +`);return}if(!v.text||!v.text.trim()||v.live||v.id.startsWith("local-"))return;At({id:v.id,text:v.text,role:v.kind==="user"?"user":"assistant"})},onLoadImage:async(v,E)=>{try{let A={entry:v,path:E};if(I.hasFeature("blobs"))A.metaOnly=!0;let S=await I.rpc("message.image",A);if(S.blob&&S.blob.startsWith("/blob/"))return{url:S.blob};if(S.mime&&S.data)return{mime:S.mime,data:S.data}}catch{}return null}});function et(v){if(!v)return null;if(v.planMode)return v.planMode;if(v.provider==="claude")return{phase:"off",interaction:"default",once:!1};return null}function st(v,E){if(!j)return;let A=ne,S=j;I.rpc(v,E).then((F)=>{if(A!==ne||j!==S)return;if(F.thread){let te=x.findIndex((ve)=>ve.id===F.thread.id);if(te>=0)x[te]=F.thread;else x.unshift(F.thread);be.setData(k,x,H,B),ge.updateThreadMeta(F.thread),Y(),de.setState(!0,F.thread.state==="working")}}).catch((F)=>{if(A===ne&&j===S)de.showError(F instanceof Error?F.message:"Could not change Plan mode")})}let Je,de=new wn(ye,{onSend:(v,E)=>{ei(v,E)},onRunCommand:(v)=>{ti(v)},onInterrupt:()=>{if(j)I.rpc("turn.interrupt",{thread:j}).catch(()=>{})},onQueryMentions:async(v,E)=>{try{return(await I.rpc("mentions.list",{q:v,kind:E,limit:10})).items??[]}catch{return[]}},onToggleVoice:()=>{Je.toggle()},onCyclePlanMode:()=>{let v=x.find((A)=>A.id===j)??null,E=et(v);if(!E||!j)return;if(E.interaction!=="plan")st("thread.planonce",{thread:j,on:!0});else if(E.once)st("thread.pick",{thread:j,action:"interaction",value:"plan"});else st("thread.pick",{thread:j,action:"interaction",value:"default"})},onSetPlanMode:(v)=>{if(!j)return;if(v==="once")st("thread.planonce",{thread:j,on:!0});else if(v==="always")st("thread.pick",{thread:j,action:"interaction",value:"plan"});else st("thread.pick",{thread:j,action:"interaction",value:"default"})},getFavoriteModels:()=>K,onLoadModelPicker:async()=>{if(!j)return null;return I.rpc("thread.picker",{thread:j})},onSelectModel:async(v,E)=>{if(!j)return;let A=ne,S=j;try{let F=await I.rpc("thread.model",{thread:S,provider:v,model:E});if(A!==ne||j!==S)return;if(F.thread){let te=x.findIndex((ve)=>ve.id===F.thread.id);if(te>=0)x[te]=F.thread;else x.unshift(F.thread);be.setData(k,x,H,B),ge.updateThreadMeta(F.thread),Y(),de.setState(!0,F.thread.state==="working")}}catch(F){if(A===ne&&j===S)de.showError(F instanceof Error?F.message:"Could not switch model")}},onSelectEffort:async(v)=>{if(!j)return;let E=ne,A=j;try{let S=await I.rpc("thread.pick",{thread:A,action:"effort",value:v});if(E!==ne||j!==A)return;if(S.thread){let F=x.findIndex((te)=>te.id===S.thread.id);if(F>=0)x[F]=S.thread;else x.unshift(S.thread);be.setData(k,x,H,B),ge.updateThreadMeta(S.thread),Y()}}catch(S){if(E===ne&&j===A)de.showError(S instanceof Error?S.message:"Could not set effort")}},onToggleFavorite:async(v,E,A)=>{let S=await I.rpc("models.favorite",{provider:v,model:E,on:A});if(Array.isArray(S.favorites))return K=S.favorites,K;return null}});Je=new Gn(I,{getThreadId:()=>j,getDraft:()=>de.getDraft(),getCaret:()=>de.getCaret(),setDraft:(v)=>de.setDraft(v),setRecording:(v)=>de.setVoiceRecording(v),setLevel:(v)=>de.setVoiceLevel(v),showError:(v)=>de.showError(v)});function St(){let v=q!=="",E=Xe.isOpen();Pe.classList.toggle("bp-hidden",!v&&!E),Pe.classList.toggle("bp-has-viewer",v),Pe.classList.toggle("bp-has-mgmt",E)}let Xe=new Ln(Ee,Pe,{hub:I,getThreadId:()=>j,getThreadGen:()=>ne,onSendText:(v)=>{ei(v)},onOpenChange:()=>St()});function Ye(v){let E=window.prompt("Rename thread",v.title||"");if(!E||!E.trim())return;I.rpc("thread.act",{thread:v.id,action:"rename",title:E.trim()}).then((A)=>{if(A.thread)x=x.map((S)=>S.id===A.thread.id?A.thread:S),Y(),Ce()}).catch((A)=>{de.showError(A instanceof Error?A.message:"Could not rename thread")})}function lt(v){switch(v.type){case"thread":Ge(v.id);break;case"rail":if(!j&&v.id!=="terminal")break;if(q===v.id)J();else fe(v.id);break;case"thread-act":if(j)rt(j,v.action);break;case"new-thread":qt(v.projectId);break;case"rename":{let E=x.find((A)=>A.id===j);if(E)Ye(E);break}case"prev-thread":case"next-thread":{let E=x.filter((te)=>!te.archived&&!te.swarm);if(E.length<2)break;let A=E.findIndex((te)=>te.id===j),S=v.type==="next-thread"?1:-1,F=E[(A<0?0:A+S+E.length)%E.length];if(F)Ge(F.id);break}case"command":if(v.runDirectly)ti(v.word);else de.setDraft(`${v.word} `),de.focus();break;case"improvements":z();break;case"settings":Oe.open();break;case"sidebar":se.classList.toggle("bp-sidebar-open"),se.classList.toggle("bp-sidebar-collapsed");break}}let _e=new Nn(e,{getState:()=>({selectedThreadId:j,threads:x,projects:k,bots:H,railItems:ie,commands:we}),onSearch:async(v)=>{if(!I.hasFeature("search"))return{threads:[],projects:[],messages:[]};return I.rpc("search",{q:v,limit:20})},onExecute:lt}),qe=new hn(e,{hub:I,onProjectAdded:(v)=>{if(Ce(),v.id)qt(v.id)},onCloneDone:(v)=>{if(Ce(),v.thread)Ge(v.thread)}}),ze=new Tn(re,(v)=>{if(v==="commands"){_e.open();return}if(!j)return;if(q===v)J();else fe(v)}),ct=null,_t=null,Oe=new jn(e,{onLoadDevices:async()=>(await I.rpc("devices.page",{})).rows??[],onDevicesAct:async(v,E)=>{await I.rpc("devices.page.act",{action:v,value:E})},onGetHome:()=>ct,onMoveHomeHere:async()=>{await I.rpc("home.move",{to:"back"})},onGetNoProvider:()=>_t,onGetThemePref:()=>ln,onSetThemePref:(v)=>{ln=v;try{if(v==="auto")localStorage.removeItem("bp.theme.pref");else localStorage.setItem("bp.theme.pref",v)}catch{}Qs()},onGetHubTheme:()=>Wt,onGetLocalePref:()=>Pt,onSetLocalePref:(v)=>{Pt=v;try{if(v==="auto")localStorage.removeItem("bp.locale");else localStorage.setItem("bp.locale",v)}catch{}Ys()},onLogout:()=>xi(()=>{I.disconnect(),window.location.replace("/")})});function G(v){if(_t=v,ge.setNoProvider(v),Oe.isOpen())Oe.refresh()}function W(){Oe.openToAccounts()}function U(v,E){let A=v instanceof Error?v.message:E,S=v instanceof Ot?v:null,F=S?.code,te=S?.machine,ve=F==="no_provider_remote"&&te?h("provider.notice.senderr.remote","No AI provider connected on {machine}. Open Settings → Accounts on {machine} to connect Claude, Codex, Antigravity, or another provider.").replaceAll("{machine}",te):A;de.showError(ve,ls(A,F)?{label:h("provider.notice.button","Open Settings → Accounts"),onClick:W}:void 0)}g.addEventListener("click",()=>{let v=x.find((E)=>E.id===j);if(v)rt(v.id,v.pinned?"unpin":"pin")}),w.addEventListener("click",()=>{let v=x.find((E)=>E.id===j);if(v)rt(v.id,v.settled?"unsettle":"settle")});let V=new Hn(e,(v,E)=>E?I.rpc("thread.context.mcp",{thread:v,...E}):I.rpc("thread.context",{thread:v}));M.addEventListener("click",(v)=>{v.stopPropagation();let E=x.find((F)=>F.id===j);if(!E)return;if(!P.classList.contains("bp-hidden")){P.classList.add("bp-hidden");return}let A=[{label:"Rename…",run:()=>Ye(E)},{label:E.pinned?h("menu.unpin","Unpin"):h("menu.pin","Pin"),run:()=>{rt(E.id,E.pinned?"unpin":"pin")}},{label:E.settled?h("phone.unsettle","Unsettle"):h("menu.settle","Settle"),run:()=>{rt(E.id,E.settled?"unsettle":"settle")}},{label:E.archived?"Unarchive":"Archive",run:()=>{rt(E.id,E.archived?"unarchive":"archive")}},{label:"Delete",danger:!0,run:()=>{if(window.confirm("Delete this thread?"))rt(E.id,"delete")}}];if(I.hasFeature("threadContext"))A.unshift({label:h("thread.context.title","Context & Prompt"),run:()=>V.open(E.id)});let S=document.createDocumentFragment();for(let F of A){let te=document.createElement("button");te.type="button",te.className="bp-popover-item"+(F.danger?" danger":""),te.textContent=F.label,te.addEventListener("click",()=>{P.classList.add("bp-hidden"),F.run()}),S.appendChild(te)}P.replaceChildren(S),P.classList.remove("bp-hidden")}),document.addEventListener("click",()=>P.classList.add("bp-hidden"));async function z(){let v=document.createElement("div");v.className="bp-modal-backdrop",v.setAttribute("data-testid","improvements-modal");let E=document.createElement("div");E.className="bp-modal";let A=document.createElement("div");A.className="bp-modal-head";let S=document.createElement("h2");S.textContent=h("gpui.improvements","Improvements");let F=document.createElement("button");F.type="button",F.className="icon",F.textContent="×",F.addEventListener("click",()=>v.remove()),A.append(S,F);let te=document.createElement("div");te.className="bp-modal-body",te.textContent="Loading…",E.append(A,te),v.appendChild(E),v.addEventListener("click",(ve)=>{if(ve.target===v)v.remove()}),e.appendChild(v);try{let ve=await I.rpc("improvements.projects",{}),Fe=ve.projects??[];if(Fe.length===0){te.textContent="No projects available for Improvements.";return}let at=document.createDocumentFragment();for(let Le of Fe){let ce=document.createElement("div");ce.className="bp-set-row";let tt=document.createElement("div");tt.className="bp-set-info",tt.textContent=Le.title||Le.name||Le.id;let ot=document.createElement("button");ot.type="button",ot.className=Le.id===ve.project?"primary":"",ot.textContent=Le.id===ve.project?"Active":"Select",ot.addEventListener("click",()=>{I.rpc("improvements.project",{project:Le.id}).then(()=>v.remove()).catch(()=>{})}),ce.append(tt,ot),at.appendChild(ce)}te.replaceChildren(at)}catch(ve){te.textContent=ve instanceof Error?ve.message:"Could not load Improvements."}}R.addEventListener("click",()=>{z()}),O.addEventListener("click",()=>_e.open()),N.addEventListener("click",()=>_e.open()),Z.addEventListener("click",()=>{Oe.open()}),n.addEventListener("click",()=>{se.classList.toggle("bp-sidebar-open"),se.classList.toggle("bp-sidebar-collapsed")});function Y(){let v=x.find((S)=>S.id===j)??null,E=v?k.find((S)=>S.id===v.project):void 0;o.textContent=E?.title??"",a.classList.toggle("bp-hidden",!E),c.classList.toggle("bp-hidden",!v),p.textContent=v?v.title||"Untitled thread":"";let A=et(v);if(de.setPlanMode(A),!A||A.phase==="off")l.classList.add("bp-hidden"),l.classList.remove("is-exec"),l.textContent="";else l.classList.remove("bp-hidden"),l.classList.toggle("is-exec",A.phase==="executing"),l.title=h("gpui.planmode.tip","Plan before acting (1 turn, always, or off)"),l.textContent=A.phase==="armed"&&A.once?h("gpui.planmode.top.once","Plan (1 turn)"):A.phase==="armed"?h("gpui.mgmt.plan.tab","Plan"):A.phase==="planning"?h("gpui.planmode.top.planning","Planning"):A.phase==="pending"?h("gpui.planmode.top.pending","Review plan"):h("gpui.planmode.top.executing","Building plan");if(u.classList.toggle("bp-hidden",!v),b.classList.toggle("bp-hidden",!v),v){m.className=`bp-dot ${pa(v)}`,f.textContent=v.status||v.state||"idle",y.textContent=v.pinned?h("menu.unpin","Unpin"):h("menu.pin","Pin"),C.textContent=v.settled?h("phone.unsettle","Unsettle"):h("menu.settle","Settle");let S=v;de.setModelChip(v.chip||v.model||"default",v.provider,S.ctxPct??S.contextPct),de.setMemory(v.memory)}else de.setModelChip("default"),de.setMemory(null)}function J(v=!0){if(Ne++,q="",ze.setActive(""),ee.classList.add("bp-hidden"),he?.close(),St(),v&&j&&I.getState()==="connected")I.rpc("viewer.watch",{thread:j,kind:""}).catch(()=>{})}function fe(v){if(Ne++,q=v,ze.setActive(v),ee.classList.remove("bp-hidden"),St(),!he&&typeof Xn==="function")he=Xn(ee,{hub:I,getThreadId:()=>j,closeViewer:()=>J(!0)});if(he)he.open(v,j);else{let E=document.createElement("div");E.className="bp-viewer-placeholder";let A=document.createElement("div");A.className="bp-viewer-bar";let S=document.createElement("span");S.textContent=v.toUpperCase();let F=document.createElement("button");F.type="button",F.className="icon",F.textContent="×",F.addEventListener("click",()=>J(!0)),A.append(S,F);let te=document.createElement("div");te.className="bp-dim bp-viewer-msg",te.textContent=`Viewer pane (${v}).`,E.append(A,te),ee.replaceChildren(E)}}async function ke(v,E){if(!v||!I.hasFeature("rail")){if(E===ne)ie=[],ze.setItems([]);return}let A=++Ne;try{let S=await I.rpc("viewer.rail",{thread:v,page:q});if(E!==ne||A!==Ne)return;let F=Array.isArray(S.rail)?S.rail:Array.isArray(S.items)?S.items:[];if(ie=F,ze.setItems(F),S.has){if(he?.reconcileHas?.(S.has),q&&!Js(S.has,q))J(!0)}}catch{if(E===ne&&A===Ne)ie=[],ze.setItems([])}}function Te(v){for(let E of v)if(E.kind==="threads"){for(let A of E.rows)if(!A.off&&(A.nav||A.id)&&!(A.nav||"").startsWith("@room:"))return A.nav||A.id}else if(E.kind==="projects"){for(let A of E.rows)for(let S of A.threads??[])if(!S.off&&(S.nav||S.id)&&!(S.nav||"").startsWith("@room:"))return S.nav||S.id}return""}function De(v,E){for(let A of v)if(A.kind==="threads"){if(A.rows.some((S)=>(S.nav||S.id)===E))return!0}else if(A.kind==="projects"){for(let S of A.rows)if((S.threads??[]).some((F)=>(F.nav||F.id)===E))return!0}return!1}function Be(v){let E=[];for(let A of v){if(A.kind!=="projects")continue;for(let S of A.rows)E.push({id:S.id,title:S.title,css:S.css,color:S.color})}if(E.length>0)k=E}async function Ce(){if(!I.hasFeature("sections"))return!1;let v=++Q;try{let E=await I.rpc("sidebar.sections",{open:Array.from(le)});if(v!==Q)return!0;let A=Array.isArray(E.sections)?E.sections:[];return ue=A,Be(A),be.setData(k,x,H,B),be.setSections(A,H,B),Y(),!0}catch{return!1}}function Ve(){if(!I.hasFeature("sections"))return;if(me!==null)window.clearTimeout(me);me=window.setTimeout(()=>{me=null,Ce()},150)}async function Ue(){if(Ae=null,I.hasFeature("bots"))try{let E=await I.rpc("bots.list",{});H=E.bots??[],B=E.rooms??[]}catch{}if(I.hasFeature("shell")){let E=await I.rpc("shell.sync",{have:Re,settled:25}),A=new Set(E.removed??[]),S=new Set((E.projects??[]).map((F)=>F.id));if(A.size>0||S.size>0)k=[...k.filter((F)=>!A.has(F.id)&&!S.has(F.id)),...E.projects??[]],x=[...x.filter((F)=>!A.has(F.project)&&!S.has(F.project)),...E.threads??[]];else if(Array.isArray(E.threads)&&E.threads.length>0){let F=new Map(x.map((te)=>[te.id,te]));for(let te of E.threads)F.set(te.id,te);x=Array.from(F.values())}if(E.sections!==void 0){let F=Array.isArray(E.sections)?E.sections:Array.isArray(E.sections?.sections)?E.sections.sections:null;if(F)ue=F,Be(F)}if(E.h)Re=E.h;be.setData(k,x,H,B),be.setSections(ue,H,B)}else if(I.hasFeature("sections")){let[E,A]=await Promise.all([I.rpc("sidebar.sections",{open:Array.from(le)}).catch(()=>null),I.rpc("threads.list",{limit:200,archived:!1}).catch(()=>({threads:[]}))]);if(x=A.threads??[],E&&Array.isArray(E.sections)){let S=E.sections;if(!S.some((te)=>te.kind==="projects"&&te.rows.length>0)){let te=S.find((ve)=>ve.kind==="projects"&&ve.fold&&ve.toggle&&(ve.count??0)>0);if(te?.toggle&&!le.has(te.toggle)){le.add(te.toggle);let ve=await I.rpc("sidebar.sections",{open:Array.from(le)}).catch(()=>null);if(ve&&Array.isArray(ve.sections))S=ve.sections}}ue=S,Be(S),be.setData(k,x,H,B),be.setSections(S,H,B)}else ue=null,k=(await I.rpc("projects.list",{limit:100})).projects??[],be.setSections(null,H,B),be.setData(k,x,H,B);await I.rpc("subscribe",{topic:"lists"}).catch(()=>{})}else{ue=null;let[E,A]=await Promise.all([I.rpc("projects.list",{limit:100}),I.rpc("threads.list",{limit:200,archived:!1})]);k=E.projects??[],x=A.threads??[],be.setSections(null,H,B),be.setData(k,x,H,B),await I.rpc("subscribe",{topic:"lists"}).catch(()=>{})}let v=j;if(!v){let E="";try{E=localStorage.getItem("bp.lastThread")||""}catch{}if(E&&(ue&&De(ue,E)||x.some((A)=>A.id===E)))v=E;else if(ue)v=Te(ue);if(!v)v=(x.find((S)=>!S.archived&&!S.swarm&&!S.settled)??x.find((S)=>!S.archived&&!S.swarm))?.id??""}if(v&&(ue&&De(ue,v)||x.some((E)=>E.id===v)))await Ge(v);else j="",ie=[],ze.setItems([]),de.setState(!1,!1),Y()}async function Ge(v){if(j&&j!==v){Je.cancel();let Le=ge.getEntries();if(Le.length>0){let ce=je.get(j);He(j,{entries:Le,ids:ce?.ids??Le.map((tt)=>tt.id),olderCursor:Me,review:ce?.review??null,unanswered:ce?.unanswered??null,rail:ce?.rail??ie,hashes:ce?.hashes??{}})}}let E=++ne;Ne++,At(null);let A=Ae;if(Ae=null,A!==null)I.rpc("unsubscribe",{sub:A}).catch(()=>{});j=v,de.closeModelPicker();let S=je.get(v);Me=S?.olderCursor??null;try{localStorage.setItem("bp.lastThread",v)}catch{}be.setSelected(v),se.classList.remove("bp-sidebar-open"),Y();let F=x.find((Le)=>Le.id===v)??null;if(S)ge.setThread(F,S.entries,Boolean(S.olderCursor),S.review,S.unanswered),ie=S.rail,ze.setItems(S.rail);else ge.setLoading(F),ie=[],ze.setItems([]);if(de.setState(!0,F?.state==="working"),I.hasFeature("open")){let Le={};if(S){for(let[Ie,Nt]of Object.entries(S.hashes))Le[Ie]=Nt;for(let Ie of S.entries)if(Ie.h)Le[Ie.id]=Ie.h}let ce;try{ce=await I.rpc("thread.open",{thread:v,limit:40,have:Le})}catch(Ie){if(E===ne){let Nt=Ie instanceof Error&&Ie.message?Ie.message:"Could not load messages.";ge.setError(F,Nt,()=>{Ge(v)})}return}if(E!==ne){if(ce.sub!==void 0&&ce.sub!==null)I.rpc("unsubscribe",{sub:ce.sub}).catch(()=>{});return}if(Ae=ce.sub??null,ce.thread){F=ce.thread;let Ie=x.findIndex((Nt)=>Nt.id===ce.thread.id);if(Ie>=0)x[Ie]=ce.thread;else x.unshift(ce.thread);Y(),de.setState(!0,F.state==="working")}if("next"in ce)Me=ce.next??null;let tt=new Map;if(S)for(let Ie of S.entries)tt.set(Ie.id,Ie);for(let Ie of ce.entries??[])tt.set(Ie.id,Ie);let ot=ce.ids??S?.ids??(ce.entries??[]).map((Ie)=>Ie.id),ii=ot.map((Ie)=>tt.get(Ie)).filter((Ie)=>Boolean(Ie)),Lt=S?.rail??[];if(ce.rail!==void 0){if(Array.isArray(ce.rail))Lt=ce.rail;else if(Lt=Array.isArray(ce.rail?.rail)?ce.rail.rail:Array.isArray(ce.rail?.items)?ce.rail.items:[],ce.rail?.has){if(he?.reconcileHas?.(ce.rail.has),q&&!Js(ce.rail.has,q))J(!0)}}ie=Lt,ze.setItems(Lt);let cn=S?.review??null;if(I.hasFeature("reviewmode"))try{let Ie=await I.rpc("thread.review",{thread:v});if(E!==ne)return;cn=Ie.review??null}catch{}if(E!==ne)return;let si="unanswered"in ce?ce.unanswered??null:S?.unanswered??null,er=ce.h??S?.hashes??{};if(He(v,{entries:ii,ids:ot,olderCursor:Me,review:cn,unanswered:si,rail:Lt,hashes:er}),ge.setThread(F,ii,Boolean(Me),cn,si),zt(v,E),q)fe(q);return}let te;try{te=await I.rpc("thread.entries",{thread:v,limit:40})}catch(Le){if(E===ne){let ce=Le instanceof Error&&Le.message?Le.message:"Could not load messages.";ge.setError(F,ce,()=>{Ge(v)})}return}if(E!==ne)return;if(te.thread){let Le=x.findIndex((ce)=>ce.id===te.thread.id);if(Le>=0)x[Le]=te.thread;else x.unshift(te.thread);Y()}Me=te.next??null;let ve=null;if(I.hasFeature("reviewmode"))try{let Le=await I.rpc("thread.review",{thread:v});if(E!==ne)return;ve=Le.review??null}catch{}if(E!==ne)return;let Fe=te.entries??[],at=te.unanswered??null;He(v,{entries:Fe,ids:Fe.map((Le)=>Le.id),olderCursor:Me,review:ve,unanswered:at,rail:S?.rail??[],hashes:S?.hashes??{}}),ge.setThread(F,Fe,Boolean(Me),ve,at);try{let ce=(await I.rpc("subscribe",{topic:"thread",thread:v})).sub??null;if(ce!==null){if(E!==ne){I.rpc("unsubscribe",{sub:ce}).catch(()=>{});return}Ae=ce}}catch{}if(E!==ne)return;if(ke(v,E),zt(v,E),q)fe(q)}async function zt(v,E){if(!v||!I.hasFeature("mgmt")){if(E===ne)Xe.clear();return}let A=x.find((F)=>F.id===v),S=A?.project?k.find((F)=>F.id===A.project)?.root??"":"";if(!S&&I.hasFeature("viewers"))try{let F=await I.rpc("viewer.files",{thread:v});if(E!==ne)return;S=F.pcb||F.sch||F.root||""}catch{}if(E!==ne)return;if(S)await Xe.watchProject(S);else Xe.clear()}async function Ze(v){let E=ne;for(let A=0;A<25&&E===ne;A++){if(ge.goTo(v))return;if(!Me)return;let S=Me;if(await Zn(),Me===S)return}}async function Zn(){if(!j||!Me){ge.clearLoadingOlder();return}let v=ne,E=j,A=Me;try{let S=await I.rpc("thread.entries",{thread:E,limit:40,before:A});if(v!==ne||j!==E)return;Me=S.next??null,ge.prependEntries(S.entries??[],Boolean(Me))}catch{if(v===ne)ge.clearLoadingOlder()}}async function qt(v){try{let E=await I.rpc("thread.create",{project:v});if(E.thread)x=[E.thread,...x.filter((A)=>A.id!==E.thread.id)],be.setData(k,x,H,B),Ce(),await Ge(E.thread.id),de.focus()}catch(E){U(E,"Could not create thread")}}let bt=null;function Qn(v){return(v.split(` +`).map((E)=>E.trim()).find((E)=>E.length>0)??"").slice(0,200)}function At(v){bt=v,de.setReply(v?{who:v.role==="user"?h("secret.you","You"):h("model.col.agent","Agent"),line:Qn(v.text)}:null,()=>{if(bt)Ze(bt.id)},()=>At(null))}async function ei(v,E=[]){if(!j)return;let A=ne,S=j,F=ua(),te=`local-${F}`,ve=bt&&v.trim()&&I.hasFeature("reply")?bt:null;if(ve)At(null);ge.upsertEntry({id:te,kind:"user",text:v,at:Date.now(),clientId:F,...ve?{replyTo:{id:ve.id,quote:Qn(ve.text)}}:{},attachments:E.map((Fe)=>({name:Fe.name,mime:Fe.mime,previewUrl:`data:${Fe.mime};base64,${Fe.data}`}))});try{let Fe={thread:S,text:v,clientId:F};if(E.length>0)Fe.attachments=E;if(ve)Fe.replyTo={id:ve.id,text:ve.text};let at=await I.rpc("message.send",Fe);if(A!==ne||j!==S)return;if(at.entry)ge.upsertEntry(at.entry)}catch(Fe){if(A===ne&&j===S){if(ge.removeEntry(te),de.setDraft(v),ve&&!bt)At(ve);U(Fe,"Failed to send message")}}}async function ti(v){if(!j)return;let E=ne,A=j;try{let S=await I.rpc("composer.run",{thread:A,text:v});if(E!==ne||j!==A)return;if(S.error)de.setDraft(v),U(new Ot(S.error,{code:S.errorCode,machine:S.machine}),S.error);else if(S.kind==="btw"&&typeof S.a==="string")ge.showBtw(S.q??"",S.a);else if(S.kind==="edit"&&typeof S.text==="string")de.setDraft(S.text);else if(S.kind==="project")qe.open({mode:"folder"});else if(S.kind==="clone")qe.open({mode:"clone",repo:S.repo??"",text:S.text??""})}catch(S){if(E===ne&&j===A)de.setDraft(v),U(S,"Command refused")}}async function rt(v,E){try{let A=await I.rpc("thread.act",{thread:v,action:E});if(A.thread){if(x=x.map((S)=>S.id===A.thread.id?A.thread:S),be.setData(k,x,H,B),A.thread.id===j)ge.updateThreadMeta(A.thread),Y()}Ce()}catch(A){de.showError(A instanceof Error?A.message:`Action "${E}" not allowed`)}}function ni(v,E){if(!v||!v.text||E-v.at>=300000)return"";let A=v.build.split("-").pop()??"";if(v.reason==="build"&&A)return h("hub.restarting.build",v.text,{build:A});if(v.reason==="stop")return h("hub.stopped",v.text);return h("hub.restarting",v.text)}function Kt(v){if(v==="connected")be.setConnStatus(h("gpui.acct.connected","Connected"),"bp-ok");else if(v==="reconnecting"&&ni(I.restarting,Date.now()))be.setConnStatus(ni(I.restarting,Date.now()),"");else if(v==="reconnecting")be.setConnStatus("Reconnecting…","bp-warn");else if(v==="revoked")be.setConnStatus(h("gpui.acct.sign.in.expired","Sign-in expired"),"bp-bad");else be.setConnStatus("Connecting…","")}Jt(()=>{Kt(I.getState()),D.textContent=h("gpui.improvements","Improvements"),Z.title=h("palette.settings","Settings"),Z.setAttribute("aria-label",h("palette.settings","Settings")),Y(),be.refreshLocale(),ge.refreshLocale(),de.refreshLocale(),ze.render(),Oe.refreshLocale(),qe.refreshLocale()}),I.onState((v,E)=>{if(v==="connected"&&E){if(E.locale)Yn=E.locale,Ys();if(E.theme)Xs(E.theme);if(E.name)be.setHostName(E.name);if(Array.isArray(E.favoriteModels))K=E.favoriteModels,de.updateFavoriteModels(K);if(ct=E.home??null,be.setHome(ct),G(Mn(E.noProvider)),Oe.isOpen())Oe.refresh();Kt(v);let A=typeof E.hubBack==="string"?String(E.hubBack):"";if(A)try{let S=JSON.parse(A);if(S.reason==="crash")be.setConnStatus(h("hub.back.crash",S.text??""),"bp-warn"),window.setTimeout(()=>Kt(I.getState()),6000)}catch{}if(de.setFeatures(I.hasFeature("images"),I.hasFeature("voice")),Array.isArray(E.commands))we=E.commands,de.setCommands(we);else we=[];Ue(),qe.reconcile()}else Je.cancel(),Kt(v)}),I.onFrame((v)=>{if(v.t==="voice"){Je.handleFrame(v);return}if(v.t==="info"&&v.info&&typeof v.info==="object"){let A=v.info;if(Object.prototype.hasOwnProperty.call(A,"provider.notice"))G(Mn(A["provider.notice"]));Xe.handleInfo(A);return}if(v.t!=="d")return;let E=v;if(E.k==="clone"||E.k==="clone.repos"||E.k==="clone.signin"){qe.handleFrame(E);return}switch(E.k){case"project":{let A=E.project;if(!A)break;let S=k.findIndex((F)=>F.id===A.id);if(S>=0)k[S]=A;else k.unshift(A);be.setData(k,x,H,B),Y(),Ve();break}case"thread":{let A=E.thread;if(!A)break;let S=x.findIndex((F)=>F.id===A.id);if(S>=0)x[S]=A;else x.unshift(A);if(be.setData(k,x,H,B),A.id===j)ge.updateThreadMeta(A),Y(),de.setState(!0,A.state==="working");Ve();break}case"thread.removed":{let A=String(E.id??"");x=x.filter((S)=>S.id!==A),be.setData(k,x,H,B),Ve();break}case"entry":{if(E.thread===j&&E.entry)ge.upsertEntry(E.entry);break}case"text":{if(E.thread===j)ge.appendLiveText(String(E.entry??""),String(E.append??""),Number(E.at??Date.now()));break}case"turn":{if(E.thread===j){let A=String(E.state??"idle");de.setState(!0,A==="working"),ke(j,ne)}Ve();break}case"btw":{if(E.thread===j)ge.showBtw(String(E.q??""),String(E.a??""));break}case"unanswered":{if(E.thread===j)ge.setUnanswered(E.unanswered??null);break}case"theme":{if(typeof E.theme==="string")Xs(E.theme);break}case"home":{if(ct=E.home??null,be.setHome(ct),Oe.isOpen())Oe.refresh();break}case"favorites":{if(Array.isArray(E.favorites))K=E.favorites.filter((A)=>typeof A==="string"),de.updateFavoriteModels(K);break}default:break}}),window.addEventListener("keydown",(v)=>{let E=v.key.toLowerCase();if((v.ctrlKey||v.metaKey)&&(E==="k"||v.shiftKey&&E==="p"))if(v.preventDefault(),_e.isOpen())_e.close();else _e.open();else if(v.key==="Escape"){if(_e.isOpen())_e.close();else if(de.isModelPickerOpen())de.closeModelPicker();else if(qe.isOpen())qe.escape();else if(Oe.isOpen())Oe.handleEscape();else if(ge.closePlanRevise());else if(Xe.isOpen())Xe.closePanel()}}),I.connect()}if(document.readyState==="loading")document.addEventListener("DOMContentLoaded",Zs);else Zs(); diff --git a/web/dist/assets/pair.js b/web/dist/assets/pair.js index 1ea9cde973..43bba01ce6 100644 --- a/web/dist/assets/pair.js +++ b/web/dist/assets/pair.js @@ -1 +1 @@ -var U={en:{"agy.signout":"Sign out","android.hub.machines.approve":"Approve","android.load.earlier":"load earlier","approval.dismiss":"Dismiss","approval.implement":"Implement","ask.plan":"Proposed plan","bots.new":"New bot","bots.rooms":"Rooms","bots.tab.browser":"Browser","common.cancel":"Cancel","common.close":"Close","common.copy":"Copy","common.delete":"Delete","common.refresh":"Refresh","common.remove":"Remove","common.save":"Save","composer.placeholder":"Ask anything: @bot, >thread, %project, #room, $skill, /btw","composer.send":"Send","composer.stop":"Stop","gpui.acct.connected":"Connected","gpui.acct.not.connected":"Not connected","gpui.acct.sign.in.expired":"Sign-in expired","gpui.ask.plan.ready":"Ready for review","gpui.ask.plan.revise":"Revise","gpui.ask.plan.reviseph":"What should change in the plan?","gpui.ask.plan.sendrev":"Send revision","gpui.b.in.reply.to":"↩ In reply to: {quote}","gpui.b.replying.to":"↩ Replying to: {line}","gpui.bots.recall.off":"Off","gpui.bots.recall.on":"On","gpui.c.solid.big.next":"Loading it may take a while and a lot of memory.","gpui.c.solid.load.big":"Load it anyway","gpui.c.solid.loading.big":"Loading it anyway…","gpui.c.term.collapse":"Collapse","gpui.c.term.expand":"Expand","gpui.commands":"Commands","gpui.e.open.folder":"Open folder","gpui.filter.projects.and.threads":"Filter projects and threads","gpui.fold.or.unfold.the.sidebar":"Fold or unfold the sidebar","gpui.follow.paused":"Following paused","gpui.follow.wait":"Following: waiting for the agent's next edit","gpui.gerbers":"Gerbers","gpui.improvements":"Improvements","gpui.jump.to.a.thread.run":"Jump to a thread, run a command or find what was said","gpui.mgmt.bom.dnp":"DNP","gpui.mgmt.bom.nompn":"no MPN","gpui.mgmt.checks.all":"All","gpui.mgmt.checks.fix":"Fix with agent","gpui.mgmt.checks.run":"Run","gpui.mgmt.close":"Close the panel","gpui.mgmt.fab.apply":"Apply","gpui.mgmt.fab.changed":"Changed since you last looked","gpui.mgmt.fab.derived":"* worked out from the fab's page (a mil in mm, a ring from a diameter). Dimmed: the rigid board's value, where this board's page says nothing else. A date opens the page it was read from.","gpui.mgmt.fab.extra":"Costs more","gpui.mgmt.fab.findings":"Findings","gpui.mgmt.fab.free":"Base price","gpui.mgmt.fab.judge":"Datasheets","gpui.mgmt.fab.limit":"Limit","gpui.mgmt.fab.readcol":"Read","gpui.mgmt.fab.refresh":"Refresh","gpui.mgmt.fab.reviewbtn":"Review","gpui.mgmt.fab.seen":"Seen","gpui.mgmt.fab.thefab":"The fab","gpui.mgmt.fab.use":"Use","gpui.mgmt.life.nopart":"No reading of this part yet.","gpui.mgmt.life.reading":"Reading its history…","gpui.mgmt.plan.addnote":"Add note","gpui.mgmt.plan.all":"Approve all","gpui.mgmt.plan.before":"Plan before routing","gpui.mgmt.plan.compact":"Compact","gpui.mgmt.plan.done":"done","gpui.mgmt.plan.drawn":"The plan's corridors and planes are drawn on the board while this panel is open. Close it to hide them.","gpui.mgmt.plan.edited":"Edited","gpui.mgmt.plan.elsewhere":"A routing plan for {board} awaits your approval","gpui.mgmt.plan.emptysub":"Layers, corridors, and planes appear here once a plan is proposed.","gpui.mgmt.plan.expand":"Expand","gpui.mgmt.plan.fit":"Fit","gpui.mgmt.plan.grid.all":"All layers","gpui.mgmt.plan.grid.pair":"Side by side","gpui.mgmt.plan.grid.single":"Single","gpui.mgmt.plan.hide":"Hide done","gpui.mgmt.plan.hint":"Drag waypoints to steer · Click + on edge to insert · Right-click vertex to remove","gpui.mgmt.plan.keysnote":"On this KiCad version, approve from this panel: in plan view KiCad's A, R and W keys aren't the plan's yet (A opens Add Footprint). Update KiCad.","gpui.mgmt.plan.layer":"Approve layer","gpui.mgmt.plan.layer.short":"Layer","gpui.mgmt.plan.lock":"Lock","gpui.mgmt.plan.locked":"Locked","gpui.mgmt.plan.noboard":"No routing plan for this board.","gpui.mgmt.plan.noitems":"No corridors or planes on this layer","gpui.mgmt.plan.note.placeholder":"Steering note for router…","gpui.mgmt.plan.nothing":"Nothing awaits your approval","gpui.mgmt.plan.offwords":"Agents route as you ask. Turn it on to have them propose a routing plan first and route only what you approve here.","gpui.mgmt.plan.onwords":"Before routing a board with 4 or more copper layers or more than 60 nets, the agent proposes corridors and plane regions here. It routes only what you approve.","gpui.mgmt.plan.reading":"Reading the routing plan…","gpui.mgmt.plan.reference":"over {layer}","gpui.mgmt.plan.refused":"KiCad refused","gpui.mgmt.plan.reject":"Reject","gpui.mgmt.plan.rejectlayer":"Reject layer","gpui.mgmt.plan.reqplain":"Approval requested","gpui.mgmt.plan.requested":"Approval requested: {what}","gpui.mgmt.plan.saved":"saved plan","gpui.mgmt.plan.show":"Show done","gpui.mgmt.plan.st.approved":"Approved","gpui.mgmt.plan.st.awaiting":"Awaiting review","gpui.mgmt.plan.st.blocked":"Blocked","gpui.mgmt.plan.st.empty":"Empty","gpui.mgmt.plan.st.partial":"Partial","gpui.mgmt.plan.st.rejected":"Rejected","gpui.mgmt.plan.st.routed":"Routed","gpui.mgmt.plan.st.routing":"Routing","gpui.mgmt.plan.st.verified":"Verified","gpui.mgmt.plan.stackup.short":"Stackup","gpui.mgmt.plan.stop":"Stop routing","gpui.mgmt.plan.sync":"Link zoom","gpui.mgmt.plan.tab":"Plan","gpui.mgmt.plan.unlock":"Unlock","gpui.mgmt.plan.verify":"Verify","gpui.mgmt.plan.view.canvas":"Canvas","gpui.mgmt.plan.view.list":"List","gpui.mgmt.plan.view.split":"Split","gpui.mgmt.plan.width":"Width","gpui.next.thread":"Next thread","gpui.nothing.matches":"Nothing matches","gpui.planmode.bar.always":"Plan mode — explores and proposes a plan before editing","gpui.planmode.bar.executing":"Building the approved plan","gpui.planmode.bar.once":"Plan mode (1 turn) — explores and proposes a plan before editing","gpui.planmode.bar.pending":"Proposed plan awaits review below","gpui.planmode.bar.planning":"Planning — drafting a plan before edits","gpui.planmode.chip.building":"Building","gpui.planmode.chip.once":"Plan · 1t","gpui.planmode.scope.always":"Always","gpui.planmode.scope.once":"1 turn","gpui.planmode.tip":"Plan before acting (1 turn, always, or off)","gpui.planmode.top.executing":"Building plan","gpui.planmode.top.once":"Plan (1 turn)","gpui.planmode.top.pending":"Review plan","gpui.planmode.top.planning":"Planning","gpui.previous.thread":"Previous thread","gpui.rail.no.board":"No board in this project","gpui.rail.no.mech":"No mechanical parts in this project","gpui.rail.no.schematic":"No schematic in this project","gpui.rail.split.needs.both":"Split needs a board and a schematic","gpui.settings.group.agents":"Agents and tools","gpui.settings.group.general":"General","home.away":"Home ({name}) is away","home.away.queued":"Home ({name}) is away · {n} queued","home.away.since":"Home ({name}) is away since {time}","home.away.since.queued":"Home ({name}) is away since {time} · {n} queued","home.machine":"Home machine","home.move.failed":"Home move failed","home.move.failed.note":"Home move failed: {note}","home.move.here":"Make this machine the home","home.moving":"Moving home to {to}…","home.moving.step":"Moving home to {to}: {step}","hub.back.crash":"Backplane is back after it stopped unexpectedly","hub.restarting":"Restarting Backplane…","hub.restarting.build":"Restarting Backplane… (new build {build})","hub.stopped":"Backplane stopped","ios.hub.address.field":"Hub address","menu.pin":"Pin","menu.settle":"Settle","menu.unpin":"Unpin","menu.wake":"Wake","model.col.agent":"Agent","native.pair.connect":"Connect","native.thread.model":"Model","notify.settled":"Settled","palette.archive":"Archive thread","palette.command.placeholder":"Type a command or a thread","palette.diff":"Diff: what this thread changed","palette.newthread":"New thread","palette.settings":"Settings","palette.terminal":"Terminal","palette.unarchive":"Unarchive thread","phone.unsettle":"Unsettle","provider.notice.button":"Open Settings → Accounts","provider.notice.head":"No AI provider connected","provider.notice.senderr":"No AI provider connected yet. Open Settings → Accounts to connect Claude, Codex, Antigravity, or another provider.","provider.notice.senderr.remote":"No AI provider connected on {machine}. Open Settings → Accounts on {machine} to connect Claude, Codex, Antigravity, or another provider.","provider.notice.text.none":"Connect Claude, Codex, Antigravity, or another provider to start chatting.","provider.notice.text.signedout":"Sign in to Claude, Codex, or another provider in Settings → Accounts to start chatting.","reply.action":"Reply","reply.cancel":"Cancel reply","reply.to":"In reply to:","rooms.new":"New room","secret.you":"You","settings.appearance":"Appearance","settings.lang":"Language","settings.lang.auto":"Automatic","settings.lang.en":"English","settings.lang.es":"Español","settings.lang.ja":"日本語","settings.theme":"Theme","settings.theme.dark":"Dark","settings.theme.light":"Light","sheet.rename":"Rename thread","sidebar.add.project":"Add project","sidebar.search.projects":"Search projects","thread.context.base":"Backplane","thread.context.copied":"Prompt copied.","thread.context.copy":"Copy prompt","thread.context.disable":"Disable","thread.context.enable":"Enable","thread.context.index":"Available skills index","thread.context.injected.label":"Injected project instructions","thread.context.instructions":"Instructions","thread.context.mcp":"Project MCPs","thread.context.native.note":"Backplane’s launch prompt. Native files are loaded by the provider.","thread.context.none.instructions":"No project instructions found.","thread.context.none.mcp":"No project MCP configurations found.","thread.context.reading":"Reading thread context…","thread.context.size":"{bytes} B · ≈{tokens} tokens","thread.context.skills":"Skills","thread.context.system":"System Prompt","thread.context.title":"Context & Prompt","thread.context.trust":"Trust and enable","thread.new":"New thread","tools.pinned":"Pinned","tools.retry":"Retry","tour.title.bots":"Bots","viewer.board":"Board","viewer.diff":"Diff","viewer.files":"Files","viewer.mech":"Mech","viewer.review":"Review","viewer.schematic":"Schematic","viewer.solid":"3D","web.chat.answer.btn":"Answer","web.chat.answer.placeholder":"Type answer…","web.chat.answered":"Answered: {answer}","web.chat.choose":"Choose a project thread on the left to begin.","web.chat.empty":"No messages yet. Type below to start a turn.","web.chat.finished":"Finished {time}","web.chat.finished.dur":"Finished {time} · {dur}","web.chat.loading":"Loading messages…","web.chat.review.mode":"Review mode","web.chat.streaming":"Streaming…","web.clone.add.dir":"Add {dir}","web.clone.back":"Back","web.clone.change.folder":"Change folder","web.clone.cloned":"Cloned {repo} into {dest}","web.clone.cloning":"Cloning {repo} into {dest}","web.clone.copied":"Copied","web.clone.first":"First message: {text}","web.clone.folder.name":"Folder name","web.clone.go":"Clone","web.clone.loading":"Loading…","web.clone.no.folders":"No folders here","web.clone.open.project":"Open the project","web.clone.open.thread":"Open the thread","web.clone.private":"private","web.clone.repo.placeholder":"https or ssh URL, or owner/repo","web.clone.retry":"Try again","web.clone.same":"Already cloned there: it is added as it is.","web.clone.signin":"Sign in to GitHub","web.clone.signin.done":"Signed in to GitHub","web.clone.signin.enter":"Enter this code on GitHub:","web.clone.signin.wait":"Starting GitHub sign-in…","web.clone.start.thread":"Start a thread","web.clone.stopped":"Stopped cloning {repo}","web.clone.tab":"Clone from git","web.clone.up":"Up","web.clone.use.dir":"Use {dir}","web.composer.attach":"Attach image","web.composer.maximages":"At most {max} images per message.","web.composer.unsupported":"Unsupported image type: {type}","web.composer.voice":"Voice dictation","web.logout.failed":"Could not confirm sign-out. Try again.","web.pair.approve.in":"Approve on desktop or paired phone · expires in {time}","web.pair.approved":"Approved. Opening Backplane…","web.pair.cancelled":"Cancelled.","web.pair.code":"Comparison code","web.pair.denied":"Pairing request was denied.","web.pair.expired":"Pairing code expired. Request a new code to try again.","web.pair.failed":"Pairing request failed ({status})","web.pair.name":"Browser name","web.pair.nocode":"Hub did not return a comparison code.","web.pair.ratelimited":"Too many pairing attempts. Wait a moment and try again.","web.pair.request":"Request pairing","web.pair.requesting":"Requesting pairing code…","web.pair.subtitle":"Pair this browser with your hub. Approve the 6-digit code in Backplane › Settings › Devices.","web.pair.unreachable":"Could not reach the hub. Check your tailnet connection.","web.plan.awaiting":"{n} awaiting approval","web.plan.net.one":"1 net","web.plan.nets":"{n} nets","web.settings.providers":"AI providers","web.settings.providers.browser":"Connect a provider in the Backplane desktop or mobile app under Settings → Accounts."},es:{"agy.signout":"Cerrar sesión","android.hub.machines.approve":"Aprobar","android.load.earlier":"cargar anteriores","approval.dismiss":"Descartar","approval.implement":"Implementar","ask.plan":"Plan propuesto","bots.new":"Nuevo bot","bots.rooms":"Salas","bots.tab.browser":"Navegador","common.cancel":"Cancelar","common.close":"Cerrar","common.copy":"Copiar","common.delete":"Eliminar","common.refresh":"Actualizar","common.remove":"Quitar","common.save":"Guardar","composer.placeholder":"Pregunta lo que sea: @bot, >hilo, %proyecto, #sala, $skill, /btw","composer.send":"Enviar","composer.stop":"Detener","gpui.acct.connected":"Conectado","gpui.acct.not.connected":"No conectado","gpui.acct.sign.in.expired":"Sesión caducada","gpui.ask.plan.ready":"Listo para revisar","gpui.ask.plan.revise":"Revisar","gpui.ask.plan.reviseph":"¿Qué debería cambiar en el plan?","gpui.ask.plan.sendrev":"Enviar revisión","gpui.b.in.reply.to":"↩ En respuesta a: {quote}","gpui.b.replying.to":"↩ Respondiendo a: {line}","gpui.bots.recall.off":"Desactivado","gpui.bots.recall.on":"Activado","gpui.c.solid.big.next":"Cargarlo puede tardar y usar mucha memoria.","gpui.c.solid.load.big":"Cargarlo de todos modos","gpui.c.solid.loading.big":"Cargándolo de todos modos…","gpui.c.term.collapse":"Contraer","gpui.c.term.expand":"Expandir","gpui.commands":"Comandos","gpui.e.open.folder":"Abrir carpeta","gpui.filter.projects.and.threads":"Filtrar proyectos e hilos","gpui.fold.or.unfold.the.sidebar":"Plegar o desplegar la barra lateral","gpui.follow.paused":"Seguimiento en pausa","gpui.follow.wait":"Siguiendo: esperando la próxima edición del agente","gpui.gerbers":"Gerbers","gpui.improvements":"Mejoras","gpui.jump.to.a.thread.run":"Saltar a un hilo, ejecutar un comando o buscar lo dicho","gpui.mgmt.bom.dnp":"DNP","gpui.mgmt.bom.nompn":"sin MPN","gpui.mgmt.checks.all":"Todas","gpui.mgmt.checks.fix":"Corregir con agente","gpui.mgmt.checks.run":"Ejecutar","gpui.mgmt.close":"Cerrar el panel","gpui.mgmt.fab.apply":"Aplicar","gpui.mgmt.fab.changed":"Cambió desde la última vez que miraste","gpui.mgmt.fab.derived":"* calculado desde la página del fabricante (un mil en mm, un anillo desde un diámetro). Atenuado: el valor de la placa rígida, cuando la página de esta placa no dice otra cosa. Una fecha abre la página de la que se leyó.","gpui.mgmt.fab.extra":"Cuesta más","gpui.mgmt.fab.findings":"Hallazgos","gpui.mgmt.fab.free":"Precio base","gpui.mgmt.fab.judge":"Hojas de datos","gpui.mgmt.fab.limit":"Límite","gpui.mgmt.fab.readcol":"Leído","gpui.mgmt.fab.refresh":"Actualizar","gpui.mgmt.fab.reviewbtn":"Revisar","gpui.mgmt.fab.seen":"Visto","gpui.mgmt.fab.thefab":"El fabricante","gpui.mgmt.fab.use":"Usar","gpui.mgmt.life.nopart":"Sin lectura de esta pieza aún.","gpui.mgmt.life.reading":"Leyendo su historial…","gpui.mgmt.plan.addnote":"Añadir nota","gpui.mgmt.plan.all":"Aprobar todo","gpui.mgmt.plan.before":"Planificar antes de rutear","gpui.mgmt.plan.compact":"Compacto","gpui.mgmt.plan.done":"hecho","gpui.mgmt.plan.drawn":"Los corredores y planos del plan se dibujan en la placa mientras este panel está abierto. Ciérralo para ocultarlos.","gpui.mgmt.plan.edited":"Editado","gpui.mgmt.plan.elsewhere":"Un plan de ruteo para {board} espera tu aprobación","gpui.mgmt.plan.emptysub":"Las capas, corredores y planos aparecerán aquí cuando se proponga un plan.","gpui.mgmt.plan.expand":"Expandir","gpui.mgmt.plan.fit":"Ajustar","gpui.mgmt.plan.grid.all":"Todas las capas","gpui.mgmt.plan.grid.pair":"Lado a lado","gpui.mgmt.plan.grid.single":"Única","gpui.mgmt.plan.hide":"Ocultar hechos","gpui.mgmt.plan.hint":"Arrastra vértices para guiar · Clic en + del borde para insertar · Clic derecho en vértice para quitar","gpui.mgmt.plan.keysnote":"En esta versión de KiCad, aprueba desde este panel: en la vista de plan las teclas A, R y W de KiCad aún no son del plan (A abre Añadir Huella). Actualiza KiCad.","gpui.mgmt.plan.layer":"Aprobar capa","gpui.mgmt.plan.layer.short":"Capa","gpui.mgmt.plan.lock":"Bloquear","gpui.mgmt.plan.locked":"Bloqueado","gpui.mgmt.plan.noboard":"No hay plan de ruteo para esta placa.","gpui.mgmt.plan.noitems":"Sin corredores ni planos en esta capa","gpui.mgmt.plan.note.placeholder":"Nota de guiado para el router…","gpui.mgmt.plan.nothing":"Nada espera tu aprobación","gpui.mgmt.plan.offwords":"Los agentes rutean como les pidas. Actívalo para que primero propongan un plan de ruteo y ruteen solo lo que apruebes aquí.","gpui.mgmt.plan.onwords":"Antes de rutear una placa con 4 o más capas de cobre o más de 60 redes, el agente propone aquí corredores y regiones de plano. Solo rutea lo que apruebes.","gpui.mgmt.plan.reading":"Leyendo el plan de ruteo…","gpui.mgmt.plan.reference":"sobre {layer}","gpui.mgmt.plan.refused":"KiCad lo rechazó","gpui.mgmt.plan.reject":"Rechazar","gpui.mgmt.plan.rejectlayer":"Rechazar capa","gpui.mgmt.plan.reqplain":"Aprobación solicitada","gpui.mgmt.plan.requested":"Aprobación solicitada: {what}","gpui.mgmt.plan.saved":"plan guardado","gpui.mgmt.plan.show":"Mostrar hechos","gpui.mgmt.plan.st.approved":"Aprobado","gpui.mgmt.plan.st.awaiting":"Esperando revisión","gpui.mgmt.plan.st.blocked":"Bloqueado","gpui.mgmt.plan.st.empty":"Vacío","gpui.mgmt.plan.st.partial":"Parcial","gpui.mgmt.plan.st.rejected":"Rechazado","gpui.mgmt.plan.st.routed":"Ruteado","gpui.mgmt.plan.st.routing":"Ruteando","gpui.mgmt.plan.st.verified":"Verificado","gpui.mgmt.plan.stackup.short":"Apilamiento","gpui.mgmt.plan.stop":"Detener ruteo","gpui.mgmt.plan.sync":"Vincular zoom","gpui.mgmt.plan.tab":"Plan","gpui.mgmt.plan.unlock":"Desbloquear","gpui.mgmt.plan.verify":"Verificar","gpui.mgmt.plan.view.canvas":"Lienzo","gpui.mgmt.plan.view.list":"Lista","gpui.mgmt.plan.view.split":"Dividido","gpui.mgmt.plan.width":"Ancho","gpui.next.thread":"Hilo siguiente","gpui.nothing.matches":"Nada coincide","gpui.planmode.bar.always":"Modo plan — explora y propone un plan antes de editar","gpui.planmode.bar.executing":"Ejecutando el plan aprobado","gpui.planmode.bar.once":"Modo plan (1 turno) — explora y propone un plan antes de editar","gpui.planmode.bar.pending":"El plan propuesto espera revisión abajo","gpui.planmode.bar.planning":"Planificando — redactando un plan antes de editar","gpui.planmode.chip.building":"Ejecutando","gpui.planmode.chip.once":"Plan · 1t","gpui.planmode.scope.always":"Siempre","gpui.planmode.scope.once":"1 turno","gpui.planmode.tip":"Planificar antes de actuar (1 turno, siempre u off)","gpui.planmode.top.executing":"Ejecutando plan","gpui.planmode.top.once":"Plan (1 turno)","gpui.planmode.top.pending":"Revisar plan","gpui.planmode.top.planning":"Planificando","gpui.previous.thread":"Hilo anterior","gpui.rail.no.board":"Este proyecto no tiene placa","gpui.rail.no.mech":"Este proyecto no tiene piezas mecánicas","gpui.rail.no.schematic":"Este proyecto no tiene esquema","gpui.rail.split.needs.both":"La vista dividida requiere una placa y un esquema","gpui.settings.group.agents":"Agentes y herramientas","gpui.settings.group.general":"General","home.away":"El inicio ({name}) no está disponible","home.away.queued":"El inicio ({name}) no está disponible · {n} en cola","home.away.since":"El inicio ({name}) no está disponible desde las {time}","home.away.since.queued":"El inicio ({name}) no está disponible desde las {time} · {n} en cola","home.machine":"Máquina de inicio","home.move.failed":"No se pudo mover el inicio","home.move.failed.note":"No se pudo mover el inicio: {note}","home.move.here":"Hacer de esta máquina el inicio","home.moving":"Moviendo el inicio a {to}…","home.moving.step":"Moviendo el inicio a {to}: {step}","hub.back.crash":"Backplane volvió tras detenerse de forma inesperada","hub.restarting":"Reiniciando Backplane…","hub.restarting.build":"Reiniciando Backplane… (nueva compilación {build})","hub.stopped":"Backplane se detuvo","ios.hub.address.field":"Dirección del hub","menu.pin":"Fijar","menu.settle":"Cerrar","menu.unpin":"Desfijar","menu.wake":"Despertar","model.col.agent":"Agente","native.pair.connect":"Conectar","native.thread.model":"Modelo","notify.settled":"Cerrado","palette.archive":"Archivar hilo","palette.command.placeholder":"Escribe un comando o un hilo","palette.diff":"Diff: qué cambió este hilo","palette.newthread":"Nuevo hilo","palette.settings":"Ajustes","palette.terminal":"Terminal","palette.unarchive":"Desarchivar hilo","phone.unsettle":"Reabrir","provider.notice.button":"Abrir Configuración → Cuentas","provider.notice.head":"No hay ningún proveedor de IA conectado","provider.notice.senderr":"Aún no hay ningún proveedor de IA conectado. Abre Configuración → Cuentas para conectar Claude, Codex, Antigravity u otro proveedor.","provider.notice.senderr.remote":"No hay ningún proveedor de IA conectado en {machine}. Abre Configuración → Cuentas en {machine} para conectar Claude, Codex, Antigravity u otro proveedor.","provider.notice.text.none":"Conecta Claude, Codex, Antigravity u otro proveedor para empezar a chatear.","provider.notice.text.signedout":"Inicia sesión en Claude, Codex u otro proveedor en Configuración → Cuentas para empezar a chatear.","reply.action":"Responder","reply.cancel":"Cancelar respuesta","reply.to":"En respuesta a:","rooms.new":"Nueva sala","secret.you":"Tú","settings.appearance":"Apariencia","settings.lang":"Idioma","settings.lang.auto":"Automático","settings.lang.en":"English","settings.lang.es":"Español","settings.lang.ja":"日本語","settings.theme":"Tema","settings.theme.dark":"Oscuro","settings.theme.light":"Claro","sheet.rename":"Renombrar hilo","sidebar.add.project":"Añadir proyecto","sidebar.search.projects":"Buscar proyectos","thread.context.base":"Backplane","thread.context.copied":"Se copiaron las instrucciones.","thread.context.copy":"Copiar instrucciones","thread.context.disable":"Desactivar","thread.context.enable":"Activar","thread.context.index":"Índice de habilidades disponibles","thread.context.injected.label":"Instrucciones del proyecto añadidas","thread.context.instructions":"Instrucciones","thread.context.mcp":"MCP del proyecto","thread.context.native.note":"Instrucciones de inicio de Backplane. El proveedor carga los archivos nativos.","thread.context.none.instructions":"No se encontraron instrucciones del proyecto.","thread.context.none.mcp":"No se encontraron configuraciones MCP del proyecto.","thread.context.reading":"Leyendo el contexto del hilo…","thread.context.size":"{bytes} B · ≈{tokens} tokens","thread.context.skills":"Habilidades","thread.context.system":"Instrucciones del sistema","thread.context.title":"Contexto e instrucciones","thread.context.trust":"Confiar y activar","thread.new":"Nuevo hilo","tools.pinned":"Fijado","tools.retry":"Reintentar","tour.title.bots":"Bots","viewer.board":"Placa","viewer.diff":"Diff","viewer.files":"Archivos","viewer.mech":"Mech","viewer.review":"Revisión","viewer.schematic":"Esquemático","viewer.solid":"3D","web.chat.answer.btn":"Responder","web.chat.answer.placeholder":"Escribe una respuesta…","web.chat.answered":"Respondido: {answer}","web.chat.choose":"Elige un hilo de proyecto a la izquierda para empezar.","web.chat.empty":"Aún no hay mensajes. Escribe abajo para iniciar un turno.","web.chat.finished":"Terminado {time}","web.chat.finished.dur":"Terminado {time} · {dur}","web.chat.loading":"Cargando mensajes…","web.chat.review.mode":"Modo de revisión","web.chat.streaming":"Transmitiendo…","web.clone.add.dir":"Añadir {dir}","web.clone.back":"Atrás","web.clone.change.folder":"Cambiar carpeta","web.clone.cloned":"{repo} clonado en {dest}","web.clone.cloning":"Clonando {repo} en {dest}","web.clone.copied":"Copiado","web.clone.first":"Primer mensaje: {text}","web.clone.folder.name":"Nombre de la carpeta","web.clone.go":"Clonar","web.clone.loading":"Cargando…","web.clone.no.folders":"No hay carpetas aquí","web.clone.open.project":"Abrir el proyecto","web.clone.open.thread":"Abrir el hilo","web.clone.private":"privado","web.clone.repo.placeholder":"URL https o ssh, o propietario/repositorio","web.clone.retry":"Reintentar","web.clone.same":"Ya está clonado ahí: se añade tal cual.","web.clone.signin":"Iniciar sesión en GitHub","web.clone.signin.done":"Sesión iniciada en GitHub","web.clone.signin.enter":"Introduce este código en GitHub:","web.clone.signin.wait":"Iniciando sesión en GitHub…","web.clone.start.thread":"Empezar un hilo","web.clone.stopped":"Se detuvo la clonación de {repo}","web.clone.tab":"Clonar desde git","web.clone.up":"Subir","web.clone.use.dir":"Usar {dir}","web.composer.attach":"Adjuntar imagen","web.composer.maximages":"Como máximo {max} imágenes por mensaje.","web.composer.unsupported":"Tipo de imagen no compatible: {type}","web.composer.voice":"Dictado por voz","web.logout.failed":"No se pudo confirmar el cierre de sesión. Inténtalo de nuevo.","web.pair.approve.in":"Aprueba en el escritorio o en un teléfono vinculado · caduca en {time}","web.pair.approved":"Aprobado. Abriendo Backplane…","web.pair.cancelled":"Cancelado.","web.pair.code":"Código de comparación","web.pair.denied":"Se rechazó la solicitud de vinculación.","web.pair.expired":"El código de vinculación caducó. Solicita uno nuevo para intentarlo otra vez.","web.pair.failed":"Falló la solicitud de vinculación ({status})","web.pair.name":"Nombre del navegador","web.pair.nocode":"El hub no devolvió un código de comparación.","web.pair.ratelimited":"Demasiados intentos de vinculación. Espera un momento e inténtalo de nuevo.","web.pair.request":"Solicitar vinculación","web.pair.requesting":"Solicitando código de vinculación…","web.pair.subtitle":"Vincula este navegador con tu hub. Aprueba el código de 6 dígitos en Backplane › Ajustes › Dispositivos.","web.pair.unreachable":"No se pudo conectar con el hub. Comprueba tu conexión de tailnet.","web.plan.awaiting":"{n} esperando aprobación","web.plan.net.one":"1 red","web.plan.nets":"{n} redes","web.settings.providers":"Proveedores de IA","web.settings.providers.browser":"Conecta un proveedor en la aplicación de escritorio o móvil de Backplane en Configuración → Cuentas."},ja:{"agy.signout":"サインアウト","android.hub.machines.approve":"承認","android.load.earlier":"以前のメッセージを読み込む","approval.dismiss":"閉じる","approval.implement":"実装","ask.plan":"提案されたプラン","bots.new":"新しいボット","bots.rooms":"ルーム","bots.tab.browser":"ブラウザ","common.cancel":"キャンセル","common.close":"閉じる","common.copy":"コピー","common.delete":"削除","common.refresh":"更新","common.remove":"削除","common.save":"保存","composer.placeholder":"何でも質問:@bot、>thread、%project、#room、$skill、/btw","composer.send":"送信","composer.stop":"停止","gpui.acct.connected":"接続済み","gpui.acct.not.connected":"未接続","gpui.acct.sign.in.expired":"サインインの期限切れ","gpui.ask.plan.ready":"確認待ち","gpui.ask.plan.revise":"修正","gpui.ask.plan.reviseph":"計画のどこを変更しますか?","gpui.ask.plan.sendrev":"修正を送る","gpui.b.in.reply.to":"↩ 返信先:{quote}","gpui.b.replying.to":"↩ 返信中:{line}","gpui.bots.recall.off":"オフ","gpui.bots.recall.on":"オン","gpui.c.solid.big.next":"読み込みには時間と多くのメモリがかかることがあります。","gpui.c.solid.load.big":"それでも読み込む","gpui.c.solid.loading.big":"それでも読み込み中…","gpui.c.term.collapse":"折りたたむ","gpui.c.term.expand":"展開","gpui.commands":"コマンド","gpui.e.open.folder":"フォルダを開く","gpui.filter.projects.and.threads":"プロジェクトとスレッドを絞り込む","gpui.fold.or.unfold.the.sidebar":"サイドバーを折りたたむ/開く","gpui.follow.paused":"追従を一時停止中","gpui.follow.wait":"追従中: エージェントの次の編集を待っています","gpui.gerbers":"ガーバー","gpui.improvements":"改善","gpui.jump.to.a.thread.run":"スレッドへ移動、コマンドを実行、または発言を検索","gpui.mgmt.bom.dnp":"実装しない","gpui.mgmt.bom.nompn":"MPNなし","gpui.mgmt.checks.all":"すべて","gpui.mgmt.checks.fix":"エージェントに直してもらう","gpui.mgmt.checks.run":"実行","gpui.mgmt.close":"パネルを閉じる","gpui.mgmt.fab.apply":"適用","gpui.mgmt.fab.changed":"前回見てから変わったところ","gpui.mgmt.fab.derived":"* 製造元のページから計算した値です(milをmmに、径からランドを)。薄い色の項目はリジッド基板の値です(この基板のページに記載がないもの)。日付を押すと読んだページが開きます。","gpui.mgmt.fab.extra":"追加料金","gpui.mgmt.fab.findings":"指摘","gpui.mgmt.fab.free":"基本料金","gpui.mgmt.fab.judge":"データシート","gpui.mgmt.fab.limit":"項目","gpui.mgmt.fab.readcol":"読んだ日","gpui.mgmt.fab.refresh":"再読み込み","gpui.mgmt.fab.reviewbtn":"レビュー","gpui.mgmt.fab.seen":"確認済み","gpui.mgmt.fab.thefab":"製造元","gpui.mgmt.fab.use":"使う","gpui.mgmt.life.nopart":"この部品の記録はまだありません。","gpui.mgmt.life.reading":"履歴を読んでいます…","gpui.mgmt.plan.addnote":"メモを追加","gpui.mgmt.plan.all":"すべて承認","gpui.mgmt.plan.before":"配線前に計画する","gpui.mgmt.plan.compact":"標準","gpui.mgmt.plan.done":"完了","gpui.mgmt.plan.drawn":"計画の配線経路とプレーンは、このパネルを開いている間だけ基板上に表示されます。閉じると消えます。","gpui.mgmt.plan.edited":"編集済み","gpui.mgmt.plan.elsewhere":"{board}の配線計画が承認を待っています","gpui.mgmt.plan.emptysub":"計画が提案されると、レイヤー・コリドー・ベタ領域がここに表示されます。","gpui.mgmt.plan.expand":"拡大","gpui.mgmt.plan.fit":"全体表示","gpui.mgmt.plan.grid.all":"全レイヤー","gpui.mgmt.plan.grid.pair":"並べて表示","gpui.mgmt.plan.grid.single":"単一","gpui.mgmt.plan.hide":"完了を隠す","gpui.mgmt.plan.hint":"頂点をドラッグして誘導 · 辺の + をクリックで追加 · 頂点を右クリックで削除","gpui.mgmt.plan.keysnote":"このバージョンのKiCadでは、このパネルから承認してください。プランビューでのKiCadのA・R・Wキーはまだ計画のものではありません(Aはフットプリントの追加を開きます)。KiCadを更新してください。","gpui.mgmt.plan.layer":"層を承認","gpui.mgmt.plan.layer.short":"レイヤー","gpui.mgmt.plan.lock":"ロック","gpui.mgmt.plan.locked":"ロック中","gpui.mgmt.plan.noboard":"この基板の配線計画はありません。","gpui.mgmt.plan.noitems":"このレイヤーにコリドーまたはプレーンがありません","gpui.mgmt.plan.note.placeholder":"ルーターへの指示メモ…","gpui.mgmt.plan.nothing":"承認待ちはありません","gpui.mgmt.plan.offwords":"エージェントは指示どおりに配線します。オンにすると、まず配線計画を提案し、ここで承認したものだけを配線します。","gpui.mgmt.plan.onwords":"銅箔層が4層以上、またはネットが60本を超える基板では、配線の前にエージェントがここで配線経路とプレーン領域を提案します。承認したものだけを配線します。","gpui.mgmt.plan.reading":"配線計画を読んでいます…","gpui.mgmt.plan.reference":"基準 {layer}","gpui.mgmt.plan.refused":"KiCad が拒否しました","gpui.mgmt.plan.reject":"却下","gpui.mgmt.plan.rejectlayer":"レイヤーを却下","gpui.mgmt.plan.reqplain":"承認が求められています","gpui.mgmt.plan.requested":"承認が求められています: {what}","gpui.mgmt.plan.saved":"保存された計画","gpui.mgmt.plan.show":"完了を表示","gpui.mgmt.plan.st.approved":"承認済み","gpui.mgmt.plan.st.awaiting":"承認待ち","gpui.mgmt.plan.st.blocked":"ブロック","gpui.mgmt.plan.st.empty":"空","gpui.mgmt.plan.st.partial":"一部完了","gpui.mgmt.plan.st.rejected":"却下","gpui.mgmt.plan.st.routed":"配線済み","gpui.mgmt.plan.st.routing":"配線中","gpui.mgmt.plan.st.verified":"検証済み","gpui.mgmt.plan.stackup.short":"スタックアップ","gpui.mgmt.plan.stop":"配線を止める","gpui.mgmt.plan.sync":"ズーム連動","gpui.mgmt.plan.tab":"計画","gpui.mgmt.plan.unlock":"ロック解除","gpui.mgmt.plan.verify":"検証","gpui.mgmt.plan.view.canvas":"キャンバス","gpui.mgmt.plan.view.list":"リスト","gpui.mgmt.plan.view.split":"分割","gpui.mgmt.plan.width":"幅","gpui.next.thread":"次のスレッド","gpui.nothing.matches":"一致するものはありません","gpui.planmode.bar.always":"計画モード — 編集前に調査して計画を提案します","gpui.planmode.bar.executing":"承認された計画を実行しています","gpui.planmode.bar.once":"計画モード (1回) — 編集前に調査して計画を提案します","gpui.planmode.bar.pending":"提案された計画が下のレビューを待っています","gpui.planmode.bar.planning":"計画中 — 編集前の計画を作成しています","gpui.planmode.chip.building":"実行中","gpui.planmode.chip.once":"計画 · 1回","gpui.planmode.scope.always":"常時","gpui.planmode.scope.once":"1回","gpui.planmode.tip":"実行前に計画を作成 (1回・常時・オフ)","gpui.planmode.top.executing":"計画を実行中","gpui.planmode.top.once":"計画 (1回)","gpui.planmode.top.pending":"計画を確認","gpui.planmode.top.planning":"計画中","gpui.previous.thread":"前のスレッド","gpui.rail.no.board":"このプロジェクトには基板がありません","gpui.rail.no.mech":"このプロジェクトには機械部品がありません","gpui.rail.no.schematic":"このプロジェクトには回路図がありません","gpui.rail.split.needs.both":"分割表示には基板と回路図が必要です","gpui.settings.group.agents":"エージェントとツール","gpui.settings.group.general":"一般","home.away":"ホーム({name})はオフラインです","home.away.queued":"ホーム({name})はオフラインです · {n} 件待機中","home.away.since":"ホーム({name})は {time} からオフラインです","home.away.since.queued":"ホーム({name})は {time} からオフラインです · {n} 件待機中","home.machine":"ホームマシン","home.move.failed":"ホームの移動に失敗しました","home.move.failed.note":"ホームの移動に失敗しました: {note}","home.move.here":"このマシンをホームにする","home.moving":"ホームを {to} へ移動中…","home.moving.step":"ホームを {to} へ移動中: {step}","hub.back.crash":"予期せず停止したBackplaneが戻りました","hub.restarting":"Backplaneを再起動しています…","hub.restarting.build":"Backplaneを再起動しています…(新しいビルド {build})","hub.stopped":"Backplaneは停止しました","ios.hub.address.field":"ハブのアドレス","menu.pin":"ピン留め","menu.settle":"完了","menu.unpin":"ピン留めを解除","menu.wake":"再開","model.col.agent":"エージェント","native.pair.connect":"接続","native.thread.model":"モデル","notify.settled":"完了","palette.archive":"スレッドをアーカイブ","palette.command.placeholder":"コマンドまたはスレッドを入力","palette.diff":"差分:このスレッドの変更","palette.newthread":"新しいスレッド","palette.settings":"設定","palette.terminal":"ターミナル","palette.unarchive":"スレッドのアーカイブを解除","phone.unsettle":"未完了に戻す","provider.notice.button":"設定 → アカウントを開く","provider.notice.head":"AI プロバイダーが接続されていません","provider.notice.senderr":"AI プロバイダーがまだ接続されていません。設定 → アカウントを開いて、Claude、Codex、Antigravity などのプロバイダーを接続してください。","provider.notice.senderr.remote":"{machine} に AI プロバイダーが接続されていません。{machine} で設定 → アカウントを開いて、Claude、Codex、Antigravity などのプロバイダーを接続してください。","provider.notice.text.none":"チャットを始めるには、Claude、Codex、Antigravity などのプロバイダーを接続してください。","provider.notice.text.signedout":"チャットを始めるには、設定 → アカウントで Claude、Codex などのプロバイダーにサインインしてください。","reply.action":"返信","reply.cancel":"返信をやめる","reply.to":"返信先:","rooms.new":"新しいルーム","secret.you":"あなた","settings.appearance":"外観","settings.lang":"言語","settings.lang.auto":"自動","settings.lang.en":"English","settings.lang.es":"Español","settings.lang.ja":"日本語","settings.theme":"テーマ","settings.theme.dark":"ダーク","settings.theme.light":"ライト","sheet.rename":"スレッド名を変更","sidebar.add.project":"プロジェクトを追加","sidebar.search.projects":"プロジェクトを検索","thread.context.base":"Backplane","thread.context.copied":"プロンプトをコピーしました。","thread.context.copy":"プロンプトをコピー","thread.context.disable":"無効にする","thread.context.enable":"有効にする","thread.context.index":"利用可能なスキルの一覧","thread.context.injected.label":"追加されたプロジェクトの指示","thread.context.instructions":"指示","thread.context.mcp":"プロジェクトの MCP","thread.context.native.note":"Backplane が起動時に渡すプロンプトです。ネイティブファイルはプロバイダーが読み込みます。","thread.context.none.instructions":"プロジェクトの指示が見つかりません。","thread.context.none.mcp":"プロジェクトの MCP 設定が見つかりません。","thread.context.reading":"スレッドのコンテキストを読み込み中…","thread.context.size":"{bytes} B・約{tokens}トークン","thread.context.skills":"スキル","thread.context.system":"システムプロンプト","thread.context.title":"コンテキストとプロンプト","thread.context.trust":"承認して有効にする","thread.new":"新しいスレッド","tools.pinned":"固定中","tools.retry":"再試行","tour.title.bots":"ボット","viewer.board":"基板","viewer.diff":"差分","viewer.files":"ファイル","viewer.mech":"Mech","viewer.review":"レビュー","viewer.schematic":"回路図","viewer.solid":"3D","web.chat.answer.btn":"回答","web.chat.answer.placeholder":"回答を入力…","web.chat.answered":"回答済み: {answer}","web.chat.choose":"左側からプロジェクトのスレッドを選んで開始してください。","web.chat.empty":"まだメッセージはありません。下に入力して開始してください。","web.chat.finished":"完了 {time}","web.chat.finished.dur":"完了 {time} · {dur}","web.chat.loading":"メッセージを読み込んでいます…","web.chat.review.mode":"レビューモード","web.chat.streaming":"受信中…","web.clone.add.dir":"{dir} を追加","web.clone.back":"戻る","web.clone.change.folder":"フォルダを変更","web.clone.cloned":"{repo} を {dest} にクローンしました","web.clone.cloning":"{repo} を {dest} にクローン中","web.clone.copied":"コピーしました","web.clone.first":"最初のメッセージ: {text}","web.clone.folder.name":"フォルダ名","web.clone.go":"クローン","web.clone.loading":"読み込み中…","web.clone.no.folders":"フォルダがありません","web.clone.open.project":"プロジェクトを開く","web.clone.open.thread":"スレッドを開く","web.clone.private":"非公開","web.clone.repo.placeholder":"https / ssh の URL、または owner/repo","web.clone.retry":"もう一度","web.clone.same":"すでにそこにクローンされています: そのまま追加します。","web.clone.signin":"GitHub にサインイン","web.clone.signin.done":"GitHub にサインインしました","web.clone.signin.enter":"このコードを GitHub に入力してください:","web.clone.signin.wait":"GitHub のサインインを開始しています…","web.clone.start.thread":"スレッドを開始","web.clone.stopped":"{repo} のクローンを中止しました","web.clone.tab":"git からクローン","web.clone.up":"上へ","web.clone.use.dir":"{dir} を使う","web.composer.attach":"画像を添付","web.composer.maximages":"1 件のメッセージに添付できる画像は最大 {max} 枚です。","web.composer.unsupported":"未対応の画像形式です: {type}","web.composer.voice":"音声入力","web.logout.failed":"サインアウトを確認できませんでした。もう一度お試しください。","web.pair.approve.in":"デスクトップまたはペアリング済みの端末で承認してください · 有効期限 {time}","web.pair.approved":"承認されました。Backplane を開いています…","web.pair.cancelled":"キャンセルしました。","web.pair.code":"確認コード","web.pair.denied":"ペアリングのリクエストが拒否されました。","web.pair.expired":"ペアリングコードの有効期限が切れました。新しいコードをリクエストしてください。","web.pair.failed":"ペアリングのリクエストに失敗しました ({status})","web.pair.name":"ブラウザー名","web.pair.nocode":"ハブから確認コードが返されませんでした。","web.pair.ratelimited":"ペアリングの試行回数が多すぎます。しばらく待ってからやり直してください。","web.pair.request":"ペアリングをリクエスト","web.pair.requesting":"ペアリングコードをリクエストしています…","web.pair.subtitle":"このブラウザーをハブとペアリングします。Backplane › 設定 › デバイス で 6 桁のコードを承認してください。","web.pair.unreachable":"ハブに接続できませんでした。tailnet の接続を確認してください。","web.plan.awaiting":"{n} 件が承認待ち","web.plan.net.one":"1 ネット","web.plan.nets":"{n} ネット","web.settings.providers":"AI プロバイダー","web.settings.providers.browser":"Backplane のデスクトップまたはモバイルアプリの設定 → アカウントからプロバイダーを接続してください。"}};function Q(a,t){if(!t)return a;return a.replace(/\{([a-zA-Z0-9_.-]+)\}/g,(s,r)=>Object.prototype.hasOwnProperty.call(t,r)?String(t[r]):s)}var O=te(),W=new Set,V=new Map;for(let[a,t]of Object.entries(U.en||{}))if(typeof t==="string"&&!V.has(t))V.set(t,a);function te(){let a=typeof navigator<"u"&&navigator.language?navigator.language.toLowerCase():"en";if(a.startsWith("ja"))return"ja";if(a.startsWith("es"))return"es";return"en"}function Y(){if(typeof document<"u"&&document.documentElement)document.documentElement.lang=O}Y();function me(a){return W.add(a),()=>{W.delete(a)}}function ue(a){if(!a)return!1;let t=a.toLowerCase(),s=t.startsWith("ja")?"ja":t.startsWith("es")?"es":t.startsWith("en")?"en":"";if(!s)return!1;let r=s!==O;if(O=s,Y(),r)for(let d of W)d(O);return r}function c(a,t,s){let d=(U[O]||U.en||{})[a]??U.en?.[a]??t??a;return Q(d,s)}function ge(a){if(!a)return"";let t=V.get(a);if(!t)return a;return c(t,a)}var ae=[[1,26,7,1,[]],[2,44,10,1,[6,18]],[3,70,15,1,[6,22]],[4,100,20,1,[6,26]],[5,134,26,1,[6,30]],[6,172,18,2,[6,34]]],G=new Uint8Array(512),_=new Uint8Array(256);{let a=1;for(let t=0;t<255;t++)if(G[t]=a,_[a]=t,a<<=1,a&256)a^=285;for(let t=255;t<512;t++)G[t]=G[t-255]}function J(a,t){return a===0||t===0?0:G[_[a]+_[t]]}function ne(a){let t=new Uint8Array([1]);for(let s=0;s{let m=e-i*n;return Math.ceil((12+t.length*8)/8)<=m});if(!s)return null;let[r,d,u,f,E]=s,w=d-u*f,g=[],S=(e,i)=>{for(let n=i-1;n>=0;n--)g.push(e>>>n&1)};S(4,4),S(t.length,8);for(let e of t)S(e,8);for(let e=0;e<4&&g.length{if(e<0||i<0||e>=p||i>=p)return;H[e*p+i]=n?1:0,A[e*p+i]=1},N=(e,i)=>{for(let n=-1;n<=7;n++)for(let m=-1;m<=7;m++){let k=e+n,l=i+m,o=n>=0&&n<=6&&m>=0&&m<=6&&(n===0||n===6||m===0||m===6||n>=2&&n<=4&&m>=2&&m<=4);b(k,l,o)}};N(0,0),N(0,p-7),N(p-7,0);for(let e=8;e=1;e-=2){if(e===6)e=5;let i=(e+1&2)===0;for(let n=0;n>>3]>>>7-(j&7)&1,j++;let o=(m+l&1)===0?h^1:h;H[m*p+l]=o}}}let R=30660;for(let e=0;e<=5;e++)b(8,e,(R>>>14-e&1)===1);b(8,7,(R>>>8&1)===1),b(8,8,(R>>>7&1)===1),b(7,8,(R>>>6&1)===1);for(let e=0;e<=5;e++)b(5-e,8,(R>>>5-e&1)===1);for(let e=0;e<8;e++)b(8,p-1-e,(R>>>e&1)===1);for(let e=0;e<7;e++)b(p-7+e,8,(R>>>14-e&1)===1);return{size:p,modules:H}}function X(a){let t=oe(a);if(!t)return null;let s=2,r=t.size+s*2,d=document.createElementNS("http://www.w3.org/2000/svg","svg");d.setAttribute("viewBox",`0 0 ${r} ${r}`),d.setAttribute("role","img"),d.setAttribute("aria-label",`QR code for ${a}`),d.setAttribute("shape-rendering","crispEdges"),d.classList.add("bp-qr-svg");let u=document.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("width",String(r)),u.setAttribute("height",String(r)),u.setAttribute("fill","#ffffff"),d.appendChild(u);let f="";for(let w=0;w{let h=l.trim();if(!h)return;let o=h.startsWith("https://")?h:`https://${h}`;if(!o.startsWith("https://")||o.length<=8)return;let x=document.createElement("div");x.className="bp-pair-addr-meta";let v=document.createElement("div");v.className="bp-pair-code-label",v.textContent=c("ios.hub.address.field","Hub address");let y=document.createElement("code");y.className="bp-pair-addr-url",y.textContent=o,y.setAttribute("data-testid","pair-address");let P=document.createElement("button");P.type="button",P.className="bp-pair-copy";let I=c("common.copy","Copy");P.textContent=I,P.addEventListener("click",()=>{navigator.clipboard?.writeText(o).then(()=>{P.textContent=c("web.clone.copied","Copied"),window.setTimeout(()=>{P.textContent=I},1200)}).catch(()=>{})}),x.append(v,y,P);let z=document.createDocumentFragment();z.appendChild(x);let K=X(o);if(K){let F=document.createElement("div");F.className="bp-pair-qr",F.setAttribute("data-testid","pair-qr"),F.appendChild(K),z.appendChild(F)}p.replaceChildren(z),p.classList.remove("bp-hidden")};fetch("/auth/web/info",{credentials:"same-origin"}).then(async(l)=>{if(!l.ok)return;let h=await l.json();if(typeof h.address==="string")H(h.address)}).catch(()=>{}),t.append(s,u,f,S,C,p),a.appendChild(t);let A=null,b=null,N=null,j=0,D=0,R=150,e=1000;function i(){if(j++,N)N.abort(),N=null;if(A!==null)window.clearTimeout(A),A=null;if(b!==null)window.clearInterval(b),b=null}function n(l="",h=!1){i(),f.classList.remove("bp-hidden"),S.classList.add("bp-hidden"),g.disabled=!1,C.textContent=l,C.className=h?"bp-pair-status bp-bad":"bp-pair-status"}function m(){let l=D-Date.now();if(l<=0){n(c("web.pair.expired","Pairing code expired. Request a new code to try again."),!0);return}B.textContent=c("web.pair.approve.in","Approve on desktop or paired phone · expires in {time}",{time:pe(l)})}async function k(l){if(l!==j)return;if(D>0&&Date.now()>=D){n(c("web.pair.expired","Pairing code expired. Request a new code to try again."),!0);return}let h=new AbortController;N=h;try{let o=await fetch("/auth/web/poll",{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/json"},body:"{}",signal:h.signal});if(l!==j)return;if(e=1000,o.status===202){A=window.setTimeout(()=>{k(l)},150);return}if(o.status===200||o.status===204){let v={};if(o.status===200)try{v=await o.json()}catch{}if(l!==j)return;let y=(v.state||v.status||"").toLowerCase();if(o.status===204||v.approved===!0||y==="approved"||y==="ok"){i(),C.textContent=c("web.pair.approved","Approved. Opening Backplane…"),C.className="bp-pair-status bp-ok",window.location.replace("/");return}if(y==="denied"||y==="rejected"){n(c("web.pair.denied","Pairing request was denied."),!0);return}if(y==="expired"){n(c("web.pair.expired","Pairing code expired. Request a new code to try again."),!0);return}A=window.setTimeout(()=>{k(l)},150);return}if(o.status===429){let v=Number(o.headers.get("Retry-After")||"5"),y=Math.max(2000,(Number.isFinite(v)?v:5)*1000);A=window.setTimeout(()=>{k(l)},y);return}if(o.status===401||o.status===403||o.status===404||o.status===410){let v="";try{let y=await o.json();v=(y.state||y.status||y.error||"").toLowerCase()}catch{}if(l!==j)return;if(v==="denied"||v==="rejected"||o.status===403)n(c("web.pair.denied","Pairing request was denied."),!0);else n(c("web.pair.expired","Pairing code expired. Request a new code to try again."),!0);return}let x=e;e=Math.min(1e4,Math.round(e*1.8)),A=window.setTimeout(()=>{k(l)},x)}catch{if(l!==j)return;let o=e;e=Math.min(1e4,Math.round(e*1.8)),A=window.setTimeout(()=>{k(l)},o)}finally{if(N===h)N=null}}L.addEventListener("click",()=>{n(c("web.pair.cancelled","Cancelled."))}),f.addEventListener("submit",async(l)=>{l.preventDefault();let h=w.value.trim()||Z();g.disabled=!0,C.textContent=c("web.pair.requesting","Requesting pairing code…"),C.className="bp-pair-status";try{let o=await fetch("/auth/web/request",{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:h})});if(!o.ok){let I=c("web.pair.failed","Pairing request failed ({status})",{status:o.status});try{let z=await o.json();if(z.error)I=z.error}catch{}if(o.status===429)I=c("web.pair.ratelimited","Too many pairing attempts. Wait a moment and try again.");n(I,!0);return}let x=await o.json(),v=x.code||x.checkCode||"";if(!v){n(c("web.pair.nocode","Hub did not return a comparison code."),!0);return}let y=Date.now();D=x.expiresAt?x.expiresAt<10000000000?x.expiresAt*1000:x.expiresAt:y+(x.expiresIn?x.expiresIn*1000:120000),i();let P=j;e=1000,R=x.pollMs&&x.pollMs>=100?x.pollMs:150,M.textContent=re(v),f.classList.add("bp-hidden"),S.classList.remove("bp-hidden"),C.textContent="",m(),b=window.setInterval(m,1000),A=window.setTimeout(()=>{k(P)},R)}catch{n(c("web.pair.unreachable","Could not reach the hub. Check your tailnet connection."),!0)}})}if(document.readyState==="loading")document.addEventListener("DOMContentLoaded",ee);else ee(); +var U={en:{"agy.signout":"Sign out","android.hub.machines.approve":"Approve","android.load.earlier":"load earlier","approval.dismiss":"Dismiss","approval.implement":"Implement","ask.plan":"Proposed plan","bots.new":"New bot","bots.rooms":"Rooms","bots.tab.browser":"Browser","common.cancel":"Cancel","common.close":"Close","common.copy":"Copy","common.delete":"Delete","common.refresh":"Refresh","common.remove":"Remove","common.save":"Save","composer.model.tip":"Choose the model and effort","composer.placeholder":"Ask anything: @bot, >thread, %project, #room, $skill, /btw","composer.send":"Send","composer.stop":"Stop","gpui.acct.connected":"Connected","gpui.acct.not.connected":"Not connected","gpui.acct.sign.in.expired":"Sign-in expired","gpui.ask.plan.ready":"Ready for review","gpui.ask.plan.revise":"Revise","gpui.ask.plan.reviseph":"What should change in the plan?","gpui.ask.plan.sendrev":"Send revision","gpui.b.in.reply.to":"↩ In reply to: {quote}","gpui.b.replying.to":"↩ Replying to: {line}","gpui.bots.recall.off":"Off","gpui.bots.recall.on":"On","gpui.c.solid.big.next":"Loading it may take a while and a lot of memory.","gpui.c.solid.load.big":"Load it anyway","gpui.c.solid.loading.big":"Loading it anyway…","gpui.c.term.collapse":"Collapse","gpui.c.term.expand":"Expand","gpui.commands":"Commands","gpui.e.open.folder":"Open folder","gpui.filter.projects.and.threads":"Filter projects and threads","gpui.fold.or.unfold.the.sidebar":"Fold or unfold the sidebar","gpui.follow.paused":"Following paused","gpui.follow.wait":"Following: waiting for the agent's next edit","gpui.gerbers":"Gerbers","gpui.improvements":"Improvements","gpui.jump.to.a.thread.run":"Jump to a thread, run a command or find what was said","gpui.mgmt.bom.dnp":"DNP","gpui.mgmt.bom.nompn":"no MPN","gpui.mgmt.checks.all":"All","gpui.mgmt.checks.fix":"Fix with agent","gpui.mgmt.checks.run":"Run","gpui.mgmt.close":"Close the panel","gpui.mgmt.fab.apply":"Apply","gpui.mgmt.fab.changed":"Changed since you last looked","gpui.mgmt.fab.derived":"* worked out from the fab's page (a mil in mm, a ring from a diameter). Dimmed: the rigid board's value, where this board's page says nothing else. A date opens the page it was read from.","gpui.mgmt.fab.extra":"Costs more","gpui.mgmt.fab.findings":"Findings","gpui.mgmt.fab.free":"Base price","gpui.mgmt.fab.judge":"Datasheets","gpui.mgmt.fab.limit":"Limit","gpui.mgmt.fab.readcol":"Read","gpui.mgmt.fab.refresh":"Refresh","gpui.mgmt.fab.reviewbtn":"Review","gpui.mgmt.fab.seen":"Seen","gpui.mgmt.fab.thefab":"The fab","gpui.mgmt.fab.use":"Use","gpui.mgmt.life.nopart":"No reading of this part yet.","gpui.mgmt.life.reading":"Reading its history…","gpui.mgmt.plan.addnote":"Add note","gpui.mgmt.plan.all":"Approve all","gpui.mgmt.plan.before":"Plan before routing","gpui.mgmt.plan.compact":"Compact","gpui.mgmt.plan.done":"done","gpui.mgmt.plan.drawn":"The plan's corridors and planes are drawn on the board while this panel is open. Close it to hide them.","gpui.mgmt.plan.edited":"Edited","gpui.mgmt.plan.elsewhere":"A routing plan for {board} awaits your approval","gpui.mgmt.plan.emptysub":"Layers, corridors, and planes appear here once a plan is proposed.","gpui.mgmt.plan.expand":"Expand","gpui.mgmt.plan.fit":"Fit","gpui.mgmt.plan.grid.all":"All layers","gpui.mgmt.plan.grid.pair":"Side by side","gpui.mgmt.plan.grid.single":"Single","gpui.mgmt.plan.hide":"Hide done","gpui.mgmt.plan.hint":"Drag waypoints to steer · Click + on edge to insert · Right-click vertex to remove","gpui.mgmt.plan.keysnote":"On this KiCad version, approve from this panel: in plan view KiCad's A, R and W keys aren't the plan's yet (A opens Add Footprint). Update KiCad.","gpui.mgmt.plan.layer":"Approve layer","gpui.mgmt.plan.layer.short":"Layer","gpui.mgmt.plan.lock":"Lock","gpui.mgmt.plan.locked":"Locked","gpui.mgmt.plan.noboard":"No routing plan for this board.","gpui.mgmt.plan.noitems":"No corridors or planes on this layer","gpui.mgmt.plan.note.placeholder":"Steering note for router…","gpui.mgmt.plan.nothing":"Nothing awaits your approval","gpui.mgmt.plan.offwords":"Agents route as you ask. Turn it on to have them propose a routing plan first and route only what you approve here.","gpui.mgmt.plan.onwords":"Before routing a board with 4 or more copper layers or more than 60 nets, the agent proposes corridors and plane regions here. It routes only what you approve.","gpui.mgmt.plan.reading":"Reading the routing plan…","gpui.mgmt.plan.reference":"over {layer}","gpui.mgmt.plan.refused":"KiCad refused","gpui.mgmt.plan.reject":"Reject","gpui.mgmt.plan.rejectlayer":"Reject layer","gpui.mgmt.plan.reqplain":"Approval requested","gpui.mgmt.plan.requested":"Approval requested: {what}","gpui.mgmt.plan.saved":"saved plan","gpui.mgmt.plan.show":"Show done","gpui.mgmt.plan.st.approved":"Approved","gpui.mgmt.plan.st.awaiting":"Awaiting review","gpui.mgmt.plan.st.blocked":"Blocked","gpui.mgmt.plan.st.empty":"Empty","gpui.mgmt.plan.st.partial":"Partial","gpui.mgmt.plan.st.rejected":"Rejected","gpui.mgmt.plan.st.routed":"Routed","gpui.mgmt.plan.st.routing":"Routing","gpui.mgmt.plan.st.verified":"Verified","gpui.mgmt.plan.stackup.short":"Stackup","gpui.mgmt.plan.stop":"Stop routing","gpui.mgmt.plan.sync":"Link zoom","gpui.mgmt.plan.tab":"Plan","gpui.mgmt.plan.unlock":"Unlock","gpui.mgmt.plan.verify":"Verify","gpui.mgmt.plan.view.canvas":"Canvas","gpui.mgmt.plan.view.list":"List","gpui.mgmt.plan.view.split":"Split","gpui.mgmt.plan.width":"Width","gpui.next.thread":"Next thread","gpui.no.models":"No models","gpui.nothing.matches":"Nothing matches","gpui.picker.favorite.add":"Add to favorites","gpui.picker.favorite.remove":"Remove from favorites","gpui.picker.favorites":"Favorites","gpui.planmode.bar.always":"Plan mode — explores and proposes a plan before editing","gpui.planmode.bar.executing":"Building the approved plan","gpui.planmode.bar.once":"Plan mode (1 turn) — explores and proposes a plan before editing","gpui.planmode.bar.pending":"Proposed plan awaits review below","gpui.planmode.bar.planning":"Planning — drafting a plan before edits","gpui.planmode.chip.building":"Building","gpui.planmode.chip.once":"Plan · 1t","gpui.planmode.scope.always":"Always","gpui.planmode.scope.once":"1 turn","gpui.planmode.tip":"Plan before acting (1 turn, always, or off)","gpui.planmode.top.executing":"Building plan","gpui.planmode.top.once":"Plan (1 turn)","gpui.planmode.top.pending":"Review plan","gpui.planmode.top.planning":"Planning","gpui.previous.thread":"Previous thread","gpui.rail.no.board":"No board in this project","gpui.rail.no.mech":"No mechanical parts in this project","gpui.rail.no.schematic":"No schematic in this project","gpui.rail.split.needs.both":"Split needs a board and a schematic","gpui.search.models":"Search models","gpui.settings.group.agents":"Agents and tools","gpui.settings.group.general":"General","home.away":"Home ({name}) is away","home.away.queued":"Home ({name}) is away · {n} queued","home.away.since":"Home ({name}) is away since {time}","home.away.since.queued":"Home ({name}) is away since {time} · {n} queued","home.machine":"Home machine","home.move.failed":"Home move failed","home.move.failed.note":"Home move failed: {note}","home.move.here":"Make this machine the home","home.moving":"Moving home to {to}…","home.moving.step":"Moving home to {to}: {step}","hub.back.crash":"Backplane is back after it stopped unexpectedly","hub.restarting":"Restarting Backplane…","hub.restarting.build":"Restarting Backplane… (new build {build})","hub.stopped":"Backplane stopped","ios.hub.address.field":"Hub address","menu.pin":"Pin","menu.settle":"Settle","menu.unpin":"Unpin","menu.wake":"Wake","model.col.agent":"Agent","model.col.effort":"Effort","native.pair.connect":"Connect","native.thread.model":"Model","notify.settled":"Settled","palette.archive":"Archive thread","palette.command.placeholder":"Type a command or a thread","palette.diff":"Diff: what this thread changed","palette.newthread":"New thread","palette.settings":"Settings","palette.terminal":"Terminal","palette.unarchive":"Unarchive thread","phone.unsettle":"Unsettle","provider.notice.button":"Open Settings → Accounts","provider.notice.head":"No AI provider connected","provider.notice.senderr":"No AI provider connected yet. Open Settings → Accounts to connect Claude, Codex, Antigravity, or another provider.","provider.notice.senderr.remote":"No AI provider connected on {machine}. Open Settings → Accounts on {machine} to connect Claude, Codex, Antigravity, or another provider.","provider.notice.text.none":"Connect Claude, Codex, Antigravity, or another provider to start chatting.","provider.notice.text.signedout":"Sign in to Claude, Codex, or another provider in Settings → Accounts to start chatting.","reply.action":"Reply","reply.cancel":"Cancel reply","reply.to":"In reply to:","rooms.new":"New room","secret.you":"You","settings.appearance":"Appearance","settings.lang":"Language","settings.lang.auto":"Automatic","settings.lang.en":"English","settings.lang.es":"Español","settings.lang.ja":"日本語","settings.theme":"Theme","settings.theme.dark":"Dark","settings.theme.light":"Light","sheet.rename":"Rename thread","sidebar.add.project":"Add project","sidebar.search.projects":"Search projects","thread.context.base":"Backplane","thread.context.copied":"Prompt copied.","thread.context.copy":"Copy prompt","thread.context.disable":"Disable","thread.context.enable":"Enable","thread.context.index":"Available skills index","thread.context.injected.label":"Injected project instructions","thread.context.instructions":"Instructions","thread.context.mcp":"Project MCPs","thread.context.native.note":"Backplane’s launch prompt. Native files are loaded by the provider.","thread.context.none.instructions":"No project instructions found.","thread.context.none.mcp":"No project MCP configurations found.","thread.context.reading":"Reading thread context…","thread.context.size":"{bytes} B · ≈{tokens} tokens","thread.context.skills":"Skills","thread.context.system":"System Prompt","thread.context.title":"Context & Prompt","thread.context.trust":"Trust and enable","thread.new":"New thread","tools.pinned":"Pinned","tools.retry":"Retry","tour.title.bots":"Bots","viewer.board":"Board","viewer.diff":"Diff","viewer.files":"Files","viewer.mech":"Mech","viewer.review":"Review","viewer.schematic":"Schematic","viewer.solid":"3D","web.chat.answer.btn":"Answer","web.chat.answer.placeholder":"Type answer…","web.chat.answered":"Answered: {answer}","web.chat.choose":"Choose a project thread on the left to begin.","web.chat.empty":"No messages yet. Type below to start a turn.","web.chat.finished":"Finished {time}","web.chat.finished.dur":"Finished {time} · {dur}","web.chat.loading":"Loading messages…","web.chat.review.mode":"Review mode","web.chat.streaming":"Streaming…","web.clone.add.dir":"Add {dir}","web.clone.back":"Back","web.clone.change.folder":"Change folder","web.clone.cloned":"Cloned {repo} into {dest}","web.clone.cloning":"Cloning {repo} into {dest}","web.clone.copied":"Copied","web.clone.first":"First message: {text}","web.clone.folder.name":"Folder name","web.clone.go":"Clone","web.clone.loading":"Loading…","web.clone.no.folders":"No folders here","web.clone.open.project":"Open the project","web.clone.open.thread":"Open the thread","web.clone.private":"private","web.clone.repo.placeholder":"https or ssh URL, or owner/repo","web.clone.retry":"Try again","web.clone.same":"Already cloned there: it is added as it is.","web.clone.signin":"Sign in to GitHub","web.clone.signin.done":"Signed in to GitHub","web.clone.signin.enter":"Enter this code on GitHub:","web.clone.signin.wait":"Starting GitHub sign-in…","web.clone.start.thread":"Start a thread","web.clone.stopped":"Stopped cloning {repo}","web.clone.tab":"Clone from git","web.clone.up":"Up","web.clone.use.dir":"Use {dir}","web.composer.attach":"Attach image","web.composer.maximages":"At most {max} images per message.","web.composer.unsupported":"Unsupported image type: {type}","web.composer.voice":"Voice dictation","web.logout.failed":"Could not confirm sign-out. Try again.","web.pair.approve.in":"Approve on desktop or paired phone · expires in {time}","web.pair.approved":"Approved. Opening Backplane…","web.pair.cancelled":"Cancelled.","web.pair.code":"Comparison code","web.pair.denied":"Pairing request was denied.","web.pair.expired":"Pairing code expired. Request a new code to try again.","web.pair.failed":"Pairing request failed ({status})","web.pair.name":"Browser name","web.pair.nocode":"Hub did not return a comparison code.","web.pair.ratelimited":"Too many pairing attempts. Wait a moment and try again.","web.pair.request":"Request pairing","web.pair.requesting":"Requesting pairing code…","web.pair.subtitle":"Pair this browser with your hub. Approve the 6-digit code in Backplane › Settings › Devices.","web.pair.unreachable":"Could not reach the hub. Check your tailnet connection.","web.plan.awaiting":"{n} awaiting approval","web.plan.net.one":"1 net","web.plan.nets":"{n} nets","web.settings.providers":"AI providers","web.settings.providers.browser":"Connect a provider in the Backplane desktop or mobile app under Settings → Accounts."},es:{"agy.signout":"Cerrar sesión","android.hub.machines.approve":"Aprobar","android.load.earlier":"cargar anteriores","approval.dismiss":"Descartar","approval.implement":"Implementar","ask.plan":"Plan propuesto","bots.new":"Nuevo bot","bots.rooms":"Salas","bots.tab.browser":"Navegador","common.cancel":"Cancelar","common.close":"Cerrar","common.copy":"Copiar","common.delete":"Eliminar","common.refresh":"Actualizar","common.remove":"Quitar","common.save":"Guardar","composer.model.tip":"Elegir el modelo y el esfuerzo","composer.placeholder":"Pregunta lo que sea: @bot, >hilo, %proyecto, #sala, $skill, /btw","composer.send":"Enviar","composer.stop":"Detener","gpui.acct.connected":"Conectado","gpui.acct.not.connected":"No conectado","gpui.acct.sign.in.expired":"Sesión caducada","gpui.ask.plan.ready":"Listo para revisar","gpui.ask.plan.revise":"Revisar","gpui.ask.plan.reviseph":"¿Qué debería cambiar en el plan?","gpui.ask.plan.sendrev":"Enviar revisión","gpui.b.in.reply.to":"↩ En respuesta a: {quote}","gpui.b.replying.to":"↩ Respondiendo a: {line}","gpui.bots.recall.off":"Desactivado","gpui.bots.recall.on":"Activado","gpui.c.solid.big.next":"Cargarlo puede tardar y usar mucha memoria.","gpui.c.solid.load.big":"Cargarlo de todos modos","gpui.c.solid.loading.big":"Cargándolo de todos modos…","gpui.c.term.collapse":"Contraer","gpui.c.term.expand":"Expandir","gpui.commands":"Comandos","gpui.e.open.folder":"Abrir carpeta","gpui.filter.projects.and.threads":"Filtrar proyectos e hilos","gpui.fold.or.unfold.the.sidebar":"Plegar o desplegar la barra lateral","gpui.follow.paused":"Seguimiento en pausa","gpui.follow.wait":"Siguiendo: esperando la próxima edición del agente","gpui.gerbers":"Gerbers","gpui.improvements":"Mejoras","gpui.jump.to.a.thread.run":"Saltar a un hilo, ejecutar un comando o buscar lo dicho","gpui.mgmt.bom.dnp":"DNP","gpui.mgmt.bom.nompn":"sin MPN","gpui.mgmt.checks.all":"Todas","gpui.mgmt.checks.fix":"Corregir con agente","gpui.mgmt.checks.run":"Ejecutar","gpui.mgmt.close":"Cerrar el panel","gpui.mgmt.fab.apply":"Aplicar","gpui.mgmt.fab.changed":"Cambió desde la última vez que miraste","gpui.mgmt.fab.derived":"* calculado desde la página del fabricante (un mil en mm, un anillo desde un diámetro). Atenuado: el valor de la placa rígida, cuando la página de esta placa no dice otra cosa. Una fecha abre la página de la que se leyó.","gpui.mgmt.fab.extra":"Cuesta más","gpui.mgmt.fab.findings":"Hallazgos","gpui.mgmt.fab.free":"Precio base","gpui.mgmt.fab.judge":"Hojas de datos","gpui.mgmt.fab.limit":"Límite","gpui.mgmt.fab.readcol":"Leído","gpui.mgmt.fab.refresh":"Actualizar","gpui.mgmt.fab.reviewbtn":"Revisar","gpui.mgmt.fab.seen":"Visto","gpui.mgmt.fab.thefab":"El fabricante","gpui.mgmt.fab.use":"Usar","gpui.mgmt.life.nopart":"Sin lectura de esta pieza aún.","gpui.mgmt.life.reading":"Leyendo su historial…","gpui.mgmt.plan.addnote":"Añadir nota","gpui.mgmt.plan.all":"Aprobar todo","gpui.mgmt.plan.before":"Planificar antes de rutear","gpui.mgmt.plan.compact":"Compacto","gpui.mgmt.plan.done":"hecho","gpui.mgmt.plan.drawn":"Los corredores y planos del plan se dibujan en la placa mientras este panel está abierto. Ciérralo para ocultarlos.","gpui.mgmt.plan.edited":"Editado","gpui.mgmt.plan.elsewhere":"Un plan de ruteo para {board} espera tu aprobación","gpui.mgmt.plan.emptysub":"Las capas, corredores y planos aparecerán aquí cuando se proponga un plan.","gpui.mgmt.plan.expand":"Expandir","gpui.mgmt.plan.fit":"Ajustar","gpui.mgmt.plan.grid.all":"Todas las capas","gpui.mgmt.plan.grid.pair":"Lado a lado","gpui.mgmt.plan.grid.single":"Única","gpui.mgmt.plan.hide":"Ocultar hechos","gpui.mgmt.plan.hint":"Arrastra vértices para guiar · Clic en + del borde para insertar · Clic derecho en vértice para quitar","gpui.mgmt.plan.keysnote":"En esta versión de KiCad, aprueba desde este panel: en la vista de plan las teclas A, R y W de KiCad aún no son del plan (A abre Añadir Huella). Actualiza KiCad.","gpui.mgmt.plan.layer":"Aprobar capa","gpui.mgmt.plan.layer.short":"Capa","gpui.mgmt.plan.lock":"Bloquear","gpui.mgmt.plan.locked":"Bloqueado","gpui.mgmt.plan.noboard":"No hay plan de ruteo para esta placa.","gpui.mgmt.plan.noitems":"Sin corredores ni planos en esta capa","gpui.mgmt.plan.note.placeholder":"Nota de guiado para el router…","gpui.mgmt.plan.nothing":"Nada espera tu aprobación","gpui.mgmt.plan.offwords":"Los agentes rutean como les pidas. Actívalo para que primero propongan un plan de ruteo y ruteen solo lo que apruebes aquí.","gpui.mgmt.plan.onwords":"Antes de rutear una placa con 4 o más capas de cobre o más de 60 redes, el agente propone aquí corredores y regiones de plano. Solo rutea lo que apruebes.","gpui.mgmt.plan.reading":"Leyendo el plan de ruteo…","gpui.mgmt.plan.reference":"sobre {layer}","gpui.mgmt.plan.refused":"KiCad lo rechazó","gpui.mgmt.plan.reject":"Rechazar","gpui.mgmt.plan.rejectlayer":"Rechazar capa","gpui.mgmt.plan.reqplain":"Aprobación solicitada","gpui.mgmt.plan.requested":"Aprobación solicitada: {what}","gpui.mgmt.plan.saved":"plan guardado","gpui.mgmt.plan.show":"Mostrar hechos","gpui.mgmt.plan.st.approved":"Aprobado","gpui.mgmt.plan.st.awaiting":"Esperando revisión","gpui.mgmt.plan.st.blocked":"Bloqueado","gpui.mgmt.plan.st.empty":"Vacío","gpui.mgmt.plan.st.partial":"Parcial","gpui.mgmt.plan.st.rejected":"Rechazado","gpui.mgmt.plan.st.routed":"Ruteado","gpui.mgmt.plan.st.routing":"Ruteando","gpui.mgmt.plan.st.verified":"Verificado","gpui.mgmt.plan.stackup.short":"Apilamiento","gpui.mgmt.plan.stop":"Detener ruteo","gpui.mgmt.plan.sync":"Vincular zoom","gpui.mgmt.plan.tab":"Plan","gpui.mgmt.plan.unlock":"Desbloquear","gpui.mgmt.plan.verify":"Verificar","gpui.mgmt.plan.view.canvas":"Lienzo","gpui.mgmt.plan.view.list":"Lista","gpui.mgmt.plan.view.split":"Dividido","gpui.mgmt.plan.width":"Ancho","gpui.next.thread":"Hilo siguiente","gpui.no.models":"Sin modelos","gpui.nothing.matches":"Nada coincide","gpui.picker.favorite.add":"Añadir a favoritos","gpui.picker.favorite.remove":"Quitar de favoritos","gpui.picker.favorites":"Favoritos","gpui.planmode.bar.always":"Modo plan — explora y propone un plan antes de editar","gpui.planmode.bar.executing":"Ejecutando el plan aprobado","gpui.planmode.bar.once":"Modo plan (1 turno) — explora y propone un plan antes de editar","gpui.planmode.bar.pending":"El plan propuesto espera revisión abajo","gpui.planmode.bar.planning":"Planificando — redactando un plan antes de editar","gpui.planmode.chip.building":"Ejecutando","gpui.planmode.chip.once":"Plan · 1t","gpui.planmode.scope.always":"Siempre","gpui.planmode.scope.once":"1 turno","gpui.planmode.tip":"Planificar antes de actuar (1 turno, siempre u off)","gpui.planmode.top.executing":"Ejecutando plan","gpui.planmode.top.once":"Plan (1 turno)","gpui.planmode.top.pending":"Revisar plan","gpui.planmode.top.planning":"Planificando","gpui.previous.thread":"Hilo anterior","gpui.rail.no.board":"Este proyecto no tiene placa","gpui.rail.no.mech":"Este proyecto no tiene piezas mecánicas","gpui.rail.no.schematic":"Este proyecto no tiene esquema","gpui.rail.split.needs.both":"La vista dividida requiere una placa y un esquema","gpui.search.models":"Buscar modelos","gpui.settings.group.agents":"Agentes y herramientas","gpui.settings.group.general":"General","home.away":"El inicio ({name}) no está disponible","home.away.queued":"El inicio ({name}) no está disponible · {n} en cola","home.away.since":"El inicio ({name}) no está disponible desde las {time}","home.away.since.queued":"El inicio ({name}) no está disponible desde las {time} · {n} en cola","home.machine":"Máquina de inicio","home.move.failed":"No se pudo mover el inicio","home.move.failed.note":"No se pudo mover el inicio: {note}","home.move.here":"Hacer de esta máquina el inicio","home.moving":"Moviendo el inicio a {to}…","home.moving.step":"Moviendo el inicio a {to}: {step}","hub.back.crash":"Backplane volvió tras detenerse de forma inesperada","hub.restarting":"Reiniciando Backplane…","hub.restarting.build":"Reiniciando Backplane… (nueva compilación {build})","hub.stopped":"Backplane se detuvo","ios.hub.address.field":"Dirección del hub","menu.pin":"Fijar","menu.settle":"Cerrar","menu.unpin":"Desfijar","menu.wake":"Despertar","model.col.agent":"Agente","model.col.effort":"Esfuerzo","native.pair.connect":"Conectar","native.thread.model":"Modelo","notify.settled":"Cerrado","palette.archive":"Archivar hilo","palette.command.placeholder":"Escribe un comando o un hilo","palette.diff":"Diff: qué cambió este hilo","palette.newthread":"Nuevo hilo","palette.settings":"Ajustes","palette.terminal":"Terminal","palette.unarchive":"Desarchivar hilo","phone.unsettle":"Reabrir","provider.notice.button":"Abrir Configuración → Cuentas","provider.notice.head":"No hay ningún proveedor de IA conectado","provider.notice.senderr":"Aún no hay ningún proveedor de IA conectado. Abre Configuración → Cuentas para conectar Claude, Codex, Antigravity u otro proveedor.","provider.notice.senderr.remote":"No hay ningún proveedor de IA conectado en {machine}. Abre Configuración → Cuentas en {machine} para conectar Claude, Codex, Antigravity u otro proveedor.","provider.notice.text.none":"Conecta Claude, Codex, Antigravity u otro proveedor para empezar a chatear.","provider.notice.text.signedout":"Inicia sesión en Claude, Codex u otro proveedor en Configuración → Cuentas para empezar a chatear.","reply.action":"Responder","reply.cancel":"Cancelar respuesta","reply.to":"En respuesta a:","rooms.new":"Nueva sala","secret.you":"Tú","settings.appearance":"Apariencia","settings.lang":"Idioma","settings.lang.auto":"Automático","settings.lang.en":"English","settings.lang.es":"Español","settings.lang.ja":"日本語","settings.theme":"Tema","settings.theme.dark":"Oscuro","settings.theme.light":"Claro","sheet.rename":"Renombrar hilo","sidebar.add.project":"Añadir proyecto","sidebar.search.projects":"Buscar proyectos","thread.context.base":"Backplane","thread.context.copied":"Se copiaron las instrucciones.","thread.context.copy":"Copiar instrucciones","thread.context.disable":"Desactivar","thread.context.enable":"Activar","thread.context.index":"Índice de habilidades disponibles","thread.context.injected.label":"Instrucciones del proyecto añadidas","thread.context.instructions":"Instrucciones","thread.context.mcp":"MCP del proyecto","thread.context.native.note":"Instrucciones de inicio de Backplane. El proveedor carga los archivos nativos.","thread.context.none.instructions":"No se encontraron instrucciones del proyecto.","thread.context.none.mcp":"No se encontraron configuraciones MCP del proyecto.","thread.context.reading":"Leyendo el contexto del hilo…","thread.context.size":"{bytes} B · ≈{tokens} tokens","thread.context.skills":"Habilidades","thread.context.system":"Instrucciones del sistema","thread.context.title":"Contexto e instrucciones","thread.context.trust":"Confiar y activar","thread.new":"Nuevo hilo","tools.pinned":"Fijado","tools.retry":"Reintentar","tour.title.bots":"Bots","viewer.board":"Placa","viewer.diff":"Diff","viewer.files":"Archivos","viewer.mech":"Mech","viewer.review":"Revisión","viewer.schematic":"Esquemático","viewer.solid":"3D","web.chat.answer.btn":"Responder","web.chat.answer.placeholder":"Escribe una respuesta…","web.chat.answered":"Respondido: {answer}","web.chat.choose":"Elige un hilo de proyecto a la izquierda para empezar.","web.chat.empty":"Aún no hay mensajes. Escribe abajo para iniciar un turno.","web.chat.finished":"Terminado {time}","web.chat.finished.dur":"Terminado {time} · {dur}","web.chat.loading":"Cargando mensajes…","web.chat.review.mode":"Modo de revisión","web.chat.streaming":"Transmitiendo…","web.clone.add.dir":"Añadir {dir}","web.clone.back":"Atrás","web.clone.change.folder":"Cambiar carpeta","web.clone.cloned":"{repo} clonado en {dest}","web.clone.cloning":"Clonando {repo} en {dest}","web.clone.copied":"Copiado","web.clone.first":"Primer mensaje: {text}","web.clone.folder.name":"Nombre de la carpeta","web.clone.go":"Clonar","web.clone.loading":"Cargando…","web.clone.no.folders":"No hay carpetas aquí","web.clone.open.project":"Abrir el proyecto","web.clone.open.thread":"Abrir el hilo","web.clone.private":"privado","web.clone.repo.placeholder":"URL https o ssh, o propietario/repositorio","web.clone.retry":"Reintentar","web.clone.same":"Ya está clonado ahí: se añade tal cual.","web.clone.signin":"Iniciar sesión en GitHub","web.clone.signin.done":"Sesión iniciada en GitHub","web.clone.signin.enter":"Introduce este código en GitHub:","web.clone.signin.wait":"Iniciando sesión en GitHub…","web.clone.start.thread":"Empezar un hilo","web.clone.stopped":"Se detuvo la clonación de {repo}","web.clone.tab":"Clonar desde git","web.clone.up":"Subir","web.clone.use.dir":"Usar {dir}","web.composer.attach":"Adjuntar imagen","web.composer.maximages":"Como máximo {max} imágenes por mensaje.","web.composer.unsupported":"Tipo de imagen no compatible: {type}","web.composer.voice":"Dictado por voz","web.logout.failed":"No se pudo confirmar el cierre de sesión. Inténtalo de nuevo.","web.pair.approve.in":"Aprueba en el escritorio o en un teléfono vinculado · caduca en {time}","web.pair.approved":"Aprobado. Abriendo Backplane…","web.pair.cancelled":"Cancelado.","web.pair.code":"Código de comparación","web.pair.denied":"Se rechazó la solicitud de vinculación.","web.pair.expired":"El código de vinculación caducó. Solicita uno nuevo para intentarlo otra vez.","web.pair.failed":"Falló la solicitud de vinculación ({status})","web.pair.name":"Nombre del navegador","web.pair.nocode":"El hub no devolvió un código de comparación.","web.pair.ratelimited":"Demasiados intentos de vinculación. Espera un momento e inténtalo de nuevo.","web.pair.request":"Solicitar vinculación","web.pair.requesting":"Solicitando código de vinculación…","web.pair.subtitle":"Vincula este navegador con tu hub. Aprueba el código de 6 dígitos en Backplane › Ajustes › Dispositivos.","web.pair.unreachable":"No se pudo conectar con el hub. Comprueba tu conexión de tailnet.","web.plan.awaiting":"{n} esperando aprobación","web.plan.net.one":"1 red","web.plan.nets":"{n} redes","web.settings.providers":"Proveedores de IA","web.settings.providers.browser":"Conecta un proveedor en la aplicación de escritorio o móvil de Backplane en Configuración → Cuentas."},ja:{"agy.signout":"サインアウト","android.hub.machines.approve":"承認","android.load.earlier":"以前のメッセージを読み込む","approval.dismiss":"閉じる","approval.implement":"実装","ask.plan":"提案されたプラン","bots.new":"新しいボット","bots.rooms":"ルーム","bots.tab.browser":"ブラウザ","common.cancel":"キャンセル","common.close":"閉じる","common.copy":"コピー","common.delete":"削除","common.refresh":"更新","common.remove":"削除","common.save":"保存","composer.model.tip":"モデルと推論の強さを選択","composer.placeholder":"何でも質問:@bot、>thread、%project、#room、$skill、/btw","composer.send":"送信","composer.stop":"停止","gpui.acct.connected":"接続済み","gpui.acct.not.connected":"未接続","gpui.acct.sign.in.expired":"サインインの期限切れ","gpui.ask.plan.ready":"確認待ち","gpui.ask.plan.revise":"修正","gpui.ask.plan.reviseph":"計画のどこを変更しますか?","gpui.ask.plan.sendrev":"修正を送る","gpui.b.in.reply.to":"↩ 返信先:{quote}","gpui.b.replying.to":"↩ 返信中:{line}","gpui.bots.recall.off":"オフ","gpui.bots.recall.on":"オン","gpui.c.solid.big.next":"読み込みには時間と多くのメモリがかかることがあります。","gpui.c.solid.load.big":"それでも読み込む","gpui.c.solid.loading.big":"それでも読み込み中…","gpui.c.term.collapse":"折りたたむ","gpui.c.term.expand":"展開","gpui.commands":"コマンド","gpui.e.open.folder":"フォルダを開く","gpui.filter.projects.and.threads":"プロジェクトとスレッドを絞り込む","gpui.fold.or.unfold.the.sidebar":"サイドバーを折りたたむ/開く","gpui.follow.paused":"追従を一時停止中","gpui.follow.wait":"追従中: エージェントの次の編集を待っています","gpui.gerbers":"ガーバー","gpui.improvements":"改善","gpui.jump.to.a.thread.run":"スレッドへ移動、コマンドを実行、または発言を検索","gpui.mgmt.bom.dnp":"実装しない","gpui.mgmt.bom.nompn":"MPNなし","gpui.mgmt.checks.all":"すべて","gpui.mgmt.checks.fix":"エージェントに直してもらう","gpui.mgmt.checks.run":"実行","gpui.mgmt.close":"パネルを閉じる","gpui.mgmt.fab.apply":"適用","gpui.mgmt.fab.changed":"前回見てから変わったところ","gpui.mgmt.fab.derived":"* 製造元のページから計算した値です(milをmmに、径からランドを)。薄い色の項目はリジッド基板の値です(この基板のページに記載がないもの)。日付を押すと読んだページが開きます。","gpui.mgmt.fab.extra":"追加料金","gpui.mgmt.fab.findings":"指摘","gpui.mgmt.fab.free":"基本料金","gpui.mgmt.fab.judge":"データシート","gpui.mgmt.fab.limit":"項目","gpui.mgmt.fab.readcol":"読んだ日","gpui.mgmt.fab.refresh":"再読み込み","gpui.mgmt.fab.reviewbtn":"レビュー","gpui.mgmt.fab.seen":"確認済み","gpui.mgmt.fab.thefab":"製造元","gpui.mgmt.fab.use":"使う","gpui.mgmt.life.nopart":"この部品の記録はまだありません。","gpui.mgmt.life.reading":"履歴を読んでいます…","gpui.mgmt.plan.addnote":"メモを追加","gpui.mgmt.plan.all":"すべて承認","gpui.mgmt.plan.before":"配線前に計画する","gpui.mgmt.plan.compact":"標準","gpui.mgmt.plan.done":"完了","gpui.mgmt.plan.drawn":"計画の配線経路とプレーンは、このパネルを開いている間だけ基板上に表示されます。閉じると消えます。","gpui.mgmt.plan.edited":"編集済み","gpui.mgmt.plan.elsewhere":"{board}の配線計画が承認を待っています","gpui.mgmt.plan.emptysub":"計画が提案されると、レイヤー・コリドー・ベタ領域がここに表示されます。","gpui.mgmt.plan.expand":"拡大","gpui.mgmt.plan.fit":"全体表示","gpui.mgmt.plan.grid.all":"全レイヤー","gpui.mgmt.plan.grid.pair":"並べて表示","gpui.mgmt.plan.grid.single":"単一","gpui.mgmt.plan.hide":"完了を隠す","gpui.mgmt.plan.hint":"頂点をドラッグして誘導 · 辺の + をクリックで追加 · 頂点を右クリックで削除","gpui.mgmt.plan.keysnote":"このバージョンのKiCadでは、このパネルから承認してください。プランビューでのKiCadのA・R・Wキーはまだ計画のものではありません(Aはフットプリントの追加を開きます)。KiCadを更新してください。","gpui.mgmt.plan.layer":"層を承認","gpui.mgmt.plan.layer.short":"レイヤー","gpui.mgmt.plan.lock":"ロック","gpui.mgmt.plan.locked":"ロック中","gpui.mgmt.plan.noboard":"この基板の配線計画はありません。","gpui.mgmt.plan.noitems":"このレイヤーにコリドーまたはプレーンがありません","gpui.mgmt.plan.note.placeholder":"ルーターへの指示メモ…","gpui.mgmt.plan.nothing":"承認待ちはありません","gpui.mgmt.plan.offwords":"エージェントは指示どおりに配線します。オンにすると、まず配線計画を提案し、ここで承認したものだけを配線します。","gpui.mgmt.plan.onwords":"銅箔層が4層以上、またはネットが60本を超える基板では、配線の前にエージェントがここで配線経路とプレーン領域を提案します。承認したものだけを配線します。","gpui.mgmt.plan.reading":"配線計画を読んでいます…","gpui.mgmt.plan.reference":"基準 {layer}","gpui.mgmt.plan.refused":"KiCad が拒否しました","gpui.mgmt.plan.reject":"却下","gpui.mgmt.plan.rejectlayer":"レイヤーを却下","gpui.mgmt.plan.reqplain":"承認が求められています","gpui.mgmt.plan.requested":"承認が求められています: {what}","gpui.mgmt.plan.saved":"保存された計画","gpui.mgmt.plan.show":"完了を表示","gpui.mgmt.plan.st.approved":"承認済み","gpui.mgmt.plan.st.awaiting":"承認待ち","gpui.mgmt.plan.st.blocked":"ブロック","gpui.mgmt.plan.st.empty":"空","gpui.mgmt.plan.st.partial":"一部完了","gpui.mgmt.plan.st.rejected":"却下","gpui.mgmt.plan.st.routed":"配線済み","gpui.mgmt.plan.st.routing":"配線中","gpui.mgmt.plan.st.verified":"検証済み","gpui.mgmt.plan.stackup.short":"スタックアップ","gpui.mgmt.plan.stop":"配線を止める","gpui.mgmt.plan.sync":"ズーム連動","gpui.mgmt.plan.tab":"計画","gpui.mgmt.plan.unlock":"ロック解除","gpui.mgmt.plan.verify":"検証","gpui.mgmt.plan.view.canvas":"キャンバス","gpui.mgmt.plan.view.list":"リスト","gpui.mgmt.plan.view.split":"分割","gpui.mgmt.plan.width":"幅","gpui.next.thread":"次のスレッド","gpui.no.models":"モデルがありません","gpui.nothing.matches":"一致するものはありません","gpui.picker.favorite.add":"お気に入りに追加","gpui.picker.favorite.remove":"お気に入りから外す","gpui.picker.favorites":"お気に入り","gpui.planmode.bar.always":"計画モード — 編集前に調査して計画を提案します","gpui.planmode.bar.executing":"承認された計画を実行しています","gpui.planmode.bar.once":"計画モード (1回) — 編集前に調査して計画を提案します","gpui.planmode.bar.pending":"提案された計画が下のレビューを待っています","gpui.planmode.bar.planning":"計画中 — 編集前の計画を作成しています","gpui.planmode.chip.building":"実行中","gpui.planmode.chip.once":"計画 · 1回","gpui.planmode.scope.always":"常時","gpui.planmode.scope.once":"1回","gpui.planmode.tip":"実行前に計画を作成 (1回・常時・オフ)","gpui.planmode.top.executing":"計画を実行中","gpui.planmode.top.once":"計画 (1回)","gpui.planmode.top.pending":"計画を確認","gpui.planmode.top.planning":"計画中","gpui.previous.thread":"前のスレッド","gpui.rail.no.board":"このプロジェクトには基板がありません","gpui.rail.no.mech":"このプロジェクトには機械部品がありません","gpui.rail.no.schematic":"このプロジェクトには回路図がありません","gpui.rail.split.needs.both":"分割表示には基板と回路図が必要です","gpui.search.models":"モデルを検索","gpui.settings.group.agents":"エージェントとツール","gpui.settings.group.general":"一般","home.away":"ホーム({name})はオフラインです","home.away.queued":"ホーム({name})はオフラインです · {n} 件待機中","home.away.since":"ホーム({name})は {time} からオフラインです","home.away.since.queued":"ホーム({name})は {time} からオフラインです · {n} 件待機中","home.machine":"ホームマシン","home.move.failed":"ホームの移動に失敗しました","home.move.failed.note":"ホームの移動に失敗しました: {note}","home.move.here":"このマシンをホームにする","home.moving":"ホームを {to} へ移動中…","home.moving.step":"ホームを {to} へ移動中: {step}","hub.back.crash":"予期せず停止したBackplaneが戻りました","hub.restarting":"Backplaneを再起動しています…","hub.restarting.build":"Backplaneを再起動しています…(新しいビルド {build})","hub.stopped":"Backplaneは停止しました","ios.hub.address.field":"ハブのアドレス","menu.pin":"ピン留め","menu.settle":"完了","menu.unpin":"ピン留めを解除","menu.wake":"再開","model.col.agent":"エージェント","model.col.effort":"推論の強さ","native.pair.connect":"接続","native.thread.model":"モデル","notify.settled":"完了","palette.archive":"スレッドをアーカイブ","palette.command.placeholder":"コマンドまたはスレッドを入力","palette.diff":"差分:このスレッドの変更","palette.newthread":"新しいスレッド","palette.settings":"設定","palette.terminal":"ターミナル","palette.unarchive":"スレッドのアーカイブを解除","phone.unsettle":"未完了に戻す","provider.notice.button":"設定 → アカウントを開く","provider.notice.head":"AI プロバイダーが接続されていません","provider.notice.senderr":"AI プロバイダーがまだ接続されていません。設定 → アカウントを開いて、Claude、Codex、Antigravity などのプロバイダーを接続してください。","provider.notice.senderr.remote":"{machine} に AI プロバイダーが接続されていません。{machine} で設定 → アカウントを開いて、Claude、Codex、Antigravity などのプロバイダーを接続してください。","provider.notice.text.none":"チャットを始めるには、Claude、Codex、Antigravity などのプロバイダーを接続してください。","provider.notice.text.signedout":"チャットを始めるには、設定 → アカウントで Claude、Codex などのプロバイダーにサインインしてください。","reply.action":"返信","reply.cancel":"返信をやめる","reply.to":"返信先:","rooms.new":"新しいルーム","secret.you":"あなた","settings.appearance":"外観","settings.lang":"言語","settings.lang.auto":"自動","settings.lang.en":"English","settings.lang.es":"Español","settings.lang.ja":"日本語","settings.theme":"テーマ","settings.theme.dark":"ダーク","settings.theme.light":"ライト","sheet.rename":"スレッド名を変更","sidebar.add.project":"プロジェクトを追加","sidebar.search.projects":"プロジェクトを検索","thread.context.base":"Backplane","thread.context.copied":"プロンプトをコピーしました。","thread.context.copy":"プロンプトをコピー","thread.context.disable":"無効にする","thread.context.enable":"有効にする","thread.context.index":"利用可能なスキルの一覧","thread.context.injected.label":"追加されたプロジェクトの指示","thread.context.instructions":"指示","thread.context.mcp":"プロジェクトの MCP","thread.context.native.note":"Backplane が起動時に渡すプロンプトです。ネイティブファイルはプロバイダーが読み込みます。","thread.context.none.instructions":"プロジェクトの指示が見つかりません。","thread.context.none.mcp":"プロジェクトの MCP 設定が見つかりません。","thread.context.reading":"スレッドのコンテキストを読み込み中…","thread.context.size":"{bytes} B・約{tokens}トークン","thread.context.skills":"スキル","thread.context.system":"システムプロンプト","thread.context.title":"コンテキストとプロンプト","thread.context.trust":"承認して有効にする","thread.new":"新しいスレッド","tools.pinned":"固定中","tools.retry":"再試行","tour.title.bots":"ボット","viewer.board":"基板","viewer.diff":"差分","viewer.files":"ファイル","viewer.mech":"Mech","viewer.review":"レビュー","viewer.schematic":"回路図","viewer.solid":"3D","web.chat.answer.btn":"回答","web.chat.answer.placeholder":"回答を入力…","web.chat.answered":"回答済み: {answer}","web.chat.choose":"左側からプロジェクトのスレッドを選んで開始してください。","web.chat.empty":"まだメッセージはありません。下に入力して開始してください。","web.chat.finished":"完了 {time}","web.chat.finished.dur":"完了 {time} · {dur}","web.chat.loading":"メッセージを読み込んでいます…","web.chat.review.mode":"レビューモード","web.chat.streaming":"受信中…","web.clone.add.dir":"{dir} を追加","web.clone.back":"戻る","web.clone.change.folder":"フォルダを変更","web.clone.cloned":"{repo} を {dest} にクローンしました","web.clone.cloning":"{repo} を {dest} にクローン中","web.clone.copied":"コピーしました","web.clone.first":"最初のメッセージ: {text}","web.clone.folder.name":"フォルダ名","web.clone.go":"クローン","web.clone.loading":"読み込み中…","web.clone.no.folders":"フォルダがありません","web.clone.open.project":"プロジェクトを開く","web.clone.open.thread":"スレッドを開く","web.clone.private":"非公開","web.clone.repo.placeholder":"https / ssh の URL、または owner/repo","web.clone.retry":"もう一度","web.clone.same":"すでにそこにクローンされています: そのまま追加します。","web.clone.signin":"GitHub にサインイン","web.clone.signin.done":"GitHub にサインインしました","web.clone.signin.enter":"このコードを GitHub に入力してください:","web.clone.signin.wait":"GitHub のサインインを開始しています…","web.clone.start.thread":"スレッドを開始","web.clone.stopped":"{repo} のクローンを中止しました","web.clone.tab":"git からクローン","web.clone.up":"上へ","web.clone.use.dir":"{dir} を使う","web.composer.attach":"画像を添付","web.composer.maximages":"1 件のメッセージに添付できる画像は最大 {max} 枚です。","web.composer.unsupported":"未対応の画像形式です: {type}","web.composer.voice":"音声入力","web.logout.failed":"サインアウトを確認できませんでした。もう一度お試しください。","web.pair.approve.in":"デスクトップまたはペアリング済みの端末で承認してください · 有効期限 {time}","web.pair.approved":"承認されました。Backplane を開いています…","web.pair.cancelled":"キャンセルしました。","web.pair.code":"確認コード","web.pair.denied":"ペアリングのリクエストが拒否されました。","web.pair.expired":"ペアリングコードの有効期限が切れました。新しいコードをリクエストしてください。","web.pair.failed":"ペアリングのリクエストに失敗しました ({status})","web.pair.name":"ブラウザー名","web.pair.nocode":"ハブから確認コードが返されませんでした。","web.pair.ratelimited":"ペアリングの試行回数が多すぎます。しばらく待ってからやり直してください。","web.pair.request":"ペアリングをリクエスト","web.pair.requesting":"ペアリングコードをリクエストしています…","web.pair.subtitle":"このブラウザーをハブとペアリングします。Backplane › 設定 › デバイス で 6 桁のコードを承認してください。","web.pair.unreachable":"ハブに接続できませんでした。tailnet の接続を確認してください。","web.plan.awaiting":"{n} 件が承認待ち","web.plan.net.one":"1 ネット","web.plan.nets":"{n} ネット","web.settings.providers":"AI プロバイダー","web.settings.providers.browser":"Backplane のデスクトップまたはモバイルアプリの設定 → アカウントからプロバイダーを接続してください。"}};function Q(a,t){if(!t)return a;return a.replace(/\{([a-zA-Z0-9_.-]+)\}/g,(s,r)=>Object.prototype.hasOwnProperty.call(t,r)?String(t[r]):s)}var F=te(),W=new Set,V=new Map;for(let[a,t]of Object.entries(U.en||{}))if(typeof t==="string"&&!V.has(t))V.set(t,a);function te(){let a=typeof navigator<"u"&&navigator.language?navigator.language.toLowerCase():"en";if(a.startsWith("ja"))return"ja";if(a.startsWith("es"))return"es";return"en"}function Y(){if(typeof document<"u"&&document.documentElement)document.documentElement.lang=F}Y();function me(a){return W.add(a),()=>{W.delete(a)}}function ue(a){if(!a)return!1;let t=a.toLowerCase(),s=t.startsWith("ja")?"ja":t.startsWith("es")?"es":t.startsWith("en")?"en":"";if(!s)return!1;let r=s!==F;if(F=s,Y(),r)for(let d of W)d(F);return r}function c(a,t,s){let d=(U[F]||U.en||{})[a]??U.en?.[a]??t??a;return Q(d,s)}function ge(a){if(!a)return"";let t=V.get(a);if(!t)return a;return c(t,a)}var ae=[[1,26,7,1,[]],[2,44,10,1,[6,18]],[3,70,15,1,[6,22]],[4,100,20,1,[6,26]],[5,134,26,1,[6,30]],[6,172,18,2,[6,34]]],O=new Uint8Array(512),_=new Uint8Array(256);{let a=1;for(let t=0;t<255;t++)if(O[t]=a,_[a]=t,a<<=1,a&256)a^=285;for(let t=255;t<512;t++)O[t]=O[t-255]}function J(a,t){return a===0||t===0?0:O[_[a]+_[t]]}function ne(a){let t=new Uint8Array([1]);for(let s=0;s{let m=e-i*n;return Math.ceil((12+t.length*8)/8)<=m});if(!s)return null;let[r,d,u,f,j]=s,w=d-u*f,g=[],S=(e,i)=>{for(let n=i-1;n>=0;n--)g.push(e>>>n&1)};S(4,4),S(t.length,8);for(let e of t)S(e,8);for(let e=0;e<4&&g.length{if(e<0||i<0||e>=p||i>=p)return;H[e*p+i]=n?1:0,A[e*p+i]=1},N=(e,i)=>{for(let n=-1;n<=7;n++)for(let m=-1;m<=7;m++){let k=e+n,l=i+m,o=n>=0&&n<=6&&m>=0&&m<=6&&(n===0||n===6||m===0||m===6||n>=2&&n<=4&&m>=2&&m<=4);b(k,l,o)}};N(0,0),N(0,p-7),N(p-7,0);for(let e=8;e=1;e-=2){if(e===6)e=5;let i=(e+1&2)===0;for(let n=0;n>>3]>>>7-(E&7)&1,E++;let o=(m+l&1)===0?h^1:h;H[m*p+l]=o}}}let R=30660;for(let e=0;e<=5;e++)b(8,e,(R>>>14-e&1)===1);b(8,7,(R>>>8&1)===1),b(8,8,(R>>>7&1)===1),b(7,8,(R>>>6&1)===1);for(let e=0;e<=5;e++)b(5-e,8,(R>>>5-e&1)===1);for(let e=0;e<8;e++)b(8,p-1-e,(R>>>e&1)===1);for(let e=0;e<7;e++)b(p-7+e,8,(R>>>14-e&1)===1);return{size:p,modules:H}}function X(a){let t=oe(a);if(!t)return null;let s=2,r=t.size+s*2,d=document.createElementNS("http://www.w3.org/2000/svg","svg");d.setAttribute("viewBox",`0 0 ${r} ${r}`),d.setAttribute("role","img"),d.setAttribute("aria-label",`QR code for ${a}`),d.setAttribute("shape-rendering","crispEdges"),d.classList.add("bp-qr-svg");let u=document.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("width",String(r)),u.setAttribute("height",String(r)),u.setAttribute("fill","#ffffff"),d.appendChild(u);let f="";for(let w=0;w{let h=l.trim();if(!h)return;let o=h.startsWith("https://")?h:`https://${h}`;if(!o.startsWith("https://")||o.length<=8)return;let x=document.createElement("div");x.className="bp-pair-addr-meta";let v=document.createElement("div");v.className="bp-pair-code-label",v.textContent=c("ios.hub.address.field","Hub address");let y=document.createElement("code");y.className="bp-pair-addr-url",y.textContent=o,y.setAttribute("data-testid","pair-address");let P=document.createElement("button");P.type="button",P.className="bp-pair-copy";let I=c("common.copy","Copy");P.textContent=I,P.addEventListener("click",()=>{navigator.clipboard?.writeText(o).then(()=>{P.textContent=c("web.clone.copied","Copied"),window.setTimeout(()=>{P.textContent=I},1200)}).catch(()=>{})}),x.append(v,y,P);let z=document.createDocumentFragment();z.appendChild(x);let K=X(o);if(K){let G=document.createElement("div");G.className="bp-pair-qr",G.setAttribute("data-testid","pair-qr"),G.appendChild(K),z.appendChild(G)}p.replaceChildren(z),p.classList.remove("bp-hidden")};fetch("/auth/web/info",{credentials:"same-origin"}).then(async(l)=>{if(!l.ok)return;let h=await l.json();if(typeof h.address==="string")H(h.address)}).catch(()=>{}),t.append(s,u,f,S,C,p),a.appendChild(t);let A=null,b=null,N=null,E=0,D=0,R=150,e=1000;function i(){if(E++,N)N.abort(),N=null;if(A!==null)window.clearTimeout(A),A=null;if(b!==null)window.clearInterval(b),b=null}function n(l="",h=!1){i(),f.classList.remove("bp-hidden"),S.classList.add("bp-hidden"),g.disabled=!1,C.textContent=l,C.className=h?"bp-pair-status bp-bad":"bp-pair-status"}function m(){let l=D-Date.now();if(l<=0){n(c("web.pair.expired","Pairing code expired. Request a new code to try again."),!0);return}B.textContent=c("web.pair.approve.in","Approve on desktop or paired phone · expires in {time}",{time:pe(l)})}async function k(l){if(l!==E)return;if(D>0&&Date.now()>=D){n(c("web.pair.expired","Pairing code expired. Request a new code to try again."),!0);return}let h=new AbortController;N=h;try{let o=await fetch("/auth/web/poll",{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/json"},body:"{}",signal:h.signal});if(l!==E)return;if(e=1000,o.status===202){A=window.setTimeout(()=>{k(l)},150);return}if(o.status===200||o.status===204){let v={};if(o.status===200)try{v=await o.json()}catch{}if(l!==E)return;let y=(v.state||v.status||"").toLowerCase();if(o.status===204||v.approved===!0||y==="approved"||y==="ok"){i(),C.textContent=c("web.pair.approved","Approved. Opening Backplane…"),C.className="bp-pair-status bp-ok",window.location.replace("/");return}if(y==="denied"||y==="rejected"){n(c("web.pair.denied","Pairing request was denied."),!0);return}if(y==="expired"){n(c("web.pair.expired","Pairing code expired. Request a new code to try again."),!0);return}A=window.setTimeout(()=>{k(l)},150);return}if(o.status===429){let v=Number(o.headers.get("Retry-After")||"5"),y=Math.max(2000,(Number.isFinite(v)?v:5)*1000);A=window.setTimeout(()=>{k(l)},y);return}if(o.status===401||o.status===403||o.status===404||o.status===410){let v="";try{let y=await o.json();v=(y.state||y.status||y.error||"").toLowerCase()}catch{}if(l!==E)return;if(v==="denied"||v==="rejected"||o.status===403)n(c("web.pair.denied","Pairing request was denied."),!0);else n(c("web.pair.expired","Pairing code expired. Request a new code to try again."),!0);return}let x=e;e=Math.min(1e4,Math.round(e*1.8)),A=window.setTimeout(()=>{k(l)},x)}catch{if(l!==E)return;let o=e;e=Math.min(1e4,Math.round(e*1.8)),A=window.setTimeout(()=>{k(l)},o)}finally{if(N===h)N=null}}L.addEventListener("click",()=>{n(c("web.pair.cancelled","Cancelled."))}),f.addEventListener("submit",async(l)=>{l.preventDefault();let h=w.value.trim()||Z();g.disabled=!0,C.textContent=c("web.pair.requesting","Requesting pairing code…"),C.className="bp-pair-status";try{let o=await fetch("/auth/web/request",{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:h})});if(!o.ok){let I=c("web.pair.failed","Pairing request failed ({status})",{status:o.status});try{let z=await o.json();if(z.error)I=z.error}catch{}if(o.status===429)I=c("web.pair.ratelimited","Too many pairing attempts. Wait a moment and try again.");n(I,!0);return}let x=await o.json(),v=x.code||x.checkCode||"";if(!v){n(c("web.pair.nocode","Hub did not return a comparison code."),!0);return}let y=Date.now();D=x.expiresAt?x.expiresAt<10000000000?x.expiresAt*1000:x.expiresAt:y+(x.expiresIn?x.expiresIn*1000:120000),i();let P=E;e=1000,R=x.pollMs&&x.pollMs>=100?x.pollMs:150,M.textContent=re(v),f.classList.add("bp-hidden"),S.classList.remove("bp-hidden"),C.textContent="",m(),b=window.setInterval(m,1000),A=window.setTimeout(()=>{k(P)},R)}catch{n(c("web.pair.unreachable","Could not reach the hub. Check your tailnet connection."),!0)}})}if(document.readyState==="loading")document.addEventListener("DOMContentLoaded",ee);else ee(); diff --git a/web/dist/assets/style.css b/web/dist/assets/style.css index 7a1f1e038b..37200d4f78 100644 --- a/web/dist/assets/style.css +++ b/web/dist/assets/style.css @@ -1094,6 +1094,222 @@ html.light .bp-code-block { background: var(--panel); } color: var(--dim); font-family: var(--mono); font-size: 12px; + text-align: left; + cursor: pointer; +} +.bp-composer-model:hover:not(:disabled), +.bp-composer-model.is-open { + background: var(--raise); + border-color: var(--rule); + color: var(--text); +} +.bp-composer-model.is-open { border-color: var(--accent); } +.bp-composer-model:focus-visible { outline: 1px solid var(--accent); outline-offset: 1px; } +.bp-model-caret { + flex-shrink: 0; + color: var(--faint); + font-size: 11px; + line-height: 1; +} +.bp-model-picker { + position: absolute; + left: 0; + bottom: calc(100% + 6px); + width: min(520px, 100%); + max-height: min(440px, 68vh); + background: var(--panel); + border: 1px solid var(--rule); + box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35); + display: flex; + flex-direction: column; + z-index: 30; +} +html.light .bp-model-picker { + box-shadow: 0 8px 24px rgba(15, 20, 30, 0.14); +} +.bp-mp-search-wrap { + padding: 8px; + border-bottom: 1px solid var(--line); + flex-shrink: 0; +} +.bp-mp-search { + width: 100%; + padding: 6px 8px; + background: var(--bg); + border: 1px solid var(--line); + color: var(--text); + font-family: var(--mono); + font-size: 12px; + outline: none; +} +.bp-mp-search:focus { border-color: var(--accent); } +.bp-mp-body { + flex: 1; + min-height: 0; + overflow-y: auto; +} +.bp-mp-section { + border-bottom: 1px solid var(--rule); +} +.bp-mp-favorites { + background: var(--bg); +} +.bp-mp-head { + display: flex; + align-items: center; + gap: 6px; + padding: 6px 10px 4px; + font-size: 10px; + font-weight: 700; + letter-spacing: 0.06em; + text-transform: uppercase; + color: var(--dim); +} +.bp-mp-head-star { + display: inline-flex; + color: var(--accent); +} +.bp-mp-group { + border-bottom: 1px solid var(--line); +} +.bp-mp-group:last-child { border-bottom: 0; } +.bp-mp-group-head { + display: flex; + align-items: center; + gap: 7px; + padding: 7px 10px 4px; + font-size: 11px; + font-weight: 600; + color: var(--dim); +} +.bp-mp-group-title { color: var(--text); } +.bp-mp-group-why { + color: var(--faint); + font-weight: 400; + margin-left: auto; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} +.bp-mp-mark { + display: inline-flex; + align-items: center; + justify-content: center; + width: 14px; + height: 14px; + flex-shrink: 0; + font-weight: 700; + font-size: 11px; +} +.bp-mp-mark svg { display: block; width: 14px; height: 14px; } +.bp-mp-row { + display: flex; + align-items: stretch; + border-left: 2px solid transparent; +} +.bp-mp-row:hover { background: var(--raise); } +.bp-mp-row.is-active { + background: var(--raise); + border-left-color: var(--accent); +} +.bp-mp-row.is-disabled { opacity: 0.55; } +.bp-mp-row-main { + flex: 1; + min-width: 0; + display: flex; + align-items: center; + gap: 7px; + padding: 5px 8px 5px 10px; + background: transparent; + border: 0; + color: var(--text); + font-family: var(--mono); + font-size: 12px; + text-align: left; + cursor: pointer; +} +.bp-mp-row.is-disabled .bp-mp-row-main { cursor: default; } +.bp-mp-row-main.is-kbd { + background: var(--raise); + box-shadow: inset 2px 0 0 var(--accent); +} +.bp-mp-row.is-active .bp-mp-name { color: var(--accent); font-weight: 600; } +.bp-mp-check { + width: 12px; + flex-shrink: 0; + color: var(--accent); + font-weight: 700; +} +.bp-mp-name { + flex-shrink: 0; + max-width: 55%; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} +.bp-mp-note { + flex: 1; + min-width: 0; + font-size: 11px; + color: var(--faint); + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} +.bp-mp-star { + flex-shrink: 0; + display: inline-flex; + align-items: center; + justify-content: center; + width: 30px; + padding: 0; + background: transparent; + border: 0; + color: var(--faint); + cursor: pointer; +} +.bp-mp-star:hover { + color: var(--text); + background: var(--raise); +} +.bp-mp-star.is-starred { color: var(--accent); } +.bp-mp-star.is-starred:hover { color: var(--accent); } +.bp-mp-star:focus-visible { outline: 1px solid var(--accent); outline-offset: -1px; } +.bp-mp-empty { + padding: 12px 10px; + color: var(--faint); + font-size: 12px; +} +.bp-mp-efforts { + display: flex; + flex-wrap: wrap; + align-items: center; + gap: 6px; + padding: 7px 10px; + border-top: 1px solid var(--line); + background: var(--bg); + flex-shrink: 0; +} +.bp-mp-efforts-lbl { + font-size: 11px; + color: var(--faint); + margin-right: 2px; +} +.bp-mp-effort { + padding: 2px 7px; + background: var(--panel); + border: 1px solid var(--line); + color: var(--dim); + font-family: var(--mono); + font-size: 11px; + cursor: pointer; +} +.bp-mp-effort:hover { background: var(--raise); color: var(--text); } +.bp-mp-effort.active { + background: var(--raise); + border-color: var(--accent); + color: var(--accent); + font-weight: 600; } .bp-composer-memory { display: flex; diff --git a/web/dist/manifest.json b/web/dist/manifest.json index 4e5e0e4e91..0f284f6c27 100644 --- a/web/dist/manifest.json +++ b/web/dist/manifest.json @@ -1,6 +1,6 @@ { "version": 1, - "totalAssetGzipBytes": 220069, + "totalAssetGzipBytes": 225677, "styleTokensSha256": "a4fed1b1c7bc676acc328907343eb5dcf87e426383d05617c632e48c0c3f2b80", "i18nKeys": [ "agy.signout", @@ -19,6 +19,7 @@ "common.refresh", "common.remove", "common.save", + "composer.model.tip", "composer.placeholder", "composer.send", "composer.stop", @@ -125,7 +126,11 @@ "gpui.mgmt.plan.view.split", "gpui.mgmt.plan.width", "gpui.next.thread", + "gpui.no.models", "gpui.nothing.matches", + "gpui.picker.favorite.add", + "gpui.picker.favorite.remove", + "gpui.picker.favorites", "gpui.planmode.bar.always", "gpui.planmode.bar.executing", "gpui.planmode.bar.once", @@ -145,6 +150,7 @@ "gpui.rail.no.mech", "gpui.rail.no.schematic", "gpui.rail.split.needs.both", + "gpui.search.models", "gpui.settings.group.agents", "gpui.settings.group.general", "home.away", @@ -168,6 +174,7 @@ "menu.unpin", "menu.wake", "model.col.agent", + "model.col.effort", "native.pair.connect", "native.thread.model", "notify.settled", @@ -293,13 +300,13 @@ "web.settings.providers", "web.settings.providers.browser" ], - "i18nSubsetSha256": "6a57c32569a7e901ce73a080de12a870ccf81af34fe7742186d530dc2b808bc4", + "i18nSubsetSha256": "e1e01f4aab8b46aadc56378ef0500fda7c05056b61cd8d7e20899e4b401825d9", "inputs": { "web/src/addproject.ts": "06a7ff3e13cd78d993ebca7f638d5d623da06c0099186ad534bae8f184dbe44f", - "web/src/app.ts": "1b58e4dcb0aa1890f6ae60b3de713928faea76f083c324362954274600f6495a", + "web/src/app.ts": "3c13d1fe5074e7f99857473c3f6b335bed97996f5a3b3a4d9279c41ec5281e77", "web/src/chat.ts": "639e3af0791aedcde788c1a76aee6ea07cf96f5749d6a3564898c2beb8bd7337", "web/src/clone-model.ts": "d265df49436e14f415bbeb2a271ffa3552f9163be62bdc0158cecc10c3cdae45", - "web/src/composer.ts": "3269058fa1f8d65beee2cdc2429f91c2e748f3cbc968167eedffc459560fca40", + "web/src/composer.ts": "63a5e9d7acfd321007c0a18880ee0ba055506335fcf4808154febc2b380f91a8", "web/src/i18n-format.ts": "8561ca443ba371ad804b1cba75c144df666b1871a8250026c9806b66318c0c7b", "web/src/i18n.ts": "068561f33d911ed7c71d8c5f86d7a024b2ea9fe1dcd0bb766169cf19b82513b8", "web/src/index.html": "a661afef2f425bd880bccd134f90969b4d037cf455da827c921a99764ffd83a4", @@ -308,6 +315,7 @@ "web/src/md.ts": "c606d1ec598b3ce132c7cc9366383dacafc3fcb71c0fccd97b41ec0e19a96c78", "web/src/mgmt-model.ts": "a22c89f742b4df541804997f8cfb6def39e518cdbc903ef1a0227a20c7c8ede1", "web/src/mgmt.ts": "ec76c265570baf0e608fa73b3f1134163b261900f81ffa6cb50a1cbabe0181cf", + "web/src/model-picker-model.ts": "8bebc12191d731c58f6805c5d273b8c018aa0dd64f36d4fc72adc8b39d58ec73", "web/src/pair.html": "cf7b94703316f910718356e9ff8e99e088b68211db39b5200213b623c9275f6e", "web/src/pair.ts": "af07d19224043f8176f8cd2298d00b6806248eee453fd2f287c183e71a08179b", "web/src/palette-model.ts": "ae359cc71e98e84774428355a5048fd9ba0e1da2d45fa18290b4313c50c50ee4", @@ -318,7 +326,7 @@ "web/src/rail.ts": "5fb391094992578cb6f54d35d53559951a584c43fcfc2ee6f4f2cc3897acfe46", "web/src/settings-model.ts": "19e99d594cf3eebb66b616f81dee5877abddb2d24c1d4e32fa0bc2b205cb268b", "web/src/settings.ts": "ff87ef3e3554502e43035cfb18df9973836e6a9b2573eef6e8c47bea2a01ec62", - "web/src/shell.css": "32898b2fc072984fde99490f22143e9aa6e39c8a517be2a4fbd2d10b227a75f1", + "web/src/shell.css": "7835682f03cff4cc968ccf16350eb53a8f0556906226866fbabdedc91a5d54af", "web/src/sidebar.ts": "cc22668cddd8d039389fdd9637141c840d6ab8985de06a4268bb536d3a9588c1", "web/src/swarm-need.ts": "503bbf5ffe0389f068847571c792321b0ad5c8d26a18c73b8e41c0a8989e227f", "web/src/thread-context.ts": "b9fbd5b3ef0b1357b5a4444a1e9a0ac0606afe1c8a5377c4777752e918af0ac2", @@ -336,7 +344,7 @@ "web/src/viewers/viewer-pane.ts": "9a24cd856adf2ce6ca7ec58660bcd8dd1003049d55fc9fe0925c7d6b5585ff14", "web/src/viewers/viewer-tools.ts": "7db4587ad1410cf21364b1121454e0520fd515c82b63916d31a5fdc1443615b4", "web/src/voice.ts": "f401f1d5bd1685c7d7270fc02a8ff16f54bde7ae98aee21b4e802f0357063345", - "web/src/ws.ts": "b8d433e2902d91c72563c304bbb8a609e242e4884074399a12f792f0f47db3a4", + "web/src/ws.ts": "dda774245a6daa65a243f6c31252ef7c0f759a06e69e56a3d7e83baaa10ee7af", "web/vendor/xterm/LICENSE": "b569f629d00f2626a8100df2a1798210535621e42164dfd426a6fe5aac7b0ccd", "web/vendor/xterm/VERSION": "d8a60d9ace43d33ee184e5679b0b6815e8c6750331b6e6787b98e6f03d77180c", "web/vendor/xterm/addon-fit.js": "bdaefa370b1bfc42ee88d46fe6072400902a4d4b2d45cd93438dda9b23c97089", @@ -356,9 +364,9 @@ }, "outputs": { "assets/app.js": { - "bytes": 388563, - "gzipBytes": 109984, - "sha256": "a55b7298215fc3e51fef03cfdcd989f2e918f4bf1256faf916314e04dfe657a1" + "bytes": 406672, + "gzipBytes": 114706, + "sha256": "ef952cb6cda87d2568cffee1e427b348743a146c9a0c7cd263fa16814c5dbb54" }, "assets/favicon-light.svg": { "bytes": 1207, @@ -376,14 +384,14 @@ "sha256": "123b6a27f255d339b505c8fd83609674f0bddf9b46c0e907fce23befa96b1eec" }, "assets/pair.js": { - "bytes": 55633, - "gzipBytes": 16726, - "sha256": "f960233e435ca31cbb87254879bc8d43bf708991da986ee3e10602d084eb32f1" + "bytes": 56546, + "gzipBytes": 16971, + "sha256": "9fe98ad951dc2249587934deef6e42a9638caaafd7605244813d0e98b10a8874" }, "assets/style.css": { - "bytes": 90272, - "gzipBytes": 15060, - "sha256": "22ecd4c7aa2408418c5208daa8b1da63aab720b8e97a6dbb6ab43ee58ea18ca7" + "bytes": 94970, + "gzipBytes": 15701, + "sha256": "5acb2a2d1fd314d57f982720ebcdfc2b9cde147123ea63136d3b301ea6f3b21e" }, "assets/terminal.js": { "bytes": 296616, diff --git a/web/src/app.ts b/web/src/app.ts index 56ba09a914..8c06e7f0d6 100644 --- a/web/src/app.ts +++ b/web/src/app.ts @@ -304,6 +304,7 @@ function mountApp(): void { let threads: ThreadItem[] = []; let bots: BotItem[] = []; let rooms: RoomItem[] = []; + let favoriteModels: string[] = []; let railItems: RailEntry[] = []; let helloCommands: SlashCommand[] = []; let selectedThreadId = ""; @@ -517,6 +518,62 @@ function mountApp(): void { applyPlanModeRpc("thread.pick", { thread: selectedThreadId, action: "interaction", value: "default" }); } }, + getFavoriteModels: () => favoriteModels, + onLoadModelPicker: async () => { + if (!selectedThreadId) return null; + return hub.rpc("thread.picker", { thread: selectedThreadId }); + }, + onSelectModel: async (provider, model) => { + if (!selectedThreadId) return; + const gen = threadGen; + const tid = selectedThreadId; + try { + const res = await hub.rpc<{ thread?: ThreadItem }>("thread.model", { thread: tid, provider, model }); + if (gen !== threadGen || selectedThreadId !== tid) return; + if (res.thread) { + const idx = threads.findIndex((x) => x.id === res.thread!.id); + if (idx >= 0) threads[idx] = res.thread; + else threads.unshift(res.thread); + sidebar.setData(projects, threads, bots, rooms); + chat.updateThreadMeta(res.thread); + updateHeader(); + composer.setState(true, res.thread.state === "working"); + } + } catch (e) { + if (gen === threadGen && selectedThreadId === tid) { + composer.showError(e instanceof Error ? e.message : "Could not switch model"); + } + } + }, + onSelectEffort: async (effort) => { + if (!selectedThreadId) return; + const gen = threadGen; + const tid = selectedThreadId; + try { + const res = await hub.rpc<{ thread?: ThreadItem }>("thread.pick", { thread: tid, action: "effort", value: effort }); + if (gen !== threadGen || selectedThreadId !== tid) return; + if (res.thread) { + const idx = threads.findIndex((x) => x.id === res.thread!.id); + if (idx >= 0) threads[idx] = res.thread; + else threads.unshift(res.thread); + sidebar.setData(projects, threads, bots, rooms); + chat.updateThreadMeta(res.thread); + updateHeader(); + } + } catch (e) { + if (gen === threadGen && selectedThreadId === tid) { + composer.showError(e instanceof Error ? e.message : "Could not set effort"); + } + } + }, + onToggleFavorite: async (provider, model, on) => { + const res = await hub.rpc<{ favorites?: string[] }>("models.favorite", { provider, model, on }); + if (Array.isArray(res.favorites)) { + favoriteModels = res.favorites; + return favoriteModels; + } + return null; + }, }); voice = new VoiceController(hub, { @@ -1188,6 +1245,7 @@ function mountApp(): void { } selectedThreadId = threadId; + composer.closeModelPicker(); const cached = threadCache.get(threadId); olderCursor = cached?.olderCursor ?? null; try { localStorage.setItem("bp.lastThread", threadId); } catch { /* ignore */ } @@ -1583,6 +1641,10 @@ function mountApp(): void { } if (hello.theme) applyHubTheme(hello.theme); if (hello.name) sidebar.setHostName(hello.name); + if (Array.isArray(hello.favoriteModels)) { + favoriteModels = hello.favoriteModels; + composer.updateFavoriteModels(favoriteModels); + } homeInfo = hello.home ?? null; sidebar.setHome(homeInfo); applyNoProvider(parseNoProvider(hello.noProvider)); @@ -1703,6 +1765,13 @@ function mountApp(): void { if (settings.isOpen()) void settings.refresh(); break; } + case "favorites": { + if (Array.isArray(p.favorites)) { + favoriteModels = p.favorites.filter((x): x is string => typeof x === "string"); + composer.updateFavoriteModels(favoriteModels); + } + break; + } default: break; } @@ -1716,6 +1785,7 @@ function mountApp(): void { else palette.open(); } else if (e.key === "Escape") { if (palette.isOpen()) palette.close(); + else if (composer.isModelPickerOpen()) composer.closeModelPicker(); else if (addProject.isOpen()) addProject.escape(); else if (settings.isOpen()) settings.handleEscape(); else if (chat.closePlanRevise()) { /* handled by plan revise drawer */ } diff --git a/web/src/composer.ts b/web/src/composer.ts index 64ac1e1f51..b779025f27 100644 --- a/web/src/composer.ts +++ b/web/src/composer.ts @@ -3,6 +3,15 @@ // slash-command popup (hello.commands), mentions popup, and bottom toolbar row // with model chip on the left and accent-blue Send / red Stop on the right. import { t, trs } from "./i18n"; +import { + applyFavoriteKeysToSnapshot, + buildPickerViewModel, + normalizeFavKey, + normalizeFavKeys, + parsePickerResponse, + toggleFavoriteKey, + type PickerSnapshot, +} from "./model-picker-model"; import type { PlanModeInfo } from "./sidebar"; // @ts-ignore virtual module injected by web/build.ts import { PROVIDER_MARKS } from "virtual:provider-marks"; @@ -36,6 +45,11 @@ export interface ComposerCallbacks { onToggleVoice?: () => void; onCyclePlanMode?: () => void; onSetPlanMode?: (mode: "once" | "always" | "off") => void; + onLoadModelPicker?: () => Promise; + onSelectModel?: (provider: string, model: string) => Promise | void; + onSelectEffort?: (effort: string) => Promise | void; + onToggleFavorite?: (provider: string, model: string, on: boolean) => Promise | void; + getFavoriteModels?: () => string[]; } const SVG_NS = "http://www.w3.org/2000/svg"; @@ -73,6 +87,22 @@ function makePlanPlayIcon(): SVGSVGElement { return makeComposerIcon(["M6 4l14 8-14 8z"]); } +function makeStarIcon(filled: boolean): SVGSVGElement { + const svg = document.createElementNS(SVG_NS, "svg"); + svg.setAttribute("viewBox", "0 0 24 24"); + svg.setAttribute("width", "13"); + svg.setAttribute("height", "13"); + svg.setAttribute("fill", filled ? "currentColor" : "none"); + svg.setAttribute("stroke", "currentColor"); + svg.setAttribute("stroke-width", "1.8"); + svg.setAttribute("stroke-linejoin", "round"); + svg.setAttribute("aria-hidden", "true"); + const p = document.createElementNS(SVG_NS, "path"); + p.setAttribute("d", "M12 2.5l2.9 6 6.6.9-4.8 4.6 1.2 6.5L12 17.4l-5.9 3.1 1.2-6.5-4.8-4.6 6.6-.9z"); + svg.appendChild(p); + return svg; +} + function providerBadge(provider?: string): { mark?: string; glyph: string; color: string; title: string } { const p = (provider || "").toLowerCase(); if (p.includes("claude") || p.includes("anthropic")) return { mark: "claude", glyph: "A", color: "#d97757", title: "Claude" }; @@ -110,9 +140,20 @@ export class ComposerView { private memoryEl: HTMLElement; private memoryFill: HTMLElement; private memoryText: HTMLElement; + private modelBtn: HTMLButtonElement; private providerMarkEl: HTMLElement; private modelTextEl: HTMLElement; private ctxEl: HTMLElement; + private modelPickerEl: HTMLElement; + private modelSearchInput: HTMLInputElement; + private modelPickerBodyEl: HTMLElement; + private modelPickerEffortsEl: HTMLElement; + private modelPickerOpen = false; + private modelPickerLoading = false; + private modelPickerSnap: PickerSnapshot | null = null; + private modelPickerQuery = ""; + private modelPickerFocusIdx = -1; + private onDocMouseDown: (e: MouseEvent) => void; private planChipBtn: HTMLButtonElement; private planChipIconHost: HTMLElement; private planChipLbl: HTMLElement; @@ -184,8 +225,14 @@ export class ComposerView { const bar = document.createElement("div"); bar.className = "bp-composer-bar"; - const modelWrap = document.createElement("div"); + const modelWrap = document.createElement("button"); + modelWrap.type = "button"; modelWrap.className = "bp-composer-model"; + modelWrap.setAttribute("data-testid", "composer-model-chip"); + modelWrap.setAttribute("aria-haspopup", "dialog"); + modelWrap.setAttribute("aria-expanded", "false"); + modelWrap.title = t("composer.model.tip", "Choose the model and effort"); + this.modelBtn = modelWrap; this.providerMarkEl = document.createElement("span"); this.providerMarkEl.className = "bp-provider-mark"; this.providerMarkEl.textContent = "●"; @@ -195,7 +242,66 @@ export class ComposerView { this.ctxEl = document.createElement("span"); this.ctxEl.className = "bp-ctx-pct bp-hidden"; this.ctxEl.setAttribute("data-testid", "composer-ctx"); - modelWrap.append(this.providerMarkEl, this.modelTextEl, this.ctxEl); + const modelChevron = document.createElement("span"); + modelChevron.className = "bp-model-caret"; + modelChevron.textContent = "▾"; + modelWrap.append(this.providerMarkEl, this.modelTextEl, this.ctxEl, modelChevron); + modelWrap.addEventListener("click", () => { void this.toggleModelPicker(); }); + + this.modelPickerEl = document.createElement("div"); + this.modelPickerEl.className = "bp-model-picker bp-hidden"; + this.modelPickerEl.setAttribute("data-testid", "model-picker"); + this.modelPickerEl.setAttribute("role", "dialog"); + const mpHead = document.createElement("div"); + mpHead.className = "bp-mp-search-wrap"; + this.modelSearchInput = document.createElement("input"); + this.modelSearchInput.type = "search"; + this.modelSearchInput.className = "bp-mp-search"; + this.modelSearchInput.placeholder = t("gpui.search.models", "Search models"); + this.modelSearchInput.setAttribute("data-testid", "model-picker-search"); + this.modelSearchInput.addEventListener("input", () => { + this.modelPickerQuery = this.modelSearchInput.value; + this.modelPickerFocusIdx = -1; + this.renderModelPicker(); + }); + this.modelSearchInput.addEventListener("keydown", (e) => { + if (e.key === "Escape") { + e.preventDefault(); + e.stopPropagation(); + this.closeModelPicker(); + this.textarea.focus(); + return; + } + if (e.key === "ArrowDown" || e.key === "ArrowUp") { + const items = this.modelPickerFocusableButtons(); + if (items.length === 0) return; + e.preventDefault(); + const delta = e.key === "ArrowDown" ? 1 : -1; + this.modelPickerFocusIdx = + this.modelPickerFocusIdx < 0 + ? (delta > 0 ? 0 : items.length - 1) + : (this.modelPickerFocusIdx + delta + items.length) % items.length; + this.updateModelPickerKbdFocus(items); + return; + } + if (e.key === "Enter") { + const items = this.modelPickerFocusableButtons(); + const target = + this.modelPickerFocusIdx >= 0 && this.modelPickerFocusIdx < items.length + ? items[this.modelPickerFocusIdx] + : (this.modelPickerQuery.trim() ? items[0] : undefined); + if (target) { + e.preventDefault(); + target.click(); + } + } + }); + mpHead.appendChild(this.modelSearchInput); + this.modelPickerBodyEl = document.createElement("div"); + this.modelPickerBodyEl.className = "bp-mp-body"; + this.modelPickerEffortsEl = document.createElement("div"); + this.modelPickerEffortsEl.className = "bp-mp-efforts bp-hidden"; + this.modelPickerEl.append(mpHead, this.modelPickerBodyEl, this.modelPickerEffortsEl); this.planChipBtn = document.createElement("button"); this.planChipBtn.type = "button"; @@ -266,10 +372,22 @@ export class ComposerView { btns.append(this.attachBtn, this.voiceBtn, this.stopBtn, this.sendBtn); bar.append(modelWrap, this.planChipBtn, this.memoryEl, btns); - inner.append(this.popupEl, this.errorEl, this.replyEl, this.attachStripEl, this.planBarEl, this.fileInput, this.textarea, bar); + inner.append(this.modelPickerEl, this.popupEl, this.errorEl, this.replyEl, this.attachStripEl, this.planBarEl, this.fileInput, this.textarea, bar); wrap.appendChild(inner); container.appendChild(wrap); + this.onDocMouseDown = (e: MouseEvent) => { + if (!this.modelPickerEl.isConnected) { + document.removeEventListener("mousedown", this.onDocMouseDown); + return; + } + if (!this.modelPickerOpen) return; + const target = e.target as Node | null; + if (target && (this.modelPickerEl.contains(target) || this.modelBtn.contains(target))) return; + this.closeModelPicker(); + }; + document.addEventListener("mousedown", this.onDocMouseDown); + this.textarea.addEventListener("paste", (e) => { const items = e.clipboardData?.items; if (!items) return; @@ -484,11 +602,313 @@ export class ComposerView { this.sendBtn.disabled = !enabled; this.attachBtn.disabled = !enabled; this.voiceBtn.disabled = !enabled; + this.modelBtn.disabled = !enabled; + if (!enabled) this.closeModelPicker(); this.planChipBtn.disabled = !enabled; this.planBarEl.querySelectorAll(".bp-plan-scope-btn").forEach((b) => { b.disabled = !enabled; }); this.stopBtn.classList.toggle("bp-hidden", !running); } + public destroy(): void { + document.removeEventListener("mousedown", this.onDocMouseDown); + } + + public isModelPickerOpen(): boolean { + return this.modelPickerOpen; + } + + public closeModelPicker(): void { + if (!this.modelPickerOpen) return; + this.modelPickerOpen = false; + this.modelPickerFocusIdx = -1; + this.modelPickerEl.classList.add("bp-hidden"); + this.modelBtn.classList.remove("is-open"); + this.modelBtn.setAttribute("aria-expanded", "false"); + } + + private modelPickerFocusableButtons(): HTMLButtonElement[] { + return Array.from(this.modelPickerBodyEl.querySelectorAll(".bp-mp-row-main:not(:disabled)")); + } + + private updateModelPickerKbdFocus(items: HTMLButtonElement[]): void { + items.forEach((btn, idx) => { + const active = idx === this.modelPickerFocusIdx; + btn.classList.toggle("is-kbd", active); + if (active) btn.scrollIntoView({ block: "nearest" }); + }); + } + + public updateFavoriteModels(keys: string[]): void { + if (!this.modelPickerSnap) return; + this.modelPickerSnap = applyFavoriteKeysToSnapshot(this.modelPickerSnap, keys); + if (this.modelPickerOpen) this.renderModelPicker(); + } + + private async toggleModelPicker(): Promise { + if (!this.enabled) return; + if (this.modelPickerOpen) { + this.closeModelPicker(); + return; + } + this.closePopup(); + this.modelPickerOpen = true; + this.modelPickerQuery = ""; + this.modelPickerFocusIdx = -1; + this.modelSearchInput.value = ""; + this.modelPickerEl.classList.remove("bp-hidden"); + this.modelBtn.classList.add("is-open"); + this.modelBtn.setAttribute("aria-expanded", "true"); + this.modelPickerLoading = true; + this.renderModelPicker(); + this.modelSearchInput.focus(); + await this.reloadModelPicker(); + } + + private async reloadModelPicker(): Promise { + if (!this.cb.onLoadModelPicker) { + this.modelPickerLoading = false; + this.renderModelPicker(); + return; + } + try { + const raw = await this.cb.onLoadModelPicker(); + if (!this.modelPickerOpen) return; + this.modelPickerSnap = parsePickerResponse(raw, this.cb.getFavoriteModels?.() ?? []); + } catch { + // keep prior snapshot if reload failed + } finally { + this.modelPickerLoading = false; + if (this.modelPickerOpen) this.renderModelPicker(); + } + } + + private async toggleFavoriteInPicker(provider: string, model: string): Promise { + if (!this.modelPickerSnap) return; + const prev = this.modelPickerSnap; + const nk = normalizeFavKey(provider, model); + if (!nk) return; + const wasStarred = prev.favoriteKeys.includes(nk); + const toggled = toggleFavoriteKey(prev.favoriteKeys, provider, model); + if (toggled.keys.length === prev.favoriteKeys.length && toggled.starred === wasStarred) { + return; + } + this.modelPickerSnap = applyFavoriteKeysToSnapshot(prev, toggled.keys); + this.renderModelPicker(); + if (!this.cb.onToggleFavorite) return; + try { + const next = await this.cb.onToggleFavorite(provider, model, toggled.starred); + if (Array.isArray(next) && this.modelPickerSnap) { + this.modelPickerSnap = applyFavoriteKeysToSnapshot(this.modelPickerSnap, normalizeFavKeys(next)); + if (this.modelPickerOpen) this.renderModelPicker(); + } + } catch (err) { + if (this.modelPickerSnap) { + const auth = this.cb.getFavoriteModels?.(); + const reverted = Array.isArray(auth) + ? normalizeFavKeys(auth) + : toggleFavoriteKey(this.modelPickerSnap.favoriteKeys, provider, model, !toggled.starred).keys; + this.modelPickerSnap = applyFavoriteKeysToSnapshot(this.modelPickerSnap, reverted); + if (this.modelPickerOpen) this.renderModelPicker(); + } + this.showError(err instanceof Error && err.message ? err.message : "Could not update favorite model"); + } + } + + private renderProviderGlyph(provider: string): HTMLElement { + const badge = providerBadge(provider); + const wrap = document.createElement("span"); + wrap.className = "bp-mp-mark"; + wrap.style.color = badge.color; + wrap.title = badge.title; + const svg = badge.mark ? makeProviderMarkSvg(badge.mark) : null; + if (svg) wrap.appendChild(svg); + else wrap.textContent = badge.glyph; + return wrap; + } + + private makeStarButton( + provider: string, + model: string, + starred: boolean, + testIdPrefix = "model-star", + ): HTMLButtonElement { + const btn = document.createElement("button"); + btn.type = "button"; + btn.className = "bp-mp-star" + (starred ? " is-starred" : ""); + const label = starred + ? t("gpui.picker.favorite.remove", "Remove from favorites") + : t("gpui.picker.favorite.add", "Add to favorites"); + btn.title = label; + btn.setAttribute("aria-label", label); + btn.setAttribute("aria-pressed", starred ? "true" : "false"); + btn.setAttribute("data-testid", `${testIdPrefix}-${provider}-${model}`); + btn.appendChild(makeStarIcon(starred)); + btn.addEventListener("click", (e) => { + e.preventDefault(); + e.stopPropagation(); + void this.toggleFavoriteInPicker(provider, model); + }); + return btn; + } + + private renderModelPicker(): void { + if (!this.modelPickerOpen) return; + this.modelPickerFocusIdx = -1; + if (!this.modelPickerSnap) { + const empty = document.createElement("div"); + empty.className = "bp-mp-empty"; + empty.textContent = this.modelPickerLoading ? "…" : t("gpui.no.models", "No models"); + this.modelPickerBodyEl.replaceChildren(empty); + this.modelPickerEffortsEl.classList.add("bp-hidden"); + this.modelPickerEffortsEl.replaceChildren(); + return; + } + + const vm = buildPickerViewModel(this.modelPickerSnap, this.modelPickerQuery); + const frag = document.createDocumentFragment(); + + if (vm.favorites.length > 0) { + const favSec = document.createElement("div"); + favSec.className = "bp-mp-section bp-mp-favorites"; + favSec.setAttribute("data-testid", "model-picker-favorites"); + + const head = document.createElement("div"); + head.className = "bp-mp-head"; + const starIc = document.createElement("span"); + starIc.className = "bp-mp-head-star"; + starIc.appendChild(makeStarIcon(true)); + const title = document.createElement("span"); + title.textContent = t("gpui.picker.favorites", "Favorites"); + head.append(starIc, title); + favSec.appendChild(head); + + for (const fav of vm.favorites) { + const row = document.createElement("div"); + row.className = "bp-mp-row" + (fav.on ? " is-active" : "") + (!fav.ok ? " is-disabled" : ""); + row.setAttribute("data-testid", `model-fav-row-${fav.provider}-${fav.model}`); + + const main = document.createElement("button"); + main.type = "button"; + main.className = "bp-mp-row-main"; + main.disabled = !fav.ok; + if (!fav.ok && fav.why) main.title = fav.why; + const chk = document.createElement("span"); + chk.className = "bp-mp-check"; + chk.textContent = fav.on ? "✓" : ""; + const name = document.createElement("span"); + name.className = "bp-mp-name"; + name.textContent = fav.label; + const note = document.createElement("span"); + note.className = "bp-mp-note"; + note.textContent = !fav.ok && fav.why ? trs(fav.why) : (fav.note && fav.note !== fav.label ? trs(fav.note) : fav.provider); + main.append(chk, this.renderProviderGlyph(fav.provider), name, note); + main.addEventListener("click", () => { + if (!fav.ok) return; + this.closeModelPicker(); + this.textarea.focus(); + void this.cb.onSelectModel?.(fav.provider, fav.model); + }); + + row.append(main, this.makeStarButton(fav.provider, fav.model, true, "model-fav-star")); + favSec.appendChild(row); + } + frag.appendChild(favSec); + } + + const groupsWrap = document.createElement("div"); + groupsWrap.className = "bp-mp-groups"; + groupsWrap.setAttribute("data-testid", "model-picker-groups"); + + if (vm.groups.length === 0) { + const empty = document.createElement("div"); + empty.className = "bp-mp-empty"; + empty.textContent = this.modelPickerQuery.trim() + ? t("gpui.nothing.matches", "Nothing matches") + : t("gpui.no.models", "No models"); + groupsWrap.appendChild(empty); + } else { + for (const grp of vm.groups) { + const gEl = document.createElement("div"); + gEl.className = "bp-mp-group"; + const gHead = document.createElement("div"); + gHead.className = "bp-mp-group-head"; + const gLbl = document.createElement("span"); + gLbl.className = "bp-mp-group-title"; + gLbl.textContent = grp.label; + gHead.append(this.renderProviderGlyph(grp.provider), gLbl); + if (!grp.ok && grp.why) { + const gWhy = document.createElement("span"); + gWhy.className = "bp-mp-group-why"; + gWhy.textContent = trs(grp.why); + gHead.appendChild(gWhy); + } + gEl.appendChild(gHead); + + for (const m of grp.models) { + const row = document.createElement("div"); + row.className = "bp-mp-row" + (m.on ? " is-active" : "") + (!m.ok ? " is-disabled" : ""); + row.setAttribute("data-testid", `model-row-${grp.provider}-${m.value || "default"}`); + + const main = document.createElement("button"); + main.type = "button"; + main.className = "bp-mp-row-main"; + main.disabled = !m.ok; + if (!m.ok && m.why) main.title = m.why; + const chk = document.createElement("span"); + chk.className = "bp-mp-check"; + chk.textContent = m.on ? "✓" : ""; + const name = document.createElement("span"); + name.className = "bp-mp-name"; + name.textContent = m.label; + const note = document.createElement("span"); + note.className = "bp-mp-note"; + note.textContent = m.note && m.note !== m.label ? trs(m.note) : ""; + main.append(chk, name, note); + main.addEventListener("click", () => { + if (!m.ok) return; + this.closeModelPicker(); + this.textarea.focus(); + void this.cb.onSelectModel?.(grp.provider, m.value); + }); + + row.appendChild(main); + if (m.starrable) { + row.appendChild(this.makeStarButton(grp.provider, m.value, m.starred)); + } + gEl.appendChild(row); + } + groupsWrap.appendChild(gEl); + } + } + frag.appendChild(groupsWrap); + this.modelPickerBodyEl.replaceChildren(frag); + + if (vm.efforts.length > 0) { + const effFrag = document.createDocumentFragment(); + const lbl = document.createElement("span"); + lbl.className = "bp-mp-efforts-lbl"; + lbl.textContent = t("model.col.effort", "Effort"); + effFrag.appendChild(lbl); + for (const ef of vm.efforts) { + const b = document.createElement("button"); + b.type = "button"; + b.className = "bp-mp-effort" + (ef.on ? " active" : ""); + b.textContent = ef.label; + b.addEventListener("click", () => { + void Promise.resolve(this.cb.onSelectEffort?.(ef.value)).then(() => { + if (this.modelPickerOpen) void this.reloadModelPicker(); + }); + }); + effFrag.appendChild(b); + } + this.modelPickerEffortsEl.replaceChildren(effFrag); + this.modelPickerEffortsEl.classList.remove("bp-hidden"); + } else { + this.modelPickerEffortsEl.classList.add("bp-hidden"); + this.modelPickerEffortsEl.replaceChildren(); + } + } + public setDraft(text: string): void { this.textarea.value = text; this.autoGrow(); @@ -563,9 +983,12 @@ export class ComposerView { this.attachBtn.setAttribute("aria-label", t("web.composer.attach", "Attach image")); this.voiceBtn.title = t("web.composer.voice", "Voice dictation"); this.voiceBtn.setAttribute("aria-label", t("web.composer.voice", "Voice dictation")); + this.modelBtn.title = t("composer.model.tip", "Choose the model and effort"); + this.modelSearchInput.placeholder = t("gpui.search.models", "Search models"); this.sendBtn.textContent = t("composer.send", "Send"); this.stopBtn.textContent = t("composer.stop", "Stop"); this.setPlanMode(this.planMode); + if (this.modelPickerOpen) this.renderModelPicker(); } private autoGrow(): void { diff --git a/web/src/model-picker-model.ts b/web/src/model-picker-model.ts new file mode 100644 index 0000000000..342955c780 --- /dev/null +++ b/web/src/model-picker-model.ts @@ -0,0 +1,407 @@ +export interface PickerModelChoice { + value: string; + label: string; + note: string; + on: boolean; + ok: boolean; + why: string; +} + +export interface PickerEffortChoice { + value: string; + label: string; + on: boolean; +} + +export interface PickerProviderGroup { + provider: string; + label: string; + ok: boolean; + why: string; + models: PickerModelChoice[]; +} + +export interface PickerFavoriteItem { + key: string; + provider: string; + model: string; + label: string; + note: string; + on: boolean; + ok: boolean; + why: string; +} + +export interface PickerSnapshot { + chip: string; + provider: string; + model: string; + effort: string; + efforts: PickerEffortChoice[]; + providers: PickerProviderGroup[]; + favoriteKeys: string[]; + favorites: PickerFavoriteItem[]; +} + +export interface PickerViewModelRow extends PickerModelChoice { + provider: string; + starred: boolean; + starrable: boolean; +} + +export interface PickerViewModelGroup { + provider: string; + label: string; + ok: boolean; + why: string; + models: PickerViewModelRow[]; +} + +export interface PickerViewModel { + favorites: PickerFavoriteItem[]; + groups: PickerViewModelGroup[]; + efforts: PickerEffortChoice[]; +} + +const PROVIDER_TITLES: Record = { + claude: "Claude Code", + codex: "Codex CLI", + grok: "Grok CLI", + muse: "Muse Code", + antigravity: "Google Antigravity", + opencode: "OpenCode", + pi: "Pi", + omp: "Oh My Pi", +}; + +export const MAX_FAVORITES = 64; +export const MAX_FAV_LEN = 200; +const CTRL_RE = /[\x00-\x1f\x7f]/; +const WS_RE = /\s/; + +export function normalizeFavProvider(provider: string): string { + return provider.trim().replace(/^@+/, "").toLowerCase(); +} + +export function normalizeFavKey(provider: string, model: string): string { + if (CTRL_RE.test(provider) || CTRL_RE.test(model)) return ""; + const p = normalizeFavProvider(provider); + const m = model.trim(); + if (!p || !m || p.includes("/") || WS_RE.test(p)) return ""; + if (p.length + 1 + m.length > MAX_FAV_LEN) return ""; + return `${p}/${m}`; +} + +export function parseFavKey(key: string): { provider: string; model: string } | null { + const idx = key.indexOf("/"); + if (idx <= 0) return null; + const rawProvider = key.slice(0, idx); + const rawModel = key.slice(idx + 1); + if (!normalizeFavKey(rawProvider, rawModel)) return null; + return { provider: normalizeFavProvider(rawProvider), model: rawModel.trim() }; +} + +export function normalizeFavKeys(keys: unknown): string[] { + if (!Array.isArray(keys)) return []; + const out: string[] = []; + const seen = new Set(); + for (const item of keys) { + if (typeof item !== "string") continue; + const parsed = parseFavKey(item); + if (!parsed) continue; + const nk = `${parsed.provider}/${parsed.model}`; + if (!seen.has(nk)) { + seen.add(nk); + out.push(nk); + if (out.length >= MAX_FAVORITES) break; + } + } + return out; +} + +export function toggleFavoriteKey( + keys: string[], + provider: string, + model: string, + on?: boolean, +): { keys: string[]; starred: boolean } { + const nk = normalizeFavKey(provider, model); + const current = normalizeFavKeys(keys); + if (!nk) return { keys: current, starred: false }; + const idx = current.indexOf(nk); + const want = on !== undefined ? on : idx < 0; + if (want && idx < 0) { + if (current.length >= MAX_FAVORITES) { + return { keys: current, starred: false }; + } + current.push(nk); + } else if (!want && idx >= 0) { + current.splice(idx, 1); + } + return { keys: current, starred: want }; +} + +function asObj(v: unknown): Record | null { + return v && typeof v === "object" && !Array.isArray(v) ? (v as Record) : null; +} + +function asArr(v: unknown): unknown[] { + return Array.isArray(v) ? v : []; +} + +function asStr(v: unknown): string { + return typeof v === "string" ? v : ""; +} + +function providerLabel(id: string): string { + return PROVIDER_TITLES[id] ?? id; +} + +function buildFavoriteItems( + providers: PickerProviderGroup[], + favoriteKeys: string[], + curProvider: string, + curModel: string, +): PickerFavoriteItem[] { + const byProvider = new Map(); + for (const g of providers) byProvider.set(g.provider, g); + const out: PickerFavoriteItem[] = []; + for (const key of normalizeFavKeys(favoriteKeys)) { + const parsed = parseFavKey(key); + if (!parsed) continue; + const grp = byProvider.get(parsed.provider); + const hasCatalog = Boolean(grp && grp.models.some((m) => m.value !== "")); + const hit = grp?.models.find((m) => m.value === parsed.model); + let ok = hit ? hit.ok && (grp?.ok ?? true) : (grp?.ok ?? true); + let why = hit?.why || grp?.why || ""; + if (ok && hasCatalog && !hit) { + ok = false; + why = "not available on this machine"; + } + out.push({ + key, + provider: parsed.provider, + model: parsed.model, + label: hit?.label || parsed.model, + note: hit?.note || "", + on: parsed.provider === curProvider && parsed.model === curModel, + ok, + why, + }); + } + return out; +} + +export function parsePickerResponse(raw: unknown, fallbackFavKeys: string[] = []): PickerSnapshot { + const root = asObj(raw); + const picker = asObj(root?.picker) ?? root ?? {}; + const sections = asArr(picker.sections).map(asObj).filter((s): s is Record => Boolean(s)); + + const sectionByAction = (action: string) => sections.find((s) => asStr(s.action) === action); + const provSec = sectionByAction("provider"); + const modelSec = sectionByAction("model"); + const effortSec = sectionByAction("effort"); + + const provChoices = asArr(provSec?.choices).map(asObj).filter((c): c is Record => Boolean(c)); + const modelChoicesRaw = asArr(modelSec?.choices).map(asObj).filter((c): c is Record => Boolean(c)); + const effortChoicesRaw = asArr(effortSec?.choices).map(asObj).filter((c): c is Record => Boolean(c)); + + const chip = asStr(picker.chip); + const curProviderRaw = + asStr(provChoices.find((c) => c.on === true)?.value) || + chip.split("/")[0]?.trim() || + "claude"; + const curProvider = normalizeFavProvider(curProviderRaw) || "claude"; + const curModel = asStr(modelChoicesRaw.find((c) => c.on === true)?.value); + const curEffort = asStr(effortChoicesRaw.find((c) => c.on === true)?.value); + + const efforts: PickerEffortChoice[] = effortChoicesRaw.map((e) => ({ + value: asStr(e.value), + label: asStr(e.label) || "auto", + on: e.on === true, + })); + + const agentsObj = asObj(picker.agents); + const providerIds: string[] = []; + const seenProv = new Set(); + const addProv = (id: string) => { + const n = normalizeFavProvider(id); + if (n && !seenProv.has(n)) { + seenProv.add(n); + providerIds.push(n); + } + }; + for (const c of provChoices) addProv(asStr(c.value) || asStr(c.label)); + if (agentsObj) { + for (const k of Object.keys(agentsObj)) addProv(k); + } + addProv(curProvider); + + const providers: PickerProviderGroup[] = providerIds.map((pid) => { + const pChoice = provChoices.find((c) => normalizeFavProvider(asStr(c.value) || asStr(c.label)) === pid); + const agentInfo = asObj(agentsObj?.[pid]); + const ok = agentInfo ? agentInfo.ok !== false : (pChoice ? pChoice.ok !== false : true); + const why = asStr(agentInfo?.why) || asStr(pChoice?.why); + const agentModels = asArr(agentInfo?.models).map(asObj).filter((m): m is Record => Boolean(m)); + + let models: PickerModelChoice[]; + if (agentModels.length > 0) { + models = agentModels.map((m) => { + const value = asStr(m.value); + const label = asStr(m.label) || (value === "" ? "default" : value); + const note = asStr(m.note); + return { + value, + label, + note, + on: pid === curProvider && value === curModel, + ok: m.ok !== false && ok, + why: asStr(m.why) || why, + }; + }); + } else if (pid === curProvider && modelChoicesRaw.length > 0) { + models = modelChoicesRaw.map((m) => { + const value = asStr(m.value); + const rawLabel = asStr(m.label); + return { + value, + label: value === "" ? "default" : value, + note: rawLabel && rawLabel !== value ? rawLabel : "", + on: m.on === true, + ok: m.ok !== false && ok, + why: asStr(m.why) || why, + }; + }); + } else if (ok) { + models = [ + { + value: "", + label: "default", + note: "", + on: pid === curProvider && curModel === "", + ok: true, + why: "", + }, + ]; + } else { + models = []; + } + + if (pid === curProvider && curModel && !models.some((m) => m.value === curModel)) { + const fromSec = modelChoicesRaw.find((m) => asStr(m.value) === curModel); + const rawLabel = asStr(fromSec?.label); + models.push({ + value: curModel, + label: curModel, + note: rawLabel && rawLabel !== curModel ? rawLabel : "", + on: true, + ok: true, + why: "", + }); + } + + return { + provider: pid, + label: providerLabel(pid), + ok, + why, + models, + }; + }); + + const hasHubFavKeys = Array.isArray(picker.favoriteKeys); + const rawFavRows = asArr(picker.favorites).map(asObj).filter((f): f is Record => Boolean(f)); + const favoriteKeys = hasHubFavKeys + ? normalizeFavKeys(picker.favoriteKeys) + : rawFavRows.length > 0 + ? normalizeFavKeys(rawFavRows.map((f) => asStr(f.key) || normalizeFavKey(asStr(f.provider), asStr(f.model)))) + : normalizeFavKeys(fallbackFavKeys); + + const favorites: PickerFavoriteItem[] = + rawFavRows.length > 0 + ? rawFavRows + .map((f) => { + const p = normalizeFavProvider(asStr(f.provider)); + const m = asStr(f.model).trim(); + const key = normalizeFavKey(p, m); + if (!key) return null; + return { + key, + provider: p, + model: m, + label: asStr(f.label) || m, + note: asStr(f.note), + on: f.on === true || (p === curProvider && m === curModel), + ok: f.ok !== false, + why: asStr(f.why), + }; + }) + .filter((x): x is PickerFavoriteItem => Boolean(x)) + : buildFavoriteItems(providers, favoriteKeys, curProvider, curModel); + + return { + chip, + provider: curProvider, + model: curModel, + effort: curEffort, + efforts, + providers, + favoriteKeys, + favorites, + }; +} + +export function applyFavoriteKeysToSnapshot(snap: PickerSnapshot, keys: string[]): PickerSnapshot { + const favoriteKeys = normalizeFavKeys(keys); + return { + ...snap, + favoriteKeys, + favorites: buildFavoriteItems(snap.providers, favoriteKeys, snap.provider, snap.model), + }; +} + +export function buildPickerViewModel(snap: PickerSnapshot, query: string): PickerViewModel { + const words = query + .trim() + .toLowerCase() + .split(/\s+/) + .filter(Boolean); + const matches = (hay: string) => { + if (words.length === 0) return true; + const low = hay.toLowerCase(); + return words.every((w) => low.includes(w)); + }; + + const favSet = new Set(snap.favoriteKeys); + const favorites = snap.favorites.filter((f) => matches(`${f.provider} ${f.model} ${f.label} ${f.note}`)); + + const groups: PickerViewModelGroup[] = []; + for (const g of snap.providers) { + const models: PickerViewModelRow[] = g.models + .filter((m) => matches(`${g.provider} ${g.label} ${m.value} ${m.label} ${m.note}`)) + .map((m) => { + const key = m.value ? normalizeFavKey(g.provider, m.value) : ""; + return { + ...m, + provider: g.provider, + starrable: m.value !== "", + starred: Boolean(key && favSet.has(key)), + }; + }); + if (models.length > 0 || (words.length === 0 && !g.ok && g.why)) { + groups.push({ + provider: g.provider, + label: g.label, + ok: g.ok, + why: g.why, + models, + }); + } + } + + return { + favorites, + groups, + efforts: snap.efforts, + }; +} diff --git a/web/src/shell.css b/web/src/shell.css index 34cffaeb14..d85e8f62ad 100644 --- a/web/src/shell.css +++ b/web/src/shell.css @@ -1001,6 +1001,222 @@ html.light .bp-code-block { background: var(--panel); } color: var(--dim); font-family: var(--mono); font-size: 12px; + text-align: left; + cursor: pointer; +} +.bp-composer-model:hover:not(:disabled), +.bp-composer-model.is-open { + background: var(--raise); + border-color: var(--rule); + color: var(--text); +} +.bp-composer-model.is-open { border-color: var(--accent); } +.bp-composer-model:focus-visible { outline: 1px solid var(--accent); outline-offset: 1px; } +.bp-model-caret { + flex-shrink: 0; + color: var(--faint); + font-size: 11px; + line-height: 1; +} +.bp-model-picker { + position: absolute; + left: 0; + bottom: calc(100% + 6px); + width: min(520px, 100%); + max-height: min(440px, 68vh); + background: var(--panel); + border: 1px solid var(--rule); + box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35); + display: flex; + flex-direction: column; + z-index: 30; +} +html.light .bp-model-picker { + box-shadow: 0 8px 24px rgba(15, 20, 30, 0.14); +} +.bp-mp-search-wrap { + padding: 8px; + border-bottom: 1px solid var(--line); + flex-shrink: 0; +} +.bp-mp-search { + width: 100%; + padding: 6px 8px; + background: var(--bg); + border: 1px solid var(--line); + color: var(--text); + font-family: var(--mono); + font-size: 12px; + outline: none; +} +.bp-mp-search:focus { border-color: var(--accent); } +.bp-mp-body { + flex: 1; + min-height: 0; + overflow-y: auto; +} +.bp-mp-section { + border-bottom: 1px solid var(--rule); +} +.bp-mp-favorites { + background: var(--bg); +} +.bp-mp-head { + display: flex; + align-items: center; + gap: 6px; + padding: 6px 10px 4px; + font-size: 10px; + font-weight: 700; + letter-spacing: 0.06em; + text-transform: uppercase; + color: var(--dim); +} +.bp-mp-head-star { + display: inline-flex; + color: var(--accent); +} +.bp-mp-group { + border-bottom: 1px solid var(--line); +} +.bp-mp-group:last-child { border-bottom: 0; } +.bp-mp-group-head { + display: flex; + align-items: center; + gap: 7px; + padding: 7px 10px 4px; + font-size: 11px; + font-weight: 600; + color: var(--dim); +} +.bp-mp-group-title { color: var(--text); } +.bp-mp-group-why { + color: var(--faint); + font-weight: 400; + margin-left: auto; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} +.bp-mp-mark { + display: inline-flex; + align-items: center; + justify-content: center; + width: 14px; + height: 14px; + flex-shrink: 0; + font-weight: 700; + font-size: 11px; +} +.bp-mp-mark svg { display: block; width: 14px; height: 14px; } +.bp-mp-row { + display: flex; + align-items: stretch; + border-left: 2px solid transparent; +} +.bp-mp-row:hover { background: var(--raise); } +.bp-mp-row.is-active { + background: var(--raise); + border-left-color: var(--accent); +} +.bp-mp-row.is-disabled { opacity: 0.55; } +.bp-mp-row-main { + flex: 1; + min-width: 0; + display: flex; + align-items: center; + gap: 7px; + padding: 5px 8px 5px 10px; + background: transparent; + border: 0; + color: var(--text); + font-family: var(--mono); + font-size: 12px; + text-align: left; + cursor: pointer; +} +.bp-mp-row.is-disabled .bp-mp-row-main { cursor: default; } +.bp-mp-row-main.is-kbd { + background: var(--raise); + box-shadow: inset 2px 0 0 var(--accent); +} +.bp-mp-row.is-active .bp-mp-name { color: var(--accent); font-weight: 600; } +.bp-mp-check { + width: 12px; + flex-shrink: 0; + color: var(--accent); + font-weight: 700; +} +.bp-mp-name { + flex-shrink: 0; + max-width: 55%; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} +.bp-mp-note { + flex: 1; + min-width: 0; + font-size: 11px; + color: var(--faint); + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} +.bp-mp-star { + flex-shrink: 0; + display: inline-flex; + align-items: center; + justify-content: center; + width: 30px; + padding: 0; + background: transparent; + border: 0; + color: var(--faint); + cursor: pointer; +} +.bp-mp-star:hover { + color: var(--text); + background: var(--raise); +} +.bp-mp-star.is-starred { color: var(--accent); } +.bp-mp-star.is-starred:hover { color: var(--accent); } +.bp-mp-star:focus-visible { outline: 1px solid var(--accent); outline-offset: -1px; } +.bp-mp-empty { + padding: 12px 10px; + color: var(--faint); + font-size: 12px; +} +.bp-mp-efforts { + display: flex; + flex-wrap: wrap; + align-items: center; + gap: 6px; + padding: 7px 10px; + border-top: 1px solid var(--line); + background: var(--bg); + flex-shrink: 0; +} +.bp-mp-efforts-lbl { + font-size: 11px; + color: var(--faint); + margin-right: 2px; +} +.bp-mp-effort { + padding: 2px 7px; + background: var(--panel); + border: 1px solid var(--line); + color: var(--dim); + font-family: var(--mono); + font-size: 11px; + cursor: pointer; +} +.bp-mp-effort:hover { background: var(--raise); color: var(--text); } +.bp-mp-effort.active { + background: var(--raise); + border-color: var(--accent); + color: var(--accent); + font-weight: 600; } .bp-composer-memory { display: flex; diff --git a/web/src/ws.ts b/web/src/ws.ts index d41c1f1a48..91a8be668a 100644 --- a/web/src/ws.ts +++ b/web/src/ws.ts @@ -35,6 +35,7 @@ export interface HelloFrame { commands?: Array<{ word: string; label: string; desc: string }>; theme?: string; locale?: string; + favoriteModels?: string[]; notice?: unknown; noProvider?: NoProviderNotice | null; } diff --git a/web/test/model-picker.test.ts b/web/test/model-picker.test.ts new file mode 100644 index 0000000000..46fbecf899 --- /dev/null +++ b/web/test/model-picker.test.ts @@ -0,0 +1,156 @@ +import { describe, expect, test } from "bun:test"; +import { + applyFavoriteKeysToSnapshot, + buildPickerViewModel, + MAX_FAVORITES, + normalizeFavKey, + parsePickerResponse, + toggleFavoriteKey, +} from "../src/model-picker-model"; + +const SAMPLE_PICKER = { + picker: { + chip: "claude / opus / high", + favoriteKeys: ["claude/sonnet", "codex/gpt-6.1-sol"], + favorites: [ + { + key: "claude/sonnet", + provider: "claude", + model: "sonnet", + label: "sonnet", + note: "Sonnet 5 · claude-sonnet-5", + on: false, + ok: true, + why: "", + }, + { + key: "codex/gpt-6.1-sol", + provider: "codex", + model: "gpt-6.1-sol", + label: "gpt-6.1-sol", + note: "GPT-6.1-Sol", + on: false, + ok: true, + why: "", + }, + ], + agents: { + claude: { + ok: true, + why: "", + models: [ + { label: "default", value: "", note: "Claude Code's own default" }, + { label: "opus", value: "opus", note: "Opus 5.5 · claude-opus-5-5" }, + { label: "sonnet", value: "sonnet", note: "Sonnet 5 · claude-sonnet-5" }, + ], + }, + codex: { + ok: true, + why: "", + models: [ + { label: "default", value: "", note: "Codex's configured default" }, + { label: "gpt-6.1-sol", value: "gpt-6.1-sol", note: "GPT-6.1-Sol" }, + ], + }, + grok: { + ok: false, + why: "not installed on this machine", + models: [], + }, + }, + sections: [ + { + title: "Model", + action: "model", + choices: [ + { label: "default", value: "", on: false, ok: true, why: "" }, + { label: "Opus 5.5 · claude-opus-5-5", value: "opus", on: true, ok: true, why: "" }, + { label: "Sonnet 5 · claude-sonnet-5", value: "sonnet", on: false, ok: true, why: "" }, + ], + }, + { + title: "Effort", + action: "effort", + choices: [ + { label: "auto", value: "", on: false, ok: true, why: "" }, + { label: "high", value: "high", on: true, ok: true, why: "" }, + ], + }, + { + title: "Provider", + action: "provider", + choices: [ + { label: "claude", value: "claude", on: true, ok: true, why: "" }, + { label: "codex", value: "codex", on: false, ok: true, why: "" }, + { label: "grok", value: "grok", on: false, ok: false, why: "not installed on this machine" }, + ], + }, + ], + }, +}; + +describe("Web model picker & favorites", () => { + test("normalizeFavKey and toggleFavoriteKey normalize, deduplicate, and preserve order", () => { + expect(normalizeFavKey(" @Claude ", " opus ")).toBe("claude/opus"); + expect(normalizeFavKey("", "opus")).toBe(""); + expect(normalizeFavKey("claude", "")).toBe(""); + + const a = toggleFavoriteKey([], "@Claude", "opus"); + expect(a).toEqual({ keys: ["claude/opus"], starred: true }); + const b = toggleFavoriteKey(a.keys, "codex", "gpt-6.1-sol", true); + expect(b).toEqual({ keys: ["claude/opus", "codex/gpt-6.1-sol"], starred: true }); + const c = toggleFavoriteKey(b.keys, "claude", "opus"); + expect(c).toEqual({ keys: ["codex/gpt-6.1-sol"], starred: false }); + }); + + test("parsePickerResponse and buildPickerViewModel latch favorites at top and mark starrable rows", () => { + const snap = parsePickerResponse(SAMPLE_PICKER); + expect(snap.provider).toBe("claude"); + expect(snap.model).toBe("opus"); + expect(snap.effort).toBe("high"); + expect(snap.favoriteKeys).toEqual(["claude/sonnet", "codex/gpt-6.1-sol"]); + + const vm = buildPickerViewModel(snap, ""); + expect(vm.favorites.map((f) => `${f.provider}/${f.model}`)).toEqual(["claude/sonnet", "codex/gpt-6.1-sol"]); + expect(vm.groups.map((g) => g.provider)).toEqual(["claude", "codex", "grok"]); + + const claudeRows = vm.groups[0].models; + expect(claudeRows[0].starrable).toBe(false); + expect(claudeRows[0].starred).toBe(false); + expect(claudeRows[1].starrable).toBe(true); + expect(claudeRows[1].on).toBe(true); + expect(claudeRows[1].starred).toBe(false); + expect(claudeRows[2].starred).toBe(true); + }); + + test("applyFavoriteKeysToSnapshot immediately updates Favorites section and search filters both sections", () => { + const snap = parsePickerResponse(SAMPLE_PICKER); + const updated = applyFavoriteKeysToSnapshot(snap, ["claude/opus", "codex/gpt-6.1-sol"]); + expect(updated.favorites.map((f) => f.key)).toEqual(["claude/opus", "codex/gpt-6.1-sol"]); + expect(updated.favorites[0].on).toBe(true); + expect(updated.favorites[0].note).toBe("Opus 5.5 · claude-opus-5-5"); + + const filtered = buildPickerViewModel(updated, "codex"); + expect(filtered.favorites.map((f) => f.key)).toEqual(["codex/gpt-6.1-sol"]); + expect(filtered.groups.map((g) => g.provider)).toEqual(["codex"]); + }); + + test("rejects control chars, provider whitespace, overlong keys, 64-cap overflow, and unavailable models", () => { + expect(normalizeFavKey("cl aude", "opus")).toBe(""); + expect(normalizeFavKey("claude", "opus\n")).toBe(""); + expect(normalizeFavKey("claude", "m".repeat(194))).toBe(""); + expect(normalizeFavKey("claude", "m".repeat(193)).length).toBe(200); + + const sixtyFour = Array.from({ length: MAX_FAVORITES }, (_, i) => `claude/m${i}`); + const overflow = toggleFavoriteKey(sixtyFour, "codex", "gpt-6.1-sol", true); + expect(overflow.starred).toBe(false); + expect(overflow.keys).toHaveLength(MAX_FAVORITES); + expect(overflow.keys).not.toContain("codex/gpt-6.1-sol"); + + const snap = parsePickerResponse(SAMPLE_PICKER); + const updated = applyFavoriteKeysToSnapshot(snap, ["claude/opus", "claude/retired"]); + expect(updated.favorites[0].ok).toBe(true); + expect(updated.favorites[1].ok).toBe(false); + expect(updated.favorites[1].why).toBe("not available on this machine"); + }); +});