@jinn-network/client 0.1.9-canary.0fb0b2a6 → 0.1.9-canary.13dcc0f4
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/build-info.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"clientGitSha": "
|
|
2
|
+
"clientGitSha": "13dcc0f44b87a8176f9d58ed4b8648d846f7a141",
|
|
3
3
|
"codeDigest": "sha256:88f22de15aaea322ddceeae9dfb2892ff3386e7f04730718255dbdd675084c67",
|
|
4
|
-
"builtAt": "2026-07-12T13:34:
|
|
5
|
-
"implVersion": "0.1.9-canary.
|
|
4
|
+
"builtAt": "2026-07-12T13:34:52.831Z",
|
|
5
|
+
"implVersion": "0.1.9-canary.13dcc0f4"
|
|
6
6
|
}
|
package/dist/build-meta.json
CHANGED
|
@@ -90,7 +90,7 @@ Defaulting to \`null\`.`}var Zo=Vo,Qo=Uo,$o=I.forwardRef(({className:e,value:t,.
|
|
|
90
90
|
|
|
91
91
|
`,`Every evaluator runs the same evaluation function, so verdicts can be compared and trusted.`,`
|
|
92
92
|
|
|
93
|
-
`,`The harness and model fields above apply only to the solver role.`]})]}),(0,L.jsxs)(`p`,{className:`m-0 font-mono text-[12px] text-[var(--fg-muted)]`,children:[`Evaluator harness is bound to`,` `,(0,L.jsx)(`code`,{className:`text-foreground`,children:l.contract.evaluationFunction.implementation}),` `,`by the manifest. The fields above only configure the solver role.`]}),F]}),y&&(0,L.jsx)(iw,{onSuccess:()=>{b(!1),ne.mutate()},onCancel:()=>{b(!1)}}),h&&(0,L.jsx)(`p`,{"data-testid":`join-flow-submit-error`,role:`alert`,className:`m-0 font-mono text-[13px] text-destructive`,children:h}),(0,L.jsxs)(`footer`,{className:`flex items-center justify-end gap-3`,children:[(0,L.jsx)(U,{type:`button`,variant:`secondary`,"data-testid":`join-flow-cancel`,onClick:()=>i(`/operator#solvernets`),children:`Cancel`}),(0,L.jsx)(U,{type:`button`,variant:`default`,"data-testid":`join-flow-submit`,disabled:!oe,onClick:()=>{if(g(null),p.roles.includes(`solver`)&&p.harness===`hermes-agent`){b(!0);return}ne.mutate()},children:ne.isPending?`Joining…`:`Join SolverNet`})]})]})}function YT({message:e,onBack:t,onRetry:n}){return(0,L.jsxs)(mo,{variant:`blocking`,className:`flex items-center justify-between gap-4 border-l-0 border border-destructive p-4`,children:[(0,L.jsx)(go,{className:`font-mono text-[13px] text-destructive`,children:e}),(0,L.jsxs)(`div`,{className:`flex gap-2`,children:[n&&(0,L.jsx)(U,{type:`button`,variant:`secondary`,size:`sm`,"data-testid":`join-flow-retry`,onClick:n,children:`Retry`}),(0,L.jsx)(U,{type:`button`,variant:`secondary`,size:`sm`,"data-testid":`join-flow-back`,onClick:t,children:`Back`})]})]})}function XT({success:e,navigate:t}){let n=e.roles.map(e=>e===`solver`?`Solver`:`Evaluator`).join(` + `),[r,i]=(0,I.useState)(!1),[a,o]=(0,I.useState)(null),s=async()=>{i(!0),o(null);try{if(!(await z.restartDaemon()).ok)throw Error(`Restart request failed.`);t(`/overview`)}catch(e){o(e instanceof Error?e.message:`Restart request failed.`),i(!1)}};return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)(W,{"data-testid":`join-flow-success-card`,role:`status`,className:`flex flex-col gap-2.5 border-[var(--vow-green)] p-5`,children:[(0,L.jsx)(G,{variant:`success`,className:`self-start`,children:`Joined`}),(0,L.jsxs)(`span`,{"data-testid":`join-flow-success-name`,className:`font-mono text-[18px] font-medium text-foreground`,children:[`You joined `,e.name]}),(0,L.jsxs)(`span`,{className:`font-mono text-[12px] leading-relaxed text-[var(--fg-muted)]`,children:[`You're in as `,n||`an operator`,`. This SolverNet now shows in your joined list.`]}),e.restartRequired&&(0,L.jsx)(`span`,{"data-testid":`join-flow-success-restart`,className:`font-mono text-[12px] leading-relaxed text-[var(--accent-gold)]`,children:`Restart the node to start participating — the daemon picks up SolverNet config on restart.`})]}),a&&(0,L.jsx)(ho,{role:`alert`,"data-testid":`join-flow-success-restart-error`,className:`font-mono text-[12px] leading-relaxed text-destructive`,children:a}),(0,L.jsxs)(`footer`,{className:`flex items-center justify-end gap-3`,children:[(0,L.jsx)(U,{type:`button`,variant:`secondary`,"data-testid":`join-flow-success-browse`,onClick:()=>t(`/operator#solvernets`),children:`Browse SolverNets`}),(0,L.jsx)(U,{type:`button`,variant:`secondary`,"data-testid":`join-flow-success-view`,onClick:()=>t(`/operator#solvernets/${e.manifestCid}`),children:`View joined SolverNet`}),(0,L.jsx)(U,{type:`button`,variant:`default`,"data-testid":`join-flow-success-restart-button`,onClick:()=>{s()},disabled:r,children:r?`Restarting…`:`Restart node now`})]})]})}function ZT({capture:e}){return(0,L.jsxs)(`section`,{className:`flex flex-col gap-2`,children:[(0,L.jsx)(`h2`,{className:`m-0 font-mono text-[11px] font-medium uppercase tracking-[0.14em] text-muted-foreground`,children:`Executor`}),(0,L.jsxs)(`dl`,{className:`m-0 grid gap-x-3 gap-y-1.5 [grid-template-columns:120px_minmax(0,1fr)]`,children:[(0,L.jsx)(`dt`,{className:`font-mono text-[12px] text-muted-foreground`,children:`Tool`}),(0,L.jsx)(`dd`,{className:`m-0 font-mono text-[12px] text-foreground`,children:e.originatingTool.name}),(0,L.jsx)(`dt`,{className:`font-mono text-[12px] text-muted-foreground`,children:`Version`}),(0,L.jsx)(`dd`,{className:`m-0 font-mono text-[12px] text-foreground`,children:e.originatingTool.version??`unknown`}),(0,L.jsx)(`dt`,{className:`font-mono text-[12px] text-muted-foreground`,children:`Repo`}),(0,L.jsx)(`dd`,{className:`m-0 break-words font-mono text-[12px] text-foreground`,children:e.repoRemoteUrl??`none`}),(0,L.jsx)(`dt`,{className:`font-mono text-[12px] text-muted-foreground`,children:`Commit`}),(0,L.jsx)(`dd`,{className:`m-0 font-mono text-[12px] text-foreground`,children:e.repoCommitHash?.slice(0,12)??`none`})]})]})}function QT({spans:e}){let t=e.flatMap(e=>e.redactedKeys.map(t=>({span:e.name,key:t})));return(0,L.jsxs)(`section`,{className:`flex flex-col gap-2`,children:[(0,L.jsx)(`h2`,{className:`m-0 font-mono text-[11px] font-medium uppercase tracking-[0.14em] text-muted-foreground`,children:`Redactions`}),t.length===0?(0,L.jsx)(`div`,{className:`font-mono text-[12px] text-muted-foreground`,children:`No redacted attributes.`}):(0,L.jsx)(`div`,{className:`flex flex-col gap-1.5`,children:t.map((e,t)=>(0,L.jsxs)(`div`,{className:`grid gap-3 font-mono text-[12px] text-foreground [grid-template-columns:minmax(120px,180px)_minmax(0,1fr)]`,children:[(0,L.jsx)(`span`,{className:`text-muted-foreground`,children:e.span}),(0,L.jsx)(`span`,{className:`break-words`,children:e.key})]},`${e.span}-${e.key}-${t}`))})]})}function $T({detail:e,approving:t=!1,skipping:n=!1,onApprove:r,onSkip:i,onTrustRepo:a}){let{capture:o,spans:s}=e;return(0,L.jsxs)(`div`,{className:`flex flex-col gap-5`,children:[(0,L.jsxs)(`header`,{className:`flex items-start justify-between gap-4`,children:[(0,L.jsxs)(`div`,{className:`min-w-0`,children:[(0,L.jsx)(`h1`,{className:`m-0 break-all font-serif text-[22px] font-normal leading-tight text-foreground`,children:o.sessionId}),(0,L.jsxs)(`div`,{className:`mt-1.5 font-mono text-[12px] text-muted-foreground`,children:[new Date(o.capturedAt).toLocaleString(),` · `,s.length,` spans`]})]}),(0,L.jsxs)(`div`,{className:`flex shrink-0 items-start gap-2`,children:[o.repoRemoteUrl?(0,L.jsx)(U,{variant:`secondary`,size:`sm`,onClick:()=>a(!0),children:`Trust repo`}):null,(0,L.jsx)(U,{variant:`secondary`,size:`sm`,disabled:n,onClick:i,children:n?`Skipping`:`Skip`}),(0,L.jsx)(U,{variant:`default`,size:`sm`,disabled:t,onClick:r,children:t?`Approving`:`Approve`})]})]}),(0,L.jsx)(ZT,{capture:o}),(0,L.jsx)(QT,{spans:s}),(0,L.jsxs)(`section`,{className:`flex flex-col gap-2`,children:[(0,L.jsx)(`h2`,{className:`m-0 font-mono text-[11px] font-medium uppercase tracking-[0.14em] text-muted-foreground`,children:`Trajectory`}),s.length===0?(0,L.jsx)(`div`,{className:`font-mono text-[12px] text-muted-foreground`,children:`No spans recorded.`}):(0,L.jsx)(W,{children:(0,L.jsx)(Bi,{className:`flex flex-col p-0`,children:s.map((e,t)=>(0,L.jsxs)(`div`,{children:[t>0&&(0,L.jsx)(Og,{}),(0,L.jsxs)(`div`,{className:`flex items-center justify-between gap-3 px-4 py-2.5`,children:[(0,L.jsx)(`strong`,{className:`min-w-0 truncate font-mono text-[12px] font-medium text-foreground`,children:e.name}),(0,L.jsx)(`span`,{className:`shrink-0 font-mono text-[11px] text-muted-foreground`,children:e.spanId})]})]},e.spanId))})})]})]})}typeof window<`u`&&window.document&&window.document.createElement;function eE(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}function tE(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function nE(...e){return t=>{let n=!1,r=e.map(e=>{let r=tE(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():tE(e[t],null)}}}}function rE(...e){return I.useCallback(nE(...e),e)}function iE(e,t=[]){let n=[];function r(t,r){let i=I.createContext(r);i.displayName=t+`Context`;let a=n.length;n=[...n,r];let o=t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=I.useMemo(()=>o,Object.values(o));return(0,L.jsx)(s.Provider,{value:c,children:r})};o.displayName=t+`Provider`;function s(n,o){let s=o?.[e]?.[a]||i,c=I.useContext(s);if(c)return c;if(r!==void 0)return r;throw Error(`\`${n}\` must be used within \`${t}\``)}return[o,s]}let i=()=>{let t=n.map(e=>I.createContext(e));return function(n){let r=n?.[e]||t;return I.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return i.scopeName=e,[r,aE(i,...t)]}function aE(...e){let t=e[0];if(e.length===1)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return I.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}var oE=I.useInsertionEffect||aa;function sE({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){let[i,a,o]=cE({defaultProp:t,onChange:n}),s=e!==void 0,c=s?e:i;{let t=I.useRef(e!==void 0);I.useEffect(()=>{let e=t.current;e!==s&&console.warn(`${r} is changing from ${e?`controlled`:`uncontrolled`} to ${s?`controlled`:`uncontrolled`}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),t.current=s},[s,r])}return[c,I.useCallback(t=>{if(s){let n=lE(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}function cE({defaultProp:e,onChange:t}){let[n,r]=I.useState(e),i=I.useRef(n),a=I.useRef(t);return oE(()=>{a.current=t},[t]),I.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}function lE(e){return typeof e==`function`}function uE(e){let t=I.useRef({value:e,previous:e});return I.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function dE(e){let[t,n]=I.useState(void 0);return aa(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let r=t[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}else n(void 0)},[e]),t}function fE(e){let t=I.forwardRef((t,n)=>{let{children:r,...i}=t,a=null,o=!1,s=[];yE(r)&&typeof CE==`function`&&(r=CE(r._payload)),I.Children.forEach(r,e=>{if(_E(e)){o=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;yE(n)&&typeof CE==`function`&&(n=CE(n._payload)),a=mE(t,n),s.push(a?.props?.children)}else s.push(e)}),a?a=I.cloneElement(a,void 0,s):!o&&I.Children.count(r)===1&&I.isValidElement(r)&&(a=r);let c=a?gE(a):void 0,l=rE(n,c);if(!a){if(r||r===0)throw Error(o?SE(e):xE(e));return r}let u=hE(i,a.props??{});return a.type!==I.Fragment&&(u.ref=n?l:c),I.cloneElement(a,u)});return t.displayName=`${e}.Slot`,t}var pE=Symbol.for(`radix.slottable`),mE=(e,t)=>{if(`child`in e.props){let t=e.props.child;return I.isValidElement(t)?I.cloneElement(t,void 0,e.props.children(t.props.children)):null}return I.isValidElement(t)?t:null};function hE(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function gE(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function _E(e){return I.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===pE}var vE=Symbol.for(`react.lazy`);function yE(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===vE&&`_payload`in e&&bE(e._payload)}function bE(e){return typeof e==`object`&&!!e&&`then`in e}var xE=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,SE=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,CE=I.use,wE=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=fE(`Primitive.${t}`),r=I.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,L.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),TE=`Switch`,[EE,DE]=iE(TE),[OE,kE]=EE(TE);function AE(e){let{__scopeSwitch:t,checked:n,children:r,defaultChecked:i,disabled:a,form:o,name:s,onCheckedChange:c,required:l,value:u=`on`,internal_do_not_use_render:d}=e,[f,p]=sE({prop:n,defaultProp:i??!1,onChange:c,caller:TE}),[m,h]=I.useState(null),[g,_]=I.useState(null),v={checked:f,setChecked:p,disabled:a,control:m,setControl:h,name:s,form:o,value:u,hasConsumerStoppedPropagationRef:I.useRef(!1),required:l,defaultChecked:i,isFormControl:m?!!o||!!m.closest(`form`):!0,bubbleInput:g,setBubbleInput:_};return(0,L.jsx)(OE,{scope:t,...v,children:RE(d)?d(v):r})}var jE=`SwitchTrigger`,ME=I.forwardRef(({__scopeSwitch:e,onClick:t,...n},r)=>{let{value:i,disabled:a,checked:o,required:s,setControl:c,setChecked:l,hasConsumerStoppedPropagationRef:u,isFormControl:d,bubbleInput:f}=kE(jE,e),p=rE(r,c);return(0,L.jsx)(wE.button,{type:`button`,role:`switch`,"aria-checked":o,"aria-required":s,"data-state":zE(o),"data-disabled":a?``:void 0,disabled:a,value:i,...n,ref:p,onClick:eE(t,e=>{l(e=>!e),f&&d&&(u.current=e.isPropagationStopped(),u.current||e.stopPropagation())})})});ME.displayName=jE;var NE=I.forwardRef((e,t)=>{let{__scopeSwitch:n,name:r,checked:i,defaultChecked:a,required:o,disabled:s,value:c,onCheckedChange:l,form:u,...d}=e;return(0,L.jsx)(AE,{__scopeSwitch: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,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(ME,{...d,ref:t,__scopeSwitch:n}),e&&(0,L.jsx)(LE,{__scopeSwitch:n})]})})});NE.displayName=TE;var PE=`SwitchThumb`,FE=I.forwardRef((e,t)=>{let{__scopeSwitch:n,...r}=e,i=kE(PE,n);return(0,L.jsx)(wE.span,{"data-state":zE(i.checked),"data-disabled":i.disabled?``:void 0,...r,ref:t})});FE.displayName=PE;var IE=`SwitchBubbleInput`,LE=I.forwardRef(({__scopeSwitch:e,...t},n)=>{let{control:r,hasConsumerStoppedPropagationRef:i,checked:a,defaultChecked:o,required:s,disabled:c,name:l,value:u,form:d,bubbleInput:f,setBubbleInput:p}=kE(IE,e),m=rE(n,p),h=uE(a),g=dE(r);I.useEffect(()=>{let e=f;if(!e)return;let t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,`checked`).set,r=!i.current;if(h!==a&&n){let t=new Event(`click`,{bubbles:r});n.call(e,a),e.dispatchEvent(t)}},[f,h,a,i]);let _=I.useRef(a);return(0,L.jsx)(wE.input,{type:`checkbox`,"aria-hidden":!0,defaultChecked:o??_.current,required:s,disabled:c,name:l,value:u,form:d,...t,tabIndex:-1,ref:m,style:{...t.style,...g,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0,transform:`translateX(-100%)`}})});LE.displayName=IE;function RE(e){return typeof e==`function`}function zE(e){return e?`checked`:`unchecked`}var BE=I.forwardRef(({className:e,...t},n)=>(0,L.jsx)(NE,{className:H(`peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-[var(--vow-green)] data-[state=unchecked]:bg-border`,e),...t,ref:n,children:(0,L.jsx)(FE,{className:H(`pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0.5`)})}));BE.displayName=NE.displayName;function VE(e){return Object.fromEntries(Object.entries(e).sort(([e],[t])=>e.localeCompare(t)))}function HE(e,t){return e.publicEndpoint===t.publicEndpoint&&e.defaultPriceUsdc===t.defaultPriceUsdc&&JSON.stringify(VE(e.perArtifactTypePrice))===JSON.stringify(VE(t.perArtifactTypePrice))&&e.donation.enabled===t.donation.enabled}function UE({label:e,value:t,meta:n}){return(0,L.jsxs)(`div`,{"data-testid":`operator-donation-fact`,className:`flex min-w-0 flex-col gap-1.5 rounded-lg border border-border px-3.5 py-3`,children:[(0,L.jsx)(`span`,{className:`font-mono text-[11px] font-medium uppercase tracking-[0.14em] text-[var(--fg-dim)]`,children:e}),(0,L.jsx)(`strong`,{className:`font-mono text-[18px] font-medium text-foreground`,children:t}),(0,L.jsx)(`span`,{className:`truncate font-mono text-[12px] text-[var(--fg-dim)]`,children:n})]})}function WE({pricing:e,eligibleRuns:t,peerDatasetsUsed:n,saving:r,onSave:i,registerRevert:a}){let[o,s]=(0,I.useState)(e.donation.enabled),[c,l]=(0,I.useState)(!1),u=(0,I.useMemo)(()=>({publicEndpoint:e.publicEndpoint,defaultPriceUsdc:e.defaultPriceUsdc,perArtifactTypePrice:e.perArtifactTypePrice,donation:{enabled:o}}),[e.defaultPriceUsdc,e.perArtifactTypePrice,e.publicEndpoint,o]),d=!HE(e,u);return(0,L.jsxs)(`div`,{"data-testid":`operator-donation-status`,className:`flex flex-col gap-4`,children:[(0,L.jsxs)(`div`,{className:`flex flex-wrap items-start justify-between gap-4`,children:[(0,L.jsxs)(`div`,{className:`flex min-w-[260px] flex-[1_1_360px] flex-col gap-2`,children:[(0,L.jsx)(`span`,{className:`font-mono text-[11px] font-medium uppercase tracking-[0.14em] text-[var(--fg-dim)]`,children:`Donate execution data`}),(0,L.jsx)(`strong`,{"data-testid":`operator-donation-mode`,className:o?`font-mono text-[18px] font-medium text-[var(--vow-green)]`:`font-mono text-[18px] font-medium text-foreground`,children:o?`Donation is on`:`Donation is off`}),(0,L.jsx)(`p`,{className:`m-0 max-w-[64ch] font-mono text-[12px] leading-relaxed text-[var(--fg-dim)]`,children:`Share scrubbed and anonymized solver/evaluator data from future runs with other operators. This lets the network learn from real executions and improve itself. Public testnet donations are free and published to IPFS.`})]}),(0,L.jsxs)(`label`,{"data-testid":`operator-donation-toggle`,className:`inline-flex cursor-pointer items-center gap-3 rounded-full border border-border bg-[var(--bg-sunken)] px-3 py-2`,children:[(0,L.jsx)(`span`,{className:o?`font-mono text-[11px] uppercase tracking-[0.12em] text-[var(--vow-green)]`:`font-mono text-[11px] uppercase tracking-[0.12em] text-muted-foreground`,children:o?`On`:`Off`}),(0,L.jsx)(BE,{"aria-label":`Donate produced data`,checked:o,onCheckedChange:t=>{if(t&&!o&&!e.donation.enabled){l(!0);return}s(t)}})]})]}),(0,L.jsxs)(`div`,{"data-testid":`operator-donation-facts`,className:`grid gap-2.5 [grid-template-columns:repeat(auto-fit,minmax(150px,1fr))]`,children:[(0,L.jsx)(UE,{label:`Eligible runs`,value:String(t),meta:`local history`}),(0,L.jsx)(UE,{label:`Peer datasets used`,value:String(n),meta:`from other operators`})]}),(0,L.jsx)(mo,{variant:`info`,"data-testid":`operator-donation-caveat`,children:(0,L.jsx)(go,{children:`Turning donation off stops future publishing. Data already published to IPFS may remain available.`})}),(0,L.jsx)(Og,{}),(0,L.jsx)(`div`,{className:`flex flex-wrap items-center justify-end gap-3`,children:(0,L.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,L.jsx)(`span`,{"data-testid":`operator-donation-settings-state`,className:d?`font-mono text-[12px] text-primary`:`font-mono text-[12px] text-[var(--fg-dim)]`,children:d?`Donation changed`:`Current`}),(0,L.jsx)(U,{variant:`default`,size:`sm`,type:`button`,disabled:!d||r,onClick:()=>{let t=e.donation.enabled;o!==t&&a(()=>s(t)),i(u)},children:r?`Saving…`:`Save`})]})}),(0,L.jsx)(SC,{open:c,onOpenChange:l,children:(0,L.jsxs)(TC,{"data-testid":`operator-donation-confirm`,children:[(0,L.jsxs)(EC,{children:[(0,L.jsx)(OC,{children:`Share future execution data`}),(0,L.jsx)(kC,{children:`Future solver/evaluator runs will be scrubbed, anonymized, and published to IPFS so other operators can use them. This helps the network learn from real executions and improve itself. Turning donation off later stops future publishing, but data already published to IPFS may remain available.`})]}),(0,L.jsxs)(DC,{children:[(0,L.jsx)(jC,{children:`Cancel`}),(0,L.jsx)(AC,{onClick:()=>{let e={...u,donation:{enabled:!0}};s(!0),l(!1),a(()=>s(!1)),i(e)},children:`Enable donation`})]})]})})]})}function GE({onRestartPending:e=()=>void 0}){let t=Xe(),{data:n,isLoading:r,isError:i,error:a,refetch:o}=dt({queryKey:[`operator-artifacts`,`served`],queryFn:()=>z.operator.listArtifacts({source:`served`,limit:100}),refetchInterval:1e4}),s=(0,I.useRef)(null),c=e=>{s.current=e},l=ft({mutationFn:e=>z.operator.updatePricing(e),onSuccess:async()=>{s.current=null,fg.success(`Donation setting saved`,{description:`Restart pending — applies on next daemon start.`}),e(),await t.invalidateQueries({queryKey:[`operator-artifacts`]})},onError:e=>{let t=s.current;s.current=null,t?.(),fg.error(`Failed to save donation setting`,{description:e instanceof Error?e.message:String(e)})}}),u=n?.summary,d=u?`${u.served.totalCount} eligible runs · donation ${n?.pricing.donation.enabled?`on`:`off`} · ${u.network.totalCount} peer datasets used`:`Donate scrubbed and anonymized run data to IPFS so other operators can use it.`;return(0,L.jsxs)(W,{children:[(0,L.jsxs)(Li,{className:`flex flex-row items-start justify-between gap-3`,children:[(0,L.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,L.jsxs)(Ri,{className:`flex items-center gap-2`,children:[(0,L.jsx)(Bn,{className:`h-3.5 w-3.5`,"aria-hidden":`true`}),`Data donation`]}),(0,L.jsx)(zi,{children:d})]}),(0,L.jsx)(G,{variant:n?.pricing.donation.enabled?`success`:`outline`,children:n?.pricing.donation.enabled?`IPFS donation on`:`Donation off`})]}),(0,L.jsxs)(Bi,{children:[r&&(0,L.jsxs)(`div`,{"data-testid":`operator-data-market-loading`,className:`flex flex-col gap-3`,"aria-label":`Loading execution data`,children:[(0,L.jsx)(Qd,{className:`h-6 w-40`}),(0,L.jsx)(Qd,{className:`h-4 w-72`}),(0,L.jsx)(Qd,{className:`h-20 w-full`})]}),i&&(0,L.jsxs)(mo,{variant:`blocking`,role:`alert`,"data-testid":`operator-data-market-error`,className:`flex items-center justify-between gap-3`,children:[(0,L.jsx)(ho,{className:`text-[var(--break-red)]`,children:a instanceof Error?a.message:`Failed to load execution data.`}),(0,L.jsxs)(U,{variant:`outline`,size:`sm`,type:`button`,onClick:()=>{o()},children:[(0,L.jsx)(zn,{className:`h-3 w-3`,"aria-hidden":`true`}),`Retry`]})]}),n&&(0,L.jsx)(WE,{pricing:n.pricing,eligibleRuns:n.summary.served.totalCount,peerDatasetsUsed:n.summary.network.totalCount,saving:l.isPending,onSave:e=>l.mutate(e),registerRevert:c},`${n.pricing.publicEndpoint}|${n.pricing.defaultPriceUsdc}|${n.pricing.donation.enabled}|${JSON.stringify(VE(n.pricing.perArtifactTypePrice))}`)]})]})}function KE(e){let t=qE(e),n=I.forwardRef((e,n)=>{let{children:r,...i}=e,a=I.Children.toArray(r),o=a.find(YE);if(o){let e=o.props.children,r=a.map(t=>t===o?I.Children.count(e)>1?I.Children.only(null):I.isValidElement(e)?e.props.children:null:t);return(0,L.jsx)(t,{...i,ref:n,children:I.isValidElement(e)?I.cloneElement(e,void 0,r):null})}return(0,L.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}function qE(e){let t=I.forwardRef((e,t)=>{let{children:n,...r}=e;if(I.isValidElement(n)){let e=ZE(n),i=XE(r,n.props);return n.type!==I.Fragment&&(i.ref=t?Kn(t,e):e),I.cloneElement(n,i)}return I.Children.count(n)>1?I.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var JE=Symbol(`radix.slottable`);function YE(e){return I.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===JE}function XE(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function ZE(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var QE=`Dialog`,[$E,eD]=Ss(QE),[tD,nD]=$E(QE),rD=e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=I.useRef(null),c=I.useRef(null),[l,u]=Xu({prop:r,defaultProp:i??!1,onChange:a,caller:QE});return(0,L.jsx)(tD,{scope:t,triggerRef:s,contentRef:c,contentId:Xs(),titleId:Xs(),descriptionId:Xs(),open:l,onOpenChange:u,onOpenToggle:I.useCallback(()=>u(e=>!e),[u]),modal:o,children:n})};rD.displayName=QE;var iD=`DialogTrigger`,aD=I.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=nD(iD,n),a=qn(t,i.triggerRef);return(0,L.jsx)(As.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.contentId,"data-state":TD(i.open),...r,ref:a,onClick:K(e.onClick,i.onOpenToggle)})});aD.displayName=iD;var oD=`DialogPortal`,[sD,cD]=$E(oD,{forceMount:void 0}),lD=e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=nD(oD,t);return(0,L.jsx)(sD,{scope:t,forceMount:n,children:I.Children.map(r,e=>(0,L.jsx)(Hu,{present:n||a.open,children:(0,L.jsx)(zu,{asChild:!0,container:i,children:e})}))})};lD.displayName=oD;var uD=`DialogOverlay`,dD=I.forwardRef((e,t)=>{let n=cD(uD,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=nD(uD,e.__scopeDialog);return a.modal?(0,L.jsx)(Hu,{present:r||a.open,children:(0,L.jsx)(pD,{...i,ref:t})}):null});dD.displayName=uD;var fD=KE(`DialogOverlay.RemoveScroll`),pD=I.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=nD(uD,n);return(0,L.jsx)(sS,{as:fD,allowPinchZoom:!0,shards:[i.contentRef],children:(0,L.jsx)(As.div,{"data-state":TD(i.open),...r,ref:t,style:{pointerEvents:`auto`,...r.style}})})}),mD=`DialogContent`,hD=I.forwardRef((e,t)=>{let n=cD(mD,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=nD(mD,e.__scopeDialog);return(0,L.jsx)(Hu,{present:r||a.open,children:a.modal?(0,L.jsx)(gD,{...i,ref:t}):(0,L.jsx)(_D,{...i,ref:t})})});hD.displayName=mD;var gD=I.forwardRef((e,t)=>{let n=nD(mD,e.__scopeDialog),r=I.useRef(null),i=qn(t,n.contentRef,r);return I.useEffect(()=>{let e=r.current;if(e)return gS(e)},[]),(0,L.jsx)(vD,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:K(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:K(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:K(e.onFocusOutside,e=>e.preventDefault())})}),_D=I.forwardRef((e,t)=>{let n=nD(mD,e.__scopeDialog),r=I.useRef(!1),i=I.useRef(!1);return(0,L.jsx)(vD,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})}),vD=I.forwardRef((e,t)=>{let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=nD(mD,n),c=I.useRef(null),l=qn(t,c);return ow(),(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(fw,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,L.jsx)(Bs,{role:`dialog`,id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":TD(s.open),...o,ref:l,onDismiss:()=>s.onOpenChange(!1)})}),(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(kD,{titleId:s.titleId}),(0,L.jsx)(jD,{contentRef:c,descriptionId:s.descriptionId})]})]})}),yD=`DialogTitle`,bD=I.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=nD(yD,n);return(0,L.jsx)(As.h2,{id:i.titleId,...r,ref:t})});bD.displayName=yD;var xD=`DialogDescription`,SD=I.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=nD(xD,n);return(0,L.jsx)(As.p,{id:i.descriptionId,...r,ref:t})});SD.displayName=xD;var CD=`DialogClose`,wD=I.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=nD(CD,n);return(0,L.jsx)(As.button,{type:`button`,...r,ref:t,onClick:K(e.onClick,()=>i.onOpenChange(!1))})});wD.displayName=CD;function TD(e){return e?`open`:`closed`}var ED=`DialogTitleWarning`,[DD,OD]=xs(ED,{contentName:mD,titleName:yD,docsSlug:`dialog`}),kD=({titleId:e})=>{let t=OD(ED),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
93
|
+
`,`The harness and model fields above apply only to the solver role.`]})]}),(0,L.jsxs)(`p`,{className:`m-0 font-mono text-[12px] text-[var(--fg-muted)]`,children:[`Evaluator harness is bound to`,` `,(0,L.jsx)(`code`,{className:`text-foreground`,children:l.contract.evaluationFunction.implementation}),` `,`by the manifest. The fields above only configure the solver role.`]}),F]}),y&&(0,L.jsx)(iw,{onSuccess:()=>{b(!1),ne.mutate()},onCancel:()=>{b(!1)}}),h&&(0,L.jsx)(`p`,{"data-testid":`join-flow-submit-error`,role:`alert`,className:`m-0 font-mono text-[13px] text-destructive`,children:h}),(0,L.jsxs)(`footer`,{className:`flex items-center justify-end gap-3`,children:[(0,L.jsx)(U,{type:`button`,variant:`secondary`,"data-testid":`join-flow-cancel`,onClick:()=>i(`/operator#solvernets`),children:`Cancel`}),(0,L.jsx)(U,{type:`button`,variant:`default`,"data-testid":`join-flow-submit`,disabled:!oe,onClick:()=>{if(g(null),p.roles.includes(`solver`)&&p.harness===`hermes-agent`){b(!0);return}ne.mutate()},children:ne.isPending?`Joining…`:`Join SolverNet`})]})]})}function YT({message:e,onBack:t,onRetry:n}){return(0,L.jsxs)(mo,{variant:`blocking`,className:`flex items-center justify-between gap-4 border-l-0 border border-destructive p-4`,children:[(0,L.jsx)(go,{className:`font-mono text-[13px] text-destructive`,children:e}),(0,L.jsxs)(`div`,{className:`flex gap-2`,children:[n&&(0,L.jsx)(U,{type:`button`,variant:`secondary`,size:`sm`,"data-testid":`join-flow-retry`,onClick:n,children:`Retry`}),(0,L.jsx)(U,{type:`button`,variant:`secondary`,size:`sm`,"data-testid":`join-flow-back`,onClick:t,children:`Back`})]})]})}function XT({success:e,navigate:t}){let n=e.roles.map(e=>e===`solver`?`Solver`:`Evaluator`).join(` + `),[r,i]=(0,I.useState)(!1),[a,o]=(0,I.useState)(null),s=async()=>{i(!0),o(null);try{if(!(await z.restartDaemon()).ok)throw Error(`Restart request failed.`);t(`/overview`)}catch(e){o(e instanceof Error?e.message:`Restart request failed.`),i(!1)}};return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)(W,{"data-testid":`join-flow-success-card`,role:`status`,className:`flex flex-col gap-2.5 border-[var(--vow-green)] p-5`,children:[(0,L.jsx)(G,{variant:`success`,className:`self-start`,children:`Joined`}),(0,L.jsxs)(`span`,{"data-testid":`join-flow-success-name`,className:`font-mono text-[18px] font-medium text-foreground`,children:[`You joined `,e.name]}),(0,L.jsxs)(`span`,{className:`font-mono text-[12px] leading-relaxed text-[var(--fg-muted)]`,children:[`You're in as `,n||`an operator`,`. This SolverNet now shows in your joined list.`]}),e.restartRequired&&(0,L.jsx)(`span`,{"data-testid":`join-flow-success-restart`,className:`font-mono text-[12px] leading-relaxed text-[var(--accent-gold)]`,children:`Restart the node to start participating — the daemon picks up SolverNet config on restart.`})]}),a&&(0,L.jsx)(ho,{role:`alert`,"data-testid":`join-flow-success-restart-error`,className:`font-mono text-[12px] leading-relaxed text-destructive`,children:a}),(0,L.jsxs)(`footer`,{className:`flex items-center justify-end gap-3`,children:[(0,L.jsx)(U,{type:`button`,variant:`secondary`,"data-testid":`join-flow-success-browse`,onClick:()=>t(`/operator#solvernets`),children:`Browse SolverNets`}),(0,L.jsx)(U,{type:`button`,variant:`secondary`,"data-testid":`join-flow-success-view`,onClick:()=>t(`/operator#solvernets/${e.manifestCid}`),children:`View joined SolverNet`}),(0,L.jsx)(U,{type:`button`,variant:`default`,"data-testid":`join-flow-success-restart-button`,onClick:()=>{s()},disabled:r,children:r?`Restarting…`:`Restart node now`})]})]})}function ZT({capture:e}){return(0,L.jsxs)(`section`,{className:`flex flex-col gap-2`,children:[(0,L.jsx)(`h2`,{className:`m-0 font-mono text-[11px] font-medium uppercase tracking-[0.14em] text-muted-foreground`,children:`Executor`}),(0,L.jsxs)(`dl`,{className:`m-0 grid gap-x-3 gap-y-1.5 [grid-template-columns:120px_minmax(0,1fr)]`,children:[(0,L.jsx)(`dt`,{className:`font-mono text-[12px] text-muted-foreground`,children:`Tool`}),(0,L.jsx)(`dd`,{className:`m-0 font-mono text-[12px] text-foreground`,children:e.originatingTool.name}),(0,L.jsx)(`dt`,{className:`font-mono text-[12px] text-muted-foreground`,children:`Version`}),(0,L.jsx)(`dd`,{className:`m-0 font-mono text-[12px] text-foreground`,children:e.originatingTool.version??`unknown`}),(0,L.jsx)(`dt`,{className:`font-mono text-[12px] text-muted-foreground`,children:`Repo`}),(0,L.jsx)(`dd`,{className:`m-0 break-words font-mono text-[12px] text-foreground`,children:e.repoRemoteUrl??`none`}),(0,L.jsx)(`dt`,{className:`font-mono text-[12px] text-muted-foreground`,children:`Commit`}),(0,L.jsx)(`dd`,{className:`m-0 font-mono text-[12px] text-foreground`,children:e.repoCommitHash?.slice(0,12)??`none`})]})]})}function QT({spans:e}){let t=e.flatMap(e=>e.redactedKeys.map(t=>({span:e.name,key:t})));return(0,L.jsxs)(`section`,{className:`flex flex-col gap-2`,children:[(0,L.jsx)(`h2`,{className:`m-0 font-mono text-[11px] font-medium uppercase tracking-[0.14em] text-muted-foreground`,children:`Redactions`}),t.length===0?(0,L.jsx)(`div`,{className:`font-mono text-[12px] text-muted-foreground`,children:`No redacted attributes.`}):(0,L.jsx)(`div`,{className:`flex flex-col gap-1.5`,children:t.map((e,t)=>(0,L.jsxs)(`div`,{className:`grid gap-3 font-mono text-[12px] text-foreground [grid-template-columns:minmax(120px,180px)_minmax(0,1fr)]`,children:[(0,L.jsx)(`span`,{className:`text-muted-foreground`,children:e.span}),(0,L.jsx)(`span`,{className:`break-words`,children:e.key})]},`${e.span}-${e.key}-${t}`))})]})}function $T({detail:e,approving:t=!1,skipping:n=!1,onApprove:r,onSkip:i,onTrustRepo:a}){let{capture:o,spans:s}=e;return(0,L.jsxs)(`div`,{className:`flex flex-col gap-5`,children:[(0,L.jsxs)(`header`,{className:`flex items-start justify-between gap-4`,children:[(0,L.jsxs)(`div`,{className:`min-w-0`,children:[(0,L.jsx)(`h1`,{className:`m-0 break-all font-serif text-[22px] font-normal leading-tight text-foreground`,children:o.sessionId}),(0,L.jsxs)(`div`,{className:`mt-1.5 font-mono text-[12px] text-muted-foreground`,children:[new Date(o.capturedAt).toLocaleString(),` · `,s.length,` spans`]})]}),(0,L.jsxs)(`div`,{className:`flex shrink-0 items-start gap-2`,children:[o.repoRemoteUrl?(0,L.jsx)(U,{variant:`secondary`,size:`sm`,onClick:()=>a(!0),children:`Trust repo`}):null,(0,L.jsx)(U,{variant:`secondary`,size:`sm`,disabled:n,onClick:i,children:n?`Skipping`:`Skip`}),(0,L.jsx)(U,{variant:`default`,size:`sm`,disabled:t,onClick:r,children:t?`Approving`:`Approve`})]})]}),(0,L.jsx)(ZT,{capture:o}),(0,L.jsx)(QT,{spans:s}),(0,L.jsxs)(`section`,{className:`flex flex-col gap-2`,children:[(0,L.jsx)(`h2`,{className:`m-0 font-mono text-[11px] font-medium uppercase tracking-[0.14em] text-muted-foreground`,children:`Trajectory`}),s.length===0?(0,L.jsx)(`div`,{className:`font-mono text-[12px] text-muted-foreground`,children:`No spans recorded.`}):(0,L.jsx)(W,{children:(0,L.jsx)(Bi,{className:`flex flex-col p-0`,children:s.map((e,t)=>(0,L.jsxs)(`div`,{children:[t>0&&(0,L.jsx)(Og,{}),(0,L.jsxs)(`div`,{className:`flex items-center justify-between gap-3 px-4 py-2.5`,children:[(0,L.jsx)(`strong`,{className:`min-w-0 truncate font-mono text-[12px] font-medium text-foreground`,children:e.name}),(0,L.jsx)(`span`,{className:`shrink-0 font-mono text-[11px] text-muted-foreground`,children:e.spanId})]})]},e.spanId))})})]})]})}typeof window<`u`&&window.document&&window.document.createElement;function eE(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r||!r.defaultPrevented)return t?.(r)}}function tE(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function nE(...e){return t=>{let n=!1,r=e.map(e=>{let r=tE(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():tE(e[t],null)}}}}function rE(...e){return I.useCallback(nE(...e),e)}function iE(e,t=[]){let n=[];function r(t,r){let i=I.createContext(r);i.displayName=t+`Context`;let a=n.length;n=[...n,r];let o=t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=I.useMemo(()=>o,Object.values(o));return(0,L.jsx)(s.Provider,{value:c,children:r})};o.displayName=t+`Provider`;function s(n,o,s={}){let{optional:c=!1}=s,l=o?.[e]?.[a]||i,u=I.useContext(l);if(u)return u;if(r!==void 0)return r;if(!c)throw Error(`\`${n}\` must be used within \`${t}\``)}return[o,s]}let i=()=>{let t=n.map(e=>I.createContext(e));return function(n){let r=n?.[e]||t;return I.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return i.scopeName=e,[r,aE(i,...t)]}function aE(...e){let t=e[0];if(e.length===1)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return I.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}var oE=I.useInsertionEffect||aa;function sE({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){let[i,a,o]=cE({defaultProp:t,onChange:n}),s=e!==void 0,c=s?e:i;{let t=I.useRef(e!==void 0);I.useEffect(()=>{let e=t.current;e!==s&&console.warn(`${r} is changing from ${e?`controlled`:`uncontrolled`} to ${s?`controlled`:`uncontrolled`}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),t.current=s},[s,r])}return[c,I.useCallback(t=>{if(s){let n=lE(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}function cE({defaultProp:e,onChange:t}){let[n,r]=I.useState(e),i=I.useRef(n),a=I.useRef(t);return oE(()=>{a.current=t},[t]),I.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}function lE(e){return typeof e==`function`}function uE(e){let t=I.useRef({value:e,previous:e});return I.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function dE(e){let[t,n]=I.useState(void 0);return aa(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let r=t[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}else n(void 0)},[e]),t}function fE(e){let t=I.forwardRef((t,n)=>{let{children:r,...i}=t,a=null,o=!1,s=[];yE(r)&&typeof CE==`function`&&(r=CE(r._payload)),I.Children.forEach(r,e=>{if(_E(e)){o=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;yE(n)&&typeof CE==`function`&&(n=CE(n._payload)),a=mE(t,n),s.push(a?.props?.children)}else s.push(e)}),a?a=I.cloneElement(a,void 0,s):!o&&I.Children.count(r)===1&&I.isValidElement(r)&&(a=r);let c=a?gE(a):void 0,l=rE(n,c);if(!a){if(r||r===0)throw Error(o?SE(e):xE(e));return r}let u=hE(i,a.props??{});return a.type!==I.Fragment&&(u.ref=n?l:c),I.cloneElement(a,u)});return t.displayName=`${e}.Slot`,t}var pE=Symbol.for(`radix.slottable`),mE=(e,t)=>{if(`child`in e.props){let t=e.props.child;return I.isValidElement(t)?I.cloneElement(t,void 0,e.props.children(t.props.children)):null}return I.isValidElement(t)?t:null};function hE(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function gE(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function _E(e){return I.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===pE}var vE=Symbol.for(`react.lazy`);function yE(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===vE&&`_payload`in e&&bE(e._payload)}function bE(e){return typeof e==`object`&&!!e&&`then`in e}var xE=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,SE=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,CE=I.use,wE=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=fE(`Primitive.${t}`),r=I.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,L.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),TE=`Switch`,[EE,DE]=iE(TE),[OE,kE]=EE(TE);function AE(e){let{__scopeSwitch:t,checked:n,children:r,defaultChecked:i,disabled:a,form:o,name:s,onCheckedChange:c,required:l,value:u=`on`,internal_do_not_use_render:d}=e,[f,p]=sE({prop:n,defaultProp:i??!1,onChange:c,caller:TE}),[m,h]=I.useState(null),[g,_]=I.useState(null),v={checked:f,setChecked:p,disabled:a,control:m,setControl:h,name:s,form:o,value:u,hasConsumerStoppedPropagationRef:I.useRef(!1),required:l,defaultChecked:i,isFormControl:m?!!o||!!m.closest(`form`):!0,bubbleInput:g,setBubbleInput:_};return(0,L.jsx)(OE,{scope:t,...v,children:RE(d)?d(v):r})}var jE=`SwitchTrigger`,ME=I.forwardRef(({__scopeSwitch:e,onClick:t,...n},r)=>{let{control:i,form:a,value:o,disabled:s,checked:c,required:l,setControl:u,setChecked:d,hasConsumerStoppedPropagationRef:f,isFormControl:p,bubbleInput:m}=kE(jE,e),h=rE(r,u),g=I.useRef(c);return I.useEffect(()=>{let e=a?i?.ownerDocument.getElementById(a):i?.form;if(e instanceof HTMLFormElement){let t=()=>d(g.current);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[i,a,d]),(0,L.jsx)(wE.button,{type:`button`,role:`switch`,"aria-checked":c,"aria-required":l,"data-state":zE(c),"data-disabled":s?``:void 0,disabled:s,value:o,...n,ref:h,onClick:eE(t,e=>{d(e=>!e),m&&p&&(f.current=e.isPropagationStopped(),f.current||e.stopPropagation())})})});ME.displayName=jE;var NE=I.forwardRef((e,t)=>{let{__scopeSwitch:n,name:r,checked:i,defaultChecked:a,required:o,disabled:s,value:c,onCheckedChange:l,form:u,...d}=e;return(0,L.jsx)(AE,{__scopeSwitch: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,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(ME,{...d,ref:t,__scopeSwitch:n}),e&&(0,L.jsx)(LE,{__scopeSwitch:n})]})})});NE.displayName=TE;var PE=`SwitchThumb`,FE=I.forwardRef((e,t)=>{let{__scopeSwitch:n,...r}=e,i=kE(PE,n);return(0,L.jsx)(wE.span,{"data-state":zE(i.checked),"data-disabled":i.disabled?``:void 0,...r,ref:t})});FE.displayName=PE;var IE=`SwitchBubbleInput`,LE=I.forwardRef(({__scopeSwitch:e,...t},n)=>{let{control:r,hasConsumerStoppedPropagationRef:i,checked:a,defaultChecked:o,required:s,disabled:c,name:l,value:u,form:d,bubbleInput:f,setBubbleInput:p}=kE(IE,e),m=rE(n,p),h=uE(a),g=dE(r);I.useEffect(()=>{let e=f;if(!e)return;let t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,`checked`).set,r=!i.current;if(h!==a&&n){let t=new Event(`click`,{bubbles:r});n.call(e,a),e.dispatchEvent(t)}},[f,h,a,i]);let _=I.useRef(a);return(0,L.jsx)(wE.input,{type:`checkbox`,"aria-hidden":!0,defaultChecked:o??_.current,required:s,disabled:c,name:l,value:u,form:d,...t,tabIndex:-1,ref:m,style:{...t.style,...g,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0,transform:`translateX(-100%)`}})});LE.displayName=IE;function RE(e){return typeof e==`function`}function zE(e){return e?`checked`:`unchecked`}var BE=I.forwardRef(({className:e,...t},n)=>(0,L.jsx)(NE,{className:H(`peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-[var(--vow-green)] data-[state=unchecked]:bg-border`,e),...t,ref:n,children:(0,L.jsx)(FE,{className:H(`pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0.5`)})}));BE.displayName=NE.displayName;function VE(e){return Object.fromEntries(Object.entries(e).sort(([e],[t])=>e.localeCompare(t)))}function HE(e,t){return e.publicEndpoint===t.publicEndpoint&&e.defaultPriceUsdc===t.defaultPriceUsdc&&JSON.stringify(VE(e.perArtifactTypePrice))===JSON.stringify(VE(t.perArtifactTypePrice))&&e.donation.enabled===t.donation.enabled}function UE({label:e,value:t,meta:n}){return(0,L.jsxs)(`div`,{"data-testid":`operator-donation-fact`,className:`flex min-w-0 flex-col gap-1.5 rounded-lg border border-border px-3.5 py-3`,children:[(0,L.jsx)(`span`,{className:`font-mono text-[11px] font-medium uppercase tracking-[0.14em] text-[var(--fg-dim)]`,children:e}),(0,L.jsx)(`strong`,{className:`font-mono text-[18px] font-medium text-foreground`,children:t}),(0,L.jsx)(`span`,{className:`truncate font-mono text-[12px] text-[var(--fg-dim)]`,children:n})]})}function WE({pricing:e,eligibleRuns:t,peerDatasetsUsed:n,saving:r,onSave:i,registerRevert:a}){let[o,s]=(0,I.useState)(e.donation.enabled),[c,l]=(0,I.useState)(!1),u=(0,I.useMemo)(()=>({publicEndpoint:e.publicEndpoint,defaultPriceUsdc:e.defaultPriceUsdc,perArtifactTypePrice:e.perArtifactTypePrice,donation:{enabled:o}}),[e.defaultPriceUsdc,e.perArtifactTypePrice,e.publicEndpoint,o]),d=!HE(e,u);return(0,L.jsxs)(`div`,{"data-testid":`operator-donation-status`,className:`flex flex-col gap-4`,children:[(0,L.jsxs)(`div`,{className:`flex flex-wrap items-start justify-between gap-4`,children:[(0,L.jsxs)(`div`,{className:`flex min-w-[260px] flex-[1_1_360px] flex-col gap-2`,children:[(0,L.jsx)(`span`,{className:`font-mono text-[11px] font-medium uppercase tracking-[0.14em] text-[var(--fg-dim)]`,children:`Donate execution data`}),(0,L.jsx)(`strong`,{"data-testid":`operator-donation-mode`,className:o?`font-mono text-[18px] font-medium text-[var(--vow-green)]`:`font-mono text-[18px] font-medium text-foreground`,children:o?`Donation is on`:`Donation is off`}),(0,L.jsx)(`p`,{className:`m-0 max-w-[64ch] font-mono text-[12px] leading-relaxed text-[var(--fg-dim)]`,children:`Share scrubbed and anonymized solver/evaluator data from future runs with other operators. This lets the network learn from real executions and improve itself. Public testnet donations are free and published to IPFS.`})]}),(0,L.jsxs)(`label`,{"data-testid":`operator-donation-toggle`,className:`inline-flex cursor-pointer items-center gap-3 rounded-full border border-border bg-[var(--bg-sunken)] px-3 py-2`,children:[(0,L.jsx)(`span`,{className:o?`font-mono text-[11px] uppercase tracking-[0.12em] text-[var(--vow-green)]`:`font-mono text-[11px] uppercase tracking-[0.12em] text-muted-foreground`,children:o?`On`:`Off`}),(0,L.jsx)(BE,{"aria-label":`Donate produced data`,checked:o,onCheckedChange:t=>{if(t&&!o&&!e.donation.enabled){l(!0);return}s(t)}})]})]}),(0,L.jsxs)(`div`,{"data-testid":`operator-donation-facts`,className:`grid gap-2.5 [grid-template-columns:repeat(auto-fit,minmax(150px,1fr))]`,children:[(0,L.jsx)(UE,{label:`Eligible runs`,value:String(t),meta:`local history`}),(0,L.jsx)(UE,{label:`Peer datasets used`,value:String(n),meta:`from other operators`})]}),(0,L.jsx)(mo,{variant:`info`,"data-testid":`operator-donation-caveat`,children:(0,L.jsx)(go,{children:`Turning donation off stops future publishing. Data already published to IPFS may remain available.`})}),(0,L.jsx)(Og,{}),(0,L.jsx)(`div`,{className:`flex flex-wrap items-center justify-end gap-3`,children:(0,L.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,L.jsx)(`span`,{"data-testid":`operator-donation-settings-state`,className:d?`font-mono text-[12px] text-primary`:`font-mono text-[12px] text-[var(--fg-dim)]`,children:d?`Donation changed`:`Current`}),(0,L.jsx)(U,{variant:`default`,size:`sm`,type:`button`,disabled:!d||r,onClick:()=>{let t=e.donation.enabled;o!==t&&a(()=>s(t)),i(u)},children:r?`Saving…`:`Save`})]})}),(0,L.jsx)(SC,{open:c,onOpenChange:l,children:(0,L.jsxs)(TC,{"data-testid":`operator-donation-confirm`,children:[(0,L.jsxs)(EC,{children:[(0,L.jsx)(OC,{children:`Share future execution data`}),(0,L.jsx)(kC,{children:`Future solver/evaluator runs will be scrubbed, anonymized, and published to IPFS so other operators can use them. This helps the network learn from real executions and improve itself. Turning donation off later stops future publishing, but data already published to IPFS may remain available.`})]}),(0,L.jsxs)(DC,{children:[(0,L.jsx)(jC,{children:`Cancel`}),(0,L.jsx)(AC,{onClick:()=>{let e={...u,donation:{enabled:!0}};s(!0),l(!1),a(()=>s(!1)),i(e)},children:`Enable donation`})]})]})})]})}function GE({onRestartPending:e=()=>void 0}){let t=Xe(),{data:n,isLoading:r,isError:i,error:a,refetch:o}=dt({queryKey:[`operator-artifacts`,`served`],queryFn:()=>z.operator.listArtifacts({source:`served`,limit:100}),refetchInterval:1e4}),s=(0,I.useRef)(null),c=e=>{s.current=e},l=ft({mutationFn:e=>z.operator.updatePricing(e),onSuccess:async()=>{s.current=null,fg.success(`Donation setting saved`,{description:`Restart pending — applies on next daemon start.`}),e(),await t.invalidateQueries({queryKey:[`operator-artifacts`]})},onError:e=>{let t=s.current;s.current=null,t?.(),fg.error(`Failed to save donation setting`,{description:e instanceof Error?e.message:String(e)})}}),u=n?.summary,d=u?`${u.served.totalCount} eligible runs · donation ${n?.pricing.donation.enabled?`on`:`off`} · ${u.network.totalCount} peer datasets used`:`Donate scrubbed and anonymized run data to IPFS so other operators can use it.`;return(0,L.jsxs)(W,{children:[(0,L.jsxs)(Li,{className:`flex flex-row items-start justify-between gap-3`,children:[(0,L.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,L.jsxs)(Ri,{className:`flex items-center gap-2`,children:[(0,L.jsx)(Bn,{className:`h-3.5 w-3.5`,"aria-hidden":`true`}),`Data donation`]}),(0,L.jsx)(zi,{children:d})]}),(0,L.jsx)(G,{variant:n?.pricing.donation.enabled?`success`:`outline`,children:n?.pricing.donation.enabled?`IPFS donation on`:`Donation off`})]}),(0,L.jsxs)(Bi,{children:[r&&(0,L.jsxs)(`div`,{"data-testid":`operator-data-market-loading`,className:`flex flex-col gap-3`,"aria-label":`Loading execution data`,children:[(0,L.jsx)(Qd,{className:`h-6 w-40`}),(0,L.jsx)(Qd,{className:`h-4 w-72`}),(0,L.jsx)(Qd,{className:`h-20 w-full`})]}),i&&(0,L.jsxs)(mo,{variant:`blocking`,role:`alert`,"data-testid":`operator-data-market-error`,className:`flex items-center justify-between gap-3`,children:[(0,L.jsx)(ho,{className:`text-[var(--break-red)]`,children:a instanceof Error?a.message:`Failed to load execution data.`}),(0,L.jsxs)(U,{variant:`outline`,size:`sm`,type:`button`,onClick:()=>{o()},children:[(0,L.jsx)(zn,{className:`h-3 w-3`,"aria-hidden":`true`}),`Retry`]})]}),n&&(0,L.jsx)(WE,{pricing:n.pricing,eligibleRuns:n.summary.served.totalCount,peerDatasetsUsed:n.summary.network.totalCount,saving:l.isPending,onSave:e=>l.mutate(e),registerRevert:c},`${n.pricing.publicEndpoint}|${n.pricing.defaultPriceUsdc}|${n.pricing.donation.enabled}|${JSON.stringify(VE(n.pricing.perArtifactTypePrice))}`)]})]})}function KE(e){let t=qE(e),n=I.forwardRef((e,n)=>{let{children:r,...i}=e,a=I.Children.toArray(r),o=a.find(YE);if(o){let e=o.props.children,r=a.map(t=>t===o?I.Children.count(e)>1?I.Children.only(null):I.isValidElement(e)?e.props.children:null:t);return(0,L.jsx)(t,{...i,ref:n,children:I.isValidElement(e)?I.cloneElement(e,void 0,r):null})}return(0,L.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}function qE(e){let t=I.forwardRef((e,t)=>{let{children:n,...r}=e;if(I.isValidElement(n)){let e=ZE(n),i=XE(r,n.props);return n.type!==I.Fragment&&(i.ref=t?Kn(t,e):e),I.cloneElement(n,i)}return I.Children.count(n)>1?I.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var JE=Symbol(`radix.slottable`);function YE(e){return I.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===JE}function XE(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function ZE(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var QE=`Dialog`,[$E,eD]=Ss(QE),[tD,nD]=$E(QE),rD=e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=I.useRef(null),c=I.useRef(null),[l,u]=Xu({prop:r,defaultProp:i??!1,onChange:a,caller:QE});return(0,L.jsx)(tD,{scope:t,triggerRef:s,contentRef:c,contentId:Xs(),titleId:Xs(),descriptionId:Xs(),open:l,onOpenChange:u,onOpenToggle:I.useCallback(()=>u(e=>!e),[u]),modal:o,children:n})};rD.displayName=QE;var iD=`DialogTrigger`,aD=I.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=nD(iD,n),a=qn(t,i.triggerRef);return(0,L.jsx)(As.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.contentId,"data-state":TD(i.open),...r,ref:a,onClick:K(e.onClick,i.onOpenToggle)})});aD.displayName=iD;var oD=`DialogPortal`,[sD,cD]=$E(oD,{forceMount:void 0}),lD=e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=nD(oD,t);return(0,L.jsx)(sD,{scope:t,forceMount:n,children:I.Children.map(r,e=>(0,L.jsx)(Hu,{present:n||a.open,children:(0,L.jsx)(zu,{asChild:!0,container:i,children:e})}))})};lD.displayName=oD;var uD=`DialogOverlay`,dD=I.forwardRef((e,t)=>{let n=cD(uD,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=nD(uD,e.__scopeDialog);return a.modal?(0,L.jsx)(Hu,{present:r||a.open,children:(0,L.jsx)(pD,{...i,ref:t})}):null});dD.displayName=uD;var fD=KE(`DialogOverlay.RemoveScroll`),pD=I.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=nD(uD,n);return(0,L.jsx)(sS,{as:fD,allowPinchZoom:!0,shards:[i.contentRef],children:(0,L.jsx)(As.div,{"data-state":TD(i.open),...r,ref:t,style:{pointerEvents:`auto`,...r.style}})})}),mD=`DialogContent`,hD=I.forwardRef((e,t)=>{let n=cD(mD,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=nD(mD,e.__scopeDialog);return(0,L.jsx)(Hu,{present:r||a.open,children:a.modal?(0,L.jsx)(gD,{...i,ref:t}):(0,L.jsx)(_D,{...i,ref:t})})});hD.displayName=mD;var gD=I.forwardRef((e,t)=>{let n=nD(mD,e.__scopeDialog),r=I.useRef(null),i=qn(t,n.contentRef,r);return I.useEffect(()=>{let e=r.current;if(e)return gS(e)},[]),(0,L.jsx)(vD,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:K(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:K(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:K(e.onFocusOutside,e=>e.preventDefault())})}),_D=I.forwardRef((e,t)=>{let n=nD(mD,e.__scopeDialog),r=I.useRef(!1),i=I.useRef(!1);return(0,L.jsx)(vD,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})}),vD=I.forwardRef((e,t)=>{let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=nD(mD,n),c=I.useRef(null),l=qn(t,c);return ow(),(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(fw,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,L.jsx)(Bs,{role:`dialog`,id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":TD(s.open),...o,ref:l,onDismiss:()=>s.onOpenChange(!1)})}),(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(kD,{titleId:s.titleId}),(0,L.jsx)(jD,{contentRef:c,descriptionId:s.descriptionId})]})]})}),yD=`DialogTitle`,bD=I.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=nD(yD,n);return(0,L.jsx)(As.h2,{id:i.titleId,...r,ref:t})});bD.displayName=yD;var xD=`DialogDescription`,SD=I.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=nD(xD,n);return(0,L.jsx)(As.p,{id:i.descriptionId,...r,ref:t})});SD.displayName=xD;var CD=`DialogClose`,wD=I.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=nD(CD,n);return(0,L.jsx)(As.button,{type:`button`,...r,ref:t,onClick:K(e.onClick,()=>i.onOpenChange(!1))})});wD.displayName=CD;function TD(e){return e?`open`:`closed`}var ED=`DialogTitleWarning`,[DD,OD]=xs(ED,{contentName:mD,titleName:yD,docsSlug:`dialog`}),kD=({titleId:e})=>{let t=OD(ED),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
94
94
|
|
|
95
95
|
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
96
96
|
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
href="https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=JetBrains+Mono:wght@400;500;600&display=swap"
|
|
11
11
|
rel="stylesheet"
|
|
12
12
|
/>
|
|
13
|
-
<script type="module" crossorigin src="/assets/index-
|
|
13
|
+
<script type="module" crossorigin src="/assets/index-Cpf3AbCS.js"></script>
|
|
14
14
|
<link rel="stylesheet" crossorigin href="/assets/index-D7rvJRNa.css">
|
|
15
15
|
</head>
|
|
16
16
|
<body>
|
package/package.json
CHANGED