progon-agent 1.5.0 → 1.5.1
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/extension-bundle.json +3 -3
- package/extension-dist/background/background.js +82 -82
- package/extension-dist/card/card.html +9 -9
- package/extension-dist/card/card.js +3 -9
- package/extension-dist/chunks/shared-B5u-B6Qn.css +1 -0
- package/extension-dist/chunks/shared-BLDboBjL.js +348 -0
- package/extension-dist/chunks/shared-BdUzhaBn.js +39 -0
- package/extension-dist/chunks/{shared-CwsTFlbT.js → shared-Bl2B_Px5.js} +1 -1
- package/extension-dist/chunks/shared-CD1T06ac.js +98 -0
- package/extension-dist/chunks/shared-CDXdhl3P.js +8 -0
- package/extension-dist/chunks/shared-CVlB4Tu3.js +15 -0
- package/extension-dist/chunks/{shared-C7IWMwZY.js → shared-Cz00vYCW.js} +1 -1
- package/extension-dist/chunks/shared-D8QWnY4m.css +1 -0
- package/extension-dist/chunks/shared-DDffpwXS.js +134 -0
- package/extension-dist/chunks/shared-D_QceNk9.js +254 -0
- package/extension-dist/chunks/shared-Dp2jkJ8R.js +1 -0
- package/extension-dist/chunks/shared-Jcq39euZ.js +199 -0
- package/extension-dist/chunks/shared-R5ipc0Sn.js +1 -0
- package/extension-dist/chunks/shared-eZL18n5t.css +1 -0
- package/extension-dist/chunks/shared-gwUGKre-.js +1 -0
- package/extension-dist/chunks/shared-kKZVALIt.js +1 -0
- package/extension-dist/chunks/shared-nJgqlX01.js +1 -0
- package/extension-dist/chunks/shared-q9EK7cIP.js +1 -0
- package/extension-dist/chunks/shared-tcQ7xPb-.js +1 -0
- package/extension-dist/content/content.css +1 -1
- package/extension-dist/content/content.js +284 -220
- package/extension-dist/manifest.json +32 -30
- package/extension-dist/offscreen/offscreen.html +2 -2
- package/extension-dist/offscreen/offscreen.js +1 -1
- package/extension-dist/popup/popup.html +8 -8
- package/extension-dist/popup/popup.js +3 -9
- package/extension-dist/sidepanel/sidepanel.css +1 -1
- package/extension-dist/sidepanel/sidepanel.html +11 -11
- package/extension-dist/sidepanel/sidepanel.js +1 -1
- package/extension-dist/workspace/workspace.css +1 -1
- package/extension-dist/workspace/workspace.html +12 -12
- package/extension-dist/workspace/workspace.js +170 -46
- package/package.json +2 -2
- package/extension-dist/chunks/shared-73iHxv_g.js +0 -1
- package/extension-dist/chunks/shared-BRaGK72I.css +0 -1
- package/extension-dist/chunks/shared-Beih6ywL.js +0 -1
- package/extension-dist/chunks/shared-BgEO6Nif.js +0 -39
- package/extension-dist/chunks/shared-ByZxg79I.js +0 -1
- package/extension-dist/chunks/shared-CFEBqIm7.js +0 -21
- package/extension-dist/chunks/shared-CKtbh_44.js +0 -199
- package/extension-dist/chunks/shared-CSBwVLDL.js +0 -1
- package/extension-dist/chunks/shared-CeI71eLt.js +0 -134
- package/extension-dist/chunks/shared-CfjrOLG1.js +0 -336
- package/extension-dist/chunks/shared-CgUMEof2.js +0 -1
- package/extension-dist/chunks/shared-D-c-eSoI.js +0 -1
- package/extension-dist/chunks/shared-DXp1f_Ub.css +0 -1
- package/extension-dist/chunks/shared-Dk6zuyaK.css +0 -1
- package/extension-dist/chunks/shared-RcZD4SR-.js +0 -1
- package/extension-dist/chunks/shared-lM00HeT6.js +0 -98
- package/extension-dist/chunks/shared-t8TH2XkL.js +0 -239
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
var e=Object.freeze({status:`aborted`});function t(e,t,n){function r(n,r){if(n._zod||Object.defineProperty(n,"_zod",{value:{def:r,constr:o,traits:/* @__PURE__ */ 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==null?void 0:n.Parent)??Object;class a extends i{}Object.defineProperty(a,"name",{value:e});function o(e){var t;let i=n!=null&&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=>{var r;return n!=null&&n.Parent&&t instanceof n.Parent?!0:t==null||(r=t._zod)==null||(r=r.traits)==null?void 0:r.has(e)}}),Object.defineProperty(o,"name",{value:e}),o}var n=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},r=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}},i={};function a(e){return e&&Object.assign(i,e),i}function o(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function s(e,t){return typeof t==`bigint`?t.toString():t}function c(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function l(e){return e==null}function u(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function ee(e,t){let n=(e.toString().split(`.`)[1]||``).length,r=t.toString(),i=(r.split(`.`)[1]||``).length;if(i===0&&/\d?e-\d?/.test(r)){let e=r.match(/\d?e-(\d?)/);e!=null&&e[1]&&(i=Number.parseInt(e[1]))}let a=n>i?n:i;return Number.parseInt(e.toFixed(a).replace(`.`,``))%Number.parseInt(t.toFixed(a).replace(`.`,``))/10**a}var d=Symbol(`evaluating`);function f(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==d)return r===void 0&&(r=d,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function te(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function p(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function ne(e){return JSON.stringify(e)}function re(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var ie=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function ae(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var oe=c(()=>{var e;if(typeof navigator<`u`&&(e=navigator)!=null&&(e=e.userAgent)!=null&&e.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function se(e){if(ae(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return ae(n)!==!1&&Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)!==!1}function ce(e){return se(e)?{...e}:Array.isArray(e)?[...e]:e}var le=/* @__PURE__ */ new Set([`string`,`number`,`symbol`]),ue=/* @__PURE__ */ new Set([`string`,`number`,`bigint`,`boolean`,`symbol`,`undefined`]);function de(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function m(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n!=null&&n.parent)&&(r._zod.parent=e),r}function h(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if((t==null?void 0:t.message)!==void 0){if((t==null?void 0: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 fe(e){return Object.keys(e).filter(t=>e[t]._zod.optin===`optional`&&e[t]._zod.optout===`optional`)}var pe={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function me(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);return m(e,p(e._zod.def,{get shape(){let e={};for(let r in t){if(!(r in n.shape))throw Error(`Unrecognized key: "${r}"`);t[r]&&(e[r]=n.shape[r])}return te(this,`shape`,e),e},checks:[]}))}function he(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);return m(e,p(e._zod.def,{get shape(){let r={...e._zod.def.shape};for(let e in t){if(!(e in n.shape))throw Error(`Unrecognized key: "${e}"`);t[e]&&delete r[e]}return te(this,`shape`,r),r},checks:[]}))}function ge(e,t){if(!se(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=e._zod.def.shape;for(let e in t)if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return m(e,p(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return te(this,`shape`,n),n}}))}function _e(e,t){if(!se(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return m(e,p(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return te(this,`shape`,n),n}}))}function ve(e,t){return m(e,p(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return te(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:[]}))}function ye(e,t,n){let r=t._zod.def.checks;if(r&&r.length>0)throw Error(`.partial() cannot be used on object schemas containing refinements`);return m(t,p(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in r))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t])}else for(let t in r)i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t];return te(this,`shape`,i),i},checks:[]}))}function be(e,t,n){return m(t,p(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in i))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=new e({type:`nonoptional`,innerType:r[t]}))}else for(let t in r)i[t]=new e({type:`nonoptional`,innerType:r[t]});return te(this,`shape`,i),i}}))}function xe(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++){var n;if(((n=e.issues[r])==null?void 0:n.continue)!==!0)return!0}return!1}function g(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function Se(e){return typeof e==`string`?e:e==null?void 0:e.message}function _(e,t,n){let r={...e,path:e.path??[]};if(!e.message){var i,a,o,s,c;r.message=Se((i=e.inst)==null||(i=i._zod.def)==null||(a=i.error)==null?void 0:a.call(i,e))??Se(t==null||(o=t.error)==null?void 0:o.call(t,e))??Se((s=n.customError)==null?void 0:s.call(n,e))??Se((c=n.localeError)==null?void 0:c.call(n,e))??`Invalid input`}return delete r.inst,delete r.continue,t!=null&&t.reportInput||delete r.input,r}function Ce(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function we(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}var Te=(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,s,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Ee=t(`$ZodError`,Te),De=t(`$ZodError`,Te,{Parent:Error});function Oe(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}function ke(e,t=e=>e.message){let n={_errors:[]},r=e=>{for(let i of e.issues)if(i.code===`invalid_union`&&i.errors.length)i.errors.map(e=>r({issues:e}));else if(i.code===`invalid_key`)r({issues:i.issues});else if(i.code===`invalid_element`)r({issues:i.issues});else if(i.path.length===0)n._errors.push(t(i));else{let e=n,r=0;for(;r<i.path.length;){let n=i.path[r];r===i.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(i))):e[n]=e[n]||{_errors:[]},e=e[n],r++}}};return r(e),n}var Ae=e=>(t,r,i,o)=>{let s=i?Object.assign(i,{async:!1}):{async:!1},c=t._zod.run({value:r,issues:[]},s);if(c instanceof Promise)throw new n;if(c.issues.length){let t=new((o==null?void 0:o.Err)??e)(c.issues.map(e=>_(e,s,a())));throw ie(t,o==null?void 0:o.callee),t}return c.value},je=e=>async(t,n,r,i)=>{let o=r?Object.assign(r,{async:!0}):{async:!0},s=t._zod.run({value:n,issues:[]},o);if(s instanceof Promise&&(s=await s),s.issues.length){let t=new((i==null?void 0:i.Err)??e)(s.issues.map(e=>_(e,o,a())));throw ie(t,i==null?void 0:i.callee),t}return s.value},Me=e=>(t,r,i)=>{let o=i?{...i,async:!1}:{async:!1},s=t._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new n;return s.issues.length?{success:!1,error:new(e??Ee)(s.issues.map(e=>_(e,o,a())))}:{success:!0,data:s.value}},Ne=/* @__PURE__*/ Me(De),Pe=e=>async(t,n,r)=>{let i=r?Object.assign(r,{async:!0}):{async:!0},o=t._zod.run({value:n,issues:[]},i);return o instanceof Promise&&(o=await o),o.issues.length?{success:!1,error:new e(o.issues.map(e=>_(e,i,a())))}:{success:!0,data:o.value}},Fe=/* @__PURE__*/ Pe(De),Ie=e=>(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return Ae(e)(t,n,i)},Le=e=>(t,n,r)=>Ae(e)(t,n,r),Re=e=>async(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return je(e)(t,n,i)},ze=e=>async(t,n,r)=>je(e)(t,n,r),Be=e=>(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return Me(e)(t,n,i)},Ve=e=>(t,n,r)=>Me(e)(t,n,r),He=e=>async(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return Pe(e)(t,n,i)},Ue=e=>async(t,n,r)=>Pe(e)(t,n,r),We=/^[cC][^\s-]{8,}$/,Ge=/^[0-9a-z]+$/,Ke=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,qe=/^[0-9a-vA-V]{20}$/,Je=/^[A-Za-z0-9]{27}$/,Ye=/^[a-zA-Z0-9_-]{21}$/,Xe=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Ze=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Qe=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,$e=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,et=`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`;function tt(){return new RegExp(et,`u`)}var nt=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,rt=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,it=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,at=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,ot=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,st=/^[A-Za-z0-9_-]*$/,ct=/^\+[1-9]\d{6,14}$/,lt=`(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`,ut=/*@__PURE__*/ RegExp(`^${lt}$`);function dt(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function ft(e){return RegExp(`^${dt(e)}$`)}function pt(e){let t=dt({precision:e.precision}),n=[`Z`];e.local&&n.push(``),e.offset&&n.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let r=`${t}(?:${n.join(`|`)})`;return RegExp(`^${lt}T(?:${r})$`)}var mt=e=>{let t=e?`[\\s\\S]{${(e==null?void 0:e.minimum)??0},${(e==null?void 0:e.maximum)??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},ht=/^-?\d+n?$/,gt=/^-?\d+$/,_t=/^-?\d+(?:\.\d+)?$/,vt=/^(?:true|false)$/i,yt=/^null$/i,bt=/^[^A-Z]*$/,xt=/^[^a-z]*$/,v=/*@__PURE__*/ t(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),St={number:`number`,bigint:`bigint`,object:`date`},Ct=/*@__PURE__*/ t(`$ZodCheckLessThan`,(e,t)=>{v.init(e,t);let n=St[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})}}),wt=/*@__PURE__*/ t(`$ZodCheckGreaterThan`,(e,t)=>{v.init(e,t);let n=St[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})}}),Tt=/*@__PURE__*/ t(`$ZodCheckMultipleOf`,(e,t)=>{v.init(e,t),e._zod.onattach.push(e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?n.value%t.value===BigInt(0):ee(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),Et=/*@__PURE__*/ t(`$ZodCheckNumberFormat`,(e,t)=>{var n;v.init(e,t),t.format=t.format||`float64`;let r=(n=t.format)==null?void 0:n.includes(`int`),i=r?`int`:`number`,[a,o]=pe[t.format];e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,n.minimum=a,n.maximum=o,r&&(n.pattern=gt)}),e._zod.check=n=>{let s=n.value;if(r){if(!Number.isInteger(s)){n.issues.push({expected:i,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?n.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:i,inclusive:!0,continue:!t.abort}):n.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:i,inclusive:!0,continue:!t.abort});return}}s<a&&n.issues.push({origin:`number`,input:s,code:`too_small`,minimum:a,inclusive:!0,inst:e,continue:!t.abort}),s>o&&n.issues.push({origin:`number`,input:s,code:`too_big`,maximum:o,inclusive:!0,inst:e,continue:!t.abort})}}),Dt=/*@__PURE__*/ t(`$ZodCheckMaxLength`,(e,t)=>{var n;v.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!l(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let r=n.value;if(r.length<=t.maximum)return;let i=Ce(r);n.issues.push({origin:i,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Ot=/*@__PURE__*/ t(`$ZodCheckMinLength`,(e,t)=>{var n;v.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!l(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;if(r.length>=t.minimum)return;let i=Ce(r);n.issues.push({origin:i,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),kt=/*@__PURE__*/ t(`$ZodCheckLengthEquals`,(e,t)=>{var n;v.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!l(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{let r=n.value,i=r.length;if(i===t.length)return;let a=Ce(r),o=i>t.length;n.issues.push({origin:a,...o?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),At=/*@__PURE__*/ t(`$ZodCheckStringFormat`,(e,t)=>{var n,r;v.init(e,t),e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??=/* @__PURE__ */ 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=()=>{})}),jt=/*@__PURE__*/ t(`$ZodCheckRegex`,(e,t)=>{At.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})}}),Mt=/*@__PURE__*/ t(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=bt,At.init(e,t)}),Nt=/*@__PURE__*/ t(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=xt,At.init(e,t)}),Pt=/*@__PURE__*/ t(`$ZodCheckIncludes`,(e,t)=>{v.init(e,t);let n=de(t.includes),r=new RegExp(typeof t.position==`number`?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=/* @__PURE__ */ new Set,t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),Ft=/*@__PURE__*/ t(`$ZodCheckStartsWith`,(e,t)=>{v.init(e,t);let n=RegExp(`^${de(t.prefix)}.*`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=/* @__PURE__ */ new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),It=/*@__PURE__*/ t(`$ZodCheckEndsWith`,(e,t)=>{v.init(e,t);let n=RegExp(`.*${de(t.suffix)}$`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=/* @__PURE__ */ new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),Lt=/*@__PURE__*/ t(`$ZodCheckOverwrite`,(e,t)=>{v.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),Rt=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),--this.indent}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`
|
|
2
|
+
`).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>` `.repeat(this.indent*2)+e);for(let e of r)this.content.push(e)}compile(){var e,t;let n=Function,r=(e=this)==null?void 0:e.args,i=[...(((t=this)==null?void 0:t.content)??[``]).map(e=>` ${e}`)];return new n(...r,i.join(`
|
|
3
|
+
`))}},zt={major:4,minor:3,patch:6},y=/*@__PURE__*/ t(`$ZodType`,(e,t)=>{var r;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=zt;let i=[...e._zod.def.checks??[]];e._zod.traits.has(`$ZodCheck`)&&i.unshift(e);for(let t of i)for(let n of t._zod.onattach)n(e);if(i.length===0){var a;(r=e._zod).deferred??(r.deferred=[]),(a=e._zod.deferred)==null||a.push(()=>{e._zod.run=e._zod.parse})}else{let t=(e,t,r)=>{let i=xe(e),a;for(let o of t){if(o._zod.def.when){if(!o._zod.def.when(e))continue}else if(i)continue;let t=e.issues.length,s=o._zod.check(e);if(s instanceof Promise&&(r==null?void 0:r.async)===!1)throw new n;if(a||s instanceof Promise)a=(a??Promise.resolve()).then(async()=>{await s,e.issues.length!==t&&(i||=xe(e,t))});else{if(e.issues.length===t)continue;i||=xe(e,t)}}return a?a.then(()=>e):e},r=(r,a,o)=>{if(xe(r))return r.aborted=!0,r;let s=t(a,i,o);if(s instanceof Promise){if(o.async===!1)throw new n;return s.then(t=>e._zod.parse(t,o))}return e._zod.parse(s,o)};e._zod.run=(a,o)=>{if(o.skipChecks)return e._zod.parse(a,o);if(o.direction===`backward`){let t=e._zod.parse({value:a.value,issues:[]},{...o,skipChecks:!0});return t instanceof Promise?t.then(e=>r(e,a,o)):r(t,a,o)}let s=e._zod.parse(a,o);if(s instanceof Promise){if(o.async===!1)throw new n;return s.then(e=>t(e,i,o))}return t(s,i,o)}}f(e,`~standard`,()=>({validate:t=>{try{var n;let r=Ne(e,t);return r.success?{value:r.data}:{issues:(n=r.error)==null?void 0:n.issues}}catch{return Fe(e,t).then(e=>{var t;return e.success?{value:e.data}:{issues:(t=e.error)==null?void 0:t.issues}})}},vendor:`zod`,version:1}))}),Bt=/*@__PURE__*/ t(`$ZodString`,(e,t)=>{var n;y.init(e,t),e._zod.pattern=[...(e==null||(n=e._zod.bag)==null?void 0:n.patterns)??[]].pop()??mt(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}}),b=/*@__PURE__*/ t(`$ZodStringFormat`,(e,t)=>{At.init(e,t),Bt.init(e,t)}),Vt=/*@__PURE__*/ t(`$ZodGUID`,(e,t)=>{t.pattern??=Ze,b.init(e,t)}),Ht=/*@__PURE__*/ t(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=Qe(e)}else t.pattern??=Qe();b.init(e,t)}),Ut=/*@__PURE__*/ t(`$ZodEmail`,(e,t)=>{t.pattern??=$e,b.init(e,t)}),Wt=/*@__PURE__*/ t(`$ZodURL`,(e,t)=>{b.init(e,t),e._zod.check=n=>{try{let r=n.value.trim(),i=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(`:`)?i.protocol.slice(0,-1):i.protocol)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),n.value=t.normalize?i.href:r;return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),Gt=/*@__PURE__*/ t(`$ZodEmoji`,(e,t)=>{t.pattern??=tt(),b.init(e,t)}),Kt=/*@__PURE__*/ t(`$ZodNanoID`,(e,t)=>{t.pattern??=Ye,b.init(e,t)}),qt=/*@__PURE__*/ t(`$ZodCUID`,(e,t)=>{t.pattern??=We,b.init(e,t)}),Jt=/*@__PURE__*/ t(`$ZodCUID2`,(e,t)=>{t.pattern??=Ge,b.init(e,t)}),Yt=/*@__PURE__*/ t(`$ZodULID`,(e,t)=>{t.pattern??=Ke,b.init(e,t)}),Xt=/*@__PURE__*/ t(`$ZodXID`,(e,t)=>{t.pattern??=qe,b.init(e,t)}),Zt=/*@__PURE__*/ t(`$ZodKSUID`,(e,t)=>{t.pattern??=Je,b.init(e,t)}),Qt=/*@__PURE__*/ t(`$ZodISODateTime`,(e,t)=>{t.pattern??=pt(t),b.init(e,t)}),$t=/*@__PURE__*/ t(`$ZodISODate`,(e,t)=>{t.pattern??=ut,b.init(e,t)}),en=/*@__PURE__*/ t(`$ZodISOTime`,(e,t)=>{t.pattern??=ft(t),b.init(e,t)}),tn=/*@__PURE__*/ t(`$ZodISODuration`,(e,t)=>{t.pattern??=Xe,b.init(e,t)}),nn=/*@__PURE__*/ t(`$ZodIPv4`,(e,t)=>{t.pattern??=nt,b.init(e,t),e._zod.bag.format=`ipv4`}),rn=/*@__PURE__*/ t(`$ZodIPv6`,(e,t)=>{t.pattern??=rt,b.init(e,t),e._zod.bag.format=`ipv6`,e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}}),an=/*@__PURE__*/ t(`$ZodCIDRv4`,(e,t)=>{t.pattern??=it,b.init(e,t)}),on=/*@__PURE__*/ t(`$ZodCIDRv6`,(e,t)=>{t.pattern??=at,b.init(e,t),e._zod.check=n=>{let r=n.value.split(`/`);try{if(r.length!==2)throw Error();let[e,t]=r;if(!t)throw Error();let n=Number(t);if(`${n}`!==t||n<0||n>128)throw Error();new URL(`http://[${e}]`)}catch{n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}}});function sn(e){if(e===``)return!0;if(e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}var cn=/*@__PURE__*/ t(`$ZodBase64`,(e,t)=>{t.pattern??=ot,b.init(e,t),e._zod.bag.contentEncoding=`base64`,e._zod.check=n=>{sn(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}});function ln(e){if(!st.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return sn(t.padEnd(Math.ceil(t.length/4)*4,`=`))}var un=/*@__PURE__*/ t(`$ZodBase64URL`,(e,t)=>{t.pattern??=st,b.init(e,t),e._zod.bag.contentEncoding=`base64url`,e._zod.check=n=>{ln(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),dn=/*@__PURE__*/ t(`$ZodE164`,(e,t)=>{t.pattern??=ct,b.init(e,t)});function fn(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&(i==null?void 0:i.typ)!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}var pn=/*@__PURE__*/ t(`$ZodJWT`,(e,t)=>{b.init(e,t),e._zod.check=n=>{fn(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),mn=/*@__PURE__*/ t(`$ZodNumber`,(e,t)=>{y.init(e,t),e._zod.pattern=e._zod.bag.pattern??_t,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}}),hn=/*@__PURE__*/ t(`$ZodNumberFormat`,(e,t)=>{Et.init(e,t),mn.init(e,t)}),gn=/*@__PURE__*/ t(`$ZodBoolean`,(e,t)=>{y.init(e,t),e._zod.pattern=vt,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let i=n.value;return typeof i==`boolean`||n.issues.push({expected:`boolean`,code:`invalid_type`,input:i,inst:e}),n}}),_n=/*@__PURE__*/ t(`$ZodBigInt`,(e,t)=>{y.init(e,t),e._zod.pattern=ht,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=BigInt(n.value)}catch{}return typeof n.value==`bigint`||n.issues.push({expected:`bigint`,code:`invalid_type`,input:n.value,inst:e}),n}}),vn=/*@__PURE__*/ t(`$ZodNull`,(e,t)=>{y.init(e,t),e._zod.pattern=yt,e._zod.values=/* @__PURE__ */ new Set([null]),e._zod.parse=(t,n)=>{let r=t.value;return r===null||t.issues.push({expected:`null`,code:`invalid_type`,input:r,inst:e}),t}}),yn=/*@__PURE__*/ t(`$ZodUnknown`,(e,t)=>{y.init(e,t),e._zod.parse=e=>e}),bn=/*@__PURE__*/ t(`$ZodNever`,(e,t)=>{y.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)});function xn(e,t,n){e.issues.length&&t.issues.push(...g(n,e.issues)),t.value[n]=e.value}var Sn=/*@__PURE__*/ t(`$ZodArray`,(e,t)=>{y.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!Array.isArray(i))return n.issues.push({expected:`array`,code:`invalid_type`,input:i,inst:e}),n;n.value=Array(i.length);let a=[];for(let e=0;e<i.length;e++){let o=i[e],s=t.element._zod.run({value:o,issues:[]},r);s instanceof Promise?a.push(s.then(t=>xn(t,n,e))):xn(s,n,e)}return a.length?Promise.all(a).then(()=>n):n}});function Cn(e,t,n,r,i){if(e.issues.length){if(i&&!(n in r))return;t.issues.push(...g(n,e.issues))}e.value===void 0?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function wn(e){let t=Object.keys(e.shape);for(let r of t){var n;if(!((n=e.shape)!=null&&(n=n[r])!=null&&(n=n._zod)!=null&&(n=n.traits)!=null&&n.has(`$ZodType`)))throw Error(`Invalid element at key "${r}": expected a Zod schema`)}let r=fe(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}function Tn(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=>Cn(e,n,i,t,u))):Cn(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 En=/*@__PURE__*/ t(`$ZodObject`,(e,t)=>{y.init(e,t);let n=Object.getOwnPropertyDescriptor(t,`shape`);if(!(n!=null&&n.get)){let e=t.shape;Object.defineProperty(t,"shape",{get:()=>{let n={...e};return Object.defineProperty(t,"shape",{value:n}),n}})}let r=c(()=>wn(t));f(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]=/* @__PURE__ */ new Set);for(let e of r.values)n[t].add(e)}}return n});let i=ae,a=t.catchall,o;e._zod.parse=(t,n)=>{o??=r.value;let s=t.value;if(!i(s))return t.issues.push({expected:`object`,code:`invalid_type`,input:s,inst:e}),t;t.value={};let c=[],l=o.shape;for(let e of o.keys){let r=l[e],i=r._zod.optout===`optional`,a=r._zod.run({value:s[e],issues:[]},n);a instanceof Promise?c.push(a.then(n=>Cn(n,t,e,s,i))):Cn(a,t,e,s,i)}return a?Tn(c,s,t,n,r.value,e):c.length?Promise.all(c).then(()=>t):t}}),Dn=/*@__PURE__*/ t(`$ZodObjectJIT`,(e,t)=>{En.init(e,t);let n=e._zod.parse,r=c(()=>wn(t)),a=e=>{let t=new Rt([`shape`,`payload`,`ctx`]),n=r.value,i=e=>{let t=ne(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write(`const input = payload.value;`);let a=Object.create(null),o=0;for(let e of n.keys)a[e]=`key_${o++}`;t.write(`const newResult = {};`);for(let r of n.keys){var s;let n=a[r],o=ne(r),c=e[r],l=(c==null||(s=c._zod)==null?void 0:s.optout)===`optional`;t.write(`const ${n} = ${i(r)};`),l?t.write(`
|
|
4
|
+
if (${n}.issues.length) {
|
|
5
|
+
if (${o} in input) {
|
|
6
|
+
payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
|
|
7
|
+
...iss,
|
|
8
|
+
path: iss.path ? [${o}, ...iss.path] : [${o}]
|
|
9
|
+
})));
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
if (${n}.value === undefined) {
|
|
14
|
+
if (${o} in input) {
|
|
15
|
+
newResult[${o}] = undefined;
|
|
16
|
+
}
|
|
17
|
+
} else {
|
|
18
|
+
newResult[${o}] = ${n}.value;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
`):t.write(`
|
|
22
|
+
if (${n}.issues.length) {
|
|
23
|
+
payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
|
|
24
|
+
...iss,
|
|
25
|
+
path: iss.path ? [${o}, ...iss.path] : [${o}]
|
|
26
|
+
})));
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
if (${n}.value === undefined) {
|
|
30
|
+
if (${o} in input) {
|
|
31
|
+
newResult[${o}] = undefined;
|
|
32
|
+
}
|
|
33
|
+
} else {
|
|
34
|
+
newResult[${o}] = ${n}.value;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
`)}t.write(`payload.value = newResult;`),t.write(`return payload;`);let c=t.compile();return(t,n)=>c(e,t,n)},o,s=ae,l=!i.jitless,u=l&&oe.value,ee=t.catchall,d;e._zod.parse=(i,c)=>{d??=r.value;let f=i.value;return s(f)?l&&u&&(c==null?void 0:c.async)===!1&&c.jitless!==!0?(o||=a(t.shape),i=o(i,c),ee?Tn([],f,i,c,d,e):i):n(i,c):(i.issues.push({expected:`object`,code:`invalid_type`,input:f,inst:e}),i)}});function On(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!xe(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>_(e,r,a())))}),t)}var kn=/*@__PURE__*/ t(`$ZodUnion`,(e,t)=>{y.init(e,t),f(e._zod,`optin`,()=>t.options.some(e=>e._zod.optin===`optional`)?`optional`:void 0),f(e._zod,`optout`,()=>t.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),f(e._zod,`values`,()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),f(e._zod,`pattern`,()=>{if(t.options.every(e=>e._zod.pattern)){let e=t.options.map(e=>e._zod.pattern);return RegExp(`^(${e.map(e=>u(e.source)).join(`|`)})$`)}});let n=t.options.length===1,r=t.options[0]._zod.run;e._zod.parse=(i,a)=>{if(n)return r(i,a);let o=!1,s=[];for(let e of t.options){let t=e._zod.run({value:i.value,issues:[]},a);if(t instanceof Promise)s.push(t),o=!0;else{if(t.issues.length===0)return t;s.push(t)}}return o?Promise.all(s).then(t=>On(t,i,e,a)):On(s,i,e,a)}}),An=/*@__PURE__*/ t(`$ZodDiscriminatedUnion`,(e,t)=>{t.inclusive=!1,kn.init(e,t);let n=e._zod.parse;f(e._zod,`propValues`,()=>{let e={};for(let n of t.options){let r=n._zod.propValues;if(!r||Object.keys(r).length===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(n)}"`);for(let[t,n]of Object.entries(r)){e[t]||(e[t]=/* @__PURE__ */ new Set);for(let r of n)e[t].add(r)}}return e});let r=c(()=>{let e=t.options,n=/* @__PURE__ */ new Map;for(let i of e){var r;let e=(r=i._zod.propValues)==null?void 0:r[t.discriminator];if(!e||e.size===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(i)}"`);for(let t of e){if(n.has(t))throw Error(`Duplicate discriminator value "${String(t)}"`);n.set(t,i)}}return n});e._zod.parse=(i,a)=>{let o=i.value;if(!ae(o))return i.issues.push({code:`invalid_type`,expected:`object`,input:o,inst:e}),i;let s=r.value.get(o==null?void 0:o[t.discriminator]);return s?s._zod.run(i,a):t.unionFallback?n(i,a):(i.issues.push({code:`invalid_union`,errors:[],note:`No matching discriminator`,discriminator:t.discriminator,input:o,path:[t.discriminator],inst:e}),i)}}),jn=/*@__PURE__*/ t(`$ZodIntersection`,(e,t)=>{y.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>Nn(e,t,n)):Nn(e,i,a)}});function Mn(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(se(e)&&se(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};for(let n of r){let r=Mn(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=Mn(i,a);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function Nn(e,t,n){let r=/* @__PURE__ */ new Map,i;for(let n of t.issues)if(n.code===`unrecognized_keys`){i??=n;for(let e of n.keys)r.has(e)||r.set(e,{}),r.get(e).l=!0}else e.issues.push(n);for(let t of n.issues)if(t.code===`unrecognized_keys`)for(let e of t.keys)r.has(e)||r.set(e,{}),r.get(e).r=!0;else e.issues.push(t);let a=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(a.length&&i&&e.issues.push({...i,keys:a}),xe(e))return e;let o=Mn(t.value,n.value);if(!o.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}var Pn=/*@__PURE__*/ t(`$ZodTuple`,(e,t)=>{y.init(e,t);let n=t.items;e._zod.parse=(r,i)=>{let a=r.value;if(!Array.isArray(a))return r.issues.push({input:a,inst:e,expected:`tuple`,code:`invalid_type`}),r;r.value=[];let o=[],s=[...n].reverse().findIndex(e=>e._zod.optin!==`optional`),c=s===-1?0:n.length-s;if(!t.rest){let t=a.length>n.length,i=a.length<c-1;if(t||i)return r.issues.push({...t?{code:`too_big`,maximum:n.length,inclusive:!0}:{code:`too_small`,minimum:n.length},input:a,inst:e,origin:`array`}),r}let l=-1;for(let e of n){if(l++,l>=a.length&&l>=c)continue;let t=e._zod.run({value:a[l],issues:[]},i);t instanceof Promise?o.push(t.then(e=>Fn(e,r,l))):Fn(t,r,l)}if(t.rest){let e=a.slice(n.length);for(let n of e){l++;let e=t.rest._zod.run({value:n,issues:[]},i);e instanceof Promise?o.push(e.then(e=>Fn(e,r,l))):Fn(e,r,l)}}return o.length?Promise.all(o).then(()=>r):r}});function Fn(e,t,n){e.issues.length&&t.issues.push(...g(n,e.issues)),t.value[n]=e.value}var In=/*@__PURE__*/ t(`$ZodRecord`,(e,t)=>{y.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!se(i))return n.issues.push({expected:`record`,code:`invalid_type`,input:i,inst:e}),n;let o=[],s=t.keyType._zod.values;if(s){n.value={};let a=/* @__PURE__ */ new Set;for(let e of s)if(typeof e==`string`||typeof e==`number`||typeof e==`symbol`){a.add(typeof e==`number`?e.toString():e);let s=t.valueType._zod.run({value:i[e],issues:[]},r);s instanceof Promise?o.push(s.then(t=>{t.issues.length&&n.issues.push(...g(e,t.issues)),n.value[e]=t.value})):(s.issues.length&&n.issues.push(...g(e,s.issues)),n.value[e]=s.value)}let c;for(let e in i)a.has(e)||(c??=[],c.push(e));c&&c.length>0&&n.issues.push({code:`unrecognized_keys`,input:i,inst:e,keys:c})}else{n.value={};for(let s of Reflect.ownKeys(i)){if(s===`__proto__`)continue;let c=t.keyType._zod.run({value:s,issues:[]},r);if(c instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(typeof s==`string`&&_t.test(s)&&c.issues.length){let e=t.keyType._zod.run({value:Number(s),issues:[]},r);if(e instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);e.issues.length===0&&(c=e)}if(c.issues.length){t.mode===`loose`?n.value[s]=i[s]:n.issues.push({code:`invalid_key`,origin:`record`,issues:c.issues.map(e=>_(e,r,a())),input:s,path:[s],inst:e});continue}let l=t.valueType._zod.run({value:i[s],issues:[]},r);l instanceof Promise?o.push(l.then(e=>{e.issues.length&&n.issues.push(...g(s,e.issues)),n.value[c.value]=e.value})):(l.issues.length&&n.issues.push(...g(s,l.issues)),n.value[c.value]=l.value)}}return o.length?Promise.all(o).then(()=>n):n}}),Ln=/*@__PURE__*/ t(`$ZodEnum`,(e,t)=>{y.init(e,t);let n=o(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=RegExp(`^(${n.filter(e=>le.has(typeof e)).map(e=>typeof e==`string`?de(e):e.toString()).join(`|`)})$`),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),Rn=/*@__PURE__*/ t(`$ZodLiteral`,(e,t)=>{if(y.init(e,t),t.values.length===0)throw Error(`Cannot create literal schema with no valid values`);let n=new Set(t.values);e._zod.values=n,e._zod.pattern=RegExp(`^(${t.values.map(e=>typeof e==`string`?de(e):e?de(e.toString()):String(e)).join(`|`)})$`),e._zod.parse=(r,i)=>{let a=r.value;return n.has(a)||r.issues.push({code:`invalid_value`,values:t.values,input:a,inst:e}),r}}),zn=/*@__PURE__*/ t(`$ZodTransform`,(e,t)=>{y.init(e,t),e._zod.parse=(i,a)=>{if(a.direction===`backward`)throw new r(e.constructor.name);let o=t.transform(i.value,i);if(a.async)return(o instanceof Promise?o:Promise.resolve(o)).then(e=>(i.value=e,i));if(o instanceof Promise)throw new n;return i.value=o,i}});function Bn(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}var Vn=/*@__PURE__*/ t(`$ZodOptional`,(e,t)=>{y.init(e,t),e._zod.optin=`optional`,e._zod.optout=`optional`,f(e._zod,`values`,()=>t.innerType._zod.values?/* @__PURE__ */ new Set([...t.innerType._zod.values,void 0]):void 0),f(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${u(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=>Bn(t,e.value)):Bn(r,e.value)}return e.value===void 0?e:t.innerType._zod.run(e,n)}}),Hn=/*@__PURE__*/ t(`$ZodExactOptional`,(e,t)=>{Vn.init(e,t),f(e._zod,`values`,()=>t.innerType._zod.values),f(e._zod,`pattern`,()=>t.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),Un=/*@__PURE__*/ t(`$ZodNullable`,(e,t)=>{y.init(e,t),f(e._zod,`optin`,()=>t.innerType._zod.optin),f(e._zod,`optout`,()=>t.innerType._zod.optout),f(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${u(e.source)}|null)$`):void 0}),f(e._zod,`values`,()=>t.innerType._zod.values?/* @__PURE__ */ new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),Wn=/*@__PURE__*/ t(`$ZodDefault`,(e,t)=>{y.init(e,t),e._zod.optin=`optional`,f(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>Gn(e,t)):Gn(r,t)}});function Gn(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var Kn=/*@__PURE__*/ t(`$ZodPrefault`,(e,t)=>{y.init(e,t),e._zod.optin=`optional`,f(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),qn=/*@__PURE__*/ t(`$ZodNonOptional`,(e,t)=>{y.init(e,t),f(e._zod,`values`,()=>{let e=t.innerType._zod.values;return e?new Set([...e].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>Jn(t,e)):Jn(i,e)}});function Jn(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}var Yn=/*@__PURE__*/ t(`$ZodCatch`,(e,t)=>{y.init(e,t),f(e._zod,`optin`,()=>t.innerType._zod.optin),f(e._zod,`optout`,()=>t.innerType._zod.optout),f(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(r=>(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>_(e,n,a()))},input:e.value}),e.issues=[]),e)):(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>_(e,n,a()))},input:e.value}),e.issues=[]),e)}}),Xn=/*@__PURE__*/ t(`$ZodPipe`,(e,t)=>{y.init(e,t),f(e._zod,`values`,()=>t.in._zod.values),f(e._zod,`optin`,()=>t.in._zod.optin),f(e._zod,`optout`,()=>t.out._zod.optout),f(e._zod,`propValues`,()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>Zn(e,t.in,n)):Zn(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>Zn(e,t.out,n)):Zn(r,t.out,n)}});function Zn(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}var Qn=/*@__PURE__*/ t(`$ZodReadonly`,(e,t)=>{y.init(e,t),f(e._zod,`propValues`,()=>t.innerType._zod.propValues),f(e._zod,`values`,()=>t.innerType._zod.values),f(e._zod,`optin`,()=>{var e;return(e=t.innerType)==null||(e=e._zod)==null?void 0:e.optin}),f(e._zod,`optout`,()=>{var e;return(e=t.innerType)==null||(e=e._zod)==null?void 0:e.optout}),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then($n):$n(r)}});function $n(e){return e.value=Object.freeze(e.value),e}var er=/*@__PURE__*/ t(`$ZodTemplateLiteral`,(e,t)=>{y.init(e,t);let n=[];for(let e of t.parts)if(typeof e==`object`&&e){if(!e._zod.pattern)throw Error(`Invalid template literal part, no pattern found: ${[...e._zod.traits].shift()}`);let t=e._zod.pattern instanceof RegExp?e._zod.pattern.source:e._zod.pattern;if(!t)throw Error(`Invalid template literal part: ${e._zod.traits}`);let r=+!!t.startsWith(`^`),i=t.endsWith(`$`)?t.length-1:t.length;n.push(t.slice(r,i))}else if(e===null||ue.has(typeof e))n.push(de(`${e}`));else throw Error(`Invalid template literal part: ${e}`);e._zod.pattern=RegExp(`^${n.join(``)}$`),e._zod.parse=(n,r)=>typeof n.value==`string`?(e._zod.pattern.lastIndex=0,e._zod.pattern.test(n.value)||n.issues.push({input:n.value,inst:e,code:`invalid_format`,format:t.format??`template_literal`,pattern:e._zod.pattern.source}),n):(n.issues.push({input:n.value,inst:e,expected:`string`,code:`invalid_type`}),n)}),tr=/*@__PURE__*/ t(`$ZodLazy`,(e,t)=>{y.init(e,t),f(e._zod,`innerType`,()=>t.getter()),f(e._zod,`pattern`,()=>{var t;return(t=e._zod.innerType)==null||(t=t._zod)==null?void 0:t.pattern}),f(e._zod,`propValues`,()=>{var t;return(t=e._zod.innerType)==null||(t=t._zod)==null?void 0:t.propValues}),f(e._zod,`optin`,()=>{var t;return((t=e._zod.innerType)==null||(t=t._zod)==null?void 0:t.optin)??void 0}),f(e._zod,`optout`,()=>{var t;return((t=e._zod.innerType)==null||(t=t._zod)==null?void 0:t.optout)??void 0}),e._zod.parse=(t,n)=>e._zod.innerType._zod.run(t,n)}),nr=/*@__PURE__*/ t(`$ZodCustom`,(e,t)=>{v.init(e,t),y.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>rr(t,n,r,e));rr(i,n,r,e)}});function rr(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(we(e))}}var ir,ar=class{constructor(){this._map=/* @__PURE__ */ new WeakMap,this._idmap=/* @__PURE__ */ new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=/* @__PURE__ */ new WeakMap,this._idmap=/* @__PURE__ */ new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function or(){return new ar}(ir=globalThis).__zod_globalRegistry??(ir.__zod_globalRegistry=or());var sr=globalThis.__zod_globalRegistry;// @__NO_SIDE_EFFECTS__
|
|
38
|
+
function cr(e,t){return new e({type:`string`,...h(t)})}// @__NO_SIDE_EFFECTS__
|
|
39
|
+
function lr(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...h(t)})}// @__NO_SIDE_EFFECTS__
|
|
40
|
+
function ur(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...h(t)})}// @__NO_SIDE_EFFECTS__
|
|
41
|
+
function dr(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...h(t)})}// @__NO_SIDE_EFFECTS__
|
|
42
|
+
function fr(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...h(t)})}// @__NO_SIDE_EFFECTS__
|
|
43
|
+
function pr(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...h(t)})}// @__NO_SIDE_EFFECTS__
|
|
44
|
+
function mr(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...h(t)})}// @__NO_SIDE_EFFECTS__
|
|
45
|
+
function hr(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...h(t)})}// @__NO_SIDE_EFFECTS__
|
|
46
|
+
function gr(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...h(t)})}// @__NO_SIDE_EFFECTS__
|
|
47
|
+
function _r(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...h(t)})}// @__NO_SIDE_EFFECTS__
|
|
48
|
+
function vr(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...h(t)})}// @__NO_SIDE_EFFECTS__
|
|
49
|
+
function yr(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...h(t)})}// @__NO_SIDE_EFFECTS__
|
|
50
|
+
function br(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...h(t)})}// @__NO_SIDE_EFFECTS__
|
|
51
|
+
function xr(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...h(t)})}// @__NO_SIDE_EFFECTS__
|
|
52
|
+
function Sr(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...h(t)})}// @__NO_SIDE_EFFECTS__
|
|
53
|
+
function Cr(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...h(t)})}// @__NO_SIDE_EFFECTS__
|
|
54
|
+
function wr(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...h(t)})}// @__NO_SIDE_EFFECTS__
|
|
55
|
+
function Tr(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...h(t)})}// @__NO_SIDE_EFFECTS__
|
|
56
|
+
function Er(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...h(t)})}// @__NO_SIDE_EFFECTS__
|
|
57
|
+
function Dr(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...h(t)})}// @__NO_SIDE_EFFECTS__
|
|
58
|
+
function Or(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...h(t)})}// @__NO_SIDE_EFFECTS__
|
|
59
|
+
function kr(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...h(t)})}// @__NO_SIDE_EFFECTS__
|
|
60
|
+
function Ar(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...h(t)})}// @__NO_SIDE_EFFECTS__
|
|
61
|
+
function jr(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...h(t)})}// @__NO_SIDE_EFFECTS__
|
|
62
|
+
function Mr(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...h(t)})}// @__NO_SIDE_EFFECTS__
|
|
63
|
+
function Nr(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...h(t)})}// @__NO_SIDE_EFFECTS__
|
|
64
|
+
function Pr(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...h(t)})}// @__NO_SIDE_EFFECTS__
|
|
65
|
+
function Fr(e,t){return new e({type:`number`,checks:[],...h(t)})}// @__NO_SIDE_EFFECTS__
|
|
66
|
+
function Ir(e,t){return new e({type:`number`,coerce:!0,checks:[],...h(t)})}// @__NO_SIDE_EFFECTS__
|
|
67
|
+
function Lr(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...h(t)})}// @__NO_SIDE_EFFECTS__
|
|
68
|
+
function Rr(e,t){return new e({type:`boolean`,...h(t)})}// @__NO_SIDE_EFFECTS__
|
|
69
|
+
function zr(e,t){return new e({type:`bigint`,coerce:!0,...h(t)})}// @__NO_SIDE_EFFECTS__
|
|
70
|
+
function Br(e,t){return new e({type:`null`,...h(t)})}// @__NO_SIDE_EFFECTS__
|
|
71
|
+
function Vr(e){return new e({type:`unknown`})}// @__NO_SIDE_EFFECTS__
|
|
72
|
+
function Hr(e,t){return new e({type:`never`,...h(t)})}// @__NO_SIDE_EFFECTS__
|
|
73
|
+
function Ur(e,t){return new Ct({check:`less_than`,...h(t),value:e,inclusive:!1})}// @__NO_SIDE_EFFECTS__
|
|
74
|
+
function Wr(e,t){return new Ct({check:`less_than`,...h(t),value:e,inclusive:!0})}// @__NO_SIDE_EFFECTS__
|
|
75
|
+
function Gr(e,t){return new wt({check:`greater_than`,...h(t),value:e,inclusive:!1})}// @__NO_SIDE_EFFECTS__
|
|
76
|
+
function x(e,t){return new wt({check:`greater_than`,...h(t),value:e,inclusive:!0})}// @__NO_SIDE_EFFECTS__
|
|
77
|
+
function Kr(e,t){return new Tt({check:`multiple_of`,...h(t),value:e})}// @__NO_SIDE_EFFECTS__
|
|
78
|
+
function qr(e,t){return new Dt({check:`max_length`,...h(t),maximum:e})}// @__NO_SIDE_EFFECTS__
|
|
79
|
+
function Jr(e,t){return new Ot({check:`min_length`,...h(t),minimum:e})}// @__NO_SIDE_EFFECTS__
|
|
80
|
+
function Yr(e,t){return new kt({check:`length_equals`,...h(t),length:e})}// @__NO_SIDE_EFFECTS__
|
|
81
|
+
function Xr(e,t){return new jt({check:`string_format`,format:`regex`,...h(t),pattern:e})}// @__NO_SIDE_EFFECTS__
|
|
82
|
+
function Zr(e){return new Mt({check:`string_format`,format:`lowercase`,...h(e)})}// @__NO_SIDE_EFFECTS__
|
|
83
|
+
function Qr(e){return new Nt({check:`string_format`,format:`uppercase`,...h(e)})}// @__NO_SIDE_EFFECTS__
|
|
84
|
+
function $r(e,t){return new Pt({check:`string_format`,format:`includes`,...h(t),includes:e})}// @__NO_SIDE_EFFECTS__
|
|
85
|
+
function ei(e,t){return new Ft({check:`string_format`,format:`starts_with`,...h(t),prefix:e})}// @__NO_SIDE_EFFECTS__
|
|
86
|
+
function ti(e,t){return new It({check:`string_format`,format:`ends_with`,...h(t),suffix:e})}// @__NO_SIDE_EFFECTS__
|
|
87
|
+
function ni(e){return new Lt({check:`overwrite`,tx:e})}// @__NO_SIDE_EFFECTS__
|
|
88
|
+
function ri(e){return/* @__PURE__ */ ni(t=>t.normalize(e))}// @__NO_SIDE_EFFECTS__
|
|
89
|
+
function ii(){return/* @__PURE__ */ ni(e=>e.trim())}// @__NO_SIDE_EFFECTS__
|
|
90
|
+
function ai(){return/* @__PURE__ */ ni(e=>e.toLowerCase())}// @__NO_SIDE_EFFECTS__
|
|
91
|
+
function oi(){return/* @__PURE__ */ ni(e=>e.toUpperCase())}// @__NO_SIDE_EFFECTS__
|
|
92
|
+
function si(){return/* @__PURE__ */ ni(e=>re(e))}// @__NO_SIDE_EFFECTS__
|
|
93
|
+
function ci(e,t,n){return new e({type:`array`,element:t,...h(n)})}// @__NO_SIDE_EFFECTS__
|
|
94
|
+
function li(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...h(n)})}// @__NO_SIDE_EFFECTS__
|
|
95
|
+
function ui(e){let t=/* @__PURE__ */ di(n=>(n.addIssue=e=>{if(typeof e==`string`)n.issues.push(we(e,n.value,t._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,r.input??=n.value,r.inst??=t,r.continue??=!t._zod.def.abort,n.issues.push(we(r))}},e(n.value,n)));return t}// @__NO_SIDE_EFFECTS__
|
|
96
|
+
function di(e,t){let n=new v({check:`custom`,...h(t)});return n._zod.check=e,n}function fi(e){let t=(e==null?void 0:e.target)??`draft-2020-12`;return t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),{processors:e.processors??{},metadataRegistry:(e==null?void 0:e.metadata)??sr,target:t,unrepresentable:(e==null?void 0:e.unrepresentable)??`throw`,override:(e==null?void 0:e.override)??(()=>{}),io:(e==null?void 0:e.io)??`output`,counter:0,seen:/* @__PURE__ */ new Map,cycles:(e==null?void 0:e.cycles)??`ref`,reused:(e==null?void 0:e.reused)??`inline`,external:(e==null?void 0:e.external)??void 0}}function S(e,t,n={path:[],schemaPath:[]}){var r,i,a;let o=e._zod.def,s=t.seen.get(e);if(s)return s.count++,n.schemaPath.includes(e)&&(s.cycle=n.path),s.schema;let c={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,c);let l=(r=(i=e._zod).toJSONSchema)==null?void 0:r.call(i);if(l)c.schema=l;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,c.schema,r);else{let n=c.schema,i=t.processors[o.type];if(!i)throw Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);i(e,t,n,r)}let i=e._zod.parent;i&&(c.ref||=i,S(i,t,r),t.seen.get(i).isParent=!0)}let u=t.metadataRegistry.get(e);return u&&Object.assign(c.schema,u),t.io===`input`&&C(e)&&(delete c.schema.examples,delete c.schema.default),t.io===`input`&&c.schema._prefault&&((a=c.schema).default??(a.default=c.schema._prefault)),delete c.schema._prefault,t.seen.get(e).schema}function pi(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=/* @__PURE__ */ new Map;for(let t of e.seen.entries()){var i;let n=(i=e.metadataRegistry.get(t[0]))==null?void 0:i.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let a=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){var i;let n=(i=e.external.registry.get(t[0]))==null?void 0:i.id,a=e.external.uri??(e=>e);if(n)return{ref:a(n)};let o=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=o,{defId:o,ref:`${a(`__shared`)}#/${r}/${o}`}}if(t[1]===n)return{ref:`#`};let a=`#/${r}/`,o=t[1].schema.id??`__schema${e.counter++}`;return{defId:o,ref:a+o}},o=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=a(e);t.def={...t.schema},r&&(t.defId=r);let i=t.schema;for(let e in i)delete i[e];i.$ref=n};if(e.cycles===`throw`)for(let t of e.seen.entries()){let e=t[1];if(e.cycle){var s;throw Error(`Cycle detected: #/${(s=e.cycle)==null?void 0:s.join(`/`)}/<root>
|
|
97
|
+
|
|
98
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}}for(let n of e.seen.entries()){var c;let r=n[1];if(t===n[0]){o(n);continue}if(e.external){var l;let r=(l=e.external.registry.get(n[0]))==null?void 0:l.id;if(t!==n[0]&&r){o(n);continue}}if((c=e.metadataRegistry.get(n[0]))!=null&&c.id){o(n);continue}if(r.cycle){o(n);continue}if(r.count>1&&e.reused===`ref`){o(n);continue}}}function mi(e,t){var n,r;let i=e.seen.get(t);if(!i)throw Error(`Unprocessed schema. This is a bug in Zod.`);let a=t=>{let n=e.seen.get(t);if(n.ref===null)return;let r=n.def??n.schema,i={...r},o=n.ref;if(n.ref=null,o){a(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(r.allOf=r.allOf??[],r.allOf.push(s)):Object.assign(r,s),Object.assign(r,i),t._zod.parent===o)for(let e in r)e!==`$ref`&&e!==`allOf`&&(e in i||delete r[e]);if(s.$ref&&n.def)for(let e in r)e!==`$ref`&&e!==`allOf`&&e in n.def&&JSON.stringify(r[e])===JSON.stringify(n.def[e])&&delete r[e]}let s=t._zod.parent;if(s&&s!==o){a(s);let t=e.seen.get(s);if(t!=null&&t.schema.$ref&&(r.$ref=t.schema.$ref,t.def))for(let e in r)e!==`$ref`&&e!==`allOf`&&e in t.def&&JSON.stringify(r[e])===JSON.stringify(t.def[e])&&delete r[e]}e.override({zodSchema:t,jsonSchema:r,path:n.path??[]})};for(let t of[...e.seen.entries()].reverse())a(t[0]);let o={};if(e.target===`draft-2020-12`?o.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?o.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?o.$schema=`http://json-schema.org/draft-04/schema#`:e.target,(n=e.external)!=null&&n.uri){var s;let n=(s=e.external.registry.get(t))==null?void 0:s.id;if(!n)throw Error("Schema is missing an `id` property");o.$id=e.external.uri(n)}Object.assign(o,i.def??i.schema);let c=((r=e.external)==null?void 0:r.defs)??{};for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(c[e.defId]=e.def)}e.external||Object.keys(c).length>0&&(e.target===`draft-2020-12`?o.$defs=c:o.definitions=c);try{let n=JSON.parse(JSON.stringify(o));return Object.defineProperty(n,"~standard",{value:{...t[`~standard`],jsonSchema:{input:gi(t,`input`,e.processors),output:gi(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function C(e,t){let n=t??{seen:/* @__PURE__ */ new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return C(r.element,n);if(r.type===`set`)return C(r.valueType,n);if(r.type===`lazy`)return C(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type==="default"||r.type===`prefault`)return C(r.innerType,n);if(r.type===`intersection`)return C(r.left,n)||C(r.right,n);if(r.type===`record`||r.type===`map`)return C(r.keyType,n)||C(r.valueType,n);if(r.type===`pipe`)return C(r.in,n)||C(r.out,n);if(r.type===`object`){for(let e in r.shape)if(C(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(C(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(C(e,n))return!0;return!!(r.rest&&C(r.rest,n))}return!1}var hi=(e,t={})=>n=>{let r=fi({...n,processors:t});return S(e,r),pi(r,e),mi(r,e)},gi=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=fi({...i??{},target:a,io:t,processors:n});return S(e,o),pi(o,e),mi(o,e)},_i={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},vi=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l}=e._zod.bag;if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=_i[s]??s,i.format===``&&delete i.format,s===`time`&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c];e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},yi=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,format:s,multipleOf:c,exclusiveMaximum:l,exclusiveMinimum:u}=e._zod.bag;i.type=typeof s==`string`&&s.includes(`int`)?`integer`:`number`,typeof u==`number`&&(t.target===`draft-04`||t.target===`openapi-3.0`?(i.minimum=u,i.exclusiveMinimum=!0):i.exclusiveMinimum=u),typeof a==`number`&&(i.minimum=a,typeof u==`number`&&t.target!==`draft-04`&&(u>=a?delete i.minimum:delete i.exclusiveMinimum)),typeof l==`number`&&(t.target===`draft-04`||t.target===`openapi-3.0`?(i.maximum=l,i.exclusiveMaximum=!0):i.exclusiveMaximum=l),typeof o==`number`&&(i.maximum=o,typeof l==`number`&&t.target!==`draft-04`&&(l<=o?delete i.maximum:delete i.exclusiveMaximum)),typeof c==`number`&&(i.multipleOf=c)},bi=(e,t,n,r)=>{n.type=`boolean`},xi=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`BigInt cannot be represented in JSON Schema`)},Si=(e,t,n,r)=>{t.target===`openapi-3.0`?(n.type=`string`,n.nullable=!0,n.enum=[null]):n.type=`null`},Ci=(e,t,n,r)=>{n.not={}},wi=(e,t,n,r)=>{let i=e._zod.def,a=o(i.entries);a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},Ti=(e,t,n,r)=>{let i=e._zod.def,a=[];for(let e of i.values)if(e===void 0){if(t.unrepresentable===`throw`)throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof e==`bigint`){if(t.unrepresentable===`throw`)throw Error(`BigInt literals cannot be represented in JSON Schema`);a.push(Number(e))}else a.push(e);if(a.length!==0){if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a}},Ei=(e,t,n,r)=>{let i=n,a=e._zod.pattern;if(!a)throw Error(`Pattern not found in template literal`);i.type=`string`,i.pattern=a.source},Di=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Custom types cannot be represented in JSON Schema`)},Oi=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Transforms cannot be represented in JSON Schema`)},ki=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=e._zod.bag;typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=S(a.element,t,{...r,path:[...r.path,`items`]})},Ai=(e,t,n,r)=>{var i;let a=n,o=e._zod.def;a.type=`object`,a.properties={};let s=o.shape;for(let e in s)a.properties[e]=S(s[e],t,{...r,path:[...r.path,`properties`,e]});let c=new Set(Object.keys(s)),l=new Set([...c].filter(e=>{let n=o.shape[e]._zod;return t.io===`input`?n.optin===void 0:n.optout===void 0}));l.size>0&&(a.required=Array.from(l)),((i=o.catchall)==null?void 0:i._zod.def.type)===`never`?a.additionalProperties=!1:o.catchall?o.catchall&&(a.additionalProperties=S(o.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(a.additionalProperties=!1)},ji=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>S(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},Mi=(e,t,n,r)=>{let i=e._zod.def,a=S(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=S(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1;n.allOf=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]]},Ni=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`array`;let o=t.target===`draft-2020-12`?`prefixItems`:`items`,s=t.target===`draft-2020-12`||t.target===`openapi-3.0`?`items`:`additionalItems`,c=a.items.map((e,n)=>S(e,t,{...r,path:[...r.path,o,n]})),l=a.rest?S(a.rest,t,{...r,path:[...r.path,s,...t.target===`openapi-3.0`?[a.items.length]:[]]}):null;t.target===`draft-2020-12`?(i.prefixItems=c,l&&(i.items=l)):t.target===`openapi-3.0`?(i.items={anyOf:c},l&&i.items.anyOf.push(l),i.minItems=c.length,l||(i.maxItems=c.length)):(i.items=c,l&&(i.additionalItems=l));let{minimum:u,maximum:ee}=e._zod.bag;typeof u==`number`&&(i.minItems=u),typeof ee==`number`&&(i.maxItems=ee)},Pi=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`;let o=a.keyType,s=o._zod.bag,c=s==null?void 0:s.patterns;if(a.mode===`loose`&&c&&c.size>0){let e=S(a.valueType,t,{...r,path:[...r.path,`patternProperties`,`*`]});i.patternProperties={};for(let t of c)i.patternProperties[t.source]=e}else(t.target===`draft-07`||t.target===`draft-2020-12`)&&(i.propertyNames=S(a.keyType,t,{...r,path:[...r.path,`propertyNames`]})),i.additionalProperties=S(a.valueType,t,{...r,path:[...r.path,`additionalProperties`]});let l=o._zod.values;if(l){let e=[...l].filter(e=>typeof e==`string`||typeof e==`number`);e.length>0&&(i.required=e)}},Fi=(e,t,n,r)=>{let i=e._zod.def,a=S(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},Ii=(e,t,n,r)=>{let i=e._zod.def;S(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Li=(e,t,n,r)=>{let i=e._zod.def;S(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},Ri=(e,t,n,r)=>{let i=e._zod.def;S(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,t.io===`input`&&(n._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},zi=(e,t,n,r)=>{let i=e._zod.def;S(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{throw Error(`Dynamic catch values are not supported in JSON Schema`)}n.default=o},Bi=(e,t,n,r)=>{let i=e._zod.def,a=t.io===`input`?i.in._zod.def.type===`transform`?i.out:i.in:i.out;S(a,t,r);let o=t.seen.get(e);o.ref=a},Vi=(e,t,n,r)=>{let i=e._zod.def;S(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},Hi=(e,t,n,r)=>{let i=e._zod.def;S(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Ui=(e,t,n,r)=>{let i=e._zod.innerType;S(i,t,r);let a=t.seen.get(e);a.ref=i},Wi=/*@__PURE__*/ t(`ZodISODateTime`,(e,t)=>{Qt.init(e,t),O.init(e,t)});function w(e){return/* @__PURE__ */ jr(Wi,e)}var Gi=/*@__PURE__*/ t(`ZodISODate`,(e,t)=>{$t.init(e,t),O.init(e,t)});function Ki(e){return/* @__PURE__ */ Mr(Gi,e)}var qi=/*@__PURE__*/ t(`ZodISOTime`,(e,t)=>{en.init(e,t),O.init(e,t)});function Ji(e){return/* @__PURE__ */ Nr(qi,e)}var Yi=/*@__PURE__*/ t(`ZodISODuration`,(e,t)=>{tn.init(e,t),O.init(e,t)});function Xi(e){return/* @__PURE__ */ Pr(Yi,e)}var Zi=(e,t)=>{Ee.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>ke(e,t)},flatten:{value:t=>Oe(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,s,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,s,2)}},isEmpty:{get(){return e.issues.length===0}}})},Qi=t(`ZodError`,Zi),T=t(`ZodError`,Zi,{Parent:Error}),$i=/* @__PURE__ */ Ae(T),ea=/* @__PURE__ */ je(T),ta=/* @__PURE__ */ Me(T),na=/* @__PURE__ */ Pe(T),ra=/* @__PURE__ */ Ie(T),ia=/* @__PURE__ */ Le(T),aa=/* @__PURE__ */ Re(T),oa=/* @__PURE__ */ ze(T),sa=/* @__PURE__ */ Be(T),ca=/* @__PURE__ */ Ve(T),la=/* @__PURE__ */ He(T),ua=/* @__PURE__ */ Ue(T),E=/*@__PURE__*/ t(`ZodType`,(e,t)=>(y.init(e,t),Object.assign(e[`~standard`],{jsonSchema:{input:gi(e,`input`),output:gi(e,`output`)}}),e.toJSONSchema=hi(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(p(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)=>m(e,t,n),e.brand=()=>e,e.register=((t,n)=>(t.add(e,n),e)),e.parse=(t,n)=>$i(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>ta(e,t,n),e.parseAsync=async(t,n)=>ea(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>na(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>ra(e,t,n),e.decode=(t,n)=>ia(e,t,n),e.encodeAsync=async(t,n)=>aa(e,t,n),e.decodeAsync=async(t,n)=>oa(e,t,n),e.safeEncode=(t,n)=>sa(e,t,n),e.safeDecode=(t,n)=>ca(e,t,n),e.safeEncodeAsync=async(t,n)=>la(e,t,n),e.safeDecodeAsync=async(t,n)=>ua(e,t,n),e.refine=(t,n)=>e.check(To(t,n)),e.superRefine=t=>e.check(Eo(t)),e.overwrite=t=>e.check(/* @__PURE__ */ ni(t)),e.optional=()=>no(e),e.exactOptional=()=>io(e),e.nullable=()=>oo(e),e.nullish=()=>no(oo(e)),e.nonoptional=t=>po(e,t),e.array=()=>F(e),e.or=t=>R([e,t]),e.and=t=>qa(e,t),e.transform=t=>_o(e,eo(t)),e.default=t=>co(e,t),e.prefault=t=>uo(e,t),e.catch=t=>ho(e,t),e.pipe=t=>_o(e,t),e.readonly=()=>yo(e),e.describe=t=>{let n=e.clone();return sr.add(n,{description:t}),n},Object.defineProperty(e,"description",{get(){var t;return(t=sr.get(e))==null?void 0:t.description},configurable:!0}),e.meta=(...t)=>{if(t.length===0)return sr.get(e);let n=e.clone();return sr.add(n,t[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=t=>t(e),e)),da=/*@__PURE__*/ t(`_ZodString`,(e,t)=>{Bt.init(e,t),E.init(e,t),e._zod.processJSONSchema=(t,n,r)=>vi(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...t)=>e.check(/* @__PURE__ */ Xr(...t)),e.includes=(...t)=>e.check(/* @__PURE__ */ $r(...t)),e.startsWith=(...t)=>e.check(/* @__PURE__ */ ei(...t)),e.endsWith=(...t)=>e.check(/* @__PURE__ */ ti(...t)),e.min=(...t)=>e.check(/* @__PURE__ */ Jr(...t)),e.max=(...t)=>e.check(/* @__PURE__ */ qr(...t)),e.length=(...t)=>e.check(/* @__PURE__ */ Yr(...t)),e.nonempty=(...t)=>e.check(/* @__PURE__ */ Jr(1,...t)),e.lowercase=t=>e.check(/* @__PURE__ */ Zr(t)),e.uppercase=t=>e.check(/* @__PURE__ */ Qr(t)),e.trim=()=>e.check(/* @__PURE__ */ ii()),e.normalize=(...t)=>e.check(/* @__PURE__ */ ri(...t)),e.toLowerCase=()=>e.check(/* @__PURE__ */ ai()),e.toUpperCase=()=>e.check(/* @__PURE__ */ oi()),e.slugify=()=>e.check(/* @__PURE__ */ si())}),fa=/*@__PURE__*/ t(`ZodString`,(e,t)=>{Bt.init(e,t),da.init(e,t),e.email=t=>e.check(/* @__PURE__ */ lr(pa,t)),e.url=t=>e.check(/* @__PURE__ */ hr(ga,t)),e.jwt=t=>e.check(/* @__PURE__ */ Ar(Ma,t)),e.emoji=t=>e.check(/* @__PURE__ */ gr(va,t)),e.guid=t=>e.check(/* @__PURE__ */ ur(ma,t)),e.uuid=t=>e.check(/* @__PURE__ */ dr(ha,t)),e.uuidv4=t=>e.check(/* @__PURE__ */ fr(ha,t)),e.uuidv6=t=>e.check(/* @__PURE__ */ pr(ha,t)),e.uuidv7=t=>e.check(/* @__PURE__ */ mr(ha,t)),e.nanoid=t=>e.check(/* @__PURE__ */ _r(ya,t)),e.guid=t=>e.check(/* @__PURE__ */ ur(ma,t)),e.cuid=t=>e.check(/* @__PURE__ */ vr(ba,t)),e.cuid2=t=>e.check(/* @__PURE__ */ yr(xa,t)),e.ulid=t=>e.check(/* @__PURE__ */ br(Sa,t)),e.base64=t=>e.check(/* @__PURE__ */ Dr(ka,t)),e.base64url=t=>e.check(/* @__PURE__ */ Or(Aa,t)),e.xid=t=>e.check(/* @__PURE__ */ xr(Ca,t)),e.ksuid=t=>e.check(/* @__PURE__ */ Sr(wa,t)),e.ipv4=t=>e.check(/* @__PURE__ */ Cr(Ta,t)),e.ipv6=t=>e.check(/* @__PURE__ */ wr(Ea,t)),e.cidrv4=t=>e.check(/* @__PURE__ */ Tr(Da,t)),e.cidrv6=t=>e.check(/* @__PURE__ */ Er(Oa,t)),e.e164=t=>e.check(/* @__PURE__ */ kr(ja,t)),e.datetime=t=>e.check(w(t)),e.date=t=>e.check(Ki(t)),e.time=t=>e.check(Ji(t)),e.duration=t=>e.check(Xi(t))});function D(e){return/* @__PURE__ */ cr(fa,e)}var O=/*@__PURE__*/ t(`ZodStringFormat`,(e,t)=>{b.init(e,t),da.init(e,t)}),pa=/*@__PURE__*/ t(`ZodEmail`,(e,t)=>{Ut.init(e,t),O.init(e,t)}),ma=/*@__PURE__*/ t(`ZodGUID`,(e,t)=>{Vt.init(e,t),O.init(e,t)}),ha=/*@__PURE__*/ t(`ZodUUID`,(e,t)=>{Ht.init(e,t),O.init(e,t)});function k(e){return/* @__PURE__ */ dr(ha,e)}var ga=/*@__PURE__*/ t(`ZodURL`,(e,t)=>{Wt.init(e,t),O.init(e,t)});function _a(e){return/* @__PURE__ */ hr(ga,e)}var va=/*@__PURE__*/ t(`ZodEmoji`,(e,t)=>{Gt.init(e,t),O.init(e,t)}),ya=/*@__PURE__*/ t(`ZodNanoID`,(e,t)=>{Kt.init(e,t),O.init(e,t)}),ba=/*@__PURE__*/ t(`ZodCUID`,(e,t)=>{qt.init(e,t),O.init(e,t)}),xa=/*@__PURE__*/ t(`ZodCUID2`,(e,t)=>{Jt.init(e,t),O.init(e,t)}),Sa=/*@__PURE__*/ t(`ZodULID`,(e,t)=>{Yt.init(e,t),O.init(e,t)}),Ca=/*@__PURE__*/ t(`ZodXID`,(e,t)=>{Xt.init(e,t),O.init(e,t)}),wa=/*@__PURE__*/ t(`ZodKSUID`,(e,t)=>{Zt.init(e,t),O.init(e,t)}),Ta=/*@__PURE__*/ t(`ZodIPv4`,(e,t)=>{nn.init(e,t),O.init(e,t)}),Ea=/*@__PURE__*/ t(`ZodIPv6`,(e,t)=>{rn.init(e,t),O.init(e,t)}),Da=/*@__PURE__*/ t(`ZodCIDRv4`,(e,t)=>{an.init(e,t),O.init(e,t)}),Oa=/*@__PURE__*/ t(`ZodCIDRv6`,(e,t)=>{on.init(e,t),O.init(e,t)}),ka=/*@__PURE__*/ t(`ZodBase64`,(e,t)=>{cn.init(e,t),O.init(e,t)}),Aa=/*@__PURE__*/ t(`ZodBase64URL`,(e,t)=>{un.init(e,t),O.init(e,t)}),ja=/*@__PURE__*/ t(`ZodE164`,(e,t)=>{dn.init(e,t),O.init(e,t)}),Ma=/*@__PURE__*/ t(`ZodJWT`,(e,t)=>{pn.init(e,t),O.init(e,t)}),Na=/*@__PURE__*/ t(`ZodNumber`,(e,t)=>{mn.init(e,t),E.init(e,t),e._zod.processJSONSchema=(t,n,r)=>yi(e,t,n,r),e.gt=(t,n)=>e.check(/* @__PURE__ */ Gr(t,n)),e.gte=(t,n)=>e.check(/* @__PURE__ */ x(t,n)),e.min=(t,n)=>e.check(/* @__PURE__ */ x(t,n)),e.lt=(t,n)=>e.check(/* @__PURE__ */ Ur(t,n)),e.lte=(t,n)=>e.check(/* @__PURE__ */ Wr(t,n)),e.max=(t,n)=>e.check(/* @__PURE__ */ Wr(t,n)),e.int=t=>e.check(Fa(t)),e.safe=t=>e.check(Fa(t)),e.positive=t=>e.check(/* @__PURE__ */ Gr(0,t)),e.nonnegative=t=>e.check(/* @__PURE__ */ x(0,t)),e.negative=t=>e.check(/* @__PURE__ */ Ur(0,t)),e.nonpositive=t=>e.check(/* @__PURE__ */ Wr(0,t)),e.multipleOf=(t,n)=>e.check(/* @__PURE__ */ Kr(t,n)),e.step=(t,n)=>e.check(/* @__PURE__ */ Kr(t,n)),e.finite=()=>e;let n=e._zod.bag;e.minValue=Math.max(n.minimum??-1/0,n.exclusiveMinimum??-1/0)??null,e.maxValue=Math.min(n.maximum??1/0,n.exclusiveMaximum??1/0)??null,e.isInt=(n.format??``).includes(`int`)||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function A(e){return/* @__PURE__ */ Fr(Na,e)}var Pa=/*@__PURE__*/ t(`ZodNumberFormat`,(e,t)=>{hn.init(e,t),Na.init(e,t)});function Fa(e){return/* @__PURE__ */ Lr(Pa,e)}var Ia=/*@__PURE__*/ t(`ZodBoolean`,(e,t)=>{gn.init(e,t),E.init(e,t),e._zod.processJSONSchema=(t,n,r)=>bi(e,t,n,r)});function j(e){return/* @__PURE__ */ Rr(Ia,e)}var La=/*@__PURE__*/ t(`ZodBigInt`,(e,t)=>{_n.init(e,t),E.init(e,t),e._zod.processJSONSchema=(t,n,r)=>xi(e,t,n,r),e.gte=(t,n)=>e.check(/* @__PURE__ */ x(t,n)),e.min=(t,n)=>e.check(/* @__PURE__ */ x(t,n)),e.gt=(t,n)=>e.check(/* @__PURE__ */ Gr(t,n)),e.gte=(t,n)=>e.check(/* @__PURE__ */ x(t,n)),e.min=(t,n)=>e.check(/* @__PURE__ */ x(t,n)),e.lt=(t,n)=>e.check(/* @__PURE__ */ Ur(t,n)),e.lte=(t,n)=>e.check(/* @__PURE__ */ Wr(t,n)),e.max=(t,n)=>e.check(/* @__PURE__ */ Wr(t,n)),e.positive=t=>e.check(/* @__PURE__ */ Gr(BigInt(0),t)),e.negative=t=>e.check(/* @__PURE__ */ Ur(BigInt(0),t)),e.nonpositive=t=>e.check(/* @__PURE__ */ Wr(BigInt(0),t)),e.nonnegative=t=>e.check(/* @__PURE__ */ x(BigInt(0),t)),e.multipleOf=(t,n)=>e.check(/* @__PURE__ */ Kr(t,n));let n=e._zod.bag;e.minValue=n.minimum??null,e.maxValue=n.maximum??null,e.format=n.format??null}),Ra=/*@__PURE__*/ t(`ZodNull`,(e,t)=>{vn.init(e,t),E.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Si(e,t,n,r)});function M(e){return/* @__PURE__ */ Br(Ra,e)}var za=/*@__PURE__*/ t(`ZodUnknown`,(e,t)=>{yn.init(e,t),E.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function N(){return/* @__PURE__ */ Vr(za)}var Ba=/*@__PURE__*/ t(`ZodNever`,(e,t)=>{bn.init(e,t),E.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ci(e,t,n,r)});function P(e){return/* @__PURE__ */ Hr(Ba,e)}var Va=/*@__PURE__*/ t(`ZodArray`,(e,t)=>{Sn.init(e,t),E.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ki(e,t,n,r),e.element=t.element,e.min=(t,n)=>e.check(/* @__PURE__ */ Jr(t,n)),e.nonempty=t=>e.check(/* @__PURE__ */ Jr(1,t)),e.max=(t,n)=>e.check(/* @__PURE__ */ qr(t,n)),e.length=(t,n)=>e.check(/* @__PURE__ */ Yr(t,n)),e.unwrap=()=>e.element});function F(e,t){return/* @__PURE__ */ ci(Va,e,t)}var Ha=/*@__PURE__*/ t(`ZodObject`,(e,t)=>{Dn.init(e,t),E.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ai(e,t,n,r),f(e,`shape`,()=>t.shape),e.keyof=()=>V(Object.keys(e._zod.def.shape)),e.catchall=t=>e.clone({...e._zod.def,catchall:t}),e.passthrough=()=>e.clone({...e._zod.def,catchall:N()}),e.loose=()=>e.clone({...e._zod.def,catchall:N()}),e.strict=()=>e.clone({...e._zod.def,catchall:P()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=t=>ge(e,t),e.safeExtend=t=>_e(e,t),e.merge=t=>ve(e,t),e.pick=t=>me(e,t),e.omit=t=>he(e,t),e.partial=(...t)=>ye(to,e,t[0]),e.required=(...t)=>be(fo,e,t[0])});function I(e,t){return new Ha({type:`object`,shape:e??{},...h(t)})}function L(e,t){return new Ha({type:`object`,shape:e,catchall:P(),...h(t)})}function Ua(e,t){return new Ha({type:`object`,shape:e,catchall:N(),...h(t)})}var Wa=/*@__PURE__*/ t(`ZodUnion`,(e,t)=>{kn.init(e,t),E.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ji(e,t,n,r),e.options=t.options});function R(e,t){return new Wa({type:`union`,options:e,...h(t)})}var Ga=/*@__PURE__*/ t(`ZodDiscriminatedUnion`,(e,t)=>{Wa.init(e,t),An.init(e,t)});function z(e,t,n){return new Ga({type:`union`,options:t,discriminator:e,...h(n)})}var Ka=/*@__PURE__*/ t(`ZodIntersection`,(e,t)=>{jn.init(e,t),E.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Mi(e,t,n,r)});function qa(e,t){return new Ka({type:`intersection`,left:e,right:t})}var Ja=/*@__PURE__*/ t(`ZodTuple`,(e,t)=>{Pn.init(e,t),E.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ni(e,t,n,r),e.rest=t=>e.clone({...e._zod.def,rest:t})});function Ya(e,t,n){let r=t instanceof y;return new Ja({type:`tuple`,items:e,rest:r?t:null,...h(r?n:t)})}var Xa=/*@__PURE__*/ t(`ZodRecord`,(e,t)=>{In.init(e,t),E.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Pi(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType});function B(e,t,n){return new Xa({type:`record`,keyType:e,valueType:t,...h(n)})}var Za=/*@__PURE__*/ t(`ZodEnum`,(e,t)=>{Ln.init(e,t),E.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wi(e,t,n,r),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new Za({...t,checks:[],...h(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new Za({...t,checks:[],...h(r),entries:i})}});function V(e,t){return new Za({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...h(t)})}var Qa=/*@__PURE__*/ t(`ZodLiteral`,(e,t)=>{Rn.init(e,t),E.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ti(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function H(e,t){return new Qa({type:`literal`,values:Array.isArray(e)?e:[e],...h(t)})}var $a=/*@__PURE__*/ t(`ZodTransform`,(e,t)=>{zn.init(e,t),E.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Oi(e,t,n,r),e._zod.parse=(n,i)=>{if(i.direction===`backward`)throw new r(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(we(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,t.input??=n.value,t.inst??=e,n.issues.push(we(t))}};let a=t.transform(n.value,n);return a instanceof Promise?a.then(e=>(n.value=e,n)):(n.value=a,n)}});function eo(e){return new $a({type:`transform`,transform:e})}var to=/*@__PURE__*/ t(`ZodOptional`,(e,t)=>{Vn.init(e,t),E.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Hi(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function no(e){return new to({type:`optional`,innerType:e})}var ro=/*@__PURE__*/ t(`ZodExactOptional`,(e,t)=>{Hn.init(e,t),E.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Hi(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function io(e){return new ro({type:`optional`,innerType:e})}var ao=/*@__PURE__*/ t(`ZodNullable`,(e,t)=>{Un.init(e,t),E.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Fi(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function oo(e){return new ao({type:`nullable`,innerType:e})}var so=/*@__PURE__*/ t(`ZodDefault`,(e,t)=>{Wn.init(e,t),E.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Li(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function co(e,t){return new so({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():ce(t)}})}var lo=/*@__PURE__*/ t(`ZodPrefault`,(e,t)=>{Kn.init(e,t),E.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ri(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function uo(e,t){return new lo({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():ce(t)}})}var fo=/*@__PURE__*/ t(`ZodNonOptional`,(e,t)=>{qn.init(e,t),E.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ii(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function po(e,t){return new fo({type:`nonoptional`,innerType:e,...h(t)})}var mo=/*@__PURE__*/ t(`ZodCatch`,(e,t)=>{Yn.init(e,t),E.init(e,t),e._zod.processJSONSchema=(t,n,r)=>zi(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function ho(e,t){return new mo({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}var go=/*@__PURE__*/ t(`ZodPipe`,(e,t)=>{Xn.init(e,t),E.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Bi(e,t,n,r),e.in=t.in,e.out=t.out});function _o(e,t){return new go({type:`pipe`,in:e,out:t})}var vo=/*@__PURE__*/ t(`ZodReadonly`,(e,t)=>{Qn.init(e,t),E.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Vi(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function yo(e){return new vo({type:`readonly`,innerType:e})}var bo=/*@__PURE__*/ t(`ZodTemplateLiteral`,(e,t)=>{er.init(e,t),E.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ei(e,t,n,r)});function xo(e,t){return new bo({type:`template_literal`,parts:e,...h(t)})}var So=/*@__PURE__*/ t(`ZodLazy`,(e,t)=>{tr.init(e,t),E.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ui(e,t,n,r),e.unwrap=()=>e._zod.def.getter()});function Co(e){return new So({type:`lazy`,getter:e})}var wo=/*@__PURE__*/ t(`ZodCustom`,(e,t)=>{nr.init(e,t),E.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Di(e,t,n,r)});function To(e,t={}){return/* @__PURE__ */ li(wo,e,t)}function Eo(e){return/* @__PURE__ */ ui(e)}function Do(e){let t=Co(()=>R([D(e),A(),j(),M(),F(t),B(D(),t)]));return t}function Oo(e,t){return _o(eo(e),t)}function ko(e){return/* @__PURE__ */ Ir(Na,e)}function Ao(e){return/* @__PURE__ */ zr(La,e)}var jo=D().regex(/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,`Invalid UUID format`),Mo=8e3,No=V([`running`,`pausing`,`paused`,`stopping`,`finalizing`,`completed`,`cancelled`,`failed`]),Po=[`completed`,`cancelled`,`failed`];V(Po);var Fo=[`running`,`pausing`,`paused`,`stopping`,`finalizing`];V(Fo),V([`running`,`pausing`,`stopping`]);var Io=V([`paused`,...Po]),Lo=V([`user`,`credits`,`user_credit_limit`,`provider_unavailable`]);V([`exploring`,`final_analysis`,`done`]);var Ro=V([`queued`,`running`,`done`,`failed`,`cancelled`]),zo=V([`done`,`failed`,`cancelled`]),Bo=V([`lead_finished`,`user_cancelled`,`lead_failed`]),Vo=V([`none`,`attached`,`lost`]),Ho=V([`idle`,`active`,`awaiting_user`]),Uo=V([`atlas`,`make_auto`,`preset`]),Wo=V([`extension_atlas_card`,`extension_make_auto_modal`,`web_atlas_dialog`,`web_make_auto_dialog`,`web_job_repeat`,`chat`,`web_workflow_repeat`,`web_runs_prompt`,`web_test_run_dialog`,`web_map_dialog`,`web_scenarios_dialog`,`web_launch_request`]),Go=V([`web_runs_prompt`,`web_test_run_dialog`,`web_map_dialog`,`web_scenarios_dialog`,`extension_atlas_card`,`extension_make_auto_modal`,`web_workflow_repeat`,`web_launch_request`]),Ko=V([`web_runs_prompt`,`web_test_run_dialog`,`web_map_dialog`,`web_scenarios_dialog`,`extension_atlas_card`,`extension_make_auto_modal`,`web_workflow_repeat`]),qo=R([Go,H(`chat`)]),Jo=V([`browser`,`agent`,`none`]),Yo=V([`browser`,`agent`]),Xo=V([`explore_app`,`find_bugs`,`create_tests`,`automate_scenarios`,`run_scenarios`,`custom`]),Zo=[`file_bugs`,`write_tests`,`edit_project`],Qo=V(Zo),$o=[`text`,`auto`],es=V($o);V([`project`,`scenarios`,`test_run`,`test_plan`]);var ts=V([`host_lost`,`awaiting_browser`,`awaiting_user`,`paused`]),ns=V([`window`,`mcp_agent`,`agent`]),rs=V([`opening`,`idle`,`busy`,`closing`,`closed`]),is=V([`lead`,`user`,`window_closed`,`workflow_ended`,`workflow_paused`,`unit_ended`]),as=V([`lead`,`user`,`workflow_ended`,`no_connection`,`left`]),os=V([`lead`,`user`,`workflow_ended`,`workflow_paused`,`unit_ended`]);V([`lead`,`user`,`window_closed`,`workflow_ended`,`workflow_paused`,`no_connection`,`left`,`unit_ended`]);var ss=V([`make_auto`,`atlas`,`run`,`agent`,`mcp_task`,`check_launch`]),cs=[`finished`,`failed`,`stopped`,`credits`,`user_credit_limit`,`no_result`],ls=V([`starting`,`running`,`ended`]),us=V([`completed`,`cancelled`,`failed`,`start_failed`,`lost`]),ds=V([`user`,`lead`,`left`,`no_connection`,`workflow_ended`,`not_taken`]),fs=[`finished`,`stopped`,`lost`],ps=V([`lead`,`user`,`window_closed`,`host_lost`,`host_refused`,`workflow_ended`,`workflow_paused`]),ms=V([`lead_choice`,`role_default`]),hs=[`observe`,`main`,`dangerous`],gs=V(hs),_s=V([`main`,`dangerous`]),vs=`main`,ys=V([`workflow.access_hint_lost`,`workflow.window_refused`,`workflow.tab_refused`,`workflow.scenario_needs_conversion`,`workflow.identity_busy`,`workflow.identity_not_set`]);V(/* @__PURE__ */ `workflows.not_found,workflows.not_initiator,workflows.not_initiator_or_admin,workflows.worker_not_found,workflows.not_running,workflows.host_held,workflows.host_mismatch,workflows.host_lost,workflows.host_attached,workflows.host_pending,workflows.executor_kind_mismatch,workflows.executor_mismatch,workflows.agent_mismatch,workflows.request_mismatch,workflows.scope_not_found,workflows.scope_forbidden,workflows.conversation_busy,workflows.not_preset,workflows.not_pausable,workflows.not_continuable,workflows.text_not_stored,workflows.last_stage_not_retryable,workflows.not_amendable,workflows.place_mismatch,workflows.auto_requires_browser,workflows.segment_changed,workflows.mcp_join_unavailable,workflows.mcp_code_invalid,workflows.mcp_code_used,workflows.mcp_agent_not_found,workflows.mcp_agent_disconnected,workflows.mcp_inbox_invalid_cursor,workflows.question_not_to_lead,workflows.device_handoff_not_found,workflows.device_step_already_reported,workflows.device_run_ended,workflows.mcp_task_not_found,workflows.mcp_task_ended,workflows.mcp_task_address_required`.split(`,`)),I({status:No});var bs=I({status:No}),xs=V([`conversation_deleted`,`text_not_stored`]);bs.extend({reason:xs.extract([`conversation_deleted`]).optional()}),I({segment:A().int().min(1)}),I({executorKind:Jo}),I({reason:V([`ended`,`no_browser`])}),I({reason:H(`task_paused`)}),z(`outcome`,[I({outcome:V([`finished`,`stopped`]),lostReason:M()}),I({outcome:H(`lost`),lostReason:ds})]),I({taskIds:F(k()).min(2)}),I({stepNumber:A().int().min(1),currentStepNumber:A().int().min(1).nullable()}),I({leaseExpiresAt:w()}),I({workflowId:k()}),I({agentId:k()});var Ss={id:k(),status:ls,endStatus:R([us,M()]),endReason:D().nullable(),startedAt:w().nullable(),endedAt:w().nullable()},Cs=I({passed:A().int().min(0),failed:A().int().min(0),notStarted:A().int().min(0),total:A().int().min(0)}).strict(),ws=I({...Ss,kind:H(`check_launch`),model:M(),assignment:I({kind:H(`check_launch`),scenarioIds:F(k()).min(1)}).strict(),crawlTuple:M(),subject:I({kind:H(`scenario_launch`),launchId:k(),deeplink:D()}).strict(),progress:Cs.extend({kind:H(`check_launch`)}),cleanBrowser:j()}).strict(),Ts=/^pgat_[0-9A-Za-z]{43}$/,Es=1e3,Ds=604800,Os=[`7d`,`14d`,`30d`,`90d`],ks=[`consistently_failing`,`flaky`,`monitoring`,`insufficient_history`,`stable`],As=[`passed`,`failed`,`infra`,`cancelled`,`abandoned`],js=[`scenario`,`page`,`feature`],Ms=[`critical`,`high`,`watch`],Ns=[`lt`,`gt`,`gte`],Ps={kind:`last_runs`,maxRuns:20,maxAgeDays:90},Fs=[`infra`,`cancelled`,`abandoned`],Is=[`queued`,`launching`,`in_progress`],Ls=[`passed`,`failed`],Rs=[`before_hook_failed`,`no_start_page`,`no_path_for_page`],zs=[`no_route_to_start_page`,`navigation_service_unavailable`,`scenario_load_failed`,`run_policy_unavailable`,`variables_load_failed`,`start_failed`],Bs=[...Rs,...zs],Vs=V(Bs).exclude([`before_hook_failed`]),Hs=[...As,...Is];I({by:H(`human`),outcome:V(Ls)}).strict(),I({outcome:V(Ls)}).strict(),V([`queued`,`launching`,`in_progress`,`completed`,`failed`,`cancelled`]);var Us=[`completed`,`failed`,`cancelled`],Ws=V([`queued`,`launching`,`in_progress`]);function Gs(e){return Us.includes(e)}V([`claim_timeout`,`launch_timeout`,`launch_error`,`browser_gone`,`agent_lost`,`max_duration`,`killed`,`lease_lost`,`budget_exhausted`,...Bs,`result_not_saved`,`mcp_agent_disconnected`]);var Ks=V([`launch_error`,`browser_gone`,`max_duration`]),qs=V([`name_not_resolved`,`unreachable`,`certificate`,`timeout`,`other`]),Js=V([`claim_timeout`,`launch_timeout`,`launch_error`,`browser_gone`,`agent_lost`,`max_duration`,`killed`,`stalled`,`capability_mismatch`,`subject_rejected`,`model_timeout`,`runs_not_started`,`credits_exhausted`,`tab_closed`,`slot_taken`,`ai_disabled`,`workflow_host_lost`]),Ys=Js.exclude([`workflow_host_lost`]),Xs=V([`browser.observe`,`browser.act`,`heal.observe`,`agentic.replay_step`,`atlas.observe`,`atlas.act`,`browser.file_stage`,`browser.file_upload`,`browser.download_read`]),Zs=V([`unknown_op`,`invalid_payload`]),Qs={open:`{{`,close:`}}`,backslashGuard:!0},$s={open:`\\{\\{`,close:`\\}\\}`,backslashGuard:!1},ec=/[\n\r\u2028\u2029]/g,tc=-1;function nc(e,{open:t,close:n,backslashGuard:r}){let i=[],a=t=>r&&t>0&&e[t-1]===`\\`,o=0,s=null,c=t=>{if(s!==null&&t>=o&&(s===tc||t<=s))return s;let r=e.indexOf(n,t);for(;r!==tc&&a(r);)r=e.indexOf(n,r+1);return o=t,s=r,r},l=0,u=null,ee=t=>{if(u!==null&&t>=l&&(u===tc||t<=u))return u;ec.lastIndex=t;let n=ec.exec(e);return l=t,u=n===null?tc:n.index,u},d=e.indexOf(t);for(;d!==tc;){if(a(d)){d=e.indexOf(t,d+1);continue}let r=d+t.length,o=c(r+1);if(o===tc)break;let s=ee(r);if(s!==tc&&s<o){d=e.indexOf(t,d+1);continue}i.push({start:d,end:o+n.length,inner:e.slice(r,o)}),d=e.indexOf(t,o+n.length)}return i}function rc(e){return nc(e,Qs)}function ic(e){return nc(e,$s)}function ac(e,t,n){let r=``,i=0;for(let a of t)r+=e.slice(i,a.start)+n(a,e.slice(a.start,a.end)),i=a.end;return r+e.slice(i)}var oc=`0`,sc=`https://0`,cc=/\[[^\]/?#]*\]/g,lc=`[::]`;function uc(e){var t;if(URL.canParse(e))return!0;if(rc(e).length===0)return!1;let n=e.replace(cc,e=>rc(e).length>0?lc:e),r=rc(n),i=((t=r[0])==null?void 0:t.start)===0,a=e=>ac(n,r,t=>t.start===0?e:oc);return URL.canParse(a(oc))||i&&URL.canParse(a(sc))}var dc=D().min(1).refine(uc,{message:`Expected an absolute URL`}).meta({description:`Absolute URL as the known-secret mask wrote it: a reference {{name}} may stand in the host or the path in place of a secret value.`}),fc=/^[a-zA-Z0-9_][a-zA-Z0-9_]{0,99}$/,pc=1e4,mc=[`runtime`,`scenario`,`environment`,`project`,`company`];function hc(){let e=crypto.getRandomValues(/* @__PURE__ */ new Uint8Array(16)),t=new DataView(e.buffer,e.byteOffset,e.byteLength);t.setUint8(6,t.getUint8(6)&15|64),t.setUint8(8,t.getUint8(8)&63|128);let n=Array.from(e,e=>e.toString(16).padStart(2,`0`)).join(``);return`${n.slice(0,8)}-${n.slice(8,12)}-${n.slice(12,16)}-${n.slice(16,20)}-${n.slice(20)}`}var gc=[`$timestamp`,`$uuid`,`$random`,`$date`,`$datetime`],_c=new Set(gc);function vc(e){return _c.has(e)}function yc(e){switch(e){case`$timestamp`:return Date.now().toString();case`$uuid`:return hc();case`$random`:return Math.floor(Math.random()*1e6).toString();case`$date`:{let e=/* @__PURE__ */ new Date;return`${e.getUTCFullYear()}-${String(e.getUTCMonth()+1).padStart(2,`0`)}-${String(e.getUTCDate()).padStart(2,`0`)}`}case`$datetime`:return(/* @__PURE__ */ new Date()).toISOString()}}var bc=`$builtin:`;function xc(e){return`${bc}${e}`}function Sc(){let e=/* @__PURE__ */ new Map;for(let t of gc)e.set(t,{valueState:`set`,id:xc(t),name:t,value:yc(t),scope:`runtime`,isSecret:!1,description:null});return e}var Cc=`$runtime:`,wc=class{constructor(e){this.layers=[...e]}resolve(e){for(let t of this.layers){let n=t.variables.get(e);if(n!==void 0)return n}if(vc(e))return{valueState:`set`,id:xc(e),name:e,value:yc(e),scope:`runtime`,isSecret:!1,description:null}}resolveWithScope(e,t){for(let n of this.layers)if(n.scope===t){let t=n.variables.get(e);if(t!==void 0)return t}}setRuntime(e,t,n){let r=this.layers.find(e=>e.scope===`runtime`);r||(r={scope:`runtime`,variables:/* @__PURE__ */ new Map},this.layers.unshift(r)),r.variables.set(e,{valueState:`set`,id:`${Cc}${e}`,name:e,value:t,scope:`runtime`,isSecret:n,description:null})}getAllResolved(){let e=/* @__PURE__ */ new Map;for(let t=this.layers.length-1;t>=0;t--){let n=this.layers[t];for(let[t,r]of n.variables)e.set(t,r)}for(let t of gc)e.has(t)||e.set(t,{valueState:`set`,id:xc(t),name:t,value:yc(t),scope:`runtime`,isSecret:!1,description:null});return e}getLayers(){return this.layers}},Tc={env:`environment`,environment:`environment`,project:`project`,company:`company`,scenario:`scenario`,runtime:`runtime`};function Ec(e){let t=e.indexOf(`:`);if(t===-1)return{name:e};let n=Tc[e.substring(0,t)];return n===void 0?{name:e}:{scope:n,name:e.substring(t+1)}}function Dc(e){return rc(e).map(t=>{let{scope:n,name:r}=Ec(t.inner.trim()),i=r.startsWith(`$`);return{raw:e.slice(t.start,t.end),name:r,scope:n,isBuiltIn:i}})}function Oc(e){let t=Dc(e);return t.length>0&&t.map(e=>e.raw).join(``)===e}function kc(e,t){let n=[],r=[],i=[],a=ac(e,ic(e),({inner:e})=>{let t=i.length;return i.push(`{{${e}}}`),`\x00ESC${t}\x00`});return{result:ac(a,rc(a),(e,i)=>{let{scope:a,name:o}=Ec(e.inner.trim()),s=o.startsWith(`$`),c;return c=a===void 0?t.resolve(o):t.resolveWithScope(o,a),c===void 0?(n.push({raw:i,name:o,scope:a,isBuiltIn:s}),i):c.valueState===`unset`?(r.push({reference:{raw:i,name:o,scope:a,isBuiltIn:s},variable:c}),i):c.value}).replace(/\x00ESC(\d+)\x00/g,(e,t)=>i[Number(t)]),unresolvedVariables:n,unsetSecretReferences:r}}var Ac=I({elementId:D().uuid(),pageFingerprint:D().min(1),accessibleName:D().nullable(),role:D().nullable(),bbox:I({x:A(),y:A(),w:A(),h:A()})}),jc=I({depth:A().int().min(0),hostElementHash:D().regex(/^[0-9a-f]{16}$/,`host element hash must be 16-char lowercase hex`),hostSignature:Ac}),Mc=I({kind:H(`open-shadow-chain`),hostChain:F(jc).min(1).max(8,{message:`shadow chain exceeds 8 hops`})});L({name:D().regex(fc),value:D().min(1)});var Nc=I({x:A(),y:A(),w:A(),h:A()}).strict(),Pc=I({dataUrl:D().min(1).regex(/^data:image\/(png|jpeg|webp);base64,/,{message:`dataUrl must be an inline data:image/(png|jpeg|webp);base64,... URL`}),mediaType:V([`image/jpeg`,`image/webp`,`image/png`])}).strict().superRefine((e,t)=>{var n;let r=(n=e.dataUrl.match(/^data:([^;]+);base64,/))==null?void 0:n[1];r!==void 0&&r!==e.mediaType&&t.addIssue({code:`custom`,message:`dataUrl header media type (${r}) does not match the declared mediaType (${e.mediaType})`,path:[`mediaType`]})}),Fc=I({selector:D().min(1),selectorIndex:A().int().nonnegative(),xpath:D().min(1),selectorStability:A().min(0).max(1).optional()}).strict(),Ic=I({domain:D().min(1),pageFingerprint:D().min(1),tokens:F(D().max(64)).max(64),attributes:B(D(),D().max(256)),text:D().max(500),tagName:D().optional(),neighborText:D().max(500).optional(),role:D().optional(),accessibleName:D().max(500).optional(),dataTestId:D().optional(),placeholder:D().optional(),labelText:D().max(500).optional(),locatorIndex:A().int().optional(),shadowLineage:Mc.optional()}).strict(),Lc=I({inputType:D().optional(),required:j().optional(),disabled:j().optional(),readonly:j().optional(),checked:j().optional(),pattern:D().max(256).optional(),minLength:A().int().optional(),maxLength:A().int().optional(),min:D().max(64).optional(),max:D().max(64).optional(),ariaInvalid:j().optional(),autocomplete:D().max(64).optional()}).strict(),Rc=I({ref:A().int().nonnegative(),role:D(),name:D(),tag:D(),bbox:Nc,inViewport:j(),formState:Lc.optional(),locator:Fc,signature:Ic.nullable()}).strict(),zc=I({version:H(1),status:H(`ok`),captureRequestId:D().min(1),analyzeToolCallId:D().min(1),capturedAt:A().int(),page:I({url:dc,title:D().max(500),viewport:I({w:A().int(),h:A().int()}).strict()}).strict(),axTreeYaml:D().min(1),screenshot:Pc.nullable(),screenshotOmittedReason:V([`secret_tainted_step`,`budget_exceeded`,`foreground_lost`]).nullable(),elements:F(Rc),truncated:I({elements:A().int().nonnegative(),unresolvable:A().int().nonnegative()}).strict(),degradation:F(V([`screenshot_quality_reduced`,`screenshot_dropped`,`elements_capped`]))}).strict().superRefine((e,t)=>{e.screenshot!==null==(e.screenshotOmittedReason!==null)&&t.addIssue({code:`custom`,message:`Exactly one of screenshot / screenshotOmittedReason must be non-null`,path:[`screenshot`]})}),Bc=I({version:H(1),status:H(`failed`),captureRequestId:D().min(1),analyzeToolCallId:D().min(1),reason:V([`no_capturable_tab`,`capture_failed`,`capture_timeout`,`oversize_unrecoverable`]),message:D().max(500).optional()}).strict(),Vc=z(`status`,[zc,Bc]);function Hc(e,t){return e.length>t?e.slice(0,t):e}var U=D().min(1),Uc=D().min(1),Wc=F(k()),Gc=L({callPath:Wc,stepId:k()}),W=I({stepId:k(),occurrence:A().int().nonnegative()}).strict(),Kc={instance:Uc.optional()},G={stepId:W.shape.stepId,occurrence:W.shape.occurrence.optional(),...Kc},qc=[`text_free`,`text_contains`,`text_equals`,`assert_text`,`element_visible`,`element_exists`,`element_not_exists`,`input_value`,`url_contains`],Jc=[`manual`,`recorded`,`ai`],Yc=[`unresolved`,`resolved`,`needs_review`],Xc=[`ai`,`user`],Zc=[`no_candidate`,`low_confidence`,`no_page`,`no_hint`,`llm_error`],Qc=I({assertionType:V(qc),assertionConfig:B(D(),N()),label:R([D(),M()]),text:R([D(),M()])}).strict(),$c={text_free:[`text_free`],text:[`text_contains`,`text_equals`],element:[`element_visible`,`element_exists`,`element_not_exists`],input:[`input_value`],legacy:[`assert_text`],page:[`url_contains`]};function el(e){for(let t of Object.keys($c))if($c[t].includes(e))return t;throw Error(`Unknown assertion type: ${String(e)}`)}var tl=/* @__PURE__ */ new Set([`assert_text`]);function nl(e){return tl.has(e)}function rl(e,t){if(e===t)return!0;let n=el(e),r=el(t);return n===r&&n!==`legacy`&&r!==`legacy`&&n!==`text_free`&&r!==`text_free`}var il=new Set($c.page);function al(e){return il.has(e.assertionType)}function ol(e){return e.assertionType===`text_free`||al(e)?!1:e.targetResolution===`resolved`?!0:sl(e)?!1:cl(e.targetSelector)||cl(e.targetXpath)}function sl(e){return e.targetHint!==null||e.source===`ai`&&e.targetXpath===null}function cl(e){return e!==null&&e!==``}var ll=D().min(1).max(200).nullable(),ul=[`click`,`input`,`select`,`navigate`,`type`],dl=V(ul),fl=I({role:D(),accessibleName:D()}),pl={actionId:k(),element:fl.nullable()};z(`actionType`,[I({...pl,actionType:H(`navigate`),targetUrl:D().nullable()}),...ul.filter(e=>e!==`navigate`).map(e=>I({...pl,actionType:H(e),targetUrl:M()}))]);var ml=V([`step-scoped`]),hl=I({status:V([`unknown`,`progress`,`no_progress`,`mistake`,`accomplished`]),evidence:D().min(1),reflection:D().min(1)}),K=I({somId:A().int().positive().optional(),bbox:I({x:A(),y:A(),w:A(),h:A()}).optional(),elementHints:I({role:D(),accessibleName:D()}).optional()}),gl=I({x:A().int().min(0),y:A().int().min(0)}),_l=V([`alert`,`confirm`,`prompt`,`beforeunload`]),vl=[`click`,`type`,`select-option`,`clear-field`,`hover`,`drag`,`key-press`,`scroll`,`wait`,`observe`,`screenshot-region`],yl=[`navigate`,`switch-tab`,`open-tab`,`close-tab`,`go-back`,`reload`,`handle-dialog`];[...vl,...yl];var bl=[`agent_finish_step`,`agent_give_up`,`agent_goal_obsolete`,`agent_fold_verification`,`agent_ask_user`,`agent_ask_lead`,`message_lead`];[...vl,...yl,...bl];var xl=R([I({x:A(),y:A()}),K]),Sl=I({text:D().min(1),verification:V([`browser`,`manual`]),evidence:D().min(1).optional(),after_action_id:D().nullable().optional()}),Cl=z(`kind`,[I({kind:H(`signed_in`),last_sign_in_action_id:D().min(1),step_sign_in_input_action_ids:F(D().min(1)).optional()}),I({kind:H(`none`)})]),wl=A().int().positive(),Tl=I({textVisible:D().min(1)}),El=[I({type:H(`click`),target:K.nullable(),point:gl.nullable()}).refine(e=>e.target===null!=(e.point===null),{message:`click names exactly one of target and point`}),I({type:H(`type`),target:K,text:D(),clearFirst:j().optional()}),I({type:H(`select-option`),target:K,option:I({label:D().optional(),value:D().optional()}).refine(e=>e.label!==void 0||e.value!==void 0,{message:`select-option.option must have at least one of label or value`})}),I({type:H(`clear-field`),target:K}),I({type:H(`hover`),target:K}),I({type:H(`drag`),from:K,to:xl}),I({type:H(`key-press`),key:D(),modifiers:F(D()).optional(),target:K.optional()}),I({type:H(`scroll`),direction:V([`up`,`down`,`left`,`right`]),deltaPx:A().int().positive(),target:K.nullable()}),I({type:H(`wait`),ms:wl,reason:D().min(1),until:Tl.nullable()}),I({type:H(`observe`),reason:D()}),I({type:H(`screenshot-region`),region:I({x:A(),y:A(),w:A(),h:A()})})],Dl=[I({type:H(`navigate`),url:D(),targetPageId:k().nullable()}),I({type:H(`switch-tab`),tabId:A().int().positive()}),I({type:H(`open-tab`),url:D().nullable(),targetPageId:k().nullable()}),I({type:H(`close-tab`),tabId:A().int().positive()}),I({type:H(`go-back`)}),I({type:H(`reload`)}),I({type:H(`handle-dialog`),accept:j(),promptText:D().nullable()})];z(`type`,[...El,...Dl]),z(`type`,[...El]);var Ol=[I({type:H(`agent_finish_step`),completed_by_action_id:D(),evidence:D().min(1),expected_results:F(Sl).optional(),sign_in_before_step:Cl.optional()}),I({type:H(`agent_give_up`),reason:D()}),I({type:H(`agent_goal_obsolete`),verdict:V([`already_satisfied`,`precondition_gone`]),evidence:D().min(1),reason:D().min(1),expected_results:F(Sl).optional(),sign_in_before_step:Cl.optional()}),I({type:H(`agent_fold_verification`),expected_results:F(Sl).min(1),reason:D().min(1),sign_in_before_step:Cl.optional()}),I({type:H(`agent_ask_user`),questionId:D().uuid()}),I({type:H(`agent_ask_lead`),questionId:D().uuid()}),I({type:H(`message_lead`),messageId:D().uuid()})],kl=z(`type`,[...El,...Dl,...Ol]),Al=I({kind:V([`value`,`select`]),fieldNonEmpty:j(),valueLengthAtLeastMin:j().optional(),plainValueContains:j().optional(),selectedTextRedactedOrPlain:D().optional()}),jl=I({channel:V([`full_navigation`,`spa_navigation`,`url_change`,`dom_subtree_replacement`]),settled:I({reason:V([`first_signal_then_quiet`,`hard_cap`]),elapsedMs:A().int().nonnegative(),quietWindowMs:A().int().positive(),hardCapMs:A().int().positive()}),url:I({before:D(),after:D(),changed:j(),navigationType:V([`push`,`replace`,`reload`,`traverse`]).optional()}).optional(),title:I({before:D(),after:D()}).optional(),domDelta:I({addedSignificant:A().int().nonnegative(),removedSignificant:A().int().nonnegative(),focusMoved:j(),salientNew:F(I({role:D(),text:D()})).max(5)}).optional(),summary:D().min(1)}),Ml={somId:A().int().positive().optional(),bbox:I({x:A(),y:A(),w:A(),h:A()}).optional(),elementHints:I({role:D(),accessibleName:D()}).optional(),selector:D().optional(),selectorIndex:A().int().nonnegative().optional(),xpath:D().optional(),textSnapshot:D().optional(),signature:Ic.optional(),name:ll.optional()},Nl=I({...Ml,secretField:j()}),Pl=I({...Ml,secretField:j().optional()}),Fl={shadowLineage:P({error:`the open-shadow chain travels only in target.signature.shadowLineage`}).optional(),closedShadowRoot:H(!0).optional(),shadowChainTooDeep:H(!0).optional()},Il=I({target:Nl,...Fl}),Ll=I({target:Pl,...Fl}),Rl={actionId:D(),turnEventSeq:A().int().nonnegative(),requestId:D(),actionType:D(),urlBefore:D()},zl=Il.extend(Rl),Bl=Ll.extend(Rl),Vl=I({kind:V([`aria-live-assertive`,`aria-invalid`,`role-alert`,`styled-error-class`,`url-error-param`,`i18n-error-text`]),label:D(),excerpt:D().optional()}),Hl=I({status:H(`executed`),postObservation:I({url:D(),domSettleMs:A().int().nonnegative(),readback:Al.optional(),effect:jl.optional()}),visibleErrorSignals:F(Vl),navigationSignals:I({committed:j(),committedAt:A().optional(),url:D().optional(),openedTabIds:F(A().int().positive()).min(1).optional()}),mechanicalError:I({kind:V([`timeout`,`element-detached`,`cdp-error`]),detail:D()}).optional(),bindingCandidate:zl.optional(),pointHit:I({tag:D(),elementHints:I({role:D(),accessibleName:D()}),boundable:j()}).optional(),until:I({met:j(),waitedMs:A().int().nonnegative()}).nullable().optional(),nativeDialog:I({type:_l}).optional()}),Ul=I({status:H(`rejected`),reason:D()});z(`status`,[Hl,Ul]),z(`status`,[Hl.extend({bindingCandidate:Bl.optional()}),Ul]),I({mode:ml,evaluation_previous_goal:hl,memory:D(),next_goal:D(),reasoning:D(),action:kl}),I({tabId:A().int().positive(),openerTabId:A().int().positive().optional(),url:D(),title:D().optional(),status:V([`loading`,`complete`,`unknown`]),active:j(),ownedByRun:j(),lastCommittedAt:A().optional(),lastObservedAt:A().optional()}),I({runId:D(),...W.shape,stepIndex:A().int().nonnegative(),turnIndex:A().int().nonnegative(),actionId:D(),action:kl,tabId:A().int().positive(),requestId:D(),turnEventSeq:A().int().nonnegative(),status:V([`proposed`,`dispatching`,`dispatched`]),resumeEpoch:A().int().nonnegative(),runnerClaimEpoch:A().int().nonnegative().optional(),proposedAt:A().int().nonnegative(),urlBefore:D().optional(),dispatchedAt:A().optional(),navigationCorroboration:I({committedAt:A(),url:D(),tabId:A().int().positive(),frameId:H(0)}).optional()});var Wl={ordinal:A().int().min(0),inputValue:D().nullable(),targetUrl:D().nullable(),sourceTemplate:D().optional(),dispatchedValue:D().optional(),urlAtDispatch:D().min(1),observationEvidence:D().min(1)},Gl=dl.exclude([`type`]),Kl=`agent-user-channel R25 (2)`;function ql(e,t){if(e.secretValue===!0){if(e.inputValue!==null&&t.addIssue({code:`custom`,path:[`inputValue`],message:`a secretValue entry carries no inputValue (${Kl})`}),e.sourceTemplate===void 0){e.dispatchedValue!==void 0&&t.addIssue({code:`custom`,path:[`dispatchedValue`],message:`a secret literal carries no dispatchedValue (${Kl})`});return}Oc(e.sourceTemplate)||t.addIssue({code:`custom`,path:[`sourceTemplate`],message:`a secretValue entry carries sourceTemplate only when it is made wholly of {{...}} references (${Kl})`})}}z(`actionType`,[I({...Wl,actionType:H(`type`),bindingCandidate:zl.nullable(),secretValue:j()}),I({...Wl,actionType:Gl,bindingCandidate:zl.nullable()})]).superRefine(ql);var Jl=z(`actionType`,[I({...Wl,actionType:H(`type`),bindingCandidate:Bl.nullable(),secretValue:j().optional()}),I({...Wl,actionType:Gl,bindingCandidate:Bl.nullable()})]).superRefine(ql),Yl=2e3;L({text:D().min(1)}),I({url:D().max(2097152),title:D(),visibleText:D()});var Xl=/^[a-zA-Z_][a-zA-Z0-9_]{0,99}$/,Zl=/* @__PURE__ */ new Set([`true`,`false`,`null`,`in`,`as`,`break`,`const`,`continue`,`else`,`for`,`function`,`if`,`import`,`let`,`loop`,`package`,`namespace`,`return`,`var`,`void`,`while`]),Ql=/* @__PURE__ */ new Set([`bool`,`bytes`,`double`,`int`,`list`,`map`,`null_type`,`string`,`type`,`uint`]),$l=/* @__PURE__ */ new Set([`__proto__`]),q=D().regex(Xl).refine(e=>!Zl.has(e)&&!Ql.has(e),{message:`a reserved word or a type name of the expression language cannot be a name`}).refine(e=>!$l.has(e),{message:`__proto__ cannot be a name: the server does not accept it as a key of a JSON body`});function eu(e){return Xl.test(e)?q.safeParse(e).success?null:`reserved`:`form`}var tu=`extraction_failed`,nu=V([`element_not_found`,`element_not_found_page_busy`,`locator_absent`,`closed_shadow_root`,`action_dispatch_failed`,tu,`executor_unavailable`,`variable_missing`,`native_dialog_open`]);V([`ai_refused_credits_exhausted`,`ai_refused_user_ai_disabled`,`ai_refused_user_credit_limit_reached`,`ai_run_scenario_busy`,`ai_run_create_failed`,`ai_run_start_refused`,`ai_run_start_invalid`,`ai_worker_unreachable`,`ai_run_no_project`,`device_executor_missing`,`device_values_unresolved`]);var ru=V([`loop_limit`,`expression_error`,`expression_timeout`,`branch_not_bound`,`depth_exceeded`,`value_too_large`,`variable_missing`,`stop_failed`]),iu={credits_exhausted:`ai_refused_credits_exhausted`,user_ai_disabled:`ai_refused_user_ai_disabled`,user_credit_limit_reached:`ai_refused_user_credit_limit_reached`},au={"ai.provider_auth_failed":`ai_provider_auth_failed`,"ai.provider_rate_limited":`ai_provider_rate_limited`,"ai.provider_unavailable":`ai_provider_unavailable`,"ai.provider_quota_exhausted":`ai_provider_quota_exhausted`,"ai.provider_model_not_in_plan":`ai_provider_model_not_in_plan`,"ai.provider_region_blocked":`ai_provider_region_blocked`,"ai.provider_error":`ai_provider_error`},ou=V([`judge_uncertain`,`judge_no_verdict`,...Object.values(iu),...Object.values(au)]),su=new Map(Object.keys(iu).map(e=>[iu[e],e])),cu=`ai_run_scenario_busy`,lu=`device_executor_missing`,uu=`device_values_unresolved`,du=/* @__PURE__ */ new Map([[`element_not_found`,`unresolved`],[`element_not_found_page_busy`,`unresolved`],[`closed_shadow_root`,`unresolved`],[`locator_absent`,`locator_absent`]]);function fu(e){let t=su.get(e);if(t!==void 0)return{kind:`ai_refused`,refusal:t};if(e===cu)return{kind:`scenario_busy`};if(e===lu)return{kind:`device_executor_missing`};if(e===uu)return{kind:`device_values_unresolved`};let n=du.get(e);return n===void 0?{kind:`technical`,line:e}:{kind:`miss`,reason:n}}var pu=1e3,mu=6e4,hu=V([`step`,`call`,`condition`,`branch`,`loop`,`break`,`continue`,`stop`,`assign`]),gu=[`condition`,`branch`,`loop`,`break`,`continue`,`stop`,`assign`],_u=`shared_step`;function vu(e){return gu.includes(e)}function yu(e){return e!==`branch`}function bu(e){return e===_u?`call`:vu(e)?e:`step`}V([`call`,...gu]);var J=N().refine(e=>e!==void 0,{message:`a value is required`});function xu(e){return typeof e==`string`?e:JSON.stringify(e)}var Su={name:q,selector:D().min(1).optional(),elementId:k().optional()};function Cu(e){return e.selector===void 0!=(e.elementId===void 0)}var wu=z(`kind`,[L({kind:V([`element_visible`,`text`,`value`,`element_count`]),...Su}),L({kind:H(`attribute`),...Su,attribute:D().min(1)}),L({kind:H(`url`),name:q})]).superRefine((e,t)=>{e.kind!==`url`&&!Cu(e)&&t.addIssue({code:`custom`,path:[`selector`],message:`an observation of an element names exactly one of its selector and its elementId`})}),Tu=L({observations:F(wu),windowMs:A().int().min(0).max(mu).optional(),expression:D().min(1).optional(),text:D().min(1).optional()}).superRefine((e,t)=>{e.expression===void 0==(e.text===void 0)&&t.addIssue({code:`custom`,path:[`expression`],message:`a condition has exactly one of expression and text`}),e.text!==void 0&&e.observations.length>0&&t.addIssue({code:`custom`,path:[`observations`],message:`a condition in words observes nothing`}),e.windowMs!==void 0&&e.observations.length===0&&t.addIssue({code:`custom`,path:[`windowMs`],message:`a wait window needs observations`})}),Eu=[`passed`,`failed`],Du=L({condition:Tu}),Ou=z(`loopKind`,[L({loopKind:H(`repeat`),loopLimit:A().int().min(0),listSource:D().min(1).optional()}),L({loopKind:H(`while`),loopLimit:A().int().min(0),condition:Tu}),L({loopKind:H(`for_each`),loopLimit:A().int().min(0),listSource:D().min(1),loopVariable:q})]),ku=L({stopVerdict:V(Eu)}),Au=L({assignName:q,assignExpression:D().min(1)}),ju={step:null,call:null,condition:null,branch:Du,loop:Ou,break:null,continue:null,stop:ku,assign:Au},Mu=R([Du,Ou,ku,Au]);function Nu(e,t){let n=ju[e];return n===null?t===null:t===null?e===`branch`:n.safeParse(t).success}var Pu=R([L({name:q,value:J}),L({name:q,expression:D().min(1)})]),Fu=[`text`,`number`,`boolean`,`json`];L({name:q,type:V(Fu),defaultValue:J.optional(),required:j()});var Iu=V([`branch_not_reached`]);function Lu(e,t){return t===null||e===`step`}L({parentId:k().nullable(),orderIndex:A().int(),stepNumber:A().int().min(1),displayNumber:D().min(1),nodeKind:hu,block:Mu.nullable(),optional:j(),parameterBindings:F(Pu),bindingState:Iu.nullable()}).superRefine((e,t)=>{Nu(e.nodeKind,e.block)||t.addIssue({code:`custom`,path:[`block`],message:`these block settings are not those of a ${e.nodeKind} row`}),e.nodeKind!==`call`&&e.parameterBindings.length>0&&t.addIssue({code:`custom`,path:[`parameterBindings`],message:`only a call row binds parameters`}),Lu(e.nodeKind,e.bindingState)||t.addIssue({code:`custom`,path:[`bindingState`],message:`only an action row has a binding state`})});var Ru=L({message:D().min(1),position:A().int().min(0),fix:D().min(1).nullable()});Ru.extend({stepId:k()});var zu=I({rankTimeoutMs:A().int().min(1),rankRetryJitterMaxMs:A().int().min(0),maxRankCallsPerStep:A().int().min(1)}).strict(),Y=A().int().positive(),Bu=[`found_clean`,`found_occluded`,`found_offscreen`,`not_found_idle`,`not_found_busy`,`locator_absent`,`closed_shadow_root`];V(Bu);var Vu=/* @__PURE__ */ new Set([`found_occluded`,`found_offscreen`]),Hu=z(`action`,[I({action:H(`dispatch`)}).strict(),I({action:H(`dispatch_despite`)}).strict(),I({action:H(`fail`),code:nu}).strict()]),Uu=I({found_clean:Hu,found_occluded:Hu,found_offscreen:Hu,not_found_idle:Hu,not_found_busy:Hu,locator_absent:Hu,closed_shadow_root:Hu}).strict().superRefine((e,t)=>{for(let n of Bu)e[n].action===`dispatch_despite`&&!Vu.has(n)&&t.addIssue({code:`custom`,path:[n,`action`],message:`dispatch_despite is only valid for found_occluded / found_offscreen`})}),Wu=I({stepTimeoutMs:Y,stepTimeoutAiMs:Y,preflightTimeoutMs:Y,navigateTimeoutMs:Y,resolvePollInitialMs:Y,resolveBackoffFactor:A().min(1),resolveMaxPollIntervalMs:Y,probeBackoffFactor:A().min(1),preActionMaxAttempts:Y,preActionRetryDelayMs:Y,pageNavCheckMs:Y,postDiscoverySettleMs:Y,postDiscoveryPositionThresholdPx:Y,aiTriggerThresholdMs:Y,viewportCheckTimeoutMs:Y,interactableCheckTimeoutMs:Y,stabilityCheckTimeoutMs:Y,stabilityPositionThresholdPx:Y,postActionMinSettleMs:Y,postActionAnimationTimeoutMs:Y,aiVerifySettleTimeoutMs:Y,aiVerifySettleIdleWindowMs:Y,canvasRetryTimeoutMs:Y,canvasInitialDelayMs:Y,canvasPollIntervalMs:Y,geoRetryTimeoutMs:Y,geoRetryIntervalMs:Y,healAttemptTimeoutMs:Y}).strict(),Gu=I({onScenarioFailure:V([`advance`,`stop`]),maxUnackedSteps:A().int().min(1).max(8),controlPokeDebounceMs:A().int().min(100)}).strict(),Ku=I({maxAttemptsPerStep:A().int().min(1).max(10),retryDelayMs:A().int().min(0)}).strict(),qu=I({maxStepsPerRun:Y.nullable(),maxWallClockMs:Y,maxParallelRuns:Y.nullable()}).strict(),Ju=I({heartbeatIntervalMs:A().int().min(3e4),leaseTtlMs:A().int().min(6e4),leaseLostGraceMs:A().int().min(6e4)}).strict().refine(e=>e.leaseTtlMs>=3*e.heartbeatIntervalMs,{path:[`leaseTtlMs`],message:`leaseTtlMs must be at least 3 \u00D7 heartbeatIntervalMs`}),Yu=I({agenticTextSteps:j(),healing:j().optional()}).strict(),Xu=I({timings:Wu,decisions:I({table:Uu}).strict(),queue:Gu,retry:Ku,budgets:qu,lease:Ju,features:Yu,decisionLane:zu}).strict(),Zu=R([L({name:D().min(1),value:J}),L({name:D().min(1),secret:H(!0)})]),Qu=L({name:D().min(1),value:J}),$u=R([L({name:D().min(1),value:J}),L({name:D().min(1),secretKey:D().min(1)})]),ed=L({stepId:k(),iteration:A().int().min(0)}),td=Ua({id:k(),actionType:D().min(1),instance:Uc,callPath:Wc,planIndex:A().int().min(0),parentSettled:j(),scopedValues:F($u),loopPath:F(ed),inBranch:j()}),nd=z(`kind`,[L({kind:H(`complete`)}),L({kind:H(`decision`),blockStepId:k(),instance:Uc,callPath:Wc,planIndex:A().int().min(0),observations:F(wu),windowMs:A().int().min(0).max(mu).nullable(),expression:D().min(1).nullable(),text:D().min(1).nullable(),scopedValues:F($u).optional(),needsChoice:j()}).refine(e=>e.text!==null==(e.scopedValues!==void 0),{path:[`scopedValues`],message:`a decision carries the frame values exactly when it carries a condition in words`})]),rd=L({rows:F(td),end:nd}),id=L({stepId:k(),parentId:k().nullable(),nodeKind:hu,displayNumber:D().min(1),name:D(),actionType:D().min(1),unmapped:j(),optional:j(),bindingState:Iu.nullable(),extractionNames:F(D().min(1)),sharedStepId:k().nullable(),block:Mu.nullable()}).refine(e=>e.nodeKind===`call`||e.sharedStepId===null,{path:[`sharedStepId`],message:`only a call row names a shared step`}).refine(e=>Lu(e.nodeKind,e.bindingState),{path:[`bindingState`],message:`only an action row has a binding state`}),ad=L({owners:F(L({kind:V([`scenario`,`shared_step`]),id:k(),name:D(),rows:F(id)}))}),od=L({position:U,segment:rd,lightPlan:ad}),sd=L({position:U,segment:rd}),cd=`x-run-lease-id`,ld=`x-run-lease-epoch`,ud=D().regex(/^[a-f0-9]{64}$/),dd=I({cancelRequested:j(),killRequested:j(),budgetExhausted:I({dimension:V([`steps`,`wall_clock`])}).strict().nullable()}).strict(),fd=I({runId:k(),leaseId:k(),leaseEpoch:A().int().min(1),expiresAt:w(),heartbeatIntervalMs:A().int().min(3e4),leaseTtlMs:A().int().min(6e4)}).strict(),pd=I({steps:F(I({stepId:k(),index:A().int().min(0)}).strict()).min(1),cursorIndex:A().int().min(0),stepsAttempted:A().int().min(0),cursorLedger:F(I({stepId:k(),attempts:A().int().min(1)}).strict()),stepJumpCount:A().int().min(0)}).strict(),md=I({bundle:I({schemaVersion:H(8),policyVersion:D().min(1).max(64),policyHash:ud,issuedAt:w()}).strict(),lease:fd,plan:pd,position:U,segment:rd,values:F(Zu),lightPlan:ad,policy:Xu,control:dd}).strict();I({client:I({extensionVersion:D().min(1).max(32),bundleSchemaVersions:F(H(8)).min(1)}).strict(),takeover:j(),leaseId:k()}).strict();var hd=I({hash:ud}).strict();I({phase:V([`running`,`paused`]),policy:hd}).strict();var gd=I({leaseEpoch:A().int().min(1),expiresAt:w()}).strict(),_d=I({lease:gd,cursorIndex:A().int().min(0),stepsAttempted:A().int().min(0),control:dd}).strict(),vd=z(`action`,[I({action:H(`continue`)}).strict(),I({action:H(`retry`),attempt:A().int().min(2),delayMs:A().int().min(0)}).strict(),I({action:H(`fail_scenario`),queue:V([`advance`,`stop`])}).strict(),I({action:H(`stop_run`),reason:V([`budget_steps`,`budget_wall_clock`,`cancel_requested`,`kill_requested`])}).strict(),I({action:H(`heal_request`),healRequestId:k(),attempt:A().int().min(2)}).strict()]),yd=V([`true`,`false`,`error`]),bd=V([`true`,`false`]),xd=V([`server`,`tester`,`ai`]),Sd=D().max(Yl),Cd=D(),wd=L({code:D().max(64).regex(/^[a-z0-9_]+$/),message:D().min(1)}),Td=L({result:bd,reason:D().min(1)}),Ed=B(D(),J),Dd=k().nullable(),Od=L({blockStepId:k(),callPath:Wc,result:yd,reason:wd.nullable(),takenBranchStepId:Dd}),kd={result:yd.nullable(),reason:wd.nullable(),fix:D().min(1).nullable(),takenBranchStepId:Dd,chainResults:F(Od),valuesDelta:F(Zu),position:U,segment:rd};function Ad(e){return e.result===`error`==(e.reason!==null)}var jd={path:[`reason`],message:`reason is present exactly when the result is error`},Md=R([H(`value_too_large`),H(`variable_missing`),ou]);function Nd(e){return e===`value_too_large`||e===`variable_missing`}var Pd=L({kind:H(`decision`),position:U,blockStepId:k(),instance:Uc,planIndex:A().int().min(0).max(2147483646),expectedCursor:A().int().min(0),observations:Ed,answer:bd.optional(),failureCode:Md.optional(),failureNames:F(D().min(1)).min(1).optional(),judgeExplanation:Sd.optional(),override:Td.optional(),startedAt:w(),completedAt:w(),policy:hd}).refine(e=>e.expectedCursor===e.planIndex,{path:[`expectedCursor`],message:`expectedCursor must equal planIndex`}).refine(e=>e.answer===void 0||e.failureCode===void 0,{path:[`failureCode`],message:`a decision carries an answer or a failure code, not both`}).refine(e=>e.judgeExplanation===void 0||e.answer!==void 0||e.failureCode===`judge_uncertain`,{path:[`judgeExplanation`],message:`the explanation of the judge goes with its answer or with judge_uncertain`}).refine(e=>e.failureCode!==`judge_uncertain`||e.judgeExplanation!==void 0,{path:[`judgeExplanation`],message:`judge_uncertain carries the explanation of the judge`}).refine(e=>Nd(e.failureCode)===(e.failureNames!==void 0),{path:[`failureNames`],message:`failureNames is present exactly with failureCode value_too_large or variable_missing`}).superRefine((e,t)=>{e.failureCode===`value_too_large`&&e.failureNames!==void 0&&e.failureNames.forEach((e,n)=>{q.safeParse(e).success||t.addIssue({code:`custom`,path:[`failureNames`,n],message:`an observation above the value bound is named by its observation name`})})}),Fd=L({blockStepId:k(),callPath:Wc}),Id=L({verdict:V(Eu),reason:wd.nullable(),stepId:k().nullable(),planIndex:A().int().min(0).nullable(),callPath:Wc.nullable(),loops:F(Fd)}).refine(e=>e.stepId===null==(e.planIndex===null),{path:[`planIndex`],message:`stepId and planIndex are null together`}).refine(e=>e.stepId===null==(e.callPath===null),{path:[`callPath`],message:`stepId and callPath are null together`}).refine(e=>{var t;return e.loops.length===0||((t=e.reason)==null?void 0:t.code)===`budget_steps`},{path:[`loops`],message:`loops are listed only on a spent budget`}),Ld=L({kind:H(`decision`),replayed:j(),...kd,directive:vd,runEnd:Id.nullable(),cursorIndex:A().int().min(0),stepsAttempted:A().int().min(0),lease:gd,control:dd}).refine(Ad,jd);L({position:U,blockStepId:k(),instance:Uc,observations:Ed});var Rd=L({result:yd,reason:wd.nullable(),branchStepId:k().nullable(),operands:F(Zu)}).refine(Ad,jd),zd={environmentId:k(),values:F(L({name:D().min(1),value:J})),runtimeSecretNames:F(D().min(1))},Bd=L({stepId:k(),instance:Uc});R([L({...zd,position:U.optional(),observations:Ed,answer:bd.optional(),override:Td.optional(),targetRow:Gc.optional()}),L({...zd,position:U,readFrom:Bd})]);var Vd=L({...kd,lightPlan:ad.nullable(),runEnd:Id.nullable()}).refine(Ad,jd),Hd=V([`no_previous_step`,`previous_is_shared_step`,`lock_set`,`survivor_marked`,`device_step`,`step_scoped_run`,`goal_obsolete`,`actions_not_converted`]);I({expectedResultId:k(),targetStepId:k(),verification:V([`browser`,`manual`]),afterActionId:D().min(1).nullable()});var Ud=V([`no_action_in_window`,`element_hints_missing`,`completer_page_unknown`,`completer_type_mismatch`,`element_without_identity`]),Wd=z(`kind`,[I({kind:H(`element`),elementId:D().uuid()}),I({kind:H(`page`),pageId:D().uuid()})]),Gd=z(`kind`,[I({kind:H(`bound`)}),I({kind:H(`rebound`),previousTarget:Wd}),I({kind:H(`unbound`),reason:Ud})]),Kd=V([`url_template`,`url_redacted`,`element_without_identity`,`secret_literal`]),qd=z(`reason`,[I({reason:V([`step_scoped_run`,`not_text_step`,`lock_set`,`survivor_marked`,`device_step`,`text_edited`,`text_variable_uncarried`,`element_without_identity`,`secret_literal`]).exclude([`text_variable_uncarried`])}),I({reason:H(`text_variable_uncarried`),uncarriedVariables:F(D().min(1)).min(1)})]),Jd=I({convertedActions:A().int().nonnegative(),unconverted:F(I({actionIndex:A().int().nonnegative(),reason:Kd})),withheld:qd.nullable()}),Yd=I({anchorFound:j().nullable(),navigationObserved:j().nullable(),evidenceVerbatim:j(),binding:Gd.nullable(),conversion:Jd.nullable()}),Xd=V([`target_absent`,`scroll_lock`,`unexpected_tab`,`unexpected_window`,`native_dialog`]),Zd=V([`cookie_banner`,`modal_overlay`,`unexpected_tab`,`unexpected_window`,`native_dialog`,`unknown`]),Qd=V([`dismiss_click`,`keyboard`,`switch_tab`,`close_tab`,`open_tab`,`navigate`,`scroll`,`wait_retry`,`input`,`dialog_accept`,`dialog_dismiss`,`other`,`none_gave_up`]),$d=I({tag:D(),role:D().nullable(),ariaModal:j(),position:V([`fixed`,`sticky`,`absolute`,`other`]),zIndex:A().nullable(),viewportCoverage:A().min(0).max(1),idClassHint:D().max(200).nullable()}),ef=I({kind:V([`tab_created`,`tab_activated_away`,`window_focus_lost`]),tabId:A().nullable(),windowId:A().nullable(),openerTabId:A().nullable(),url:D().nullable(),at:A()}),tf=I({dialogType:V([`alert`,`confirm`,`prompt`,`beforeunload`]),messageExcerpt:D().max(500),url:D(),hasDefaultPrompt:j()});I({version:H(1),signal:Xd,stepId:D().uuid(),navigationEpoch:A().int(),attempt:A().int().min(1),evidence:I({occluder:$d.nullable(),scrollLock:I({overflowHiddenOn:V([`html`,`body`,`both`])}).nullable(),tabEvents:F(ef),dialog:tf.nullable()}).refine(e=>e.occluder!==null||e.scrollLock!==null||e.tabEvents.length>0||e.dialog!==null,`Gate 2: positive evidence is required \u2014 a recovery run may not be opened on a bare step failure`)});var nf=I({version:H(1),obstructionKind:Zd,actionTaken:Qd,reason:D().max(2e3),stepId:D().uuid(),attempt:A().int().min(1),turnsUsed:A().int().min(0)});I({aiRunId:D().uuid(),stepId:D().uuid(),status:V([`resolved`,`failed`,`in_progress`]),obstructionKind:Zd.nullable(),actionTaken:Qd.nullable(),reason:D().nullable(),attempt:A().int(),occurredAt:D()});var rf=V([`ai.provider_auth_failed`,`ai.provider_rate_limited`,`ai.provider_unavailable`,`ai.provider_quota_exhausted`,`ai.provider_model_not_in_plan`,`ai.provider_region_blocked`,`ai.provider_error`]),af=rf.options,of=65536,sf={outcome:P().optional(),replayStatus:P().optional()},cf=I({event_type:H(`run_started`),payload:I({orchestratorType:D(),config:B(D(),N()).optional()})}),lf=I({event_type:H(`run_paused`),payload:I({reason:D().optional()})}),uf=I({event_type:H(`run_resumed`),payload:I({reason:D().optional(),requestId:D().uuid().optional()})}),df=I({event_type:H(`run_completed`),payload:I({pagesVisited:A().int().min(0),elementsFound:A().int().min(0),totalSteps:A().int().min(0)})}),ff=I({event_type:H(`run_failed`),payload:I({errorMessage:D(),errorCode:D().optional(),errorParams:B(D(),N()).optional()})}),pf=I({event_type:H(`run_cancelled`),payload:I({cancelledBy:D().uuid().optional()})}),mf=I({event_type:H(`observation_captured`),payload:I({observation:N().optional(),sanitizedCount:A().int().min(0).optional()})}),hf=I({event_type:H(`action_dispatched`),payload:I({action:N().optional()})}),gf=I({...sf,action:N().optional(),verified:j(),stepIndex:A().int().nonnegative(),...G,elementId:D().uuid(),durationMs:A().int().nonnegative(),finishFacts:Yd.optional()}),_f=I({...sf,verified:j(),stepIndex:A().int().nonnegative(),...G,pageId:D().uuid(),durationMs:A().int().nonnegative(),finishFacts:Yd.optional()}),vf=I({...sf,action:B(D(),N())}),yf={verified:j(),stepIndex:A().int().nonnegative(),...G},bf=z(`outcome`,[I({...yf,outcome:V([`user_skipped`,`obsolete_succeeded`])}),I({...yf,outcome:V([`text_step_completed`,`text_step_converted`]),finishFacts:Yd.optional()}),I({...yf,outcome:H(`finish_unbound`),finishFacts:Yd.refine(e=>{var t;return((t=e.binding)==null?void 0:t.kind)===`unbound`},{message:`finish_unbound carries finishFacts.binding.kind 'unbound'`})}),I({...yf,outcome:H(`recorded_step_replayed`),replayStatus:H(`executed`)}),I({...yf,outcome:H(`recorded_assert_skipped`),replayStatus:H(`skipped_assert`)})]),xf=I({event_type:H(`action_succeeded`),payload:R([gf,_f,vf,bf])}),Sf=I({event_type:H(`action_failed`),payload:I({action:N().optional(),error:D().optional()})}),Cf=I({event_type:H(`retry_attempted`),payload:I({attempt:A().int().min(1),reason:D().optional()})}),wf=I({event_type:H(`ws_connected`),payload:I({epoch:D()})}),Tf=I({event_type:H(`ws_reconnected`),payload:I({epoch:D(),missedEvents:A().int().min(0).optional()})}),Ef=I({event_type:H(`ws_dropped`),payload:I({reason:D().optional()})}),Df=I({event_type:H(`llm_called`),payload:I({model:D(),promptTokens:A().int().min(0).optional(),aiUsageLogId:D().optional(),source:D().optional()})}),Of=I({event_type:H(`llm_succeeded`),payload:I({model:D(),completionTokens:A().int().min(0).optional()})}),kf=I({event_type:H(`llm_failed`),payload:I({model:D(),error:D().optional()})}),Af=I({event_type:H(`llm_rate_limited`),payload:I({model:D(),retryAfterMs:A().int().min(0).optional()})}),jf=I({event_type:H(`step_mapped`),payload:I({stepId:D().uuid(),proposedElementId:D().uuid().optional(),proposedPageId:D().uuid().optional(),confidence:A().min(0).max(1),reusedExisting:j().optional()})}),Mf=I({event_type:H(`mapping_failed`),payload:I({stepId:D().uuid(),reason:D().optional()})}),Nf=I({event_type:H(`step_executed`),payload:I({stepId:D().uuid(),success:j()})}),Pf=I({event_type:H(`mapping_corrected_by_user`),payload:I({stepId:D().uuid(),correctedElementId:D().uuid().optional()})}),Ff=I({event_type:H(`page_described`),payload:I({pageId:D().uuid(),description:D().optional()})}),If=I({event_type:H(`element_updated`),payload:I({elementId:D().uuid()})}),Lf=I({event_type:H(`element_disappeared`),payload:I({elementId:D().uuid()})}),Rf=I({event_type:H(`review_item_created`),payload:I({reviewItemId:D().uuid(),kind:D()})}),zf=I({event_type:H(`fallback_started`),payload:I({parentRunId:D().uuid(),reason:D().optional(),stepId:D().uuid().optional(),triggerReason:D().optional()})}),Bf=I({event_type:H(`fallback_completed`),payload:I({result:N().optional(),callsUsed:A().int().min(0).optional()})}),Vf=I({event_type:H(`fallback_budget_exhausted`),payload:I({budgetMs:A().int().min(0).optional(),reason:D().optional(),callsMade:A().int().min(0).optional()})}),Hf=I({event_type:H(`ensemble_sample`),payload:I({sampleN:A().int().min(1),modelResponse:N().optional(),agreed:j().optional(),eventRef:D().uuid().optional()})}),Uf=I({event_type:H(`credits_update`),payload:I({runId:D().uuid(),stepIndex:A().int().nonnegative(),deltaCredits:A().int(),totalCredits:A().int().nonnegative(),lastCallType:D().min(1)})}),Wf=I({event_type:H(`region_expanded`),payload:I({runId:k(),requestId:k(),regionId:D(),sizeBytes:A().int().nonnegative().max(of),nodeCount:A().int().nonnegative().max(400),subtreeHash:D(),seq:A().int().nonnegative()})}),Gf=I({event_type:H(`tool_use_requested`),payload:I({runId:k(),requestId:k(),toolCallId:D().min(1),tool:V([`expand_region`,`zoom_out`]),args:z(`tool`,[I({tool:H(`expand_region`),regionId:D().min(1).max(256),maxDepth:A().int().min(1).max(6)}),I({tool:H(`zoom_out`)})]),seq:A().int().nonnegative()})}),Kf=I({event_type:H(`agent_heal_started`),payload:I({...G,stepIndex:A().int().nonnegative(),requestId:D().uuid(),confidence:A().min(0).max(1).optional(),verdict:V([`moved`,`gone`]).optional(),mutationKind:V([`rebind`,`insert`,`delete`]).optional(),tier_3_consulted:j()})}),qf=I({event_type:H(`agent_heal_succeeded`),payload:I({...G,stepIndex:A().int().nonnegative(),requestId:D().uuid(),confidence:A().min(0).max(1).optional(),verdict:V([`moved`,`gone`]).optional(),mutationKind:V([`rebind`,`insert`,`delete`]).optional(),overrideStatus:V([`candidate`,`accepted`]).optional(),signatureVersionId:D().uuid().optional(),overrideId:D().uuid().optional(),insertedStepId:D().uuid().optional(),orderIndex:A().int().nonnegative().optional(),deletedStepId:D().uuid().optional(),tier_3_consulted:j()})}),Jf=I({event_type:H(`agent_heal_failed`),payload:I({reason:D(),requestId:D().uuid().optional(),stepId:D().uuid().optional(),mutationKind:V([`rebind`,`insert`,`delete`]).optional(),tier_3_consulted:j().optional()})}),Yf=I({requestId:D().uuid(),stepIndex:A().int().nonnegative(),...G,proposal:I({elementHints:I({role:D(),accessibleName:D()}).passthrough(),confidence:A().min(0).max(1),bbox:I({x:A(),y:A(),w:A(),h:A()}),reasoning:D()}),candidates:F(I({}).passthrough()).nullable().optional(),gateReason:D(),redactedScreenshotHash:D().nullable()}),Xf=I({event_type:H(`agent_action_proposed`),payload:Yf}),Zf=I({event_type:H(`agent_recovery_inserted_step`),payload:I({stepId:D().uuid().optional(),recoveryReason:D().optional()})}),Qf=I({event_type:H(`agent_turn_decided`),payload:I({seq:A().int().nonnegative(),turnIndex:A().int().nonnegative(),stepIndex:A().int().nonnegative(),...G,brainTurn:N().refine(e=>e!==void 0,{message:`brainTurn is required \u2014 a turn event without a brain transcript is not valid`}),creditsUsed:A().int().nonnegative().optional(),finishFactsEventSeq:A().int().positive().nullable().optional()})}),$f=I({event_type:H(`agent_tool_executed`),payload:I({seq:A().int().nonnegative(),actionId:D(),actionType:D(),turnIndex:A().int().nonnegative(),stepIndex:A().int().nonnegative(),...G,action:kl,result:I({status:H(`executed`),bindingCandidate:Bl.nullable()}),durationMs:A().int().nonnegative().optional()})}),ep=I({event_type:H(`agent_brain_attempt_failed`),payload:I({...G,stepIndex:A().int().nonnegative(),turnIndex:A().int().nonnegative(),errorCode:V([`agentic.brain_output_invalid`,`agentic.brain_turn_timeout`,...af]),finishReason:D().optional(),textSnippet:D().max(2048).optional(),zodIssuePaths:F(D()).optional()})}),tp=I({event_type:H(`agent_step_converted`),payload:I({sourceStepId:D().uuid(),sourceText:D().min(1),textHash:D().min(1),modelVersion:D().nullable(),promptVersion:D(),convertedStepIds:F(k()).min(1),actions:F(Jl).min(1),beforeState:I({actionType:H(`text_step`),customName:D().nullable(),expectedResultCount:A().int().min(0)})}).superRefine((e,t)=>{new Set(e.convertedStepIds).size!==e.convertedStepIds.length&&t.addIssue({code:`custom`,path:[`convertedStepIds`],message:`convertedStepIds must not contain duplicates`}),e.convertedStepIds.length>0&&e.convertedStepIds[e.convertedStepIds.length-1]!==e.sourceStepId&&t.addIssue({code:`custom`,path:[`convertedStepIds`,e.convertedStepIds.length-1],message:`convertedStepIds must end with sourceStepId`})})}),np=I({event_type:H(`conversion_stale_step`),payload:I({sourceStepId:D().uuid(),expectedTextHash:D(),actualTextHash:D().nullable(),reason:V([`text_edited`,`lock_set`,`not_text_step`,`survivor_marked`,`device_step`])})}),rp=I({expectedResultId:D().uuid(),text:D().min(1),verification:V([`browser`,`manual`]),evidence:D().min(1).nullable(),target:z(`kind`,[I({kind:H(`produced_step`),stepId:D().uuid(),ordinal:A().int().min(0),afterActionId:D().min(1)}),I({kind:H(`previous_step`),stepId:D().uuid()}),I({kind:H(`carrier`),stepId:D().uuid()})])}),ip=I({event_type:H(`expected_results_distributed`),payload:I({sourceStepId:D().uuid(),sourceText:D().min(1),textHash:D().min(1),proposalEventSeq:A().int().min(1),stepIndex:A().int().min(0),occurrence:W.shape.occurrence.optional(),producedStepIds:F(D().uuid()),expectedResults:F(rp).min(1),fold:I({carrierDeleted:H(!0),totalStepsAfter:A().int().min(0)}).nullable(),keptReason:Hd.nullable(),reason:D().min(1).nullable()}).superRefine((e,t)=>{let n=e.producedStepIds.length>0,r=e.fold!==null;if([n,r,e.keptReason!==null].filter(Boolean).length!==1){t.addIssue({code:`custom`,path:[`fold`],message:`exactly one outcome must be stated: non-empty producedStepIds, a fold, or a keptReason`});return}let i=n?`produced_step`:r?`previous_step`:`carrier`;for(let[n,r]of e.expectedResults.entries())r.target.kind!==i&&t.addIssue({code:`custom`,path:[`expectedResults`,n,`target`,`kind`],message:`target.kind must be '${i}' for this outcome`});n&&(new Set(e.producedStepIds).size!==e.producedStepIds.length&&t.addIssue({code:`custom`,path:[`producedStepIds`],message:`producedStepIds must not contain duplicates`}),e.producedStepIds[e.producedStepIds.length-1]!==e.sourceStepId&&t.addIssue({code:`custom`,path:[`producedStepIds`,e.producedStepIds.length-1],message:`producedStepIds must end with sourceStepId`}))})}),ap=I({event_type:H(`run_instructions_attached`),payload:I({present:H(!0),version:H(1)})}),op=I({event_type:H(`run_context_access`),payload:I({accessMode:V([`push`,`tool`,`direct`]),tool:V([`get_run_instructions`,`get_scenario_context`]).nullable(),status:V([`available`,`absent`,`error`]),consumer:V([`actor`,`supervisor`]),turnIndex:A().int().min(0).nullable(),stepIndex:A().int().min(0).nullable(),stepId:W.shape.stepId.nullable().optional(),occurrence:W.shape.occurrence.nullable().optional()}).superRefine((e,t)=>{if(e.stepId===void 0&&e.occurrence===void 0)return;let n=[e.stepIndex,e.stepId,e.occurrence],r=n.every(e=>e===null),i=n.every(e=>e!=null);!r&&!i&&t.addIssue({code:`custom`,path:[`stepIndex`],message:`run_context_access stepIndex, stepId and occurrence must be null together or present together`})})}),sp=I({event_type:H(`ai_recovery_resolved`),payload:nf}),cp=I({event_type:H(`ai_recovery_failed`),payload:nf}),lp=I({event_type:H(`recorded_navigate_replayed`),payload:I({stepIndex:A().int().nonnegative(),...G,requestId:k(),recordedTargetUrl:D().min(1),urlBefore:dc,urlAfter:dc,navigated:j(),attempts:A().int().min(1),domSettleMs:A().int().nonnegative(),pageId:k()})}),up={stepIndex:A().int().nonnegative(),...G,requestId:k(),elementId:k().nullable(),urlBefore:dc,urlAfter:dc,domSettleMs:A().int().nonnegative()},dp=D().min(1).refine(e=>e!==`navigate`&&e!==`assert`),fp=I({code:nu,preFired:j()}),pp=z(`replayStatus`,[I({...up,actionType:dp,replayStatus:H(`executed`),skipReason:M()}),I({...up,actionType:H(`assert`),replayStatus:H(`skipped_assert`),skipReason:H(`binding_mode_assert`)}),I({...up,actionType:dp,replayStatus:H(`failed`),failure:fp,skipReason:M(),domSettleMs:H(0)})]),mp=I({event_type:H(`recorded_step_replayed`),payload:pp}),hp=L({stepId:W.shape.stepId,occurrence:W.shape.occurrence,instance:Kc.instance.unwrap(),result:yd,reason:wd.nullable(),fix:D().min(1).nullable(),expression:D().min(1).nullable(),operands:F(Zu),frameValues:F(Qu),assigned:Qu.nullable(),explanation:Cd.nullable(),decidedBy:xd.exclude([`tester`])}).refine(e=>e.decidedBy===`ai`==(e.explanation!==null),{path:[`decidedBy`],message:`the AI decided exactly when the event carries its explanation`}).refine(e=>e.explanation===null||e.expression===null,{path:[`expression`],message:`a condition in words has no expression`}).refine(e=>{var t;return e.decidedBy!==`ai`||e.result!==`error`||((t=e.reason)==null?void 0:t.code)===`judge_uncertain`},{path:[`reason`],message:`the judge fails a condition only as not sure`});z(`event_type`,[cf,lf,uf,df,ff,pf,mf,hf,xf,Sf,Cf,wf,Tf,Ef,Df,Of,kf,Af,jf,Mf,Nf,Pf,Ff,If,Lf,Rf,zf,Bf,Vf,Hf,Xf,Zf,Kf,qf,Jf,Uf,Wf,Gf,Qf,$f,ep,tp,np,ip,ap,op,sp,cp,lp,mp,I({event_type:H(`agent_block_decided`),payload:hp})]);var gp=V([`runtime_secrets_lost_on_restart`,`runtime_state_lost`,`runtime_fault`,`server_refused`,`executor_protocol_error`,`scenario_changed`,`scenario_unavailable`,`user_changed`,`user_signed_out`,`step_edit_locked`,`native_dialog_unreachable`]);I({cause:V([`company_changed`,`signed_out_unreported`,`session_expired`])}).strict();var _p=I({errorClass:D().regex(/^[A-Za-z0-9_.:-]{1,80}$/)}).strict(),vp=I({httpStatus:A().int().min(400).max(499),errorCode:D().regex(/^[a-z0-9_.]{1,80}$/).nullable()}).strict(),yp=I({op:Xs,code:Zs}).strict(),bp=z(`kind`,[I({kind:H(`provider_error`),code:R([rf,M()])}).strict(),I({kind:H(`limit`),limitSec:A().int().min(1)}).strict(),I({kind:H(`give_up`),explanation:R([D().min(1),M()])}).strict()]),xp=[`element-missing`,`budget-exhausted`,`vision-rate-limit`,`network`,`tab-closed`,`llm-response-invalid`,`agent-launch`,`propose-step-timeout`,`outcome-wrong-effect`,`give-up`,`unsupported-step`,`navigation-resume-refused`,`recorded-navigate-unresolvable`,`recorded-navigate-unreachable`],Sp=[`runtime-state-lost`,`runtime-secrets-lost`,`scenario-changed`,`scenario-unavailable`,`user-changed`,`user-signed-out`,`secret-not-persistable`,`step-edit-locked`,`native-dialog-unreachable`,`url-secret-refused`,`runtime-fault`,`server-refused`,`executor-protocol-error`,`step-turn-limit`,`step-time-limit`,`client-outdated`,`lease-expired`,`runner-disconnected`,`queue-executor-lost`,`set-aside`,`ai-disabled`,`runner-capability-mismatch`,`user-credit-limit-reached`],Cp=[...xp,...Sp],wp=`propose-step-provider-error`,Tp=`agent-job-time-limit`,Ep=`recorded-step-unreplayable`,Dp=V([...Cp,wp,Tp,Ep]),Op=V(Cp),kp={errorMessage:D().optional(),countdownSeconds:A().int().optional(),retryAttempts:I({current:A().int(),max:A().int()}).optional(),detail:D().optional()},Ap=I({reason:Op,...kp}),jp=I({reason:H(wp),providerCode:rf.optional(),...kp}),Mp=I({reason:H(Tp),limitSec:A().int().min(1),...kp}),Np=j().optional(),Pp=I({reason:H(Ep),detail:nu,preFired:Np,errorMessage:P().optional(),countdownSeconds:P().optional(),retryAttempts:P().optional()});I({reason:H(Ep),detail:H(tu),preFired:Np,errorMessage:P().optional(),countdownSeconds:P().optional(),retryAttempts:P().optional()}),z(`reason`,[Ap,jp,Mp,Pp]),z(`variant`,[I({variant:H(`captcha`)}),I({variant:H(`permission`),permission:I({type:V([`geolocation`,`notifications`,`camera`,`microphone`])})})]);var Fp=V([`created`,`running`,`paused`,`completed`,`failed`,`cancelled`]),Ip=V([`mapping`,`explorer`,`agentic_fallback`,`agentic`]),Lp=I({totalSteps:A().int().nonnegative(),mapped:A().int().nonnegative(),reviewQueued:A().int().nonnegative(),failed:A().int().nonnegative(),inProgress:A().int().nonnegative()}),Rp=I({stepIndex:A().int().nonnegative(),stepId:k()}),zp=V(/* @__PURE__ */ `user-cancel.fail-element-missing.fail-budget-exhausted.fail-vision-rate-limit.fail-network.fail-tab-closed.fail-llm-response-invalid.fail-credits-cap-exceeded.fail-captcha-aborted.fail-tool-cap-exceeded.fail-agent-launch.fail-propose-step-timeout.fail-outcome-wrong-effect.fail-give-up.fail-propose-step-provider-error.fail-unsupported-step.fail-recorded-navigate-unresolvable.fail-recorded-navigate-unreachable.fail-recorded-step-unreplayable.fail-navigation-resume-refused.fail-runtime-state-lost.fail-runtime-secrets-lost.fail-scenario-changed.fail-scenario-unavailable.fail-user-changed.fail-user-signed-out.fail-secret-not-persistable.fail-step-edit-locked.fail-native-dialog-unreachable.fail-url-secret-refused.fail-runtime-fault.fail-server-refused.fail-executor-protocol-error.fail-step-turn-limit.fail-step-time-limit.fail-client-outdated.fail-lease-expired.fail-runner-disconnected.fail-agent-job-time-limit.fail-queue-executor-lost.fail-set-aside.fail-ai-disabled.fail-runner-capability-mismatch.fail-user-credit-limit-reached`.split(`.`)),Bp=I({runId:k(),totalCredits:A().int().nonnegative(),capCredits:A().int().nonnegative().nullable(),capped:j(),aggregatedAt:D().datetime()}).refine(e=>e.capped===(e.capCredits!==null),{message:`capped must equal (capCredits !== null) \u2014 0 is a real cap, null is the only uncapped shape`}),Vp=I({version:H(1),expectedSteps:A().int().nonnegative(),resolvedSteps:A().int().nonnegative()}),Hp=I({from:D().datetime(),to:R([D().datetime(),M()]),retries:A().int().nonnegative(),providerStatus:R([A().int().min(100).max(599),M()])}).strict(),Up=I({since:D().datetime(),retries:A().int().nonnegative(),providerStatus:R([A().int().min(100).max(599),M()])}).strict(),Wp=R([V([`preparing`,`observing`,`choosing`,`acting`]),M()]);I({runId:k(),scenarioId:k().nullable(),hookAttempt:R([I({scenarioRunId:k(),hookExecutionId:k(),sharedStepId:k()}).strict(),M()]),projectId:k(),status:Fp,orchestratorType:Ip,startedAt:D().datetime().nullable(),completedAt:D().datetime().nullable(),cancelledBy:k().nullable(),errorMessage:D().nullable(),counts:Lp,secretInputHints:F(Rp),totalSteps:A().int().nonnegative(),committedBindings:A().int().nonnegative(),durationSeconds:A().int().nonnegative().nullable(),costSummary:Bp,abortReason:zp.optional(),abortParams:R([bp,M()]),providerWaits:F(Hp),openProviderWait:R([Up,M()]),phase:Wp,awaitingAnswer:R([I({questionId:k(),conversationId:R([k(),M()])}).strict(),M()]),reviewInEditorUrl:D(),runnerLastSeenAt:D().datetime().nullable(),scenarioRunId:D().uuid().nullable(),elapsedSinceLastEventMs:A().int().nonnegative(),resumeStepIndex:A().int().nonnegative().nullable(),appliedAgenticStepIds:F(D().uuid()).nullable(),turnsUsedThisStep:A().int().nonnegative().nullable(),turnsUsedThisRun:A().int().nonnegative().nullable(),stepStartedAt:D().datetime().nullable(),runStartedAt:D().datetime().nullable(),ownedTabIds:F(A().int().min(1)).nullable(),completionCoverage:Vp.nullable(),manualChecks:A().int().nonnegative()}),I({projectId:k(),scenarioId:k(),orchestratorType:H(`mapping`),currentUrl:D().url().optional(),config:I({startUrl:D().url().optional()}).default({})}),I({id:k(),status:H(`cancelled`),finishedAt:D().datetime()}),I({reason:Dp.extract([`agent-launch`,`unsupported-step`,`tab-closed`,`runtime-state-lost`,`runtime-secrets-lost`,`scenario-changed`,`scenario-unavailable`,`user-changed`,`user-signed-out`,`step-edit-locked`,`native-dialog-unreachable`,`runtime-fault`,`server-refused`,`executor-protocol-error`])}),I({id:k()}),I({fromSeq:ko().int().nonnegative().optional(),limit:ko().int().min(1).max(500).default(100),eventType:D().max(40).optional()}),I({events:F(I({id:k(),runId:k().nullable(),seq:A().int().nonnegative().nullable(),eventType:D(),recordedAt:D().datetime(),actorType:V([`system`,`user`,`llm`,`runner`]),actorUserId:k().nullable(),scenarioId:k().nullable(),stepId:k().nullable(),pageId:k().nullable(),elementId:k().nullable(),payload:N(),payloadVersion:D()})),nextSeq:A().int().nullable(),total:A().int().nonnegative()});var Gp=D().trim().min(1).max(60).refine(e=>!/\p{Cc}/u.test(e),{message:`One line, no line breaks`}),Kp=I({kind:H(`make_auto`),scenarioCount:A().int().min(1),scenarioName:D().nullable()}).strict().refine(e=>e.scenarioCount===1==(e.scenarioName!==null),{message:`scenarioName is present exactly when scenarioCount is 1`,path:[`scenarioName`]}),qp=I({kind:H(`scenario_launch`),scenarioCount:A().int().min(1),scenarioName:D().nullable()}).strict().refine(e=>e.scenarioCount===1==(e.scenarioName!==null),{message:`scenarioName is present exactly when scenarioCount is 1`,path:[`scenarioName`]}),Jp=I({kind:H(`atlas`),projectName:D()}).strict(),Yp=I({kind:H(`preset`),presetId:Xo,name:Gp.nullable(),briefLine:D().min(1)}).strict(),Xp=z(`kind`,[Kp,qp,Jp,Yp]),Zp=z(`kind`,[I({kind:H(`project`)}).strict(),I({kind:H(`scenarios`),count:A().int().min(1)}).strict(),I({kind:H(`test_run`),testRunId:k(),number:A().int().min(1),name:D().nullable()}).strict(),I({kind:H(`test_plan`),testPlanId:k(),name:D()}).strict()]),Qp=I({total:A().int().min(0),bugs:A().int().min(0),undecided:A().int().min(0)}).strict(),$p=I({done:A().int().min(0),total:A().int().min(1)}).strict().refine(e=>e.done<=e.total,{message:`done is at most total`,path:[`done`]}),em=[`make_auto`,`bind_elements`],tm=[`admin_disabled`,`credits_exhausted`,`personal_limit_reached`,`model_unavailable`],nm=I({isUnassigned:j(),hasUnboundElementSteps:j(),hasUnlockedTextSteps:j()}).strict().refine(e=>e.isUnassigned||e.hasUnboundElementSteps||e.hasUnlockedTextSteps,{message:`needs_binding must name at least one true cause`}),rm={unboundBranchRowCount:A().int().min(0)},im=I({status:H(`needs_device_executor`),...rm,details:I({stepNumbers:F(A().int().min(1)).min(1)}).strict()}).strict(),am=I({status:H(`needs_binding`),...rm,offeredActions:F(V(em)).min(1),causes:nm}).strict(),om=I({status:H(`no_steps`),...rm}).strict(),sm=I({status:H(`ai_unavailable_for_text_steps`),...rm,details:I({cause:V(tm)}).strict()}).strict(),cm=z(`status`,[im,am,om,sm,I({status:H(`ready`),...rm}).strict()]),lm=z(`status`,[im,am,om,sm]);function um(e){return e.status===`needs_binding`&&e.offeredActions.includes(`make_auto`)}var dm=Es;I({scenarioIds:F(k()).min(1).max(dm)}).strict();var fm=I({error_code:H(`scenarios.not_found`),message:D()}).strict(),pm=I({position:A().int().min(0),scenarioId:k(),outcome:H(`rejected`),error:fm}).strict(),mm=z(`outcome`,[I({position:A().int().min(0),scenarioId:k(),outcome:H(`decided`),decision:cm}).strict(),pm]),hm=I({items:F(mm)}).strict();ym(cm);var gm=ym(lm),_m=ym(mm),vm=ym(hm);function ym(e){return bm(e)}function bm(e){if(e instanceof Ha)return xm(e);if(e instanceof Ga){let t=e.options.map(xm);return z(e._zod.def.discriminator,t)}if(e instanceof Va)return e.clone({...e._zod.def,element:bm(e.element)});switch(e._zod.def.type){case`literal`:case`enum`:case`string`:case`number`:case`boolean`:return e;default:throw Error(`clientVariantOf: cannot derive a client variant of a '${e._zod.def.type}' schema`)}}function xm(e){if(!(e instanceof Ha))throw Error(`clientVariantOf: a discriminated union option must be an object, got '${e._zod.def.type}'`);let t=I(Object.fromEntries(Object.entries(e.shape).map(([e,t])=>[e,bm(t)])));return t.clone({...t._zod.def,checks:e._zod.def.checks})}var Sm=Es,Cm=V([`running`,`paused`,`completed`,`cancelled`]),wm=[`running`,`paused`],Tm=V([`executor_lost`,`awaiting_answer`]);V([`extension`,`agent`]);var Em=[`queued`,`running`,`awaiting_answer`,`completed`,`failed`,`skipped`,`cancelled`],Dm=V(Em),Om=[`completed`,`failed`,`skipped`,`cancelled`],km=[`already_queued`,`no_steps`,`binding_not_needed`,`ai_unavailable`,`test_run_open`,`scenario_busy`,`scenario_not_found`,`needs_device_executor`],Am=[`run_failed`,`launch_refused`,`executor_lost`,`server_error`],jm=[`cancelled_by_user`];V([...km,...Am,...jm]);var Mm=[`already_queued`,`no_steps`,`binding_not_needed`,`ai_unavailable`,`test_run_open`,`needs_device_executor`],Nm=V(km),Pm=V(Am),Fm=V(jm),Im=V(Mm),Lm=V(tm),Rm=I({id:k(),status:Fp,abortReason:R([zp,M()]),abortParams:R([bp,M()]),totalSteps:A().int().min(0),boundSteps:A().int().min(0),stoppedAtStep:A().int().min(1).nullable(),manualChecks:A().int().min(0)}).strict(),zm={reason:M(),aiUnavailableCause:M(),launchErrorCode:M(),holderRunId:M()};function Bm(e){let{open:t,final:n,awaiting:r}=e;return{queued:I({...t,status:H(`queued`),...zm}).strict(),running:I({...t,status:H(`running`),...zm}).strict(),awaiting_answer:I({...t,...r,status:H(`awaiting_answer`),...zm}).strict(),completed:I({...n,status:H(`completed`),...zm}).strict(),failed:z(`reason`,[I({...n,status:H(`failed`),reason:H(`launch_refused`),aiUnavailableCause:M(),launchErrorCode:D(),holderRunId:M()}).strict(),I({...n,status:H(`failed`),reason:Pm.exclude([`launch_refused`]),aiUnavailableCause:M(),launchErrorCode:M(),holderRunId:M()}).strict()]),skipped:z(`reason`,[I({...n,status:H(`skipped`),reason:H(`ai_unavailable`),aiUnavailableCause:Lm,launchErrorCode:M(),holderRunId:M()}).strict(),I({...n,status:H(`skipped`),reason:H(`scenario_busy`),aiUnavailableCause:M(),launchErrorCode:M(),holderRunId:R([k(),M()])}).strict(),I({...n,status:H(`skipped`),reason:Nm.exclude([`ai_unavailable`,`scenario_busy`]),aiUnavailableCause:M(),launchErrorCode:M(),holderRunId:M()}).strict()]),cancelled:I({...n,status:H(`cancelled`),reason:Fm,aiUnavailableCause:M(),launchErrorCode:M(),holderRunId:M()}).strict()}}function Vm(e){let{queued:t,running:n,awaiting_answer:r,completed:i,failed:a,skipped:o,cancelled:s}=Bm({...e,awaiting:{}});return z(`status`,[t,n,r,i,a,o,s])}Vm({open:{},final:{}});var Hm=I({code:V([`executor_lost`]),aiRunId:R([k(),M()])}).strict(),Um={id:k(),queueId:k(),position:A().int().min(0),scenarioId:k(),scenarioName:D(),hasInstructions:j(),run:Rm.nullable(),lastAttempt:Hm.nullable(),startedAt:w().nullable(),createdAt:w()},Wm=z(`addressee`,[I({questionId:k(),addressee:H(`user`),conversationId:k().nullable()}).strict(),I({questionId:k(),addressee:H(`lead`)}).strict()]),X=Bm({open:{...Um,finishedAt:M()},final:{...Um,finishedAt:w()},awaiting:{awaitingAnswer:Wm}}),Gm=z(`status`,[X.queued,X.running,X.awaiting_answer,X.completed,X.failed,X.skipped,X.cancelled]),Km=X.running,qm=I({queued:A().int().min(0),running:A().int().min(0),awaiting_answer:A().int().min(0),completed:A().int().min(0),failed:A().int().min(0),skipped:A().int().min(0),cancelled:A().int().min(0),total:A().int().min(0)}).strict(),Jm=I({kind:H(`extension`),executorId:k(),leaseExpiresAt:w()}).strict(),Ym={kind:H(`agent`),agentId:k(),agentJobId:k()},Xm=R([Jm,I({...Ym,executorId:k(),leaseExpiresAt:w()}).strict(),I({...Ym,executorId:M(),leaseExpiresAt:M()}).strict()]),Zm={id:k(),projectId:k(),initiatorUserId:k(),environmentId:k().nullable(),entryUrl:D().nullable(),counts:qm,currentItem:Km.nullable(),revision:A().int().min(0),createdAt:w(),updatedAt:w()},Qm=z(`status`,[I({...Zm,status:H(`running`),executor:Xm,pauseReason:M(),finishedAt:M()}).strict(),I({...Zm,status:H(`paused`),executor:M(),pauseReason:Tm,finishedAt:M()}).strict(),I({...Zm,status:H(`completed`),executor:M(),pauseReason:M(),finishedAt:w()}).strict(),I({...Zm,status:H(`cancelled`),executor:M(),pauseReason:M(),finishedAt:w()}).strict()]),$m=F(k()).min(1).max(Sm),eh=D().nullable();I({kind:H(`extension`),executorId:k()}).strict(),I({id:k()}).strict(),I({id:k(),itemId:k()}).strict(),I({projectId:k(),scenarioIds:$m,queueId:k().nullable()}).strict();var th={position:A().int().min(0),scenarioId:k()},nh=I({items:F(z(`outcome`,[I({...th,outcome:H(`admitted`)}).strict(),z(`reason`,[I({...th,outcome:H(`skipped`),reason:H(`ai_unavailable`),aiUnavailableCause:Lm}).strict(),I({...th,outcome:H(`skipped`),reason:Im.exclude([`ai_unavailable`]),aiUnavailableCause:M()}).strict()]),pm]))}).strict();I({clientRequestId:k(),scenarioIds:$m,instructions:eh}).strict();var rh=I({queue:Qm,added:F(Gm)}).strict(),ih=I({queue:Qm,item:Gm}).strict(),ah=I({items:F(Qm),total:A().int().min(0),limit:A().int().min(1),offset:A().int().min(0)}).strict(),oh=I({items:F(Gm),total:A().int().min(0),limit:A().int().min(1),offset:A().int().min(0)}).strict();V([`make_auto_queues.not_found`,`make_auto_queues.scenarios_not_found`,`make_auto_queues.not_initiator`,`make_auto_queues.not_live`,`make_auto_queues.item_not_live`,`make_auto_queues.not_paused`,`make_auto_queues.not_running`,`make_auto_queues.executor_mismatch`,`make_auto_queues.executor_forbidden`,`make_auto_queues.idempotency_conflict`,`make_auto_queues.item_start_unavailable`]),I({scenarioIds:F(k()).min(1)}).strict(),I({status:Cm}).strict(),I({status:Dm}).strict(),I({clientRequestId:k()}).strict(),I({leaseExpiresAt:w()}).strict();var sh=[`ask`,`bypass`],ch=[`normal`,`thinking`,`max`],lh=`normal`;function uh(e){return e!==`normal`}var dh=[`managed`,`company`,`personal`];function fh(e){return`/ai-settings/model-preferences/${e}`}function ph(e){return{get:(t,n)=>e(fh(t),{signal:n==null?void 0:n.signal}),select:(t,n,r)=>e(fh(t),{method:`PATCH`,body:JSON.stringify({selection:n}),signal:r==null?void 0:r.signal}),reset:(t,n)=>e(fh(t),{method:`PATCH`,body:JSON.stringify({selection:null}),signal:n==null?void 0:n.signal})}}var mh=V([`company`,`project`,`environment`,`scenario`]),hh=[`company`,`project`,`environment`],gh=V(hh),_h=I({id:k(),name:D().min(1)}),vh=I({id:k(),name:D().min(1)}),yh=I({environmentId:k(),variableNames:F(D().regex(fc)).min(1).refine(e=>new Set(e).size===e.length,`variableNames must be unique`),role:D().trim().min(1).nullable()}).strict().omit({environmentId:!0}),bh=z(`state`,[I({name:D().min(1),state:H(`present`),isSecret:j(),valueSet:j(),scope:gh}),I({name:D().min(1),state:H(`missing`)})]),xh=I({environment:_h,role:D().nullable(),variables:F(bh).min(1)}),Sh=z(`kind`,[I({kind:H(`variable`),scope:mh,environment:_h.nullable(),scenario:vh.nullable(),variableName:D().min(1),viaRunBinding:j()}).refine(e=>e.scope===`environment`==(e.environment!==null),{message:`environment must be set if and only if scope is 'environment'`,path:[`environment`]}).refine(e=>e.scope===`scenario`==(e.scenario!==null),{message:`scenario must be set if and only if scope is 'scenario'`,path:[`scenario`]}),I({kind:H(`chat_message`),setAt:D().datetime()})]),Ch=I({variableName:D().min(1),source:Sh,firstUsedAt:D().datetime(),lastUsedAt:D().datetime(),firstUsedStep:A().int().min(0).nullable(),lastUsedStep:A().int().min(0).nullable()}).refine(e=>e.firstUsedStep===null==(e.lastUsedStep===null),{message:`firstUsedStep and lastUsedStep must be both null or both set`,path:[`lastUsedStep`]}).refine(e=>e.firstUsedStep===null||e.lastUsedStep===null||e.lastUsedStep>=e.firstUsedStep,{message:`lastUsedStep must be \u2265 firstUsedStep`,path:[`lastUsedStep`]});I({unitId:k(),unitKind:ss,environment:_h.nullable(),entryUrl:D().min(1).nullable(),credentialRef:xh.nullable(),uses:F(Ch)}).refine(e=>e.unitKind!==`atlas`||e.environment!==null&&e.entryUrl!==null,{message:`an atlas unit always has environment and entryUrl`,path:[`environment`]});var wh=2e3,Th=`Entry URL is longer than ${wh} characters once normalised (spaces and non-ASCII characters are percent-encoded); shorten it`;function Eh(e){return!URL.canParse(e)||new URL(e).href.length<=wh}var Dh=D().max(wh).refine(Eh,{message:Th}),Oh=2147483647,kh=V(ch);V([`normal`,`thinking`]);var Ah=I({effort:kh}).strict(),jh=I({effort:kh,maxAgents:A().int().min(1).nullable().optional()}),Mh=I({maxAgents:A().int().min(1).max(Oh)}).strict(),Nh=[`GET`,`POST`,`PUT`,`PATCH`,`DELETE`,`OPTIONS`,`HEAD`],Ph=[`none`,`json`,`raw`,`form-data`,`x-www-form-urlencoded`],Fh=[`none`,`bearer`,`basic`,`apiKey`],Ih=[`status_code`,`header`,`body_jsonpath`,`body_regex`,`response_time`],Lh=[`captured_sync`,`manual_save`,`import_postman`,`import_openapi`,`import_curl`,`import_swagger`,`builder_save`,`history_save`],Rh=[`manual`,`generated`],zh=[`equals`,`not_equals`,`greater_than`,`less_than`,`contains`,`exists`,`not_exists`,`type_is`,`matches`,`not_matches`],Bh=[`capture`,`user`],Vh=[`cell_missing`,`address_required`,`not_configured`],Hh=[`host`,`pending`,`group`],Uh=8192,Wh=524288,Gh=512e3,Kh=2147483647,qh=65536,Jh=262144,Yh=pc+1e3;new TextEncoder,new TextDecoder;function Xh(e){let t=0;for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);r<128?t+=1:r<2048?t+=2:r>=55296&&r<=56319&&Zh(e.charCodeAt(n+1))?(t+=4,n++):t+=3}return t}var Zh=e=>e>=56320&&e<=57343,Qh=e=>{if(e===null)return null;let t=e.split(`;`)[0].trim().toLowerCase();return t===``?null:t},$h=`text/event-stream`;function eg(e,t){return e===200&&Qh(t)===$h}var tg=(e,t)=>{let{outcome:n,request:r}=e;n.kind===`failure`&&e.timing.ttfbMs!==null&&t.addIssue({code:`custom`,path:[`timing`,`ttfbMs`],message:`ttfbMs must be null when outcome.kind = 'failure'`}),cg(e,t),n.kind===`response`&&lg(e,n,t),r.body!==null&&r.body.encoding===`omitted`&&r.body.reason===`stream`&&t.addIssue({code:`custom`,path:[`request`,`body`],message:`omission reason 'stream' is a response body's only`}),e.operationHint!==null&&(r.body!==null&&r.body.encoding===`text`&&r.body.truncated||t.addIssue({code:`custom`,path:[`operationHint`],message:`operationHint is allowed only when request.body is truncated text`}))},ng=101,rg=(e,t)=>t===204||t===205||t===304||e===`HEAD`,ig=(e,t)=>t===205&&e!==`HEAD`,ag=e=>e===`api`||e===`realtime`,og=(e,t)=>{switch(e.resourceType){case`WebSocket`:return t.status===ng;case`EventSource`:case`Fetch`:case`XHR`:return eg(t.status,t.mimeType);default:return!1}},sg=`GET`,cg=(e,t)=>{let n=e.resourceType===`WebSocket`,r=e.request.url,i=URL.canParse(r)&&/^wss?:$/.test(new URL(r).protocol);URL.canParse(r)&&i!==n&&t.addIssue({code:`custom`,path:[`request`,`url`],message:`request.url is ws(s) iff resourceType is 'WebSocket'`}),e.page.documentUrl===null!==n&&t.addIssue({code:`custom`,path:[`page`,`documentUrl`],message:`page.documentUrl is null iff resourceType is 'WebSocket'`}),e.initiator===null&&!n&&t.addIssue({code:`custom`,path:[`initiator`],message:`initiator is null only for resourceType 'WebSocket'`}),n&&(e.request.method!==sg&&t.addIssue({code:`custom`,path:[`request`,`method`],message:`request.method is ${sg} for resourceType 'WebSocket'`}),e.request.body!==null&&t.addIssue({code:`custom`,path:[`request`,`body`],message:`request.body is null for resourceType 'WebSocket'`}))},lg=(e,t,n)=>{let{request:r,kind:i,resourceType:a}=e,o=rg(r.method,t.status),s=!o||ig(r.method,t.status);if((t.body===null?!o:!s)&&n.addIssue({code:`custom`,path:[`outcome`,`body`],message:`response body is null iff status is 204, 205 or 304 or the method is HEAD (205 also accepts a body)`}),t.body===null)return;let c=t.body,l=e=>c.encoding===`omitted`&&c.reason===e,u=a===`WebSocket`&&t.status!==ng;l(`not_fetched`)!==(!ag(i)||u)&&n.addIssue({code:`custom`,path:[`outcome`,`body`],message:`response body is omitted/not_fetched iff kind is not 'api' or 'realtime', or a WebSocket handshake did not answer 101`});let ee=i===`realtime`&&og(e,t),d=ee&&(a===`Fetch`||a===`XHR`)&&l(`unavailable`);l(`stream`)!==(ee&&!d)&&n.addIssue({code:`custom`,path:[`outcome`,`body`],message:`response body is omitted/stream iff kind is 'realtime' and the response opened a channel (a refused Fetch / XHR stream is omitted/unavailable)`}),c.encoding===`omitted`&&c.reason===`stream`&&(c.originalBytes!==null||c.detail!==null)&&n.addIssue({code:`custom`,path:[`outcome`,`body`],message:`an omitted/stream body has originalBytes null and detail null`})},ug=V([`api`,`document`,`static`,`beacon`,`realtime`]);function dg(e){return e===`api`||e===`beacon`||e===`realtime`}var fg=V([`page`,`iframe`,`worker`]),pg=V([`Document`,`Stylesheet`,`Image`,`Media`,`Font`,`Script`,`TextTrack`,`XHR`,`Fetch`,`Prefetch`,`EventSource`,`WebSocket`,`Manifest`,`SignedExchange`,`Ping`,`CSPViolationReport`,`Preflight`,`FedCM`,`Other`]),mg=[`cors`,`aborted`,`blocked`,`net_error`],hg=V(mg),gg=[`parser`,`script`,`preload`,`SignedExchange`,`preflight`,`FedCM`,`other`],_g=[`entry`,`action`,`idle`],vg=[`graphql`,`jsonrpc`,`grpc`,`rpc`],yg=[`attach_refused`,`debugger_detached_by_user`,`debugger_detached_target_closed`,`worker_restarted`,`session_create_failed`],bg=[`binary`,`unavailable`,`not_fetched`,`stream`],xg=w(),Sg=I({step:A().int().nonnegative().max(Kh),phase:V(_g)}).strict().refine(e=>e.phase!==`entry`||e.step===0,{path:[`step`],message:`phase 'entry' only with step 0`}),Cg=D().max(Uh).refine(e=>URL.canParse(e)&&/^(?:https?|wss?):$/.test(new URL(e).protocol),{message:`must be an absolute http(s) or ws(s) URL`}),wg=I({name:D().min(1).refine(e=>e===e.toLowerCase(),{message:`header name must be lowercase`}),value:D()}).strict(),Tg=A().int().nonnegative(),Eg=I({encoding:H(`omitted`),reason:V(bg),originalBytes:Tg.nullable(),detail:D().nullable()}).strict(),Dg=e=>I({encoding:H(`json`),content:Do(),originalBytes:Tg,truncated:H(!1)}).strict().refine(t=>Xh(JSON.stringify(t.content))<=e,{message:`json content exceeds ${e} bytes`,path:[`content`]}),Og=e=>I({encoding:H(`text`),content:D(),originalBytes:Tg,truncated:j()}).strict().refine(t=>Xh(t.content)<=e,{message:`text content exceeds ${e} bytes`,path:[`content`]}),kg=e=>z(`encoding`,[Dg(e),Og(e),Eg]),Ag=kg(Wh),jg=kg(Gh),Mg=A().int().min(100).max(599),Ng=z(`kind`,[I({kind:H(`response`),status:Mg,statusText:D(),mimeType:D().min(1).nullable(),headers:F(wg),body:jg.nullable(),fromServiceWorker:j(),fromCache:j()}).strict(),I({kind:H(`failure`),failure:hg,errorText:D(),corsError:D().nullable(),blockedReason:D().nullable()}).strict().superRefine((e,t)=>{e.corsError!==null!=(e.failure===`cors`)&&t.addIssue({code:`custom`,path:[`corsError`],message:`corsError is non-null iff failure = 'cors'`}),e.blockedReason!==null!=(e.failure===`blocked`)&&t.addIssue({code:`custom`,path:[`blockedReason`],message:`blockedReason is non-null iff failure = 'blocked'`})})]);I({clientExchangeId:k(),kind:ug,resourceType:pg,request:I({method:D().min(1).max(10).regex(/^[A-Z0-9!#$%&'*+.^_`|~-]+$/,`method must be an uppercase HTTP token`),url:Cg,headers:F(wg),body:Ag.nullable()}).strict(),outcome:Ng,timing:I({startedAt:xg,durationMs:A().nonnegative(),ttfbMs:A().nullable()}).strict(),initiator:I({type:V(gg),url:D().nullable()}).strict().nullable(),page:I({documentUrl:D().nullable(),frameId:D().nullable(),target:fg.optional()}).strict(),atlas:Sg.nullable(),operationHint:I({protocol:V(vg),operationKey:D().min(1).max(512)}).strict().nullable()}).strict().superRefine(tg);var Pg=I({clientGapId:k(),startedAt:xg,endedAt:xg.nullable(),reason:V(yg),detail:D().nullable(),tabId:A().int()}).strict(),Fg=[`CorsIssue`,`MixedContentIssue`,`ContentSecurityPolicyIssue`,`BlockedByResponseIssue`,`CookieIssue`,`GenericIssue`,`ElementAccessibilityIssue`,`SRIMessageSignatureIssue`,`StylesheetLoadingIssue`],Ig=V([`exception`,`issue`,`console_error`]),Lg=w(),Rg=A().int().nonnegative().max(Kh),zg=I({functionName:D(),url:D(),lineNumber:A().int(),columnNumber:A().int()}).strict(),Bg=z(`kind`,[I({kind:H(`exception`),message:D().max(Yh),url:D().nullable(),lineNumber:Rg,columnNumber:Rg,stack:F(zg).max(5)}).strict(),I({kind:H(`issue`),code:V(Fg),reason:D().max(200),subject:D().max(200).nullable(),url:D().max(Uh).nullable()}).strict(),I({kind:H(`console_error`),message:D().max(Yh),url:D().nullable(),lineNumber:Rg.nullable(),columnNumber:Rg.nullable(),stack:F(zg).max(5)}).strict().refine(e=>e.lineNumber===null==(e.columnNumber===null),{path:[`columnNumber`],message:`lineNumber and columnNumber are both set or both null`})]);I({clientSignalId:k(),atlas:Sg.nullable(),target:fg,count:A().int().min(1).max(Kh),firstAt:Lg,lastAt:Lg,detail:Bg}).strict().refine(e=>Date.parse(e.lastAt)>=Date.parse(e.firstAt),{path:[`lastAt`],message:`lastAt must be >= firstAt`}),I({maxEdgePx:A().int().min(1),patchPx:A().int().min(1).nullable(),maxPatches:A().int().min(1).nullable()}).refine(e=>e.patchPx===null==(e.maxPatches===null),{message:`patchPx and maxPatches are null together`});var Vg=I({width:A().int().min(1),height:A().int().min(1)});function Hg(e,t){return Math.ceil(e.width/t.patchPx)*Math.ceil(e.height/t.patchPx)}var Ug=[`image/png`,`image/jpeg`,`image/webp`,`application/pdf`,`text/plain`,`text/markdown`,`text/csv`,`application/json`,`application/vnd.openxmlformats-officedocument.spreadsheetml.sheet`,`application/vnd.openxmlformats-officedocument.wordprocessingml.document`,`application/zip`],Wg=V(Ug),Gg={"image/png":{word:`PNG`,extensions:[`png`]},"image/jpeg":{word:`JPEG`,extensions:[`jpg`,`jpeg`]},"image/webp":{word:`WebP`,extensions:[`webp`]},"application/pdf":{word:`PDF`,extensions:[`pdf`]},"text/plain":{word:`TXT`,extensions:[`txt`]},"text/markdown":{word:`MD`,extensions:[`md`]},"text/csv":{word:`CSV`,extensions:[`csv`]},"application/json":{word:`JSON`,extensions:[`json`]},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{word:`XLSX`,extensions:[`xlsx`]},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{word:`DOCX`,extensions:[`docx`]},"application/zip":{word:`ZIP`,extensions:[`zip`]}},Kg=Ug.map(e=>Gg[e].word).join(`, `);function qg(e){return Gg[e].word}var Jg=new Map(Ug.flatMap(e=>Gg[e].extensions.map(t=>[t,e])));function Yg(e){let t=e.lastIndexOf(`.`);return t<=0||t===e.length-1?null:e.slice(t+1).toLowerCase()}function Xg(e){let t=Yg(e);if(t===null)return null;let n=Jg.get(t);return n===void 0?null:n}var Zg=[`image/png`,`image/jpeg`,`image/webp`,`application/pdf`,`text/plain`,`text/markdown`],Qg=V(Zg),$g=[`image/png`,`image/jpeg`,`image/webp`],e_=[`text/plain`,`text/markdown`,`text/csv`,`application/json`],t_=[`application/vnd.openxmlformats-officedocument.spreadsheetml.sheet`,`application/vnd.openxmlformats-officedocument.wordprocessingml.document`,`application/zip`],n_=[...$g,`application/pdf`,...e_];function r_(e){return $g.includes(e)}function i_(e){return e_.includes(e)}function a_(e){return t_.includes(e)}function o_(e){return n_.includes(e)}function s_(e){return o_(e)?i_(e)?`text/plain; charset=utf-8`:e:null}var c_=`application/octet-stream`;function l_(e){return Zg.includes(e)?e:i_(e)?`text/plain`:null}var u_=5e7,d_=4e6;function f_(e){return i_(e)?d_:u_}var p_=Vg,m_=V([`pending`,`sent`]),h_=I({id:k(),projectId:k(),fileName:D().min(1).max(255),mediaType:Wg,byteSize:A().int().min(1),pageCount:A().int().min(1).nullable(),image:p_.nullable(),state:m_,createdAt:w()}).strict().superRefine((e,t)=>{e.mediaType===`application/pdf`!=(e.pageCount!==null)&&t.addIssue({code:`custom`,message:`pageCount is set exactly for application/pdf`,path:[`pageCount`]}),r_(e.mediaType)!==(e.image!==null)&&t.addIssue({code:`custom`,message:`image is set exactly for an image media type`,path:[`image`]})}),g_=V([`media_type`,`file_bytes`,`image_bytes`,`image_edge`,`image_patches`,`pdf_pages`,`request_bytes`,`files_bytes`,`images_count`,`many_images_edge`,`context_window`]),__=I({requestMaxBytes:A().int().min(1).nullable(),fileMaxBytes:A().int().min(1).nullable(),filesMaxBytesPerRequest:A().int().min(1).nullable(),imageMaxBase64Bytes:A().int().min(1).nullable(),imageMaxEdgePx:A().int().min(1).nullable(),imageMaxPatches:I({patchPx:A().int().min(1),maxPatches:A().int().min(1)}).nullable(),manyImages:I({over:A().int().min(1),maxEdgePx:A().int().min(1)}).nullable(),imagesMaxPerRequest:A().int().min(1).nullable(),pdfMaxPagesPerRequest:A().int().min(1).nullable()}),v_=I({mediaTypes:F(Qg).min(1),facts:__}).nullable();function y_(e){return 4*Math.ceil(e/3)}function b_(e,t){let n=x_(e,t);if(!n.ok||t===null)return n;if(e.mediaType===`application/pdf`){if(e.pageCount===null)throw Error(`checkAttachmentFitsModel: an application/pdf attachment has no page count`);let{pdfMaxPagesPerRequest:n}=t.facts;if(n!==null&&e.pageCount>n)return{ok:!1,fact:`pdf_pages`}}return{ok:!0}}function x_(e,t){let n=l_(e.mediaType);if(t===null||n===null||!t.mediaTypes.includes(n))return{ok:!1,fact:`media_type`};let{facts:r}=t,i=r_(e.mediaType),a=y_(e.byteSize);if(!i&&r.fileMaxBytes!==null&&e.byteSize>r.fileMaxBytes)return{ok:!1,fact:`file_bytes`};if(i&&r.imageMaxBase64Bytes!==null&&a>r.imageMaxBase64Bytes)return{ok:!1,fact:`image_bytes`};if(r.requestMaxBytes!==null&&a>r.requestMaxBytes)return{ok:!1,fact:`request_bytes`};if(i){let{image:t}=e;if(t===null)throw Error(`checkAttachmentFitsModel: an ${e.mediaType} attachment has no image size`);if(r.imageMaxEdgePx!==null&&Math.max(t.width,t.height)>r.imageMaxEdgePx)return{ok:!1,fact:`image_edge`};let n=r.imageMaxPatches;if(n!==null&&Hg(t,n)>n.maxPatches)return{ok:!1,fact:`image_patches`}}return{ok:!0}}var S_={invalidFileName:`chat_attachments.invalid_file_name`,emptyFile:`chat_attachments.empty_file`,contentMismatch:`chat_attachments.content_mismatch`,textNotUtf8:`chat_attachments.text_not_utf8`,pdfEncrypted:`chat_attachments.pdf_encrypted`,pdfUnreadable:`chat_attachments.pdf_unreadable`,imageUnreadable:`chat_attachments.image_unreadable`,notFound:`chat_attachments.not_found`,alreadySent:`chat_attachments.already_sent`,unsupportedByModel:`chat_attachments.unsupported_by_model`};I({declared:Wg}).strict(),I({attachmentIds:F(k()).min(1)}).strict();var C_=I({modelId:D().min(1),attachmentIds:F(k()).min(1),fact:g_,factValue:A().nullable()}).strict(),w_=[`en`,`ru`],T_=`progon.locale`;function E_(e){if(!e)return null;let t=e.toLowerCase();return w_.find(e=>t.startsWith(e))??null}var D_=w(),O_=I({kind:H(`agent_window`),workflowId:k(),unitId:k().nullable()}).strict(),k_=z(`kind`,[I({kind:H(`user`)}).strict(),I({kind:H(`atlas_run`),atlasRunId:k()}).strict(),O_]),A_=I({siteAnchors:F(D().min(1)),hostPatterns:F(D().min(1)).optional()}).strict(),j_=[`user_stopped`,`run_ended`,`tab_closed`,`tab_taken_by_run`,`debugger_detached`,`capture_failed`],M_=V(j_),N_=[`agent_ended`,`host_lost`],P_=V(N_),F_=V([...j_,...N_]),I_={id:k(),projectId:k(),owner:k_,environmentId:k().nullable(),hostScope:A_,status:V([`active`,`ended`]),endReason:F_.nullable(),startedAt:D_,endedAt:D_.nullable(),throughSeq:A().int().nonnegative(),exchangeCount:A().int().nonnegative(),gapCount:A().int().nonnegative()},L_=(e,t)=>{let n=e.status===`active`;n!==(e.endReason===null)&&t.addIssue({code:`custom`,path:[`endReason`],message:`endReason is null iff status = 'active'`}),n!==(e.endedAt===null)&&t.addIssue({code:`custom`,path:[`endedAt`],message:`endedAt is null iff status = 'active'`})};I(I_).strict().superRefine(L_);var R_=D().regex(/^[A-Za-z0-9+/]{43}=$/,`must be standard base64 of 32 bytes`);I({...I_,redactionKey:R_}).strict().superRefine(L_),I({owner:k_,interfaceLocale:V(w_)}).strict(),I({reason:M_}).strict(),I({items:F(N()).max(200),gaps:F(Pg).max(50),segments:F(N()).max(100).optional(),signals:F(N()).max(200).optional()}).strict().refine(e=>e.items.length>0||e.gaps.length>0||e.segments!==void 0&&e.segments.length>0||e.signals!==void 0&&e.signals.length>0,{message:`items, gaps, segments and signals may not all be empty`});var z_=[`capture.item_invalid`,`capture.host_out_of_scope`,`capture.atlas_attribution_mismatch`],B_=[`capture.item_invalid`,`capture.channel_unknown`,`capture.atlas_attribution_mismatch`],V_=[`capture.item_invalid`,`capture.atlas_attribution_mismatch`],H_=[`accepted`,`duplicate`,`rejected`],U_=I({code:D(),path:F(R([D(),A()])),message:D()}).passthrough(),W_=I({clientExchangeId:k(),outcome:V([`accepted`,`duplicate`,`rejected`,`dropped`]),exchangeId:k().nullable(),seq:A().int().positive().nullable(),errorCode:V(z_).nullable(),details:F(U_).nullable()}).strict().superRefine((e,t)=>{let n=e.outcome===`accepted`||e.outcome===`duplicate`;(n!==(e.exchangeId!==null)||n!==(e.seq!==null))&&t.addIssue({code:`custom`,path:[`exchangeId`],message:`exchangeId and seq are non-null iff outcome is accepted or duplicate`}),e.outcome===`rejected`!=(e.errorCode!==null)&&t.addIssue({code:`custom`,path:[`errorCode`],message:`errorCode is non-null iff outcome = 'rejected'`}),e.errorCode===`capture.item_invalid`!=(e.details!==null)&&t.addIssue({code:`custom`,path:[`details`],message:`details is non-null iff errorCode = 'capture.item_invalid'`})}),G_=(e,t)=>{(e.outcome===`accepted`||e.outcome===`duplicate`)!=(e.seq!==null)&&t.addIssue({code:`custom`,path:[`seq`],message:`seq is non-null iff outcome is accepted or duplicate`}),e.outcome===`rejected`!=(e.errorCode!==null)&&t.addIssue({code:`custom`,path:[`errorCode`],message:`errorCode is non-null iff outcome = 'rejected'`}),e.errorCode===`capture.item_invalid`!=(e.details!==null)&&t.addIssue({code:`custom`,path:[`details`],message:`details is non-null iff errorCode = 'capture.item_invalid'`})},K_=I({clientSegmentId:k(),outcome:V(H_),seq:A().int().positive().nullable(),errorCode:V(B_).nullable(),details:F(U_).nullable()}).strict().superRefine(G_),q_=I({clientSignalId:k(),outcome:V(H_),seq:A().int().positive().nullable(),errorCode:V(V_).nullable(),details:F(U_).nullable()}).strict().superRefine(G_),J_=I({clientGapId:k(),outcome:V([`accepted`,`closed`,`duplicate`])}).strict(),Y_=I({endReason:P_}).strict();I({results:F(W_),gapResults:F(J_),segmentResults:F(K_).optional(),signalResults:F(q_).optional(),throughSeq:A().int().nonnegative(),sessionEnd:Y_.optional()}).strict(),I({id:k(),seq:A().int().positive(),clientExchangeId:k(),kind:ug,method:D(),host:D(),path:D(),endpointId:k().nullable(),endpointNumber:A().int().positive().nullable(),status:A().int().nullable(),failure:hg.nullable(),durationMs:A(),startedAt:D_,atlas:Sg.nullable(),target:fg.nullable()}).strict().superRefine((e,t)=>{let n=dg(e.kind);(n!==(e.endpointId!==null)||n!==(e.endpointNumber!==null))&&t.addIssue({code:`custom`,path:[`endpointId`],message:`endpointId and endpointNumber are non-null iff kind is 'api', 'beacon' or 'realtime'`}),e.status===null==(e.failure===null)&&t.addIssue({code:`custom`,path:[`status`],message:`exactly one of status and failure is non-null`})});var X_=z(`kind`,[L({kind:H(`scenario`),scenarioId:k()}),L({kind:H(`hook_attempt`),scenarioRunId:k(),hookExecutionId:k(),sharedStepId:k()})]),Z_=Ua({id:k(),actionType:D().min(1)}),Q_=L({stepId:k(),occurrence:A().int().nonnegative(),stepIndex:A().int().nonnegative(),...Kc,step:Z_,nextPageId:k().nullable(),scopedValues:F(Qu).optional(),valuesDelta:F(Qu).optional()}),$_=L({kind:H(`atlas_step`),atlasRunId:k(),step:A().int().nonnegative()}),ev=L({owner:O_,projectId:k()}).nullable(),tv=L({kind:H(`page`),capture:ev,runValues:j(),maskRunValues:j()}),nv=L({kind:H(`scenario_step`),aiRunId:k(),owner:X_,projectId:k(),row:Q_,secretInputHints:F(Rp.strict()),captureActionAnchors:j(),capture:ev});z(`kind`,[tv,nv,$_]),z(`kind`,[tv,nv]),R([L({code:H(`server_refused`),detail:vp}),L({code:H(`runtime_fault`),detail:_p}),L({code:H(`executor_protocol_error`),detail:yp}),L({code:gp.exclude([`server_refused`,`runtime_fault`,`executor_protocol_error`]),detail:M()})]),L({scope:$_});var rv=L({scope:$_,actionId:D().min(1),fileIds:F(k()).min(1)});L({bugCandidateId:k()}),L({capture:V([`uploaded`,`unavailable`])}),z(`kind`,[L({kind:H(`task`),workflowId:k()}),L({kind:H(`conversation`),conversationId:k()}),L({kind:H(`playback`),aiRunId:k()}),L({kind:H(`task_identity`),workflowId:k(),identityId:k()})]),z(`kind`,[L({kind:H(`session_tab`)}),L({kind:H(`worker`),workerId:k()}),L({kind:H(`thread_window`),threadId:k()})]);var Z=D().min(1).max(255).regex(/\S/),iv=z(`kind`,[L({kind:H(`person`)}),L({kind:H(`root`)}),L({kind:H(`agent`),number:A().int().min(1)}),L({kind:H(`mcp_agent`),number:A().int().min(1)}),L({kind:H(`conversation_agent`),agentId:k()})]),av=L({fileId:k(),fileName:Z,mediaType:Wg,byteSize:A().int().min(1),author:iv,addedAt:w(),stored:j()});L({}),L({items:F(av)}),L({fileId:k()}),L({url:_a(),expiresAt:w(),fileName:Z,mediaType:Wg,byteSize:A().int().min(1)}),L({fileName:Z,text:D().min(1)}),L({fileId:k()}),L({fileName:Z}),L({uploadUrl:_a(),expiresAt:w()}),L({fileId:k(),fileName:Z,mediaType:Wg,byteSize:A().int().min(1)}),R([rv,L({target:K.refine(e=>e.somId!==void 0||e.bbox!==void 0||e.elementHints!==void 0,{message:`the target names its element by somId, bbox or elementHints`}),observationId:k().nullable(),fileIds:F(k()).min(1)})]),z(`outcome`,[L({outcome:H(`set`),fileNames:F(D())}),L({outcome:H(`not_a_file_field`)}),L({outcome:H(`rejected`),reason:D()})]),D().min(1),L({epoch:A().int().min(0)});var ov=V([`true`,`false`]).transform(e=>e===`true`);L({windowKind:V([`session_tab`,`worker`,`thread_window`]),workerId:k().optional(),threadId:k().optional(),downloadKey:D().min(1).max(255).regex(/\S/),fileName:Z,mediaType:D().min(1).max(1024),byteSize:ko().int().min(1),tooLarge:ov}).refine(e=>e.windowKind===`worker`==(e.workerId!==void 0),{message:`workerId is set exactly for the worker window`,path:[`workerId`]}).refine(e=>e.windowKind===`thread_window`==(e.threadId!==void 0),{message:`threadId is set exactly for the thread window`,path:[`threadId`]}),L({fileId:k(),stored:j()}),L({fileId:k(),fileName:Z,mediaType:Wg,byteSize:A().int().min(1)});var sv=V([`capture_exchange`,`capture_signal`,`api_execution`,`file`]);V([`capture_exchange`,`capture_signal`,`file`]);var cv=V([`not_checked`,`checking`,`reproduced`,`not_reproduced`]);I({kind:sv,id:k()}).strict();var lv=z(`kind`,[I({kind:H(`capture_exchange`),id:k(),method:D().min(1),host:D().min(1),path:D(),status:R([A().int(),M()])}).strict(),I({kind:H(`capture_signal`),id:k(),signalKind:Ig,excerpt:D()}).strict(),I({kind:H(`api_execution`),id:k(),method:D().min(1),url:D().min(1),status:R([A().int(),M()])}).strict(),I({kind:H(`file`),id:k(),fileName:Z,mediaType:Wg,byteSize:A().int().min(1),author:iv,stored:j()}).strict()]),uv=z(`kind`,[I({kind:H(`response`),status:A().int(),statusText:D(),mimeType:R([D(),M()]),headers:F(wg),body:R([jg,M()])}).strict(),I({kind:H(`failure`),failure:hg,errorText:D(),corsError:R([D(),M()]),blockedReason:R([D(),M()])}).strict()]),dv=I({functionName:D(),url:D(),lineNumber:A().int(),columnNumber:A().int()}).strict(),fv=I({message:D(),url:R([D(),M()]),lineNumber:R([A().int(),M()]),columnNumber:R([A().int(),M()]),stack:F(dv)}).strict(),pv=z(`kind`,[I({kind:H(`capture_exchange`),id:k(),capturedAt:w(),durationMs:A(),request:I({method:D().min(1),url:D().min(1),headers:F(wg),body:R([Ag,M()])}).strict(),outcome:uv}).strict(),I({kind:H(`capture_signal`),id:k(),signalKind:Ig,target:V([`page`,`iframe`,`worker`]),count:A().int().min(1),firstAt:w(),lastAt:w(),exception:R([fv,M()]),consoleError:R([fv,M()]),issue:R([I({code:D().min(1),reason:D(),subject:R([D(),M()]),url:R([D(),M()])}).strict(),M()])}).strict()]),mv=V([`critical`,`high`,`medium`,`low`]),hv=V([`secret_on_screen`,`window_not_in_front`,`capture_refused`,`wrong_tab`,`host_lost`,`upload_failed`,`launch_ended`]),gv=D().min(1).refine(e=>{let t;try{t=new URL(e).protocol}catch{return!1}return t===`http:`||t===`https:`},{message:`must be an absolute http(s) URL`}),_v=[`atlas_turn`,`run_step`,`server_step`,`agent_call`],vv=V([`secret_on_screen`,`window_not_in_front`,`capture_refused`,`wrong_tab`,`upload_failed`]),yv=z(`kind`,[I({kind:H(`atlas_turn`),atlasRunId:k(),title:D().min(1),observed:D().min(1),expected:D().min(1).nullable(),severity:mv}).strict(),I({kind:H(`run_step`),scenarioRunId:k(),stepId:k(),stepIndex:A().int().min(0),...Kc}).strict(),I({kind:H(`server_step`),scenarioRunId:k(),apiExecutionId:k(),stepId:k().nullable(),planItemId:k().nullable()}).strict(),I({kind:H(`agent_call`),title:D().min(1),observed:D().min(1),expected:D().min(1).nullable(),severity:mv}).strict()]),bv=z(`state`,[I({state:H(`awaiting`)}).strict(),I({state:H(`ready`),screenshotUrl:D().startsWith(`/api/bug-candidates/`)}).strict(),I({state:H(`unavailable`),reason:hv}).strict(),I({state:H(`no_screen`)}).strict()]),xv=z(`state`,[I({state:H(`open`)}).strict(),I({state:H(`filed`),bugId:k(),bugNumber:A().int().min(1)}).strict(),I({state:H(`duplicate`),bugId:k(),bugNumber:A().int().min(1)}).strict(),I({state:H(`confirmed`),note:D().min(1)}).strict(),I({state:H(`dismissed`),reason:D().min(1)}).strict()]),Sv=I({type:V(Ih),comparator:V(zh),target:R([D(),M()]),expected:R([D(),M()])}).strict(),Cv=z(`kind`,[I({kind:H(`atlas_turn`),apiCapture:V([`on`,`off`])}).strict(),I({kind:H(`run_step`),actionType:D().min(1),failureCode:R([D().min(1),M()]),stepName:D(),actual:R([D(),M()]),failedCheck:R([Qc,M()])}).strict(),I({kind:H(`server_step`),historyId:k(),method:D().min(1),url:D().min(1),responseStatus:A().int(),responseStatusText:R([D(),M()]),assertionsPassed:A().int().min(0),assertionsTotal:A().int().min(0),failedChecks:F(Sv).min(1)}).strict(),I({kind:H(`agent_call`),refs:F(lv)}).strict()]),wv=z(`kind`,[I({kind:H(`agent`),number:A().int().min(1)}).strict(),I({kind:H(`root`)}).strict(),I({kind:H(`mcp_agent`),number:A().int().min(1)}).strict()]),Tv=z(`kind`,[I({kind:H(`atlas_turn`),agentNumber:A().int().min(1),title:D().min(1).max(60).nullable(),stepNumber:A().int().min(0)}).strict(),I({kind:H(`run_step`),agentNumber:A().int().min(1),scenarioName:R([D(),M()])}).strict(),I({kind:H(`server_step`),savedRequestId:R([k(),M()]),requestName:R([D(),M()]),testRun:R([I({id:k(),number:A().int().min(1),name:R([D(),M()])}).strict(),M()])}).strict(),I({kind:H(`agent_call`),reporter:wv}).strict()]),Ev=I({id:k(),workflowId:k(),projectId:k(),source:yv,pageUrl:R([gv,M()]),capture:bv,status:xv,evidence:Cv,origin:Tv,verification:cv,createdAt:w()}).strict(),Dv=I({items:F(Ev),total:A().int().min(0),limit:A().int().min(1),offset:A().int().min(0)}).strict();I({clientCandidateId:k(),scenarioRunId:k(),stepId:k(),pageUrl:gv}).strict(),I({reason:vv}).strict();var Ov=`x-workflow-host-id`,kv=`x-workflow-host-epoch`;I({[Ov]:k(),[kv]:D().regex(/^(0|[1-9]\d*)$/,`must be a non-negative integer`).transform(Number)});var Av=z(`kind`,[I({kind:H(`application`),applicationId:k()}).strict(),I({kind:H(`unbound`),origin:D().min(1)}).strict(),I({kind:H(`no_address`)}).strict()]),jv=I({root:Av,name:D().min(1)}).strict(),Mv=V([`green`,`yellow`,`red`,`none`]),Q=A().int().min(0),Nv=I({passed:Q,failed:Q,notRun:Q,notCovered:Q,level:Mv}).strict(),Pv=I({section:jv,passed:Q,failed:Q,notRun:Q,notCovered:Q,level:Mv}).strict(),Fv=I({root:Av,passed:Q,failed:Q,notRun:Q,notCovered:Q,level:Mv}).strict(),Iv=I({screensWithUntried:Q}).strict();Pv.extend({oldestLastRunAt:R([w(),M()])}).strict();var Lv=I({behavior:F(Pv),api:F(Fv),total:Nv,roots:F(Fv),unlinkedTests:Q,explored:Iv}).strict(),Rv=V([`bug`,`bug_candidate`,`scenario`,`checklist`,`scenario_run`,`test_run`,`atlas_run`,`make_auto_queue`,`api_saved_request`]),zv=I({kind:Rv,id:k()}).strict(),Bv=z(`state`,[I({state:H(`exists`),kind:Rv,id:k(),title:D().nullable()}).strict(),I({state:H(`deleted`),kind:Rv,id:k()}).strict()]),Vv=I({kind:H(`unit`),unitId:k(),agentNumber:A().int().min(1)}).strict(),Hv=I({kind:H(`mcp_agent`),unitId:k(),mcpAgentNumber:A().int().min(1)}).strict(),Uv=z(`kind`,[Vv,Hv,I({kind:H(`lead`)}).strict()]);V([`map_section`,`brief_section`,`lead`,`test_plan_item`,`scenario`]);var Wv=V([`scope`,`inventory`,`sections`,`summary`,`work`,`review`,`group`,`automate`,`verify`,`run`,`triage`]),Gv=V([`planned`,`in_work`,`closed`]),Kv=V([`done`,`already_covered`,`impossible`,`excluded`,`not_reached`]),qv=V([`done`,`current`,`planned`]),Jv=z(`kind`,[I({kind:H(`map_section`),section:jv}).strict(),I({kind:H(`brief_section`)}).strict(),I({kind:H(`lead`)}).strict(),I({kind:H(`test_plan_item`),testPlanItemId:k()}).strict(),I({kind:H(`scenario`),scenarioId:k()}).strict()]),Yv=z(`kind`,[Vv,Hv]),Xv=I({id:k(),phaseKey:Wv,title:D().min(1),subject:Jv,state:Gv,outcome:R([Kv,M()]),reason:D().min(1).nullable(),reasonCode:R([D().min(1),M()]),links:F(Bv),agent:R([Yv,M()]),coverage:Pv.optional()}).strict(),Zv=I({key:Wv,state:qv}).strict(),Qv=I({scope:R([I({reading:D().min(1),reason:D().min(1)}).strict(),M()]),phases:F(Zv),items:F(Xv)}).strict(),$v=V([`draft`,`final`,`partial`]),ey=[`final`,`partial`];V(ey);var ty=V([`ok`,`problem`,`not_done`,`info`]),ny=V([`checklist_not_supported`,`scenario_deleted`,`execution_error`,`not_reached`,`impossible`]),ry=I({key:D().min(1).max(100),position:A().int().min(0),title:D().min(1),body:D(),outcome:ty,links:F(Bv),updatedAt:w()}).strict(),iy=V(/* @__PURE__ */ `project.application.feature.environment.environment_variable.environment_preference.project_variable.company_variable.scenario_variable.shared_step.step.checklist_item.checklist_item_step.api_collection.api_folder.api_endpoint.extracted_variable.capture_ruleset.capture_ruleset_version.capture_variable.custom_field_definition.custom_field_option.project_field_config.comment.page.element.canvas_element.element_group.page_connection.incident.tree_node`.split(`.`)),ay=R([Bv,z(`state`,[I({state:H(`exists`),kind:H(`project_object`),objectType:iy,id:k(),title:D().nullable()}).strict(),I({state:H(`deleted`),kind:H(`project_object`),objectType:iy,id:k()}).strict()])]),oy=I({action:V([`created`,`updated`,`deleted`]),entity:ay,at:w()}).strict(),sy=V([`completed`,`failed`,`interrupted`]),cy=I({subject:R([Bv,M()]),launchedBy:Uv,outcome:sy,reason:D().min(1).nullable()}).strict(),ly=I({itemId:k().nullable(),planItemId:k().nullable(),scenarioId:k().nullable(),title:D().nullable(),reason:ny}).strict(),uy=I({cause:Bo,failureReason:D().min(1).nullable(),hostNeverAttached:j(),at:w()}).strict(),dy=z(`access`,[I({access:H(`hidden`),state:H(`draft`)}).strict(),I({access:H(`visible`),state:$v,summary:D().min(1).nullable()}).strict()]),fy=z(`access`,[I({workflowId:k(),access:H(`hidden`),state:H(`draft`)}).strict(),I({workflowId:k(),access:H(`visible`),state:$v,summary:D().min(1).nullable(),items:F(ry),changes:F(oy),work:F(cy),candidates:F(Ev),notDone:F(ly),end:uy.nullable(),plan:R([Qv,M()])}).strict()]),py=z(`kind`,[I({kind:H(`lead`)}).strict(),I({kind:H(`agent`),ordinal:A().int().min(1)}).strict()]),my=I({summary:D().min(1),links:F(zv)}).strict(),hy=D().min(1),gy=I({title:hy,by:py,result:my.nullable()}).strict(),_y=I({unitId:k(),title:hy,by:py,takenAt:w().nullable()}).strict(),vy=I({failures:F(I({kind:V([`curation`,`change_review`,`final_analysis`]),unitId:k().nullable(),reasonCode:D().min(1).nullable()}).strict().refine(e=>e.unitId===null==(e.kind===`final_analysis`),{message:`unitId is null exactly for the final analysis`,path:[`unitId`]}).refine(e=>e.kind!==`final_analysis`||e.reasonCode!==null,{message:`the failed final analysis requires its failure code`,path:[`reasonCode`]})),retrying:j(),retryRunsFinalAnalysis:j()}).strict(),yy=[`initiator_only`,`not_stored`],by=I({shown:H(!0),parts:F(D()).min(1)}).strict(),xy=z(`shown`,[by,I({shown:H(!1),reason:V(yy)}).strict()]),Sy=z(`shown`,[by,I({shown:H(!1),reason:H(`not_stored`)}).strict()]),$=Dh.min(1),Cy=A().int().min(1),wy=I({userId:k(),displayName:D()}).strict(),Ty=I({keySource:V(dh),vendor:D().min(1),modelId:D().min(1)}).strict(),Ey=I({keySource:V(dh),vendor:D().min(1),modelId:D().min(1),name:D().min(1)}).strict(),Dy=I({standMode:gs,accountLabel:D().min(1),role:D().min(1)}).strict(),Oy=I({kind:H(`atlas`),standMode:_s,accountLabel:D().min(1),role:D().min(1),locale:D().min(1),viewportWidth:Cy,viewportHeight:Cy,entryUrl:$,environmentId:k().nullable()}).strict(),ky=I({kind:H(`make_auto`),scenarioIds:$m,instructions:D().nullable(),environmentId:k().nullable(),entryUrl:$.nullable(),crawl:I({locale:D().min(1),viewportWidth:Cy,viewportHeight:Cy}).strict()}).strict(),Ay=I({locale:D().min(1),viewportWidth:Cy,viewportHeight:Cy}).strict(),jy=R([I({kind:H(`project`)}).strict(),I({kind:H(`scenarios`),scenarioIds:$m}).strict(),I({kind:H(`test_run`),testRunId:k()}).strict(),I({kind:H(`test_plan`),testPlanId:k()}).strict()]),My=I({kind:H(`preset`),presetId:Xo,brief:D().trim().min(1),allowedChanges:F(Qo).refine(e=>new Set(e).size===e.length,{message:`allowedChanges names a change more than once`}),captureApi:j().nullable(),standMode:gs.nullable(),scope:jy,entryUrl:$.nullable(),environmentId:k().nullable(),window:Ay.nullable()}).strict();z(`kind`,[Oy,ky,My]);var Ny=ky.omit({instructions:!0}).extend({hasInstructions:j()}).strict(),Py=z(`kind`,[I({kind:H(`project`)}).strict(),I({kind:H(`scenarios`),scenarioIds:$m}).strict(),I({kind:H(`test_run`),testRunId:k(),testPlanId:k().nullable()}).strict(),I({kind:H(`test_plan`),testPlanId:k(),testRunId:k().nullable()}).strict()]),Fy=I({applicationName:D().nullable(),environmentName:D(),entryUrl:$}).strict(),Iy=z(`kind`,[Oy,Ny,I({kind:H(`preset`),presetId:Xo,name:Gp.nullable(),briefLine:D().min(1),brief:xy,scope:Py,scopeLabel:Zp,address:Fy.nullable(),environmentId:k().nullable(),captureApi:j().nullable(),standMode:R([gs,M()]),allowedChanges:F(Qo),surface:qo,newScenarioKind:R([es,M()]),credentialRef:xh.nullable(),amendments:F(I({id:k(),text:xy,createdAt:w()}).strict())}).strict().refine(e=>e.standMode===null==(e.address===null),{message:`standMode is present exactly when the task has a browser (an address)`,path:[`standMode`]})]),Ly=I({kind:H(`agent`),agentId:k(),headful:j()}).strict(),Ry=z(`kind`,[I({kind:H(`browser`)}).strict(),Ly,I({kind:H(`none`)}).strict()]),zy=Ey.extend({origin:ms}).strict(),By=I({kind:H(`make_auto`),scenarioIds:$m,hasInstructions:j(),environmentId:k().nullable(),entryUrl:$.nullable()}).strict(),Vy=I({kind:H(`atlas`),title:D().min(1).max(60).nullable(),goal:D().min(1),entryUrl:$.nullable()}).strict(),Hy=I({kind:H(`run`),scenarioId:k(),planItemId:k().nullable()}).strict(),Uy=I({...Ss,kind:H(`make_auto`),model:zy,assignment:By,crawlTuple:M(),subject:I({kind:H(`make_auto_queue`),queueId:k(),deeplink:D(),revision:A().int().min(1)}).strict().nullable(),progress:I({kind:H(`make_auto`),done:A().int().min(0),failed:A().int().min(0),total:A().int().min(0)}).strict().nullable()}).strict(),Wy=I({...Ss,kind:H(`atlas`),model:zy,assignment:Vy,crawlTuple:Dy,subject:I({kind:H(`atlas_run`),runId:k(),deeplink:D()}).strict().nullable(),progress:I({kind:H(`atlas`),steps:A().int().min(0),screensCreated:A().int().min(0),awaitingLead:j()}).strict().nullable()}).strict(),Gy=I({...Ss,kind:H(`run`),model:M(),assignment:Hy,crawlTuple:M(),subject:I({kind:H(`scenario_run`),scenarioRunId:k(),deeplink:D()}).strict(),progress:M(),deviceHandoff:I({handoffId:k(),mcpAgentWorkerId:k(),mcpAgentOrdinal:A().int().min(1),stepNumber:A().int().min(1)}).strict().nullable()}).strict(),Ky=I({...Ss,kind:H(`agent`),model:zy,assignment:I({kind:H(`agent`)}).strict(),crawlTuple:M(),subject:I({kind:H(`agent_thread`),agentThreadId:k()}).strict(),progress:M()}).strict(),qy=z(`kind`,[Uy,Wy,Gy,ws,Ky]),Jy=I({id:k(),kind:H(`window`),ordinal:A().int().min(1),status:rs,closeCause:R([is,M()]),windowOpen:j(),unit:R([qy,M()]),unitCount:A().int().min(0)}).strict(),Yy=I({unitId:k(),windowWorkerId:k(),windowOrdinal:A().int().min(1),scenarioId:k(),scenarioName:D(),deviceStep:I({handoffId:k(),stepNumber:A().int().min(1),stepCount:A().int().min(1)}).strict().nullable()}).strict(),Xy=z(`kind`,[Jy,I({id:k(),kind:H(`mcp_agent`),ordinal:A().int().min(1),status:V([`idle`,`closed`]),closeCause:R([as,M()]),joinedAt:w(),lastSeenAt:w(),disconnectsAt:w().nullable(),clientName:D().min(1).nullable(),closedAt:w().nullable(),closedBy:wy.nullable(),boundUnit:Yy.nullable(),tasks:F(_y)}).strict().refine(e=>e.closeCause===null==(e.status===`idle`),{message:`closeCause is present exactly when the MCP agent is closed`,path:[`closeCause`]}).refine(e=>e.closedAt===null==(e.status===`idle`),{message:`closedAt is present exactly when the MCP agent is closed`,path:[`closedAt`]}).refine(e=>e.disconnectsAt===null==(e.status===`closed`),{message:`disconnectsAt is present exactly while the MCP agent is connected`,path:[`disconnectsAt`]}).refine(e=>e.closedBy!==null==(e.closeCause===`user`),{message:`closedBy is present exactly when a person closed the MCP agent`,path:[`closedBy`]}).refine(e=>e.status===`idle`||e.tasks.length===0,{message:`a closed MCP agent holds no open delegation`,path:[`tasks`]}),I({id:k(),kind:H(`agent`),ordinal:A().int().min(1),status:rs,closeCause:R([os,M()]),unit:R([Ky,ws,M()]),unitCount:A().int().min(0)}).strict()]),Zy=I({state:Ro,failureReason:D().min(1).nullable(),startedAt:w().nullable(),endedAt:w().nullable()}).strict().refine(e=>e.failureReason!==null==(e.state===`failed`),{message:`failureReason is present exactly when the analysis failed`,path:[`failureReason`]}).refine(e=>e.endedAt!==null==(e.state===`done`||e.state===`failed`||e.state===`cancelled`),{message:`endedAt is present exactly when the analysis ended`,path:[`endedAt`]}),Qy=I({canStop:j(),canPause:j(),canContinue:j(),canRetryLastStage:j(),continueBlockedReason:xs.nullable(),canWriteToLead:j(),canResume:j(),canChangeAllowed:j()}).strict(),$y=I({effort:kh}),eb=I({reason:R([Js,M()]),entryFailure:R([qs,M()]),runnerLine:D().nullable()}).strict().refine(e=>e.entryFailure===null||e.reason===`launch_error`,{message:`entryFailure is present only beside reason 'launch_error'`,path:[`entryFailure`]}),tb=I({environmentName:D().nullable(),applicationName:D().nullable(),origin:D().refine(e=>URL.canParse(e)&&new URL(e).origin===e,{message:`origin is scheme://host[:port]`}).nullable()}).strict().refine(e=>e.applicationName===null||e.environmentName!==null&&e.origin!==null,{message:`an application is named only with the environment and the address it recognised`,path:[`applicationName`]}),nb=I({id:k(),projectId:k(),initiator:wy,launchKind:Uo,launchSurface:Wo,topic:Xp,goal:D().nullable(),launch:Iy,executor:Ry,agentJobId:k().nullable(),maxAgents:A().int().min(0),level:$y,permissionMode:R([V(sh),M()]),report:dy,workPlaces:F(tb).nullable(),attention:R([ts,M()]),openAsk:j(),findings:Qp,testRunProgress:R([$p,M()]),leadModel:Ey,conversationId:k().nullable(),status:No,segment:A().int().min(1),pauseCause:R([Lo,M()]),pausedBy:wy.nullable(),finalAnalysis:Zy.nullable(),lastStage:vy.nullable(),endCause:R([Bo,M()]),stoppedBy:wy.nullable(),failureReason:D().nullable(),hostState:Vo,runnerJobEnd:eb.nullable(),leadState:Ho,workers:F(Xy),openQuestionCount:A().int().min(0),createdAt:w(),endedAt:w().nullable(),permissions:Qy}).strict().refine(e=>e.lastStage!==null==(e.status===`completed`||e.status===`cancelled`||e.status===`failed`),{message:`lastStage is present exactly when the task ended`,path:[`lastStage`]}).refine(e=>e.runnerJobEnd!==null==(e.executor.kind===`agent`&&e.attention===`host_lost`),{message:`runnerJobEnd is present exactly on a runner swarm whose host is lost`,path:[`runnerJobEnd`]}).refine(e=>e.workPlaces===null==(e.launch.kind===`preset`),{message:`workPlaces is null exactly for an AI task`,path:[`workPlaces`]}).refine(e=>e.pauseCause!==null==(e.status===`pausing`||e.status===`paused`),{message:`pauseCause is present exactly while pausing or paused`,path:[`pauseCause`]}).refine(e=>e.pausedBy!==null==(e.pauseCause===`user`),{message:`pausedBy is present exactly when a person paused the run`,path:[`pausedBy`]}),rb=I({workerId:k(),ordinal:A().int().min(1),desired:V([`open`,`closed`]),windowOpen:j(),unit:R([z(`kind`,[I({unitId:k(),kind:H(`check_launch`),launchId:k()}).strict(),I({unitId:k(),kind:H(`make_auto`),queueId:k(),itemRunId:R([k(),M()])}).strict(),I({unitId:k(),kind:H(`atlas`),runId:k(),entryUrl:$,openQuestion:R([I({conversationId:R([k(),M()])}).strict(),M()])}).strict(),I({unitId:k(),kind:H(`run`),scenarioRunId:k(),scenarioId:k(),environmentId:k(),entryUrl:$}).strict()]),M()])}).strict(),ib=I({hostId:k(),epoch:A().int().min(0),leaseExpiresAt:w(),workers:F(rb)}).strict(),ab=I({workerId:k(),windowOpen:j(),windowClosedByUser:j(),tabHold:V([`run_active`,`tab_occupied`]).nullable(),unitRefusal:I({unitId:k(),errorCode:ys}).strict().nullable()}).strict(),ob=[`scenarios`,`shared-steps`,`api-collections`,`api-catalog`,`checklists`,`bugs`,`test-runs`,`imports`,`map`,`dashboard`,`map-history`,`map-changes`,`environments`,`incidents`,`trash`,`settings-general`,`settings-rules`,`settings-scenarios`,`settings-custom-fields`,`settings-variables`,`settings-capture-rules`];function sb(e){return ob.includes(e)}var cb={ru:{scenarios:`\u0421\u0446\u0435\u043D\u0430\u0440\u0438\u0438`,"shared-steps":`\u041E\u0431\u0449\u0438\u0435 \u0448\u0430\u0433\u0438`,"api-collections":`API \u0417\u0430\u043F\u0440\u043E\u0441\u044B`,"api-catalog":`API \u0417\u0430\u043F\u0440\u043E\u0441\u044B`,checklists:`\u0427\u0435\u043A-\u043B\u0438\u0441\u0442\u044B`,bugs:`\u0411\u0430\u0433\u0438`,"test-runs":`\u041F\u0440\u043E\u0433\u043E\u043D\u044B`,imports:`\u0418\u043C\u043F\u043E\u0440\u0442`,map:`\u041A\u0430\u0440\u0442\u0430 \u043F\u0440\u043E\u0435\u043A\u0442\u0430`,dashboard:`\u0414\u0430\u0448\u0431\u043E\u0440\u0434`,"map-history":`\u0418\u0441\u0442\u043E\u0440\u0438\u044F \u043A\u0430\u0440\u0442\u044B`,"map-changes":`\u0418\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044F \u043A\u0430\u0440\u0442\u044B`,environments:`\u041E\u043A\u0440\u0443\u0436\u0435\u043D\u0438\u044F`,incidents:`\u0418\u043D\u0446\u0438\u0434\u0435\u043D\u0442\u044B`,trash:`\u041A\u043E\u0440\u0437\u0438\u043D\u0430`,"settings-general":`\u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438 \u00B7 \u041E\u0441\u043D\u043E\u0432\u043D\u044B\u0435`,"settings-rules":`\u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438 \u00B7 \u041F\u0440\u0430\u0432\u0438\u043B\u0430 \u0438 \u043F\u0430\u043C\u044F\u0442\u044C`,"settings-scenarios":`\u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438 \u00B7 \u0421\u0446\u0435\u043D\u0430\u0440\u0438\u0438`,"settings-custom-fields":`\u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438 \u00B7 \u041F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044C\u0441\u043A\u0438\u0435 \u043F\u043E\u043B\u044F`,"settings-variables":`\u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438 \u00B7 \u041F\u0435\u0440\u0435\u043C\u0435\u043D\u043D\u044B\u0435`,"settings-capture-rules":`\u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438 \u00B7 \u041F\u0440\u0430\u0432\u0438\u043B\u0430 \u0437\u0430\u0445\u0432\u0430\u0442\u0430`},en:{scenarios:`Scenarios`,"shared-steps":`Shared Steps`,"api-collections":`API Requests`,"api-catalog":`API Requests`,checklists:`Checklists`,bugs:`Bugs`,"test-runs":`Test Runs`,imports:`Import`,map:`Project Map`,dashboard:`Dashboard`,"map-history":`Map history`,"map-changes":`Map changes`,environments:`Environments`,incidents:`Incidents`,trash:`Trash`,"settings-general":`Settings \u00B7 General`,"settings-rules":`Settings \u00B7 Rules and memory`,"settings-scenarios":`Settings \u00B7 Scenarios`,"settings-custom-fields":`Settings \u00B7 Custom fields`,"settings-variables":`Settings \u00B7 Variables`,"settings-capture-rules":`Settings \u00B7 Capture rules`}},lb=/^S\d+$/;function ub(e){if(!URL.canParse(e))return!1;let t=new URL(e);return t.host!==``&&t.origin===e}var db=D().regex(lb),fb=z(`kind`,[L({kind:H(`map_application`),id:k()}),L({kind:H(`map_unbound_address`),id:D().refine(ub,`id must be an origin scheme://host[:port]`)}),L({kind:H(`map_page`),id:db}),L({kind:H(`map_state`),id:db}),L({kind:H(`map_scenario`),id:k()}),L({kind:H(`scenario`),id:k()}),L({kind:H(`checklist`),id:k()}),L({kind:H(`shared-step`),id:k()}),L({kind:H(`saved-request`),id:k()}),L({kind:H(`test-run`),id:k()}),L({kind:H(`bug`),id:k()})]),pb=D().uuid(),mb=F(I({questionId:pb,selectedOptionIds:F(pb).min(1).max(6).refine(e=>new Set(e).size===e.length,`selectedOptionIds must be unique`).optional(),customText:D().optional(),skip:H(!0).optional()}).strict().superRefine((e,t)=>{[e.selectedOptionIds!==void 0,e.customText!==void 0,e.skip===!0].filter(Boolean).length!==1&&t.addIssue({code:`custom`,message:`exactly one answer resolution is required`})})).min(1).max(10).refine(e=>new Set(e.map(e=>e.questionId)).size===e.length,`questionId must be unique within answers`),hb=I({name:H(`chat-question-answer`),batchId:pb,revision:A().int().positive(),idempotencyKey:pb,answers:mb,modelSelectionId:D().min(1).optional(),tabFreeTestRunId:D().uuid().nullable().optional(),browserId:k().optional()}).strict(),gb=I({name:H(`chat-question-cancel`),batchId:pb,revision:A().int().positive(),idempotencyKey:pb,tabFreeTestRunId:D().uuid().nullable().optional(),browserId:k().optional()}).strict(),_b=I({t:H(`hello`),protocol_version:H(`1c.1`),resume:I({epoch:D().nullable(),last_seen_seq:Ao().nonnegative()}).optional(),runner_type:V([`extension`,`web`,`playwright`]).optional(),client_capabilities:F(D().min(1).max(64)).max(16).optional(),panel_id:k().optional()}),vb=I({t:H(`ping`),ts:A().int()}),yb=z(`kind`,[I({kind:H(`this_browser`)}).strict(),I({kind:H(`runner`),agentId:k()}).strict(),I({kind:H(`none`)}).strict()]),bb=[`calling_conversation`,`new_conversation`],xb=My.omit({kind:!0,window:!0}).extend({place:yb,target:V(bb)}).strict(),Sb=z(`name`,[I({name:H(`chat-send`),message:D(),mode:D(),effort:V(ch),maxAgents:A().int().min(1).nullable().optional(),place:yb,modelSelectionId:D().min(1).optional(),policyVersion:D().min(1).optional(),pageSnapshot:Vc.optional(),tabFreeTestRunId:D().uuid().nullable().optional(),browserId:k().optional(),attachmentIds:F(k()).min(1).optional(),activeObject:fb.optional(),section:V(ob).optional()}).strict().superRefine((e,t)=>{e.attachmentIds!==void 0&&(e.pageSnapshot!==void 0&&t.addIssue({code:`custom`,message:`attachmentIds are not allowed on a snapshot-delivery send`,path:[`attachmentIds`]}),new Set(e.attachmentIds).size!==e.attachmentIds.length&&t.addIssue({code:`custom`,message:`attachmentIds must be distinct`,path:[`attachmentIds`]})),e.pageSnapshot===void 0&&e.message.length===0&&t.addIssue({code:`custom`,message:`message is required`,path:[`message`]}),e.pageSnapshot!==void 0&&e.message.length!==0&&t.addIssue({code:`custom`,message:`message must be empty on a snapshot-delivery send`,path:[`message`]})}),I({name:H(`chat-stop`)}),I({name:H(`chat-tool-confirm`),toolCallId:D(),modelSelectionId:D().min(1).optional(),tabFreeTestRunId:D().uuid().nullable().optional(),browserId:k().optional(),edits:xb.optional()}),I({name:H(`chat-tool-reject`),toolCallId:D(),modelSelectionId:D().min(1).optional(),tabFreeTestRunId:D().uuid().nullable().optional(),browserId:k().optional()}),I({name:H(`run-cancel`)}),I({name:H(`session-bye`),release_runner:j().optional()}),I({name:H(`onboarding-start`)}).strict(),I({name:H(`onboarding-send`),message:D().min(1)}).strict(),I({name:H(`onboarding-advance`),action:V([`continue`,`skip_stage`]),stageId:D().min(1).max(50),stateRevision:A().int().positive()}).strict(),hb,gb]);z(`t`,[_b,vb,I({t:H(`cmd`),request_id:D().guid(),cmd:Sb}),I({t:H(`auth:refresh`),token:D().min(1)})]);var Cb=[`scenario-run`,`make-auto-queue`,`scenario-launch`,`user-notifications`,`workflow`,`browser-host`];z(`t`,[I({t:H(`hello-ack`),session_id:D().guid(),channel:V([`run`,`conversation`,...Cb]),channel_id:D().guid(),epoch:D(),top_seq:Ao(),recovered:j(),server_time:A().int()}),I({t:H(`event`),seq:Ao().positive(),epoch:D(),event_type:D(),recorded_at:A().int().nonnegative(),payload:N(),payload_version:D()}),I({t:H(`notify`),channel:V(Cb),channel_id:D().guid(),seq:Ao().positive()}).strict(),I({t:H(`ack`),request_id:D().guid(),status:V([`accepted`,`duplicate`,`rejected`]),result:N().optional(),error_code:D().optional(),error_message:D().optional()}),I({t:H(`pong`),ts:A().int(),server_ts:A().int()}),I({t:H(`auth:refresh-required`),expires_in_ms:A().int().nonnegative()}),I({t:H(`auth:refreshed`),expires_at:A().int()})]);var wb=(()=>{let e=globalThis.PROGON_DEBUG;if(typeof e==`boolean`)return e;let t={};if(t!=null&&t.PROGON_DEBUG){let e=t.PROGON_DEBUG;return e===`true`||e===`1`}try{if(typeof localStorage<`u`)return localStorage.getItem(`progon-debug`)===`true`}catch{}return!1})(),Tb=`Progon`;function Eb(e){return e?`[${Tb} ${e}]`:`[${Tb}]`}function Db(e,t,n,r){r===void 0?console[e](t,n):console[e](t,n,r)}function Ob(e){let t=typeof e==`function`?()=>Eb(e()):()=>Eb(e);return{debug:(e,n)=>{wb&&Db(`log`,t(),e,n)},info:(e,n)=>{Db(`info`,t(),e,n)},warn:(e,n)=>{Db(`warn`,t(),e,n)},error:(e,n)=>{Db(`error`,t(),e,n)}}}export{r_ as $,qc as $n,es as $r,lm as $t,Ev as A,A as Ai,rd as An,Fs as Ar,xh as At,Gg as B,_a as Bi,hu as Bn,Es as Br,ih as Bt,dy as C,M as Ci,gd as Cn,qs as Cr,Lh as Ct,jv as D,Fa as Di,sd as Dn,Ys as Dr,hh as Dt,Nv as E,z as Ei,dd as En,Gs as Er,Mh as Et,pv as F,D as Fi,Ru as Fn,As as Fr,Om as Ft,qg as G,e as Gi,Ql as Gn,$o as Gr,Qm as Gt,Ug as H,Qi as Hi,ru as Hn,vs as Hr,oh as Ht,T_ as I,xo as Ii,yu as In,Ps as Ir,Em as It,h_ as J,ll as Jn,fs as Jr,um as Jt,f_ as K,eu as Kn,cs as Kr,Cm as Kt,E_ as L,Ya as Li,vu as Ln,ks as Lr,wm as Lt,Dv as M,Oo as Mi,mu as Mn,Ns as Mr,lh as Mt,hv as N,B as Ni,pu as Nn,js as Nr,uh as Nt,Pv as O,H as Oi,od as On,Hs as Or,yh as Ot,gv as P,L as Pi,Fu as Pn,Os as Pr,sh as Pt,Yg as Q,Jc as Qn,zo as Qr,gm as Qt,w_ as R,R as Ri,J as Rn,Ds as Rr,nh as Rt,ey as S,V as Si,_d as Sn,rc as Sr,Bh as St,Lv as T,j as Ti,md as Tn,Ws as Tr,Ah as Tt,c_ as U,Ki as Ui,fu as Un,Zo as Ur,ah as Ut,Kg as V,k as Vi,xu as Vn,Cs as Vr,qm as Vt,s_ as W,w as Wi,Zl as Wn,hs as Wr,Tm as Wt,b_ as X,ol as Xn,_s as Xr,_m as Xt,C_ as Y,al as Yn,Qo as Yr,cm as Yt,x_ as Z,$c as Zn,gs as Zr,vm as Zt,wy as _,ns as _i,Cd as _n,hc as _r,Vh as _t,cb as a,Jo as ai,$p as an,nl as ar,mg as at,py as b,jo as bi,ld as bn,fc as br,Fh as bt,Fy as c,Yo as ci,bp as cn,Uc as cr,Dg as ct,Ty as d,Lo as di,xd as dn,Hc as dr,qh as dt,Xo as ei,Qp as en,Xc as er,i_ as et,$ as f,No as fi,Rd as fn,Mc as fr,Kh as ft,nb as g,ps as gi,Vd as gn,Sc as gr,Ih as gt,$y as h,ms as hi,wd as hn,wc as hr,zh as ht,yb as i,Bo as ii,qp as in,el as ir,_g as it,mv as j,I as ji,Xu as jn,Ms as jr,ph as jt,_v as k,Ua as ki,Zu as kn,Vs as kr,_h as kt,jy as l,Uo as li,af as ln,U as lr,Og as lt,ib as m,us as mi,yd as mn,kc as mr,Hh as mt,bb as n,ts as ni,Xp as nn,Zc as nr,o_ as nt,sb as o,Ko as oi,zp as on,W as or,Sg as ot,Ly as p,Go as pi,Pd as pn,Dc as pr,Jh as pt,Xg as q,q as qn,Fo as qr,dm as qt,xb as r,Io as ri,Yp as rn,rl as rr,v_ as rt,ab as s,Vo as si,Fp as sn,Gc as sr,Mg as st,Ob as t,qo as ti,Zp as tn,Yc as tr,a_ as tt,Ay as u,Ho as ui,Ld as un,Bc as ur,Xh as ut,xy as v,rs as vi,Id as vn,pc as vr,Rh as vt,fy as w,F as wi,hd as wn,Ks as wr,jh as wt,gy as x,ko as xi,cd as xn,ic as xr,Ph as xt,Sy as y,Mo as yi,vd as yn,mc as yr,Nh as yt,S_ as z,N as zi,bu as zn,Ts as zr,rh as zt};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import{r as e}from"./shared-hePW80VL.js";import{Bt as t,Ca as n,Lr as r,Mn as i,Nn as a,Sn as o,Wr as s,_n as c,as as l,bn as u,c as d,co as f,fn as p,gt as ee,in as te,is as m,l as ne,ls as re,m as ie,nn as h,on as g,os as _,ri as v,rn as ae,s as oe,so as y,tt as b,un as x,us as S,vn as se,yn as C}from"./shared-D_QceNk9.js";import{_ as ce,b as w,f as T,l as E,m as le,p as ue,v as de,y as fe}from"./shared-q9EK7cIP.js";function D(e,t){if(t.length===0)return[];let n=S(e);if(n===null)return[];let r=[];for(let e of j(n,t))for(let t of e.winners)r.push(N(t));return r.sort((e,t)=>m(e.environmentId,t.environmentId)||m(e.applicationId,t.applicationId))}function O(e,t,n){if(t.length===0)return{kind:`no_targets`};let r=S(e);if(r===null)return{kind:`unsupported_url`};let i=j(r,t);if(i.length===0)return{kind:`unknown_host`};let a=M(i,n);if(a===null)return{kind:`environment_choice`,environmentIds:i.map(e=>e.environmentId)};let o=[...new Set(a.winners.map(e=>e.rule.applicationId))].sort(m);return o.length>1?{kind:`ambiguous_application`,environmentId:a.environmentId,applicationIds:o}:{kind:`matched`,...N(a.winners[0])}}function k(e,t,n){let r=S(e);return r!==null&&t.some(e=>(n===null||e.environmentId===n)&&A(e,r)!==null)}function A(e,t){if(e.baseUrl!==null){let n=re(e.baseUrl);if(l(n.host)===l(t.host)){if(n.port===``)return 2;if(n.port===t.port)return 1}}return e.hostPattern!==null&&_(t.host,e.hostPattern)?3:null}function j(e,t){let n=/* @__PURE__ */ new Map;for(let r of t){let t=A(r,e);if(t===null)continue;let i={rule:r,tier:t},a=n.get(r.environmentId);a===void 0||t<a.winners[0].tier?n.set(r.environmentId,{environmentId:r.environmentId,winners:[i]}):t===a.winners[0].tier&&a.winners.push(i)}return[...n.values()].sort((e,t)=>m(e.environmentId,t.environmentId))}function M(e,t){let[n]=e;if(e.length===1&&n!==void 0)return n;if(t===null)return null;let r=e.find(e=>e.environmentId===t);return r===void 0?null:r}function N(e){let t=e.tier===3?`host_pattern`:`base_url`;return{targetId:e.rule.targetId,applicationId:e.rule.applicationId,environmentId:e.rule.environmentId,matchedBy:t}}
|
|
2
|
+
/**
|
|
3
|
+
* @license lucide-react v0.574.0 - ISC
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the ISC license.
|
|
6
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
8
|
+
var P=n(`log-out`,[[`path`,{d:`m16 17 5-5-5-5`,key:`1bji2h`}],[`path`,{d:`M21 12H9`,key:`dn1m92`}],[`path`,{d:`M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4`,key:`1uf3rs`}]]),F=y(),I=`?`,L={xs:`size-4 text-(length:--text-2xs)`,sm:`size-5.5 text-(length:--text-micro)`,md:`size-7 text-(length:--text-caption)`,lg:`size-9 text-(length:--text-body-sm)`},R={primary:`bg-(--color-bg-primary-tint-15) text-fg-on-primary-tint shadow-[0_0_0_2px_var(--av-ring,var(--color-bg-card)),inset_0_0_0_1px_var(--color-border-primary-tint-28)]`,info:`bg-[color-mix(in_srgb,var(--color-info)_16%,transparent)] text-fg-info shadow-[0_0_0_2px_var(--av-ring,var(--color-bg-card))]`,scenario:`bg-[color-mix(in_srgb,var(--color-accent-scenario)_16%,transparent)] text-(--color-accent-scenario) shadow-[0_0_0_2px_var(--av-ring,var(--color-bg-card))]`};function z(e){return typeof e==`string`&&e.length>0}function B(e,t,n){return z(e)&&z(t)?(e.charAt(0)+t.charAt(0)).toUpperCase():z(e)?e.charAt(0).toUpperCase():z(n)?n.charAt(0).toUpperCase():I}function V(e,t,n,r){return z(e)&&z(t)?`${e} ${t}`:z(e)?e:z(n)?n:r}function H(e){return e.replace(/@.*$/,``).split(/[\s._-]+/).filter(e=>e!==``).slice(0,2).map(e=>e.charAt(0).toUpperCase()).join(``)}var U=`inline-grid shrink-0 place-items-center rounded-full font-semibold tracking-[0.2px]`;function W(e){let{size:t,tone:n=`primary`,className:r}=e,i=v(U,L[t],R[n],r);if(e.displayName!==void 0)return/* @__PURE__ */ (0,F.jsx)(`span`,{"aria-hidden":`true`,className:i,children:H(e.displayName)});let{firstName:a,lastName:o,email:s,unknownLabel:c}=e;return/* @__PURE__ */ (0,F.jsx)(`span`,{role:`img`,"aria-label":V(a,o,s,c),className:i,children:/* @__PURE__ */ (0,F.jsx)(`span`,{"aria-hidden":`true`,children:B(a,o,s)})})}var G=/* @__PURE__ */ e(f(),1),K=/*#__PURE__*/ G.forwardRef(function(e,n){let{render:s,className:l,nativeButton:f=!0,disabled:p=!1,id:m,style:re,..._}=e,{state:v,disabled:y,setTouched:S,setFocused:C,validationMode:E,validation:D}=ie(),{labelId:O}=ne(),k=w(),A=k.useState(`selectionMode`),j=k.useState(`disabled`),M=k.useState(`readOnly`),N=k.useState(`required`),P=k.useState(`positionerElement`),F=k.useState(`listElement`),I=k.useState(`popupId`),L=k.useState(`triggerProps`),R=k.useState(`inputInsidePopup`),z=k.useState(`id`),B=k.useState(`labelId`),V=k.useState(`open`),H=k.useState(`selectedValue`),U=k.useState(`activeIndex`),W=k.useState(`selectedIndex`),K=k.useState(`hasSelectedValue`),q=de(),J=fe(),Y=g(),X=y||j||p,pe=T(),me=ue(k);d({id:R?m:void 0});let he=R?m??z:m,ge=oe(O,B),Z;V&&R?Z=I??ce(z):V&&(Z=F==null?void 0:F.id);let Q=G.useRef(``);function $(e){Q.current=e.pointerType}let{reference:_e}=ee(q,{enabled:!V&&!M&&!j&&A===`single`,listRef:k.context.labelsRef,activeIndex:U,selectedIndex:W,onMatch(e){let t=k.context.valuesRef.current[e];t!==void 0&&k.context.setSelectedValue(t,x(a))}}),{reference:ve}=t(q,{enabled:!j,event:`mousedown`}),{buttonRef:ye,getButtonProps:be}=c({native:f,disabled:X}),xe={...v,readOnly:M,open:V,disabled:X,popupSide:me,listEmpty:pe,placeholder:A!==`none`&&!K},Se=u(e=>{k.set(`triggerElement`,e)});return r(`button`,e,{ref:[n,ye,Se],state:xe,props:[L,ve,_e,{id:he,tabIndex:R?0:-1,role:R?`combobox`:void 0,"aria-expanded":V,"aria-haspopup":R?`dialog`:`listbox`,"aria-controls":Z,"aria-required":R&&N||void 0,"aria-readonly":R&&M||void 0,"aria-labelledby":ge,onPointerDown:$,onPointerEnter:$,onFocus(){C(!0),!X&&Y.start(0,k.context.forceMount)},onBlur(e){if(!h(P,e.relatedTarget)&&(S(!0),C(!1),E===`onBlur`)){let e=A===`none`?J:H;D.commit(e)}},onMouseDown(e){if(X)return;if(R||q.set(`domReferenceElement`,e.currentTarget),k.context.forceMount(),Q.current!==`touch`){var t;(t=k.context.inputRef.current)==null||t.focus(),R||e.preventDefault()}if(V)return;let n=se(e.currentTarget);function r(e){let t=k.state.triggerElement;if(!t)return;let n=ae(e),r=k.state.positionerElement,i=k.state.listElement;h(t,n)||h(r,n)||h(i,n)||b(e,t)||k.context.setOpen(!1,x(o,e))}R&&n.addEventListener(`mouseup`,r,{once:!0})},onKeyDown(e){if(e.key===`ArrowDown`||e.key===`ArrowUp`){var t;te(e),k.context.setOpen(!0,x(i,e.nativeEvent)),(t=k.context.inputRef.current)==null||t.focus()}}},D.getValidationProps(X,_),be],stateAttributesMapping:le})}),q=/*#__PURE__*/ G.createContext(void 0);function J(){let e=G.useContext(q);if(e===void 0)throw Error(s(18));return e}var Y=/*#__PURE__*/ G.forwardRef(function(e,t){let{render:n,className:i,style:a,items:o,...s}=e,c=w().useState(`grid`),[l,u]=G.useState(),d=G.useMemo(()=>({labelId:l,setLabelId:u,items:o}),[l,u,o]),f=r(`div`,e,{ref:t,props:[{role:c?`rowgroup`:`group`,"aria-labelledby":l},s]}),p=/*#__PURE__*/ (0,F.jsx)(q.Provider,{value:d,children:f});return o?/*#__PURE__*/ (0,F.jsx)(E,{items:o,children:p}):p}),X=/*#__PURE__*/ G.forwardRef(function(e,t){let{render:n,className:i,style:a,id:o,...s}=e,{setLabelId:c}=J(),l=p(o);return C(()=>(c(l),()=>{c(e=>e===l?void 0:e)}),[l,c]),r(`div`,e,{ref:t,props:[{id:l,"aria-hidden":!0},s]})});export{P as a,O as c,W as i,Y as n,k as o,K as r,D as s,X as t};
|