@vostride/agent-qa-dashboard-ui 0.1.12 → 0.1.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{arrow-up-down-CN-uHgX9.js → arrow-up-down-D_ErIdrE.js} +1 -1
- package/dist/assets/{badge-DrW2vGVJ.js → badge-ClWCtaXi.js} +1 -1
- package/dist/assets/{batch-action-bar-uEhHVDds.js → batch-action-bar-BoqzHfwU.js} +1 -1
- package/dist/assets/{circle-alert-BKX0IIz1.js → circle-alert-D7wbtVU2.js} +1 -1
- package/dist/assets/{circle-x-yPIxYoz1.js → circle-x-BOV-jCVR.js} +1 -1
- package/dist/assets/config-BH2rUSDL.js +10 -0
- package/dist/assets/{copy-Clw3wvSn.js → copy-DW4nc-pA.js} +1 -1
- package/dist/assets/{display-step-NqsJgW_B.js → display-step-vpHdm2LX.js} +1 -1
- package/dist/assets/{dist-BPheZrD6.js → dist-BABsMbMt.js} +1 -1
- package/dist/assets/dist-Bc4r79ls.js +1 -0
- package/dist/assets/{dist-m_OM4Je_.js → dist-BsGrTrYb.js} +1 -1
- package/dist/assets/{empty-state-BTvOA5lp.js → empty-state-BTFWlITi.js} +1 -1
- package/dist/assets/{external-link-C_uggQOc.js → external-link-CnabSkqe.js} +1 -1
- package/dist/assets/{eye-CZrufbYE.js → eye-Cj7s1eMQ.js} +1 -1
- package/dist/assets/{file-code-B3iDpJRP.js → file-code-DxVUPin2.js} +1 -1
- package/dist/assets/{file-search-DHHwYVza.js → file-search-BRbGARSr.js} +1 -1
- package/dist/assets/filename-validation-wKCpNal3.js +1 -0
- package/dist/assets/{grip-vertical-A-AANrBM.js → grip-vertical-C5AW4fiD.js} +1 -1
- package/dist/assets/{hook-editor-yhQoi-Ky.js → hook-editor-KoqKvv73.js} +1 -1
- package/dist/assets/{hook-runtime-JF-0oZpz.js → hook-runtime-DZ6bR69q.js} +1 -1
- package/dist/assets/{hook-viewer-DIkxp9uJ.js → hook-viewer-DWsN8RyZ.js} +1 -1
- package/dist/assets/hooks-BfUXcuyV.js +1 -0
- package/dist/assets/{id-badge-NwZYoNfB.js → id-badge-BpTnHwvn.js} +2 -2
- package/dist/assets/{index-Bvtm2F6f.js → index-C3AdCkmj.js} +2 -2
- package/dist/assets/index-DzWZqTlZ.css +2 -0
- package/dist/assets/{insights-DuYBsUzB.js → insights-Dtq5Rwby.js} +1 -1
- package/dist/assets/{insights-line-grid-BKOqA-1W.js → insights-line-grid-X5lNbmTY.js} +6 -6
- package/dist/assets/{lib-58FyJI_k.js → lib-u_ZEFKZp.js} +1 -1
- package/dist/assets/live-run-CfMxOSfk.js +1 -0
- package/dist/assets/{memory-B7nfWNTH.js → memory-DS-02aNZ.js} +1 -1
- package/dist/assets/memory-product-5m-eyxzH.js +2 -0
- package/dist/assets/{monaco-editor-DNT0Mzki.js → monaco-editor-BEWq4fzI.js} +2 -2
- package/dist/assets/{monaco-editor-inner-DuCqlGei.js → monaco-editor-inner-B6AQm3h7.js} +2 -2
- package/dist/assets/{monaco.contribution-LYJB_lCm.js → monaco.contribution-Dum2B1vn.js} +2 -2
- package/dist/assets/{observation-block-4AqYhL1h.js → observation-block-2qfTbm41.js} +1 -1
- package/dist/assets/{observation-markdown-Dx_5-T0t.js → observation-markdown-CIs-5TY2.js} +1 -1
- package/dist/assets/{pencil-DdRoBrsh.js → pencil-BUQgVaEH.js} +1 -1
- package/dist/assets/plus-Bf5Mbita.js +1 -0
- package/dist/assets/popover-OAiTzjiL.js +1 -0
- package/dist/assets/{refresh-cw-C_0AkMuu.js → refresh-cw-D0OwRzvm.js} +1 -1
- package/dist/assets/{resizable-BGEcNRZO.js → resizable-ugU12HrY.js} +1 -1
- package/dist/assets/run-detail-Cr984qgU.js +1 -0
- package/dist/assets/runs-CDAIeUbq.js +1 -0
- package/dist/assets/{scroll-area-CnATfQoe.js → scroll-area-CX3T8JWh.js} +1 -1
- package/dist/assets/{select-CeVjgiKI.js → select-D0GpDfUa.js} +1 -1
- package/dist/assets/{shortcut-hints-Bs5o743i.js → shortcut-hints-B8kCurzo.js} +1 -1
- package/dist/assets/split-button-CRYV8xU8.js +1 -0
- package/dist/assets/square-K8N8Yius.js +1 -0
- package/dist/assets/{step-name-pills-Dta5ZGMZ.js → step-name-pills-BQ8yv40K.js} +1 -1
- package/dist/assets/suite-editor-aAjvjp2R.js +5 -0
- package/dist/assets/suite-navbar-UATCw4Qb.js +1 -0
- package/dist/assets/suite-viewer-CmbLH1G2.js +1 -0
- package/dist/assets/{suites-BvfwzFEd.js → suites-BlJfefzt.js} +1 -1
- package/dist/assets/{switch-ByV5GV5L.js → switch-Dv7aVqt1.js} +1 -1
- package/dist/assets/tab-console-Ciur_Bee.js +1 -0
- package/dist/assets/{table-D08QBBt4.js → table-BOjrxBBL.js} +1 -1
- package/dist/assets/{tabs-DrB_Acb3.js → tabs-BEp-p5jh.js} +1 -1
- package/dist/assets/test-editor-CFzp3eq1.js +9 -0
- package/dist/assets/test-navbar-ChNg-qki.js +7 -0
- package/dist/assets/{test-viewer-BwUQNVa4.js → test-viewer-DEQQDURn.js} +1 -1
- package/dist/assets/tests-Dzlh9Zho.js +1 -0
- package/dist/assets/{tests-suites-table-widths-DNWnkAjA.js → tests-suites-table-widths-D2sc1JmR.js} +1 -1
- package/dist/assets/{textarea-DChEVvwQ.js → textarea-BFsDx2mB.js} +1 -1
- package/dist/assets/{trash-2-7P1Dp87k.js → trash-2-Dv939XWG.js} +1 -1
- package/dist/assets/{tsMode-DEhRZlmT.js → tsMode-CnaplBFQ.js} +1 -1
- package/dist/assets/use-hook-run-session-BLSTM6LJ.js +1 -0
- package/dist/assets/{use-keyboard-shortcuts-EAppuiKO.js → use-keyboard-shortcuts-COnAPsDD.js} +1 -1
- package/dist/assets/{use-page-title-B1t9-5_U.js → use-page-title-CsUoFrfG.js} +1 -1
- package/dist/assets/use-run-status-favicon-DLOLF3Hx.js +1 -0
- package/dist/assets/{use-selection-queue-BboTDies.js → use-selection-queue-BkEWIfvw.js} +1 -1
- package/dist/assets/{viewer-url-state-6mOK5_sY.js → viewer-url-state-PwkMc-qK.js} +1 -1
- package/dist/assets/{zap-KFJmkY3Y.js → zap-Dx2CqraS.js} +1 -1
- package/dist/index.html +2 -2
- package/package.json +2 -2
- package/dist/assets/config-TRu3J-E7.js +0 -10
- package/dist/assets/dist-BPJgj1d0.js +0 -1
- package/dist/assets/filename-validation-4sTTEagx.js +0 -1
- package/dist/assets/hooks-CDRbjPKv.js +0 -1
- package/dist/assets/index-CW7tbJhs.css +0 -2
- package/dist/assets/live-run-ucgeJa3o.js +0 -1
- package/dist/assets/memory-product-D1u5V75o.js +0 -2
- package/dist/assets/plus-pXO98OAE.js +0 -1
- package/dist/assets/popover-DGZi688D.js +0 -1
- package/dist/assets/run-detail-3tlB8sew.js +0 -1
- package/dist/assets/runs-CywxkFZ6.js +0 -1
- package/dist/assets/split-button-DcY8ames.js +0 -1
- package/dist/assets/square-D71GHEET.js +0 -1
- package/dist/assets/suite-editor-Bnf6KMna.js +0 -5
- package/dist/assets/suite-navbar-PStktQ6j.js +0 -1
- package/dist/assets/suite-viewer-BD74MY_X.js +0 -1
- package/dist/assets/tab-console-BQFkZJG_.js +0 -1
- package/dist/assets/test-editor-w7ZQPYgH.js +0 -9
- package/dist/assets/test-navbar-DoHKAy1p.js +0 -7
- package/dist/assets/tests-B5ELKDH2.js +0 -1
- package/dist/assets/use-hook-run-session-x-d_iodT.js +0 -1
- package/dist/assets/use-run-status-favicon-D69P46yH.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Yn as e}from"./index-C3AdCkmj.js";var t=e(`arrow-up-down`,[[`path`,{d:`m21 16-4 4-4-4`,key:`f6ql7i`}],[`path`,{d:`M17 20V4`,key:`1ejh1v`}],[`path`,{d:`m3 8 4-4 4 4`,key:`11wl7u`}],[`path`,{d:`M7 4v16`,key:`1glfcx`}]]);export{t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./chunk-CilyBKbf.js";import{
|
|
1
|
+
import"./chunk-CilyBKbf.js";import{$n as e,Gt as t,Xn as n,kn as r,mr as i}from"./index-C3AdCkmj.js";i();var a=e(),o=n(`inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-sm border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3`,{variants:{variant:{default:`bg-primary text-primary-foreground [a&]:hover:bg-primary/90`,secondary:`bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90`,destructive:`bg-destructive text-white focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40 [a&]:hover:bg-destructive/90`,outline:`border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground`,ghost:`[a&]:hover:bg-accent [a&]:hover:text-accent-foreground`,link:`text-primary underline-offset-4 [a&]:hover:underline`}},defaultVariants:{variant:`default`}});function s({className:e,variant:n=`default`,asChild:i=!1,...s}){return(0,a.jsx)(i?r:`span`,{"data-slot":`badge`,"data-variant":n,className:t(o({variant:n}),e),...s})}export{s as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./chunk-CilyBKbf.js";import{c as t,u as n}from"./select-
|
|
1
|
+
import{r as e}from"./chunk-CilyBKbf.js";import{c as t,u as n}from"./select-D0GpDfUa.js";import{t as r}from"./split-button-CRYV8xU8.js";import{t as i}from"./trash-2-Dv939XWG.js";import{$n as a,Dn as o,Gt as s,Nn as c,Sn as l,Tn as u,Wt as d,mr as f,nn as p,pr as m,wn as h,xn as g}from"./index-C3AdCkmj.js";var _=e(f(),1),v=a(),y=`Checkbox`,[b,x]=u(y),[S,C]=b(y);function w(e){let{__scopeCheckbox:t,checked:n,children:r,defaultChecked:i,disabled:a,form:o,name:s,onCheckedChange:c,required:u,value:d=`on`,internal_do_not_use_render:f}=e,[p,m]=l({prop:n,defaultProp:i??!1,onChange:c,caller:y}),[h,g]=_.useState(null),[b,x]=_.useState(null),C=_.useRef(!1),w=h?!!o||!!h.closest(`form`):!0,T={checked:p,disabled:a,setChecked:m,control:h,setControl:g,name:s,form:o,value:d,hasConsumerStoppedPropagationRef:C,required:u,defaultChecked:N(i)?!1:i,isFormControl:w,bubbleInput:b,setBubbleInput:x};return(0,v.jsx)(S,{scope:t,...T,children:M(f)?f(T):r})}var T=`CheckboxTrigger`,E=_.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},i)=>{let{control:a,value:s,disabled:l,checked:u,required:d,setControl:f,setChecked:p,hasConsumerStoppedPropagationRef:m,isFormControl:g,bubbleInput:y}=C(T,e),b=c(i,f),x=_.useRef(u);return _.useEffect(()=>{let e=a?.form;if(e){let t=()=>p(x.current);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[a,p]),(0,v.jsx)(o.button,{type:`button`,role:`checkbox`,"aria-checked":N(u)?`mixed`:u,"aria-required":d,"data-state":P(u),"data-disabled":l?``:void 0,disabled:l,value:s,...r,ref:b,onKeyDown:h(t,e=>{e.key===`Enter`&&e.preventDefault()}),onClick:h(n,e=>{p(e=>N(e)?!0:!e),y&&g&&(m.current=e.isPropagationStopped(),m.current||e.stopPropagation())})})});E.displayName=T;var D=_.forwardRef((e,t)=>{let{__scopeCheckbox:n,name:r,checked:i,defaultChecked:a,required:o,disabled:s,value:c,onCheckedChange:l,form:u,...d}=e;return(0,v.jsx)(w,{__scopeCheckbox:n,checked:i,defaultChecked:a,disabled:s,required:o,onCheckedChange:l,name:r,form:u,value:c,internal_do_not_use_render:({isFormControl:e})=>(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(E,{...d,ref:t,__scopeCheckbox:n}),e&&(0,v.jsx)(j,{__scopeCheckbox:n})]})})});D.displayName=y;var O=`CheckboxIndicator`,k=_.forwardRef((e,t)=>{let{__scopeCheckbox:n,forceMount:r,...i}=e,a=C(O,n);return(0,v.jsx)(g,{present:r||N(a.checked)||a.checked===!0,children:(0,v.jsx)(o.span,{"data-state":P(a.checked),"data-disabled":a.disabled?``:void 0,...i,ref:t,style:{pointerEvents:`none`,...e.style}})})});k.displayName=O;var A=`CheckboxBubbleInput`,j=_.forwardRef(({__scopeCheckbox:e,...n},r)=>{let{control:i,hasConsumerStoppedPropagationRef:a,checked:s,defaultChecked:l,required:u,disabled:d,name:f,value:m,form:h,bubbleInput:g,setBubbleInput:y}=C(A,e),b=c(r,y),x=t(s),S=p(i);_.useEffect(()=>{let e=g;if(!e)return;let t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,`checked`).set,r=!a.current;if(x!==s&&n){let t=new Event(`click`,{bubbles:r});e.indeterminate=N(s),n.call(e,N(s)?!1:s),e.dispatchEvent(t)}},[g,x,s,a]);let w=_.useRef(N(s)?!1:s);return(0,v.jsx)(o.input,{type:`checkbox`,"aria-hidden":!0,defaultChecked:l??w.current,required:u,disabled:d,name:f,value:m,form:h,...n,tabIndex:-1,ref:b,style:{...n.style,...S,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0,transform:`translateX(-100%)`}})});j.displayName=A;function M(e){return typeof e==`function`}function N(e){return e===`indeterminate`}function P(e){return N(e)?`indeterminate`:e?`checked`:`unchecked`}function F({className:e,...t}){return(0,v.jsx)(D,{"data-slot":`checkbox`,className:s(`peer size-4 shrink-0 rounded-[4px] border border-input shadow-xs`,`data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground data-[state=checked]:border-primary`,`focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:border-ring`,`disabled:cursor-not-allowed disabled:opacity-50`,e),...t,children:(0,v.jsx)(k,{className:`flex items-center justify-center text-current`,children:(0,v.jsx)(n,{className:`size-3.5`})})})}var I=e(m(),1);function L({selectedCount:e,onRun:t,onRunNoCache:n,onPurgeCache:a,onCancel:o,isRunning:s=!1,summaryMeta:c,secondaryLabel:l,secondaryIcon:u,secondaryAriaLabel:f,actionSlot:p,onDelete:m}){if(e===0)return null;let h=!l&&!!u;return(0,I.createPortal)((0,v.jsxs)(`div`,{className:`fixed bottom-6 left-1/2 z-50 flex w-max max-w-[calc(100vw-1rem)] -translate-x-1/2 flex-wrap items-center gap-3 rounded-md border bg-background px-4 py-3 shadow-lg sm:flex-nowrap`,children:[(0,v.jsxs)(`div`,{className:`min-w-[6.5rem] shrink-0`,children:[(0,v.jsxs)(`span`,{className:`text-sm font-medium`,children:[e,` selected`]}),c?(0,v.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:c}):null]}),p??(t&&n?(0,v.jsx)(r,{onRun:t,onRunNoCache:n,onPurgeCache:a,disabled:s,size:`sm`}):null),m?(0,v.jsxs)(d,{variant:`destructive`,size:`sm`,onClick:m,disabled:s,children:[(0,v.jsx)(i,{className:`size-4`}),`Delete`]}):null,(0,v.jsx)(d,{variant:h?`ghost`:`outline`,size:h?`icon-sm`:`sm`,"aria-label":f,title:f,onClick:o,disabled:s,children:u??l??`Cancel`})]}),document.body)}export{F as n,L as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Yn as e}from"./index-C3AdCkmj.js";var t=e(`circle-alert`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]]);export{t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Yn as e}from"./index-C3AdCkmj.js";var t=e(`circle-x`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m15 9-6 6`,key:`1uzhvr`}],[`path`,{d:`m9 9 6 6`,key:`z0biqf`}]]);export{t};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import{r as e}from"./chunk-CilyBKbf.js";import{a as t,i as n,n as r,o as i,r as a,s as o,t as s}from"./select-D0GpDfUa.js";import{t as c}from"./circle-x-BOV-jCVR.js";import{t as l}from"./external-link-CnabSkqe.js";import{t as u}from"./eye-Cj7s1eMQ.js";import{t as d}from"./pencil-BUQgVaEH.js";import{t as f}from"./plus-Bf5Mbita.js";import{n as p,t as m}from"./textarea-BFsDx2mB.js";import{t as h}from"./trash-2-Dv939XWG.js";import{t as g}from"./use-page-title-CsUoFrfG.js";import{a as _,i as v}from"./dist-BsGrTrYb.js";import{t as y}from"./switch-Dv7aVqt1.js";import{i as b,n as x,r as S,t as C}from"./tabs-BEp-p5jh.js";import{$n as w,B as T,Bn as E,Et as D,F as ee,Ft as te,Gt as O,H as ne,Hn as re,Ht as ie,It as k,J as ae,Mt as oe,Nt as A,Pt as se,R as j,St as ce,Ut as M,Vn as le,Wn as ue,Wt as N,Yn as de,_ as fe,b as pe,bt as me,dr as he,er as ge,f as P,g as _e,gt as ve,h as ye,i as be,jt as F,k as xe,lr as Se,m as Ce,mr as we,p as Te,v as Ee,w as I,wt as De,x as Oe,y as ke,yt as Ae,z as je}from"./index-C3AdCkmj.js";import{t as L}from"./badge-ClWCtaXi.js";import{n as Me,r as R,t as Ne}from"./lib-u_ZEFKZp.js";import{a as Pe,i as Fe,n as Ie,o as Le,r as Re,t as ze}from"./table-BOjrxBBL.js";import{t as Be}from"./marked.esm-Ba5AUJng.js";var Ve=de(`book-open-text`,[[`path`,{d:`M12 7v14`,key:`1akyts`}],[`path`,{d:`M16 12h2`,key:`7q9ll5`}],[`path`,{d:`M16 8h2`,key:`msurwy`}],[`path`,{d:`M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z`,key:`ruj8y`}],[`path`,{d:`M6 12h2`,key:`32wvfc`}],[`path`,{d:`M6 8h2`,key:`30oboj`}]]),z=de(`file-plus`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M9 15h6`,key:`cctwl0`}],[`path`,{d:`M12 18v-6`,key:`17g6i2`}]]),B=e(we(),1),V=w();function H({className:e,...t}){return(0,V.jsx)(`section`,{"data-config-section-shell":!0,className:O(`border border-border bg-transparent rounded-none shadow-none`,e),...t})}function U({className:e,...t}){return(0,V.jsx)(`header`,{className:O(`border-b border-border px-5 py-4`,e),...t})}function W({className:e,...t}){return(0,V.jsx)(`div`,{"data-config-section-body":!0,className:O(`space-y-6 px-5 py-5`,e),...t})}function He({className:e,...t}){return(0,V.jsx)(`div`,{"data-config-line-notice":!0,className:O(`border border-border bg-transparent rounded-none px-4 py-3 text-sm text-muted-foreground`,e),...t})}function G(e,t){let n=e.trim(),r=t.errorMessage??Ue(t);if(n===``)return t.allowEmpty?{value:void 0,error:null}:{value:void 0,error:r};if(!(t.integer?/^-?\d+$/:/^-?(?:\d+|\d*\.\d+)$/).test(n))return{value:void 0,error:r};let i=Number(n);return!Number.isFinite(i)||t.integer&&!Number.isSafeInteger(i)||t.min!==void 0&&i<t.min||t.max!==void 0&&i>t.max?{value:void 0,error:r}:{value:i,error:null}}function Ue(e){let t=e.integer?`an integer`:`a number`;return e.min!==void 0&&e.max!==void 0?`${e.label} must be ${t} between ${e.min} and ${e.max}`:e.min===void 0?e.max===void 0?`${e.label} must be ${t}`:`${e.label} must be ${t} less than or equal to ${e.max}`:`${e.label} must be ${t} greater than or equal to ${e.min}`}var We=Object.fromEntries([{value:`openai-compatible`,label:`OpenAI-compatible`},{value:`anthropic-compatible`,label:`Anthropic-compatible`},{value:`gemini`,label:`Gemini`}].map(e=>[e.value,e.label])),Ge=new Set([`openai-compatible`,`anthropic-compatible`]),Ke=`Enter the exact endpoint base URL. agent-qa will not append paths.`,qe=`Testing without a saved credential.`,Je=`Save a Gemini API key for this config before testing.`;function K(){return[{id:`openai-compatible`,label:`OpenAI-compatible`,auth:{kind:`api-key`,credentialTypes:[`api-key`],optional:!0},modelAdapter:`openai-responses`},{id:`anthropic-compatible`,label:`Anthropic-compatible`,auth:{kind:`api-key`,credentialTypes:[`api-key`,`bearer-token`],optional:!0},modelAdapter:`anthropic-messages`},{id:`gemini`,label:`Gemini`,auth:{kind:`api-key`,credentialTypes:[`api-key`]}}]}function Ye(e=``,t=``){return{id:crypto.randomUUID(),key:e,value:t}}function Xe(e,t=[]){return t.find(t=>t.id===e)?.label??We[e]??e}function Ze(e){if(e===null)return null;let t=Date.now();if(e<t)return`Expired`;let n=e-t,r=Math.floor(n/(1e3*60*60)),i=Math.floor(n%(1e3*60*60)/(1e3*60));return r>24?`Expires in ${Math.floor(r/24)}d`:r>0?`Expires in ${r}h ${i}m`:`Expires in ${i}m`}function Qe(e){return e.type===`oauth`?`OAuth connected`:e.type===`bearer`||e.type===`bearer-token`?`Saved bearer token`:`Saved API key`}function $e(e,t,n){return e.configName===t?e.type===`oauth`?e.provider===n:e.type===`bearer`||e.type===`bearer-token`?n===`anthropic-compatible`&&e.provider===`anthropic-compatible`:e.provider===n:!1}function et(e,t){return e.find(e=>$e(e,t.name,t.provider))}function tt(e){return Ge.has(e.provider)?`No credential`:`Missing credential`}function nt(e){let t={};for(let n of e){let e=n.key.trim(),r=n.value.trim();!e&&!r||e&&(t[e]=r)}return Object.keys(t).length>0?t:void 0}function rt(e){let t=new Map;for(let n of e){let e=n.key.trim().toLowerCase();e&&t.set(e,(t.get(e)??0)+1)}return new Set([...t.entries()].filter(([,e])=>e>1).map(([e])=>e))}function it(e){return e.error===`missing_credential`&&e.message?e.message:e.error===`auth_error`?`Authentication failed. Check the saved credential for this config.`:e.error===`model_not_found`?`Model not found. Check the model name.`:e.error===`network_error`?`Network error. Check the exact base URL and try again.`:e.error===`invalid_request`&&e.message?`Connection failed. ${e.message}`:e.message?e.message.startsWith(`Connection failed.`)?e.message:`Connection failed. ${e.message}`:`Connection failed. Provider returned an error.`}function at({config:e,onConfigChange:t}){let n=e.use?.llm??null,[r,i]=(0,B.useState)([]),[a,o]=(0,B.useState)([]),[s,c]=(0,B.useState)(K()),[l,u]=(0,B.useState)(!0),[m,g]=(0,B.useState)(!1),[_,v]=(0,B.useState)(null),[y,b]=(0,B.useState)(null);(0,B.useEffect)(()=>{async function t(){try{u(!0),i((e?.registry??{}).llms??[]);let[t,n]=await Promise.all([T(),ae().catch(()=>({providers:K()}))]);o(t.credentials??[]),c(n.providers.length?n.providers:K())}catch{F.error(`Failed to load LLM configuration. Refresh and try again.`)}finally{u(!1)}}t()},[e]);async function x(){o((await T()).credentials??[])}async function S(e){if(e===n){F.error(`Cannot delete the active default configuration. Switch the default in Execution Defaults first.`);return}let a=r.filter(t=>t.name!==e),o=r;i(a);try{await D({"registry.llms":a}),F.success(`Configuration ${e} deleted`),t()}catch{i(o),F.error(`Failed to delete configuration`)}}async function C(e){let n=_===null?[...r,e]:r.map(t=>t.name===e.name?e:t);try{await D({"registry.llms":n}),i(n),F.success(`Changes saved`),g(!1),v(null),t(),await x()}catch{F.error(`Failed to save configuration. Check the fields and try again.`)}}function w(e){let t=et(a,e);if(!t)return(0,V.jsx)(L,{variant:`secondary`,children:tt(e)});let n=Ze(t.expires),r=t.expires!==null&&t.expires<Date.now();return(0,V.jsxs)(`div`,{className:`flex min-w-0 flex-wrap items-center gap-1.5`,children:[(0,V.jsx)(L,{variant:`secondary`,children:Qe(t)}),n&&(0,V.jsx)(L,{variant:r?`destructive`:`outline`,className:`text-xs`,children:n})]})}let E=Me({data:r,columns:(0,B.useMemo)(()=>[{accessorKey:`name`,header:`Name`,size:140,cell:({row:e})=>(0,V.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,V.jsx)(`span`,{className:`max-w-[220px] truncate font-mono`,children:e.original.name}),e.original.name===n?(0,V.jsx)(L,{variant:`outline`,className:`text-[11px]`,children:`Default`}):null]})},{accessorKey:`provider`,header:`Provider`,size:160,cell:({row:e})=>(0,V.jsx)(`span`,{className:`block min-w-0 max-w-[220px] truncate`,children:Xe(e.original.provider,s)})},{accessorKey:`model`,header:`Model`,cell:({row:e})=>(0,V.jsx)(`span`,{className:`block min-w-0 max-w-[280px] truncate`,children:e.original.model})},{id:`credential`,header:`Credential`,cell:({row:e})=>w(e.original)},{id:`actions`,header:``,size:80,cell:({row:e})=>(0,V.jsxs)(`div`,{className:`flex items-center justify-end gap-1`,children:[(0,V.jsx)(N,{variant:`ghost`,size:`sm`,className:`h-8 w-8 p-0 text-muted-foreground hover:text-foreground`,onClick:t=>{t.stopPropagation(),v(e.original),g(!0)},title:`Edit configuration`,"aria-label":`Edit configuration`,children:(0,V.jsx)(d,{className:`size-4`})}),(0,V.jsx)(N,{variant:`ghost`,size:`sm`,className:`h-8 w-8 p-0 text-muted-foreground hover:text-destructive`,onClick:t=>{t.stopPropagation(),e.original.name!==n&&b(e.original.name)},title:e.original.name===n?`Switch the default in Execution Defaults before deleting`:`Delete configuration`,"aria-label":`Delete configuration`,disabled:e.original.name===n,children:(0,V.jsx)(h,{className:`size-4`})})]})}],[n,a,s]),getCoreRowModel:R()});return(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(H,{children:[(0,V.jsxs)(U,{children:[(0,V.jsx)(`h2`,{className:`text-base font-semibold`,children:`LLM Configurations`}),(0,V.jsx)(`p`,{className:`mt-1 text-sm text-muted-foreground`,children:`Named model configurations for test runs. Choose the active default in Use / Execution Defaults.`})]}),(0,V.jsx)(W,{children:l?(0,V.jsxs)(`div`,{className:`space-y-3`,children:[(0,V.jsx)(k,{className:`h-10 w-full rounded-none bg-muted`}),(0,V.jsx)(k,{className:`h-10 w-full rounded-none bg-muted`}),(0,V.jsx)(k,{className:`h-10 w-full rounded-none bg-muted`})]}):r.length===0?(0,V.jsxs)(`div`,{className:`flex flex-col items-center justify-center py-12 text-center`,children:[(0,V.jsx)(p,{className:`size-10 text-muted-foreground`}),(0,V.jsx)(`h3`,{className:`mt-4 text-lg font-semibold`,children:`No LLM configurations`}),(0,V.jsx)(`p`,{className:`mt-2 text-sm text-muted-foreground`,children:`Add an LLM configuration to start running tests.`}),(0,V.jsxs)(N,{className:`mt-4`,onClick:()=>{v(null),g(!0)},children:[(0,V.jsx)(f,{className:`size-4`}),`Add Configuration`]})]}):(0,V.jsxs)(`div`,{className:`space-y-4`,children:[(0,V.jsx)(`div`,{className:`flex justify-end`,children:(0,V.jsxs)(N,{size:`sm`,onClick:()=>{v(null),g(!0)},children:[(0,V.jsx)(f,{className:`size-4`}),`Add Configuration`]})}),(0,V.jsxs)(ze,{children:[(0,V.jsx)(Pe,{children:E.getHeaderGroups().map(e=>(0,V.jsx)(Le,{children:e.headers.map(e=>(0,V.jsx)(Fe,{style:e.column.getSize()===150?void 0:{width:e.column.getSize()},className:`min-w-0`,children:e.isPlaceholder?null:Ne(e.column.columnDef.header,e.getContext())},e.id))},e.id))}),(0,V.jsx)(Ie,{children:E.getRowModel().rows.map(e=>(0,V.jsx)(Le,{children:e.getVisibleCells().map(e=>(0,V.jsx)(Re,{className:`min-w-0`,children:Ne(e.column.columnDef.cell,e.getContext())},e.id))},e.id))})]})]})})]}),(0,V.jsx)(ot,{open:m,onOpenChange:e=>{g(e),e||v(null)},config:_,existingNames:r.map(e=>e.name),onSave:C,onAuthChange:x,authCredentials:a,providerMetadata:s}),(0,V.jsx)(P,{open:y!==null,onOpenChange:e=>{e||b(null)},children:(0,V.jsxs)(Te,{children:[(0,V.jsxs)(_e,{children:[(0,V.jsx)(fe,{children:`Delete Configuration`}),(0,V.jsxs)(Ce,{children:[`Delete `,(0,V.jsx)(`span`,{className:`font-mono font-semibold`,children:y}),`? This action cannot be undone.`]})]}),(0,V.jsxs)(ye,{children:[(0,V.jsx)(N,{variant:`outline`,onClick:()=>b(null),children:`Keep Configuration`}),(0,V.jsx)(N,{variant:`destructive`,onClick:()=>{y&&(S(y),b(null))},children:`Delete Configuration`})]})]})})]})}function ot({open:e,onOpenChange:t,config:a,existingNames:u,onSave:d,onAuthChange:p,authCredentials:m,providerMetadata:g}){let v=a!==null,[y,b]=(0,B.useState)(``),[x,S]=(0,B.useState)(`openai-compatible`),[C,w]=(0,B.useState)(``),[T,D]=(0,B.useState)(``),[O,ne]=(0,B.useState)([]),[re,k]=(0,B.useState)(`api-key`),[ae,j]=(0,B.useState)(``),[de,pe]=(0,B.useState)(``),[he,ge]=(0,B.useState)(``),[be,Se]=(0,B.useState)(``),[we,Ee]=(0,B.useState)(!1),[I,De]=(0,B.useState)(!1),[Oe,ke]=(0,B.useState)(null),[je,Me]=(0,B.useState)(!1),[R,Ne]=(0,B.useState)(!1),[Pe,Fe]=(0,B.useState)(null),[Ie,Le]=(0,B.useState)(``),[Re,ze]=(0,B.useState)(``),[Be,Ve]=(0,B.useState)(!1),[z,H]=(0,B.useState)(null),U=g.length?g:K(),W=(0,B.useMemo)(()=>{let e=U.map(e=>({value:e.id,label:e.label}));return x&&!e.some(e=>e.value===x)&&e.push({value:x,label:Xe(x,U)}),e},[U,x]),He=U.find(e=>e.id===x),Ue=m.some(e=>$e(e,y,x)),We=Ge.has(x),et=x===`anthropic-compatible`,tt=We,at=He?.auth.kind===`api-key`,ot=rt(O),st=ot.size>0;(0,B.useEffect)(()=>{if(e)if(Fe(null),Le(``),ze(``),j(``),Se(``),ke(null),H(null),a){let e=a.provider||`openai-compatible`;b(a.name),S(e),w(a.model),D(a.baseURL??``),ne(e===`anthropic-compatible`?Object.entries(a.providerHeaders??{}).map(([e,t])=>Ye(e,t)).concat(Object.keys(a.providerHeaders??{}).length===0?[Ye()]:[]):[]),k(e===`anthropic-compatible`?`bearer-token`:`api-key`),pe(a.screenshotSize??``),ge(a.effectiveResolution==null?``:String(a.effectiveResolution))}else{let e=g.find(e=>e.id===`openai-compatible`)?.id??g[0]?.id??`openai-compatible`;b(``),S(e),w(``),D(``),ne([]),k(`api-key`),pe(``),ge(``)}},[e,a,g]);function ct(e){return e?/^[a-z0-9][a-z0-9-]*$/.test(e)?u.filter(e=>e!==a?.name).includes(e)?`A configuration with this name already exists`:``:`Name must be lowercase letters, numbers, and hyphens, starting with a letter or number`:``}function lt(e){S(e),Fe(null),ze(``),ke(null),j(``),Se(``),k(e===`anthropic-compatible`?`bearer-token`:`api-key`),D(``),ne(e===`anthropic-compatible`?[Ye()]:[])}function ut(e,t,n){ne(r=>r.map(r=>r.id===e?{...r,[t]:n}:r))}async function dt(){if(st){F.error(`Duplicate provider header names are not allowed`);return}Ne(!0),Fe(null);try{let e=et?nt(O):void 0;Fe(await ce({provider:x,model:C,...T.trim()?{baseURL:T.trim()}:{},...e?{providerHeaders:e}:{},configName:y||void 0}))}catch{Fe({success:!1,error:`network_error`,message:`Network error. Check the exact base URL and try again.`})}finally{Ne(!1)}}async function ft(){let e=ct(y);if(e){Le(e);return}if(!y||!x||!C)return;if(tt&&T.trim()===``){ze(`Base URL is required for compatible providers.`);return}if(st){F.error(`Duplicate provider header names are not allowed`);return}let t=G(he,{label:`Effective resolution`,min:1,integer:!0,allowEmpty:!0,errorMessage:`Effective resolution must be a positive integer`});if(t.error){F.error(t.error);return}Me(!0);try{let e=et?nt(O):void 0;await d({name:y,provider:x,model:C,baseURL:T.trim()||void 0,...e?{providerHeaders:e}:{},screenshotSize:de||void 0,effectiveResolution:t.value})}catch(e){F.error(e instanceof Error?e.message:`Failed to save configuration`)}finally{Me(!1)}}async function pt(){if(!(!ae.trim()||!y||!at)){Ve(!0);try{let e=et?re:`api-key`;await Ae(y,x,e,ae.trim()),F.success(e===`bearer-token`?`Bearer token saved`:`API key saved`),j(``),await p()}catch{F.error(`Failed to save credential`)}finally{Ve(!1)}}}async function mt(){if(z)try{await xe(z),await p(),F.success(`Credential deleted`)}catch{F.error(`Failed to delete credential`)}finally{H(null)}}let ht=y.trim()!==``&&C.trim()!==``&&!Ie;function gt(){return at?(0,V.jsxs)(`div`,{className:`space-y-3`,children:[We&&(0,V.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Credentials are optional for this config. Unauthenticated endpoints can still be tested.`}),x===`gemini`&&(0,V.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:Je}),et&&(0,V.jsxs)(`div`,{className:`space-y-2`,children:[(0,V.jsx)(_,{children:`Credential Type`}),(0,V.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Save an API key or Bearer token for this config.`}),(0,V.jsxs)(s,{value:re,onValueChange:e=>k(e),children:[(0,V.jsx)(i,{className:`w-full`,children:(0,V.jsx)(o,{})}),(0,V.jsxs)(r,{children:[(0,V.jsx)(n,{value:`api-key`,children:`API key`}),(0,V.jsx)(n,{value:`bearer-token`,children:`Bearer token`})]})]})]}),(0,V.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,V.jsx)(M,{type:`password`,placeholder:`secret-value`,value:ae,onChange:e=>j(e.target.value),className:`min-w-[180px] flex-1`}),(0,V.jsxs)(N,{size:`sm`,onClick:pt,disabled:Be||!ae.trim()||!y||!!Ie,children:[Be?(0,V.jsx)(E,{className:`size-4 animate-spin`}):null,`Save Credential`]})]})]}):null}function _t(){if(He?.auth.kind!==`oauth-plugin`)return null;let e=Oe?.provider===x?Oe:null,t=He.label,n=He.auth.buttonLabel??`Login with ${t}`;async function r(){De(!0),Se(``);try{let e=await me(x,y);if(ke({provider:x,sessionId:e.sessionId,mode:e.mode}),window.open(e.authorizeUrl,`_blank`),e.mode===`browser-poll`){let n=window.setInterval(async()=>{try{let r=await ve(x,e.sessionId);r.status===`completed`?(window.clearInterval(n),F.success(`${t} authenticated`),De(!1),ke(null),await p()):r.status===`error`&&(window.clearInterval(n),F.error(r.error||`${t} authentication failed`),De(!1))}catch{}},2e3);window.setTimeout(()=>{window.clearInterval(n),De(!1)},300*1e3)}else De(!1)}catch{F.error(`Failed to start ${t} authentication`),De(!1)}}return(0,V.jsxs)(`div`,{className:`space-y-3`,children:[(0,V.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`Login with `,t,` for this config before testing.`]}),He.auth.mode===`manual-code`?(0,V.jsxs)(`div`,{className:`space-y-3`,children:[(0,V.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,V.jsx)(_,{className:`text-sm`,children:`Open authorization page`}),(0,V.jsxs)(N,{variant:`outline`,size:`sm`,disabled:I||!y||!!Ie,onClick:r,children:[(0,V.jsx)(l,{className:`size-4`}),n]})]}),(0,V.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,V.jsx)(_,{className:`text-sm`,children:`Paste authorization code`}),(0,V.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,V.jsx)(M,{type:`password`,placeholder:`authorization-code`,value:be,onChange:e=>Se(e.target.value),disabled:!e,className:`min-w-[180px] flex-1`}),(0,V.jsxs)(N,{size:`sm`,disabled:!be.trim()||!e||we,onClick:async()=>{if(e){Ee(!0);try{await ee(x,e.sessionId,be.trim()),F.success(`${t} authenticated`),Se(``),ke(null),await p()}catch{F.error(`Failed to exchange code`)}finally{Ee(!1)}}},children:[we?(0,V.jsx)(E,{className:`size-4 animate-spin`}):null,`Connect`]})]})]})]}):(0,V.jsx)(`div`,{className:`space-y-3`,children:(0,V.jsxs)(N,{variant:`outline`,size:`sm`,disabled:I||!y||!!Ie,onClick:r,children:[I?(0,V.jsx)(E,{className:`size-4 animate-spin`}):(0,V.jsx)(l,{className:`size-4`}),I?`Authenticating...`:n]})})]})}function vt(){let e=m.filter(e=>e.configName===y);return e.length===0?null:(0,V.jsx)(`div`,{className:`space-y-2`,children:e.map(e=>{let t=Ze(e.expires),n=e.expires!==null&&e.expires<Date.now();return(0,V.jsxs)(`div`,{className:`flex min-w-0 flex-wrap items-center gap-3 rounded-none border border-border bg-transparent p-3 text-sm`,children:[(0,V.jsx)(L,{variant:`secondary`,className:`text-xs`,children:Qe(e)}),(0,V.jsx)(`span`,{className:`min-w-0 break-words font-medium`,children:Xe(e.provider,U)}),t&&(0,V.jsx)(L,{variant:n?`destructive`:`outline`,className:`text-xs`,children:t}),(0,V.jsx)(N,{variant:`ghost`,size:`sm`,className:`ml-auto h-8 w-8 p-0 text-destructive hover:text-destructive`,onClick:()=>H(e.configName),"aria-label":`Delete credential`,title:`Delete credential`,children:(0,V.jsx)(h,{className:`size-4`})})]},`${e.configName}-${e.type}-${e.provider}`)})})}function yt(){return R?(0,V.jsxs)(`div`,{className:`flex items-center gap-2 text-sm text-muted-foreground`,role:`status`,children:[(0,V.jsx)(E,{className:`size-4 animate-spin`}),(0,V.jsx)(`span`,{children:`Testing connection...`})]}):Pe?Pe.success?Pe.unauthenticated?(0,V.jsx)(`div`,{className:`text-sm text-muted-foreground`,role:`status`,children:Pe.authMessage||Pe.message||qe}):(0,V.jsxs)(`div`,{className:`flex items-center gap-2 text-sm text-success`,role:`status`,children:[(0,V.jsx)(ue,{className:`size-4`}),(0,V.jsx)(`span`,{children:`Connection successful`}),Pe.responseTime!=null&&(0,V.jsxs)(`span`,{className:`text-muted-foreground`,children:[Pe.responseTime,`ms`]})]}):(0,V.jsxs)(`div`,{className:`flex items-center gap-2 text-sm text-destructive`,role:`alert`,children:[(0,V.jsx)(c,{className:`size-4`}),(0,V.jsx)(`span`,{children:it(Pe)})]}):null}return(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(P,{open:e,onOpenChange:t,children:(0,V.jsxs)(Te,{className:`sm:max-w-2xl max-h-[85vh] overflow-y-auto`,children:[(0,V.jsxs)(_e,{children:[(0,V.jsx)(fe,{children:v?`Edit ${a.name}`:`Add Configuration`}),(0,V.jsx)(Ce,{children:v?`Update provider, model, and credentials for this configuration.`:`Create a named LLM configuration with its own provider, model, and credentials.`})]}),(0,V.jsxs)(`div`,{className:`space-y-4`,children:[(0,V.jsxs)(`div`,{className:`space-y-2`,children:[(0,V.jsx)(_,{htmlFor:`config-name`,children:`Name`}),(0,V.jsx)(M,{id:`config-name`,placeholder:`e.g., claude-fast, gpt-cheap`,value:y,onChange:e=>{b(e.target.value),Ie&&Le(``)},onBlur:()=>{y&&Le(ct(y))},disabled:v,className:v?`bg-muted`:``,"aria-describedby":Ie?`name-error`:void 0}),(0,V.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Lowercase alphanumeric and hyphens (e.g., claude-fast, gpt-cheap)`}),Ie&&(0,V.jsx)(`p`,{id:`name-error`,className:`text-sm text-destructive`,children:Ie})]}),(0,V.jsxs)(`div`,{className:`space-y-2`,children:[(0,V.jsx)(_,{children:`Provider`}),(0,V.jsxs)(s,{value:x,onValueChange:lt,children:[(0,V.jsx)(i,{className:`w-full`,children:(0,V.jsx)(o,{})}),(0,V.jsx)(r,{children:W.map(e=>(0,V.jsx)(n,{value:e.value,children:e.label},e.value))})]})]}),(0,V.jsxs)(`div`,{className:`space-y-2`,children:[(0,V.jsx)(_,{htmlFor:`config-model`,children:`Model`}),(0,V.jsx)(M,{id:`config-model`,placeholder:`model-name`,value:C,onChange:e=>w(e.target.value)})]}),tt&&(0,V.jsxs)(`div`,{className:`space-y-2`,children:[(0,V.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,V.jsx)(_,{htmlFor:`config-base-url`,children:`Base URL`}),(0,V.jsx)(se,{children:(0,V.jsxs)(oe,{children:[(0,V.jsx)(te,{asChild:!0,children:(0,V.jsx)(`button`,{type:`button`,"aria-label":`Compatible endpoint help`,className:`inline-flex size-5 items-center justify-center text-muted-foreground transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring cursor-help`,children:(0,V.jsx)(le,{className:`size-3.5`})})}),(0,V.jsx)(A,{className:`max-w-[250px]`,children:Ke})]})})]}),(0,V.jsx)(M,{id:`config-base-url`,placeholder:x===`openai-compatible`?`https://openrouter.ai/api/v1`:`https://anthropic-proxy.example/messages`,value:T,onChange:e=>{D(e.target.value),Re&&ze(``)},"aria-invalid":Re?!0:void 0,"aria-describedby":Re?`base-url-error`:void 0}),(0,V.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:Ke}),Re&&(0,V.jsx)(`p`,{id:`base-url-error`,className:`text-sm text-destructive`,children:Re})]}),et&&(0,V.jsxs)(`div`,{className:`space-y-2`,children:[(0,V.jsxs)(`div`,{children:[(0,V.jsx)(_,{children:`Provider Headers`}),(0,V.jsx)(`p`,{className:`mt-1 text-xs text-muted-foreground`,children:`Optional non-secret headers sent with this Anthropic-compatible endpoint.`})]}),(0,V.jsx)(`div`,{className:`space-y-2`,children:O.map(e=>{let t=e.key.trim().toLowerCase(),n=t!==``&&ot.has(t);return(0,V.jsxs)(`div`,{className:`space-y-1`,children:[(0,V.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,V.jsx)(M,{placeholder:`header-name`,value:e.key,onChange:t=>ut(e.id,`key`,t.target.value),className:`min-w-[160px] flex-1`}),(0,V.jsx)(M,{placeholder:`header-value`,value:e.value,onChange:t=>ut(e.id,`value`,t.target.value),className:`min-w-[180px] flex-1`}),(0,V.jsx)(N,{type:`button`,variant:`ghost`,size:`sm`,className:`h-8 w-8 p-0 text-muted-foreground hover:text-destructive`,"aria-label":`Remove header`,title:`Remove header`,onClick:()=>ne(t=>t.filter(t=>t.id!==e.id)),disabled:O.length===1&&!e.key&&!e.value,children:(0,V.jsx)(h,{className:`size-4`})})]}),n&&(0,V.jsx)(`p`,{className:`text-xs text-destructive`,children:`Duplicate header names are not allowed.`})]},e.id)})}),(0,V.jsxs)(N,{type:`button`,variant:`outline`,size:`sm`,onClick:()=>ne(e=>[...e,Ye()]),children:[(0,V.jsx)(f,{className:`size-4`}),`Add Header`]})]}),(0,V.jsxs)(`div`,{className:`space-y-2`,children:[(0,V.jsx)(_,{children:`Screenshot Size`}),(0,V.jsx)(M,{placeholder:`e.g., "1m", "512k" (empty = no compression)`,value:de,onChange:e=>pe(e.target.value)}),(0,V.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Maximum screenshot size for this model (e.g., "1m", "512k"). Empty = no compression.`})]}),(0,V.jsxs)(`div`,{className:`space-y-2`,children:[(0,V.jsx)(_,{htmlFor:`config-effective-resolution`,children:`Effective Resolution`}),(0,V.jsx)(M,{id:`config-effective-resolution`,type:`number`,min:1,step:1,placeholder:`e.g., 1568`,value:he,onChange:e=>ge(e.target.value)}),(0,V.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Maximum effective screenshot edge sent to the model. Use this with screenshot compression to control token cost.`})]}),(0,V.jsx)(ie,{}),(0,V.jsxs)(`div`,{className:`space-y-4`,children:[(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`h3`,{className:`text-base font-semibold`,children:`Credentials`}),(0,V.jsx)(`p`,{className:`mt-1 text-xs text-muted-foreground`,children:`Saved credentials are keyed by this named configuration.`})]}),gt(),_t(),vt()]})]}),(0,V.jsxs)(ye,{children:[(0,V.jsx)(N,{variant:`outline`,onClick:dt,disabled:R||!x||!C||st,children:`Test Connection`}),(0,V.jsxs)(N,{onClick:ft,disabled:je||!ht||st,children:[je&&(0,V.jsx)(E,{className:`size-4 animate-spin`}),`Save Changes`]})]}),We&&!Ue&&!R&&!Pe&&(0,V.jsx)(`div`,{className:`text-sm text-muted-foreground`,role:`status`,children:qe}),yt()]})}),(0,V.jsx)(P,{open:z!==null,onOpenChange:e=>{e||H(null)},children:(0,V.jsxs)(Te,{children:[(0,V.jsxs)(_e,{children:[(0,V.jsx)(fe,{children:`Delete Credential`}),(0,V.jsxs)(Ce,{children:[`Delete saved credential for `,z,`? Tests using this config may fail until a new credential is saved.`]})]}),(0,V.jsxs)(ye,{children:[(0,V.jsx)(N,{variant:`outline`,onClick:()=>H(null),children:`Keep Credential`}),(0,V.jsx)(N,{variant:`destructive`,onClick:mt,children:`Delete Credential`})]})]})})]})}function st({config:e,onConfigChange:t}){let n=e.use?.timeout??{},[r,i]=(0,B.useState)(n.step??`30s`),[a,o]=(0,B.useState)(n.test??`10m`),[s,c]=(0,B.useState)(n.navigation??`10s`),[l,u]=(0,B.useState)(!1);async function d(){u(!0);try{await D({"use.timeout":{step:r,test:a,navigation:s}}),t(),F.success(`Configuration saved`)}catch{F.error(`Failed to save configuration`)}finally{u(!1)}}return(0,V.jsxs)(H,{children:[(0,V.jsxs)(U,{children:[(0,V.jsx)(`h2`,{className:`text-base font-semibold`,children:`Timeout`}),(0,V.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Configure timeout limits for test execution`})]}),(0,V.jsxs)(W,{children:[(0,V.jsxs)(`div`,{className:`space-y-2`,children:[(0,V.jsx)(_,{htmlFor:`timeout-step`,children:`Step Timeout`}),(0,V.jsx)(M,{id:`timeout-step`,type:`text`,placeholder:`e.g., "30s", "5m"`,value:r,onChange:e=>i(e.target.value)}),(0,V.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Max time for a single test step (e.g., "30s", "5m")`})]}),(0,V.jsxs)(`div`,{className:`space-y-2`,children:[(0,V.jsx)(_,{htmlFor:`timeout-test`,children:`Test Timeout`}),(0,V.jsx)(M,{id:`timeout-test`,type:`text`,placeholder:`e.g., "10m", "1h"`,value:a,onChange:e=>o(e.target.value)}),(0,V.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Max time for an entire test (e.g., "10m", "1h")`})]}),(0,V.jsxs)(`div`,{className:`space-y-2`,children:[(0,V.jsx)(_,{htmlFor:`timeout-navigation`,children:`Navigation Timeout`}),(0,V.jsx)(M,{id:`timeout-navigation`,type:`text`,placeholder:`e.g., "10s", "30s"`,value:s,onChange:e=>c(e.target.value)}),(0,V.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Max time for page navigation (e.g., "10s", "30s")`})]}),(0,V.jsx)(N,{size:`sm`,onClick:d,disabled:l,children:l?(0,V.jsx)(E,{className:`size-4 animate-spin`}):`Save Changes`})]})]})}function ct({config:e,onConfigChange:t}){let n=e.use?.healing??{},[r,i]=(0,B.useState)(String(n.maxAttempts??3)),[a,o]=(0,B.useState)(!1);async function s(){let e=G(r,{label:`Max healing attempts`,min:1,integer:!0});if(e.error){F.error(e.error);return}o(!0);try{await D({"use.healing":{maxAttempts:e.value}}),t(),F.success(`Configuration saved`)}catch{F.error(`Failed to save configuration`)}finally{o(!1)}}return(0,V.jsxs)(H,{children:[(0,V.jsxs)(U,{children:[(0,V.jsx)(`h2`,{className:`text-base font-semibold`,children:`Healing`}),(0,V.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Configure self-healing behavior for failing test steps`})]}),(0,V.jsxs)(W,{children:[(0,V.jsxs)(`div`,{className:`space-y-2`,children:[(0,V.jsx)(_,{htmlFor:`healing-max-attempts`,children:`Max Healing Attempts`}),(0,V.jsx)(M,{id:`healing-max-attempts`,type:`number`,min:1,step:1,value:r,onChange:e=>i(e.target.value)})]}),(0,V.jsx)(N,{size:`sm`,onClick:s,disabled:a,children:a?(0,V.jsx)(E,{className:`size-4 animate-spin`}):`Save Changes`})]})]})}function lt({config:e,onConfigChange:t}){let n=e.services?.cache??{},[r,i]=(0,B.useState)(n.dir??``),[a,o]=(0,B.useState)(n.ttl??``),[s,c]=(0,B.useState)(!1);async function l(){c(!0);try{await D({"services.cache":{dir:r,ttl:a}}),t(),F.success(`Configuration saved`)}catch{F.error(`Failed to save configuration`)}finally{c(!1)}}return(0,V.jsxs)(H,{children:[(0,V.jsxs)(U,{children:[(0,V.jsx)(`h2`,{className:`text-base font-semibold`,children:`Cache`}),(0,V.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Configure action cache directory and expiration`})]}),(0,V.jsxs)(W,{children:[(0,V.jsxs)(`div`,{className:`space-y-2`,children:[(0,V.jsx)(_,{htmlFor:`cache-dir`,children:`Cache Directory`}),(0,V.jsx)(M,{id:`cache-dir`,placeholder:`.agent-qa/cache`,value:r,onChange:e=>i(e.target.value)})]}),(0,V.jsxs)(`div`,{className:`space-y-2`,children:[(0,V.jsx)(_,{htmlFor:`cache-ttl`,children:`TTL`}),(0,V.jsx)(M,{id:`cache-ttl`,placeholder:`7d`,value:a,onChange:e=>o(e.target.value)}),(0,V.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Cache time-to-live — human-readable duration (e.g., "7d", "24h", "30m")`})]}),(0,V.jsx)(N,{size:`sm`,onClick:l,disabled:s,children:s?(0,V.jsx)(E,{className:`size-4 animate-spin`}):`Save Changes`})]})]})}function ut({config:e,onConfigChange:t}){let[a,c]=(0,B.useState)((e.services?.logging??{}).level??`info`),[l,u]=(0,B.useState)(!1);async function d(){u(!0);try{await D({"services.logging":{level:a}}),t(),F.success(`Changes saved`)}catch{F.error(`Failed to save configuration`)}finally{u(!1)}}return(0,V.jsxs)(H,{children:[(0,V.jsxs)(U,{children:[(0,V.jsx)(`h2`,{className:`text-base font-semibold`,children:`Logging`}),(0,V.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Configure service log verbosity.`})]}),(0,V.jsxs)(W,{children:[(0,V.jsxs)(`div`,{className:`space-y-2`,children:[(0,V.jsx)(_,{htmlFor:`logging-level`,children:`Log Level`}),(0,V.jsxs)(s,{value:a,onValueChange:c,children:[(0,V.jsx)(i,{id:`logging-level`,children:(0,V.jsx)(o,{})}),(0,V.jsxs)(r,{children:[(0,V.jsx)(n,{value:`silent`,children:`Silent`}),(0,V.jsx)(n,{value:`error`,children:`Error`}),(0,V.jsx)(n,{value:`warn`,children:`Warn`}),(0,V.jsx)(n,{value:`info`,children:`Info`}),(0,V.jsx)(n,{value:`debug`,children:`Debug`})]})]})]}),(0,V.jsx)(N,{size:`sm`,onClick:d,disabled:l,children:l?(0,V.jsx)(E,{className:`size-4 animate-spin`}):`Save Changes`})]})]})}function dt({config:e,onConfigChange:t}){let a=e.use?.browser??{},[c,l]=(0,B.useState)(a.name??`chromium`),[u,d]=(0,B.useState)(a.headless??!0),f=a.viewport??{width:1280,height:720},[p,m]=(0,B.useState)(String(f.width)),[h,g]=(0,B.useState)(String(f.height)),[v,b]=(0,B.useState)(!1);async function x(){let e=G(p,{label:`Viewport width`,min:1,integer:!0});if(e.error){F.error(e.error);return}let n=G(h,{label:`Viewport height`,min:1,integer:!0});if(n.error){F.error(n.error);return}b(!0);try{await D({"use.browser":{name:c,headless:u,viewport:{width:e.value,height:n.value}}}),t(),F.success(`Configuration saved`)}catch{F.error(`Failed to save configuration`)}finally{b(!1)}}return(0,V.jsxs)(H,{children:[(0,V.jsxs)(U,{children:[(0,V.jsx)(`h2`,{className:`text-base font-semibold`,children:`Browser`}),(0,V.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Configure default browser settings for web test execution`})]}),(0,V.jsxs)(W,{children:[(0,V.jsxs)(`div`,{className:`space-y-2`,children:[(0,V.jsx)(_,{htmlFor:`browser-name`,children:`Browser`}),(0,V.jsxs)(s,{value:c,onValueChange:l,children:[(0,V.jsx)(i,{id:`browser-name`,children:(0,V.jsx)(o,{})}),(0,V.jsxs)(r,{children:[(0,V.jsx)(n,{value:`chromium`,children:`Chromium`}),(0,V.jsx)(n,{value:`firefox`,children:`Firefox`}),(0,V.jsx)(n,{value:`webkit`,children:`WebKit`})]})]})]}),(0,V.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,V.jsxs)(`div`,{className:`space-y-0.5`,children:[(0,V.jsx)(_,{htmlFor:`browser-headless`,children:`Headless`}),(0,V.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Run web browsers without a visible window.`})]}),(0,V.jsx)(y,{id:`browser-headless`,checked:u,onCheckedChange:d})]}),(0,V.jsxs)(`div`,{className:`grid grid-cols-2 gap-4`,children:[(0,V.jsxs)(`div`,{className:`space-y-2`,children:[(0,V.jsx)(_,{htmlFor:`browser-vw`,children:`Viewport Width`}),(0,V.jsx)(M,{id:`browser-vw`,type:`number`,min:1,step:1,value:p,onChange:e=>m(e.target.value)})]}),(0,V.jsxs)(`div`,{className:`space-y-2`,children:[(0,V.jsx)(_,{htmlFor:`browser-vh`,children:`Viewport Height`}),(0,V.jsx)(M,{id:`browser-vh`,type:`number`,min:1,step:1,value:h,onChange:e=>g(e.target.value)})]})]}),(0,V.jsx)(N,{size:`sm`,onClick:x,disabled:v,children:v?(0,V.jsx)(E,{className:`size-4 animate-spin`}):`Save Changes`})]})]})}function ft({config:e,onConfigChange:t}){let[n,r]=(0,B.useState)((e.services?.recording??{}).enabled??!1),[i,a]=(0,B.useState)(!1);async function o(){a(!0);try{await D({"services.recording":{enabled:n}}),t(),F.success(`Changes saved`)}catch{F.error(`Failed to save configuration`)}finally{a(!1)}}return(0,V.jsxs)(H,{children:[(0,V.jsxs)(U,{children:[(0,V.jsx)(`h2`,{className:`text-base font-semibold`,children:`Recording`}),(0,V.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Configure whether runtime recording is enabled by default.`})]}),(0,V.jsxs)(W,{children:[(0,V.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,V.jsxs)(`div`,{className:`space-y-0.5`,children:[(0,V.jsx)(_,{htmlFor:`recording-enabled`,children:`Enabled`}),(0,V.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Record video of test execution`})]}),(0,V.jsx)(y,{id:`recording-enabled`,checked:n,onCheckedChange:r})]}),(0,V.jsx)(N,{size:`sm`,onClick:o,disabled:i,children:i?(0,V.jsx)(E,{className:`size-4 animate-spin`}):`Save Changes`})]})]})}function pt({config:e,onConfigChange:t}){let a=e.services?.accessibility??{},[c,l]=(0,B.useState)(a.enabled??!1),[u,d]=(0,B.useState)(a.standard??`wcag2aa`),[f,p]=(0,B.useState)(a.runAfter??`test-end`),[m,h]=(0,B.useState)(a.failOnViolation??!1),[g,v]=(0,B.useState)(!1);async function b(){v(!0);try{await D({"services.accessibility":{enabled:c,standard:u,runAfter:f,failOnViolation:m}}),t(),F.success(`Configuration saved`)}catch{F.error(`Failed to save configuration`)}finally{v(!1)}}return(0,V.jsxs)(H,{children:[(0,V.jsxs)(U,{children:[(0,V.jsx)(`h2`,{className:`text-base font-semibold`,children:`Accessibility`}),(0,V.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Configure accessibility audit settings`})]}),(0,V.jsxs)(W,{children:[(0,V.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,V.jsxs)(`div`,{className:`space-y-0.5`,children:[(0,V.jsx)(_,{htmlFor:`a11y-enabled`,children:`Enabled`}),(0,V.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Run accessibility checks during tests`})]}),(0,V.jsx)(y,{id:`a11y-enabled`,checked:c,onCheckedChange:l})]}),(0,V.jsxs)(`div`,{className:`space-y-2`,children:[(0,V.jsx)(_,{htmlFor:`a11y-standard`,children:`Standard`}),(0,V.jsxs)(s,{value:u,onValueChange:d,children:[(0,V.jsx)(i,{id:`a11y-standard`,children:(0,V.jsx)(o,{})}),(0,V.jsxs)(r,{children:[(0,V.jsx)(n,{value:`wcag2a`,children:`WCAG 2.0 A`}),(0,V.jsx)(n,{value:`wcag2aa`,children:`WCAG 2.0 AA`}),(0,V.jsx)(n,{value:`wcag2aaa`,children:`WCAG 2.0 AAA`})]})]})]}),(0,V.jsxs)(`div`,{className:`space-y-2`,children:[(0,V.jsx)(_,{htmlFor:`a11y-run-after`,children:`Run After`}),(0,V.jsxs)(s,{value:f,onValueChange:p,children:[(0,V.jsx)(i,{id:`a11y-run-after`,children:(0,V.jsx)(o,{})}),(0,V.jsxs)(r,{children:[(0,V.jsx)(n,{value:`every-step`,children:`Every Step`}),(0,V.jsx)(n,{value:`navigation`,children:`Navigation`}),(0,V.jsx)(n,{value:`test-end`,children:`Test End`})]})]})]}),(0,V.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,V.jsxs)(`div`,{className:`space-y-0.5`,children:[(0,V.jsx)(_,{htmlFor:`a11y-fail`,children:`Fail on Violation`}),(0,V.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Fail the test if violations are found`})]}),(0,V.jsx)(y,{id:`a11y-fail`,checked:m,onCheckedChange:h})]}),(0,V.jsx)(N,{size:`sm`,onClick:b,disabled:g,children:g?(0,V.jsx)(E,{className:`size-4 animate-spin`}):`Save Changes`})]})]})}function mt({config:e,onConfigChange:t}){let n=e.use?.planner??{},[r,i]=(0,B.useState)(String(n.maxSubActions??20)),[a,o]=(0,B.useState)(String(n.previousStepCount??5)),[s,c]=(0,B.useState)(!1);async function l(){let e=G(r,{label:`Max sub-actions`,min:1,integer:!0});if(e.error){F.error(e.error);return}let n=G(a,{label:`Previous step count`,min:0,integer:!0});if(n.error){F.error(n.error);return}c(!0);try{await D({"use.planner":{maxSubActions:e.value,previousStepCount:n.value}}),t(),F.success(`Configuration saved`)}catch{F.error(`Failed to save configuration`)}finally{c(!1)}}return(0,V.jsxs)(H,{children:[(0,V.jsxs)(U,{children:[(0,V.jsx)(`h2`,{className:`text-base font-semibold`,children:`Planner`}),(0,V.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Configure the AI planner observation and planning settings`})]}),(0,V.jsxs)(W,{children:[(0,V.jsxs)(`div`,{className:`space-y-2`,children:[(0,V.jsx)(_,{htmlFor:`planner-max-sub-actions`,children:`Max Sub-Actions`}),(0,V.jsx)(M,{id:`planner-max-sub-actions`,type:`number`,min:1,step:1,value:r,onChange:e=>i(e.target.value)}),(0,V.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Maximum sub-actions per step`})]}),(0,V.jsxs)(`div`,{className:`space-y-2`,children:[(0,V.jsx)(_,{htmlFor:`planner-prev-steps`,children:`Previous Step Count`}),(0,V.jsx)(M,{id:`planner-prev-steps`,type:`number`,min:0,step:1,value:a,onChange:e=>o(e.target.value)}),(0,V.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Number of previous steps included in planner context`})]}),(0,V.jsx)(N,{size:`sm`,onClick:l,disabled:s,children:s?(0,V.jsx)(E,{className:`size-4 animate-spin`}):`Save Changes`})]})]})}var{entries:ht,setPrototypeOf:gt,isFrozen:_t,getPrototypeOf:vt,getOwnPropertyDescriptor:yt}=Object,{freeze:q,seal:bt,create:xt}=Object,{apply:St,construct:Ct}=typeof Reflect<`u`&&Reflect;q||=function(e){return e},bt||=function(e){return e},St||=function(e,t){var n=[...arguments].slice(2);return e.apply(t,n)},Ct||=function(e){return new e(...[...arguments].slice(1))};var wt=Z(Array.prototype.forEach),Tt=Z(Array.prototype.lastIndexOf),Et=Z(Array.prototype.pop),Dt=Z(Array.prototype.push),Ot=Z(Array.prototype.splice),J=Array.isArray,kt=Z(String.prototype.toLowerCase),At=Z(String.prototype.toString),jt=Z(String.prototype.match),Mt=Z(String.prototype.replace),Nt=Z(String.prototype.indexOf),Pt=Z(String.prototype.trim),Ft=Z(Number.prototype.toString),It=Z(Boolean.prototype.toString),Lt=typeof BigInt>`u`?null:Z(BigInt.prototype.toString),Rt=typeof Symbol>`u`?null:Z(Symbol.prototype.toString),Y=Z(Object.prototype.hasOwnProperty),zt=Z(Object.prototype.toString),X=Z(RegExp.prototype.test),Bt=Vt(TypeError);function Z(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);var n=[...arguments].slice(1);return St(e,t,n)}}function Vt(e){return function(){return Ct(e,[...arguments])}}function Q(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:kt;if(gt&>(e,null),!J(t))return e;let r=t.length;for(;r--;){let i=t[r];if(typeof i==`string`){let e=n(i);e!==i&&(_t(t)||(t[r]=e),i=e)}e[i]=!0}return e}function Ht(e){for(let t=0;t<e.length;t++)Y(e,t)||(e[t]=null);return e}function $(e){let t=xt(null);for(let[n,r]of ht(e))Y(e,n)&&(J(r)?t[n]=Ht(r):r&&typeof r==`object`&&r.constructor===Object?t[n]=$(r):t[n]=r);return t}function Ut(e){switch(typeof e){case`string`:return e;case`number`:return Ft(e);case`boolean`:return It(e);case`bigint`:return Lt?Lt(e):`0`;case`symbol`:return Rt?Rt(e):`Symbol()`;case`undefined`:return zt(e);case`function`:case`object`:{if(e===null)return zt(e);let t=e,n=Wt(t,`toString`);if(typeof n==`function`){let e=n(t);return typeof e==`string`?e:zt(e)}return zt(e)}default:return zt(e)}}function Wt(e,t){for(;e!==null;){let n=yt(e,t);if(n){if(n.get)return Z(n.get);if(typeof n.value==`function`)return Z(n.value)}e=vt(e)}function n(){return null}return n}function Gt(e){try{return X(e,``),!0}catch{return!1}}var Kt=q(`a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr`.split(`.`)),qt=q(`svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern`.split(`.`)),Jt=q([`feBlend`,`feColorMatrix`,`feComponentTransfer`,`feComposite`,`feConvolveMatrix`,`feDiffuseLighting`,`feDisplacementMap`,`feDistantLight`,`feDropShadow`,`feFlood`,`feFuncA`,`feFuncB`,`feFuncG`,`feFuncR`,`feGaussianBlur`,`feImage`,`feMerge`,`feMergeNode`,`feMorphology`,`feOffset`,`fePointLight`,`feSpecularLighting`,`feSpotLight`,`feTile`,`feTurbulence`]),Yt=q([`animate`,`color-profile`,`cursor`,`discard`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`foreignobject`,`hatch`,`hatchpath`,`mesh`,`meshgradient`,`meshpatch`,`meshrow`,`missing-glyph`,`script`,`set`,`solidcolor`,`unknown`,`use`]),Xt=q(`math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts`.split(`.`)),Zt=q([`maction`,`maligngroup`,`malignmark`,`mlongdiv`,`mscarries`,`mscarry`,`msgroup`,`mstack`,`msline`,`msrow`,`semantics`,`annotation`,`annotation-xml`,`mprescripts`,`none`]),Qt=q([`#text`]),$t=q(`accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns`.split(`.`)),en=q(`accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-rendering.textlength.type.u1.u2.unicode.values.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan`.split(`.`)),tn=q(`accent.accentunder.align.bevelled.close.columnalign.columnlines.columnspacing.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lquote.lspace.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns`.split(`.`)),nn=q([`xlink:href`,`xml:id`,`xlink:title`,`xml:space`,`xmlns:xlink`]),rn=bt(/\{\{[\w\W]*|[\w\W]*\}\}/gm),an=bt(/<%[\w\W]*|[\w\W]*%>/gm),on=bt(/\$\{[\w\W]*/gm),sn=bt(/^data-[\-\w.\u00B7-\uFFFF]+$/),cn=bt(/^aria-[\-\w]+$/),ln=bt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),un=bt(/^(?:\w+script|data):/i),dn=bt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),fn=bt(/^html$/i),pn=bt(/^[a-z][.\w]*(-[.\w]+)+$/i),mn=Object.freeze({__proto__:null,ARIA_ATTR:cn,ATTR_WHITESPACE:dn,CUSTOM_ELEMENT:pn,DATA_ATTR:sn,DOCTYPE_NAME:fn,ERB_EXPR:an,IS_ALLOWED_URI:ln,IS_SCRIPT_OR_DATA:un,MUSTACHE_EXPR:rn,TMPLIT_EXPR:on}),hn={element:1,text:3,progressingInstruction:7,comment:8,document:9},gn=function(){return typeof window>`u`?null:window},_n=function(e,t){if(typeof e!=`object`||typeof e.createPolicy!=`function`)return null;let n=null,r=`data-tt-policy-suffix`;t&&t.hasAttribute(r)&&(n=t.getAttribute(r));let i=`dompurify`+(n?`#`+n:``);try{return e.createPolicy(i,{createHTML(e){return e},createScriptURL(e){return e}})}catch{return console.warn(`TrustedTypes policy `+i+` could not be created.`),null}},vn=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function yn(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:gn(),t=e=>yn(e);if(t.version=`3.4.2`,t.removed=[],!e||!e.document||e.document.nodeType!==hn.document||!e.Element)return t.isSupported=!1,t;let{document:n}=e,r=n,i=r.currentScript,{DocumentFragment:a,HTMLTemplateElement:o,Node:s,Element:c,NodeFilter:l,NamedNodeMap:u=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:d,DOMParser:f,trustedTypes:p}=e,m=c.prototype,h=Wt(m,`cloneNode`),g=Wt(m,`remove`),_=Wt(m,`nextSibling`),v=Wt(m,`childNodes`),y=Wt(m,`parentNode`);if(typeof o==`function`){let e=n.createElement(`template`);e.content&&e.content.ownerDocument&&(n=e.content.ownerDocument)}let b,x=``,{implementation:S,createNodeIterator:C,createDocumentFragment:w,getElementsByTagName:T}=n,{importNode:E}=r,D=vn();t.isSupported=typeof ht==`function`&&typeof y==`function`&&S&&S.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:ee,ERB_EXPR:te,TMPLIT_EXPR:O,DATA_ATTR:ne,ARIA_ATTR:re,IS_SCRIPT_OR_DATA:ie,ATTR_WHITESPACE:k,CUSTOM_ELEMENT:ae}=mn,{IS_ALLOWED_URI:oe}=mn,A=null,se=Q({},[...Kt,...qt,...Jt,...Xt,...Qt]),j=null,ce=Q({},[...$t,...en,...tn,...nn]),M=Object.seal(xt(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),le=null,ue=null,N=Object.seal(xt(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),de=!0,fe=!0,pe=!1,me=!0,he=!1,ge=!0,P=!1,_e=!1,ve=!1,ye=!1,be=!1,F=!1,xe=!0,Se=!1,Ce=`user-content-`,we=!0,Te=!1,Ee={},I=null,De=Q({},[`annotation-xml`,`audio`,`colgroup`,`desc`,`foreignobject`,`head`,`iframe`,`math`,`mi`,`mn`,`mo`,`ms`,`mtext`,`noembed`,`noframes`,`noscript`,`plaintext`,`script`,`style`,`svg`,`template`,`thead`,`title`,`video`,`xmp`]),Oe=null,ke=Q({},[`audio`,`video`,`img`,`source`,`image`,`track`]),Ae=null,je=Q({},[`alt`,`class`,`for`,`id`,`label`,`name`,`pattern`,`placeholder`,`role`,`summary`,`title`,`value`,`style`,`xmlns`]),L=`http://www.w3.org/1998/Math/MathML`,Me=`http://www.w3.org/2000/svg`,R=`http://www.w3.org/1999/xhtml`,Ne=R,Pe=!1,Fe=null,Ie=Q({},[L,Me,R],At),Le=Q({},[`mi`,`mo`,`mn`,`ms`,`mtext`]),Re=Q({},[`annotation-xml`]),ze=Q({},[`title`,`style`,`font`,`a`,`script`]),Be=null,Ve=[`application/xhtml+xml`,`text/html`],z=null,B=null,V=n.createElement(`form`),H=function(e){return e instanceof RegExp||e instanceof Function},U=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(B&&B===e)return;(!e||typeof e!=`object`)&&(e={}),e=$(e),Be=Ve.indexOf(e.PARSER_MEDIA_TYPE)===-1?`text/html`:e.PARSER_MEDIA_TYPE,z=Be===`application/xhtml+xml`?At:kt,A=Y(e,`ALLOWED_TAGS`)&&J(e.ALLOWED_TAGS)?Q({},e.ALLOWED_TAGS,z):se,j=Y(e,`ALLOWED_ATTR`)&&J(e.ALLOWED_ATTR)?Q({},e.ALLOWED_ATTR,z):ce,Fe=Y(e,`ALLOWED_NAMESPACES`)&&J(e.ALLOWED_NAMESPACES)?Q({},e.ALLOWED_NAMESPACES,At):Ie,Ae=Y(e,`ADD_URI_SAFE_ATTR`)&&J(e.ADD_URI_SAFE_ATTR)?Q($(je),e.ADD_URI_SAFE_ATTR,z):je,Oe=Y(e,`ADD_DATA_URI_TAGS`)&&J(e.ADD_DATA_URI_TAGS)?Q($(ke),e.ADD_DATA_URI_TAGS,z):ke,I=Y(e,`FORBID_CONTENTS`)&&J(e.FORBID_CONTENTS)?Q({},e.FORBID_CONTENTS,z):De,le=Y(e,`FORBID_TAGS`)&&J(e.FORBID_TAGS)?Q({},e.FORBID_TAGS,z):$({}),ue=Y(e,`FORBID_ATTR`)&&J(e.FORBID_ATTR)?Q({},e.FORBID_ATTR,z):$({}),Ee=Y(e,`USE_PROFILES`)?e.USE_PROFILES&&typeof e.USE_PROFILES==`object`?$(e.USE_PROFILES):e.USE_PROFILES:!1,de=e.ALLOW_ARIA_ATTR!==!1,fe=e.ALLOW_DATA_ATTR!==!1,pe=e.ALLOW_UNKNOWN_PROTOCOLS||!1,me=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,he=e.SAFE_FOR_TEMPLATES||!1,ge=e.SAFE_FOR_XML!==!1,P=e.WHOLE_DOCUMENT||!1,ye=e.RETURN_DOM||!1,be=e.RETURN_DOM_FRAGMENT||!1,F=e.RETURN_TRUSTED_TYPE||!1,ve=e.FORCE_BODY||!1,xe=e.SANITIZE_DOM!==!1,Se=e.SANITIZE_NAMED_PROPS||!1,we=e.KEEP_CONTENT!==!1,Te=e.IN_PLACE||!1,oe=Gt(e.ALLOWED_URI_REGEXP)?e.ALLOWED_URI_REGEXP:ln,Ne=typeof e.NAMESPACE==`string`?e.NAMESPACE:R,Le=Y(e,`MATHML_TEXT_INTEGRATION_POINTS`)&&e.MATHML_TEXT_INTEGRATION_POINTS&&typeof e.MATHML_TEXT_INTEGRATION_POINTS==`object`?$(e.MATHML_TEXT_INTEGRATION_POINTS):Q({},[`mi`,`mo`,`mn`,`ms`,`mtext`]),Re=Y(e,`HTML_INTEGRATION_POINTS`)&&e.HTML_INTEGRATION_POINTS&&typeof e.HTML_INTEGRATION_POINTS==`object`?$(e.HTML_INTEGRATION_POINTS):Q({},[`annotation-xml`]);let t=Y(e,`CUSTOM_ELEMENT_HANDLING`)&&e.CUSTOM_ELEMENT_HANDLING&&typeof e.CUSTOM_ELEMENT_HANDLING==`object`?$(e.CUSTOM_ELEMENT_HANDLING):xt(null);if(M=xt(null),Y(t,`tagNameCheck`)&&H(t.tagNameCheck)&&(M.tagNameCheck=t.tagNameCheck),Y(t,`attributeNameCheck`)&&H(t.attributeNameCheck)&&(M.attributeNameCheck=t.attributeNameCheck),Y(t,`allowCustomizedBuiltInElements`)&&typeof t.allowCustomizedBuiltInElements==`boolean`&&(M.allowCustomizedBuiltInElements=t.allowCustomizedBuiltInElements),he&&(fe=!1),be&&(ye=!0),Ee&&(A=Q({},Qt),j=xt(null),Ee.html===!0&&(Q(A,Kt),Q(j,$t)),Ee.svg===!0&&(Q(A,qt),Q(j,en),Q(j,nn)),Ee.svgFilters===!0&&(Q(A,Jt),Q(j,en),Q(j,nn)),Ee.mathMl===!0&&(Q(A,Xt),Q(j,tn),Q(j,nn))),N.tagCheck=null,N.attributeCheck=null,Y(e,`ADD_TAGS`)&&(typeof e.ADD_TAGS==`function`?N.tagCheck=e.ADD_TAGS:J(e.ADD_TAGS)&&(A===se&&(A=$(A)),Q(A,e.ADD_TAGS,z))),Y(e,`ADD_ATTR`)&&(typeof e.ADD_ATTR==`function`?N.attributeCheck=e.ADD_ATTR:J(e.ADD_ATTR)&&(j===ce&&(j=$(j)),Q(j,e.ADD_ATTR,z))),Y(e,`ADD_URI_SAFE_ATTR`)&&J(e.ADD_URI_SAFE_ATTR)&&Q(Ae,e.ADD_URI_SAFE_ATTR,z),Y(e,`FORBID_CONTENTS`)&&J(e.FORBID_CONTENTS)&&(I===De&&(I=$(I)),Q(I,e.FORBID_CONTENTS,z)),Y(e,`ADD_FORBID_CONTENTS`)&&J(e.ADD_FORBID_CONTENTS)&&(I===De&&(I=$(I)),Q(I,e.ADD_FORBID_CONTENTS,z)),we&&(A[`#text`]=!0),P&&Q(A,[`html`,`head`,`body`]),A.table&&(Q(A,[`tbody`]),delete le.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!=`function`)throw Bt(`TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.`);if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!=`function`)throw Bt(`TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.`);b=e.TRUSTED_TYPES_POLICY,x=b.createHTML(``)}else b===void 0&&(b=_n(p,i)),b!==null&&typeof x==`string`&&(x=b.createHTML(``));q&&q(e),B=e},W=Q({},[...qt,...Jt,...Yt]),He=Q({},[...Xt,...Zt]),G=function(e){let t=y(e);(!t||!t.tagName)&&(t={namespaceURI:Ne,tagName:`template`});let n=kt(e.tagName),r=kt(t.tagName);return Fe[e.namespaceURI]?e.namespaceURI===Me?t.namespaceURI===R?n===`svg`:t.namespaceURI===L?n===`svg`&&(r===`annotation-xml`||Le[r]):!!W[n]:e.namespaceURI===L?t.namespaceURI===R?n===`math`:t.namespaceURI===Me?n===`math`&&Re[r]:!!He[n]:e.namespaceURI===R?t.namespaceURI===Me&&!Re[r]||t.namespaceURI===L&&!Le[r]?!1:!He[n]&&(ze[n]||!W[n]):!!(Be===`application/xhtml+xml`&&Fe[e.namespaceURI]):!1},Ue=function(e){Dt(t.removed,{element:e});try{y(e).removeChild(e)}catch{g(e)}},We=function(e,n){try{Dt(t.removed,{attribute:n.getAttributeNode(e),from:n})}catch{Dt(t.removed,{attribute:null,from:n})}if(n.removeAttribute(e),e===`is`)if(ye||be)try{Ue(n)}catch{}else try{n.setAttribute(e,``)}catch{}},Ge=function(e){let t=null,r=null;if(ve)e=`<remove></remove>`+e;else{let t=jt(e,/^[\r\n\t ]+/);r=t&&t[0]}Be===`application/xhtml+xml`&&Ne===R&&(e=`<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>`+e+`</body></html>`);let i=b?b.createHTML(e):e;if(Ne===R)try{t=new f().parseFromString(i,Be)}catch{}if(!t||!t.documentElement){t=S.createDocument(Ne,`template`,null);try{t.documentElement.innerHTML=Pe?x:i}catch{}}let a=t.body||t.documentElement;return e&&r&&a.insertBefore(n.createTextNode(r),a.childNodes[0]||null),Ne===R?T.call(t,P?`html`:`body`)[0]:P?t.documentElement:a},Ke=function(e){return C.call(e.ownerDocument||e,e,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},qe=function(e){return e instanceof d&&(typeof e.nodeName!=`string`||typeof e.textContent!=`string`||typeof e.removeChild!=`function`||!(e.attributes instanceof u)||typeof e.removeAttribute!=`function`||typeof e.setAttribute!=`function`||typeof e.namespaceURI!=`string`||typeof e.insertBefore!=`function`||typeof e.hasChildNodes!=`function`)},Je=function(e){return typeof s==`function`&&e instanceof s};function K(e,n,r){wt(e,e=>{e.call(t,n,r,B)})}let Ye=function(e){let n=null;if(K(D.beforeSanitizeElements,e,null),qe(e))return Ue(e),!0;let r=z(e.nodeName);if(K(D.uponSanitizeElement,e,{tagName:r,allowedTags:A}),ge&&e.hasChildNodes()&&!Je(e.firstElementChild)&&X(/<[/\w!]/g,e.innerHTML)&&X(/<[/\w!]/g,e.textContent)||ge&&e.namespaceURI===R&&r===`style`&&Je(e.firstElementChild)||e.nodeType===hn.progressingInstruction||ge&&e.nodeType===hn.comment&&X(/<[/\w]/g,e.data))return Ue(e),!0;if(le[r]||!(N.tagCheck instanceof Function&&N.tagCheck(r))&&!A[r]){if(!le[r]&&Qe(r)&&(M.tagNameCheck instanceof RegExp&&X(M.tagNameCheck,r)||M.tagNameCheck instanceof Function&&M.tagNameCheck(r)))return!1;if(we&&!I[r]){let t=y(e)||e.parentNode,n=v(e)||e.childNodes;if(n&&t){let r=n.length;for(let i=r-1;i>=0;--i){let r=h(n[i],!0);t.insertBefore(r,_(e))}}}return Ue(e),!0}return e instanceof c&&!G(e)||(r===`noscript`||r===`noembed`||r===`noframes`)&&X(/<\/no(script|embed|frames)/i,e.innerHTML)?(Ue(e),!0):(he&&e.nodeType===hn.text&&(n=e.textContent,wt([ee,te,O],e=>{n=Mt(n,e,` `)}),e.textContent!==n&&(Dt(t.removed,{element:e.cloneNode()}),e.textContent=n)),K(D.afterSanitizeElements,e,null),!1)},Xe=function(e,t,r){if(ue[t]||xe&&(t===`id`||t===`name`)&&(r in n||r in V))return!1;let i=j[t]||N.attributeCheck instanceof Function&&N.attributeCheck(t,e);if(!(fe&&!ue[t]&&X(ne,t))&&!(de&&X(re,t))){if(!i||ue[t]){if(!(Qe(e)&&(M.tagNameCheck instanceof RegExp&&X(M.tagNameCheck,e)||M.tagNameCheck instanceof Function&&M.tagNameCheck(e))&&(M.attributeNameCheck instanceof RegExp&&X(M.attributeNameCheck,t)||M.attributeNameCheck instanceof Function&&M.attributeNameCheck(t,e))||t===`is`&&M.allowCustomizedBuiltInElements&&(M.tagNameCheck instanceof RegExp&&X(M.tagNameCheck,r)||M.tagNameCheck instanceof Function&&M.tagNameCheck(r))))return!1}else if(!Ae[t]&&!X(oe,Mt(r,k,``))&&!((t===`src`||t===`xlink:href`||t===`href`)&&e!==`script`&&Nt(r,`data:`)===0&&Oe[e])&&!(pe&&!X(ie,Mt(r,k,``)))&&r)return!1}return!0},Ze=Q({},[`annotation-xml`,`color-profile`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`missing-glyph`]),Qe=function(e){return!Ze[kt(e)]&&X(ae,e)},$e=function(e){K(D.beforeSanitizeAttributes,e,null);let{attributes:n}=e;if(!n||qe(e))return;let r={attrName:``,attrValue:``,keepAttr:!0,allowedAttributes:j,forceKeepAttr:void 0},i=n.length;for(;i--;){let{name:a,namespaceURI:o,value:s}=n[i],c=z(a),l=s,u=a===`value`?l:Pt(l);if(r.attrName=c,r.attrValue=u,r.keepAttr=!0,r.forceKeepAttr=void 0,K(D.uponSanitizeAttribute,e,r),u=r.attrValue,Se&&(c===`id`||c===`name`)&&Nt(u,Ce)!==0&&(We(a,e),u=Ce+u),ge&&X(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,u)){We(a,e);continue}if(c===`attributename`&&jt(u,`href`)){We(a,e);continue}if(r.forceKeepAttr)continue;if(!r.keepAttr){We(a,e);continue}if(!me&&X(/\/>/i,u)){We(a,e);continue}he&&wt([ee,te,O],e=>{u=Mt(u,e,` `)});let d=z(e.nodeName);if(!Xe(d,c,u)){We(a,e);continue}if(b&&typeof p==`object`&&typeof p.getAttributeType==`function`&&!o)switch(p.getAttributeType(d,c)){case`TrustedHTML`:u=b.createHTML(u);break;case`TrustedScriptURL`:u=b.createScriptURL(u);break}if(u!==l)try{o?e.setAttributeNS(o,a,u):e.setAttribute(a,u),qe(e)?Ue(e):Et(t.removed)}catch{We(a,e)}}K(D.afterSanitizeAttributes,e,null)},et=function(e){let t=null,n=Ke(e);for(K(D.beforeSanitizeShadowDOM,e,null);t=n.nextNode();)K(D.uponSanitizeShadowNode,t,null),Ye(t),$e(t),t.content instanceof a&&et(t.content);K(D.afterSanitizeShadowDOM,e,null)};return t.sanitize=function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=null,o=null,c=null,l=null;if(Pe=!e,Pe&&(e=`<!-->`),typeof e!=`string`&&!Je(e)&&(e=Ut(e),typeof e!=`string`))throw Bt(`dirty is not a string, aborting`);if(!t.isSupported)return e;if(_e||U(n),t.removed=[],typeof e==`string`&&(Te=!1),Te){let t=e.nodeName;if(typeof t==`string`){let e=z(t);if(!A[e]||le[e])throw Bt(`root node is forbidden and cannot be sanitized in-place`)}}else if(e instanceof s)i=Ge(`<!---->`),o=i.ownerDocument.importNode(e,!0),o.nodeType===hn.element&&o.nodeName===`BODY`||o.nodeName===`HTML`?i=o:i.appendChild(o);else{if(!ye&&!he&&!P&&e.indexOf(`<`)===-1)return b&&F?b.createHTML(e):e;if(i=Ge(e),!i)return ye?null:F?x:``}i&&ve&&Ue(i.firstChild);let u=Ke(Te?e:i);for(;c=u.nextNode();)Ye(c),$e(c),c.content instanceof a&&et(c.content);if(Te)return e;if(ye){if(he){i.normalize();let e=i.innerHTML;wt([ee,te,O],t=>{e=Mt(e,t,` `)}),i.innerHTML=e}if(be)for(l=w.call(i.ownerDocument);i.firstChild;)l.appendChild(i.firstChild);else l=i;return(j.shadowroot||j.shadowrootmode)&&(l=E.call(r,l,!0)),l}let d=P?i.outerHTML:i.innerHTML;return P&&A[`!doctype`]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&X(fn,i.ownerDocument.doctype.name)&&(d=`<!DOCTYPE `+i.ownerDocument.doctype.name+`>
|
|
2
|
+
`+d),he&&wt([ee,te,O],e=>{d=Mt(d,e,` `)}),b&&F?b.createHTML(d):d},t.setConfig=function(){U(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}),_e=!0},t.clearConfig=function(){B=null,_e=!1},t.isValidAttribute=function(e,t,n){return B||U({}),Xe(z(e),z(t),n)},t.addHook=function(e,t){typeof t==`function`&&Dt(D[e],t)},t.removeHook=function(e,t){if(t!==void 0){let n=Tt(D[e],t);return n===-1?void 0:Ot(D[e],n,1)[0]}return Et(D[e])},t.removeHooks=function(e){D[e]=[]},t.removeAllHooks=function(){D=vn()},t}var bn=yn();function xn({config:e,onConfigChange:t}){let[n,r]=(0,B.useState)(!0),[i,a]=(0,B.useState)(``),[o,s]=(0,B.useState)(null),[c,l]=(0,B.useState)(!1),[f,p]=(0,B.useState)(!1),[h,g]=(0,B.useState)(!1),[_,v]=(0,B.useState)(!1),[y,w]=(0,B.useState)(``),T=(0,B.useRef)(``),ee=i!==T.current;async function te(){r(!0);try{let e=await j();if(e.error===`no_config`)l(!1),s(null),a(``),T.current=``;else{l(!0),s(e.filePath);let t=e.content??``;a(t),T.current=t}}catch{F.error(`Failed to load agent rules`)}finally{r(!1)}}(0,B.useEffect)(()=>{te()},[]);async function O(){p(!0);try{await De(i),T.current=i,t(),F.success(`Configuration saved`)}catch{F.error(`Failed to save agent rules`)}finally{p(!1)}}function ne(){a(T.current)}async function ie(){g(!0);try{let e=await I();l(!0),s(e.filePath),a(``),T.current=``,t(),F.success(`Agent rules file created`)}catch{F.error(`Failed to create rules file`)}finally{g(!1)}}async function k(e){if(v(!1),e!==o)try{await D({"workspace.agentRules":e}),t(),await te()}catch{F.error(`Failed to update file path`)}}function ae(e){e.key===`Enter`?k(y):e.key===`Escape`&&v(!1)}function oe(){if(!i.trim())return(0,V.jsx)(`div`,{className:`text-sm text-muted-foreground text-center py-12`,children:`Nothing to preview. Switch to the Edit tab to write your rules.`});let e=Be.parse(i,{async:!1});return(0,V.jsx)(`div`,{className:`markdown-preview`,role:`document`,dangerouslySetInnerHTML:{__html:bn.sanitize(e,{USE_PROFILES:{html:!0}})}})}return n?(0,V.jsxs)(H,{children:[(0,V.jsxs)(U,{children:[(0,V.jsxs)(`h2`,{className:`flex items-center gap-2 text-base font-semibold`,children:[(0,V.jsx)(Ve,{className:`size-5`}),`Agent Rules`]}),(0,V.jsx)(`p`,{className:`mt-1 text-sm text-muted-foreground`,children:`Custom instructions appended to the AI agent's system prompt`})]}),(0,V.jsx)(W,{children:(0,V.jsx)(`div`,{className:`flex items-center justify-center py-12 text-muted-foreground`,children:(0,V.jsx)(E,{className:`size-5 animate-spin`})})})]}):c?(0,V.jsxs)(H,{children:[(0,V.jsxs)(U,{children:[(0,V.jsxs)(`h2`,{className:`flex items-center gap-2 text-base font-semibold`,children:[(0,V.jsx)(Ve,{className:`size-5`}),`Agent Rules`]}),(0,V.jsx)(`p`,{className:`mt-1 text-sm text-muted-foreground`,children:`Custom instructions appended to the AI agent's system prompt`})]}),(0,V.jsxs)(W,{children:[(0,V.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,V.jsx)(re,{className:`size-4 text-muted-foreground shrink-0`}),_?(0,V.jsx)(M,{className:`font-mono text-sm`,value:y,onChange:e=>w(e.target.value),onKeyDown:ae,onBlur:()=>k(y),placeholder:`./path-to-rules.md`,"aria-label":`Agent rules file path`,autoFocus:!0}):(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(`span`,{className:`font-mono text-sm text-muted-foreground truncate`,children:o}),(0,V.jsx)(N,{variant:`ghost`,size:`sm`,className:`ml-auto shrink-0`,onClick:()=>{w(o??``),v(!0)},children:`Change Path`})]})]}),(0,V.jsxs)(C,{defaultValue:`edit`,children:[(0,V.jsxs)(S,{children:[(0,V.jsxs)(b,{value:`edit`,className:`gap-1.5`,children:[(0,V.jsx)(d,{className:`size-3.5`}),`Edit`]}),(0,V.jsxs)(b,{value:`preview`,className:`gap-1.5`,children:[(0,V.jsx)(u,{className:`size-3.5`}),`Preview`]})]}),(0,V.jsx)(x,{value:`edit`,children:(0,V.jsx)(m,{className:`min-h-[300px] font-mono text-sm leading-relaxed resize-y w-full`,value:i,onChange:e=>a(e.target.value),placeholder:`Write your custom agent rules in markdown...`,"aria-label":`Agent rules markdown editor`})}),(0,V.jsx)(x,{value:`preview`,children:(0,V.jsx)(`div`,{className:`min-h-[300px] p-4 border border-border rounded-none overflow-y-auto`,children:oe()})})]}),(0,V.jsxs)(`div`,{className:`flex gap-2`,children:[(0,V.jsx)(N,{size:`sm`,onClick:O,disabled:f||!ee,children:f?(0,V.jsx)(E,{className:`size-4 animate-spin`}):`Save Changes`}),(0,V.jsx)(N,{variant:`outline`,size:`sm`,onClick:ne,disabled:!ee,children:`Reset Changes`})]})]})]}):(0,V.jsxs)(H,{children:[(0,V.jsxs)(U,{children:[(0,V.jsxs)(`h2`,{className:`flex items-center gap-2 text-base font-semibold`,children:[(0,V.jsx)(Ve,{className:`size-5`}),`Agent Rules`]}),(0,V.jsx)(`p`,{className:`mt-1 text-sm text-muted-foreground`,children:`Custom instructions appended to the AI agent's system prompt`})]}),(0,V.jsx)(W,{children:(0,V.jsxs)(`div`,{className:`flex flex-col items-center justify-center py-12 text-center gap-4`,children:[(0,V.jsx)(Ve,{className:`size-8 text-muted-foreground`}),(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`p`,{className:`text-sm font-semibold`,children:`No agent rules file configured`}),(0,V.jsx)(`p`,{className:`text-xs text-muted-foreground mt-1`,children:`Create a markdown file with custom instructions for the AI agent. Rules are appended to the system prompt after the built-in rules.`})]}),(0,V.jsx)(N,{variant:`outline`,size:`sm`,onClick:ie,disabled:h,children:h?(0,V.jsx)(E,{className:`size-4 animate-spin`}):(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(z,{className:`size-4 mr-1`}),`Create Rules File`]})})]})})]})}function Sn({config:e,onConfigChange:t}){let n=e.services?.dashboard??{},[r,i]=(0,B.useState)(String(n.port??4173)),[a,o]=(0,B.useState)(n.dbPath??``),[s,c]=(0,B.useState)(n.artifactsDir??``),[l,u]=(0,B.useState)(!1);async function d(){let e=G(r,{label:`Port`,min:1,max:65535,integer:!0});if(e.error){F.error(e.error);return}u(!0);try{await D({"services.dashboard":{port:e.value,dbPath:a,artifactsDir:s}}),t(),F.success(`Changes saved`)}catch{F.error(`Failed to save configuration`)}finally{u(!1)}}return(0,V.jsxs)(H,{children:[(0,V.jsxs)(U,{children:[(0,V.jsx)(`h2`,{className:`text-base font-semibold`,children:`Dashboard`}),(0,V.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Configure dashboard server and storage paths`})]}),(0,V.jsxs)(W,{children:[(0,V.jsxs)(`div`,{className:`space-y-2`,children:[(0,V.jsx)(_,{htmlFor:`dashboard-port`,children:`Port`}),(0,V.jsx)(M,{id:`dashboard-port`,type:`number`,min:1,max:65535,step:1,value:r,onChange:e=>i(e.target.value)})]}),(0,V.jsxs)(`div`,{className:`space-y-2`,children:[(0,V.jsx)(_,{htmlFor:`dashboard-db-path`,children:`Database Path`}),(0,V.jsx)(M,{id:`dashboard-db-path`,placeholder:`.agent-qa/runs.db`,value:a,onChange:e=>o(e.target.value)})]}),(0,V.jsxs)(`div`,{className:`space-y-2`,children:[(0,V.jsx)(_,{htmlFor:`dashboard-artifacts-dir`,children:`Artifacts Directory`}),(0,V.jsx)(M,{id:`dashboard-artifacts-dir`,placeholder:`.agent-qa/artifacts`,value:s,onChange:e=>c(e.target.value)})]}),(0,V.jsx)(N,{size:`sm`,onClick:d,disabled:l,children:l?(0,V.jsx)(E,{className:`size-4 animate-spin`}):`Save Changes`})]})]})}function Cn({config:e,onConfigChange:t}){let n=e.workspace??{},r=n.testMatch??[],i=n.testPathIgnore??[],a=n.suiteMatch??[],[o,s]=(0,B.useState)(r.join(`
|
|
3
|
+
`)),[c,l]=(0,B.useState)(i.join(`
|
|
4
|
+
`)),[u,d]=(0,B.useState)(a.join(`
|
|
5
|
+
`)),[f,p]=(0,B.useState)({}),[h,g]=(0,B.useState)(!1);async function v(){let e=o.split(`
|
|
6
|
+
`).map(e=>e.trim()).filter(Boolean),n=c.split(`
|
|
7
|
+
`).map(e=>e.trim()).filter(Boolean),r=u.split(`
|
|
8
|
+
`).map(e=>e.trim()).filter(Boolean),i={};if(e.length===0&&(i.testMatch=`workspace.testMatch must contain at least one pattern.`),r.length===0&&(i.suiteMatch=`workspace.suiteMatch must contain at least one pattern.`),Object.keys(i).length>0){p(i);return}p({}),g(!0);try{await D({"workspace.testMatch":e,"workspace.suiteMatch":r,"workspace.testPathIgnore":n}),t(),F.success(`Configuration saved`)}catch{F.error(`Failed to save configuration`)}finally{g(!1)}}return(0,V.jsxs)(H,{children:[(0,V.jsxs)(U,{children:[(0,V.jsx)(`h2`,{className:`text-base font-semibold`,children:`Discovery`}),(0,V.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Configure test and suite discovery patterns`})]}),(0,V.jsxs)(W,{children:[(0,V.jsxs)(`div`,{className:`space-y-2`,children:[(0,V.jsx)(_,{htmlFor:`test-match`,children:`Test Match Patterns`}),(0,V.jsx)(m,{id:`test-match`,placeholder:`**/*.yaml`,value:o,"aria-invalid":f.testMatch?!0:void 0,onChange:e=>{s(e.target.value),f.testMatch&&e.target.value.split(`
|
|
9
|
+
`).some(e=>e.trim())&&p(e=>({...e,testMatch:``}))},className:`min-h-[120px] font-mono text-sm`}),(0,V.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`One glob pattern per line`}),f.testMatch?(0,V.jsx)(`p`,{className:`text-xs text-destructive`,children:f.testMatch}):null]}),(0,V.jsxs)(`div`,{className:`space-y-2`,children:[(0,V.jsx)(_,{htmlFor:`suite-match`,children:`Suite Match Patterns`}),(0,V.jsx)(m,{id:`suite-match`,placeholder:`**/*.suite.yaml`,value:u,"aria-invalid":f.suiteMatch?!0:void 0,onChange:e=>{d(e.target.value),f.suiteMatch&&e.target.value.split(`
|
|
10
|
+
`).some(e=>e.trim())&&p(e=>({...e,suiteMatch:``}))},className:`min-h-[120px] font-mono text-sm`}),(0,V.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`One glob pattern per line`}),f.suiteMatch?(0,V.jsx)(`p`,{className:`text-xs text-destructive`,children:f.suiteMatch}):null]}),(0,V.jsxs)(`div`,{className:`space-y-2`,children:[(0,V.jsx)(_,{htmlFor:`test-path-ignore`,children:`Test Path Ignore Patterns`}),(0,V.jsx)(m,{id:`test-path-ignore`,placeholder:`**/node_modules/**`,value:c,onChange:e=>l(e.target.value),className:`min-h-[120px] font-mono text-sm`}),(0,V.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`One glob pattern per line`})]}),(0,V.jsx)(N,{size:`sm`,onClick:v,disabled:h,children:h?(0,V.jsx)(E,{className:`size-4 animate-spin`}):`Save Changes`})]})]})}function wn({config:e,onConfigChange:t}){let n=e.workspace??{},[r,i]=(0,B.useState)(n.hooksFile??``),[a,o]=(0,B.useState)(n.agentRules??``),[s,c]=(0,B.useState)(n.envFile??``),[l,u]=(0,B.useState)(n.secretsFile??``),[d,f]=(0,B.useState)({}),[p,m]=(0,B.useState)(!1);async function h(){let e={};if(r.trim().length===0&&(e.hooksFile=`Hooks file is required.`),a.trim().length===0&&(e.agentRules=`Agent rules file is required.`),s.trim().length===0&&(e.envFile=`Environment file is required.`),l.trim().length===0&&(e.secretsFile=`Secrets file is required.`),Object.keys(e).length>0){f(e);return}f({}),m(!0);try{await D({"workspace.hooksFile":r.trim(),"workspace.agentRules":a.trim(),"workspace.envFile":s.trim(),"workspace.secretsFile":l.trim()}),t(),F.success(`Changes saved`)}catch{F.error(`Failed to save configuration`)}finally{m(!1)}}return(0,V.jsxs)(H,{children:[(0,V.jsxs)(U,{children:[(0,V.jsx)(`h2`,{className:`text-base font-semibold`,children:`Files`}),(0,V.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Set shared workspace file paths for hooks, environment loading, and runtime-only secrets.`})]}),(0,V.jsxs)(W,{children:[(0,V.jsxs)(`div`,{className:`space-y-2`,children:[(0,V.jsx)(_,{htmlFor:`workspace-hooks-file`,children:`Hooks File`}),(0,V.jsx)(M,{id:`workspace-hooks-file`,placeholder:`tests/hooks.ts`,value:r,"aria-invalid":d.hooksFile?!0:void 0,onChange:e=>{i(e.target.value),d.hooksFile&&e.target.value.trim().length>0&&f(e=>({...e,hooksFile:``}))}}),(0,V.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Path to the shared hooks module used across tests and suites.`}),d.hooksFile?(0,V.jsx)(`p`,{className:`text-xs text-destructive`,children:d.hooksFile}):null]}),(0,V.jsxs)(`div`,{className:`space-y-2`,children:[(0,V.jsx)(_,{htmlFor:`workspace-agent-rules`,children:`Agent Rules File`}),(0,V.jsx)(M,{id:`workspace-agent-rules`,placeholder:`agent-rules.md`,value:a,"aria-invalid":d.agentRules?!0:void 0,onChange:e=>{o(e.target.value),d.agentRules&&e.target.value.trim().length>0&&f(e=>({...e,agentRules:``}))}}),(0,V.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Required instructions file loaded for agent runs.`}),d.agentRules?(0,V.jsx)(`p`,{className:`text-xs text-destructive`,children:d.agentRules}):null]}),(0,V.jsxs)(`div`,{className:`space-y-2`,children:[(0,V.jsx)(_,{htmlFor:`workspace-env-file`,children:`Environment File`}),(0,V.jsx)(M,{id:`workspace-env-file`,placeholder:`.env.local`,value:s,"aria-invalid":d.envFile?!0:void 0,onChange:e=>{c(e.target.value),d.envFile&&e.target.value.trim().length>0&&f(e=>({...e,envFile:``}))}}),(0,V.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Required dotenv file loaded before runs start.`}),d.envFile?(0,V.jsx)(`p`,{className:`text-xs text-destructive`,children:d.envFile}):null]}),(0,V.jsxs)(`div`,{className:`space-y-2`,children:[(0,V.jsx)(_,{htmlFor:`workspace-secrets-file`,children:`Secrets File`}),(0,V.jsx)(M,{id:`workspace-secrets-file`,placeholder:`.secrets.local`,value:l,"aria-invalid":d.secretsFile?!0:void 0,onChange:e=>{u(e.target.value),d.secretsFile&&e.target.value.trim().length>0&&f(e=>({...e,secretsFile:``}))}}),(0,V.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Required dotenv-style file for runtime-only secrets.`}),d.secretsFile?(0,V.jsx)(`p`,{className:`text-xs text-destructive`,children:d.secretsFile}):null]}),(0,V.jsx)(N,{size:`sm`,onClick:h,disabled:p,children:p?(0,V.jsx)(E,{className:`size-4 animate-spin`}):`Save Changes`})]})]})}function Tn({config:e,onConfigChange:t}){let n=(e.use??{}).logCapture??{},[r,i]=(0,B.useState)(n.console??!0),[a,o]=(0,B.useState)(n.network??!0),[s,c]=(0,B.useState)(!1);async function l(){c(!0);try{await D({"use.logCapture":{console:r,network:a}}),t(),F.success(`Changes saved`)}catch{F.error(`Failed to save configuration`)}finally{c(!1)}}return(0,V.jsxs)(H,{children:[(0,V.jsxs)(U,{children:[(0,V.jsx)(`h2`,{className:`text-base font-semibold`,children:`Log Capture`}),(0,V.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Control the default runtime capture of console and network events.`})]}),(0,V.jsxs)(W,{children:[(0,V.jsxs)(`div`,{className:`flex items-center justify-between gap-4`,children:[(0,V.jsxs)(`div`,{className:`space-y-0.5`,children:[(0,V.jsx)(_,{htmlFor:`use-log-capture-console`,children:`Capture console logs`}),(0,V.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Record browser console output during runs by default.`})]}),(0,V.jsx)(y,{id:`use-log-capture-console`,checked:r,onCheckedChange:i})]}),(0,V.jsxs)(`div`,{className:`flex items-center justify-between gap-4`,children:[(0,V.jsxs)(`div`,{className:`space-y-0.5`,children:[(0,V.jsx)(_,{htmlFor:`use-log-capture-network`,children:`Capture network logs`}),(0,V.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Record request and response metadata during runs by default.`})]}),(0,V.jsx)(y,{id:`use-log-capture-network`,checked:a,onCheckedChange:o})]}),(0,V.jsx)(N,{size:`sm`,onClick:l,disabled:s,children:s?(0,V.jsx)(E,{className:`size-4 animate-spin`}):`Save Changes`})]})]})}function En({config:e,onConfigChange:t}){let a=e.registry??{},c=e.use??{},l=(Array.isArray(a.llms)?a.llms:[]).map(e=>e.name).filter(e=>typeof e==`string`),[u,d]=(0,B.useState)(c.llm??``),[f,p]=(0,B.useState)(c.parallel??!1),[m,h]=(0,B.useState)(!1);async function g(){let e={"use.parallel":f};u&&(e[`use.llm`]=u),h(!0);try{await D(e),t(),F.success(`Runtime defaults saved`)}catch{F.error(`Runtime defaults were not saved. Fix the setting and try again.`)}finally{h(!1)}}return(0,V.jsxs)(H,{children:[(0,V.jsxs)(U,{children:[(0,V.jsx)(`h2`,{className:`text-base font-semibold`,children:`Execution Defaults`}),(0,V.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Set shared runtime defaults used by tests and suites.`})]}),(0,V.jsxs)(W,{children:[(0,V.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,V.jsx)(L,{variant:`secondary`,children:`Registry-backed`}),(0,V.jsx)(L,{variant:`outline`,className:`font-mono text-[11px]`,children:`use.llm`}),(0,V.jsx)(L,{variant:`outline`,className:`font-mono text-[11px]`,children:`use.parallel`})]}),(0,V.jsxs)(`div`,{className:`space-y-2`,children:[(0,V.jsx)(_,{htmlFor:`use-default-llm`,children:`Default LLM`}),l.length>0?(0,V.jsxs)(s,{value:u||void 0,onValueChange:d,children:[(0,V.jsx)(i,{id:`use-default-llm`,children:(0,V.jsx)(o,{placeholder:`Select an LLM from Registry / LLMs`})}),(0,V.jsx)(r,{children:l.map(e=>(0,V.jsx)(n,{value:e,children:e},e))})]}):(0,V.jsxs)(He,{className:`border-dashed px-3 py-2`,children:[(0,V.jsx)(`div`,{className:`font-medium text-foreground`,children:`No LLMs configured yet.`}),(0,V.jsx)(`div`,{children:`Add an LLM in Registry / LLMs before selecting a default.`})]}),(0,V.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`This value selects from entries defined in Registry.`})]}),(0,V.jsxs)(`div`,{className:`flex items-center justify-between gap-4`,children:[(0,V.jsxs)(`div`,{className:`space-y-0.5`,children:[(0,V.jsx)(_,{htmlFor:`use-parallel`,children:`Parallel Execution`}),(0,V.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Allow eligible web runs and suite parent jobs to share available queue slots by default.`})]}),(0,V.jsx)(y,{id:`use-parallel`,checked:f,onCheckedChange:p})]}),(0,V.jsx)(N,{size:`sm`,onClick:g,disabled:m,children:m?(0,V.jsx)(E,{className:`size-4 animate-spin`}):`Save Runtime Defaults`})]})]})}function Dn(e){let t=e.use?.mobile?.appState;return t===`preserve`||t===`reset`?t:void 0}function On({config:e,onConfigChange:t}){let a=Dn(e),[c,l]=(0,B.useState)(a??`preserve`),[u,d]=(0,B.useState)(!1);async function f(){d(!0);try{await D({"use.mobile.appState":c}),t(),F.success(`Mobile defaults saved`)}catch{F.error(`Mobile defaults were not saved. Fix the setting and try again.`)}finally{d(!1)}}return(0,V.jsxs)(H,{children:[(0,V.jsxs)(U,{children:[(0,V.jsx)(`h2`,{className:`text-base font-semibold`,children:`Mobile`}),(0,V.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Set native mobile app-state behavior for mobile runs.`})]}),(0,V.jsxs)(W,{children:[a?null:(0,V.jsxs)(He,{className:`border-dashed`,children:[(0,V.jsx)(`div`,{className:`font-medium text-foreground`,children:`Mobile app state is required.`}),(0,V.jsx)(`div`,{children:`Add use.mobile.appState to run mobile tests.`})]}),(0,V.jsxs)(`div`,{className:`space-y-2`,children:[(0,V.jsx)(_,{htmlFor:`use-mobile-app-state`,children:`App state`}),(0,V.jsxs)(s,{value:c,onValueChange:e=>l(e),children:[(0,V.jsx)(i,{id:`use-mobile-app-state`,children:(0,V.jsx)(o,{})}),(0,V.jsxs)(r,{children:[(0,V.jsx)(n,{value:`preserve`,children:`Preserve app data`}),(0,V.jsx)(n,{value:`reset`,children:`Reset app data`})]})]})]}),(0,V.jsx)(N,{size:`sm`,onClick:f,disabled:u,children:u?(0,V.jsx)(E,{className:`size-4 animate-spin`}):`Save Mobile Defaults`})]})]})}function kn({config:e,onConfigChange:t}){let a=(e.services??{}).memory??{},[c,l]=(0,B.useState)(a.enabled??!0),[u,d]=(0,B.useState)(a.provider??`local`),[f,p]=(0,B.useState)(a.dir??`agent-qa-memory`),[m,h]=(0,B.useState)(String(a.minTrust??.3)),[g,v]=(0,B.useState)(String(a.maxInjections??3)),[y,b]=(0,B.useState)(a.curatorEnabled??!0),[x,S]=(0,B.useState)(String(a.curatorLockTimeout??12e4)),[C,w]=(0,B.useState)(String(a.trustConfirmDelta??.05)),[T,ee]=(0,B.useState)(String(a.trustContradictDelta??.1)),[te,O]=(0,B.useState)(a.ablationEnabled??!0),[ne,re]=(0,B.useState)(a.circuitBreakerEnabled??!0),[ie,k]=(0,B.useState)(String(a.circuitBreakerWindowSize??20)),[ae,oe]=(0,B.useState)(String(a.circuitBreakerBaselineSize??3)),[A,se]=(0,B.useState)(String(a.circuitBreakerThreshold??.15)),[j,ce]=(0,B.useState)(!1);async function le(){let e=f.trim();if(!e){F.error(`Memory directory is required`);return}let n=G(m,{label:`Min trust`,min:0,max:1});if(n.error){F.error(n.error);return}let r=G(g,{label:`Max injections`,min:0,integer:!0});if(r.error){F.error(r.error);return}let i=G(x,{label:`Curator lock timeout`,min:1e3,integer:!0});if(i.error){F.error(i.error);return}let a=G(C,{label:`Trust confirm delta`,min:0,max:1});if(a.error){F.error(a.error);return}let o=G(T,{label:`Trust contradict delta`,min:0,max:1});if(o.error){F.error(o.error);return}let s=G(ie,{label:`Circuit breaker window size`,min:5,integer:!0});if(s.error){F.error(s.error);return}let l=G(ae,{label:`Circuit breaker baseline size`,min:2,integer:!0});if(l.error){F.error(l.error);return}let d=G(A,{label:`Circuit breaker threshold`,min:0,max:1});if(d.error){F.error(d.error);return}ce(!0);try{await D({"services.memory":{enabled:c,provider:u,dir:e,minTrust:n.value,maxInjections:r.value,curatorEnabled:y,curatorLockTimeout:i.value,trustConfirmDelta:a.value,trustContradictDelta:o.value,ablationEnabled:te,circuitBreakerEnabled:ne,circuitBreakerWindowSize:s.value,circuitBreakerBaselineSize:l.value,circuitBreakerThreshold:d.value}}),t(),F.success(`Changes saved`)}catch{F.error(`Failed to save configuration`)}finally{ce(!1)}}return(0,V.jsxs)(H,{children:[(0,V.jsxs)(U,{children:[(0,V.jsx)(`h2`,{className:`text-base font-semibold`,children:`Memory`}),(0,V.jsx)(`p`,{className:`mt-1 text-sm text-muted-foreground`,children:`Configure runtime memory injection thresholds, curator behavior, and safety guards.`})]}),(0,V.jsxs)(W,{children:[(0,V.jsxs)(`div`,{className:`grid gap-4 md:grid-cols-2`,children:[(0,V.jsxs)(`div`,{className:`space-y-2`,children:[(0,V.jsx)(_,{htmlFor:`memory-provider`,children:`Provider`}),(0,V.jsxs)(s,{value:u,onValueChange:d,children:[(0,V.jsx)(i,{id:`memory-provider`,children:(0,V.jsx)(o,{})}),(0,V.jsx)(r,{children:(0,V.jsx)(n,{value:`local`,children:`Local`})})]})]}),(0,V.jsxs)(`div`,{className:`space-y-2`,children:[(0,V.jsx)(_,{htmlFor:`memory-dir`,children:`Memory Directory`}),(0,V.jsx)(M,{id:`memory-dir`,placeholder:`agent-qa-memory`,value:f,onChange:e=>p(e.target.value)})]}),(0,V.jsxs)(`div`,{className:`space-y-2`,children:[(0,V.jsx)(_,{htmlFor:`memory-min-trust`,children:`Min Trust`}),(0,V.jsx)(M,{id:`memory-min-trust`,type:`number`,min:`0`,max:`1`,step:`0.01`,value:m,onChange:e=>h(e.target.value)})]}),(0,V.jsxs)(`div`,{className:`space-y-2`,children:[(0,V.jsx)(_,{htmlFor:`memory-max-injections`,children:`Max Injections`}),(0,V.jsx)(M,{id:`memory-max-injections`,type:`number`,min:`0`,value:g,onChange:e=>v(e.target.value)})]}),(0,V.jsxs)(`div`,{className:`space-y-2`,children:[(0,V.jsx)(_,{htmlFor:`memory-curator-lock-timeout`,children:`Curator Lock Timeout (ms)`}),(0,V.jsx)(M,{id:`memory-curator-lock-timeout`,type:`number`,min:`1000`,step:`1000`,value:x,onChange:e=>S(e.target.value)})]}),(0,V.jsxs)(`div`,{className:`space-y-2`,children:[(0,V.jsx)(_,{htmlFor:`memory-confirm-delta`,children:`Trust Confirm Delta`}),(0,V.jsx)(M,{id:`memory-confirm-delta`,type:`number`,min:`0`,max:`1`,step:`0.01`,value:C,onChange:e=>w(e.target.value)})]}),(0,V.jsxs)(`div`,{className:`space-y-2`,children:[(0,V.jsx)(_,{htmlFor:`memory-contradict-delta`,children:`Trust Contradict Delta`}),(0,V.jsx)(M,{id:`memory-contradict-delta`,type:`number`,min:`0`,max:`1`,step:`0.01`,value:T,onChange:e=>ee(e.target.value)})]}),(0,V.jsxs)(`div`,{className:`space-y-2`,children:[(0,V.jsx)(_,{htmlFor:`memory-circuit-window`,children:`Circuit Breaker Window Size`}),(0,V.jsx)(M,{id:`memory-circuit-window`,type:`number`,min:`5`,value:ie,onChange:e=>k(e.target.value)})]}),(0,V.jsxs)(`div`,{className:`space-y-2`,children:[(0,V.jsx)(_,{htmlFor:`memory-circuit-baseline`,children:`Circuit Breaker Baseline Size`}),(0,V.jsx)(M,{id:`memory-circuit-baseline`,type:`number`,min:`2`,value:ae,onChange:e=>oe(e.target.value)})]}),(0,V.jsxs)(`div`,{className:`space-y-2`,children:[(0,V.jsx)(_,{htmlFor:`memory-circuit-threshold`,children:`Circuit Breaker Threshold`}),(0,V.jsx)(M,{id:`memory-circuit-threshold`,type:`number`,min:`0`,max:`1`,step:`0.01`,value:A,onChange:e=>se(e.target.value)})]})]}),(0,V.jsxs)(`div`,{className:`grid gap-4 md:grid-cols-2`,children:[(0,V.jsx)(An,{id:`memory-enabled`,label:`Enabled`,description:`Allow runtime memory retrieval and injection during execution.`,checked:c,onCheckedChange:l}),(0,V.jsx)(An,{id:`memory-curator-enabled`,label:`Curator Enabled`,description:`Allow the curator to confirm, reject, and refine candidate memories.`,checked:y,onCheckedChange:b}),(0,V.jsx)(An,{id:`memory-ablation-enabled`,label:`Ablation Enabled`,description:`Permit ablation passes that measure whether injected memories help or hurt.`,checked:te,onCheckedChange:O}),(0,V.jsx)(An,{id:`memory-circuit-enabled`,label:`Circuit Breaker Enabled`,description:`Temporarily suppress memory injection when observed quality regresses.`,checked:ne,onCheckedChange:re})]}),(0,V.jsx)(N,{size:`sm`,onClick:le,disabled:j,children:j?(0,V.jsx)(E,{className:`size-4 animate-spin`}):`Save Changes`})]})]})}function An({id:e,label:t,description:n,checked:r,onCheckedChange:i}){return(0,V.jsxs)(`div`,{className:`flex items-center justify-between gap-4 border border-border bg-transparent rounded-none px-4 py-3`,children:[(0,V.jsxs)(`div`,{className:`space-y-0.5`,children:[(0,V.jsx)(_,{htmlFor:e,children:t}),(0,V.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:n})]}),(0,V.jsx)(y,{id:e,checked:r,onCheckedChange:i})]})}var jn={platform:`web`,product:``,bundleId:``,appPackage:``,appActivity:``,app:{path:``,browserstack:``},url:``},Mn=v(`dashboard.config.targets.product`);function Nn({config:e,onConfigChange:t}){let a=(0,B.useMemo)(()=>(e.registry??{}).targets??{},[e]),[c,l]=(0,B.useState)(a),[u,p]=(0,B.useState)(null),[m,g]=(0,B.useState)(``),[v,y]=(0,B.useState)(jn),[b,x]=(0,B.useState)(!1),[S,C]=(0,B.useState)(!1);(0,B.useEffect)(()=>{l(a)},[a]);function w(){p(null),g(``),y(jn)}function T(){w(),x(!0)}function ee(){return m.trim()?v.platform===`web`&&!v.url?.trim()?(F.error(`Web targets must include a URL`),!1):!0:(F.error(`Target name is required`),!1)}function te(){if(!ee())return;let e=m.trim(),t={...c};u&&u!==e&&delete t[u];let n=v.app?.path?.trim(),r=v.app?.browserstack?.trim(),i=v.platform!==`web`&&(n||r)?{...n?{path:n}:{},...r?{browserstack:r}:{}}:void 0;t[e]={platform:v.platform,...v.product?.trim()?{product:v.product.trim()}:{},...v.url?.trim()?{url:v.url.trim()}:{},...v.bundleId?.trim()?{bundleId:v.bundleId.trim()}:{},...v.appPackage?.trim()?{appPackage:v.appPackage.trim()}:{},...v.appActivity?.trim()?{appActivity:v.appActivity.trim()}:{},...i?{app:i}:{}},l(t),x(!1),w()}function O(e){let t=c[e];t&&(p(e),g(e),y({platform:t.platform,product:t.product??``,url:t.url??``,bundleId:t.bundleId??``,appPackage:t.appPackage??``,appActivity:t.appActivity??``,app:{path:t.app?.path??``,browserstack:t.app?.browserstack??``}}),x(!0))}async function ne(){C(!0);try{await D({"registry.targets":c}),t(),F.success(`Changes saved`)}catch{F.error(`Failed to save configuration`)}finally{C(!1)}}let re=Object.keys(c).sort();return(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(H,{children:[(0,V.jsxs)(U,{children:[(0,V.jsx)(`h2`,{className:`text-base font-semibold`,children:`Targets`}),(0,V.jsx)(`p`,{className:`mt-1 text-sm text-muted-foreground`,children:`Manage reusable named web and mobile targets referenced elsewhere in agent-qa.`})]}),(0,V.jsxs)(W,{children:[(0,V.jsxs)(`div`,{className:`flex flex-wrap items-start justify-between gap-3 border border-border bg-transparent rounded-none px-4 py-3`,children:[(0,V.jsxs)(`div`,{className:`space-y-1`,children:[(0,V.jsx)(`p`,{className:`text-sm font-medium`,children:`Reusable target entries`}),(0,V.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Use the target editor to define a named URL, bundle ID, or app package once and reference it across tests and suites.`})]}),(0,V.jsxs)(N,{size:`sm`,onClick:T,children:[(0,V.jsx)(f,{className:`size-4`}),`Add Target`]})]}),(0,V.jsx)(`div`,{className:`space-y-3`,children:re.length===0?(0,V.jsx)(`div`,{className:`border border-dashed border-border bg-transparent rounded-none p-6 text-sm text-muted-foreground`,children:`No targets configured. Add a named target to make it selectable across tests and suites.`}):re.map(e=>{let t=c[e];return(0,V.jsx)(`div`,{className:`border border-border bg-transparent rounded-none px-4 py-3`,children:(0,V.jsxs)(`div`,{className:`flex flex-wrap items-start justify-between gap-3`,children:[(0,V.jsxs)(`div`,{className:`space-y-2`,children:[(0,V.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,V.jsx)(`p`,{className:`font-medium`,children:e}),(0,V.jsx)(L,{variant:`secondary`,children:t.platform})]}),(0,V.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:Pn(t)})]}),(0,V.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,V.jsxs)(N,{variant:`outline`,size:`sm`,onClick:()=>O(e),children:[(0,V.jsx)(d,{className:`size-4`}),`Edit`]}),(0,V.jsxs)(N,{variant:`outline`,size:`sm`,onClick:()=>l(t=>{let n={...t};return delete n[e],n}),children:[(0,V.jsx)(h,{className:`size-4`}),`Delete`]})]})]})},e)})}),(0,V.jsx)(N,{size:`sm`,onClick:ne,disabled:S,children:S?(0,V.jsx)(E,{className:`size-4 animate-spin`}):`Save Changes`})]})]}),(0,V.jsx)(P,{open:b,onOpenChange:e=>{x(e),e||w()},children:(0,V.jsxs)(Te,{className:`sm:max-w-xl`,children:[(0,V.jsxs)(_e,{children:[(0,V.jsx)(fe,{children:u?`Edit ${u}`:`Add Target`}),(0,V.jsx)(Ce,{children:`Update the target entry in this section draft. Use Save Changes in the section to persist it to config.`})]}),(0,V.jsxs)(`div`,{className:`grid gap-4 md:grid-cols-2`,children:[(0,V.jsxs)(`div`,{className:`space-y-2`,children:[(0,V.jsx)(_,{htmlFor:`target-name`,children:`Target Name`}),(0,V.jsx)(M,{id:`target-name`,placeholder:`staging-web`,value:m,onChange:e=>g(e.target.value)})]}),(0,V.jsxs)(`div`,{className:`space-y-2`,children:[(0,V.jsx)(_,{htmlFor:`target-platform`,children:`Platform`}),(0,V.jsxs)(s,{value:v.platform,onValueChange:e=>y(t=>({...t,platform:e})),children:[(0,V.jsx)(i,{id:`target-platform`,children:(0,V.jsx)(o,{})}),(0,V.jsxs)(r,{children:[(0,V.jsx)(n,{value:`web`,children:`Web`}),(0,V.jsx)(n,{value:`android`,children:`Android`}),(0,V.jsx)(n,{value:`ios`,children:`iOS`})]})]})]}),(0,V.jsxs)(`div`,{className:`space-y-2 md:col-span-2`,children:[(0,V.jsx)(_,{htmlFor:`target-product`,children:`Product`}),(0,V.jsx)(M,{id:`target-product`,placeholder:Mn,value:v.product??``,onChange:e=>y(t=>({...t,product:e.target.value}))})]}),v.platform===`web`?(0,V.jsxs)(`div`,{className:`space-y-2 md:col-span-2`,children:[(0,V.jsx)(_,{htmlFor:`target-url`,children:`URL`}),(0,V.jsx)(M,{id:`target-url`,placeholder:`https://staging.example.com`,value:v.url??``,onChange:e=>y(t=>({...t,url:e.target.value}))})]}):(0,V.jsxs)(V.Fragment,{children:[v.platform===`ios`?(0,V.jsxs)(`div`,{className:`space-y-2 md:col-span-2`,children:[(0,V.jsx)(_,{htmlFor:`target-bundle-id`,children:`Bundle ID`}),(0,V.jsx)(M,{id:`target-bundle-id`,placeholder:`com.example.ios`,value:v.bundleId??``,onChange:e=>y(t=>({...t,bundleId:e.target.value}))})]}):(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(`div`,{className:`space-y-2`,children:[(0,V.jsx)(_,{htmlFor:`target-app-package`,children:`App Package`}),(0,V.jsx)(M,{id:`target-app-package`,placeholder:`com.example.android`,value:v.appPackage??``,onChange:e=>y(t=>({...t,appPackage:e.target.value}))})]}),(0,V.jsxs)(`div`,{className:`space-y-2`,children:[(0,V.jsx)(_,{htmlFor:`target-app-activity`,children:`App Activity`}),(0,V.jsx)(M,{id:`target-app-activity`,placeholder:`.MainActivity`,value:v.appActivity??``,onChange:e=>y(t=>({...t,appActivity:e.target.value}))})]})]}),(0,V.jsxs)(`div`,{className:`space-y-2 md:col-span-2`,children:[(0,V.jsx)(_,{htmlFor:`target-app-path`,children:`App Path`}),(0,V.jsx)(M,{id:`target-app-path`,placeholder:`apps/wikipedia-alpha.apk`,value:v.app?.path??``,onChange:e=>y(t=>({...t,app:{...t.app??{},path:e.target.value}}))})]}),(0,V.jsxs)(`div`,{className:`space-y-2 md:col-span-2`,children:[(0,V.jsx)(_,{htmlFor:`target-browserstack-app`,children:`BrowserStack App`}),(0,V.jsx)(M,{id:`target-browserstack-app`,placeholder:`bs://... or custom_id`,value:v.app?.browserstack??``,onChange:e=>y(t=>({...t,app:{...t.app??{},browserstack:e.target.value}}))})]})]})]}),(0,V.jsxs)(ye,{children:[(0,V.jsx)(N,{variant:`outline`,onClick:()=>x(!1),children:`Cancel`}),(0,V.jsx)(N,{onClick:te,children:u?`Apply Target Changes`:`Add Target to Section`})]})]})})]})}function Pn(e){let t=Fn(e),n=e=>t?`${e} | App: ${t}`:e;if(e.platform===`web`)return e.url??`Web target without URL`;if(e.platform===`ios`)return n(e.bundleId??`iOS target`);let r=[e.appPackage,e.appActivity].filter(Boolean);return n(r.length>0?r.join(` / `):`Android target`)}function Fn(e){if(e.platform===`web`)return null;let t=[e.app?.path,e.app?.browserstack].filter(Boolean);return t.length>0?t.join(` / `):null}var In=[{value:`local`,label:`Local`},{value:`browserstack`,label:`BrowserStack`}],Ln={android:[`avd`,`serial`,`appPackage`,`appActivity`,`automationName`,`browserName`,`platformVersion`],ios:[`udid`,`bundleId`,`automationName`,`platformVersion`]},Rn={platform:`android`,transport:`local`,match:{}};function zn({config:e,onConfigChange:t}){let a=(0,B.useMemo)(()=>(e.registry??{}).devices??{},[e]),[c,l]=(0,B.useState)(a),[u,p]=(0,B.useState)(null),[g,v]=(0,B.useState)(``),[y,b]=(0,B.useState)(Rn),[x,S]=(0,B.useState)(`{}`),[C,w]=(0,B.useState)(!1),[T,ee]=(0,B.useState)(!1);(0,B.useEffect)(()=>{l(a)},[a]);function te(){p(null),v(``),b(Rn),S(`{}`)}function O(){te(),w(!0)}function ne(){try{let e=JSON.parse(x||`{}`);if(!e||typeof e!=`object`||Array.isArray(e))return F.error(`Device match must be a JSON object`),null;let t=e;if(y.transport===`local`){let e=Ln[y.platform],n=Object.keys(t).filter(t=>!e.includes(t));if(n.length>0)return F.error(`Invalid local match fields: ${n.join(`, `)}`),null}return t}catch{return F.error(`Device match must be valid JSON`),null}}function re(){if(!g.trim()){F.error(`Device name is required`);return}let e=ne();if(!e)return;let t=g.trim(),n={...c};u&&u!==t&&delete n[u],n[t]={platform:y.platform,transport:y.transport,match:e},l(n),w(!1),te()}function ie(e){let t=c[e];t&&(p(e),v(e),b({platform:t.platform,transport:t.transport,match:t.match??{}}),S(JSON.stringify(t.match??{},null,2)),w(!0))}async function k(){ee(!0);try{await D({"registry.devices":c}),t(),F.success(`Changes saved`)}catch{F.error(`Failed to save configuration`)}finally{ee(!1)}}let ae=Object.keys(c).sort();return(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(H,{children:[(0,V.jsxs)(U,{children:[(0,V.jsx)(`h2`,{className:`text-base font-semibold`,children:`Devices`}),(0,V.jsx)(`p`,{className:`mt-1 text-sm text-muted-foreground`,children:`Manage reusable named device profiles and transport matching rules.`})]}),(0,V.jsxs)(W,{children:[(0,V.jsxs)(`div`,{className:`flex flex-wrap items-start justify-between gap-3 border border-border bg-transparent rounded-none px-4 py-3`,children:[(0,V.jsxs)(`div`,{className:`space-y-1`,children:[(0,V.jsx)(`p`,{className:`text-sm font-medium`,children:`Reusable device profiles`}),(0,V.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Store a platform, transport, and match contract once, then reference it from execution defaults or per-test overrides.`})]}),(0,V.jsxs)(N,{size:`sm`,onClick:O,children:[(0,V.jsx)(f,{className:`size-4`}),`Add Device`]})]}),(0,V.jsx)(`div`,{className:`space-y-3`,children:ae.length===0?(0,V.jsx)(`div`,{className:`border border-dashed border-border bg-transparent rounded-none p-6 text-sm text-muted-foreground`,children:`No devices configured. Add a named device profile to make it selectable in runtime defaults.`}):ae.map(e=>{let t=c[e];return(0,V.jsx)(`div`,{className:`border border-border bg-transparent rounded-none px-4 py-3`,children:(0,V.jsxs)(`div`,{className:`flex flex-wrap items-start justify-between gap-3`,children:[(0,V.jsxs)(`div`,{className:`space-y-2`,children:[(0,V.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,V.jsx)(`p`,{className:`font-medium`,children:e}),(0,V.jsx)(L,{variant:`secondary`,children:t.platform}),(0,V.jsx)(L,{variant:`outline`,children:t.transport})]}),(0,V.jsx)(`pre`,{className:`overflow-auto rounded-none bg-muted/40 p-3 text-xs text-muted-foreground`,children:JSON.stringify(t.match??{},null,2)})]}),(0,V.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,V.jsxs)(N,{variant:`outline`,size:`sm`,onClick:()=>ie(e),children:[(0,V.jsx)(d,{className:`size-4`}),`Edit`]}),(0,V.jsxs)(N,{variant:`outline`,size:`sm`,onClick:()=>l(t=>{let n={...t};return delete n[e],n}),children:[(0,V.jsx)(h,{className:`size-4`}),`Delete`]})]})]})},e)})}),(0,V.jsx)(N,{size:`sm`,onClick:k,disabled:T,children:T?(0,V.jsx)(E,{className:`size-4 animate-spin`}):`Save Changes`})]})]}),(0,V.jsx)(P,{open:C,onOpenChange:e=>{w(e),e||te()},children:(0,V.jsxs)(Te,{className:`sm:max-w-xl`,children:[(0,V.jsxs)(_e,{children:[(0,V.jsx)(fe,{children:u?`Edit ${u}`:`Add Device`}),(0,V.jsx)(Ce,{children:`Update the device entry in this section draft. Use Save Changes in the section to persist it to config.`})]}),(0,V.jsxs)(`div`,{className:`grid gap-4 md:grid-cols-2`,children:[(0,V.jsxs)(`div`,{className:`space-y-2`,children:[(0,V.jsx)(_,{htmlFor:`device-name`,children:`Device Name`}),(0,V.jsx)(M,{id:`device-name`,placeholder:`ios-local`,value:g,onChange:e=>v(e.target.value)})]}),(0,V.jsxs)(`div`,{className:`space-y-2`,children:[(0,V.jsx)(_,{htmlFor:`device-platform`,children:`Platform`}),(0,V.jsxs)(s,{value:y.platform,onValueChange:e=>b(t=>({...t,platform:e})),children:[(0,V.jsx)(i,{id:`device-platform`,children:(0,V.jsx)(o,{})}),(0,V.jsxs)(r,{children:[(0,V.jsx)(n,{value:`android`,children:`Android`}),(0,V.jsx)(n,{value:`ios`,children:`iOS`})]})]})]}),(0,V.jsxs)(`div`,{className:`space-y-2 md:col-span-2`,children:[(0,V.jsx)(_,{htmlFor:`device-transport`,children:`Transport`}),(0,V.jsxs)(s,{value:y.transport,onValueChange:e=>b(t=>({...t,transport:e})),children:[(0,V.jsx)(i,{id:`device-transport`,children:(0,V.jsx)(o,{})}),(0,V.jsx)(r,{children:In.map(e=>(0,V.jsx)(n,{value:e.value,children:e.label},e.value))})]})]}),(0,V.jsxs)(`div`,{className:`space-y-2 md:col-span-2`,children:[(0,V.jsx)(_,{htmlFor:`device-match`,children:`Match JSON`}),(0,V.jsx)(m,{id:`device-match`,className:`min-h-[160px] font-mono text-sm`,value:x,onChange:e=>S(e.target.value)}),(0,V.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`Local transport fields for `,y.platform,`:`,` `,(0,V.jsx)(`span`,{className:`font-mono`,children:Ln[y.platform].join(`, `)})]})]})]}),(0,V.jsxs)(ye,{children:[(0,V.jsx)(N,{variant:`outline`,onClick:()=>w(!1),children:`Cancel`}),(0,V.jsx)(N,{onClick:re,children:u?`Apply Device Changes`:`Add Device to Section`})]})]})})]})}function Bn({config:e,onConfigChange:t}){let n=(0,B.useMemo)(()=>(e.registry??{}).providers??{},[e]),[r,i]=(0,B.useState)(n),[a,o]=(0,B.useState)(null),[s,c]=(0,B.useState)(``),[l,u]=(0,B.useState)(`{}`),[p,g]=(0,B.useState)(!1),[v,y]=(0,B.useState)(!1);(0,B.useEffect)(()=>{i(n)},[n]);function b(){o(null),c(``),u(`{}`)}function x(){b(),g(!0)}function S(){try{let e=JSON.parse(l||`{}`);return!e||typeof e!=`object`||Array.isArray(e)?(F.error(`Provider config must be a JSON object`),null):e}catch{return F.error(`Provider config must be valid JSON`),null}}function C(){if(!s.trim()){F.error(`Provider key is required`);return}let e=S();if(!e)return;let t=s.trim(),n={...r};a&&a!==t&&delete n[a],n[t]=e,i(n),g(!1),b()}function w(e){o(e),c(e),u(JSON.stringify(r[e]??{},null,2)),g(!0)}async function T(){y(!0);try{await D({"registry.providers":r}),t(),F.success(`Changes saved`)}catch{F.error(`Failed to save configuration`)}finally{y(!1)}}let ee=Object.keys(r).sort();return(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(H,{children:[(0,V.jsxs)(U,{children:[(0,V.jsx)(`h2`,{className:`text-base font-semibold`,children:`Providers`}),(0,V.jsx)(`p`,{className:`mt-1 text-sm text-muted-foreground`,children:`Store provider-keyed integration config for BrowserStack and other supported remote services.`})]}),(0,V.jsxs)(W,{children:[(0,V.jsxs)(`div`,{className:`space-y-3 border border-border bg-transparent rounded-none px-4 py-3`,children:[(0,V.jsxs)(`div`,{className:`flex flex-wrap items-start justify-between gap-3`,children:[(0,V.jsxs)(`div`,{className:`space-y-1`,children:[(0,V.jsx)(`p`,{className:`text-sm font-medium`,children:`Provider integration registry`}),(0,V.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Use this when a transport or integration expects provider-specific JSON keyed by provider name.`})]}),(0,V.jsxs)(N,{size:`sm`,onClick:x,children:[(0,V.jsx)(f,{className:`size-4`}),`Add Provider`]})]}),(0,V.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`The schema is intentionally open-ended. The dashboard keeps the editor as raw JSON, parses it locally, and the config backend validates the final object again on save.`})]}),(0,V.jsx)(`div`,{className:`space-y-3`,children:ee.length===0?(0,V.jsx)(`div`,{className:`border border-dashed border-border bg-transparent rounded-none p-6 text-sm text-muted-foreground`,children:`No providers configured. Add provider JSON when a remote integration needs named credentials or settings.`}):ee.map(e=>(0,V.jsx)(`div`,{className:`border border-border bg-transparent rounded-none px-4 py-3`,children:(0,V.jsxs)(`div`,{className:`flex flex-wrap items-start justify-between gap-3`,children:[(0,V.jsxs)(`div`,{className:`space-y-2`,children:[(0,V.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,V.jsx)(`p`,{className:`font-medium`,children:e}),(0,V.jsx)(L,{variant:`secondary`,children:`Integration JSON`})]}),(0,V.jsx)(`pre`,{className:`overflow-auto rounded-none bg-muted/40 p-3 text-xs text-muted-foreground`,children:JSON.stringify(r[e]??{},null,2)})]}),(0,V.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,V.jsxs)(N,{variant:`outline`,size:`sm`,onClick:()=>w(e),children:[(0,V.jsx)(d,{className:`size-4`}),`Edit`]}),(0,V.jsxs)(N,{variant:`outline`,size:`sm`,onClick:()=>i(t=>{let n={...t};return delete n[e],n}),children:[(0,V.jsx)(h,{className:`size-4`}),`Delete`]})]})]})},e))}),(0,V.jsx)(N,{size:`sm`,onClick:T,disabled:v,children:v?(0,V.jsx)(E,{className:`size-4 animate-spin`}):`Save Changes`})]})]}),(0,V.jsx)(P,{open:p,onOpenChange:e=>{g(e),e||b()},children:(0,V.jsxs)(Te,{className:`sm:max-w-xl`,children:[(0,V.jsxs)(_e,{children:[(0,V.jsx)(fe,{children:a?`Edit ${a}`:`Add Provider`}),(0,V.jsx)(Ce,{children:`Update the provider entry in this section draft. Use Save Changes in the section to persist it to config.`})]}),(0,V.jsxs)(`div`,{className:`space-y-4`,children:[(0,V.jsxs)(`div`,{className:`space-y-2`,children:[(0,V.jsx)(_,{htmlFor:`provider-key`,children:`Provider Key`}),(0,V.jsx)(M,{id:`provider-key`,placeholder:`browserstack`,value:s,onChange:e=>c(e.target.value)})]}),(0,V.jsxs)(`div`,{className:`space-y-2`,children:[(0,V.jsx)(_,{htmlFor:`provider-json`,children:`Provider JSON`}),(0,V.jsx)(m,{id:`provider-json`,className:`min-h-[200px] font-mono text-sm`,value:l,onChange:e=>u(e.target.value)}),(0,V.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Keep provider payloads honest to the integration contract. This surface does not invent provider-specific forms.`})]})]}),(0,V.jsxs)(ye,{children:[(0,V.jsx)(N,{variant:`outline`,onClick:()=>g(!1),children:`Cancel`}),(0,V.jsx)(N,{onClick:C,children:a?`Apply Provider Changes`:`Add Provider to Section`})]})]})})]})}function Vn(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Hn(e){let t=Vn(e.analytics)?e.analytics:{},n=Vn(t.passRateScope)?t.passRateScope:{},r=Vn(n.attributes)?n.attributes:{},i=[];for(let[e,[t,n]]of Object.entries(r).entries()){if(typeof n==`string`){i.push({id:`existing-${e}`,key:t,mode:`exact`,value:n});continue}Vn(n)&&typeof n.regex==`string`&&i.push({id:`existing-${e}`,key:t,mode:`regex`,value:n.regex})}return i}function Un(e){let t={},n=new Set;for(let r of e){let e=r.key.trim(),i=r.value.trim();if(e.length>0||i.length>0){if(!e)return{error:`Attribute key is required.`};if(!i)return{error:`Value is required for ${e}.`};if(n.has(e))return{error:`Duplicate attribute key: ${e}`};if(r.mode===`regex`){try{new RegExp(i)}catch{return{error:`Invalid regex for ${e}.`}}t[e]={regex:i}}else t[e]=i;n.add(e)}}return{value:{attributes:t}}}function Wn({config:e,onConfigChange:t}){let[a,c]=(0,B.useState)(()=>Hn(e)),[l,u]=(0,B.useState)(!1);function d(e,t){c(n=>n.map(n=>n.id===e?{...n,...t}:n))}function p(){c(e=>[...e,{id:`new-${Date.now()}-${e.length}`,key:``,mode:`exact`,value:``}])}function m(e){c(t=>t.filter(t=>t.id!==e))}async function g(){let e=Un(a);if(`error`in e){F.error(e.error);return}u(!0);try{await D({"analytics.passRateScope":e.value}),t(),F.success(`Configuration saved`)}catch{F.error(`Failed to save configuration`)}finally{u(!1)}}return(0,V.jsxs)(H,{children:[(0,V.jsxs)(U,{children:[(0,V.jsx)(`h2`,{className:`text-base font-semibold`,children:`Pass Rate Scope`}),(0,V.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Choose run attributes for scoped pass rate, flaky score, and test/suite analytics values.`})]}),(0,V.jsxs)(W,{children:[a.length===0?(0,V.jsx)(He,{className:`border-dashed`,children:`No scoped attributes configured. Add at least one attribute to enable scoped analytics.`}):(0,V.jsxs)(`div`,{className:`overflow-hidden border border-border`,children:[(0,V.jsxs)(`div`,{className:`hidden grid-cols-[minmax(160px,1fr)_120px_minmax(160px,1fr)_44px] gap-3 border-b border-border px-3 py-2 text-xs text-muted-foreground md:grid`,children:[(0,V.jsx)(`span`,{children:`Key`}),(0,V.jsx)(`span`,{children:`Match`}),(0,V.jsx)(`span`,{children:`Value`}),(0,V.jsx)(`span`,{})]}),(0,V.jsx)(`div`,{className:`divide-y divide-border`,children:a.map(e=>(0,V.jsxs)(`div`,{className:`grid grid-cols-1 items-end gap-3 px-3 py-3 md:grid-cols-[minmax(160px,1fr)_120px_minmax(160px,1fr)_44px]`,children:[(0,V.jsxs)(`div`,{className:`space-y-2`,children:[(0,V.jsx)(_,{htmlFor:`analytics-scope-key-${e.id}`,className:`sr-only`,children:`Attribute key`}),(0,V.jsx)(M,{id:`analytics-scope-key-${e.id}`,"data-testid":`analytics-scope-key`,value:e.key,placeholder:`git.branch`,onChange:t=>d(e.id,{key:t.target.value})})]}),(0,V.jsxs)(`div`,{className:`space-y-2`,children:[(0,V.jsx)(_,{htmlFor:`analytics-scope-mode-${e.id}`,className:`sr-only`,children:`Attribute match mode`}),(0,V.jsxs)(s,{value:e.mode,onValueChange:t=>d(e.id,{mode:t}),children:[(0,V.jsx)(i,{id:`analytics-scope-mode-${e.id}`,children:(0,V.jsx)(o,{})}),(0,V.jsxs)(r,{children:[(0,V.jsx)(n,{value:`exact`,children:`Exact`}),(0,V.jsx)(n,{value:`regex`,children:`Regex`})]})]})]}),(0,V.jsxs)(`div`,{className:`space-y-2`,children:[(0,V.jsx)(_,{htmlFor:`analytics-scope-value-${e.id}`,className:`sr-only`,children:`Attribute value`}),(0,V.jsx)(M,{id:`analytics-scope-value-${e.id}`,"data-testid":`analytics-scope-value`,value:e.value,placeholder:e.mode===`regex`?`^(main|master)$`:`master`,onChange:t=>d(e.id,{value:t.target.value})})]}),(0,V.jsx)(N,{type:`button`,variant:`ghost`,size:`icon`,onClick:()=>m(e.id),"aria-label":`Remove ${e.key||`attribute`}`,children:(0,V.jsx)(h,{className:`size-4`})})]},e.id))})]}),(0,V.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,V.jsxs)(N,{type:`button`,variant:`outline`,size:`sm`,onClick:p,children:[(0,V.jsx)(f,{className:`size-4`}),`Add Attribute`]}),(0,V.jsx)(N,{type:`button`,size:`sm`,onClick:g,disabled:l,children:l?(0,V.jsx)(E,{className:`size-4 animate-spin`}):`Save Changes`})]})]})]})}var Gn={"workspace:discovery":Cn,"workspace:files":wn,"workspace:agent-rules":xn,"services:dashboard":Sn,"services:cache":lt,"services:logging":ut,"services:recording":ft,"services:accessibility":pt,"services:memory":kn,"registry:llms":at,"registry:targets":Nn,"registry:devices":zn,"registry:providers":Bn,"use:browser":dt,"use:timeouts":st,"use:healing":ct,"use:planner":mt,"use:log-capture":Tn,"use:mobile":On,"use:execution-defaults":En,"analytics:pass-rate-scope":Wn};function Kn(){g(`Config`);let e=Se(),[c]=he(),[l,u]=(0,B.useState)({}),[d,f]=(0,B.useState)(!0),[p,m]=(0,B.useState)(null),[h,_]=(0,B.useState)(!1),v=(0,B.useMemo)(()=>pe(c),[c]),y=(0,B.useMemo)(()=>Oe(v,c),[c,v]),b=`?${y.toString()}`,x=c.toString(),S=x===y.toString(),C=ke(v.bucket).find(e=>e.item===v.item),w=Gn[`${v.bucket}:${v.item}`],T=p?`agent-qa v${p}`:`agent-qa version unavailable`;(0,B.useEffect)(()=>{S||(x.length>0&&_(!0),e(`${ge.config}?${y.toString()}`,{replace:!0}))},[y,e,x,S]);async function E(){try{u((await ne()).config)}catch{F.error(`Failed to load configuration`)}finally{f(!1)}}(0,B.useEffect)(()=>{E()},[]),(0,B.useEffect)(()=>{let e=!0;async function t(){try{let t=(await je()).version.trim();e&&m(t||null)}catch{e&&m(null)}}return t(),()=>{e=!1}},[]);function D(t,n){_(!1);let r=Oe({bucket:t,item:n},c);e(`${ge.config}?${r.toString()}`)}return d?(0,V.jsx)(be,{}):(0,V.jsxs)(`div`,{className:`space-y-6`,children:[(0,V.jsxs)(`div`,{className:`space-y-2`,children:[(0,V.jsx)(`h2`,{className:`text-2xl font-semibold tracking-tight`,children:`Configuration`}),(0,V.jsx)(`p`,{className:`text-muted-foreground`,children:`Manage workspace, services, registry, and runtime defaults.`})]}),(0,V.jsxs)(`div`,{className:`grid gap-0 lg:grid-cols-[minmax(240px,256px)_minmax(0,1fr)] lg:items-start`,children:[(0,V.jsx)(`aside`,{"data-config-rail":!0,className:`hidden border-r border-border pr-4 lg:block`,children:(0,V.jsx)(`div`,{className:`space-y-5 py-1`,children:Ee.map(e=>(0,V.jsx)(qn,{bucket:e,selectedItem:v.item,onSelect:D},e))})}),(0,V.jsxs)(`main`,{"data-config-main":!0,className:`min-w-0 lg:pl-6`,children:[(0,V.jsxs)(`div`,{"data-config-page-root":!0,className:`grid gap-0`,children:[(0,V.jsx)(`section`,{"data-config-mobile-selector":!0,className:`border-b border-border pb-4 lg:hidden`,children:(0,V.jsxs)(`div`,{className:`space-y-2`,children:[(0,V.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Select Setting`}),(0,V.jsxs)(s,{value:`${v.bucket}:${v.item}`,onValueChange:e=>{let[t,n]=e.split(`:`);D(t,n)},children:[(0,V.jsx)(i,{"aria-label":`Select config setting`,children:(0,V.jsx)(o,{})}),(0,V.jsx)(r,{children:Ee.map(e=>(0,V.jsxs)(a,{children:[(0,V.jsx)(t,{children:ke(e)[0]?.bucketLabel??e}),ke(e).map(e=>(0,V.jsx)(n,{value:`${e.bucket}:${e.item}`,children:e.itemLabel},`${e.bucket}:${e.item}`))]},e))})]})]})}),(0,V.jsxs)(`section`,{className:`space-y-4 pt-4 lg:pt-0`,children:[h&&(0,V.jsx)(`div`,{"data-config-invalid-notice":!0,className:`border-b border-border py-3 text-sm text-muted-foreground`,children:(0,V.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,V.jsx)(`span`,{children:`Setting not found.`}),(0,V.jsx)(`span`,{children:`Showing the closest valid config section instead.`}),(0,V.jsx)(L,{variant:`secondary`,className:`font-mono text-[11px]`,children:b})]})}),(0,V.jsxs)(`header`,{className:`space-y-3`,children:[(0,V.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,V.jsx)(L,{variant:`secondary`,children:C.bucketLabel}),(0,V.jsx)(L,{variant:`outline`,children:C.itemLabel})]}),(0,V.jsxs)(`div`,{className:`space-y-1`,children:[(0,V.jsx)(`h3`,{className:`text-xl font-semibold tracking-tight`,children:C.title}),(0,V.jsx)(`p`,{className:`max-w-3xl text-sm text-muted-foreground`,children:C.description})]}),(0,V.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:C.fieldPaths.map(e=>(0,V.jsx)(L,{variant:`outline`,className:`font-mono text-[11px]`,children:e},e))})]})]})]}),(0,V.jsx)(`div`,{className:`mt-4`,children:w?(0,V.jsx)(w,{config:l,onConfigChange:E}):(0,V.jsx)(Jn,{item:C})}),(0,V.jsx)(`p`,{"data-config-app-version":!0,className:`mt-6 border-t border-border pt-3 text-[11px] font-mono text-muted-foreground/70`,children:T})]})]})]})}function qn({bucket:e,selectedItem:t,onSelect:n}){let r=ke(e);return(0,V.jsxs)(`div`,{className:`space-y-2`,children:[(0,V.jsx)(`p`,{className:`px-3 text-xs text-muted-foreground`,children:r[0]?.bucketLabel??e}),(0,V.jsx)(`div`,{className:`space-y-1`,children:r.map(e=>(0,V.jsx)(`button`,{type:`button`,onClick:()=>n(e.bucket,e.item),className:O(`relative w-full border-l-2 border-transparent px-3 py-2 text-left text-sm transition-colors`,e.item===t?`border-primary text-foreground font-medium`:`text-muted-foreground hover:border-border hover:text-foreground`),children:e.itemLabel},`${e.bucket}:${e.item}`))})]})}function Jn({item:e}){return(0,V.jsxs)(He,{className:`space-y-2`,children:[(0,V.jsx)(`p`,{className:`text-base font-medium text-foreground`,children:`Missing config surface`}),(0,V.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`No editor is registered for `,(0,V.jsxs)(`span`,{className:`font-mono`,children:[e.bucket,`/`,e.item]}),`.`]})]})}export{Kn as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Yn as e}from"./index-C3AdCkmj.js";var t=e(`copy`,[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]);export{t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{sr as e}from"./index-C3AdCkmj.js";function t(e){return{id:e.id,name:e.name,status:e.status,duration:e.duration,subActionsData:e.subActionsData,originalStepName:e.originalStepName,variableSnapshot:e.variableSnapshot,screenshotPath:e.screenshotPath,screenshotBeforePath:e.screenshotBeforePath,annotationData:e.annotationData,observation:e.observation,reasoning:e.reasoning,plannedAction:e.plannedAction,action:e.action,error:e.error,confidence:e.confidence,runId:e.runId,stepOrder:e.stepOrder,consoleLogs:e.consoleLogs,networkLogs:e.networkLogs,healingAttempts:e.healingAttempts,accessibilityViolations:e.accessibilityViolations,screenContextBefore:e.screenContextBefore,screenContextAfter:e.screenContextAfter,rawRunId:e.runId,rawStepOrder:e.stepOrder,displayStepOrder:e.stepOrder+1,displayStepTotal:null}}function n(t,n){let r=t.phases.find(e=>e.phase===`observe`),a=t.phases.find(e=>e.phase===`plan`),o=t.phases.find(e=>e.phase===`execute`),s=t.subActionsData?.find(e=>!!(e.observation||e.reasoning||e.plannedAction!=null));return{id:t.id,name:t.instruction,status:e(t.status),duration:t.duration??0,subActionsData:t.subActionsData??i(t.phases),originalStepName:t.originalStepName,variableSnapshot:t.variableSnapshot,screenshotPath:null,screenshotBeforePath:null,annotationData:null,observation:r?.text??s?.observation??null,reasoning:a?.text??s?.reasoning??null,plannedAction:o?.action??s?.plannedAction??null,action:o?.action??s?.plannedAction??null,error:t.error??null,confidence:a?.confidence??s?.confidence??null,runId:null,stepOrder:n,consoleLogs:t.consoleLogs,networkLogs:t.networkLogs,healingAttempts:null,accessibilityViolations:null,screenContextBefore:null,screenContextAfter:null,rawRunId:null,rawStepOrder:n,displayStepOrder:n+1,displayStepTotal:null}}function r(e){let t=e.length;return e.map((e,n)=>({...e,displayStepOrder:n+1,displayStepTotal:t}))}function i(e){if(e.length===0)return null;let t=[],n=[];for(let r of e)(r.phase===`observe`||r.phase===`heal`)&&n.length>0&&(t.push(n),n=[]),n.push(r);return n.length>0&&t.push(n),t.map((e,n)=>{let r=e.find(e=>e.phase===`observe`),i=e.find(e=>e.phase===`plan`),a=e.find(e=>e.phase===`execute`),o=e.find(e=>e.phase===`verify`);return{index:n,observation:r?.text??``,reasoning:i?.text??``,plannedAction:a?.action??null,result:o?o.success?`success`:`failure`:n===t.length-1?`in-progress`:`failure`,error:void 0,screenStateBefore:``,cached:!1,confidence:i?.confidence,verifierReasoning:o?.text,phaseDurations:{observe:r?.duration,plan:i?.duration,execute:a?.duration,verify:o?.duration}}})}export{r as i,t as n,i as r,n as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./chunk-CilyBKbf.js";import{t}from"./dist-
|
|
1
|
+
import{r as e}from"./chunk-CilyBKbf.js";import{t}from"./dist-Bc4r79ls.js";import{r as n}from"./use-page-title-CsUoFrfG.js";import{$n as r,Dn as i,Nn as a,Sn as o,Tn as s,bn as c,mr as l,wn as u,yn as d}from"./index-C3AdCkmj.js";var f=e(l(),1),p=r(),m=`rovingFocusGroup.onEntryFocus`,h={bubbles:!1,cancelable:!0},g=`RovingFocusGroup`,[_,v,y]=t(g),[b,x]=s(g,[y]),[S,C]=b(g),w=f.forwardRef((e,t)=>(0,p.jsx)(_.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,p.jsx)(_.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,p.jsx)(T,{...e,ref:t})})}));w.displayName=g;var T=f.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:r,orientation:s,loop:c=!1,dir:l,currentTabStopId:_,defaultCurrentTabStopId:y,onCurrentTabStopIdChange:b,onEntryFocus:x,preventScrollOnEntryFocus:C=!1,...w}=e,T=f.useRef(null),E=a(t,T),D=n(l),[O,k]=o({prop:_,defaultProp:y??null,onChange:b,caller:g}),[A,M]=f.useState(!1),N=d(x),P=v(r),F=f.useRef(!1),[I,L]=f.useState(0);return f.useEffect(()=>{let e=T.current;if(e)return e.addEventListener(m,N),()=>e.removeEventListener(m,N)},[N]),(0,p.jsx)(S,{scope:r,orientation:s,dir:D,loop:c,currentTabStopId:O,onItemFocus:f.useCallback(e=>k(e),[k]),onItemShiftTab:f.useCallback(()=>M(!0),[]),onFocusableItemAdd:f.useCallback(()=>L(e=>e+1),[]),onFocusableItemRemove:f.useCallback(()=>L(e=>e-1),[]),children:(0,p.jsx)(i.div,{tabIndex:A||I===0?-1:0,"data-orientation":s,...w,ref:E,style:{outline:`none`,...e.style},onMouseDown:u(e.onMouseDown,()=>{F.current=!0}),onFocus:u(e.onFocus,e=>{let t=!F.current;if(e.target===e.currentTarget&&t&&!A){let t=new CustomEvent(m,h);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=P().filter(e=>e.focusable);j([e.find(e=>e.active),e.find(e=>e.id===O),...e].filter(Boolean).map(e=>e.ref.current),C)}}F.current=!1}),onBlur:u(e.onBlur,()=>M(!1))})})}),E=`RovingFocusGroupItem`,D=f.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,focusable:r=!0,active:a=!1,tabStopId:o,children:s,...l}=e,d=c(),m=o||d,h=C(E,n),g=h.currentTabStopId===m,y=v(n),{onFocusableItemAdd:b,onFocusableItemRemove:x,currentTabStopId:S}=h;return f.useEffect(()=>{if(r)return b(),()=>x()},[r,b,x]),(0,p.jsx)(_.ItemSlot,{scope:n,id:m,focusable:r,active:a,children:(0,p.jsx)(i.span,{tabIndex:g?0:-1,"data-orientation":h.orientation,...l,ref:t,onMouseDown:u(e.onMouseDown,e=>{r?h.onItemFocus(m):e.preventDefault()}),onFocus:u(e.onFocus,()=>h.onItemFocus(m)),onKeyDown:u(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){h.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=A(e,h.orientation,h.dir);if(t!==void 0){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=y().filter(e=>e.focusable).map(e=>e.ref.current);if(t===`last`)n.reverse();else if(t===`prev`||t===`next`){t===`prev`&&n.reverse();let r=n.indexOf(e.currentTarget);n=h.loop?M(n,r+1):n.slice(r+1)}setTimeout(()=>j(n))}}),children:typeof s==`function`?s({isCurrentTabStop:g,hasTabStop:S!=null}):s})})});D.displayName=E;var O={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function k(e,t){return t===`rtl`?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}function A(e,t,n){let r=k(e.key,n);if(!(t===`vertical`&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===`horizontal`&&[`ArrowUp`,`ArrowDown`].includes(r)))return O[r]}function j(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function M(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var N=w,P=D;export{N as n,x as r,P as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e}from"./chunk-CilyBKbf.js";import{$n as t,An as n,Nn as r,Tn as i,mr as a}from"./index-C3AdCkmj.js";var o=e(a(),1),s=t();function c(e){let t=e+`CollectionProvider`,[a,c]=i(t),[l,u]=a(t,{collectionRef:{current:null},itemMap:new Map}),d=e=>{let{scope:t,children:n}=e,r=o.useRef(null),i=o.useRef(new Map).current;return(0,s.jsx)(l,{scope:t,itemMap:i,collectionRef:r,children:n})};d.displayName=t;let f=e+`CollectionSlot`,p=n(f),m=o.forwardRef((e,t)=>{let{scope:n,children:i}=e;return(0,s.jsx)(p,{ref:r(t,u(f,n).collectionRef),children:i})});m.displayName=f;let h=e+`CollectionItemSlot`,g=`data-radix-collection-item`,_=n(h),v=o.forwardRef((e,t)=>{let{scope:n,children:i,...a}=e,c=o.useRef(null),l=r(t,c),d=u(h,n);return o.useEffect(()=>(d.itemMap.set(c,{ref:c,...a}),()=>void d.itemMap.delete(c))),(0,s.jsx)(_,{[g]:``,ref:l,children:i})});v.displayName=h;function y(t){let n=u(e+`CollectionConsumer`,t);return o.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${g}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return[{Provider:d,Slot:m,ItemSlot:v},y,c]}export{c as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./chunk-CilyBKbf.js";import{En as t,Qn as n,Wt as r,pr as i}from"./index-Bvtm2F6f.js";var a=e(i(),1),o=n(),s=`Label`,c=a.forwardRef((e,n)=>(0,o.jsx)(t.label,{...e,ref:n,onMouseDown:t=>{t.target.closest(`button, input, select, textarea`)||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));c.displayName=s;var l=c;function u({className:e,...t}){return(0,o.jsx)(l,{"data-slot":`label`,className:r(`flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50`,e),...t})}Object.freeze({status:`aborted`});function d(e,t,n){function r(n,r){if(n._zod||Object.defineProperty(n,`_zod`,{value:{def:r,constr:o,traits:new Set},enumerable:!1}),n._zod.traits.has(e))return;n._zod.traits.add(e),t(n,r);let i=o.prototype,a=Object.keys(i);for(let e=0;e<a.length;e++){let t=a[e];t in n||(n[t]=i[t].bind(n))}}let i=n?.Parent??Object;class a extends i{}Object.defineProperty(a,`name`,{value:e});function o(e){var t;let i=n?.Parent?new a:this;r(i,e),(t=i._zod).deferred??(t.deferred=[]);for(let e of i._zod.deferred)e();return i}return Object.defineProperty(o,`init`,{value:r}),Object.defineProperty(o,Symbol.hasInstance,{value:t=>n?.Parent&&t instanceof n.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(o,`name`,{value:e}),o}var f=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},p={};function m(e){return e&&Object.assign(p,e),p}function ee(e,t){return typeof t==`bigint`?t.toString():t}function te(e){return{get value(){{let t=e();return Object.defineProperty(this,`value`,{value:t}),t}throw Error(`cached value already set`)}}}function h(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}var g=Symbol(`evaluating`);function _(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==g)return r===void 0&&(r=g,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}var v=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function y(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function b(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function x(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function ne(e){return Object.keys(e).filter(t=>e[t]._zod.optin===`optional`&&e[t]._zod.optout===`optional`)}var re={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function S(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function ie(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function C(e){return typeof e==`string`?e:e?.message}function w(e,t,n){let r={...e,path:e.path??[]};return e.message||(r.message=C(e.inst?._zod.def?.error?.(e))??C(t?.error?.(e))??C(n.customError?.(e))??C(n.localeError?.(e))??`Invalid input`),delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}var T=(e,t)=>{e.name=`$ZodError`,Object.defineProperty(e,`_zod`,{value:e._zod,enumerable:!1}),Object.defineProperty(e,`issues`,{value:t,enumerable:!1}),e.message=JSON.stringify(t,ee,2),Object.defineProperty(e,`toString`,{value:()=>e.message,enumerable:!1})},ae=d(`$ZodError`,T),E=d(`$ZodError`,T,{Parent:Error}),oe=(e=>(t,n,r,i)=>{let a=r?Object.assign(r,{async:!1}):{async:!1},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise)throw new f;if(o.issues.length){let t=new(i?.Err??e)(o.issues.map(e=>w(e,a,m())));throw v(t,i?.callee),t}return o.value})(E),se=(e=>async(t,n,r,i)=>{let a=r?Object.assign(r,{async:!0}):{async:!0},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise&&(o=await o),o.issues.length){let t=new(i?.Err??e)(o.issues.map(e=>w(e,a,m())));throw v(t,i?.callee),t}return o.value})(E),D=(e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new f;return a.issues.length?{success:!1,error:new(e??ae)(a.issues.map(e=>w(e,i,m())))}:{success:!0,data:a.value}})(E),O=(e=>async(t,n,r)=>{let i=r?Object.assign(r,{async:!0}):{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(e=>w(e,i,m())))}:{success:!0,data:a.value}})(E),ce=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},le=/^-?\d+$/,ue=/^-?\d+(?:\.\d+)?$/,k=d(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),A={number:`number`,bigint:`bigint`,object:`date`},de=d(`$ZodCheckLessThan`,(e,t)=>{k.init(e,t);let n=A[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.maximum:n.exclusiveMaximum)??1/0;t.value<r&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:`too_big`,maximum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),fe=d(`$ZodCheckGreaterThan`,(e,t)=>{k.init(e,t);let n=A[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.minimum:n.exclusiveMinimum)??-1/0;t.value>r&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),pe=d(`$ZodCheckNumberFormat`,(e,t)=>{k.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=re[t.format];e._zod.onattach.push(e=>{let r=e._zod.bag;r.format=t.format,r.minimum=i,r.maximum=a,n&&(r.pattern=le)}),e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}s<i&&o.issues.push({origin:`number`,input:s,code:`too_small`,minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>a&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),me=d(`$ZodCheckStringFormat`,(e,t)=>{var n,r;k.init(e,t),e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??=new Set,n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),j=d(`$ZodCheckRegex`,(e,t)=>{me.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),M={major:4,minor:3,patch:6},N=d(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=M;let r=[...e._zod.def.checks??[]];e._zod.traits.has(`$ZodCheck`)&&r.unshift(e);for(let t of r)for(let n of t._zod.onattach)n(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(e,t,n)=>{let r=S(e),i;for(let a of t){if(a._zod.def.when){if(!a._zod.def.when(e))continue}else if(r)continue;let t=e.issues.length,o=a._zod.check(e);if(o instanceof Promise&&n?.async===!1)throw new f;if(i||o instanceof Promise)i=(i??Promise.resolve()).then(async()=>{await o,e.issues.length!==t&&(r||=S(e,t))});else{if(e.issues.length===t)continue;r||=S(e,t)}}return i?i.then(()=>e):e},n=(n,i,a)=>{if(S(n))return n.aborted=!0,n;let o=t(i,r,a);if(o instanceof Promise){if(a.async===!1)throw new f;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(i,a)=>{if(a.skipChecks)return e._zod.parse(i,a);if(a.direction===`backward`){let t=e._zod.parse({value:i.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,i,a)):n(t,i,a)}let o=e._zod.parse(i,a);if(o instanceof Promise){if(a.async===!1)throw new f;return o.then(e=>t(e,r,a))}return t(o,r,a)}}_(e,`~standard`,()=>({validate:t=>{try{let n=D(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch{return O(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:`zod`,version:1}))}),P=d(`$ZodString`,(e,t)=>{N.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??ce(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),F=d(`$ZodNumber`,(e,t)=>{N.init(e,t),e._zod.pattern=e._zod.bag.pattern??ue,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i==`number`&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a=typeof i==`number`?Number.isNaN(i)?`NaN`:Number.isFinite(i)?void 0:`Infinity`:void 0;return n.issues.push({expected:`number`,code:`invalid_type`,input:i,inst:e,...a?{received:a}:{}}),n}}),I=d(`$ZodNumberFormat`,(e,t)=>{pe.init(e,t),F.init(e,t)}),L=d(`$ZodNever`,(e,t)=>{N.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)});function R(e,t,n,r,i){if(e.issues.length){if(i&&!(n in r))return;t.issues.push(...ie(n,e.issues))}e.value===void 0?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function z(e){let t=Object.keys(e.shape);for(let n of t)if(!e.shape?.[n]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${n}": expected a Zod schema`);let n=ne(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function he(e,t,n,r,i,a){let o=[],s=i.keySet,c=i.catchall._zod,l=c.def.type,u=c.optout===`optional`;for(let i in t){if(s.has(i))continue;if(l===`never`){o.push(i);continue}let a=c.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>R(e,n,i,t,u))):R(a,n,i,t,u)}return o.length&&n.issues.push({code:`unrecognized_keys`,keys:o,input:t,inst:a}),e.length?Promise.all(e).then(()=>n):n}var ge=d(`$ZodObject`,(e,t)=>{if(N.init(e,t),!Object.getOwnPropertyDescriptor(t,`shape`)?.get){let e=t.shape;Object.defineProperty(t,`shape`,{get:()=>{let n={...e};return Object.defineProperty(t,`shape`,{value:n}),n}})}let n=te(()=>z(t));_(e._zod,`propValues`,()=>{let e=t.shape,n={};for(let t in e){let r=e[t]._zod;if(r.values){n[t]??(n[t]=new Set);for(let e of r.values)n[t].add(e)}}return n});let r=y,i=t.catchall,a;e._zod.parse=(t,o)=>{a??=n.value;let s=t.value;if(!r(s))return t.issues.push({expected:`object`,code:`invalid_type`,input:s,inst:e}),t;t.value={};let c=[],l=a.shape;for(let e of a.keys){let n=l[e],r=n._zod.optout===`optional`,i=n._zod.run({value:s[e],issues:[]},o);i instanceof Promise?c.push(i.then(n=>R(n,t,e,s,r))):R(i,t,e,s,r)}return i?he(c,s,t,o,n.value,e):c.length?Promise.all(c).then(()=>t):t}});function B(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}var _e=d(`$ZodOptional`,(e,t)=>{N.init(e,t),e._zod.optin=`optional`,e._zod.optout=`optional`,_(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),_(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${h(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(t.innerType._zod.optin===`optional`){let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(t=>B(t,e.value)):B(r,e.value)}return e.value===void 0?e:t.innerType._zod.run(e,n)}});function ve(e,t){return new e({type:`string`,...x(t)})}function ye(e,t){return new e({type:`number`,checks:[],...x(t)})}function be(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...x(t)})}function xe(e,t){return new e({type:`never`,...x(t)})}function Se(e,t){return new de({check:`less_than`,...x(t),value:e,inclusive:!0})}function Ce(e,t){return new fe({check:`greater_than`,...x(t),value:e,inclusive:!0})}function we(e,t){return new j({check:`string_format`,format:`regex`,...x(t),pattern:e})}var V=d(`ZodMiniType`,(e,t)=>{if(!e._zod)throw Error(`Uninitialized schema in ZodMiniType.`);N.init(e,t),e.def=t,e.type=t.type,e.parse=(t,n)=>oe(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>D(e,t,n),e.parseAsync=async(t,n)=>se(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>O(e,t,n),e.check=(...n)=>e.clone({...t,checks:[...t.checks??[],...n.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]},{parent:!0}),e.with=e.check,e.clone=(t,n)=>b(e,t,n),e.brand=()=>e,e.register=((t,n)=>(t.add(e,n),e)),e.apply=t=>t(e)}),Te=d(`ZodMiniString`,(e,t)=>{P.init(e,t),V.init(e,t)});function H(e){return ve(Te,e)}var U=d(`ZodMiniNumber`,(e,t)=>{F.init(e,t),V.init(e,t)});function Ee(e){return ye(U,e)}var De=d(`ZodMiniNumberFormat`,(e,t)=>{I.init(e,t),U.init(e,t)});function Oe(e){return be(De,e)}var ke=d(`ZodMiniNever`,(e,t)=>{L.init(e,t),V.init(e,t)});function Ae(e){return xe(ke,e)}var je=d(`ZodMiniObject`,(e,t)=>{ge.init(e,t),V.init(e,t),_(e,`shape`,()=>t.shape)});function W(e,t){return new je({type:`object`,shape:e,catchall:Ae(),...x(t)})}var Me=d(`ZodMiniOptional`,(e,t)=>{_e.init(e,t),V.init(e,t)});function G(e){return new Me({type:`optional`,innerType:e})}function Ne(e,t){let n=new Uint16Array(e);globalThis.crypto.getRandomValues(n);let r=Array(e);for(let i=0;i<e;i++)r[i]=t[n[i]%t.length];return r}var K=H().check(we(/^[a-z0-9]+$/,{error:`prefix must be lowercase alphanumeric`})),q=Ee().check(Oe({error:`words must be an integer`}),Ce(1,{error:`words must be at least 1`}),Se(16,{error:`words must be at most 16`})),Pe=W({prefix:G(K),words:G(q)}),Fe=W({prefix:G(K),words:G(q),namespace:G(H())}),J=Object.freeze(`aal aani aba abama abas abase abb abba abby abe abel abele abet abidi abies able abler ably abort about abouts above abox abu abut aby acca accent accept access accord ace acer aces ach achar ache achen acher aching acid acier acker acle acor acre act acting action active actor acts actual acute ada adai adam adapt adar adat aday adays add adda added adder addle adds addy ade adet adin adjust admin ado adult advert ady adz aes afar affa affirm aft after aga again agal agama agar agate age aged agen agena agency agenda agent ager ages agger aghan aging agio agnes ago agog agon agonal agra agre agree agua ague agy aha ahead ahir aho ahu aias aid ail ailing ails aim aint air aira aire airs airt airy ait ajar ajari aka akal akala akan ake akey akia akin akka ako akov aku ala alada alaki alala alan aland alar alarm alary alas alb album ale alea alee alem alen alert ales alette alex alf alias alice alida alien align alin aline alist alit alite alive alk all allah allan alle allen aller allow ally alma almost alo alogy alone along alp alpha also alt altar alter altern alto alur always aly alya ama amah amain amang amani amar amara amarin amazon amba ambar amber amble ambo ame amen ament ami amia amic amid amide amil amin amine amini amir amma amman ammer ammo ammu among amor amos amount amp ample amt amy ana anam anan anana anas anat anay anchor and anda ande andi andre andy anele anes angel angelo anger angers angka angle angled angler angles ango ani animal anime anion anis anker ann anna anne annet annie annual anoa anon ansa anser ansu answer ant anta antal antar antara ante antes anthem anti antic anton ants antu any apa apache apar apart apatan ape aper aping apis apollo aport appear append apple apply apps apse apt apus ara arab arad arar arc arca arch arched arches archie archy ardu are area ared arena argas argent argo argon aria arian aries ariot arius ark arks arm armed arming armor arms army arn arna arne arni aro around arrant arras array arris arrow arry art artar artha artist arts arty aru arum ary aryl asa asana ascii ascus ase asem ash asha ashen asher ashes ashy asian aside ask askar asks asp aspect asper assert asset assets assi assign assis assist ast asta aster astern astian ata atap ate aten ates athing ati atik atis atlas atma atom atomic atoms atria atta attach attack attar atter attern attery audio audit auge augh aught auh auk aum aus author auto autos ava avail aval avar ave avens aver avera averse avery aves avian avid avis avo avoid awa await awake awan award aware awat away awd awin awl awn awner awning axe axed axes axis axon ayah aye ayin ayu azine azo azole azon azure baa baar bab babel baby bac bach back backs backup bad badge bae bag bags bah bait baka bal ball balls bam ban banana band bands bane bang bank banks banner bar bara bard bare barer barn barra bars bart barth baru bas base based bases bash basic basis basket bass bat batch bate bath batis battle baud bay bea beam bean beans bear beat beats beaut beck bed beds bee beek been beer before beg begin behind being bel belief bell bella bells below belt ben bench bend bene beni ber bere berg berger beri bern berry bert bes best bet beta beth bets better bhar bias bib bid bien bier big bike bill bin binary bind binder bine bing bins bios biotic bird birds birth bis bishop bit bite bito biz black blad blade blah blank blas blast bled blend blick blind blink blo blob bloc block blood blower blue blur boa board boat bob bod boden body bog bola bold bole boll bolo bolt bom bomb bon bond bone bones boni bonus boo book bool boom boost boot boots bor bord border borg born borne boro borrow bos boss bot both bottom bounce bound bourg bout bouw bow bower boxes boxing boy bra brace brain brains bran branch brand bread break bred breed brew brick bridge brief brig bright bring brit broken broker brook brot brown browse brush bubble buck bucket bud buddy budget buds buff buffer bug build built bulk bull bullet bum bun bund bundle bung bur bureau burg burn burst bury bus buster busy but button buy buyer buzz cab cache cad cade cake cakes cal call caller cam came camel camera camp campo can cancel cand canner cannot canon cant canvas cap cape car cara carbon card care career caret cargo carry cart case cash casino cass cast caster cat catch cate cation caught cause cede cee ceil cel cell cement cent center cep ceptor ceral ceria cern cess cha chaft chai chain chair chal chalk champ chance chang change chant chap char charge chart chat chaus che cheap check chee chef chen cheng chet chi chia chid chief chien chil child chin china chine ching chip chips chlor cho choice chol choose chosen christ chrome chunk church cid cine cion cipher circle cit cite city civil claim clam clang clare class clave clean clear cled click client cline cling clinic clip clips clipse cloak clock clone close closed cloth cloud club coach coal coat cobra cod code coder coe coffee cohol coil coin col cola cold cole coli coll colon color colors column coma comb combat come comes comic coming comma commit common con cond cone cones conn conte conto contra cony cook cool coop cop cope copy cor cord corder core corn corner corp cos cost cot could count county coupon cours course court cover cow cox craft cran cratch crate crawl cream crease create credit cree creen crest crete crew crib crime cris critic cro crop cross crow crumb cry crypt cub cube cue cult cup cur curl curr curse cursor curve custom cut cute cyan cycle dab dad dade dae daemon dag daily dain dak dal dale dam damage dan dance dang danger dao dap dar dark dart das dash data date dater dating datum day days dead deal dealer death deb decess deck decode dee deep define deg degree del delay dele delete delta deme den dene dense dent deny depart depend deploy depth dere derive dern design desk dess detach detail detect dev device dew dha dial dib dice did diet dig digest digit dim din ding dip dire direct dirty dis disc dish disk dit dita ditch div divide dob doc dock docker doctor dod does dog dogs doing dol dom domain don done dont doom door dop dor dos dose dot double dow down draft drag dragon dram draw drawer dream dress drink drive driver drop dry dual dub duck duct ductor duit dum dummy dump dup during dust dux each ean ear earing early earn earth ease east easy eat ebb eben echo eddy eden edge edict edit edith editor edo educt eel eer effect eft egg egger ego either eke eker eking eland elate elb eld elder elding elect elf eli elia elian elite elk ell ella elle ellen elm elod elon elope els else elt elves embar embed ember eme emit emm emma empt empty emu enable encode end ended ender endere ending endue enemy energy engine enos ens ense ensky ensure ental enter entity entry enzyme epoch equal equip era erade eral erase erd ere erg eria erian erie ermine erne eros err erring error ers erse escape escort ess essay essed essie estado estate esteem ester estre eta etch ether ethyl etna etta ettle eva eve even event ever every evil ewer exact exam excel except exist exit expand expect expert expire expiry export extend extent extern extra eye eyen eyer eyey eyn fabric face facet fact factor fad fade fail fair faith fake faker fall fallen false fam family fan fang fant far farm fass fast fat fatal father fatter fault favor fear feat fed fee feed feel feer fei fell fels felt female fen fern fest fet fetch few fib fiber fico fid field fifo fig fight figure file fill filled film filter fin final find finder fine finger finish finite finity fir fire firm first fish fit five fix fixed flag flake flare flash flat fleet flex flight flip flix flo float floor flora flow flower flu fluid flush flux fly foam focus fod fog foil fold folder folie folio folk follow fon fond fono font foo food foot footer for fora force forced forcer ford forest forge forget forgot fork form formal format forme formed former formin fort forth forum fot found fox fra fram frame fred free freeze fresh fried friend frig frist fro frog from front fruit fuel full fully fum fun fund funk fusc fusion future gab gabe gable gad gage gain gal gam game gaming gamma gan gang gant gaon gap gar gara garden gare garten gary gas gast gat gata gate gau gave gaz gear ged gee gel geld gelt gem gen gender gene genic genre gens gent geo ger gerald gers ges gest get geta getter gey gez ghan ghost gid gie gif gift gig gil gin ging gio girl gist git give given giver giving glass glib global glyph gnu goal god going gol gold golly gon gone gong goo good goods gor gos got gra grab grad grade graded grader grain gram grand grant graph grass grat gratis grave gray great gree green greg grey grid griff grim gris gross ground group grow grown growth grunt guan guard gue guess guest guide guild guise gul gulp gum gun guna gur guru gus gust gut gym gyro habit hack had haft hag hah hail hain hair hak hal hala hale half hall halo halt halter halve ham hammer han hand handle hanger hao hap happy hard harm hart hash hasta hat hau hausen have haven haw hawk hawm hay head headed header heal health heap hear heart heat heater heavy heck heder heed heer hehe hei height hein hele hello helm helmet help helper hem heme hen hend hep her hern hero hers het hew hex hey hia hic hid hidden hide high higher hill him hin hind hing hint hip hire hiro his hist hit hler hob hobo hod hog hoi hold holder hole holm holt holy home hon hone hong hood hoof hook hoot hop hope hopper hora horn horse hose host hot hotel hound hour house hoven hover how hub hud hug hui huk hum huma human hun hung hunt hunter hurst hurt hut hwa hyp hyper ian iao iba iban ibid ibo ice iced ich icho icing icon icy ida ide idea ideal idean ides idle idler ido idol ife iffy ignite ignore ihi ijo ikat ike ikey ila ilia ilian ilium ilk ilka ill illy ilot ima image imam imber imer imi imine immi immit immune imp impact impi import imu inca inch income ind indaba indan inde indent index india indic indra indy ineri inermi inez infect infer inform infra ing inga inger ingle inia inion initis inject ink inken inker inkle inks inky inn inner inning ino inoma input insert inside insula intend intent inter intern into invent invert invest invite invoke ion ione ioni ionic ipid ira iran irani ire iris irish irk irma iron ism iso issue issuer ist istle ita itala itali italic itch item iten iter ither ito its itys itza iva ivan ivin ivy iwa iyo izar izard izzard jab jack jade jam jama jaman jan jar jara jat jati java jaw jay jed jem jest jet jete jim jin jing job joch joe john join joint joker jon jong joni jos jours joy juan jud judge jug juice juju jump jun junk junto jur jury just jut kai kaj kan kana kang kari karma kat kate kay kea ked kee keen keep keeper keet kele ken kend kenn kent kep ker kern kernel ket keta key kick kid kids kil killer kim kin kina kind king kino kip kish kiss kit kite kitty knife know known koa kob koch kol kon kona kop kor kos kou kra kraft kreis kua kung lab label labor lac lace lack lad lade laden lady lag lagen lager lai laid lain lak lake lalo lam lama lambda lament lamp lan lana land lander lane lant lap lar large lari las laser lash lass last lat late lated laten later latest latex latin lation laugh launch lava law lay layer layout lazy lea lead leader leaf league lean lear learn lease least leave lech leck lector led leda lede leden ledge ledged ledger lee leed leep leer lees leet left leg legacy legal legate legend leger leges lei leigh lek lemma len lend lene length lens lent leo ler les less lesson lest let lete lett letter lev levant level lever lew lex lexia ley liable lias lice lich lichen licit lick lid lide lie lied lief lier lif life lift light ligne like lim lime limit lin line linear lined linen liner ling linge linger linha linie lining link linked links linky lint lion lip lis lish list listed listen lit lite liter little liv live living liz loa load loaded loader loan lob lobal local locale loch lock locked locker lod lof log loge logged logger logic login logo logos loin loir long loo lood look lookup loom loon loop loot lop lope lord lose loss lost lot lots lotte lou love lover low lower lox loyd luc luck lug lum lunes lung lur lush lut lux lying lys lysis mac mack macro mad made mag mage magic mah mail mailer main maine maint major make maker making mal malar mall mallow mam man mana manage mand mande manent manes mani mania mann mano mans manse mant manual manuel many mao map mapper mar march mare margin marine mark marked marker market markup mars mart marvin mary mas masa mask masked mass massa mast master mat match mate mater math matrix matter max may maya maybe maze meal mean mede media median medio medium meet meg mein mel meld mele melon mem member memo memory men meng ment mental mentor menu mer mere merge merk mero mes mesa mese mesh mess messe messer mester met meta metal mete meteor meter method metic metric mica mico micro mid middle mien mig might mil mile milk mill mime min mina mind mine miner ming mino minor mint minus minute mir mirror mise miss mist mite mitt mix mixed mob mobile mock mod modal mode model modern modify module mog moil moire moment mon money mong mongo mono mont month monton moo moon moor mooth mor more morgen mort most mostly mot mother motion motor mount mouse mouth move movie moving mrs much mud mult mum mun mund mung munity mus museum music must mute mux naa naam nab nable nach nae nag naio nais nak nam nama name nan nance nancy nant nap nar nard nast nat nation native nature nay nea neal near neath neb neck ned nee need needle needs neet nef nei nell nelly neo ness nest nesty net nete never new news next nias nice nici nick nid night nil nim nine ning nisse nit nod node nog noise noma nome non nonce none noop nor norm normal north nose nostic not note notice notify nou noun nous nova novo now nth nub nul null number numero nun nut nye oak oban obe obi object occur och ock ocracy ocular oda odal odd ode odel odin odium odor ods odz oes off offer office offset oft often ogle ohia oil oint oka okee oki okia okra old olden older ole oleg olid olio olive olla olm ology olor olson oman omar omber omega omen omer omina omit ona once one oner onium only ons ontal onto onus onym onza oodles oons oord opal opaque ope open opera opsy opt optic option opus ora oracle orage orang orange orb orbit orc orca order ordu ore orf organ orgia orias orient origin orna orris ort ory osc ose ossal osse ostic otate other otic otis oto otto otus ouch ouf ough ought ounce ounds ours oust out outed outen outer outing output ova oval oven over ovine ovis owe ower owing owl owler own owner oxide oxy oxygen oyer paar pac pace paced pack packer packet pad page pager pagina pail pain paint pair paired pais pal pam pan pand panel pang panic pant pants pap paper paque par para param parate parcel pard paren parent parer pari paring park parse parser part party pass passen past paste pat patch path pathy pau pause paw pawn pay payer pea peace peak peaker peat ped peed peer peg pele pell pen pend pent people pep per peri period perk perm permit person pert perty pes peso pet phase phasis phi phil pho phon phone phonic phony phot photo phrase pia pic pick picked picker pickle pie pier pig pik pile pill pillar pilot pin pine ping pink pip pipe pir piro pit pitch pivot pix pizza place placer plain plan planet plant plash plass plat plate play player please pled plex pliant plied plier pliers plies plot ploy pluck plug plural plus ply pod poi point poke pol polar pole policy polis poly pom pon pond ponder pone ponent pong pont pony pool poor pop poral port porta portal ported porter porto pose poser posing posit poss post postal posted poster pot pow power pox pray prefer prefix prep preset press prest pretty price priced prim prima prime primer print prior pro prob probe prod prof profit prog prompt proof prop proper props prote proto prove proved prow proxy pseudo psi pst psych puan pub public pul pull pulse pump pun punt pur pure purple puru push put python qua quad quake quan quant quare quart quat queen query quest quet queue quick quid quiet quila quin quina quip quire quis quit quite quiz quo quot quota quote raad rab rabbit race rach rack rad rada radio radius raff raft rag rage rah raid rail rain rais raise raised raiser raj rale ram rama rame ran rana rance rand random rang range rank rant rap rapid rapper rare ras rase rash rat rate rated rather rating ratio ration raul raw rax ray rea reach react read reader ready reak real really realm ream rear reason reb recent recipe reck record rect red redd rede redo reduce redux ree reef reek reem reen rees reet ref refer refix refund reg region reh rein reis reit reject rel reland relay reload remain reman remark remote remove renal rename rend render renew rent rep repair repeat repen reply report resent reset resh resize resp rest result resume ret retain retan retch retry return reuse rev reve revet review reward rex rhein rho ria rial rib ric rice rich richt rick rid ridden ride ridge rie rier riff rift rig right rik rim rine ring ringer rink rio riot rip rise risk rist rit rita rite rive river rix roach road rob robe robot roc rock rocket rod rodd roe rog roger roi roit rok roke roker role rolled roller rolley roman rome ron rone rong roof rook room roon root rope ropy rosa rose ross rot rota rotate rote rottle roud rough round roup route router rove row rowing rox roy rub ruby ruck rud ruff rug rule rum run runner rupa rus rush rust rut ruta sab sad safe sage said sak sal salary sale salt sam same sample san sand sans sap sar sass sat save saved saving say scala scalar scale scaled scan scape scar scene schema scheme school schule scient scious scope score screen scribe script scroll sea seal sealed search season seat sec second secret sect sector secure seed seeing seek seen seer seg segue seid seit sele select self seller semble semi sen send sender sense sensor sept ser sera seri serial series sero sert serve server servo sess set sett setter setup seven sey sha shade shader shadow shake shall shan shape share sharp shaw shay she shed sheet shell shen sheng shi shield shift shim shin shine ship shire shirt shiv sho shock shoe shop shore short shot should show shown shu sia sib sic sid side sie sig sigma sign signal sil silent silver sim simple sin since sing single sink sip sir sis sit six size sizes skal skat sker ski skill skim skin skip sky sla slam slash sled sleep slice slick slide slider slot slow slug small smart smarty smith smooth snake snap snow soap sob soc social sock socket soe soever soft soil sol solar sold sole solid solo solute solve solver some son song sons soon sorry sort sorted sou sound source south soy spa space spam span spann spar spark spart spawn spec sped speech speed spell spent sphere spiel spill spin spire spired splice split spoken spor sport sports spot spread spring sprite spur spy square ssi stable stack staff stag stage stake stall stamp stan stance stand star start stash state static status staw stay stead steady steam steel steen stein stell stem sten step stern stick sticks sticky stid still stim stime sting stock stocks stod stof stoff stone stood stop store storm story stra stract strain strand strap stre stream street streng stress strict stride strike string strip stripe strix stroke strom strong stu stub stud studio study stuff stum sty style sub submit subset such suffix suite summer sup super sur sure surf survey sus swap sweet swift swiper switch symbol sync syntax system taa tab tabla table tables tablet tach tag tai tail tain taj take taken taking tal talk tam tan tank tap tar tara tare target task taste tat tau tax tay tea teach team tear tec tech ted tee teen teg teil tele tell tema temp temper tempo tempt ten tenant tensor tent tera teras teri term termin tern terna ternal terne test teste tested tester text tez tha thai than thane thank thanks that the their them theme then these theta they thin thing think third this tho thon thorn those though thouse thread three throw thumb thus thy tic tick ticker ticket tid tie tier tig tight til tile tim time timer times tin ting tiny tip title titre toa toast tod today toe tog toggle toi token tol tom ton tone tong too tool toon top topia topic tops tor torch tot total tou touch tour tout tower town tox toy tra trace track tract trade trag trail train trait tram tran trap trash travel tray tree trend trent tri trial trica trim trin trip tron truck true trust truth try trying tube tum tun tur turn turned tweet twig two type uang ubi uca udal udder udi udo uds ugh uji uke ula ule ull ulla uller ulling ultima ultimo ulu umber umble umbo ume ump umph umu una unable unal unami unbind unca uncate unci uncia unde unden under undo undy unie union unique unit unity unken unless unlink unlock unsafe unset untar until unto unused unwrap unze update upload upo upon upper ura ural uran urate urban urd urde urdu ure urent urf urge urgent urger uri uria urlar urn urna urnal urning uro urs ursa ursal ursus uru urus usable usage usar use used user ush usher ussels ust uster usual usun uta utas utch ute utile utter utu utum uva vai vain vair val vale vali valid vall valor value valuer van vang vara vare vari varna vary vas vast vat vault veal vector veda vedic vee veen veer vei veil vela vell velo velte vend vendor vent venter venue venus vera verb verd verify verity vern versal verse versed verst vert vertex very vest vester vet via vic vice video vie vier view viewer vill villa ville vim vina vince vine vino viol vip vira viral viron virus vis visa vise vision visit visor vista visual vita vive vod voet vog voice void vol vole volent volt volume vote vum waar wab wad wadi wag wagon wah wain wait waka wake wale wali walk walker wall wallet wan wand wander wandle wane wang want wany wap war ward warden ware warf warm warn warp wart was wash washed washer wat watch water wave wax way wayne ways weak wealth weapon wear web wed wee weekly ween weep weet wei weka well welt wem wen wend went`.split(` `));function Y(e,t){return e?`${e}_${t}`:t}async function Ie(e,t){if(!e||typeof e!=`string`)throw Error(`input must be a non-empty string`);let n=Fe.parse(t??{}),r=n.words??8;if(!globalThis.crypto?.subtle)throw Error(`idAgent.from() requires Web Crypto API (crypto.subtle). Use HTTPS in browsers.`);let i=new TextEncoder,a=i.encode(n.namespace??`id-agent`),o=await globalThis.crypto.subtle.importKey(`raw`,a,{name:`HMAC`,hash:`SHA-256`},!1,[`sign`]),s=await globalThis.crypto.subtle.sign(`HMAC`,o,i.encode(e)),c=new DataView(s),l=Array(r);for(let e=0;e<r;e++)l[e]=J[c.getUint16(e*2)%4096];return Y(n.prefix,l.join(`-`))}function Le(){let e=(e=>{let t=Pe.parse(e??{}),n=Ne(t.words??8,J);return Y(t.prefix,n.join(`-`))});return e.from=(e,t)=>Ie(e,t),e}var Re=Le();Math.log2(J.length),new Set(J);var X={test:`t`,suite:`s`,hook:`h`,observation:`obs`,run:`r`};function Z(e){return Re({prefix:e,words:10})}function Q(){return Z(X.test)}function ze(){return Z(X.suite)}function Be(){return Z(X.hook)}var $=[{name:`Linear`,slug:`linear`},{name:`Vercel`,slug:`vercel`},{name:`Notion`,slug:`notion`},{name:`Stripe`,slug:`stripe`},{name:`GitHub`,slug:`github`},{name:`Slack`,slug:`slack`},{name:`Figma`,slug:`figma`},{name:`Shopify`,slug:`shopify`},{name:`Datadog`,slug:`datadog`},{name:`Supabase`,slug:`supabase`}];$.map(e=>e.name),$.map(e=>e.slug);function Ve(e){let t=String(e),n=0;for(let e=0;e<t.length;e+=1)n=n*31+t.charCodeAt(e)>>>0;return n}function He(e){return $[Ve(e)%$.length]}function Ue(e){return He(e).slug}export{u as a,Ue as i,ze as n,Q as r,Be as t};
|
|
1
|
+
import{r as e}from"./chunk-CilyBKbf.js";import{$n as t,Dn as n,Gt as r,mr as i}from"./index-C3AdCkmj.js";var a=e(i(),1),o=t(),s=`Label`,c=a.forwardRef((e,t)=>(0,o.jsx)(n.label,{...e,ref:t,onMouseDown:t=>{t.target.closest(`button, input, select, textarea`)||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));c.displayName=s;var l=c;function u({className:e,...t}){return(0,o.jsx)(l,{"data-slot":`label`,className:r(`flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50`,e),...t})}Object.freeze({status:`aborted`});function d(e,t,n){function r(n,r){if(n._zod||Object.defineProperty(n,`_zod`,{value:{def:r,constr:o,traits:new Set},enumerable:!1}),n._zod.traits.has(e))return;n._zod.traits.add(e),t(n,r);let i=o.prototype,a=Object.keys(i);for(let e=0;e<a.length;e++){let t=a[e];t in n||(n[t]=i[t].bind(n))}}let i=n?.Parent??Object;class a extends i{}Object.defineProperty(a,`name`,{value:e});function o(e){var t;let i=n?.Parent?new a:this;r(i,e),(t=i._zod).deferred??(t.deferred=[]);for(let e of i._zod.deferred)e();return i}return Object.defineProperty(o,`init`,{value:r}),Object.defineProperty(o,Symbol.hasInstance,{value:t=>n?.Parent&&t instanceof n.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(o,`name`,{value:e}),o}var f=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},p={};function m(e){return e&&Object.assign(p,e),p}function ee(e,t){return typeof t==`bigint`?t.toString():t}function te(e){return{get value(){{let t=e();return Object.defineProperty(this,`value`,{value:t}),t}throw Error(`cached value already set`)}}}function h(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}var g=Symbol(`evaluating`);function _(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==g)return r===void 0&&(r=g,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}var v=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function y(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function b(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function x(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function ne(e){return Object.keys(e).filter(t=>e[t]._zod.optin===`optional`&&e[t]._zod.optout===`optional`)}var re={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function S(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function ie(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function C(e){return typeof e==`string`?e:e?.message}function w(e,t,n){let r={...e,path:e.path??[]};return e.message||(r.message=C(e.inst?._zod.def?.error?.(e))??C(t?.error?.(e))??C(n.customError?.(e))??C(n.localeError?.(e))??`Invalid input`),delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}var T=(e,t)=>{e.name=`$ZodError`,Object.defineProperty(e,`_zod`,{value:e._zod,enumerable:!1}),Object.defineProperty(e,`issues`,{value:t,enumerable:!1}),e.message=JSON.stringify(t,ee,2),Object.defineProperty(e,`toString`,{value:()=>e.message,enumerable:!1})},ae=d(`$ZodError`,T),E=d(`$ZodError`,T,{Parent:Error}),oe=(e=>(t,n,r,i)=>{let a=r?Object.assign(r,{async:!1}):{async:!1},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise)throw new f;if(o.issues.length){let t=new(i?.Err??e)(o.issues.map(e=>w(e,a,m())));throw v(t,i?.callee),t}return o.value})(E),se=(e=>async(t,n,r,i)=>{let a=r?Object.assign(r,{async:!0}):{async:!0},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise&&(o=await o),o.issues.length){let t=new(i?.Err??e)(o.issues.map(e=>w(e,a,m())));throw v(t,i?.callee),t}return o.value})(E),D=(e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new f;return a.issues.length?{success:!1,error:new(e??ae)(a.issues.map(e=>w(e,i,m())))}:{success:!0,data:a.value}})(E),O=(e=>async(t,n,r)=>{let i=r?Object.assign(r,{async:!0}):{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(e=>w(e,i,m())))}:{success:!0,data:a.value}})(E),ce=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},le=/^-?\d+$/,ue=/^-?\d+(?:\.\d+)?$/,k=d(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),A={number:`number`,bigint:`bigint`,object:`date`},de=d(`$ZodCheckLessThan`,(e,t)=>{k.init(e,t);let n=A[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.maximum:n.exclusiveMaximum)??1/0;t.value<r&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:`too_big`,maximum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),fe=d(`$ZodCheckGreaterThan`,(e,t)=>{k.init(e,t);let n=A[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.minimum:n.exclusiveMinimum)??-1/0;t.value>r&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),pe=d(`$ZodCheckNumberFormat`,(e,t)=>{k.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=re[t.format];e._zod.onattach.push(e=>{let r=e._zod.bag;r.format=t.format,r.minimum=i,r.maximum=a,n&&(r.pattern=le)}),e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}s<i&&o.issues.push({origin:`number`,input:s,code:`too_small`,minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>a&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),me=d(`$ZodCheckStringFormat`,(e,t)=>{var n,r;k.init(e,t),e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??=new Set,n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),j=d(`$ZodCheckRegex`,(e,t)=>{me.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),M={major:4,minor:3,patch:6},N=d(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=M;let r=[...e._zod.def.checks??[]];e._zod.traits.has(`$ZodCheck`)&&r.unshift(e);for(let t of r)for(let n of t._zod.onattach)n(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(e,t,n)=>{let r=S(e),i;for(let a of t){if(a._zod.def.when){if(!a._zod.def.when(e))continue}else if(r)continue;let t=e.issues.length,o=a._zod.check(e);if(o instanceof Promise&&n?.async===!1)throw new f;if(i||o instanceof Promise)i=(i??Promise.resolve()).then(async()=>{await o,e.issues.length!==t&&(r||=S(e,t))});else{if(e.issues.length===t)continue;r||=S(e,t)}}return i?i.then(()=>e):e},n=(n,i,a)=>{if(S(n))return n.aborted=!0,n;let o=t(i,r,a);if(o instanceof Promise){if(a.async===!1)throw new f;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(i,a)=>{if(a.skipChecks)return e._zod.parse(i,a);if(a.direction===`backward`){let t=e._zod.parse({value:i.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,i,a)):n(t,i,a)}let o=e._zod.parse(i,a);if(o instanceof Promise){if(a.async===!1)throw new f;return o.then(e=>t(e,r,a))}return t(o,r,a)}}_(e,`~standard`,()=>({validate:t=>{try{let n=D(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch{return O(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:`zod`,version:1}))}),P=d(`$ZodString`,(e,t)=>{N.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??ce(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),F=d(`$ZodNumber`,(e,t)=>{N.init(e,t),e._zod.pattern=e._zod.bag.pattern??ue,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i==`number`&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a=typeof i==`number`?Number.isNaN(i)?`NaN`:Number.isFinite(i)?void 0:`Infinity`:void 0;return n.issues.push({expected:`number`,code:`invalid_type`,input:i,inst:e,...a?{received:a}:{}}),n}}),I=d(`$ZodNumberFormat`,(e,t)=>{pe.init(e,t),F.init(e,t)}),L=d(`$ZodNever`,(e,t)=>{N.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)});function R(e,t,n,r,i){if(e.issues.length){if(i&&!(n in r))return;t.issues.push(...ie(n,e.issues))}e.value===void 0?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function z(e){let t=Object.keys(e.shape);for(let n of t)if(!e.shape?.[n]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${n}": expected a Zod schema`);let n=ne(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function he(e,t,n,r,i,a){let o=[],s=i.keySet,c=i.catchall._zod,l=c.def.type,u=c.optout===`optional`;for(let i in t){if(s.has(i))continue;if(l===`never`){o.push(i);continue}let a=c.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>R(e,n,i,t,u))):R(a,n,i,t,u)}return o.length&&n.issues.push({code:`unrecognized_keys`,keys:o,input:t,inst:a}),e.length?Promise.all(e).then(()=>n):n}var ge=d(`$ZodObject`,(e,t)=>{if(N.init(e,t),!Object.getOwnPropertyDescriptor(t,`shape`)?.get){let e=t.shape;Object.defineProperty(t,`shape`,{get:()=>{let n={...e};return Object.defineProperty(t,`shape`,{value:n}),n}})}let n=te(()=>z(t));_(e._zod,`propValues`,()=>{let e=t.shape,n={};for(let t in e){let r=e[t]._zod;if(r.values){n[t]??(n[t]=new Set);for(let e of r.values)n[t].add(e)}}return n});let r=y,i=t.catchall,a;e._zod.parse=(t,o)=>{a??=n.value;let s=t.value;if(!r(s))return t.issues.push({expected:`object`,code:`invalid_type`,input:s,inst:e}),t;t.value={};let c=[],l=a.shape;for(let e of a.keys){let n=l[e],r=n._zod.optout===`optional`,i=n._zod.run({value:s[e],issues:[]},o);i instanceof Promise?c.push(i.then(n=>R(n,t,e,s,r))):R(i,t,e,s,r)}return i?he(c,s,t,o,n.value,e):c.length?Promise.all(c).then(()=>t):t}});function B(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}var _e=d(`$ZodOptional`,(e,t)=>{N.init(e,t),e._zod.optin=`optional`,e._zod.optout=`optional`,_(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),_(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${h(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(t.innerType._zod.optin===`optional`){let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(t=>B(t,e.value)):B(r,e.value)}return e.value===void 0?e:t.innerType._zod.run(e,n)}});function ve(e,t){return new e({type:`string`,...x(t)})}function ye(e,t){return new e({type:`number`,checks:[],...x(t)})}function be(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...x(t)})}function xe(e,t){return new e({type:`never`,...x(t)})}function Se(e,t){return new de({check:`less_than`,...x(t),value:e,inclusive:!0})}function Ce(e,t){return new fe({check:`greater_than`,...x(t),value:e,inclusive:!0})}function we(e,t){return new j({check:`string_format`,format:`regex`,...x(t),pattern:e})}var V=d(`ZodMiniType`,(e,t)=>{if(!e._zod)throw Error(`Uninitialized schema in ZodMiniType.`);N.init(e,t),e.def=t,e.type=t.type,e.parse=(t,n)=>oe(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>D(e,t,n),e.parseAsync=async(t,n)=>se(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>O(e,t,n),e.check=(...n)=>e.clone({...t,checks:[...t.checks??[],...n.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]},{parent:!0}),e.with=e.check,e.clone=(t,n)=>b(e,t,n),e.brand=()=>e,e.register=((t,n)=>(t.add(e,n),e)),e.apply=t=>t(e)}),Te=d(`ZodMiniString`,(e,t)=>{P.init(e,t),V.init(e,t)});function H(e){return ve(Te,e)}var U=d(`ZodMiniNumber`,(e,t)=>{F.init(e,t),V.init(e,t)});function Ee(e){return ye(U,e)}var De=d(`ZodMiniNumberFormat`,(e,t)=>{I.init(e,t),U.init(e,t)});function Oe(e){return be(De,e)}var ke=d(`ZodMiniNever`,(e,t)=>{L.init(e,t),V.init(e,t)});function Ae(e){return xe(ke,e)}var je=d(`ZodMiniObject`,(e,t)=>{ge.init(e,t),V.init(e,t),_(e,`shape`,()=>t.shape)});function W(e,t){return new je({type:`object`,shape:e,catchall:Ae(),...x(t)})}var Me=d(`ZodMiniOptional`,(e,t)=>{_e.init(e,t),V.init(e,t)});function G(e){return new Me({type:`optional`,innerType:e})}function Ne(e,t){let n=new Uint16Array(e);globalThis.crypto.getRandomValues(n);let r=Array(e);for(let i=0;i<e;i++)r[i]=t[n[i]%t.length];return r}var K=H().check(we(/^[a-z0-9]+$/,{error:`prefix must be lowercase alphanumeric`})),q=Ee().check(Oe({error:`words must be an integer`}),Ce(1,{error:`words must be at least 1`}),Se(16,{error:`words must be at most 16`})),Pe=W({prefix:G(K),words:G(q)}),Fe=W({prefix:G(K),words:G(q),namespace:G(H())}),J=Object.freeze(`aal aani aba abama abas abase abb abba abby abe abel abele abet abidi abies able abler ably abort about abouts above abox abu abut aby acca accent accept access accord ace acer aces ach achar ache achen acher aching acid acier acker acle acor acre act acting action active actor acts actual acute ada adai adam adapt adar adat aday adays add adda added adder addle adds addy ade adet adin adjust admin ado adult advert ady adz aes afar affa affirm aft after aga again agal agama agar agate age aged agen agena agency agenda agent ager ages agger aghan aging agio agnes ago agog agon agonal agra agre agree agua ague agy aha ahead ahir aho ahu aias aid ail ailing ails aim aint air aira aire airs airt airy ait ajar ajari aka akal akala akan ake akey akia akin akka ako akov aku ala alada alaki alala alan aland alar alarm alary alas alb album ale alea alee alem alen alert ales alette alex alf alias alice alida alien align alin aline alist alit alite alive alk all allah allan alle allen aller allow ally alma almost alo alogy alone along alp alpha also alt altar alter altern alto alur always aly alya ama amah amain amang amani amar amara amarin amazon amba ambar amber amble ambo ame amen ament ami amia amic amid amide amil amin amine amini amir amma amman ammer ammo ammu among amor amos amount amp ample amt amy ana anam anan anana anas anat anay anchor and anda ande andi andre andy anele anes angel angelo anger angers angka angle angled angler angles ango ani animal anime anion anis anker ann anna anne annet annie annual anoa anon ansa anser ansu answer ant anta antal antar antara ante antes anthem anti antic anton ants antu any apa apache apar apart apatan ape aper aping apis apollo aport appear append apple apply apps apse apt apus ara arab arad arar arc arca arch arched arches archie archy ardu are area ared arena argas argent argo argon aria arian aries ariot arius ark arks arm armed arming armor arms army arn arna arne arni aro around arrant arras array arris arrow arry art artar artha artist arts arty aru arum ary aryl asa asana ascii ascus ase asem ash asha ashen asher ashes ashy asian aside ask askar asks asp aspect asper assert asset assets assi assign assis assist ast asta aster astern astian ata atap ate aten ates athing ati atik atis atlas atma atom atomic atoms atria atta attach attack attar atter attern attery audio audit auge augh aught auh auk aum aus author auto autos ava avail aval avar ave avens aver avera averse avery aves avian avid avis avo avoid awa await awake awan award aware awat away awd awin awl awn awner awning axe axed axes axis axon ayah aye ayin ayu azine azo azole azon azure baa baar bab babel baby bac bach back backs backup bad badge bae bag bags bah bait baka bal ball balls bam ban banana band bands bane bang bank banks banner bar bara bard bare barer barn barra bars bart barth baru bas base based bases bash basic basis basket bass bat batch bate bath batis battle baud bay bea beam bean beans bear beat beats beaut beck bed beds bee beek been beer before beg begin behind being bel belief bell bella bells below belt ben bench bend bene beni ber bere berg berger beri bern berry bert bes best bet beta beth bets better bhar bias bib bid bien bier big bike bill bin binary bind binder bine bing bins bios biotic bird birds birth bis bishop bit bite bito biz black blad blade blah blank blas blast bled blend blick blind blink blo blob bloc block blood blower blue blur boa board boat bob bod boden body bog bola bold bole boll bolo bolt bom bomb bon bond bone bones boni bonus boo book bool boom boost boot boots bor bord border borg born borne boro borrow bos boss bot both bottom bounce bound bourg bout bouw bow bower boxes boxing boy bra brace brain brains bran branch brand bread break bred breed brew brick bridge brief brig bright bring brit broken broker brook brot brown browse brush bubble buck bucket bud buddy budget buds buff buffer bug build built bulk bull bullet bum bun bund bundle bung bur bureau burg burn burst bury bus buster busy but button buy buyer buzz cab cache cad cade cake cakes cal call caller cam came camel camera camp campo can cancel cand canner cannot canon cant canvas cap cape car cara carbon card care career caret cargo carry cart case cash casino cass cast caster cat catch cate cation caught cause cede cee ceil cel cell cement cent center cep ceptor ceral ceria cern cess cha chaft chai chain chair chal chalk champ chance chang change chant chap char charge chart chat chaus che cheap check chee chef chen cheng chet chi chia chid chief chien chil child chin china chine ching chip chips chlor cho choice chol choose chosen christ chrome chunk church cid cine cion cipher circle cit cite city civil claim clam clang clare class clave clean clear cled click client cline cling clinic clip clips clipse cloak clock clone close closed cloth cloud club coach coal coat cobra cod code coder coe coffee cohol coil coin col cola cold cole coli coll colon color colors column coma comb combat come comes comic coming comma commit common con cond cone cones conn conte conto contra cony cook cool coop cop cope copy cor cord corder core corn corner corp cos cost cot could count county coupon cours course court cover cow cox craft cran cratch crate crawl cream crease create credit cree creen crest crete crew crib crime cris critic cro crop cross crow crumb cry crypt cub cube cue cult cup cur curl curr curse cursor curve custom cut cute cyan cycle dab dad dade dae daemon dag daily dain dak dal dale dam damage dan dance dang danger dao dap dar dark dart das dash data date dater dating datum day days dead deal dealer death deb decess deck decode dee deep define deg degree del delay dele delete delta deme den dene dense dent deny depart depend deploy depth dere derive dern design desk dess detach detail detect dev device dew dha dial dib dice did diet dig digest digit dim din ding dip dire direct dirty dis disc dish disk dit dita ditch div divide dob doc dock docker doctor dod does dog dogs doing dol dom domain don done dont doom door dop dor dos dose dot double dow down draft drag dragon dram draw drawer dream dress drink drive driver drop dry dual dub duck duct ductor duit dum dummy dump dup during dust dux each ean ear earing early earn earth ease east easy eat ebb eben echo eddy eden edge edict edit edith editor edo educt eel eer effect eft egg egger ego either eke eker eking eland elate elb eld elder elding elect elf eli elia elian elite elk ell ella elle ellen elm elod elon elope els else elt elves embar embed ember eme emit emm emma empt empty emu enable encode end ended ender endere ending endue enemy energy engine enos ens ense ensky ensure ental enter entity entry enzyme epoch equal equip era erade eral erase erd ere erg eria erian erie ermine erne eros err erring error ers erse escape escort ess essay essed essie estado estate esteem ester estre eta etch ether ethyl etna etta ettle eva eve even event ever every evil ewer exact exam excel except exist exit expand expect expert expire expiry export extend extent extern extra eye eyen eyer eyey eyn fabric face facet fact factor fad fade fail fair faith fake faker fall fallen false fam family fan fang fant far farm fass fast fat fatal father fatter fault favor fear feat fed fee feed feel feer fei fell fels felt female fen fern fest fet fetch few fib fiber fico fid field fifo fig fight figure file fill filled film filter fin final find finder fine finger finish finite finity fir fire firm first fish fit five fix fixed flag flake flare flash flat fleet flex flight flip flix flo float floor flora flow flower flu fluid flush flux fly foam focus fod fog foil fold folder folie folio folk follow fon fond fono font foo food foot footer for fora force forced forcer ford forest forge forget forgot fork form formal format forme formed former formin fort forth forum fot found fox fra fram frame fred free freeze fresh fried friend frig frist fro frog from front fruit fuel full fully fum fun fund funk fusc fusion future gab gabe gable gad gage gain gal gam game gaming gamma gan gang gant gaon gap gar gara garden gare garten gary gas gast gat gata gate gau gave gaz gear ged gee gel geld gelt gem gen gender gene genic genre gens gent geo ger gerald gers ges gest get geta getter gey gez ghan ghost gid gie gif gift gig gil gin ging gio girl gist git give given giver giving glass glib global glyph gnu goal god going gol gold golly gon gone gong goo good goods gor gos got gra grab grad grade graded grader grain gram grand grant graph grass grat gratis grave gray great gree green greg grey grid griff grim gris gross ground group grow grown growth grunt guan guard gue guess guest guide guild guise gul gulp gum gun guna gur guru gus gust gut gym gyro habit hack had haft hag hah hail hain hair hak hal hala hale half hall halo halt halter halve ham hammer han hand handle hanger hao hap happy hard harm hart hash hasta hat hau hausen have haven haw hawk hawm hay head headed header heal health heap hear heart heat heater heavy heck heder heed heer hehe hei height hein hele hello helm helmet help helper hem heme hen hend hep her hern hero hers het hew hex hey hia hic hid hidden hide high higher hill him hin hind hing hint hip hire hiro his hist hit hler hob hobo hod hog hoi hold holder hole holm holt holy home hon hone hong hood hoof hook hoot hop hope hopper hora horn horse hose host hot hotel hound hour house hoven hover how hub hud hug hui huk hum huma human hun hung hunt hunter hurst hurt hut hwa hyp hyper ian iao iba iban ibid ibo ice iced ich icho icing icon icy ida ide idea ideal idean ides idle idler ido idol ife iffy ignite ignore ihi ijo ikat ike ikey ila ilia ilian ilium ilk ilka ill illy ilot ima image imam imber imer imi imine immi immit immune imp impact impi import imu inca inch income ind indaba indan inde indent index india indic indra indy ineri inermi inez infect infer inform infra ing inga inger ingle inia inion initis inject ink inken inker inkle inks inky inn inner inning ino inoma input insert inside insula intend intent inter intern into invent invert invest invite invoke ion ione ioni ionic ipid ira iran irani ire iris irish irk irma iron ism iso issue issuer ist istle ita itala itali italic itch item iten iter ither ito its itys itza iva ivan ivin ivy iwa iyo izar izard izzard jab jack jade jam jama jaman jan jar jara jat jati java jaw jay jed jem jest jet jete jim jin jing job joch joe john join joint joker jon jong joni jos jours joy juan jud judge jug juice juju jump jun junk junto jur jury just jut kai kaj kan kana kang kari karma kat kate kay kea ked kee keen keep keeper keet kele ken kend kenn kent kep ker kern kernel ket keta key kick kid kids kil killer kim kin kina kind king kino kip kish kiss kit kite kitty knife know known koa kob koch kol kon kona kop kor kos kou kra kraft kreis kua kung lab label labor lac lace lack lad lade laden lady lag lagen lager lai laid lain lak lake lalo lam lama lambda lament lamp lan lana land lander lane lant lap lar large lari las laser lash lass last lat late lated laten later latest latex latin lation laugh launch lava law lay layer layout lazy lea lead leader leaf league lean lear learn lease least leave lech leck lector led leda lede leden ledge ledged ledger lee leed leep leer lees leet left leg legacy legal legate legend leger leges lei leigh lek lemma len lend lene length lens lent leo ler les less lesson lest let lete lett letter lev levant level lever lew lex lexia ley liable lias lice lich lichen licit lick lid lide lie lied lief lier lif life lift light ligne like lim lime limit lin line linear lined linen liner ling linge linger linha linie lining link linked links linky lint lion lip lis lish list listed listen lit lite liter little liv live living liz loa load loaded loader loan lob lobal local locale loch lock locked locker lod lof log loge logged logger logic login logo logos loin loir long loo lood look lookup loom loon loop loot lop lope lord lose loss lost lot lots lotte lou love lover low lower lox loyd luc luck lug lum lunes lung lur lush lut lux lying lys lysis mac mack macro mad made mag mage magic mah mail mailer main maine maint major make maker making mal malar mall mallow mam man mana manage mand mande manent manes mani mania mann mano mans manse mant manual manuel many mao map mapper mar march mare margin marine mark marked marker market markup mars mart marvin mary mas masa mask masked mass massa mast master mat match mate mater math matrix matter max may maya maybe maze meal mean mede media median medio medium meet meg mein mel meld mele melon mem member memo memory men meng ment mental mentor menu mer mere merge merk mero mes mesa mese mesh mess messe messer mester met meta metal mete meteor meter method metic metric mica mico micro mid middle mien mig might mil mile milk mill mime min mina mind mine miner ming mino minor mint minus minute mir mirror mise miss mist mite mitt mix mixed mob mobile mock mod modal mode model modern modify module mog moil moire moment mon money mong mongo mono mont month monton moo moon moor mooth mor more morgen mort most mostly mot mother motion motor mount mouse mouth move movie moving mrs much mud mult mum mun mund mung munity mus museum music must mute mux naa naam nab nable nach nae nag naio nais nak nam nama name nan nance nancy nant nap nar nard nast nat nation native nature nay nea neal near neath neb neck ned nee need needle needs neet nef nei nell nelly neo ness nest nesty net nete never new news next nias nice nici nick nid night nil nim nine ning nisse nit nod node nog noise noma nome non nonce none noop nor norm normal north nose nostic not note notice notify nou noun nous nova novo now nth nub nul null number numero nun nut nye oak oban obe obi object occur och ock ocracy ocular oda odal odd ode odel odin odium odor ods odz oes off offer office offset oft often ogle ohia oil oint oka okee oki okia okra old olden older ole oleg olid olio olive olla olm ology olor olson oman omar omber omega omen omer omina omit ona once one oner onium only ons ontal onto onus onym onza oodles oons oord opal opaque ope open opera opsy opt optic option opus ora oracle orage orang orange orb orbit orc orca order ordu ore orf organ orgia orias orient origin orna orris ort ory osc ose ossal osse ostic otate other otic otis oto otto otus ouch ouf ough ought ounce ounds ours oust out outed outen outer outing output ova oval oven over ovine ovis owe ower owing owl owler own owner oxide oxy oxygen oyer paar pac pace paced pack packer packet pad page pager pagina pail pain paint pair paired pais pal pam pan pand panel pang panic pant pants pap paper paque par para param parate parcel pard paren parent parer pari paring park parse parser part party pass passen past paste pat patch path pathy pau pause paw pawn pay payer pea peace peak peaker peat ped peed peer peg pele pell pen pend pent people pep per peri period perk perm permit person pert perty pes peso pet phase phasis phi phil pho phon phone phonic phony phot photo phrase pia pic pick picked picker pickle pie pier pig pik pile pill pillar pilot pin pine ping pink pip pipe pir piro pit pitch pivot pix pizza place placer plain plan planet plant plash plass plat plate play player please pled plex pliant plied plier pliers plies plot ploy pluck plug plural plus ply pod poi point poke pol polar pole policy polis poly pom pon pond ponder pone ponent pong pont pony pool poor pop poral port porta portal ported porter porto pose poser posing posit poss post postal posted poster pot pow power pox pray prefer prefix prep preset press prest pretty price priced prim prima prime primer print prior pro prob probe prod prof profit prog prompt proof prop proper props prote proto prove proved prow proxy pseudo psi pst psych puan pub public pul pull pulse pump pun punt pur pure purple puru push put python qua quad quake quan quant quare quart quat queen query quest quet queue quick quid quiet quila quin quina quip quire quis quit quite quiz quo quot quota quote raad rab rabbit race rach rack rad rada radio radius raff raft rag rage rah raid rail rain rais raise raised raiser raj rale ram rama rame ran rana rance rand random rang range rank rant rap rapid rapper rare ras rase rash rat rate rated rather rating ratio ration raul raw rax ray rea reach react read reader ready reak real really realm ream rear reason reb recent recipe reck record rect red redd rede redo reduce redux ree reef reek reem reen rees reet ref refer refix refund reg region reh rein reis reit reject rel reland relay reload remain reman remark remote remove renal rename rend render renew rent rep repair repeat repen reply report resent reset resh resize resp rest result resume ret retain retan retch retry return reuse rev reve revet review reward rex rhein rho ria rial rib ric rice rich richt rick rid ridden ride ridge rie rier riff rift rig right rik rim rine ring ringer rink rio riot rip rise risk rist rit rita rite rive river rix roach road rob robe robot roc rock rocket rod rodd roe rog roger roi roit rok roke roker role rolled roller rolley roman rome ron rone rong roof rook room roon root rope ropy rosa rose ross rot rota rotate rote rottle roud rough round roup route router rove row rowing rox roy rub ruby ruck rud ruff rug rule rum run runner rupa rus rush rust rut ruta sab sad safe sage said sak sal salary sale salt sam same sample san sand sans sap sar sass sat save saved saving say scala scalar scale scaled scan scape scar scene schema scheme school schule scient scious scope score screen scribe script scroll sea seal sealed search season seat sec second secret sect sector secure seed seeing seek seen seer seg segue seid seit sele select self seller semble semi sen send sender sense sensor sept ser sera seri serial series sero sert serve server servo sess set sett setter setup seven sey sha shade shader shadow shake shall shan shape share sharp shaw shay she shed sheet shell shen sheng shi shield shift shim shin shine ship shire shirt shiv sho shock shoe shop shore short shot should show shown shu sia sib sic sid side sie sig sigma sign signal sil silent silver sim simple sin since sing single sink sip sir sis sit six size sizes skal skat sker ski skill skim skin skip sky sla slam slash sled sleep slice slick slide slider slot slow slug small smart smarty smith smooth snake snap snow soap sob soc social sock socket soe soever soft soil sol solar sold sole solid solo solute solve solver some son song sons soon sorry sort sorted sou sound source south soy spa space spam span spann spar spark spart spawn spec sped speech speed spell spent sphere spiel spill spin spire spired splice split spoken spor sport sports spot spread spring sprite spur spy square ssi stable stack staff stag stage stake stall stamp stan stance stand star start stash state static status staw stay stead steady steam steel steen stein stell stem sten step stern stick sticks sticky stid still stim stime sting stock stocks stod stof stoff stone stood stop store storm story stra stract strain strand strap stre stream street streng stress strict stride strike string strip stripe strix stroke strom strong stu stub stud studio study stuff stum sty style sub submit subset such suffix suite summer sup super sur sure surf survey sus swap sweet swift swiper switch symbol sync syntax system taa tab tabla table tables tablet tach tag tai tail tain taj take taken taking tal talk tam tan tank tap tar tara tare target task taste tat tau tax tay tea teach team tear tec tech ted tee teen teg teil tele tell tema temp temper tempo tempt ten tenant tensor tent tera teras teri term termin tern terna ternal terne test teste tested tester text tez tha thai than thane thank thanks that the their them theme then these theta they thin thing think third this tho thon thorn those though thouse thread three throw thumb thus thy tic tick ticker ticket tid tie tier tig tight til tile tim time timer times tin ting tiny tip title titre toa toast tod today toe tog toggle toi token tol tom ton tone tong too tool toon top topia topic tops tor torch tot total tou touch tour tout tower town tox toy tra trace track tract trade trag trail train trait tram tran trap trash travel tray tree trend trent tri trial trica trim trin trip tron truck true trust truth try trying tube tum tun tur turn turned tweet twig two type uang ubi uca udal udder udi udo uds ugh uji uke ula ule ull ulla uller ulling ultima ultimo ulu umber umble umbo ume ump umph umu una unable unal unami unbind unca uncate unci uncia unde unden under undo undy unie union unique unit unity unken unless unlink unlock unsafe unset untar until unto unused unwrap unze update upload upo upon upper ura ural uran urate urban urd urde urdu ure urent urf urge urgent urger uri uria urlar urn urna urnal urning uro urs ursa ursal ursus uru urus usable usage usar use used user ush usher ussels ust uster usual usun uta utas utch ute utile utter utu utum uva vai vain vair val vale vali valid vall valor value valuer van vang vara vare vari varna vary vas vast vat vault veal vector veda vedic vee veen veer vei veil vela vell velo velte vend vendor vent venter venue venus vera verb verd verify verity vern versal verse versed verst vert vertex very vest vester vet via vic vice video vie vier view viewer vill villa ville vim vina vince vine vino viol vip vira viral viron virus vis visa vise vision visit visor vista visual vita vive vod voet vog voice void vol vole volent volt volume vote vum waar wab wad wadi wag wagon wah wain wait waka wake wale wali walk walker wall wallet wan wand wander wandle wane wang want wany wap war ward warden ware warf warm warn warp wart was wash washed washer wat watch water wave wax way wayne ways weak wealth weapon wear web wed wee weekly ween weep weet wei weka well welt wem wen wend went`.split(` `));function Y(e,t){return e?`${e}_${t}`:t}async function Ie(e,t){if(!e||typeof e!=`string`)throw Error(`input must be a non-empty string`);let n=Fe.parse(t??{}),r=n.words??8;if(!globalThis.crypto?.subtle)throw Error(`idAgent.from() requires Web Crypto API (crypto.subtle). Use HTTPS in browsers.`);let i=new TextEncoder,a=i.encode(n.namespace??`id-agent`),o=await globalThis.crypto.subtle.importKey(`raw`,a,{name:`HMAC`,hash:`SHA-256`},!1,[`sign`]),s=await globalThis.crypto.subtle.sign(`HMAC`,o,i.encode(e)),c=new DataView(s),l=Array(r);for(let e=0;e<r;e++)l[e]=J[c.getUint16(e*2)%4096];return Y(n.prefix,l.join(`-`))}function Le(){let e=(e=>{let t=Pe.parse(e??{}),n=Ne(t.words??8,J);return Y(t.prefix,n.join(`-`))});return e.from=(e,t)=>Ie(e,t),e}var Re=Le();Math.log2(J.length),new Set(J);var X={test:`t`,suite:`s`,hook:`h`,observation:`obs`,run:`r`};function Z(e){return Re({prefix:e,words:10})}function Q(){return Z(X.test)}function ze(){return Z(X.suite)}function Be(){return Z(X.hook)}var $=[{name:`Linear`,slug:`linear`},{name:`Vercel`,slug:`vercel`},{name:`Notion`,slug:`notion`},{name:`Stripe`,slug:`stripe`},{name:`GitHub`,slug:`github`},{name:`Slack`,slug:`slack`},{name:`Figma`,slug:`figma`},{name:`Shopify`,slug:`shopify`},{name:`Datadog`,slug:`datadog`},{name:`Supabase`,slug:`supabase`}];$.map(e=>e.name),$.map(e=>e.slug);function Ve(e){let t=String(e),n=0;for(let e=0;e<t.length;e+=1)n=n*31+t.charCodeAt(e)>>>0;return n}function He(e){return $[Ve(e)%$.length]}function Ue(e){return He(e).slug}export{u as a,Ue as i,ze as n,Q as r,Be as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{$n as e,Wt as t}from"./index-C3AdCkmj.js";var n=e();function r({icon:e,title:r,description:i,actionLabel:a,onAction:o}){return(0,n.jsxs)(`div`,{className:`flex flex-col items-center justify-center min-h-[50vh] p-8`,children:[(0,n.jsx)(`div`,{className:`rounded-full bg-muted p-4 mb-4`,children:(0,n.jsx)(e,{className:`h-8 w-8 text-muted-foreground`})}),(0,n.jsx)(`h3`,{className:`text-lg font-semibold mb-1`,children:r}),(0,n.jsx)(`p`,{className:`text-muted-foreground text-center mb-6 max-w-sm`,children:i}),a&&o&&(0,n.jsx)(t,{onClick:o,children:a})]})}export{r as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Yn as e}from"./index-C3AdCkmj.js";var t=e(`external-link`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]);export{t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Yn as e}from"./index-C3AdCkmj.js";var t=e(`eye`,[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`,key:`1nclc0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]);export{t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Yn as e}from"./index-C3AdCkmj.js";var t=e(`file-code`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 12.5 8 15l2 2.5`,key:`1tg20x`}],[`path`,{d:`m14 12.5 2 2.5-2 2.5`,key:`yinavb`}]]);export{t};
|