@clawos-dev/clawd 0.2.751 → 0.2.753

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.cjs CHANGED
@@ -6456,7 +6456,7 @@ var init_persona_schemas = __esm({
6456
6456
  DEFAULT_PERSONA_SIZE = "medium";
6457
6457
  PERSONA_CPUS = [0.5, 1, 2];
6458
6458
  PersonaCpuSchema = external_exports.number().refine((cpu) => PERSONA_CPUS.includes(cpu), "Unsupported CPU");
6459
- PERSONA_CPU_DEFAULTS = { tiny: 0.5, small: 1, medium: 2, large: 2, xlarge: 2 };
6459
+ PERSONA_CPU_DEFAULTS = { tiny: 0.5, small: 1, medium: 1, large: 2, xlarge: 2 };
6460
6460
  PersonaCloudEngineSchema = external_exports.object({
6461
6461
  model: external_exports.string().optional(),
6462
6462
  effort: external_exports.string().optional()
@@ -53995,8 +53995,15 @@ async function centralPersonaAccess(opts) {
53995
53995
  }
53996
53996
  return body;
53997
53997
  }
53998
+ async function centralResolveDeviceIdentity(opts) {
53999
+ const body = await centralRequest(opts, `/api/persona-cloud/personas/device-identity?deviceId=${encodeURIComponent(opts.deviceId)}`, { method: "GET", bearer: opts.loginPass });
54000
+ if (typeof body.unionId !== "string" || !body.unionId || typeof body.displayName !== "string" || !body.displayName) {
54001
+ throw new CentralClientError("BAD_RESPONSE", "device-identity: missing unionId/displayName");
54002
+ }
54003
+ return { unionId: body.unionId, displayName: body.displayName };
54004
+ }
53998
54005
  async function centralAddCollaborator(opts) {
53999
- await centralRequest(opts, `${personaPath(opts.personaId)}/collaborators`, { method: "PUT", bearer: opts.loginPass, body: { deviceId: opts.deviceId } });
54006
+ await centralRequest(opts, `${personaPath(opts.personaId)}/collaborators`, { method: "PUT", bearer: opts.loginPass, body: { deviceId: opts.deviceId, ...opts.identity } });
54000
54007
  }
54001
54008
  async function centralRemoveCollaborator(opts) {
54002
54009
  await centralRequest(opts, `${personaPath(opts.personaId)}/collaborators/${encodeURIComponent(opts.unionId)}`, { method: "DELETE", bearer: opts.loginPass });
@@ -65719,13 +65726,19 @@ function buildDeployHandlers(deps) {
65719
65726
  throw centralInvalid(err);
65720
65727
  }
65721
65728
  if (before.role !== "owner") throw invalid("\u53EA\u6709\u8FD9\u4E2A persona \u7684\u53D1\u5E03\u8005\u80FD\u6DFB\u52A0\u534F\u4F5C\u8005");
65729
+ let identity;
65730
+ try {
65731
+ identity = await collaboration.resolveDevice(deviceId);
65732
+ } catch (err) {
65733
+ throw centralInvalid(err);
65734
+ }
65722
65735
  try {
65723
- await collaboration.add("integration", cloudId, deviceId);
65736
+ await collaboration.add("integration", cloudId, deviceId, identity);
65724
65737
  } catch (err) {
65725
65738
  throw centralInvalid(err);
65726
65739
  }
65727
65740
  try {
65728
- await collaboration.add("production", cloudId, deviceId);
65741
+ await collaboration.add("production", cloudId, deviceId, identity);
65729
65742
  } catch (err) {
65730
65743
  const known = new Set(before.collaborators.map((c2) => c2.unionId));
65731
65744
  let undone = true;
@@ -76464,7 +76477,7 @@ function computeMethodAccess(args) {
76464
76477
  }
76465
76478
 
76466
76479
  // src/version.ts
76467
- var version = "0.2.751".length > 0 ? "0.2.751" : "dev";
76480
+ var version = "0.2.753".length > 0 ? "0.2.753" : "dev";
76468
76481
 
76469
76482
  // src/cli-probe/probe.ts
76470
76483
  var fs87 = __toESM(require("fs"), 1);
@@ -80408,7 +80421,8 @@ async function startDaemon(config) {
80408
80421
  };
80409
80422
  return {
80410
80423
  access: async (environment, personaId2) => centralPersonaAccess({ ...base(environment), personaId: personaId2 }),
80411
- add: async (environment, personaId2, deviceId) => centralAddCollaborator({ ...base(environment), personaId: personaId2, deviceId }),
80424
+ resolveDevice: async (deviceId) => centralResolveDeviceIdentity({ ...base("production"), deviceId }),
80425
+ add: async (environment, personaId2, deviceId, identity) => centralAddCollaborator({ ...base(environment), personaId: personaId2, deviceId, identity }),
80412
80426
  remove: async (environment, personaId2, unionId) => centralRemoveCollaborator({ ...base(environment), personaId: personaId2, unionId }),
80413
80427
  editLock: async (environment, personaId2, action) => centralEditLock({ ...base(environment), personaId: personaId2, action })
80414
80428
  };
@@ -92,7 +92,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
92
92
  0 -6px 16px 0 rgba(0, 0, 0, 0.08),
93
93
  0 -3px 6px -4px rgba(0, 0, 0, 0.12),
94
94
  0 -9px 28px 8px rgba(0, 0, 0, 0.05)
95
- `,boxShadowTabsOverflowLeft:"inset 10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowRight:"inset -10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowTop:"inset 0 10px 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowBottom:"inset 0 -10px 8px -8px rgba(0, 0, 0, 0.08)"}),r)}var a4=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(e);s<r.length;s++)t.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(n[r[s]]=e[r[s]]);return n};const Xae={lineHeight:!0,lineHeightSM:!0,lineHeightLG:!0,lineHeightHeading1:!0,lineHeightHeading2:!0,lineHeightHeading3:!0,lineHeightHeading4:!0,lineHeightHeading5:!0,opacityLoading:!0,fontWeightStrong:!0,zIndexPopupBase:!0,zIndexBase:!0,opacityImage:!0},Zae={motionBase:!0,motionUnit:!0},Qae={screenXS:!0,screenXSMin:!0,screenXSMax:!0,screenSM:!0,screenSMMin:!0,screenSMMax:!0,screenMD:!0,screenMDMin:!0,screenMDMax:!0,screenLG:!0,screenLGMin:!0,screenLGMax:!0,screenXL:!0,screenXLMin:!0,screenXLMax:!0,screenXXL:!0,screenXXLMin:!0},d7=(e,t,n)=>{const r=n.getDerivativeToken(e),{override:s}=t,i=a4(t,["override"]);let o=Object.assign(Object.assign({},r),{override:s});return o=u7(o),i&&Object.entries(i).forEach(([l,c])=>{const{theme:u}=c,d=a4(c,["theme"]);let h=d;u&&(h=d7(Object.assign(Object.assign({},o),d),{override:d},u)),o[l]=h}),o};function h7(){const{token:e,hashed:t,theme:n,override:r,cssVar:s}=K.useContext(l7),i=`${Gae}-${t||""}`,o=n||a7,[l,c,u]=Boe(o,[bg,e],{salt:i,override:r,getComputedToken:d7,formatToken:u7,cssVar:s&&{prefix:s.prefix,key:s.key,unitless:Xae,ignore:Zae,preserve:Qae}});return[o,u,t?c:"",l,s]}const Jae=()=>({display:"inline-flex",alignItems:"center",color:"inherit",fontStyle:"normal",lineHeight:0,textAlign:"center",textTransform:"none",verticalAlign:"-0.125em",textRendering:"optimizeLegibility","-webkit-font-smoothing":"antialiased","-moz-osx-font-smoothing":"grayscale","> *":{lineHeight:1},svg:{display:"inline-block"}}),ele=e=>({[`.${e}`]:Object.assign(Object.assign({},Jae()),{[`.${e} .${e}-icon`]:{display:"block"}})}),tle=(e,t)=>{const[n,r]=h7();return fae({token:r,hashId:"",path:["ant-design-icons",e],nonce:()=>t==null?void 0:t.nonce,layer:{name:"antd"}},()=>ele(e))},nle=Object.assign({},Cf),{useId:l4}=nle,rle=()=>"",sle=typeof l4>"u"?rle:l4;function ile(e,t,n){var r;const s=e||{},i=s.inherit===!1||!t?Object.assign(Object.assign({},Ib),{hashed:(r=t==null?void 0:t.hashed)!==null&&r!==void 0?r:Ib.hashed,cssVar:t==null?void 0:t.cssVar}):t,o=sle();return R9(()=>{var l,c;if(!e)return t;const u=Object.assign({},i.components);Object.keys(e.components||{}).forEach(p=>{u[p]=Object.assign(Object.assign({},u[p]),e.components[p])});const d=`css-var-${o.replace(/:/g,"")}`,h=((l=s.cssVar)!==null&&l!==void 0?l:i.cssVar)&&Object.assign(Object.assign(Object.assign({prefix:n==null?void 0:n.prefixCls},typeof i.cssVar=="object"?i.cssVar:{}),typeof s.cssVar=="object"?s.cssVar:{}),{key:typeof s.cssVar=="object"&&((c=s.cssVar)===null||c===void 0?void 0:c.key)||d});return Object.assign(Object.assign(Object.assign({},i),s),{token:Object.assign(Object.assign({},i.token),s.token),components:u,cssVar:h})},[s,i],(l,c)=>l.some((u,d)=>{const h=c[d];return!foe(u,h,!0)}))}var ole=["children"],f7=f.createContext({});function ale(e){var t=e.children,n=hi(e,ole);return f.createElement(f7.Provider,{value:n},t)}var lle=function(e){Pr(n,e);var t=A9(n);function n(){return Mn(this,n),t.apply(this,arguments)}return Pn(n,[{key:"render",value:function(){return this.props.children}}]),n}(f.Component);function cle(e){var t=f.useReducer(function(l){return l+1},0),n=kt(t,2),r=n[1],s=f.useRef(e),i=XN(function(){return s.current}),o=XN(function(l){s.current=typeof l=="function"?l(s.current):l,r()});return[i,o]}var $l="none",s0="appear",i0="enter",o0="leave",c4="none",mo="prepare",lh="start",ch="active",L5="end",p7="prepared";function u4(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit".concat(e)]="webkit".concat(t),n["Moz".concat(e)]="moz".concat(t),n["ms".concat(e)]="MS".concat(t),n["O".concat(e)]="o".concat(t.toLowerCase()),n}function ule(e,t){var n={animationend:u4("Animation","AnimationEnd"),transitionend:u4("Transition","TransitionEnd")};return e&&("AnimationEvent"in t||delete n.animationend.animation,"TransitionEvent"in t||delete n.transitionend.transition),n}var dle=ule(fl(),typeof window<"u"?window:{}),m7={};if(fl()){var hle=document.createElement("div");m7=hle.style}var a0={};function g7(e){if(a0[e])return a0[e];var t=dle[e];if(t)for(var n=Object.keys(t),r=n.length,s=0;s<r;s+=1){var i=n[s];if(Object.prototype.hasOwnProperty.call(t,i)&&i in m7)return a0[e]=t[i],a0[e]}return""}var x7=g7("animationend"),v7=g7("transitionend"),y7=!!(x7&&v7),d4=x7||"animationend",h4=v7||"transitionend";function f4(e,t){if(!e)return null;if(Rn(e)==="object"){var n=t.replace(/-\w/g,function(r){return r[1].toUpperCase()});return e[n]}return"".concat(e,"-").concat(t)}const fle=function(e){var t=f.useRef();function n(s){s&&(s.removeEventListener(h4,e),s.removeEventListener(d4,e))}function r(s){t.current&&t.current!==s&&n(t.current),s&&s!==t.current&&(s.addEventListener(h4,e),s.addEventListener(d4,e),t.current=s)}return f.useEffect(function(){return function(){n(t.current)}},[]),[r,n]};var b7=fl()?f.useLayoutEffect:f.useEffect;const ple=function(){var e=f.useRef(null);function t(){jN.cancel(e.current)}function n(r){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;t();var i=jN(function(){s<=1?r({isCanceled:function(){return i!==e.current}}):n(r,s-1)});e.current=i}return f.useEffect(function(){return function(){t()}},[]),[n,t]};var mle=[mo,lh,ch,L5],gle=[mo,p7],w7=!1,xle=!0;function _7(e){return e===ch||e===L5}const vle=function(e,t,n){var r=ZN(c4),s=kt(r,2),i=s[0],o=s[1],l=ple(),c=kt(l,2),u=c[0],d=c[1];function h(){o(mo,!0)}var p=t?gle:mle;return b7(function(){if(i!==c4&&i!==L5){var m=p.indexOf(i),g=p[m+1],x=n(i);x===w7?o(g,!0):g&&u(function(b){function y(){b.isCanceled()||o(g,!0)}x===!0?y():Promise.resolve(x).then(y)})}},[e,i]),f.useEffect(function(){return function(){d()}},[]),[h,i]};function yle(e,t,n,r){var s=r.motionEnter,i=s===void 0?!0:s,o=r.motionAppear,l=o===void 0?!0:o,c=r.motionLeave,u=c===void 0?!0:c,d=r.motionDeadline,h=r.motionLeaveImmediately,p=r.onAppearPrepare,m=r.onEnterPrepare,g=r.onLeavePrepare,x=r.onAppearStart,b=r.onEnterStart,y=r.onLeaveStart,v=r.onAppearActive,w=r.onEnterActive,_=r.onLeaveActive,S=r.onAppearEnd,k=r.onEnterEnd,C=r.onLeaveEnd,j=r.onVisibleChanged,I=ZN(),E=kt(I,2),R=E[0],P=E[1],M=cle($l),$=kt(M,2),B=$[0],z=$[1],W=ZN(null),L=kt(W,2),A=L[0],T=L[1],q=B(),H=f.useRef(!1),O=f.useRef(null);function V(){return n()}var X=f.useRef(!1);function Y(){z($l),T(null,!0)}var te=XN(function(Be){var De=B();if(De!==$l){var et=V();if(!(Be&&!Be.deadline&&Be.target!==et)){var at=X.current,bt;De===s0&&at?bt=S==null?void 0:S(et,Be):De===i0&&at?bt=k==null?void 0:k(et,Be):De===o0&&at&&(bt=C==null?void 0:C(et,Be)),at&&bt!==!1&&Y()}}}),ue=fle(te),ee=kt(ue,1),ce=ee[0],Se=function(De){switch(De){case s0:return Xe(Xe(Xe({},mo,p),lh,x),ch,v);case i0:return Xe(Xe(Xe({},mo,m),lh,b),ch,w);case o0:return Xe(Xe(Xe({},mo,g),lh,y),ch,_);default:return{}}},se=f.useMemo(function(){return Se(q)},[q]),le=vle(q,!e,function(Be){if(Be===mo){var De=se[mo];return De?De(V()):w7}if(xe in se){var et;T(((et=se[xe])===null||et===void 0?void 0:et.call(se,V(),null))||null)}return xe===ch&&q!==$l&&(ce(V()),d>0&&(clearTimeout(O.current),O.current=setTimeout(function(){te({deadline:!0})},d))),xe===p7&&Y(),xle}),ne=kt(le,2),J=ne[0],xe=ne[1],Oe=_7(xe);X.current=Oe;var Ke=f.useRef(null);b7(function(){if(!(H.current&&Ke.current===t)){P(t);var Be=H.current;H.current=!0;var De;!Be&&t&&l&&(De=s0),Be&&t&&i&&(De=i0),(Be&&!t&&u||!Be&&h&&!t&&u)&&(De=o0);var et=Se(De);De&&(e||et[mo])?(z(De),J()):z($l),Ke.current=t}},[t]),f.useEffect(function(){(q===s0&&!l||q===i0&&!i||q===o0&&!u)&&z($l)},[l,i,u]),f.useEffect(function(){return function(){H.current=!1,clearTimeout(O.current)}},[]);var me=f.useRef(!1);f.useEffect(function(){R&&(me.current=!0),R!==void 0&&q===$l&&((me.current||R)&&(j==null||j(R)),me.current=!0)},[R,q]);var je=A;return se[mo]&&xe===lh&&(je=At({transition:"none"},je)),[q,xe,je,R??t]}function ble(e){var t=e;Rn(e)==="object"&&(t=e.transitionSupport);function n(s,i){return!!(s.motionName&&t&&i!==!1)}var r=f.forwardRef(function(s,i){var o=s.visible,l=o===void 0?!0:o,c=s.removeOnLeave,u=c===void 0?!0:c,d=s.forceRender,h=s.children,p=s.motionName,m=s.leavedClassName,g=s.eventProps,x=f.useContext(f7),b=x.motion,y=n(s,b),v=f.useRef(),w=f.useRef();function _(){try{return v.current instanceof HTMLElement?v.current:Qie(w.current)}catch{return null}}var S=yle(y,l,_,s),k=kt(S,4),C=k[0],j=k[1],I=k[2],E=k[3],R=f.useRef(E);E&&(R.current=!0);var P=f.useCallback(function(L){v.current=L,noe(i,L)},[i]),M,$=At(At({},g),{},{visible:l});if(!h)M=null;else if(C===$l)E?M=h(At({},$),P):!u&&R.current&&m?M=h(At(At({},$),{},{className:m}),P):d||!u&&!m?M=h(At(At({},$),{},{style:{display:"none"}}),P):M=null;else{var B;j===mo?B="prepare":_7(j)?B="active":j===lh&&(B="start");var z=f4(p,"".concat(C,"-").concat(B));M=h(At(At({},$),{},{className:Fie(f4(p,C),Xe(Xe({},z,z&&B),p,typeof p=="string")),style:I}),P)}if(f.isValidElement(M)&&roe(M)){var W=soe(M);W||(M=f.cloneElement(M,{ref:P}))}return f.createElement(lle,{ref:w},M)});return r.displayName="CSSMotion",r}const wle=ble(y7);var QN="add",JN="keep",ej="remove",jk="removed";function _le(e){var t;return e&&Rn(e)==="object"&&"key"in e?t=e:t={key:e},At(At({},t),{},{key:String(t.key)})}function tj(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return e.map(_le)}function Sle(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=[],r=0,s=t.length,i=tj(e),o=tj(t);i.forEach(function(u){for(var d=!1,h=r;h<s;h+=1){var p=o[h];if(p.key===u.key){r<h&&(n=n.concat(o.slice(r,h).map(function(m){return At(At({},m),{},{status:QN})})),r=h),n.push(At(At({},p),{},{status:JN})),r+=1,d=!0;break}}d||n.push(At(At({},u),{},{status:ej}))}),r<s&&(n=n.concat(o.slice(r).map(function(u){return At(At({},u),{},{status:QN})})));var l={};n.forEach(function(u){var d=u.key;l[d]=(l[d]||0)+1});var c=Object.keys(l).filter(function(u){return l[u]>1});return c.forEach(function(u){n=n.filter(function(d){var h=d.key,p=d.status;return h!==u||p!==ej}),n.forEach(function(d){d.key===u&&(d.status=JN)})}),n}var kle=["component","children","onVisibleChanged","onAllRemoved"],Cle=["status"],Nle=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearPrepare","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function jle(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:wle,n=function(r){Pr(i,r);var s=A9(i);function i(){var o;Mn(this,i);for(var l=arguments.length,c=new Array(l),u=0;u<l;u++)c[u]=arguments[u];return o=s.call.apply(s,[this].concat(c)),Xe(CN(o),"state",{keyEntities:[]}),Xe(CN(o),"removeKey",function(d){o.setState(function(h){var p=h.keyEntities.map(function(m){return m.key!==d?m:At(At({},m),{},{status:jk})});return{keyEntities:p}},function(){var h=o.state.keyEntities,p=h.filter(function(m){var g=m.status;return g!==jk}).length;p===0&&o.props.onAllRemoved&&o.props.onAllRemoved()})}),o}return Pn(i,[{key:"render",value:function(){var l=this,c=this.state.keyEntities,u=this.props,d=u.component,h=u.children,p=u.onVisibleChanged;u.onAllRemoved;var m=hi(u,kle),g=d||f.Fragment,x={};return Nle.forEach(function(b){x[b]=m[b],delete m[b]}),delete m.keys,f.createElement(g,m,c.map(function(b,y){var v=b.status,w=hi(b,Cle),_=v===QN||v===JN;return f.createElement(t,St({},x,{key:w.key,visible:_,eventProps:w,onVisibleChanged:function(k){p==null||p(k,{key:w.key}),k||l.removeKey(w.key)}}),function(S,k){return h(At(At({},S),{},{index:y}),k)})}))}}],[{key:"getDerivedStateFromProps",value:function(l,c){var u=l.keys,d=c.keyEntities,h=tj(u),p=Sle(d,h);return{keyEntities:p.filter(function(m){var g=d.find(function(x){var b=x.key;return m.key===b});return!(g&&g.status===jk&&m.status===ej)})}}}]),i}(f.Component);return Xe(n,"defaultProps",{component:"div"}),n}jle(y7);const p4=f.createContext(!0);function Ele(e){const t=f.useContext(p4),{children:n}=e,[,r]=h7(),{motion:s}=r,i=f.useRef(!1);return i.current||(i.current=t!==s),i.current?f.createElement(p4.Provider,{value:s},f.createElement(ale,{motion:s},n)):n}const Ile=()=>null;var Tle=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(e);s<r.length;s++)t.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(n[r[s]]=e[r[s]]);return n};const Rle=["getTargetContainer","getPopupContainer","renderEmpty","input","pagination","form","select","button"];let S7;function Mle(){return S7||GN}function Ple(e){return Object.keys(e).some(t=>t.endsWith("Color"))}const Ale=e=>{const{prefixCls:t,iconPrefixCls:n,theme:r,holderRender:s}=e;t!==void 0&&(S7=t),r&&Ple(r)&&Hae(Mle(),r)},Ole=e=>{const{children:t,csp:n,autoInsertSpaceInButton:r,alert:s,anchor:i,form:o,locale:l,componentSize:c,direction:u,space:d,splitter:h,virtual:p,dropdownMatchSelectWidth:m,popupMatchSelectWidth:g,popupOverflow:x,legacyLocale:b,parentContext:y,iconPrefixCls:v,theme:w,componentDisabled:_,segmented:S,statistic:k,spin:C,calendar:j,carousel:I,cascader:E,collapse:R,typography:P,checkbox:M,descriptions:$,divider:B,drawer:z,skeleton:W,steps:L,image:A,layout:T,list:q,mentions:H,modal:O,progress:V,result:X,slider:Y,breadcrumb:te,menu:ue,pagination:ee,input:ce,textArea:Se,empty:se,badge:le,radio:ne,rate:J,switch:xe,transfer:Oe,avatar:Ke,message:me,tag:je,table:Be,card:De,tabs:et,timeline:at,timePicker:bt,upload:oe,notification:fe,tree:ye,colorPicker:ke,datePicker:tt,rangePicker:ut,flex:Ot,wave:nn,dropdown:We,warning:Ie,tour:Pe,tooltip:lt,popover:jt,popconfirm:rn,floatButton:be,floatButtonGroup:ae,variant:Ee,inputNumber:it,treeSelect:dt}=e,ft=f.useCallback((Et,Vt)=>{const{prefixCls:Kn}=e;if(Vt)return Vt;const rr=Kn||y.getPrefixCls("");return Et?`${rr}-${Et}`:rr},[y.getPrefixCls,e.prefixCls]),Tt=v||y.iconPrefixCls||c7,sn=n||y.csp;tle(Tt,sn);const Jt=ile(w,y.theme,{prefixCls:ft("")}),vn={csp:sn,autoInsertSpaceInButton:r,alert:s,anchor:i,locale:l||b,direction:u,space:d,splitter:h,virtual:p,popupMatchSelectWidth:g??m,popupOverflow:x,getPrefixCls:ft,iconPrefixCls:Tt,theme:Jt,segmented:S,statistic:k,spin:C,calendar:j,carousel:I,cascader:E,collapse:R,typography:P,checkbox:M,descriptions:$,divider:B,drawer:z,skeleton:W,steps:L,image:A,input:ce,textArea:Se,layout:T,list:q,mentions:H,modal:O,progress:V,result:X,slider:Y,breadcrumb:te,menu:ue,pagination:ee,empty:se,badge:le,radio:ne,rate:J,switch:xe,transfer:Oe,avatar:Ke,message:me,tag:je,table:Be,card:De,tabs:et,timeline:at,timePicker:bt,upload:oe,notification:fe,tree:ye,colorPicker:ke,datePicker:tt,rangePicker:ut,flex:Ot,wave:nn,dropdown:We,warning:Ie,tour:Pe,tooltip:lt,popover:jt,popconfirm:rn,floatButton:be,floatButtonGroup:ae,variant:Ee,inputNumber:it,treeSelect:dt},Dt=Object.assign({},y);Object.keys(vn).forEach(Et=>{vn[Et]!==void 0&&(Dt[Et]=vn[Et])}),Rle.forEach(Et=>{const Vt=e[Et];Vt&&(Dt[Et]=Vt)}),typeof r<"u"&&(Dt.button=Object.assign({autoInsertSpace:r},Dt.button));const gn=R9(()=>Dt,Dt,(Et,Vt)=>{const Kn=Object.keys(Et),rr=Object.keys(Vt);return Kn.length!==rr.length||Kn.some(fs=>Et[fs]!==Vt[fs])}),{layer:Sn}=f.useContext(kw),yn=f.useMemo(()=>({prefixCls:Tt,csp:sn,layer:Sn?"antd":void 0}),[Tt,sn,Sn]);let Ht=f.createElement(f.Fragment,null,f.createElement(Ile,{dropdownMatchSelectWidth:m}),t);const we=f.useMemo(()=>{var Et,Vt,Kn,rr;return bae(((Et=jw.Form)===null||Et===void 0?void 0:Et.defaultValidateMessages)||{},((Kn=(Vt=gn.locale)===null||Vt===void 0?void 0:Vt.Form)===null||Kn===void 0?void 0:Kn.defaultValidateMessages)||{},((rr=gn.form)===null||rr===void 0?void 0:rr.validateMessages)||{},(o==null?void 0:o.validateMessages)||{})},[gn,o==null?void 0:o.validateMessages]);Object.keys(we).length>0&&(Ht=f.createElement(_ae.Provider,{value:we},Ht)),l&&(Ht=f.createElement(Cae,{locale:l,_ANT_MARK__:kae},Ht)),Ht=f.createElement(xae.Provider,{value:yn},Ht),c&&(Ht=f.createElement(Wae,{size:c},Ht)),Ht=f.createElement(Ele,null,Ht);const _t=f.useMemo(()=>{const Et=Jt||{},{algorithm:Vt,token:Kn,components:rr,cssVar:fs}=Et,Ts=Tle(Et,["algorithm","token","components","cssVar"]),ps=Vt&&(!Array.isArray(Vt)||Vt.length>0)?TN(Vt):a7,$o={};Object.entries(rr||{}).forEach(([Bo,ki])=>{const Zr=Object.assign({},ki);"algorithm"in Zr&&(Zr.algorithm===!0?Zr.theme=ps:(Array.isArray(Zr.algorithm)||typeof Zr.algorithm=="function")&&(Zr.theme=TN(Zr.algorithm)),delete Zr.algorithm),$o[Bo]=Zr});const Lo=Object.assign(Object.assign({},bg),Kn);return Object.assign(Object.assign({},Ts),{theme:ps,token:Lo,components:$o,override:Object.assign({override:Lo},$o),cssVar:fs})},[Jt]);return w&&(Ht=f.createElement(l7.Provider,{value:_t},Ht)),gn.warning&&(Ht=f.createElement(wae.Provider,{value:gn.warning},Ht)),_!==void 0&&(Ht=f.createElement(Uae,{disabled:_},Ht)),f.createElement(Ew.Provider,{value:gn},Ht)},If=e=>{const t=f.useContext(Ew),n=f.useContext(r7);return f.createElement(Ole,Object.assign({parentContext:t,legacyLocale:n},e))};If.ConfigContext=Ew;If.SizeContext=wg;If.config=Ale;If.useConfig=Vae;Object.defineProperty(If,"SizeContext",{get:()=>wg});var k7={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(zr,function(){var n=1e3,r=6e4,s=36e5,i="millisecond",o="second",l="minute",c="hour",u="day",d="week",h="month",p="quarter",m="year",g="date",x="Invalid Date",b=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,v={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function($){var B=["th","st","nd","rd"],z=$%100;return"["+$+(B[(z-20)%10]||B[z]||B[0])+"]"}},w=function($,B,z){var W=String($);return!W||W.length>=B?$:""+Array(B+1-W.length).join(z)+$},_={s:w,z:function($){var B=-$.utcOffset(),z=Math.abs(B),W=Math.floor(z/60),L=z%60;return(B<=0?"+":"-")+w(W,2,"0")+":"+w(L,2,"0")},m:function $(B,z){if(B.date()<z.date())return-$(z,B);var W=12*(z.year()-B.year())+(z.month()-B.month()),L=B.clone().add(W,h),A=z-L<0,T=B.clone().add(W+(A?-1:1),h);return+(-(W+(z-L)/(A?L-T:T-L))||0)},a:function($){return $<0?Math.ceil($)||0:Math.floor($)},p:function($){return{M:h,y:m,w:d,d:u,D:g,h:c,m:l,s:o,ms:i,Q:p}[$]||String($||"").toLowerCase().replace(/s$/,"")},u:function($){return $===void 0}},S="en",k={};k[S]=v;var C="$isDayjsObject",j=function($){return $ instanceof P||!(!$||!$[C])},I=function $(B,z,W){var L;if(!B)return S;if(typeof B=="string"){var A=B.toLowerCase();k[A]&&(L=A),z&&(k[A]=z,L=A);var T=B.split("-");if(!L&&T.length>1)return $(T[0])}else{var q=B.name;k[q]=B,L=q}return!W&&L&&(S=L),L||!W&&S},E=function($,B){if(j($))return $.clone();var z=typeof B=="object"?B:{};return z.date=$,z.args=arguments,new P(z)},R=_;R.l=I,R.i=j,R.w=function($,B){return E($,{locale:B.$L,utc:B.$u,x:B.$x,$offset:B.$offset})};var P=function(){function $(z){this.$L=I(z.locale,null,!0),this.parse(z),this.$x=this.$x||z.x||{},this[C]=!0}var B=$.prototype;return B.parse=function(z){this.$d=function(W){var L=W.date,A=W.utc;if(L===null)return new Date(NaN);if(R.u(L))return new Date;if(L instanceof Date)return new Date(L);if(typeof L=="string"&&!/Z$/i.test(L)){var T=L.match(b);if(T){var q=T[2]-1||0,H=(T[7]||"0").substring(0,3);return A?new Date(Date.UTC(T[1],q,T[3]||1,T[4]||0,T[5]||0,T[6]||0,H)):new Date(T[1],q,T[3]||1,T[4]||0,T[5]||0,T[6]||0,H)}}return new Date(L)}(z),this.init()},B.init=function(){var z=this.$d;this.$y=z.getFullYear(),this.$M=z.getMonth(),this.$D=z.getDate(),this.$W=z.getDay(),this.$H=z.getHours(),this.$m=z.getMinutes(),this.$s=z.getSeconds(),this.$ms=z.getMilliseconds()},B.$utils=function(){return R},B.isValid=function(){return this.$d.toString()!==x},B.isSame=function(z,W){var L=E(z);return this.startOf(W)<=L&&L<=this.endOf(W)},B.isAfter=function(z,W){return E(z)<this.startOf(W)},B.isBefore=function(z,W){return this.endOf(W)<E(z)},B.$g=function(z,W,L){return R.u(z)?this[W]:this.set(L,z)},B.unix=function(){return Math.floor(this.valueOf()/1e3)},B.valueOf=function(){return this.$d.getTime()},B.startOf=function(z,W){var L=this,A=!!R.u(W)||W,T=R.p(z),q=function(ee,ce){var Se=R.w(L.$u?Date.UTC(L.$y,ce,ee):new Date(L.$y,ce,ee),L);return A?Se:Se.endOf(u)},H=function(ee,ce){return R.w(L.toDate()[ee].apply(L.toDate("s"),(A?[0,0,0,0]:[23,59,59,999]).slice(ce)),L)},O=this.$W,V=this.$M,X=this.$D,Y="set"+(this.$u?"UTC":"");switch(T){case m:return A?q(1,0):q(31,11);case h:return A?q(1,V):q(0,V+1);case d:var te=this.$locale().weekStart||0,ue=(O<te?O+7:O)-te;return q(A?X-ue:X+(6-ue),V);case u:case g:return H(Y+"Hours",0);case c:return H(Y+"Minutes",1);case l:return H(Y+"Seconds",2);case o:return H(Y+"Milliseconds",3);default:return this.clone()}},B.endOf=function(z){return this.startOf(z,!1)},B.$set=function(z,W){var L,A=R.p(z),T="set"+(this.$u?"UTC":""),q=(L={},L[u]=T+"Date",L[g]=T+"Date",L[h]=T+"Month",L[m]=T+"FullYear",L[c]=T+"Hours",L[l]=T+"Minutes",L[o]=T+"Seconds",L[i]=T+"Milliseconds",L)[A],H=A===u?this.$D+(W-this.$W):W;if(A===h||A===m){var O=this.clone().set(g,1);O.$d[q](H),O.init(),this.$d=O.set(g,Math.min(this.$D,O.daysInMonth())).$d}else q&&this.$d[q](H);return this.init(),this},B.set=function(z,W){return this.clone().$set(z,W)},B.get=function(z){return this[R.p(z)]()},B.add=function(z,W){var L,A=this;z=Number(z);var T=R.p(W),q=function(V){var X=E(A);return R.w(X.date(X.date()+Math.round(V*z)),A)};if(T===h)return this.set(h,this.$M+z);if(T===m)return this.set(m,this.$y+z);if(T===u)return q(1);if(T===d)return q(7);var H=(L={},L[l]=r,L[c]=s,L[o]=n,L)[T]||1,O=this.$d.getTime()+z*H;return R.w(O,this)},B.subtract=function(z,W){return this.add(-1*z,W)},B.format=function(z){var W=this,L=this.$locale();if(!this.isValid())return L.invalidDate||x;var A=z||"YYYY-MM-DDTHH:mm:ssZ",T=R.z(this),q=this.$H,H=this.$m,O=this.$M,V=L.weekdays,X=L.months,Y=L.meridiem,te=function(ce,Se,se,le){return ce&&(ce[Se]||ce(W,A))||se[Se].slice(0,le)},ue=function(ce){return R.s(q%12||12,ce,"0")},ee=Y||function(ce,Se,se){var le=ce<12?"AM":"PM";return se?le.toLowerCase():le};return A.replace(y,function(ce,Se){return Se||function(se){switch(se){case"YY":return String(W.$y).slice(-2);case"YYYY":return R.s(W.$y,4,"0");case"M":return O+1;case"MM":return R.s(O+1,2,"0");case"MMM":return te(L.monthsShort,O,X,3);case"MMMM":return te(X,O);case"D":return W.$D;case"DD":return R.s(W.$D,2,"0");case"d":return String(W.$W);case"dd":return te(L.weekdaysMin,W.$W,V,2);case"ddd":return te(L.weekdaysShort,W.$W,V,3);case"dddd":return V[W.$W];case"H":return String(q);case"HH":return R.s(q,2,"0");case"h":return ue(1);case"hh":return ue(2);case"a":return ee(q,H,!0);case"A":return ee(q,H,!1);case"m":return String(H);case"mm":return R.s(H,2,"0");case"s":return String(W.$s);case"ss":return R.s(W.$s,2,"0");case"SSS":return R.s(W.$ms,3,"0");case"Z":return T}return null}(ce)||T.replace(":","")})},B.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},B.diff=function(z,W,L){var A,T=this,q=R.p(W),H=E(z),O=(H.utcOffset()-this.utcOffset())*r,V=this-H,X=function(){return R.m(T,H)};switch(q){case m:A=X()/12;break;case h:A=X();break;case p:A=X()/3;break;case d:A=(V-O)/6048e5;break;case u:A=(V-O)/864e5;break;case c:A=V/s;break;case l:A=V/r;break;case o:A=V/n;break;default:A=V}return L?A:R.a(A)},B.daysInMonth=function(){return this.endOf(h).$D},B.$locale=function(){return k[this.$L]},B.locale=function(z,W){if(!z)return this.$L;var L=this.clone(),A=I(z,W,!0);return A&&(L.$L=A),L},B.clone=function(){return R.w(this.$d,this)},B.toDate=function(){return new Date(this.valueOf())},B.toJSON=function(){return this.isValid()?this.toISOString():null},B.toISOString=function(){return this.$d.toISOString()},B.toString=function(){return this.$d.toUTCString()},$}(),M=P.prototype;return E.prototype=M,[["$ms",i],["$s",o],["$m",l],["$H",c],["$W",u],["$M",h],["$y",m],["$D",g]].forEach(function($){M[$[1]]=function(B){return this.$g(B,$[0],$[1])}}),E.extend=function($,B){return $.$i||($(B,P,E),$.$i=!0),E},E.locale=I,E.isDayjs=j,E.unix=function($){return E(1e3*$)},E.en=k[S],E.Ls=k,E.p={},E})})(k7);var Dle=k7.exports;const nj=xn(Dle);var C7={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(zr,function(){return function(n,r,s){var i=r.prototype,o=function(h){return h&&(h.indexOf?h:h.s)},l=function(h,p,m,g,x){var b=h.name?h:h.$locale(),y=o(b[p]),v=o(b[m]),w=y||v.map(function(S){return S.slice(0,g)});if(!x)return w;var _=b.weekStart;return w.map(function(S,k){return w[(k+(_||0))%7]})},c=function(){return s.Ls[s.locale()]},u=function(h,p){return h.formats[p]||function(m){return m.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(g,x,b){return x||b.slice(1)})}(h.formats[p.toUpperCase()])},d=function(){var h=this;return{months:function(p){return p?p.format("MMMM"):l(h,"months")},monthsShort:function(p){return p?p.format("MMM"):l(h,"monthsShort","months",3)},firstDayOfWeek:function(){return h.$locale().weekStart||0},weekdays:function(p){return p?p.format("dddd"):l(h,"weekdays")},weekdaysMin:function(p){return p?p.format("dd"):l(h,"weekdaysMin","weekdays",2)},weekdaysShort:function(p){return p?p.format("ddd"):l(h,"weekdaysShort","weekdays",3)},longDateFormat:function(p){return u(h.$locale(),p)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};i.localeData=function(){return d.bind(this)()},s.localeData=function(){var h=c();return{firstDayOfWeek:function(){return h.weekStart||0},weekdays:function(){return s.weekdays()},weekdaysShort:function(){return s.weekdaysShort()},weekdaysMin:function(){return s.weekdaysMin()},months:function(){return s.months()},monthsShort:function(){return s.monthsShort()},longDateFormat:function(p){return u(h,p)},meridiem:h.meridiem,ordinal:h.ordinal}},s.months=function(){return l(c(),"months")},s.monthsShort=function(){return l(c(),"monthsShort","months",3)},s.weekdays=function(h){return l(c(),"weekdays",null,null,h)},s.weekdaysShort=function(h){return l(c(),"weekdaysShort","weekdays",3,h)},s.weekdaysMin=function(h){return l(c(),"weekdaysMin","weekdays",2,h)}}})})(C7);var $le=C7.exports;const Lle=xn($le),Ei=(e,t)=>new Wn(e).setA(t).toRgbString(),Ed=(e,t)=>new Wn(e).lighten(t).toHexString(),Ble=e=>{const t=zh(e,{theme:"dark"});return{1:t[0],2:t[1],3:t[2],4:t[3],5:t[6],6:t[5],7:t[4],8:t[6],9:t[5],10:t[4]}},Fle=(e,t)=>{const n=e||"#000",r=t||"#fff";return{colorBgBase:n,colorTextBase:r,colorText:Ei(r,.85),colorTextSecondary:Ei(r,.65),colorTextTertiary:Ei(r,.45),colorTextQuaternary:Ei(r,.25),colorFill:Ei(r,.18),colorFillSecondary:Ei(r,.12),colorFillTertiary:Ei(r,.08),colorFillQuaternary:Ei(r,.04),colorBgSolid:Ei(r,.95),colorBgSolidHover:Ei(r,1),colorBgSolidActive:Ei(r,.9),colorBgElevated:Ed(n,12),colorBgContainer:Ed(n,8),colorBgLayout:Ed(n,0),colorBgSpotlight:Ed(n,26),colorBgBlur:Ei(r,.04),colorBorder:Ed(n,26),colorBorderSecondary:Ed(n,19)}},zle=(e,t)=>{const n=Object.keys(D5).map(i=>{const o=zh(e[i],{theme:"dark"});return Array.from({length:10},()=>1).reduce((l,c,u)=>(l[`${i}-${u+1}`]=o[u],l[`${i}${u+1}`]=o[u],l),{})}).reduce((i,o)=>(i=Object.assign(Object.assign({},i),o),i),{}),r=t??$5(e),s=o7(e,{generateColorPalettes:Ble,generateNeutralColorPalettes:Fle});return Object.assign(Object.assign(Object.assign(Object.assign({},r),n),s),{colorPrimaryBg:s.colorPrimaryBorder,colorPrimaryBgHover:s.colorPrimaryBorderHover})},m4={defaultSeed:Ib.token,defaultAlgorithm:$5,darkAlgorithm:zle};function Hle({children:e}){const t=hl(),[n,r]=f.useState(t.theme);return f.useEffect(()=>t.onThemeChange(r),[t]),a.jsx(If,{theme:{algorithm:n.mode==="dark"?m4.darkAlgorithm:m4.defaultAlgorithm,token:{colorPrimary:n.colorPrimary,colorBgContainer:n.colorBgContainer,colorText:n.colorText,colorBorder:n.colorBorder}},children:e})}var Yt;(function(e){e.assertEqual=s=>{};function t(s){}e.assertIs=t;function n(s){throw new Error}e.assertNever=n,e.arrayToEnum=s=>{const i={};for(const o of s)i[o]=o;return i},e.getValidEnumValues=s=>{const i=e.objectKeys(s).filter(l=>typeof s[s[l]]!="number"),o={};for(const l of i)o[l]=s[l];return e.objectValues(o)},e.objectValues=s=>e.objectKeys(s).map(function(i){return s[i]}),e.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const i=[];for(const o in s)Object.prototype.hasOwnProperty.call(s,o)&&i.push(o);return i},e.find=(s,i)=>{for(const o of s)if(i(o))return o},e.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&Number.isFinite(s)&&Math.floor(s)===s;function r(s,i=" | "){return s.map(o=>typeof o=="string"?`'${o}'`:o).join(i)}e.joinValues=r,e.jsonStringifyReplacer=(s,i)=>typeof i=="bigint"?i.toString():i})(Yt||(Yt={}));var g4;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(g4||(g4={}));const Ye=Yt.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),zl=e=>{switch(typeof e){case"undefined":return Ye.undefined;case"string":return Ye.string;case"number":return Number.isNaN(e)?Ye.nan:Ye.number;case"boolean":return Ye.boolean;case"function":return Ye.function;case"bigint":return Ye.bigint;case"symbol":return Ye.symbol;case"object":return Array.isArray(e)?Ye.array:e===null?Ye.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?Ye.promise:typeof Map<"u"&&e instanceof Map?Ye.map:typeof Set<"u"&&e instanceof Set?Ye.set:typeof Date<"u"&&e instanceof Date?Ye.date:Ye.object;default:return Ye.unknown}},_e=Yt.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class sl extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}format(t){const n=t||function(i){return i.message},r={_errors:[]},s=i=>{for(const o of i.issues)if(o.code==="invalid_union")o.unionErrors.map(s);else if(o.code==="invalid_return_type")s(o.returnTypeError);else if(o.code==="invalid_arguments")s(o.argumentsError);else if(o.path.length===0)r._errors.push(n(o));else{let l=r,c=0;for(;c<o.path.length;){const u=o.path[c];c===o.path.length-1?(l[u]=l[u]||{_errors:[]},l[u]._errors.push(n(o))):l[u]=l[u]||{_errors:[]},l=l[u],c++}}};return s(this),r}static assert(t){if(!(t instanceof sl))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Yt.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const s of this.issues)if(s.path.length>0){const i=s.path[0];n[i]=n[i]||[],n[i].push(t(s))}else r.push(t(s));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}sl.create=e=>new sl(e);const rj=(e,t)=>{let n;switch(e.code){case _e.invalid_type:e.received===Ye.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case _e.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,Yt.jsonStringifyReplacer)}`;break;case _e.unrecognized_keys:n=`Unrecognized key(s) in object: ${Yt.joinValues(e.keys,", ")}`;break;case _e.invalid_union:n="Invalid input";break;case _e.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Yt.joinValues(e.options)}`;break;case _e.invalid_enum_value:n=`Invalid enum value. Expected ${Yt.joinValues(e.options)}, received '${e.received}'`;break;case _e.invalid_arguments:n="Invalid function arguments";break;case _e.invalid_return_type:n="Invalid function return type";break;case _e.invalid_date:n="Invalid date";break;case _e.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:Yt.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case _e.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case _e.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case _e.custom:n="Invalid input";break;case _e.invalid_intersection_types:n="Intersection results could not be merged";break;case _e.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case _e.not_finite:n="Number must be finite";break;default:n=t.defaultError,Yt.assertNever(e)}return{message:n}};let Ule=rj;function Wle(){return Ule}const Vle=e=>{const{data:t,path:n,errorMaps:r,issueData:s}=e,i=[...n,...s.path||[]],o={...s,path:i};if(s.message!==void 0)return{...s,path:i,message:s.message};let l="";const c=r.filter(u=>!!u).slice().reverse();for(const u of c)l=u(o,{data:t,defaultError:l}).message;return{...s,path:i,message:l}};function ze(e,t){const n=Wle(),r=Vle({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===rj?void 0:rj].filter(s=>!!s)});e.common.issues.push(r)}class ws{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const s of n){if(s.status==="aborted")return xt;s.status==="dirty"&&t.dirty(),r.push(s.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const s of n){const i=await s.key,o=await s.value;r.push({key:i,value:o})}return ws.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const s of n){const{key:i,value:o}=s;if(i.status==="aborted"||o.status==="aborted")return xt;i.status==="dirty"&&t.dirty(),o.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof o.value<"u"||s.alwaysSet)&&(r[i.value]=o.value)}return{status:t.value,value:r}}}const xt=Object.freeze({status:"aborted"}),om=e=>({status:"dirty",value:e}),Zi=e=>({status:"valid",value:e}),x4=e=>e.status==="aborted",v4=e=>e.status==="dirty",Hh=e=>e.status==="valid",Tb=e=>typeof Promise<"u"&&e instanceof Promise;var rt;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(rt||(rt={}));class fa{constructor(t,n,r,s){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=s}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const y4=(e,t)=>{if(Hh(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new sl(e.common.issues);return this._error=n,this._error}}};function Nt(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:s}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:s}:{errorMap:(o,l)=>{const{message:c}=e;return o.code==="invalid_enum_value"?{message:c??l.defaultError}:typeof l.data>"u"?{message:c??r??l.defaultError}:o.code!=="invalid_type"?{message:l.defaultError}:{message:c??n??l.defaultError}},description:s}}class zt{get description(){return this._def.description}_getType(t){return zl(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:zl(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new ws,ctx:{common:t.parent.common,data:t.data,parsedType:zl(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(Tb(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){const r={common:{issues:[],async:(n==null?void 0:n.async)??!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:zl(t)},s=this._parseSync({data:t,path:r.path,parent:r});return y4(r,s)}"~validate"(t){var r,s;const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:zl(t)};if(!this["~standard"].async)try{const i=this._parseSync({data:t,path:[],parent:n});return Hh(i)?{value:i.value}:{issues:n.common.issues}}catch(i){(s=(r=i==null?void 0:i.message)==null?void 0:r.toLowerCase())!=null&&s.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:n}).then(i=>Hh(i)?{value:i.value}:{issues:n.common.issues})}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:zl(t)},s=this._parse({data:t,path:r.path,parent:r}),i=await(Tb(s)?s:Promise.resolve(s));return y4(r,i)}refine(t,n){const r=s=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(s):n;return this._refinement((s,i)=>{const o=t(s),l=()=>i.addIssue({code:_e.custom,...r(s)});return typeof Promise<"u"&&o instanceof Promise?o.then(c=>c?!0:(l(),!1)):o?!0:(l(),!1)})}refinement(t,n){return this._refinement((r,s)=>t(r)?!0:(s.addIssue(typeof n=="function"?n(r,s):n),!1))}_refinement(t){return new vc({schema:this,typeName:vt.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return Za.create(this,this._def)}nullable(){return Tu.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return aa.create(this)}promise(){return Db.create(this,this._def)}or(t){return Mb.create([this,t],this._def)}and(t){return Pb.create(this,t,this._def)}transform(t){return new vc({...Nt(this._def),schema:this,typeName:vt.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new $b({...Nt(this._def),innerType:this,defaultValue:n,typeName:vt.ZodDefault})}brand(){return new I7({typeName:vt.ZodBranded,type:this,...Nt(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new Lb({...Nt(this._def),innerType:this,catchValue:n,typeName:vt.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return F5.create(this,t)}readonly(){return Bb.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const qle=/^c[^\s-]{8,}$/i,Kle=/^[0-9a-z]+$/,Gle=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Yle=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Xle=/^[a-z0-9_-]{21}$/i,Zle=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Qle=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Jle=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,ece="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Ek;const tce=/^(?:(?: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])$/,nce=/^(?:(?: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])\/(3[0-2]|[12]?[0-9])$/,rce=/^(([0-9a-fA-F]{1,4}:){7,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}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,sce=/^(([0-9a-fA-F]{1,4}:){7,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}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,ice=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,oce=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,N7="((\\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])))",ace=new RegExp(`^${N7}$`);function j7(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);const n=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}function lce(e){return new RegExp(`^${j7(e)}$`)}function cce(e){let t=`${N7}T${j7(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function uce(e,t){return!!((t==="v4"||!t)&&tce.test(e)||(t==="v6"||!t)&&rce.test(e))}function dce(e,t){if(!Zle.test(e))return!1;try{const[n]=e.split(".");if(!n)return!1;const r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),s=JSON.parse(atob(r));return!(typeof s!="object"||s===null||"typ"in s&&(s==null?void 0:s.typ)!=="JWT"||!s.alg||t&&s.alg!==t)}catch{return!1}}function hce(e,t){return!!((t==="v4"||!t)&&nce.test(e)||(t==="v6"||!t)&&sce.test(e))}class qa extends zt{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==Ye.string){const i=this._getOrReturnCtx(t);return ze(i,{code:_e.invalid_type,expected:Ye.string,received:i.parsedType}),xt}const r=new ws;let s;for(const i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(s=this._getOrReturnCtx(t,s),ze(s,{code:_e.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="max")t.data.length>i.value&&(s=this._getOrReturnCtx(t,s),ze(s,{code:_e.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="length"){const o=t.data.length>i.value,l=t.data.length<i.value;(o||l)&&(s=this._getOrReturnCtx(t,s),o?ze(s,{code:_e.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):l&&ze(s,{code:_e.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")Jle.test(t.data)||(s=this._getOrReturnCtx(t,s),ze(s,{validation:"email",code:_e.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")Ek||(Ek=new RegExp(ece,"u")),Ek.test(t.data)||(s=this._getOrReturnCtx(t,s),ze(s,{validation:"emoji",code:_e.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")Yle.test(t.data)||(s=this._getOrReturnCtx(t,s),ze(s,{validation:"uuid",code:_e.invalid_string,message:i.message}),r.dirty());else if(i.kind==="nanoid")Xle.test(t.data)||(s=this._getOrReturnCtx(t,s),ze(s,{validation:"nanoid",code:_e.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")qle.test(t.data)||(s=this._getOrReturnCtx(t,s),ze(s,{validation:"cuid",code:_e.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")Kle.test(t.data)||(s=this._getOrReturnCtx(t,s),ze(s,{validation:"cuid2",code:_e.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")Gle.test(t.data)||(s=this._getOrReturnCtx(t,s),ze(s,{validation:"ulid",code:_e.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{s=this._getOrReturnCtx(t,s),ze(s,{validation:"url",code:_e.invalid_string,message:i.message}),r.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(t.data)||(s=this._getOrReturnCtx(t,s),ze(s,{validation:"regex",code:_e.invalid_string,message:i.message}),r.dirty())):i.kind==="trim"?t.data=t.data.trim():i.kind==="includes"?t.data.includes(i.value,i.position)||(s=this._getOrReturnCtx(t,s),ze(s,{code:_e.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),r.dirty()):i.kind==="toLowerCase"?t.data=t.data.toLowerCase():i.kind==="toUpperCase"?t.data=t.data.toUpperCase():i.kind==="startsWith"?t.data.startsWith(i.value)||(s=this._getOrReturnCtx(t,s),ze(s,{code:_e.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(s=this._getOrReturnCtx(t,s),ze(s,{code:_e.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?cce(i).test(t.data)||(s=this._getOrReturnCtx(t,s),ze(s,{code:_e.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="date"?ace.test(t.data)||(s=this._getOrReturnCtx(t,s),ze(s,{code:_e.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?lce(i).test(t.data)||(s=this._getOrReturnCtx(t,s),ze(s,{code:_e.invalid_string,validation:"time",message:i.message}),r.dirty()):i.kind==="duration"?Qle.test(t.data)||(s=this._getOrReturnCtx(t,s),ze(s,{validation:"duration",code:_e.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?uce(t.data,i.version)||(s=this._getOrReturnCtx(t,s),ze(s,{validation:"ip",code:_e.invalid_string,message:i.message}),r.dirty()):i.kind==="jwt"?dce(t.data,i.alg)||(s=this._getOrReturnCtx(t,s),ze(s,{validation:"jwt",code:_e.invalid_string,message:i.message}),r.dirty()):i.kind==="cidr"?hce(t.data,i.version)||(s=this._getOrReturnCtx(t,s),ze(s,{validation:"cidr",code:_e.invalid_string,message:i.message}),r.dirty()):i.kind==="base64"?ice.test(t.data)||(s=this._getOrReturnCtx(t,s),ze(s,{validation:"base64",code:_e.invalid_string,message:i.message}),r.dirty()):i.kind==="base64url"?oce.test(t.data)||(s=this._getOrReturnCtx(t,s),ze(s,{validation:"base64url",code:_e.invalid_string,message:i.message}),r.dirty()):Yt.assertNever(i);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(s=>t.test(s),{validation:n,code:_e.invalid_string,...rt.errToObj(r)})}_addCheck(t){return new qa({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...rt.errToObj(t)})}url(t){return this._addCheck({kind:"url",...rt.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...rt.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...rt.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...rt.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...rt.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...rt.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...rt.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...rt.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...rt.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...rt.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...rt.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...rt.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(t==null?void 0:t.offset)??!1,local:(t==null?void 0:t.local)??!1,...rt.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...rt.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...rt.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...rt.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...rt.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...rt.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...rt.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...rt.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...rt.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...rt.errToObj(n)})}nonempty(t){return this.min(1,rt.errToObj(t))}trim(){return new qa({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new qa({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new qa({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}qa.create=e=>new qa({checks:[],typeName:vt.ZodString,coerce:(e==null?void 0:e.coerce)??!1,...Nt(e)});function fce(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,s=n>r?n:r,i=Number.parseInt(e.toFixed(s).replace(".","")),o=Number.parseInt(t.toFixed(s).replace(".",""));return i%o/10**s}class Uh extends zt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==Ye.number){const i=this._getOrReturnCtx(t);return ze(i,{code:_e.invalid_type,expected:Ye.number,received:i.parsedType}),xt}let r;const s=new ws;for(const i of this._def.checks)i.kind==="int"?Yt.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),ze(r,{code:_e.invalid_type,expected:"integer",received:"float",message:i.message}),s.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),ze(r,{code:_e.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),s.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),ze(r,{code:_e.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),s.dirty()):i.kind==="multipleOf"?fce(t.data,i.value)!==0&&(r=this._getOrReturnCtx(t,r),ze(r,{code:_e.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),ze(r,{code:_e.not_finite,message:i.message}),s.dirty()):Yt.assertNever(i);return{status:s.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,rt.toString(n))}gt(t,n){return this.setLimit("min",t,!1,rt.toString(n))}lte(t,n){return this.setLimit("max",t,!0,rt.toString(n))}lt(t,n){return this.setLimit("max",t,!1,rt.toString(n))}setLimit(t,n,r,s){return new Uh({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:rt.toString(s)}]})}_addCheck(t){return new Uh({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:rt.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:rt.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:rt.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:rt.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:rt.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:rt.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:rt.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:rt.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:rt.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&Yt.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}Uh.create=e=>new Uh({checks:[],typeName:vt.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Nt(e)});class _g extends zt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==Ye.bigint)return this._getInvalidInput(t);let r;const s=new ws;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),ze(r,{code:_e.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),s.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),ze(r,{code:_e.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),s.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),ze(r,{code:_e.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):Yt.assertNever(i);return{status:s.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return ze(n,{code:_e.invalid_type,expected:Ye.bigint,received:n.parsedType}),xt}gte(t,n){return this.setLimit("min",t,!0,rt.toString(n))}gt(t,n){return this.setLimit("min",t,!1,rt.toString(n))}lte(t,n){return this.setLimit("max",t,!0,rt.toString(n))}lt(t,n){return this.setLimit("max",t,!1,rt.toString(n))}setLimit(t,n,r,s){return new _g({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:rt.toString(s)}]})}_addCheck(t){return new _g({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:rt.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:rt.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:rt.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:rt.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:rt.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}_g.create=e=>new _g({checks:[],typeName:vt.ZodBigInt,coerce:(e==null?void 0:e.coerce)??!1,...Nt(e)});class sj extends zt{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==Ye.boolean){const r=this._getOrReturnCtx(t);return ze(r,{code:_e.invalid_type,expected:Ye.boolean,received:r.parsedType}),xt}return Zi(t.data)}}sj.create=e=>new sj({typeName:vt.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Nt(e)});class Rb extends zt{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==Ye.date){const i=this._getOrReturnCtx(t);return ze(i,{code:_e.invalid_type,expected:Ye.date,received:i.parsedType}),xt}if(Number.isNaN(t.data.getTime())){const i=this._getOrReturnCtx(t);return ze(i,{code:_e.invalid_date}),xt}const r=new ws;let s;for(const i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(s=this._getOrReturnCtx(t,s),ze(s,{code:_e.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),r.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(s=this._getOrReturnCtx(t,s),ze(s,{code:_e.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):Yt.assertNever(i);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Rb({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:rt.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:rt.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}Rb.create=e=>new Rb({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:vt.ZodDate,...Nt(e)});class b4 extends zt{_parse(t){if(this._getType(t)!==Ye.symbol){const r=this._getOrReturnCtx(t);return ze(r,{code:_e.invalid_type,expected:Ye.symbol,received:r.parsedType}),xt}return Zi(t.data)}}b4.create=e=>new b4({typeName:vt.ZodSymbol,...Nt(e)});class ij extends zt{_parse(t){if(this._getType(t)!==Ye.undefined){const r=this._getOrReturnCtx(t);return ze(r,{code:_e.invalid_type,expected:Ye.undefined,received:r.parsedType}),xt}return Zi(t.data)}}ij.create=e=>new ij({typeName:vt.ZodUndefined,...Nt(e)});class oj extends zt{_parse(t){if(this._getType(t)!==Ye.null){const r=this._getOrReturnCtx(t);return ze(r,{code:_e.invalid_type,expected:Ye.null,received:r.parsedType}),xt}return Zi(t.data)}}oj.create=e=>new oj({typeName:vt.ZodNull,...Nt(e)});class w4 extends zt{constructor(){super(...arguments),this._any=!0}_parse(t){return Zi(t.data)}}w4.create=e=>new w4({typeName:vt.ZodAny,...Nt(e)});class aj extends zt{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Zi(t.data)}}aj.create=e=>new aj({typeName:vt.ZodUnknown,...Nt(e)});class xc extends zt{_parse(t){const n=this._getOrReturnCtx(t);return ze(n,{code:_e.invalid_type,expected:Ye.never,received:n.parsedType}),xt}}xc.create=e=>new xc({typeName:vt.ZodNever,...Nt(e)});class _4 extends zt{_parse(t){if(this._getType(t)!==Ye.undefined){const r=this._getOrReturnCtx(t);return ze(r,{code:_e.invalid_type,expected:Ye.void,received:r.parsedType}),xt}return Zi(t.data)}}_4.create=e=>new _4({typeName:vt.ZodVoid,...Nt(e)});class aa extends zt{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),s=this._def;if(n.parsedType!==Ye.array)return ze(n,{code:_e.invalid_type,expected:Ye.array,received:n.parsedType}),xt;if(s.exactLength!==null){const o=n.data.length>s.exactLength.value,l=n.data.length<s.exactLength.value;(o||l)&&(ze(n,{code:o?_e.too_big:_e.too_small,minimum:l?s.exactLength.value:void 0,maximum:o?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),r.dirty())}if(s.minLength!==null&&n.data.length<s.minLength.value&&(ze(n,{code:_e.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),r.dirty()),s.maxLength!==null&&n.data.length>s.maxLength.value&&(ze(n,{code:_e.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((o,l)=>s.type._parseAsync(new fa(n,o,n.path,l)))).then(o=>ws.mergeArray(r,o));const i=[...n.data].map((o,l)=>s.type._parseSync(new fa(n,o,n.path,l)));return ws.mergeArray(r,i)}get element(){return this._def.type}min(t,n){return new aa({...this._def,minLength:{value:t,message:rt.toString(n)}})}max(t,n){return new aa({...this._def,maxLength:{value:t,message:rt.toString(n)}})}length(t,n){return new aa({...this._def,exactLength:{value:t,message:rt.toString(n)}})}nonempty(t){return this.min(1,t)}}aa.create=(e,t)=>new aa({type:e,minLength:null,maxLength:null,exactLength:null,typeName:vt.ZodArray,...Nt(t)});function qd(e){if(e instanceof or){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Za.create(qd(r))}return new or({...e._def,shape:()=>t})}else return e instanceof aa?new aa({...e._def,type:qd(e.element)}):e instanceof Za?Za.create(qd(e.unwrap())):e instanceof Tu?Tu.create(qd(e.unwrap())):e instanceof Eu?Eu.create(e.items.map(t=>qd(t))):e}class or extends zt{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=Yt.objectKeys(t);return this._cached={shape:t,keys:n},this._cached}_parse(t){if(this._getType(t)!==Ye.object){const u=this._getOrReturnCtx(t);return ze(u,{code:_e.invalid_type,expected:Ye.object,received:u.parsedType}),xt}const{status:r,ctx:s}=this._processInputParams(t),{shape:i,keys:o}=this._getCached(),l=[];if(!(this._def.catchall instanceof xc&&this._def.unknownKeys==="strip"))for(const u in s.data)o.includes(u)||l.push(u);const c=[];for(const u of o){const d=i[u],h=s.data[u];c.push({key:{status:"valid",value:u},value:d._parse(new fa(s,h,s.path,u)),alwaysSet:u in s.data})}if(this._def.catchall instanceof xc){const u=this._def.unknownKeys;if(u==="passthrough")for(const d of l)c.push({key:{status:"valid",value:d},value:{status:"valid",value:s.data[d]}});else if(u==="strict")l.length>0&&(ze(s,{code:_e.unrecognized_keys,keys:l}),r.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const u=this._def.catchall;for(const d of l){const h=s.data[d];c.push({key:{status:"valid",value:d},value:u._parse(new fa(s,h,s.path,d)),alwaysSet:d in s.data})}}return s.common.async?Promise.resolve().then(async()=>{const u=[];for(const d of c){const h=await d.key,p=await d.value;u.push({key:h,value:p,alwaysSet:d.alwaysSet})}return u}).then(u=>ws.mergeObjectSync(r,u)):ws.mergeObjectSync(r,c)}get shape(){return this._def.shape()}strict(t){return rt.errToObj,new or({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var i,o;const s=((o=(i=this._def).errorMap)==null?void 0:o.call(i,n,r).message)??r.defaultError;return n.code==="unrecognized_keys"?{message:rt.errToObj(t).message??s}:{message:s}}}:{}})}strip(){return new or({...this._def,unknownKeys:"strip"})}passthrough(){return new or({...this._def,unknownKeys:"passthrough"})}extend(t){return new or({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new or({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:vt.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new or({...this._def,catchall:t})}pick(t){const n={};for(const r of Yt.objectKeys(t))t[r]&&this.shape[r]&&(n[r]=this.shape[r]);return new or({...this._def,shape:()=>n})}omit(t){const n={};for(const r of Yt.objectKeys(this.shape))t[r]||(n[r]=this.shape[r]);return new or({...this._def,shape:()=>n})}deepPartial(){return qd(this)}partial(t){const n={};for(const r of Yt.objectKeys(this.shape)){const s=this.shape[r];t&&!t[r]?n[r]=s:n[r]=s.optional()}return new or({...this._def,shape:()=>n})}required(t){const n={};for(const r of Yt.objectKeys(this.shape))if(t&&!t[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof Za;)i=i._def.innerType;n[r]=i}return new or({...this._def,shape:()=>n})}keyof(){return E7(Yt.objectKeys(this.shape))}}or.create=(e,t)=>new or({shape:()=>e,unknownKeys:"strip",catchall:xc.create(),typeName:vt.ZodObject,...Nt(t)});or.strictCreate=(e,t)=>new or({shape:()=>e,unknownKeys:"strict",catchall:xc.create(),typeName:vt.ZodObject,...Nt(t)});or.lazycreate=(e,t)=>new or({shape:e,unknownKeys:"strip",catchall:xc.create(),typeName:vt.ZodObject,...Nt(t)});class Mb extends zt{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function s(i){for(const l of i)if(l.result.status==="valid")return l.result;for(const l of i)if(l.result.status==="dirty")return n.common.issues.push(...l.ctx.common.issues),l.result;const o=i.map(l=>new sl(l.ctx.common.issues));return ze(n,{code:_e.invalid_union,unionErrors:o}),xt}if(n.common.async)return Promise.all(r.map(async i=>{const o={...n,common:{...n.common,issues:[]},parent:null};return{result:await i._parseAsync({data:n.data,path:n.path,parent:o}),ctx:o}})).then(s);{let i;const o=[];for(const c of r){const u={...n,common:{...n.common,issues:[]},parent:null},d=c._parseSync({data:n.data,path:n.path,parent:u});if(d.status==="valid")return d;d.status==="dirty"&&!i&&(i={result:d,ctx:u}),u.common.issues.length&&o.push(u.common.issues)}if(i)return n.common.issues.push(...i.ctx.common.issues),i.result;const l=o.map(c=>new sl(c));return ze(n,{code:_e.invalid_union,unionErrors:l}),xt}}get options(){return this._def.options}}Mb.create=(e,t)=>new Mb({options:e,typeName:vt.ZodUnion,...Nt(t)});const za=e=>e instanceof cj?za(e.schema):e instanceof vc?za(e.innerType()):e instanceof Ob?[e.value]:e instanceof Iu?e.options:e instanceof uj?Yt.objectValues(e.enum):e instanceof $b?za(e._def.innerType):e instanceof ij?[void 0]:e instanceof oj?[null]:e instanceof Za?[void 0,...za(e.unwrap())]:e instanceof Tu?[null,...za(e.unwrap())]:e instanceof I7||e instanceof Bb?za(e.unwrap()):e instanceof Lb?za(e._def.innerType):[];class B5 extends zt{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Ye.object)return ze(n,{code:_e.invalid_type,expected:Ye.object,received:n.parsedType}),xt;const r=this.discriminator,s=n.data[r],i=this.optionsMap.get(s);return i?n.common.async?i._parseAsync({data:n.data,path:n.path,parent:n}):i._parseSync({data:n.data,path:n.path,parent:n}):(ze(n,{code:_e.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),xt)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const s=new Map;for(const i of n){const o=za(i.shape[t]);if(!o.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const l of o){if(s.has(l))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(l)}`);s.set(l,i)}}return new B5({typeName:vt.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:s,...Nt(r)})}}function lj(e,t){const n=zl(e),r=zl(t);if(e===t)return{valid:!0,data:e};if(n===Ye.object&&r===Ye.object){const s=Yt.objectKeys(t),i=Yt.objectKeys(e).filter(l=>s.indexOf(l)!==-1),o={...e,...t};for(const l of i){const c=lj(e[l],t[l]);if(!c.valid)return{valid:!1};o[l]=c.data}return{valid:!0,data:o}}else if(n===Ye.array&&r===Ye.array){if(e.length!==t.length)return{valid:!1};const s=[];for(let i=0;i<e.length;i++){const o=e[i],l=t[i],c=lj(o,l);if(!c.valid)return{valid:!1};s.push(c.data)}return{valid:!0,data:s}}else return n===Ye.date&&r===Ye.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class Pb extends zt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),s=(i,o)=>{if(x4(i)||x4(o))return xt;const l=lj(i.value,o.value);return l.valid?((v4(i)||v4(o))&&n.dirty(),{status:n.value,value:l.data}):(ze(r,{code:_e.invalid_intersection_types}),xt)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([i,o])=>s(i,o)):s(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}Pb.create=(e,t,n)=>new Pb({left:e,right:t,typeName:vt.ZodIntersection,...Nt(n)});class Eu extends zt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Ye.array)return ze(r,{code:_e.invalid_type,expected:Ye.array,received:r.parsedType}),xt;if(r.data.length<this._def.items.length)return ze(r,{code:_e.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),xt;!this._def.rest&&r.data.length>this._def.items.length&&(ze(r,{code:_e.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const i=[...r.data].map((o,l)=>{const c=this._def.items[l]||this._def.rest;return c?c._parse(new fa(r,o,r.path,l)):null}).filter(o=>!!o);return r.common.async?Promise.all(i).then(o=>ws.mergeArray(n,o)):ws.mergeArray(n,i)}get items(){return this._def.items}rest(t){return new Eu({...this._def,rest:t})}}Eu.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Eu({items:e,typeName:vt.ZodTuple,rest:null,...Nt(t)})};class Ab extends zt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Ye.object)return ze(r,{code:_e.invalid_type,expected:Ye.object,received:r.parsedType}),xt;const s=[],i=this._def.keyType,o=this._def.valueType;for(const l in r.data)s.push({key:i._parse(new fa(r,l,r.path,l)),value:o._parse(new fa(r,r.data[l],r.path,l)),alwaysSet:l in r.data});return r.common.async?ws.mergeObjectAsync(n,s):ws.mergeObjectSync(n,s)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof zt?new Ab({keyType:t,valueType:n,typeName:vt.ZodRecord,...Nt(r)}):new Ab({keyType:qa.create(),valueType:t,typeName:vt.ZodRecord,...Nt(n)})}}class S4 extends zt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Ye.map)return ze(r,{code:_e.invalid_type,expected:Ye.map,received:r.parsedType}),xt;const s=this._def.keyType,i=this._def.valueType,o=[...r.data.entries()].map(([l,c],u)=>({key:s._parse(new fa(r,l,r.path,[u,"key"])),value:i._parse(new fa(r,c,r.path,[u,"value"]))}));if(r.common.async){const l=new Map;return Promise.resolve().then(async()=>{for(const c of o){const u=await c.key,d=await c.value;if(u.status==="aborted"||d.status==="aborted")return xt;(u.status==="dirty"||d.status==="dirty")&&n.dirty(),l.set(u.value,d.value)}return{status:n.value,value:l}})}else{const l=new Map;for(const c of o){const u=c.key,d=c.value;if(u.status==="aborted"||d.status==="aborted")return xt;(u.status==="dirty"||d.status==="dirty")&&n.dirty(),l.set(u.value,d.value)}return{status:n.value,value:l}}}}S4.create=(e,t,n)=>new S4({valueType:t,keyType:e,typeName:vt.ZodMap,...Nt(n)});class Sg extends zt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Ye.set)return ze(r,{code:_e.invalid_type,expected:Ye.set,received:r.parsedType}),xt;const s=this._def;s.minSize!==null&&r.data.size<s.minSize.value&&(ze(r,{code:_e.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),n.dirty()),s.maxSize!==null&&r.data.size>s.maxSize.value&&(ze(r,{code:_e.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),n.dirty());const i=this._def.valueType;function o(c){const u=new Set;for(const d of c){if(d.status==="aborted")return xt;d.status==="dirty"&&n.dirty(),u.add(d.value)}return{status:n.value,value:u}}const l=[...r.data.values()].map((c,u)=>i._parse(new fa(r,c,r.path,u)));return r.common.async?Promise.all(l).then(c=>o(c)):o(l)}min(t,n){return new Sg({...this._def,minSize:{value:t,message:rt.toString(n)}})}max(t,n){return new Sg({...this._def,maxSize:{value:t,message:rt.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}Sg.create=(e,t)=>new Sg({valueType:e,minSize:null,maxSize:null,typeName:vt.ZodSet,...Nt(t)});class cj extends zt{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}cj.create=(e,t)=>new cj({getter:e,typeName:vt.ZodLazy,...Nt(t)});class Ob extends zt{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return ze(n,{received:n.data,code:_e.invalid_literal,expected:this._def.value}),xt}return{status:"valid",value:t.data}}get value(){return this._def.value}}Ob.create=(e,t)=>new Ob({value:e,typeName:vt.ZodLiteral,...Nt(t)});function E7(e,t){return new Iu({values:e,typeName:vt.ZodEnum,...Nt(t)})}class Iu extends zt{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return ze(n,{expected:Yt.joinValues(r),received:n.parsedType,code:_e.invalid_type}),xt}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return ze(n,{received:n.data,code:_e.invalid_enum_value,options:r}),xt}return Zi(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return Iu.create(t,{...this._def,...n})}exclude(t,n=this._def){return Iu.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}Iu.create=E7;class uj extends zt{_parse(t){const n=Yt.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==Ye.string&&r.parsedType!==Ye.number){const s=Yt.objectValues(n);return ze(r,{expected:Yt.joinValues(s),received:r.parsedType,code:_e.invalid_type}),xt}if(this._cache||(this._cache=new Set(Yt.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){const s=Yt.objectValues(n);return ze(r,{received:r.data,code:_e.invalid_enum_value,options:s}),xt}return Zi(t.data)}get enum(){return this._def.values}}uj.create=(e,t)=>new uj({values:e,typeName:vt.ZodNativeEnum,...Nt(t)});class Db extends zt{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Ye.promise&&n.common.async===!1)return ze(n,{code:_e.invalid_type,expected:Ye.promise,received:n.parsedType}),xt;const r=n.parsedType===Ye.promise?n.data:Promise.resolve(n.data);return Zi(r.then(s=>this._def.type.parseAsync(s,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Db.create=(e,t)=>new Db({type:e,typeName:vt.ZodPromise,...Nt(t)});class vc extends zt{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===vt.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),s=this._def.effect||null,i={addIssue:o=>{ze(r,o),o.fatal?n.abort():n.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),s.type==="preprocess"){const o=s.transform(r.data,i);if(r.common.async)return Promise.resolve(o).then(async l=>{if(n.value==="aborted")return xt;const c=await this._def.schema._parseAsync({data:l,path:r.path,parent:r});return c.status==="aborted"?xt:c.status==="dirty"||n.value==="dirty"?om(c.value):c});{if(n.value==="aborted")return xt;const l=this._def.schema._parseSync({data:o,path:r.path,parent:r});return l.status==="aborted"?xt:l.status==="dirty"||n.value==="dirty"?om(l.value):l}}if(s.type==="refinement"){const o=l=>{const c=s.refinement(l,i);if(r.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return l};if(r.common.async===!1){const l=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return l.status==="aborted"?xt:(l.status==="dirty"&&n.dirty(),o(l.value),{status:n.value,value:l.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(l=>l.status==="aborted"?xt:(l.status==="dirty"&&n.dirty(),o(l.value).then(()=>({status:n.value,value:l.value}))))}if(s.type==="transform")if(r.common.async===!1){const o=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Hh(o))return xt;const l=s.transform(o.value,i);if(l instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:l}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(o=>Hh(o)?Promise.resolve(s.transform(o.value,i)).then(l=>({status:n.value,value:l})):xt);Yt.assertNever(s)}}vc.create=(e,t,n)=>new vc({schema:e,typeName:vt.ZodEffects,effect:t,...Nt(n)});vc.createWithPreprocess=(e,t,n)=>new vc({schema:t,effect:{type:"preprocess",transform:e},typeName:vt.ZodEffects,...Nt(n)});class Za extends zt{_parse(t){return this._getType(t)===Ye.undefined?Zi(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Za.create=(e,t)=>new Za({innerType:e,typeName:vt.ZodOptional,...Nt(t)});class Tu extends zt{_parse(t){return this._getType(t)===Ye.null?Zi(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Tu.create=(e,t)=>new Tu({innerType:e,typeName:vt.ZodNullable,...Nt(t)});class $b extends zt{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===Ye.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}$b.create=(e,t)=>new $b({innerType:e,typeName:vt.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Nt(t)});class Lb extends zt{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},s=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return Tb(s)?s.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new sl(r.common.issues)},input:r.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new sl(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Lb.create=(e,t)=>new Lb({innerType:e,typeName:vt.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Nt(t)});class k4 extends zt{_parse(t){if(this._getType(t)!==Ye.nan){const r=this._getOrReturnCtx(t);return ze(r,{code:_e.invalid_type,expected:Ye.nan,received:r.parsedType}),xt}return{status:"valid",value:t.data}}}k4.create=e=>new k4({typeName:vt.ZodNaN,...Nt(e)});class I7 extends zt{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class F5 extends zt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const i=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?xt:i.status==="dirty"?(n.dirty(),om(i.value)):this._def.out._parseAsync({data:i.value,path:r.path,parent:r})})();{const s=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?xt:s.status==="dirty"?(n.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:r.path,parent:r})}}static create(t,n){return new F5({in:t,out:n,typeName:vt.ZodPipeline})}}class Bb extends zt{_parse(t){const n=this._def.innerType._parse(t),r=s=>(Hh(s)&&(s.value=Object.freeze(s.value)),s);return Tb(n)?n.then(s=>r(s)):r(n)}unwrap(){return this._def.innerType}}Bb.create=(e,t)=>new Bb({innerType:e,typeName:vt.ZodReadonly,...Nt(t)});var vt;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(vt||(vt={}));const N=qa.create,Z=Uh.create,Re=sj.create,Qa=aj.create;xc.create;const pe=aa.create,F=or.create,pce=Mb.create,Ws=B5.create;Pb.create;Eu.create;const Qi=Ab.create,he=Ob.create,Ue=Iu.create;Db.create;Za.create;Tu.create;const mce=vc.createWithPreprocess,gce=["head","index"],T7=N().regex(/^[A-Za-z0-9][A-Za-z0-9-]{0,127}$/),Fb=N().regex(/^[1-9][0-9]*$/),zb=N().regex(/^[A-Za-z0-9_.-]+$/),kg=N().min(1).max(255).refine(e=>!e.startsWith("-")&&e!=="HEAD"&&!e.startsWith("/")&&!e.endsWith("/")&&!e.endsWith(".")&&!/[\s~^:?*\[\\\x00-\x1f\x7f]/.test(e)&&!e.includes("..")&&!e.includes("@{")&&!e.includes("//")&&e.split("/").every(t=>!t.startsWith(".")&&!t.endsWith(".lock")),"Invalid Git branch"),z5=N().min(1).max(4096).refine(e=>!e.startsWith("/")&&!e.includes("\0")&&!e.split(/[\\/]/).includes("..")),Iw=F({workspaceId:T7,repoId:Fb,owner:zb,name:zb,sourceBranch:kg,defaultBranch:kg}).strict(),xce=F({repoId:Fb,owner:zb,name:zb,defaultBranch:N(),private:Re(),description:N().nullable()}),vce=Iw.extend({initialCommit:N(),head:N(),actualBranch:N().nullable(),branches:pe(N()).optional(),files:pe(F({path:z5,previousPath:N().optional(),comparison:Ue(gce).optional(),status:N(),added:Z().nonnegative(),removed:Z().nonnegative(),binary:Re(),untracked:Re().optional()})),totalFiles:Z().int().nonnegative().optional(),filesTruncated:Re().optional(),added:Z().nonnegative(),removed:Z().nonnegative(),dirty:Re(),conflicted:Re(),version:N(),measuredAt:Z()}),Id=F({sessionId:T7});Ws("action",[Id.extend({action:he("repositories"),page:Z().int().min(1).max(1e3).optional(),search:N().max(100).optional()}).strict(),Id.extend({action:he("branches"),repoId:Fb,page:Z().int().min(1).max(1e3).optional(),search:N().max(100).optional(),cursor:N().min(1).max(1024).optional()}).strict(),Id.extend({action:he("bind"),repoId:Fb,branch:kg}).strict(),Id.extend({action:he("status")}).strict(),Id.extend({action:he("intend"),branch:kg.optional()}).strict(),Id.extend({action:he("diff"),filePath:z5}).strict()]);F({binding:Iw.nullable().optional(),workspace:vce.nullable().optional(),repositories:pe(xce).optional(),branches:pe(N()).optional(),hasMore:Re().optional(),nextCursor:N().min(1).max(1024).optional(),diff:F({path:z5,patch:N(),binary:Re(),truncated:Re(),notStored:Re().optional()}).optional()});F({threadId:N().min(1),conversationId:N().min(1),workspace:Iw.optional()});new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");F({id:N().min(1),name:N().min(1),baseUrl:N().min(1),apiKey:N().min(1),remark:N().optional(),createdAt:Z(),updatedAt:Z()}).strict();const yce=F({id:N().min(1),name:N().min(1),baseUrl:N().min(1),remark:N().optional(),keyMasked:N(),hasKey:Re(),createdAt:Z(),updatedAt:Z()}).strict();F({activeChannelId:N().nullable(),channels:pe(yce)}).strict();F({}).strict();F({id:N().min(1).optional(),name:N().min(1),baseUrl:N().min(1),apiKey:N().optional(),remark:N().optional()}).strict();F({id:N().min(1)}).strict();F({id:N().min(1).nullable()}).strict();F({channelId:N().min(1).optional(),updatedAt:Z().optional()}).strict().refine(e=>e.updatedAt===void 0||e.channelId!==void 0,{message:"updatedAt requires channelId"});F({channelId:N().nullable(),models:pe(F({id:N().min(1),ownedBy:N().optional()}).strict())}).strict();const bce=["owner"],wce=["agent","owner","user-upload"],R7=F({id:N().min(1),relPath:N().min(1),from:Ue(wce),label:N().optional(),size:Z().int().nonnegative(),mime:N().min(1),addedAt:Z().int().nonnegative(),lastEditedAt:Z().int().nonnegative().optional(),stale:Re().optional()});F({sessionId:N().min(1),relPath:N().min(1),ttlSeconds:Z().int().positive().nullable().optional(),view:Ue(["raw","md-rendered"]).optional()});F({url:N().min(1),expiresAt:Z().int().nonnegative().nullable()});F({sessionId:N().min(1),relPath:N().min(1),label:N().optional(),origin:he("agent").optional()});F({entry:R7});F({sessionId:N().min(1),relPath:N().min(1)});F({removed:he(!0)});F({sessionId:N().min(1)});F({entries:pe(R7)});F({attachmentId:N().min(1),url:N().min(1),relPath:N().min(1),sizeBytes:Z().int().nonnegative(),mimeType:N().min(1)});const _ce=Ws("type",[F({type:he("persona"),id:N().min(1)}).strict(),F({type:he("chat"),id:N().min(1)}).strict(),F({type:he("*")}).strict()]),Sce=Ue(["read","send","admin"]),H5=F({resource:_ce,actions:pe(Sce).min(1)}).strict(),kce=F({id:N().min(1),secretHash:N().regex(/^[a-f0-9]{64}$/),displayName:N(),grants:pe(H5),issuedAt:Z().int().nonnegative(),expiresAt:Z().int().positive().optional(),maxUses:Z().int().positive().optional(),usedCount:Z().int().nonnegative(),peerOwnerId:N().min(1).optional(),firstUsedByPeerAt:Z().int().positive().optional(),peerDisplayName:N().optional()}).strict(),Cce=kce.omit({secretHash:!0});F({type:he("whoami:ok"),owner:F({id:N(),kind:Ue(["owner","guest"]),displayName:N(),ownerId:N(),provider:N()}).strict(),capability:Cce,grantedPersonas:pe(F({id:N().min(1),displayName:N()}).strict())}).strict();const Nce="PEER_LOGIN_EXPIRED";F({selfUrl:N().min(1)});F({type:he("contact:handshake:ok"),owner:F({id:N(),ownerId:N(),provider:N(),displayName:N()}),grants:pe(H5)});const jce=Ws("status",[F({status:he("authorized"),login:N().min(1),source:Ue(["git","file"])}).strict(),F({status:he("missing")}).strict(),F({status:he("invalid"),message:N().min(1)}).strict(),F({status:he("pending"),authUrl:N().url()}).strict()]);F({token:N().min(1)}).strict();F({returnTo:N().url().optional()}).strict();const Ece=F({url:N().url(),bin:N(),sha256:N().regex(/^[0-9a-f]{64}$/),size:Z().int().positive()}),Ice={label:"Debian 13"},M7=["node","npm"],Tce=["claude","codex","git","lark-cli","pi","pi-mcp-bridge","pi-cliproxyapi-provider","python3","jq","rsync","psql","go","chromium","fonts-wqy-microhei","openssh-server","pnpm","whiteboard-cli","s","supabase-mcp","mcp-server-kibana","aliyun"],Rce=F({name:N().min(1),from:N().optional(),version:N().optional(),min:N().optional(),library:Re().optional(),localVersion:N().optional(),artifact:Ece.optional(),aptMissing:he(!0).optional(),aptVersion:N().optional()}),U5=N().regex(/^[a-z0-9-]+$/,"连接器名只能是小写字母、数字和短横线"),P7=["proxy","env"],A7=["mcp","cli"],Mce=["bearer","lark-sidecar"],O7=["none","shared","personal"],W5=["oauth","fields"],Tw=N().regex(/^[A-Z][A-Z0-9_]*$/,"要填的变量名只能是大写字母、数字和下划线,且以字母开头"),Pce=F({name:N().min(1),env:pe(Tw).min(1)}),D7=F({name:U5,kind:Ue(P7),runner:Ue(A7),protocol:Ue(Mce).optional(),id:N().min(1),credentialSource:Ue(O7).optional(),auth:Ue(W5).optional(),publisherUnionId:N().regex(/^on_[A-Za-z0-9_-]+$/).optional(),fields:pe(Tw).default([]),http:F({url:N().min(1),headers:Qi(N(),N())}).optional()}),$7=["LARKSUITE_CLI_APP_ID","LARKSUITE_CLI_APP_SECRET"];function V5(e){return e.name==="feishu"&&e.runner==="cli"&&e.kind==="env"&&e.credentialSource==="shared"}function Ace(e){return e.name==="feishu"&&e.id==="feishu"&&e.runner==="cli"&&e.kind==="proxy"&&e.protocol==="lark-sidecar"&&e.credentialSource==="shared"&&e.auth==="oauth"&&e.fields.length===0}function L7(e){if(!e.credentialSource)return[`连接器 ${e.name} 还没选用谁的账号`];const t=[];return Ace(e)?t:e.protocol==="lark-sidecar"&&e.credentialSource==="shared"?["连接器 feishu 的发布者 OAuth 配置不完整,请重新选择账号身份"]:V5(e)?$7.filter(n=>!e.fields.includes(n)).map(n=>`连接器 feishu 的 Lark App Bot 缺少 ${n==="LARKSUITE_CLI_APP_ID"?"App ID":"App Secret"}`):(e.credentialSource==="personal"&&(e.auth?e.auth==="oauth"&&e.kind==="env"?t.push(`连接器 ${e.name} 是进程型(stdio MCP / CLI),只能粘贴 API key,走不了 OAuth`):e.auth==="fields"&&e.fields.length===0&&t.push(`连接器 ${e.name} 要填的变量还没列`):t.push(`连接器 ${e.name} 还没选用户怎么关联账号`)),e.credentialSource==="shared"&&e.fields.length===0&&t.push(`连接器 ${e.name} 选了发布者的账号,但要填的变量还没列`),t)}const Oce=/^([A-Za-z0-9._/-]+)@([A-Za-z0-9._-]+)(?:\?tags=([A-Za-z0-9_,]+))?$/,Dce=["main","master","HEAD","latest"];function $ce(e){const t=Oce.exec(e);return!!t&&!Dce.includes(t[2])}function B7(e){var n,r;return M7.includes(e.name)||Tce.includes(e.name)?[]:(n=e.from)!=null&&n.startsWith("github:")&&!e.artifact?[`${e.name} 还没钉下载资产(github: 要具体到哪个文件)——重新扫描`]:(r=e.from)!=null&&r.startsWith("go:")&&!$ce(e.from.slice(3))?[`${e.name} 还没钉版本(go: 要写成 <module>@<tag>,不收 latest / main 这类移动引用)——重新扫描`]:[]}function q5(e){return e.connectors.filter(t=>t.credentialSource==="shared"&&t.fields.length>0).map(t=>({name:t.name,env:[...t.fields]}))}function Lce(e){return[...new Set([...e.envVars.flatMap(t=>t.env),...q5(e).flatMap(t=>t.env)])]}function Bce(e){const t=new Set(e.connectors.flatMap(n=>n.fields));return[...new Set(e.envVars.flatMap(n=>n.env))].filter(n=>t.has(n)).map(n=>`${n} 同时是环境变量和连接器的字段,只能留一处——重新扫描`)}const Fce=e=>{if(!e||typeof e!="object")return e;let t=e;if("clis"in t&&Array.isArray(t.clis)){const{clis:n,...r}=t;t="packages"in r?r:{...r,packages:n}}if("assets"in t&&Array.isArray(t.assets)&&t.assets.length===0){const{assets:n,...r}=t;t=r}if("secrets"in t&&Array.isArray(t.secrets)){const{secrets:n,...r}=t,s=new Set((Array.isArray(r.connectors)?r.connectors:[]).flatMap(o=>Array.isArray(o==null?void 0:o.fields)?o.fields:[])),i=n.map(o=>({...o,env:Array.isArray(o==null?void 0:o.env)?o.env.filter(l=>!s.has(l)):o==null?void 0:o.env})).filter(o=>!Array.isArray(o.env)||o.env.length>0);t={...r,envVars:[...Array.isArray(r.envVars)?r.envVars:[],...i]}}return t},zce="Publisher test: ",F7=F({version:he(1),entry:N().max(240).regex(/^[A-Za-z0-9_.-]+(?:\/[A-Za-z0-9_.-]+)*\.mjs$/).refine(e=>!e.split("/").some(t=>[".",".."].includes(t))),timeoutSeconds:Z().int().min(1).max(600),checks:pe(N().regex(/^[a-z0-9][a-z0-9-]{0,63}$/)).min(1).max(64).refine(e=>new Set(e).size===e.length)}).strict(),z7={test:F7.optional(),packages:pe(Rce),envVars:pe(Pce).default([]),connectors:pe(D7).default([])};F(z7);const K5=mce(Fce,F({version:he(1),...z7}).strict()),Hce=F({target:N().min(1),reason:N().min(1),file:N().min(1),quote:N().min(1)}),Uce=["integration","production"],Vs=Ue(Uce),yc=N().regex(/^[a-z0-9.-]+(?::[0-9]+)?\/[a-z0-9._/-]+@sha256:[a-f0-9]{64}$/),dj=N().regex(/^[a-f0-9]{40}$/),Wce=N().refine(e=>{try{const t=new URL(e);return t.protocol==="https:"&&!t.username&&!t.password&&!t.search&&!t.hash&&t.pathname==="/"&&/(^|[.-])int([.-]|$)/.test(t.hostname)}catch{return!1}},"测试验证地址必须明确指向 int HTTPS 环境"),Vce=F({version:he(1),runId:N().regex(/^[A-Za-z0-9_-]{1,128}$/),status:he("passed"),exitCode:he(0),result:F({version:he(1),runId:N().regex(/^[A-Za-z0-9_-]{1,128}$/),checks:pe(F({name:N().regex(/^[a-z0-9][a-z0-9-]{0,63}$/),status:he("passed"),reason:N().max(1024).optional()}).strict()).min(1).max(64)}).strict(),execution:F({image:yc,imageID:N().min(1).max(512),engine:Ue(["codex","pi"]),podUid:N().min(1).max(512),jobUid:N().min(1).max(512)}).strict()}).strict(),H7=F({status:he("passed"),fingerprint:N().regex(/^[a-f0-9]{64}$/),checks:pe(N().regex(/^[a-z0-9-]+$/)),endpoint:Wce,verifiedAt:N().refine(e=>Number.isFinite(Date.parse(e))),test:Vce.optional()}).strict(),U7=F({engine:N().min(1),model:N(),effort:N(),size:N().min(1),cpu:Z().positive(),taskConcurrency:Z().int().positive(),minPods:Z().int().nonnegative().safe().optional()}).strict(),W7=F({version:he(1),environment:he("integration"),component:he("persona"),image:yc,commit:dj,baseImage:yc,pipelineCommit:dj,repository:N().regex(/^[A-Za-z0-9_.-]+\/[A-Za-z0-9_.-]+$/),config:U7.optional(),verification:H7.refine(e=>e.checks.includes("persona-smoke")),test:F7.optional()}).strict().refine(e=>{if(!e.test)return e.verification.test===void 0;const t=e.verification.test;return["persona-dialogue","persona-task","persona-custom-test"].every(n=>e.verification.checks.includes(n))&&t!==void 0&&t.execution.image===e.image&&t.runId===t.result.runId&&t.result.checks.length===e.test.checks.length&&new Set(t.result.checks.map(n=>n.name)).size===e.test.checks.length&&t.result.checks.every(n=>e.test.checks.includes(n.name))},"Declared publisher acceptance requires complete candidate runtime evidence");F({version:he(1),environment:he("integration"),component:he("base"),image:yc,commit:dj,verification:H7.refine(e=>e.checks.includes("base-smoke"))}).strict();const Cg="-cloud",G5=`codex${Cg}`,Ng={standard:"default",fast:"priority"},qce=`claude${Cg}`;function V7(e){return e==="codex"||e===G5}const q7="pi",Kce=`${q7}${Cg}`;function K7(e){return e===q7||e===Kce}function Ql(e){return typeof e=="string"&&e.length>Cg.length&&e.endsWith(Cg)}const G7=Ue([Ng.standard,Ng.fast]),Y5=["tiny","small","medium","large","xlarge"],Gce=Ue(Y5),Hb="medium",Ub=[.5,1,2],Yce=Z().refine(e=>Ub.includes(e),"Unsupported CPU"),hj={tiny:.5,small:1,medium:2,large:2,xlarge:2},Y7=F({model:N().optional(),effort:N().optional()}).strict(),Am=F({personaId:N(),label:N(),model:N().optional(),effort:N().optional(),serviceTier:G7.optional(),public:Re(),iconKey:N().optional(),tool:N().optional(),size:N().optional(),cpu:Z().finite().optional(),taskConcurrency:Z().int().positive().optional(),minPods:Z().int().nonnegative().safe().optional(),cloudEngine:Y7.optional(),createdAt:Z(),updatedAt:Z(),cloud:F({gatewayUrl:N().min(1),personaId:N().min(1),publishedByMe:Re().optional(),collaboratedByMe:Re().optional(),label:N().optional(),environment:Vs.optional(),expectedImage:yc.optional(),testReleaseId:N().optional()}).strict().optional()}).strict(),Xce=F({name:N().min(1),description:N().optional()}),Zce=F({id:N().min(1)}),X7=F({writableRoots:pe(N()).optional(),denyRead:pe(N()).optional(),network:Re().optional()}).strict(),Qce=F({permissions:F({defaultMode:N().optional(),allow:pe(N()).optional(),deny:pe(N()).optional()}).optional(),sandbox:F({enabled:Re().optional(),autoAllowBashIfSandboxed:Re().optional(),allowUnsandboxedCommands:Re().optional(),excludedCommands:pe(N()).optional(),filesystem:F({denyRead:pe(N()).optional(),allowRead:pe(N()).optional(),denyWrite:pe(N()).optional(),allowWrite:pe(N()).optional()}).optional(),network:F({allowedDomains:pe(N()).optional(),allowLocalBinding:Re().optional()}).optional()}).optional()});Am.extend({personality:N().optional(),personalityLocal:N().optional(),personalityManaged:Re().optional(),skills:pe(Xce).optional(),plugins:pe(Zce).optional(),sandboxSettings:Qce.nullable().optional(),codexSandbox:X7.nullable().optional()});F({slug:N().regex(/^[a-z0-9]+(-[a-z0-9]+)*$/).max(32),label:N().min(1),personality:N(),model:N().optional(),effort:N().optional(),serviceTier:Am.shape.serviceTier,tool:N().optional(),public:Re().optional(),iconKey:N().optional()}).strict();F({personaId:N().min(1)});F({personaId:N().min(1),patch:F({label:N().min(1).optional(),model:N().optional(),effort:N().optional(),serviceTier:Am.shape.serviceTier,tool:N().optional(),size:Gce.optional(),cpu:Yce.optional(),taskConcurrency:Am.shape.taskConcurrency,minPods:Am.shape.minPods,cloudEngine:Y7.optional(),personality:N().optional(),personalityLocal:N().optional(),public:Re().optional(),iconKey:N().nullable().optional(),codexSandbox:X7.optional()}).strict()}).strict();F({version:he(1),manifest:K5}).strict();const Jce=["hard","soft"],Z7=Ue(Jce),eue=Ue(["scanning","done","failed"]),Q7=F({id:N().min(1),manifest:K5,scanSessionId:N().optional(),status:eue,evidence:pe(Hce).default([]),notes:pe(N()).default([]),head:N().min(1).optional(),baseKind:Z7.default("hard"),base:N().min(1).optional(),startedAt:Z(),finishedAt:Z().optional(),error:N().optional()}).strict(),X5=F({id:N().min(1).optional(),environment:Vs.optional(),legacy:Re().optional(),head:N().min(1),contentHead:N().min(1),scanId:N().min(1),at:Z(),pushed:Re().optional(),runId:Z().int().positive().optional(),runAttempt:Z().int().positive().optional(),artifactId:Z().int().positive().optional(),verified:W7.optional(),config:U7.optional(),reconfigOf:N().min(1).optional(),workflowVersion:Z().int().positive().optional(),confirmation:F({fingerprint:N().regex(/^[a-f0-9]{64}$/),runId:Z().int().positive(),runAttempt:Z().int().positive(),at:Z()}).strict().optional()}).strict(),tue=["prepared","main-pushed","dispatching","dispatched","completed","failed"],Z5=F({id:N().min(1),releaseId:N().min(1),at:Z(),verified:W7.optional(),phase:Ue(tue),expectedMain:N().optional(),runId:Z().int().positive().optional(),runAttempt:Z().int().positive().optional(),error:N().optional()}).strict(),C4=F({channelId:N().min(1),updatedAt:Z()}).strict(),Q5=F({integration:C4.nullable().optional(),production:C4.nullable().optional()}).strict();F({version:he(4),engineChannels:Q5.optional(),scans:pe(Q7),releases:pe(X5),promotions:pe(Z5).default([])}).strict();const nue=F({url:N().min(1),branch:N().min(1),head:N().min(1),dirty:Re(),ahead:Z()}).strict(),Cy=F({env:N().min(1),setAt:Z().optional()}).strict(),N4={baseUrl:"CLAWD_ENGINE_BASE_URL",apiKey:"CLAWD_ENGINE_API_KEY"},rue="模型订阅只写进去一半——重填或改回平台默认";function Wb(e){if(!e)return;const t=r=>e.some(s=>s.env===r&&s.setAt!==void 0),n=[N4.baseUrl,N4.apiKey].filter(t).length;return n===2?"own":n===0?"platform":"partial"}function sue(e){const t=e.trim();let n;try{n=new URL(t)}catch{throw new Error("订阅地址要以 http:// 或 https:// 开头,形如 https://cpa.example.com")}if(n.protocol!=="http:"&&n.protocol!=="https:"||!n.hostname)throw new Error("订阅地址要以 http:// 或 https:// 开头,形如 https://cpa.example.com");const r=`${n.origin}${n.pathname}`.replace(/\/+$/,"");return r.endsWith("/v1")?r:`${r}/v1`}const iue=["pending","running","done","failed","waiting","skipped"],oue=Ue(iue),vo="verify",Om=["build","smoke","deploy",vo],aue=Ue(Om),lue=F({key:aue,status:oue,url:N().optional(),jobId:Z().optional(),startedAt:Z().optional(),completedAt:Z().optional(),cliWarnings:pe(N()).optional()}).strict(),Ny=F({runId:Z(),headSha:N().min(1),status:Ue(["queued","running","completed"]),htmlUrl:N().min(1),jobs:pe(lue),environment:Vs.optional(),branch:N().optional(),event:N().optional(),runAttempt:Z().int().positive().optional(),conclusion:Ue(["success","failure"]).optional(),promotionId:N().optional()}).strict();function J7(e,t){return t&&e.head===t.head?t.contentHead:e.head}function Rw(e,t,n){return!e||!t||e.status!=="done"?!1:e.head===J7(t,n)&&!t.dirty}function J5(e,t,n){return!e||!t||e.status!=="done"||!e.head?!1:e.head!==J7(t,n)}function j4(e,t,n){return Rw(e,t,n)||J5(e,t,n)}function cue(e,t){return!t||!e.head?!1:t.contentHead===e.head||t.at>=e.startedAt}const eH=["codex","pi","claude"];function pl(e){return eH.includes(e||"claude")}const tH={codex:"0.163.0",pi:"1.3.0",claude:"0.3.304"},uue="2.1.304";function due(e,t){if(!e||!pl(e)||!t)return null;const n=e==="claude"?uue:tH[e];return n===t?null:{tool:e,cloud:n,local:t}}function nH(e){const t=e.tool||"claude",n=t==="claude"?e.cloudEngine??{}:e;return{tool:t,model:n.model??"",effort:n.effort??""}}const Ik=F({runId:Z(),status:Ny.shape.status,conclusion:Ue(["success","failure"]).optional(),htmlUrl:N().min(1)}).strict(),hue=F({desired:Z().int().nonnegative().safe(),ready:Z().int().nonnegative().safe(),bound:Z().int().nonnegative().safe(),starting:Z().int().nonnegative().safe(),retiring:Z().int().nonnegative().safe(),observedAt:Z(),error:N().nullable()}).strict(),E4=F({online:Re().optional(),image:yc.optional(),minPods:Z().int().nonnegative().safe().optional(),reservation:hue.nullable().optional(),reservationError:N().optional()}).strict(),rH=F({personaId:N().min(1),engineChannels:Q5.optional(),github:jce.optional(),publisherFeishuAuth:F({integration:F({connected:Re(),authUrl:N().optional(),error:N().optional()}).strict(),production:F({connected:Re(),authUrl:N().optional(),error:N().optional()}).strict()}).strict().optional(),repo:nue.optional(),scans:pe(Q7).default([]),releases:pe(X5).default([]),promotions:pe(Z5).optional(),targets:F({integration:E4.extend({run:Ny.optional(),secrets:pe(Cy).optional(),unpublish:Ik.optional()}).optional(),production:E4.extend({run:Ny.optional(),secrets:pe(Cy).optional(),unpublish:Ik.optional()}).optional()}).strict().optional(),secrets:pe(Cy).optional(),run:Ny.optional(),online:Re().optional(),unpublish:Ik.optional(),historyError:N().optional()}).strict();F({before:Z().nullable()}).strict();rH.pick({personaId:!0,github:!0,repo:!0,scans:!0,releases:!0,promotions:!0,engineChannels:!0,historyError:!0});rH.pick({scans:!0});F({environment:Vs,secrets:pe(Cy).optional(),engineChannels:Q5.optional()}).strict();const fue=e=>e.includes("minPods")?3:2,jg=1,pue=["engine","model","effort","size","cpu","taskConcurrency","minPods"];function mue(e){const{tool:t,model:n,effort:r}=nH(e),s=(e.size??"").trim()||Hb,i=e.cpu??hj[s]??hj[Hb];return{engine:t,model:n.trim(),effort:r.trim(),size:s,cpu:i,taskConcurrency:e.taskConcurrency??jg,minPods:e.minPods??0}}function sH(e,t){return!e||!t?null:pue.filter(n=>n==="minPods"?(e.minPods??0)!==(t.minPods??0):e[n]!==t[n])}F({sha:N().min(1),actionsUrl:N().min(1),releaseId:N().optional()}).strict();const Ic=F({personaId:N().min(1)}).strict(),gue=Ue(["owner","editor","admin"]),iH=F({displayName:N(),mine:Re(),acquiredAt:N(),expiresAt:N()}).strict(),xue=Ue(["invited","active","failed"]),vue=F({unionId:N(),displayName:N(),githubLogin:N().nullable(),createdAt:N(),repoAccess:xue.optional(),repoError:N().optional()}).strict();F({role:gue,collaborators:pe(vue),lock:iH.nullable(),lockRequired:Re()}).strict();Ic.extend({deviceId:N().min(1)}).strict();Ic.extend({unionId:N().min(1)}).strict();Ic.extend({action:Ue(["acquire","renew","release"])}).strict();F({required:Re(),lock:iH.nullable()}).strict();F({personaId:N().min(1)}).strict();Ic.extend({releaseHead:N().min(1).optional(),releaseId:N().min(1).optional(),environment:Vs.optional()}).strict();Ic.extend({scanBase:Z7.optional()}).strict();Ic.extend({scanId:N().min(1)}).strict();Ic.extend({releaseId:N().min(1)}).strict();Ic.extend({environment:Vs.default("production")}).strict();F({confirmation:X5.shape.confirmation.unwrap()}).strict();F({promotion:Z5}).strict();F({personaId:N().min(1),expectedImage:yc}).strict();F({personaId:N().min(1),scanId:N().min(1),patch:F({manifest:K5.optional(),connector:D7.optional()}).strict()}).strict();F({personaId:N().min(1),environment:Vs.default("production"),scanId:N().min(1),name:N().min(1),values:Qi(N(),N())}).strict();F({personaId:N().min(1),environment:Vs.default("production"),channelId:N().min(1).optional(),auth:F({baseUrl:N(),apiKey:N()}).strict().nullable().optional()}).strict().refine(e=>e.channelId!==void 0||e.auth!==void 0,{message:"Either channelId or auth must be provided"});F({personaId:N().min(1),environment:Vs.default("production"),releaseId:N().optional(),jobId:Z()}).strict();const yue="底座已更新,重试仍会用旧底座构建——请重新发布测试环境";F({personaId:N().min(1),kind:Ue(["package","env","connector"]),item:Qi(N(),Qa()),evidence:F({reason:N().min(1),file:N().min(1),quote:N().min(1)})}).strict();F({personaId:N().min(1),notes:pe(N()).default([])}).strict();const oH="ottin4ttc";function Wh(e){return e.trim().replace(/^git@[^:]+:/,"").replace(/^https?:\/\/[^/]+\//,"").replace(/\.git$/,"")}F({environment:Vs.default("production")}).strict();const bue="LOGIN_EXPIRED",wue=F({deviceId:N().min(1),name:N().min(1),url:N().min(1)});F({type:he("device:list:ok"),devices:pe(wue)});F({deviceId:N().min(1),url:N().min(1).optional(),name:N().optional()});F({type:he("device:connect:ok"),deviceId:N(),name:N(),url:N()});const aH=F({ownerId:N().min(1),provider:N().min(1),displayName:N().min(1),avatarUrl:N().optional(),unionId:N().optional()});F({type:he("auth:login:start:ok"),environment:Vs.optional(),authUrl:N().min(1),state:N().min(1)});F({type:he("auth:getIdentity:ok"),identity:aH.nullable(),deviceId:N().min(1)});F({type:he("auth:logout:ok")});const lH=N().nullable();F({type:he("auth:apiKey:get:ok"),apiKey:N().nullable(),createdAt:N().nullable(),gatewayUrl:lH});F({type:he("auth:apiKey:regenerate:ok"),apiKey:N().min(1),createdAt:N().min(1),gatewayUrl:lH});F({type:he("auth:apiKey:revoke:ok"),revoked:Re()});F({type:he("auth:login:done"),environment:Vs.optional(),identity:aH});F({type:he("auth:login:failed"),environment:Vs.optional(),reason:N()});F({deviceId:N().min(1),remoteAccessAllowed:Re()}).strict();F({type:he("contact:setRemoteAccess:ok"),deviceId:N().min(1),remoteAccessAllowed:Re()}).strict();F({type:he("contact:remote-access-updated"),deviceId:N().min(1),remoteAccessAllowed:Re()}).strict();F({personaId:N().min(1)}).strict();const _ue=["connected","missing","reauth"],Sue=["link","fill"],kue=F({name:U5,id:N().min(1),kind:Ue(P7),runner:Ue(A7),auth:Ue(W5),status:Ue(_ue),action:Ue(Sue),authUrl:N().optional(),note:N().optional(),fields:pe(Tw)}).strict();F({connectors:pe(kue)}).strict();F({personaId:N().min(1),name:U5,values:Qi(Tw,N().min(1))}).strict();const Cue=F({deviceId:N().min(1),ownerId:N().min(1),provider:N().min(1),displayName:N(),remoteUrl:N().min(1),connectToken:N(),grants:pe(H5),addedAt:Z().int().nonnegative(),pinnedAt:Z().int().nullable().default(null),remoteAccessAllowed:Re().default(!1),note:N().default("")}).strict(),cH=Cue;F({deviceId:N().min(1)}).strict();F({type:he("contact:remove:ok"),deviceId:N().min(1)}).strict();F({type:he("contact:list:ok"),contacts:pe(cH)}).strict();F({type:he("contact:added"),contact:cH}).strict();F({type:he("contact:removed"),deviceId:N().min(1)}).strict();F({deviceId:N().min(1),pinned:Re()}).strict();F({deviceId:N().min(1),note:N()}).strict();F({type:he("contact:setNote:ok"),deviceId:N().min(1),note:N()}).strict();F({type:he("contact:pin:ok"),deviceId:N().min(1),pinnedAt:Z().int().nullable()}).strict();F({type:he("contact:pinned"),deviceId:N().min(1),pinnedAt:Z().int().nullable()}).strict();const uH=8,Nue=["submitted","working","input_required","completed","failed","canceled","rejected"],eT=Ue(Nue),jue=/^[A-Za-z0-9_.-]{1,128}$/,Tk=/^[a-z0-9-]{1,128}$/;function Eue(e){if(e.startsWith("cloud:")){const s=e.slice(6);return Tk.test(s)?{kind:"cloud",personaId:s}:null}const t=e.indexOf("@");if(t<0)return Tk.test(e)?{kind:"here",personaId:e}:null;const n=e.slice(0,t),r=e.slice(t+1);return Tk.test(n)&&jue.test(r)?{kind:"device",personaId:n,deviceId:r}:null}const Iue=F({target:N().refine(e=>Eue(e)!==null,{message:"target must be <personaId>, <personaId>@<deviceId> or cloud:<personaId>"}),text:N().min(1),brief:N().optional(),contextId:N().min(1).optional(),taskId:N().min(1).optional(),sessionLabel:N().min(1).max(60).optional(),model:N().min(1).optional(),tool:N().min(1).optional(),meta:Qi(Qa()).optional()}).refine(e=>!(e.contextId&&e.taskId),{message:"contextId (new round) and taskId (answer) are mutually exclusive"}).refine(e=>!((e.contextId||e.taskId)&&(e.model||e.tool)),{message:"a follow-up cannot change engine or model (contextId / taskId exclude model / tool); start a new line instead"});F({calls:pe(Iue).min(1).max(uH),sessionId:N().min(1).optional()});const Tue=6e4;F({taskIds:pe(N().min(1)).min(1).max(uH),timeoutMs:Z().int().min(0).max(Tue)});F({taskId:N().min(1),text:N().trim().min(1)});F({taskId:N().min(1)});F({contextId:N().min(1).optional(),state:eT.optional(),sessionId:N().min(1).optional(),relatedSessionId:N().min(1).optional()});F({contextId:N().min(1),state:Ue(["completed","failed","input_required"]),text:N(),brief:N().optional(),filePaths:pe(N().min(1)).optional()});const tT=F({taskId:N().min(1),contextId:N().min(1),round:Z().int().positive(),state:eT,stale:Re(),reason:N().nullable(),depth:Z().int().min(0),tenant:N(),targetPersonaId:N(),targetDeviceId:N().nullable(),initiator:F({host:N(),personaId:N(),sessionRef:N().nullable()}),executorSessionRef:N().nullable(),executorThreadId:N().nullable(),workerSessionId:N().optional(),sessionLabel:N().optional(),taskText:N(),brief:N().nullable(),resultText:N().nullable(),filePaths:pe(N()),line:Qi(Qa()),deliveredAt:N().nullable(),createdAt:N(),updatedAt:N(),finishedAt:N().nullable()}),Rue=Ws("ok",[F({ok:he(!0),task:tT}),F({ok:he(!1),error:F({code:N(),message:N()})})]);F({results:pe(Rue)});F({tasks:pe(tT)});F({tasks:pe(tT),done:Re()});const Mue=/^[a-z0-9][a-z0-9-]*$/;Ue(["stopped","starting","running","crashed","invalid"]);const Pue=new Set(["localhost","127.0.0.1"]);function Aue(e){let t;try{t=new URL(e)}catch{return!1}return!!(t.protocol==="https:"||t.protocol==="http:"&&Pue.has(t.hostname))}const l0=F({id:N().regex(Mue),name:N().min(1),version:N().min(1),apiVersion:he("1"),runtime:F({startCommand:N().min(1)}).passthrough().optional(),entry:F({url:N().url().refine(Aue,{message:"INVALID_URL_SCHEME: only https or http://localhost is allowed"})}).strict().optional()}).passthrough().superRefine((e,t)=>{var s;const n=!!e.runtime,r=!!((s=e.entry)!=null&&s.url);n&&r&&t.addIssue({code:_e.custom,message:"INVALID_MANIFEST: entry.url and runtime cannot coexist"}),!n&&!r&&t.addIssue({code:_e.custom,message:"INVALID_MANIFEST: must have either entry.url or runtime"})}),Oue=Ws("kind",[F({kind:he("local"),port:Z().int().min(1).max(65535)}),F({kind:he("hosted"),url:N().url()})]);Ws("state",[F({extId:N(),manifest:l0,state:he("stopped")}),F({extId:N(),manifest:l0,state:he("starting")}),F({extId:N(),manifest:l0,state:he("running"),target:Oue}),F({extId:N(),manifest:l0,state:he("crashed")}),F({extId:N(),manifest:Qa().nullable(),state:he("invalid"),invalidReason:N().min(1)})]);F({snapshotHash:N().min(1),version:N().min(1),publishedAt:Z()});const Due=Ws("kind",[F({kind:he("p2p-tunnel"),ownerPrincipalId:N().min(1),extId:N().min(1)})]);Ws("kind",[F({kind:he("p2p-tunnel"),ownerPrincipalId:N().min(1),extId:N().min(1),snapshotHash:N().min(1)})]);F({extId:N().min(1),name:N().min(1),version:N().min(1),contentHash:N().min(1),publishedAt:Z()});const $ue=Ws("kind",[F({kind:he("clean")}),F({kind:he("ready-new-version"),fromVersion:N().min(1),toVersion:N().min(1)}),F({kind:he("error-same-hash"),version:N().min(1)}),F({kind:he("error-version-not-bumped"),localVersion:N().min(1),publishedVersion:N().min(1)}),F({kind:he("error-version-regression"),localVersion:N().min(1),publishedVersion:N().min(1)})]);function Lue(e){let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=Math.imul(t,16777619)>>>0;return(t>>>0).toString(16).padStart(8,"0")}function nT(e,t){return`${e}-${Lue(t)}`}function rT(e){if(typeof e!="string")return{ok:!1,reason:"version must be a string"};const t=e.split(".");if(t.length!==3)return{ok:!1,reason:`"${e}" — only MAJOR.MINOR.PATCH allowed`};for(const n of t)if(!/^\d+$/.test(n))return{ok:!1,reason:`"${e}" — only numeric segments allowed`};return{ok:!0}}function dH(e,t){const n=I4(e),r=I4(t);for(let s=0;s<3;s++){if(n[s]<r[s])return-1;if(n[s]>r[s])return 1}return 0}function I4(e){const t=rT(e);if(!t.ok)throw new Error(t.reason);const[n,r,s]=e.split(".").map(i=>parseInt(i,10));return[n,r,s]}F({localManifest:F({name:N().min(1),version:N().min(1),contentHash:N().min(1)}),publishState:Ws("kind",[F({kind:he("unpublished")}),F({kind:he("published"),version:N().min(1),contentHash:N().min(1),publishedAt:Z()})]),check:$ue});F({extId:N().min(1),newVersion:N().min(1).nullish()});F({extId:N().min(1)});F({extId:N().min(1),snapshotHash:N().min(1)});F({channelRef:Due,snapshotHash:N().min(1),zipBase64:N().min(1)});F({id:N().min(1),peerDeviceId:N().min(1),senderDeviceId:N().min(1),text:N().min(1),createdAt:Z().int().nonnegative(),readBy:Qi(N().min(1),Z().int().positive()).default({}),origin:F({kind:he("persona"),personaId:N().min(1)}).optional()}).strict();F({peerDeviceId:N().min(1).optional(),id:N().min(1),text:N().min(1),createdAt:Z().int().nonnegative(),origin:F({kind:he("persona"),personaId:N().min(1)}).optional()}).strict();F({peerDeviceId:N().min(1),sinceCreatedAt:Z().int().nonnegative().optional()}).strict();F({peerDeviceId:N().min(1),upToCreatedAt:Z().int().nonnegative()}).strict();F({peerDeviceId:N().min(1).optional(),text:N().min(1)});F({peerDeviceId:N().min(1).optional(),command:N().min(1),timeoutMs:Z().int().positive().optional()}).strict();F({type:he("peerExec:run:ok"),stdout:N(),stderr:N(),exitCode:Z().int().nullable(),timedOut:Re(),stdoutTruncated:Re(),stderrTruncated:Re()}).strict();const hH=Ws("kind",[F({kind:he("at"),at:N().min(1)}),F({kind:he("every"),everyMs:Z().int().positive(),anchorMs:Z().int().nonnegative().optional()}),F({kind:he("cron"),expr:N().min(1),tz:N().min(1).optional()})]),px=N().trim().min(1);F({personaId:px,name:N().min(1),schedule:hH,prompt:N().min(1),targetPersona:N().min(1).optional(),timeoutMs:Z().int().positive().optional()});F({personaId:px,onlyMine:Re().optional()});F({personaId:px,shiftId:N().min(1)});const Bue=F({name:N().min(1).optional(),schedule:hH.optional(),prompt:N().min(1).optional(),targetPersona:N().min(1).optional(),timeoutMs:Z().int().positive().optional(),enabled:Re().optional()});F({personaId:px,shiftId:N().min(1),patch:Bue});F({personaId:px,shiftId:N().min(1),limit:Z().int().positive().optional()});const Hi="persona-master",sT=F({personaId:N().min(1),deviceId:N().min(1).optional()}),fH=F({id:N().min(1),name:N().min(1),memberPersonas:pe(sT),memberContactDeviceIds:pe(N().min(1)),createdAt:N().min(1),updatedAt:N().min(1)}),pH=N().trim().min(1);F({name:pH,memberPersonas:pe(sT).default([]),memberContactDeviceIds:pe(N().min(1)).default([])});F({channelId:N().min(1),name:pH.optional(),memberPersonas:pe(sT).optional(),memberContactDeviceIds:pe(N().min(1)).optional()});F({channelId:N().min(1)});F({channels:pe(fH)});F({channel:fH});F({ok:he(!0),removedTopics:Z().int().min(0)});const hr=N().trim().min(1),iT=["master-confirmed","owner-needed"],oT=["open","resolved"],Fue=iT[0],mH=iT[1],gH=oT[0],zue=oT[1],Hue=Ue(iT),Uue=Ue(oT),Wue=F({id:hr.optional(),resolves:hr.optional(),type:Hue,status:Uue,question:hr,recommendation:hr}).superRefine((e,t)=>{e.type===Fue&&e.status!==zue&&t.addIssue({code:_e.custom,path:["status"],message:"master-confirmed decisions must be resolved"})}),Vue=["planning","running","done"],que=Ue(Vue),xH=F({at:N().min(1),actor:N().min(1),action:N().min(1),target:N().optional(),reason:N().min(1),artifacts:pe(hr).optional(),decision:Wue.optional()}),Kue=F({rejectCount:Z().int().min(0),accepted:Re().default(!1),ordinal:Z().int().min(1).optional(),overrideCount:Z().int().min(0).optional()}),aT=F({id:N().min(1),channelId:N().min(1),title:N(),masterSessionId:N().min(1),goal:N(),boundaries:N(),acceptanceCriteria:pe(N()),activity:pe(xH),lineMeta:Qi(Kue),nextLineOrdinal:Z().int().min(1).optional(),state:que,createdAt:N().min(1),updatedAt:N().min(1)}),Gue=F({lineId:N().min(1),contextId:N().min(1),taskId:N().min(1),workerSessionId:N().optional(),assignee:N().min(1),focus:N(),status:eT,acceptance:pe(N()),rejectCount:Z().int().min(0),accepted:Re(),ordinal:Z().int().min(1).nullable()});F({channelId:N().min(1)});F({topicId:N().min(1).optional(),sessionId:N().min(1).optional()}).refine(e=>e.topicId!==void 0||e.sessionId!==void 0,{message:"either topicId or sessionId is required"});F({channelId:N().min(1),title:hr.optional()});F({topicId:N().min(1),title:hr.optional(),goal:hr,boundaries:N(),acceptanceCriteria:pe(hr).min(1)});F({topicId:N().min(1),action:hr,target:hr.optional(),reason:hr,artifacts:pe(hr).optional(),decision:xH.shape.decision});F({topicId:N().min(1),lineId:hr,reason:hr});F({topicId:N().min(1),lineId:hr,reason:hr,artifacts:pe(hr).optional(),watcherVerdict:Ue(["pass","fail"]),overrideReason:hr.optional()}).refine(e=>e.watcherVerdict!=="fail"||!!e.overrideReason,{message:"watcherVerdict=fail 时必须给 overrideReason(推翻 watcher 的理由)",path:["overrideReason"]});F({topicId:N().min(1),state:Ue(["done"])});F({topicId:N().min(1),title:hr});F({topicId:N().min(1)});const Yue=aT.extend({lineCount:Z().int().min(0)});F({topics:pe(Yue)});F({topic:aT,lines:pe(Gue)});F({topicId:N().min(1),masterSessionId:N().min(1)});F({rejectCount:Z().int().min(1),needsOwnerAttention:Re()});F({acceptedLines:Z().int().min(1),totalLines:Z().int().min(1),allAccepted:Re(),overrides:Z().int().min(0),needsOwnerAttention:Re()});F({topic:aT});F({ok:he(!0),removedMasterSessionId:N().min(1).nullable(),removedWorkerSessionIds:pe(N().min(1))});const Xue=["ask","allow","deny"],vH=Ue(Xue),Zue=F({id:N().min(1),desc:N().min(1),action:vH});F({rules:pe(Zue)});F({ruleId:N().min(1)});F({action:vH,desc:N(),source:N().min(1)});const Que=["created","review-requested"],yH=/^[A-Za-z0-9._-]+$/,Tf=N().min(1).regex(yH),Rf=N().min(1).regex(yH),mx=Z().int().positive();F({role:Ue(Que)});F({owner:Tf,repo:Rf,number:mx});F({owner:Tf,repo:Rf,number:mx,expectedHeadSha:N().min(1)});F({owner:Tf,repo:Rf,number:mx,body:N().min(1)});F({owner:Tf,repo:Rf,number:mx,ready:Re()});F({owner:Tf,repo:Rf});F({owner:Tf,repo:Rf,number:mx,reviewers:pe(N().min(1)).min(1)});F({page:Z().int().min(1).max(1e3).optional(),search:N().max(100).optional()});F({personaId:N().min(1)});F({personaId:N().min(1)});const Jue=["expired","cancelled","access_denied","lark_protocol_error","cloud_unreachable","internal_error"],ede=Ue(Jue);F({personaId:N().min(1),appId:N().min(1),appSecret:N().min(1),botName:N().min(1).optional()});const tde=F({chatId:N().min(1),chatName:N().optional(),lastActiveAt:Z().int().optional()}),nde=F({state:Ue(["unbound","provisioning","bound","broken"]),appId:N().optional(),botName:N().optional(),brokenReason:N().optional(),qrUrl:N().optional(),provisionId:N().optional(),errorReason:ede.optional(),groups:pe(tde),needsUpgrade:Re().optional(),upgradeQrUrl:N().optional()});nde.extend({personaId:N().min(1)});F({});F({onboardingCompletedAt:Z()});const Vh=["claude","codex","pi"];F({});F({tools:pe(F({id:Ue(Vh),available:Re(),version:N().optional(),path:N().optional()}))});F({});const rde=F({tool:Ue(Vh),cwd:N(),toolSessionId:N(),label:N().optional(),createdAt:N(),updatedAt:N(),turns:Z()});F({candidates:pe(rde)});F({});F({registered:Re()});const sde=F({kind:Ue(["rpc","file"]),ref:N().min(1).max(300)});F({question:N().min(1).max(500),status:Ue(["unanswered","answered_unverified"]),answer:N().max(4e3).optional(),resolvedBy:Ue(["rpc","source"]).optional(),evidence:pe(sde).max(20).optional(),docsChecked:pe(N().max(200)).max(20).optional(),unansweredReason:Ue(["no_source_access","user_declined","not_found"]).optional()}).superRefine((e,t)=>{var n;e.status==="answered_unverified"?(e.answer||t.addIssue({code:"custom",path:["answer"],message:"answered_unverified 需要 answer"}),e.resolvedBy||t.addIssue({code:"custom",path:["resolvedBy"],message:"answered_unverified 需要 resolvedBy"}),(n=e.evidence)!=null&&n.length||t.addIssue({code:"custom",path:["evidence"],message:"answered_unverified 需要至少一项 evidence"})):e.unansweredReason||t.addIssue({code:"custom",path:["unansweredReason"],message:"unanswered 需要 unansweredReason"})});F({id:N()});F({tool:Ue(Vh)});const T4=F({usedPercent:Z(),windowDurationMins:Z().optional(),resetsAt:Z().optional()}).strict(),ide=Ws("kind",[F({kind:he("claude"),loggedIn:Re(),authMethod:N().optional(),apiProvider:N().optional(),apiKeySource:N().optional(),email:N().optional(),orgName:N().optional(),subscriptionType:N().optional()}).strict(),F({kind:he("codex"),login:Ws("type",[F({type:he("none")}).strict(),F({type:he("apiKey")}).strict(),F({type:he("chatgpt"),email:N(),planType:N()}).strict()]),provider:F({name:N(),baseUrl:N().optional()}).strict(),rateLimits:F({primary:T4.optional(),secondary:T4.optional()}).strict().optional()}).strict(),F({kind:he("pi"),providers:pe(F({id:N(),modelCount:Z(),credential:Ue(["api_key","oauth"]).optional(),oauthExpiresAt:Z().optional()}).strict())}).strict()]);F({tool:Ue(Vh),installed:Re(),version:N().optional(),path:N().optional(),account:ide.optional(),error:N().optional(),modelsLoadedAt:Z().optional()}).strict();const lT="https://cpa-portal-d417.app.clawos.chat";F({apiKey:N().min(1)}).strict();F({ok:he(!0)}).strict();const bH=["cloud-persona-metrics","cloud-persona-conversations","cloud-persona-schedules"],ode=Ue(bH);F({page:ode}).strict();F({url:N(),expiresAt:Z().int()}).strict();const wH=["ready","session:info","session:status","session:event","session:deleted","session:rewound","session:cleared","session:queue","permission:request","session:question","session:question:cleared","pong","error","subscribed","unsubscribed","auth:ok","tunnel:ready","tunnel:exited","tunnel:unavailable","session:control","session:pty","contact:added","contact:pinned","contact:removed","contact:remote-access-updated","contact:note-updated","org-mesh:progress","channel:changed","inbox:event","friend:reverseTokenOffered","auth:login:done","auth:login:failed","larkBot:state"],ade="cloud_history_refresh",cT=["idle","running","running-idle","stopped","error","observing"],lde=["task-notification","slash-command","local-command","system-reminder","skill-hint","meta-text","attachment-skills","attachment-deferred-tools","a2a-task","a2a-result","dispatch-task","dispatch-result"],cde=["a2a-task","a2a-result","dispatch-task","dispatch-result"];function Mw(e){return cde.includes(e??"")}function ude(e,t){return`${t?"dispatch":"a2a"}-${e}`}const dde=["builtin","global","project","plugin"],hde=["builtin","global","project","policy","plugin"],_H=Ue(["owner","guest"]);F({id:N().min(1),kind:_H,displayName:N(),feishuUnionId:N().optional()}).strict();const fde=F({did:N().min(1),displayName:N(),feishuUnionId:N().optional(),principal:_H}).strict(),pde=Ue(cT),mde=F({inputTokens:Z().int().nonnegative(),outputTokens:Z().int().nonnegative(),cacheReadTokens:Z().int().nonnegative().optional(),cacheCreateTokens:Z().int().nonnegative().optional()}),SH={gitBranch:N().optional(),resolvedModel:N().optional(),resolvedEffort:N().optional(),contextUsage:mde.optional(),contextWindowSize:Z().int().positive().optional(),aiLabel:N().optional()},gde=F(SH),kH=F({value:N(),label:N(),description:N().optional()}),xde=F({id:N().min(1),label:N().min(1),description:N().optional(),contextWindowSize:Z().int().positive().optional(),default:Re().optional(),efforts:pe(kH).optional(),defaultEffort:N().optional(),group:N().optional()}),vde=F({id:N().min(1),label:N().min(1),description:N().optional()}),yde=F({name:N().min(1),type:Ue(["string","select","toggle"]),label:N().min(1),description:N().optional(),options:pe(kH).optional(),default:Qa().optional(),scope:Ue(["core","tool-specific"])});F({tool:N().min(1),refresh:Re().optional()});const bde=F({rewind:Re(),subagents:Re(),tui:Re(),observe:Re(),fileSharing:Re(),fork:Re()});F({tool:N().min(1),toolSessionIdLabel:N().optional(),models:pe(xde),permissionModes:pe(vde),configSchema:pe(yde),features:bde});const wde=F({tool:N().min(1),pattern:N().min(1),createdAt:N().min(1).optional()});F({cloudEnvironment:Vs.optional(),cloudExpectedImage:yc.optional(),testReleaseId:N().optional(),sessionId:N().min(1),cloudConversationId:N().min(1).optional(),cloudWorkspace:Iw.optional(),cloudPendingTurns:pe(F({id:N().min(1),text:N(),prepared:Re().optional()})).optional(),cloudBranchIntent:kg.optional(),cwd:N().min(1),tool:he("claude").or(N().min(1)).default("claude"),toolSessionId:N().optional(),label:N().optional(),model:N().optional(),permissionMode:N().optional(),effort:N().optional(),serviceTier:N().optional(),...SH,aiLabelGeneratedAt:N().optional(),permissionRules:pe(wde).optional(),pinnedAt:Z().int().nonnegative().nullable().optional(),archivedAt:Z().int().nonnegative().nullable().optional(),pinSortOrder:Z().int().nullable().optional(),unreadAt:N().min(1).nullable().optional(),iconKey:N().optional(),forkedFromSessionId:N().min(1).optional(),ephemeral:Re().optional(),deployId:N().min(1).optional(),ownerPersonaId:N().min(1).optional(),projectPath:N().min(1).optional(),chatId:N().min(1).optional(),creatorPrincipalId:N().min(1).optional(),creatorDisplayName:N().min(1).optional(),creatorFeishuUnionId:N().min(1).optional(),originOwnerPrincipalId:N().min(1).optional(),originOwnerPersonaId:N().min(1).optional(),dispatchedFromSessionId:N().min(1).optional(),a2aContextId:N().min(1).optional(),shiftFiredFromSessionId:N().min(1).optional(),larkChatId:N().min(1).optional(),larkChatName:N().min(1).optional(),larkChatType:Ue(["p2p","group"]).optional(),createdAt:N().min(1),updatedAt:N().min(1)});const Rs={turnId:N().min(1).optional(),seq:Z().int().nonnegative().optional(),ts:N().optional(),uuid:N().optional()},_de=Ue(lde),Sde=F({readCount:Z().int().nonnegative().optional(),searchCount:Z().int().nonnegative().optional(),bashCount:Z().int().nonnegative().optional(),editFileCount:Z().int().nonnegative().optional(),linesAdded:Z().int().nonnegative().optional(),linesRemoved:Z().int().nonnegative().optional(),otherToolCount:Z().int().nonnegative().optional()}),kde=F({oldStart:Z().int().nonnegative(),oldLines:Z().int().nonnegative(),newStart:Z().int().nonnegative(),newLines:Z().int().nonnegative(),lines:pe(N())}),Cde=F({agentId:N().optional(),agentType:N().optional(),status:N().optional(),prompt:N().optional(),filePath:N().optional(),structuredPatch:pe(kde).optional(),stats:F({durationMs:Z().int().nonnegative().optional(),tokens:Z().int().nonnegative().optional(),toolUseCount:Z().int().nonnegative().optional(),toolStats:Sde.optional()}).optional()}),Nde=F({path:N(),content:N(),mtimeMs:Z().optional()}),jde=F({label:N().min(1),description:N().optional()}),CH=F({question:N().min(1),multiSelect:Re(),options:pe(jde).min(1)}),Ede=["completed","interrupted"];Ws("kind",[F({...Rs,kind:he("session_init"),toolSessionId:N().optional()}),F({...Rs,kind:he("thinking"),text:N(),partialId:N().optional()}),F({...Rs,kind:he("text"),text:N(),partialId:N().optional()}),F({...Rs,kind:he("user_text"),text:N(),meta:_de.optional(),taskId:N().optional(),parentToolUseId:N().optional(),sender:fde.optional()}),F({...Rs,kind:he("tool_call"),toolUseId:N(),tool:N(),toolKind:N().optional(),input:Qa()}),F({...Rs,kind:he("tool_result"),toolUseId:N(),output:Qa().optional(),error:N().optional(),toolResultExtra:Cde.optional(),sourceToolAssistantUUID:N().optional(),askQuestionAnswers:Qi(N(),N()).optional()}),F({...Rs,kind:he("attachment_memories"),memories:pe(Nde)}),F({...Rs,kind:he("permission_request"),requestId:N(),tool:N(),input:Qa(),toolUseId:N().optional()}),F({...Rs,kind:he("ask_user_question"),toolUseId:N(),questions:pe(CH)}),F({...Rs,kind:he("turn_end"),durationMs:Z().int().nonnegative().optional(),reason:Ue(Ede).optional(),turnId:N().min(1).optional()}),F({...Rs,kind:he("subagent_progress"),toolUseId:N(),agentId:N(),status:Ue(["started","running","completed","failed"]),description:N().optional(),lastToolName:N().optional(),prompt:N().optional(),stats:F({durationMs:Z().int().nonnegative().optional(),tokens:Z().int().nonnegative().optional(),toolUseCount:Z().int().nonnegative().optional()}).optional()}),F({...Rs,kind:he("error"),message:N()}),F({...Rs,kind:he("meta_update"),patch:gde}),F({...Rs,kind:he("meta-text"),text:N(),metaSource:Ue(["cc","owner"]).optional()})]);F({cwd:N().min(1).optional(),tool:N().optional(),label:N().optional(),aiLabel:N().optional(),model:N().optional(),permissionMode:N().optional(),effort:N().optional(),serviceTier:G7.optional(),iconKey:N().optional(),forkedFromSessionId:N().min(1).optional(),forkAt:pce([F({messageUuid:N().min(1)}).strict(),F({turnId:N().min(1)}).strict()]).optional(),ephemeral:Re().optional(),ownerPersonaId:N().min(1).optional(),projectPath:N().min(1).optional()}).refine(e=>e.cwd!=null||e.ownerPersonaId!=null||e.projectPath!=null,{message:"cwd / ownerPersonaId / projectPath 至少传一个"});F({path:N().min(1),name:N().min(1),createdAt:N().datetime(),pinnedAt:Z().optional()});F({path:N().min(1),pinnedAt:Z().nullable()});F({path:N().min(1)});F({path:N().min(1).optional(),name:N().min(1).optional()}).refine(e=>e.path!=null||e.name!=null,{message:"path 与 name 至少给一个"});F({cwd:N().min(1),tool:N().min(1),toolSessionId:N().min(1),label:N().optional(),aiLabel:N().optional(),iconKey:N().optional(),createdAt:N().datetime(),updatedAt:N().datetime(),ownerPersonaId:N().min(1).optional()});F({originOnly:Re().optional(),ownerPersonaId:N().min(1).optional(),limit:Z().int().positive().optional(),offset:Z().int().nonnegative().optional()});F({sessionId:N().min(1)});F({sessionId:N().min(1),patch:F({label:N().optional(),tool:N().min(1).optional(),model:N().optional(),permissionMode:N().optional(),effort:N().optional(),cwd:N().optional(),iconKey:N().optional(),ephemeral:he(!1).optional()})});F({id:N().min(1),text:N(),queuedAt:Z(),senderDisplayName:N().optional()});F({sessionId:N().min(1),text:N(),queueWhileRunning:Re().optional()});F({sessionId:N().min(1),id:N().min(1).optional()});F({sessionId:N().min(1),userMessageId:N().min(1),dryRun:Re().optional()});F({canRewind:Re(),error:N().optional(),filesChanged:pe(N()).optional(),insertions:Z().int().nonnegative().optional(),deletions:Z().int().nonnegative().optional()});F({sessionId:N().min(1),userMessageId:N().min(1)});const Ide=F({oldStart:Z().int().nonnegative(),oldLines:Z().int().nonnegative(),newStart:Z().int().nonnegative(),newLines:Z().int().nonnegative(),lines:pe(N())}),Tde=F({filePath:N().min(1),hunks:pe(Ide),insertions:Z().int().nonnegative(),deletions:Z().int().nonnegative(),status:Ue(["modified","added","deleted"]).optional()});F({canRewind:Re(),error:N().optional(),files:pe(Tde),totalInsertions:Z().int().nonnegative(),totalDeletions:Z().int().nonnegative()});F({userMessageIds:pe(N())});F({sessionId:N().min(1),toolSessionId:N().min(1)});F({cwd:N().min(1),toolSessionId:N().min(1),messageUuid:N().min(1).optional(),turnId:N().min(1).optional(),sourceSessionId:N().min(1).optional(),targetCwd:N().min(1).optional()}).refine(e=>!!(e.messageUuid||e.turnId),"messageUuid or turnId required");F({forkedToolSessionId:N().min(1),forkedFilePath:N().min(1)});F({sessionId:N().min(1),toolSessionId:N().min(1),jsonlPath:N().optional()});F({sessionId:N().min(1),afterSeq:Z().int().min(-1)});F({sessionId:N().min(1),permissionRequestId:N().min(1),allow:Re(),permanent:Re().optional(),pattern:N().optional()});F({projectPath:N().min(1)});F({sessionId:N().min(1),limit:Z().int().positive().max(5e3).optional(),offset:Z().int().nonnegative().optional(),snapshotId:N().uuid().optional(),slim:Re().optional(),view:Ue(["turns","items"]).optional(),cursor:N().min(1).max(16384).optional(),turnId:N().min(1).max(256).optional()}).superRefine((e,t)=>{e.view==="items"&&!e.turnId&&t.addIssue({code:_e.custom,path:["turnId"],message:"items requires turnId"}),e.view&&(e.offset!==void 0||e.slim!==void 0)&&t.addIssue({code:_e.custom,message:"native views do not accept offset or slim"}),!e.view&&(e.cursor!==void 0||e.turnId!==void 0)&&t.addIssue({code:_e.custom,message:"cursor and turnId require a native view"}),e.view==="turns"&&e.turnId!==void 0&&t.addIssue({code:_e.custom,path:["turnId"],message:"turns does not accept turnId"}),e.view&&e.limit!==void 0&&e.limit>100&&t.addIssue({code:_e.custom,path:["limit"],message:"native page limit is 100"})});F({cwd:N().min(1),toolSessionId:N().min(1)});F({cwd:N().min(1),toolSessionId:N().min(1),subagentId:N().min(1)});F({cwd:N().min(1).optional(),path:N().optional(),showHidden:Re().optional()});F({cwd:N().min(1),path:N().min(1)});F({cwd:N().min(1),tool:N().optional()});F({name:N().min(1),source:Ue(dde),path:N().optional(),description:N().optional(),plugin:N().optional()});const Rde=F({name:N().min(1),source:Ue(hde),path:N().optional(),description:N().optional(),whenToUse:N().optional(),plugin:N().optional()});F({cwd:N().min(1),tool:N().optional()});F({agents:pe(Rde)});F({sessionId:N().optional()});F({sessionId:N().min(1).optional()});F({sessionId:N().min(1),pinned:Re()});F({sessionId:N().min(1),archived:Re()});F({query:N().min(1),sessionIds:pe(N().min(1)),limit:Z().int().positive().max(50).optional()});const Mde=F({sessionId:N().min(1),snippet:N()});F({type:he("session:searchContent"),matches:pe(Mde)});F({type:he("peerSession:upsert:ok")});F({sessionId:N().min(1)});F({type:he("peerSession:remove:ok")});F({orderedIds:pe(N().min(1)).min(1)});F({cwd:N().min(1)});F({isGitRoot:Re(),gitRoot:N().nullable()});F({cwd:N().min(1)});F({branch:N().nullable()});F({cwd:N().min(1)});F({branches:pe(N()),head:N().nullable()});const Pde=F({cwd:N().min(1),updatedAt:N().min(1)});F({dirs:pe(Pde)});F({type:he("session:question"),sessionId:N().min(1),toolUseId:N().min(1),requestId:N().min(1),questions:pe(CH).min(1)});F({type:he("session:question:cleared"),sessionId:N().min(1),toolUseId:N().min(1),answers:Qi(N(),N()).optional()});F({sessionId:N().min(1),toolUseId:N().min(1),answers:Qi(N(),N())});F({ok:he(!0)});F({sessionId:N().min(1),toolUseId:N().min(1)});F({ok:he(!0)});const NH=F({name:N().min(1),version:N().min(1),instanceId:N().min(1),deviceLabel:N().transform(e=>e.trim().slice(0,64)).optional()});F({type:he("auth"),token:N().min(1),scheme:he("bearer").optional(),clientInfo:NH.optional()});F({type:he("auth:ok"),version:N().min(1).optional(),protocolVersion:Z().int().nonnegative().optional()});const Ade=F({clientId:N().min(1),connectedAt:Z().int().nonnegative(),self:Re(),clientInfo:NH.optional()});F({type:he("device:connections:ok"),connections:pe(Ade)});F({type:he("tunnel:ready"),url:N().min(1),subdomain:N().min(1)});F({type:he("tunnel:exited"),code:Z().int().nullable(),subdomain:N().nullable(),url:N().nullable()});F({type:he("tunnel:unavailable"),reason:N().min(1),failedAt:N().min(1)});const Ode=F({sessionId:N().min(1),status:pde,freshSpawn:Re(),pendingPermissionRequestIds:pe(N().min(1)),pendingQuestionToolUseIds:pe(N().min(1))});F({type:he("info"),version:N(),protocolVersion:Z(),hostname:N(),os:N(),tools:pe(F({id:N(),available:Re()})),runningSessions:pe(Ode),tokenRole:Ue(bce).optional(),isLoopback:Re().optional(),httpBaseUrl:N().optional(),httpToken:N().optional(),daemonSource:Ue(["ota","packaged"]).optional(),globalCliVersion:N().nullable().optional()});F({});F({method:N().min(1).optional()});const Dde=["allowed","conditional","denied"],$de=Ue(Dde),Lde=F({name:N().min(1),status:$de,description:N().min(1),args:pe(F({name:N(),required:Re()})).nullable(),argsSchema:Qi(Qa()).optional(),reason:N().optional()});F({type:he("meta:methods"),methods:pe(Lde)});const R4=1,Bde=F({usedBytes:Z().int().nonnegative(),sizeBytes:Z().int().positive(),measuredAt:Z().int().nonnegative()}).strict();F({volume:Bde.nullable()}).strict();const M4=25*1024*1024,uT={".png":"image/png",".jpg":"image/jpeg",".jpeg":"image/jpeg",".gif":"image/gif",".webp":"image/webp",".pdf":"application/pdf",".txt":"text/plain",".md":"text/plain",".markdown":"text/plain",".csv":"text/plain",".log":"text/plain",".json":"application/json",".xml":"application/xml",".yaml":"application/yaml",".yml":"application/yaml",".html":"text/html",".conf":"text/plain",".cfg":"text/plain",".ini":"text/plain",".toml":"text/plain"},jH=new Set([...Object.values(uT),"application/x-yaml"]),EH=[...jH,"text/*",...Object.keys(uT)].join(",");function IH(e,t){const n=t.split(";",1)[0].trim().toLowerCase();if(n===""||n==="application/octet-stream"){const r=e.lastIndexOf("."),s=r>0?e.slice(r).toLowerCase():"";return uT[s]??null}return jH.has(n)||n.startsWith("text/")?n:null}const Fde=["daemon","main","renderer"],zde=Ue(Fde),Hde=["debug","info","warn","error"],Ude=Ue(Hde);F({ts:Z().int(),source:zde,level:Ude,msg:N(),ownerPrincipalId:N(),deviceId:N(),appVersion:N(),daemonVersion:N().optional(),os:N(),meta_json:N().optional(),sessionId:N().optional()});F({v:he(1),visitorId:N().min(1),displayName:N(),provider:N(),iat:Z(),exp:Z()});const Wde=F({visitorId:N(),displayName:N(),avatarUrl:N().optional(),provider:N(),firstSeen:Z(),lastSeen:Z()});F({visitors:pe(Wde)});F({type:he("web:open"),url:N().min(1),expiresAt:Z()});F({ticket:N().min(1)}).strict();F({token:N().min(1),expiresAt:Z()});const Vde=/<system-reminder>此消息来自飞书群成员 (.+?)<\/system-reminder>\s*$/,TH=/<system-reminder>此消息来自 (owner|guest):(.+?)<\/system-reminder>\s*$/,qde="clawd-a2a-task",Kde="clawd-a2a-result",Gde="clawd-dispatch-task",Yde="clawd-dispatch-result",Xde=["completed","failed","input_required","canceled","rejected"],P4=120,RH=[{tag:qde,kind:"task",legacy:!1},{tag:Kde,kind:"result",legacy:!1},{tag:Gde,kind:"task",legacy:!0},{tag:Yde,kind:"result",legacy:!0}];function Zde(e){if(!e)return null;let t=null;for(const n of RH){const r=e.search(ohe(n.tag));r>=0&&(t===null||r<t.at)&&(t={at:r,kind:n.kind,legacy:n.legacy})}return t?{kind:t.kind,legacy:t.legacy}:null}function Qde(e){if(!e)return[];const t=[];for(const n of RH){const r=new RegExp(`<${n.tag}\\b([^>]*)>([\\s\\S]*?)</${n.tag}>`,"gi");for(let s=r.exec(e);s!==null;s=r.exec(e))t.push({at:s.index,block:Jde(n.kind,n.legacy,s[1]??"",s[2]??"")})}return t.sort((n,r)=>n.at-r.at).map(n=>n.block)}function Jde(e,t,n,r){var h;const s=ahe(n),i=fj(ihe(Rk(r,"detail")??r)),o=(h=Rk(r,"brief"))==null?void 0:h.trim(),l=o&&o.length>0?fj(o):ehe(i),c=s.round!==void 0?Number.parseInt(s.round,10):void 0,u=s.status,d=t?u==="success"?"completed":u==="failure"?"failed":void 0:Xde.find(p=>p===u);return{kind:e,contextId:(t?s["dispatch-id"]:s["context-id"])??"",...!t&&s["task-id"]?{taskId:s["task-id"]}:{},...s.from?{from:s.from}:{},...e==="task"&&c!==void 0&&Number.isFinite(c)?{round:c}:{},...e==="result"&&d?{status:d}:{},brief:l,briefIsDerived:!(o&&o.length>0),detail:i,filePaths:she(Rk(r,"files")),legacy:t}}function ehe(e){const t=e.split(/\n\s*\n/).map(r=>r.trim()).find(r=>r.length>0);if(!t)return"";const n=t.replace(/\s+/g," ");return n.length>P4?`${n.slice(0,P4)}…`:n}const the="clawd-a2a-task|clawd-a2a-result|clawd-dispatch-task|clawd-dispatch-result|brief|detail|files",nhe=new RegExp(`<\\\\(\\\\*)(/?)(${the})\\b`,"g");function rhe(e){return fj(e)}function fj(e){return e.replace(nhe,"<$1$2$3")}function Rk(e,t){const n=new RegExp(`<${t}>([\\s\\S]*?)</${t}>`,"i").exec(e);return n?n[1]??"":null}function she(e){return e?e.split(`
95
+ `,boxShadowTabsOverflowLeft:"inset 10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowRight:"inset -10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowTop:"inset 0 10px 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowBottom:"inset 0 -10px 8px -8px rgba(0, 0, 0, 0.08)"}),r)}var a4=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(e);s<r.length;s++)t.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(n[r[s]]=e[r[s]]);return n};const Xae={lineHeight:!0,lineHeightSM:!0,lineHeightLG:!0,lineHeightHeading1:!0,lineHeightHeading2:!0,lineHeightHeading3:!0,lineHeightHeading4:!0,lineHeightHeading5:!0,opacityLoading:!0,fontWeightStrong:!0,zIndexPopupBase:!0,zIndexBase:!0,opacityImage:!0},Zae={motionBase:!0,motionUnit:!0},Qae={screenXS:!0,screenXSMin:!0,screenXSMax:!0,screenSM:!0,screenSMMin:!0,screenSMMax:!0,screenMD:!0,screenMDMin:!0,screenMDMax:!0,screenLG:!0,screenLGMin:!0,screenLGMax:!0,screenXL:!0,screenXLMin:!0,screenXLMax:!0,screenXXL:!0,screenXXLMin:!0},d7=(e,t,n)=>{const r=n.getDerivativeToken(e),{override:s}=t,i=a4(t,["override"]);let o=Object.assign(Object.assign({},r),{override:s});return o=u7(o),i&&Object.entries(i).forEach(([l,c])=>{const{theme:u}=c,d=a4(c,["theme"]);let h=d;u&&(h=d7(Object.assign(Object.assign({},o),d),{override:d},u)),o[l]=h}),o};function h7(){const{token:e,hashed:t,theme:n,override:r,cssVar:s}=K.useContext(l7),i=`${Gae}-${t||""}`,o=n||a7,[l,c,u]=Boe(o,[bg,e],{salt:i,override:r,getComputedToken:d7,formatToken:u7,cssVar:s&&{prefix:s.prefix,key:s.key,unitless:Xae,ignore:Zae,preserve:Qae}});return[o,u,t?c:"",l,s]}const Jae=()=>({display:"inline-flex",alignItems:"center",color:"inherit",fontStyle:"normal",lineHeight:0,textAlign:"center",textTransform:"none",verticalAlign:"-0.125em",textRendering:"optimizeLegibility","-webkit-font-smoothing":"antialiased","-moz-osx-font-smoothing":"grayscale","> *":{lineHeight:1},svg:{display:"inline-block"}}),ele=e=>({[`.${e}`]:Object.assign(Object.assign({},Jae()),{[`.${e} .${e}-icon`]:{display:"block"}})}),tle=(e,t)=>{const[n,r]=h7();return fae({token:r,hashId:"",path:["ant-design-icons",e],nonce:()=>t==null?void 0:t.nonce,layer:{name:"antd"}},()=>ele(e))},nle=Object.assign({},Cf),{useId:l4}=nle,rle=()=>"",sle=typeof l4>"u"?rle:l4;function ile(e,t,n){var r;const s=e||{},i=s.inherit===!1||!t?Object.assign(Object.assign({},Ib),{hashed:(r=t==null?void 0:t.hashed)!==null&&r!==void 0?r:Ib.hashed,cssVar:t==null?void 0:t.cssVar}):t,o=sle();return R9(()=>{var l,c;if(!e)return t;const u=Object.assign({},i.components);Object.keys(e.components||{}).forEach(p=>{u[p]=Object.assign(Object.assign({},u[p]),e.components[p])});const d=`css-var-${o.replace(/:/g,"")}`,h=((l=s.cssVar)!==null&&l!==void 0?l:i.cssVar)&&Object.assign(Object.assign(Object.assign({prefix:n==null?void 0:n.prefixCls},typeof i.cssVar=="object"?i.cssVar:{}),typeof s.cssVar=="object"?s.cssVar:{}),{key:typeof s.cssVar=="object"&&((c=s.cssVar)===null||c===void 0?void 0:c.key)||d});return Object.assign(Object.assign(Object.assign({},i),s),{token:Object.assign(Object.assign({},i.token),s.token),components:u,cssVar:h})},[s,i],(l,c)=>l.some((u,d)=>{const h=c[d];return!foe(u,h,!0)}))}var ole=["children"],f7=f.createContext({});function ale(e){var t=e.children,n=hi(e,ole);return f.createElement(f7.Provider,{value:n},t)}var lle=function(e){Pr(n,e);var t=A9(n);function n(){return Mn(this,n),t.apply(this,arguments)}return Pn(n,[{key:"render",value:function(){return this.props.children}}]),n}(f.Component);function cle(e){var t=f.useReducer(function(l){return l+1},0),n=kt(t,2),r=n[1],s=f.useRef(e),i=XN(function(){return s.current}),o=XN(function(l){s.current=typeof l=="function"?l(s.current):l,r()});return[i,o]}var $l="none",s0="appear",i0="enter",o0="leave",c4="none",mo="prepare",lh="start",ch="active",L5="end",p7="prepared";function u4(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit".concat(e)]="webkit".concat(t),n["Moz".concat(e)]="moz".concat(t),n["ms".concat(e)]="MS".concat(t),n["O".concat(e)]="o".concat(t.toLowerCase()),n}function ule(e,t){var n={animationend:u4("Animation","AnimationEnd"),transitionend:u4("Transition","TransitionEnd")};return e&&("AnimationEvent"in t||delete n.animationend.animation,"TransitionEvent"in t||delete n.transitionend.transition),n}var dle=ule(fl(),typeof window<"u"?window:{}),m7={};if(fl()){var hle=document.createElement("div");m7=hle.style}var a0={};function g7(e){if(a0[e])return a0[e];var t=dle[e];if(t)for(var n=Object.keys(t),r=n.length,s=0;s<r;s+=1){var i=n[s];if(Object.prototype.hasOwnProperty.call(t,i)&&i in m7)return a0[e]=t[i],a0[e]}return""}var x7=g7("animationend"),v7=g7("transitionend"),y7=!!(x7&&v7),d4=x7||"animationend",h4=v7||"transitionend";function f4(e,t){if(!e)return null;if(Rn(e)==="object"){var n=t.replace(/-\w/g,function(r){return r[1].toUpperCase()});return e[n]}return"".concat(e,"-").concat(t)}const fle=function(e){var t=f.useRef();function n(s){s&&(s.removeEventListener(h4,e),s.removeEventListener(d4,e))}function r(s){t.current&&t.current!==s&&n(t.current),s&&s!==t.current&&(s.addEventListener(h4,e),s.addEventListener(d4,e),t.current=s)}return f.useEffect(function(){return function(){n(t.current)}},[]),[r,n]};var b7=fl()?f.useLayoutEffect:f.useEffect;const ple=function(){var e=f.useRef(null);function t(){jN.cancel(e.current)}function n(r){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;t();var i=jN(function(){s<=1?r({isCanceled:function(){return i!==e.current}}):n(r,s-1)});e.current=i}return f.useEffect(function(){return function(){t()}},[]),[n,t]};var mle=[mo,lh,ch,L5],gle=[mo,p7],w7=!1,xle=!0;function _7(e){return e===ch||e===L5}const vle=function(e,t,n){var r=ZN(c4),s=kt(r,2),i=s[0],o=s[1],l=ple(),c=kt(l,2),u=c[0],d=c[1];function h(){o(mo,!0)}var p=t?gle:mle;return b7(function(){if(i!==c4&&i!==L5){var m=p.indexOf(i),g=p[m+1],x=n(i);x===w7?o(g,!0):g&&u(function(b){function y(){b.isCanceled()||o(g,!0)}x===!0?y():Promise.resolve(x).then(y)})}},[e,i]),f.useEffect(function(){return function(){d()}},[]),[h,i]};function yle(e,t,n,r){var s=r.motionEnter,i=s===void 0?!0:s,o=r.motionAppear,l=o===void 0?!0:o,c=r.motionLeave,u=c===void 0?!0:c,d=r.motionDeadline,h=r.motionLeaveImmediately,p=r.onAppearPrepare,m=r.onEnterPrepare,g=r.onLeavePrepare,x=r.onAppearStart,b=r.onEnterStart,y=r.onLeaveStart,v=r.onAppearActive,w=r.onEnterActive,_=r.onLeaveActive,S=r.onAppearEnd,k=r.onEnterEnd,C=r.onLeaveEnd,j=r.onVisibleChanged,I=ZN(),E=kt(I,2),R=E[0],P=E[1],M=cle($l),$=kt(M,2),B=$[0],z=$[1],W=ZN(null),L=kt(W,2),A=L[0],T=L[1],q=B(),H=f.useRef(!1),O=f.useRef(null);function V(){return n()}var X=f.useRef(!1);function Y(){z($l),T(null,!0)}var te=XN(function(Be){var De=B();if(De!==$l){var et=V();if(!(Be&&!Be.deadline&&Be.target!==et)){var at=X.current,bt;De===s0&&at?bt=S==null?void 0:S(et,Be):De===i0&&at?bt=k==null?void 0:k(et,Be):De===o0&&at&&(bt=C==null?void 0:C(et,Be)),at&&bt!==!1&&Y()}}}),ue=fle(te),ee=kt(ue,1),ce=ee[0],Se=function(De){switch(De){case s0:return Xe(Xe(Xe({},mo,p),lh,x),ch,v);case i0:return Xe(Xe(Xe({},mo,m),lh,b),ch,w);case o0:return Xe(Xe(Xe({},mo,g),lh,y),ch,_);default:return{}}},se=f.useMemo(function(){return Se(q)},[q]),le=vle(q,!e,function(Be){if(Be===mo){var De=se[mo];return De?De(V()):w7}if(xe in se){var et;T(((et=se[xe])===null||et===void 0?void 0:et.call(se,V(),null))||null)}return xe===ch&&q!==$l&&(ce(V()),d>0&&(clearTimeout(O.current),O.current=setTimeout(function(){te({deadline:!0})},d))),xe===p7&&Y(),xle}),ne=kt(le,2),J=ne[0],xe=ne[1],Oe=_7(xe);X.current=Oe;var Ke=f.useRef(null);b7(function(){if(!(H.current&&Ke.current===t)){P(t);var Be=H.current;H.current=!0;var De;!Be&&t&&l&&(De=s0),Be&&t&&i&&(De=i0),(Be&&!t&&u||!Be&&h&&!t&&u)&&(De=o0);var et=Se(De);De&&(e||et[mo])?(z(De),J()):z($l),Ke.current=t}},[t]),f.useEffect(function(){(q===s0&&!l||q===i0&&!i||q===o0&&!u)&&z($l)},[l,i,u]),f.useEffect(function(){return function(){H.current=!1,clearTimeout(O.current)}},[]);var me=f.useRef(!1);f.useEffect(function(){R&&(me.current=!0),R!==void 0&&q===$l&&((me.current||R)&&(j==null||j(R)),me.current=!0)},[R,q]);var je=A;return se[mo]&&xe===lh&&(je=At({transition:"none"},je)),[q,xe,je,R??t]}function ble(e){var t=e;Rn(e)==="object"&&(t=e.transitionSupport);function n(s,i){return!!(s.motionName&&t&&i!==!1)}var r=f.forwardRef(function(s,i){var o=s.visible,l=o===void 0?!0:o,c=s.removeOnLeave,u=c===void 0?!0:c,d=s.forceRender,h=s.children,p=s.motionName,m=s.leavedClassName,g=s.eventProps,x=f.useContext(f7),b=x.motion,y=n(s,b),v=f.useRef(),w=f.useRef();function _(){try{return v.current instanceof HTMLElement?v.current:Qie(w.current)}catch{return null}}var S=yle(y,l,_,s),k=kt(S,4),C=k[0],j=k[1],I=k[2],E=k[3],R=f.useRef(E);E&&(R.current=!0);var P=f.useCallback(function(L){v.current=L,noe(i,L)},[i]),M,$=At(At({},g),{},{visible:l});if(!h)M=null;else if(C===$l)E?M=h(At({},$),P):!u&&R.current&&m?M=h(At(At({},$),{},{className:m}),P):d||!u&&!m?M=h(At(At({},$),{},{style:{display:"none"}}),P):M=null;else{var B;j===mo?B="prepare":_7(j)?B="active":j===lh&&(B="start");var z=f4(p,"".concat(C,"-").concat(B));M=h(At(At({},$),{},{className:Fie(f4(p,C),Xe(Xe({},z,z&&B),p,typeof p=="string")),style:I}),P)}if(f.isValidElement(M)&&roe(M)){var W=soe(M);W||(M=f.cloneElement(M,{ref:P}))}return f.createElement(lle,{ref:w},M)});return r.displayName="CSSMotion",r}const wle=ble(y7);var QN="add",JN="keep",ej="remove",jk="removed";function _le(e){var t;return e&&Rn(e)==="object"&&"key"in e?t=e:t={key:e},At(At({},t),{},{key:String(t.key)})}function tj(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return e.map(_le)}function Sle(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=[],r=0,s=t.length,i=tj(e),o=tj(t);i.forEach(function(u){for(var d=!1,h=r;h<s;h+=1){var p=o[h];if(p.key===u.key){r<h&&(n=n.concat(o.slice(r,h).map(function(m){return At(At({},m),{},{status:QN})})),r=h),n.push(At(At({},p),{},{status:JN})),r+=1,d=!0;break}}d||n.push(At(At({},u),{},{status:ej}))}),r<s&&(n=n.concat(o.slice(r).map(function(u){return At(At({},u),{},{status:QN})})));var l={};n.forEach(function(u){var d=u.key;l[d]=(l[d]||0)+1});var c=Object.keys(l).filter(function(u){return l[u]>1});return c.forEach(function(u){n=n.filter(function(d){var h=d.key,p=d.status;return h!==u||p!==ej}),n.forEach(function(d){d.key===u&&(d.status=JN)})}),n}var kle=["component","children","onVisibleChanged","onAllRemoved"],Cle=["status"],Nle=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearPrepare","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function jle(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:wle,n=function(r){Pr(i,r);var s=A9(i);function i(){var o;Mn(this,i);for(var l=arguments.length,c=new Array(l),u=0;u<l;u++)c[u]=arguments[u];return o=s.call.apply(s,[this].concat(c)),Xe(CN(o),"state",{keyEntities:[]}),Xe(CN(o),"removeKey",function(d){o.setState(function(h){var p=h.keyEntities.map(function(m){return m.key!==d?m:At(At({},m),{},{status:jk})});return{keyEntities:p}},function(){var h=o.state.keyEntities,p=h.filter(function(m){var g=m.status;return g!==jk}).length;p===0&&o.props.onAllRemoved&&o.props.onAllRemoved()})}),o}return Pn(i,[{key:"render",value:function(){var l=this,c=this.state.keyEntities,u=this.props,d=u.component,h=u.children,p=u.onVisibleChanged;u.onAllRemoved;var m=hi(u,kle),g=d||f.Fragment,x={};return Nle.forEach(function(b){x[b]=m[b],delete m[b]}),delete m.keys,f.createElement(g,m,c.map(function(b,y){var v=b.status,w=hi(b,Cle),_=v===QN||v===JN;return f.createElement(t,St({},x,{key:w.key,visible:_,eventProps:w,onVisibleChanged:function(k){p==null||p(k,{key:w.key}),k||l.removeKey(w.key)}}),function(S,k){return h(At(At({},S),{},{index:y}),k)})}))}}],[{key:"getDerivedStateFromProps",value:function(l,c){var u=l.keys,d=c.keyEntities,h=tj(u),p=Sle(d,h);return{keyEntities:p.filter(function(m){var g=d.find(function(x){var b=x.key;return m.key===b});return!(g&&g.status===jk&&m.status===ej)})}}}]),i}(f.Component);return Xe(n,"defaultProps",{component:"div"}),n}jle(y7);const p4=f.createContext(!0);function Ele(e){const t=f.useContext(p4),{children:n}=e,[,r]=h7(),{motion:s}=r,i=f.useRef(!1);return i.current||(i.current=t!==s),i.current?f.createElement(p4.Provider,{value:s},f.createElement(ale,{motion:s},n)):n}const Ile=()=>null;var Tle=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(e);s<r.length;s++)t.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(n[r[s]]=e[r[s]]);return n};const Rle=["getTargetContainer","getPopupContainer","renderEmpty","input","pagination","form","select","button"];let S7;function Mle(){return S7||GN}function Ple(e){return Object.keys(e).some(t=>t.endsWith("Color"))}const Ale=e=>{const{prefixCls:t,iconPrefixCls:n,theme:r,holderRender:s}=e;t!==void 0&&(S7=t),r&&Ple(r)&&Hae(Mle(),r)},Ole=e=>{const{children:t,csp:n,autoInsertSpaceInButton:r,alert:s,anchor:i,form:o,locale:l,componentSize:c,direction:u,space:d,splitter:h,virtual:p,dropdownMatchSelectWidth:m,popupMatchSelectWidth:g,popupOverflow:x,legacyLocale:b,parentContext:y,iconPrefixCls:v,theme:w,componentDisabled:_,segmented:S,statistic:k,spin:C,calendar:j,carousel:I,cascader:E,collapse:R,typography:P,checkbox:M,descriptions:$,divider:B,drawer:z,skeleton:W,steps:L,image:A,layout:T,list:q,mentions:H,modal:O,progress:V,result:X,slider:Y,breadcrumb:te,menu:ue,pagination:ee,input:ce,textArea:Se,empty:se,badge:le,radio:ne,rate:J,switch:xe,transfer:Oe,avatar:Ke,message:me,tag:je,table:Be,card:De,tabs:et,timeline:at,timePicker:bt,upload:oe,notification:fe,tree:ye,colorPicker:ke,datePicker:tt,rangePicker:ut,flex:Ot,wave:nn,dropdown:We,warning:Ie,tour:Pe,tooltip:lt,popover:jt,popconfirm:rn,floatButton:be,floatButtonGroup:ae,variant:Ee,inputNumber:it,treeSelect:dt}=e,ft=f.useCallback((Et,Vt)=>{const{prefixCls:Kn}=e;if(Vt)return Vt;const rr=Kn||y.getPrefixCls("");return Et?`${rr}-${Et}`:rr},[y.getPrefixCls,e.prefixCls]),Tt=v||y.iconPrefixCls||c7,sn=n||y.csp;tle(Tt,sn);const Jt=ile(w,y.theme,{prefixCls:ft("")}),vn={csp:sn,autoInsertSpaceInButton:r,alert:s,anchor:i,locale:l||b,direction:u,space:d,splitter:h,virtual:p,popupMatchSelectWidth:g??m,popupOverflow:x,getPrefixCls:ft,iconPrefixCls:Tt,theme:Jt,segmented:S,statistic:k,spin:C,calendar:j,carousel:I,cascader:E,collapse:R,typography:P,checkbox:M,descriptions:$,divider:B,drawer:z,skeleton:W,steps:L,image:A,input:ce,textArea:Se,layout:T,list:q,mentions:H,modal:O,progress:V,result:X,slider:Y,breadcrumb:te,menu:ue,pagination:ee,empty:se,badge:le,radio:ne,rate:J,switch:xe,transfer:Oe,avatar:Ke,message:me,tag:je,table:Be,card:De,tabs:et,timeline:at,timePicker:bt,upload:oe,notification:fe,tree:ye,colorPicker:ke,datePicker:tt,rangePicker:ut,flex:Ot,wave:nn,dropdown:We,warning:Ie,tour:Pe,tooltip:lt,popover:jt,popconfirm:rn,floatButton:be,floatButtonGroup:ae,variant:Ee,inputNumber:it,treeSelect:dt},Dt=Object.assign({},y);Object.keys(vn).forEach(Et=>{vn[Et]!==void 0&&(Dt[Et]=vn[Et])}),Rle.forEach(Et=>{const Vt=e[Et];Vt&&(Dt[Et]=Vt)}),typeof r<"u"&&(Dt.button=Object.assign({autoInsertSpace:r},Dt.button));const gn=R9(()=>Dt,Dt,(Et,Vt)=>{const Kn=Object.keys(Et),rr=Object.keys(Vt);return Kn.length!==rr.length||Kn.some(fs=>Et[fs]!==Vt[fs])}),{layer:Sn}=f.useContext(kw),yn=f.useMemo(()=>({prefixCls:Tt,csp:sn,layer:Sn?"antd":void 0}),[Tt,sn,Sn]);let Ht=f.createElement(f.Fragment,null,f.createElement(Ile,{dropdownMatchSelectWidth:m}),t);const we=f.useMemo(()=>{var Et,Vt,Kn,rr;return bae(((Et=jw.Form)===null||Et===void 0?void 0:Et.defaultValidateMessages)||{},((Kn=(Vt=gn.locale)===null||Vt===void 0?void 0:Vt.Form)===null||Kn===void 0?void 0:Kn.defaultValidateMessages)||{},((rr=gn.form)===null||rr===void 0?void 0:rr.validateMessages)||{},(o==null?void 0:o.validateMessages)||{})},[gn,o==null?void 0:o.validateMessages]);Object.keys(we).length>0&&(Ht=f.createElement(_ae.Provider,{value:we},Ht)),l&&(Ht=f.createElement(Cae,{locale:l,_ANT_MARK__:kae},Ht)),Ht=f.createElement(xae.Provider,{value:yn},Ht),c&&(Ht=f.createElement(Wae,{size:c},Ht)),Ht=f.createElement(Ele,null,Ht);const _t=f.useMemo(()=>{const Et=Jt||{},{algorithm:Vt,token:Kn,components:rr,cssVar:fs}=Et,Ts=Tle(Et,["algorithm","token","components","cssVar"]),ps=Vt&&(!Array.isArray(Vt)||Vt.length>0)?TN(Vt):a7,$o={};Object.entries(rr||{}).forEach(([Bo,ki])=>{const Zr=Object.assign({},ki);"algorithm"in Zr&&(Zr.algorithm===!0?Zr.theme=ps:(Array.isArray(Zr.algorithm)||typeof Zr.algorithm=="function")&&(Zr.theme=TN(Zr.algorithm)),delete Zr.algorithm),$o[Bo]=Zr});const Lo=Object.assign(Object.assign({},bg),Kn);return Object.assign(Object.assign({},Ts),{theme:ps,token:Lo,components:$o,override:Object.assign({override:Lo},$o),cssVar:fs})},[Jt]);return w&&(Ht=f.createElement(l7.Provider,{value:_t},Ht)),gn.warning&&(Ht=f.createElement(wae.Provider,{value:gn.warning},Ht)),_!==void 0&&(Ht=f.createElement(Uae,{disabled:_},Ht)),f.createElement(Ew.Provider,{value:gn},Ht)},If=e=>{const t=f.useContext(Ew),n=f.useContext(r7);return f.createElement(Ole,Object.assign({parentContext:t,legacyLocale:n},e))};If.ConfigContext=Ew;If.SizeContext=wg;If.config=Ale;If.useConfig=Vae;Object.defineProperty(If,"SizeContext",{get:()=>wg});var k7={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(zr,function(){var n=1e3,r=6e4,s=36e5,i="millisecond",o="second",l="minute",c="hour",u="day",d="week",h="month",p="quarter",m="year",g="date",x="Invalid Date",b=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,v={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function($){var B=["th","st","nd","rd"],z=$%100;return"["+$+(B[(z-20)%10]||B[z]||B[0])+"]"}},w=function($,B,z){var W=String($);return!W||W.length>=B?$:""+Array(B+1-W.length).join(z)+$},_={s:w,z:function($){var B=-$.utcOffset(),z=Math.abs(B),W=Math.floor(z/60),L=z%60;return(B<=0?"+":"-")+w(W,2,"0")+":"+w(L,2,"0")},m:function $(B,z){if(B.date()<z.date())return-$(z,B);var W=12*(z.year()-B.year())+(z.month()-B.month()),L=B.clone().add(W,h),A=z-L<0,T=B.clone().add(W+(A?-1:1),h);return+(-(W+(z-L)/(A?L-T:T-L))||0)},a:function($){return $<0?Math.ceil($)||0:Math.floor($)},p:function($){return{M:h,y:m,w:d,d:u,D:g,h:c,m:l,s:o,ms:i,Q:p}[$]||String($||"").toLowerCase().replace(/s$/,"")},u:function($){return $===void 0}},S="en",k={};k[S]=v;var C="$isDayjsObject",j=function($){return $ instanceof P||!(!$||!$[C])},I=function $(B,z,W){var L;if(!B)return S;if(typeof B=="string"){var A=B.toLowerCase();k[A]&&(L=A),z&&(k[A]=z,L=A);var T=B.split("-");if(!L&&T.length>1)return $(T[0])}else{var q=B.name;k[q]=B,L=q}return!W&&L&&(S=L),L||!W&&S},E=function($,B){if(j($))return $.clone();var z=typeof B=="object"?B:{};return z.date=$,z.args=arguments,new P(z)},R=_;R.l=I,R.i=j,R.w=function($,B){return E($,{locale:B.$L,utc:B.$u,x:B.$x,$offset:B.$offset})};var P=function(){function $(z){this.$L=I(z.locale,null,!0),this.parse(z),this.$x=this.$x||z.x||{},this[C]=!0}var B=$.prototype;return B.parse=function(z){this.$d=function(W){var L=W.date,A=W.utc;if(L===null)return new Date(NaN);if(R.u(L))return new Date;if(L instanceof Date)return new Date(L);if(typeof L=="string"&&!/Z$/i.test(L)){var T=L.match(b);if(T){var q=T[2]-1||0,H=(T[7]||"0").substring(0,3);return A?new Date(Date.UTC(T[1],q,T[3]||1,T[4]||0,T[5]||0,T[6]||0,H)):new Date(T[1],q,T[3]||1,T[4]||0,T[5]||0,T[6]||0,H)}}return new Date(L)}(z),this.init()},B.init=function(){var z=this.$d;this.$y=z.getFullYear(),this.$M=z.getMonth(),this.$D=z.getDate(),this.$W=z.getDay(),this.$H=z.getHours(),this.$m=z.getMinutes(),this.$s=z.getSeconds(),this.$ms=z.getMilliseconds()},B.$utils=function(){return R},B.isValid=function(){return this.$d.toString()!==x},B.isSame=function(z,W){var L=E(z);return this.startOf(W)<=L&&L<=this.endOf(W)},B.isAfter=function(z,W){return E(z)<this.startOf(W)},B.isBefore=function(z,W){return this.endOf(W)<E(z)},B.$g=function(z,W,L){return R.u(z)?this[W]:this.set(L,z)},B.unix=function(){return Math.floor(this.valueOf()/1e3)},B.valueOf=function(){return this.$d.getTime()},B.startOf=function(z,W){var L=this,A=!!R.u(W)||W,T=R.p(z),q=function(ee,ce){var Se=R.w(L.$u?Date.UTC(L.$y,ce,ee):new Date(L.$y,ce,ee),L);return A?Se:Se.endOf(u)},H=function(ee,ce){return R.w(L.toDate()[ee].apply(L.toDate("s"),(A?[0,0,0,0]:[23,59,59,999]).slice(ce)),L)},O=this.$W,V=this.$M,X=this.$D,Y="set"+(this.$u?"UTC":"");switch(T){case m:return A?q(1,0):q(31,11);case h:return A?q(1,V):q(0,V+1);case d:var te=this.$locale().weekStart||0,ue=(O<te?O+7:O)-te;return q(A?X-ue:X+(6-ue),V);case u:case g:return H(Y+"Hours",0);case c:return H(Y+"Minutes",1);case l:return H(Y+"Seconds",2);case o:return H(Y+"Milliseconds",3);default:return this.clone()}},B.endOf=function(z){return this.startOf(z,!1)},B.$set=function(z,W){var L,A=R.p(z),T="set"+(this.$u?"UTC":""),q=(L={},L[u]=T+"Date",L[g]=T+"Date",L[h]=T+"Month",L[m]=T+"FullYear",L[c]=T+"Hours",L[l]=T+"Minutes",L[o]=T+"Seconds",L[i]=T+"Milliseconds",L)[A],H=A===u?this.$D+(W-this.$W):W;if(A===h||A===m){var O=this.clone().set(g,1);O.$d[q](H),O.init(),this.$d=O.set(g,Math.min(this.$D,O.daysInMonth())).$d}else q&&this.$d[q](H);return this.init(),this},B.set=function(z,W){return this.clone().$set(z,W)},B.get=function(z){return this[R.p(z)]()},B.add=function(z,W){var L,A=this;z=Number(z);var T=R.p(W),q=function(V){var X=E(A);return R.w(X.date(X.date()+Math.round(V*z)),A)};if(T===h)return this.set(h,this.$M+z);if(T===m)return this.set(m,this.$y+z);if(T===u)return q(1);if(T===d)return q(7);var H=(L={},L[l]=r,L[c]=s,L[o]=n,L)[T]||1,O=this.$d.getTime()+z*H;return R.w(O,this)},B.subtract=function(z,W){return this.add(-1*z,W)},B.format=function(z){var W=this,L=this.$locale();if(!this.isValid())return L.invalidDate||x;var A=z||"YYYY-MM-DDTHH:mm:ssZ",T=R.z(this),q=this.$H,H=this.$m,O=this.$M,V=L.weekdays,X=L.months,Y=L.meridiem,te=function(ce,Se,se,le){return ce&&(ce[Se]||ce(W,A))||se[Se].slice(0,le)},ue=function(ce){return R.s(q%12||12,ce,"0")},ee=Y||function(ce,Se,se){var le=ce<12?"AM":"PM";return se?le.toLowerCase():le};return A.replace(y,function(ce,Se){return Se||function(se){switch(se){case"YY":return String(W.$y).slice(-2);case"YYYY":return R.s(W.$y,4,"0");case"M":return O+1;case"MM":return R.s(O+1,2,"0");case"MMM":return te(L.monthsShort,O,X,3);case"MMMM":return te(X,O);case"D":return W.$D;case"DD":return R.s(W.$D,2,"0");case"d":return String(W.$W);case"dd":return te(L.weekdaysMin,W.$W,V,2);case"ddd":return te(L.weekdaysShort,W.$W,V,3);case"dddd":return V[W.$W];case"H":return String(q);case"HH":return R.s(q,2,"0");case"h":return ue(1);case"hh":return ue(2);case"a":return ee(q,H,!0);case"A":return ee(q,H,!1);case"m":return String(H);case"mm":return R.s(H,2,"0");case"s":return String(W.$s);case"ss":return R.s(W.$s,2,"0");case"SSS":return R.s(W.$ms,3,"0");case"Z":return T}return null}(ce)||T.replace(":","")})},B.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},B.diff=function(z,W,L){var A,T=this,q=R.p(W),H=E(z),O=(H.utcOffset()-this.utcOffset())*r,V=this-H,X=function(){return R.m(T,H)};switch(q){case m:A=X()/12;break;case h:A=X();break;case p:A=X()/3;break;case d:A=(V-O)/6048e5;break;case u:A=(V-O)/864e5;break;case c:A=V/s;break;case l:A=V/r;break;case o:A=V/n;break;default:A=V}return L?A:R.a(A)},B.daysInMonth=function(){return this.endOf(h).$D},B.$locale=function(){return k[this.$L]},B.locale=function(z,W){if(!z)return this.$L;var L=this.clone(),A=I(z,W,!0);return A&&(L.$L=A),L},B.clone=function(){return R.w(this.$d,this)},B.toDate=function(){return new Date(this.valueOf())},B.toJSON=function(){return this.isValid()?this.toISOString():null},B.toISOString=function(){return this.$d.toISOString()},B.toString=function(){return this.$d.toUTCString()},$}(),M=P.prototype;return E.prototype=M,[["$ms",i],["$s",o],["$m",l],["$H",c],["$W",u],["$M",h],["$y",m],["$D",g]].forEach(function($){M[$[1]]=function(B){return this.$g(B,$[0],$[1])}}),E.extend=function($,B){return $.$i||($(B,P,E),$.$i=!0),E},E.locale=I,E.isDayjs=j,E.unix=function($){return E(1e3*$)},E.en=k[S],E.Ls=k,E.p={},E})})(k7);var Dle=k7.exports;const nj=xn(Dle);var C7={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(zr,function(){return function(n,r,s){var i=r.prototype,o=function(h){return h&&(h.indexOf?h:h.s)},l=function(h,p,m,g,x){var b=h.name?h:h.$locale(),y=o(b[p]),v=o(b[m]),w=y||v.map(function(S){return S.slice(0,g)});if(!x)return w;var _=b.weekStart;return w.map(function(S,k){return w[(k+(_||0))%7]})},c=function(){return s.Ls[s.locale()]},u=function(h,p){return h.formats[p]||function(m){return m.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(g,x,b){return x||b.slice(1)})}(h.formats[p.toUpperCase()])},d=function(){var h=this;return{months:function(p){return p?p.format("MMMM"):l(h,"months")},monthsShort:function(p){return p?p.format("MMM"):l(h,"monthsShort","months",3)},firstDayOfWeek:function(){return h.$locale().weekStart||0},weekdays:function(p){return p?p.format("dddd"):l(h,"weekdays")},weekdaysMin:function(p){return p?p.format("dd"):l(h,"weekdaysMin","weekdays",2)},weekdaysShort:function(p){return p?p.format("ddd"):l(h,"weekdaysShort","weekdays",3)},longDateFormat:function(p){return u(h.$locale(),p)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};i.localeData=function(){return d.bind(this)()},s.localeData=function(){var h=c();return{firstDayOfWeek:function(){return h.weekStart||0},weekdays:function(){return s.weekdays()},weekdaysShort:function(){return s.weekdaysShort()},weekdaysMin:function(){return s.weekdaysMin()},months:function(){return s.months()},monthsShort:function(){return s.monthsShort()},longDateFormat:function(p){return u(h,p)},meridiem:h.meridiem,ordinal:h.ordinal}},s.months=function(){return l(c(),"months")},s.monthsShort=function(){return l(c(),"monthsShort","months",3)},s.weekdays=function(h){return l(c(),"weekdays",null,null,h)},s.weekdaysShort=function(h){return l(c(),"weekdaysShort","weekdays",3,h)},s.weekdaysMin=function(h){return l(c(),"weekdaysMin","weekdays",2,h)}}})})(C7);var $le=C7.exports;const Lle=xn($le),Ei=(e,t)=>new Wn(e).setA(t).toRgbString(),Ed=(e,t)=>new Wn(e).lighten(t).toHexString(),Ble=e=>{const t=zh(e,{theme:"dark"});return{1:t[0],2:t[1],3:t[2],4:t[3],5:t[6],6:t[5],7:t[4],8:t[6],9:t[5],10:t[4]}},Fle=(e,t)=>{const n=e||"#000",r=t||"#fff";return{colorBgBase:n,colorTextBase:r,colorText:Ei(r,.85),colorTextSecondary:Ei(r,.65),colorTextTertiary:Ei(r,.45),colorTextQuaternary:Ei(r,.25),colorFill:Ei(r,.18),colorFillSecondary:Ei(r,.12),colorFillTertiary:Ei(r,.08),colorFillQuaternary:Ei(r,.04),colorBgSolid:Ei(r,.95),colorBgSolidHover:Ei(r,1),colorBgSolidActive:Ei(r,.9),colorBgElevated:Ed(n,12),colorBgContainer:Ed(n,8),colorBgLayout:Ed(n,0),colorBgSpotlight:Ed(n,26),colorBgBlur:Ei(r,.04),colorBorder:Ed(n,26),colorBorderSecondary:Ed(n,19)}},zle=(e,t)=>{const n=Object.keys(D5).map(i=>{const o=zh(e[i],{theme:"dark"});return Array.from({length:10},()=>1).reduce((l,c,u)=>(l[`${i}-${u+1}`]=o[u],l[`${i}${u+1}`]=o[u],l),{})}).reduce((i,o)=>(i=Object.assign(Object.assign({},i),o),i),{}),r=t??$5(e),s=o7(e,{generateColorPalettes:Ble,generateNeutralColorPalettes:Fle});return Object.assign(Object.assign(Object.assign(Object.assign({},r),n),s),{colorPrimaryBg:s.colorPrimaryBorder,colorPrimaryBgHover:s.colorPrimaryBorderHover})},m4={defaultSeed:Ib.token,defaultAlgorithm:$5,darkAlgorithm:zle};function Hle({children:e}){const t=hl(),[n,r]=f.useState(t.theme);return f.useEffect(()=>t.onThemeChange(r),[t]),a.jsx(If,{theme:{algorithm:n.mode==="dark"?m4.darkAlgorithm:m4.defaultAlgorithm,token:{colorPrimary:n.colorPrimary,colorBgContainer:n.colorBgContainer,colorText:n.colorText,colorBorder:n.colorBorder}},children:e})}var Yt;(function(e){e.assertEqual=s=>{};function t(s){}e.assertIs=t;function n(s){throw new Error}e.assertNever=n,e.arrayToEnum=s=>{const i={};for(const o of s)i[o]=o;return i},e.getValidEnumValues=s=>{const i=e.objectKeys(s).filter(l=>typeof s[s[l]]!="number"),o={};for(const l of i)o[l]=s[l];return e.objectValues(o)},e.objectValues=s=>e.objectKeys(s).map(function(i){return s[i]}),e.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const i=[];for(const o in s)Object.prototype.hasOwnProperty.call(s,o)&&i.push(o);return i},e.find=(s,i)=>{for(const o of s)if(i(o))return o},e.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&Number.isFinite(s)&&Math.floor(s)===s;function r(s,i=" | "){return s.map(o=>typeof o=="string"?`'${o}'`:o).join(i)}e.joinValues=r,e.jsonStringifyReplacer=(s,i)=>typeof i=="bigint"?i.toString():i})(Yt||(Yt={}));var g4;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(g4||(g4={}));const Ye=Yt.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),zl=e=>{switch(typeof e){case"undefined":return Ye.undefined;case"string":return Ye.string;case"number":return Number.isNaN(e)?Ye.nan:Ye.number;case"boolean":return Ye.boolean;case"function":return Ye.function;case"bigint":return Ye.bigint;case"symbol":return Ye.symbol;case"object":return Array.isArray(e)?Ye.array:e===null?Ye.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?Ye.promise:typeof Map<"u"&&e instanceof Map?Ye.map:typeof Set<"u"&&e instanceof Set?Ye.set:typeof Date<"u"&&e instanceof Date?Ye.date:Ye.object;default:return Ye.unknown}},_e=Yt.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class sl extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}format(t){const n=t||function(i){return i.message},r={_errors:[]},s=i=>{for(const o of i.issues)if(o.code==="invalid_union")o.unionErrors.map(s);else if(o.code==="invalid_return_type")s(o.returnTypeError);else if(o.code==="invalid_arguments")s(o.argumentsError);else if(o.path.length===0)r._errors.push(n(o));else{let l=r,c=0;for(;c<o.path.length;){const u=o.path[c];c===o.path.length-1?(l[u]=l[u]||{_errors:[]},l[u]._errors.push(n(o))):l[u]=l[u]||{_errors:[]},l=l[u],c++}}};return s(this),r}static assert(t){if(!(t instanceof sl))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Yt.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const s of this.issues)if(s.path.length>0){const i=s.path[0];n[i]=n[i]||[],n[i].push(t(s))}else r.push(t(s));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}sl.create=e=>new sl(e);const rj=(e,t)=>{let n;switch(e.code){case _e.invalid_type:e.received===Ye.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case _e.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,Yt.jsonStringifyReplacer)}`;break;case _e.unrecognized_keys:n=`Unrecognized key(s) in object: ${Yt.joinValues(e.keys,", ")}`;break;case _e.invalid_union:n="Invalid input";break;case _e.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Yt.joinValues(e.options)}`;break;case _e.invalid_enum_value:n=`Invalid enum value. Expected ${Yt.joinValues(e.options)}, received '${e.received}'`;break;case _e.invalid_arguments:n="Invalid function arguments";break;case _e.invalid_return_type:n="Invalid function return type";break;case _e.invalid_date:n="Invalid date";break;case _e.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:Yt.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case _e.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case _e.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case _e.custom:n="Invalid input";break;case _e.invalid_intersection_types:n="Intersection results could not be merged";break;case _e.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case _e.not_finite:n="Number must be finite";break;default:n=t.defaultError,Yt.assertNever(e)}return{message:n}};let Ule=rj;function Wle(){return Ule}const Vle=e=>{const{data:t,path:n,errorMaps:r,issueData:s}=e,i=[...n,...s.path||[]],o={...s,path:i};if(s.message!==void 0)return{...s,path:i,message:s.message};let l="";const c=r.filter(u=>!!u).slice().reverse();for(const u of c)l=u(o,{data:t,defaultError:l}).message;return{...s,path:i,message:l}};function ze(e,t){const n=Wle(),r=Vle({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===rj?void 0:rj].filter(s=>!!s)});e.common.issues.push(r)}class ws{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const s of n){if(s.status==="aborted")return xt;s.status==="dirty"&&t.dirty(),r.push(s.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const s of n){const i=await s.key,o=await s.value;r.push({key:i,value:o})}return ws.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const s of n){const{key:i,value:o}=s;if(i.status==="aborted"||o.status==="aborted")return xt;i.status==="dirty"&&t.dirty(),o.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof o.value<"u"||s.alwaysSet)&&(r[i.value]=o.value)}return{status:t.value,value:r}}}const xt=Object.freeze({status:"aborted"}),om=e=>({status:"dirty",value:e}),Zi=e=>({status:"valid",value:e}),x4=e=>e.status==="aborted",v4=e=>e.status==="dirty",Hh=e=>e.status==="valid",Tb=e=>typeof Promise<"u"&&e instanceof Promise;var rt;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(rt||(rt={}));class fa{constructor(t,n,r,s){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=s}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const y4=(e,t)=>{if(Hh(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new sl(e.common.issues);return this._error=n,this._error}}};function Nt(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:s}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:s}:{errorMap:(o,l)=>{const{message:c}=e;return o.code==="invalid_enum_value"?{message:c??l.defaultError}:typeof l.data>"u"?{message:c??r??l.defaultError}:o.code!=="invalid_type"?{message:l.defaultError}:{message:c??n??l.defaultError}},description:s}}class zt{get description(){return this._def.description}_getType(t){return zl(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:zl(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new ws,ctx:{common:t.parent.common,data:t.data,parsedType:zl(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(Tb(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){const r={common:{issues:[],async:(n==null?void 0:n.async)??!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:zl(t)},s=this._parseSync({data:t,path:r.path,parent:r});return y4(r,s)}"~validate"(t){var r,s;const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:zl(t)};if(!this["~standard"].async)try{const i=this._parseSync({data:t,path:[],parent:n});return Hh(i)?{value:i.value}:{issues:n.common.issues}}catch(i){(s=(r=i==null?void 0:i.message)==null?void 0:r.toLowerCase())!=null&&s.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:n}).then(i=>Hh(i)?{value:i.value}:{issues:n.common.issues})}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:zl(t)},s=this._parse({data:t,path:r.path,parent:r}),i=await(Tb(s)?s:Promise.resolve(s));return y4(r,i)}refine(t,n){const r=s=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(s):n;return this._refinement((s,i)=>{const o=t(s),l=()=>i.addIssue({code:_e.custom,...r(s)});return typeof Promise<"u"&&o instanceof Promise?o.then(c=>c?!0:(l(),!1)):o?!0:(l(),!1)})}refinement(t,n){return this._refinement((r,s)=>t(r)?!0:(s.addIssue(typeof n=="function"?n(r,s):n),!1))}_refinement(t){return new vc({schema:this,typeName:vt.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return Za.create(this,this._def)}nullable(){return Tu.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return aa.create(this)}promise(){return Db.create(this,this._def)}or(t){return Mb.create([this,t],this._def)}and(t){return Pb.create(this,t,this._def)}transform(t){return new vc({...Nt(this._def),schema:this,typeName:vt.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new $b({...Nt(this._def),innerType:this,defaultValue:n,typeName:vt.ZodDefault})}brand(){return new I7({typeName:vt.ZodBranded,type:this,...Nt(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new Lb({...Nt(this._def),innerType:this,catchValue:n,typeName:vt.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return F5.create(this,t)}readonly(){return Bb.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const qle=/^c[^\s-]{8,}$/i,Kle=/^[0-9a-z]+$/,Gle=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Yle=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Xle=/^[a-z0-9_-]{21}$/i,Zle=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Qle=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Jle=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,ece="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Ek;const tce=/^(?:(?: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])$/,nce=/^(?:(?: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])\/(3[0-2]|[12]?[0-9])$/,rce=/^(([0-9a-fA-F]{1,4}:){7,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}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,sce=/^(([0-9a-fA-F]{1,4}:){7,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}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,ice=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,oce=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,N7="((\\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])))",ace=new RegExp(`^${N7}$`);function j7(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);const n=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}function lce(e){return new RegExp(`^${j7(e)}$`)}function cce(e){let t=`${N7}T${j7(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function uce(e,t){return!!((t==="v4"||!t)&&tce.test(e)||(t==="v6"||!t)&&rce.test(e))}function dce(e,t){if(!Zle.test(e))return!1;try{const[n]=e.split(".");if(!n)return!1;const r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),s=JSON.parse(atob(r));return!(typeof s!="object"||s===null||"typ"in s&&(s==null?void 0:s.typ)!=="JWT"||!s.alg||t&&s.alg!==t)}catch{return!1}}function hce(e,t){return!!((t==="v4"||!t)&&nce.test(e)||(t==="v6"||!t)&&sce.test(e))}class qa extends zt{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==Ye.string){const i=this._getOrReturnCtx(t);return ze(i,{code:_e.invalid_type,expected:Ye.string,received:i.parsedType}),xt}const r=new ws;let s;for(const i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(s=this._getOrReturnCtx(t,s),ze(s,{code:_e.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="max")t.data.length>i.value&&(s=this._getOrReturnCtx(t,s),ze(s,{code:_e.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="length"){const o=t.data.length>i.value,l=t.data.length<i.value;(o||l)&&(s=this._getOrReturnCtx(t,s),o?ze(s,{code:_e.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):l&&ze(s,{code:_e.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")Jle.test(t.data)||(s=this._getOrReturnCtx(t,s),ze(s,{validation:"email",code:_e.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")Ek||(Ek=new RegExp(ece,"u")),Ek.test(t.data)||(s=this._getOrReturnCtx(t,s),ze(s,{validation:"emoji",code:_e.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")Yle.test(t.data)||(s=this._getOrReturnCtx(t,s),ze(s,{validation:"uuid",code:_e.invalid_string,message:i.message}),r.dirty());else if(i.kind==="nanoid")Xle.test(t.data)||(s=this._getOrReturnCtx(t,s),ze(s,{validation:"nanoid",code:_e.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")qle.test(t.data)||(s=this._getOrReturnCtx(t,s),ze(s,{validation:"cuid",code:_e.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")Kle.test(t.data)||(s=this._getOrReturnCtx(t,s),ze(s,{validation:"cuid2",code:_e.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")Gle.test(t.data)||(s=this._getOrReturnCtx(t,s),ze(s,{validation:"ulid",code:_e.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{s=this._getOrReturnCtx(t,s),ze(s,{validation:"url",code:_e.invalid_string,message:i.message}),r.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(t.data)||(s=this._getOrReturnCtx(t,s),ze(s,{validation:"regex",code:_e.invalid_string,message:i.message}),r.dirty())):i.kind==="trim"?t.data=t.data.trim():i.kind==="includes"?t.data.includes(i.value,i.position)||(s=this._getOrReturnCtx(t,s),ze(s,{code:_e.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),r.dirty()):i.kind==="toLowerCase"?t.data=t.data.toLowerCase():i.kind==="toUpperCase"?t.data=t.data.toUpperCase():i.kind==="startsWith"?t.data.startsWith(i.value)||(s=this._getOrReturnCtx(t,s),ze(s,{code:_e.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(s=this._getOrReturnCtx(t,s),ze(s,{code:_e.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?cce(i).test(t.data)||(s=this._getOrReturnCtx(t,s),ze(s,{code:_e.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="date"?ace.test(t.data)||(s=this._getOrReturnCtx(t,s),ze(s,{code:_e.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?lce(i).test(t.data)||(s=this._getOrReturnCtx(t,s),ze(s,{code:_e.invalid_string,validation:"time",message:i.message}),r.dirty()):i.kind==="duration"?Qle.test(t.data)||(s=this._getOrReturnCtx(t,s),ze(s,{validation:"duration",code:_e.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?uce(t.data,i.version)||(s=this._getOrReturnCtx(t,s),ze(s,{validation:"ip",code:_e.invalid_string,message:i.message}),r.dirty()):i.kind==="jwt"?dce(t.data,i.alg)||(s=this._getOrReturnCtx(t,s),ze(s,{validation:"jwt",code:_e.invalid_string,message:i.message}),r.dirty()):i.kind==="cidr"?hce(t.data,i.version)||(s=this._getOrReturnCtx(t,s),ze(s,{validation:"cidr",code:_e.invalid_string,message:i.message}),r.dirty()):i.kind==="base64"?ice.test(t.data)||(s=this._getOrReturnCtx(t,s),ze(s,{validation:"base64",code:_e.invalid_string,message:i.message}),r.dirty()):i.kind==="base64url"?oce.test(t.data)||(s=this._getOrReturnCtx(t,s),ze(s,{validation:"base64url",code:_e.invalid_string,message:i.message}),r.dirty()):Yt.assertNever(i);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(s=>t.test(s),{validation:n,code:_e.invalid_string,...rt.errToObj(r)})}_addCheck(t){return new qa({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...rt.errToObj(t)})}url(t){return this._addCheck({kind:"url",...rt.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...rt.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...rt.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...rt.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...rt.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...rt.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...rt.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...rt.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...rt.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...rt.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...rt.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...rt.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(t==null?void 0:t.offset)??!1,local:(t==null?void 0:t.local)??!1,...rt.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...rt.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...rt.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...rt.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...rt.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...rt.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...rt.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...rt.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...rt.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...rt.errToObj(n)})}nonempty(t){return this.min(1,rt.errToObj(t))}trim(){return new qa({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new qa({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new qa({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}qa.create=e=>new qa({checks:[],typeName:vt.ZodString,coerce:(e==null?void 0:e.coerce)??!1,...Nt(e)});function fce(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,s=n>r?n:r,i=Number.parseInt(e.toFixed(s).replace(".","")),o=Number.parseInt(t.toFixed(s).replace(".",""));return i%o/10**s}class Uh extends zt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==Ye.number){const i=this._getOrReturnCtx(t);return ze(i,{code:_e.invalid_type,expected:Ye.number,received:i.parsedType}),xt}let r;const s=new ws;for(const i of this._def.checks)i.kind==="int"?Yt.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),ze(r,{code:_e.invalid_type,expected:"integer",received:"float",message:i.message}),s.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),ze(r,{code:_e.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),s.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),ze(r,{code:_e.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),s.dirty()):i.kind==="multipleOf"?fce(t.data,i.value)!==0&&(r=this._getOrReturnCtx(t,r),ze(r,{code:_e.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),ze(r,{code:_e.not_finite,message:i.message}),s.dirty()):Yt.assertNever(i);return{status:s.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,rt.toString(n))}gt(t,n){return this.setLimit("min",t,!1,rt.toString(n))}lte(t,n){return this.setLimit("max",t,!0,rt.toString(n))}lt(t,n){return this.setLimit("max",t,!1,rt.toString(n))}setLimit(t,n,r,s){return new Uh({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:rt.toString(s)}]})}_addCheck(t){return new Uh({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:rt.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:rt.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:rt.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:rt.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:rt.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:rt.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:rt.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:rt.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:rt.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&Yt.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}Uh.create=e=>new Uh({checks:[],typeName:vt.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Nt(e)});class _g extends zt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==Ye.bigint)return this._getInvalidInput(t);let r;const s=new ws;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),ze(r,{code:_e.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),s.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),ze(r,{code:_e.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),s.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),ze(r,{code:_e.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):Yt.assertNever(i);return{status:s.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return ze(n,{code:_e.invalid_type,expected:Ye.bigint,received:n.parsedType}),xt}gte(t,n){return this.setLimit("min",t,!0,rt.toString(n))}gt(t,n){return this.setLimit("min",t,!1,rt.toString(n))}lte(t,n){return this.setLimit("max",t,!0,rt.toString(n))}lt(t,n){return this.setLimit("max",t,!1,rt.toString(n))}setLimit(t,n,r,s){return new _g({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:rt.toString(s)}]})}_addCheck(t){return new _g({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:rt.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:rt.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:rt.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:rt.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:rt.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}_g.create=e=>new _g({checks:[],typeName:vt.ZodBigInt,coerce:(e==null?void 0:e.coerce)??!1,...Nt(e)});class sj extends zt{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==Ye.boolean){const r=this._getOrReturnCtx(t);return ze(r,{code:_e.invalid_type,expected:Ye.boolean,received:r.parsedType}),xt}return Zi(t.data)}}sj.create=e=>new sj({typeName:vt.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Nt(e)});class Rb extends zt{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==Ye.date){const i=this._getOrReturnCtx(t);return ze(i,{code:_e.invalid_type,expected:Ye.date,received:i.parsedType}),xt}if(Number.isNaN(t.data.getTime())){const i=this._getOrReturnCtx(t);return ze(i,{code:_e.invalid_date}),xt}const r=new ws;let s;for(const i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(s=this._getOrReturnCtx(t,s),ze(s,{code:_e.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),r.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(s=this._getOrReturnCtx(t,s),ze(s,{code:_e.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):Yt.assertNever(i);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Rb({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:rt.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:rt.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}Rb.create=e=>new Rb({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:vt.ZodDate,...Nt(e)});class b4 extends zt{_parse(t){if(this._getType(t)!==Ye.symbol){const r=this._getOrReturnCtx(t);return ze(r,{code:_e.invalid_type,expected:Ye.symbol,received:r.parsedType}),xt}return Zi(t.data)}}b4.create=e=>new b4({typeName:vt.ZodSymbol,...Nt(e)});class ij extends zt{_parse(t){if(this._getType(t)!==Ye.undefined){const r=this._getOrReturnCtx(t);return ze(r,{code:_e.invalid_type,expected:Ye.undefined,received:r.parsedType}),xt}return Zi(t.data)}}ij.create=e=>new ij({typeName:vt.ZodUndefined,...Nt(e)});class oj extends zt{_parse(t){if(this._getType(t)!==Ye.null){const r=this._getOrReturnCtx(t);return ze(r,{code:_e.invalid_type,expected:Ye.null,received:r.parsedType}),xt}return Zi(t.data)}}oj.create=e=>new oj({typeName:vt.ZodNull,...Nt(e)});class w4 extends zt{constructor(){super(...arguments),this._any=!0}_parse(t){return Zi(t.data)}}w4.create=e=>new w4({typeName:vt.ZodAny,...Nt(e)});class aj extends zt{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Zi(t.data)}}aj.create=e=>new aj({typeName:vt.ZodUnknown,...Nt(e)});class xc extends zt{_parse(t){const n=this._getOrReturnCtx(t);return ze(n,{code:_e.invalid_type,expected:Ye.never,received:n.parsedType}),xt}}xc.create=e=>new xc({typeName:vt.ZodNever,...Nt(e)});class _4 extends zt{_parse(t){if(this._getType(t)!==Ye.undefined){const r=this._getOrReturnCtx(t);return ze(r,{code:_e.invalid_type,expected:Ye.void,received:r.parsedType}),xt}return Zi(t.data)}}_4.create=e=>new _4({typeName:vt.ZodVoid,...Nt(e)});class aa extends zt{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),s=this._def;if(n.parsedType!==Ye.array)return ze(n,{code:_e.invalid_type,expected:Ye.array,received:n.parsedType}),xt;if(s.exactLength!==null){const o=n.data.length>s.exactLength.value,l=n.data.length<s.exactLength.value;(o||l)&&(ze(n,{code:o?_e.too_big:_e.too_small,minimum:l?s.exactLength.value:void 0,maximum:o?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),r.dirty())}if(s.minLength!==null&&n.data.length<s.minLength.value&&(ze(n,{code:_e.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),r.dirty()),s.maxLength!==null&&n.data.length>s.maxLength.value&&(ze(n,{code:_e.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((o,l)=>s.type._parseAsync(new fa(n,o,n.path,l)))).then(o=>ws.mergeArray(r,o));const i=[...n.data].map((o,l)=>s.type._parseSync(new fa(n,o,n.path,l)));return ws.mergeArray(r,i)}get element(){return this._def.type}min(t,n){return new aa({...this._def,minLength:{value:t,message:rt.toString(n)}})}max(t,n){return new aa({...this._def,maxLength:{value:t,message:rt.toString(n)}})}length(t,n){return new aa({...this._def,exactLength:{value:t,message:rt.toString(n)}})}nonempty(t){return this.min(1,t)}}aa.create=(e,t)=>new aa({type:e,minLength:null,maxLength:null,exactLength:null,typeName:vt.ZodArray,...Nt(t)});function qd(e){if(e instanceof or){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Za.create(qd(r))}return new or({...e._def,shape:()=>t})}else return e instanceof aa?new aa({...e._def,type:qd(e.element)}):e instanceof Za?Za.create(qd(e.unwrap())):e instanceof Tu?Tu.create(qd(e.unwrap())):e instanceof Eu?Eu.create(e.items.map(t=>qd(t))):e}class or extends zt{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=Yt.objectKeys(t);return this._cached={shape:t,keys:n},this._cached}_parse(t){if(this._getType(t)!==Ye.object){const u=this._getOrReturnCtx(t);return ze(u,{code:_e.invalid_type,expected:Ye.object,received:u.parsedType}),xt}const{status:r,ctx:s}=this._processInputParams(t),{shape:i,keys:o}=this._getCached(),l=[];if(!(this._def.catchall instanceof xc&&this._def.unknownKeys==="strip"))for(const u in s.data)o.includes(u)||l.push(u);const c=[];for(const u of o){const d=i[u],h=s.data[u];c.push({key:{status:"valid",value:u},value:d._parse(new fa(s,h,s.path,u)),alwaysSet:u in s.data})}if(this._def.catchall instanceof xc){const u=this._def.unknownKeys;if(u==="passthrough")for(const d of l)c.push({key:{status:"valid",value:d},value:{status:"valid",value:s.data[d]}});else if(u==="strict")l.length>0&&(ze(s,{code:_e.unrecognized_keys,keys:l}),r.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const u=this._def.catchall;for(const d of l){const h=s.data[d];c.push({key:{status:"valid",value:d},value:u._parse(new fa(s,h,s.path,d)),alwaysSet:d in s.data})}}return s.common.async?Promise.resolve().then(async()=>{const u=[];for(const d of c){const h=await d.key,p=await d.value;u.push({key:h,value:p,alwaysSet:d.alwaysSet})}return u}).then(u=>ws.mergeObjectSync(r,u)):ws.mergeObjectSync(r,c)}get shape(){return this._def.shape()}strict(t){return rt.errToObj,new or({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var i,o;const s=((o=(i=this._def).errorMap)==null?void 0:o.call(i,n,r).message)??r.defaultError;return n.code==="unrecognized_keys"?{message:rt.errToObj(t).message??s}:{message:s}}}:{}})}strip(){return new or({...this._def,unknownKeys:"strip"})}passthrough(){return new or({...this._def,unknownKeys:"passthrough"})}extend(t){return new or({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new or({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:vt.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new or({...this._def,catchall:t})}pick(t){const n={};for(const r of Yt.objectKeys(t))t[r]&&this.shape[r]&&(n[r]=this.shape[r]);return new or({...this._def,shape:()=>n})}omit(t){const n={};for(const r of Yt.objectKeys(this.shape))t[r]||(n[r]=this.shape[r]);return new or({...this._def,shape:()=>n})}deepPartial(){return qd(this)}partial(t){const n={};for(const r of Yt.objectKeys(this.shape)){const s=this.shape[r];t&&!t[r]?n[r]=s:n[r]=s.optional()}return new or({...this._def,shape:()=>n})}required(t){const n={};for(const r of Yt.objectKeys(this.shape))if(t&&!t[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof Za;)i=i._def.innerType;n[r]=i}return new or({...this._def,shape:()=>n})}keyof(){return E7(Yt.objectKeys(this.shape))}}or.create=(e,t)=>new or({shape:()=>e,unknownKeys:"strip",catchall:xc.create(),typeName:vt.ZodObject,...Nt(t)});or.strictCreate=(e,t)=>new or({shape:()=>e,unknownKeys:"strict",catchall:xc.create(),typeName:vt.ZodObject,...Nt(t)});or.lazycreate=(e,t)=>new or({shape:e,unknownKeys:"strip",catchall:xc.create(),typeName:vt.ZodObject,...Nt(t)});class Mb extends zt{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function s(i){for(const l of i)if(l.result.status==="valid")return l.result;for(const l of i)if(l.result.status==="dirty")return n.common.issues.push(...l.ctx.common.issues),l.result;const o=i.map(l=>new sl(l.ctx.common.issues));return ze(n,{code:_e.invalid_union,unionErrors:o}),xt}if(n.common.async)return Promise.all(r.map(async i=>{const o={...n,common:{...n.common,issues:[]},parent:null};return{result:await i._parseAsync({data:n.data,path:n.path,parent:o}),ctx:o}})).then(s);{let i;const o=[];for(const c of r){const u={...n,common:{...n.common,issues:[]},parent:null},d=c._parseSync({data:n.data,path:n.path,parent:u});if(d.status==="valid")return d;d.status==="dirty"&&!i&&(i={result:d,ctx:u}),u.common.issues.length&&o.push(u.common.issues)}if(i)return n.common.issues.push(...i.ctx.common.issues),i.result;const l=o.map(c=>new sl(c));return ze(n,{code:_e.invalid_union,unionErrors:l}),xt}}get options(){return this._def.options}}Mb.create=(e,t)=>new Mb({options:e,typeName:vt.ZodUnion,...Nt(t)});const za=e=>e instanceof cj?za(e.schema):e instanceof vc?za(e.innerType()):e instanceof Ob?[e.value]:e instanceof Iu?e.options:e instanceof uj?Yt.objectValues(e.enum):e instanceof $b?za(e._def.innerType):e instanceof ij?[void 0]:e instanceof oj?[null]:e instanceof Za?[void 0,...za(e.unwrap())]:e instanceof Tu?[null,...za(e.unwrap())]:e instanceof I7||e instanceof Bb?za(e.unwrap()):e instanceof Lb?za(e._def.innerType):[];class B5 extends zt{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Ye.object)return ze(n,{code:_e.invalid_type,expected:Ye.object,received:n.parsedType}),xt;const r=this.discriminator,s=n.data[r],i=this.optionsMap.get(s);return i?n.common.async?i._parseAsync({data:n.data,path:n.path,parent:n}):i._parseSync({data:n.data,path:n.path,parent:n}):(ze(n,{code:_e.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),xt)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const s=new Map;for(const i of n){const o=za(i.shape[t]);if(!o.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const l of o){if(s.has(l))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(l)}`);s.set(l,i)}}return new B5({typeName:vt.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:s,...Nt(r)})}}function lj(e,t){const n=zl(e),r=zl(t);if(e===t)return{valid:!0,data:e};if(n===Ye.object&&r===Ye.object){const s=Yt.objectKeys(t),i=Yt.objectKeys(e).filter(l=>s.indexOf(l)!==-1),o={...e,...t};for(const l of i){const c=lj(e[l],t[l]);if(!c.valid)return{valid:!1};o[l]=c.data}return{valid:!0,data:o}}else if(n===Ye.array&&r===Ye.array){if(e.length!==t.length)return{valid:!1};const s=[];for(let i=0;i<e.length;i++){const o=e[i],l=t[i],c=lj(o,l);if(!c.valid)return{valid:!1};s.push(c.data)}return{valid:!0,data:s}}else return n===Ye.date&&r===Ye.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class Pb extends zt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),s=(i,o)=>{if(x4(i)||x4(o))return xt;const l=lj(i.value,o.value);return l.valid?((v4(i)||v4(o))&&n.dirty(),{status:n.value,value:l.data}):(ze(r,{code:_e.invalid_intersection_types}),xt)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([i,o])=>s(i,o)):s(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}Pb.create=(e,t,n)=>new Pb({left:e,right:t,typeName:vt.ZodIntersection,...Nt(n)});class Eu extends zt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Ye.array)return ze(r,{code:_e.invalid_type,expected:Ye.array,received:r.parsedType}),xt;if(r.data.length<this._def.items.length)return ze(r,{code:_e.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),xt;!this._def.rest&&r.data.length>this._def.items.length&&(ze(r,{code:_e.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const i=[...r.data].map((o,l)=>{const c=this._def.items[l]||this._def.rest;return c?c._parse(new fa(r,o,r.path,l)):null}).filter(o=>!!o);return r.common.async?Promise.all(i).then(o=>ws.mergeArray(n,o)):ws.mergeArray(n,i)}get items(){return this._def.items}rest(t){return new Eu({...this._def,rest:t})}}Eu.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Eu({items:e,typeName:vt.ZodTuple,rest:null,...Nt(t)})};class Ab extends zt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Ye.object)return ze(r,{code:_e.invalid_type,expected:Ye.object,received:r.parsedType}),xt;const s=[],i=this._def.keyType,o=this._def.valueType;for(const l in r.data)s.push({key:i._parse(new fa(r,l,r.path,l)),value:o._parse(new fa(r,r.data[l],r.path,l)),alwaysSet:l in r.data});return r.common.async?ws.mergeObjectAsync(n,s):ws.mergeObjectSync(n,s)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof zt?new Ab({keyType:t,valueType:n,typeName:vt.ZodRecord,...Nt(r)}):new Ab({keyType:qa.create(),valueType:t,typeName:vt.ZodRecord,...Nt(n)})}}class S4 extends zt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Ye.map)return ze(r,{code:_e.invalid_type,expected:Ye.map,received:r.parsedType}),xt;const s=this._def.keyType,i=this._def.valueType,o=[...r.data.entries()].map(([l,c],u)=>({key:s._parse(new fa(r,l,r.path,[u,"key"])),value:i._parse(new fa(r,c,r.path,[u,"value"]))}));if(r.common.async){const l=new Map;return Promise.resolve().then(async()=>{for(const c of o){const u=await c.key,d=await c.value;if(u.status==="aborted"||d.status==="aborted")return xt;(u.status==="dirty"||d.status==="dirty")&&n.dirty(),l.set(u.value,d.value)}return{status:n.value,value:l}})}else{const l=new Map;for(const c of o){const u=c.key,d=c.value;if(u.status==="aborted"||d.status==="aborted")return xt;(u.status==="dirty"||d.status==="dirty")&&n.dirty(),l.set(u.value,d.value)}return{status:n.value,value:l}}}}S4.create=(e,t,n)=>new S4({valueType:t,keyType:e,typeName:vt.ZodMap,...Nt(n)});class Sg extends zt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Ye.set)return ze(r,{code:_e.invalid_type,expected:Ye.set,received:r.parsedType}),xt;const s=this._def;s.minSize!==null&&r.data.size<s.minSize.value&&(ze(r,{code:_e.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),n.dirty()),s.maxSize!==null&&r.data.size>s.maxSize.value&&(ze(r,{code:_e.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),n.dirty());const i=this._def.valueType;function o(c){const u=new Set;for(const d of c){if(d.status==="aborted")return xt;d.status==="dirty"&&n.dirty(),u.add(d.value)}return{status:n.value,value:u}}const l=[...r.data.values()].map((c,u)=>i._parse(new fa(r,c,r.path,u)));return r.common.async?Promise.all(l).then(c=>o(c)):o(l)}min(t,n){return new Sg({...this._def,minSize:{value:t,message:rt.toString(n)}})}max(t,n){return new Sg({...this._def,maxSize:{value:t,message:rt.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}Sg.create=(e,t)=>new Sg({valueType:e,minSize:null,maxSize:null,typeName:vt.ZodSet,...Nt(t)});class cj extends zt{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}cj.create=(e,t)=>new cj({getter:e,typeName:vt.ZodLazy,...Nt(t)});class Ob extends zt{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return ze(n,{received:n.data,code:_e.invalid_literal,expected:this._def.value}),xt}return{status:"valid",value:t.data}}get value(){return this._def.value}}Ob.create=(e,t)=>new Ob({value:e,typeName:vt.ZodLiteral,...Nt(t)});function E7(e,t){return new Iu({values:e,typeName:vt.ZodEnum,...Nt(t)})}class Iu extends zt{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return ze(n,{expected:Yt.joinValues(r),received:n.parsedType,code:_e.invalid_type}),xt}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return ze(n,{received:n.data,code:_e.invalid_enum_value,options:r}),xt}return Zi(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return Iu.create(t,{...this._def,...n})}exclude(t,n=this._def){return Iu.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}Iu.create=E7;class uj extends zt{_parse(t){const n=Yt.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==Ye.string&&r.parsedType!==Ye.number){const s=Yt.objectValues(n);return ze(r,{expected:Yt.joinValues(s),received:r.parsedType,code:_e.invalid_type}),xt}if(this._cache||(this._cache=new Set(Yt.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){const s=Yt.objectValues(n);return ze(r,{received:r.data,code:_e.invalid_enum_value,options:s}),xt}return Zi(t.data)}get enum(){return this._def.values}}uj.create=(e,t)=>new uj({values:e,typeName:vt.ZodNativeEnum,...Nt(t)});class Db extends zt{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Ye.promise&&n.common.async===!1)return ze(n,{code:_e.invalid_type,expected:Ye.promise,received:n.parsedType}),xt;const r=n.parsedType===Ye.promise?n.data:Promise.resolve(n.data);return Zi(r.then(s=>this._def.type.parseAsync(s,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Db.create=(e,t)=>new Db({type:e,typeName:vt.ZodPromise,...Nt(t)});class vc extends zt{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===vt.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),s=this._def.effect||null,i={addIssue:o=>{ze(r,o),o.fatal?n.abort():n.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),s.type==="preprocess"){const o=s.transform(r.data,i);if(r.common.async)return Promise.resolve(o).then(async l=>{if(n.value==="aborted")return xt;const c=await this._def.schema._parseAsync({data:l,path:r.path,parent:r});return c.status==="aborted"?xt:c.status==="dirty"||n.value==="dirty"?om(c.value):c});{if(n.value==="aborted")return xt;const l=this._def.schema._parseSync({data:o,path:r.path,parent:r});return l.status==="aborted"?xt:l.status==="dirty"||n.value==="dirty"?om(l.value):l}}if(s.type==="refinement"){const o=l=>{const c=s.refinement(l,i);if(r.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return l};if(r.common.async===!1){const l=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return l.status==="aborted"?xt:(l.status==="dirty"&&n.dirty(),o(l.value),{status:n.value,value:l.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(l=>l.status==="aborted"?xt:(l.status==="dirty"&&n.dirty(),o(l.value).then(()=>({status:n.value,value:l.value}))))}if(s.type==="transform")if(r.common.async===!1){const o=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Hh(o))return xt;const l=s.transform(o.value,i);if(l instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:l}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(o=>Hh(o)?Promise.resolve(s.transform(o.value,i)).then(l=>({status:n.value,value:l})):xt);Yt.assertNever(s)}}vc.create=(e,t,n)=>new vc({schema:e,typeName:vt.ZodEffects,effect:t,...Nt(n)});vc.createWithPreprocess=(e,t,n)=>new vc({schema:t,effect:{type:"preprocess",transform:e},typeName:vt.ZodEffects,...Nt(n)});class Za extends zt{_parse(t){return this._getType(t)===Ye.undefined?Zi(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Za.create=(e,t)=>new Za({innerType:e,typeName:vt.ZodOptional,...Nt(t)});class Tu extends zt{_parse(t){return this._getType(t)===Ye.null?Zi(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Tu.create=(e,t)=>new Tu({innerType:e,typeName:vt.ZodNullable,...Nt(t)});class $b extends zt{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===Ye.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}$b.create=(e,t)=>new $b({innerType:e,typeName:vt.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Nt(t)});class Lb extends zt{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},s=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return Tb(s)?s.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new sl(r.common.issues)},input:r.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new sl(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Lb.create=(e,t)=>new Lb({innerType:e,typeName:vt.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Nt(t)});class k4 extends zt{_parse(t){if(this._getType(t)!==Ye.nan){const r=this._getOrReturnCtx(t);return ze(r,{code:_e.invalid_type,expected:Ye.nan,received:r.parsedType}),xt}return{status:"valid",value:t.data}}}k4.create=e=>new k4({typeName:vt.ZodNaN,...Nt(e)});class I7 extends zt{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class F5 extends zt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const i=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?xt:i.status==="dirty"?(n.dirty(),om(i.value)):this._def.out._parseAsync({data:i.value,path:r.path,parent:r})})();{const s=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?xt:s.status==="dirty"?(n.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:r.path,parent:r})}}static create(t,n){return new F5({in:t,out:n,typeName:vt.ZodPipeline})}}class Bb extends zt{_parse(t){const n=this._def.innerType._parse(t),r=s=>(Hh(s)&&(s.value=Object.freeze(s.value)),s);return Tb(n)?n.then(s=>r(s)):r(n)}unwrap(){return this._def.innerType}}Bb.create=(e,t)=>new Bb({innerType:e,typeName:vt.ZodReadonly,...Nt(t)});var vt;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(vt||(vt={}));const N=qa.create,Z=Uh.create,Re=sj.create,Qa=aj.create;xc.create;const pe=aa.create,F=or.create,pce=Mb.create,Ws=B5.create;Pb.create;Eu.create;const Qi=Ab.create,he=Ob.create,Ue=Iu.create;Db.create;Za.create;Tu.create;const mce=vc.createWithPreprocess,gce=["head","index"],T7=N().regex(/^[A-Za-z0-9][A-Za-z0-9-]{0,127}$/),Fb=N().regex(/^[1-9][0-9]*$/),zb=N().regex(/^[A-Za-z0-9_.-]+$/),kg=N().min(1).max(255).refine(e=>!e.startsWith("-")&&e!=="HEAD"&&!e.startsWith("/")&&!e.endsWith("/")&&!e.endsWith(".")&&!/[\s~^:?*\[\\\x00-\x1f\x7f]/.test(e)&&!e.includes("..")&&!e.includes("@{")&&!e.includes("//")&&e.split("/").every(t=>!t.startsWith(".")&&!t.endsWith(".lock")),"Invalid Git branch"),z5=N().min(1).max(4096).refine(e=>!e.startsWith("/")&&!e.includes("\0")&&!e.split(/[\\/]/).includes("..")),Iw=F({workspaceId:T7,repoId:Fb,owner:zb,name:zb,sourceBranch:kg,defaultBranch:kg}).strict(),xce=F({repoId:Fb,owner:zb,name:zb,defaultBranch:N(),private:Re(),description:N().nullable()}),vce=Iw.extend({initialCommit:N(),head:N(),actualBranch:N().nullable(),branches:pe(N()).optional(),files:pe(F({path:z5,previousPath:N().optional(),comparison:Ue(gce).optional(),status:N(),added:Z().nonnegative(),removed:Z().nonnegative(),binary:Re(),untracked:Re().optional()})),totalFiles:Z().int().nonnegative().optional(),filesTruncated:Re().optional(),added:Z().nonnegative(),removed:Z().nonnegative(),dirty:Re(),conflicted:Re(),version:N(),measuredAt:Z()}),Id=F({sessionId:T7});Ws("action",[Id.extend({action:he("repositories"),page:Z().int().min(1).max(1e3).optional(),search:N().max(100).optional()}).strict(),Id.extend({action:he("branches"),repoId:Fb,page:Z().int().min(1).max(1e3).optional(),search:N().max(100).optional(),cursor:N().min(1).max(1024).optional()}).strict(),Id.extend({action:he("bind"),repoId:Fb,branch:kg}).strict(),Id.extend({action:he("status")}).strict(),Id.extend({action:he("intend"),branch:kg.optional()}).strict(),Id.extend({action:he("diff"),filePath:z5}).strict()]);F({binding:Iw.nullable().optional(),workspace:vce.nullable().optional(),repositories:pe(xce).optional(),branches:pe(N()).optional(),hasMore:Re().optional(),nextCursor:N().min(1).max(1024).optional(),diff:F({path:z5,patch:N(),binary:Re(),truncated:Re(),notStored:Re().optional()}).optional()});F({threadId:N().min(1),conversationId:N().min(1),workspace:Iw.optional()});new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");F({id:N().min(1),name:N().min(1),baseUrl:N().min(1),apiKey:N().min(1),remark:N().optional(),createdAt:Z(),updatedAt:Z()}).strict();const yce=F({id:N().min(1),name:N().min(1),baseUrl:N().min(1),remark:N().optional(),keyMasked:N(),hasKey:Re(),createdAt:Z(),updatedAt:Z()}).strict();F({activeChannelId:N().nullable(),channels:pe(yce)}).strict();F({}).strict();F({id:N().min(1).optional(),name:N().min(1),baseUrl:N().min(1),apiKey:N().optional(),remark:N().optional()}).strict();F({id:N().min(1)}).strict();F({id:N().min(1).nullable()}).strict();F({channelId:N().min(1).optional(),updatedAt:Z().optional()}).strict().refine(e=>e.updatedAt===void 0||e.channelId!==void 0,{message:"updatedAt requires channelId"});F({channelId:N().nullable(),models:pe(F({id:N().min(1),ownedBy:N().optional()}).strict())}).strict();const bce=["owner"],wce=["agent","owner","user-upload"],R7=F({id:N().min(1),relPath:N().min(1),from:Ue(wce),label:N().optional(),size:Z().int().nonnegative(),mime:N().min(1),addedAt:Z().int().nonnegative(),lastEditedAt:Z().int().nonnegative().optional(),stale:Re().optional()});F({sessionId:N().min(1),relPath:N().min(1),ttlSeconds:Z().int().positive().nullable().optional(),view:Ue(["raw","md-rendered"]).optional()});F({url:N().min(1),expiresAt:Z().int().nonnegative().nullable()});F({sessionId:N().min(1),relPath:N().min(1),label:N().optional(),origin:he("agent").optional()});F({entry:R7});F({sessionId:N().min(1),relPath:N().min(1)});F({removed:he(!0)});F({sessionId:N().min(1)});F({entries:pe(R7)});F({attachmentId:N().min(1),url:N().min(1),relPath:N().min(1),sizeBytes:Z().int().nonnegative(),mimeType:N().min(1)});const _ce=Ws("type",[F({type:he("persona"),id:N().min(1)}).strict(),F({type:he("chat"),id:N().min(1)}).strict(),F({type:he("*")}).strict()]),Sce=Ue(["read","send","admin"]),H5=F({resource:_ce,actions:pe(Sce).min(1)}).strict(),kce=F({id:N().min(1),secretHash:N().regex(/^[a-f0-9]{64}$/),displayName:N(),grants:pe(H5),issuedAt:Z().int().nonnegative(),expiresAt:Z().int().positive().optional(),maxUses:Z().int().positive().optional(),usedCount:Z().int().nonnegative(),peerOwnerId:N().min(1).optional(),firstUsedByPeerAt:Z().int().positive().optional(),peerDisplayName:N().optional()}).strict(),Cce=kce.omit({secretHash:!0});F({type:he("whoami:ok"),owner:F({id:N(),kind:Ue(["owner","guest"]),displayName:N(),ownerId:N(),provider:N()}).strict(),capability:Cce,grantedPersonas:pe(F({id:N().min(1),displayName:N()}).strict())}).strict();const Nce="PEER_LOGIN_EXPIRED";F({selfUrl:N().min(1)});F({type:he("contact:handshake:ok"),owner:F({id:N(),ownerId:N(),provider:N(),displayName:N()}),grants:pe(H5)});const jce=Ws("status",[F({status:he("authorized"),login:N().min(1),source:Ue(["git","file"])}).strict(),F({status:he("missing")}).strict(),F({status:he("invalid"),message:N().min(1)}).strict(),F({status:he("pending"),authUrl:N().url()}).strict()]);F({token:N().min(1)}).strict();F({returnTo:N().url().optional()}).strict();const Ece=F({url:N().url(),bin:N(),sha256:N().regex(/^[0-9a-f]{64}$/),size:Z().int().positive()}),Ice={label:"Debian 13"},M7=["node","npm"],Tce=["claude","codex","git","lark-cli","pi","pi-mcp-bridge","pi-cliproxyapi-provider","python3","jq","rsync","psql","go","chromium","fonts-wqy-microhei","openssh-server","pnpm","whiteboard-cli","s","supabase-mcp","mcp-server-kibana","aliyun"],Rce=F({name:N().min(1),from:N().optional(),version:N().optional(),min:N().optional(),library:Re().optional(),localVersion:N().optional(),artifact:Ece.optional(),aptMissing:he(!0).optional(),aptVersion:N().optional()}),U5=N().regex(/^[a-z0-9-]+$/,"连接器名只能是小写字母、数字和短横线"),P7=["proxy","env"],A7=["mcp","cli"],Mce=["bearer","lark-sidecar"],O7=["none","shared","personal"],W5=["oauth","fields"],Tw=N().regex(/^[A-Z][A-Z0-9_]*$/,"要填的变量名只能是大写字母、数字和下划线,且以字母开头"),Pce=F({name:N().min(1),env:pe(Tw).min(1)}),D7=F({name:U5,kind:Ue(P7),runner:Ue(A7),protocol:Ue(Mce).optional(),id:N().min(1),credentialSource:Ue(O7).optional(),auth:Ue(W5).optional(),publisherUnionId:N().regex(/^on_[A-Za-z0-9_-]+$/).optional(),fields:pe(Tw).default([]),http:F({url:N().min(1),headers:Qi(N(),N())}).optional()}),$7=["LARKSUITE_CLI_APP_ID","LARKSUITE_CLI_APP_SECRET"];function V5(e){return e.name==="feishu"&&e.runner==="cli"&&e.kind==="env"&&e.credentialSource==="shared"}function Ace(e){return e.name==="feishu"&&e.id==="feishu"&&e.runner==="cli"&&e.kind==="proxy"&&e.protocol==="lark-sidecar"&&e.credentialSource==="shared"&&e.auth==="oauth"&&e.fields.length===0}function L7(e){if(!e.credentialSource)return[`连接器 ${e.name} 还没选用谁的账号`];const t=[];return Ace(e)?t:e.protocol==="lark-sidecar"&&e.credentialSource==="shared"?["连接器 feishu 的发布者 OAuth 配置不完整,请重新选择账号身份"]:V5(e)?$7.filter(n=>!e.fields.includes(n)).map(n=>`连接器 feishu 的 Lark App Bot 缺少 ${n==="LARKSUITE_CLI_APP_ID"?"App ID":"App Secret"}`):(e.credentialSource==="personal"&&(e.auth?e.auth==="oauth"&&e.kind==="env"?t.push(`连接器 ${e.name} 是进程型(stdio MCP / CLI),只能粘贴 API key,走不了 OAuth`):e.auth==="fields"&&e.fields.length===0&&t.push(`连接器 ${e.name} 要填的变量还没列`):t.push(`连接器 ${e.name} 还没选用户怎么关联账号`)),e.credentialSource==="shared"&&e.fields.length===0&&t.push(`连接器 ${e.name} 选了发布者的账号,但要填的变量还没列`),t)}const Oce=/^([A-Za-z0-9._/-]+)@([A-Za-z0-9._-]+)(?:\?tags=([A-Za-z0-9_,]+))?$/,Dce=["main","master","HEAD","latest"];function $ce(e){const t=Oce.exec(e);return!!t&&!Dce.includes(t[2])}function B7(e){var n,r;return M7.includes(e.name)||Tce.includes(e.name)?[]:(n=e.from)!=null&&n.startsWith("github:")&&!e.artifact?[`${e.name} 还没钉下载资产(github: 要具体到哪个文件)——重新扫描`]:(r=e.from)!=null&&r.startsWith("go:")&&!$ce(e.from.slice(3))?[`${e.name} 还没钉版本(go: 要写成 <module>@<tag>,不收 latest / main 这类移动引用)——重新扫描`]:[]}function q5(e){return e.connectors.filter(t=>t.credentialSource==="shared"&&t.fields.length>0).map(t=>({name:t.name,env:[...t.fields]}))}function Lce(e){return[...new Set([...e.envVars.flatMap(t=>t.env),...q5(e).flatMap(t=>t.env)])]}function Bce(e){const t=new Set(e.connectors.flatMap(n=>n.fields));return[...new Set(e.envVars.flatMap(n=>n.env))].filter(n=>t.has(n)).map(n=>`${n} 同时是环境变量和连接器的字段,只能留一处——重新扫描`)}const Fce=e=>{if(!e||typeof e!="object")return e;let t=e;if("clis"in t&&Array.isArray(t.clis)){const{clis:n,...r}=t;t="packages"in r?r:{...r,packages:n}}if("assets"in t&&Array.isArray(t.assets)&&t.assets.length===0){const{assets:n,...r}=t;t=r}if("secrets"in t&&Array.isArray(t.secrets)){const{secrets:n,...r}=t,s=new Set((Array.isArray(r.connectors)?r.connectors:[]).flatMap(o=>Array.isArray(o==null?void 0:o.fields)?o.fields:[])),i=n.map(o=>({...o,env:Array.isArray(o==null?void 0:o.env)?o.env.filter(l=>!s.has(l)):o==null?void 0:o.env})).filter(o=>!Array.isArray(o.env)||o.env.length>0);t={...r,envVars:[...Array.isArray(r.envVars)?r.envVars:[],...i]}}return t},zce="Publisher test: ",F7=F({version:he(1),entry:N().max(240).regex(/^[A-Za-z0-9_.-]+(?:\/[A-Za-z0-9_.-]+)*\.mjs$/).refine(e=>!e.split("/").some(t=>[".",".."].includes(t))),timeoutSeconds:Z().int().min(1).max(600),checks:pe(N().regex(/^[a-z0-9][a-z0-9-]{0,63}$/)).min(1).max(64).refine(e=>new Set(e).size===e.length)}).strict(),z7={test:F7.optional(),packages:pe(Rce),envVars:pe(Pce).default([]),connectors:pe(D7).default([])};F(z7);const K5=mce(Fce,F({version:he(1),...z7}).strict()),Hce=F({target:N().min(1),reason:N().min(1),file:N().min(1),quote:N().min(1)}),Uce=["integration","production"],Vs=Ue(Uce),yc=N().regex(/^[a-z0-9.-]+(?::[0-9]+)?\/[a-z0-9._/-]+@sha256:[a-f0-9]{64}$/),dj=N().regex(/^[a-f0-9]{40}$/),Wce=N().refine(e=>{try{const t=new URL(e);return t.protocol==="https:"&&!t.username&&!t.password&&!t.search&&!t.hash&&t.pathname==="/"&&/(^|[.-])int([.-]|$)/.test(t.hostname)}catch{return!1}},"测试验证地址必须明确指向 int HTTPS 环境"),Vce=F({version:he(1),runId:N().regex(/^[A-Za-z0-9_-]{1,128}$/),status:he("passed"),exitCode:he(0),result:F({version:he(1),runId:N().regex(/^[A-Za-z0-9_-]{1,128}$/),checks:pe(F({name:N().regex(/^[a-z0-9][a-z0-9-]{0,63}$/),status:he("passed"),reason:N().max(1024).optional()}).strict()).min(1).max(64)}).strict(),execution:F({image:yc,imageID:N().min(1).max(512),engine:Ue(["codex","pi"]),podUid:N().min(1).max(512),jobUid:N().min(1).max(512)}).strict()}).strict(),H7=F({status:he("passed"),fingerprint:N().regex(/^[a-f0-9]{64}$/),checks:pe(N().regex(/^[a-z0-9-]+$/)),endpoint:Wce,verifiedAt:N().refine(e=>Number.isFinite(Date.parse(e))),test:Vce.optional()}).strict(),U7=F({engine:N().min(1),model:N(),effort:N(),size:N().min(1),cpu:Z().positive(),taskConcurrency:Z().int().positive(),minPods:Z().int().nonnegative().safe().optional()}).strict(),W7=F({version:he(1),environment:he("integration"),component:he("persona"),image:yc,commit:dj,baseImage:yc,pipelineCommit:dj,repository:N().regex(/^[A-Za-z0-9_.-]+\/[A-Za-z0-9_.-]+$/),config:U7.optional(),verification:H7.refine(e=>e.checks.includes("persona-smoke")),test:F7.optional()}).strict().refine(e=>{if(!e.test)return e.verification.test===void 0;const t=e.verification.test;return["persona-dialogue","persona-task","persona-custom-test"].every(n=>e.verification.checks.includes(n))&&t!==void 0&&t.execution.image===e.image&&t.runId===t.result.runId&&t.result.checks.length===e.test.checks.length&&new Set(t.result.checks.map(n=>n.name)).size===e.test.checks.length&&t.result.checks.every(n=>e.test.checks.includes(n.name))},"Declared publisher acceptance requires complete candidate runtime evidence");F({version:he(1),environment:he("integration"),component:he("base"),image:yc,commit:dj,verification:H7.refine(e=>e.checks.includes("base-smoke"))}).strict();const Cg="-cloud",G5=`codex${Cg}`,Ng={standard:"default",fast:"priority"},qce=`claude${Cg}`;function V7(e){return e==="codex"||e===G5}const q7="pi",Kce=`${q7}${Cg}`;function K7(e){return e===q7||e===Kce}function Ql(e){return typeof e=="string"&&e.length>Cg.length&&e.endsWith(Cg)}const G7=Ue([Ng.standard,Ng.fast]),Y5=["tiny","small","medium","large","xlarge"],Gce=Ue(Y5),Hb="medium",Ub=[.5,1,2],Yce=Z().refine(e=>Ub.includes(e),"Unsupported CPU"),hj={tiny:.5,small:1,medium:1,large:2,xlarge:2},Y7=F({model:N().optional(),effort:N().optional()}).strict(),Am=F({personaId:N(),label:N(),model:N().optional(),effort:N().optional(),serviceTier:G7.optional(),public:Re(),iconKey:N().optional(),tool:N().optional(),size:N().optional(),cpu:Z().finite().optional(),taskConcurrency:Z().int().positive().optional(),minPods:Z().int().nonnegative().safe().optional(),cloudEngine:Y7.optional(),createdAt:Z(),updatedAt:Z(),cloud:F({gatewayUrl:N().min(1),personaId:N().min(1),publishedByMe:Re().optional(),collaboratedByMe:Re().optional(),label:N().optional(),environment:Vs.optional(),expectedImage:yc.optional(),testReleaseId:N().optional()}).strict().optional()}).strict(),Xce=F({name:N().min(1),description:N().optional()}),Zce=F({id:N().min(1)}),X7=F({writableRoots:pe(N()).optional(),denyRead:pe(N()).optional(),network:Re().optional()}).strict(),Qce=F({permissions:F({defaultMode:N().optional(),allow:pe(N()).optional(),deny:pe(N()).optional()}).optional(),sandbox:F({enabled:Re().optional(),autoAllowBashIfSandboxed:Re().optional(),allowUnsandboxedCommands:Re().optional(),excludedCommands:pe(N()).optional(),filesystem:F({denyRead:pe(N()).optional(),allowRead:pe(N()).optional(),denyWrite:pe(N()).optional(),allowWrite:pe(N()).optional()}).optional(),network:F({allowedDomains:pe(N()).optional(),allowLocalBinding:Re().optional()}).optional()}).optional()});Am.extend({personality:N().optional(),personalityLocal:N().optional(),personalityManaged:Re().optional(),skills:pe(Xce).optional(),plugins:pe(Zce).optional(),sandboxSettings:Qce.nullable().optional(),codexSandbox:X7.nullable().optional()});F({slug:N().regex(/^[a-z0-9]+(-[a-z0-9]+)*$/).max(32),label:N().min(1),personality:N(),model:N().optional(),effort:N().optional(),serviceTier:Am.shape.serviceTier,tool:N().optional(),public:Re().optional(),iconKey:N().optional()}).strict();F({personaId:N().min(1)});F({personaId:N().min(1),patch:F({label:N().min(1).optional(),model:N().optional(),effort:N().optional(),serviceTier:Am.shape.serviceTier,tool:N().optional(),size:Gce.optional(),cpu:Yce.optional(),taskConcurrency:Am.shape.taskConcurrency,minPods:Am.shape.minPods,cloudEngine:Y7.optional(),personality:N().optional(),personalityLocal:N().optional(),public:Re().optional(),iconKey:N().nullable().optional(),codexSandbox:X7.optional()}).strict()}).strict();F({version:he(1),manifest:K5}).strict();const Jce=["hard","soft"],Z7=Ue(Jce),eue=Ue(["scanning","done","failed"]),Q7=F({id:N().min(1),manifest:K5,scanSessionId:N().optional(),status:eue,evidence:pe(Hce).default([]),notes:pe(N()).default([]),head:N().min(1).optional(),baseKind:Z7.default("hard"),base:N().min(1).optional(),startedAt:Z(),finishedAt:Z().optional(),error:N().optional()}).strict(),X5=F({id:N().min(1).optional(),environment:Vs.optional(),legacy:Re().optional(),head:N().min(1),contentHead:N().min(1),scanId:N().min(1),at:Z(),pushed:Re().optional(),runId:Z().int().positive().optional(),runAttempt:Z().int().positive().optional(),artifactId:Z().int().positive().optional(),verified:W7.optional(),config:U7.optional(),reconfigOf:N().min(1).optional(),workflowVersion:Z().int().positive().optional(),confirmation:F({fingerprint:N().regex(/^[a-f0-9]{64}$/),runId:Z().int().positive(),runAttempt:Z().int().positive(),at:Z()}).strict().optional()}).strict(),tue=["prepared","main-pushed","dispatching","dispatched","completed","failed"],Z5=F({id:N().min(1),releaseId:N().min(1),at:Z(),verified:W7.optional(),phase:Ue(tue),expectedMain:N().optional(),runId:Z().int().positive().optional(),runAttempt:Z().int().positive().optional(),error:N().optional()}).strict(),C4=F({channelId:N().min(1),updatedAt:Z()}).strict(),Q5=F({integration:C4.nullable().optional(),production:C4.nullable().optional()}).strict();F({version:he(4),engineChannels:Q5.optional(),scans:pe(Q7),releases:pe(X5),promotions:pe(Z5).default([])}).strict();const nue=F({url:N().min(1),branch:N().min(1),head:N().min(1),dirty:Re(),ahead:Z()}).strict(),Cy=F({env:N().min(1),setAt:Z().optional()}).strict(),N4={baseUrl:"CLAWD_ENGINE_BASE_URL",apiKey:"CLAWD_ENGINE_API_KEY"},rue="模型订阅只写进去一半——重填或改回平台默认";function Wb(e){if(!e)return;const t=r=>e.some(s=>s.env===r&&s.setAt!==void 0),n=[N4.baseUrl,N4.apiKey].filter(t).length;return n===2?"own":n===0?"platform":"partial"}function sue(e){const t=e.trim();let n;try{n=new URL(t)}catch{throw new Error("订阅地址要以 http:// 或 https:// 开头,形如 https://cpa.example.com")}if(n.protocol!=="http:"&&n.protocol!=="https:"||!n.hostname)throw new Error("订阅地址要以 http:// 或 https:// 开头,形如 https://cpa.example.com");const r=`${n.origin}${n.pathname}`.replace(/\/+$/,"");return r.endsWith("/v1")?r:`${r}/v1`}const iue=["pending","running","done","failed","waiting","skipped"],oue=Ue(iue),vo="verify",Om=["build","smoke","deploy",vo],aue=Ue(Om),lue=F({key:aue,status:oue,url:N().optional(),jobId:Z().optional(),startedAt:Z().optional(),completedAt:Z().optional(),cliWarnings:pe(N()).optional()}).strict(),Ny=F({runId:Z(),headSha:N().min(1),status:Ue(["queued","running","completed"]),htmlUrl:N().min(1),jobs:pe(lue),environment:Vs.optional(),branch:N().optional(),event:N().optional(),runAttempt:Z().int().positive().optional(),conclusion:Ue(["success","failure"]).optional(),promotionId:N().optional()}).strict();function J7(e,t){return t&&e.head===t.head?t.contentHead:e.head}function Rw(e,t,n){return!e||!t||e.status!=="done"?!1:e.head===J7(t,n)&&!t.dirty}function J5(e,t,n){return!e||!t||e.status!=="done"||!e.head?!1:e.head!==J7(t,n)}function j4(e,t,n){return Rw(e,t,n)||J5(e,t,n)}function cue(e,t){return!t||!e.head?!1:t.contentHead===e.head||t.at>=e.startedAt}const eH=["codex","pi","claude"];function pl(e){return eH.includes(e||"claude")}const tH={codex:"0.163.0",pi:"1.3.0",claude:"0.3.304"},uue="2.1.304";function due(e,t){if(!e||!pl(e)||!t)return null;const n=e==="claude"?uue:tH[e];return n===t?null:{tool:e,cloud:n,local:t}}function nH(e){const t=e.tool||"claude",n=t==="claude"?e.cloudEngine??{}:e;return{tool:t,model:n.model??"",effort:n.effort??""}}const Ik=F({runId:Z(),status:Ny.shape.status,conclusion:Ue(["success","failure"]).optional(),htmlUrl:N().min(1)}).strict(),hue=F({desired:Z().int().nonnegative().safe(),ready:Z().int().nonnegative().safe(),bound:Z().int().nonnegative().safe(),starting:Z().int().nonnegative().safe(),retiring:Z().int().nonnegative().safe(),observedAt:Z(),error:N().nullable()}).strict(),E4=F({online:Re().optional(),image:yc.optional(),minPods:Z().int().nonnegative().safe().optional(),reservation:hue.nullable().optional(),reservationError:N().optional()}).strict(),rH=F({personaId:N().min(1),engineChannels:Q5.optional(),github:jce.optional(),publisherFeishuAuth:F({integration:F({connected:Re(),authUrl:N().optional(),error:N().optional()}).strict(),production:F({connected:Re(),authUrl:N().optional(),error:N().optional()}).strict()}).strict().optional(),repo:nue.optional(),scans:pe(Q7).default([]),releases:pe(X5).default([]),promotions:pe(Z5).optional(),targets:F({integration:E4.extend({run:Ny.optional(),secrets:pe(Cy).optional(),unpublish:Ik.optional()}).optional(),production:E4.extend({run:Ny.optional(),secrets:pe(Cy).optional(),unpublish:Ik.optional()}).optional()}).strict().optional(),secrets:pe(Cy).optional(),run:Ny.optional(),online:Re().optional(),unpublish:Ik.optional(),historyError:N().optional()}).strict();F({before:Z().nullable()}).strict();rH.pick({personaId:!0,github:!0,repo:!0,scans:!0,releases:!0,promotions:!0,engineChannels:!0,historyError:!0});rH.pick({scans:!0});F({environment:Vs,secrets:pe(Cy).optional(),engineChannels:Q5.optional()}).strict();const fue=e=>e.includes("minPods")?3:2,jg=1,pue=["engine","model","effort","size","cpu","taskConcurrency","minPods"];function mue(e){const{tool:t,model:n,effort:r}=nH(e),s=(e.size??"").trim()||Hb,i=e.cpu??hj[s]??hj[Hb];return{engine:t,model:n.trim(),effort:r.trim(),size:s,cpu:i,taskConcurrency:e.taskConcurrency??jg,minPods:e.minPods??0}}function sH(e,t){return!e||!t?null:pue.filter(n=>n==="minPods"?(e.minPods??0)!==(t.minPods??0):e[n]!==t[n])}F({sha:N().min(1),actionsUrl:N().min(1),releaseId:N().optional()}).strict();const Ic=F({personaId:N().min(1)}).strict(),gue=Ue(["owner","editor","admin"]),iH=F({displayName:N(),mine:Re(),acquiredAt:N(),expiresAt:N()}).strict(),xue=Ue(["invited","active","failed"]),vue=F({unionId:N(),displayName:N(),githubLogin:N().nullable(),createdAt:N(),repoAccess:xue.optional(),repoError:N().optional()}).strict();F({role:gue,collaborators:pe(vue),lock:iH.nullable(),lockRequired:Re()}).strict();Ic.extend({deviceId:N().min(1)}).strict();Ic.extend({unionId:N().min(1)}).strict();Ic.extend({action:Ue(["acquire","renew","release"])}).strict();F({required:Re(),lock:iH.nullable()}).strict();F({personaId:N().min(1)}).strict();Ic.extend({releaseHead:N().min(1).optional(),releaseId:N().min(1).optional(),environment:Vs.optional()}).strict();Ic.extend({scanBase:Z7.optional()}).strict();Ic.extend({scanId:N().min(1)}).strict();Ic.extend({releaseId:N().min(1)}).strict();Ic.extend({environment:Vs.default("production")}).strict();F({confirmation:X5.shape.confirmation.unwrap()}).strict();F({promotion:Z5}).strict();F({personaId:N().min(1),expectedImage:yc}).strict();F({personaId:N().min(1),scanId:N().min(1),patch:F({manifest:K5.optional(),connector:D7.optional()}).strict()}).strict();F({personaId:N().min(1),environment:Vs.default("production"),scanId:N().min(1),name:N().min(1),values:Qi(N(),N())}).strict();F({personaId:N().min(1),environment:Vs.default("production"),channelId:N().min(1).optional(),auth:F({baseUrl:N(),apiKey:N()}).strict().nullable().optional()}).strict().refine(e=>e.channelId!==void 0||e.auth!==void 0,{message:"Either channelId or auth must be provided"});F({personaId:N().min(1),environment:Vs.default("production"),releaseId:N().optional(),jobId:Z()}).strict();const yue="底座已更新,重试仍会用旧底座构建——请重新发布测试环境";F({personaId:N().min(1),kind:Ue(["package","env","connector"]),item:Qi(N(),Qa()),evidence:F({reason:N().min(1),file:N().min(1),quote:N().min(1)})}).strict();F({personaId:N().min(1),notes:pe(N()).default([])}).strict();const oH="ottin4ttc";function Wh(e){return e.trim().replace(/^git@[^:]+:/,"").replace(/^https?:\/\/[^/]+\//,"").replace(/\.git$/,"")}F({environment:Vs.default("production")}).strict();const bue="LOGIN_EXPIRED",wue=F({deviceId:N().min(1),name:N().min(1),url:N().min(1)});F({type:he("device:list:ok"),devices:pe(wue)});F({deviceId:N().min(1),url:N().min(1).optional(),name:N().optional()});F({type:he("device:connect:ok"),deviceId:N(),name:N(),url:N()});const aH=F({ownerId:N().min(1),provider:N().min(1),displayName:N().min(1),avatarUrl:N().optional(),unionId:N().optional()});F({type:he("auth:login:start:ok"),environment:Vs.optional(),authUrl:N().min(1),state:N().min(1)});F({type:he("auth:getIdentity:ok"),identity:aH.nullable(),deviceId:N().min(1)});F({type:he("auth:logout:ok")});const lH=N().nullable();F({type:he("auth:apiKey:get:ok"),apiKey:N().nullable(),createdAt:N().nullable(),gatewayUrl:lH});F({type:he("auth:apiKey:regenerate:ok"),apiKey:N().min(1),createdAt:N().min(1),gatewayUrl:lH});F({type:he("auth:apiKey:revoke:ok"),revoked:Re()});F({type:he("auth:login:done"),environment:Vs.optional(),identity:aH});F({type:he("auth:login:failed"),environment:Vs.optional(),reason:N()});F({deviceId:N().min(1),remoteAccessAllowed:Re()}).strict();F({type:he("contact:setRemoteAccess:ok"),deviceId:N().min(1),remoteAccessAllowed:Re()}).strict();F({type:he("contact:remote-access-updated"),deviceId:N().min(1),remoteAccessAllowed:Re()}).strict();F({personaId:N().min(1)}).strict();const _ue=["connected","missing","reauth"],Sue=["link","fill"],kue=F({name:U5,id:N().min(1),kind:Ue(P7),runner:Ue(A7),auth:Ue(W5),status:Ue(_ue),action:Ue(Sue),authUrl:N().optional(),note:N().optional(),fields:pe(Tw)}).strict();F({connectors:pe(kue)}).strict();F({personaId:N().min(1),name:U5,values:Qi(Tw,N().min(1))}).strict();const Cue=F({deviceId:N().min(1),ownerId:N().min(1),provider:N().min(1),displayName:N(),remoteUrl:N().min(1),connectToken:N(),grants:pe(H5),addedAt:Z().int().nonnegative(),pinnedAt:Z().int().nullable().default(null),remoteAccessAllowed:Re().default(!1),note:N().default("")}).strict(),cH=Cue;F({deviceId:N().min(1)}).strict();F({type:he("contact:remove:ok"),deviceId:N().min(1)}).strict();F({type:he("contact:list:ok"),contacts:pe(cH)}).strict();F({type:he("contact:added"),contact:cH}).strict();F({type:he("contact:removed"),deviceId:N().min(1)}).strict();F({deviceId:N().min(1),pinned:Re()}).strict();F({deviceId:N().min(1),note:N()}).strict();F({type:he("contact:setNote:ok"),deviceId:N().min(1),note:N()}).strict();F({type:he("contact:pin:ok"),deviceId:N().min(1),pinnedAt:Z().int().nullable()}).strict();F({type:he("contact:pinned"),deviceId:N().min(1),pinnedAt:Z().int().nullable()}).strict();const uH=8,Nue=["submitted","working","input_required","completed","failed","canceled","rejected"],eT=Ue(Nue),jue=/^[A-Za-z0-9_.-]{1,128}$/,Tk=/^[a-z0-9-]{1,128}$/;function Eue(e){if(e.startsWith("cloud:")){const s=e.slice(6);return Tk.test(s)?{kind:"cloud",personaId:s}:null}const t=e.indexOf("@");if(t<0)return Tk.test(e)?{kind:"here",personaId:e}:null;const n=e.slice(0,t),r=e.slice(t+1);return Tk.test(n)&&jue.test(r)?{kind:"device",personaId:n,deviceId:r}:null}const Iue=F({target:N().refine(e=>Eue(e)!==null,{message:"target must be <personaId>, <personaId>@<deviceId> or cloud:<personaId>"}),text:N().min(1),brief:N().optional(),contextId:N().min(1).optional(),taskId:N().min(1).optional(),sessionLabel:N().min(1).max(60).optional(),model:N().min(1).optional(),tool:N().min(1).optional(),meta:Qi(Qa()).optional()}).refine(e=>!(e.contextId&&e.taskId),{message:"contextId (new round) and taskId (answer) are mutually exclusive"}).refine(e=>!((e.contextId||e.taskId)&&(e.model||e.tool)),{message:"a follow-up cannot change engine or model (contextId / taskId exclude model / tool); start a new line instead"});F({calls:pe(Iue).min(1).max(uH),sessionId:N().min(1).optional()});const Tue=6e4;F({taskIds:pe(N().min(1)).min(1).max(uH),timeoutMs:Z().int().min(0).max(Tue)});F({taskId:N().min(1),text:N().trim().min(1)});F({taskId:N().min(1)});F({contextId:N().min(1).optional(),state:eT.optional(),sessionId:N().min(1).optional(),relatedSessionId:N().min(1).optional()});F({contextId:N().min(1),state:Ue(["completed","failed","input_required"]),text:N(),brief:N().optional(),filePaths:pe(N().min(1)).optional()});const tT=F({taskId:N().min(1),contextId:N().min(1),round:Z().int().positive(),state:eT,stale:Re(),reason:N().nullable(),depth:Z().int().min(0),tenant:N(),targetPersonaId:N(),targetDeviceId:N().nullable(),initiator:F({host:N(),personaId:N(),sessionRef:N().nullable()}),executorSessionRef:N().nullable(),executorThreadId:N().nullable(),workerSessionId:N().optional(),sessionLabel:N().optional(),taskText:N(),brief:N().nullable(),resultText:N().nullable(),filePaths:pe(N()),line:Qi(Qa()),deliveredAt:N().nullable(),createdAt:N(),updatedAt:N(),finishedAt:N().nullable()}),Rue=Ws("ok",[F({ok:he(!0),task:tT}),F({ok:he(!1),error:F({code:N(),message:N()})})]);F({results:pe(Rue)});F({tasks:pe(tT)});F({tasks:pe(tT),done:Re()});const Mue=/^[a-z0-9][a-z0-9-]*$/;Ue(["stopped","starting","running","crashed","invalid"]);const Pue=new Set(["localhost","127.0.0.1"]);function Aue(e){let t;try{t=new URL(e)}catch{return!1}return!!(t.protocol==="https:"||t.protocol==="http:"&&Pue.has(t.hostname))}const l0=F({id:N().regex(Mue),name:N().min(1),version:N().min(1),apiVersion:he("1"),runtime:F({startCommand:N().min(1)}).passthrough().optional(),entry:F({url:N().url().refine(Aue,{message:"INVALID_URL_SCHEME: only https or http://localhost is allowed"})}).strict().optional()}).passthrough().superRefine((e,t)=>{var s;const n=!!e.runtime,r=!!((s=e.entry)!=null&&s.url);n&&r&&t.addIssue({code:_e.custom,message:"INVALID_MANIFEST: entry.url and runtime cannot coexist"}),!n&&!r&&t.addIssue({code:_e.custom,message:"INVALID_MANIFEST: must have either entry.url or runtime"})}),Oue=Ws("kind",[F({kind:he("local"),port:Z().int().min(1).max(65535)}),F({kind:he("hosted"),url:N().url()})]);Ws("state",[F({extId:N(),manifest:l0,state:he("stopped")}),F({extId:N(),manifest:l0,state:he("starting")}),F({extId:N(),manifest:l0,state:he("running"),target:Oue}),F({extId:N(),manifest:l0,state:he("crashed")}),F({extId:N(),manifest:Qa().nullable(),state:he("invalid"),invalidReason:N().min(1)})]);F({snapshotHash:N().min(1),version:N().min(1),publishedAt:Z()});const Due=Ws("kind",[F({kind:he("p2p-tunnel"),ownerPrincipalId:N().min(1),extId:N().min(1)})]);Ws("kind",[F({kind:he("p2p-tunnel"),ownerPrincipalId:N().min(1),extId:N().min(1),snapshotHash:N().min(1)})]);F({extId:N().min(1),name:N().min(1),version:N().min(1),contentHash:N().min(1),publishedAt:Z()});const $ue=Ws("kind",[F({kind:he("clean")}),F({kind:he("ready-new-version"),fromVersion:N().min(1),toVersion:N().min(1)}),F({kind:he("error-same-hash"),version:N().min(1)}),F({kind:he("error-version-not-bumped"),localVersion:N().min(1),publishedVersion:N().min(1)}),F({kind:he("error-version-regression"),localVersion:N().min(1),publishedVersion:N().min(1)})]);function Lue(e){let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=Math.imul(t,16777619)>>>0;return(t>>>0).toString(16).padStart(8,"0")}function nT(e,t){return`${e}-${Lue(t)}`}function rT(e){if(typeof e!="string")return{ok:!1,reason:"version must be a string"};const t=e.split(".");if(t.length!==3)return{ok:!1,reason:`"${e}" — only MAJOR.MINOR.PATCH allowed`};for(const n of t)if(!/^\d+$/.test(n))return{ok:!1,reason:`"${e}" — only numeric segments allowed`};return{ok:!0}}function dH(e,t){const n=I4(e),r=I4(t);for(let s=0;s<3;s++){if(n[s]<r[s])return-1;if(n[s]>r[s])return 1}return 0}function I4(e){const t=rT(e);if(!t.ok)throw new Error(t.reason);const[n,r,s]=e.split(".").map(i=>parseInt(i,10));return[n,r,s]}F({localManifest:F({name:N().min(1),version:N().min(1),contentHash:N().min(1)}),publishState:Ws("kind",[F({kind:he("unpublished")}),F({kind:he("published"),version:N().min(1),contentHash:N().min(1),publishedAt:Z()})]),check:$ue});F({extId:N().min(1),newVersion:N().min(1).nullish()});F({extId:N().min(1)});F({extId:N().min(1),snapshotHash:N().min(1)});F({channelRef:Due,snapshotHash:N().min(1),zipBase64:N().min(1)});F({id:N().min(1),peerDeviceId:N().min(1),senderDeviceId:N().min(1),text:N().min(1),createdAt:Z().int().nonnegative(),readBy:Qi(N().min(1),Z().int().positive()).default({}),origin:F({kind:he("persona"),personaId:N().min(1)}).optional()}).strict();F({peerDeviceId:N().min(1).optional(),id:N().min(1),text:N().min(1),createdAt:Z().int().nonnegative(),origin:F({kind:he("persona"),personaId:N().min(1)}).optional()}).strict();F({peerDeviceId:N().min(1),sinceCreatedAt:Z().int().nonnegative().optional()}).strict();F({peerDeviceId:N().min(1),upToCreatedAt:Z().int().nonnegative()}).strict();F({peerDeviceId:N().min(1).optional(),text:N().min(1)});F({peerDeviceId:N().min(1).optional(),command:N().min(1),timeoutMs:Z().int().positive().optional()}).strict();F({type:he("peerExec:run:ok"),stdout:N(),stderr:N(),exitCode:Z().int().nullable(),timedOut:Re(),stdoutTruncated:Re(),stderrTruncated:Re()}).strict();const hH=Ws("kind",[F({kind:he("at"),at:N().min(1)}),F({kind:he("every"),everyMs:Z().int().positive(),anchorMs:Z().int().nonnegative().optional()}),F({kind:he("cron"),expr:N().min(1),tz:N().min(1).optional()})]),px=N().trim().min(1);F({personaId:px,name:N().min(1),schedule:hH,prompt:N().min(1),targetPersona:N().min(1).optional(),timeoutMs:Z().int().positive().optional()});F({personaId:px,onlyMine:Re().optional()});F({personaId:px,shiftId:N().min(1)});const Bue=F({name:N().min(1).optional(),schedule:hH.optional(),prompt:N().min(1).optional(),targetPersona:N().min(1).optional(),timeoutMs:Z().int().positive().optional(),enabled:Re().optional()});F({personaId:px,shiftId:N().min(1),patch:Bue});F({personaId:px,shiftId:N().min(1),limit:Z().int().positive().optional()});const Hi="persona-master",sT=F({personaId:N().min(1),deviceId:N().min(1).optional()}),fH=F({id:N().min(1),name:N().min(1),memberPersonas:pe(sT),memberContactDeviceIds:pe(N().min(1)),createdAt:N().min(1),updatedAt:N().min(1)}),pH=N().trim().min(1);F({name:pH,memberPersonas:pe(sT).default([]),memberContactDeviceIds:pe(N().min(1)).default([])});F({channelId:N().min(1),name:pH.optional(),memberPersonas:pe(sT).optional(),memberContactDeviceIds:pe(N().min(1)).optional()});F({channelId:N().min(1)});F({channels:pe(fH)});F({channel:fH});F({ok:he(!0),removedTopics:Z().int().min(0)});const hr=N().trim().min(1),iT=["master-confirmed","owner-needed"],oT=["open","resolved"],Fue=iT[0],mH=iT[1],gH=oT[0],zue=oT[1],Hue=Ue(iT),Uue=Ue(oT),Wue=F({id:hr.optional(),resolves:hr.optional(),type:Hue,status:Uue,question:hr,recommendation:hr}).superRefine((e,t)=>{e.type===Fue&&e.status!==zue&&t.addIssue({code:_e.custom,path:["status"],message:"master-confirmed decisions must be resolved"})}),Vue=["planning","running","done"],que=Ue(Vue),xH=F({at:N().min(1),actor:N().min(1),action:N().min(1),target:N().optional(),reason:N().min(1),artifacts:pe(hr).optional(),decision:Wue.optional()}),Kue=F({rejectCount:Z().int().min(0),accepted:Re().default(!1),ordinal:Z().int().min(1).optional(),overrideCount:Z().int().min(0).optional()}),aT=F({id:N().min(1),channelId:N().min(1),title:N(),masterSessionId:N().min(1),goal:N(),boundaries:N(),acceptanceCriteria:pe(N()),activity:pe(xH),lineMeta:Qi(Kue),nextLineOrdinal:Z().int().min(1).optional(),state:que,createdAt:N().min(1),updatedAt:N().min(1)}),Gue=F({lineId:N().min(1),contextId:N().min(1),taskId:N().min(1),workerSessionId:N().optional(),assignee:N().min(1),focus:N(),status:eT,acceptance:pe(N()),rejectCount:Z().int().min(0),accepted:Re(),ordinal:Z().int().min(1).nullable()});F({channelId:N().min(1)});F({topicId:N().min(1).optional(),sessionId:N().min(1).optional()}).refine(e=>e.topicId!==void 0||e.sessionId!==void 0,{message:"either topicId or sessionId is required"});F({channelId:N().min(1),title:hr.optional()});F({topicId:N().min(1),title:hr.optional(),goal:hr,boundaries:N(),acceptanceCriteria:pe(hr).min(1)});F({topicId:N().min(1),action:hr,target:hr.optional(),reason:hr,artifacts:pe(hr).optional(),decision:xH.shape.decision});F({topicId:N().min(1),lineId:hr,reason:hr});F({topicId:N().min(1),lineId:hr,reason:hr,artifacts:pe(hr).optional(),watcherVerdict:Ue(["pass","fail"]),overrideReason:hr.optional()}).refine(e=>e.watcherVerdict!=="fail"||!!e.overrideReason,{message:"watcherVerdict=fail 时必须给 overrideReason(推翻 watcher 的理由)",path:["overrideReason"]});F({topicId:N().min(1),state:Ue(["done"])});F({topicId:N().min(1),title:hr});F({topicId:N().min(1)});const Yue=aT.extend({lineCount:Z().int().min(0)});F({topics:pe(Yue)});F({topic:aT,lines:pe(Gue)});F({topicId:N().min(1),masterSessionId:N().min(1)});F({rejectCount:Z().int().min(1),needsOwnerAttention:Re()});F({acceptedLines:Z().int().min(1),totalLines:Z().int().min(1),allAccepted:Re(),overrides:Z().int().min(0),needsOwnerAttention:Re()});F({topic:aT});F({ok:he(!0),removedMasterSessionId:N().min(1).nullable(),removedWorkerSessionIds:pe(N().min(1))});const Xue=["ask","allow","deny"],vH=Ue(Xue),Zue=F({id:N().min(1),desc:N().min(1),action:vH});F({rules:pe(Zue)});F({ruleId:N().min(1)});F({action:vH,desc:N(),source:N().min(1)});const Que=["created","review-requested"],yH=/^[A-Za-z0-9._-]+$/,Tf=N().min(1).regex(yH),Rf=N().min(1).regex(yH),mx=Z().int().positive();F({role:Ue(Que)});F({owner:Tf,repo:Rf,number:mx});F({owner:Tf,repo:Rf,number:mx,expectedHeadSha:N().min(1)});F({owner:Tf,repo:Rf,number:mx,body:N().min(1)});F({owner:Tf,repo:Rf,number:mx,ready:Re()});F({owner:Tf,repo:Rf});F({owner:Tf,repo:Rf,number:mx,reviewers:pe(N().min(1)).min(1)});F({page:Z().int().min(1).max(1e3).optional(),search:N().max(100).optional()});F({personaId:N().min(1)});F({personaId:N().min(1)});const Jue=["expired","cancelled","access_denied","lark_protocol_error","cloud_unreachable","internal_error"],ede=Ue(Jue);F({personaId:N().min(1),appId:N().min(1),appSecret:N().min(1),botName:N().min(1).optional()});const tde=F({chatId:N().min(1),chatName:N().optional(),lastActiveAt:Z().int().optional()}),nde=F({state:Ue(["unbound","provisioning","bound","broken"]),appId:N().optional(),botName:N().optional(),brokenReason:N().optional(),qrUrl:N().optional(),provisionId:N().optional(),errorReason:ede.optional(),groups:pe(tde),needsUpgrade:Re().optional(),upgradeQrUrl:N().optional()});nde.extend({personaId:N().min(1)});F({});F({onboardingCompletedAt:Z()});const Vh=["claude","codex","pi"];F({});F({tools:pe(F({id:Ue(Vh),available:Re(),version:N().optional(),path:N().optional()}))});F({});const rde=F({tool:Ue(Vh),cwd:N(),toolSessionId:N(),label:N().optional(),createdAt:N(),updatedAt:N(),turns:Z()});F({candidates:pe(rde)});F({});F({registered:Re()});const sde=F({kind:Ue(["rpc","file"]),ref:N().min(1).max(300)});F({question:N().min(1).max(500),status:Ue(["unanswered","answered_unverified"]),answer:N().max(4e3).optional(),resolvedBy:Ue(["rpc","source"]).optional(),evidence:pe(sde).max(20).optional(),docsChecked:pe(N().max(200)).max(20).optional(),unansweredReason:Ue(["no_source_access","user_declined","not_found"]).optional()}).superRefine((e,t)=>{var n;e.status==="answered_unverified"?(e.answer||t.addIssue({code:"custom",path:["answer"],message:"answered_unverified 需要 answer"}),e.resolvedBy||t.addIssue({code:"custom",path:["resolvedBy"],message:"answered_unverified 需要 resolvedBy"}),(n=e.evidence)!=null&&n.length||t.addIssue({code:"custom",path:["evidence"],message:"answered_unverified 需要至少一项 evidence"})):e.unansweredReason||t.addIssue({code:"custom",path:["unansweredReason"],message:"unanswered 需要 unansweredReason"})});F({id:N()});F({tool:Ue(Vh)});const T4=F({usedPercent:Z(),windowDurationMins:Z().optional(),resetsAt:Z().optional()}).strict(),ide=Ws("kind",[F({kind:he("claude"),loggedIn:Re(),authMethod:N().optional(),apiProvider:N().optional(),apiKeySource:N().optional(),email:N().optional(),orgName:N().optional(),subscriptionType:N().optional()}).strict(),F({kind:he("codex"),login:Ws("type",[F({type:he("none")}).strict(),F({type:he("apiKey")}).strict(),F({type:he("chatgpt"),email:N(),planType:N()}).strict()]),provider:F({name:N(),baseUrl:N().optional()}).strict(),rateLimits:F({primary:T4.optional(),secondary:T4.optional()}).strict().optional()}).strict(),F({kind:he("pi"),providers:pe(F({id:N(),modelCount:Z(),credential:Ue(["api_key","oauth"]).optional(),oauthExpiresAt:Z().optional()}).strict())}).strict()]);F({tool:Ue(Vh),installed:Re(),version:N().optional(),path:N().optional(),account:ide.optional(),error:N().optional(),modelsLoadedAt:Z().optional()}).strict();const lT="https://cpa-portal-d417.app.clawos.chat";F({apiKey:N().min(1)}).strict();F({ok:he(!0)}).strict();const bH=["cloud-persona-metrics","cloud-persona-conversations","cloud-persona-schedules"],ode=Ue(bH);F({page:ode}).strict();F({url:N(),expiresAt:Z().int()}).strict();const wH=["ready","session:info","session:status","session:event","session:deleted","session:rewound","session:cleared","session:queue","permission:request","session:question","session:question:cleared","pong","error","subscribed","unsubscribed","auth:ok","tunnel:ready","tunnel:exited","tunnel:unavailable","session:control","session:pty","contact:added","contact:pinned","contact:removed","contact:remote-access-updated","contact:note-updated","org-mesh:progress","channel:changed","inbox:event","friend:reverseTokenOffered","auth:login:done","auth:login:failed","larkBot:state"],ade="cloud_history_refresh",cT=["idle","running","running-idle","stopped","error","observing"],lde=["task-notification","slash-command","local-command","system-reminder","skill-hint","meta-text","attachment-skills","attachment-deferred-tools","a2a-task","a2a-result","dispatch-task","dispatch-result"],cde=["a2a-task","a2a-result","dispatch-task","dispatch-result"];function Mw(e){return cde.includes(e??"")}function ude(e,t){return`${t?"dispatch":"a2a"}-${e}`}const dde=["builtin","global","project","plugin"],hde=["builtin","global","project","policy","plugin"],_H=Ue(["owner","guest"]);F({id:N().min(1),kind:_H,displayName:N(),feishuUnionId:N().optional()}).strict();const fde=F({did:N().min(1),displayName:N(),feishuUnionId:N().optional(),principal:_H}).strict(),pde=Ue(cT),mde=F({inputTokens:Z().int().nonnegative(),outputTokens:Z().int().nonnegative(),cacheReadTokens:Z().int().nonnegative().optional(),cacheCreateTokens:Z().int().nonnegative().optional()}),SH={gitBranch:N().optional(),resolvedModel:N().optional(),resolvedEffort:N().optional(),contextUsage:mde.optional(),contextWindowSize:Z().int().positive().optional(),aiLabel:N().optional()},gde=F(SH),kH=F({value:N(),label:N(),description:N().optional()}),xde=F({id:N().min(1),label:N().min(1),description:N().optional(),contextWindowSize:Z().int().positive().optional(),default:Re().optional(),efforts:pe(kH).optional(),defaultEffort:N().optional(),group:N().optional()}),vde=F({id:N().min(1),label:N().min(1),description:N().optional()}),yde=F({name:N().min(1),type:Ue(["string","select","toggle"]),label:N().min(1),description:N().optional(),options:pe(kH).optional(),default:Qa().optional(),scope:Ue(["core","tool-specific"])});F({tool:N().min(1),refresh:Re().optional()});const bde=F({rewind:Re(),subagents:Re(),tui:Re(),observe:Re(),fileSharing:Re(),fork:Re()});F({tool:N().min(1),toolSessionIdLabel:N().optional(),models:pe(xde),permissionModes:pe(vde),configSchema:pe(yde),features:bde});const wde=F({tool:N().min(1),pattern:N().min(1),createdAt:N().min(1).optional()});F({cloudEnvironment:Vs.optional(),cloudExpectedImage:yc.optional(),testReleaseId:N().optional(),sessionId:N().min(1),cloudConversationId:N().min(1).optional(),cloudWorkspace:Iw.optional(),cloudPendingTurns:pe(F({id:N().min(1),text:N(),prepared:Re().optional()})).optional(),cloudBranchIntent:kg.optional(),cwd:N().min(1),tool:he("claude").or(N().min(1)).default("claude"),toolSessionId:N().optional(),label:N().optional(),model:N().optional(),permissionMode:N().optional(),effort:N().optional(),serviceTier:N().optional(),...SH,aiLabelGeneratedAt:N().optional(),permissionRules:pe(wde).optional(),pinnedAt:Z().int().nonnegative().nullable().optional(),archivedAt:Z().int().nonnegative().nullable().optional(),pinSortOrder:Z().int().nullable().optional(),unreadAt:N().min(1).nullable().optional(),iconKey:N().optional(),forkedFromSessionId:N().min(1).optional(),ephemeral:Re().optional(),deployId:N().min(1).optional(),ownerPersonaId:N().min(1).optional(),projectPath:N().min(1).optional(),chatId:N().min(1).optional(),creatorPrincipalId:N().min(1).optional(),creatorDisplayName:N().min(1).optional(),creatorFeishuUnionId:N().min(1).optional(),originOwnerPrincipalId:N().min(1).optional(),originOwnerPersonaId:N().min(1).optional(),dispatchedFromSessionId:N().min(1).optional(),a2aContextId:N().min(1).optional(),shiftFiredFromSessionId:N().min(1).optional(),larkChatId:N().min(1).optional(),larkChatName:N().min(1).optional(),larkChatType:Ue(["p2p","group"]).optional(),createdAt:N().min(1),updatedAt:N().min(1)});const Rs={turnId:N().min(1).optional(),seq:Z().int().nonnegative().optional(),ts:N().optional(),uuid:N().optional()},_de=Ue(lde),Sde=F({readCount:Z().int().nonnegative().optional(),searchCount:Z().int().nonnegative().optional(),bashCount:Z().int().nonnegative().optional(),editFileCount:Z().int().nonnegative().optional(),linesAdded:Z().int().nonnegative().optional(),linesRemoved:Z().int().nonnegative().optional(),otherToolCount:Z().int().nonnegative().optional()}),kde=F({oldStart:Z().int().nonnegative(),oldLines:Z().int().nonnegative(),newStart:Z().int().nonnegative(),newLines:Z().int().nonnegative(),lines:pe(N())}),Cde=F({agentId:N().optional(),agentType:N().optional(),status:N().optional(),prompt:N().optional(),filePath:N().optional(),structuredPatch:pe(kde).optional(),stats:F({durationMs:Z().int().nonnegative().optional(),tokens:Z().int().nonnegative().optional(),toolUseCount:Z().int().nonnegative().optional(),toolStats:Sde.optional()}).optional()}),Nde=F({path:N(),content:N(),mtimeMs:Z().optional()}),jde=F({label:N().min(1),description:N().optional()}),CH=F({question:N().min(1),multiSelect:Re(),options:pe(jde).min(1)}),Ede=["completed","interrupted"];Ws("kind",[F({...Rs,kind:he("session_init"),toolSessionId:N().optional()}),F({...Rs,kind:he("thinking"),text:N(),partialId:N().optional()}),F({...Rs,kind:he("text"),text:N(),partialId:N().optional()}),F({...Rs,kind:he("user_text"),text:N(),meta:_de.optional(),taskId:N().optional(),parentToolUseId:N().optional(),sender:fde.optional()}),F({...Rs,kind:he("tool_call"),toolUseId:N(),tool:N(),toolKind:N().optional(),input:Qa()}),F({...Rs,kind:he("tool_result"),toolUseId:N(),output:Qa().optional(),error:N().optional(),toolResultExtra:Cde.optional(),sourceToolAssistantUUID:N().optional(),askQuestionAnswers:Qi(N(),N()).optional()}),F({...Rs,kind:he("attachment_memories"),memories:pe(Nde)}),F({...Rs,kind:he("permission_request"),requestId:N(),tool:N(),input:Qa(),toolUseId:N().optional()}),F({...Rs,kind:he("ask_user_question"),toolUseId:N(),questions:pe(CH)}),F({...Rs,kind:he("turn_end"),durationMs:Z().int().nonnegative().optional(),reason:Ue(Ede).optional(),turnId:N().min(1).optional()}),F({...Rs,kind:he("subagent_progress"),toolUseId:N(),agentId:N(),status:Ue(["started","running","completed","failed"]),description:N().optional(),lastToolName:N().optional(),prompt:N().optional(),stats:F({durationMs:Z().int().nonnegative().optional(),tokens:Z().int().nonnegative().optional(),toolUseCount:Z().int().nonnegative().optional()}).optional()}),F({...Rs,kind:he("error"),message:N()}),F({...Rs,kind:he("meta_update"),patch:gde}),F({...Rs,kind:he("meta-text"),text:N(),metaSource:Ue(["cc","owner"]).optional()})]);F({cwd:N().min(1).optional(),tool:N().optional(),label:N().optional(),aiLabel:N().optional(),model:N().optional(),permissionMode:N().optional(),effort:N().optional(),serviceTier:G7.optional(),iconKey:N().optional(),forkedFromSessionId:N().min(1).optional(),forkAt:pce([F({messageUuid:N().min(1)}).strict(),F({turnId:N().min(1)}).strict()]).optional(),ephemeral:Re().optional(),ownerPersonaId:N().min(1).optional(),projectPath:N().min(1).optional()}).refine(e=>e.cwd!=null||e.ownerPersonaId!=null||e.projectPath!=null,{message:"cwd / ownerPersonaId / projectPath 至少传一个"});F({path:N().min(1),name:N().min(1),createdAt:N().datetime(),pinnedAt:Z().optional()});F({path:N().min(1),pinnedAt:Z().nullable()});F({path:N().min(1)});F({path:N().min(1).optional(),name:N().min(1).optional()}).refine(e=>e.path!=null||e.name!=null,{message:"path 与 name 至少给一个"});F({cwd:N().min(1),tool:N().min(1),toolSessionId:N().min(1),label:N().optional(),aiLabel:N().optional(),iconKey:N().optional(),createdAt:N().datetime(),updatedAt:N().datetime(),ownerPersonaId:N().min(1).optional()});F({originOnly:Re().optional(),ownerPersonaId:N().min(1).optional(),limit:Z().int().positive().optional(),offset:Z().int().nonnegative().optional()});F({sessionId:N().min(1)});F({sessionId:N().min(1),patch:F({label:N().optional(),tool:N().min(1).optional(),model:N().optional(),permissionMode:N().optional(),effort:N().optional(),cwd:N().optional(),iconKey:N().optional(),ephemeral:he(!1).optional()})});F({id:N().min(1),text:N(),queuedAt:Z(),senderDisplayName:N().optional()});F({sessionId:N().min(1),text:N(),queueWhileRunning:Re().optional()});F({sessionId:N().min(1),id:N().min(1).optional()});F({sessionId:N().min(1),userMessageId:N().min(1),dryRun:Re().optional()});F({canRewind:Re(),error:N().optional(),filesChanged:pe(N()).optional(),insertions:Z().int().nonnegative().optional(),deletions:Z().int().nonnegative().optional()});F({sessionId:N().min(1),userMessageId:N().min(1)});const Ide=F({oldStart:Z().int().nonnegative(),oldLines:Z().int().nonnegative(),newStart:Z().int().nonnegative(),newLines:Z().int().nonnegative(),lines:pe(N())}),Tde=F({filePath:N().min(1),hunks:pe(Ide),insertions:Z().int().nonnegative(),deletions:Z().int().nonnegative(),status:Ue(["modified","added","deleted"]).optional()});F({canRewind:Re(),error:N().optional(),files:pe(Tde),totalInsertions:Z().int().nonnegative(),totalDeletions:Z().int().nonnegative()});F({userMessageIds:pe(N())});F({sessionId:N().min(1),toolSessionId:N().min(1)});F({cwd:N().min(1),toolSessionId:N().min(1),messageUuid:N().min(1).optional(),turnId:N().min(1).optional(),sourceSessionId:N().min(1).optional(),targetCwd:N().min(1).optional()}).refine(e=>!!(e.messageUuid||e.turnId),"messageUuid or turnId required");F({forkedToolSessionId:N().min(1),forkedFilePath:N().min(1)});F({sessionId:N().min(1),toolSessionId:N().min(1),jsonlPath:N().optional()});F({sessionId:N().min(1),afterSeq:Z().int().min(-1)});F({sessionId:N().min(1),permissionRequestId:N().min(1),allow:Re(),permanent:Re().optional(),pattern:N().optional()});F({projectPath:N().min(1)});F({sessionId:N().min(1),limit:Z().int().positive().max(5e3).optional(),offset:Z().int().nonnegative().optional(),snapshotId:N().uuid().optional(),slim:Re().optional(),view:Ue(["turns","items"]).optional(),cursor:N().min(1).max(16384).optional(),turnId:N().min(1).max(256).optional()}).superRefine((e,t)=>{e.view==="items"&&!e.turnId&&t.addIssue({code:_e.custom,path:["turnId"],message:"items requires turnId"}),e.view&&(e.offset!==void 0||e.slim!==void 0)&&t.addIssue({code:_e.custom,message:"native views do not accept offset or slim"}),!e.view&&(e.cursor!==void 0||e.turnId!==void 0)&&t.addIssue({code:_e.custom,message:"cursor and turnId require a native view"}),e.view==="turns"&&e.turnId!==void 0&&t.addIssue({code:_e.custom,path:["turnId"],message:"turns does not accept turnId"}),e.view&&e.limit!==void 0&&e.limit>100&&t.addIssue({code:_e.custom,path:["limit"],message:"native page limit is 100"})});F({cwd:N().min(1),toolSessionId:N().min(1)});F({cwd:N().min(1),toolSessionId:N().min(1),subagentId:N().min(1)});F({cwd:N().min(1).optional(),path:N().optional(),showHidden:Re().optional()});F({cwd:N().min(1),path:N().min(1)});F({cwd:N().min(1),tool:N().optional()});F({name:N().min(1),source:Ue(dde),path:N().optional(),description:N().optional(),plugin:N().optional()});const Rde=F({name:N().min(1),source:Ue(hde),path:N().optional(),description:N().optional(),whenToUse:N().optional(),plugin:N().optional()});F({cwd:N().min(1),tool:N().optional()});F({agents:pe(Rde)});F({sessionId:N().optional()});F({sessionId:N().min(1).optional()});F({sessionId:N().min(1),pinned:Re()});F({sessionId:N().min(1),archived:Re()});F({query:N().min(1),sessionIds:pe(N().min(1)),limit:Z().int().positive().max(50).optional()});const Mde=F({sessionId:N().min(1),snippet:N()});F({type:he("session:searchContent"),matches:pe(Mde)});F({type:he("peerSession:upsert:ok")});F({sessionId:N().min(1)});F({type:he("peerSession:remove:ok")});F({orderedIds:pe(N().min(1)).min(1)});F({cwd:N().min(1)});F({isGitRoot:Re(),gitRoot:N().nullable()});F({cwd:N().min(1)});F({branch:N().nullable()});F({cwd:N().min(1)});F({branches:pe(N()),head:N().nullable()});const Pde=F({cwd:N().min(1),updatedAt:N().min(1)});F({dirs:pe(Pde)});F({type:he("session:question"),sessionId:N().min(1),toolUseId:N().min(1),requestId:N().min(1),questions:pe(CH).min(1)});F({type:he("session:question:cleared"),sessionId:N().min(1),toolUseId:N().min(1),answers:Qi(N(),N()).optional()});F({sessionId:N().min(1),toolUseId:N().min(1),answers:Qi(N(),N())});F({ok:he(!0)});F({sessionId:N().min(1),toolUseId:N().min(1)});F({ok:he(!0)});const NH=F({name:N().min(1),version:N().min(1),instanceId:N().min(1),deviceLabel:N().transform(e=>e.trim().slice(0,64)).optional()});F({type:he("auth"),token:N().min(1),scheme:he("bearer").optional(),clientInfo:NH.optional()});F({type:he("auth:ok"),version:N().min(1).optional(),protocolVersion:Z().int().nonnegative().optional()});const Ade=F({clientId:N().min(1),connectedAt:Z().int().nonnegative(),self:Re(),clientInfo:NH.optional()});F({type:he("device:connections:ok"),connections:pe(Ade)});F({type:he("tunnel:ready"),url:N().min(1),subdomain:N().min(1)});F({type:he("tunnel:exited"),code:Z().int().nullable(),subdomain:N().nullable(),url:N().nullable()});F({type:he("tunnel:unavailable"),reason:N().min(1),failedAt:N().min(1)});const Ode=F({sessionId:N().min(1),status:pde,freshSpawn:Re(),pendingPermissionRequestIds:pe(N().min(1)),pendingQuestionToolUseIds:pe(N().min(1))});F({type:he("info"),version:N(),protocolVersion:Z(),hostname:N(),os:N(),tools:pe(F({id:N(),available:Re()})),runningSessions:pe(Ode),tokenRole:Ue(bce).optional(),isLoopback:Re().optional(),httpBaseUrl:N().optional(),httpToken:N().optional(),daemonSource:Ue(["ota","packaged"]).optional(),globalCliVersion:N().nullable().optional()});F({});F({method:N().min(1).optional()});const Dde=["allowed","conditional","denied"],$de=Ue(Dde),Lde=F({name:N().min(1),status:$de,description:N().min(1),args:pe(F({name:N(),required:Re()})).nullable(),argsSchema:Qi(Qa()).optional(),reason:N().optional()});F({type:he("meta:methods"),methods:pe(Lde)});const R4=1,Bde=F({usedBytes:Z().int().nonnegative(),sizeBytes:Z().int().positive(),measuredAt:Z().int().nonnegative()}).strict();F({volume:Bde.nullable()}).strict();const M4=25*1024*1024,uT={".png":"image/png",".jpg":"image/jpeg",".jpeg":"image/jpeg",".gif":"image/gif",".webp":"image/webp",".pdf":"application/pdf",".txt":"text/plain",".md":"text/plain",".markdown":"text/plain",".csv":"text/plain",".log":"text/plain",".json":"application/json",".xml":"application/xml",".yaml":"application/yaml",".yml":"application/yaml",".html":"text/html",".conf":"text/plain",".cfg":"text/plain",".ini":"text/plain",".toml":"text/plain"},jH=new Set([...Object.values(uT),"application/x-yaml"]),EH=[...jH,"text/*",...Object.keys(uT)].join(",");function IH(e,t){const n=t.split(";",1)[0].trim().toLowerCase();if(n===""||n==="application/octet-stream"){const r=e.lastIndexOf("."),s=r>0?e.slice(r).toLowerCase():"";return uT[s]??null}return jH.has(n)||n.startsWith("text/")?n:null}const Fde=["daemon","main","renderer"],zde=Ue(Fde),Hde=["debug","info","warn","error"],Ude=Ue(Hde);F({ts:Z().int(),source:zde,level:Ude,msg:N(),ownerPrincipalId:N(),deviceId:N(),appVersion:N(),daemonVersion:N().optional(),os:N(),meta_json:N().optional(),sessionId:N().optional()});F({v:he(1),visitorId:N().min(1),displayName:N(),provider:N(),iat:Z(),exp:Z()});const Wde=F({visitorId:N(),displayName:N(),avatarUrl:N().optional(),provider:N(),firstSeen:Z(),lastSeen:Z()});F({visitors:pe(Wde)});F({type:he("web:open"),url:N().min(1),expiresAt:Z()});F({ticket:N().min(1)}).strict();F({token:N().min(1),expiresAt:Z()});const Vde=/<system-reminder>此消息来自飞书群成员 (.+?)<\/system-reminder>\s*$/,TH=/<system-reminder>此消息来自 (owner|guest):(.+?)<\/system-reminder>\s*$/,qde="clawd-a2a-task",Kde="clawd-a2a-result",Gde="clawd-dispatch-task",Yde="clawd-dispatch-result",Xde=["completed","failed","input_required","canceled","rejected"],P4=120,RH=[{tag:qde,kind:"task",legacy:!1},{tag:Kde,kind:"result",legacy:!1},{tag:Gde,kind:"task",legacy:!0},{tag:Yde,kind:"result",legacy:!0}];function Zde(e){if(!e)return null;let t=null;for(const n of RH){const r=e.search(ohe(n.tag));r>=0&&(t===null||r<t.at)&&(t={at:r,kind:n.kind,legacy:n.legacy})}return t?{kind:t.kind,legacy:t.legacy}:null}function Qde(e){if(!e)return[];const t=[];for(const n of RH){const r=new RegExp(`<${n.tag}\\b([^>]*)>([\\s\\S]*?)</${n.tag}>`,"gi");for(let s=r.exec(e);s!==null;s=r.exec(e))t.push({at:s.index,block:Jde(n.kind,n.legacy,s[1]??"",s[2]??"")})}return t.sort((n,r)=>n.at-r.at).map(n=>n.block)}function Jde(e,t,n,r){var h;const s=ahe(n),i=fj(ihe(Rk(r,"detail")??r)),o=(h=Rk(r,"brief"))==null?void 0:h.trim(),l=o&&o.length>0?fj(o):ehe(i),c=s.round!==void 0?Number.parseInt(s.round,10):void 0,u=s.status,d=t?u==="success"?"completed":u==="failure"?"failed":void 0:Xde.find(p=>p===u);return{kind:e,contextId:(t?s["dispatch-id"]:s["context-id"])??"",...!t&&s["task-id"]?{taskId:s["task-id"]}:{},...s.from?{from:s.from}:{},...e==="task"&&c!==void 0&&Number.isFinite(c)?{round:c}:{},...e==="result"&&d?{status:d}:{},brief:l,briefIsDerived:!(o&&o.length>0),detail:i,filePaths:she(Rk(r,"files")),legacy:t}}function ehe(e){const t=e.split(/\n\s*\n/).map(r=>r.trim()).find(r=>r.length>0);if(!t)return"";const n=t.replace(/\s+/g," ");return n.length>P4?`${n.slice(0,P4)}…`:n}const the="clawd-a2a-task|clawd-a2a-result|clawd-dispatch-task|clawd-dispatch-result|brief|detail|files",nhe=new RegExp(`<\\\\(\\\\*)(/?)(${the})\\b`,"g");function rhe(e){return fj(e)}function fj(e){return e.replace(nhe,"<$1$2$3")}function Rk(e,t){const n=new RegExp(`<${t}>([\\s\\S]*?)</${t}>`,"i").exec(e);return n?n[1]??"":null}function she(e){return e?e.split(`
96
96
  `).map(t=>t.trim()).filter(t=>t.startsWith("- ")).map(t=>t.slice(2).trim()).filter(t=>t.length>0):[]}function ihe(e){return e.replace(/^\n/,"").replace(/\n$/,"")}function ohe(e){return new RegExp(`<${e}\\b[^>]*>`,"i")}function ahe(e){const t={},n=/([a-z-]+)="([^"]*)"/gi;for(let r=n.exec(e);r!==null;r=n.exec(e))t[r[1]]=lhe(r[2]??"");return t}function lhe(e){return e.replace(/&quot;/g,'"').replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&amp;/g,"&")}/**
97
97
  * @license lucide-react v0.577.0 - ISC
98
98
  *
@@ -5,7 +5,7 @@
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
6
  <meta name="referrer" content="no-referrer" />
7
7
  <title>Clawd</title>
8
- <script type="module" crossorigin src="/app/assets/owner-BwBLcl1r.js"></script>
8
+ <script type="module" crossorigin src="/app/assets/owner-BdvJHs5E.js"></script>
9
9
  <link rel="stylesheet" crossorigin href="/app/assets/owner-DQH3TGvS.css">
10
10
  </head>
11
11
  <body style="margin: 0">
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clawos-dev/clawd",
3
- "version": "0.2.751",
3
+ "version": "0.2.753",
4
4
  "description": "Standalone clawd daemon — Claude Code (and future Codex) session server over WebSocket",
5
5
  "type": "module",
6
6
  "license": "MIT",