@capagents/forgeqe 3.3.7 → 3.3.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. package/dist/forgeqe.js +1681 -1681
  2. package/dist/web/assets/{3d-force-graph-Bsispdm1.js → 3d-force-graph-bqf5EzgX.js} +1 -1
  3. package/dist/web/assets/Agent-8Y47YLdR.js +10 -0
  4. package/dist/web/assets/{AgentWork-BugEUl60.js → AgentWork-Dqa1UKaU.js} +1 -1
  5. package/dist/web/assets/{ApiTests-B9rtwCbe.js → ApiTests-BOdFugGs.js} +1 -1
  6. package/dist/web/assets/{Browse-Dl2Lneca.js → Browse-W54t28gX.js} +1 -1
  7. package/dist/web/assets/{Chat-DocT7FlH.js → Chat-DiIxGONU.js} +1 -1
  8. package/dist/web/assets/{CommandPalette-B7YPDCOk.js → CommandPalette-DnIxy2ga.js} +1 -1
  9. package/dist/web/assets/{Compare-D6XsFmmb.js → Compare-VdisgqmY.js} +1 -1
  10. package/dist/web/assets/{Cost-DvbuXS6u.js → Cost-qfQZZB7-.js} +1 -1
  11. package/dist/web/assets/{Data-BmZHJkfj.js → Data-CDyRsQ0U.js} +1 -1
  12. package/dist/web/assets/{Desktop-DD3F69ih.js → Desktop-DEYZusRQ.js} +1 -1
  13. package/dist/web/assets/{DesktopReview-BR0LtVFw.js → DesktopReview-4YU21PCr.js} +1 -1
  14. package/dist/web/assets/{Evidence-OqAiYzrl.js → Evidence-l0_yQUpE.js} +1 -1
  15. package/dist/web/assets/{Explore-QNyusEFo.js → Explore-DkybdJjI.js} +1 -1
  16. package/dist/web/assets/{Features-N3_77mz-.js → Features-CIhQJMAK.js} +1 -1
  17. package/dist/web/assets/{Flags-Yv4Ttmmh.js → Flags-OCOPCt4-.js} +1 -1
  18. package/dist/web/assets/{Flaky-Bg2f2K1U.js → Flaky-B9EYZK9j.js} +1 -1
  19. package/dist/web/assets/{Impact-CpxvVnKj.js → Impact-BXDjDf_Q.js} +1 -1
  20. package/dist/web/assets/{Jobs-_gZTxoaG.js → Jobs-COZhEsxq.js} +1 -1
  21. package/dist/web/assets/{KindPage-Amr6R7Ym.js → KindPage-DIeBVPZA.js} +1 -1
  22. package/dist/web/assets/{LiveDevice-j7NZXIJZ.js → LiveDevice-CZZRu6xl.js} +1 -1
  23. package/dist/web/assets/{Migration-DfPYzTfk.js → Migration-BTCG2m5B.js} +1 -1
  24. package/dist/web/assets/{Mobile-fIhhQPsp.js → Mobile-CLT5OlqS.js} +1 -1
  25. package/dist/web/assets/{Observability-13DkrRp2.js → Observability-Nd9uj2hQ.js} +1 -1
  26. package/dist/web/assets/{OwnItems-BdiPfdTw.js → OwnItems-BinKnGAs.js} +1 -1
  27. package/dist/web/assets/{PageAgent-CC8Ha6vu.js → PageAgent-DrELdLct.js} +1 -1
  28. package/dist/web/assets/{Product-CnXkqwQm.js → Product-1SMtAUqO.js} +2 -2
  29. package/dist/web/assets/{Production-5mTIt4sr.js → Production-C5q3LjAR.js} +1 -1
  30. package/dist/web/assets/{Quality-DbLcbP1X.js → Quality-DVb1L07l.js} +1 -1
  31. package/dist/web/assets/{Readiness-BG1xmC09.js → Readiness-BN1VQDip.js} +1 -1
  32. package/dist/web/assets/{Record-sFth-2I1.js → Record-C8ohbDBp.js} +1 -1
  33. package/dist/web/assets/{Regression-Dd4y8I1z.js → Regression-mAzdSpwD.js} +1 -1
  34. package/dist/web/assets/{RelationGraph-Blfs7PhK.js → RelationGraph-CszRGlEp.js} +1 -1
  35. package/dist/web/assets/{Reports-HQkTX4Kr.js → Reports-BPD6ODz4.js} +1 -1
  36. package/dist/web/assets/{Requirements-DmhUNCIP.js → Requirements-D1xVywdV.js} +1 -1
  37. package/dist/web/assets/{Responsive-D18eYdCh.js → Responsive-DnK0Myzs.js} +1 -1
  38. package/dist/web/assets/{RunDiff-75a-smeg.js → RunDiff-aEt4BZYX.js} +1 -1
  39. package/dist/web/assets/{Settings-BaodIliH.js → Settings-D188FdLb.js} +7 -7
  40. package/dist/web/assets/{Steps-ZPH_rTJh.js → Steps-CgQ8E_Vv.js} +1 -1
  41. package/dist/web/assets/{TestData-DUlTo5qt.js → TestData-Dj73b-hW.js} +1 -1
  42. package/dist/web/assets/{TestManagement-DUMGdHDw.js → TestManagement-DxPMUroR.js} +1 -1
  43. package/dist/web/assets/{WhatsNew-BrVNacPl.js → WhatsNew-D-5E8NFV.js} +1 -1
  44. package/dist/web/assets/{agentSettingsSheet-UCqUtdjq.js → agentSettingsSheet-5JMUsoLi.js} +1 -1
  45. package/dist/web/assets/api-D_HT-I9y.js +1 -0
  46. package/dist/web/assets/{dataParts-C0C67bVQ.js → dataParts-bqVlyE0X.js} +1 -1
  47. package/dist/web/assets/{desktopAppPath-B89LKvjx.js → desktopAppPath-BDSG0kvw.js} +1 -1
  48. package/dist/web/assets/{flowTheme-BNKwRxun.js → flowTheme-DU5XjJr-.js} +1 -1
  49. package/dist/web/assets/{frame-C8sL1yo-.js → frame-Dt9QcYNX.js} +3 -3
  50. package/dist/web/assets/index-BdWLAq_n.js +57 -0
  51. package/dist/web/assets/index-CpAtlS2x.css +2 -0
  52. package/dist/web/assets/{markdown-CxsWgpYs.js → markdown-DgUpsCX8.js} +1 -1
  53. package/dist/web/assets/{nav-DYgvAJu-.js → nav-IMBXh0Jg.js} +1 -1
  54. package/dist/web/assets/{pageBack-BefA2rh7.js → pageBack-DwhsvsK7.js} +1 -1
  55. package/dist/web/assets/{palette-BgJTq_Ot.js → palette-CeG8IIbL.js} +1 -1
  56. package/dist/web/assets/{parts-BNpm4gXC.js → parts-DVUUpFdW.js} +1 -1
  57. package/dist/web/assets/{productParts-ZEi0sPIk.js → productParts-ClDOvIlz.js} +1 -1
  58. package/dist/web/assets/{qualityParts-DtsD70Qh.js → qualityParts-DF3ZMgo5.js} +1 -1
  59. package/dist/web/assets/{recordTest-Bz5ryzpS.js → recordTest-BBDRjct0.js} +1 -1
  60. package/dist/web/assets/{stepper-CONWT_tv.js → stepper-uX1iUWez.js} +1 -1
  61. package/dist/web/assets/{wizardParts-CulZqqjz.js → wizardParts-qs3g8O6h.js} +1 -1
  62. package/dist/web/index.html +8 -8
  63. package/docs/{ForgeQE-Static-Analysis-Report-5bbf0da7.html → ForgeQE-Static-Analysis-Report-ccbdac00.html} +33 -33
  64. package/docs/ForgeQE-Static-Analysis-Report-ccbdac00.pdf +0 -0
  65. package/package.json +1 -1
  66. package/dist/web/assets/Agent-39FbaH7G.js +0 -10
  67. package/dist/web/assets/api-D8-lxyQi.js +0 -1
  68. package/dist/web/assets/index-BFG13fbg.js +0 -55
  69. package/dist/web/assets/index-DBnWgocz.css +0 -2
@@ -0,0 +1 @@
1
+ var e=`forgeqe-web-token`,t=``;function n(e){return/(?:^#|&)token=([A-Za-z0-9]+)(?:&|$)/.exec(e)?.[1]}function r(){let e=n(location.hash);if(!e)return!1;let t=e!==o();return a(e),history.replaceState(null,``,`${location.pathname}${location.search}#/`),t&&u({kind:`token`,token:e,fresh:!0}),t}function i(){window.addEventListener(`hashchange`,()=>{r()&&location.reload()})}function a(n){t=n;try{sessionStorage.setItem(e,n)}catch{}}function o(){if(t)return t;try{return sessionStorage.getItem(e)||``}catch{return``}}function s(e){if(!e||typeof e!=`object`)return;let t=e;if(t.kind===`ask`)return{kind:`ask`};if(t.kind===`token`&&typeof t.token==`string`&&/^[A-Za-z0-9]{1,256}$/.test(t.token))return{kind:`token`,token:t.token,fresh:t.fresh===!0}}var c,l=!1;function u(e){try{c?.postMessage(e)}catch{}}var ee=600,d=Promise.resolve();function f(){if(typeof BroadcastChannel>`u`)return;c=new BroadcastChannel(`forgeqe-web-sign-in`);let e;c.onmessage=t=>{let n=s(t.data);if(!n)return;if(n.kind===`ask`){let e=o();e&&u({kind:`token`,token:e,fresh:!1});return}let r=o();r?n.fresh&&n.token!==r&&(a(n.token),l&&location.reload()):(a(n.token),e?.(),l&&location.reload())},!o()&&(d=new Promise(t=>{let n=setTimeout(t,ee);e=()=>{clearTimeout(n),t()}}),u({kind:`ask`}))}var p=`forgeqe-web-signed-out`,te=`ForgeQE web does not accept this page's sign-in: it was started again, with a new token. Open the address it printed last (with its #token=…) in this tab.`,ne=`This tab is not signed in to ForgeQE web, and no other open ForgeQE tab could share its sign-in. Open the address forgeqe web printed (with its #token=…), then other tabs work too.`;function m(){return o()?te:ne}var h=class extends Error{status;constructor(e,t){super(e),this.status=t}},g=`forgeqe-web-config-changed`,_=``;function re(e,t){e&&(!_||t!==`GET`?_=e:e!==_&&(_=e,window.dispatchEvent(new Event(g))))}async function v(e,t,n){await d;let r;try{r=await fetch(t,{method:e,headers:{Authorization:`Bearer ${o()}`,...n===void 0?{}:{"Content-Type":`application/json`}},body:n===void 0?void 0:JSON.stringify(n)})}catch{throw new h(`ForgeQE web is not running. Start it in your project folder with forgeqe web, then open the address it prints.`,0)}let i=await r.json().catch(()=>({}));if(r.ok&&re(r.headers.get(`X-ForgeQE-Config`),e),r.status===401)throw l=!0,window.dispatchEvent(new Event(p)),new h(m(),401);if(!r.ok)throw new h(i.error||`The request failed (${r.status}).`,r.status);return i}var ie={view:()=>v(`GET`,`/api/telemetry`),save:e=>v(`POST`,`/api/telemetry/save`,e),on:e=>v(`POST`,`/api/telemetry/on`,{confirm:e}),off:()=>v(`POST`,`/api/telemetry/off`,{}),test:()=>v(`POST`,`/api/telemetry/test`,{})},ae={status:()=>v(`GET`,`/api/voice`),setup:()=>v(`POST`,`/api/voice/setup`,{confirm:!0}),warm:()=>v(`POST`,`/api/voice/warm`,{}),ticket:(e,t)=>v(`POST`,`/api/voice/ticket`,{...e?{chat:e}:{},eagerness:t})},y={repos:(e,t,n,r)=>v(`POST`,`/api/settings/repo-accounts/list`,{id:e,account:t,values:n,taken:r}),signIn:(e,t)=>v(`POST`,`/api/settings/repo-accounts/signin`,{id:e,account:t}),testSearch:(e,t,n,r)=>v(`POST`,`/api/settings/search/test`,{rag:e,mcp:t,query:n,values:r}),documents:()=>v(`GET`,`/api/settings/documents`),addDocument:(e,t,n)=>v(`POST`,`/api/settings/documents`,{name:e,text:t,replace:n}),removeDocument:e=>v(`POST`,`/api/settings/documents/remove`,{name:e})},b={settings:()=>v(`GET`,`/api/settings`),save:(e,t,n,r)=>v(`PUT`,`/api/settings/${e}`,{value:t,version:n,...r&&Object.keys(r).length?{renames:r}:{}}),saveText:(e,t,n,r)=>v(`PUT`,`/api/settings/${e}`,{text:t,env:n,version:r}),splitEnvironments:()=>v(`PUT`,`/api/settings/split`,{}),saveGrid:(e,t,n)=>v(`PUT`,`/api/settings/grid`,{grid:e,value:t,version:n}),test:(e,t,n,r)=>v(`POST`,`/api/test`,{kind:e,id:t,settings:n,values:r}),saveSecrets:e=>v(`PUT`,`/api/secrets`,{values:e}),saveGuardrails:(e,t)=>v(`PUT`,`/api/settings/guardrails`,{rules:e,version:t})},x={list:()=>v(`GET`,`/api/secrets-hub`),save:(e,t)=>v(`POST`,`/api/secrets-hub/secret`,{name:e,value:t}),remove:e=>v(`POST`,`/api/secrets-hub/secret`,{name:e,remove:!0}),saveVault:(e,t)=>v(`POST`,`/api/secrets-hub/vault`,{vault:e,replace:t}),removeVault:e=>v(`POST`,`/api/secrets-hub/vault`,{id:e,remove:!0}),names:(e,t=``)=>v(`GET`,`/api/secrets-hub/vault/${encodeURIComponent(e)}/names${t?`?search=${encodeURIComponent(t)}`:``}`),pull:e=>v(`POST`,`/api/secrets-hub/pull`,e),signIn:e=>v(`POST`,`/api/secrets-hub/vault/${encodeURIComponent(e)}/signin`,{}),signinState:()=>v(`GET`,`/api/secrets-hub/signin`),cancelSignin:()=>v(`POST`,`/api/secrets-hub/signin/cancel`,{}),check:e=>v(`POST`,`/api/secrets-hub/vault/${encodeURIComponent(e)}/check`,{}),exportVaults:()=>v(`GET`,`/api/secrets-hub/export`),importVaults:e=>v(`POST`,`/api/secrets-hub/import`,{text:e}),pullAgain:e=>v(`POST`,`/api/secrets-hub/pull-again`,e?{name:e}:{})},S={state:()=>v(`GET`,`/api/setup`),machine:()=>v(`GET`,`/api/setup/machine`),folders:e=>v(`GET`,`/api/folders${e?`?path=${encodeURIComponent(e)}`:``}`),newFolder:(e,t)=>v(`POST`,`/api/folders`,{parent:e,name:t}),open:e=>v(`PUT`,`/api/project`,{path:e}),init:()=>v(`POST`,`/api/project/init`),run:()=>v(`POST`,`/api/setup/run`),packages:()=>v(`GET`,`/api/setup/packages`)},C={get:()=>v(`GET`,`/api/onboarding`),status:()=>v(`GET`,`/api/onboarding/state`),save:e=>v(`POST`,`/api/onboarding`,e),features:()=>v(`GET`,`/api/onboarding/features`),install:e=>v(`POST`,`/api/onboarding/install`,{features:e,confirm:!0}),repo:()=>v(`GET`,`/api/onboarding/repo`),branches:(e,t)=>v(`POST`,`/api/onboarding/repo/branches`,{url:e,...t?{tokenVar:t}:{}}),clone:(e,t,n)=>v(`POST`,`/api/onboarding/repo/clone`,{url:e,...t?{branch:t}:{},...n?{tokenVar:n}:{}}),startRepo:e=>v(`POST`,`/api/onboarding/repo/init`,e?{remote:e}:{}),tokens:()=>v(`GET`,`/api/onboarding/tokens`)},w={get:()=>v(`GET`,`/api/fx`)},T={list:()=>v(`GET`,`/api/background`)},E={files:()=>v(`GET`,`/api/guardrails/files`),add:e=>v(`POST`,`/api/guardrails/files`,e),save:(e,t)=>v(`PUT`,`/api/guardrails/files/${encodeURIComponent(e)}`,t),remove:e=>v(`DELETE`,`/api/guardrails/files/${encodeURIComponent(e)}`)},D={prompts:()=>v(`GET`,`/api/prompts`),addTeamPrompt:e=>v(`POST`,`/api/prompts/team`,e),saveTeamPrompt:(e,t)=>v(`PUT`,`/api/prompts/team/${encodeURIComponent(e)}`,t),deleteTeamPrompt:e=>v(`DELETE`,`/api/prompts/team/${encodeURIComponent(e)}`),agentPrompt:e=>v(`GET`,`/api/prompts/agent/${encodeURIComponent(e)}`),prompt:e=>v(`GET`,`/api/prompts/${encodeURIComponent(e)}`),savePrompt:(e,t)=>v(`PUT`,`/api/prompts/${encodeURIComponent(e)}`,{text:t}),resetPrompt:e=>v(`DELETE`,`/api/prompts/${encodeURIComponent(e)}`),skills:()=>v(`GET`,`/api/skills`),skill:e=>v(`GET`,`/api/skills/${encodeURIComponent(e)}`),addSkill:e=>v(`POST`,`/api/skills`,e),saveSkill:(e,t)=>v(`PUT`,`/api/skills/${encodeURIComponent(e)}`,t),removeSkill:e=>v(`DELETE`,`/api/skills/${encodeURIComponent(e)}`),registry:()=>v(`GET`,`/api/registry`),logs:()=>v(`GET`,`/api/logs`),log:e=>v(`GET`,`/api/logs/${encodeURIComponent(e)}`),audit:()=>v(`GET`,`/api/audit`),tokenomics:()=>v(`GET`,`/api/tokenomics`)},O={start:(e,t,n,r)=>v(`POST`,`/api/chats`,{text:e,...t,...n?{page:n}:{},...r?{context:r}:{}}),list:()=>v(`GET`,`/api/chats`),events:(e,t,n)=>v(`GET`,`/api/chats/${encodeURIComponent(e)}?after=${t}${n?`&wait=1`:``}`),send:(e,t,n)=>v(`POST`,`/api/chats/${encodeURIComponent(e)}/messages`,{text:t,...n?{context:n}:{}}),answer:(e,t,n)=>v(`POST`,`/api/chats/${encodeURIComponent(e)}/answer`,{ask:t,choice:n}),proceed:(e,t,n)=>v(`POST`,`/api/chats/${encodeURIComponent(e)}/continue`,{wait:t,ok:n}),stop:e=>v(`POST`,`/api/chats/${encodeURIComponent(e)}/stop`,{}),pause:(e,t)=>v(`POST`,`/api/chats/${encodeURIComponent(e)}/${t?`pause`:`resume`}`,{}),settings:(e,t)=>v(`POST`,`/api/chats/${encodeURIComponent(e)}/settings`,t),screen:(e,t,n)=>v(`POST`,`/api/chats/${encodeURIComponent(e)}/screen`,{read:t,text:n}),model:(e,t)=>v(`POST`,`/api/chats/${encodeURIComponent(e)}/model`,{profile:t}),close:e=>v(`DELETE`,`/api/chats/${encodeURIComponent(e)}`),refresh:e=>v(`POST`,`/api/chats/${encodeURIComponent(e)}/refresh`,{}),files:(e,t={})=>v(`GET`,`/api/chat/files?q=${encodeURIComponent(e)}${t.chat?`&chat=${encodeURIComponent(t.chat)}`:``}${t.code===!1?`&code=0`:``}`),attachFile:(e,t={})=>v(`POST`,`/api/chat/files`,{...e,...t}),dropFile:(e,t={})=>v(`DELETE`,`/api/chat/files`,{path:e,...t}),openFile:(e,t={})=>v(`POST`,`/api/chat/files/open`,{path:e,...t})},k={view:()=>v(`GET`,`/api/knowledge/graph`),search:(e,t)=>v(`GET`,`/api/knowledge/graph/search?q=${encodeURIComponent(e)}${t?`&kind=${encodeURIComponent(t)}`:``}`),part:e=>v(`GET`,`/api/knowledge/graph/part?id=${encodeURIComponent(e)}`),build:()=>v(`POST`,`/api/knowledge/graph/build`,{action:`build`}),understand:()=>v(`POST`,`/api/knowledge/graph/build`,{action:`model`,confirmed:!0}),stop:()=>v(`POST`,`/api/knowledge/graph/stop`)},A={view:()=>v(`GET`,`/api/knowledge/product`),feedback:(e,t,n)=>v(`POST`,`/api/knowledge/feedback`,{id:e,verdict:t,...n?{note:n}:{}})},j={view:()=>v(`GET`,`/api/knowledge/landscape`),decide:(e,t,n)=>v(`POST`,`/api/knowledge/systems`,{repo:e,verdict:t,...n?{system:n}:{}})},M={overview:()=>v(`GET`,`/api/evidence`),monitor:e=>v(`GET`,`/api/evidence/monitor${e?`?agent=${encodeURIComponent(e)}`:``}`),audit:e=>v(`GET`,`/api/evidence/audit?agent=${encodeURIComponent(e)}`),baseline:(e,t,n)=>v(`POST`,`/api/evidence/baseline`,{agent:e,confirm:t,reason:n}),trust:(e,t,n,r)=>v(`POST`,`/api/evidence/trust`,{agent:e,level:t,confirm:n,reason:r}),learn:e=>v(`GET`,`/api/evidence/learn?agent=${encodeURIComponent(e)}`),replay:(e,t,n,r)=>v(`POST`,`/api/evidence/replay`,{agent:e,run:t,hypothesis:n,replays:r}),decide:(e,t,n,r)=>v(`POST`,`/api/evidence/decide`,{agent:e,proposal:t,decision:n,reason:r}),dashboard:e=>v(`GET`,`/api/evidence/dashboard?agent=${encodeURIComponent(e)}`),runs:()=>v(`GET`,`/api/evidence/runs`),run:e=>v(`GET`,`/api/evidence/run?id=${encodeURIComponent(e)}`),verdict:e=>v(`GET`,`/api/evidence/verdict?id=${encodeURIComponent(e)}`),review:()=>v(`GET`,`/api/evidence/review`),releases:()=>v(`GET`,`/api/evidence/releases`),release:(e,t,n)=>v(`GET`,`/api/evidence/release?agent=${encodeURIComponent(e)}&candidate=${encodeURIComponent(t)}${n?`&live=${encodeURIComponent(n)}`:``}`),overrule:(e,t,n)=>v(`POST`,`/api/evidence/overrule`,{run:e,finding:t,reason:n}),drafts:()=>v(`GET`,`/api/evidence/drafts`),decideDraft:(e,t,n,r)=>v(`POST`,`/api/evidence/draft`,{id:e,decision:t,confirm:n,reason:r}),grade:(e,t,n,r)=>v(`POST`,`/api/evidence/grade`,{run:e,criterion:t,grade:n,reason:r}),contracts:()=>v(`GET`,`/api/evidence/contracts`)},N={view:()=>v(`GET`,`/api/knowledge/engineering`),service:e=>v(`GET`,`/api/knowledge/engineering/service?repo=${encodeURIComponent(e)}`),impact:e=>v(`GET`,`/api/knowledge/engineering/impact?id=${encodeURIComponent(e)}`),path:(e,t)=>v(`GET`,`/api/knowledge/engineering/path?from=${encodeURIComponent(e)}&to=${encodeURIComponent(t)}`),codeMap:e=>v(`GET`,`/api/knowledge/engineering/codemap${e?`?repo=${encodeURIComponent(e)}`:``}`),files:e=>v(`GET`,`/api/knowledge/engineering/files${e?`?repo=${encodeURIComponent(e)}`:``}`),churn:()=>v(`GET`,`/api/knowledge/engineering/churn`)},P={knowledge:()=>v(`GET`,`/api/knowledge`),knowledgeFile:e=>v(`GET`,`/api/knowledge/file?rel=${encodeURIComponent(e)}`),saveKnowledgeFile:(e,t)=>v(`PUT`,`/api/knowledge/file`,{rel:e,text:t}),docsStatus:()=>v(`GET`,`/api/docs/status`),indexDocs:()=>v(`POST`,`/api/docs/index`),searchDocs:(e,t={})=>v(`POST`,`/api/docs/search`,{query:e,...t}),docOutline:e=>v(`GET`,`/api/docs/outline?rel=${encodeURIComponent(e)}`),docFile:(e,t)=>v(`GET`,`/api/docs/file?source=${encodeURIComponent(e)}&file=${encodeURIComponent(t)}`),memory:()=>v(`GET`,`/api/memory`),clearMemory:e=>v(`POST`,`/api/memory/clear`,{...e?{target:e.name,kind:e.kind}:{},confirmed:!0})},F={get:()=>v(`GET`,`/api/theme`),uploadLogo:(e,t,n=`logo`)=>v(`POST`,`/api/theme/logo`,{data:e,type:t,which:n}),fromUrl:e=>v(`POST`,`/api/theme/from-url`,{url:e})},I={convert:(e,t)=>v(`POST`,`/api/environments/convert`,{...e,...t?{name:t}:{}}),files:e=>v(`GET`,`/api/environments/files?kind=${e}`)},L={get:()=>v(`GET`,`/api/workspace`)},R={open:e=>v(`POST`,`/api/files/open`,{path:e})},z={list:()=>v(`GET`,`/api/reports`),build:()=>v(`POST`,`/api/reports/project/build`),buildStatus:()=>v(`GET`,`/api/reports/project/build`)},B={list:()=>v(`GET`,`/api/jobs`),detail:e=>v(`GET`,`/api/jobs/${encodeURIComponent(e)}`),log:(e,t)=>v(`GET`,`/api/jobs/${encodeURIComponent(e)}/log?tail=400${t?`&run=${encodeURIComponent(t)}`:``}`),add:e=>v(`POST`,`/api/jobs`,e),act:(e,t)=>v(`POST`,`/api/jobs/${encodeURIComponent(e)}/${t}`),remove:e=>v(`DELETE`,`/api/jobs/${encodeURIComponent(e)}`)},V={list:()=>v(`GET`,`/api/runs`),detail:e=>v(`GET`,`/api/runs/${encodeURIComponent(e)}`),cancel:e=>v(`POST`,`/api/runs/${encodeURIComponent(e)}/cancel`)},H={get:()=>v(`GET`,`/api/record`),mobileDevices:(e,t,n=!1)=>v(`GET`,`/api/record/mobile/devices?place=${encodeURIComponent(e)}&app=${encodeURIComponent(t)}${n?`&fresh=1`:``}`),review:e=>v(`GET`,`/api/record/review?run=${encodeURIComponent(e)}`),saveReview:(e,t)=>v(`POST`,`/api/record/review`,{run:e,...t}),restoreReview:(e,t)=>v(`POST`,`/api/record/review`,{run:e,restore:t}),suggest:e=>v(`POST`,`/api/record/suggest`,{run:e}),useBlock:(e,t,n)=>v(`POST`,`/api/record/review`,{run:e,useBlock:{block:t,from:n}}),insertBlock:(e,t,n,r)=>v(`POST`,`/api/record/review`,{run:e,insert:{after:t,block:n,...r}}),refreshBlock:(e,t,n)=>v(`POST`,`/api/record/review`,{run:e,refreshBlock:{block:t,from:n}}),blocks:()=>v(`GET`,`/api/record/blocks`),saveBlock:(e,t,n,r,i)=>v(`POST`,`/api/record/blocks`,{run:e,name:t,from:n,to:r,...i?{section:i}:{}}),updateBlock:(e,t)=>v(`POST`,`/api/record/blocks/update`,{id:e,...t}),deleteBlock:(e,t=!1)=>v(`POST`,`/api/record/blocks/delete`,{id:e,...t?{confirmed:!0}:{}}),playBlock:(e,t)=>v(`POST`,`/api/record/command`,{cmd:`play_block`,block:{id:e,...t}}),deleteRecordings:e=>v(`POST`,`/api/record/delete`,{runs:e,confirmed:!0}),tryView:e=>v(`GET`,`/api/record/try?run=${encodeURIComponent(e)}`),tryRun:(e,t,n,r)=>v(`POST`,`/api/record/try`,{run:e,...t?{env:t}:{},data:n,...r?{each:r}:{}}),write:(e,t)=>v(`POST`,`/api/record/write`,{run:e,check:t.check,...t.env?{env:t.env}:{},...t.data?{data:t.data}:{},...t.each?{each:t.each}:{}}),stopWrite:e=>v(`POST`,`/api/record/write/stop`,{run:e}),reheal:(e,t,n,r)=>v(`POST`,`/api/record/reheal`,{run:e,...t?{env:t}:{},data:n,...r?{each:r}:{}}),acceptReheals:(e,t)=>v(`POST`,`/api/record/reheal/accept`,{run:e,...t.length?{steps:t}:{}}),tryStop:e=>v(`POST`,`/api/record/try/stop`,{run:e}),shot:(e,t)=>Q(`/api/record/shot?run=${encodeURIComponent(e)}&shot=${encodeURIComponent(t)}`,`image/jpeg`),tryShot:(e,t)=>{let n=`/api/record/shot?run=${encodeURIComponent(e)}&kind=try&shot=${String(t).padStart(3,`0`)}`;return Q(n,`image/jpeg`).catch(()=>Q(n,`image/png`))},openVideo:(e,t)=>v(`POST`,`/api/record/video/open`,{run:e,kind:t}),openLog:(e,t)=>v(`POST`,`/api/record/log/open`,{run:e,which:t}),openTrace:e=>v(`POST`,`/api/record/trace/open`,{run:e}),screen:()=>Q(`/api/record/screen`,`image/png`),start:e=>v(`POST`,`/api/record`,e),command:e=>v(`POST`,`/api/record/command`,e)},U={list:()=>v(`GET`,`/api/packs`),detail:e=>v(`GET`,`/api/packs/${encodeURIComponent(e)}`),build:e=>v(`POST`,`/api/packs/build`,e),run:(e,t)=>v(`POST`,`/api/packs/${encodeURIComponent(e)}/run`,{on:t}),heal:(e,t)=>v(`POST`,`/api/packs/${encodeURIComponent(e)}/heal`,{tests:t}),stop:()=>v(`POST`,`/api/packs/stop`,{}),answer:(e,t)=>v(`POST`,`/api/packs/answer`,{id:e,choice:t}),edit:(e,t)=>v(`POST`,`/api/packs/${encodeURIComponent(e)}/edit`,t),refresh:e=>v(`POST`,`/api/packs/${encodeURIComponent(e)}/refresh`,{}),compare:(e,t)=>v(`GET`,`/api/packs/${encodeURIComponent(e)}/compare?with=${encodeURIComponent(t)}`)},W={view:()=>v(`GET`,`/api/desktop`),replay:e=>v(`POST`,`/api/desktop/replay`,e),explore:(e,t,n)=>v(`POST`,`/api/desktop/explore`,{app:e,goal:t,name:n,confirmed:!0}),validate:e=>v(`POST`,`/api/desktop/validate`,{workflow:e}),setup:e=>v(`POST`,`/api/desktop/setup`,{...e,confirmed:!0}),doctor:()=>v(`POST`,`/api/desktop/doctor`,{}),acceptHeals:e=>v(`POST`,`/api/desktop/heals`,{run:e}),addApp:e=>v(`POST`,`/api/desktop/apps`,e),steps:e=>v(`GET`,`/api/desktop/steps?workflow=${encodeURIComponent(e)}`),editStep:e=>v(`POST`,`/api/desktop/steps/edit`,e),restore:(e,t,n)=>v(`POST`,`/api/desktop/restore`,{workflow:e,backup:t,...n?{version:n}:{}}),saveBlock:(e,t,n,r,i)=>v(`POST`,`/api/desktop/blocks`,{workflow:e,from:t,to:n,name:r,...i?{section:i}:{}}),review:e=>v(`GET`,`/api/desktop/review?workflow=${encodeURIComponent(e)}`),controls:(e,t)=>v(`GET`,`/api/desktop/controls?run=${encodeURIComponent(e)}&step=${t}`),shot:(e,t)=>Q(`/api/desktop/shot?run=${encodeURIComponent(e)}&step=${t}`,`image/png`),editApp:e=>v(`POST`,`/api/desktop/apps/edit`,e),removeApp:(e,t)=>v(`POST`,`/api/desktop/apps/remove`,{name:e,confirmed:t}),browse:()=>v(`POST`,`/api/desktop/browse`,{}),stop:()=>v(`POST`,`/api/desktop/stop`,{}),answer:(e,t)=>v(`POST`,`/api/desktop/answer`,{id:e,choice:t})},G={view:()=>v(`GET`,`/api/mobile`),live:()=>v(`GET`,`/api/mobile/live`),screen:e=>Q(`/api/mobile/live/screen?id=${encodeURIComponent(e)}`,`image/png`),replay:e=>v(`POST`,`/api/mobile/replay`,e),explore:e=>v(`POST`,`/api/mobile/explore`,{...e,confirmed:!0}),maestro:(e,t)=>v(`POST`,`/api/mobile/maestro`,{flows:e,...t?.length?{devices:t}:{}}),validate:e=>v(`POST`,`/api/mobile/validate`,{workflow:e}),keepDevices:(e,t)=>v(`POST`,`/api/mobile/devices/keep`,{app:e,picks:t}),setup:e=>v(`POST`,`/api/mobile/setup`,{force:e,confirmed:!0}),doctor:()=>v(`POST`,`/api/mobile/doctor`,{}),upload:e=>v(`POST`,`/api/mobile/upload`,{...e,confirmed:!0}),stop:()=>v(`POST`,`/api/mobile/stop`,{}),answer:(e,t)=>v(`POST`,`/api/mobile/answer`,{id:e,choice:t}),chatDevice:e=>v(`GET`,`/api/chats/${encodeURIComponent(e)}/device`),chatScreen:(e,t)=>Q(`/api/chats/${encodeURIComponent(e)}/device/screen?id=${encodeURIComponent(t)}`,`image/png`)},K=e=>`/api/migrations/${encodeURIComponent(e)}`,q={list:()=>v(`GET`,`/api/migrations`),testRepository:(e,t)=>v(`POST`,`/api/migrations/sources/test`,{url:e,tokenVar:t}),source:e=>v(`POST`,`/api/migrations/sources`,e),files:(e,t)=>v(`POST`,`/api/migrations/sources/${encodeURIComponent(e)}/files`,{files:t}),finish:e=>v(`POST`,`/api/migrations/sources/${encodeURIComponent(e)}/finish`,{}),discover:(e,t)=>v(`GET`,`/api/migrations/discover?${new URLSearchParams({...e?{workspace:e}:{},from:t})}`),plan:e=>v(`POST`,`/api/migrations/plan`,e),detail:e=>v(`GET`,K(e)),events:(e,t)=>v(`GET`,`${K(e)}/events?after=${t}`),pair:(e,t)=>v(`GET`,`${K(e)}/files?unit=${encodeURIComponent(t)}`),report:e=>v(`GET`,`${K(e)}/report`),start:(e,t,n)=>v(`POST`,`${K(e)}/start`,{confirm:t,acceptLimits:n}),verify:e=>v(`POST`,`${K(e)}/verify`,{}),fix:(e,t,n)=>v(`POST`,`${K(e)}/fix`,{units:t,note:n}),stop:e=>v(`POST`,`${K(e)}/stop`,{}),delete:(e,t)=>v(`POST`,`${K(e)}/delete`,{confirm:t})},J=e=>`/api/tosca/assistant/${encodeURIComponent(e)}`,oe={start:e=>v(`POST`,`/api/tosca/assistant`,{text:e}),view:e=>v(`GET`,J(e)),say:(e,t)=>v(`POST`,J(e),{text:t}),pick:(e,t,n)=>v(`POST`,J(e),{question:t,pick:n}),token:(e,t)=>v(`POST`,J(e),{tokenVar:t}),end:e=>v(`DELETE`,J(e))},Y=e=>`/api/tosca/${encodeURIComponent(e)}`,X={list:()=>v(`GET`,`/api/tosca`),inspect:(e,t)=>v(`POST`,`/api/tosca/inspect`,{file:e,testAttributes:t}),inspectSources:(e,t)=>v(`POST`,`/api/tosca/inspect`,{sources:e,testAttributes:t}),clone:(e,t,n)=>v(`POST`,`/api/tosca/sources/git`,{url:e,...t?{branch:t}:{},...n?{tokenVar:n}:{}}),removeClone:e=>v(`DELETE`,`/api/tosca/sources/${encodeURIComponent(e)}`),adopt:e=>v(`POST`,`/api/tosca/sources/${encodeURIComponent(e)}/adopt`),plan:e=>v(`POST`,`/api/tosca/plan`,e),detail:e=>v(`GET`,Y(e)),events:(e,t)=>v(`GET`,`${Y(e)}/events?after=${t}`),case:(e,t)=>v(`GET`,`${Y(e)}/case?id=${encodeURIComponent(t)}`),estimate:e=>v(`GET`,`${Y(e)}/estimate`),ci:(e,t)=>v(`GET`,`${Y(e)}/ci?kind=${t}`),writeCi:(e,t)=>v(`POST`,`${Y(e)}/ci`,{kind:t}),data:e=>v(`GET`,`${Y(e)}/data`),setData:(e,t)=>v(`POST`,`${Y(e)}/data`,t),pr:(e,t=``)=>v(`GET`,`${Y(e)}/pr${t?`?base=${encodeURIComponent(t)}`:``}`),openPr:(e,t)=>v(`POST`,`${Y(e)}/pr`,t),reimport:(e,t)=>v(`POST`,`${Y(e)}/reimport`,{refresh:t}),ready:e=>v(`GET`,`${Y(e)}/ready`),answer:(e,t)=>v(`POST`,`${Y(e)}/ready`,t),report:e=>v(`GET`,`${Y(e)}/report`),reportCase:(e,t)=>v(`GET`,`${Y(e)}/report-case?id=${encodeURIComponent(t)}`),reportZip:async e=>{await d;let t=await fetch(`${Y(e)}/report-zip`,{headers:{Authorization:`Bearer ${o()}`}});if(!t.ok)throw new h(await t.json().then(e=>e.error,()=>void 0)||`The zip could not be made (HTTP ${t.status}).`,t.status);return t.blob()},reportHtml:async e=>{await d;let t=await fetch(`${Y(e)}/report-html`,{headers:{Authorization:`Bearer ${o()}`}});if(!t.ok)throw new h(`The HTML report could not be made (HTTP ${t.status}).`,t.status);return t.blob()},evidenceUrl:(e,t,n)=>`${Y(e)}/evidence/${encodeURIComponent(t)}/${encodeURIComponent(n)}`,evidence:(e,t,n)=>Q(X.evidenceUrl(e,t,n),ce(n)),start:(e,t,n,r)=>v(`POST`,`${Y(e)}/start`,{confirm:t,acceptLimits:n,...r?{batch:r}:{}}),fix:(e,t,n)=>v(`POST`,`${Y(e)}/fix`,{units:t,note:n}),stop:e=>v(`POST`,`${Y(e)}/stop`,{}),verify:(e,t,n)=>v(`POST`,`${Y(e)}/verify`,{...t?{suite:t}:{},...n?.length?{units:n}:{}}),delete:(e,t)=>v(`POST`,`${Y(e)}/delete`,{confirm:t})},Z=(e,t)=>`/api/apitests/${encodeURIComponent(e)}/${t}`,se={view:()=>v(`GET`,`/api/apitests`),set:e=>v(`GET`,`/api/apitests/${encodeURIComponent(e)}`),contracts:e=>v(`POST`,`/api/apitests/contracts`,e),run:(e,t)=>v(`POST`,Z(e,`run`),t),runAll:(e,t)=>v(`POST`,Z(e,`run-all`),t),scenarios:(e,t)=>v(`POST`,Z(e,`scenarios`),t),runScenarios:(e,t)=>v(`POST`,Z(e,`run-scenarios`),t),stop:()=>v(`POST`,`/api/apitests/stop`,{}),send:(e,t)=>v(`POST`,Z(e,`send`),t),preview:(e,t)=>v(`POST`,Z(e,`preview`),t),save:(e,t)=>v(`POST`,Z(e,`save`),t),signInSave:(e,t)=>v(`POST`,Z(e,`sign-in-save`),{signIn:t}),signInRemove:(e,t)=>v(`POST`,Z(e,`sign-in-remove`),{name:t}),expectFrom:(e,t)=>v(`POST`,Z(e,`expect-from`),t),add:(e,t)=>v(`POST`,Z(e,`add`),t),rename:(e,t)=>v(`POST`,Z(e,`rename`),t),remove:(e,t)=>v(`POST`,Z(e,`remove`),{call:t}),renameFolder:(e,t,n)=>v(`POST`,Z(e,`folder-rename`),{folder:t,to:n}),removeFolder:(e,t)=>v(`POST`,Z(e,`folder-remove`),{folder:t}),deleteSet:e=>v(`POST`,Z(e,`delete`),{confirmed:!0}),auth:(e,t)=>v(`POST`,Z(e,`auth`),t),base:(e,t)=>v(`POST`,Z(e,`base`),t),prefs:(e,t)=>v(`POST`,Z(e,`prefs`),t),saveFlow:(e,t)=>v(`POST`,Z(e,`flow-save`),{flow:t}),removeFlow:(e,t)=>v(`POST`,Z(e,`flow-remove`),{flow:t}),importCollection:(e,t)=>v(`POST`,`/api/apitests/import`,{collection:e,...t?{name:t}:{}}),exportCollection:e=>v(`GET`,Z(e,`postman`)),specFile:(e,t)=>v(`POST`,`/api/apitests/spec-file`,{name:e,text:t})};async function Q(e,t=`image/png`){await d;let n=await fetch(e,{headers:{Authorization:`Bearer ${o()}`}}),r=(n.headers.get(`content-type`)||``).split(`;`)[0].trim();if(!n.ok||r!==t)throw new h(`The image could not be loaded.`,n.status);let i=new Blob([await n.arrayBuffer()],{type:t}),a=await new Promise((e,t)=>{let n=new FileReader;n.onload=()=>e(String(n.result)),n.onerror=()=>t(new h(`The image could not be read.`,0)),n.readAsDataURL(i)});if(!a.startsWith(`data:${t};base64,`))throw new h(`The image could not be read.`,0);return a}function ce(e){let t=e.slice(e.lastIndexOf(`.`)).toLowerCase();return t===`.jpg`||t===`.jpeg`?`image/jpeg`:t===`.webp`?`image/webp`:t===`.webm`?`video/webm`:t===`.mp4`?`video/mp4`:`image/png`}var le={view:()=>v(`GET`,`/api/quality`),run:e=>v(`GET`,`/api/quality/${encodeURIComponent(e)}`),compare:e=>v(`POST`,`/api/quality/${encodeURIComponent(e)}/compare`,{}),approve:(e,t,n)=>v(`POST`,`/api/quality/${encodeURIComponent(e)}/approve`,{pages:t,...n?{reason:n}:{}}),image:(e,t,n)=>Q(`/api/quality/${encodeURIComponent(e)}/image/${t}/${n}`)},ue={view:()=>v(`GET`,`/api/perf`),predict:(e,t)=>v(`GET`,`/api/perf/predict?plan=${encodeURIComponent(e)}${t?.length?`&users=${t.join(`,`)}`:``}`),plan:(e,t)=>v(`GET`,`/api/perf/plan?plan=${encodeURIComponent(e)}${t?`&env=${encodeURIComponent(t)}`:``}`),run:(e,t)=>v(`GET`,`/api/perf/run?plan=${encodeURIComponent(e)}&id=${encodeURIComponent(t)}`),baseline:(e,t,n)=>v(`POST`,`/api/perf/baseline`,{plan:e,id:t,confirmed:!0,...n?{reason:n}:{}}),report:(e,t)=>v(`POST`,`/api/perf/report`,{plan:e,id:t}),analyse:(e,t)=>v(`POST`,`/api/perf/analyse`,{plan:e,id:t}),convert:e=>v(`POST`,`/api/perf/convert`,e),exportLoadRunner:e=>v(`POST`,`/api/perf/export`,e),import:e=>v(`POST`,`/api/perf/import`,e),setup:()=>v(`POST`,`/api/perf/setup`,{confirmed:!0}),start:e=>v(`POST`,`/api/perf/run`,e),stop:()=>v(`POST`,`/api/perf/stop`,{}),strategies:()=>v(`GET`,`/api/perf/strategies`),strategy:e=>v(`GET`,`/api/perf/strategy?id=${encodeURIComponent(e)}`),draftStrategy:e=>v(`POST`,`/api/perf/strategy`,{request:e}),approveStrategy:(e,t,n)=>v(`POST`,`/api/perf/strategy/approve`,{id:e,typed:t,digest:n}),writeStrategy:e=>v(`POST`,`/api/perf/strategy/write`,{id:e})},de={view:(e,t)=>v(`GET`,`/api/test-cases?${new URLSearchParams({system:e,story:t})}`),preview:(e,t,n)=>v(`POST`,`/api/test-cases/preview`,{system:e,story:t,changes:n}),apply:(e,t,n)=>v(`POST`,`/api/test-cases/apply`,{system:e,story:t,changes:n,confirmed:!0}),tryMapping:(e,t,n)=>v(`POST`,`/api/test-cases/try-mapping`,{system:e,key:t,value:n})},fe={personas:()=>v(`GET`,`/api/a11y/personas`),sessions:()=>v(`GET`,`/api/a11y/sessions`),session:e=>v(`GET`,`/api/a11y/sessions/${encodeURIComponent(e)}`)},pe=[`sme`,`end_user`,`specialist`,`business_user`],me=[`novice`,`intermediate`,`expert`],he=[`legitimate`,`opportunistic`,`adversarial`],ge=[`low`,`medium`,`high`],_e={list:()=>v(`GET`,`/api/personas`),draft:e=>v(`POST`,`/api/personas/draft`,e),exportFile:()=>v(`GET`,`/api/personas/export`),importFile:e=>v(`POST`,`/api/personas/import`,{text:e}),save:e=>v(`POST`,`/api/personas`,{persona:e}),update:(e,t)=>v(`POST`,`/api/personas/update`,{id:e,persona:t}),resources:()=>v(`GET`,`/api/personas/resources`),suggest:e=>v(`GET`,`/api/personas/suggest?id=${encodeURIComponent(e)}`),own:e=>v(`GET`,`/api/personas/own?id=${encodeURIComponent(e)}`),draftOwn:e=>v(`POST`,`/api/personas/own/draft`,{id:e}),saveOwn:(e,t)=>v(`POST`,`/api/personas/own/save`,{id:e,items:t}),removeOwn:(e,t,n)=>v(`POST`,`/api/personas/own/remove`,{id:e,kind:t,name:n})},ve={view:()=>v(`GET`,`/api/data`),log:(e=500)=>v(`GET`,`/api/data/log?limit=${e}`),impact:e=>v(`GET`,`/api/data/impact?of=${encodeURIComponent(e)}`),stop:()=>v(`POST`,`/api/data/stop`,{}),run:(e,t)=>v(`POST`,`/api/data/${e}`,t)},ye={view:()=>v(`GET`,`/api/features`),detail:e=>v(`GET`,`/api/features/${encodeURIComponent(e)}`),scope:(e,t)=>v(`POST`,`/api/features/${encodeURIComponent(e)}/scope`,{to:t})},be={job:()=>v(`GET`,`/api/refine`),start:(e,t)=>v(`POST`,`/api/refine`,{text:e,key:t}),stop:()=>v(`POST`,`/api/refine/stop`,{})},xe={view:()=>v(`GET`,`/api/about`),generated:()=>v(`GET`,`/api/generated`),run:(e,t={})=>v(`POST`,`/api/about/${e}`,t),stop:()=>v(`POST`,`/api/about/stop`,{}),restart:()=>v(`POST`,`/api/about/restart`,{confirmed:!0})},Se={view:e=>v(`GET`,`/api/feedback${e?`?session=${encodeURIComponent(e)}`:``}`),draft:e=>v(`POST`,`/api/feedback/draft`,e),text:e=>v(`POST`,`/api/feedback/text`,{draft:e}),send:e=>v(`POST`,`/api/feedback/send`,e)},Ce={tools:e=>v(`GET`,`/api/agents/${encodeURIComponent(e)}`),directory:()=>v(`GET`,`/api/agents`)},we={get:()=>v(`GET`,`/api/signin`),start:e=>v(`POST`,`/api/signin`,{system:e}),answer:(e,t)=>v(`POST`,`/api/signin/answer`,{id:e,value:t}),cancel:()=>v(`POST`,`/api/signin/cancel`,{}),signOut:e=>v(`POST`,`/api/signout`,{system:e})},Te={get:()=>v(`GET`,`/api/copilot`),signIn:e=>v(`POST`,`/api/copilot/signin`,{how:e}),answer:(e,t)=>v(`POST`,`/api/copilot/signin/answer`,{id:e,value:t}),cancel:()=>v(`POST`,`/api/copilot/signin/cancel`,{}),signOut:()=>v(`POST`,`/api/copilot/signout`,{}),models:()=>v(`GET`,`/api/copilot/models`),syncModels:()=>v(`POST`,`/api/copilot/models/sync`,{})},Ee={list:()=>v(`GET`,`/api/teams`),view:e=>v(`GET`,`/api/teams/${encodeURIComponent(e)}`),act:(e,t,n)=>v(`POST`,`/api/teams/${encodeURIComponent(e)}/${t}`,n),ask:(e,t)=>v(`POST`,`/api/teams/${encodeURIComponent(e)}/ask`,{words:t}),try:(e,t)=>v(`POST`,`/api/teams/${encodeURIComponent(e)}/try`,{words:t}),sharedFile:(e,t,n)=>v(`GET`,`/api/teams/${encodeURIComponent(e)}/runs/${encodeURIComponent(t)}/files/${encodeURIComponent(n)}`),choices:()=>v(`GET`,`/api/teams/_choices`),propose:e=>v(`POST`,`/api/teams/_propose`,{goal:e}),create:e=>v(`POST`,`/api/teams`,{fields:e}),save:(e,t)=>v(`POST`,`/api/teams/${encodeURIComponent(e)}/save`,{fields:t}),own:(e,t)=>v(`POST`,`/api/teams/${encodeURIComponent(e)}/own`,t),ownAll:()=>v(`GET`,`/api/teams/_own`),look:(e,t)=>v(`POST`,`/api/teams/${encodeURIComponent(e)}/look`,{look:t}),image:(e,t,n)=>v(`POST`,`/api/teams/${encodeURIComponent(e)}/image`,n===null?{slot:t,remove:!0}:{slot:t,data:n}),remove:(e,t)=>v(`POST`,`/api/teams/${encodeURIComponent(e)}/delete`,{confirm:t}),canvas:(e,t)=>v(`POST`,`/api/teams/${encodeURIComponent(e)}/canvas`,{positions:t})},De={list:()=>v(`GET`,`/api/custom-agents`),bulk:(e,t,n)=>v(`POST`,`/api/custom-agents/bulk`,{action:e,ids:t,confirm:n}),view:e=>v(`GET`,`/api/custom-agents/${encodeURIComponent(e)}`),audit:async e=>{await d;let t=await fetch(`/api/custom-agents/${encodeURIComponent(e)}/audit`,{headers:{Authorization:`Bearer ${o()}`}});if(!t.ok)throw new h(`Its record could not be read (HTTP ${t.status}).`,t.status);return t.text()},checks:{job:()=>v(`GET`,`/api/agent-checks`),start:e=>v(`POST`,`/api/agent-checks/${encodeURIComponent(e)}`,{}),stop:()=>v(`POST`,`/api/agent-checks/stop`,{}),answer:(e,t)=>v(`POST`,`/api/agent-checks/answer`,{id:e,choice:t})},version:(e,t)=>v(`GET`,`/api/custom-agents/${encodeURIComponent(e)}/versions/${encodeURIComponent(t)}`),duplicate:(e,t={})=>v(`POST`,`/api/custom-agents/${encodeURIComponent(e)}/duplicate`,t),pack:async e=>{await d;let t=await fetch(`/api/custom-agents/${encodeURIComponent(e)}/pack`,{headers:{Authorization:`Bearer ${o()}`}});if(!t.ok)throw new h(`Its package could not be read (HTTP ${t.status}).`,t.status);return t.blob()},importPreview:(e,t)=>v(`POST`,`/api/custom-agents/import/preview`,{pack:{base64:e},...t?{id:t}:{}}),importPack:(e,t={})=>v(`POST`,`/api/custom-agents/import`,{pack:{base64:e},...t}),choices:()=>v(`GET`,`/api/custom-agents/choices`),validate:e=>v(`POST`,`/api/custom-agents/validate`,{fields:e}),save:(e,t)=>v(`POST`,`/api/custom-agents`,{fields:e,...t}),library:{list:()=>v(`GET`,`/api/custom-agents/_library`),pack:e=>v(`GET`,`/api/custom-agents/_library/${encodeURIComponent(e)}`),publish:e=>v(`POST`,`/api/custom-agents/${encodeURIComponent(e)}/publish`),remove:(e,t)=>v(`POST`,`/api/custom-agents/_library/remove`,{entry:e,confirm:t})},forget:(e,t)=>v(`POST`,`/api/custom-agents/${encodeURIComponent(e)}/memory`,t),act:(e,t,n)=>v(`POST`,`/api/custom-agents/${encodeURIComponent(e)}/${t}`,n),templates:()=>v(`GET`,`/api/custom-agent-templates`),template:e=>v(`GET`,`/api/custom-agent-templates/${encodeURIComponent(e)}`)},$={list:()=>v(`GET`,`/api/agent-builder`),start:e=>v(`POST`,`/api/agent-builder`,{goal:e}),view:e=>v(`GET`,`/api/agent-builder/${encodeURIComponent(e)}`),answer:(e,t,n)=>v(`POST`,`/api/agent-builder/${encodeURIComponent(e)}/${t}`,n),discard:e=>v(`DELETE`,`/api/agent-builder/${encodeURIComponent(e)}`)},Oe={list:()=>v(`GET`,`/api/agent-approvals`),answer:(e,t,n)=>v(`POST`,`/api/agent-approvals/${encodeURIComponent(e)}/${encodeURIComponent(t)}`,{choice:n})},ke={view:e=>v(`GET`,`/api/impact${e?`?repo=${encodeURIComponent(e)}`:``}`),run:(e,t,n)=>v(`POST`,`/api/impact`,{repo:e,base:t,head:n}),runPr:(e,t)=>v(`POST`,`/api/impact`,{repo:e,pr:t}),check:e=>v(`POST`,`/api/impact/check`,{repo:e}),report:e=>v(`GET`,`/api/impact/report?repo=${encodeURIComponent(e)}`),comment:e=>v(`POST`,`/api/impact/comment`,{repo:e,confirm:!0}),source:(e,t)=>v(`GET`,`/api/impact/source?repo=${encodeURIComponent(e)}&path=${encodeURIComponent(t)}`)},Ae={status:()=>v(`GET`,`/api/config/status`)},je={view:()=>v(`GET`,`/api/flaky`),quarantine:(e,t,n)=>v(`POST`,`/api/flaky/quarantine`,{tests:e,release:t,confirmed:!0,...n?{reason:n}:{}})},Me={runs:()=>v(`GET`,`/api/run-diff/runs`),diff:(e,t)=>v(`GET`,`/api/run-diff?a=${encodeURIComponent(e)}&b=${encodeURIComponent(t)}`),shot:(e,t,n)=>Q(`/api/run-diff/${encodeURIComponent(e)}/shot/${t}`,n)},Ne={home:()=>v(`GET`,`/api/basal`),test:e=>v(`GET`,`/api/basal/tests/${encodeURIComponent(e)}`),graph:e=>v(`GET`,`/api/basal/tests/${encodeURIComponent(e)}/graph`),ask:(e,t)=>v(`POST`,`/api/basal/tests`,{request:e,...t?{environment:t}:{}}),stage:(e,t)=>v(`POST`,`/api/basal/tests/${encodeURIComponent(e)}/${t}`,{}),act:(e,t,n)=>v(`POST`,`/api/basal/tests/${encodeURIComponent(e)}/act`,{approved:t,...n?.length?{only:n}:{}}),approve:(e,t)=>v(`POST`,`/api/basal/tests/${encodeURIComponent(e)}/approve`,{typed:t}),observe:(e,t)=>v(`POST`,`/api/basal/tests/${encodeURIComponent(e)}/observe`,t),regraph:e=>v(`POST`,`/api/basal/tests/${encodeURIComponent(e)}/regraph`,{})};export{V as $,Se as A,P as B,ve as C,M as D,I as E,E as F,ue as G,G as H,Q as I,le as J,_e as K,ke as L,je as M,w as N,y as O,k as P,Me as Q,B as R,De as S,N as T,C as U,q as V,U as W,be as X,H as Y,z as Z,$ as _,pe as a,r as at,Ae as b,fe as c,de as ct,Ce as d,oe as dt,x as et,b as f,ae as ft,Ne as g,T as h,he as i,we as it,R as j,ye as k,xe as l,F as lt,Oe as m,L as mt,g as n,f as nt,ge as o,Ee as ot,se as p,i as pt,A as q,me as r,m as rt,p as s,ie as st,h as t,S as tt,D as u,X as ut,v,W as w,Te as x,O as y,j as z};
@@ -1,3 +1,3 @@
1
- import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{t}from"./react-BDur5s0O.js";import{l as n}from"./preload-helper-BupTYkQW.js";import{n as r,t as i}from"./utils-DJRAScIl.js";import{t as a}from"./jsx-runtime-LKYXHABd.js";import{C as o}from"./api-D8-lxyQi.js";import{C as s,g as c,h as l,p as u,r as d,v as f,x as p}from"./pageBack-BefA2rh7.js";import{or as m}from"./line-icons-CwCZidXs.js";import{Ct as h,Jt as g,Mt as _,St as v,Tt as y,Yt as b,_t as x,bt as S,wt as C}from"./frame-C8sL1yo-.js";import{t as w}from"./code-Jek8uWUO.js";import"./markdown-CxsWgpYs.js";var T=e(t(),1),E=a(),D={test:[`Testing the connection`,`Tested the connection`,`waiting`],tables:[`Reading the tables`,`Read the tables`,`searching`],query:[`Running the query`,`Ran the query`,`working`],gen:[`Making a preview`,`Made a preview`,`writing`],files:[`Writing the files`,`Wrote the files`,`writing`],insert:[`Inserting test data`,`Inserted test data`,`working`],batches:[`Listing the batches`,`Listed the batches`,`searching`],clean:[`Removing a batch`,`Removed a batch`,`working`],request:[`Asking Miner for test data`,`Asked Miner for test data`,`thinking`],fetch:[`Fetching the request again`,`Fetched the request again`,`searching`],ask:[`Asking Miner`,`Asked Miner`,`thinking`],checks:[`Running the checks`,`Ran the checks`,`working`],map:[`Reading the schema`,`Read the schema`,`searching`],check:[`Checking the flows`,`Checked the flows`,`working`],trace:[`Following the record`,`Followed the record`,`searching`]};function O(){let[e,t]=(0,T.useState)(null),[n,r]=(0,T.useState)(``),[i,a]=(0,T.useState)(!1),s=(0,T.useCallback)(()=>{o.view().then(e=>{t(e),r(``)},e=>r(e.message))},[]);(0,T.useEffect)(s,[s]);let c=!!e?.job?.running;return(0,T.useEffect)(()=>{if(!c)return;let e=b(s,1e3);return()=>g(e)},[c,s]),{view:e,error:n,busy:i||c,running:c,act:async(e,t)=>{a(!0),r(``);try{await o.run(e,t),s()}catch(e){r(e.message)}finally{a(!1)}},stop:()=>void o.stop().then(s),load:s,job:e?.job??null}}var k=e=>e==null?`NULL`:typeof e==`object`?JSON.stringify(e):String(e);function A({file:e,onNote:t}){return(0,E.jsx)(p,{size:`sm`,"data-tip":e,onClick:async()=>t(await f(e)),className:`font-mono`,children:e.split(/[\\/]/).pop()})}function j({children:e,label:t}){return(0,E.jsx)(`pre`,{"aria-label":t,className:i(w,`m-0 max-h-[320px] whitespace-pre`),children:e})}function M({job:e,onStop:t,words:a}){let[o,s,l]=(a??D)[e.kind]??[`Working`,`Done`,`working`],u=(0,T.useRef)(null);(0,T.useEffect)(()=>{u.current&&(u.current.scrollTop=u.current.scrollHeight)},[e.lines.length]);let f=e.exitCode===0,h=!f&&(e.kind===`check`||e.kind===`trace`)&&e.result!==void 0&&!e.result.error;return(0,E.jsxs)(`section`,{"aria-label":e.running?o:s,className:i(n,`flex flex-col gap-2`),children:[(0,E.jsxs)(`div`,{className:`flex flex-wrap items-center gap-4`,children:[(0,E.jsxs)(`span`,{className:`min-w-0 flex-1 font-medium [overflow-wrap:anywhere]`,children:[e.running?o:s,e.target?(0,E.jsxs)(`span`,{className:`font-normal text-muted`,children:[` · `,e.target]}):null]}),(0,E.jsx)(c,{tone:e.running?`running`:f?`pass`:e.exitCode===2||h?`warn`:`fail`,orb:l,children:e.running?`Working`:f?`Done`:h?`Some broken`:e.exitCode===2?`Not done`:`Failed`}),e.running&&(0,E.jsxs)(p,{variant:`danger`,onClick:t,children:[(0,E.jsx)(m,{fill:`currentColor`,"aria-hidden":`true`}),`Stop`]})]}),(0,E.jsxs)(`details`,{open:e.running||!f&&!e.result,children:[(0,E.jsxs)(`summary`,{className:`cursor-pointer text-body-sm text-muted`,children:[`Output (`,r(e.lines.length,`line`),`)`]}),(0,E.jsx)(`code`,{className:`mt-2 block font-mono text-body-sm text-muted [overflow-wrap:anywhere]`,children:e.command}),(0,E.jsx)(`pre`,{ref:u,className:i(w,`mt-2 max-h-[240px]`),children:(0,E.jsx)(d,{text:e.lines.join(`
1
+ import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{t}from"./react-BDur5s0O.js";import{l as n}from"./preload-helper-BupTYkQW.js";import{n as r,t as i}from"./utils-DJRAScIl.js";import{t as a}from"./jsx-runtime-LKYXHABd.js";import{C as o}from"./api-D_HT-I9y.js";import{C as s,g as c,h as l,p as u,r as d,v as f,x as p}from"./pageBack-DwhsvsK7.js";import{or as m}from"./line-icons-CwCZidXs.js";import{Ct as h,Jt as g,Mt as _,St as v,Tt as y,Yt as b,_t as x,bt as S,wt as C}from"./frame-Dt9QcYNX.js";import{t as w}from"./code-Jek8uWUO.js";import"./markdown-DgUpsCX8.js";var T=e(t(),1),E=a(),D={test:[`Testing the connection`,`Tested the connection`,`waiting`],tables:[`Reading the tables`,`Read the tables`,`searching`],query:[`Running the query`,`Ran the query`,`working`],gen:[`Making a preview`,`Made a preview`,`writing`],files:[`Writing the files`,`Wrote the files`,`writing`],insert:[`Inserting test data`,`Inserted test data`,`working`],batches:[`Listing the batches`,`Listed the batches`,`searching`],clean:[`Removing a batch`,`Removed a batch`,`working`],request:[`Asking Miner for test data`,`Asked Miner for test data`,`thinking`],fetch:[`Fetching the request again`,`Fetched the request again`,`searching`],ask:[`Asking Miner`,`Asked Miner`,`thinking`],checks:[`Running the checks`,`Ran the checks`,`working`],map:[`Reading the schema`,`Read the schema`,`searching`],check:[`Checking the flows`,`Checked the flows`,`working`],trace:[`Following the record`,`Followed the record`,`searching`]};function O(){let[e,t]=(0,T.useState)(null),[n,r]=(0,T.useState)(``),[i,a]=(0,T.useState)(!1),s=(0,T.useCallback)(()=>{o.view().then(e=>{t(e),r(``)},e=>r(e.message))},[]);(0,T.useEffect)(s,[s]);let c=!!e?.job?.running;return(0,T.useEffect)(()=>{if(!c)return;let e=b(s,1e3);return()=>g(e)},[c,s]),{view:e,error:n,busy:i||c,running:c,act:async(e,t)=>{a(!0),r(``);try{await o.run(e,t),s()}catch(e){r(e.message)}finally{a(!1)}},stop:()=>void o.stop().then(s),load:s,job:e?.job??null}}var k=e=>e==null?`NULL`:typeof e==`object`?JSON.stringify(e):String(e);function A({file:e,onNote:t}){return(0,E.jsx)(p,{size:`sm`,"data-tip":e,onClick:async()=>t(await f(e)),className:`font-mono`,children:e.split(/[\\/]/).pop()})}function j({children:e,label:t}){return(0,E.jsx)(`pre`,{"aria-label":t,className:i(w,`m-0 max-h-[320px] whitespace-pre`),children:e})}function M({job:e,onStop:t,words:a}){let[o,s,l]=(a??D)[e.kind]??[`Working`,`Done`,`working`],u=(0,T.useRef)(null);(0,T.useEffect)(()=>{u.current&&(u.current.scrollTop=u.current.scrollHeight)},[e.lines.length]);let f=e.exitCode===0,h=!f&&(e.kind===`check`||e.kind===`trace`)&&e.result!==void 0&&!e.result.error;return(0,E.jsxs)(`section`,{"aria-label":e.running?o:s,className:i(n,`flex flex-col gap-2`),children:[(0,E.jsxs)(`div`,{className:`flex flex-wrap items-center gap-4`,children:[(0,E.jsxs)(`span`,{className:`min-w-0 flex-1 font-medium [overflow-wrap:anywhere]`,children:[e.running?o:s,e.target?(0,E.jsxs)(`span`,{className:`font-normal text-muted`,children:[` · `,e.target]}):null]}),(0,E.jsx)(c,{tone:e.running?`running`:f?`pass`:e.exitCode===2||h?`warn`:`fail`,orb:l,children:e.running?`Working`:f?`Done`:h?`Some broken`:e.exitCode===2?`Not done`:`Failed`}),e.running&&(0,E.jsxs)(p,{variant:`danger`,onClick:t,children:[(0,E.jsx)(m,{fill:`currentColor`,"aria-hidden":`true`}),`Stop`]})]}),(0,E.jsxs)(`details`,{open:e.running||!f&&!e.result,children:[(0,E.jsxs)(`summary`,{className:`cursor-pointer text-body-sm text-muted`,children:[`Output (`,r(e.lines.length,`line`),`)`]}),(0,E.jsx)(`code`,{className:`mt-2 block font-mono text-body-sm text-muted [overflow-wrap:anywhere]`,children:e.command}),(0,E.jsx)(`pre`,{ref:u,className:i(w,`mt-2 max-h-[240px]`),children:(0,E.jsx)(d,{text:e.lines.join(`
2
2
  `)||`Starting…`})})]})]})}function N({text:e}){return(0,E.jsx)(`p`,{role:`alert`,className:i(s.fail,`m-0`),children:e})}function P({columns:e,rows:t}){let n=e.map((e,n)=>t.length>0&&t.every(e=>e[n]===null||e[n]===void 0||typeof e[n]==`number`)&&t.some(e=>typeof e[n]==`number`));return(0,E.jsx)(x,{label:`Rows`,resetKey:t,head:e.map((e,t)=>(0,E.jsx)(`th`,{scope:`col`,className:n[t]?C:h,children:e},e)),children:t.map((e,t)=>(0,E.jsx)(`tr`,{className:y,children:e.map((e,t)=>(0,E.jsx)(`td`,{"data-tip":k(e),className:i(n[t]?v:S,`font-mono text-body-sm`,!n[t]&&`max-w-[320px] truncate`,e==null&&`text-muted`),children:k(e)},t))},t))})}function F({r:e}){return(0,E.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(e.order||[]).map(t=>{let n=e.preview?.[t],i=n?.sample||[],a=i.length?Object.keys(i[0]):[];return(0,E.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,E.jsxs)(`span`,{className:`text-body-sm`,children:[(0,E.jsx)(`span`,{className:`font-medium`,children:t}),` · `,r(e.rows?.[t]??0,`row`),n?.database_fills?.length?(0,E.jsxs)(`span`,{className:`text-muted`,children:[` · the database fills `,n.database_fills.join(`, `)]}):null,e.masked?.[t]?.length?(0,E.jsxs)(`span`,{className:`text-muted`,children:[` · masked `,e.masked[t].join(`, `)]}):null]}),a.length>0&&(0,E.jsx)(P,{columns:a,rows:i.slice(0,3).map(e=>a.map(t=>e[t]))})]},t)}),(e.warnings||[]).map((e,t)=>(0,E.jsx)(`p`,{className:`m-0 text-body-sm text-warn`,children:e},t))]})}var I={query:`Existing rows`,generate:`New rows`};function L({r:e,onNote:t}){let n=Object.entries(e.rows||{});return(0,E.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,E.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,E.jsx)(c,{tone:`pass`,children:I[e.kind||``]||`Answered`}),(0,E.jsxs)(`span`,{className:`min-w-0 text-body-sm text-ink-2 [overflow-wrap:anywhere]`,children:[e.database,e.why?` · ${e.why}`:``]})]}),n.map(([t,n])=>(0,E.jsx)(R,{title:t===`result`?`Rows found`:t,rows:n,total:e.row_counts?.[t]??n.length},t)),e.sql&&(0,E.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,E.jsx)(`span`,{className:`text-body-sm font-medium`,children:`The query, as the database checked it`}),(0,E.jsx)(j,{label:`SQL`,children:e.sql})]}),e.script_preview&&e.script_preview.length>0&&(0,E.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,E.jsx)(`span`,{className:`text-body-sm font-medium`,children:`INSERT script for these rows, not run`}),(0,E.jsx)(j,{label:`INSERT script`,children:e.script_preview.join(`
3
3
  `)})]}),e.files?.length?(0,E.jsxs)(`p`,{className:`m-0 flex flex-wrap items-center gap-2 text-body-sm`,children:[`Kept`,e.files.map(e=>(0,E.jsx)(A,{file:e,onNote:t},e))]}):null,e.replay&&(0,E.jsxs)(`p`,{className:`m-0 text-body-sm text-muted`,children:[`Tests and pipelines get the same data with `,(0,E.jsx)(`code`,{className:`font-mono text-body-sm text-ink-2`,children:e.replay}),`, without a model.`]})]})}function R({title:e,rows:t,total:n}){let i=[...new Set(t.flatMap(e=>Object.keys(e)))];return(0,E.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,E.jsxs)(`span`,{className:`text-body-sm`,children:[(0,E.jsx)(`span`,{className:`font-medium`,children:e}),` · `,r(n,`row`),n>t.length?(0,E.jsxs)(`span`,{className:`text-muted`,children:[` · `,t.length,` shown`]}):null]}),i.length>0?(0,E.jsx)(P,{columns:i,rows:t.map(e=>i.map(t=>e[t]))}):(0,E.jsx)(`p`,{className:`m-0 text-body-sm text-muted`,children:`No rows match.`})]})}function z({items:e,text:t,label:n,size:r=10,children:i}){let[a,o]=(0,T.useState)(``),[s,c]=(0,T.useState)(0),d=a.toLowerCase().split(/\s+/).filter(Boolean),f=d.length?e.filter(e=>d.every(n=>t(e).toLowerCase().includes(n))):e;(0,T.useEffect)(()=>c(0),[a,e.length]);let p=Math.min(s,Math.max(0,Math.ceil(f.length/r)-1));return(0,E.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[e.length>r&&(0,E.jsx)(l,{id:`find-${n.toLowerCase().replace(/\W+/g,`-`)}`,label:`Find in ${n.toLowerCase()}`,value:a,onChange:o,className:`flex-none`}),f.length?(0,E.jsx)(`ul`,{className:`m-0 flex list-none flex-col p-0`,children:f.slice(p*r,p*r+r).map(i)}):(0,E.jsx)(`p`,{className:`m-0 text-body-sm text-muted`,children:`Nothing matches.`}),f.length>r&&(0,E.jsx)(u,{page:p,size:r,total:f.length,onPage:c,label:`Pages of ${n.toLowerCase()}`})]})}function B({on:e,set:t,children:n}){return(0,E.jsxs)(`label`,{className:`flex items-center gap-2 text-body-sm text-ink-2`,children:[(0,E.jsx)(_,{checked:e,onChange:t,label:n}),n]})}function V({label:e,hint:t,children:n}){return(0,E.jsxs)(`label`,{className:`flex flex-col gap-2 text-body-sm font-medium`,children:[e,n,t&&(0,E.jsx)(`span`,{className:`text-body-sm font-normal text-muted`,children:t})]})}export{F as a,z as c,R as d,B as f,A as i,N as l,O as m,j as n,M as o,k as p,V as r,I as s,L as t,P as u};
@@ -1 +1 @@
1
- import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{t}from"./react-BDur5s0O.js";import{F as n}from"./preload-helper-BupTYkQW.js";import{t as r}from"./utils-DJRAScIl.js";import{t as i}from"./jsx-runtime-LKYXHABd.js";import{w as a}from"./api-D8-lxyQi.js";import{x as o}from"./pageBack-BefA2rh7.js";import{Dt as s}from"./line-icons-CwCZidXs.js";var c=e(t(),1),l=i();function u(e){return(e.replace(/(?<![\\/])[\\/]+$/,``).split(/[\\/]/).pop()||``).replace(/\.(exe|app)$/i,``).toLowerCase().replace(/[^a-z0-9_.-]+/g,`-`).replace(/^[^a-z]+/,``).replace(/(?<!-)-+$/,``).slice(0,40)||`app`}function d({value:e,onChange:t,onPicked:i,onError:u,className:d}){let[f,p]=(0,c.useState)(!1),m=async()=>{p(!0),u(``);try{let e=await a.browse();`path`in e?(t(e.path),i?.(e.path,e.name)):`unavailable`in e&&u(e.unavailable)}catch(e){u(e.message)}finally{p(!1)}};return(0,l.jsxs)(`div`,{className:r(`flex min-w-0 gap-2`,d),children:[(0,l.jsx)(n,{"aria-label":`App's path`,value:e,spellCheck:!1,placeholder:`C:\\Program Files\\Contoso\\Billing.exe`,onChange:e=>t(e.target.value),className:`min-w-0 flex-1 font-mono text-body-sm`}),(0,l.jsxs)(o,{busy:f,type:`button`,disabled:f,onClick:()=>void m(),"data-tip":`Choose the app's .exe on this computer`,children:[(0,l.jsx)(s,{"aria-hidden":`true`}),f?`Choosing…`:`Browse…`]})]})}export{u as n,d as t};
1
+ import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{t}from"./react-BDur5s0O.js";import{F as n}from"./preload-helper-BupTYkQW.js";import{t as r}from"./utils-DJRAScIl.js";import{t as i}from"./jsx-runtime-LKYXHABd.js";import{w as a}from"./api-D_HT-I9y.js";import{x as o}from"./pageBack-DwhsvsK7.js";import{Dt as s}from"./line-icons-CwCZidXs.js";var c=e(t(),1),l=i();function u(e){return(e.replace(/(?<![\\/])[\\/]+$/,``).split(/[\\/]/).pop()||``).replace(/\.(exe|app)$/i,``).toLowerCase().replace(/[^a-z0-9_.-]+/g,`-`).replace(/^[^a-z]+/,``).replace(/(?<!-)-+$/,``).slice(0,40)||`app`}function d({value:e,onChange:t,onPicked:i,onError:u,className:d}){let[f,p]=(0,c.useState)(!1),m=async()=>{p(!0),u(``);try{let e=await a.browse();`path`in e?(t(e.path),i?.(e.path,e.name)):`unavailable`in e&&u(e.unavailable)}catch(e){u(e.message)}finally{p(!1)}};return(0,l.jsxs)(`div`,{className:r(`flex min-w-0 gap-2`,d),children:[(0,l.jsx)(n,{"aria-label":`App's path`,value:e,spellCheck:!1,placeholder:`C:\\Program Files\\Contoso\\Billing.exe`,onChange:e=>t(e.target.value),className:`min-w-0 flex-1 font-mono text-body-sm`}),(0,l.jsxs)(o,{busy:f,type:`button`,disabled:f,onClick:()=>void m(),"data-tip":`Choose the app's .exe on this computer`,children:[(0,l.jsx)(s,{"aria-hidden":`true`}),f?`Choosing…`:`Browse…`]})]})}export{u as n,d as t};