@agentica/chat 0.17.1 → 0.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{VendorConfigurationMovie-BmCyGR_z.js → VendorConfigurationMovie-DyKr_ROn.js} +149 -150
- package/dist/assets/bbs/{index-jIN7wNcM.js → index-T00mriwv.js} +1 -1
- package/dist/assets/shopping/{index.html-CHYFc9N4.js → index.html-D-zF90aF.js} +1 -1
- package/dist/assets/uploader/{index.html-DhuBJO7y.js → index.html-DJBQouKH.js} +1 -1
- package/dist/bbs/index.html +2 -2
- package/dist/shopping/index.html +2 -2
- package/dist/uploader/index.html +2 -2
- package/package.json +2 -2
- package/dist/assets/index-BQXlvTX0.js +0 -1
- package/dist/assets/sse-Dla1ik5p.js +0 -5
- package/dist/assets/stdio-CygwPk2F.js +0 -3
- package/dist/assets/types-Co05Usx1.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{q as Hi,v as Wi,w as Qi,r as C,x as Ki,y as ta,j as V,e as vr,a as Ir,g as Tr,c as te,u as ws,n as Pe,s as ie,z as mr,f as Pr,m as ia,A as Yo,C as Go,D as ps,E as Xi,F as _i,G as ec,H as Dr,I as Ms,b as rc,R as w,T as K,o as Zo}from"../client-B3aq8qpT.js";import{I as ca,P as Vs,u as Xe,g as sc,a as cr,B as Js,_ as oc,O as ac,V as Ho,F as dc,T as Wo,b as nc,c as lc,A as tc,H as ic,d as cc}from"../VendorConfigurationMovie-BmCyGR_z.js";import{_ as v}from"../_accessExpressionAsString-J5NhZ9FO.js";var ma={exports:{}},mc="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",fc=mc,yc=fc;function fa(){}function ya(){}ya.resetWarningCache=fa;var vc=function(){function d(i,c,m,f,y,I){if(I!==yc){var g=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw g.name="Invariant Violation",g}}d.isRequired=d;function l(){return d}var t={array:d,bigint:d,bool:d,func:d,number:d,object:d,string:d,symbol:d,any:d,arrayOf:l,element:d,elementType:d,instanceOf:l,node:d,objectOf:l,oneOf:l,oneOfType:l,shape:l,exact:l,checkPropTypes:ya,resetWarningCache:fa};return t.PropTypes=t,t};ma.exports=vc();var Ic=ma.exports;const j=Hi(Ic);function gc(d={}){const{themeId:l,defaultTheme:t,defaultClassName:i="MuiBox-root",generateClassName:c}=d,m=Wi("div",{shouldForwardProp:y=>y!=="theme"&&y!=="sx"&&y!=="as"})(Qi);return C.forwardRef(function(I,g){const p=Ki(t),{className:A,component:u="div",...h}=ta(I);return V.jsx(m,{as:u,ref:g,className:vr(A,c?c(i):i),theme:l&&p[l]||p,...h})})}function Ac(d){return Tr("MuiAlert",d)}const Qo=Ir("MuiAlert",["root","action","icon","message","filled","colorSuccess","colorInfo","colorWarning","colorError","filledSuccess","filledInfo","filledWarning","filledError","outlined","outlinedSuccess","outlinedInfo","outlinedWarning","outlinedError","standard","standardSuccess","standardInfo","standardWarning","standardError"]),pc=te(V.jsx("path",{d:"M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z"}),"SuccessOutlined"),hc=te(V.jsx("path",{d:"M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"}),"ReportProblemOutlined"),Oc=te(V.jsx("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"ErrorOutline"),xc=te(V.jsx("path",{d:"M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20, 12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10, 10 0 0,0 12,2M11,17H13V11H11V17Z"}),"InfoOutlined"),Sc=te(V.jsx("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close"),uc=d=>{const{variant:l,color:t,severity:i,classes:c}=d,m={root:["root",`color${mr(t||i)}`,`${l}${mr(t||i)}`,`${l}`],icon:["icon"],message:["message"],action:["action"]};return Pr(m,Ac,c)},Vc=ie(Vs,{name:"MuiAlert",slot:"Root",overridesResolver:(d,l)=>{const{ownerState:t}=d;return[l.root,l[t.variant],l[`${t.variant}${mr(t.color||t.severity)}`]]}})(ia(({theme:d})=>{const l=d.palette.mode==="light"?Yo:Go,t=d.palette.mode==="light"?Go:Yo;return{...d.typography.body2,backgroundColor:"transparent",display:"flex",padding:"6px 16px",variants:[...Object.entries(d.palette).filter(ps(["light"])).map(([i])=>({props:{colorSeverity:i,variant:"standard"},style:{color:d.vars?d.vars.palette.Alert[`${i}Color`]:l(d.palette[i].light,.6),backgroundColor:d.vars?d.vars.palette.Alert[`${i}StandardBg`]:t(d.palette[i].light,.9),[`& .${Qo.icon}`]:d.vars?{color:d.vars.palette.Alert[`${i}IconColor`]}:{color:d.palette[i].main}}})),...Object.entries(d.palette).filter(ps(["light"])).map(([i])=>({props:{colorSeverity:i,variant:"outlined"},style:{color:d.vars?d.vars.palette.Alert[`${i}Color`]:l(d.palette[i].light,.6),border:`1px solid ${(d.vars||d).palette[i].light}`,[`& .${Qo.icon}`]:d.vars?{color:d.vars.palette.Alert[`${i}IconColor`]}:{color:d.palette[i].main}}})),...Object.entries(d.palette).filter(ps(["dark"])).map(([i])=>({props:{colorSeverity:i,variant:"filled"},style:{fontWeight:d.typography.fontWeightMedium,...d.vars?{color:d.vars.palette.Alert[`${i}FilledColor`],backgroundColor:d.vars.palette.Alert[`${i}FilledBg`]}:{backgroundColor:d.palette.mode==="dark"?d.palette[i].dark:d.palette[i].main,color:d.palette.getContrastText(d.palette[i].main)}}}))]}})),Jc=ie("div",{name:"MuiAlert",slot:"Icon",overridesResolver:(d,l)=>l.icon})({marginRight:12,padding:"7px 0",display:"flex",fontSize:22,opacity:.9}),jc=ie("div",{name:"MuiAlert",slot:"Message",overridesResolver:(d,l)=>l.message})({padding:"8px 0",minWidth:0,overflow:"auto"}),wc=ie("div",{name:"MuiAlert",slot:"Action",overridesResolver:(d,l)=>l.action})({display:"flex",alignItems:"flex-start",padding:"4px 0 0 16px",marginLeft:"auto",marginRight:-8}),Ko={success:V.jsx(pc,{fontSize:"inherit"}),warning:V.jsx(hc,{fontSize:"inherit"}),error:V.jsx(Oc,{fontSize:"inherit"}),info:V.jsx(xc,{fontSize:"inherit"})},Mc=C.forwardRef(function(l,t){const i=ws({props:l,name:"MuiAlert"}),{action:c,children:m,className:f,closeText:y="Close",color:I,components:g={},componentsProps:p={},icon:A,iconMapping:u=Ko,onClose:h,role:R="alert",severity:N="success",slotProps:x={},slots:b={},variant:M="standard",...$}=i,z={...i,color:I,severity:N,variant:M,colorSeverity:I||N},O=uc(z),D={slots:{closeButton:g.CloseButton,closeIcon:g.CloseIcon,...b},slotProps:{...p,...x}},[W,ce]=Pe("root",{ref:t,shouldForwardComponentProp:!0,className:vr(O.root,f),elementType:Vc,externalForwardedProps:{...D,...$},ownerState:z,additionalProps:{role:R,elevation:0}}),[oe,X]=Pe("icon",{className:O.icon,elementType:Jc,externalForwardedProps:D,ownerState:z}),[ke,Ee]=Pe("message",{className:O.message,elementType:jc,externalForwardedProps:D,ownerState:z}),[be,Ue]=Pe("action",{className:O.action,elementType:wc,externalForwardedProps:D,ownerState:z}),[Be,$e]=Pe("closeButton",{elementType:ca,externalForwardedProps:D,ownerState:z}),[Z,k]=Pe("closeIcon",{elementType:Sc,externalForwardedProps:D,ownerState:z});return V.jsxs(W,{...ce,children:[A!==!1?V.jsx(oe,{...X,children:A||u[N]||Ko[N]}):null,V.jsx(ke,{...Ee,children:m}),c!=null?V.jsx(be,{...Ue,children:c}):null,c==null&&h?V.jsx(be,{...Ue,children:V.jsx(Be,{size:"small","aria-label":y,title:y,color:"inherit",onClick:h,...$e,children:V.jsx(Z,{fontSize:"small",...k})})}):null]})}),Rc=te(V.jsx("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"}),"Person");function bc(d){return Tr("MuiAvatar",d)}Ir("MuiAvatar",["root","colorDefault","circular","rounded","square","img","fallback"]);const Nc=d=>{const{classes:l,variant:t,colorDefault:i}=d;return Pr({root:["root",t,i&&"colorDefault"],img:["img"],fallback:["fallback"]},bc,l)},Lc=ie("div",{name:"MuiAvatar",slot:"Root",overridesResolver:(d,l)=>{const{ownerState:t}=d;return[l.root,l[t.variant],t.colorDefault&&l.colorDefault]}})(ia(({theme:d})=>({position:"relative",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,width:40,height:40,fontFamily:d.typography.fontFamily,fontSize:d.typography.pxToRem(20),lineHeight:1,borderRadius:"50%",overflow:"hidden",userSelect:"none",variants:[{props:{variant:"rounded"},style:{borderRadius:(d.vars||d).shape.borderRadius}},{props:{variant:"square"},style:{borderRadius:0}},{props:{colorDefault:!0},style:{color:(d.vars||d).palette.background.default,...d.vars?{backgroundColor:d.vars.palette.Avatar.defaultBg}:{backgroundColor:d.palette.grey[400],...d.applyStyles("dark",{backgroundColor:d.palette.grey[600]})}}}]}))),Cc=ie("img",{name:"MuiAvatar",slot:"Img",overridesResolver:(d,l)=>l.img})({width:"100%",height:"100%",textAlign:"center",objectFit:"cover",color:"transparent",textIndent:1e4}),Tc=ie(Rc,{name:"MuiAvatar",slot:"Fallback",overridesResolver:(d,l)=>l.fallback})({width:"75%",height:"75%"});function Pc({crossOrigin:d,referrerPolicy:l,src:t,srcSet:i}){const[c,m]=C.useState(!1);return C.useEffect(()=>{if(!t&&!i)return;m(!1);let f=!0;const y=new Image;return y.onload=()=>{f&&m("loaded")},y.onerror=()=>{f&&m("error")},y.crossOrigin=d,y.referrerPolicy=l,y.src=t,i&&(y.srcset=i),()=>{f=!1}},[d,l,t,i]),c}const Dc=C.forwardRef(function(l,t){const i=ws({props:l,name:"MuiAvatar"}),{alt:c,children:m,className:f,component:y="div",slots:I={},slotProps:g={},imgProps:p,sizes:A,src:u,srcSet:h,variant:R="circular",...N}=i;let x=null;const b={...i,component:y,variant:R},M=Pc({...p,...typeof g.img=="function"?g.img(b):g.img,src:u,srcSet:h}),$=u||h,z=$&&M!=="error";b.colorDefault=!z,delete b.ownerState;const O=Nc(b),[D,W]=Pe("img",{className:O.img,elementType:Cc,externalForwardedProps:{slots:I,slotProps:{img:{...p,...g.img}}},additionalProps:{alt:c,src:u,srcSet:h,sizes:A},ownerState:b});return z?x=V.jsx(D,{...W}):m||m===0?x=m:$&&c?x=c[0]:x=V.jsx(Tc,{ownerState:b,className:O.fallback}),V.jsx(Lc,{as:y,className:vr(O.root,f),ref:t,...N,ownerState:b,children:x})}),kc=Ir("MuiBox",["root"]),Ec=ec(),br=gc({themeId:_i,defaultTheme:Ec,defaultClassName:kc.root,generateClassName:Xi.generate}),Xo=C.createContext();function Uc(d){return Tr("MuiGrid",d)}const Bc=[0,1,2,3,4,5,6,7,8,9,10],$c=["column-reverse","column","row-reverse","row"],zc=["nowrap","wrap-reverse","wrap"],ir=["auto",!0,1,2,3,4,5,6,7,8,9,10,11,12],fr=Ir("MuiGrid",["root","container","item","zeroMinWidth",...Bc.map(d=>`spacing-xs-${d}`),...$c.map(d=>`direction-xs-${d}`),...zc.map(d=>`wrap-xs-${d}`),...ir.map(d=>`grid-xs-${d}`),...ir.map(d=>`grid-sm-${d}`),...ir.map(d=>`grid-md-${d}`),...ir.map(d=>`grid-lg-${d}`),...ir.map(d=>`grid-xl-${d}`)]);function qc({theme:d,ownerState:l}){let t;return d.breakpoints.keys.reduce((i,c)=>{let m={};if(l[c]&&(t=l[c]),!t)return i;if(t===!0)m={flexBasis:0,flexGrow:1,maxWidth:"100%"};else if(t==="auto")m={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"};else{const f=Dr({values:l.columns,breakpoints:d.breakpoints.values}),y=typeof f=="object"?f[c]:f;if(y==null)return i;const I=`${Math.round(t/y*1e8)/1e6}%`;let g={};if(l.container&&l.item&&l.columnSpacing!==0){const p=d.spacing(l.columnSpacing);if(p!=="0px"){const A=`calc(${I} + ${p})`;g={flexBasis:A,maxWidth:A}}}m={flexBasis:I,flexGrow:0,maxWidth:I,...g}}return d.breakpoints.values[c]===0?Object.assign(i,m):i[d.breakpoints.up(c)]=m,i},{})}function Fc({theme:d,ownerState:l}){const t=Dr({values:l.direction,breakpoints:d.breakpoints.values});return Ms({theme:d},t,i=>{const c={flexDirection:i};return i.startsWith("column")&&(c[`& > .${fr.item}`]={maxWidth:"none"}),c})}function va({breakpoints:d,values:l}){let t="";Object.keys(l).forEach(c=>{t===""&&l[c]!==0&&(t=c)});const i=Object.keys(d).sort((c,m)=>d[c]-d[m]);return i.slice(0,i.indexOf(t))}function Yc({theme:d,ownerState:l}){const{container:t,rowSpacing:i}=l;let c={};if(t&&i!==0){const m=Dr({values:i,breakpoints:d.breakpoints.values});let f;typeof m=="object"&&(f=va({breakpoints:d.breakpoints.values,values:m})),c=Ms({theme:d},m,(y,I)=>{const g=d.spacing(y);return g!=="0px"?{marginTop:`calc(-1 * ${g})`,[`& > .${fr.item}`]:{paddingTop:g}}:f!=null&&f.includes(I)?{}:{marginTop:0,[`& > .${fr.item}`]:{paddingTop:0}}})}return c}function Gc({theme:d,ownerState:l}){const{container:t,columnSpacing:i}=l;let c={};if(t&&i!==0){const m=Dr({values:i,breakpoints:d.breakpoints.values});let f;typeof m=="object"&&(f=va({breakpoints:d.breakpoints.values,values:m})),c=Ms({theme:d},m,(y,I)=>{const g=d.spacing(y);if(g!=="0px"){const p=`calc(-1 * ${g})`;return{width:`calc(100% + ${g})`,marginLeft:p,[`& > .${fr.item}`]:{paddingLeft:g}}}return f!=null&&f.includes(I)?{}:{width:"100%",marginLeft:0,[`& > .${fr.item}`]:{paddingLeft:0}}})}return c}function Zc(d,l,t={}){if(!d||d<=0)return[];if(typeof d=="string"&&!Number.isNaN(Number(d))||typeof d=="number")return[t[`spacing-xs-${String(d)}`]];const i=[];return l.forEach(c=>{const m=d[c];Number(m)>0&&i.push(t[`spacing-${c}-${String(m)}`])}),i}const Hc=ie("div",{name:"MuiGrid",slot:"Root",overridesResolver:(d,l)=>{const{ownerState:t}=d,{container:i,direction:c,item:m,spacing:f,wrap:y,zeroMinWidth:I,breakpoints:g}=t;let p=[];i&&(p=Zc(f,g,l));const A=[];return g.forEach(u=>{const h=t[u];h&&A.push(l[`grid-${u}-${String(h)}`])}),[l.root,i&&l.container,m&&l.item,I&&l.zeroMinWidth,...p,c!=="row"&&l[`direction-xs-${String(c)}`],y!=="wrap"&&l[`wrap-xs-${String(y)}`],...A]}})(({ownerState:d})=>({boxSizing:"border-box",...d.container&&{display:"flex",flexWrap:"wrap",width:"100%"},...d.item&&{margin:0},...d.zeroMinWidth&&{minWidth:0},...d.wrap!=="wrap"&&{flexWrap:d.wrap}}),Fc,Yc,Gc,qc);function Wc(d,l){if(!d||d<=0)return[];if(typeof d=="string"&&!Number.isNaN(Number(d))||typeof d=="number")return[`spacing-xs-${String(d)}`];const t=[];return l.forEach(i=>{const c=d[i];if(Number(c)>0){const m=`spacing-${i}-${String(c)}`;t.push(m)}}),t}const Qc=d=>{const{classes:l,container:t,direction:i,item:c,spacing:m,wrap:f,zeroMinWidth:y,breakpoints:I}=d;let g=[];t&&(g=Wc(m,I));const p=[];I.forEach(u=>{const h=d[u];h&&p.push(`grid-${u}-${String(h)}`)});const A={root:["root",t&&"container",c&&"item",y&&"zeroMinWidth",...g,i!=="row"&&`direction-xs-${String(i)}`,f!=="wrap"&&`wrap-xs-${String(f)}`,...p]};return Pr(A,Uc,l)},hs=C.forwardRef(function(l,t){const i=ws({props:l,name:"MuiGrid"}),{breakpoints:c}=Xe(),m=ta(i),{className:f,columns:y,columnSpacing:I,component:g="div",container:p=!1,direction:A="row",item:u=!1,rowSpacing:h,spacing:R=0,wrap:N="wrap",zeroMinWidth:x=!1,...b}=m,M=h||R,$=I||R,z=C.useContext(Xo),O=p?y||12:z,D={},W={...b};c.keys.forEach(X=>{b[X]!=null&&(D[X]=b[X],delete W[X])});const ce={...m,columns:O,container:p,direction:A,item:u,rowSpacing:M,columnSpacing:$,wrap:N,zeroMinWidth:x,spacing:R,...D,breakpoints:c.keys},oe=Qc(ce);return V.jsx(Xo.Provider,{value:O,children:V.jsx(Hc,{ownerState:ce,className:vr(oe.root,f),as:g,ref:t,...W})})}),we=["xs","sm","md","lg","xl"],Kc=(d,l,t=!0)=>t?we.indexOf(d)<=we.indexOf(l):we.indexOf(d)<we.indexOf(l),Xc=(d,l,t=!1)=>t?we.indexOf(l)<=we.indexOf(d):we.indexOf(l)<we.indexOf(d),_c=(d={})=>l=>{const{withTheme:t=!1,noSSR:i=!1,initialWidth:c}=d;function m(f){const y=Xe(),I=f.theme||y,{initialWidth:g,width:p,...A}=sc({theme:I,name:"MuiWithWidth",props:f}),[u,h]=C.useState(!1);rc(()=>{h(!0)},[]);const N=I.breakpoints.keys.slice().reverse().reduce((b,M)=>{const $=cr(I.breakpoints.up(M));return!b&&$?M:b},null),x={width:p||(u||i?N:void 0)||g||c,...t?{theme:I}:{},...A};return x.width===void 0?null:V.jsx(l,{...x})}return m};function Ia(d){const{children:l,only:t,width:i}=d,c=Xe();let m=!0;if(t)if(Array.isArray(t))for(let f=0;f<t.length;f+=1){const y=t[f];if(i===y){m=!1;break}}else t&&i===t&&(m=!1);if(m)for(let f=0;f<c.breakpoints.keys.length;f+=1){const y=c.breakpoints.keys[f],I=d[`${y}Up`],g=d[`${y}Down`];if(I&&Kc(y,i)||g&&Xc(y,i)){m=!1;break}}return m?l:null}Ia.propTypes={children:j.node,lgDown:j.bool,lgUp:j.bool,mdDown:j.bool,mdUp:j.bool,only:j.oneOfType([j.oneOf(["xs","sm","md","lg","xl"]),j.arrayOf(j.oneOf(["xs","sm","md","lg","xl"]))]),smDown:j.bool,smUp:j.bool,width:j.string.isRequired,xlDown:j.bool,xlUp:j.bool,xsDown:j.bool,xsUp:j.bool};const em=_c()(Ia);function rm(d){return Tr("PrivateHiddenCss",d)}Ir("PrivateHiddenCss",["root","xlDown","xlUp","onlyXl","lgDown","lgUp","onlyLg","mdDown","mdUp","onlyMd","smDown","smUp","onlySm","xsDown","xsUp","onlyXs"]);const sm=d=>{const{classes:l,breakpoints:t}=d,i={root:["root",...t.map(({breakpoint:c,dir:m})=>m==="only"?`${m}${mr(c)}`:`${c}${mr(m)}`)]};return Pr(i,rm,l)},om=ie("div",{name:"PrivateHiddenCss",slot:"Root"})(({theme:d,ownerState:l})=>{const t={display:"none"};return{...l.breakpoints.map(({breakpoint:i,dir:c})=>c==="only"?{[d.breakpoints.only(i)]:t}:c==="up"?{[d.breakpoints.up(i)]:t}:{[d.breakpoints.down(i)]:t}).reduce((i,c)=>(Object.keys(c).forEach(m=>{i[m]=c[m]}),i),{})}});function am(d){const{children:l,className:t,only:i,...c}=d,m=Xe(),f=[];for(let g=0;g<m.breakpoints.keys.length;g+=1){const p=m.breakpoints.keys[g],A=c[`${p}Up`],u=c[`${p}Down`];A&&f.push({breakpoint:p,dir:"up"}),u&&f.push({breakpoint:p,dir:"down"})}i&&(Array.isArray(i)?i:[i]).forEach(p=>{f.push({breakpoint:p,dir:"only"})});const y={...d,breakpoints:f},I=sm(y);return V.jsx(om,{className:vr(I.root,t),ownerState:y,children:l})}function _o(d){const{implementation:l="js",lgDown:t=!1,lgUp:i=!1,mdDown:c=!1,mdUp:m=!1,smDown:f=!1,smUp:y=!1,xlDown:I=!1,xlUp:g=!1,xsDown:p=!1,xsUp:A=!1,...u}=d;return l==="js"?V.jsx(em,{lgDown:t,lgUp:i,mdDown:c,mdUp:m,smDown:f,smUp:y,xlDown:I,xlUp:g,xsDown:p,xsUp:A,...u}):V.jsx(am,{lgDown:t,lgUp:i,mdDown:c,mdUp:m,smDown:f,smUp:y,xlDown:I,xlUp:g,xsDown:p,xsUp:A,...u})}/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */function ga(d){return typeof d>"u"||d===null}function dm(d){return typeof d=="object"&&d!==null}function nm(d){return Array.isArray(d)?d:ga(d)?[]:[d]}function lm(d,l){var t,i,c,m;if(l)for(m=Object.keys(l),t=0,i=m.length;t<i;t+=1)c=m[t],d[c]=l[c];return d}function tm(d,l){var t="",i;for(i=0;i<l;i+=1)t+=d;return t}function im(d){return d===0&&Number.NEGATIVE_INFINITY===1/d}var cm=ga,mm=dm,fm=nm,ym=tm,vm=im,Im=lm,Y={isNothing:cm,isObject:mm,toArray:fm,repeat:ym,isNegativeZero:vm,extend:Im};function Aa(d,l){var t="",i=d.reason||"(unknown reason)";return d.mark?(d.mark.name&&(t+='in "'+d.mark.name+'" '),t+="("+(d.mark.line+1)+":"+(d.mark.column+1)+")",!l&&d.mark.snippet&&(t+=`
|
|
1
|
+
import{q as Hi,v as Wi,w as Qi,r as C,x as Ki,y as ta,j as V,e as vr,a as Ir,g as Tr,c as te,u as ws,n as Pe,s as ie,z as mr,f as Pr,m as ia,A as Yo,C as Go,D as ps,E as Xi,F as _i,G as ec,H as Dr,I as Ms,b as rc,R as w,T as K,o as Zo}from"../client-B3aq8qpT.js";import{I as ca,P as Vs,u as Xe,g as sc,a as cr,B as Js,_ as oc,O as ac,V as Ho,F as dc,T as Wo,b as nc,c as lc,A as tc,H as ic,d as cc}from"../VendorConfigurationMovie-DyKr_ROn.js";import{_ as v}from"../_accessExpressionAsString-J5NhZ9FO.js";var ma={exports:{}},mc="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",fc=mc,yc=fc;function fa(){}function ya(){}ya.resetWarningCache=fa;var vc=function(){function d(i,c,m,f,y,I){if(I!==yc){var g=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw g.name="Invariant Violation",g}}d.isRequired=d;function l(){return d}var t={array:d,bigint:d,bool:d,func:d,number:d,object:d,string:d,symbol:d,any:d,arrayOf:l,element:d,elementType:d,instanceOf:l,node:d,objectOf:l,oneOf:l,oneOfType:l,shape:l,exact:l,checkPropTypes:ya,resetWarningCache:fa};return t.PropTypes=t,t};ma.exports=vc();var Ic=ma.exports;const j=Hi(Ic);function gc(d={}){const{themeId:l,defaultTheme:t,defaultClassName:i="MuiBox-root",generateClassName:c}=d,m=Wi("div",{shouldForwardProp:y=>y!=="theme"&&y!=="sx"&&y!=="as"})(Qi);return C.forwardRef(function(I,g){const p=Ki(t),{className:A,component:u="div",...h}=ta(I);return V.jsx(m,{as:u,ref:g,className:vr(A,c?c(i):i),theme:l&&p[l]||p,...h})})}function Ac(d){return Tr("MuiAlert",d)}const Qo=Ir("MuiAlert",["root","action","icon","message","filled","colorSuccess","colorInfo","colorWarning","colorError","filledSuccess","filledInfo","filledWarning","filledError","outlined","outlinedSuccess","outlinedInfo","outlinedWarning","outlinedError","standard","standardSuccess","standardInfo","standardWarning","standardError"]),pc=te(V.jsx("path",{d:"M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z"}),"SuccessOutlined"),hc=te(V.jsx("path",{d:"M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"}),"ReportProblemOutlined"),Oc=te(V.jsx("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"ErrorOutline"),xc=te(V.jsx("path",{d:"M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20, 12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10, 10 0 0,0 12,2M11,17H13V11H11V17Z"}),"InfoOutlined"),Sc=te(V.jsx("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close"),uc=d=>{const{variant:l,color:t,severity:i,classes:c}=d,m={root:["root",`color${mr(t||i)}`,`${l}${mr(t||i)}`,`${l}`],icon:["icon"],message:["message"],action:["action"]};return Pr(m,Ac,c)},Vc=ie(Vs,{name:"MuiAlert",slot:"Root",overridesResolver:(d,l)=>{const{ownerState:t}=d;return[l.root,l[t.variant],l[`${t.variant}${mr(t.color||t.severity)}`]]}})(ia(({theme:d})=>{const l=d.palette.mode==="light"?Yo:Go,t=d.palette.mode==="light"?Go:Yo;return{...d.typography.body2,backgroundColor:"transparent",display:"flex",padding:"6px 16px",variants:[...Object.entries(d.palette).filter(ps(["light"])).map(([i])=>({props:{colorSeverity:i,variant:"standard"},style:{color:d.vars?d.vars.palette.Alert[`${i}Color`]:l(d.palette[i].light,.6),backgroundColor:d.vars?d.vars.palette.Alert[`${i}StandardBg`]:t(d.palette[i].light,.9),[`& .${Qo.icon}`]:d.vars?{color:d.vars.palette.Alert[`${i}IconColor`]}:{color:d.palette[i].main}}})),...Object.entries(d.palette).filter(ps(["light"])).map(([i])=>({props:{colorSeverity:i,variant:"outlined"},style:{color:d.vars?d.vars.palette.Alert[`${i}Color`]:l(d.palette[i].light,.6),border:`1px solid ${(d.vars||d).palette[i].light}`,[`& .${Qo.icon}`]:d.vars?{color:d.vars.palette.Alert[`${i}IconColor`]}:{color:d.palette[i].main}}})),...Object.entries(d.palette).filter(ps(["dark"])).map(([i])=>({props:{colorSeverity:i,variant:"filled"},style:{fontWeight:d.typography.fontWeightMedium,...d.vars?{color:d.vars.palette.Alert[`${i}FilledColor`],backgroundColor:d.vars.palette.Alert[`${i}FilledBg`]}:{backgroundColor:d.palette.mode==="dark"?d.palette[i].dark:d.palette[i].main,color:d.palette.getContrastText(d.palette[i].main)}}}))]}})),Jc=ie("div",{name:"MuiAlert",slot:"Icon",overridesResolver:(d,l)=>l.icon})({marginRight:12,padding:"7px 0",display:"flex",fontSize:22,opacity:.9}),jc=ie("div",{name:"MuiAlert",slot:"Message",overridesResolver:(d,l)=>l.message})({padding:"8px 0",minWidth:0,overflow:"auto"}),wc=ie("div",{name:"MuiAlert",slot:"Action",overridesResolver:(d,l)=>l.action})({display:"flex",alignItems:"flex-start",padding:"4px 0 0 16px",marginLeft:"auto",marginRight:-8}),Ko={success:V.jsx(pc,{fontSize:"inherit"}),warning:V.jsx(hc,{fontSize:"inherit"}),error:V.jsx(Oc,{fontSize:"inherit"}),info:V.jsx(xc,{fontSize:"inherit"})},Mc=C.forwardRef(function(l,t){const i=ws({props:l,name:"MuiAlert"}),{action:c,children:m,className:f,closeText:y="Close",color:I,components:g={},componentsProps:p={},icon:A,iconMapping:u=Ko,onClose:h,role:R="alert",severity:N="success",slotProps:x={},slots:b={},variant:M="standard",...$}=i,z={...i,color:I,severity:N,variant:M,colorSeverity:I||N},O=uc(z),D={slots:{closeButton:g.CloseButton,closeIcon:g.CloseIcon,...b},slotProps:{...p,...x}},[W,ce]=Pe("root",{ref:t,shouldForwardComponentProp:!0,className:vr(O.root,f),elementType:Vc,externalForwardedProps:{...D,...$},ownerState:z,additionalProps:{role:R,elevation:0}}),[oe,X]=Pe("icon",{className:O.icon,elementType:Jc,externalForwardedProps:D,ownerState:z}),[ke,Ee]=Pe("message",{className:O.message,elementType:jc,externalForwardedProps:D,ownerState:z}),[be,Ue]=Pe("action",{className:O.action,elementType:wc,externalForwardedProps:D,ownerState:z}),[Be,$e]=Pe("closeButton",{elementType:ca,externalForwardedProps:D,ownerState:z}),[Z,k]=Pe("closeIcon",{elementType:Sc,externalForwardedProps:D,ownerState:z});return V.jsxs(W,{...ce,children:[A!==!1?V.jsx(oe,{...X,children:A||u[N]||Ko[N]}):null,V.jsx(ke,{...Ee,children:m}),c!=null?V.jsx(be,{...Ue,children:c}):null,c==null&&h?V.jsx(be,{...Ue,children:V.jsx(Be,{size:"small","aria-label":y,title:y,color:"inherit",onClick:h,...$e,children:V.jsx(Z,{fontSize:"small",...k})})}):null]})}),Rc=te(V.jsx("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"}),"Person");function bc(d){return Tr("MuiAvatar",d)}Ir("MuiAvatar",["root","colorDefault","circular","rounded","square","img","fallback"]);const Nc=d=>{const{classes:l,variant:t,colorDefault:i}=d;return Pr({root:["root",t,i&&"colorDefault"],img:["img"],fallback:["fallback"]},bc,l)},Lc=ie("div",{name:"MuiAvatar",slot:"Root",overridesResolver:(d,l)=>{const{ownerState:t}=d;return[l.root,l[t.variant],t.colorDefault&&l.colorDefault]}})(ia(({theme:d})=>({position:"relative",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,width:40,height:40,fontFamily:d.typography.fontFamily,fontSize:d.typography.pxToRem(20),lineHeight:1,borderRadius:"50%",overflow:"hidden",userSelect:"none",variants:[{props:{variant:"rounded"},style:{borderRadius:(d.vars||d).shape.borderRadius}},{props:{variant:"square"},style:{borderRadius:0}},{props:{colorDefault:!0},style:{color:(d.vars||d).palette.background.default,...d.vars?{backgroundColor:d.vars.palette.Avatar.defaultBg}:{backgroundColor:d.palette.grey[400],...d.applyStyles("dark",{backgroundColor:d.palette.grey[600]})}}}]}))),Cc=ie("img",{name:"MuiAvatar",slot:"Img",overridesResolver:(d,l)=>l.img})({width:"100%",height:"100%",textAlign:"center",objectFit:"cover",color:"transparent",textIndent:1e4}),Tc=ie(Rc,{name:"MuiAvatar",slot:"Fallback",overridesResolver:(d,l)=>l.fallback})({width:"75%",height:"75%"});function Pc({crossOrigin:d,referrerPolicy:l,src:t,srcSet:i}){const[c,m]=C.useState(!1);return C.useEffect(()=>{if(!t&&!i)return;m(!1);let f=!0;const y=new Image;return y.onload=()=>{f&&m("loaded")},y.onerror=()=>{f&&m("error")},y.crossOrigin=d,y.referrerPolicy=l,y.src=t,i&&(y.srcset=i),()=>{f=!1}},[d,l,t,i]),c}const Dc=C.forwardRef(function(l,t){const i=ws({props:l,name:"MuiAvatar"}),{alt:c,children:m,className:f,component:y="div",slots:I={},slotProps:g={},imgProps:p,sizes:A,src:u,srcSet:h,variant:R="circular",...N}=i;let x=null;const b={...i,component:y,variant:R},M=Pc({...p,...typeof g.img=="function"?g.img(b):g.img,src:u,srcSet:h}),$=u||h,z=$&&M!=="error";b.colorDefault=!z,delete b.ownerState;const O=Nc(b),[D,W]=Pe("img",{className:O.img,elementType:Cc,externalForwardedProps:{slots:I,slotProps:{img:{...p,...g.img}}},additionalProps:{alt:c,src:u,srcSet:h,sizes:A},ownerState:b});return z?x=V.jsx(D,{...W}):m||m===0?x=m:$&&c?x=c[0]:x=V.jsx(Tc,{ownerState:b,className:O.fallback}),V.jsx(Lc,{as:y,className:vr(O.root,f),ref:t,...N,ownerState:b,children:x})}),kc=Ir("MuiBox",["root"]),Ec=ec(),br=gc({themeId:_i,defaultTheme:Ec,defaultClassName:kc.root,generateClassName:Xi.generate}),Xo=C.createContext();function Uc(d){return Tr("MuiGrid",d)}const Bc=[0,1,2,3,4,5,6,7,8,9,10],$c=["column-reverse","column","row-reverse","row"],zc=["nowrap","wrap-reverse","wrap"],ir=["auto",!0,1,2,3,4,5,6,7,8,9,10,11,12],fr=Ir("MuiGrid",["root","container","item","zeroMinWidth",...Bc.map(d=>`spacing-xs-${d}`),...$c.map(d=>`direction-xs-${d}`),...zc.map(d=>`wrap-xs-${d}`),...ir.map(d=>`grid-xs-${d}`),...ir.map(d=>`grid-sm-${d}`),...ir.map(d=>`grid-md-${d}`),...ir.map(d=>`grid-lg-${d}`),...ir.map(d=>`grid-xl-${d}`)]);function qc({theme:d,ownerState:l}){let t;return d.breakpoints.keys.reduce((i,c)=>{let m={};if(l[c]&&(t=l[c]),!t)return i;if(t===!0)m={flexBasis:0,flexGrow:1,maxWidth:"100%"};else if(t==="auto")m={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"};else{const f=Dr({values:l.columns,breakpoints:d.breakpoints.values}),y=typeof f=="object"?f[c]:f;if(y==null)return i;const I=`${Math.round(t/y*1e8)/1e6}%`;let g={};if(l.container&&l.item&&l.columnSpacing!==0){const p=d.spacing(l.columnSpacing);if(p!=="0px"){const A=`calc(${I} + ${p})`;g={flexBasis:A,maxWidth:A}}}m={flexBasis:I,flexGrow:0,maxWidth:I,...g}}return d.breakpoints.values[c]===0?Object.assign(i,m):i[d.breakpoints.up(c)]=m,i},{})}function Fc({theme:d,ownerState:l}){const t=Dr({values:l.direction,breakpoints:d.breakpoints.values});return Ms({theme:d},t,i=>{const c={flexDirection:i};return i.startsWith("column")&&(c[`& > .${fr.item}`]={maxWidth:"none"}),c})}function va({breakpoints:d,values:l}){let t="";Object.keys(l).forEach(c=>{t===""&&l[c]!==0&&(t=c)});const i=Object.keys(d).sort((c,m)=>d[c]-d[m]);return i.slice(0,i.indexOf(t))}function Yc({theme:d,ownerState:l}){const{container:t,rowSpacing:i}=l;let c={};if(t&&i!==0){const m=Dr({values:i,breakpoints:d.breakpoints.values});let f;typeof m=="object"&&(f=va({breakpoints:d.breakpoints.values,values:m})),c=Ms({theme:d},m,(y,I)=>{const g=d.spacing(y);return g!=="0px"?{marginTop:`calc(-1 * ${g})`,[`& > .${fr.item}`]:{paddingTop:g}}:f!=null&&f.includes(I)?{}:{marginTop:0,[`& > .${fr.item}`]:{paddingTop:0}}})}return c}function Gc({theme:d,ownerState:l}){const{container:t,columnSpacing:i}=l;let c={};if(t&&i!==0){const m=Dr({values:i,breakpoints:d.breakpoints.values});let f;typeof m=="object"&&(f=va({breakpoints:d.breakpoints.values,values:m})),c=Ms({theme:d},m,(y,I)=>{const g=d.spacing(y);if(g!=="0px"){const p=`calc(-1 * ${g})`;return{width:`calc(100% + ${g})`,marginLeft:p,[`& > .${fr.item}`]:{paddingLeft:g}}}return f!=null&&f.includes(I)?{}:{width:"100%",marginLeft:0,[`& > .${fr.item}`]:{paddingLeft:0}}})}return c}function Zc(d,l,t={}){if(!d||d<=0)return[];if(typeof d=="string"&&!Number.isNaN(Number(d))||typeof d=="number")return[t[`spacing-xs-${String(d)}`]];const i=[];return l.forEach(c=>{const m=d[c];Number(m)>0&&i.push(t[`spacing-${c}-${String(m)}`])}),i}const Hc=ie("div",{name:"MuiGrid",slot:"Root",overridesResolver:(d,l)=>{const{ownerState:t}=d,{container:i,direction:c,item:m,spacing:f,wrap:y,zeroMinWidth:I,breakpoints:g}=t;let p=[];i&&(p=Zc(f,g,l));const A=[];return g.forEach(u=>{const h=t[u];h&&A.push(l[`grid-${u}-${String(h)}`])}),[l.root,i&&l.container,m&&l.item,I&&l.zeroMinWidth,...p,c!=="row"&&l[`direction-xs-${String(c)}`],y!=="wrap"&&l[`wrap-xs-${String(y)}`],...A]}})(({ownerState:d})=>({boxSizing:"border-box",...d.container&&{display:"flex",flexWrap:"wrap",width:"100%"},...d.item&&{margin:0},...d.zeroMinWidth&&{minWidth:0},...d.wrap!=="wrap"&&{flexWrap:d.wrap}}),Fc,Yc,Gc,qc);function Wc(d,l){if(!d||d<=0)return[];if(typeof d=="string"&&!Number.isNaN(Number(d))||typeof d=="number")return[`spacing-xs-${String(d)}`];const t=[];return l.forEach(i=>{const c=d[i];if(Number(c)>0){const m=`spacing-${i}-${String(c)}`;t.push(m)}}),t}const Qc=d=>{const{classes:l,container:t,direction:i,item:c,spacing:m,wrap:f,zeroMinWidth:y,breakpoints:I}=d;let g=[];t&&(g=Wc(m,I));const p=[];I.forEach(u=>{const h=d[u];h&&p.push(`grid-${u}-${String(h)}`)});const A={root:["root",t&&"container",c&&"item",y&&"zeroMinWidth",...g,i!=="row"&&`direction-xs-${String(i)}`,f!=="wrap"&&`wrap-xs-${String(f)}`,...p]};return Pr(A,Uc,l)},hs=C.forwardRef(function(l,t){const i=ws({props:l,name:"MuiGrid"}),{breakpoints:c}=Xe(),m=ta(i),{className:f,columns:y,columnSpacing:I,component:g="div",container:p=!1,direction:A="row",item:u=!1,rowSpacing:h,spacing:R=0,wrap:N="wrap",zeroMinWidth:x=!1,...b}=m,M=h||R,$=I||R,z=C.useContext(Xo),O=p?y||12:z,D={},W={...b};c.keys.forEach(X=>{b[X]!=null&&(D[X]=b[X],delete W[X])});const ce={...m,columns:O,container:p,direction:A,item:u,rowSpacing:M,columnSpacing:$,wrap:N,zeroMinWidth:x,spacing:R,...D,breakpoints:c.keys},oe=Qc(ce);return V.jsx(Xo.Provider,{value:O,children:V.jsx(Hc,{ownerState:ce,className:vr(oe.root,f),as:g,ref:t,...W})})}),we=["xs","sm","md","lg","xl"],Kc=(d,l,t=!0)=>t?we.indexOf(d)<=we.indexOf(l):we.indexOf(d)<we.indexOf(l),Xc=(d,l,t=!1)=>t?we.indexOf(l)<=we.indexOf(d):we.indexOf(l)<we.indexOf(d),_c=(d={})=>l=>{const{withTheme:t=!1,noSSR:i=!1,initialWidth:c}=d;function m(f){const y=Xe(),I=f.theme||y,{initialWidth:g,width:p,...A}=sc({theme:I,name:"MuiWithWidth",props:f}),[u,h]=C.useState(!1);rc(()=>{h(!0)},[]);const N=I.breakpoints.keys.slice().reverse().reduce((b,M)=>{const $=cr(I.breakpoints.up(M));return!b&&$?M:b},null),x={width:p||(u||i?N:void 0)||g||c,...t?{theme:I}:{},...A};return x.width===void 0?null:V.jsx(l,{...x})}return m};function Ia(d){const{children:l,only:t,width:i}=d,c=Xe();let m=!0;if(t)if(Array.isArray(t))for(let f=0;f<t.length;f+=1){const y=t[f];if(i===y){m=!1;break}}else t&&i===t&&(m=!1);if(m)for(let f=0;f<c.breakpoints.keys.length;f+=1){const y=c.breakpoints.keys[f],I=d[`${y}Up`],g=d[`${y}Down`];if(I&&Kc(y,i)||g&&Xc(y,i)){m=!1;break}}return m?l:null}Ia.propTypes={children:j.node,lgDown:j.bool,lgUp:j.bool,mdDown:j.bool,mdUp:j.bool,only:j.oneOfType([j.oneOf(["xs","sm","md","lg","xl"]),j.arrayOf(j.oneOf(["xs","sm","md","lg","xl"]))]),smDown:j.bool,smUp:j.bool,width:j.string.isRequired,xlDown:j.bool,xlUp:j.bool,xsDown:j.bool,xsUp:j.bool};const em=_c()(Ia);function rm(d){return Tr("PrivateHiddenCss",d)}Ir("PrivateHiddenCss",["root","xlDown","xlUp","onlyXl","lgDown","lgUp","onlyLg","mdDown","mdUp","onlyMd","smDown","smUp","onlySm","xsDown","xsUp","onlyXs"]);const sm=d=>{const{classes:l,breakpoints:t}=d,i={root:["root",...t.map(({breakpoint:c,dir:m})=>m==="only"?`${m}${mr(c)}`:`${c}${mr(m)}`)]};return Pr(i,rm,l)},om=ie("div",{name:"PrivateHiddenCss",slot:"Root"})(({theme:d,ownerState:l})=>{const t={display:"none"};return{...l.breakpoints.map(({breakpoint:i,dir:c})=>c==="only"?{[d.breakpoints.only(i)]:t}:c==="up"?{[d.breakpoints.up(i)]:t}:{[d.breakpoints.down(i)]:t}).reduce((i,c)=>(Object.keys(c).forEach(m=>{i[m]=c[m]}),i),{})}});function am(d){const{children:l,className:t,only:i,...c}=d,m=Xe(),f=[];for(let g=0;g<m.breakpoints.keys.length;g+=1){const p=m.breakpoints.keys[g],A=c[`${p}Up`],u=c[`${p}Down`];A&&f.push({breakpoint:p,dir:"up"}),u&&f.push({breakpoint:p,dir:"down"})}i&&(Array.isArray(i)?i:[i]).forEach(p=>{f.push({breakpoint:p,dir:"only"})});const y={...d,breakpoints:f},I=sm(y);return V.jsx(om,{className:vr(I.root,t),ownerState:y,children:l})}function _o(d){const{implementation:l="js",lgDown:t=!1,lgUp:i=!1,mdDown:c=!1,mdUp:m=!1,smDown:f=!1,smUp:y=!1,xlDown:I=!1,xlUp:g=!1,xsDown:p=!1,xsUp:A=!1,...u}=d;return l==="js"?V.jsx(em,{lgDown:t,lgUp:i,mdDown:c,mdUp:m,smDown:f,smUp:y,xlDown:I,xlUp:g,xsDown:p,xsUp:A,...u}):V.jsx(am,{lgDown:t,lgUp:i,mdDown:c,mdUp:m,smDown:f,smUp:y,xlDown:I,xlUp:g,xsDown:p,xsUp:A,...u})}/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */function ga(d){return typeof d>"u"||d===null}function dm(d){return typeof d=="object"&&d!==null}function nm(d){return Array.isArray(d)?d:ga(d)?[]:[d]}function lm(d,l){var t,i,c,m;if(l)for(m=Object.keys(l),t=0,i=m.length;t<i;t+=1)c=m[t],d[c]=l[c];return d}function tm(d,l){var t="",i;for(i=0;i<l;i+=1)t+=d;return t}function im(d){return d===0&&Number.NEGATIVE_INFINITY===1/d}var cm=ga,mm=dm,fm=nm,ym=tm,vm=im,Im=lm,Y={isNothing:cm,isObject:mm,toArray:fm,repeat:ym,isNegativeZero:vm,extend:Im};function Aa(d,l){var t="",i=d.reason||"(unknown reason)";return d.mark?(d.mark.name&&(t+='in "'+d.mark.name+'" '),t+="("+(d.mark.line+1)+":"+(d.mark.column+1)+")",!l&&d.mark.snippet&&(t+=`
|
|
2
2
|
|
|
3
3
|
`+d.mark.snippet),i+" "+t):i}function yr(d,l){Error.call(this),this.name="YAMLException",this.reason=d,this.mark=l,this.message=Aa(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}yr.prototype=Object.create(Error.prototype);yr.prototype.constructor=yr;yr.prototype.toString=function(l){return this.name+": "+Aa(this,l)};var Ae=yr;function Os(d,l,t,i,c){var m="",f="",y=Math.floor(c/2)-1;return i-l>y&&(m=" ... ",l=i-y+m.length),t-i>y&&(f=" ...",t=i+y-f.length),{str:m+d.slice(l,t).replace(/\t/g,"→")+f,pos:i-l+m.length}}function xs(d,l){return Y.repeat(" ",l-d.length)+d}function gm(d,l){if(l=Object.create(l||null),!d.buffer)return null;l.maxLength||(l.maxLength=79),typeof l.indent!="number"&&(l.indent=1),typeof l.linesBefore!="number"&&(l.linesBefore=3),typeof l.linesAfter!="number"&&(l.linesAfter=2);for(var t=/\r?\n|\r|\0/g,i=[0],c=[],m,f=-1;m=t.exec(d.buffer);)c.push(m.index),i.push(m.index+m[0].length),d.position<=m.index&&f<0&&(f=i.length-2);f<0&&(f=i.length-1);var y="",I,g,p=Math.min(d.line+l.linesAfter,c.length).toString().length,A=l.maxLength-(l.indent+p+3);for(I=1;I<=l.linesBefore&&!(f-I<0);I++)g=Os(d.buffer,i[f-I],c[f-I],d.position-(i[f]-i[f-I]),A),y=Y.repeat(" ",l.indent)+xs((d.line-I+1).toString(),p)+" | "+g.str+`
|
|
4
4
|
`+y;for(g=Os(d.buffer,i[f],c[f],d.position,A),y+=Y.repeat(" ",l.indent)+xs((d.line+1).toString(),p)+" | "+g.str+`
|
package/dist/bbs/index.html
CHANGED
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
})(window, document, "clarity", "script", "gu5qz1srj3");
|
|
21
21
|
</script>
|
|
22
22
|
<title>Agentica Playground > TypeScript Class Demonstration</title>
|
|
23
|
-
<script type="module" src="../assets/bbs/index-
|
|
23
|
+
<script type="module" src="../assets/bbs/index-T00mriwv.js"></script>
|
|
24
24
|
<link rel="modulepreload" crossorigin href="../assets/client-B3aq8qpT.js">
|
|
25
|
-
<link rel="modulepreload" crossorigin href="../assets/VendorConfigurationMovie-
|
|
25
|
+
<link rel="modulepreload" crossorigin href="../assets/VendorConfigurationMovie-DyKr_ROn.js">
|
|
26
26
|
<link rel="modulepreload" crossorigin href="../assets/_isFormatUri-YqTfGpHo.js">
|
|
27
27
|
<link rel="modulepreload" crossorigin href="../assets/Divider-DX1xhf0M.js">
|
|
28
28
|
</head>
|
package/dist/shopping/index.html
CHANGED
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
})(window, document, "clarity", "script", "gu5qz1srj3");
|
|
21
21
|
</script>
|
|
22
22
|
<title>Agentica Playground > Shopping Mall Demonstration</title>
|
|
23
|
-
<script type="module" src="../assets/shopping/index.html-
|
|
23
|
+
<script type="module" src="../assets/shopping/index.html-D-zF90aF.js"></script>
|
|
24
24
|
<link rel="modulepreload" crossorigin href="../assets/client-B3aq8qpT.js">
|
|
25
|
-
<link rel="modulepreload" crossorigin href="../assets/VendorConfigurationMovie-
|
|
25
|
+
<link rel="modulepreload" crossorigin href="../assets/VendorConfigurationMovie-DyKr_ROn.js">
|
|
26
26
|
<link rel="modulepreload" crossorigin href="../assets/_isFormatUri-YqTfGpHo.js">
|
|
27
27
|
<link rel="modulepreload" crossorigin href="../assets/_accessExpressionAsString-J5NhZ9FO.js">
|
|
28
28
|
<link rel="modulepreload" crossorigin href="../assets/Divider-DX1xhf0M.js">
|
package/dist/uploader/index.html
CHANGED
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
})(window, document, "clarity", "script", "gu5qz1srj3");
|
|
21
21
|
</script>
|
|
22
22
|
<title>Agentica Playground > Uploader</title>
|
|
23
|
-
<script type="module" src="../assets/uploader/index.html-
|
|
23
|
+
<script type="module" src="../assets/uploader/index.html-DJBQouKH.js"></script>
|
|
24
24
|
<link rel="modulepreload" crossorigin href="../assets/client-B3aq8qpT.js">
|
|
25
|
-
<link rel="modulepreload" crossorigin href="../assets/VendorConfigurationMovie-
|
|
25
|
+
<link rel="modulepreload" crossorigin href="../assets/VendorConfigurationMovie-DyKr_ROn.js">
|
|
26
26
|
<link rel="modulepreload" crossorigin href="../assets/_accessExpressionAsString-J5NhZ9FO.js">
|
|
27
27
|
</head>
|
|
28
28
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentica/chat",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.18.0",
|
|
5
5
|
"description": "Frontend Application of Agentica",
|
|
6
6
|
"author": "Wrtn Technologies",
|
|
7
7
|
"license": "MIT",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"remark-mermaid-plugin": "^1.0.2",
|
|
47
47
|
"typia": "^9.0.1",
|
|
48
48
|
"uuid": "^11.0.5",
|
|
49
|
-
"@agentica/core": "^0.
|
|
49
|
+
"@agentica/core": "^0.18.0"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"@eslint/js": "^9.13.0",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{C as T,P as q,a as H,M as m,E as _,L as R,I as E,S,b as v,c as I,G as y,d as N,e as $,f as M,R as P,g as L,h as O}from"./types-Co05Usx1.js";const k=6e4;class x{constructor(e){this._options=e,this._requestMessageId=0,this._requestHandlers=new Map,this._requestHandlerAbortControllers=new Map,this._notificationHandlers=new Map,this._responseHandlers=new Map,this._progressHandlers=new Map,this._timeoutInfo=new Map,this.setNotificationHandler(T,r=>{const t=this._requestHandlerAbortControllers.get(r.params.requestId);t==null||t.abort(r.params.reason)}),this.setNotificationHandler(q,r=>{this._onprogress(r)}),this.setRequestHandler(H,r=>({}))}_setupTimeout(e,r,t,s,o=!1){this._timeoutInfo.set(e,{timeoutId:setTimeout(s,r),startTime:Date.now(),timeout:r,maxTotalTimeout:t,resetTimeoutOnProgress:o,onTimeout:s})}_resetTimeout(e){const r=this._timeoutInfo.get(e);if(!r)return!1;const t=Date.now()-r.startTime;if(r.maxTotalTimeout&&t>=r.maxTotalTimeout)throw this._timeoutInfo.delete(e),new m(_.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:r.maxTotalTimeout,totalElapsed:t});return clearTimeout(r.timeoutId),r.timeoutId=setTimeout(r.onTimeout,r.timeout),!0}_cleanupTimeout(e){const r=this._timeoutInfo.get(e);r&&(clearTimeout(r.timeoutId),this._timeoutInfo.delete(e))}async connect(e){this._transport=e,this._transport.onclose=()=>{this._onclose()},this._transport.onerror=r=>{this._onerror(r)},this._transport.onmessage=r=>{"method"in r?"id"in r?this._onrequest(r):this._onnotification(r):this._onresponse(r)},await this._transport.start()}_onclose(){var e;const r=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._transport=void 0,(e=this.onclose)===null||e===void 0||e.call(this);const t=new m(_.ConnectionClosed,"Connection closed");for(const s of r.values())s(t)}_onerror(e){var r;(r=this.onerror)===null||r===void 0||r.call(this,e)}_onnotification(e){var r;const t=(r=this._notificationHandlers.get(e.method))!==null&&r!==void 0?r:this.fallbackNotificationHandler;t!==void 0&&Promise.resolve().then(()=>t(e)).catch(s=>this._onerror(new Error(`Uncaught error in notification handler: ${s}`)))}_onrequest(e){var r,t,s;const o=(r=this._requestHandlers.get(e.method))!==null&&r!==void 0?r:this.fallbackRequestHandler;if(o===void 0){(t=this._transport)===null||t===void 0||t.send({jsonrpc:"2.0",id:e.id,error:{code:_.MethodNotFound,message:"Method not found"}}).catch(n=>this._onerror(new Error(`Failed to send an error response: ${n}`)));return}const i=new AbortController;this._requestHandlerAbortControllers.set(e.id,i);const c={signal:i.signal,sessionId:(s=this._transport)===null||s===void 0?void 0:s.sessionId};Promise.resolve().then(()=>o(e,c)).then(n=>{var l;if(!i.signal.aborted)return(l=this._transport)===null||l===void 0?void 0:l.send({result:n,jsonrpc:"2.0",id:e.id})},n=>{var l,u;if(!i.signal.aborted)return(l=this._transport)===null||l===void 0?void 0:l.send({jsonrpc:"2.0",id:e.id,error:{code:Number.isSafeInteger(n.code)?n.code:_.InternalError,message:(u=n.message)!==null&&u!==void 0?u:"Internal error"}})}).catch(n=>this._onerror(new Error(`Failed to send response: ${n}`))).finally(()=>{this._requestHandlerAbortControllers.delete(e.id)})}_onprogress(e){const{progressToken:r,...t}=e.params,s=Number(r),o=this._progressHandlers.get(s);if(!o){this._onerror(new Error(`Received a progress notification for an unknown token: ${JSON.stringify(e)}`));return}const i=this._responseHandlers.get(s),c=this._timeoutInfo.get(s);if(c&&i&&c.resetTimeoutOnProgress)try{this._resetTimeout(s)}catch(n){i(n);return}o(t)}_onresponse(e){const r=Number(e.id),t=this._responseHandlers.get(r);if(t===void 0){this._onerror(new Error(`Received a response for an unknown message ID: ${JSON.stringify(e)}`));return}if(this._responseHandlers.delete(r),this._progressHandlers.delete(r),this._cleanupTimeout(r),"result"in e)t(e);else{const s=new m(e.error.code,e.error.message,e.error.data);t(s)}}get transport(){return this._transport}async close(){var e;await((e=this._transport)===null||e===void 0?void 0:e.close())}request(e,r,t){return new Promise((s,o)=>{var i,c,n,l,u;if(!this._transport){o(new Error("Not connected"));return}((i=this._options)===null||i===void 0?void 0:i.enforceStrictCapabilities)===!0&&this.assertCapabilityForMethod(e.method),(c=t==null?void 0:t.signal)===null||c===void 0||c.throwIfAborted();const d=this._requestMessageId++,b={...e,jsonrpc:"2.0",id:d};t!=null&&t.onprogress&&(this._progressHandlers.set(d,t.onprogress),b.params={...e.params,_meta:{progressToken:d}});const g=a=>{var h;this._responseHandlers.delete(d),this._progressHandlers.delete(d),this._cleanupTimeout(d),(h=this._transport)===null||h===void 0||h.send({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:d,reason:String(a)}}).catch(p=>this._onerror(new Error(`Failed to send cancellation: ${p}`))),o(a)};this._responseHandlers.set(d,a=>{var h;if(!(!((h=t==null?void 0:t.signal)===null||h===void 0)&&h.aborted)){if(a instanceof Error)return o(a);try{const p=r.parse(a.result);s(p)}catch(p){o(p)}}}),(n=t==null?void 0:t.signal)===null||n===void 0||n.addEventListener("abort",()=>{var a;g((a=t==null?void 0:t.signal)===null||a===void 0?void 0:a.reason)});const w=(l=t==null?void 0:t.timeout)!==null&&l!==void 0?l:k,C=()=>g(new m(_.RequestTimeout,"Request timed out",{timeout:w}));this._setupTimeout(d,w,t==null?void 0:t.maxTotalTimeout,C,(u=t==null?void 0:t.resetTimeoutOnProgress)!==null&&u!==void 0?u:!1),this._transport.send(b).catch(a=>{this._cleanupTimeout(d),o(a)})})}async notification(e){if(!this._transport)throw new Error("Not connected");this.assertNotificationCapability(e.method);const r={...e,jsonrpc:"2.0"};await this._transport.send(r)}setRequestHandler(e,r){const t=e.shape.method.value;this.assertRequestHandlerCapability(t),this._requestHandlers.set(t,(s,o)=>Promise.resolve(r(e.parse(s),o)))}removeRequestHandler(e){this._requestHandlers.delete(e)}assertCanSetRequestHandler(e){if(this._requestHandlers.has(e))throw new Error(`A request handler for ${e} already exists, which would be overridden`)}setNotificationHandler(e,r){this._notificationHandlers.set(e.shape.method.value,t=>Promise.resolve(r(e.parse(t))))}removeNotificationHandler(e){this._notificationHandlers.delete(e)}}function A(f,e){return Object.entries(e).reduce((r,[t,s])=>(s&&typeof s=="object"?r[t]=r[t]?{...r[t],...s}:s:r[t]=s,r),{...f})}class F extends x{constructor(e,r){var t;super(r),this._clientInfo=e,this._capabilities=(t=r==null?void 0:r.capabilities)!==null&&t!==void 0?t:{}}registerCapabilities(e){if(this.transport)throw new Error("Cannot register capabilities after connecting to transport");this._capabilities=A(this._capabilities,e)}assertCapability(e,r){var t;if(!(!((t=this._serverCapabilities)===null||t===void 0)&&t[e]))throw new Error(`Server does not support ${e} (required for ${r})`)}async connect(e,r){await super.connect(e);try{const t=await this.request({method:"initialize",params:{protocolVersion:R,capabilities:this._capabilities,clientInfo:this._clientInfo}},E,r);if(t===void 0)throw new Error(`Server sent invalid initialize result: ${t}`);if(!S.includes(t.protocolVersion))throw new Error(`Server's protocol version is not supported: ${t.protocolVersion}`);this._serverCapabilities=t.capabilities,this._serverVersion=t.serverInfo,this._instructions=t.instructions,await this.notification({method:"notifications/initialized"})}catch(t){throw this.close(),t}}getServerCapabilities(){return this._serverCapabilities}getServerVersion(){return this._serverVersion}getInstructions(){return this._instructions}assertCapabilityForMethod(e){var r,t,s,o,i;switch(e){case"logging/setLevel":if(!(!((r=this._serverCapabilities)===null||r===void 0)&&r.logging))throw new Error(`Server does not support logging (required for ${e})`);break;case"prompts/get":case"prompts/list":if(!(!((t=this._serverCapabilities)===null||t===void 0)&&t.prompts))throw new Error(`Server does not support prompts (required for ${e})`);break;case"resources/list":case"resources/templates/list":case"resources/read":case"resources/subscribe":case"resources/unsubscribe":if(!(!((s=this._serverCapabilities)===null||s===void 0)&&s.resources))throw new Error(`Server does not support resources (required for ${e})`);if(e==="resources/subscribe"&&!this._serverCapabilities.resources.subscribe)throw new Error(`Server does not support resource subscriptions (required for ${e})`);break;case"tools/call":case"tools/list":if(!(!((o=this._serverCapabilities)===null||o===void 0)&&o.tools))throw new Error(`Server does not support tools (required for ${e})`);break;case"completion/complete":if(!(!((i=this._serverCapabilities)===null||i===void 0)&&i.completions))throw new Error(`Server does not support completions (required for ${e})`);break}}assertNotificationCapability(e){var r;switch(e){case"notifications/roots/list_changed":if(!(!((r=this._capabilities.roots)===null||r===void 0)&&r.listChanged))throw new Error(`Client does not support roots list changed notifications (required for ${e})`);break}}assertRequestHandlerCapability(e){switch(e){case"sampling/createMessage":if(!this._capabilities.sampling)throw new Error(`Client does not support sampling capability (required for ${e})`);break;case"roots/list":if(!this._capabilities.roots)throw new Error(`Client does not support roots capability (required for ${e})`);break}}async ping(e){return this.request({method:"ping"},v,e)}async complete(e,r){return this.request({method:"completion/complete",params:e},I,r)}async setLoggingLevel(e,r){return this.request({method:"logging/setLevel",params:{level:e}},v,r)}async getPrompt(e,r){return this.request({method:"prompts/get",params:e},y,r)}async listPrompts(e,r){return this.request({method:"prompts/list",params:e},N,r)}async listResources(e,r){return this.request({method:"resources/list",params:e},$,r)}async listResourceTemplates(e,r){return this.request({method:"resources/templates/list",params:e},M,r)}async readResource(e,r){return this.request({method:"resources/read",params:e},P,r)}async subscribeResource(e,r){return this.request({method:"resources/subscribe",params:e},v,r)}async unsubscribeResource(e,r){return this.request({method:"resources/unsubscribe",params:e},v,r)}async callTool(e,r=L,t){return this.request({method:"tools/call",params:e},r,t)}async listTools(e,r){return this.request({method:"tools/list",params:e},O,r)}async sendRootsListChanged(){return this.notification({method:"notifications/roots/list_changed"})}}export{F as Client};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{z as r,L as st,J as at}from"./types-Co05Usx1.js";class tt extends Error{constructor(t,n){super(t),this.name="ParseError",this.type=n.type,this.field=n.field,this.value=n.value,this.line=n.line}}function j(e){}function ct(e){if(typeof e=="function")throw new TypeError("`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?");const{onEvent:t=j,onError:n=j,onRetry:i=j,onComment:s}=e;let o="",a=!0,l,h="",p="";function L(d){const _=a?d.replace(/^\xEF\xBB\xBF/,""):d,[E,D]=ht(`${o}${_}`);for(const z of E)O(z);o=D,a=!1}function O(d){if(d===""){H();return}if(d.startsWith(":")){s&&s(d.slice(d.startsWith(": ")?2:1));return}const _=d.indexOf(":");if(_!==-1){const E=d.slice(0,_),D=d[_+1]===" "?2:1,z=d.slice(_+D);A(E,z,d);return}A(d,"",d)}function A(d,_,E){switch(d){case"event":p=_;break;case"data":h=`${h}${_}
|
|
2
|
-
`;break;case"id":l=_.includes("\0")?void 0:_;break;case"retry":/^\d+$/.test(_)?i(parseInt(_,10)):n(new tt(`Invalid \`retry\` value: "${_}"`,{type:"invalid-retry",value:_,line:E}));break;default:n(new tt(`Unknown field "${d.length>20?`${d.slice(0,20)}…`:d}"`,{type:"unknown-field",field:d,value:_,line:E}));break}}function H(){h.length>0&&t({id:l,event:p||void 0,data:h.endsWith(`
|
|
3
|
-
`)?h.slice(0,-1):h}),l=void 0,h="",p=""}function M(d={}){o&&d.consume&&O(o),a=!0,l=void 0,h="",p="",o=""}return{feed:L,reset:M}}function ht(e){const t=[];let n="",i=0;for(;i<e.length;){const s=e.indexOf("\r",i),o=e.indexOf(`
|
|
4
|
-
`,i);let a=-1;if(s!==-1&&o!==-1?a=Math.min(s,o):s!==-1?a=s:o!==-1&&(a=o),a===-1){n=e.slice(i);break}else{const l=e.slice(i,a);t.push(l),i=a+1,e[i-1]==="\r"&&e[i]===`
|
|
5
|
-
`&&i++}}return[t,n]}class et extends Event{constructor(t,n){var i,s;super(t),this.code=(i=n==null?void 0:n.code)!=null?i:void 0,this.message=(s=n==null?void 0:n.message)!=null?s:void 0}[Symbol.for("nodejs.util.inspect.custom")](t,n,i){return i(nt(this),n)}[Symbol.for("Deno.customInspect")](t,n){return t(nt(this),n)}}function lt(e){const t=globalThis.DOMException;return typeof t=="function"?new t(e,"SyntaxError"):new SyntaxError(e)}function F(e){return e instanceof Error?"errors"in e&&Array.isArray(e.errors)?e.errors.map(F).join(", "):"cause"in e&&e.cause instanceof Error?`${e}: ${F(e.cause)}`:e.message:`${e}`}function nt(e){return{type:e.type,message:e.message,code:e.code,defaultPrevented:e.defaultPrevented,cancelable:e.cancelable,timeStamp:e.timeStamp}}var it=e=>{throw TypeError(e)},X=(e,t,n)=>t.has(e)||it("Cannot "+n),c=(e,t,n)=>(X(e,t,"read from private field"),n?n.call(e):t.get(e)),f=(e,t,n)=>t.has(e)?it("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),u=(e,t,n,i)=>(X(e,t,"write to private field"),t.set(e,n),n),v=(e,t,n)=>(X(e,t,"access private method"),n),w,m,k,N,W,x,b,I,y,T,C,S,R,g,G,q,B,rt,J,Z,U,K,Q;class $ extends EventTarget{constructor(t,n){var i,s;super(),f(this,g),this.CONNECTING=0,this.OPEN=1,this.CLOSED=2,f(this,w),f(this,m),f(this,k),f(this,N),f(this,W),f(this,x),f(this,b),f(this,I,null),f(this,y),f(this,T),f(this,C,null),f(this,S,null),f(this,R,null),f(this,q,async o=>{var a;c(this,T).reset();const{body:l,redirected:h,status:p,headers:L}=o;if(p===204){v(this,g,U).call(this,"Server sent HTTP 204, not reconnecting",204),this.close();return}if(h?u(this,k,new URL(o.url)):u(this,k,void 0),p!==200){v(this,g,U).call(this,`Non-200 status code (${p})`,p);return}if(!(L.get("content-type")||"").startsWith("text/event-stream")){v(this,g,U).call(this,'Invalid content type, expected "text/event-stream"',p);return}if(c(this,w)===this.CLOSED)return;u(this,w,this.OPEN);const O=new Event("open");if((a=c(this,R))==null||a.call(this,O),this.dispatchEvent(O),typeof l!="object"||!l||!("getReader"in l)){v(this,g,U).call(this,"Invalid response body, expected a web ReadableStream",p),this.close();return}const A=new TextDecoder,H=l.getReader();let M=!0;do{const{done:d,value:_}=await H.read();_&&c(this,T).feed(A.decode(_,{stream:!d})),d&&(M=!1,c(this,T).reset(),v(this,g,K).call(this))}while(M)}),f(this,B,o=>{u(this,y,void 0),!(o.name==="AbortError"||o.type==="aborted")&&v(this,g,K).call(this,F(o))}),f(this,J,o=>{typeof o.id=="string"&&u(this,I,o.id);const a=new MessageEvent(o.event||"message",{data:o.data,origin:c(this,k)?c(this,k).origin:c(this,m).origin,lastEventId:o.id||""});c(this,S)&&(!o.event||o.event==="message")&&c(this,S).call(this,a),this.dispatchEvent(a)}),f(this,Z,o=>{u(this,x,o)}),f(this,Q,()=>{u(this,b,void 0),c(this,w)===this.CONNECTING&&v(this,g,G).call(this)});try{if(t instanceof URL)u(this,m,t);else if(typeof t=="string")u(this,m,new URL(t,dt()));else throw new Error("Invalid URL")}catch{throw lt("An invalid or illegal string was specified")}u(this,T,ct({onEvent:c(this,J),onRetry:c(this,Z)})),u(this,w,this.CONNECTING),u(this,x,3e3),u(this,W,(i=n==null?void 0:n.fetch)!=null?i:globalThis.fetch),u(this,N,(s=n==null?void 0:n.withCredentials)!=null?s:!1),v(this,g,G).call(this)}get readyState(){return c(this,w)}get url(){return c(this,m).href}get withCredentials(){return c(this,N)}get onerror(){return c(this,C)}set onerror(t){u(this,C,t)}get onmessage(){return c(this,S)}set onmessage(t){u(this,S,t)}get onopen(){return c(this,R)}set onopen(t){u(this,R,t)}addEventListener(t,n,i){const s=n;super.addEventListener(t,s,i)}removeEventListener(t,n,i){const s=n;super.removeEventListener(t,s,i)}close(){c(this,b)&&clearTimeout(c(this,b)),c(this,w)!==this.CLOSED&&(c(this,y)&&c(this,y).abort(),u(this,w,this.CLOSED),u(this,y,void 0))}}w=new WeakMap,m=new WeakMap,k=new WeakMap,N=new WeakMap,W=new WeakMap,x=new WeakMap,b=new WeakMap,I=new WeakMap,y=new WeakMap,T=new WeakMap,C=new WeakMap,S=new WeakMap,R=new WeakMap,g=new WeakSet,G=function(){u(this,w,this.CONNECTING),u(this,y,new AbortController),c(this,W)(c(this,m),v(this,g,rt).call(this)).then(c(this,q)).catch(c(this,B))},q=new WeakMap,B=new WeakMap,rt=function(){var e;const t={mode:"cors",redirect:"follow",headers:{Accept:"text/event-stream",...c(this,I)?{"Last-Event-ID":c(this,I)}:void 0},cache:"no-store",signal:(e=c(this,y))==null?void 0:e.signal};return"window"in globalThis&&(t.credentials=this.withCredentials?"include":"same-origin"),t},J=new WeakMap,Z=new WeakMap,U=function(e,t){var n;c(this,w)!==this.CLOSED&&u(this,w,this.CLOSED);const i=new et("error",{code:t,message:e});(n=c(this,C))==null||n.call(this,i),this.dispatchEvent(i)},K=function(e,t){var n;if(c(this,w)===this.CLOSED)return;u(this,w,this.CONNECTING);const i=new et("error",{code:t,message:e});(n=c(this,C))==null||n.call(this,i),this.dispatchEvent(i),u(this,b,setTimeout(c(this,Q),c(this,x)))},Q=new WeakMap,$.CONNECTING=0,$.OPEN=1,$.CLOSED=2;function dt(){const e="document"in globalThis?globalThis.document:void 0;return e&&typeof e=="object"&&"baseURI"in e&&typeof e.baseURI=="string"?e.baseURI:void 0}let Y;Y=globalThis.crypto;async function ut(e){return(await Y).getRandomValues(new Uint8Array(e))}async function pt(e){const t="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._~";let n="";const i=await ut(e);for(let s=0;s<e;s++){const o=i[s]%t.length;n+=t[o]}return n}async function _t(e){return await pt(e)}async function ft(e){const t=await(await Y).subtle.digest("SHA-256",new TextEncoder().encode(e));return btoa(String.fromCharCode(...new Uint8Array(t))).replace(/\//g,"_").replace(/\+/g,"-").replace(/=/g,"")}async function wt(e){if(e||(e=43),e<43||e>128)throw`Expected a length between 43 and 128. Received ${e}.`;const t=await _t(e),n=await ft(t);return{code_verifier:t,code_challenge:n}}const gt=r.object({issuer:r.string(),authorization_endpoint:r.string(),token_endpoint:r.string(),registration_endpoint:r.string().optional(),scopes_supported:r.array(r.string()).optional(),response_types_supported:r.array(r.string()),response_modes_supported:r.array(r.string()).optional(),grant_types_supported:r.array(r.string()).optional(),token_endpoint_auth_methods_supported:r.array(r.string()).optional(),token_endpoint_auth_signing_alg_values_supported:r.array(r.string()).optional(),service_documentation:r.string().optional(),revocation_endpoint:r.string().optional(),revocation_endpoint_auth_methods_supported:r.array(r.string()).optional(),revocation_endpoint_auth_signing_alg_values_supported:r.array(r.string()).optional(),introspection_endpoint:r.string().optional(),introspection_endpoint_auth_methods_supported:r.array(r.string()).optional(),introspection_endpoint_auth_signing_alg_values_supported:r.array(r.string()).optional(),code_challenge_methods_supported:r.array(r.string()).optional()}).passthrough(),ot=r.object({access_token:r.string(),token_type:r.string(),expires_in:r.number().optional(),scope:r.string().optional(),refresh_token:r.string().optional()}).strip();r.object({error:r.string(),error_description:r.string().optional(),error_uri:r.string().optional()});const vt=r.object({redirect_uris:r.array(r.string()).refine(e=>e.every(t=>URL.canParse(t)),{message:"redirect_uris must contain valid URLs"}),token_endpoint_auth_method:r.string().optional(),grant_types:r.array(r.string()).optional(),response_types:r.array(r.string()).optional(),client_name:r.string().optional(),client_uri:r.string().optional(),logo_uri:r.string().optional(),scope:r.string().optional(),contacts:r.array(r.string()).optional(),tos_uri:r.string().optional(),policy_uri:r.string().optional(),jwks_uri:r.string().optional(),jwks:r.any().optional(),software_id:r.string().optional(),software_version:r.string().optional()}).strip(),yt=r.object({client_id:r.string(),client_secret:r.string().optional(),client_id_issued_at:r.number().optional(),client_secret_expires_at:r.number().optional()}).strip(),mt=vt.merge(yt);r.object({error:r.string(),error_description:r.string().optional()}).strip();r.object({token:r.string(),token_type_hint:r.string().optional()}).strip();class P extends Error{constructor(t){super(t??"Unauthorized")}}async function V(e,{serverUrl:t,authorizationCode:n}){const i=await Et(t);let s=await Promise.resolve(e.clientInformation());if(!s){if(n!==void 0)throw new Error("Existing OAuth client information is required when exchanging an authorization code");if(!e.saveClientInformation)throw new Error("OAuth client information must be saveable for dynamic registration");const h=await bt(t,{metadata:i,clientMetadata:e.clientMetadata});await e.saveClientInformation(h),s=h}if(n!==void 0){const h=await e.codeVerifier(),p=await Tt(t,{metadata:i,clientInformation:s,authorizationCode:n,codeVerifier:h,redirectUri:e.redirectUrl});return await e.saveTokens(p),"AUTHORIZED"}const o=await e.tokens();if(o!=null&&o.refresh_token)try{const h=await St(t,{metadata:i,clientInformation:s,refreshToken:o.refresh_token});return await e.saveTokens(h),"AUTHORIZED"}catch(h){console.error("Could not refresh OAuth tokens:",h)}const{authorizationUrl:a,codeVerifier:l}=await kt(t,{metadata:i,clientInformation:s,redirectUrl:e.redirectUrl});return await e.saveCodeVerifier(l),await e.redirectToAuthorization(a),"REDIRECT"}async function Et(e,t){var n;const i=new URL("/.well-known/oauth-authorization-server",e);let s;try{s=await fetch(i,{headers:{"MCP-Protocol-Version":(n=t==null?void 0:t.protocolVersion)!==null&&n!==void 0?n:st}})}catch(o){if(o instanceof TypeError)s=await fetch(i);else throw o}if(s.status!==404){if(!s.ok)throw new Error(`HTTP ${s.status} trying to load well-known OAuth metadata`);return gt.parse(await s.json())}}async function kt(e,{metadata:t,clientInformation:n,redirectUrl:i}){const s="code",o="S256";let a;if(t){if(a=new URL(t.authorization_endpoint),!t.response_types_supported.includes(s))throw new Error(`Incompatible auth server: does not support response type ${s}`);if(!t.code_challenge_methods_supported||!t.code_challenge_methods_supported.includes(o))throw new Error(`Incompatible auth server: does not support code challenge method ${o}`)}else a=new URL("/authorize",e);const l=await wt(),h=l.code_verifier,p=l.code_challenge;return a.searchParams.set("response_type",s),a.searchParams.set("client_id",n.client_id),a.searchParams.set("code_challenge",p),a.searchParams.set("code_challenge_method",o),a.searchParams.set("redirect_uri",String(i)),{authorizationUrl:a,codeVerifier:h}}async function Tt(e,{metadata:t,clientInformation:n,authorizationCode:i,codeVerifier:s,redirectUri:o}){const a="authorization_code";let l;if(t){if(l=new URL(t.token_endpoint),t.grant_types_supported&&!t.grant_types_supported.includes(a))throw new Error(`Incompatible auth server: does not support grant type ${a}`)}else l=new URL("/token",e);const h=new URLSearchParams({grant_type:a,client_id:n.client_id,code:i,code_verifier:s,redirect_uri:String(o)});n.client_secret&&h.set("client_secret",n.client_secret);const p=await fetch(l,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:h});if(!p.ok)throw new Error(`Token exchange failed: HTTP ${p.status}`);return ot.parse(await p.json())}async function St(e,{metadata:t,clientInformation:n,refreshToken:i}){const s="refresh_token";let o;if(t){if(o=new URL(t.token_endpoint),t.grant_types_supported&&!t.grant_types_supported.includes(s))throw new Error(`Incompatible auth server: does not support grant type ${s}`)}else o=new URL("/token",e);const a=new URLSearchParams({grant_type:s,client_id:n.client_id,refresh_token:i});n.client_secret&&a.set("client_secret",n.client_secret);const l=await fetch(o,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:a});if(!l.ok)throw new Error(`Token refresh failed: HTTP ${l.status}`);return ot.parse(await l.json())}async function bt(e,{metadata:t,clientMetadata:n}){let i;if(t){if(!t.registration_endpoint)throw new Error("Incompatible auth server: does not support dynamic client registration");i=new URL(t.registration_endpoint)}else i=new URL("/register",e);const s=await fetch(i,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});if(!s.ok)throw new Error(`Dynamic client registration failed: HTTP ${s.status}`);return mt.parse(await s.json())}class Ct extends Error{constructor(t,n,i){super(`SSE error: ${n}`),this.code=t,this.event=i}}class Pt{constructor(t,n){this._url=t,this._eventSourceInit=n==null?void 0:n.eventSourceInit,this._requestInit=n==null?void 0:n.requestInit,this._authProvider=n==null?void 0:n.authProvider}async _authThenStart(){var t;if(!this._authProvider)throw new P("No auth provider");let n;try{n=await V(this._authProvider,{serverUrl:this._url})}catch(i){throw(t=this.onerror)===null||t===void 0||t.call(this,i),i}if(n!=="AUTHORIZED")throw new P;return await this._startOrAuth()}async _commonHeaders(){const t={};if(this._authProvider){const n=await this._authProvider.tokens();n&&(t.Authorization=`Bearer ${n.access_token}`)}return t}_startOrAuth(){return new Promise((t,n)=>{var i;this._eventSource=new $(this._url.href,(i=this._eventSourceInit)!==null&&i!==void 0?i:{fetch:(s,o)=>this._commonHeaders().then(a=>fetch(s,{...o,headers:{...a,Accept:"text/event-stream"}}))}),this._abortController=new AbortController,this._eventSource.onerror=s=>{var o;if(s.code===401&&this._authProvider){this._authThenStart().then(t,n);return}const a=new Ct(s.code,s.message,s);n(a),(o=this.onerror)===null||o===void 0||o.call(this,a)},this._eventSource.onopen=()=>{},this._eventSource.addEventListener("endpoint",s=>{var o;const a=s;try{if(this._endpoint=new URL(a.data,this._url),this._endpoint.origin!==this._url.origin)throw new Error(`Endpoint origin does not match connection origin: ${this._endpoint.origin}`)}catch(l){n(l),(o=this.onerror)===null||o===void 0||o.call(this,l),this.close();return}t()}),this._eventSource.onmessage=s=>{var o,a;const l=s;let h;try{h=at.parse(JSON.parse(l.data))}catch(p){(o=this.onerror)===null||o===void 0||o.call(this,p);return}(a=this.onmessage)===null||a===void 0||a.call(this,h)}})}async start(){if(this._eventSource)throw new Error("SSEClientTransport already started! If using Client class, note that connect() calls start() automatically.");return await this._startOrAuth()}async finishAuth(t){if(!this._authProvider)throw new P("No auth provider");if(await V(this._authProvider,{serverUrl:this._url,authorizationCode:t})!=="AUTHORIZED")throw new P("Failed to authorize")}async close(){var t,n,i;(t=this._abortController)===null||t===void 0||t.abort(),(n=this._eventSource)===null||n===void 0||n.close(),(i=this.onclose)===null||i===void 0||i.call(this)}async send(t){var n,i,s;if(!this._endpoint)throw new Error("Not connected");try{const o=await this._commonHeaders(),a=new Headers({...o,...(n=this._requestInit)===null||n===void 0?void 0:n.headers});a.set("content-type","application/json");const l={...this._requestInit,method:"POST",headers:a,body:JSON.stringify(t),signal:(i=this._abortController)===null||i===void 0?void 0:i.signal},h=await fetch(this._endpoint,l);if(!h.ok){if(h.status===401&&this._authProvider){if(await V(this._authProvider,{serverUrl:this._url})!=="AUTHORIZED")throw new P;return this.send(t)}const p=await h.text().catch(()=>null);throw new Error(`Error POSTing to endpoint (HTTP ${h.status}): ${p}`)}}catch(o){throw(s=this.onerror)===null||s===void 0||s.call(this,o),o}}}export{Pt as SSEClientTransport,Ct as SseError};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{M as K,N as Y,q as X}from"./client-B3aq8qpT.js";import{J as Q}from"./types-Co05Usx1.js";var E={exports:{}};const w={},Z=Object.freeze(Object.defineProperty({__proto__:null,default:w},Symbol.toStringTag,{value:"Module"})),v=K(Z);var S,H;function ee(){if(H)return S;H=1;var e={};S=s,s.sync=i;var n=v;function t(o,l){var u=l.pathExt!==void 0?l.pathExt:e.PATHEXT;if(!u||(u=u.split(";"),u.indexOf("")!==-1))return!0;for(var c=0;c<u.length;c++){var a=u[c].toLowerCase();if(a&&o.substr(-a.length).toLowerCase()===a)return!0}return!1}function r(o,l,u){return!o.isSymbolicLink()&&!o.isFile()?!1:t(l,u)}function s(o,l,u){n.stat(o,function(c,a){u(c,c?!1:r(a,o,l))})}function i(o,l){return r(n.statSync(o),o,l)}return S}var b,j;function ne(){if(j)return b;j=1,b=n,n.sync=t;var e=v;function n(i,o,l){e.stat(i,function(u,c){l(u,u?!1:r(c,o))})}function t(i,o){return r(e.statSync(i),o)}function r(i,o){return i.isFile()&&s(i,o)}function s(i,o){var l=i.mode,u=i.uid,c=i.gid,a=o.uid!==void 0?o.uid:process.getuid&&process.getuid(),f=o.gid!==void 0?o.gid:process.getgid&&process.getgid(),d=parseInt("100",8),h=parseInt("010",8),p=parseInt("001",8),_=d|h,x=l&p||l&h&&c===f||l&d&&u===a||l&_&&a===0;return x}return b}var g;process.platform==="win32"||Y.TESTING_WINDOWS?g=ee():g=ne();var te=P;P.sync=re;function P(e,n,t){if(typeof n=="function"&&(t=n,n={}),!t){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(r,s){P(e,n||{},function(i,o){i?s(i):r(o)})})}g(e,n||{},function(r,s){r&&(r.code==="EACCES"||n&&n.ignoreErrors)&&(r=null,s=!1),t(r,s)})}function re(e,n){try{return g.sync(e,n||{})}catch(t){if(n&&n.ignoreErrors||t.code==="EACCES")return!1;throw t}}var y={};const m=process.platform==="win32"||y.OSTYPE==="cygwin"||y.OSTYPE==="msys",k=v,se=m?";":":",F=te,W=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),z=(e,n)=>{const t=n.colon||se,r=e.match(/\//)||m&&e.match(/\\/)?[""]:[...m?[process.cwd()]:[],...(n.path||y.PATH||"").split(t)],s=m?n.pathExt||y.PATHEXT||".EXE;.CMD;.BAT;.COM":"",i=m?s.split(t):[""];return m&&e.indexOf(".")!==-1&&i[0]!==""&&i.unshift(""),{pathEnv:r,pathExt:i,pathExtExe:s}},U=(e,n,t)=>{typeof n=="function"&&(t=n,n={}),n||(n={});const{pathEnv:r,pathExt:s,pathExtExe:i}=z(e,n),o=[],l=c=>new Promise((a,f)=>{if(c===r.length)return n.all&&o.length?a(o):f(W(e));const d=r[c],h=/^".*"$/.test(d)?d.slice(1,-1):d,p=k.join(h,e),_=!h&&/^\.[\\\/]/.test(e)?e.slice(0,2)+p:p;a(u(_,c,0))}),u=(c,a,f)=>new Promise((d,h)=>{if(f===s.length)return d(l(a+1));const p=s[f];F(c+p,{pathExt:i},(_,x)=>{if(!_&&x)if(n.all)o.push(c+p);else return d(c+p);return d(u(c,a,f+1))})});return t?l(0).then(c=>t(null,c),t):l(0)},oe=(e,n)=>{n=n||{};const{pathEnv:t,pathExt:r,pathExtExe:s}=z(e,n),i=[];for(let o=0;o<t.length;o++){const l=t[o],u=/^".*"$/.test(l)?l.slice(1,-1):l,c=k.join(u,e),a=!u&&/^\.[\\\/]/.test(e)?e.slice(0,2)+c:c;for(let f=0;f<r.length;f++){const d=a+r[f];try{if(F.sync(d,{pathExt:s}))if(n.all)i.push(d);else return d}catch{}}}if(n.all&&i.length)return i;if(n.nothrow)return null;throw W(e)};var ie=U;U.sync=oe;var T={exports:{}},ce={};const q=(e={})=>{const n=e.env||ce;return(e.platform||process.platform)!=="win32"?"PATH":Object.keys(n).reverse().find(r=>r.toUpperCase()==="PATH")||"Path"};T.exports=q;T.exports.default=q;var ae=T.exports,le={};const I=v,ue=ie,fe=ae;function B(e,n){const t=e.options.env||le,r=process.cwd(),s=e.options.cwd!=null,i=s&&process.chdir!==void 0&&!process.chdir.disabled;if(i)try{process.chdir(e.options.cwd)}catch{}let o;try{o=ue.sync(e.command,{path:t[fe({env:t})],pathExt:n?I.delimiter:void 0})}catch{}finally{i&&process.chdir(r)}return o&&(o=I.resolve(s?e.options.cwd:"",o)),o}function de(e){return B(e)||B(e,!0)}var he=de,O={};const C=/([()\][%!^"`<>&|;, *?])/g;function pe(e){return e=e.replace(C,"^$1"),e}function ve(e,n){return e=`${e}`,e=e.replace(/(?=(\\+?)?)\1"/g,'$1$1\\"'),e=e.replace(/(?=(\\+?)?)\1$/,"$1$1"),e=`"${e}"`,e=e.replace(C,"^$1"),n&&(e=e.replace(C,"^$1")),e}O.command=pe;O.argument=ve;var me=/^#!(.*)/;const Ee=me;var _e=(e="")=>{const n=e.match(Ee);if(!n)return null;const[t,r]=n[0].replace(/#! ?/,"").split(" "),s=t.split("/").pop();return s==="env"?r:r?`${s} ${r}`:s};const $=v,we=_e;function ge(e){const t=Buffer.alloc(150);let r;try{r=$.openSync(e,"r"),$.readSync(r,t,0,150,0),$.closeSync(r)}catch{}return we(t.toString())}var ye=ge,xe={};const Se=v,D=he,L=O,be=ye,$e=process.platform==="win32",Ce=/\.(?:com|exe)$/i,Pe=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function Te(e){e.file=D(e);const n=e.file&&be(e.file);return n?(e.args.unshift(e.file),e.command=n,D(e)):e.file}function Oe(e){if(!$e)return e;const n=Te(e),t=!Ce.test(n);if(e.options.forceShell||t){const r=Pe.test(n);e.command=Se.normalize(e.command),e.command=L.command(e.command),e.args=e.args.map(i=>L.argument(i,r));const s=[e.command].concat(e.args).join(" ");e.args=["/d","/s","/c",`"${s}"`],e.command=xe.comspec||"cmd.exe",e.options.windowsVerbatimArguments=!0}return e}function Ae(e,n,t){n&&!Array.isArray(n)&&(t=n,n=null),n=n?n.slice(0):[],t=Object.assign({},t);const r={command:e,args:n,options:t,file:void 0,original:{command:e,args:n}};return t.shell?r:Oe(r)}var Ne=Ae;const A=process.platform==="win32";function N(e,n){return Object.assign(new Error(`${n} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${n} ${e.command}`,path:e.command,spawnargs:e.args})}function Re(e,n){if(!A)return;const t=e.emit;e.emit=function(r,s){if(r==="exit"){const i=V(s,n);if(i)return t.call(e,"error",i)}return t.apply(e,arguments)}}function V(e,n){return A&&e===1&&!n.file?N(n.original,"spawn"):null}function Me(e,n){return A&&e===1&&!n.file?N(n.original,"spawnSync"):null}var He={hookChildProcess:Re,verifyENOENT:V,verifyENOENTSync:Me,notFoundError:N};const G=v,R=Ne,M=He;function J(e,n,t){const r=R(e,n,t),s=G.spawn(r.command,r.args,r.options);return M.hookChildProcess(s,r),s}function je(e,n,t){const r=R(e,n,t),s=G.spawnSync(r.command,r.args,r.options);return s.error=s.error||M.verifyENOENTSync(s.status,r),s}E.exports=J;E.exports.spawn=J;E.exports.sync=je;E.exports._parse=R;E.exports._enoent=M;var Ie=E.exports;const Be=X(Ie);class De{append(n){this._buffer=this._buffer?Buffer.concat([this._buffer,n]):n}readMessage(){if(!this._buffer)return null;const n=this._buffer.indexOf(`
|
|
2
|
-
`);if(n===-1)return null;const t=this._buffer.toString("utf8",0,n).replace(/\r$/,"");return this._buffer=this._buffer.subarray(n+1),Le(t)}clear(){this._buffer=void 0}}function Le(e){return Q.parse(JSON.parse(e))}function ke(e){return JSON.stringify(e)+`
|
|
3
|
-
`}const Fe=w.platform==="win32"?["APPDATA","HOMEDRIVE","HOMEPATH","LOCALAPPDATA","PATH","PROCESSOR_ARCHITECTURE","SYSTEMDRIVE","SYSTEMROOT","TEMP","USERNAME","USERPROFILE"]:["HOME","LOGNAME","PATH","SHELL","TERM","USER"];function We(){const e={};for(const n of Fe){const t=w.env[n];t!==void 0&&(t.startsWith("()")||(e[n]=t))}return e}class Ve{constructor(n){this._abortController=new AbortController,this._readBuffer=new De,this._serverParams=n}async start(){if(this._process)throw new Error("StdioClientTransport already started! If using Client class, note that connect() calls start() automatically.");return new Promise((n,t)=>{var r,s,i,o,l,u;this._process=Be(this._serverParams.command,(r=this._serverParams.args)!==null&&r!==void 0?r:[],{env:(s=this._serverParams.env)!==null&&s!==void 0?s:We(),stdio:["pipe","pipe",(i=this._serverParams.stderr)!==null&&i!==void 0?i:"inherit"],shell:!1,signal:this._abortController.signal,windowsHide:w.platform==="win32"&&ze(),cwd:this._serverParams.cwd}),this._process.on("error",c=>{var a,f;if(c.name==="AbortError"){(a=this.onclose)===null||a===void 0||a.call(this);return}t(c),(f=this.onerror)===null||f===void 0||f.call(this,c)}),this._process.on("spawn",()=>{n()}),this._process.on("close",c=>{var a;this._process=void 0,(a=this.onclose)===null||a===void 0||a.call(this)}),(o=this._process.stdin)===null||o===void 0||o.on("error",c=>{var a;(a=this.onerror)===null||a===void 0||a.call(this,c)}),(l=this._process.stdout)===null||l===void 0||l.on("data",c=>{this._readBuffer.append(c),this.processReadBuffer()}),(u=this._process.stdout)===null||u===void 0||u.on("error",c=>{var a;(a=this.onerror)===null||a===void 0||a.call(this,c)})})}get stderr(){var n,t;return(t=(n=this._process)===null||n===void 0?void 0:n.stderr)!==null&&t!==void 0?t:null}processReadBuffer(){for(var n,t;;)try{const r=this._readBuffer.readMessage();if(r===null)break;(n=this.onmessage)===null||n===void 0||n.call(this,r)}catch(r){(t=this.onerror)===null||t===void 0||t.call(this,r)}}async close(){this._abortController.abort(),this._process=void 0,this._readBuffer.clear()}send(n){return new Promise(t=>{var r;if(!(!((r=this._process)===null||r===void 0)&&r.stdin))throw new Error("Not connected");const s=ke(n);this._process.stdin.write(s)?t():this._process.stdin.once("drain",t)})}}function ze(){return"type"in w}export{Fe as DEFAULT_INHERITED_ENV_VARS,Ve as StdioClientTransport,We as getDefaultEnvironment};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var x;(function(s){s.assertEqual=r=>r;function e(r){}s.assertIs=e;function t(r){throw new Error}s.assertNever=t,s.arrayToEnum=r=>{const a={};for(const o of r)a[o]=o;return a},s.getValidEnumValues=r=>{const a=s.objectKeys(r).filter(c=>typeof r[r[c]]!="number"),o={};for(const c of a)o[c]=r[c];return s.objectValues(o)},s.objectValues=r=>s.objectKeys(r).map(function(a){return r[a]}),s.objectKeys=typeof Object.keys=="function"?r=>Object.keys(r):r=>{const a=[];for(const o in r)Object.prototype.hasOwnProperty.call(r,o)&&a.push(o);return a},s.find=(r,a)=>{for(const o of r)if(a(o))return o},s.isInteger=typeof Number.isInteger=="function"?r=>Number.isInteger(r):r=>typeof r=="number"&&isFinite(r)&&Math.floor(r)===r;function n(r,a=" | "){return r.map(o=>typeof o=="string"?`'${o}'`:o).join(a)}s.joinValues=n,s.jsonStringifyReplacer=(r,a)=>typeof a=="bigint"?a.toString():a})(x||(x={}));var Ee;(function(s){s.mergeShapes=(e,t)=>({...e,...t})})(Ee||(Ee={}));const f=x.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),$=s=>{switch(typeof s){case"undefined":return f.undefined;case"string":return f.string;case"number":return isNaN(s)?f.nan:f.number;case"boolean":return f.boolean;case"function":return f.function;case"bigint":return f.bigint;case"symbol":return f.symbol;case"object":return Array.isArray(s)?f.array:s===null?f.null:s.then&&typeof s.then=="function"&&s.catch&&typeof s.catch=="function"?f.promise:typeof Map<"u"&&s instanceof Map?f.map:typeof Set<"u"&&s instanceof Set?f.set:typeof Date<"u"&&s instanceof Date?f.date:f.object;default:return f.unknown}},d=x.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"]),ht=s=>JSON.stringify(s,null,2).replace(/"([^"]+)":/g,"$1:");class T extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}format(e){const t=e||function(a){return a.message},n={_errors:[]},r=a=>{for(const o of a.issues)if(o.code==="invalid_union")o.unionErrors.map(r);else if(o.code==="invalid_return_type")r(o.returnTypeError);else if(o.code==="invalid_arguments")r(o.argumentsError);else if(o.path.length===0)n._errors.push(t(o));else{let c=n,h=0;for(;h<o.path.length;){const u=o.path[h];h===o.path.length-1?(c[u]=c[u]||{_errors:[]},c[u]._errors.push(t(o))):c[u]=c[u]||{_errors:[]},c=c[u],h++}}};return r(this),n}static assert(e){if(!(e instanceof T))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,x.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=t=>t.message){const t={},n=[];for(const r of this.issues)r.path.length>0?(t[r.path[0]]=t[r.path[0]]||[],t[r.path[0]].push(e(r))):n.push(e(r));return{formErrors:n,fieldErrors:t}}get formErrors(){return this.flatten()}}T.create=s=>new T(s);const H=(s,e)=>{let t;switch(s.code){case d.invalid_type:s.received===f.undefined?t="Required":t=`Expected ${s.expected}, received ${s.received}`;break;case d.invalid_literal:t=`Invalid literal value, expected ${JSON.stringify(s.expected,x.jsonStringifyReplacer)}`;break;case d.unrecognized_keys:t=`Unrecognized key(s) in object: ${x.joinValues(s.keys,", ")}`;break;case d.invalid_union:t="Invalid input";break;case d.invalid_union_discriminator:t=`Invalid discriminator value. Expected ${x.joinValues(s.options)}`;break;case d.invalid_enum_value:t=`Invalid enum value. Expected ${x.joinValues(s.options)}, received '${s.received}'`;break;case d.invalid_arguments:t="Invalid function arguments";break;case d.invalid_return_type:t="Invalid function return type";break;case d.invalid_date:t="Invalid date";break;case d.invalid_string:typeof s.validation=="object"?"includes"in s.validation?(t=`Invalid input: must include "${s.validation.includes}"`,typeof s.validation.position=="number"&&(t=`${t} at one or more positions greater than or equal to ${s.validation.position}`)):"startsWith"in s.validation?t=`Invalid input: must start with "${s.validation.startsWith}"`:"endsWith"in s.validation?t=`Invalid input: must end with "${s.validation.endsWith}"`:x.assertNever(s.validation):s.validation!=="regex"?t=`Invalid ${s.validation}`:t="Invalid";break;case d.too_small:s.type==="array"?t=`Array must contain ${s.exact?"exactly":s.inclusive?"at least":"more than"} ${s.minimum} element(s)`:s.type==="string"?t=`String must contain ${s.exact?"exactly":s.inclusive?"at least":"over"} ${s.minimum} character(s)`:s.type==="number"?t=`Number must be ${s.exact?"exactly equal to ":s.inclusive?"greater than or equal to ":"greater than "}${s.minimum}`:s.type==="date"?t=`Date must be ${s.exact?"exactly equal to ":s.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(s.minimum))}`:t="Invalid input";break;case d.too_big:s.type==="array"?t=`Array must contain ${s.exact?"exactly":s.inclusive?"at most":"less than"} ${s.maximum} element(s)`:s.type==="string"?t=`String must contain ${s.exact?"exactly":s.inclusive?"at most":"under"} ${s.maximum} character(s)`:s.type==="number"?t=`Number must be ${s.exact?"exactly":s.inclusive?"less than or equal to":"less than"} ${s.maximum}`:s.type==="bigint"?t=`BigInt must be ${s.exact?"exactly":s.inclusive?"less than or equal to":"less than"} ${s.maximum}`:s.type==="date"?t=`Date must be ${s.exact?"exactly":s.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(s.maximum))}`:t="Invalid input";break;case d.custom:t="Invalid input";break;case d.invalid_intersection_types:t="Intersection results could not be merged";break;case d.not_multiple_of:t=`Number must be a multiple of ${s.multipleOf}`;break;case d.not_finite:t="Number must be finite";break;default:t=e.defaultError,x.assertNever(s)}return{message:t}};let Ue=H;function ft(s){Ue=s}function ye(){return Ue}const ve=s=>{const{data:e,path:t,errorMaps:n,issueData:r}=s,a=[...t,...r.path||[]],o={...r,path:a};if(r.message!==void 0)return{...r,path:a,message:r.message};let c="";const h=n.filter(u=>!!u).slice().reverse();for(const u of h)c=u(o,{data:e,defaultError:c}).message;return{...r,path:a,message:c}},pt=[];function l(s,e){const t=ye(),n=ve({issueData:e,data:s.data,path:s.path,errorMaps:[s.common.contextualErrorMap,s.schemaErrorMap,t,t===H?void 0:H].filter(r=>!!r)});s.common.issues.push(n)}class k{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,t){const n=[];for(const r of t){if(r.status==="aborted")return y;r.status==="dirty"&&e.dirty(),n.push(r.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,t){const n=[];for(const r of t){const a=await r.key,o=await r.value;n.push({key:a,value:o})}return k.mergeObjectSync(e,n)}static mergeObjectSync(e,t){const n={};for(const r of t){const{key:a,value:o}=r;if(a.status==="aborted"||o.status==="aborted")return y;a.status==="dirty"&&e.dirty(),o.status==="dirty"&&e.dirty(),a.value!=="__proto__"&&(typeof o.value<"u"||r.alwaysSet)&&(n[a.value]=o.value)}return{status:e.value,value:n}}}const y=Object.freeze({status:"aborted"}),Y=s=>({status:"dirty",value:s}),S=s=>({status:"valid",value:s}),Pe=s=>s.status==="aborted",Me=s=>s.status==="dirty",B=s=>s.status==="valid",te=s=>typeof Promise<"u"&&s instanceof Promise;function _e(s,e,t,n){if(typeof e=="function"?s!==e||!0:!e.has(s))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e.get(s)}function Be(s,e,t,n,r){if(typeof e=="function"?s!==e||!0:!e.has(s))throw new TypeError("Cannot write private member to an object whose class did not declare it");return e.set(s,t),t}var p;(function(s){s.errToObj=e=>typeof e=="string"?{message:e}:e||{},s.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(p||(p={}));var K,ee;class I{constructor(e,t,n,r){this._cachedPath=[],this.parent=e,this.data=t,this._path=n,this._key=r}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Ve=(s,e)=>{if(B(e))return{success:!0,data:e.value};if(!s.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new T(s.common.issues);return this._error=t,this._error}}};function v(s){if(!s)return{};const{errorMap:e,invalid_type_error:t,required_error:n,description:r}=s;if(e&&(t||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:r}:{errorMap:(o,c)=>{var h,u;const{message:m}=s;return o.code==="invalid_enum_value"?{message:m??c.defaultError}:typeof c.data>"u"?{message:(h=m??n)!==null&&h!==void 0?h:c.defaultError}:o.code!=="invalid_type"?{message:c.defaultError}:{message:(u=m??t)!==null&&u!==void 0?u:c.defaultError}},description:r}}class _{get description(){return this._def.description}_getType(e){return $(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:$(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new k,ctx:{common:e.parent.common,data:e.data,parsedType:$(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(te(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const n=this.safeParse(e,t);if(n.success)return n.data;throw n.error}safeParse(e,t){var n;const r={common:{issues:[],async:(n=t==null?void 0:t.async)!==null&&n!==void 0?n:!1,contextualErrorMap:t==null?void 0:t.errorMap},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:$(e)},a=this._parseSync({data:e,path:r.path,parent:r});return Ve(r,a)}"~validate"(e){var t,n;const r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:$(e)};if(!this["~standard"].async)try{const a=this._parseSync({data:e,path:[],parent:r});return B(a)?{value:a.value}:{issues:r.common.issues}}catch(a){!((n=(t=a==null?void 0:a.message)===null||t===void 0?void 0:t.toLowerCase())===null||n===void 0)&&n.includes("encountered")&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:r}).then(a=>B(a)?{value:a.value}:{issues:r.common.issues})}async parseAsync(e,t){const n=await this.safeParseAsync(e,t);if(n.success)return n.data;throw n.error}async safeParseAsync(e,t){const n={common:{issues:[],contextualErrorMap:t==null?void 0:t.errorMap,async:!0},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:$(e)},r=this._parse({data:e,path:n.path,parent:n}),a=await(te(r)?r:Promise.resolve(r));return Ve(n,a)}refine(e,t){const n=r=>typeof t=="string"||typeof t>"u"?{message:t}:typeof t=="function"?t(r):t;return this._refinement((r,a)=>{const o=e(r),c=()=>a.addIssue({code:d.custom,...n(r)});return typeof Promise<"u"&&o instanceof Promise?o.then(h=>h?!0:(c(),!1)):o?!0:(c(),!1)})}refinement(e,t){return this._refinement((n,r)=>e(n)?!0:(r.addIssue(typeof t=="function"?t(n,r):t),!1))}_refinement(e){return new Z({schema:this,typeName:g.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,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:t=>this["~validate"](t)}}optional(){return A.create(this,this._def)}nullable(){return q.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return j.create(this)}promise(){return Q.create(this,this._def)}or(e){return ae.create([this,e],this._def)}and(e){return ie.create(this,e,this._def)}transform(e){return new Z({...v(this._def),schema:this,typeName:g.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t=typeof e=="function"?e:()=>e;return new le({...v(this._def),innerType:this,defaultValue:t,typeName:g.ZodDefault})}brand(){return new Le({typeName:g.ZodBranded,type:this,...v(this._def)})}catch(e){const t=typeof e=="function"?e:()=>e;return new he({...v(this._def),innerType:this,catchValue:t,typeName:g.ZodCatch})}describe(e){const t=this.constructor;return new t({...this._def,description:e})}pipe(e){return pe.create(this,e)}readonly(){return fe.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const mt=/^c[^\s-]{8,}$/i,gt=/^[0-9a-z]+$/,yt=/^[0-9A-HJKMNP-TV-Z]{26}$/i,vt=/^[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,_t=/^[a-z0-9_-]{21}$/i,xt=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,bt=/^[-+]?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)?)??$/,kt=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,wt="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Ie;const St=/^(?:(?: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])$/,Tt=/^(?:(?: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])$/,Rt=/^(([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]))$/,Ct=/^(([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])$/,jt=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Zt=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Fe="((\\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])))",Nt=new RegExp(`^${Fe}$`);function We(s){let e="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return s.precision?e=`${e}\\.\\d{${s.precision}}`:s.precision==null&&(e=`${e}(\\.\\d+)?`),e}function Ot(s){return new RegExp(`^${We(s)}$`)}function Je(s){let e=`${Fe}T${We(s)}`;const t=[];return t.push(s.local?"Z?":"Z"),s.offset&&t.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${t.join("|")})`,new RegExp(`^${e}$`)}function At(s,e){return!!((e==="v4"||!e)&&St.test(s)||(e==="v6"||!e)&&Rt.test(s))}function It(s,e){if(!xt.test(s))return!1;try{const[t]=s.split("."),n=t.replace(/-/g,"+").replace(/_/g,"/").padEnd(t.length+(4-t.length%4)%4,"="),r=JSON.parse(atob(n));return!(typeof r!="object"||r===null||!r.typ||!r.alg||e&&r.alg!==e)}catch{return!1}}function Et(s,e){return!!((e==="v4"||!e)&&Tt.test(s)||(e==="v6"||!e)&&Ct.test(s))}class C extends _{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==f.string){const a=this._getOrReturnCtx(e);return l(a,{code:d.invalid_type,expected:f.string,received:a.parsedType}),y}const n=new k;let r;for(const a of this._def.checks)if(a.kind==="min")e.data.length<a.value&&(r=this._getOrReturnCtx(e,r),l(r,{code:d.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),n.dirty());else if(a.kind==="max")e.data.length>a.value&&(r=this._getOrReturnCtx(e,r),l(r,{code:d.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),n.dirty());else if(a.kind==="length"){const o=e.data.length>a.value,c=e.data.length<a.value;(o||c)&&(r=this._getOrReturnCtx(e,r),o?l(r,{code:d.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):c&&l(r,{code:d.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),n.dirty())}else if(a.kind==="email")kt.test(e.data)||(r=this._getOrReturnCtx(e,r),l(r,{validation:"email",code:d.invalid_string,message:a.message}),n.dirty());else if(a.kind==="emoji")Ie||(Ie=new RegExp(wt,"u")),Ie.test(e.data)||(r=this._getOrReturnCtx(e,r),l(r,{validation:"emoji",code:d.invalid_string,message:a.message}),n.dirty());else if(a.kind==="uuid")vt.test(e.data)||(r=this._getOrReturnCtx(e,r),l(r,{validation:"uuid",code:d.invalid_string,message:a.message}),n.dirty());else if(a.kind==="nanoid")_t.test(e.data)||(r=this._getOrReturnCtx(e,r),l(r,{validation:"nanoid",code:d.invalid_string,message:a.message}),n.dirty());else if(a.kind==="cuid")mt.test(e.data)||(r=this._getOrReturnCtx(e,r),l(r,{validation:"cuid",code:d.invalid_string,message:a.message}),n.dirty());else if(a.kind==="cuid2")gt.test(e.data)||(r=this._getOrReturnCtx(e,r),l(r,{validation:"cuid2",code:d.invalid_string,message:a.message}),n.dirty());else if(a.kind==="ulid")yt.test(e.data)||(r=this._getOrReturnCtx(e,r),l(r,{validation:"ulid",code:d.invalid_string,message:a.message}),n.dirty());else if(a.kind==="url")try{new URL(e.data)}catch{r=this._getOrReturnCtx(e,r),l(r,{validation:"url",code:d.invalid_string,message:a.message}),n.dirty()}else a.kind==="regex"?(a.regex.lastIndex=0,a.regex.test(e.data)||(r=this._getOrReturnCtx(e,r),l(r,{validation:"regex",code:d.invalid_string,message:a.message}),n.dirty())):a.kind==="trim"?e.data=e.data.trim():a.kind==="includes"?e.data.includes(a.value,a.position)||(r=this._getOrReturnCtx(e,r),l(r,{code:d.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),n.dirty()):a.kind==="toLowerCase"?e.data=e.data.toLowerCase():a.kind==="toUpperCase"?e.data=e.data.toUpperCase():a.kind==="startsWith"?e.data.startsWith(a.value)||(r=this._getOrReturnCtx(e,r),l(r,{code:d.invalid_string,validation:{startsWith:a.value},message:a.message}),n.dirty()):a.kind==="endsWith"?e.data.endsWith(a.value)||(r=this._getOrReturnCtx(e,r),l(r,{code:d.invalid_string,validation:{endsWith:a.value},message:a.message}),n.dirty()):a.kind==="datetime"?Je(a).test(e.data)||(r=this._getOrReturnCtx(e,r),l(r,{code:d.invalid_string,validation:"datetime",message:a.message}),n.dirty()):a.kind==="date"?Nt.test(e.data)||(r=this._getOrReturnCtx(e,r),l(r,{code:d.invalid_string,validation:"date",message:a.message}),n.dirty()):a.kind==="time"?Ot(a).test(e.data)||(r=this._getOrReturnCtx(e,r),l(r,{code:d.invalid_string,validation:"time",message:a.message}),n.dirty()):a.kind==="duration"?bt.test(e.data)||(r=this._getOrReturnCtx(e,r),l(r,{validation:"duration",code:d.invalid_string,message:a.message}),n.dirty()):a.kind==="ip"?At(e.data,a.version)||(r=this._getOrReturnCtx(e,r),l(r,{validation:"ip",code:d.invalid_string,message:a.message}),n.dirty()):a.kind==="jwt"?It(e.data,a.alg)||(r=this._getOrReturnCtx(e,r),l(r,{validation:"jwt",code:d.invalid_string,message:a.message}),n.dirty()):a.kind==="cidr"?Et(e.data,a.version)||(r=this._getOrReturnCtx(e,r),l(r,{validation:"cidr",code:d.invalid_string,message:a.message}),n.dirty()):a.kind==="base64"?jt.test(e.data)||(r=this._getOrReturnCtx(e,r),l(r,{validation:"base64",code:d.invalid_string,message:a.message}),n.dirty()):a.kind==="base64url"?Zt.test(e.data)||(r=this._getOrReturnCtx(e,r),l(r,{validation:"base64url",code:d.invalid_string,message:a.message}),n.dirty()):x.assertNever(a);return{status:n.value,value:e.data}}_regex(e,t,n){return this.refinement(r=>e.test(r),{validation:t,code:d.invalid_string,...p.errToObj(n)})}_addCheck(e){return new C({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...p.errToObj(e)})}url(e){return this._addCheck({kind:"url",...p.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...p.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...p.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...p.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...p.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...p.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...p.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...p.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...p.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...p.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...p.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...p.errToObj(e)})}datetime(e){var t,n;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(t=e==null?void 0:e.offset)!==null&&t!==void 0?t:!1,local:(n=e==null?void 0:e.local)!==null&&n!==void 0?n:!1,...p.errToObj(e==null?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,...p.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...p.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...p.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t==null?void 0:t.position,...p.errToObj(t==null?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...p.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...p.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...p.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...p.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...p.errToObj(t)})}nonempty(e){return this.min(1,p.errToObj(e))}trim(){return new C({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new C({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new C({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}}C.create=s=>{var e;return new C({checks:[],typeName:g.ZodString,coerce:(e=s==null?void 0:s.coerce)!==null&&e!==void 0?e:!1,...v(s)})};function Pt(s,e){const t=(s.toString().split(".")[1]||"").length,n=(e.toString().split(".")[1]||"").length,r=t>n?t:n,a=parseInt(s.toFixed(r).replace(".","")),o=parseInt(e.toFixed(r).replace(".",""));return a%o/Math.pow(10,r)}class V extends _{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==f.number){const a=this._getOrReturnCtx(e);return l(a,{code:d.invalid_type,expected:f.number,received:a.parsedType}),y}let n;const r=new k;for(const a of this._def.checks)a.kind==="int"?x.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{code:d.invalid_type,expected:"integer",received:"float",message:a.message}),r.dirty()):a.kind==="min"?(a.inclusive?e.data<a.value:e.data<=a.value)&&(n=this._getOrReturnCtx(e,n),l(n,{code:d.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),r.dirty()):a.kind==="max"?(a.inclusive?e.data>a.value:e.data>=a.value)&&(n=this._getOrReturnCtx(e,n),l(n,{code:d.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),r.dirty()):a.kind==="multipleOf"?Pt(e.data,a.value)!==0&&(n=this._getOrReturnCtx(e,n),l(n,{code:d.not_multiple_of,multipleOf:a.value,message:a.message}),r.dirty()):a.kind==="finite"?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{code:d.not_finite,message:a.message}),r.dirty()):x.assertNever(a);return{status:r.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,p.toString(t))}gt(e,t){return this.setLimit("min",e,!1,p.toString(t))}lte(e,t){return this.setLimit("max",e,!0,p.toString(t))}lt(e,t){return this.setLimit("max",e,!1,p.toString(t))}setLimit(e,t,n,r){return new V({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:p.toString(r)}]})}_addCheck(e){return new V({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:p.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:p.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:p.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:p.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:p.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:p.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:p.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:p.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:p.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&x.isInteger(e.value))}get isFinite(){let e=null,t=null;for(const n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(t===null||n.value>t)&&(t=n.value):n.kind==="max"&&(e===null||n.value<e)&&(e=n.value)}return Number.isFinite(t)&&Number.isFinite(e)}}V.create=s=>new V({checks:[],typeName:g.ZodNumber,coerce:(s==null?void 0:s.coerce)||!1,...v(s)});class z extends _{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==f.bigint)return this._getInvalidInput(e);let n;const r=new k;for(const a of this._def.checks)a.kind==="min"?(a.inclusive?e.data<a.value:e.data<=a.value)&&(n=this._getOrReturnCtx(e,n),l(n,{code:d.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),r.dirty()):a.kind==="max"?(a.inclusive?e.data>a.value:e.data>=a.value)&&(n=this._getOrReturnCtx(e,n),l(n,{code:d.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),r.dirty()):a.kind==="multipleOf"?e.data%a.value!==BigInt(0)&&(n=this._getOrReturnCtx(e,n),l(n,{code:d.not_multiple_of,multipleOf:a.value,message:a.message}),r.dirty()):x.assertNever(a);return{status:r.value,value:e.data}}_getInvalidInput(e){const t=this._getOrReturnCtx(e);return l(t,{code:d.invalid_type,expected:f.bigint,received:t.parsedType}),y}gte(e,t){return this.setLimit("min",e,!0,p.toString(t))}gt(e,t){return this.setLimit("min",e,!1,p.toString(t))}lte(e,t){return this.setLimit("max",e,!0,p.toString(t))}lt(e,t){return this.setLimit("max",e,!1,p.toString(t))}setLimit(e,t,n,r){return new z({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:p.toString(r)}]})}_addCheck(e){return new z({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:p.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:p.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:p.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:p.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:p.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}}z.create=s=>{var e;return new z({checks:[],typeName:g.ZodBigInt,coerce:(e=s==null?void 0:s.coerce)!==null&&e!==void 0?e:!1,...v(s)})};class se extends _{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==f.boolean){const n=this._getOrReturnCtx(e);return l(n,{code:d.invalid_type,expected:f.boolean,received:n.parsedType}),y}return S(e.data)}}se.create=s=>new se({typeName:g.ZodBoolean,coerce:(s==null?void 0:s.coerce)||!1,...v(s)});class F extends _{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==f.date){const a=this._getOrReturnCtx(e);return l(a,{code:d.invalid_type,expected:f.date,received:a.parsedType}),y}if(isNaN(e.data.getTime())){const a=this._getOrReturnCtx(e);return l(a,{code:d.invalid_date}),y}const n=new k;let r;for(const a of this._def.checks)a.kind==="min"?e.data.getTime()<a.value&&(r=this._getOrReturnCtx(e,r),l(r,{code:d.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),n.dirty()):a.kind==="max"?e.data.getTime()>a.value&&(r=this._getOrReturnCtx(e,r),l(r,{code:d.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),n.dirty()):x.assertNever(a);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new F({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:p.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:p.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e!=null?new Date(e):null}}F.create=s=>new F({checks:[],coerce:(s==null?void 0:s.coerce)||!1,typeName:g.ZodDate,...v(s)});class xe extends _{_parse(e){if(this._getType(e)!==f.symbol){const n=this._getOrReturnCtx(e);return l(n,{code:d.invalid_type,expected:f.symbol,received:n.parsedType}),y}return S(e.data)}}xe.create=s=>new xe({typeName:g.ZodSymbol,...v(s)});class ne extends _{_parse(e){if(this._getType(e)!==f.undefined){const n=this._getOrReturnCtx(e);return l(n,{code:d.invalid_type,expected:f.undefined,received:n.parsedType}),y}return S(e.data)}}ne.create=s=>new ne({typeName:g.ZodUndefined,...v(s)});class re extends _{_parse(e){if(this._getType(e)!==f.null){const n=this._getOrReturnCtx(e);return l(n,{code:d.invalid_type,expected:f.null,received:n.parsedType}),y}return S(e.data)}}re.create=s=>new re({typeName:g.ZodNull,...v(s)});class X extends _{constructor(){super(...arguments),this._any=!0}_parse(e){return S(e.data)}}X.create=s=>new X({typeName:g.ZodAny,...v(s)});class U extends _{constructor(){super(...arguments),this._unknown=!0}_parse(e){return S(e.data)}}U.create=s=>new U({typeName:g.ZodUnknown,...v(s)});class L extends _{_parse(e){const t=this._getOrReturnCtx(e);return l(t,{code:d.invalid_type,expected:f.never,received:t.parsedType}),y}}L.create=s=>new L({typeName:g.ZodNever,...v(s)});class be extends _{_parse(e){if(this._getType(e)!==f.undefined){const n=this._getOrReturnCtx(e);return l(n,{code:d.invalid_type,expected:f.void,received:n.parsedType}),y}return S(e.data)}}be.create=s=>new be({typeName:g.ZodVoid,...v(s)});class j extends _{_parse(e){const{ctx:t,status:n}=this._processInputParams(e),r=this._def;if(t.parsedType!==f.array)return l(t,{code:d.invalid_type,expected:f.array,received:t.parsedType}),y;if(r.exactLength!==null){const o=t.data.length>r.exactLength.value,c=t.data.length<r.exactLength.value;(o||c)&&(l(t,{code:o?d.too_big:d.too_small,minimum:c?r.exactLength.value:void 0,maximum:o?r.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:r.exactLength.message}),n.dirty())}if(r.minLength!==null&&t.data.length<r.minLength.value&&(l(t,{code:d.too_small,minimum:r.minLength.value,type:"array",inclusive:!0,exact:!1,message:r.minLength.message}),n.dirty()),r.maxLength!==null&&t.data.length>r.maxLength.value&&(l(t,{code:d.too_big,maximum:r.maxLength.value,type:"array",inclusive:!0,exact:!1,message:r.maxLength.message}),n.dirty()),t.common.async)return Promise.all([...t.data].map((o,c)=>r.type._parseAsync(new I(t,o,t.path,c)))).then(o=>k.mergeArray(n,o));const a=[...t.data].map((o,c)=>r.type._parseSync(new I(t,o,t.path,c)));return k.mergeArray(n,a)}get element(){return this._def.type}min(e,t){return new j({...this._def,minLength:{value:e,message:p.toString(t)}})}max(e,t){return new j({...this._def,maxLength:{value:e,message:p.toString(t)}})}length(e,t){return new j({...this._def,exactLength:{value:e,message:p.toString(t)}})}nonempty(e){return this.min(1,e)}}j.create=(s,e)=>new j({type:s,minLength:null,maxLength:null,exactLength:null,typeName:g.ZodArray,...v(e)});function J(s){if(s instanceof b){const e={};for(const t in s.shape){const n=s.shape[t];e[t]=A.create(J(n))}return new b({...s._def,shape:()=>e})}else return s instanceof j?new j({...s._def,type:J(s.element)}):s instanceof A?A.create(J(s.unwrap())):s instanceof q?q.create(J(s.unwrap())):s instanceof E?E.create(s.items.map(e=>J(e))):s}class b extends _{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),t=x.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==f.object){const u=this._getOrReturnCtx(e);return l(u,{code:d.invalid_type,expected:f.object,received:u.parsedType}),y}const{status:n,ctx:r}=this._processInputParams(e),{shape:a,keys:o}=this._getCached(),c=[];if(!(this._def.catchall instanceof L&&this._def.unknownKeys==="strip"))for(const u in r.data)o.includes(u)||c.push(u);const h=[];for(const u of o){const m=a[u],w=r.data[u];h.push({key:{status:"valid",value:u},value:m._parse(new I(r,w,r.path,u)),alwaysSet:u in r.data})}if(this._def.catchall instanceof L){const u=this._def.unknownKeys;if(u==="passthrough")for(const m of c)h.push({key:{status:"valid",value:m},value:{status:"valid",value:r.data[m]}});else if(u==="strict")c.length>0&&(l(r,{code:d.unrecognized_keys,keys:c}),n.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const u=this._def.catchall;for(const m of c){const w=r.data[m];h.push({key:{status:"valid",value:m},value:u._parse(new I(r,w,r.path,m)),alwaysSet:m in r.data})}}return r.common.async?Promise.resolve().then(async()=>{const u=[];for(const m of h){const w=await m.key,ge=await m.value;u.push({key:w,value:ge,alwaysSet:m.alwaysSet})}return u}).then(u=>k.mergeObjectSync(n,u)):k.mergeObjectSync(n,h)}get shape(){return this._def.shape()}strict(e){return p.errToObj,new b({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,n)=>{var r,a,o,c;const h=(o=(a=(r=this._def).errorMap)===null||a===void 0?void 0:a.call(r,t,n).message)!==null&&o!==void 0?o:n.defaultError;return t.code==="unrecognized_keys"?{message:(c=p.errToObj(e).message)!==null&&c!==void 0?c:h}:{message:h}}}:{}})}strip(){return new b({...this._def,unknownKeys:"strip"})}passthrough(){return new b({...this._def,unknownKeys:"passthrough"})}extend(e){return new b({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new b({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:g.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new b({...this._def,catchall:e})}pick(e){const t={};return x.objectKeys(e).forEach(n=>{e[n]&&this.shape[n]&&(t[n]=this.shape[n])}),new b({...this._def,shape:()=>t})}omit(e){const t={};return x.objectKeys(this.shape).forEach(n=>{e[n]||(t[n]=this.shape[n])}),new b({...this._def,shape:()=>t})}deepPartial(){return J(this)}partial(e){const t={};return x.objectKeys(this.shape).forEach(n=>{const r=this.shape[n];e&&!e[n]?t[n]=r:t[n]=r.optional()}),new b({...this._def,shape:()=>t})}required(e){const t={};return x.objectKeys(this.shape).forEach(n=>{if(e&&!e[n])t[n]=this.shape[n];else{let a=this.shape[n];for(;a instanceof A;)a=a._def.innerType;t[n]=a}}),new b({...this._def,shape:()=>t})}keyof(){return Ye(x.objectKeys(this.shape))}}b.create=(s,e)=>new b({shape:()=>s,unknownKeys:"strip",catchall:L.create(),typeName:g.ZodObject,...v(e)});b.strictCreate=(s,e)=>new b({shape:()=>s,unknownKeys:"strict",catchall:L.create(),typeName:g.ZodObject,...v(e)});b.lazycreate=(s,e)=>new b({shape:s,unknownKeys:"strip",catchall:L.create(),typeName:g.ZodObject,...v(e)});class ae extends _{_parse(e){const{ctx:t}=this._processInputParams(e),n=this._def.options;function r(a){for(const c of a)if(c.result.status==="valid")return c.result;for(const c of a)if(c.result.status==="dirty")return t.common.issues.push(...c.ctx.common.issues),c.result;const o=a.map(c=>new T(c.ctx.common.issues));return l(t,{code:d.invalid_union,unionErrors:o}),y}if(t.common.async)return Promise.all(n.map(async a=>{const o={...t,common:{...t.common,issues:[]},parent:null};return{result:await a._parseAsync({data:t.data,path:t.path,parent:o}),ctx:o}})).then(r);{let a;const o=[];for(const h of n){const u={...t,common:{...t.common,issues:[]},parent:null},m=h._parseSync({data:t.data,path:t.path,parent:u});if(m.status==="valid")return m;m.status==="dirty"&&!a&&(a={result:m,ctx:u}),u.common.issues.length&&o.push(u.common.issues)}if(a)return t.common.issues.push(...a.ctx.common.issues),a.result;const c=o.map(h=>new T(h));return l(t,{code:d.invalid_union,unionErrors:c}),y}}get options(){return this._def.options}}ae.create=(s,e)=>new ae({options:s,typeName:g.ZodUnion,...v(e)});const M=s=>s instanceof ce?M(s.schema):s instanceof Z?M(s.innerType()):s instanceof de?[s.value]:s instanceof D?s.options:s instanceof ue?x.objectValues(s.enum):s instanceof le?M(s._def.innerType):s instanceof ne?[void 0]:s instanceof re?[null]:s instanceof A?[void 0,...M(s.unwrap())]:s instanceof q?[null,...M(s.unwrap())]:s instanceof Le||s instanceof fe?M(s.unwrap()):s instanceof he?M(s._def.innerType):[];class Se extends _{_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==f.object)return l(t,{code:d.invalid_type,expected:f.object,received:t.parsedType}),y;const n=this.discriminator,r=t.data[n],a=this.optionsMap.get(r);return a?t.common.async?a._parseAsync({data:t.data,path:t.path,parent:t}):a._parseSync({data:t.data,path:t.path,parent:t}):(l(t,{code:d.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),y)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,n){const r=new Map;for(const a of t){const o=M(a.shape[e]);if(!o.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const c of o){if(r.has(c))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(c)}`);r.set(c,a)}}return new Se({typeName:g.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:r,...v(n)})}}function $e(s,e){const t=$(s),n=$(e);if(s===e)return{valid:!0,data:s};if(t===f.object&&n===f.object){const r=x.objectKeys(e),a=x.objectKeys(s).filter(c=>r.indexOf(c)!==-1),o={...s,...e};for(const c of a){const h=$e(s[c],e[c]);if(!h.valid)return{valid:!1};o[c]=h.data}return{valid:!0,data:o}}else if(t===f.array&&n===f.array){if(s.length!==e.length)return{valid:!1};const r=[];for(let a=0;a<s.length;a++){const o=s[a],c=e[a],h=$e(o,c);if(!h.valid)return{valid:!1};r.push(h.data)}return{valid:!0,data:r}}else return t===f.date&&n===f.date&&+s==+e?{valid:!0,data:s}:{valid:!1}}class ie extends _{_parse(e){const{status:t,ctx:n}=this._processInputParams(e),r=(a,o)=>{if(Pe(a)||Pe(o))return y;const c=$e(a.value,o.value);return c.valid?((Me(a)||Me(o))&&t.dirty(),{status:t.value,value:c.data}):(l(n,{code:d.invalid_intersection_types}),y)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([a,o])=>r(a,o)):r(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}ie.create=(s,e,t)=>new ie({left:s,right:e,typeName:g.ZodIntersection,...v(t)});class E extends _{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==f.array)return l(n,{code:d.invalid_type,expected:f.array,received:n.parsedType}),y;if(n.data.length<this._def.items.length)return l(n,{code:d.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),y;!this._def.rest&&n.data.length>this._def.items.length&&(l(n,{code:d.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const a=[...n.data].map((o,c)=>{const h=this._def.items[c]||this._def.rest;return h?h._parse(new I(n,o,n.path,c)):null}).filter(o=>!!o);return n.common.async?Promise.all(a).then(o=>k.mergeArray(t,o)):k.mergeArray(t,a)}get items(){return this._def.items}rest(e){return new E({...this._def,rest:e})}}E.create=(s,e)=>{if(!Array.isArray(s))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new E({items:s,typeName:g.ZodTuple,rest:null,...v(e)})};class oe extends _{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==f.object)return l(n,{code:d.invalid_type,expected:f.object,received:n.parsedType}),y;const r=[],a=this._def.keyType,o=this._def.valueType;for(const c in n.data)r.push({key:a._parse(new I(n,c,n.path,c)),value:o._parse(new I(n,n.data[c],n.path,c)),alwaysSet:c in n.data});return n.common.async?k.mergeObjectAsync(t,r):k.mergeObjectSync(t,r)}get element(){return this._def.valueType}static create(e,t,n){return t instanceof _?new oe({keyType:e,valueType:t,typeName:g.ZodRecord,...v(n)}):new oe({keyType:C.create(),valueType:e,typeName:g.ZodRecord,...v(t)})}}class ke extends _{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==f.map)return l(n,{code:d.invalid_type,expected:f.map,received:n.parsedType}),y;const r=this._def.keyType,a=this._def.valueType,o=[...n.data.entries()].map(([c,h],u)=>({key:r._parse(new I(n,c,n.path,[u,"key"])),value:a._parse(new I(n,h,n.path,[u,"value"]))}));if(n.common.async){const c=new Map;return Promise.resolve().then(async()=>{for(const h of o){const u=await h.key,m=await h.value;if(u.status==="aborted"||m.status==="aborted")return y;(u.status==="dirty"||m.status==="dirty")&&t.dirty(),c.set(u.value,m.value)}return{status:t.value,value:c}})}else{const c=new Map;for(const h of o){const u=h.key,m=h.value;if(u.status==="aborted"||m.status==="aborted")return y;(u.status==="dirty"||m.status==="dirty")&&t.dirty(),c.set(u.value,m.value)}return{status:t.value,value:c}}}}ke.create=(s,e,t)=>new ke({valueType:e,keyType:s,typeName:g.ZodMap,...v(t)});class W extends _{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==f.set)return l(n,{code:d.invalid_type,expected:f.set,received:n.parsedType}),y;const r=this._def;r.minSize!==null&&n.data.size<r.minSize.value&&(l(n,{code:d.too_small,minimum:r.minSize.value,type:"set",inclusive:!0,exact:!1,message:r.minSize.message}),t.dirty()),r.maxSize!==null&&n.data.size>r.maxSize.value&&(l(n,{code:d.too_big,maximum:r.maxSize.value,type:"set",inclusive:!0,exact:!1,message:r.maxSize.message}),t.dirty());const a=this._def.valueType;function o(h){const u=new Set;for(const m of h){if(m.status==="aborted")return y;m.status==="dirty"&&t.dirty(),u.add(m.value)}return{status:t.value,value:u}}const c=[...n.data.values()].map((h,u)=>a._parse(new I(n,h,n.path,u)));return n.common.async?Promise.all(c).then(h=>o(h)):o(c)}min(e,t){return new W({...this._def,minSize:{value:e,message:p.toString(t)}})}max(e,t){return new W({...this._def,maxSize:{value:e,message:p.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}W.create=(s,e)=>new W({valueType:s,minSize:null,maxSize:null,typeName:g.ZodSet,...v(e)});class G extends _{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==f.function)return l(t,{code:d.invalid_type,expected:f.function,received:t.parsedType}),y;function n(c,h){return ve({data:c,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,ye(),H].filter(u=>!!u),issueData:{code:d.invalid_arguments,argumentsError:h}})}function r(c,h){return ve({data:c,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,ye(),H].filter(u=>!!u),issueData:{code:d.invalid_return_type,returnTypeError:h}})}const a={errorMap:t.common.contextualErrorMap},o=t.data;if(this._def.returns instanceof Q){const c=this;return S(async function(...h){const u=new T([]),m=await c._def.args.parseAsync(h,a).catch(Ae=>{throw u.addIssue(n(h,Ae)),u}),w=await Reflect.apply(o,this,m);return await c._def.returns._def.type.parseAsync(w,a).catch(Ae=>{throw u.addIssue(r(w,Ae)),u})})}else{const c=this;return S(function(...h){const u=c._def.args.safeParse(h,a);if(!u.success)throw new T([n(h,u.error)]);const m=Reflect.apply(o,this,u.data),w=c._def.returns.safeParse(m,a);if(!w.success)throw new T([r(m,w.error)]);return w.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new G({...this._def,args:E.create(e).rest(U.create())})}returns(e){return new G({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,n){return new G({args:e||E.create([]).rest(U.create()),returns:t||U.create(),typeName:g.ZodFunction,...v(n)})}}class ce extends _{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}ce.create=(s,e)=>new ce({getter:s,typeName:g.ZodLazy,...v(e)});class de extends _{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return l(t,{received:t.data,code:d.invalid_literal,expected:this._def.value}),y}return{status:"valid",value:e.data}}get value(){return this._def.value}}de.create=(s,e)=>new de({value:s,typeName:g.ZodLiteral,...v(e)});function Ye(s,e){return new D({values:s,typeName:g.ZodEnum,...v(e)})}class D extends _{constructor(){super(...arguments),K.set(this,void 0)}_parse(e){if(typeof e.data!="string"){const t=this._getOrReturnCtx(e),n=this._def.values;return l(t,{expected:x.joinValues(n),received:t.parsedType,code:d.invalid_type}),y}if(_e(this,K)||Be(this,K,new Set(this._def.values)),!_e(this,K).has(e.data)){const t=this._getOrReturnCtx(e),n=this._def.values;return l(t,{received:t.data,code:d.invalid_enum_value,options:n}),y}return S(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return D.create(e,{...this._def,...t})}exclude(e,t=this._def){return D.create(this.options.filter(n=>!e.includes(n)),{...this._def,...t})}}K=new WeakMap;D.create=Ye;class ue extends _{constructor(){super(...arguments),ee.set(this,void 0)}_parse(e){const t=x.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==f.string&&n.parsedType!==f.number){const r=x.objectValues(t);return l(n,{expected:x.joinValues(r),received:n.parsedType,code:d.invalid_type}),y}if(_e(this,ee)||Be(this,ee,new Set(x.getValidEnumValues(this._def.values))),!_e(this,ee).has(e.data)){const r=x.objectValues(t);return l(n,{received:n.data,code:d.invalid_enum_value,options:r}),y}return S(e.data)}get enum(){return this._def.values}}ee=new WeakMap;ue.create=(s,e)=>new ue({values:s,typeName:g.ZodNativeEnum,...v(e)});class Q extends _{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==f.promise&&t.common.async===!1)return l(t,{code:d.invalid_type,expected:f.promise,received:t.parsedType}),y;const n=t.parsedType===f.promise?t.data:Promise.resolve(t.data);return S(n.then(r=>this._def.type.parseAsync(r,{path:t.path,errorMap:t.common.contextualErrorMap})))}}Q.create=(s,e)=>new Q({type:s,typeName:g.ZodPromise,...v(e)});class Z extends _{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===g.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:n}=this._processInputParams(e),r=this._def.effect||null,a={addIssue:o=>{l(n,o),o.fatal?t.abort():t.dirty()},get path(){return n.path}};if(a.addIssue=a.addIssue.bind(a),r.type==="preprocess"){const o=r.transform(n.data,a);if(n.common.async)return Promise.resolve(o).then(async c=>{if(t.value==="aborted")return y;const h=await this._def.schema._parseAsync({data:c,path:n.path,parent:n});return h.status==="aborted"?y:h.status==="dirty"||t.value==="dirty"?Y(h.value):h});{if(t.value==="aborted")return y;const c=this._def.schema._parseSync({data:o,path:n.path,parent:n});return c.status==="aborted"?y:c.status==="dirty"||t.value==="dirty"?Y(c.value):c}}if(r.type==="refinement"){const o=c=>{const h=r.refinement(c,a);if(n.common.async)return Promise.resolve(h);if(h instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return c};if(n.common.async===!1){const c=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return c.status==="aborted"?y:(c.status==="dirty"&&t.dirty(),o(c.value),{status:t.value,value:c.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(c=>c.status==="aborted"?y:(c.status==="dirty"&&t.dirty(),o(c.value).then(()=>({status:t.value,value:c.value}))))}if(r.type==="transform")if(n.common.async===!1){const o=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!B(o))return o;const c=r.transform(o.value,a);if(c instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:c}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(o=>B(o)?Promise.resolve(r.transform(o.value,a)).then(c=>({status:t.value,value:c})):o);x.assertNever(r)}}Z.create=(s,e,t)=>new Z({schema:s,typeName:g.ZodEffects,effect:e,...v(t)});Z.createWithPreprocess=(s,e,t)=>new Z({schema:e,effect:{type:"preprocess",transform:s},typeName:g.ZodEffects,...v(t)});class A extends _{_parse(e){return this._getType(e)===f.undefined?S(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}A.create=(s,e)=>new A({innerType:s,typeName:g.ZodOptional,...v(e)});class q extends _{_parse(e){return this._getType(e)===f.null?S(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}q.create=(s,e)=>new q({innerType:s,typeName:g.ZodNullable,...v(e)});class le extends _{_parse(e){const{ctx:t}=this._processInputParams(e);let n=t.data;return t.parsedType===f.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}le.create=(s,e)=>new le({innerType:s,typeName:g.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...v(e)});class he extends _{_parse(e){const{ctx:t}=this._processInputParams(e),n={...t,common:{...t.common,issues:[]}},r=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return te(r)?r.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new T(n.common.issues)},input:n.data})})):{status:"valid",value:r.status==="valid"?r.value:this._def.catchValue({get error(){return new T(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}he.create=(s,e)=>new he({innerType:s,typeName:g.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...v(e)});class we extends _{_parse(e){if(this._getType(e)!==f.nan){const n=this._getOrReturnCtx(e);return l(n,{code:d.invalid_type,expected:f.nan,received:n.parsedType}),y}return{status:"valid",value:e.data}}}we.create=s=>new we({typeName:g.ZodNaN,...v(s)});const Mt=Symbol("zod_brand");class Le extends _{_parse(e){const{ctx:t}=this._processInputParams(e),n=t.data;return this._def.type._parse({data:n,path:t.path,parent:t})}unwrap(){return this._def.type}}class pe extends _{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{const a=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?y:a.status==="dirty"?(t.dirty(),Y(a.value)):this._def.out._parseAsync({data:a.value,path:n.path,parent:n})})();{const r=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return r.status==="aborted"?y:r.status==="dirty"?(t.dirty(),{status:"dirty",value:r.value}):this._def.out._parseSync({data:r.value,path:n.path,parent:n})}}static create(e,t){return new pe({in:e,out:t,typeName:g.ZodPipeline})}}class fe extends _{_parse(e){const t=this._def.innerType._parse(e),n=r=>(B(r)&&(r.value=Object.freeze(r.value)),r);return te(t)?t.then(r=>n(r)):n(t)}unwrap(){return this._def.innerType}}fe.create=(s,e)=>new fe({innerType:s,typeName:g.ZodReadonly,...v(e)});function ze(s,e){const t=typeof s=="function"?s(e):typeof s=="string"?{message:s}:s;return typeof t=="string"?{message:t}:t}function Ge(s,e={},t){return s?X.create().superRefine((n,r)=>{var a,o;const c=s(n);if(c instanceof Promise)return c.then(h=>{var u,m;if(!h){const w=ze(e,n),ge=(m=(u=w.fatal)!==null&&u!==void 0?u:t)!==null&&m!==void 0?m:!0;r.addIssue({code:"custom",...w,fatal:ge})}});if(!c){const h=ze(e,n),u=(o=(a=h.fatal)!==null&&a!==void 0?a:t)!==null&&o!==void 0?o:!0;r.addIssue({code:"custom",...h,fatal:u})}}):X.create()}const $t={object:b.lazycreate};var g;(function(s){s.ZodString="ZodString",s.ZodNumber="ZodNumber",s.ZodNaN="ZodNaN",s.ZodBigInt="ZodBigInt",s.ZodBoolean="ZodBoolean",s.ZodDate="ZodDate",s.ZodSymbol="ZodSymbol",s.ZodUndefined="ZodUndefined",s.ZodNull="ZodNull",s.ZodAny="ZodAny",s.ZodUnknown="ZodUnknown",s.ZodNever="ZodNever",s.ZodVoid="ZodVoid",s.ZodArray="ZodArray",s.ZodObject="ZodObject",s.ZodUnion="ZodUnion",s.ZodDiscriminatedUnion="ZodDiscriminatedUnion",s.ZodIntersection="ZodIntersection",s.ZodTuple="ZodTuple",s.ZodRecord="ZodRecord",s.ZodMap="ZodMap",s.ZodSet="ZodSet",s.ZodFunction="ZodFunction",s.ZodLazy="ZodLazy",s.ZodLiteral="ZodLiteral",s.ZodEnum="ZodEnum",s.ZodEffects="ZodEffects",s.ZodNativeEnum="ZodNativeEnum",s.ZodOptional="ZodOptional",s.ZodNullable="ZodNullable",s.ZodDefault="ZodDefault",s.ZodCatch="ZodCatch",s.ZodPromise="ZodPromise",s.ZodBranded="ZodBranded",s.ZodPipeline="ZodPipeline",s.ZodReadonly="ZodReadonly"})(g||(g={}));const Lt=(s,e={message:`Input not instance of ${s.name}`})=>Ge(t=>t instanceof s,e),He=C.create,Xe=V.create,Vt=we.create,zt=z.create,Qe=se.create,Dt=F.create,qt=xe.create,Ut=ne.create,Bt=re.create,Ft=X.create,Wt=U.create,Jt=L.create,Yt=be.create,Gt=j.create,Ht=b.create,Xt=b.strictCreate,Qt=ae.create,Kt=Se.create,es=ie.create,ts=E.create,ss=oe.create,ns=ke.create,rs=W.create,as=G.create,is=ce.create,os=de.create,cs=D.create,ds=ue.create,us=Q.create,De=Z.create,ls=A.create,hs=q.create,fs=Z.createWithPreprocess,ps=pe.create,ms=()=>He().optional(),gs=()=>Xe().optional(),ys=()=>Qe().optional(),vs={string:s=>C.create({...s,coerce:!0}),number:s=>V.create({...s,coerce:!0}),boolean:s=>se.create({...s,coerce:!0}),bigint:s=>z.create({...s,coerce:!0}),date:s=>F.create({...s,coerce:!0})},_s=y;var i=Object.freeze({__proto__:null,defaultErrorMap:H,setErrorMap:ft,getErrorMap:ye,makeIssue:ve,EMPTY_PATH:pt,addIssueToContext:l,ParseStatus:k,INVALID:y,DIRTY:Y,OK:S,isAborted:Pe,isDirty:Me,isValid:B,isAsync:te,get util(){return x},get objectUtil(){return Ee},ZodParsedType:f,getParsedType:$,ZodType:_,datetimeRegex:Je,ZodString:C,ZodNumber:V,ZodBigInt:z,ZodBoolean:se,ZodDate:F,ZodSymbol:xe,ZodUndefined:ne,ZodNull:re,ZodAny:X,ZodUnknown:U,ZodNever:L,ZodVoid:be,ZodArray:j,ZodObject:b,ZodUnion:ae,ZodDiscriminatedUnion:Se,ZodIntersection:ie,ZodTuple:E,ZodRecord:oe,ZodMap:ke,ZodSet:W,ZodFunction:G,ZodLazy:ce,ZodLiteral:de,ZodEnum:D,ZodNativeEnum:ue,ZodPromise:Q,ZodEffects:Z,ZodTransformer:Z,ZodOptional:A,ZodNullable:q,ZodDefault:le,ZodCatch:he,ZodNaN:we,BRAND:Mt,ZodBranded:Le,ZodPipeline:pe,ZodReadonly:fe,custom:Ge,Schema:_,ZodSchema:_,late:$t,get ZodFirstPartyTypeKind(){return g},coerce:vs,any:Ft,array:Gt,bigint:zt,boolean:Qe,date:Dt,discriminatedUnion:Kt,effect:De,enum:cs,function:as,instanceof:Lt,intersection:es,lazy:is,literal:os,map:ns,nan:Vt,nativeEnum:ds,never:Jt,null:Bt,nullable:hs,number:Xe,object:Ht,oboolean:ys,onumber:gs,optional:ls,ostring:ms,pipeline:ps,preprocess:fs,promise:us,record:ss,set:rs,strictObject:Xt,string:He,symbol:qt,transformer:De,tuple:ts,undefined:Ut,union:Qt,unknown:Wt,void:Yt,NEVER:_s,ZodIssueCode:d,quotelessJson:ht,ZodError:T});const xs="2024-11-05",vn=[xs,"2024-10-07"],Te="2.0",Ke=i.union([i.string(),i.number().int()]),et=i.string(),N=i.object({_meta:i.optional(i.object({progressToken:i.optional(Ke)}).passthrough())}).passthrough(),R=i.object({method:i.string(),params:i.optional(N)}),me=i.object({_meta:i.optional(i.object({}).passthrough())}).passthrough(),P=i.object({method:i.string(),params:i.optional(me)}),O=i.object({_meta:i.optional(i.object({}).passthrough())}).passthrough(),Re=i.union([i.string(),i.number().int()]),bs=i.object({jsonrpc:i.literal(Te),id:Re}).merge(R).strict(),ks=i.object({jsonrpc:i.literal(Te)}).merge(P).strict(),ws=i.object({jsonrpc:i.literal(Te),id:Re,result:O}).strict();var qe;(function(s){s[s.ConnectionClosed=-32e3]="ConnectionClosed",s[s.RequestTimeout=-32001]="RequestTimeout",s[s.ParseError=-32700]="ParseError",s[s.InvalidRequest=-32600]="InvalidRequest",s[s.MethodNotFound=-32601]="MethodNotFound",s[s.InvalidParams=-32602]="InvalidParams",s[s.InternalError=-32603]="InternalError"})(qe||(qe={}));const Ss=i.object({jsonrpc:i.literal(Te),id:Re,error:i.object({code:i.number().int(),message:i.string(),data:i.optional(i.unknown())})}).strict(),_n=i.union([bs,ks,ws,Ss]),tt=O.strict(),st=P.extend({method:i.literal("notifications/cancelled"),params:me.extend({requestId:Re,reason:i.string().optional()})}),nt=i.object({name:i.string(),version:i.string()}).passthrough(),Ts=i.object({experimental:i.optional(i.object({}).passthrough()),sampling:i.optional(i.object({}).passthrough()),roots:i.optional(i.object({listChanged:i.optional(i.boolean())}).passthrough())}).passthrough(),Rs=R.extend({method:i.literal("initialize"),params:N.extend({protocolVersion:i.string(),capabilities:Ts,clientInfo:nt})}),Cs=i.object({experimental:i.optional(i.object({}).passthrough()),logging:i.optional(i.object({}).passthrough()),completions:i.optional(i.object({}).passthrough()),prompts:i.optional(i.object({listChanged:i.optional(i.boolean())}).passthrough()),resources:i.optional(i.object({subscribe:i.optional(i.boolean()),listChanged:i.optional(i.boolean())}).passthrough()),tools:i.optional(i.object({listChanged:i.optional(i.boolean())}).passthrough())}).passthrough(),js=O.extend({protocolVersion:i.string(),capabilities:Cs,serverInfo:nt,instructions:i.optional(i.string())}),Zs=P.extend({method:i.literal("notifications/initialized")}),rt=R.extend({method:i.literal("ping")}),Ns=i.object({progress:i.number(),total:i.optional(i.number())}).passthrough(),at=P.extend({method:i.literal("notifications/progress"),params:me.merge(Ns).extend({progressToken:Ke})}),Ce=R.extend({params:N.extend({cursor:i.optional(et)}).optional()}),je=O.extend({nextCursor:i.optional(et)}),it=i.object({uri:i.string(),mimeType:i.optional(i.string())}).passthrough(),ot=it.extend({text:i.string()}),ct=it.extend({blob:i.string().base64()}),Os=i.object({uri:i.string(),name:i.string(),description:i.optional(i.string()),mimeType:i.optional(i.string())}).passthrough(),As=i.object({uriTemplate:i.string(),name:i.string(),description:i.optional(i.string()),mimeType:i.optional(i.string())}).passthrough(),Is=Ce.extend({method:i.literal("resources/list")}),Es=je.extend({resources:i.array(Os)}),Ps=Ce.extend({method:i.literal("resources/templates/list")}),Ms=je.extend({resourceTemplates:i.array(As)}),$s=R.extend({method:i.literal("resources/read"),params:N.extend({uri:i.string()})}),Ls=O.extend({contents:i.array(i.union([ot,ct]))}),Vs=P.extend({method:i.literal("notifications/resources/list_changed")}),zs=R.extend({method:i.literal("resources/subscribe"),params:N.extend({uri:i.string()})}),Ds=R.extend({method:i.literal("resources/unsubscribe"),params:N.extend({uri:i.string()})}),qs=P.extend({method:i.literal("notifications/resources/updated"),params:me.extend({uri:i.string()})}),Us=i.object({name:i.string(),description:i.optional(i.string()),required:i.optional(i.boolean())}).passthrough(),Bs=i.object({name:i.string(),description:i.optional(i.string()),arguments:i.optional(i.array(Us))}).passthrough(),Fs=Ce.extend({method:i.literal("prompts/list")}),Ws=je.extend({prompts:i.array(Bs)}),Js=R.extend({method:i.literal("prompts/get"),params:N.extend({name:i.string(),arguments:i.optional(i.record(i.string()))})}),Ze=i.object({type:i.literal("text"),text:i.string()}).passthrough(),Ne=i.object({type:i.literal("image"),data:i.string().base64(),mimeType:i.string()}).passthrough(),Oe=i.object({type:i.literal("audio"),data:i.string().base64(),mimeType:i.string()}).passthrough(),dt=i.object({type:i.literal("resource"),resource:i.union([ot,ct])}).passthrough(),Ys=i.object({role:i.enum(["user","assistant"]),content:i.union([Ze,Ne,Oe,dt])}).passthrough(),Gs=O.extend({description:i.optional(i.string()),messages:i.array(Ys)}),Hs=P.extend({method:i.literal("notifications/prompts/list_changed")}),Xs=i.object({name:i.string(),description:i.optional(i.string()),inputSchema:i.object({type:i.literal("object"),properties:i.optional(i.object({}).passthrough())}).passthrough()}).passthrough(),Qs=Ce.extend({method:i.literal("tools/list")}),Ks=je.extend({tools:i.array(Xs)}),ut=O.extend({content:i.array(i.union([Ze,Ne,Oe,dt])),isError:i.boolean().default(!1).optional()});ut.or(O.extend({toolResult:i.unknown()}));const en=R.extend({method:i.literal("tools/call"),params:N.extend({name:i.string(),arguments:i.optional(i.record(i.unknown()))})}),tn=P.extend({method:i.literal("notifications/tools/list_changed")}),lt=i.enum(["debug","info","notice","warning","error","critical","alert","emergency"]),sn=R.extend({method:i.literal("logging/setLevel"),params:N.extend({level:lt})}),nn=P.extend({method:i.literal("notifications/message"),params:me.extend({level:lt,logger:i.optional(i.string()),data:i.unknown()})}),rn=i.object({name:i.string().optional()}).passthrough(),an=i.object({hints:i.optional(i.array(rn)),costPriority:i.optional(i.number().min(0).max(1)),speedPriority:i.optional(i.number().min(0).max(1)),intelligencePriority:i.optional(i.number().min(0).max(1))}).passthrough(),on=i.object({role:i.enum(["user","assistant"]),content:i.union([Ze,Ne,Oe])}).passthrough(),cn=R.extend({method:i.literal("sampling/createMessage"),params:N.extend({messages:i.array(on),systemPrompt:i.optional(i.string()),includeContext:i.optional(i.enum(["none","thisServer","allServers"])),temperature:i.optional(i.number()),maxTokens:i.number().int(),stopSequences:i.optional(i.array(i.string())),metadata:i.optional(i.object({}).passthrough()),modelPreferences:i.optional(an)})}),dn=O.extend({model:i.string(),stopReason:i.optional(i.enum(["endTurn","stopSequence","maxTokens"]).or(i.string())),role:i.enum(["user","assistant"]),content:i.discriminatedUnion("type",[Ze,Ne,Oe])}),un=i.object({type:i.literal("ref/resource"),uri:i.string()}).passthrough(),ln=i.object({type:i.literal("ref/prompt"),name:i.string()}).passthrough(),hn=R.extend({method:i.literal("completion/complete"),params:N.extend({ref:i.union([ln,un]),argument:i.object({name:i.string(),value:i.string()}).passthrough()})}),fn=O.extend({completion:i.object({values:i.array(i.string()).max(100),total:i.optional(i.number().int()),hasMore:i.optional(i.boolean())}).passthrough()}),pn=i.object({uri:i.string().startsWith("file://"),name:i.optional(i.string())}).passthrough(),mn=R.extend({method:i.literal("roots/list")}),gn=O.extend({roots:i.array(pn)}),yn=P.extend({method:i.literal("notifications/roots/list_changed")});i.union([rt,Rs,hn,sn,Js,Fs,Is,Ps,$s,zs,Ds,en,Qs]);i.union([st,at,Zs,yn]);i.union([tt,dn,gn]);i.union([rt,cn,mn]);i.union([st,at,nn,qs,Vs,tn,Hs]);i.union([tt,js,fn,Gs,Ws,Es,Ms,Ls,ut,Ks]);class xn extends Error{constructor(e,t,n){super(`MCP error ${e}: ${t}`),this.code=e,this.data=n,this.name="McpError"}}export{st as C,qe as E,Gs as G,js as I,_n as J,xs as L,xn as M,at as P,Ls as R,vn as S,rt as a,tt as b,fn as c,Ws as d,Es as e,Ms as f,ut as g,Ks as h,i as z};
|