@mongodb-js/compass-web 0.30.4 → 0.31.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/dist/10.1f1a54d3a40efd8c2017.mjs +2 -0
  2. package/dist/17.362fcb811ee2ff871d32.mjs +2 -0
  3. package/dist/{305.mjs → 273.f8171afff21603205990.mjs} +2 -2
  4. package/dist/276.30ea2a26f486be6e78b1.mjs +1 -0
  5. package/dist/414.1038db81de0771ae4f6c.mjs +371 -0
  6. package/dist/{737.mjs.LICENSE.txt → 414.1038db81de0771ae4f6c.mjs.LICENSE.txt} +10 -0
  7. package/dist/423.45723618046344488182.mjs +2 -0
  8. package/dist/{427.mjs → 427.ea0869d385dd7ebc1ee3.mjs} +1 -1
  9. package/dist/752.be311c1a6bd153169544.mjs +2 -0
  10. package/dist/887.a7a72716c079e9aa117e.mjs +2 -0
  11. package/dist/assets-manifest.json +13 -0
  12. package/dist/compass-web.d.ts +35 -12
  13. package/dist/compass-web.mjs +22 -22
  14. package/dist/{index-bde52cb3.mjs → index-bde52cb3.0f5ab0c9a2dfc578bd9d.mjs} +1 -1
  15. package/dist/tsdoc-metadata.json +1 -1
  16. package/package.json +45 -42
  17. package/dist/120.mjs +0 -2
  18. package/dist/680f69f3c2e6b90c1812.png +0 -0
  19. package/dist/737.mjs +0 -352
  20. package/dist/752.mjs +0 -2
  21. package/dist/790.mjs +0 -2
  22. package/dist/7ea3a6d428136b87ab95.png +0 -0
  23. package/dist/858.mjs +0 -2
  24. package/dist/955.mjs +0 -2
  25. package/dist/a4e0eb7ad904a4858361.svg +0 -156
  26. /package/dist/{858.mjs.LICENSE.txt → 10.1f1a54d3a40efd8c2017.mjs.LICENSE.txt} +0 -0
  27. /package/dist/{790.mjs.LICENSE.txt → 17.362fcb811ee2ff871d32.mjs.LICENSE.txt} +0 -0
  28. /package/dist/{305.mjs.LICENSE.txt → 273.f8171afff21603205990.mjs.LICENSE.txt} +0 -0
  29. /package/dist/{955.mjs.LICENSE.txt → 423.45723618046344488182.mjs.LICENSE.txt} +0 -0
  30. /package/dist/{427.mjs.LICENSE.txt → 427.ea0869d385dd7ebc1ee3.mjs.LICENSE.txt} +0 -0
  31. /package/dist/{752.mjs.LICENSE.txt → 752.be311c1a6bd153169544.mjs.LICENSE.txt} +0 -0
  32. /package/dist/{120.mjs.LICENSE.txt → 887.a7a72716c079e9aa117e.mjs.LICENSE.txt} +0 -0
package/dist/120.mjs DELETED
@@ -1,2 +0,0 @@
1
- /*! For license information please see 120.mjs.LICENSE.txt */
2
- export const __webpack_esm_id__=120;export const __webpack_esm_ids__=[120];export const __webpack_esm_modules__={160:(e,t,n)=>{const r=n(98855);e.exports=(e,t)=>{const n=r(e,t);return n&&n.prerelease.length?n.prerelease:null}},415:(e,t,n)=>{const{MAX_SAFE_COMPONENT_LENGTH:r,MAX_SAFE_BUILD_LENGTH:a,MAX_LENGTH:s}=n(77693),i=n(67767),o=(t=e.exports={}).re=[],l=t.safeRe=[],c=t.src=[],u=t.safeSrc=[],p=t.t={};let d=0;const m="[a-zA-Z0-9-]",h=[["\\s",1],["\\d",s],[m,a]],f=(e,t,n)=>{const r=(e=>{for(const[t,n]of h)e=e.split(`${t}*`).join(`${t}{0,${n}}`).split(`${t}+`).join(`${t}{1,${n}}`);return e})(t),a=d++;i(e,a,t),p[e]=a,c[a]=t,u[a]=r,o[a]=new RegExp(t,n?"g":void 0),l[a]=new RegExp(r,n?"g":void 0)};f("NUMERICIDENTIFIER","0|[1-9]\\d*"),f("NUMERICIDENTIFIERLOOSE","\\d+"),f("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${m}*`),f("MAINVERSION",`(${c[p.NUMERICIDENTIFIER]})\\.(${c[p.NUMERICIDENTIFIER]})\\.(${c[p.NUMERICIDENTIFIER]})`),f("MAINVERSIONLOOSE",`(${c[p.NUMERICIDENTIFIERLOOSE]})\\.(${c[p.NUMERICIDENTIFIERLOOSE]})\\.(${c[p.NUMERICIDENTIFIERLOOSE]})`),f("PRERELEASEIDENTIFIER",`(?:${c[p.NONNUMERICIDENTIFIER]}|${c[p.NUMERICIDENTIFIER]})`),f("PRERELEASEIDENTIFIERLOOSE",`(?:${c[p.NONNUMERICIDENTIFIER]}|${c[p.NUMERICIDENTIFIERLOOSE]})`),f("PRERELEASE",`(?:-(${c[p.PRERELEASEIDENTIFIER]}(?:\\.${c[p.PRERELEASEIDENTIFIER]})*))`),f("PRERELEASELOOSE",`(?:-?(${c[p.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${c[p.PRERELEASEIDENTIFIERLOOSE]})*))`),f("BUILDIDENTIFIER",`${m}+`),f("BUILD",`(?:\\+(${c[p.BUILDIDENTIFIER]}(?:\\.${c[p.BUILDIDENTIFIER]})*))`),f("FULLPLAIN",`v?${c[p.MAINVERSION]}${c[p.PRERELEASE]}?${c[p.BUILD]}?`),f("FULL",`^${c[p.FULLPLAIN]}$`),f("LOOSEPLAIN",`[v=\\s]*${c[p.MAINVERSIONLOOSE]}${c[p.PRERELEASELOOSE]}?${c[p.BUILD]}?`),f("LOOSE",`^${c[p.LOOSEPLAIN]}$`),f("GTLT","((?:<|>)?=?)"),f("XRANGEIDENTIFIERLOOSE",`${c[p.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),f("XRANGEIDENTIFIER",`${c[p.NUMERICIDENTIFIER]}|x|X|\\*`),f("XRANGEPLAIN",`[v=\\s]*(${c[p.XRANGEIDENTIFIER]})(?:\\.(${c[p.XRANGEIDENTIFIER]})(?:\\.(${c[p.XRANGEIDENTIFIER]})(?:${c[p.PRERELEASE]})?${c[p.BUILD]}?)?)?`),f("XRANGEPLAINLOOSE",`[v=\\s]*(${c[p.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[p.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[p.XRANGEIDENTIFIERLOOSE]})(?:${c[p.PRERELEASELOOSE]})?${c[p.BUILD]}?)?)?`),f("XRANGE",`^${c[p.GTLT]}\\s*${c[p.XRANGEPLAIN]}$`),f("XRANGELOOSE",`^${c[p.GTLT]}\\s*${c[p.XRANGEPLAINLOOSE]}$`),f("COERCEPLAIN",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?`),f("COERCE",`${c[p.COERCEPLAIN]}(?:$|[^\\d])`),f("COERCEFULL",c[p.COERCEPLAIN]+`(?:${c[p.PRERELEASE]})?`+`(?:${c[p.BUILD]})?(?:$|[^\\d])`),f("COERCERTL",c[p.COERCE],!0),f("COERCERTLFULL",c[p.COERCEFULL],!0),f("LONETILDE","(?:~>?)"),f("TILDETRIM",`(\\s*)${c[p.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",f("TILDE",`^${c[p.LONETILDE]}${c[p.XRANGEPLAIN]}$`),f("TILDELOOSE",`^${c[p.LONETILDE]}${c[p.XRANGEPLAINLOOSE]}$`),f("LONECARET","(?:\\^)"),f("CARETTRIM",`(\\s*)${c[p.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",f("CARET",`^${c[p.LONECARET]}${c[p.XRANGEPLAIN]}$`),f("CARETLOOSE",`^${c[p.LONECARET]}${c[p.XRANGEPLAINLOOSE]}$`),f("COMPARATORLOOSE",`^${c[p.GTLT]}\\s*(${c[p.LOOSEPLAIN]})$|^$`),f("COMPARATOR",`^${c[p.GTLT]}\\s*(${c[p.FULLPLAIN]})$|^$`),f("COMPARATORTRIM",`(\\s*)${c[p.GTLT]}\\s*(${c[p.LOOSEPLAIN]}|${c[p.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",f("HYPHENRANGE",`^\\s*(${c[p.XRANGEPLAIN]})\\s+-\\s+(${c[p.XRANGEPLAIN]})\\s*$`),f("HYPHENRANGELOOSE",`^\\s*(${c[p.XRANGEPLAINLOOSE]})\\s+-\\s+(${c[p.XRANGEPLAINLOOSE]})\\s*$`),f("STAR","(<|>)?=?\\s*\\*"),f("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),f("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")},540:(e,t,n)=>{const r=n(50066),a=n(72857);e.exports=(e,t,n)=>{let s=null,i=null,o=null;try{o=new a(t,n)}catch(e){return null}return e.forEach((e=>{o.test(e)&&(s&&1!==i.compare(e)||(s=e,i=new r(s,n)))})),s}},1025:(e,t,n)=>{const r=n(9350);e.exports=(e,t,n,a,s)=>{"string"==typeof n&&(s=a,a=n,n=void 0);try{return new r(e instanceof r?e.version:e,n).inc(t,a,s).version}catch(e){return null}}},1276:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ENVS=t.ON_PREM=t.ADL=t.ATLAS=void 0;const n="atlas";t.ATLAS=n,t.ADL="adl";const r="on-prem";t.ON_PREM=r;const a=[n,"adl",r];t.ENVS=a},1280:(e,t,n)=>{n.d(t,{$O:()=>E,$S:()=>J,Au:()=>V,Be:()=>l,Bj:()=>v,Ct:()=>g,Dl:()=>h,ER:()=>Q,Eb:()=>z,F7:()=>C,FO:()=>ie,Fk:()=>W,Fn:()=>d,G1:()=>N,G8:()=>F,Hi:()=>Y,Il:()=>re,KA:()=>j,KB:()=>w,Kn:()=>T,LK:()=>L,Mu:()=>i,Ny:()=>b,Pw:()=>y,Rl:()=>s,Tx:()=>B,Uy:()=>S,WN:()=>ne,YA:()=>G,Zm:()=>q,_L:()=>P,_z:()=>$,aC:()=>m,bS:()=>ee,cU:()=>x,dR:()=>X,dZ:()=>se,db:()=>I,em:()=>D,f2:()=>R,fU:()=>oe,fs:()=>f,gP:()=>A,hH:()=>H,jw:()=>M,lo:()=>te,m9:()=>Z,nA:()=>c,pY:()=>u,qF:()=>K,qG:()=>k,qm:()=>U,rk:()=>O,rt:()=>_,tB:()=>o,wA:()=>p,xY:()=>ae});var r=n(71295),a=n(72510);function s(e,t){return new e({type:"string",...a.A2(t)})}function i(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...a.A2(t)})}function o(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...a.A2(t)})}function l(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...a.A2(t)})}function c(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...a.A2(t)})}function u(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...a.A2(t)})}function p(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...a.A2(t)})}function d(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...a.A2(t)})}function m(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...a.A2(t)})}function h(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...a.A2(t)})}function f(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...a.A2(t)})}function v(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...a.A2(t)})}function g(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...a.A2(t)})}function y(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...a.A2(t)})}function $(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...a.A2(t)})}function b(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...a.A2(t)})}function E(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...a.A2(t)})}function S(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...a.A2(t)})}function A(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...a.A2(t)})}function _(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...a.A2(t)})}function x(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...a.A2(t)})}function w(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...a.A2(t)})}function O(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...a.A2(t)})}function N(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...a.A2(t)})}function I(e,t){return new e({type:"string",format:"date",check:"string_format",...a.A2(t)})}function T(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...a.A2(t)})}function R(e,t){return new e({type:"string",format:"duration",check:"string_format",...a.A2(t)})}function C(e,t){return new e({type:"number",checks:[],...a.A2(t)})}function k(e,t){return new e({type:"number",coerce:!0,checks:[],...a.A2(t)})}function L(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...a.A2(t)})}function P(e,t){return new e({type:"boolean",...a.A2(t)})}function M(e,t){return new e({type:"null",...a.A2(t)})}function j(e){return new e({type:"any"})}function D(e){return new e({type:"unknown"})}function F(e,t){return new e({type:"never",...a.A2(t)})}function V(e,t){return new r.sm({check:"less_than",...a.A2(t),value:e,inclusive:!1})}function q(e,t){return new r.sm({check:"less_than",...a.A2(t),value:e,inclusive:!0})}function B(e,t){return new r.J_({check:"greater_than",...a.A2(t),value:e,inclusive:!1})}function U(e,t){return new r.J_({check:"greater_than",...a.A2(t),value:e,inclusive:!0})}function Y(e,t){return new r.Jk({check:"multiple_of",...a.A2(t),value:e})}function z(e,t){return new r.Yk({check:"max_length",...a.A2(t),maximum:e})}function Z(e,t){return new r.Kk({check:"min_length",...a.A2(t),minimum:e})}function G(e,t){return new r.RM({check:"length_equals",...a.A2(t),length:e})}function W(e,t){return new r.DG({check:"string_format",format:"regex",...a.A2(t),pattern:e})}function H(e){return new r.NI({check:"string_format",format:"lowercase",...a.A2(e)})}function K(e){return new r.kH({check:"string_format",format:"uppercase",...a.A2(e)})}function X(e,t){return new r.Tt({check:"string_format",format:"includes",...a.A2(t),includes:e})}function J(e,t){return new r.J({check:"string_format",format:"starts_with",...a.A2(t),prefix:e})}function Q(e,t){return new r.E6({check:"string_format",format:"ends_with",...a.A2(t),suffix:e})}function ee(e){return new r.v$({check:"overwrite",tx:e})}function te(e){return ee((t=>t.normalize(e)))}function ne(){return ee((e=>e.trim()))}function re(){return ee((e=>e.toLowerCase()))}function ae(){return ee((e=>e.toUpperCase()))}function se(e,t,n){return new e({type:"array",element:t,...a.A2(n)})}function ie(e,t,n){const r=a.A2(n);return r.abort??(r.abort=!0),new e({type:"custom",check:"custom",fn:t,...r})}function oe(e,t,n){return new e({type:"custom",check:"custom",fn:t,...a.A2(n)})}},1451:(e,t,n)=>{const r=n(95323);e.exports=(e,t)=>new r(e,t).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" ")))},1726:(e,t,n)=>{var r=n(40811);e.exports=new r("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return null!==e?e:{}}})},2420:(e,t,n)=>{n.d(t,{qg:()=>l,EJ:()=>c,xL:()=>u,bp:()=>p});var r=n(84527),a=n(99629),s=n(49189);const i=(e,t)=>{a.a$.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:t=>a.Wk(e,t)},flatten:{value:t=>a.JM(e,t)},addIssue:{value:t=>e.issues.push(t)},addIssues:{value:t=>e.issues.push(...t)},isEmpty:{get:()=>0===e.issues.length}})},o=(s.xI("ZodError",i),s.xI("ZodError",i,{Parent:Error})),l=r.Tj(o),c=r.Rb(o),u=r.Od(o),p=r.wG(o)},3012:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ACCUMULATORS=void 0,t.ACCUMULATORS=[{name:"$accumulator",value:"$accumulator",score:1,meta:"accumulator",version:"4.4.0"},{name:"$addToSet",value:"$addToSet",score:1,meta:"accumulator",version:"2.2.0"},{name:"$avg",value:"$avg",score:1,meta:"accumulator",version:"2.2.0",projectVersion:"3.2.0"},{name:"$bottom",value:"$bottom",score:1,meta:"accumulator:bottom-n",version:"5.2.0"},{name:"$bottomN",value:"$bottomN",score:1,meta:"accumulator:bottom-n",version:"5.2.0"},{name:"$covariancePop",value:"$covariancePop",score:1,meta:"accumulator:window",version:"5.0.0"},{name:"$covarianceSamp",value:"$covarianceSamp",score:1,meta:"accumulator:window",version:"5.0.0"},{name:"$count",value:"$count",score:1,meta:"accumulator",version:"5.0.0"},{name:"$derivative",value:"$derivative",score:1,meta:"accumulator:window",version:"5.0.0"},{name:"$denseRank",value:"$denseRank",score:1,meta:"accumulator:window",version:"5.0.0"},{name:"$documentNumber",value:"$documentNumber",score:1,meta:"accumulator:window",version:"5.0.0"},{name:"$expMovingAvg",value:"$expMovingAvg",score:1,meta:"accumulator:window",version:"5.0.0"},{name:"$first",value:"$first",score:1,meta:"accumulator",version:"2.2.0"},{name:"$firstN",value:"$firstN",score:1,meta:"accumulator",version:"5.1.0"},{name:"$integral",value:"$integral",score:1,meta:"accumulator:window",version:"5.0.0"},{name:"$last",value:"$last",score:1,meta:"accumulator",version:"2.2.0"},{name:"$lastN",value:"$lastN",score:1,meta:"accumulator",version:"5.2.0"},{name:"$max",value:"$max",score:1,meta:"accumulator",version:"2.2.0",projectVersion:"3.2.0"},{name:"$maxN",value:"$maxN",score:1,meta:"accumulator",version:"5.2.0"},{name:"$median",value:"$median",score:1,meta:"accumulator",version:"7.0.0"},{name:"$min",value:"$min",score:1,meta:"accumulator",version:"2.2.0",projectVersion:"3.2.0"},{name:"$minN",value:"$minN",score:1,meta:"accumulator",version:"5.2.0"},{name:"$percentile",value:"$percentile",score:1,meta:"accumulator",version:"7.0.0"},{name:"$push",value:"$push",score:1,meta:"accumulator",version:"2.2.0"},{name:"$rank",value:"$rank",score:1,meta:"accumulator:window",version:"5.0.0"},{name:"$stdDevPop",value:"$stdDevPop",score:1,meta:"accumulator",version:"3.2.0",projectVersion:"3.2.0"},{name:"$stdDevSamp",value:"$stdDevSamp",score:1,meta:"accumulator",version:"3.2.0",projectVersion:"3.2.0"},{name:"$shift",value:"$shift",score:1,meta:"accumulator:window",version:"5.0.0"},{name:"$sum",value:"$sum",score:1,meta:"accumulator",version:"2.2.0",projectVersion:"3.2.0"},{name:"$top",value:"$top",score:1,meta:"accumulator:top-n",version:"5.2.0"},{name:"$topN",value:"$topN",score:1,meta:"accumulator:top-n",version:"5.2.0"},{name:"$locf",value:"$locf",score:1,meta:"accumulator:window",version:"5.3.0"},{name:"$linearFill",value:"$linearFill",score:1,meta:"accumulator:window",version:"5.3.0"}]},3449:(e,t,n)=>{const r=n(40289);e.exports=(e,t,n)=>r(e,t,n)<0},3794:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SYSTEM_VARIABLES=void 0,t.SYSTEM_VARIABLES=[{name:"$$NOW",value:"$$NOW",score:1,meta:"variable:system",version:"4.2.0",description:"A variable that returns the current datetime value. NOW returns the same value for all members of the deployment and remains the same throughout all stages of the aggregation pipeline."},{name:"$$CLUSTER_TIME",value:"$$CLUSTER_TIME",score:1,meta:"variable:system",version:"4.2.0",description:"A variable that returns the current timestamp value. CLUSTER_TIME is only available on replica sets and sharded clusters. CLUSTER_TIME returns the same value for all members of the deployment and remains the same throughout all stages of the pipeline."},{name:"$$ROOT",value:"$$ROOT",score:1,meta:"variable:system",version:"2.4.0",description:"References the root document, i.e. the top-level document, currently being processed in the aggregation pipeline stage."},{name:"$$CURRENT",value:"$$CURRENT",score:1,meta:"variable:system",version:"2.4.0",description:"References the start of the field path being processed in the aggregation pipeline stage. Unless documented otherwise, all stages start with CURRENT the same as ROOT. CURRENT is modifiable. However, since `$<field>` is equivalent to `$$CURRENT.<field>`, rebinding CURRENT changes the meaning of `$` accesses."},{name:"$$REMOVE",value:"$$REMOVE",score:1,meta:"variable:system",version:"3.6.0",description:"A variable which evaluates to the missing value. Allows for the conditional exclusion of fields. In a `$project`, a field set to the variable REMOVE is excluded from the output."},{name:"$$DESCEND",value:"$$DESCEND",score:1,meta:"variable:system",version:"3.0.0",description:"One of the allowed results of a `$redact` expression."},{name:"$$PRUNE",value:"$$PRUNE",score:1,meta:"variable:system",version:"3.0.0",description:"One of the allowed results of a `$redact` expression."},{name:"$$KEEP",value:"$$KEEP",score:1,meta:"variable:system",version:"3.0.0",description:"One of the allowed results of a `$redact` expression."},{name:"$$SEARCH_META",value:"$$SEARCH_META",score:1,meta:"variable:system",version:"5.0.0",description:"A variable that stores the metadata results of an Atlas Search query. In all supported aggregation pipeline stages, a field set to the variable SEARCH_META returns the metadata results for the query. For an example of its usage, see Atlas Search facet and count."},{name:"$$USER_ROLES",value:"$$USER_ROLES",score:1,meta:"variable:system",version:"7.0.0",description:"A variable that stores the role names of the authenticated user running the command."}]},4113:(e,t,n)=>{const r=n(98855);e.exports=(e,t)=>{const n=r(e,null,!0),a=r(t,null,!0),s=n.compare(a);if(0===s)return null;const i=s>0,o=i?n:a,l=i?a:n,c=!!o.prerelease.length;if(l.prerelease.length&&!c){if(!l.patch&&!l.minor)return"major";if(0===l.compareMain(o))return l.minor&&!l.patch?"minor":"patch"}const u=c?"pre":"";return n.major!==a.major?u+"major":n.minor!==a.minor?u+"minor":n.patch!==a.patch?u+"patch":"prerelease"}},4292:e=>{const t=Number.MAX_SAFE_INTEGER||9007199254740991;e.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:t,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}},4414:e=>{function t(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=(this.reason||"(unknown reason)")+(this.mark?" "+this.mark.toString():""),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||""}t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t.prototype.toString=function(e){var t=this.name+": ";return t+=this.reason||"(unknown reason)",!e&&this.mark&&(t+=" "+this.mark.toString()),t},e.exports=t},4496:(e,t,n)=>{const r=n(50066);e.exports=(e,t)=>new r(e,t).minor},4827:(e,t,n)=>{const r=n(87866);e.exports=(e,t,n)=>r(e,t,"<",n)},5081:(e,t,n)=>{const r=n(66283),a=n(38366);e.exports=(e,t,n)=>{let s=null,i=null,o=null;try{o=new a(t,n)}catch(e){return null}return e.forEach((e=>{o.test(e)&&(s&&-1!==i.compare(e)||(s=e,i=new r(s,n)))})),s}},5286:e=>{const t=/^[0-9]+$/,n=(e,n)=>{const r=t.test(e),a=t.test(n);return r&&a&&(e=+e,n=+n),e===n?0:r&&!a?-1:a&&!r?1:e<n?-1:1};e.exports={compareIdentifiers:n,rcompareIdentifiers:(e,t)=>n(t,e)}},5544:(e,t,n)=>{const r=n(26620),a=n(32056),s=n(51269),i=n(54838),o=n(18082),l=n(71851);e.exports=(e,t,n,c)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e===n;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e!==n;case"":case"=":case"==":return r(e,n,c);case"!=":return a(e,n,c);case">":return s(e,n,c);case">=":return i(e,n,c);case"<":return o(e,n,c);case"<=":return l(e,n,c);default:throw new TypeError(`Invalid operator: ${t}`)}}},5698:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BSON_TYPE_ALIASES=void 0,t.BSON_TYPE_ALIASES=[{name:"double",value:"double",label:"double",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"string",value:"string",label:"string",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"object",value:"object",label:"object",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"array",value:"array",label:"array",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"binData",value:"binData",label:"binData",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"objectId",value:"objectId",label:"objectId",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"bool",value:"bool",label:"bool",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"date",value:"date",label:"date",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"null",value:"null",label:"null",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"double",value:"double",label:"double",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"regex",value:"regex",label:"regex",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"javascript",value:"javascript",label:"javascript",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"javascriptWithScope",value:"javascriptWithScope",label:"javascriptWithScope",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"int",value:"int",label:"int",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"timestamp",value:"timestamp",label:"timestamp",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"long",value:"long",label:"long",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"decimal",value:"decimal",label:"decimal",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"minKey",value:"minKey",label:"minKey",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"maxKey",value:"maxKey",label:"maxKey",score:1,meta:"bson-type-aliases",version:"3.6.0"}]},5992:(e,t,n)=>{const r=n(99385);e.exports=(e,t,n)=>r(e,t,"<",n)},6340:(e,t,n)=>{var r=n(54420);e.exports=new r({include:[n(15037)]})},7263:(e,t,n)=>{n.d(t,{AC:()=>k,Ak:()=>l,Gl:()=>a,K3:()=>$,OI:()=>E,Os:()=>u,Rp:()=>d,Yj:()=>N,Z0:()=>s,Zg:()=>h,Zv:()=>L,ai:()=>T,ch:()=>C,fO:()=>o,gF:()=>r,hQ:()=>S,kB:()=>w,kM:()=>i,l7:()=>y,nd:()=>I,p0:()=>c,p6:()=>_,r0:()=>b,uR:()=>p,uX:()=>f,ug:()=>v,w$:()=>O,zM:()=>R,zr:()=>g});const r=/^[cC][^\s-]{8,}$/,a=/^[0-9a-z]+$/,s=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,i=/^[0-9a-vA-V]{20}$/,o=/^[A-Za-z0-9]{27}$/,l=/^[a-zA-Z0-9_-]{21}$/,c=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,u=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,p=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$/,d=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,m="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function h(){return new RegExp(m,"u")}const f=/^(?:(?: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])$/,v=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})$/,g=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,y=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,$=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,b=/^[A-Za-z0-9_-]*$/,E=/^([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+$/,S=/^\+(?:[0-9]){6,14}[0-9]$/,A="(?:(?:\\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])))",_=new RegExp(`^${A}$`);function x(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return"number"==typeof e.precision?-1===e.precision?`${t}`:0===e.precision?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function w(e){return new RegExp(`^${x(e)}$`)}function O(e){const t=x({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-]\\d{2}:\\d{2})");const r=`${t}(?:${n.join("|")})`;return new RegExp(`^${A}T(?:${r})$`)}const N=e=>new RegExp(`^${e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*"}$`),I=/^\d+$/,T=/^-?\d+(?:\.\d+)?/i,R=/true|false/i,C=/null/i,k=/^[^A-Z]*$/,L=/^[^a-z]*$/},8117:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ALL_CONSTANTS=void 0,t.createConstantFilter=f,t.wrapField=function(e,t=!1){return t||!function(e){if(/[.\s"'()[\];={}:]/.test(e))return!1;try{return new Function(`"use strict";let _ = { ${e}: 0 };`),!0}catch{return!1}}(e)?`"${e.replace(/["\\]/g,"\\$&")}"`:e},t.getFilteredCompletions=function(e={},n=t.ALL_CONSTANTS){const{serverVersion:r=m,fields:a=[],meta:s,stage:i}=e,o=f({serverVersion:r,meta:s,stage:i});return n.concat(a.flatMap((e=>{const{value:t,description:n}=function(e){return"string"==typeof e?{value:e}:{value:e.name,description:e.description}}(e);return[{value:t,meta:"field:identifier",version:"0.0.0",description:n},{value:`$${t}`,meta:"field:reference",version:"0.0.0",description:n}]}))).filter((e=>o(e)))};const r=n(51699),a=n(3012),s=n(91871),i=n(77973),o=n(80003),l=n(30797),c=n(17497),u=n(60679),p=n(99625),d=n(71174);t.ALL_CONSTANTS=[...a.ACCUMULATORS,...i.BSON_TYPES,...s.BSON_TYPE_ALIASES,...o.CONVERSION_OPERATORS,...l.EXPRESSION_OPERATORS,...c.JSON_SCHEMA,...u.QUERY_OPERATORS,...p.STAGE_OPERATORS,...d.SYSTEM_VARIABLES];const m="999.999.999";function h(e,t){return void 0===e||void 0===t||(e=Array.isArray(e)?e:[e]).some((e=>t.includes(e)))}function f({meta:e,serverVersion:t=m,stage:n={}}={}){const a=/^(?<version>\d+\.\d+\.\d+)/.exec(t)?.groups?.version??m;return({version:t,meta:s,env:i,namespaces:o,apiVersions:l})=>function(e,t){const n=/^\d+\.\d+\.\d+$/.test(t);return(0,r.satisfies)(e,n?`>=${t}`:t)}(a,t)&&h(n.env,i)&&h(n.namespace,o)&&h(n.apiVersion,l)&&(!e||function(e,t){const n=t.split(":");return e.some((e=>{const t=e.split(":");return t.length===n.length&&t.every(((e,t)=>"*"===e||e===n[t]))}))}(e,s))}},8573:e=>{const t=Object.freeze({loose:!0}),n=Object.freeze({});e.exports=e=>e?"object"!=typeof e?t:e:n},8999:(e,t,n)=>{const r=n(48381),a=n(20332);e.exports=(e,t,n)=>{let s=null,i=null,o=null;try{o=new a(t,n)}catch(e){return null}return e.forEach((e=>{o.test(e)&&(s&&-1!==i.compare(e)||(s=e,i=new r(s,n)))})),s}},9331:(e,t,n)=>{const r=n(50066);e.exports=(e,t,n)=>{const a=new r(e,n),s=new r(t,n);return a.compare(s)||a.compareBuild(s)}},9350:(e,t,n)=>{const r=n(52378),{MAX_LENGTH:a,MAX_SAFE_INTEGER:s}=n(28892),{safeRe:i,t:o}=n(68752),l=n(34773),{compareIdentifiers:c}=n(80661);class u{constructor(e,t){if(t=l(t),e instanceof u){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if("string"!=typeof e)throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>a)throw new TypeError(`version is longer than ${a} characters`);r("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const n=e.trim().match(t.loose?i[o.LOOSE]:i[o.FULL]);if(!n)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>s||this.major<0)throw new TypeError("Invalid major version");if(this.minor>s||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>s||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t<s)return t}return e})):this.prerelease=[],this.build=n[5]?n[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(r("SemVer.compare",this.version,this.options,e),!(e instanceof u)){if("string"==typeof e&&e===this.version)return 0;e=new u(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof u||(e=new u(e,this.options)),c(this.major,e.major)||c(this.minor,e.minor)||c(this.patch,e.patch)}comparePre(e){if(e instanceof u||(e=new u(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{const n=this.prerelease[t],a=e.prerelease[t];if(r("prerelease compare",t,n,a),void 0===n&&void 0===a)return 0;if(void 0===a)return 1;if(void 0===n)return-1;if(n!==a)return c(n,a)}while(++t)}compareBuild(e){e instanceof u||(e=new u(e,this.options));let t=0;do{const n=this.build[t],a=e.build[t];if(r("build compare",t,n,a),void 0===n&&void 0===a)return 0;if(void 0===a)return 1;if(void 0===n)return-1;if(n!==a)return c(n,a)}while(++t)}inc(e,t,n){if(e.startsWith("pre")){if(!t&&!1===n)throw new Error("invalid increment argument: identifier is empty");if(t){const e=`-${t}`.match(this.options.loose?i[o.PRERELEASELOOSE]:i[o.PRERELEASE]);if(!e||e[1]!==t)throw new Error(`invalid identifier: ${t}`)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,n);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,n);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,n),this.inc("pre",t,n);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t,n),this.inc("pre",t,n);break;case"release":if(0===this.prerelease.length)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":{const e=Number(n)?1:0;if(0===this.prerelease.length)this.prerelease=[e];else{let r=this.prerelease.length;for(;--r>=0;)"number"==typeof this.prerelease[r]&&(this.prerelease[r]++,r=-2);if(-1===r){if(t===this.prerelease.join(".")&&!1===n)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(t){let r=[t,e];!1===n&&(r=[t]),0===c(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=r):this.prerelease=r}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}e.exports=u},9357:(e,t,n)=>{const r=n(88825);e.exports=(e,t)=>new r(e,t).minor},9418:(e,t,n)=>{const r=n(40289);e.exports=(e,t,n)=>r(e,t,n)<=0},9480:(e,t,n)=>{const r=n(71333);e.exports=(e,t,n)=>{try{t=new r(t,n)}catch(e){return!1}return t.test(e)}},9703:(e,t,n)=>{const r=n(59441);e.exports=(e,t)=>{const n=r(e,null,!0),a=r(t,null,!0),s=n.compare(a);if(0===s)return null;const i=s>0,o=i?n:a,l=i?a:n,c=!!o.prerelease.length;if(l.prerelease.length&&!c){if(!l.patch&&!l.minor)return"major";if(0===l.compareMain(o))return l.minor&&!l.patch?"minor":"patch"}const u=c?"pre":"";return n.major!==a.major?u+"major":n.minor!==a.minor?u+"minor":n.patch!==a.patch?u+"patch":"prerelease"}},9895:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var a=Object.getOwnPropertyDescriptor(t,n);a&&!("get"in a?!t.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,a)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),a=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.wrapField=t.getFilteredCompletions=void 0,a(n(62280),t),a(n(63547),t),a(n(85665),t),a(n(48543),t),a(n(97008),t),a(n(58313),t),a(n(13821),t),a(n(59588),t),a(n(46699),t),a(n(71925),t),a(n(3794),t),a(n(95831),t);var s=n(44601);Object.defineProperty(t,"getFilteredCompletions",{enumerable:!0,get:function(){return s.getFilteredCompletions}}),Object.defineProperty(t,"wrapField",{enumerable:!0,get:function(){return s.wrapField}}),a(n(10111),t),a(n(64757),t)},9982:(e,t,n)=>{const r=n(56206);e.exports=(e,t)=>e.sort(((e,n)=>r(e,n,t)))},10017:(e,t,n)=>{const r=n(34219);e.exports=(e,t)=>{const n=r(e.trim().replace(/^[=v]+/,""),t);return n?n.version:null}},10036:function(e,t,n){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.VIEW_PIPELINE_UTILS=void 0;const a=r(n(41738)),s="8.0.0",i="8.1.0";t.VIEW_PIPELINE_UTILS={MIN_VERSION_FOR_VIEW_SEARCH_COMPATIBILITY_DE:s,MIN_VERSION_FOR_VIEW_SEARCH_COMPATIBILITY_COMPASS:i,isPipelineSearchQueryable:e=>{for(const t of e){const e=Object.keys(t)[0];if("$addFields"!==e&&"$set"!==e&&"$match"!==e)return!1;if("$match"===e){const e=t.$match,n=Object.keys(e||{});if(1!==n.length||!n.includes("$expr"))return!1}}return!0},isVersionSearchCompatibleForViewsDataExplorer:e=>{try{return a.default.gte(e,s)}catch{return!1}},isVersionSearchCompatibleForViewsCompass:e=>{try{return a.default.gte(e,i)}catch{return!1}}}},10094:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.QUERY_OPERATORS=void 0,t.QUERY_OPERATORS=[{name:"$all",value:"$all",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$and",value:"$and",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$bitsAllClear",value:"$bitsAllClear",score:1,meta:"query",version:"3.2.0",geospatial:!1},{name:"$bitsAllSet",value:"$bitsAllSet",score:1,meta:"query",version:"3.2.0",geospatial:!1},{name:"$bitsAnyClear",value:"$bitsAnyClear",score:1,meta:"query",version:"3.2.0",geospatial:!1},{name:"$bitsAnySet",value:"$bitsAnySet",score:1,meta:"query",version:"3.2.0",geospatial:!1},{name:"$comment",value:"$comment",score:1,meta:"query",version:"3.2.0",geospatial:!1},{name:"$elemMatch",value:"$elemMatch",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$eq",value:"$eq",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$exists",value:"$exists",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$expr",value:"$expr",score:1,meta:"query",version:"3.6.0",geospatial:!1},{name:"$geoIntersects",value:"$geoIntersects",score:1,meta:"query",version:"2.2.0",geospatial:!0},{name:"$geoWithin",value:"$geoWithin",score:1,meta:"query",version:"2.2.0",geospatial:!0},{name:"$gt",value:"$gt",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$gte",value:"$gte",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$in",value:"$in",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$jsonSchema",value:"$jsonSchema",score:1,meta:"query",version:"3.6.0",geospatial:!1},{name:"$lt",value:"$lt",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$lte",value:"$lte",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$mod",value:"$mod",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$ne",value:"$ne",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$near",value:"$near",score:1,meta:"query",version:"2.2.0",geospatial:!0},{name:"$nearSphere",value:"$nearSphere",score:1,meta:"query",version:"2.2.0",geospatial:!0},{name:"$nin",value:"$nin",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$not",value:"$not",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$nor",value:"$nor",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$or",value:"$or",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$regex",value:"$regex",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$size",value:"$size",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$slice",value:"$slice",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$text",value:"$text",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$type",value:"$type",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$where",value:"$where",score:1,meta:"query",version:"2.2.0",geospatial:!1}]},10111:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ATLAS_VECTOR_SEARCH_TEMPLATE=t.ATLAS_SEARCH_TEMPLATES=void 0,t.ATLAS_SEARCH_TEMPLATES=[{name:"Dynamic field mappings",snippet:'{\n "mappings": {\n "dynamic": true\n }\n}',version:"4.4.0"},{name:"Static field mappings",snippet:'{\n "mappings": {\n "dynamic": false,\n "fields": {\n ${1:<string field name>}: {\n "type": "string"\n },\n ${2:<number field name>}: {\n "type": "number"\n },\n ${3:<date field name>}: {\n "type": "date"\n },\n ${4:<geo field name>}: {\n "type": "geo"\n },\n } \n }\n}',version:"4.4.0"},{name:"Text field mappings",snippet:'{\n "mappings": {\n "dynamic": true,\n "fields": {\n ${1:<string field name>}: [\n {\n // Enables text queries\n "type": "string"\n },\n {\n // Enables autocomplete queries\n "type": "autocomplete"\n \n },\n {\n // Enables sorting\n "type": "token"\n }\n ] \n } \n }\n}',version:"4.4.0"},{name:"Facet field mappings",snippet:'{\n "mappings": {\n "dynamic": true,\n "fields": {\n ${1:<number field name for faceting>}: [\n {\n "type": "numberFacet"\n },\n {\n "type": "number"\n },\n ],\n ${2:<date field name for faceting>}: [\n {\n "type": "dateFacet"\n }\n {\n "type": "date"\n }\n ],\n ${3:<string field name for faceting>}: [\n {\n "type": "stringFacet"\n },\n {\n "type": "string",\n "analyzer": "lucene.keyword"\n },\n ],\n } \n }\n}',version:"4.4.0"},{name:"KNN Vector field mapping",snippet:'{\n "mappings": {\n "dynamic": true,\n "fields": {\n ${1:<vector embedding field name>}: [\n {\n "type": "knnVector",\n "dimensions": ${2:<number of dimensions>},\n "similarity": "${3:<euclidean | cosine | dotProduct>}"\n } \n ] \n } \n }\n}',version:"4.4.0"}],t.ATLAS_VECTOR_SEARCH_TEMPLATE={name:"Vector Search default template",snippet:'{\n "fields": [{\n "type": "vector",\n "path": "${1:<field name to index>}",\n "numDimensions": ${2:<number of dimensions>},\n "similarity": "${3:<euclidean | cosine | dotProduct>}"\n }]\n}',version:"4.4.0"}},10215:(e,t,n)=>{n.d(t,{J0:()=>a});var r=n(28830);r.default,r.CommaAndColonSeparatedRecord,r.ConnectionString;const a=r.redactConnectionString},10282:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SYSTEM_VARIABLES=void 0,t.SYSTEM_VARIABLES=[{name:"$$NOW",value:"$$NOW",score:1,meta:"variable:system",version:"4.2.0",description:"A variable that returns the current datetime value. NOW returns the same value for all members of the deployment and remains the same throughout all stages of the aggregation pipeline."},{name:"$$CLUSTER_TIME",value:"$$CLUSTER_TIME",score:1,meta:"variable:system",version:"4.2.0",description:"A variable that returns the current timestamp value. CLUSTER_TIME is only available on replica sets and sharded clusters. CLUSTER_TIME returns the same value for all members of the deployment and remains the same throughout all stages of the pipeline."},{name:"$$ROOT",value:"$$ROOT",score:1,meta:"variable:system",version:"2.4.0",description:"References the root document, i.e. the top-level document, currently being processed in the aggregation pipeline stage."},{name:"$$CURRENT",value:"$$CURRENT",score:1,meta:"variable:system",version:"2.4.0",description:"References the start of the field path being processed in the aggregation pipeline stage. Unless documented otherwise, all stages start with CURRENT the same as ROOT. CURRENT is modifiable. However, since `$<field>` is equivalent to `$$CURRENT.<field>`, rebinding CURRENT changes the meaning of `$` accesses."},{name:"$$REMOVE",value:"$$REMOVE",score:1,meta:"variable:system",version:"3.6.0",description:"A variable which evaluates to the missing value. Allows for the conditional exclusion of fields. In a `$project`, a field set to the variable REMOVE is excluded from the output."},{name:"$$DESCEND",value:"$$DESCEND",score:1,meta:"variable:system",version:"3.0.0",description:"One of the allowed results of a `$redact` expression."},{name:"$$PRUNE",value:"$$PRUNE",score:1,meta:"variable:system",version:"3.0.0",description:"One of the allowed results of a `$redact` expression."},{name:"$$KEEP",value:"$$KEEP",score:1,meta:"variable:system",version:"3.0.0",description:"One of the allowed results of a `$redact` expression."},{name:"$$SEARCH_META",value:"$$SEARCH_META",score:1,meta:"variable:system",version:"5.0.0",description:"A variable that stores the metadata results of an Atlas Search query. In all supported aggregation pipeline stages, a field set to the variable SEARCH_META returns the metadata results for the query. For an example of its usage, see Atlas Search facet and count."},{name:"$$USER_ROLES",value:"$$USER_ROLES",score:1,meta:"variable:system",version:"7.0.0",description:"A variable that stores the role names of the authenticated user running the command."}]},10560:(e,t,n)=>{var r;try{r=n(20745)}catch(e){"undefined"!=typeof window&&(r=window.esprima)}var a=n(40811);e.exports=new a("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:function(e){if(null===e)return!1;try{var t="("+e+")",n=r.parse(t,{range:!0});return"Program"===n.type&&1===n.body.length&&"ExpressionStatement"===n.body[0].type&&("ArrowFunctionExpression"===n.body[0].expression.type||"FunctionExpression"===n.body[0].expression.type)}catch(e){return!1}},construct:function(e){var t,n="("+e+")",a=r.parse(n,{range:!0}),s=[];if("Program"!==a.type||1!==a.body.length||"ExpressionStatement"!==a.body[0].type||"ArrowFunctionExpression"!==a.body[0].expression.type&&"FunctionExpression"!==a.body[0].expression.type)throw new Error("Failed to resolve function");return a.body[0].expression.params.forEach((function(e){s.push(e.name)})),t=a.body[0].expression.body.range,"BlockStatement"===a.body[0].expression.body.type?new Function(s,n.slice(t[0]+1,t[1]-1)):new Function(s,"return "+n.slice(t[0],t[1]))},predicate:function(e){return"[object Function]"===Object.prototype.toString.call(e)},represent:function(e){return e.toString()}})},10760:(e,t,n)=>{const r=n(85216);e.exports=(e,t)=>e.sort(((e,n)=>r(n,e,t)))},10933:(e,t,n)=>{const r=n(48381),a=n(20332);e.exports=(e,t,n)=>{let s=null,i=null,o=null;try{o=new a(t,n)}catch(e){return null}return e.forEach((e=>{o.test(e)&&(s&&1!==i.compare(e)||(s=e,i=new r(s,n)))})),s}},11233:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.QUERY_OPERATORS=void 0,t.QUERY_OPERATORS=[{name:"$all",value:"$all",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$and",value:"$and",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$bitsAllClear",value:"$bitsAllClear",score:1,meta:"query",version:"3.2.0",geospatial:!1},{name:"$bitsAllSet",value:"$bitsAllSet",score:1,meta:"query",version:"3.2.0",geospatial:!1},{name:"$bitsAnyClear",value:"$bitsAnyClear",score:1,meta:"query",version:"3.2.0",geospatial:!1},{name:"$bitsAnySet",value:"$bitsAnySet",score:1,meta:"query",version:"3.2.0",geospatial:!1},{name:"$comment",value:"$comment",score:1,meta:"query",version:"3.2.0",geospatial:!1},{name:"$elemMatch",value:"$elemMatch",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$eq",value:"$eq",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$exists",value:"$exists",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$expr",value:"$expr",score:1,meta:"query",version:"3.6.0",geospatial:!1},{name:"$geoIntersects",value:"$geoIntersects",score:1,meta:"query",version:"2.2.0",geospatial:!0},{name:"$geoWithin",value:"$geoWithin",score:1,meta:"query",version:"2.2.0",geospatial:!0},{name:"$gt",value:"$gt",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$gte",value:"$gte",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$in",value:"$in",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$jsonSchema",value:"$jsonSchema",score:1,meta:"query",version:"3.6.0",geospatial:!1},{name:"$lt",value:"$lt",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$lte",value:"$lte",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$mod",value:"$mod",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$ne",value:"$ne",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$near",value:"$near",score:1,meta:"query",version:"2.2.0",geospatial:!0},{name:"$nearSphere",value:"$nearSphere",score:1,meta:"query",version:"2.2.0",geospatial:!0},{name:"$nin",value:"$nin",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$not",value:"$not",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$nor",value:"$nor",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$or",value:"$or",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$regex",value:"$regex",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$size",value:"$size",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$slice",value:"$slice",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$text",value:"$text",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$type",value:"$type",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$where",value:"$where",score:1,meta:"query",version:"2.2.0",geospatial:!1}]},11249:(e,t,n)=>{const r=n(75265);e.exports=(e,t)=>e.sort(((e,n)=>r(n,e,t)))},11420:(e,t,n)=>{const r=n(48381);e.exports=(e,t,n,a,s)=>{"string"==typeof n&&(s=a,a=n,n=void 0);try{return new r(e instanceof r?e.version:e,n).inc(t,a,s).version}catch(e){return null}}},11451:(e,t,n)=>{const r=n(75265);e.exports=(e,t)=>e.sort(((e,n)=>r(e,n,t)))},11710:(e,t,n)=>{var r=n(99174);function a(e,t,n,r,a){this.name=e,this.buffer=t,this.position=n,this.line=r,this.column=a}a.prototype.getSnippet=function(e,t){var n,a,s,i,o;if(!this.buffer)return null;for(e=e||4,t=t||75,n="",a=this.position;a>0&&-1==="\0\r\n…\u2028\u2029".indexOf(this.buffer.charAt(a-1));)if(a-=1,this.position-a>t/2-1){n=" ... ",a+=5;break}for(s="",i=this.position;i<this.buffer.length&&-1==="\0\r\n…\u2028\u2029".indexOf(this.buffer.charAt(i));)if((i+=1)-this.position>t/2-1){s=" ... ",i-=5;break}return o=this.buffer.slice(a,i),r.repeat(" ",e)+n+o+s+"\n"+r.repeat(" ",e+this.position-a+n.length)+"^"},a.prototype.toString=function(e){var t,n="";return this.name&&(n+='in "'+this.name+'" '),n+="at line "+(this.line+1)+", column "+(this.column+1),e||(t=this.getSnippet())&&(n+=":\n"+t),n},e.exports=a},11742:(e,t,n)=>{const r=n(72857);e.exports=(e,t,n)=>(e=new r(e,n),t=new r(t,n),e.intersects(t,n))},12169:(e,t,n)=>{const r=n(88825);e.exports=(e,t)=>new r(e,t).major},12196:(e,t,n)=>{const r=n(57544);e.exports=(e,t,n=!1)=>{if(e instanceof r)return e;try{return new r(e,t)}catch(e){if(!n)return null;throw e}}},12815:(e,t,n)=>{const r=n(50066);e.exports=(e,t)=>new r(e,t).major},12876:(e,t,n)=>{const r=n(72857);e.exports=(e,t,n)=>{try{t=new r(t,n)}catch(e){return!1}return t.test(e)}},13012:(e,t,n)=>{const r=n(99597);e.exports=(e,t,n)=>r(e,t,"<",n)},13016:e=>{e.exports=class{constructor(){this.max=1e3,this.map=new Map}get(e){const t=this.map.get(e);return void 0===t?void 0:(this.map.delete(e),this.map.set(e,t),t)}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&void 0!==t){if(this.map.size>=this.max){const e=this.map.keys().next().value;this.delete(e)}this.map.set(e,t)}return this}}},13349:e=>{e.exports=class{constructor(){this.max=1e3,this.map=new Map}get(e){const t=this.map.get(e);return void 0===t?void 0:(this.map.delete(e),this.map.set(e,t),t)}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&void 0!==t){if(this.map.size>=this.max){const e=this.map.keys().next().value;this.delete(e)}this.map.set(e,t)}return this}}},13445:(e,t,n)=>{var r=n(40811),a=Object.prototype.toString;e.exports=new r("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:function(e){if(null===e)return!0;var t,n,r,s,i,o=e;for(i=new Array(o.length),t=0,n=o.length;t<n;t+=1){if(r=o[t],"[object Object]"!==a.call(r))return!1;if(1!==(s=Object.keys(r)).length)return!1;i[t]=[s[0],r[s[0]]]}return!0},construct:function(e){if(null===e)return[];var t,n,r,a,s,i=e;for(s=new Array(i.length),t=0,n=i.length;t<n;t+=1)r=i[t],a=Object.keys(r),s[t]=[a[0],r[a[0]]];return s}})},13559:(e,t,n)=>{const r=n(48381),a=n(34219),{safeRe:s,t:i}=n(92625);e.exports=(e,t)=>{if(e instanceof r)return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;let n=null;if((t=t||{}).rtl){const r=t.includePrerelease?s[i.COERCERTLFULL]:s[i.COERCERTL];let a;for(;(a=r.exec(e))&&(!n||n.index+n[0].length!==e.length);)n&&a.index+a[0].length===n.index+n[0].length||(n=a),r.lastIndex=a.index+a[1].length+a[2].length;r.lastIndex=-1}else n=e.match(t.includePrerelease?s[i.COERCEFULL]:s[i.COERCE]);if(null===n)return null;const o=n[2],l=n[3]||"0",c=n[4]||"0",u=t.includePrerelease&&n[5]?`-${n[5]}`:"",p=t.includePrerelease&&n[6]?`+${n[6]}`:"";return a(`${o}.${l}.${c}${u}${p}`,t)}},13821:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.JSON_SCHEMA=void 0,t.JSON_SCHEMA=[{name:"bsonType",value:"bsonType",label:"bsonType",score:1,meta:"json-schema",version:"3.6.0",description:"Accepts same string aliases used for the $type operator"},{name:"enum",value:"enum",label:"enum",score:1,meta:"json-schema",version:"3.6.0",description:"Enumerates all possible values of the field"},{name:"type",value:"type",label:"type",score:1,meta:"json-schema",version:"3.6.0",description:"Enumerates the possible JSON types of the field"},{name:"allOf",value:"allOf",label:"allOf",score:1,meta:"json-schema",version:"3.6.0",description:"Field must match all specified schemas"},{name:"anyOf",value:"anyOf",label:"anyOf",score:1,meta:"json-schema",version:"3.6.0",description:"Field must match at least one of the specified schemas"},{name:"oneOf",value:"oneOf",label:"oneOf",score:1,meta:"json-schema",version:"3.6.0",description:"Field must match exactly one of the specified schemas"},{name:"not",value:"not",label:"not",score:1,meta:"json-schema",version:"3.6.0",description:"Field must not match the schema"},{name:"multipleOf",value:"multipleOf",label:"multipleOf",score:1,meta:"json-schema",version:"3.6.0",description:"Field must be a multiple of this value"},{name:"maximum",value:"maximum",label:"maximum",score:1,meta:"json-schema",version:"3.6.0",description:"Indicates the maximum value of the field"},{name:"exclusiveMaximum",value:"exclusiveMaximum",label:"exclusiveMaximum",score:1,meta:"json-schema",version:"3.6.0",description:"If true and field is a number, maximum is an exclusive maximum"},{name:"minimum",value:"minimum",label:"minimum",score:1,meta:"json-schema",version:"3.6.0",description:"Indicates the minimum value of the field"},{name:"exclusiveMinimum",value:"exclusiveMinimum",label:"exclusiveMinimum",score:1,meta:"json-schema",version:"3.6.0",description:"If true, minimum is an exclusive minimum"},{name:"maxLength",value:"maxLength",label:"maxLength",score:1,meta:"json-schema",version:"3.6.0",description:"Indicates the maximum length of the field"},{name:"minLength",value:"minLength",label:"minLength",score:1,meta:"json-schema",version:"3.6.0",description:"Indicates the minimum length of the field"},{name:"pattern",value:"pattern",label:"pattern",score:1,meta:"json-schema",version:"3.6.0",description:"Field must match the regular expression"},{name:"maxProperties",value:"maxProperties",label:"maxProperties",score:1,meta:"json-schema",version:"3.6.0",description:"Indicates the field’s maximum number of properties"},{name:"minProperties",value:"minProperties",label:"minProperties",score:1,meta:"json-schema",version:"3.6.0",description:"Indicates the field’s minimum number of properties"},{name:"required",value:"required",label:"required",score:1,meta:"json-schema",version:"3.6.0",description:"Object’s property set must contain all the specified elements in the array"},{name:"additionalProperties",value:"additionalProperties",label:"additionalProperties",score:1,meta:"json-schema",version:"3.6.0",description:"If true, additional fields are allowed"},{name:"properties",value:"properties",label:"properties",score:1,meta:"json-schema",version:"3.6.0",description:"A valid JSON Schema where each value is also a valid JSON Schema object"},{name:"patternProperties",value:"patternProperties",label:"patternProperties",score:1,meta:"json-schema",version:"3.6.0",description:"In addition to properties requirements, each property name of this object must be a valid regular expression"},{name:"dependencies",value:"dependencies",label:"dependencies",score:1,meta:"json-schema",version:"3.6.0",description:"Describes field or schema dependencies"},{name:"additionalItems",value:"additionalItems",label:"additionalItems",score:1,meta:"json-schema",version:"3.6.0",description:"If an object, must be a valid JSON Schema"},{name:"items",value:"items",label:"items",score:1,meta:"json-schema",version:"3.6.0",description:"Must be either a valid JSON Schema, or an array of valid JSON Schemas"},{name:"maxItems",value:"maxItems",label:"maxItems",score:1,meta:"json-schema",version:"3.6.0",description:"Indicates the maximum length of array"},{name:"minItems",value:"minItems",label:"minItems",score:1,meta:"json-schema",version:"3.6.0",description:"Indicates the minimum length of array"},{name:"uniqueItems",value:"uniqueItems",label:"uniqueItems",score:1,meta:"json-schema",version:"3.6.0",description:"If true, each item in the array must be unique"},{name:"title",value:"title",label:"title",score:1,meta:"json-schema",version:"3.6.0",description:"A descriptive title string with no effect"},{name:"description",value:"description",label:"description",score:1,meta:"json-schema",version:"3.6.0",description:"A string that describes the schema and has no effect."}]},14e3:(e,t,n)=>{const r=n(57544),a=n(95323);e.exports=(e,t,n)=>{let s=null,i=null,o=null;try{o=new a(t,n)}catch(e){return null}return e.forEach((e=>{o.test(e)&&(s&&-1!==i.compare(e)||(s=e,i=new r(s,n)))})),s}},14753:(e,t,n)=>{var r=n(40811);e.exports=new r("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:function(e){if(null===e)return!1;if(0===e.length)return!1;var t=e,n=/\/([gim]*)$/.exec(e),r="";if("/"===t[0]){if(n&&(r=n[1]),r.length>3)return!1;if("/"!==t[t.length-r.length-1])return!1}return!0},construct:function(e){var t=e,n=/\/([gim]*)$/.exec(e),r="";return"/"===t[0]&&(n&&(r=n[1]),t=t.slice(1,t.length-r.length-1)),new RegExp(t,r)},predicate:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},represent:function(e){var t="/"+e.source+"/";return e.global&&(t+="g"),e.multiline&&(t+="m"),e.ignoreCase&&(t+="i"),t}})},14982:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var a=Object.getOwnPropertyDescriptor(t,n);a&&!("get"in a?!t.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,a)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),a=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.wrapField=t.getFilteredCompletions=void 0,a(n(63131),t),a(n(93766),t),a(n(51626),t),a(n(64900),t),a(n(92133),t),a(n(85070),t),a(n(48080),t),a(n(79223),t),a(n(51098),t),a(n(79984),t),a(n(35593),t),a(n(40214),t);var s=n(21410);Object.defineProperty(t,"getFilteredCompletions",{enumerable:!0,get:function(){return s.getFilteredCompletions}}),Object.defineProperty(t,"wrapField",{enumerable:!0,get:function(){return s.wrapField}}),a(n(57136),t),a(n(37504),t)},15011:(e,t,n)=>{const r=n(20332);e.exports=(e,t)=>{try{return new r(e,t).range||"*"}catch(e){return null}}},15037:(e,t,n)=>{var r=n(54420);e.exports=new r({include:[n(91714)],implicit:[n(89295),n(81602),n(48013),n(44490)]})},15144:(e,t,n)=>{const r=n(83586);e.exports=(e,t)=>{const n=r(e.trim().replace(/^[=v]+/,""),t);return n?n.version:null}},15160:(e,t,n)=>{const r=n(9350),a=n(33629);e.exports=(e,t,n)=>{let s=null,i=null,o=null;try{o=new a(t,n)}catch(e){return null}return e.forEach((e=>{o.test(e)&&(s&&1!==i.compare(e)||(s=e,i=new r(s,n)))})),s}},15580:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ATLAS_VECTOR_SEARCH_TEMPLATE=t.ATLAS_SEARCH_TEMPLATES=void 0,t.ATLAS_SEARCH_TEMPLATES=[{name:"Dynamic field mappings",snippet:'{\n "mappings": {\n "dynamic": true\n }\n}',version:"4.4.0"},{name:"Static field mappings",snippet:'{\n "mappings": {\n "dynamic": false,\n "fields": {\n ${1:<string field name>}: {\n "type": "string"\n },\n ${2:<number field name>}: {\n "type": "number"\n },\n ${3:<date field name>}: {\n "type": "date"\n },\n ${4:<geo field name>}: {\n "type": "geo"\n },\n } \n }\n}',version:"4.4.0"},{name:"Text field mappings",snippet:'{\n "mappings": {\n "dynamic": true,\n "fields": {\n ${1:<string field name>}: [\n {\n // Enables text queries\n "type": "string"\n },\n {\n // Enables autocomplete queries\n "type": "autocomplete"\n \n },\n {\n // Enables sorting\n "type": "token"\n }\n ] \n } \n }\n}',version:"4.4.0"},{name:"Facet field mappings",snippet:'{\n "mappings": {\n "dynamic": true,\n "fields": {\n ${1:<number field name for faceting>}: [\n {\n "type": "numberFacet"\n },\n {\n "type": "number"\n },\n ],\n ${2:<date field name for faceting>}: [\n {\n "type": "dateFacet"\n }\n {\n "type": "date"\n }\n ],\n ${3:<string field name for faceting>}: [\n {\n "type": "stringFacet"\n },\n {\n "type": "string",\n "analyzer": "lucene.keyword"\n },\n ],\n } \n }\n}',version:"4.4.0"},{name:"KNN Vector field mapping",snippet:'{\n "mappings": {\n "dynamic": true,\n "fields": {\n ${1:<vector embedding field name>}: [\n {\n "type": "knnVector",\n "dimensions": ${2:<number of dimensions>},\n "similarity": "${3:<euclidean | cosine | dotProduct>}"\n } \n ] \n } \n }\n}',version:"4.4.0"}],t.ATLAS_VECTOR_SEARCH_TEMPLATE={name:"Vector Search default template",snippet:'{\n "fields": [{\n "type": "vector",\n "path": "${1:<field name to index>}",\n "numDimensions": ${2:<number of dimensions>},\n "similarity": "${3:<euclidean | cosine | dotProduct>}"\n }]\n}',version:"4.4.0"}},15844:(e,t,n)=>{const r=n(60501);e.exports=(e,t,n)=>r(e,t,n)>=0},17497:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.JSON_SCHEMA=void 0,t.JSON_SCHEMA=[{name:"bsonType",value:"bsonType",label:"bsonType",score:1,meta:"json-schema",version:"3.6.0",description:"Accepts same string aliases used for the $type operator"},{name:"enum",value:"enum",label:"enum",score:1,meta:"json-schema",version:"3.6.0",description:"Enumerates all possible values of the field"},{name:"type",value:"type",label:"type",score:1,meta:"json-schema",version:"3.6.0",description:"Enumerates the possible JSON types of the field"},{name:"allOf",value:"allOf",label:"allOf",score:1,meta:"json-schema",version:"3.6.0",description:"Field must match all specified schemas"},{name:"anyOf",value:"anyOf",label:"anyOf",score:1,meta:"json-schema",version:"3.6.0",description:"Field must match at least one of the specified schemas"},{name:"oneOf",value:"oneOf",label:"oneOf",score:1,meta:"json-schema",version:"3.6.0",description:"Field must match exactly one of the specified schemas"},{name:"not",value:"not",label:"not",score:1,meta:"json-schema",version:"3.6.0",description:"Field must not match the schema"},{name:"multipleOf",value:"multipleOf",label:"multipleOf",score:1,meta:"json-schema",version:"3.6.0",description:"Field must be a multiple of this value"},{name:"maximum",value:"maximum",label:"maximum",score:1,meta:"json-schema",version:"3.6.0",description:"Indicates the maximum value of the field"},{name:"exclusiveMaximum",value:"exclusiveMaximum",label:"exclusiveMaximum",score:1,meta:"json-schema",version:"3.6.0",description:"If true and field is a number, maximum is an exclusive maximum"},{name:"minimum",value:"minimum",label:"minimum",score:1,meta:"json-schema",version:"3.6.0",description:"Indicates the minimum value of the field"},{name:"exclusiveMinimum",value:"exclusiveMinimum",label:"exclusiveMinimum",score:1,meta:"json-schema",version:"3.6.0",description:"If true, minimum is an exclusive minimum"},{name:"maxLength",value:"maxLength",label:"maxLength",score:1,meta:"json-schema",version:"3.6.0",description:"Indicates the maximum length of the field"},{name:"minLength",value:"minLength",label:"minLength",score:1,meta:"json-schema",version:"3.6.0",description:"Indicates the minimum length of the field"},{name:"pattern",value:"pattern",label:"pattern",score:1,meta:"json-schema",version:"3.6.0",description:"Field must match the regular expression"},{name:"maxProperties",value:"maxProperties",label:"maxProperties",score:1,meta:"json-schema",version:"3.6.0",description:"Indicates the field’s maximum number of properties"},{name:"minProperties",value:"minProperties",label:"minProperties",score:1,meta:"json-schema",version:"3.6.0",description:"Indicates the field’s minimum number of properties"},{name:"required",value:"required",label:"required",score:1,meta:"json-schema",version:"3.6.0",description:"Object’s property set must contain all the specified elements in the array"},{name:"additionalProperties",value:"additionalProperties",label:"additionalProperties",score:1,meta:"json-schema",version:"3.6.0",description:"If true, additional fields are allowed"},{name:"properties",value:"properties",label:"properties",score:1,meta:"json-schema",version:"3.6.0",description:"A valid JSON Schema where each value is also a valid JSON Schema object"},{name:"patternProperties",value:"patternProperties",label:"patternProperties",score:1,meta:"json-schema",version:"3.6.0",description:"In addition to properties requirements, each property name of this object must be a valid regular expression"},{name:"dependencies",value:"dependencies",label:"dependencies",score:1,meta:"json-schema",version:"3.6.0",description:"Describes field or schema dependencies"},{name:"additionalItems",value:"additionalItems",label:"additionalItems",score:1,meta:"json-schema",version:"3.6.0",description:"If an object, must be a valid JSON Schema"},{name:"items",value:"items",label:"items",score:1,meta:"json-schema",version:"3.6.0",description:"Must be either a valid JSON Schema, or an array of valid JSON Schemas"},{name:"maxItems",value:"maxItems",label:"maxItems",score:1,meta:"json-schema",version:"3.6.0",description:"Indicates the maximum length of array"},{name:"minItems",value:"minItems",label:"minItems",score:1,meta:"json-schema",version:"3.6.0",description:"Indicates the minimum length of array"},{name:"uniqueItems",value:"uniqueItems",label:"uniqueItems",score:1,meta:"json-schema",version:"3.6.0",description:"If true, each item in the array must be unique"},{name:"title",value:"title",label:"title",score:1,meta:"json-schema",version:"3.6.0",description:"A descriptive title string with no effect"},{name:"description",value:"description",label:"description",score:1,meta:"json-schema",version:"3.6.0",description:"A string that describes the schema and has no effect."}]},17555:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.VALIDATION_TEMPLATE=void 0,t.VALIDATION_TEMPLATE='/**\n * This is a starter template for a schema validation rule for a collection.\n * More information on schema validation rules can be found at:\n * https://www.mongodb.com/docs/manual/core/schema-validation/\n */\n{\n $jsonSchema: {\n title: "Library.books",\n bsonType: "object",\n required: ["fieldname1", "fieldname2"],\n properties: {\n fieldname1: {\n bsonType: "string",\n description: "Fieldname1 must be a string",\n },\n fieldname2: {\n bsonType: "int",\n description: "Fieldname2 must be an integer",\n },\n arrayFieldName: {\n bsonType: "array",\n items: {\n bsonType: "string"\n },\n description: "arrayFieldName must be an array of strings"\n },\n }\n }\n}'},17620:(e,t,n)=>{const r=n(32674);e.exports=(e,t,n)=>r(t,e,n)},17624:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.VALIDATION_TEMPLATE=void 0,t.VALIDATION_TEMPLATE='/**\n * This is a starter template for a schema validation rule for a collection.\n * More information on schema validation rules can be found at:\n * https://www.mongodb.com/docs/manual/core/schema-validation/\n */\n{\n $jsonSchema: {\n title: "Library.books",\n bsonType: "object",\n required: ["fieldname1", "fieldname2"],\n properties: {\n fieldname1: {\n bsonType: "string",\n description: "Fieldname1 must be a string",\n },\n fieldname2: {\n bsonType: "int",\n description: "Fieldname2 must be an integer",\n },\n arrayFieldName: {\n bsonType: "array",\n items: {\n bsonType: "string"\n },\n description: "arrayFieldName must be an array of strings"\n },\n }\n }\n}'},17807:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ACCUMULATORS=void 0,t.ACCUMULATORS=[{name:"$accumulator",value:"$accumulator",score:1,meta:"accumulator",version:"4.4.0"},{name:"$addToSet",value:"$addToSet",score:1,meta:"accumulator",version:"2.2.0"},{name:"$avg",value:"$avg",score:1,meta:"accumulator",version:"2.2.0",projectVersion:"3.2.0"},{name:"$bottom",value:"$bottom",score:1,meta:"accumulator:bottom-n",version:"5.2.0"},{name:"$bottomN",value:"$bottomN",score:1,meta:"accumulator:bottom-n",version:"5.2.0"},{name:"$covariancePop",value:"$covariancePop",score:1,meta:"accumulator:window",version:"5.0.0"},{name:"$covarianceSamp",value:"$covarianceSamp",score:1,meta:"accumulator:window",version:"5.0.0"},{name:"$count",value:"$count",score:1,meta:"accumulator",version:"5.0.0"},{name:"$derivative",value:"$derivative",score:1,meta:"accumulator:window",version:"5.0.0"},{name:"$denseRank",value:"$denseRank",score:1,meta:"accumulator:window",version:"5.0.0"},{name:"$documentNumber",value:"$documentNumber",score:1,meta:"accumulator:window",version:"5.0.0"},{name:"$expMovingAvg",value:"$expMovingAvg",score:1,meta:"accumulator:window",version:"5.0.0"},{name:"$first",value:"$first",score:1,meta:"accumulator",version:"2.2.0"},{name:"$firstN",value:"$firstN",score:1,meta:"accumulator",version:"5.1.0"},{name:"$integral",value:"$integral",score:1,meta:"accumulator:window",version:"5.0.0"},{name:"$last",value:"$last",score:1,meta:"accumulator",version:"2.2.0"},{name:"$lastN",value:"$lastN",score:1,meta:"accumulator",version:"5.2.0"},{name:"$max",value:"$max",score:1,meta:"accumulator",version:"2.2.0",projectVersion:"3.2.0"},{name:"$maxN",value:"$maxN",score:1,meta:"accumulator",version:"5.2.0"},{name:"$median",value:"$median",score:1,meta:"accumulator",version:"7.0.0"},{name:"$min",value:"$min",score:1,meta:"accumulator",version:"2.2.0",projectVersion:"3.2.0"},{name:"$minN",value:"$minN",score:1,meta:"accumulator",version:"5.2.0"},{name:"$percentile",value:"$percentile",score:1,meta:"accumulator",version:"7.0.0"},{name:"$push",value:"$push",score:1,meta:"accumulator",version:"2.2.0"},{name:"$rank",value:"$rank",score:1,meta:"accumulator:window",version:"5.0.0"},{name:"$stdDevPop",value:"$stdDevPop",score:1,meta:"accumulator",version:"3.2.0",projectVersion:"3.2.0"},{name:"$stdDevSamp",value:"$stdDevSamp",score:1,meta:"accumulator",version:"3.2.0",projectVersion:"3.2.0"},{name:"$shift",value:"$shift",score:1,meta:"accumulator:window",version:"5.0.0"},{name:"$sum",value:"$sum",score:1,meta:"accumulator",version:"2.2.0",projectVersion:"3.2.0"},{name:"$top",value:"$top",score:1,meta:"accumulator:top-n",version:"5.2.0"},{name:"$topN",value:"$topN",score:1,meta:"accumulator:top-n",version:"5.2.0"},{name:"$locf",value:"$locf",score:1,meta:"accumulator:window",version:"5.3.0"},{name:"$linearFill",value:"$linearFill",score:1,meta:"accumulator:window",version:"5.3.0"}]},17914:(e,t,n)=>{const r=n(9350);e.exports=(e,t,n=!1)=>{if(e instanceof r)return e;try{return new r(e,t)}catch(e){if(!n)return null;throw e}}},17941:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.JSON_SCHEMA=void 0,t.JSON_SCHEMA=[{name:"bsonType",value:"bsonType",label:"bsonType",score:1,meta:"json-schema",version:"3.6.0",description:"Accepts same string aliases used for the $type operator"},{name:"enum",value:"enum",label:"enum",score:1,meta:"json-schema",version:"3.6.0",description:"Enumerates all possible values of the field"},{name:"type",value:"type",label:"type",score:1,meta:"json-schema",version:"3.6.0",description:"Enumerates the possible JSON types of the field"},{name:"allOf",value:"allOf",label:"allOf",score:1,meta:"json-schema",version:"3.6.0",description:"Field must match all specified schemas"},{name:"anyOf",value:"anyOf",label:"anyOf",score:1,meta:"json-schema",version:"3.6.0",description:"Field must match at least one of the specified schemas"},{name:"oneOf",value:"oneOf",label:"oneOf",score:1,meta:"json-schema",version:"3.6.0",description:"Field must match exactly one of the specified schemas"},{name:"not",value:"not",label:"not",score:1,meta:"json-schema",version:"3.6.0",description:"Field must not match the schema"},{name:"multipleOf",value:"multipleOf",label:"multipleOf",score:1,meta:"json-schema",version:"3.6.0",description:"Field must be a multiple of this value"},{name:"maximum",value:"maximum",label:"maximum",score:1,meta:"json-schema",version:"3.6.0",description:"Indicates the maximum value of the field"},{name:"exclusiveMaximum",value:"exclusiveMaximum",label:"exclusiveMaximum",score:1,meta:"json-schema",version:"3.6.0",description:"If true and field is a number, maximum is an exclusive maximum"},{name:"minimum",value:"minimum",label:"minimum",score:1,meta:"json-schema",version:"3.6.0",description:"Indicates the minimum value of the field"},{name:"exclusiveMinimum",value:"exclusiveMinimum",label:"exclusiveMinimum",score:1,meta:"json-schema",version:"3.6.0",description:"If true, minimum is an exclusive minimum"},{name:"maxLength",value:"maxLength",label:"maxLength",score:1,meta:"json-schema",version:"3.6.0",description:"Indicates the maximum length of the field"},{name:"minLength",value:"minLength",label:"minLength",score:1,meta:"json-schema",version:"3.6.0",description:"Indicates the minimum length of the field"},{name:"pattern",value:"pattern",label:"pattern",score:1,meta:"json-schema",version:"3.6.0",description:"Field must match the regular expression"},{name:"maxProperties",value:"maxProperties",label:"maxProperties",score:1,meta:"json-schema",version:"3.6.0",description:"Indicates the field’s maximum number of properties"},{name:"minProperties",value:"minProperties",label:"minProperties",score:1,meta:"json-schema",version:"3.6.0",description:"Indicates the field’s minimum number of properties"},{name:"required",value:"required",label:"required",score:1,meta:"json-schema",version:"3.6.0",description:"Object’s property set must contain all the specified elements in the array"},{name:"additionalProperties",value:"additionalProperties",label:"additionalProperties",score:1,meta:"json-schema",version:"3.6.0",description:"If true, additional fields are allowed"},{name:"properties",value:"properties",label:"properties",score:1,meta:"json-schema",version:"3.6.0",description:"A valid JSON Schema where each value is also a valid JSON Schema object"},{name:"patternProperties",value:"patternProperties",label:"patternProperties",score:1,meta:"json-schema",version:"3.6.0",description:"In addition to properties requirements, each property name of this object must be a valid regular expression"},{name:"dependencies",value:"dependencies",label:"dependencies",score:1,meta:"json-schema",version:"3.6.0",description:"Describes field or schema dependencies"},{name:"additionalItems",value:"additionalItems",label:"additionalItems",score:1,meta:"json-schema",version:"3.6.0",description:"If an object, must be a valid JSON Schema"},{name:"items",value:"items",label:"items",score:1,meta:"json-schema",version:"3.6.0",description:"Must be either a valid JSON Schema, or an array of valid JSON Schemas"},{name:"maxItems",value:"maxItems",label:"maxItems",score:1,meta:"json-schema",version:"3.6.0",description:"Indicates the maximum length of array"},{name:"minItems",value:"minItems",label:"minItems",score:1,meta:"json-schema",version:"3.6.0",description:"Indicates the minimum length of array"},{name:"uniqueItems",value:"uniqueItems",label:"uniqueItems",score:1,meta:"json-schema",version:"3.6.0",description:"If true, each item in the array must be unique"},{name:"title",value:"title",label:"title",score:1,meta:"json-schema",version:"3.6.0",description:"A descriptive title string with no effect"},{name:"description",value:"description",label:"description",score:1,meta:"json-schema",version:"3.6.0",description:"A string that describes the schema and has no effect."}]},18082:(e,t,n)=>{const r=n(25583);e.exports=(e,t,n)=>r(e,t,n)<0},18104:(e,t,n)=>{const{MAX_SAFE_COMPONENT_LENGTH:r,MAX_SAFE_BUILD_LENGTH:a,MAX_LENGTH:s}=n(4292),i=n(72082),o=(t=e.exports={}).re=[],l=t.safeRe=[],c=t.src=[],u=t.safeSrc=[],p=t.t={};let d=0;const m="[a-zA-Z0-9-]",h=[["\\s",1],["\\d",s],[m,a]],f=(e,t,n)=>{const r=(e=>{for(const[t,n]of h)e=e.split(`${t}*`).join(`${t}{0,${n}}`).split(`${t}+`).join(`${t}{1,${n}}`);return e})(t),a=d++;i(e,a,t),p[e]=a,c[a]=t,u[a]=r,o[a]=new RegExp(t,n?"g":void 0),l[a]=new RegExp(r,n?"g":void 0)};f("NUMERICIDENTIFIER","0|[1-9]\\d*"),f("NUMERICIDENTIFIERLOOSE","\\d+"),f("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${m}*`),f("MAINVERSION",`(${c[p.NUMERICIDENTIFIER]})\\.(${c[p.NUMERICIDENTIFIER]})\\.(${c[p.NUMERICIDENTIFIER]})`),f("MAINVERSIONLOOSE",`(${c[p.NUMERICIDENTIFIERLOOSE]})\\.(${c[p.NUMERICIDENTIFIERLOOSE]})\\.(${c[p.NUMERICIDENTIFIERLOOSE]})`),f("PRERELEASEIDENTIFIER",`(?:${c[p.NONNUMERICIDENTIFIER]}|${c[p.NUMERICIDENTIFIER]})`),f("PRERELEASEIDENTIFIERLOOSE",`(?:${c[p.NONNUMERICIDENTIFIER]}|${c[p.NUMERICIDENTIFIERLOOSE]})`),f("PRERELEASE",`(?:-(${c[p.PRERELEASEIDENTIFIER]}(?:\\.${c[p.PRERELEASEIDENTIFIER]})*))`),f("PRERELEASELOOSE",`(?:-?(${c[p.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${c[p.PRERELEASEIDENTIFIERLOOSE]})*))`),f("BUILDIDENTIFIER",`${m}+`),f("BUILD",`(?:\\+(${c[p.BUILDIDENTIFIER]}(?:\\.${c[p.BUILDIDENTIFIER]})*))`),f("FULLPLAIN",`v?${c[p.MAINVERSION]}${c[p.PRERELEASE]}?${c[p.BUILD]}?`),f("FULL",`^${c[p.FULLPLAIN]}$`),f("LOOSEPLAIN",`[v=\\s]*${c[p.MAINVERSIONLOOSE]}${c[p.PRERELEASELOOSE]}?${c[p.BUILD]}?`),f("LOOSE",`^${c[p.LOOSEPLAIN]}$`),f("GTLT","((?:<|>)?=?)"),f("XRANGEIDENTIFIERLOOSE",`${c[p.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),f("XRANGEIDENTIFIER",`${c[p.NUMERICIDENTIFIER]}|x|X|\\*`),f("XRANGEPLAIN",`[v=\\s]*(${c[p.XRANGEIDENTIFIER]})(?:\\.(${c[p.XRANGEIDENTIFIER]})(?:\\.(${c[p.XRANGEIDENTIFIER]})(?:${c[p.PRERELEASE]})?${c[p.BUILD]}?)?)?`),f("XRANGEPLAINLOOSE",`[v=\\s]*(${c[p.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[p.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[p.XRANGEIDENTIFIERLOOSE]})(?:${c[p.PRERELEASELOOSE]})?${c[p.BUILD]}?)?)?`),f("XRANGE",`^${c[p.GTLT]}\\s*${c[p.XRANGEPLAIN]}$`),f("XRANGELOOSE",`^${c[p.GTLT]}\\s*${c[p.XRANGEPLAINLOOSE]}$`),f("COERCEPLAIN",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?`),f("COERCE",`${c[p.COERCEPLAIN]}(?:$|[^\\d])`),f("COERCEFULL",c[p.COERCEPLAIN]+`(?:${c[p.PRERELEASE]})?`+`(?:${c[p.BUILD]})?(?:$|[^\\d])`),f("COERCERTL",c[p.COERCE],!0),f("COERCERTLFULL",c[p.COERCEFULL],!0),f("LONETILDE","(?:~>?)"),f("TILDETRIM",`(\\s*)${c[p.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",f("TILDE",`^${c[p.LONETILDE]}${c[p.XRANGEPLAIN]}$`),f("TILDELOOSE",`^${c[p.LONETILDE]}${c[p.XRANGEPLAINLOOSE]}$`),f("LONECARET","(?:\\^)"),f("CARETTRIM",`(\\s*)${c[p.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",f("CARET",`^${c[p.LONECARET]}${c[p.XRANGEPLAIN]}$`),f("CARETLOOSE",`^${c[p.LONECARET]}${c[p.XRANGEPLAINLOOSE]}$`),f("COMPARATORLOOSE",`^${c[p.GTLT]}\\s*(${c[p.LOOSEPLAIN]})$|^$`),f("COMPARATOR",`^${c[p.GTLT]}\\s*(${c[p.FULLPLAIN]})$|^$`),f("COMPARATORTRIM",`(\\s*)${c[p.GTLT]}\\s*(${c[p.LOOSEPLAIN]}|${c[p.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",f("HYPHENRANGE",`^\\s*(${c[p.XRANGEPLAIN]})\\s+-\\s+(${c[p.XRANGEPLAIN]})\\s*$`),f("HYPHENRANGELOOSE",`^\\s*(${c[p.XRANGEPLAINLOOSE]})\\s+-\\s+(${c[p.XRANGEPLAINLOOSE]})\\s*$`),f("STAR","(<|>)?=?\\s*\\*"),f("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),f("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")},18106:(e,t,n)=>{const r=n(32674);e.exports=(e,t,n)=>r(e,t,n)>0},18157:(e,t,n)=>{const r=n(50066);e.exports=(e,t,n,a,s)=>{"string"==typeof n&&(s=a,a=n,n=void 0);try{return new r(e instanceof r?e.version:e,n).inc(t,a,s).version}catch(e){return null}}},18184:(e,t,n)=>{var r=n(54420);e.exports=new r({include:[n(6340)],implicit:[n(78316),n(45848)],explicit:[n(52711),n(27195),n(13445),n(51228)]})},18894:(e,t,n)=>{const r=n(43301),a=n(77203);e.exports=(e,t,n)=>{const s=[];let i=null,o=null;const l=e.sort(((e,t)=>a(e,t,n)));for(const e of l)r(e,t,n)?(o=e,i||(i=e)):(o&&s.push([i,o]),o=null,i=null);i&&s.push([i,null]);const c=[];for(const[e,t]of s)e===t?c.push(e):t||e!==l[0]?t?e===l[0]?c.push(`<=${t}`):c.push(`${e} - ${t}`):c.push(`>=${e}`):c.push("*");const u=c.join(" || "),p="string"==typeof t.raw?t.raw:String(t);return u.length<p.length?u:t}},19133:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.REQUIRED_AS_FIRST_STAGE=t.FULL_SCAN_STAGES=t.OUT_STAGES=t.STAGE_OPERATOR_NAMES=t.STAGE_OPERATORS=void 0;const r=n(99352),a=n(37724),s=[{name:"$addFields",value:"$addFields",label:"$addFields",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"3.4.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Adds new field(s) to a document with a computed value, or reassigns an existing field(s) with a computed value.",comment:"/**\n * newField: The new field name.\n * expression: The new field expression.\n */\n",snippet:"{\n ${1:newField}: ${2:expression}, ${3:...}\n}"},{name:"$bucket",value:"$bucket",label:"$bucket",outputStage:!1,fullScan:!0,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"3.4.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Categorizes incoming documents into groups, called buckets, based on specified boundaries.",comment:"/**\n * groupBy: The expression to group by.\n * boundaries: An array of the lower boundaries for each bucket.\n * default: The bucket name for documents that do not fall within the specified boundaries\n * output: {\n * outputN: Optional. The output object may contain a single or numerous field names used to accumulate values per bucket.\n * }\n */\n",snippet:"{\n groupBy: ${1:expression},\n boundaries: [ ${2:lowerbound}, ${3:...} ],\n default: ${4:literal},\n output: {\n ${5:outputN}: { ${6:accumulator} }, ${7:...}\n }\n}"},{name:"$bucketAuto",value:"$bucketAuto",label:"$bucketAuto",outputStage:!1,fullScan:!0,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"3.4.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Automatically categorizes documents into a specified number of buckets, attempting even distribution if possible.",comment:"/**\n * groupBy: The expression to group by.\n * buckets: The desired number of buckets\n * output: {\n * outputN: Optional. The output object may contain a single or numerous field names used to accumulate values per bucket.\n * }\n * granularity: Optional number series\n */\n",snippet:"{\n groupBy: ${1:expression},\n buckets: ${2:number},\n output: {\n ${3:outputN}: ${4:accumulator}, ${5:...}\n },\n granularity: '${6:string}'\n}"},{name:"$changeStream",value:"$changeStream",label:"$changeStream",outputStage:!1,fullScan:!1,firstStage:!0,score:1,env:[r.ATLAS,r.ON_PREM],meta:"stage",version:"4.2.0",apiVersions:[1],namespaces:[a.DATABASE],description:"Returns a Change Stream cursor for the collection.",comment:"/**\n * allChangesForCluster: Optional boolean to include all changes in the cluster.\n * fullDocument: Optional value to request a copy of full document when modified by update operations (Introduced in 6.0).\n * fullDocumentBeforeChange: Value to configure whether to return a full document before the change or not.\n * resumeAfter: Specifies a resume token as the logical starting point for the change stream. Cannot be used with startAfter or startAtOperationTime fields.\n * showExpandedEvents: Specifies whether to include additional change events, such as such as DDL and index operations (Introduced in 6.0).\n * startAfter: Specifies a resume token as the logical starting point for the change stream. Cannot be used with resumeAfter or startAtOperationTime fields.\n * startAtOperationTime: Specifies a time as the logical starting point for the change stream. Cannot be used with resumeAfter or startAfter fields.\n */\n",snippet:"{\n allChangesForCluster: ${1:boolean},\n fullDocument: '${2:string}',\n fullDocumentBeforeChange: '${3:string}',\n resumeAfter: ${4:resumeToken},\n showExpandedEvents: ${5:boolean},\n startAfter: ${6:resumeToken},\n startAtOperationTime: ${7:time},\n}"},{name:"$collStats",value:"$collStats",label:"$collStats",outputStage:!1,fullScan:!1,firstStage:!0,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"3.4.0",apiVersions:[],namespaces:[...a.ANY_COLLECTION_NAMESPACE],description:"Returns statistics regarding a collection or view.",comment:"/**\n * histograms: Optional latency histograms.\n * storageStats: Optional storage stats.\n */\n",snippet:"{\n latencyStats: {\n histograms: ${1:boolean}\n },\n storageStats: {${2:}},\n}"},{name:"$count",value:"$count",label:"$count",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"2.2.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Returns a count of the number of documents at this stage of the aggregation pipeline.",comment:"/**\n * Provide the field name for the count.\n */\n",snippet:"'${1:string}'"},{name:"$currentOp",value:"$currentOp",label:"$currentOp",outputStage:!1,fullScan:!1,firstStage:!0,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"3.6.0",apiVersions:[1],namespaces:[a.DATABASE],description:"Returns a cursor over information on active and/or dormant operations for the MongoDB deployment as well as inactive sessions that are holding locks as part of a transaction.",comment:"/**\n * allUsers: Optional boolean value to specify whether to return operations for all users or not.\n * idleConnections: Optional boolean value to specify whether to return all operations including idle connections or not.\n * idleCursors: Optional boolean value to specify whether to report on cursors that are idle or not.\n * idleSessions: Optional boolean value to specify whether to report on dormant sessions or not.\n * localOps: Optional boolean value to specify whether to report on operations running locally on targetted mongos or not.\n * backtrace: Optional boolean value to specify whether callstack information is returned as part of the waitingForLatch output field.\n */\n",snippet:"{\n allUsers: ${1:false},\n idleConnections: ${2:false},\n idleCursors: ${3:false},\n idleSessions: ${4:true},\n localOps: ${5:false},\n backtrace: ${6:false},\n}"},{name:"$densify",value:"$densify",label:"$densify",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"5.1.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Creates new documents to eliminate the gaps in the time or numeric domain at the required granularity level.",comment:"/**\n * field: The required field to densify.\n * partitionByFields: The set of fields that acts as a compound key to define each partition.\n * range: {\n * step: The amount to increment the field value in each document.\n * unit: If specified field must evaluate to a date for every document in the collection, otherwise must evaluate to a numeric.\n * bounds: A string or array of numeric/date bounds, corresponding to the type of the field.\n * }\n */\n",snippet:"{\n field: ${1:string},\n partitionByFields: [${2:string}, ${3:string}, ...],\n range: {\n step: ${4:number},\n unit: ${5:string},\n bounds: [${6:lowerbound}, ${7:upperbound}, ...]\n }\n}"},{name:"$documents",value:"$documents",label:"$documents",outputStage:!1,fullScan:!1,firstStage:!0,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"4.4.9",apiVersions:[1],namespaces:[a.DATABASE],description:"Returns literal documents from input values.",comment:"/**\n * expression: Any valid expression.\n */\n",snippet:"{\n ${1:expression}\n}"},{name:"$facet",value:"$facet",label:"$facet",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"3.4.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Allows for multiple parellel aggregations to be specified.",comment:"/**\n * outputFieldN: The first output field.\n * stageN: The first aggregation stage.\n */\n",snippet:"{\n ${1:outputFieldN}: [ ${2:stageN}, ${3:...} ]\n}"},{name:"$fill",value:"$fill",label:"$fill",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"5.3.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Populates null and missing field values within documents.",comment:'/**\n * sortBy: Syntax is the same as $sort, required if "method" is used in at least one output spec otherwise optional\n * partitionBy: Optional, default is a single partition. Specification is the same as _id in $group (same as partitionBy in window functions).\n * partitionByFields: Optional, set of fields that acts as a compound key to define each partition.\n * output - Required, object for each field to fill in. For a single field, can be a single object.\n * output.<field> - A field to be filled with value, if missing or null in the current document.\n */\n',snippet:"{\n sortBy: ${1:sortSpec},\n partitionBy: ${2:expression},\n partitionByFields: [${3:string}, ${4:string}, ...],\n output: {\n field1: {value: ${5:expression}},\n field2: {method: ${6:string}},\n ...\n }\n}"},{name:"$geoNear",value:"$geoNear",label:"$geoNear",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"2.4.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Returns documents based on proximity to a geospatial point.",comment:"/**\n * near: The point to search near.\n * distanceField: The calculated distance.\n * maxDistance: The maximum distance, in meters, documents can be before being excluded from results.\n * query: Limits results that match the query\n * includeLocs: Optional. Labels and includes the point used to match the document.\n * num: Optional. The maximum number of documents to return.\n * spherical: Defaults to false. Specifies whether to use spherical geometry.\n */\n",snippet:"{\n near: { type: 'Point', coordinates: [ ${1:number}, ${2:number} ] },\n distanceField: '${3:string}',\n maxDistance: ${4:number},\n query: {${5}},\n includeLocs: '${6}',\n num: ${7:number},\n spherical: ${8:boolean}\n}"},{name:"$graphLookup",value:"$graphLookup",label:"$graphLookup",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"3.4.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Performs a recursive search on a collection.",comment:"/**\n * from: The target collection.\n * startWith: Expression to start.\n * connectFromField: Field to connect.\n * connectToField: Field to connect to.\n * as: Name of the array field.\n * maxDepth: Optional max recursion depth.\n * depthField: Optional Name of the depth field.\n * restrictSearchWithMatch: Optional query.\n */\n",snippet:"{\n from: '${1:string}',\n startWith: ${2:expression},\n connectFromField: '${3:string}',\n connectToField: '${4:string}',\n as: '${5:string}',\n maxDepth: ${6:number},\n depthField: '${7:string}',\n restrictSearchWithMatch: {${8}}\n}"},{name:"$group",value:"$group",label:"$group",outputStage:!1,fullScan:!0,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"2.2.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Groups documents by a specified expression.",comment:"/**\n * _id: The id of the group.\n * fieldN: The first field name.\n */\n",snippet:"{\n _id: ${1:expression},\n ${2:fieldN}: {\n ${3:accumulatorN}: ${4:expressionN}\n }\n}"},{name:"$indexStats",value:"$indexStats",label:"$indexStats",outputStage:!1,fullScan:!1,firstStage:!0,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"3.2.0",apiVersions:[],namespaces:[...a.ANY_NAMESPACE],description:"Returns statistics regarding the use of each index for the collection.",comment:"/**\n * No parameters.\n */\n",snippet:"{}"},{name:"$limit",value:"$limit",label:"$limit",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"2.2.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Limits the number of documents that flow into subsequent stages.",comment:"/**\n * Provide the number of documents to limit.\n */\n",snippet:"${1:number}"},{name:"$listLocalSessions",value:"$listLocalSessions",label:"$listLocalSessions",outputStage:!1,fullScan:!1,firstStage:!0,score:1,env:[r.ATLAS,r.ON_PREM],meta:"stage",version:"3.6.0",apiVersions:[1],namespaces:[a.DATABASE],description:"Lists the sessions cached in memory by the mongod or mongos instance.",comment:"/**\n * users: Optional list of users for which local sessions need to be returned.\n * allUsers: Optional boolean value to specify whether to return local sessions for all users or not.\n */\n",snippet:"{\n allUsers: ${1:false},\n users: [\n { user: '${2:string}', db: '${3:string}' }\n ]\n}"},{name:"$lookup",value:"$lookup",label:"$lookup",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"3.2.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Performs a join between two collections.",comment:"/**\n * from: The target collection.\n * localField: The local join field.\n * foreignField: The target join field.\n * as: The name for the results.\n * pipeline: Optional pipeline to run on the foreign collection.\n * let: Optional variables to use in the pipeline field stages.\n */\n",snippet:"{\n from: ${1:collection},\n localField: ${2:field},\n foreignField: ${3:field},\n as: ${4:result}\n}"},{name:"$match",value:"$match",label:"$match",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"2.2.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Filters the document stream to allow only matching documents to pass through to subsequent stages.",comment:"/**\n * query: The query in MQL.\n */\n",snippet:"{\n ${1:query}\n}"},{name:"$merge",value:"$merge",label:"$merge",outputStage:!0,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ON_PREM],meta:"stage",version:"4.1.11",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Merges the resulting documents into a collection, optionally overriding existing documents.",comment:"/**\n * into: The target collection.\n * on: Fields to identify.\n * let: Defined variables.\n * whenMatched: Action for matching docs.\n * whenNotMatched: Action for non-matching docs.\n */\n",snippet:"{\n into: '${1:string}',\n on: '${2:string}',\n let: '${3:specification(s)}',\n whenMatched: '${4:string}',\n whenNotMatched: '${5:string}'\n}"},{name:"$merge",value:"$merge",label:"$merge",outputStage:!0,fullScan:!1,firstStage:!1,score:1,env:[r.ADL],meta:"stage",version:"4.0.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Merges the resulting documents into a collection, optionally overriding existing documents.",comment:"/**\n * atlas: Location to write the documents from the aggregation pipeline.\n * on: Fields to identify.\n * let: Defined variables.\n * whenMatched: Action for matching docs.\n * whenNotMatched: Action for non-matching docs.\n */\n",snippet:"{\n into: {\n atlas: {\n clusterName: '${1:atlasClusterName}',\n db: '${2:database}',\n coll: '${3:collection}',\n projectId: '${4:optionalAtlasProjectId}'\n }\n },\n on: '${5:identifier}',\n let: { ${6:specification(s)} },\n whenMatched: '${7:string}',\n whenNotMatched: '${8:string}'\n}"},{name:"$out",value:"$out",label:"$out",outputStage:!0,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ON_PREM],meta:"stage",version:"2.2.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Writes the result of a pipeline to a new or existing collection.",comment:"/**\n * Provide the name of the output database and collection.\n */\n",snippet:"{\n db: '${1:string}',\n coll: '${2:string}',\n /*\n timeseries: {\n timeField: '${3:field}',\n bucketMaxSpanSeconds: '${4:number}',\n granularity: '${5:granularity}'\n }\n */\n}"},{name:"$out",value:"$out",label:"$out",outputStage:!0,fullScan:!1,firstStage:!1,score:1,env:[r.ADL],meta:"stage",version:"4.0.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Writes the result of a pipeline to an Atlas cluster, S3 bucket, or Azure Blob Storage.",comment:"/**\n * Use any one of the following:\n * s3: Parameters to save the data to S3.\n * atlas: Parameters to save the data to Atlas. Example:\n * {\n * atlas: {\n * db: 'string',\n * coll: 'string',\n * projectId: 'string',\n * clusterName: 'string'\n * }\n * },\n * azure: Parameters to save the data to Azure. Example:\n * {\n * azure: {\n * serviceURL: 'string',\n * containerName: 'string',\n * region: 'string,\n * filename: 'string',\n * format: {\n * name: 'string',\n * maxFileSize: 'string',\n * maxRowGroupSize: 'string',\n * columnCompression: 'string'\n * },\n * errorMode: 'string'\n * }\n * }\n */\n",snippet:"{\n s3: {\n bucket: '${1:string}',\n region: '${2:string}',\n filename: '${3:string}',\n format: {\n name: '${4:string}',\n maxFileSize: '${5:bytes}',\n maxRowGroupSize: '${6:string}',\n columnCompression: '${7:string}'\n },\n errorMode: '${8:string}'\n }\n}"},{name:"$project",value:"$project",label:"$project",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"2.2.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Adds new field(s) to a document with a computed value, or reassigns an existing field(s) with a computed value. Unlike $addFields, $project can also remove fields.",comment:"/**\n * specifications: The fields to\n * include or exclude.\n */\n",snippet:"{\n ${1:specification(s)}\n}"},{name:"$rankFusion",value:"$rankFusion",label:"$rankFusion",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS],meta:"stage",version:"8.0.14",apiVersions:[],namespaces:[a.COLLECTION],description:"Combines multiple pipelines using reciprocal rank fusion to create hybrid search results.",comment:'/**\n * input.pipelines: Required. Map from name to input pipeline. Each pipeline must be a Ranked Selection Pipeline operating on the same collection. Minimum of one pipeline.\n * combination.weights: Optional. Map from pipeline name to numbers (non-negative). If unspecified, default weight is 1 for each pipeline.\n * scoreDetails: Optional. Default false. Set to true to include detailed scoring information in {$meta: "scoreDetails"} for debugging and tuning.\n */\n',snippet:"{\n input: {\n pipelines: {\n ${1:searchPipeline}: [\n {$search: {${2:searchStage}}},\n {$limit: ${3:limit}}\n ],\n ${4:vectorPipeline}: [\n {$vectorSearch: {${5:vectorSearchStage}}}\n ]\n }\n },\n combination: {\n weights: {\n ${6:searchPipeline}: ${7:number},\n ${8:vectorPipeline}: ${9:number}\n }\n },\n scoreDetails: ${10:false}\n}"},{name:"$redact",value:"$redact",label:"$redact",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"2.6.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Restricts the content for each document based on information stored in the documents themselves",comment:"/**\n * expression: Any valid expression that\n * evaluates to $$DESCEND, $$PRUNE, or $$KEEP.\n */\n",snippet:"{\n ${1:expression}\n}"},{name:"$replaceRoot",value:"$replaceRoot",label:"$replaceRoot",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"3.4.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Replaces a document with the specified embedded document.",comment:"/**\n * replacementDocument: A document or string.\n */\n",snippet:"{\n newRoot: ${1:replacementDocument}\n}"},{name:"$replaceWith",value:"$replaceWith",label:"$replaceWith",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"4.2.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Replaces a document with the specified embedded document.",comment:"/**\n * replacementDocument: A document or string.\n */\n",snippet:"{\n newWith: ${1:replacementDocument}\n}"},{name:"$sample",value:"$sample",label:"$sample",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"3.2.0",apiVersions:[1],namespaces:[...a.ANY_COLLECTION_NAMESPACE],description:"Randomly selects the specified number of documents from its input.",comment:"/**\n * size: The number of documents to sample.\n */\n",snippet:"{\n size: ${1:number}\n}"},{name:"$scoreFusion",value:"$scoreFusion",label:"$scoreFusion",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS],meta:"stage",version:"8.2.0",apiVersions:[],namespaces:[a.COLLECTION],description:"Combines multiple pipelines using relative score fusion to create hybrid search results.",comment:"/**\n * input.pipelines: Required. Map from name to input pipeline. Each pipeline must be operating on the same collection. Minimum of one pipeline.\n * input.normalization: Required. Normalizes the score to the range 0 to 1 before combining the results. Value can be none, sigmoid or minMaxScaler.\n * combination.weights: Optional. Map from pipeline name to numbers (non-negative). If unspecified, default weight is 1 for each pipeline.\n * combination.method: Optional. Specifies method for combining scores. Value can be avg or expression. Default is avg.\n * combination.expression: Optional. This is the custom expression that is used when combination.method is set to expression.\n * scoreDetails: Optional. Default false. Set to true to include detailed scoring information.\n */\n",snippet:"{\n input: {\n pipelines: {\n ${1:searchPipeline}: [\n {$search: {${2:searchStage}}},\n {$limit: ${3:limit}}\n ],\n ${4:vectorPipeline}: [\n {$vectorSearch: {${5:vectorSearchStage}}}\n ]\n },\n normalization: '${6:none|sigmoid|minMaxScaler}'\n },\n combination: {\n weights: {\n ${7:searchPipeline}: ${8:number},\n ${9:vectorPipeline}: ${10:number}\n },\n method: '${11:avg|expression}',\n expression: '${12:expression}'\n },\n scoreDetails: ${13:false}\n}"},{name:"$search",value:"$search",label:"$search",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS],meta:"stage",version:"4.1.11",apiVersions:[],namespaces:[a.COLLECTION,a.VIEW],description:"Performs a full-text search on the specified field(s).",comment:"/**\n * index: The name of the Search index.\n * text: Analyzed search, with required fields of query and path, the analyzed field(s) to search. Use matchCriteria to match 'any' or 'all' query terms.\n * compound: Combines ops.\n * span: Find in text field regions.\n * exists: Test for presence of a field.\n * near: Find near number or date.\n * range: Find in numeric or date range.\n */\n",snippet:"{\n index: '${1:string}',\n text: {\n query: '${2:string}',\n path: '${3:string}',\n matchCriteria: '${4:any}',\n }\n}"},{name:"$searchMeta",value:"$searchMeta",label:"$searchMeta",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS],meta:"stage",version:"4.4.9",apiVersions:[],namespaces:[a.COLLECTION,a.VIEW],description:"Performs a full-text search on the specified field(s) and gets back only the generated search meta data from a query.",comment:"/**\n * index: The name of the Search index.\n * count: The count of the results.\n * facet: {\n * operator: Analyzed search, with required fields of query and path, can either be replaced with the name of a valid operator.\n * facets: {\n * stringFacet: Narrows search results based on unique string values, with required fields of type and path.\n * numberFacet: Narrows search results by breaking them up into separate ranges of numbers, with required fields of type, path, and boundaries.\n * dateFacet: Narrows search results by breaking them up into separate ranges of dates, with required fields of type, path, and boundaries.\n * }\n * }\n */\n",snippet:"{\n index: ${1:string},\n facet: {\n operator: {\n text: {\n query: ${2:string},\n path: ${3:string}\n }\n },\n facets: {\n ${4:stringFacet}: {\n type: ${5:string},\n path: ${6:string},\n numBuckets: ${7:integer}\n },\n numberFacet: {\n type: 'number',\n path: ${8:string},\n boundaries: [${9:lowerbound}, ${10:upperbound}, ...],\n default: ${11:string}\n }\n }\n }\n}"},{name:"$set",value:"$set",label:"$set",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"4.2.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Adds new fields to documents. $set outputs documents that contain all existing fields from the input documents and newly added fields.",comment:"/**\n * field: The field name\n * expression: The expression.\n */\n",snippet:"{\n ${1:field}: ${2:expression}\n}"},{name:"$setWindowFields",value:"$setWindowFields",label:"$setWindowFields",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"5.0.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Capable of partitioning incoming data, and can apply one or more functions to defined windows within each partition.",comment:"/**\n * partitionBy: partitioning of data.\n * sortBy: fields to sort by.\n * output: {\n * path: {\n * function: The window function to compute over the given window.\n * window: {\n * documents: A number of documents before and after the current document.\n * range: A range of possible values around the value in the current document's sortBy field.\n * unit: Specifies the units for the window bounds.\n * }\n * }\n * }\n */\n",snippet:"{\n partitionBy: ${1:expression},\n sortBy: ${2:sortSpec},\n output: {\n ${3:path}: {\n ${4:function}: ${5:functionArgs},\n window: {\n documents: [${6:lowerbound}, ${7:upperbound}],\n range: [${8:lowerbound}, ${9:upperbound}],\n unit: ${10:string}\n }\n },\n ${11:path2}: ...\n }\n}"},{name:"$skip",value:"$skip",label:"$skip",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"2.2.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Skips a specified number of documents before advancing to the next stage.",comment:"/**\n * Provide the number of documents to skip.\n */\n",snippet:"${1:number}"},{name:"$sort",value:"$sort",label:"$sort",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"2.2.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Reorders the document stream by a specified sort key and direction.",comment:"/**\n * Provide any number of field/order pairs.\n */\n",snippet:"{\n ${1:field1}: ${2:sortOrder}\n}"},{name:"$sortByCount",value:"$sortByCount",label:"$sortByCount",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"3.4.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Groups incoming documents based on the value of a specified expression, then computes the count of documents in each distinct group.",comment:"/**\n * expression: Grouping expression or string.\n */\n",snippet:"{\n ${1:expression}\n}"},{name:"$unionWith",value:"$unionWith",label:"$unionWith",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"4.4.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Perform a union with a pipeline on another collection.",comment:"/**\n * coll: The collection name.\n * pipeline: The pipeline on the other collection.\n */\n",snippet:"{\n coll: '${1:coll}',\n pipeline: [${2:pipeline}]\n}"},{name:"$unset",value:"$unset",label:"$unset",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"4.2.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Excludes fields from the result document.",comment:"/**\n * Provide the field name to exclude.\n * To exclude multiple fields, pass the field names in an array.\n */\n",snippet:"'${1:string}'"},{name:"$unwind",value:"$unwind",label:"$unwind",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"2.2.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Outputs a new document for each element in a specified array. ",comment:"/**\n * path: Path to the array field.\n * includeArrayIndex: Optional name for index.\n * preserveNullAndEmptyArrays: Optional\n * toggle to unwind null and empty values.\n */\n",snippet:"{\n path: ${1:path},\n includeArrayIndex: '${2:string}',\n preserveNullAndEmptyArrays: ${3:boolean}\n}"},{name:"$vectorSearch",value:"$vectorSearch",label:"$vectorSearch",outputStage:!1,fullScan:!1,firstStage:!0,score:1,env:[r.ATLAS],meta:"stage",version:">=6.0.10 <7.0.0 || >=7.0.2",apiVersions:[],namespaces:[a.COLLECTION,a.VIEW],description:"Performs a kNN search on embeddings in the specified field(s)",comment:"/**\n * queryVector: Array of numbers of BSON types `int` or `double` that represent the query vector. The array size must match the number of vector dimensions specified in the index for the field. (Required)\n * path: The field to search. (Required)\n * numCandidates: Number of nearest neighbors to use during the search. You can specify a number higher than the number of documents to return (`limit`) to increase accuracy. (Required)\n * index: Name of the Atlas Search index to use. (Required)\n * limit: Number (of type `int` only) of documents to return in the results. (Required)\n * filter: Any MongoDB Query Language (MQL) match expression that compares an indexed field with a boolean, number (not decimals), or string to use as a prefilter. (Optional)\n * exact: Choose between false for ANN (Approximate Nearest Neighbor) and true for ENN (Exact Nearest Neighbor). Defaults to false. (Optional)\n */\n",snippet:"{\n queryVector: [${1:dimension1}, ${2:dimension2}, ...],\n path: ${3:string},\n numCandidates: ${4:numCandidates},\n index: ${5:string},\n limit: ${6:limit},\n filter: {${7:expression}},\n exact: ${8:boolean}\n}"}];t.STAGE_OPERATORS=s;const i=s.map((e=>e.name));t.STAGE_OPERATOR_NAMES=i;const o=s.filter((e=>e.outputStage));t.OUT_STAGES=o;const l=s.filter((e=>e.fullScan));t.FULL_SCAN_STAGES=l;const c=s.filter((e=>e.firstStage));t.REQUIRED_AS_FIRST_STAGE=c},19789:(e,t,n)=>{const r=n(99597);e.exports=(e,t,n)=>r(e,t,">",n)},19896:(e,t,n)=>{const r=n(40289);e.exports=(e,t,n)=>r(t,e,n)},20038:(e,t,n)=>{const r=n(77203);e.exports=(e,t,n)=>r(e,t,n)<0},20242:(e,t,n)=>{const r=n(59441);e.exports=(e,t)=>{const n=r(e,t);return n&&n.prerelease.length?n.prerelease:null}},20332:(e,t,n)=>{const r=/\s+/g;class a{constructor(e,t){if(t=i(t),e instanceof a)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new a(e.raw,t);if(e instanceof o)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e.trim().replace(r," "),this.set=this.raw.split("||").map((e=>this.parseRange(e.trim()))).filter((e=>e.length)),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter((e=>!g(e[0]))),0===this.set.length)this.set=[e];else if(this.set.length>1)for(const e of this.set)if(1===e.length&&y(e[0])){this.set=[e];break}}this.formatted=void 0}get range(){if(void 0===this.formatted){this.formatted="";for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+="||");const t=this.set[e];for(let e=0;e<t.length;e++)e>0&&(this.formatted+=" "),this.formatted+=t[e].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){const t=((this.options.includePrerelease&&f)|(this.options.loose&&v))+":"+e,n=s.get(t);if(n)return n;const r=this.options.loose,a=r?u[p.HYPHENRANGELOOSE]:u[p.HYPHENRANGE];e=e.replace(a,T(this.options.includePrerelease)),l("hyphen replace",e),e=e.replace(u[p.COMPARATORTRIM],d),l("comparator trim",e),e=e.replace(u[p.TILDETRIM],m),l("tilde trim",e),e=e.replace(u[p.CARETTRIM],h),l("caret trim",e);let i=e.split(" ").map((e=>b(e,this.options))).join(" ").split(/\s+/).map((e=>I(e,this.options)));r&&(i=i.filter((e=>(l("loose invalid filter",e,this.options),!!e.match(u[p.COMPARATORLOOSE]))))),l("range list",i);const c=new Map,y=i.map((e=>new o(e,this.options)));for(const e of y){if(g(e))return[e];c.set(e.value,e)}c.size>1&&c.has("")&&c.delete("");const $=[...c.values()];return s.set(t,$),$}intersects(e,t){if(!(e instanceof a))throw new TypeError("a Range is required");return this.set.some((n=>$(n,t)&&e.set.some((e=>$(e,t)&&n.every((n=>e.every((e=>n.intersects(e,t)))))))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new c(e,this.options)}catch(e){return!1}for(let t=0;t<this.set.length;t++)if(R(this.set[t],e,this.options))return!0;return!1}}e.exports=a;const s=new(n(92721)),i=n(83214),o=n(55141),l=n(29385),c=n(48381),{safeRe:u,t:p,comparatorTrimReplace:d,tildeTrimReplace:m,caretTrimReplace:h}=n(92625),{FLAG_INCLUDE_PRERELEASE:f,FLAG_LOOSE:v}=n(24159),g=e=>"<0.0.0-0"===e.value,y=e=>""===e.value,$=(e,t)=>{let n=!0;const r=e.slice();let a=r.pop();for(;n&&r.length;)n=r.every((e=>a.intersects(e,t))),a=r.pop();return n},b=(e,t)=>(l("comp",e,t),e=_(e,t),l("caret",e),e=S(e,t),l("tildes",e),e=w(e,t),l("xrange",e),e=N(e,t),l("stars",e),e),E=e=>!e||"x"===e.toLowerCase()||"*"===e,S=(e,t)=>e.trim().split(/\s+/).map((e=>A(e,t))).join(" "),A=(e,t)=>{const n=t.loose?u[p.TILDELOOSE]:u[p.TILDE];return e.replace(n,((t,n,r,a,s)=>{let i;return l("tilde",e,t,n,r,a,s),E(n)?i="":E(r)?i=`>=${n}.0.0 <${+n+1}.0.0-0`:E(a)?i=`>=${n}.${r}.0 <${n}.${+r+1}.0-0`:s?(l("replaceTilde pr",s),i=`>=${n}.${r}.${a}-${s} <${n}.${+r+1}.0-0`):i=`>=${n}.${r}.${a} <${n}.${+r+1}.0-0`,l("tilde return",i),i}))},_=(e,t)=>e.trim().split(/\s+/).map((e=>x(e,t))).join(" "),x=(e,t)=>{l("caret",e,t);const n=t.loose?u[p.CARETLOOSE]:u[p.CARET],r=t.includePrerelease?"-0":"";return e.replace(n,((t,n,a,s,i)=>{let o;return l("caret",e,t,n,a,s,i),E(n)?o="":E(a)?o=`>=${n}.0.0${r} <${+n+1}.0.0-0`:E(s)?o="0"===n?`>=${n}.${a}.0${r} <${n}.${+a+1}.0-0`:`>=${n}.${a}.0${r} <${+n+1}.0.0-0`:i?(l("replaceCaret pr",i),o="0"===n?"0"===a?`>=${n}.${a}.${s}-${i} <${n}.${a}.${+s+1}-0`:`>=${n}.${a}.${s}-${i} <${n}.${+a+1}.0-0`:`>=${n}.${a}.${s}-${i} <${+n+1}.0.0-0`):(l("no pr"),o="0"===n?"0"===a?`>=${n}.${a}.${s}${r} <${n}.${a}.${+s+1}-0`:`>=${n}.${a}.${s}${r} <${n}.${+a+1}.0-0`:`>=${n}.${a}.${s} <${+n+1}.0.0-0`),l("caret return",o),o}))},w=(e,t)=>(l("replaceXRanges",e,t),e.split(/\s+/).map((e=>O(e,t))).join(" ")),O=(e,t)=>{e=e.trim();const n=t.loose?u[p.XRANGELOOSE]:u[p.XRANGE];return e.replace(n,((n,r,a,s,i,o)=>{l("xRange",e,n,r,a,s,i,o);const c=E(a),u=c||E(s),p=u||E(i),d=p;return"="===r&&d&&(r=""),o=t.includePrerelease?"-0":"",c?n=">"===r||"<"===r?"<0.0.0-0":"*":r&&d?(u&&(s=0),i=0,">"===r?(r=">=",u?(a=+a+1,s=0,i=0):(s=+s+1,i=0)):"<="===r&&(r="<",u?a=+a+1:s=+s+1),"<"===r&&(o="-0"),n=`${r+a}.${s}.${i}${o}`):u?n=`>=${a}.0.0${o} <${+a+1}.0.0-0`:p&&(n=`>=${a}.${s}.0${o} <${a}.${+s+1}.0-0`),l("xRange return",n),n}))},N=(e,t)=>(l("replaceStars",e,t),e.trim().replace(u[p.STAR],"")),I=(e,t)=>(l("replaceGTE0",e,t),e.trim().replace(u[t.includePrerelease?p.GTE0PRE:p.GTE0],"")),T=e=>(t,n,r,a,s,i,o,l,c,u,p,d)=>`${n=E(r)?"":E(a)?`>=${r}.0.0${e?"-0":""}`:E(s)?`>=${r}.${a}.0${e?"-0":""}`:i?`>=${n}`:`>=${n}${e?"-0":""}`} ${l=E(c)?"":E(u)?`<${+c+1}.0.0-0`:E(p)?`<${c}.${+u+1}.0-0`:d?`<=${c}.${u}.${p}-${d}`:e?`<${c}.${u}.${+p+1}-0`:`<=${l}`}`.trim(),R=(e,t,n)=>{for(let n=0;n<e.length;n++)if(!e[n].test(t))return!1;if(t.prerelease.length&&!n.includePrerelease){for(let n=0;n<e.length;n++)if(l(e[n].semver),e[n].semver!==o.ANY&&e[n].semver.prerelease.length>0){const r=e[n].semver;if(r.major===t.major&&r.minor===t.minor&&r.patch===t.patch)return!0}return!1}return!0}},20360:(e,t,n)=>{const r=/\s+/g;class a{constructor(e,t){if(t=i(t),e instanceof a)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new a(e.raw,t);if(e instanceof o)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e.trim().replace(r," "),this.set=this.raw.split("||").map((e=>this.parseRange(e.trim()))).filter((e=>e.length)),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter((e=>!g(e[0]))),0===this.set.length)this.set=[e];else if(this.set.length>1)for(const e of this.set)if(1===e.length&&y(e[0])){this.set=[e];break}}this.formatted=void 0}get range(){if(void 0===this.formatted){this.formatted="";for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+="||");const t=this.set[e];for(let e=0;e<t.length;e++)e>0&&(this.formatted+=" "),this.formatted+=t[e].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){const t=((this.options.includePrerelease&&f)|(this.options.loose&&v))+":"+e,n=s.get(t);if(n)return n;const r=this.options.loose,a=r?u[p.HYPHENRANGELOOSE]:u[p.HYPHENRANGE];e=e.replace(a,T(this.options.includePrerelease)),l("hyphen replace",e),e=e.replace(u[p.COMPARATORTRIM],d),l("comparator trim",e),e=e.replace(u[p.TILDETRIM],m),l("tilde trim",e),e=e.replace(u[p.CARETTRIM],h),l("caret trim",e);let i=e.split(" ").map((e=>b(e,this.options))).join(" ").split(/\s+/).map((e=>I(e,this.options)));r&&(i=i.filter((e=>(l("loose invalid filter",e,this.options),!!e.match(u[p.COMPARATORLOOSE]))))),l("range list",i);const c=new Map,y=i.map((e=>new o(e,this.options)));for(const e of y){if(g(e))return[e];c.set(e.value,e)}c.size>1&&c.has("")&&c.delete("");const $=[...c.values()];return s.set(t,$),$}intersects(e,t){if(!(e instanceof a))throw new TypeError("a Range is required");return this.set.some((n=>$(n,t)&&e.set.some((e=>$(e,t)&&n.every((n=>e.every((e=>n.intersects(e,t)))))))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new c(e,this.options)}catch(e){return!1}for(let t=0;t<this.set.length;t++)if(R(this.set[t],e,this.options))return!0;return!1}}e.exports=a;const s=new(n(13349)),i=n(40594),o=n(67105),l=n(95869),c=n(88825),{safeRe:u,t:p,comparatorTrimReplace:d,tildeTrimReplace:m,caretTrimReplace:h}=n(36165),{FLAG_INCLUDE_PRERELEASE:f,FLAG_LOOSE:v}=n(64136),g=e=>"<0.0.0-0"===e.value,y=e=>""===e.value,$=(e,t)=>{let n=!0;const r=e.slice();let a=r.pop();for(;n&&r.length;)n=r.every((e=>a.intersects(e,t))),a=r.pop();return n},b=(e,t)=>(l("comp",e,t),e=_(e,t),l("caret",e),e=S(e,t),l("tildes",e),e=w(e,t),l("xrange",e),e=N(e,t),l("stars",e),e),E=e=>!e||"x"===e.toLowerCase()||"*"===e,S=(e,t)=>e.trim().split(/\s+/).map((e=>A(e,t))).join(" "),A=(e,t)=>{const n=t.loose?u[p.TILDELOOSE]:u[p.TILDE];return e.replace(n,((t,n,r,a,s)=>{let i;return l("tilde",e,t,n,r,a,s),E(n)?i="":E(r)?i=`>=${n}.0.0 <${+n+1}.0.0-0`:E(a)?i=`>=${n}.${r}.0 <${n}.${+r+1}.0-0`:s?(l("replaceTilde pr",s),i=`>=${n}.${r}.${a}-${s} <${n}.${+r+1}.0-0`):i=`>=${n}.${r}.${a} <${n}.${+r+1}.0-0`,l("tilde return",i),i}))},_=(e,t)=>e.trim().split(/\s+/).map((e=>x(e,t))).join(" "),x=(e,t)=>{l("caret",e,t);const n=t.loose?u[p.CARETLOOSE]:u[p.CARET],r=t.includePrerelease?"-0":"";return e.replace(n,((t,n,a,s,i)=>{let o;return l("caret",e,t,n,a,s,i),E(n)?o="":E(a)?o=`>=${n}.0.0${r} <${+n+1}.0.0-0`:E(s)?o="0"===n?`>=${n}.${a}.0${r} <${n}.${+a+1}.0-0`:`>=${n}.${a}.0${r} <${+n+1}.0.0-0`:i?(l("replaceCaret pr",i),o="0"===n?"0"===a?`>=${n}.${a}.${s}-${i} <${n}.${a}.${+s+1}-0`:`>=${n}.${a}.${s}-${i} <${n}.${+a+1}.0-0`:`>=${n}.${a}.${s}-${i} <${+n+1}.0.0-0`):(l("no pr"),o="0"===n?"0"===a?`>=${n}.${a}.${s}${r} <${n}.${a}.${+s+1}-0`:`>=${n}.${a}.${s}${r} <${n}.${+a+1}.0-0`:`>=${n}.${a}.${s} <${+n+1}.0.0-0`),l("caret return",o),o}))},w=(e,t)=>(l("replaceXRanges",e,t),e.split(/\s+/).map((e=>O(e,t))).join(" ")),O=(e,t)=>{e=e.trim();const n=t.loose?u[p.XRANGELOOSE]:u[p.XRANGE];return e.replace(n,((n,r,a,s,i,o)=>{l("xRange",e,n,r,a,s,i,o);const c=E(a),u=c||E(s),p=u||E(i),d=p;return"="===r&&d&&(r=""),o=t.includePrerelease?"-0":"",c?n=">"===r||"<"===r?"<0.0.0-0":"*":r&&d?(u&&(s=0),i=0,">"===r?(r=">=",u?(a=+a+1,s=0,i=0):(s=+s+1,i=0)):"<="===r&&(r="<",u?a=+a+1:s=+s+1),"<"===r&&(o="-0"),n=`${r+a}.${s}.${i}${o}`):u?n=`>=${a}.0.0${o} <${+a+1}.0.0-0`:p&&(n=`>=${a}.${s}.0${o} <${a}.${+s+1}.0-0`),l("xRange return",n),n}))},N=(e,t)=>(l("replaceStars",e,t),e.trim().replace(u[p.STAR],"")),I=(e,t)=>(l("replaceGTE0",e,t),e.trim().replace(u[t.includePrerelease?p.GTE0PRE:p.GTE0],"")),T=e=>(t,n,r,a,s,i,o,l,c,u,p,d)=>`${n=E(r)?"":E(a)?`>=${r}.0.0${e?"-0":""}`:E(s)?`>=${r}.${a}.0${e?"-0":""}`:i?`>=${n}`:`>=${n}${e?"-0":""}`} ${l=E(c)?"":E(u)?`<${+c+1}.0.0-0`:E(p)?`<${c}.${+u+1}.0-0`:d?`<=${c}.${u}.${p}-${d}`:e?`<${c}.${u}.${+p+1}-0`:`<=${l}`}`.trim(),R=(e,t,n)=>{for(let n=0;n<e.length;n++)if(!e[n].test(t))return!1;if(t.prerelease.length&&!n.includePrerelease){for(let n=0;n<e.length;n++)if(l(e[n].semver),e[n].semver!==o.ANY&&e[n].semver.prerelease.length>0){const r=e[n].semver;if(r.major===t.major&&r.minor===t.minor&&r.patch===t.patch)return!0}return!1}return!0}},20474:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.EXPRESSION_OPERATORS=void 0,t.EXPRESSION_OPERATORS=[{name:"$abs",value:"$abs",score:1,meta:"expr:arith",version:"3.2.0"},{name:"$accumulator",value:"$accumulator",score:1,meta:"expr:arith",version:"4.4.0"},{name:"$add",value:"$add",score:1,meta:"expr:arith",version:"2.2.0"},{name:"$allElementsTrue",value:"$allElementsTrue",score:1,meta:"expr:set",version:"2.6.0"},{name:"$and",value:"$and",score:1,meta:"expr:bool",version:"2.2.0"},{name:"$anyElementTrue",value:"$anyElementTrue",score:1,meta:"expr:set",version:"2.6.0"},{name:"$arrayElemAt",value:"$arrayElemAt",score:1,meta:"expr:array",version:"3.2.0"},{name:"$arrayToObject",value:"$arrayToObject",score:1,meta:"expr:array",version:"3.4.4"},{name:"$binarySize",value:"$binarySize",score:1,meta:"expr:obj",version:"4.4.0"},{name:"$bsonSize",value:"$bsonSize",score:1,meta:"expr:obj",version:"4.4.0"},{name:"$ceil",value:"$ceil",score:1,meta:"expr:arith",version:"3.2.0"},{name:"$cmp",value:"$cmp",score:1,meta:"expr:comp",version:"2.2.0"},{name:"$concat",value:"$concat",score:1,meta:"expr:string",version:"2.4.0"},{name:"$concatArrays",value:"$concatArrays",score:1,meta:"expr:array",version:"3.2.0"},{name:"$cond",value:"$cond",score:1,meta:"expr:cond",version:"2.6.0"},{name:"$dateAdd",value:"$dateAdd",score:1,meta:"expr:date",version:"5.0.0"},{name:"$dateDiff",value:"$dateDiff",score:1,meta:"expr:date",version:"5.0.0"},{name:"$dateFromParts",value:"$dateFromParts",score:1,meta:"expr:date",version:"3.6.0"},{name:"$dateFromString",value:"$dateFromString",score:1,meta:"expr:date",version:"3.6.0"},{name:"$dateSubtract",value:"$dateSubtract",score:1,meta:"expr:date",version:"5.0.0"},{name:"$dateToParts",value:"$dateToParts",score:1,meta:"expr:date",version:"3.6.0"},{name:"$dateToString",value:"$dateToString",score:1,meta:"expr:date",version:"3.6.0"},{name:"$dateTrunc",value:"$dateTrunc",score:1,meta:"expr:date",version:"5.0.0"},{name:"$dayOfMonth",value:"$dayOfMonth",score:1,meta:"expr:date",version:"2.2.0"},{name:"$dayOfWeek",value:"$dayOfWeek",score:1,meta:"expr:date",version:"2.2.0"},{name:"$dayOfYear",value:"$dayOfYear",score:1,meta:"expr:date",version:"2.2.0"},{name:"$dateToString",value:"$dateToString",score:1,meta:"expr:date",version:"3.0.0"},{name:"$divide",value:"$divide",score:1,meta:"expr:arith",version:"2.2.0"},{name:"$eq",value:"$eq",score:1,meta:"expr:comp",version:"2.2.0"},{name:"$exp",value:"$exp",score:1,meta:"expr:arith",version:"3.2.0"},{name:"$filter",value:"$filter",score:1,meta:"expr:array",version:"3.2.0"},{name:"$first",value:"$first",score:1,meta:"expr:array",version:"4.4.0"},{name:"$floor",value:"$floor",score:1,meta:"expr:arith",version:"3.2.0"},{name:"$function",value:"$function",score:1,meta:"expr:arith",version:"4.4.0"},{name:"$getField",value:"$getField",score:1,meta:"expr:get",version:"5.0.0"},{name:"$gt",value:"$gt",score:1,meta:"expr:comp",version:"2.2.0"},{name:"$gte",value:"$gte",score:1,meta:"expr:comp",version:"2.2.0"},{name:"$hour",value:"$hour",score:1,meta:"expr:date",version:"2.2.0"},{name:"$ifNull",value:"$ifNull",score:1,meta:"expr:cond",version:"2.2.0"},{name:"$in",value:"$in",score:1,meta:"expr:array",version:"3.4.0"},{name:"$indexOfArray",value:"$indexOfArray",score:1,meta:"expr:array",version:"3.4.0"},{name:"$indexOfBytes",value:"$indexOfBytes",score:1,meta:"expr:string",version:"3.4.0"},{name:"$indexOfCP",value:"$indexOfCP",score:1,meta:"expr:string",version:"3.4.0"},{name:"$isArray",value:"$isArray",score:1,meta:"expr:array",version:"3.2.0"},{name:"$isNumber",value:"$isNumber",score:1,meta:"expr:arith",version:"4.4.0"},{name:"$isoDayOfWeek",value:"$isoDayOfWeek",score:1,meta:"expr:date",version:"3.4.0"},{name:"$isoWeek",value:"$isoWeek",score:1,meta:"expr:date",version:"3.4.0"},{name:"$isoWeekYear",value:"$isoWeekYear",score:1,meta:"expr:date",version:"3.4.0"},{name:"$last",value:"$last",score:1,meta:"expr:array",version:"4.4.0"},{name:"$let",value:"$let",score:1,meta:"expr:var",version:"2.6.0"},{name:"$literal",value:"$literal",score:1,meta:"expr:literal",version:"2.6.0"},{name:"$lt",value:"$lt",score:1,meta:"expr:comp",version:"2.2.0"},{name:"$lt",value:"$lte",score:1,meta:"expr:comp",version:"2.2.0"},{name:"$ln",value:"$ln",score:1,meta:"expr:arith",version:"3.2.0"},{name:"$log",value:"$log",score:1,meta:"expr:arith",version:"3.2.0"},{name:"$log10",value:"$log10",score:1,meta:"expr:arith",version:"3.2.0"},{name:"$map",value:"$map",score:1,meta:"expr:array",version:"2.6.0"},{name:"$mergeObjects",value:"$mergeObjects",score:1,meta:"expr:obj",version:"3.6.0"},{name:"$meta",value:"$meta",score:1,meta:"expr:text",version:"2.6.0"},{name:"$millisecond",value:"$millisecond",score:1,meta:"expr:date",version:"2.4.0"},{name:"$minute",value:"$minute",score:1,meta:"expr:date",version:"2.2.0"},{name:"$mod",value:"$mod",score:1,meta:"expr:arith",version:"2.2.0"},{name:"$month",value:"$month",score:1,meta:"expr:date",version:"2.2.0"},{name:"$multiply",value:"$multiply",score:1,meta:"expr:arith",version:"2.2.0"},{name:"$new",value:"$new",score:1,meta:"expr:comp",version:"2.2.0"},{name:"$not",value:"$not",score:1,meta:"expr:bool",version:"2.2.0"},{name:"$objectToArray",value:"$objectToArray",score:1,meta:"expr:array",version:"3.4.4"},{name:"$or",value:"$or",score:1,meta:"expr:bool",version:"2.2.0"},{name:"$pow",value:"$pow",score:1,meta:"expr:arith",version:"3.2.0"},{name:"$range",value:"$range",score:1,meta:"expr:array",version:"3.4.0"},{name:"$reduce",value:"$reduce",score:1,meta:"expr:array",version:"3.4.0"},{name:"$regexFind",value:"$regexFind",score:1,meta:"expr:regex",version:"4.1.11"},{name:"$regexFindAll",value:"$regexFindAll",score:1,meta:"expr:regex",version:"4.1.11"},{name:"$regexMatch",value:"$regexMatch",score:1,meta:"expr:regex",version:"4.1.11"},{name:"$replaceAll",value:"$replaceAll",score:1,meta:"expr:string",version:"4.4.0"},{name:"$replaceOne",value:"$replaceOne",score:1,meta:"expr:string",version:"4.4.0"},{name:"$reverseArray",value:"$reverseArray",score:1,meta:"expr:array",version:"3.4.0"},{name:"$second",value:"$second",score:1,meta:"expr:date",version:"2.2.0"},{name:"$setDifference",value:"$setDifference",score:1,meta:"expr:set",version:"2.6.0"},{name:"$setEquals",value:"$setEquals",score:1,meta:"expr:set",version:"2.6.0"},{name:"$setIntersection",value:"$setIntersection",score:1,meta:"expr:set",version:"2.6.0"},{name:"$setIsSubset",value:"$setIsSubset",score:1,meta:"expr:set",version:"2.6.0"},{name:"$setUnion",value:"$setUnion",score:1,meta:"expr:set",version:"2.6.0"},{name:"$similarityCosine",value:"$similarityCosine",score:1,meta:"expr:arith",version:"8.2.0"},{name:"$similarityDotProduct",value:"$similarityDotProduct",score:1,meta:"expr:arith",version:"8.2.0"},{name:"$similarityEuclidean",value:"$similarityEuclidean",score:1,meta:"expr:arith",version:"8.2.0"},{name:"$size",value:"$size",score:1,meta:"expr:array",version:"2.6.0"},{name:"$slice",value:"$slice",score:1,meta:"expr:array",version:"3.2.0"},{name:"$sortArray",value:"$sortArray",score:1,meta:"expr:array",version:"5.2.0"},{name:"$split",value:"$split",score:1,meta:"expr:string",version:"3.4.0"},{name:"$sqrt",value:"$sqrt",score:1,meta:"expr:arith",version:"3.2.0"},{name:"$strcasecmp",value:"$strcasecmp",score:1,meta:"expr:string",version:"2.2.0"},{name:"$strLenBytes",value:"$strLenBytes",score:1,meta:"expr:string",version:"3.4.0"},{name:"$strLenCP",value:"$strLenCP",score:1,meta:"expr:string",version:"3.4.0"},{name:"$substr",value:"$substr",score:1,meta:"expr:string",version:"2.2.0",deprecated:"3.4.0",replacement:"$substrBytes"},{name:"$substrBytes",value:"$substrBytes",score:1,meta:"expr:string",version:"3.4.0"},{name:"$substrCP",value:"$substrCP",score:1,meta:"expr:string",version:"3.4.0"},{name:"$subtract",value:"$subtract",score:1,meta:"expr:arith",version:"3.2.0"},{name:"$switch",value:"$switch",score:1,meta:"expr:cond",version:"3.4.0"},{name:"$toHashedIndexKey",value:"$toHashedIndexKey",score:1,meta:"expr:arith",version:"4.2.24"},{name:"$toLower",value:"$toLower",score:1,meta:"expr:string",version:"2.2.0"},{name:"$toUpper",value:"$toUpper",score:1,meta:"expr:string",version:"2.2.0"},{name:"$tsSecond",value:"$tsSecond",score:1,meta:"expr:date",version:"5.1.0"},{name:"$tsIncrement",value:"$tsIncrement",score:1,meta:"expr:date",version:"5.1.0"},{name:"$trunc",value:"$trunc",score:1,meta:"expr:arith",version:"3.2.0"},{name:"$type",value:"$type",score:1,meta:"expr:type",version:"3.4.0"},{name:"$week",value:"$week",score:1,meta:"expr:date",version:"2.2.0"},{name:"$year",value:"$year",score:1,meta:"expr:date",version:"2.2.0"},{name:"$zip",value:"$zip",score:1,meta:"expr:array",version:"3.4.0"},{name:"$bitAnd",value:"$bitAnd",score:1,meta:"expr:bit",version:"7.0.0"},{name:"$bitOr",value:"$bitOr",score:1,meta:"expr:bit",version:"7.0.0"},{name:"$bitXor",value:"$bitXor",score:1,meta:"expr:bit",version:"7.0.0"},{name:"$bitNot",value:"$bitNot",score:1,meta:"expr:bit",version:"7.0.0"}]},20903:(e,t,n)=>{const r=n(83586);e.exports=(e,t)=>{const n=r(e,t);return n?n.version:null}},20930:e=>{e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},21022:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ANY_NAMESPACE=t.ANY_COLLECTION_NAMESPACE=t.TIME_SERIES=t.VIEW=t.COLLECTION=t.DATABASE=void 0,t.DATABASE="db";const n="coll";t.COLLECTION=n;const r="view";t.VIEW=r;const a="timeseries";t.TIME_SERIES=a;const s=[n,r,a];t.ANY_COLLECTION_NAMESPACE=s;const i=["db",...s];t.ANY_NAMESPACE=i},21148:(e,t,n)=>{const r=n(50363),a=n(60501);e.exports=(e,t,n)=>{const s=[];let i=null,o=null;const l=e.sort(((e,t)=>a(e,t,n)));for(const e of l)r(e,t,n)?(o=e,i||(i=e)):(o&&s.push([i,o]),o=null,i=null);i&&s.push([i,null]);const c=[];for(const[e,t]of s)e===t?c.push(e):t||e!==l[0]?t?e===l[0]?c.push(`<=${t}`):c.push(`${e} - ${t}`):c.push(`>=${e}`):c.push("*");const u=c.join(" || "),p="string"==typeof t.raw?t.raw:String(t);return u.length<p.length?u:t}},21212:e=>{e.exports=class{constructor(){this.max=1e3,this.map=new Map}get(e){const t=this.map.get(e);return void 0===t?void 0:(this.map.delete(e),this.map.set(e,t),t)}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&void 0!==t){if(this.map.size>=this.max){const e=this.map.keys().next().value;this.delete(e)}this.map.set(e,t)}return this}}},21410:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ALL_CONSTANTS=void 0,t.createConstantFilter=f,t.wrapField=function(e,t=!1){return t||!function(e){if(/[.\s"'()[\];={}:]/.test(e))return!1;try{return new Function(`"use strict";let _ = { ${e}: 0 };`),!0}catch{return!1}}(e)?`"${e.replace(/["\\]/g,"\\$&")}"`:e},t.getFilteredCompletions=function(e={},n=t.ALL_CONSTANTS){const{serverVersion:r=m,fields:a=[],meta:s,stage:i}=e,o=f({serverVersion:r,meta:s,stage:i});return n.concat(a.flatMap((e=>{const{value:t,description:n}=function(e){return"string"==typeof e?{value:e}:{value:e.name,description:e.description}}(e);return[{value:t,meta:"field:identifier",version:"0.0.0",description:n},{value:`$${t}`,meta:"field:reference",version:"0.0.0",description:n}]}))).filter((e=>o(e)))};const r=n(75982),a=n(63131),s=n(93766),i=n(51626),o=n(64900),l=n(85070),c=n(48080),u=n(51098),p=n(79984),d=n(35593);t.ALL_CONSTANTS=[...a.ACCUMULATORS,...i.BSON_TYPES,...s.BSON_TYPE_ALIASES,...o.CONVERSION_OPERATORS,...l.EXPRESSION_OPERATORS,...c.JSON_SCHEMA,...u.QUERY_OPERATORS,...p.STAGE_OPERATORS,...d.SYSTEM_VARIABLES];const m="999.999.999";function h(e,t){return void 0===e||void 0===t||(e=Array.isArray(e)?e:[e]).some((e=>t.includes(e)))}function f({meta:e,serverVersion:t=m,stage:n={}}={}){const a=/^(?<version>\d+\.\d+\.\d+)/.exec(t)?.groups?.version??m;return({version:t,meta:s,env:i,namespaces:o,apiVersions:l})=>function(e,t){const n=/^\d+\.\d+\.\d+$/.test(t);return(0,r.satisfies)(e,n?`>=${t}`:t)}(a,t)&&h(n.env,i)&&h(n.namespace,o)&&h(n.apiVersion,l)&&(!e||function(e,t){const n=t.split(":");return e.some((e=>{const t=e.split(":");return t.length===n.length&&t.every(((e,t)=>"*"===e||e===n[t]))}))}(e,s))}},21482:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.VALIDATION_TEMPLATE=void 0,t.VALIDATION_TEMPLATE='/**\n * This is a starter template for a schema validation rule for a collection.\n * More information on schema validation rules can be found at:\n * https://www.mongodb.com/docs/manual/core/schema-validation/\n */\n{\n $jsonSchema: {\n title: "Library.books",\n bsonType: "object",\n required: ["fieldname1", "fieldname2"],\n properties: {\n fieldname1: {\n bsonType: "string",\n description: "Fieldname1 must be a string",\n },\n fieldname2: {\n bsonType: "int",\n description: "Fieldname2 must be an integer",\n },\n arrayFieldName: {\n bsonType: "array",\n items: {\n bsonType: "string"\n },\n description: "arrayFieldName must be an array of strings"\n },\n }\n }\n}'},21665:(e,t,n)=>{var r=n(29520);e.exports=r},22038:(e,t,n)=>{const r=n(87866);e.exports=(e,t,n)=>r(e,t,">",n)},22156:(e,t,n)=>{const r=n(59441);e.exports=(e,t)=>{const n=r(e,t);return n?n.version:null}},22849:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ACCUMULATORS=void 0,t.ACCUMULATORS=[{name:"$accumulator",value:"$accumulator",score:1,meta:"accumulator",version:"4.4.0"},{name:"$addToSet",value:"$addToSet",score:1,meta:"accumulator",version:"2.2.0"},{name:"$avg",value:"$avg",score:1,meta:"accumulator",version:"2.2.0",projectVersion:"3.2.0"},{name:"$bottom",value:"$bottom",score:1,meta:"accumulator:bottom-n",version:"5.2.0"},{name:"$bottomN",value:"$bottomN",score:1,meta:"accumulator:bottom-n",version:"5.2.0"},{name:"$covariancePop",value:"$covariancePop",score:1,meta:"accumulator:window",version:"5.0.0"},{name:"$covarianceSamp",value:"$covarianceSamp",score:1,meta:"accumulator:window",version:"5.0.0"},{name:"$count",value:"$count",score:1,meta:"accumulator",version:"5.0.0"},{name:"$derivative",value:"$derivative",score:1,meta:"accumulator:window",version:"5.0.0"},{name:"$denseRank",value:"$denseRank",score:1,meta:"accumulator:window",version:"5.0.0"},{name:"$documentNumber",value:"$documentNumber",score:1,meta:"accumulator:window",version:"5.0.0"},{name:"$expMovingAvg",value:"$expMovingAvg",score:1,meta:"accumulator:window",version:"5.0.0"},{name:"$first",value:"$first",score:1,meta:"accumulator",version:"2.2.0"},{name:"$firstN",value:"$firstN",score:1,meta:"accumulator",version:"5.1.0"},{name:"$integral",value:"$integral",score:1,meta:"accumulator:window",version:"5.0.0"},{name:"$last",value:"$last",score:1,meta:"accumulator",version:"2.2.0"},{name:"$lastN",value:"$lastN",score:1,meta:"accumulator",version:"5.2.0"},{name:"$max",value:"$max",score:1,meta:"accumulator",version:"2.2.0",projectVersion:"3.2.0"},{name:"$maxN",value:"$maxN",score:1,meta:"accumulator",version:"5.2.0"},{name:"$median",value:"$median",score:1,meta:"accumulator",version:"7.0.0"},{name:"$min",value:"$min",score:1,meta:"accumulator",version:"2.2.0",projectVersion:"3.2.0"},{name:"$minN",value:"$minN",score:1,meta:"accumulator",version:"5.2.0"},{name:"$percentile",value:"$percentile",score:1,meta:"accumulator",version:"7.0.0"},{name:"$push",value:"$push",score:1,meta:"accumulator",version:"2.2.0"},{name:"$rank",value:"$rank",score:1,meta:"accumulator:window",version:"5.0.0"},{name:"$stdDevPop",value:"$stdDevPop",score:1,meta:"accumulator",version:"3.2.0",projectVersion:"3.2.0"},{name:"$stdDevSamp",value:"$stdDevSamp",score:1,meta:"accumulator",version:"3.2.0",projectVersion:"3.2.0"},{name:"$shift",value:"$shift",score:1,meta:"accumulator:window",version:"5.0.0"},{name:"$sum",value:"$sum",score:1,meta:"accumulator",version:"2.2.0",projectVersion:"3.2.0"},{name:"$top",value:"$top",score:1,meta:"accumulator:top-n",version:"5.2.0"},{name:"$topN",value:"$topN",score:1,meta:"accumulator:top-n",version:"5.2.0"},{name:"$locf",value:"$locf",score:1,meta:"accumulator:window",version:"5.3.0"},{name:"$linearFill",value:"$linearFill",score:1,meta:"accumulator:window",version:"5.3.0"}]},23252:(e,t,n)=>{const r=n(88825),a=n(20360),s=n(51269);e.exports=(e,t)=>{e=new a(e,t);let n=new r("0.0.0");if(e.test(n))return n;if(n=new r("0.0.0-0"),e.test(n))return n;n=null;for(let t=0;t<e.set.length;++t){const a=e.set[t];let i=null;a.forEach((e=>{const t=new r(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":i&&!s(t,i)||(i=t);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${e.operator}`)}})),!i||n&&!s(n,i)||(n=i)}return n&&e.test(n)?n:null}},24078:(e,t,n)=>{const r=n(32674);e.exports=(e,t,n)=>r(e,t,n)<=0},24087:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BSON_TYPES=void 0,t.BSON_TYPES=[{name:"Code",value:"Code",label:"Code",score:1,meta:"bson",version:"0.0.0",description:"BSON Code type",snippet:"Code('${1:code}')"},{name:"ObjectId",value:"ObjectId",label:"ObjectId",score:1,meta:"bson",version:"0.0.0",description:"BSON ObjectId type",snippet:"ObjectId('${1:id}')"},{name:"Binary",value:"Binary",label:"Binary",score:1,meta:"bson",version:"0.0.0",description:"BSON Binary type",snippet:"Binary('${1:data}', '${2:subType}')"},{name:"DBRef",value:"DBRef",label:"DBRef",score:1,meta:"bson",version:"0.0.0",description:"BSON DBRef type",snippet:"DBRef('${1:ns}', '${2:oid}')"},{name:"Timestamp",value:"Timestamp",label:"Timestamp",score:1,meta:"bson",version:"0.0.0",description:"BSON Timestamp type",snippet:"Timestamp(${1:low}, ${2:high})"},{name:"NumberInt",value:"NumberInt",label:"NumberInt",score:1,meta:"bson",version:"0.0.0",description:"BSON 32 bit Integer type",snippet:"NumberInt(${1:value})"},{name:"NumberLong",value:"NumberLong",label:"NumberLong",score:1,meta:"bson",version:"0.0.0",description:"BSON 64 but Integer type",snippet:"NumberLong(${1:value})"},{name:"NumberDecimal",value:"NumberDecimal",label:"NumberDecimal",score:1,meta:"bson",version:"3.4.0",description:"BSON Decimal128 type",snippet:"NumberDecimal('${1:value}')"},{name:"MaxKey",value:"MaxKey",label:"MaxKey",score:1,meta:"bson",version:"0.0.0",description:"BSON MaxKey type",snippet:"MaxKey()"},{name:"MinKey",value:"MinKey",label:"MinKey",score:1,meta:"bson",version:"0.0.0",description:"BSON MinKey type",snippet:"MinKey()"},{name:"ISODate",value:"ISODate",label:"ISODate",score:1,meta:"bson",version:"0.0.0",description:"BSON Date type",snippet:"ISODate('${1:date}')"},{name:"RegExp",value:"RegExp",label:"RegExp",score:1,meta:"bson",version:"0.0.0",description:"BSON Regex type",snippet:"RegExp('${1:source}', '${2:opts}')"}]},24159:e=>{const t=Number.MAX_SAFE_INTEGER||9007199254740991;e.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:t,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}},24320:(e,t,n)=>{const r=n(17914);e.exports=(e,t)=>{const n=r(e.trim().replace(/^[=v]+/,""),t);return n?n.version:null}},24472:(e,t,n)=>{const r=n(66283),a=n(58387),{ANY:s}=a,i=n(38366),o=n(50363),l=n(61607),c=n(91152),u=n(80829),p=n(15844);e.exports=(e,t,n,d)=>{let m,h,f,v,g;switch(e=new r(e,d),t=new i(t,d),n){case">":m=l,h=u,f=c,v=">",g=">=";break;case"<":m=c,h=p,f=l,v="<",g="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(o(e,t,d))return!1;for(let n=0;n<t.set.length;++n){const r=t.set[n];let i=null,o=null;if(r.forEach((e=>{e.semver===s&&(e=new a(">=0.0.0")),i=i||e,o=o||e,m(e.semver,i.semver,d)?i=e:f(e.semver,o.semver,d)&&(o=e)})),i.operator===v||i.operator===g)return!1;if((!o.operator||o.operator===v)&&h(e,o.semver))return!1;if(o.operator===g&&f(e,o.semver))return!1}return!0}},24482:(e,t,n)=>{const r=n(34219);e.exports=(e,t)=>{const n=r(e,t);return n?n.version:null}},24625:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var a=Object.getOwnPropertyDescriptor(t,n);a&&!("get"in a?!t.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,a)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),a=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.wrapField=t.getFilteredCompletions=void 0,a(n(98582),t),a(n(66529),t),a(n(24087),t),a(n(47501),t),a(n(91030),t),a(n(96651),t),a(n(54395),t),a(n(21022),t),a(n(11233),t),a(n(40727),t),a(n(82660),t),a(n(58505),t);var s=n(27699);Object.defineProperty(t,"getFilteredCompletions",{enumerable:!0,get:function(){return s.getFilteredCompletions}}),Object.defineProperty(t,"wrapField",{enumerable:!0,get:function(){return s.wrapField}}),a(n(91597),t),a(n(43959),t)},24975:(e,t,n)=>{const r=n(25583);e.exports=(e,t,n)=>r(t,e,n)},25157:(e,t,n)=>{var r,a=n(98437),s=n(17642);function i(e){if(e!==e.toLowerCase()&&e!==e.toUpperCase()||(e=e.toLowerCase()),-1===e.indexOf("-")&&-1===e.indexOf("_"))return e;{let t="",n=!1;const r=e.match(/^-+/);for(let a=r?r[0].length:0;a<e.length;a++){let r=e.charAt(a);n&&(n=!1,r=r.toUpperCase()),0===a||"-"!==r&&"_"!==r?"-"!==r&&"_"!==r&&(t+=r):n=!0}return t}}function o(e,t){const n=e.toLowerCase();t=t||"-";let r="";for(let a=0;a<e.length;a++){const s=n.charAt(a),i=e.charAt(a);r+=s!==i&&a>0?`${t}${n.charAt(a)}`:i}return r}function l(e){return null!=e&&("number"==typeof e||!!/^0x[0-9a-f]+$/i.test(e)||!/^0[^.]/.test(e)&&/^[-]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(e))}let c;function u(e){return void 0!==e?e+1:1}function p(e){return"__proto__"===e?"___proto___":e}!function(e){e.BOOLEAN="boolean",e.STRING="string",e.NUMBER="number",e.ARRAY="array"}(r||(r={}));var d,m,h,f=n(36374),v=n(65994).e;const g=v&&v.env&&v.env.YARGS_MIN_NODE_VERSION?Number(v.env.YARGS_MIN_NODE_VERSION):12,y=null!==(m=null===(d=null==v?void 0:v.versions)||void 0===d?void 0:d.node)&&void 0!==m?m:null===(h=null==v?void 0:v.version)||void 0===h?void 0:h.slice(1);if(y&&Number(y.match(/^([^.]+)/)[1])<g)throw Error(`yargs parser supports a minimum Node.js version of ${g}. Read our version support policy: https://github.com/yargs/yargs-parser#supported-nodejs-versions`);const $=v?v.env:{},b=new class{constructor(e){c=e}parse(e,t){const n=Object.assign({alias:void 0,array:void 0,boolean:void 0,config:void 0,configObjects:void 0,configuration:void 0,coerce:void 0,count:void 0,default:void 0,envPrefix:void 0,narg:void 0,normalize:void 0,string:void 0,number:void 0,__:void 0,key:void 0},t),a=function(e){if(Array.isArray(e))return e.map((e=>"string"!=typeof e?e+"":e));e=e.trim();let t=0,n=null,r=null,a=null;const s=[];for(let i=0;i<e.length;i++)n=r,r=e.charAt(i)," "!==r||a?(r===a?a=null:"'"!==r&&'"'!==r||a||(a=r),s[t]||(s[t]=""),s[t]+=r):" "!==n&&t++;return s}(e),s="string"==typeof e,d=function(e){const t=[],n=Object.create(null);let r=!0;for(Object.keys(e).forEach((function(n){t.push([].concat(e[n],n))}));r;){r=!1;for(let e=0;e<t.length;e++)for(let n=e+1;n<t.length;n++)if(t[e].filter((function(e){return-1!==t[n].indexOf(e)})).length){t[e]=t[e].concat(t[n]),t.splice(n,1),r=!0;break}}return t.forEach((function(e){const t=(e=e.filter((function(e,t,n){return n.indexOf(e)===t}))).pop();void 0!==t&&"string"==typeof t&&(n[t]=e)})),n}(Object.assign(Object.create(null),n.alias)),m=Object.assign({"boolean-negation":!0,"camel-case-expansion":!0,"combine-arrays":!1,"dot-notation":!0,"duplicate-arguments-array":!0,"flatten-duplicate-arrays":!0,"greedy-arrays":!0,"halt-at-non-option":!1,"nargs-eats-options":!1,"negation-prefix":"no-","parse-numbers":!0,"parse-positional-numbers":!0,"populate--":!1,"set-placeholder-key":!1,"short-option-groups":!0,"strip-aliased":!1,"strip-dashed":!1,"unknown-options-as-args":!1},n.configuration),h=Object.assign(Object.create(null),n.default),f=n.configObjects||[],v=n.envPrefix,g=m["populate--"],y=g?"--":"_",$=Object.create(null),b=Object.create(null),E=n.__||c.format,S={aliases:Object.create(null),arrays:Object.create(null),bools:Object.create(null),strings:Object.create(null),numbers:Object.create(null),counts:Object.create(null),normalize:Object.create(null),configs:Object.create(null),nargs:Object.create(null),coercions:Object.create(null),keys:[]},A=/^-([0-9]+(\.[0-9]+)?|\.[0-9]+)$/,_=new RegExp("^--"+m["negation-prefix"]+"(.+)");[].concat(n.array||[]).filter(Boolean).forEach((function(e){const t="object"==typeof e?e.key:e,n=Object.keys(e).map((function(e){return{boolean:"bools",string:"strings",number:"numbers"}[e]})).filter(Boolean).pop();n&&(S[n][t]=!0),S.arrays[t]=!0,S.keys.push(t)})),[].concat(n.boolean||[]).filter(Boolean).forEach((function(e){S.bools[e]=!0,S.keys.push(e)})),[].concat(n.string||[]).filter(Boolean).forEach((function(e){S.strings[e]=!0,S.keys.push(e)})),[].concat(n.number||[]).filter(Boolean).forEach((function(e){S.numbers[e]=!0,S.keys.push(e)})),[].concat(n.count||[]).filter(Boolean).forEach((function(e){S.counts[e]=!0,S.keys.push(e)})),[].concat(n.normalize||[]).filter(Boolean).forEach((function(e){S.normalize[e]=!0,S.keys.push(e)})),"object"==typeof n.narg&&Object.entries(n.narg).forEach((([e,t])=>{"number"==typeof t&&(S.nargs[e]=t,S.keys.push(e))})),"object"==typeof n.coerce&&Object.entries(n.coerce).forEach((([e,t])=>{"function"==typeof t&&(S.coercions[e]=t,S.keys.push(e))})),void 0!==n.config&&(Array.isArray(n.config)||"string"==typeof n.config?[].concat(n.config).filter(Boolean).forEach((function(e){S.configs[e]=!0})):"object"==typeof n.config&&Object.entries(n.config).forEach((([e,t])=>{"boolean"!=typeof t&&"function"!=typeof t||(S.configs[e]=t)}))),function(...e){e.forEach((function(e){Object.keys(e||{}).forEach((function(e){S.aliases[e]||(S.aliases[e]=[].concat(d[e]||[]),S.aliases[e].concat(e).forEach((function(t){if(/-/.test(t)&&m["camel-case-expansion"]){const n=i(t);n!==e&&-1===S.aliases[e].indexOf(n)&&(S.aliases[e].push(n),$[n]=!0)}})),S.aliases[e].concat(e).forEach((function(t){if(t.length>1&&/[A-Z]/.test(t)&&m["camel-case-expansion"]){const n=o(t,"-");n!==e&&-1===S.aliases[e].indexOf(n)&&(S.aliases[e].push(n),$[n]=!0)}})),S.aliases[e].forEach((function(t){S.aliases[t]=[e].concat(S.aliases[e].filter((function(e){return t!==e})))})))}))}))}(n.key,d,n.default,S.arrays),Object.keys(h).forEach((function(e){(S.aliases[e]||[]).forEach((function(t){h[t]=h[e]}))}));let x=null;Object.keys(S.counts).find((e=>q(e,S.arrays)?(x=Error(E("Invalid configuration: %s, opts.count excludes opts.array.",e)),!0):!!q(e,S.nargs)&&(x=Error(E("Invalid configuration: %s, opts.count excludes opts.narg.",e)),!0)));let w=[];const O=Object.assign(Object.create(null),{_:[]}),N={};for(let e=0;e<a.length;e++){const t=a[e],n=t.replace(/^-{3,}/,"---");let r,s,i,o,l,c;if("--"!==t&&/^-/.test(t)&&U(t))I(t);else{if(n.match(/^---+(=|$)/)){I(t);continue}if(t.match(/^--.+=/)||!m["short-option-groups"]&&t.match(/^-.+=/))o=t.match(/^--?([^=]+)=([\s\S]*)$/),null!==o&&Array.isArray(o)&&o.length>=3&&(q(o[1],S.arrays)?e=R(e,o[1],a,o[2]):!1!==q(o[1],S.nargs)?e=T(e,o[1],a,o[2]):C(o[1],o[2],!0));else if(t.match(_)&&m["boolean-negation"])o=t.match(_),null!==o&&Array.isArray(o)&&o.length>=2&&(s=o[1],C(s,!!q(s,S.arrays)&&[!1]));else if(t.match(/^--.+/)||!m["short-option-groups"]&&t.match(/^-[^-]+/))o=t.match(/^--?(.+)/),null!==o&&Array.isArray(o)&&o.length>=2&&(s=o[1],q(s,S.arrays)?e=R(e,s,a):!1!==q(s,S.nargs)?e=T(e,s,a):(l=a[e+1],void 0===l||l.match(/^-/)&&!l.match(A)||q(s,S.bools)||q(s,S.counts)?/^(true|false)$/.test(l)?(C(s,l),e++):C(s,Y(s)):(C(s,l),e++)));else if(t.match(/^-.\..+=/))o=t.match(/^-([^=]+)=([\s\S]*)$/),null!==o&&Array.isArray(o)&&o.length>=3&&C(o[1],o[2]);else if(t.match(/^-.\..+/)&&!t.match(A))l=a[e+1],o=t.match(/^-(.\..+)/),null!==o&&Array.isArray(o)&&o.length>=2&&(s=o[1],void 0===l||l.match(/^-/)||q(s,S.bools)||q(s,S.counts)?C(s,Y(s)):(C(s,l),e++));else if(t.match(/^-[^-]+/)&&!t.match(A)){i=t.slice(1,-1).split(""),r=!1;for(let n=0;n<i.length;n++){if(l=t.slice(n+2),i[n+1]&&"="===i[n+1]){c=t.slice(n+3),s=i[n],q(s,S.arrays)?e=R(e,s,a,c):!1!==q(s,S.nargs)?e=T(e,s,a,c):C(s,c),r=!0;break}if("-"!==l){if(/[A-Za-z]/.test(i[n])&&/^-?\d+(\.\d*)?(e-?\d+)?$/.test(l)&&!1===q(l,S.bools)){C(i[n],l),r=!0;break}if(i[n+1]&&i[n+1].match(/\W/)){C(i[n],l),r=!0;break}C(i[n],Y(i[n]))}else C(i[n],l)}s=t.slice(-1)[0],r||"-"===s||(q(s,S.arrays)?e=R(e,s,a):!1!==q(s,S.nargs)?e=T(e,s,a):(l=a[e+1],void 0===l||/^(-|--)[^-]/.test(l)&&!l.match(A)||q(s,S.bools)||q(s,S.counts)?/^(true|false)$/.test(l)?(C(s,l),e++):C(s,Y(s)):(C(s,l),e++)))}else if(t.match(/^-[0-9]$/)&&t.match(A)&&q(t.slice(1),S.bools))s=t.slice(1),C(s,Y(s));else{if("--"===t){w=a.slice(e+1);break}if(m["halt-at-non-option"]){w=a.slice(e);break}I(t)}}}function I(e){const t=P("_",e);"string"!=typeof t&&"number"!=typeof t||O._.push(t)}function T(e,t,n,r){let a,s=q(t,S.nargs);if(s="number"!=typeof s||isNaN(s)?1:s,0===s)return z(r)||(x=Error(E("Argument unexpected for: %s",t))),C(t,Y(t)),e;let i=z(r)?0:1;if(m["nargs-eats-options"])n.length-(e+1)+i<s&&(x=Error(E("Not enough arguments following: %s",t))),i=s;else{for(a=e+1;a<n.length&&(!n[a].match(/^-[^0-9]/)||n[a].match(A)||U(n[a]));a++)i++;i<s&&(x=Error(E("Not enough arguments following: %s",t)))}let o=Math.min(i,s);for(!z(r)&&o>0&&(C(t,r),o--),a=e+1;a<o+e+1;a++)C(t,n[a]);return e+o}function R(e,t,n,r){let a=[],i=r||n[e+1];const o=q(t,S.nargs);if(q(t,S.bools)&&!/^(true|false)$/.test(i))a.push(!0);else if(z(i)||z(r)&&/^-/.test(i)&&!A.test(i)&&!U(i)){if(void 0!==h[t]){const e=h[t];a=Array.isArray(e)?e:[e]}}else{z(r)||a.push(L(t,r,!0));for(let r=e+1;r<n.length&&!(!m["greedy-arrays"]&&a.length>0||o&&"number"==typeof o&&a.length>=o)&&(i=n[r],!/^-/.test(i)||A.test(i)||U(i));r++)e=r,a.push(L(t,i,s))}return"number"==typeof o&&(o&&a.length<o||isNaN(o)&&0===a.length)&&(x=Error(E("Not enough arguments following: %s",t))),C(t,a),e}function C(e,t,n=s){if(/-/.test(e)&&m["camel-case-expansion"]){const t=e.split(".").map((function(e){return i(e)})).join(".");k(e,t)}const r=L(e,t,n),a=e.split(".");V(O,a,r),S.aliases[e]&&S.aliases[e].forEach((function(e){const t=e.split(".");V(O,t,r)})),a.length>1&&m["dot-notation"]&&(S.aliases[a[0]]||[]).forEach((function(t){let n=t.split(".");const s=[].concat(a);s.shift(),n=n.concat(s),(S.aliases[e]||[]).includes(n.join("."))||V(O,n,r)})),q(e,S.normalize)&&!q(e,S.arrays)&&[e].concat(S.aliases[e]||[]).forEach((function(e){Object.defineProperty(N,e,{enumerable:!0,get:()=>t,set(e){t="string"==typeof e?c.normalize(e):e}})}))}function k(e,t){S.aliases[e]&&S.aliases[e].length||(S.aliases[e]=[t],$[t]=!0),S.aliases[t]&&S.aliases[t].length||k(t,e)}function L(e,t,n){n&&(t=function(e){return"string"!=typeof e||"'"!==e[0]&&'"'!==e[0]||e[e.length-1]!==e[0]?e:e.substring(1,e.length-1)}(t)),(q(e,S.bools)||q(e,S.counts))&&"string"==typeof t&&(t="true"===t);let r=Array.isArray(t)?t.map((function(t){return P(e,t)})):P(e,t);return q(e,S.counts)&&(z(r)||"boolean"==typeof r)&&(r=u()),q(e,S.normalize)&&q(e,S.arrays)&&(r=Array.isArray(t)?t.map((e=>c.normalize(e))):c.normalize(t)),r}function P(e,t){return m["parse-positional-numbers"]||"_"!==e?(q(e,S.strings)||q(e,S.bools)||Array.isArray(t)||(l(t)&&m["parse-numbers"]&&Number.isSafeInteger(Math.floor(parseFloat(`${t}`)))||!z(t)&&q(e,S.numbers))&&(t=Number(t)),t):t}function M(e,t){Object.keys(e).forEach((function(n){const r=e[n],a=t?t+"."+n:n;"object"==typeof r&&null!==r&&!Array.isArray(r)&&m["dot-notation"]?M(r,a):(!F(O,a.split("."))||q(a,S.arrays)&&m["combine-arrays"])&&C(a,r)}))}function j(e,t){if(void 0===v)return;const n="string"==typeof v?v:"",r=c.env();Object.keys(r).forEach((function(a){if(""===n||0===a.lastIndexOf(n,0)){const s=a.split("__").map((function(e,t){return 0===t&&(e=e.substring(n.length)),i(e)}));(t&&S.configs[s.join(".")]||!t)&&!F(e,s)&&C(s.join("."),r[a])}}))}function D(e,t,n,r=!1){Object.keys(n).forEach((function(a){F(e,a.split("."))||(V(e,a.split("."),n[a]),r&&(b[a]=!0),(t[a]||[]).forEach((function(t){F(e,t.split("."))||V(e,t.split("."),n[a])})))}))}function F(e,t){let n=e;m["dot-notation"]||(t=[t.join(".")]),t.slice(0,-1).forEach((function(e){n=n[e]||{}}));const r=t[t.length-1];return"object"==typeof n&&r in n}function V(e,t,n){let r=e;m["dot-notation"]||(t=[t.join(".")]),t.slice(0,-1).forEach((function(e){e=p(e),"object"==typeof r&&void 0===r[e]&&(r[e]={}),"object"!=typeof r[e]||Array.isArray(r[e])?(Array.isArray(r[e])?r[e].push({}):r[e]=[r[e],{}],r=r[e][r[e].length-1]):r=r[e]}));const a=p(t[t.length-1]),s=q(t.join("."),S.arrays),i=Array.isArray(n);let o=m["duplicate-arguments-array"];!o&&q(a,S.nargs)&&(o=!0,(!z(r[a])&&1===S.nargs[a]||Array.isArray(r[a])&&r[a].length===S.nargs[a])&&(r[a]=void 0)),n===u()?r[a]=u(r[a]):Array.isArray(r[a])?o&&s&&i?r[a]=m["flatten-duplicate-arrays"]?r[a].concat(n):(Array.isArray(r[a][0])?r[a]:[r[a]]).concat([n]):o||Boolean(s)!==Boolean(i)?r[a]=r[a].concat([n]):r[a]=n:void 0===r[a]&&s?r[a]=i?n:[n]:!o||void 0===r[a]||q(a,S.counts)||q(a,S.bools)?r[a]=n:r[a]=[r[a],n]}function q(e,t){const n=[].concat(S.aliases[e]||[],e),r=Object.keys(t),a=n.find((e=>r.includes(e)));return!!a&&t[a]}function B(e){const t=Object.keys(S);return[].concat(t.map((e=>S[e]))).some((function(t){return Array.isArray(t)?t.includes(e):t[e]}))}function U(e){return m["unknown-options-as-args"]&&function(e){return!(e=e.replace(/^-{3,}/,"--")).match(A)&&(!function(e){if(e.match(A)||!e.match(/^-[^-]+/))return!1;let t,n=!0;const r=e.slice(1).split("");for(let a=0;a<r.length;a++){if(t=e.slice(a+2),!B(r[a])){n=!1;break}if(r[a+1]&&"="===r[a+1]||"-"===t||/[A-Za-z]/.test(r[a])&&/^-?\d+(\.\d*)?(e-?\d+)?$/.test(t)||r[a+1]&&r[a+1].match(/\W/))break}return n}(e)&&!function(e,...t){return[].concat(...t).some((function(t){const n=e.match(t);return n&&B(n[1])}))}(e,/^-+([^=]+?)=[\s\S]*$/,_,/^-+([^=]+?)$/,/^-+([^=]+?)-$/,/^-+([^=]+?\d+)$/,/^-+([^=]+?)\W+.*$/))}(e)}function Y(e){return q(e,S.bools)||q(e,S.counts)||!(`${e}`in h)?(t=function(e){let t=r.BOOLEAN;return q(e,S.strings)?t=r.STRING:q(e,S.numbers)?t=r.NUMBER:q(e,S.bools)?t=r.BOOLEAN:q(e,S.arrays)&&(t=r.ARRAY),t}(e),{[r.BOOLEAN]:!0,[r.STRING]:"",[r.NUMBER]:void 0,[r.ARRAY]:[]}[t]):h[e];var t}function z(e){return void 0===e}return j(O,!0),j(O,!1),function(e){const t=Object.create(null);D(t,S.aliases,h),Object.keys(S.configs).forEach((function(n){const r=e[n]||t[n];if(r)try{let e=null;const t=c.resolve(c.cwd(),r),a=S.configs[n];if("function"==typeof a){try{e=a(t)}catch(t){e=t}if(e instanceof Error)return void(x=e)}else e=c.require(t);M(e)}catch(t){"PermissionDenied"===t.name?x=t:e[n]&&(x=Error(E("Invalid JSON config file: %s",r)))}}))}(O),void 0!==f&&f.forEach((function(e){M(e)})),D(O,S.aliases,h,!0),function(e){let t;const n=new Set;Object.keys(e).forEach((function(r){if(!n.has(r)&&(t=q(r,S.coercions),"function"==typeof t))try{const a=P(r,t(e[r]));[].concat(S.aliases[r]||[],r).forEach((t=>{n.add(t),e[t]=a}))}catch(e){x=e}}))}(O),m["set-placeholder-key"]&&function(e){S.keys.forEach((t=>{~t.indexOf(".")||void 0===e[t]&&(e[t]=void 0)}))}(O),Object.keys(S.counts).forEach((function(e){F(O,e.split("."))||C(e,0)})),g&&w.length&&(O[y]=[]),w.forEach((function(e){O[y].push(e)})),m["camel-case-expansion"]&&m["strip-dashed"]&&Object.keys(O).filter((e=>"--"!==e&&e.includes("-"))).forEach((e=>{delete O[e]})),m["strip-aliased"]&&[].concat(...Object.keys(d).map((e=>d[e]))).forEach((e=>{m["camel-case-expansion"]&&e.includes("-")&&delete O[e.split(".").map((e=>i(e))).join(".")],delete O[e]})),{aliases:Object.assign({},S.aliases),argv:Object.assign(N,O),configuration:m,defaulted:Object.assign({},b),error:x,newAliases:Object.assign({},$)}}}({cwd:v.cwd,env:()=>$,format:a.format,normalize:s.normalize,resolve:s.resolve,require:e=>{if("undefined"!=typeof require)return require(e);if(e.match(/\.json$/))return JSON.parse((0,f.readFileSync)(e,"utf8"));throw Error("only .json config files are supported in ESM")}}),E=function(e,t){return b.parse(e.slice(),t).argv};E.detailed=function(e,t){return b.parse(e.slice(),t)},E.camelCase=i,E.decamelize=o,E.looksLikeNumber=l},25522:(e,t,n)=>{const{MAX_SAFE_COMPONENT_LENGTH:r,MAX_SAFE_BUILD_LENGTH:a,MAX_LENGTH:s}=n(66078),i=n(49764),o=(t=e.exports={}).re=[],l=t.safeRe=[],c=t.src=[],u=t.safeSrc=[],p=t.t={};let d=0;const m="[a-zA-Z0-9-]",h=[["\\s",1],["\\d",s],[m,a]],f=(e,t,n)=>{const r=(e=>{for(const[t,n]of h)e=e.split(`${t}*`).join(`${t}{0,${n}}`).split(`${t}+`).join(`${t}{1,${n}}`);return e})(t),a=d++;i(e,a,t),p[e]=a,c[a]=t,u[a]=r,o[a]=new RegExp(t,n?"g":void 0),l[a]=new RegExp(r,n?"g":void 0)};f("NUMERICIDENTIFIER","0|[1-9]\\d*"),f("NUMERICIDENTIFIERLOOSE","\\d+"),f("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${m}*`),f("MAINVERSION",`(${c[p.NUMERICIDENTIFIER]})\\.(${c[p.NUMERICIDENTIFIER]})\\.(${c[p.NUMERICIDENTIFIER]})`),f("MAINVERSIONLOOSE",`(${c[p.NUMERICIDENTIFIERLOOSE]})\\.(${c[p.NUMERICIDENTIFIERLOOSE]})\\.(${c[p.NUMERICIDENTIFIERLOOSE]})`),f("PRERELEASEIDENTIFIER",`(?:${c[p.NONNUMERICIDENTIFIER]}|${c[p.NUMERICIDENTIFIER]})`),f("PRERELEASEIDENTIFIERLOOSE",`(?:${c[p.NONNUMERICIDENTIFIER]}|${c[p.NUMERICIDENTIFIERLOOSE]})`),f("PRERELEASE",`(?:-(${c[p.PRERELEASEIDENTIFIER]}(?:\\.${c[p.PRERELEASEIDENTIFIER]})*))`),f("PRERELEASELOOSE",`(?:-?(${c[p.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${c[p.PRERELEASEIDENTIFIERLOOSE]})*))`),f("BUILDIDENTIFIER",`${m}+`),f("BUILD",`(?:\\+(${c[p.BUILDIDENTIFIER]}(?:\\.${c[p.BUILDIDENTIFIER]})*))`),f("FULLPLAIN",`v?${c[p.MAINVERSION]}${c[p.PRERELEASE]}?${c[p.BUILD]}?`),f("FULL",`^${c[p.FULLPLAIN]}$`),f("LOOSEPLAIN",`[v=\\s]*${c[p.MAINVERSIONLOOSE]}${c[p.PRERELEASELOOSE]}?${c[p.BUILD]}?`),f("LOOSE",`^${c[p.LOOSEPLAIN]}$`),f("GTLT","((?:<|>)?=?)"),f("XRANGEIDENTIFIERLOOSE",`${c[p.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),f("XRANGEIDENTIFIER",`${c[p.NUMERICIDENTIFIER]}|x|X|\\*`),f("XRANGEPLAIN",`[v=\\s]*(${c[p.XRANGEIDENTIFIER]})(?:\\.(${c[p.XRANGEIDENTIFIER]})(?:\\.(${c[p.XRANGEIDENTIFIER]})(?:${c[p.PRERELEASE]})?${c[p.BUILD]}?)?)?`),f("XRANGEPLAINLOOSE",`[v=\\s]*(${c[p.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[p.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[p.XRANGEIDENTIFIERLOOSE]})(?:${c[p.PRERELEASELOOSE]})?${c[p.BUILD]}?)?)?`),f("XRANGE",`^${c[p.GTLT]}\\s*${c[p.XRANGEPLAIN]}$`),f("XRANGELOOSE",`^${c[p.GTLT]}\\s*${c[p.XRANGEPLAINLOOSE]}$`),f("COERCEPLAIN",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?`),f("COERCE",`${c[p.COERCEPLAIN]}(?:$|[^\\d])`),f("COERCEFULL",c[p.COERCEPLAIN]+`(?:${c[p.PRERELEASE]})?`+`(?:${c[p.BUILD]})?(?:$|[^\\d])`),f("COERCERTL",c[p.COERCE],!0),f("COERCERTLFULL",c[p.COERCEFULL],!0),f("LONETILDE","(?:~>?)"),f("TILDETRIM",`(\\s*)${c[p.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",f("TILDE",`^${c[p.LONETILDE]}${c[p.XRANGEPLAIN]}$`),f("TILDELOOSE",`^${c[p.LONETILDE]}${c[p.XRANGEPLAINLOOSE]}$`),f("LONECARET","(?:\\^)"),f("CARETTRIM",`(\\s*)${c[p.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",f("CARET",`^${c[p.LONECARET]}${c[p.XRANGEPLAIN]}$`),f("CARETLOOSE",`^${c[p.LONECARET]}${c[p.XRANGEPLAINLOOSE]}$`),f("COMPARATORLOOSE",`^${c[p.GTLT]}\\s*(${c[p.LOOSEPLAIN]})$|^$`),f("COMPARATOR",`^${c[p.GTLT]}\\s*(${c[p.FULLPLAIN]})$|^$`),f("COMPARATORTRIM",`(\\s*)${c[p.GTLT]}\\s*(${c[p.LOOSEPLAIN]}|${c[p.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",f("HYPHENRANGE",`^\\s*(${c[p.XRANGEPLAIN]})\\s+-\\s+(${c[p.XRANGEPLAIN]})\\s*$`),f("HYPHENRANGELOOSE",`^\\s*(${c[p.XRANGEPLAINLOOSE]})\\s+-\\s+(${c[p.XRANGEPLAINLOOSE]})\\s*$`),f("STAR","(<|>)?=?\\s*\\*"),f("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),f("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")},25530:(e,t,n)=>{n.d(t,{MU:()=>s,Nw:()=>a,rd:()=>i});var r=n(84591);r.ACCUMULATORS,r.ADL,r.ANY_COLLECTION_NAMESPACE,r.ANY_NAMESPACE,r.ATLAS;const a=r.ATLAS_SEARCH_TEMPLATES,s=r.ATLAS_VECTOR_SEARCH_TEMPLATE,i=(r.BSON_TYPES,r.BSON_TYPE_ALIASES,r.COLLECTION,r.CONVERSION_OPERATORS,r.DATABASE,r.ENVS,r.EXPRESSION_OPERATORS,r.FULL_SCAN_STAGES,r.JSON_SCHEMA,r.ON_PREM,r.OUT_STAGES,r.QUERY_OPERATORS,r.REQUIRED_AS_FIRST_STAGE,r.STAGE_OPERATORS,r.STAGE_OPERATOR_NAMES,r.SYSTEM_VARIABLES,r.TIME_SERIES,r.VALIDATION_TEMPLATE,r.VIEW,r.VIEW_PIPELINE_UTILS);r.getFilteredCompletions,r.wrapField},25546:(e,t,n)=>{const r=n(66283),a=n(38366),s=n(61607);e.exports=(e,t)=>{e=new a(e,t);let n=new r("0.0.0");if(e.test(n))return n;if(n=new r("0.0.0-0"),e.test(n))return n;n=null;for(let t=0;t<e.set.length;++t){const a=e.set[t];let i=null;a.forEach((e=>{const t=new r(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":i&&!s(t,i)||(i=t);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${e.operator}`)}})),!i||n&&!s(n,i)||(n=i)}return n&&e.test(n)?n:null}},25583:(e,t,n)=>{const r=n(88825);e.exports=(e,t,n)=>new r(e,n).compare(new r(t,n))},25812:(e,t,n)=>{const r=n(77203);e.exports=(e,t,n)=>0!==r(e,t,n)},26620:(e,t,n)=>{const r=n(25583);e.exports=(e,t,n)=>0===r(e,t,n)},27195:(e,t,n)=>{var r=n(40811),a=Object.prototype.hasOwnProperty,s=Object.prototype.toString;e.exports=new r("tag:yaml.org,2002:omap",{kind:"sequence",resolve:function(e){if(null===e)return!0;var t,n,r,i,o,l=[],c=e;for(t=0,n=c.length;t<n;t+=1){if(r=c[t],o=!1,"[object Object]"!==s.call(r))return!1;for(i in r)if(a.call(r,i)){if(o)return!1;o=!0}if(!o)return!1;if(-1!==l.indexOf(i))return!1;l.push(i)}return!0},construct:function(e){return null!==e?e:[]}})},27225:(e,t,n)=>{const r=n(44455);e.exports=(e,t)=>e.sort(((e,n)=>r(e,n,t)))},27699:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ALL_CONSTANTS=void 0,t.createConstantFilter=f,t.wrapField=function(e,t=!1){return t||!function(e){if(/[.\s"'()[\];={}:]/.test(e))return!1;try{return new Function(`"use strict";let _ = { ${e}: 0 };`),!0}catch{return!1}}(e)?`"${e.replace(/["\\]/g,"\\$&")}"`:e},t.getFilteredCompletions=function(e={},n=t.ALL_CONSTANTS){const{serverVersion:r=m,fields:a=[],meta:s,stage:i}=e,o=f({serverVersion:r,meta:s,stage:i});return n.concat(a.flatMap((e=>{const{value:t,description:n}=function(e){return"string"==typeof e?{value:e}:{value:e.name,description:e.description}}(e);return[{value:t,meta:"field:identifier",version:"0.0.0",description:n},{value:`$${t}`,meta:"field:reference",version:"0.0.0",description:n}]}))).filter((e=>o(e)))};const r=n(88769),a=n(98582),s=n(66529),i=n(24087),o=n(47501),l=n(96651),c=n(54395),u=n(11233),p=n(40727),d=n(82660);t.ALL_CONSTANTS=[...a.ACCUMULATORS,...i.BSON_TYPES,...s.BSON_TYPE_ALIASES,...o.CONVERSION_OPERATORS,...l.EXPRESSION_OPERATORS,...c.JSON_SCHEMA,...u.QUERY_OPERATORS,...p.STAGE_OPERATORS,...d.SYSTEM_VARIABLES];const m="999.999.999";function h(e,t){return void 0===e||void 0===t||(e=Array.isArray(e)?e:[e]).some((e=>t.includes(e)))}function f({meta:e,serverVersion:t=m,stage:n={}}={}){const a=/^(?<version>\d+\.\d+\.\d+)/.exec(t)?.groups?.version??m;return({version:t,meta:s,env:i,namespaces:o,apiVersions:l})=>function(e,t){const n=/^\d+\.\d+\.\d+$/.test(t);return(0,r.satisfies)(e,n?`>=${t}`:t)}(a,t)&&h(n.env,i)&&h(n.namespace,o)&&h(n.apiVersion,l)&&(!e||function(e,t){const n=t.split(":");return e.some((e=>{const t=e.split(":");return t.length===n.length&&t.every(((e,t)=>"*"===e||e===n[t]))}))}(e,s))}},27995:(e,t,n)=>{const r=n(20360);e.exports=(e,t,n)=>(e=new r(e,n),t=new r(t,n),e.intersects(t,n))},28131:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.QUERY_OPERATORS=void 0,t.QUERY_OPERATORS=[{name:"$all",value:"$all",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$and",value:"$and",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$bitsAllClear",value:"$bitsAllClear",score:1,meta:"query",version:"3.2.0",geospatial:!1},{name:"$bitsAllSet",value:"$bitsAllSet",score:1,meta:"query",version:"3.2.0",geospatial:!1},{name:"$bitsAnyClear",value:"$bitsAnyClear",score:1,meta:"query",version:"3.2.0",geospatial:!1},{name:"$bitsAnySet",value:"$bitsAnySet",score:1,meta:"query",version:"3.2.0",geospatial:!1},{name:"$comment",value:"$comment",score:1,meta:"query",version:"3.2.0",geospatial:!1},{name:"$elemMatch",value:"$elemMatch",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$eq",value:"$eq",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$exists",value:"$exists",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$expr",value:"$expr",score:1,meta:"query",version:"3.6.0",geospatial:!1},{name:"$geoIntersects",value:"$geoIntersects",score:1,meta:"query",version:"2.2.0",geospatial:!0},{name:"$geoWithin",value:"$geoWithin",score:1,meta:"query",version:"2.2.0",geospatial:!0},{name:"$gt",value:"$gt",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$gte",value:"$gte",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$in",value:"$in",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$jsonSchema",value:"$jsonSchema",score:1,meta:"query",version:"3.6.0",geospatial:!1},{name:"$lt",value:"$lt",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$lte",value:"$lte",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$mod",value:"$mod",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$ne",value:"$ne",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$near",value:"$near",score:1,meta:"query",version:"2.2.0",geospatial:!0},{name:"$nearSphere",value:"$nearSphere",score:1,meta:"query",version:"2.2.0",geospatial:!0},{name:"$nin",value:"$nin",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$not",value:"$not",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$nor",value:"$nor",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$or",value:"$or",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$regex",value:"$regex",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$size",value:"$size",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$slice",value:"$slice",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$text",value:"$text",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$type",value:"$type",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$where",value:"$where",score:1,meta:"query",version:"2.2.0",geospatial:!1}]},28141:(e,t,n)=>{const r=n(32674);e.exports=(e,t,n)=>r(e,t,n)<0},28553:(e,t,n)=>{const r=n(67338),a=n(70692);e.exports=(e,t,n)=>{const s=[];let i=null,o=null;const l=e.sort(((e,t)=>a(e,t,n)));for(const e of l)r(e,t,n)?(o=e,i||(i=e)):(o&&s.push([i,o]),o=null,i=null);i&&s.push([i,null]);const c=[];for(const[e,t]of s)e===t?c.push(e):t||e!==l[0]?t?e===l[0]?c.push(`<=${t}`):c.push(`${e} - ${t}`):c.push(`>=${e}`):c.push("*");const u=c.join(" || "),p="string"==typeof t.raw?t.raw:String(t);return u.length<p.length?u:t}},28742:e=>{var t={};e.exports=function(e,n){var r=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},28830:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CommaAndColonSeparatedRecord=t.ConnectionString=t.redactConnectionString=void 0;const r=n(9606),a=n(32901);Object.defineProperty(t,"redactConnectionString",{enumerable:!0,get:function(){return a.redactConnectionString}});const s="__this_is_a_placeholder__",i=/^(?<protocol>[^/]+):\/\/(?:(?<username>[^:@]*)(?::(?<password>[^@]*))?@)?(?<hosts>(?!:)[^/?@]*)(?<rest>.*)/;class o extends Map{delete(e){return super.delete(this._normalizeKey(e))}get(e){return super.get(this._normalizeKey(e))}has(e){return super.has(this._normalizeKey(e))}set(e,t){return super.set(this._normalizeKey(e),t)}_normalizeKey(e){e=`${e}`;for(const t of this.keys())if(t.toLowerCase()===e.toLowerCase()){e=t;break}return e}}class l extends r.URL{}class c extends Error{get name(){return"MongoParseError"}}class u extends l{constructor(e,t={}){var n;const{looseValidation:r}=t;if(!r&&!(a=e).startsWith("mongodb://")&&!a.startsWith("mongodb+srv://"))throw new c('Invalid scheme, expected connection string to start with "mongodb://" or "mongodb+srv://"');var a;const l=e.match(i);if(!l)throw new c(`Invalid connection string "${e}"`);const{protocol:p,username:d,password:m,hosts:h,rest:f}=null!==(n=l.groups)&&void 0!==n?n:{};if(!r){if(!p||!h)throw new c(`Protocol and host list are required in "${e}"`);try{decodeURIComponent(null!=d?d:""),decodeURIComponent(null!=m?m:"")}catch(e){throw new c(e.message)}const t=/[:/?#[\]@]/gi;if(null==d?void 0:d.match(t))throw new c(`Username contains unescaped characters ${d}`);if(!d||!m){const t=e.replace(`${p}://`,"");if(t.startsWith("@")||t.startsWith(":"))throw new c("URI contained empty userinfo section")}if(null==m?void 0:m.match(t))throw new c("Password contains unescaped characters")}let v="";"string"==typeof d&&(v+=d),"string"==typeof m&&(v+=`:${m}`),v&&(v+="@");try{super(`${p.toLowerCase()}://${v}${s}${f}`)}catch(n){throw r&&new u(e,{...t,looseValidation:!1}),"string"==typeof n.message&&(n.message=n.message.replace(s,h)),n}if(this._hosts=h.split(","),!r){if(this.isSRV&&1!==this.hosts.length)throw new c("mongodb+srv URI cannot have multiple service names");if(this.isSRV&&this.hosts.some((e=>e.includes(":"))))throw new c("mongodb+srv URI cannot have port number")}var g;this.pathname||(this.pathname="/"),Object.setPrototypeOf(this.searchParams,(g=this.searchParams.constructor,class extends g{append(e,t){return super.append(this._normalizeKey(e),t)}delete(e){return super.delete(this._normalizeKey(e))}get(e){return super.get(this._normalizeKey(e))}getAll(e){return super.getAll(this._normalizeKey(e))}has(e){return super.has(this._normalizeKey(e))}set(e,t){return super.set(this._normalizeKey(e),t)}keys(){return super.keys()}values(){return super.values()}entries(){return super.entries()}[Symbol.iterator](){return super[Symbol.iterator]()}_normalizeKey(e){return o.prototype._normalizeKey.call(this,e)}}).prototype)}get host(){return s}set host(e){throw new Error("No single host for connection string")}get hostname(){return s}set hostname(e){throw new Error("No single host for connection string")}get port(){return""}set port(e){throw new Error("No single host for connection string")}get href(){return this.toString()}set href(e){throw new Error("Cannot set href for connection strings")}get isSRV(){return this.protocol.includes("srv")}get hosts(){return this._hosts}set hosts(e){this._hosts=e}toString(){return super.toString().replace(s,this.hosts.join(","))}clone(){return new u(this.toString(),{looseValidation:!0})}redact(e){return(0,a.redactValidConnectionString)(this,e)}typedSearchParams(){return this.searchParams}[Symbol.for("nodejs.util.inspect.custom")](){const{href:e,origin:t,protocol:n,username:r,password:a,hosts:s,pathname:i,search:o,searchParams:l,hash:c}=this;return{href:e,origin:t,protocol:n,username:r,password:a,hosts:s,pathname:i,search:o,searchParams:l,hash:c}}}t.ConnectionString=u,t.CommaAndColonSeparatedRecord=class extends o{constructor(e){super();for(const t of(null!=e?e:"").split(",")){if(!t)continue;const e=t.indexOf(":");-1===e?this.set(t,""):this.set(t.slice(0,e),t.slice(e+1))}}toString(){return[...this].map((e=>e.join(":"))).join(",")}},t.default=u},28892:e=>{const t=Number.MAX_SAFE_INTEGER||9007199254740991;e.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:t,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}},28968:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.QUERY_OPERATORS=void 0,t.QUERY_OPERATORS=[{name:"$all",value:"$all",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$and",value:"$and",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$bitsAllClear",value:"$bitsAllClear",score:1,meta:"query",version:"3.2.0",geospatial:!1},{name:"$bitsAllSet",value:"$bitsAllSet",score:1,meta:"query",version:"3.2.0",geospatial:!1},{name:"$bitsAnyClear",value:"$bitsAnyClear",score:1,meta:"query",version:"3.2.0",geospatial:!1},{name:"$bitsAnySet",value:"$bitsAnySet",score:1,meta:"query",version:"3.2.0",geospatial:!1},{name:"$comment",value:"$comment",score:1,meta:"query",version:"3.2.0",geospatial:!1},{name:"$elemMatch",value:"$elemMatch",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$eq",value:"$eq",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$exists",value:"$exists",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$expr",value:"$expr",score:1,meta:"query",version:"3.6.0",geospatial:!1},{name:"$geoIntersects",value:"$geoIntersects",score:1,meta:"query",version:"2.2.0",geospatial:!0},{name:"$geoWithin",value:"$geoWithin",score:1,meta:"query",version:"2.2.0",geospatial:!0},{name:"$gt",value:"$gt",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$gte",value:"$gte",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$in",value:"$in",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$jsonSchema",value:"$jsonSchema",score:1,meta:"query",version:"3.6.0",geospatial:!1},{name:"$lt",value:"$lt",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$lte",value:"$lte",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$mod",value:"$mod",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$ne",value:"$ne",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$near",value:"$near",score:1,meta:"query",version:"2.2.0",geospatial:!0},{name:"$nearSphere",value:"$nearSphere",score:1,meta:"query",version:"2.2.0",geospatial:!0},{name:"$nin",value:"$nin",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$not",value:"$not",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$nor",value:"$nor",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$or",value:"$or",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$regex",value:"$regex",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$size",value:"$size",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$slice",value:"$slice",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$text",value:"$text",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$type",value:"$type",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$where",value:"$where",score:1,meta:"query",version:"2.2.0",geospatial:!1}]},29014:(e,t,n)=>{n.d(t,{Zt:()=>a});var r=n(24625);r.ACCUMULATORS,r.ADL,r.ANY_COLLECTION_NAMESPACE,r.ANY_NAMESPACE,r.ATLAS,r.ATLAS_SEARCH_TEMPLATES,r.ATLAS_VECTOR_SEARCH_TEMPLATE,r.BSON_TYPES,r.BSON_TYPE_ALIASES,r.COLLECTION,r.CONVERSION_OPERATORS,r.DATABASE,r.ENVS,r.EXPRESSION_OPERATORS,r.FULL_SCAN_STAGES,r.JSON_SCHEMA,r.ON_PREM,r.OUT_STAGES,r.QUERY_OPERATORS,r.REQUIRED_AS_FIRST_STAGE,r.STAGE_OPERATORS,r.STAGE_OPERATOR_NAMES,r.SYSTEM_VARIABLES,r.TIME_SERIES,r.VALIDATION_TEMPLATE,r.VIEW,r.VIEW_PIPELINE_UTILS,r.getFilteredCompletions;const a=r.wrapField},29087:(e,t,n)=>{const r=n(50066),a=n(72857),s=n(18106);e.exports=(e,t)=>{e=new a(e,t);let n=new r("0.0.0");if(e.test(n))return n;if(n=new r("0.0.0-0"),e.test(n))return n;n=null;for(let t=0;t<e.set.length;++t){const a=e.set[t];let i=null;a.forEach((e=>{const t=new r(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":i&&!s(t,i)||(i=t);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${e.operator}`)}})),!i||n&&!s(n,i)||(n=i)}return n&&e.test(n)?n:null}},29299:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var a=Object.getOwnPropertyDescriptor(t,n);a&&!("get"in a?!t.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,a)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),a=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.wrapField=t.getFilteredCompletions=void 0,a(n(3012),t),a(n(91871),t),a(n(77973),t),a(n(80003),t),a(n(1276),t),a(n(30797),t),a(n(17497),t),a(n(39560),t),a(n(60679),t),a(n(99625),t),a(n(71174),t),a(n(17555),t);var s=n(8117);Object.defineProperty(t,"getFilteredCompletions",{enumerable:!0,get:function(){return s.getFilteredCompletions}}),Object.defineProperty(t,"wrapField",{enumerable:!0,get:function(){return s.wrapField}}),a(n(33907),t),a(n(95153),t)},29385:(e,t,n)=>{var r=n(65994).e;const a="object"==typeof r&&r.env&&r.env.NODE_DEBUG&&/\bsemver\b/i.test(r.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};e.exports=a},29478:(e,t,n)=>{const r=n(88825);e.exports=(e,t)=>new r(e,t).patch},29520:(e,t,n)=>{var r=n(69316),a=n(76462);function s(e){return function(){throw new Error("Function "+e+" is deprecated and cannot be used.")}}e.exports.Type=n(40811),e.exports.Schema=n(54420),e.exports.FAILSAFE_SCHEMA=n(91714),e.exports.JSON_SCHEMA=n(15037),e.exports.CORE_SCHEMA=n(6340),e.exports.DEFAULT_SAFE_SCHEMA=n(18184),e.exports.DEFAULT_FULL_SCHEMA=n(57116),e.exports.load=r.load,e.exports.loadAll=r.loadAll,e.exports.safeLoad=r.safeLoad,e.exports.safeLoadAll=r.safeLoadAll,e.exports.dump=a.dump,e.exports.safeDump=a.safeDump,e.exports.YAMLException=n(4414),e.exports.MINIMAL_SCHEMA=n(91714),e.exports.SAFE_SCHEMA=n(18184),e.exports.DEFAULT_SCHEMA=n(57116),e.exports.scan=s("scan"),e.exports.parse=s("parse"),e.exports.compose=s("compose"),e.exports.addConstructor=s("addConstructor")},30044:(e,t,n)=>{const r=n(34219);e.exports=(e,t)=>{const n=r(e,t);return n&&n.prerelease.length?n.prerelease:null}},30403:(e,t,n)=>{const r=n(83586);e.exports=(e,t)=>{const n=r(e,t);return n&&n.prerelease.length?n.prerelease:null}},30452:(e,t,n)=>{const r=n(9350);e.exports=(e,t)=>new r(e,t).minor},30629:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SYSTEM_VARIABLES=void 0,t.SYSTEM_VARIABLES=[{name:"$$NOW",value:"$$NOW",score:1,meta:"variable:system",version:"4.2.0",description:"A variable that returns the current datetime value. NOW returns the same value for all members of the deployment and remains the same throughout all stages of the aggregation pipeline."},{name:"$$CLUSTER_TIME",value:"$$CLUSTER_TIME",score:1,meta:"variable:system",version:"4.2.0",description:"A variable that returns the current timestamp value. CLUSTER_TIME is only available on replica sets and sharded clusters. CLUSTER_TIME returns the same value for all members of the deployment and remains the same throughout all stages of the pipeline."},{name:"$$ROOT",value:"$$ROOT",score:1,meta:"variable:system",version:"2.4.0",description:"References the root document, i.e. the top-level document, currently being processed in the aggregation pipeline stage."},{name:"$$CURRENT",value:"$$CURRENT",score:1,meta:"variable:system",version:"2.4.0",description:"References the start of the field path being processed in the aggregation pipeline stage. Unless documented otherwise, all stages start with CURRENT the same as ROOT. CURRENT is modifiable. However, since `$<field>` is equivalent to `$$CURRENT.<field>`, rebinding CURRENT changes the meaning of `$` accesses."},{name:"$$REMOVE",value:"$$REMOVE",score:1,meta:"variable:system",version:"3.6.0",description:"A variable which evaluates to the missing value. Allows for the conditional exclusion of fields. In a `$project`, a field set to the variable REMOVE is excluded from the output."},{name:"$$DESCEND",value:"$$DESCEND",score:1,meta:"variable:system",version:"3.0.0",description:"One of the allowed results of a `$redact` expression."},{name:"$$PRUNE",value:"$$PRUNE",score:1,meta:"variable:system",version:"3.0.0",description:"One of the allowed results of a `$redact` expression."},{name:"$$KEEP",value:"$$KEEP",score:1,meta:"variable:system",version:"3.0.0",description:"One of the allowed results of a `$redact` expression."},{name:"$$SEARCH_META",value:"$$SEARCH_META",score:1,meta:"variable:system",version:"5.0.0",description:"A variable that stores the metadata results of an Atlas Search query. In all supported aggregation pipeline stages, a field set to the variable SEARCH_META returns the metadata results for the query. For an example of its usage, see Atlas Search facet and count."},{name:"$$USER_ROLES",value:"$$USER_ROLES",score:1,meta:"variable:system",version:"7.0.0",description:"A variable that stores the role names of the authenticated user running the command."}]},30797:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.EXPRESSION_OPERATORS=void 0,t.EXPRESSION_OPERATORS=[{name:"$abs",value:"$abs",score:1,meta:"expr:arith",version:"3.2.0"},{name:"$accumulator",value:"$accumulator",score:1,meta:"expr:arith",version:"4.4.0"},{name:"$add",value:"$add",score:1,meta:"expr:arith",version:"2.2.0"},{name:"$allElementsTrue",value:"$allElementsTrue",score:1,meta:"expr:set",version:"2.6.0"},{name:"$and",value:"$and",score:1,meta:"expr:bool",version:"2.2.0"},{name:"$anyElementTrue",value:"$anyElementTrue",score:1,meta:"expr:set",version:"2.6.0"},{name:"$arrayElemAt",value:"$arrayElemAt",score:1,meta:"expr:array",version:"3.2.0"},{name:"$arrayToObject",value:"$arrayToObject",score:1,meta:"expr:array",version:"3.4.4"},{name:"$binarySize",value:"$binarySize",score:1,meta:"expr:obj",version:"4.4.0"},{name:"$bsonSize",value:"$bsonSize",score:1,meta:"expr:obj",version:"4.4.0"},{name:"$ceil",value:"$ceil",score:1,meta:"expr:arith",version:"3.2.0"},{name:"$cmp",value:"$cmp",score:1,meta:"expr:comp",version:"2.2.0"},{name:"$concat",value:"$concat",score:1,meta:"expr:string",version:"2.4.0"},{name:"$concatArrays",value:"$concatArrays",score:1,meta:"expr:array",version:"3.2.0"},{name:"$cond",value:"$cond",score:1,meta:"expr:cond",version:"2.6.0"},{name:"$dateAdd",value:"$dateAdd",score:1,meta:"expr:date",version:"5.0.0"},{name:"$dateDiff",value:"$dateDiff",score:1,meta:"expr:date",version:"5.0.0"},{name:"$dateFromParts",value:"$dateFromParts",score:1,meta:"expr:date",version:"3.6.0"},{name:"$dateFromString",value:"$dateFromString",score:1,meta:"expr:date",version:"3.6.0"},{name:"$dateSubtract",value:"$dateSubtract",score:1,meta:"expr:date",version:"5.0.0"},{name:"$dateToParts",value:"$dateToParts",score:1,meta:"expr:date",version:"3.6.0"},{name:"$dateToString",value:"$dateToString",score:1,meta:"expr:date",version:"3.6.0"},{name:"$dateTrunc",value:"$dateTrunc",score:1,meta:"expr:date",version:"5.0.0"},{name:"$dayOfMonth",value:"$dayOfMonth",score:1,meta:"expr:date",version:"2.2.0"},{name:"$dayOfWeek",value:"$dayOfWeek",score:1,meta:"expr:date",version:"2.2.0"},{name:"$dayOfYear",value:"$dayOfYear",score:1,meta:"expr:date",version:"2.2.0"},{name:"$dateToString",value:"$dateToString",score:1,meta:"expr:date",version:"3.0.0"},{name:"$divide",value:"$divide",score:1,meta:"expr:arith",version:"2.2.0"},{name:"$eq",value:"$eq",score:1,meta:"expr:comp",version:"2.2.0"},{name:"$exp",value:"$exp",score:1,meta:"expr:arith",version:"3.2.0"},{name:"$filter",value:"$filter",score:1,meta:"expr:array",version:"3.2.0"},{name:"$first",value:"$first",score:1,meta:"expr:array",version:"4.4.0"},{name:"$floor",value:"$floor",score:1,meta:"expr:arith",version:"3.2.0"},{name:"$function",value:"$function",score:1,meta:"expr:arith",version:"4.4.0"},{name:"$getField",value:"$getField",score:1,meta:"expr:get",version:"5.0.0"},{name:"$gt",value:"$gt",score:1,meta:"expr:comp",version:"2.2.0"},{name:"$gte",value:"$gte",score:1,meta:"expr:comp",version:"2.2.0"},{name:"$hour",value:"$hour",score:1,meta:"expr:date",version:"2.2.0"},{name:"$ifNull",value:"$ifNull",score:1,meta:"expr:cond",version:"2.2.0"},{name:"$in",value:"$in",score:1,meta:"expr:array",version:"3.4.0"},{name:"$indexOfArray",value:"$indexOfArray",score:1,meta:"expr:array",version:"3.4.0"},{name:"$indexOfBytes",value:"$indexOfBytes",score:1,meta:"expr:string",version:"3.4.0"},{name:"$indexOfCP",value:"$indexOfCP",score:1,meta:"expr:string",version:"3.4.0"},{name:"$isArray",value:"$isArray",score:1,meta:"expr:array",version:"3.2.0"},{name:"$isNumber",value:"$isNumber",score:1,meta:"expr:arith",version:"4.4.0"},{name:"$isoDayOfWeek",value:"$isoDayOfWeek",score:1,meta:"expr:date",version:"3.4.0"},{name:"$isoWeek",value:"$isoWeek",score:1,meta:"expr:date",version:"3.4.0"},{name:"$isoWeekYear",value:"$isoWeekYear",score:1,meta:"expr:date",version:"3.4.0"},{name:"$last",value:"$last",score:1,meta:"expr:array",version:"4.4.0"},{name:"$let",value:"$let",score:1,meta:"expr:var",version:"2.6.0"},{name:"$literal",value:"$literal",score:1,meta:"expr:literal",version:"2.6.0"},{name:"$lt",value:"$lt",score:1,meta:"expr:comp",version:"2.2.0"},{name:"$lt",value:"$lte",score:1,meta:"expr:comp",version:"2.2.0"},{name:"$ln",value:"$ln",score:1,meta:"expr:arith",version:"3.2.0"},{name:"$log",value:"$log",score:1,meta:"expr:arith",version:"3.2.0"},{name:"$log10",value:"$log10",score:1,meta:"expr:arith",version:"3.2.0"},{name:"$map",value:"$map",score:1,meta:"expr:array",version:"2.6.0"},{name:"$mergeObjects",value:"$mergeObjects",score:1,meta:"expr:obj",version:"3.6.0"},{name:"$meta",value:"$meta",score:1,meta:"expr:text",version:"2.6.0"},{name:"$millisecond",value:"$millisecond",score:1,meta:"expr:date",version:"2.4.0"},{name:"$minute",value:"$minute",score:1,meta:"expr:date",version:"2.2.0"},{name:"$mod",value:"$mod",score:1,meta:"expr:arith",version:"2.2.0"},{name:"$month",value:"$month",score:1,meta:"expr:date",version:"2.2.0"},{name:"$multiply",value:"$multiply",score:1,meta:"expr:arith",version:"2.2.0"},{name:"$new",value:"$new",score:1,meta:"expr:comp",version:"2.2.0"},{name:"$not",value:"$not",score:1,meta:"expr:bool",version:"2.2.0"},{name:"$objectToArray",value:"$objectToArray",score:1,meta:"expr:array",version:"3.4.4"},{name:"$or",value:"$or",score:1,meta:"expr:bool",version:"2.2.0"},{name:"$pow",value:"$pow",score:1,meta:"expr:arith",version:"3.2.0"},{name:"$range",value:"$range",score:1,meta:"expr:array",version:"3.4.0"},{name:"$reduce",value:"$reduce",score:1,meta:"expr:array",version:"3.4.0"},{name:"$regexFind",value:"$regexFind",score:1,meta:"expr:regex",version:"4.1.11"},{name:"$regexFindAll",value:"$regexFindAll",score:1,meta:"expr:regex",version:"4.1.11"},{name:"$regexMatch",value:"$regexMatch",score:1,meta:"expr:regex",version:"4.1.11"},{name:"$replaceAll",value:"$replaceAll",score:1,meta:"expr:string",version:"4.4.0"},{name:"$replaceOne",value:"$replaceOne",score:1,meta:"expr:string",version:"4.4.0"},{name:"$reverseArray",value:"$reverseArray",score:1,meta:"expr:array",version:"3.4.0"},{name:"$second",value:"$second",score:1,meta:"expr:date",version:"2.2.0"},{name:"$setDifference",value:"$setDifference",score:1,meta:"expr:set",version:"2.6.0"},{name:"$setEquals",value:"$setEquals",score:1,meta:"expr:set",version:"2.6.0"},{name:"$setIntersection",value:"$setIntersection",score:1,meta:"expr:set",version:"2.6.0"},{name:"$setIsSubset",value:"$setIsSubset",score:1,meta:"expr:set",version:"2.6.0"},{name:"$setUnion",value:"$setUnion",score:1,meta:"expr:set",version:"2.6.0"},{name:"$similarityCosine",value:"$similarityCosine",score:1,meta:"expr:arith",version:"8.2.0"},{name:"$similarityDotProduct",value:"$similarityDotProduct",score:1,meta:"expr:arith",version:"8.2.0"},{name:"$similarityEuclidean",value:"$similarityEuclidean",score:1,meta:"expr:arith",version:"8.2.0"},{name:"$size",value:"$size",score:1,meta:"expr:array",version:"2.6.0"},{name:"$slice",value:"$slice",score:1,meta:"expr:array",version:"3.2.0"},{name:"$sortArray",value:"$sortArray",score:1,meta:"expr:array",version:"5.2.0"},{name:"$split",value:"$split",score:1,meta:"expr:string",version:"3.4.0"},{name:"$sqrt",value:"$sqrt",score:1,meta:"expr:arith",version:"3.2.0"},{name:"$strcasecmp",value:"$strcasecmp",score:1,meta:"expr:string",version:"2.2.0"},{name:"$strLenBytes",value:"$strLenBytes",score:1,meta:"expr:string",version:"3.4.0"},{name:"$strLenCP",value:"$strLenCP",score:1,meta:"expr:string",version:"3.4.0"},{name:"$substr",value:"$substr",score:1,meta:"expr:string",version:"2.2.0",deprecated:"3.4.0",replacement:"$substrBytes"},{name:"$substrBytes",value:"$substrBytes",score:1,meta:"expr:string",version:"3.4.0"},{name:"$substrCP",value:"$substrCP",score:1,meta:"expr:string",version:"3.4.0"},{name:"$subtract",value:"$subtract",score:1,meta:"expr:arith",version:"3.2.0"},{name:"$switch",value:"$switch",score:1,meta:"expr:cond",version:"3.4.0"},{name:"$toHashedIndexKey",value:"$toHashedIndexKey",score:1,meta:"expr:arith",version:"4.2.24"},{name:"$toLower",value:"$toLower",score:1,meta:"expr:string",version:"2.2.0"},{name:"$toUpper",value:"$toUpper",score:1,meta:"expr:string",version:"2.2.0"},{name:"$tsSecond",value:"$tsSecond",score:1,meta:"expr:date",version:"5.1.0"},{name:"$tsIncrement",value:"$tsIncrement",score:1,meta:"expr:date",version:"5.1.0"},{name:"$trunc",value:"$trunc",score:1,meta:"expr:arith",version:"3.2.0"},{name:"$type",value:"$type",score:1,meta:"expr:type",version:"3.4.0"},{name:"$week",value:"$week",score:1,meta:"expr:date",version:"2.2.0"},{name:"$year",value:"$year",score:1,meta:"expr:date",version:"2.2.0"},{name:"$zip",value:"$zip",score:1,meta:"expr:array",version:"3.4.0"},{name:"$bitAnd",value:"$bitAnd",score:1,meta:"expr:bit",version:"7.0.0"},{name:"$bitOr",value:"$bitOr",score:1,meta:"expr:bit",version:"7.0.0"},{name:"$bitXor",value:"$bitXor",score:1,meta:"expr:bit",version:"7.0.0"},{name:"$bitNot",value:"$bitNot",score:1,meta:"expr:bit",version:"7.0.0"}]},31145:e=>{const t=Object.freeze({loose:!0}),n=Object.freeze({});e.exports=e=>e?"object"!=typeof e?t:e:n},32056:(e,t,n)=>{const r=n(25583);e.exports=(e,t,n)=>0!==r(e,t,n)},32654:(e,t,n)=>{const r=n(38366);e.exports=(e,t)=>new r(e,t).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" ")))},32674:(e,t,n)=>{const r=n(50066);e.exports=(e,t,n)=>new r(e,n).compare(new r(t,n))},32901:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var a=Object.getOwnPropertyDescriptor(t,n);a&&!("get"in a?!t.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,a)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return a(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.redactConnectionString=t.redactValidConnectionString=void 0;const i=s(n(28830));t.redactValidConnectionString=function(e,t){var n,r;const a=e.clone(),s=null!==(n=null==t?void 0:t.replacementString)&&void 0!==n?n:"_credentials_",o=null===(r=null==t?void 0:t.redactUsernames)||void 0===r||r;if((a.username||a.password)&&o?(a.username=s,a.password=""):a.password&&(a.password=s),a.searchParams.has("authMechanismProperties")){const e=new i.CommaAndColonSeparatedRecord(a.searchParams.get("authMechanismProperties"));e.get("AWS_SESSION_TOKEN")&&(e.set("AWS_SESSION_TOKEN",s),a.searchParams.set("authMechanismProperties",e.toString()))}return a.searchParams.has("tlsCertificateKeyFilePassword")&&a.searchParams.set("tlsCertificateKeyFilePassword",s),a.searchParams.has("proxyUsername")&&o&&a.searchParams.set("proxyUsername",s),a.searchParams.has("proxyPassword")&&a.searchParams.set("proxyPassword",s),a},t.redactConnectionString=function(e,t){var n,r;const a=null!==(n=null==t?void 0:t.replacementString)&&void 0!==n?n:"<credentials>",s=null===(r=null==t?void 0:t.redactUsernames)||void 0===r||r;let o;try{o=new i.default(e)}catch(e){}if(o)return t={...t,replacementString:"___credentials___"},o.redact(t).toString().replace(/___credentials___/g,a);const l=a,c=[e=>e.replace(s?/(\/\/)(.*)(@)/g:/(\/\/[^@]*:)(.*)(@)/g,`$1${l}$3`),e=>e.replace(/(AWS_SESSION_TOKEN(:|%3A))([^,&]+)/gi,`$1${l}`),e=>e.replace(/(tlsCertificateKeyFilePassword=)([^&]+)/gi,`$1${l}`),e=>s?e.replace(/(proxyUsername=)([^&]+)/gi,`$1${l}`):e,e=>e.replace(/(proxyPassword=)([^&]+)/gi,`$1${l}`)];for(const t of c)e=t(e);return e}},32910:(e,t,n)=>{const r=n(48381),a=n(55141),{ANY:s}=a,i=n(20332),o=n(43301),l=n(58809),c=n(20038),u=n(66239),p=n(54506);e.exports=(e,t,n,d)=>{let m,h,f,v,g;switch(e=new r(e,d),t=new i(t,d),n){case">":m=l,h=u,f=c,v=">",g=">=";break;case"<":m=c,h=p,f=l,v="<",g="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(o(e,t,d))return!1;for(let n=0;n<t.set.length;++n){const r=t.set[n];let i=null,o=null;if(r.forEach((e=>{e.semver===s&&(e=new a(">=0.0.0")),i=i||e,o=o||e,m(e.semver,i.semver,d)?i=e:f(e.semver,o.semver,d)&&(o=e)})),i.operator===v||i.operator===g)return!1;if((!o.operator||o.operator===v)&&h(e,o.semver))return!1;if(o.operator===g&&f(e,o.semver))return!1}return!0}},32924:(e,t,n)=>{const r=n(41694);e.exports=(e,t)=>new r(e,t).minor},32939:(e,t,n)=>{const r=n(66283);e.exports=(e,t)=>new r(e,t).minor},33629:(e,t,n)=>{const r=/\s+/g;class a{constructor(e,t){if(t=i(t),e instanceof a)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new a(e.raw,t);if(e instanceof o)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e.trim().replace(r," "),this.set=this.raw.split("||").map((e=>this.parseRange(e.trim()))).filter((e=>e.length)),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter((e=>!g(e[0]))),0===this.set.length)this.set=[e];else if(this.set.length>1)for(const e of this.set)if(1===e.length&&y(e[0])){this.set=[e];break}}this.formatted=void 0}get range(){if(void 0===this.formatted){this.formatted="";for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+="||");const t=this.set[e];for(let e=0;e<t.length;e++)e>0&&(this.formatted+=" "),this.formatted+=t[e].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){const t=((this.options.includePrerelease&&f)|(this.options.loose&&v))+":"+e,n=s.get(t);if(n)return n;const r=this.options.loose,a=r?u[p.HYPHENRANGELOOSE]:u[p.HYPHENRANGE];e=e.replace(a,T(this.options.includePrerelease)),l("hyphen replace",e),e=e.replace(u[p.COMPARATORTRIM],d),l("comparator trim",e),e=e.replace(u[p.TILDETRIM],m),l("tilde trim",e),e=e.replace(u[p.CARETTRIM],h),l("caret trim",e);let i=e.split(" ").map((e=>b(e,this.options))).join(" ").split(/\s+/).map((e=>I(e,this.options)));r&&(i=i.filter((e=>(l("loose invalid filter",e,this.options),!!e.match(u[p.COMPARATORLOOSE]))))),l("range list",i);const c=new Map,y=i.map((e=>new o(e,this.options)));for(const e of y){if(g(e))return[e];c.set(e.value,e)}c.size>1&&c.has("")&&c.delete("");const $=[...c.values()];return s.set(t,$),$}intersects(e,t){if(!(e instanceof a))throw new TypeError("a Range is required");return this.set.some((n=>$(n,t)&&e.set.some((e=>$(e,t)&&n.every((n=>e.every((e=>n.intersects(e,t)))))))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new c(e,this.options)}catch(e){return!1}for(let t=0;t<this.set.length;t++)if(R(this.set[t],e,this.options))return!0;return!1}}e.exports=a;const s=new(n(92660)),i=n(34773),o=n(96506),l=n(52378),c=n(9350),{safeRe:u,t:p,comparatorTrimReplace:d,tildeTrimReplace:m,caretTrimReplace:h}=n(68752),{FLAG_INCLUDE_PRERELEASE:f,FLAG_LOOSE:v}=n(28892),g=e=>"<0.0.0-0"===e.value,y=e=>""===e.value,$=(e,t)=>{let n=!0;const r=e.slice();let a=r.pop();for(;n&&r.length;)n=r.every((e=>a.intersects(e,t))),a=r.pop();return n},b=(e,t)=>(l("comp",e,t),e=_(e,t),l("caret",e),e=S(e,t),l("tildes",e),e=w(e,t),l("xrange",e),e=N(e,t),l("stars",e),e),E=e=>!e||"x"===e.toLowerCase()||"*"===e,S=(e,t)=>e.trim().split(/\s+/).map((e=>A(e,t))).join(" "),A=(e,t)=>{const n=t.loose?u[p.TILDELOOSE]:u[p.TILDE];return e.replace(n,((t,n,r,a,s)=>{let i;return l("tilde",e,t,n,r,a,s),E(n)?i="":E(r)?i=`>=${n}.0.0 <${+n+1}.0.0-0`:E(a)?i=`>=${n}.${r}.0 <${n}.${+r+1}.0-0`:s?(l("replaceTilde pr",s),i=`>=${n}.${r}.${a}-${s} <${n}.${+r+1}.0-0`):i=`>=${n}.${r}.${a} <${n}.${+r+1}.0-0`,l("tilde return",i),i}))},_=(e,t)=>e.trim().split(/\s+/).map((e=>x(e,t))).join(" "),x=(e,t)=>{l("caret",e,t);const n=t.loose?u[p.CARETLOOSE]:u[p.CARET],r=t.includePrerelease?"-0":"";return e.replace(n,((t,n,a,s,i)=>{let o;return l("caret",e,t,n,a,s,i),E(n)?o="":E(a)?o=`>=${n}.0.0${r} <${+n+1}.0.0-0`:E(s)?o="0"===n?`>=${n}.${a}.0${r} <${n}.${+a+1}.0-0`:`>=${n}.${a}.0${r} <${+n+1}.0.0-0`:i?(l("replaceCaret pr",i),o="0"===n?"0"===a?`>=${n}.${a}.${s}-${i} <${n}.${a}.${+s+1}-0`:`>=${n}.${a}.${s}-${i} <${n}.${+a+1}.0-0`:`>=${n}.${a}.${s}-${i} <${+n+1}.0.0-0`):(l("no pr"),o="0"===n?"0"===a?`>=${n}.${a}.${s}${r} <${n}.${a}.${+s+1}-0`:`>=${n}.${a}.${s}${r} <${n}.${+a+1}.0-0`:`>=${n}.${a}.${s} <${+n+1}.0.0-0`),l("caret return",o),o}))},w=(e,t)=>(l("replaceXRanges",e,t),e.split(/\s+/).map((e=>O(e,t))).join(" ")),O=(e,t)=>{e=e.trim();const n=t.loose?u[p.XRANGELOOSE]:u[p.XRANGE];return e.replace(n,((n,r,a,s,i,o)=>{l("xRange",e,n,r,a,s,i,o);const c=E(a),u=c||E(s),p=u||E(i),d=p;return"="===r&&d&&(r=""),o=t.includePrerelease?"-0":"",c?n=">"===r||"<"===r?"<0.0.0-0":"*":r&&d?(u&&(s=0),i=0,">"===r?(r=">=",u?(a=+a+1,s=0,i=0):(s=+s+1,i=0)):"<="===r&&(r="<",u?a=+a+1:s=+s+1),"<"===r&&(o="-0"),n=`${r+a}.${s}.${i}${o}`):u?n=`>=${a}.0.0${o} <${+a+1}.0.0-0`:p&&(n=`>=${a}.${s}.0${o} <${a}.${+s+1}.0-0`),l("xRange return",n),n}))},N=(e,t)=>(l("replaceStars",e,t),e.trim().replace(u[p.STAR],"")),I=(e,t)=>(l("replaceGTE0",e,t),e.trim().replace(u[t.includePrerelease?p.GTE0PRE:p.GTE0],"")),T=e=>(t,n,r,a,s,i,o,l,c,u,p,d)=>`${n=E(r)?"":E(a)?`>=${r}.0.0${e?"-0":""}`:E(s)?`>=${r}.${a}.0${e?"-0":""}`:i?`>=${n}`:`>=${n}${e?"-0":""}`} ${l=E(c)?"":E(u)?`<${+c+1}.0.0-0`:E(p)?`<${c}.${+u+1}.0-0`:d?`<=${c}.${u}.${p}-${d}`:e?`<${c}.${u}.${+p+1}-0`:`<=${l}`}`.trim(),R=(e,t,n)=>{for(let n=0;n<e.length;n++)if(!e[n].test(t))return!1;if(t.prerelease.length&&!n.includePrerelease){for(let n=0;n<e.length;n++)if(l(e[n].semver),e[n].semver!==o.ANY&&e[n].semver.prerelease.length>0){const r=e[n].semver;if(r.major===t.major&&r.minor===t.minor&&r.patch===t.patch)return!0}return!1}return!0}},33907:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ATLAS_VECTOR_SEARCH_TEMPLATE=t.ATLAS_SEARCH_TEMPLATES=void 0,t.ATLAS_SEARCH_TEMPLATES=[{name:"Dynamic field mappings",snippet:'{\n "mappings": {\n "dynamic": true\n }\n}',version:"4.4.0"},{name:"Static field mappings",snippet:'{\n "mappings": {\n "dynamic": false,\n "fields": {\n ${1:<string field name>}: {\n "type": "string"\n },\n ${2:<number field name>}: {\n "type": "number"\n },\n ${3:<date field name>}: {\n "type": "date"\n },\n ${4:<geo field name>}: {\n "type": "geo"\n },\n } \n }\n}',version:"4.4.0"},{name:"Text field mappings",snippet:'{\n "mappings": {\n "dynamic": true,\n "fields": {\n ${1:<string field name>}: [\n {\n // Enables text queries\n "type": "string"\n },\n {\n // Enables autocomplete queries\n "type": "autocomplete"\n \n },\n {\n // Enables sorting\n "type": "token"\n }\n ] \n } \n }\n}',version:"4.4.0"},{name:"Facet field mappings",snippet:'{\n "mappings": {\n "dynamic": true,\n "fields": {\n ${1:<number field name for faceting>}: [\n {\n "type": "numberFacet"\n },\n {\n "type": "number"\n },\n ],\n ${2:<date field name for faceting>}: [\n {\n "type": "dateFacet"\n }\n {\n "type": "date"\n }\n ],\n ${3:<string field name for faceting>}: [\n {\n "type": "stringFacet"\n },\n {\n "type": "string",\n "analyzer": "lucene.keyword"\n },\n ],\n } \n }\n}',version:"4.4.0"},{name:"KNN Vector field mapping",snippet:'{\n "mappings": {\n "dynamic": true,\n "fields": {\n ${1:<vector embedding field name>}: [\n {\n "type": "knnVector",\n "dimensions": ${2:<number of dimensions>},\n "similarity": "${3:<euclidean | cosine | dotProduct>}"\n } \n ] \n } \n }\n}',version:"4.4.0"}],t.ATLAS_VECTOR_SEARCH_TEMPLATE={name:"Vector Search default template",snippet:'{\n "fields": [{\n "type": "vector",\n "path": "${1:<field name to index>}",\n "numDimensions": ${2:<number of dimensions>},\n "similarity": "${3:<euclidean | cosine | dotProduct>}"\n }]\n}',version:"4.4.0"}},34218:(e,t,n)=>{const r=n(41694),a=n(71333);e.exports=(e,t,n)=>{let s=null,i=null,o=null;try{o=new a(t,n)}catch(e){return null}return e.forEach((e=>{o.test(e)&&(s&&-1!==i.compare(e)||(s=e,i=new r(s,n)))})),s}},34219:(e,t,n)=>{const r=n(48381);e.exports=(e,t,n=!1)=>{if(e instanceof r)return e;try{return new r(e,t)}catch(e){if(!n)return null;throw e}}},34335:(e,t,n)=>{const r=n(20332),a=n(55141),{ANY:s}=a,i=n(43301),o=n(77203),l=[new a(">=0.0.0-0")],c=[new a(">=0.0.0")],u=(e,t,n)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===s){if(1===t.length&&t[0].semver===s)return!0;e=n.includePrerelease?l:c}if(1===t.length&&t[0].semver===s){if(n.includePrerelease)return!0;t=c}const r=new Set;let a,u,m,h,f,v,g;for(const t of e)">"===t.operator||">="===t.operator?a=p(a,t,n):"<"===t.operator||"<="===t.operator?u=d(u,t,n):r.add(t.semver);if(r.size>1)return null;if(a&&u){if(m=o(a.semver,u.semver,n),m>0)return null;if(0===m&&(">="!==a.operator||"<="!==u.operator))return null}for(const e of r){if(a&&!i(e,String(a),n))return null;if(u&&!i(e,String(u),n))return null;for(const r of t)if(!i(e,String(r),n))return!1;return!0}let y=!(!u||n.includePrerelease||!u.semver.prerelease.length)&&u.semver,$=!(!a||n.includePrerelease||!a.semver.prerelease.length)&&a.semver;y&&1===y.prerelease.length&&"<"===u.operator&&0===y.prerelease[0]&&(y=!1);for(const e of t){if(g=g||">"===e.operator||">="===e.operator,v=v||"<"===e.operator||"<="===e.operator,a)if($&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===$.major&&e.semver.minor===$.minor&&e.semver.patch===$.patch&&($=!1),">"===e.operator||">="===e.operator){if(h=p(a,e,n),h===e&&h!==a)return!1}else if(">="===a.operator&&!i(a.semver,String(e),n))return!1;if(u)if(y&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===y.major&&e.semver.minor===y.minor&&e.semver.patch===y.patch&&(y=!1),"<"===e.operator||"<="===e.operator){if(f=d(u,e,n),f===e&&f!==u)return!1}else if("<="===u.operator&&!i(u.semver,String(e),n))return!1;if(!e.operator&&(u||a)&&0!==m)return!1}return!(a&&v&&!u&&0!==m||u&&g&&!a&&0!==m||$||y)},p=(e,t,n)=>{if(!e)return t;const r=o(e.semver,t.semver,n);return r>0?e:r<0||">"===t.operator&&">="===e.operator?t:e},d=(e,t,n)=>{if(!e)return t;const r=o(e.semver,t.semver,n);return r<0?e:r>0||"<"===t.operator&&"<="===e.operator?t:e};e.exports=(e,t,n={})=>{if(e===t)return!0;e=new r(e,n),t=new r(t,n);let a=!1;e:for(const r of e.set){for(const e of t.set){const t=u(r,e,n);if(a=a||null!==t,t)continue e}if(a)return!1}return!0}},34773:e=>{const t=Object.freeze({loose:!0}),n=Object.freeze({});e.exports=e=>e?"object"!=typeof e?t:e:n},34889:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BSON_TYPES=void 0,t.BSON_TYPES=[{name:"Code",value:"Code",label:"Code",score:1,meta:"bson",version:"0.0.0",description:"BSON Code type",snippet:"Code('${1:code}')"},{name:"ObjectId",value:"ObjectId",label:"ObjectId",score:1,meta:"bson",version:"0.0.0",description:"BSON ObjectId type",snippet:"ObjectId('${1:id}')"},{name:"Binary",value:"Binary",label:"Binary",score:1,meta:"bson",version:"0.0.0",description:"BSON Binary type",snippet:"Binary('${1:data}', '${2:subType}')"},{name:"DBRef",value:"DBRef",label:"DBRef",score:1,meta:"bson",version:"0.0.0",description:"BSON DBRef type",snippet:"DBRef('${1:ns}', '${2:oid}')"},{name:"Timestamp",value:"Timestamp",label:"Timestamp",score:1,meta:"bson",version:"0.0.0",description:"BSON Timestamp type",snippet:"Timestamp(${1:low}, ${2:high})"},{name:"NumberInt",value:"NumberInt",label:"NumberInt",score:1,meta:"bson",version:"0.0.0",description:"BSON 32 bit Integer type",snippet:"NumberInt(${1:value})"},{name:"NumberLong",value:"NumberLong",label:"NumberLong",score:1,meta:"bson",version:"0.0.0",description:"BSON 64 but Integer type",snippet:"NumberLong(${1:value})"},{name:"NumberDecimal",value:"NumberDecimal",label:"NumberDecimal",score:1,meta:"bson",version:"3.4.0",description:"BSON Decimal128 type",snippet:"NumberDecimal('${1:value}')"},{name:"MaxKey",value:"MaxKey",label:"MaxKey",score:1,meta:"bson",version:"0.0.0",description:"BSON MaxKey type",snippet:"MaxKey()"},{name:"MinKey",value:"MinKey",label:"MinKey",score:1,meta:"bson",version:"0.0.0",description:"BSON MinKey type",snippet:"MinKey()"},{name:"ISODate",value:"ISODate",label:"ISODate",score:1,meta:"bson",version:"0.0.0",description:"BSON Date type",snippet:"ISODate('${1:date}')"},{name:"RegExp",value:"RegExp",label:"RegExp",score:1,meta:"bson",version:"0.0.0",description:"BSON Regex type",snippet:"RegExp('${1:source}', '${2:opts}')"}]},35229:(e,t,n)=>{const r=n(70692);e.exports=(e,t,n)=>0===r(e,t,n)},35593:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SYSTEM_VARIABLES=void 0,t.SYSTEM_VARIABLES=[{name:"$$NOW",value:"$$NOW",score:1,meta:"variable:system",version:"4.2.0",description:"A variable that returns the current datetime value. NOW returns the same value for all members of the deployment and remains the same throughout all stages of the aggregation pipeline."},{name:"$$CLUSTER_TIME",value:"$$CLUSTER_TIME",score:1,meta:"variable:system",version:"4.2.0",description:"A variable that returns the current timestamp value. CLUSTER_TIME is only available on replica sets and sharded clusters. CLUSTER_TIME returns the same value for all members of the deployment and remains the same throughout all stages of the pipeline."},{name:"$$ROOT",value:"$$ROOT",score:1,meta:"variable:system",version:"2.4.0",description:"References the root document, i.e. the top-level document, currently being processed in the aggregation pipeline stage."},{name:"$$CURRENT",value:"$$CURRENT",score:1,meta:"variable:system",version:"2.4.0",description:"References the start of the field path being processed in the aggregation pipeline stage. Unless documented otherwise, all stages start with CURRENT the same as ROOT. CURRENT is modifiable. However, since `$<field>` is equivalent to `$$CURRENT.<field>`, rebinding CURRENT changes the meaning of `$` accesses."},{name:"$$REMOVE",value:"$$REMOVE",score:1,meta:"variable:system",version:"3.6.0",description:"A variable which evaluates to the missing value. Allows for the conditional exclusion of fields. In a `$project`, a field set to the variable REMOVE is excluded from the output."},{name:"$$DESCEND",value:"$$DESCEND",score:1,meta:"variable:system",version:"3.0.0",description:"One of the allowed results of a `$redact` expression."},{name:"$$PRUNE",value:"$$PRUNE",score:1,meta:"variable:system",version:"3.0.0",description:"One of the allowed results of a `$redact` expression."},{name:"$$KEEP",value:"$$KEEP",score:1,meta:"variable:system",version:"3.0.0",description:"One of the allowed results of a `$redact` expression."},{name:"$$SEARCH_META",value:"$$SEARCH_META",score:1,meta:"variable:system",version:"5.0.0",description:"A variable that stores the metadata results of an Atlas Search query. In all supported aggregation pipeline stages, a field set to the variable SEARCH_META returns the metadata results for the query. For an example of its usage, see Atlas Search facet and count."},{name:"$$USER_ROLES",value:"$$USER_ROLES",score:1,meta:"variable:system",version:"7.0.0",description:"A variable that stores the role names of the authenticated user running the command."}]},35647:(e,t,n)=>{const r=n(68752),a=n(28892),s=n(9350),i=n(80661),o=n(17914),l=n(40447),c=n(24320),u=n(1025),p=n(82214),d=n(90216),m=n(30452),h=n(58395),f=n(94715),v=n(99430),g=n(51456),y=n(62525),$=n(44455),b=n(27225),E=n(85623),S=n(42734),A=n(63825),_=n(53831),x=n(42997),w=n(66135),O=n(90898),N=n(39149),I=n(84112),T=n(96506),R=n(33629),C=n(52992),k=n(52189),L=n(60098),P=n(15160),M=n(88099),j=n(44948),D=n(57681),F=n(62921),V=n(69904),q=n(89834),B=n(59263),U=n(45006);e.exports={parse:o,valid:l,clean:c,inc:u,diff:p,major:d,minor:m,patch:h,prerelease:f,compare:v,rcompare:g,compareLoose:y,compareBuild:$,sort:b,rsort:E,gt:S,lt:A,eq:_,neq:x,gte:w,lte:O,cmp:N,coerce:I,Comparator:T,Range:R,satisfies:C,toComparators:k,maxSatisfying:L,minSatisfying:P,minVersion:M,validRange:j,outside:D,gtr:F,ltr:V,intersects:q,simplifyRange:B,subset:U,SemVer:s,re:r.re,src:r.src,tokens:r.t,SEMVER_SPEC_VERSION:a.SEMVER_SPEC_VERSION,RELEASE_TYPES:a.RELEASE_TYPES,compareIdentifiers:i.compareIdentifiers,rcompareIdentifiers:i.rcompareIdentifiers}},35735:(e,t,n)=>{const r=n(59441);e.exports=(e,t)=>{const n=r(e.trim().replace(/^[=v]+/,""),t);return n?n.version:null}},36059:(e,t,n)=>{const r=n(77203);e.exports=(e,t,n)=>r(t,e,n)},36165:(e,t,n)=>{const{MAX_SAFE_COMPONENT_LENGTH:r,MAX_SAFE_BUILD_LENGTH:a,MAX_LENGTH:s}=n(64136),i=n(95869),o=(t=e.exports={}).re=[],l=t.safeRe=[],c=t.src=[],u=t.safeSrc=[],p=t.t={};let d=0;const m="[a-zA-Z0-9-]",h=[["\\s",1],["\\d",s],[m,a]],f=(e,t,n)=>{const r=(e=>{for(const[t,n]of h)e=e.split(`${t}*`).join(`${t}{0,${n}}`).split(`${t}+`).join(`${t}{1,${n}}`);return e})(t),a=d++;i(e,a,t),p[e]=a,c[a]=t,u[a]=r,o[a]=new RegExp(t,n?"g":void 0),l[a]=new RegExp(r,n?"g":void 0)};f("NUMERICIDENTIFIER","0|[1-9]\\d*"),f("NUMERICIDENTIFIERLOOSE","\\d+"),f("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${m}*`),f("MAINVERSION",`(${c[p.NUMERICIDENTIFIER]})\\.(${c[p.NUMERICIDENTIFIER]})\\.(${c[p.NUMERICIDENTIFIER]})`),f("MAINVERSIONLOOSE",`(${c[p.NUMERICIDENTIFIERLOOSE]})\\.(${c[p.NUMERICIDENTIFIERLOOSE]})\\.(${c[p.NUMERICIDENTIFIERLOOSE]})`),f("PRERELEASEIDENTIFIER",`(?:${c[p.NONNUMERICIDENTIFIER]}|${c[p.NUMERICIDENTIFIER]})`),f("PRERELEASEIDENTIFIERLOOSE",`(?:${c[p.NONNUMERICIDENTIFIER]}|${c[p.NUMERICIDENTIFIERLOOSE]})`),f("PRERELEASE",`(?:-(${c[p.PRERELEASEIDENTIFIER]}(?:\\.${c[p.PRERELEASEIDENTIFIER]})*))`),f("PRERELEASELOOSE",`(?:-?(${c[p.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${c[p.PRERELEASEIDENTIFIERLOOSE]})*))`),f("BUILDIDENTIFIER",`${m}+`),f("BUILD",`(?:\\+(${c[p.BUILDIDENTIFIER]}(?:\\.${c[p.BUILDIDENTIFIER]})*))`),f("FULLPLAIN",`v?${c[p.MAINVERSION]}${c[p.PRERELEASE]}?${c[p.BUILD]}?`),f("FULL",`^${c[p.FULLPLAIN]}$`),f("LOOSEPLAIN",`[v=\\s]*${c[p.MAINVERSIONLOOSE]}${c[p.PRERELEASELOOSE]}?${c[p.BUILD]}?`),f("LOOSE",`^${c[p.LOOSEPLAIN]}$`),f("GTLT","((?:<|>)?=?)"),f("XRANGEIDENTIFIERLOOSE",`${c[p.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),f("XRANGEIDENTIFIER",`${c[p.NUMERICIDENTIFIER]}|x|X|\\*`),f("XRANGEPLAIN",`[v=\\s]*(${c[p.XRANGEIDENTIFIER]})(?:\\.(${c[p.XRANGEIDENTIFIER]})(?:\\.(${c[p.XRANGEIDENTIFIER]})(?:${c[p.PRERELEASE]})?${c[p.BUILD]}?)?)?`),f("XRANGEPLAINLOOSE",`[v=\\s]*(${c[p.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[p.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[p.XRANGEIDENTIFIERLOOSE]})(?:${c[p.PRERELEASELOOSE]})?${c[p.BUILD]}?)?)?`),f("XRANGE",`^${c[p.GTLT]}\\s*${c[p.XRANGEPLAIN]}$`),f("XRANGELOOSE",`^${c[p.GTLT]}\\s*${c[p.XRANGEPLAINLOOSE]}$`),f("COERCEPLAIN",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?`),f("COERCE",`${c[p.COERCEPLAIN]}(?:$|[^\\d])`),f("COERCEFULL",c[p.COERCEPLAIN]+`(?:${c[p.PRERELEASE]})?`+`(?:${c[p.BUILD]})?(?:$|[^\\d])`),f("COERCERTL",c[p.COERCE],!0),f("COERCERTLFULL",c[p.COERCEFULL],!0),f("LONETILDE","(?:~>?)"),f("TILDETRIM",`(\\s*)${c[p.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",f("TILDE",`^${c[p.LONETILDE]}${c[p.XRANGEPLAIN]}$`),f("TILDELOOSE",`^${c[p.LONETILDE]}${c[p.XRANGEPLAINLOOSE]}$`),f("LONECARET","(?:\\^)"),f("CARETTRIM",`(\\s*)${c[p.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",f("CARET",`^${c[p.LONECARET]}${c[p.XRANGEPLAIN]}$`),f("CARETLOOSE",`^${c[p.LONECARET]}${c[p.XRANGEPLAINLOOSE]}$`),f("COMPARATORLOOSE",`^${c[p.GTLT]}\\s*(${c[p.LOOSEPLAIN]})$|^$`),f("COMPARATOR",`^${c[p.GTLT]}\\s*(${c[p.FULLPLAIN]})$|^$`),f("COMPARATORTRIM",`(\\s*)${c[p.GTLT]}\\s*(${c[p.LOOSEPLAIN]}|${c[p.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",f("HYPHENRANGE",`^\\s*(${c[p.XRANGEPLAIN]})\\s+-\\s+(${c[p.XRANGEPLAIN]})\\s*$`),f("HYPHENRANGELOOSE",`^\\s*(${c[p.XRANGEPLAINLOOSE]})\\s+-\\s+(${c[p.XRANGEPLAINLOOSE]})\\s*$`),f("STAR","(<|>)?=?\\s*\\*"),f("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),f("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")},36326:(e,t,n)=>{const r=n(57544),a=n(12196),{safeRe:s,t:i}=n(25522);e.exports=(e,t)=>{if(e instanceof r)return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;let n=null;if((t=t||{}).rtl){const r=t.includePrerelease?s[i.COERCERTLFULL]:s[i.COERCERTL];let a;for(;(a=r.exec(e))&&(!n||n.index+n[0].length!==e.length);)n&&a.index+a[0].length===n.index+n[0].length||(n=a),r.lastIndex=a.index+a[1].length+a[2].length;r.lastIndex=-1}else n=e.match(t.includePrerelease?s[i.COERCEFULL]:s[i.COERCE]);if(null===n)return null;const o=n[2],l=n[3]||"0",c=n[4]||"0",u=t.includePrerelease&&n[5]?`-${n[5]}`:"",p=t.includePrerelease&&n[6]?`+${n[6]}`:"";return a(`${o}.${l}.${c}${u}${p}`,t)}},36582:(e,t,n)=>{const r=n(71333),a=n(96082),{ANY:s}=a,i=n(9480),o=n(40289),l=[new a(">=0.0.0-0")],c=[new a(">=0.0.0")],u=(e,t,n)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===s){if(1===t.length&&t[0].semver===s)return!0;e=n.includePrerelease?l:c}if(1===t.length&&t[0].semver===s){if(n.includePrerelease)return!0;t=c}const r=new Set;let a,u,m,h,f,v,g;for(const t of e)">"===t.operator||">="===t.operator?a=p(a,t,n):"<"===t.operator||"<="===t.operator?u=d(u,t,n):r.add(t.semver);if(r.size>1)return null;if(a&&u){if(m=o(a.semver,u.semver,n),m>0)return null;if(0===m&&(">="!==a.operator||"<="!==u.operator))return null}for(const e of r){if(a&&!i(e,String(a),n))return null;if(u&&!i(e,String(u),n))return null;for(const r of t)if(!i(e,String(r),n))return!1;return!0}let y=!(!u||n.includePrerelease||!u.semver.prerelease.length)&&u.semver,$=!(!a||n.includePrerelease||!a.semver.prerelease.length)&&a.semver;y&&1===y.prerelease.length&&"<"===u.operator&&0===y.prerelease[0]&&(y=!1);for(const e of t){if(g=g||">"===e.operator||">="===e.operator,v=v||"<"===e.operator||"<="===e.operator,a)if($&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===$.major&&e.semver.minor===$.minor&&e.semver.patch===$.patch&&($=!1),">"===e.operator||">="===e.operator){if(h=p(a,e,n),h===e&&h!==a)return!1}else if(">="===a.operator&&!i(a.semver,String(e),n))return!1;if(u)if(y&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===y.major&&e.semver.minor===y.minor&&e.semver.patch===y.patch&&(y=!1),"<"===e.operator||"<="===e.operator){if(f=d(u,e,n),f===e&&f!==u)return!1}else if("<="===u.operator&&!i(u.semver,String(e),n))return!1;if(!e.operator&&(u||a)&&0!==m)return!1}return!(a&&v&&!u&&0!==m||u&&g&&!a&&0!==m||$||y)},p=(e,t,n)=>{if(!e)return t;const r=o(e.semver,t.semver,n);return r>0?e:r<0||">"===t.operator&&">="===e.operator?t:e},d=(e,t,n)=>{if(!e)return t;const r=o(e.semver,t.semver,n);return r<0?e:r>0||"<"===t.operator&&"<="===e.operator?t:e};e.exports=(e,t,n={})=>{if(e===t)return!0;e=new r(e,n),t=new r(t,n);let a=!1;e:for(const r of e.set){for(const e of t.set){const t=u(r,e,n);if(a=a||null!==t,t)continue e}if(a)return!1}return!0}},36719:(e,t,n)=>{const r=n(66283);e.exports=(e,t)=>new r(e,t).major},36744:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.EXPRESSION_OPERATORS=void 0,t.EXPRESSION_OPERATORS=[{name:"$abs",value:"$abs",score:1,meta:"expr:arith",version:"3.2.0"},{name:"$accumulator",value:"$accumulator",score:1,meta:"expr:arith",version:"4.4.0"},{name:"$add",value:"$add",score:1,meta:"expr:arith",version:"2.2.0"},{name:"$allElementsTrue",value:"$allElementsTrue",score:1,meta:"expr:set",version:"2.6.0"},{name:"$and",value:"$and",score:1,meta:"expr:bool",version:"2.2.0"},{name:"$anyElementTrue",value:"$anyElementTrue",score:1,meta:"expr:set",version:"2.6.0"},{name:"$arrayElemAt",value:"$arrayElemAt",score:1,meta:"expr:array",version:"3.2.0"},{name:"$arrayToObject",value:"$arrayToObject",score:1,meta:"expr:array",version:"3.4.4"},{name:"$binarySize",value:"$binarySize",score:1,meta:"expr:obj",version:"4.4.0"},{name:"$bsonSize",value:"$bsonSize",score:1,meta:"expr:obj",version:"4.4.0"},{name:"$ceil",value:"$ceil",score:1,meta:"expr:arith",version:"3.2.0"},{name:"$cmp",value:"$cmp",score:1,meta:"expr:comp",version:"2.2.0"},{name:"$concat",value:"$concat",score:1,meta:"expr:string",version:"2.4.0"},{name:"$concatArrays",value:"$concatArrays",score:1,meta:"expr:array",version:"3.2.0"},{name:"$cond",value:"$cond",score:1,meta:"expr:cond",version:"2.6.0"},{name:"$dateAdd",value:"$dateAdd",score:1,meta:"expr:date",version:"5.0.0"},{name:"$dateDiff",value:"$dateDiff",score:1,meta:"expr:date",version:"5.0.0"},{name:"$dateFromParts",value:"$dateFromParts",score:1,meta:"expr:date",version:"3.6.0"},{name:"$dateFromString",value:"$dateFromString",score:1,meta:"expr:date",version:"3.6.0"},{name:"$dateSubtract",value:"$dateSubtract",score:1,meta:"expr:date",version:"5.0.0"},{name:"$dateToParts",value:"$dateToParts",score:1,meta:"expr:date",version:"3.6.0"},{name:"$dateToString",value:"$dateToString",score:1,meta:"expr:date",version:"3.6.0"},{name:"$dateTrunc",value:"$dateTrunc",score:1,meta:"expr:date",version:"5.0.0"},{name:"$dayOfMonth",value:"$dayOfMonth",score:1,meta:"expr:date",version:"2.2.0"},{name:"$dayOfWeek",value:"$dayOfWeek",score:1,meta:"expr:date",version:"2.2.0"},{name:"$dayOfYear",value:"$dayOfYear",score:1,meta:"expr:date",version:"2.2.0"},{name:"$dateToString",value:"$dateToString",score:1,meta:"expr:date",version:"3.0.0"},{name:"$divide",value:"$divide",score:1,meta:"expr:arith",version:"2.2.0"},{name:"$eq",value:"$eq",score:1,meta:"expr:comp",version:"2.2.0"},{name:"$exp",value:"$exp",score:1,meta:"expr:arith",version:"3.2.0"},{name:"$filter",value:"$filter",score:1,meta:"expr:array",version:"3.2.0"},{name:"$first",value:"$first",score:1,meta:"expr:array",version:"4.4.0"},{name:"$floor",value:"$floor",score:1,meta:"expr:arith",version:"3.2.0"},{name:"$function",value:"$function",score:1,meta:"expr:arith",version:"4.4.0"},{name:"$getField",value:"$getField",score:1,meta:"expr:get",version:"5.0.0"},{name:"$gt",value:"$gt",score:1,meta:"expr:comp",version:"2.2.0"},{name:"$gte",value:"$gte",score:1,meta:"expr:comp",version:"2.2.0"},{name:"$hour",value:"$hour",score:1,meta:"expr:date",version:"2.2.0"},{name:"$ifNull",value:"$ifNull",score:1,meta:"expr:cond",version:"2.2.0"},{name:"$in",value:"$in",score:1,meta:"expr:array",version:"3.4.0"},{name:"$indexOfArray",value:"$indexOfArray",score:1,meta:"expr:array",version:"3.4.0"},{name:"$indexOfBytes",value:"$indexOfBytes",score:1,meta:"expr:string",version:"3.4.0"},{name:"$indexOfCP",value:"$indexOfCP",score:1,meta:"expr:string",version:"3.4.0"},{name:"$isArray",value:"$isArray",score:1,meta:"expr:array",version:"3.2.0"},{name:"$isNumber",value:"$isNumber",score:1,meta:"expr:arith",version:"4.4.0"},{name:"$isoDayOfWeek",value:"$isoDayOfWeek",score:1,meta:"expr:date",version:"3.4.0"},{name:"$isoWeek",value:"$isoWeek",score:1,meta:"expr:date",version:"3.4.0"},{name:"$isoWeekYear",value:"$isoWeekYear",score:1,meta:"expr:date",version:"3.4.0"},{name:"$last",value:"$last",score:1,meta:"expr:array",version:"4.4.0"},{name:"$let",value:"$let",score:1,meta:"expr:var",version:"2.6.0"},{name:"$literal",value:"$literal",score:1,meta:"expr:literal",version:"2.6.0"},{name:"$lt",value:"$lt",score:1,meta:"expr:comp",version:"2.2.0"},{name:"$lt",value:"$lte",score:1,meta:"expr:comp",version:"2.2.0"},{name:"$ln",value:"$ln",score:1,meta:"expr:arith",version:"3.2.0"},{name:"$log",value:"$log",score:1,meta:"expr:arith",version:"3.2.0"},{name:"$log10",value:"$log10",score:1,meta:"expr:arith",version:"3.2.0"},{name:"$map",value:"$map",score:1,meta:"expr:array",version:"2.6.0"},{name:"$mergeObjects",value:"$mergeObjects",score:1,meta:"expr:obj",version:"3.6.0"},{name:"$meta",value:"$meta",score:1,meta:"expr:text",version:"2.6.0"},{name:"$millisecond",value:"$millisecond",score:1,meta:"expr:date",version:"2.4.0"},{name:"$minute",value:"$minute",score:1,meta:"expr:date",version:"2.2.0"},{name:"$mod",value:"$mod",score:1,meta:"expr:arith",version:"2.2.0"},{name:"$month",value:"$month",score:1,meta:"expr:date",version:"2.2.0"},{name:"$multiply",value:"$multiply",score:1,meta:"expr:arith",version:"2.2.0"},{name:"$new",value:"$new",score:1,meta:"expr:comp",version:"2.2.0"},{name:"$not",value:"$not",score:1,meta:"expr:bool",version:"2.2.0"},{name:"$objectToArray",value:"$objectToArray",score:1,meta:"expr:array",version:"3.4.4"},{name:"$or",value:"$or",score:1,meta:"expr:bool",version:"2.2.0"},{name:"$pow",value:"$pow",score:1,meta:"expr:arith",version:"3.2.0"},{name:"$range",value:"$range",score:1,meta:"expr:array",version:"3.4.0"},{name:"$reduce",value:"$reduce",score:1,meta:"expr:array",version:"3.4.0"},{name:"$regexFind",value:"$regexFind",score:1,meta:"expr:regex",version:"4.1.11"},{name:"$regexFindAll",value:"$regexFindAll",score:1,meta:"expr:regex",version:"4.1.11"},{name:"$regexMatch",value:"$regexMatch",score:1,meta:"expr:regex",version:"4.1.11"},{name:"$replaceAll",value:"$replaceAll",score:1,meta:"expr:string",version:"4.4.0"},{name:"$replaceOne",value:"$replaceOne",score:1,meta:"expr:string",version:"4.4.0"},{name:"$reverseArray",value:"$reverseArray",score:1,meta:"expr:array",version:"3.4.0"},{name:"$second",value:"$second",score:1,meta:"expr:date",version:"2.2.0"},{name:"$setDifference",value:"$setDifference",score:1,meta:"expr:set",version:"2.6.0"},{name:"$setEquals",value:"$setEquals",score:1,meta:"expr:set",version:"2.6.0"},{name:"$setIntersection",value:"$setIntersection",score:1,meta:"expr:set",version:"2.6.0"},{name:"$setIsSubset",value:"$setIsSubset",score:1,meta:"expr:set",version:"2.6.0"},{name:"$setUnion",value:"$setUnion",score:1,meta:"expr:set",version:"2.6.0"},{name:"$similarityCosine",value:"$similarityCosine",score:1,meta:"expr:arith",version:"8.2.0"},{name:"$similarityDotProduct",value:"$similarityDotProduct",score:1,meta:"expr:arith",version:"8.2.0"},{name:"$similarityEuclidean",value:"$similarityEuclidean",score:1,meta:"expr:arith",version:"8.2.0"},{name:"$size",value:"$size",score:1,meta:"expr:array",version:"2.6.0"},{name:"$slice",value:"$slice",score:1,meta:"expr:array",version:"3.2.0"},{name:"$sortArray",value:"$sortArray",score:1,meta:"expr:array",version:"5.2.0"},{name:"$split",value:"$split",score:1,meta:"expr:string",version:"3.4.0"},{name:"$sqrt",value:"$sqrt",score:1,meta:"expr:arith",version:"3.2.0"},{name:"$strcasecmp",value:"$strcasecmp",score:1,meta:"expr:string",version:"2.2.0"},{name:"$strLenBytes",value:"$strLenBytes",score:1,meta:"expr:string",version:"3.4.0"},{name:"$strLenCP",value:"$strLenCP",score:1,meta:"expr:string",version:"3.4.0"},{name:"$substr",value:"$substr",score:1,meta:"expr:string",version:"2.2.0",deprecated:"3.4.0",replacement:"$substrBytes"},{name:"$substrBytes",value:"$substrBytes",score:1,meta:"expr:string",version:"3.4.0"},{name:"$substrCP",value:"$substrCP",score:1,meta:"expr:string",version:"3.4.0"},{name:"$subtract",value:"$subtract",score:1,meta:"expr:arith",version:"3.2.0"},{name:"$switch",value:"$switch",score:1,meta:"expr:cond",version:"3.4.0"},{name:"$toHashedIndexKey",value:"$toHashedIndexKey",score:1,meta:"expr:arith",version:"4.2.24"},{name:"$toLower",value:"$toLower",score:1,meta:"expr:string",version:"2.2.0"},{name:"$toUpper",value:"$toUpper",score:1,meta:"expr:string",version:"2.2.0"},{name:"$tsSecond",value:"$tsSecond",score:1,meta:"expr:date",version:"5.1.0"},{name:"$tsIncrement",value:"$tsIncrement",score:1,meta:"expr:date",version:"5.1.0"},{name:"$trunc",value:"$trunc",score:1,meta:"expr:arith",version:"3.2.0"},{name:"$type",value:"$type",score:1,meta:"expr:type",version:"3.4.0"},{name:"$week",value:"$week",score:1,meta:"expr:date",version:"2.2.0"},{name:"$year",value:"$year",score:1,meta:"expr:date",version:"2.2.0"},{name:"$zip",value:"$zip",score:1,meta:"expr:array",version:"3.4.0"},{name:"$bitAnd",value:"$bitAnd",score:1,meta:"expr:bit",version:"7.0.0"},{name:"$bitOr",value:"$bitOr",score:1,meta:"expr:bit",version:"7.0.0"},{name:"$bitXor",value:"$bitXor",score:1,meta:"expr:bit",version:"7.0.0"},{name:"$bitNot",value:"$bitNot",score:1,meta:"expr:bit",version:"7.0.0"}]},36749:(e,t,n)=>{const r=n(40289);e.exports=(e,t,n)=>0!==r(e,t,n)},37276:(e,t,n)=>{const r=n(71333);e.exports=(e,t)=>{try{return new r(e,t).range||"*"}catch(e){return null}}},37354:(e,t,n)=>{const r=n(57544),a=n(95323);e.exports=(e,t,n)=>{let s=null,i=null,o=null;try{o=new a(t,n)}catch(e){return null}return e.forEach((e=>{o.test(e)&&(s&&1!==i.compare(e)||(s=e,i=new r(s,n)))})),s}},37359:(e,t,n)=>{const r=n(87391);e.exports=(e,t)=>e.sort(((e,n)=>r(n,e,t)))},37385:(e,t,n)=>{e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},37391:(e,t,n)=>{const r=n(43143);e.exports=(e,t,n)=>r(e,t,">",n)},37504:function(e,t,n){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.VIEW_PIPELINE_UTILS=void 0;const a=r(n(75982)),s="8.0.0",i="8.1.0";t.VIEW_PIPELINE_UTILS={MIN_VERSION_FOR_VIEW_SEARCH_COMPATIBILITY_DE:s,MIN_VERSION_FOR_VIEW_SEARCH_COMPATIBILITY_COMPASS:i,isPipelineSearchQueryable:e=>{for(const t of e){const e=Object.keys(t)[0];if("$addFields"!==e&&"$set"!==e&&"$match"!==e)return!1;if("$match"===e){const e=t.$match,n=Object.keys(e||{});if(1!==n.length||!n.includes("$expr"))return!1}}return!0},isVersionSearchCompatibleForViewsDataExplorer:e=>{try{return a.default.gte(e,s)}catch{return!1}},isVersionSearchCompatibleForViewsCompass:e=>{try{return a.default.gte(e,i)}catch{return!1}}}},37724:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ANY_NAMESPACE=t.ANY_COLLECTION_NAMESPACE=t.TIME_SERIES=t.VIEW=t.COLLECTION=t.DATABASE=void 0,t.DATABASE="db";const n="coll";t.COLLECTION=n;const r="view";t.VIEW=r;const a="timeseries";t.TIME_SERIES=a;const s=[n,r,a];t.ANY_COLLECTION_NAMESPACE=s;const i=["db",...s];t.ANY_NAMESPACE=i},38185:(e,t,n)=>{const r=n(88825),a=n(20360);e.exports=(e,t,n)=>{let s=null,i=null,o=null;try{o=new a(t,n)}catch(e){return null}return e.forEach((e=>{o.test(e)&&(s&&1!==i.compare(e)||(s=e,i=new r(s,n)))})),s}},38358:(e,t,n)=>{const r=n(50066);e.exports=(e,t,n=!1)=>{if(e instanceof r)return e;try{return new r(e,t)}catch(e){if(!n)return null;throw e}}},38366:(e,t,n)=>{const r=/\s+/g;class a{constructor(e,t){if(t=i(t),e instanceof a)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new a(e.raw,t);if(e instanceof o)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e.trim().replace(r," "),this.set=this.raw.split("||").map((e=>this.parseRange(e.trim()))).filter((e=>e.length)),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter((e=>!g(e[0]))),0===this.set.length)this.set=[e];else if(this.set.length>1)for(const e of this.set)if(1===e.length&&y(e[0])){this.set=[e];break}}this.formatted=void 0}get range(){if(void 0===this.formatted){this.formatted="";for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+="||");const t=this.set[e];for(let e=0;e<t.length;e++)e>0&&(this.formatted+=" "),this.formatted+=t[e].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){const t=((this.options.includePrerelease&&f)|(this.options.loose&&v))+":"+e,n=s.get(t);if(n)return n;const r=this.options.loose,a=r?u[p.HYPHENRANGELOOSE]:u[p.HYPHENRANGE];e=e.replace(a,T(this.options.includePrerelease)),l("hyphen replace",e),e=e.replace(u[p.COMPARATORTRIM],d),l("comparator trim",e),e=e.replace(u[p.TILDETRIM],m),l("tilde trim",e),e=e.replace(u[p.CARETTRIM],h),l("caret trim",e);let i=e.split(" ").map((e=>b(e,this.options))).join(" ").split(/\s+/).map((e=>I(e,this.options)));r&&(i=i.filter((e=>(l("loose invalid filter",e,this.options),!!e.match(u[p.COMPARATORLOOSE]))))),l("range list",i);const c=new Map,y=i.map((e=>new o(e,this.options)));for(const e of y){if(g(e))return[e];c.set(e.value,e)}c.size>1&&c.has("")&&c.delete("");const $=[...c.values()];return s.set(t,$),$}intersects(e,t){if(!(e instanceof a))throw new TypeError("a Range is required");return this.set.some((n=>$(n,t)&&e.set.some((e=>$(e,t)&&n.every((n=>e.every((e=>n.intersects(e,t)))))))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new c(e,this.options)}catch(e){return!1}for(let t=0;t<this.set.length;t++)if(R(this.set[t],e,this.options))return!0;return!1}}e.exports=a;const s=new(n(43287)),i=n(69348),o=n(58387),l=n(67767),c=n(66283),{safeRe:u,t:p,comparatorTrimReplace:d,tildeTrimReplace:m,caretTrimReplace:h}=n(415),{FLAG_INCLUDE_PRERELEASE:f,FLAG_LOOSE:v}=n(77693),g=e=>"<0.0.0-0"===e.value,y=e=>""===e.value,$=(e,t)=>{let n=!0;const r=e.slice();let a=r.pop();for(;n&&r.length;)n=r.every((e=>a.intersects(e,t))),a=r.pop();return n},b=(e,t)=>(l("comp",e,t),e=_(e,t),l("caret",e),e=S(e,t),l("tildes",e),e=w(e,t),l("xrange",e),e=N(e,t),l("stars",e),e),E=e=>!e||"x"===e.toLowerCase()||"*"===e,S=(e,t)=>e.trim().split(/\s+/).map((e=>A(e,t))).join(" "),A=(e,t)=>{const n=t.loose?u[p.TILDELOOSE]:u[p.TILDE];return e.replace(n,((t,n,r,a,s)=>{let i;return l("tilde",e,t,n,r,a,s),E(n)?i="":E(r)?i=`>=${n}.0.0 <${+n+1}.0.0-0`:E(a)?i=`>=${n}.${r}.0 <${n}.${+r+1}.0-0`:s?(l("replaceTilde pr",s),i=`>=${n}.${r}.${a}-${s} <${n}.${+r+1}.0-0`):i=`>=${n}.${r}.${a} <${n}.${+r+1}.0-0`,l("tilde return",i),i}))},_=(e,t)=>e.trim().split(/\s+/).map((e=>x(e,t))).join(" "),x=(e,t)=>{l("caret",e,t);const n=t.loose?u[p.CARETLOOSE]:u[p.CARET],r=t.includePrerelease?"-0":"";return e.replace(n,((t,n,a,s,i)=>{let o;return l("caret",e,t,n,a,s,i),E(n)?o="":E(a)?o=`>=${n}.0.0${r} <${+n+1}.0.0-0`:E(s)?o="0"===n?`>=${n}.${a}.0${r} <${n}.${+a+1}.0-0`:`>=${n}.${a}.0${r} <${+n+1}.0.0-0`:i?(l("replaceCaret pr",i),o="0"===n?"0"===a?`>=${n}.${a}.${s}-${i} <${n}.${a}.${+s+1}-0`:`>=${n}.${a}.${s}-${i} <${n}.${+a+1}.0-0`:`>=${n}.${a}.${s}-${i} <${+n+1}.0.0-0`):(l("no pr"),o="0"===n?"0"===a?`>=${n}.${a}.${s}${r} <${n}.${a}.${+s+1}-0`:`>=${n}.${a}.${s}${r} <${n}.${+a+1}.0-0`:`>=${n}.${a}.${s} <${+n+1}.0.0-0`),l("caret return",o),o}))},w=(e,t)=>(l("replaceXRanges",e,t),e.split(/\s+/).map((e=>O(e,t))).join(" ")),O=(e,t)=>{e=e.trim();const n=t.loose?u[p.XRANGELOOSE]:u[p.XRANGE];return e.replace(n,((n,r,a,s,i,o)=>{l("xRange",e,n,r,a,s,i,o);const c=E(a),u=c||E(s),p=u||E(i),d=p;return"="===r&&d&&(r=""),o=t.includePrerelease?"-0":"",c?n=">"===r||"<"===r?"<0.0.0-0":"*":r&&d?(u&&(s=0),i=0,">"===r?(r=">=",u?(a=+a+1,s=0,i=0):(s=+s+1,i=0)):"<="===r&&(r="<",u?a=+a+1:s=+s+1),"<"===r&&(o="-0"),n=`${r+a}.${s}.${i}${o}`):u?n=`>=${a}.0.0${o} <${+a+1}.0.0-0`:p&&(n=`>=${a}.${s}.0${o} <${a}.${+s+1}.0-0`),l("xRange return",n),n}))},N=(e,t)=>(l("replaceStars",e,t),e.trim().replace(u[p.STAR],"")),I=(e,t)=>(l("replaceGTE0",e,t),e.trim().replace(u[t.includePrerelease?p.GTE0PRE:p.GTE0],"")),T=e=>(t,n,r,a,s,i,o,l,c,u,p,d)=>`${n=E(r)?"":E(a)?`>=${r}.0.0${e?"-0":""}`:E(s)?`>=${r}.${a}.0${e?"-0":""}`:i?`>=${n}`:`>=${n}${e?"-0":""}`} ${l=E(c)?"":E(u)?`<${+c+1}.0.0-0`:E(p)?`<${c}.${+u+1}.0-0`:d?`<=${c}.${u}.${p}-${d}`:e?`<${c}.${u}.${+p+1}-0`:`<=${l}`}`.trim(),R=(e,t,n)=>{for(let n=0;n<e.length;n++)if(!e[n].test(t))return!1;if(t.prerelease.length&&!n.includePrerelease){for(let n=0;n<e.length;n++)if(l(e[n].semver),e[n].semver!==o.ANY&&e[n].semver.prerelease.length>0){const r=e[n].semver;if(r.major===t.major&&r.minor===t.minor&&r.patch===t.patch)return!0}return!1}return!0}},38506:(e,t,n)=>{const r=n(47538);e.exports=(e,t)=>e.sort(((e,n)=>r(n,e,t)))},39044:(e,t,n)=>{const r=n(20332);e.exports=(e,t)=>new r(e,t).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" ")))},39149:(e,t,n)=>{const r=n(53831),a=n(42997),s=n(42734),i=n(66135),o=n(63825),l=n(90898);e.exports=(e,t,n,c)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e===n;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e!==n;case"":case"=":case"==":return r(e,n,c);case"!=":return a(e,n,c);case">":return s(e,n,c);case">=":return i(e,n,c);case"<":return o(e,n,c);case"<=":return l(e,n,c);default:throw new TypeError(`Invalid operator: ${t}`)}}},39560:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ANY_NAMESPACE=t.ANY_COLLECTION_NAMESPACE=t.TIME_SERIES=t.VIEW=t.COLLECTION=t.DATABASE=void 0,t.DATABASE="db";const n="coll";t.COLLECTION=n;const r="view";t.VIEW=r;const a="timeseries";t.TIME_SERIES=a;const s=[n,r,a];t.ANY_COLLECTION_NAMESPACE=s;const i=["db",...s];t.ANY_NAMESPACE=i},39581:(e,t,n)=>{n.d(t,{fd:()=>s,rs:()=>r}),Symbol("ZodOutput"),Symbol("ZodInput");class r{constructor(){this._map=new Map,this._idmap=new Map}add(e,...t){const n=t[0];if(this._map.set(e,n),n&&"object"==typeof n&&"id"in n){if(this._idmap.has(n.id))throw new Error(`ID ${n.id} already exists in the registry`);this._idmap.set(n.id,e)}return this}clear(){return this._map=new Map,this._idmap=new Map,this}remove(e){const t=this._map.get(e);return t&&"object"==typeof t&&"id"in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){const t=e._zod.parent;if(t){const n={...this.get(t)??{}};return delete n.id,{...n,...this._map.get(e)}}return this._map.get(e)}has(e){return this._map.has(e)}}function a(){return new r}const s=a()},40030:(e,t,n)=>{var r=n(65994).e;Object.defineProperty(t,"__esModule",{value:!0}),t.signals=void 0,t.signals=[],t.signals.push("SIGHUP","SIGINT","SIGTERM"),"win32"!==r.platform&&t.signals.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===r.platform&&t.signals.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT")},40194:(e,t,n)=>{const r=n(72857),a=n(67094),{ANY:s}=a,i=n(12876),o=n(32674),l=[new a(">=0.0.0-0")],c=[new a(">=0.0.0")],u=(e,t,n)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===s){if(1===t.length&&t[0].semver===s)return!0;e=n.includePrerelease?l:c}if(1===t.length&&t[0].semver===s){if(n.includePrerelease)return!0;t=c}const r=new Set;let a,u,m,h,f,v,g;for(const t of e)">"===t.operator||">="===t.operator?a=p(a,t,n):"<"===t.operator||"<="===t.operator?u=d(u,t,n):r.add(t.semver);if(r.size>1)return null;if(a&&u){if(m=o(a.semver,u.semver,n),m>0)return null;if(0===m&&(">="!==a.operator||"<="!==u.operator))return null}for(const e of r){if(a&&!i(e,String(a),n))return null;if(u&&!i(e,String(u),n))return null;for(const r of t)if(!i(e,String(r),n))return!1;return!0}let y=!(!u||n.includePrerelease||!u.semver.prerelease.length)&&u.semver,$=!(!a||n.includePrerelease||!a.semver.prerelease.length)&&a.semver;y&&1===y.prerelease.length&&"<"===u.operator&&0===y.prerelease[0]&&(y=!1);for(const e of t){if(g=g||">"===e.operator||">="===e.operator,v=v||"<"===e.operator||"<="===e.operator,a)if($&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===$.major&&e.semver.minor===$.minor&&e.semver.patch===$.patch&&($=!1),">"===e.operator||">="===e.operator){if(h=p(a,e,n),h===e&&h!==a)return!1}else if(">="===a.operator&&!i(a.semver,String(e),n))return!1;if(u)if(y&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===y.major&&e.semver.minor===y.minor&&e.semver.patch===y.patch&&(y=!1),"<"===e.operator||"<="===e.operator){if(f=d(u,e,n),f===e&&f!==u)return!1}else if("<="===u.operator&&!i(u.semver,String(e),n))return!1;if(!e.operator&&(u||a)&&0!==m)return!1}return!(a&&v&&!u&&0!==m||u&&g&&!a&&0!==m||$||y)},p=(e,t,n)=>{if(!e)return t;const r=o(e.semver,t.semver,n);return r>0?e:r<0||">"===t.operator&&">="===e.operator?t:e},d=(e,t,n)=>{if(!e)return t;const r=o(e.semver,t.semver,n);return r<0?e:r>0||"<"===t.operator&&"<="===e.operator?t:e};e.exports=(e,t,n={})=>{if(e===t)return!0;e=new r(e,n),t=new r(t,n);let a=!1;e:for(const r of e.set){for(const e of t.set){const t=u(r,e,n);if(a=a||null!==t,t)continue e}if(a)return!1}return!0}},40214:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.VALIDATION_TEMPLATE=void 0,t.VALIDATION_TEMPLATE='/**\n * This is a starter template for a schema validation rule for a collection.\n * More information on schema validation rules can be found at:\n * https://www.mongodb.com/docs/manual/core/schema-validation/\n */\n{\n $jsonSchema: {\n title: "Library.books",\n bsonType: "object",\n required: ["fieldname1", "fieldname2"],\n properties: {\n fieldname1: {\n bsonType: "string",\n description: "Fieldname1 must be a string",\n },\n fieldname2: {\n bsonType: "int",\n description: "Fieldname2 must be an integer",\n },\n arrayFieldName: {\n bsonType: "array",\n items: {\n bsonType: "string"\n },\n description: "arrayFieldName must be an array of strings"\n },\n }\n }\n}'},40289:(e,t,n)=>{const r=n(41694);e.exports=(e,t,n)=>new r(e,n).compare(new r(t,n))},40383:e=>{const t=/^[0-9]+$/,n=(e,n)=>{const r=t.test(e),a=t.test(n);return r&&a&&(e=+e,n=+n),e===n?0:r&&!a?-1:a&&!r?1:e<n?-1:1};e.exports={compareIdentifiers:n,rcompareIdentifiers:(e,t)=>n(t,e)}},40447:(e,t,n)=>{const r=n(17914);e.exports=(e,t)=>{const n=r(e,t);return n?n.version:null}},40594:e=>{const t=Object.freeze({loose:!0}),n=Object.freeze({});e.exports=e=>e?"object"!=typeof e?t:e:n},40727:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.REQUIRED_AS_FIRST_STAGE=t.FULL_SCAN_STAGES=t.OUT_STAGES=t.STAGE_OPERATOR_NAMES=t.STAGE_OPERATORS=void 0;const r=n(91030),a=n(21022),s=[{name:"$addFields",value:"$addFields",label:"$addFields",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"3.4.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Adds new field(s) to a document with a computed value, or reassigns an existing field(s) with a computed value.",comment:"/**\n * newField: The new field name.\n * expression: The new field expression.\n */\n",snippet:"{\n ${1:newField}: ${2:expression}, ${3:...}\n}"},{name:"$bucket",value:"$bucket",label:"$bucket",outputStage:!1,fullScan:!0,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"3.4.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Categorizes incoming documents into groups, called buckets, based on specified boundaries.",comment:"/**\n * groupBy: The expression to group by.\n * boundaries: An array of the lower boundaries for each bucket.\n * default: The bucket name for documents that do not fall within the specified boundaries\n * output: {\n * outputN: Optional. The output object may contain a single or numerous field names used to accumulate values per bucket.\n * }\n */\n",snippet:"{\n groupBy: ${1:expression},\n boundaries: [ ${2:lowerbound}, ${3:...} ],\n default: ${4:literal},\n output: {\n ${5:outputN}: { ${6:accumulator} }, ${7:...}\n }\n}"},{name:"$bucketAuto",value:"$bucketAuto",label:"$bucketAuto",outputStage:!1,fullScan:!0,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"3.4.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Automatically categorizes documents into a specified number of buckets, attempting even distribution if possible.",comment:"/**\n * groupBy: The expression to group by.\n * buckets: The desired number of buckets\n * output: {\n * outputN: Optional. The output object may contain a single or numerous field names used to accumulate values per bucket.\n * }\n * granularity: Optional number series\n */\n",snippet:"{\n groupBy: ${1:expression},\n buckets: ${2:number},\n output: {\n ${3:outputN}: ${4:accumulator}, ${5:...}\n },\n granularity: '${6:string}'\n}"},{name:"$changeStream",value:"$changeStream",label:"$changeStream",outputStage:!1,fullScan:!1,firstStage:!0,score:1,env:[r.ATLAS,r.ON_PREM],meta:"stage",version:"4.2.0",apiVersions:[1],namespaces:[a.DATABASE],description:"Returns a Change Stream cursor for the collection.",comment:"/**\n * allChangesForCluster: Optional boolean to include all changes in the cluster.\n * fullDocument: Optional value to request a copy of full document when modified by update operations (Introduced in 6.0).\n * fullDocumentBeforeChange: Value to configure whether to return a full document before the change or not.\n * resumeAfter: Specifies a resume token as the logical starting point for the change stream. Cannot be used with startAfter or startAtOperationTime fields.\n * showExpandedEvents: Specifies whether to include additional change events, such as such as DDL and index operations (Introduced in 6.0).\n * startAfter: Specifies a resume token as the logical starting point for the change stream. Cannot be used with resumeAfter or startAtOperationTime fields.\n * startAtOperationTime: Specifies a time as the logical starting point for the change stream. Cannot be used with resumeAfter or startAfter fields.\n */\n",snippet:"{\n allChangesForCluster: ${1:boolean},\n fullDocument: '${2:string}',\n fullDocumentBeforeChange: '${3:string}',\n resumeAfter: ${4:resumeToken},\n showExpandedEvents: ${5:boolean},\n startAfter: ${6:resumeToken},\n startAtOperationTime: ${7:time},\n}"},{name:"$collStats",value:"$collStats",label:"$collStats",outputStage:!1,fullScan:!1,firstStage:!0,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"3.4.0",apiVersions:[],namespaces:[...a.ANY_COLLECTION_NAMESPACE],description:"Returns statistics regarding a collection or view.",comment:"/**\n * histograms: Optional latency histograms.\n * storageStats: Optional storage stats.\n */\n",snippet:"{\n latencyStats: {\n histograms: ${1:boolean}\n },\n storageStats: {${2:}},\n}"},{name:"$count",value:"$count",label:"$count",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"2.2.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Returns a count of the number of documents at this stage of the aggregation pipeline.",comment:"/**\n * Provide the field name for the count.\n */\n",snippet:"'${1:string}'"},{name:"$currentOp",value:"$currentOp",label:"$currentOp",outputStage:!1,fullScan:!1,firstStage:!0,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"3.6.0",apiVersions:[1],namespaces:[a.DATABASE],description:"Returns a cursor over information on active and/or dormant operations for the MongoDB deployment as well as inactive sessions that are holding locks as part of a transaction.",comment:"/**\n * allUsers: Optional boolean value to specify whether to return operations for all users or not.\n * idleConnections: Optional boolean value to specify whether to return all operations including idle connections or not.\n * idleCursors: Optional boolean value to specify whether to report on cursors that are idle or not.\n * idleSessions: Optional boolean value to specify whether to report on dormant sessions or not.\n * localOps: Optional boolean value to specify whether to report on operations running locally on targetted mongos or not.\n * backtrace: Optional boolean value to specify whether callstack information is returned as part of the waitingForLatch output field.\n */\n",snippet:"{\n allUsers: ${1:false},\n idleConnections: ${2:false},\n idleCursors: ${3:false},\n idleSessions: ${4:true},\n localOps: ${5:false},\n backtrace: ${6:false},\n}"},{name:"$densify",value:"$densify",label:"$densify",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"5.1.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Creates new documents to eliminate the gaps in the time or numeric domain at the required granularity level.",comment:"/**\n * field: The required field to densify.\n * partitionByFields: The set of fields that acts as a compound key to define each partition.\n * range: {\n * step: The amount to increment the field value in each document.\n * unit: If specified field must evaluate to a date for every document in the collection, otherwise must evaluate to a numeric.\n * bounds: A string or array of numeric/date bounds, corresponding to the type of the field.\n * }\n */\n",snippet:"{\n field: ${1:string},\n partitionByFields: [${2:string}, ${3:string}, ...],\n range: {\n step: ${4:number},\n unit: ${5:string},\n bounds: [${6:lowerbound}, ${7:upperbound}, ...]\n }\n}"},{name:"$documents",value:"$documents",label:"$documents",outputStage:!1,fullScan:!1,firstStage:!0,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"4.4.9",apiVersions:[1],namespaces:[a.DATABASE],description:"Returns literal documents from input values.",comment:"/**\n * expression: Any valid expression.\n */\n",snippet:"{\n ${1:expression}\n}"},{name:"$facet",value:"$facet",label:"$facet",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"3.4.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Allows for multiple parellel aggregations to be specified.",comment:"/**\n * outputFieldN: The first output field.\n * stageN: The first aggregation stage.\n */\n",snippet:"{\n ${1:outputFieldN}: [ ${2:stageN}, ${3:...} ]\n}"},{name:"$fill",value:"$fill",label:"$fill",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"5.3.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Populates null and missing field values within documents.",comment:'/**\n * sortBy: Syntax is the same as $sort, required if "method" is used in at least one output spec otherwise optional\n * partitionBy: Optional, default is a single partition. Specification is the same as _id in $group (same as partitionBy in window functions).\n * partitionByFields: Optional, set of fields that acts as a compound key to define each partition.\n * output - Required, object for each field to fill in. For a single field, can be a single object.\n * output.<field> - A field to be filled with value, if missing or null in the current document.\n */\n',snippet:"{\n sortBy: ${1:sortSpec},\n partitionBy: ${2:expression},\n partitionByFields: [${3:string}, ${4:string}, ...],\n output: {\n field1: {value: ${5:expression}},\n field2: {method: ${6:string}},\n ...\n }\n}"},{name:"$geoNear",value:"$geoNear",label:"$geoNear",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"2.4.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Returns documents based on proximity to a geospatial point.",comment:"/**\n * near: The point to search near.\n * distanceField: The calculated distance.\n * maxDistance: The maximum distance, in meters, documents can be before being excluded from results.\n * query: Limits results that match the query\n * includeLocs: Optional. Labels and includes the point used to match the document.\n * num: Optional. The maximum number of documents to return.\n * spherical: Defaults to false. Specifies whether to use spherical geometry.\n */\n",snippet:"{\n near: { type: 'Point', coordinates: [ ${1:number}, ${2:number} ] },\n distanceField: '${3:string}',\n maxDistance: ${4:number},\n query: {${5}},\n includeLocs: '${6}',\n num: ${7:number},\n spherical: ${8:boolean}\n}"},{name:"$graphLookup",value:"$graphLookup",label:"$graphLookup",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"3.4.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Performs a recursive search on a collection.",comment:"/**\n * from: The target collection.\n * startWith: Expression to start.\n * connectFromField: Field to connect.\n * connectToField: Field to connect to.\n * as: Name of the array field.\n * maxDepth: Optional max recursion depth.\n * depthField: Optional Name of the depth field.\n * restrictSearchWithMatch: Optional query.\n */\n",snippet:"{\n from: '${1:string}',\n startWith: ${2:expression},\n connectFromField: '${3:string}',\n connectToField: '${4:string}',\n as: '${5:string}',\n maxDepth: ${6:number},\n depthField: '${7:string}',\n restrictSearchWithMatch: {${8}}\n}"},{name:"$group",value:"$group",label:"$group",outputStage:!1,fullScan:!0,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"2.2.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Groups documents by a specified expression.",comment:"/**\n * _id: The id of the group.\n * fieldN: The first field name.\n */\n",snippet:"{\n _id: ${1:expression},\n ${2:fieldN}: {\n ${3:accumulatorN}: ${4:expressionN}\n }\n}"},{name:"$indexStats",value:"$indexStats",label:"$indexStats",outputStage:!1,fullScan:!1,firstStage:!0,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"3.2.0",apiVersions:[],namespaces:[...a.ANY_NAMESPACE],description:"Returns statistics regarding the use of each index for the collection.",comment:"/**\n * No parameters.\n */\n",snippet:"{}"},{name:"$limit",value:"$limit",label:"$limit",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"2.2.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Limits the number of documents that flow into subsequent stages.",comment:"/**\n * Provide the number of documents to limit.\n */\n",snippet:"${1:number}"},{name:"$listLocalSessions",value:"$listLocalSessions",label:"$listLocalSessions",outputStage:!1,fullScan:!1,firstStage:!0,score:1,env:[r.ATLAS,r.ON_PREM],meta:"stage",version:"3.6.0",apiVersions:[1],namespaces:[a.DATABASE],description:"Lists the sessions cached in memory by the mongod or mongos instance.",comment:"/**\n * users: Optional list of users for which local sessions need to be returned.\n * allUsers: Optional boolean value to specify whether to return local sessions for all users or not.\n */\n",snippet:"{\n allUsers: ${1:false},\n users: [\n { user: '${2:string}', db: '${3:string}' }\n ]\n}"},{name:"$lookup",value:"$lookup",label:"$lookup",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"3.2.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Performs a join between two collections.",comment:"/**\n * from: The target collection.\n * localField: The local join field.\n * foreignField: The target join field.\n * as: The name for the results.\n * pipeline: Optional pipeline to run on the foreign collection.\n * let: Optional variables to use in the pipeline field stages.\n */\n",snippet:"{\n from: ${1:collection},\n localField: ${2:field},\n foreignField: ${3:field},\n as: ${4:result}\n}"},{name:"$match",value:"$match",label:"$match",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"2.2.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Filters the document stream to allow only matching documents to pass through to subsequent stages.",comment:"/**\n * query: The query in MQL.\n */\n",snippet:"{\n ${1:query}\n}"},{name:"$merge",value:"$merge",label:"$merge",outputStage:!0,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ON_PREM],meta:"stage",version:"4.1.11",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Merges the resulting documents into a collection, optionally overriding existing documents.",comment:"/**\n * into: The target collection.\n * on: Fields to identify.\n * let: Defined variables.\n * whenMatched: Action for matching docs.\n * whenNotMatched: Action for non-matching docs.\n */\n",snippet:"{\n into: '${1:string}',\n on: '${2:string}',\n let: '${3:specification(s)}',\n whenMatched: '${4:string}',\n whenNotMatched: '${5:string}'\n}"},{name:"$merge",value:"$merge",label:"$merge",outputStage:!0,fullScan:!1,firstStage:!1,score:1,env:[r.ADL],meta:"stage",version:"4.0.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Merges the resulting documents into a collection, optionally overriding existing documents.",comment:"/**\n * atlas: Location to write the documents from the aggregation pipeline.\n * on: Fields to identify.\n * let: Defined variables.\n * whenMatched: Action for matching docs.\n * whenNotMatched: Action for non-matching docs.\n */\n",snippet:"{\n into: {\n atlas: {\n clusterName: '${1:atlasClusterName}',\n db: '${2:database}',\n coll: '${3:collection}',\n projectId: '${4:optionalAtlasProjectId}'\n }\n },\n on: '${5:identifier}',\n let: { ${6:specification(s)} },\n whenMatched: '${7:string}',\n whenNotMatched: '${8:string}'\n}"},{name:"$out",value:"$out",label:"$out",outputStage:!0,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ON_PREM],meta:"stage",version:"2.2.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Writes the result of a pipeline to a new or existing collection.",comment:"/**\n * Provide the name of the output database and collection.\n */\n",snippet:"{\n db: '${1:string}',\n coll: '${2:string}',\n /*\n timeseries: {\n timeField: '${3:field}',\n bucketMaxSpanSeconds: '${4:number}',\n granularity: '${5:granularity}'\n }\n */\n}"},{name:"$out",value:"$out",label:"$out",outputStage:!0,fullScan:!1,firstStage:!1,score:1,env:[r.ADL],meta:"stage",version:"4.0.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Writes the result of a pipeline to an Atlas cluster, S3 bucket, or Azure Blob Storage.",comment:"/**\n * Use any one of the following:\n * s3: Parameters to save the data to S3.\n * atlas: Parameters to save the data to Atlas. Example:\n * {\n * atlas: {\n * db: 'string',\n * coll: 'string',\n * projectId: 'string',\n * clusterName: 'string'\n * }\n * },\n * azure: Parameters to save the data to Azure. Example:\n * {\n * azure: {\n * serviceURL: 'string',\n * containerName: 'string',\n * region: 'string,\n * filename: 'string',\n * format: {\n * name: 'string',\n * maxFileSize: 'string',\n * maxRowGroupSize: 'string',\n * columnCompression: 'string'\n * },\n * errorMode: 'string'\n * }\n * }\n */\n",snippet:"{\n s3: {\n bucket: '${1:string}',\n region: '${2:string}',\n filename: '${3:string}',\n format: {\n name: '${4:string}',\n maxFileSize: '${5:bytes}',\n maxRowGroupSize: '${6:string}',\n columnCompression: '${7:string}'\n },\n errorMode: '${8:string}'\n }\n}"},{name:"$project",value:"$project",label:"$project",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"2.2.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Adds new field(s) to a document with a computed value, or reassigns an existing field(s) with a computed value. Unlike $addFields, $project can also remove fields.",comment:"/**\n * specifications: The fields to\n * include or exclude.\n */\n",snippet:"{\n ${1:specification(s)}\n}"},{name:"$rankFusion",value:"$rankFusion",label:"$rankFusion",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS],meta:"stage",version:"8.0.14",apiVersions:[],namespaces:[a.COLLECTION],description:"Combines multiple pipelines using reciprocal rank fusion to create hybrid search results.",comment:'/**\n * input.pipelines: Required. Map from name to input pipeline. Each pipeline must be a Ranked Selection Pipeline operating on the same collection. Minimum of one pipeline.\n * combination.weights: Optional. Map from pipeline name to numbers (non-negative). If unspecified, default weight is 1 for each pipeline.\n * scoreDetails: Optional. Default false. Set to true to include detailed scoring information in {$meta: "scoreDetails"} for debugging and tuning.\n */\n',snippet:"{\n input: {\n pipelines: {\n ${1:searchPipeline}: [\n {$search: {${2:searchStage}}},\n {$limit: ${3:limit}}\n ],\n ${4:vectorPipeline}: [\n {$vectorSearch: {${5:vectorSearchStage}}}\n ]\n }\n },\n combination: {\n weights: {\n ${6:searchPipeline}: ${7:number},\n ${8:vectorPipeline}: ${9:number}\n }\n },\n scoreDetails: ${10:false}\n}"},{name:"$redact",value:"$redact",label:"$redact",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"2.6.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Restricts the content for each document based on information stored in the documents themselves",comment:"/**\n * expression: Any valid expression that\n * evaluates to $$DESCEND, $$PRUNE, or $$KEEP.\n */\n",snippet:"{\n ${1:expression}\n}"},{name:"$replaceRoot",value:"$replaceRoot",label:"$replaceRoot",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"3.4.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Replaces a document with the specified embedded document.",comment:"/**\n * replacementDocument: A document or string.\n */\n",snippet:"{\n newRoot: ${1:replacementDocument}\n}"},{name:"$replaceWith",value:"$replaceWith",label:"$replaceWith",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"4.2.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Replaces a document with the specified embedded document.",comment:"/**\n * replacementDocument: A document or string.\n */\n",snippet:"{\n newWith: ${1:replacementDocument}\n}"},{name:"$sample",value:"$sample",label:"$sample",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"3.2.0",apiVersions:[1],namespaces:[...a.ANY_COLLECTION_NAMESPACE],description:"Randomly selects the specified number of documents from its input.",comment:"/**\n * size: The number of documents to sample.\n */\n",snippet:"{\n size: ${1:number}\n}"},{name:"$scoreFusion",value:"$scoreFusion",label:"$scoreFusion",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS],meta:"stage",version:"8.2.0",apiVersions:[],namespaces:[a.COLLECTION],description:"Combines multiple pipelines using relative score fusion to create hybrid search results.",comment:"/**\n * input.pipelines: Required. Map from name to input pipeline. Each pipeline must be operating on the same collection. Minimum of one pipeline.\n * input.normalization: Required. Normalizes the score to the range 0 to 1 before combining the results. Value can be none, sigmoid or minMaxScaler.\n * combination.weights: Optional. Map from pipeline name to numbers (non-negative). If unspecified, default weight is 1 for each pipeline.\n * combination.method: Optional. Specifies method for combining scores. Value can be avg or expression. Default is avg.\n * combination.expression: Optional. This is the custom expression that is used when combination.method is set to expression.\n * scoreDetails: Optional. Default false. Set to true to include detailed scoring information.\n */\n",snippet:"{\n input: {\n pipelines: {\n ${1:searchPipeline}: [\n {$search: {${2:searchStage}}},\n {$limit: ${3:limit}}\n ],\n ${4:vectorPipeline}: [\n {$vectorSearch: {${5:vectorSearchStage}}}\n ]\n },\n normalization: '${6:none|sigmoid|minMaxScaler}'\n },\n combination: {\n weights: {\n ${7:searchPipeline}: ${8:number},\n ${9:vectorPipeline}: ${10:number}\n },\n method: '${11:avg|expression}',\n expression: '${12:expression}'\n },\n scoreDetails: ${13:false}\n}"},{name:"$search",value:"$search",label:"$search",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS],meta:"stage",version:"4.1.11",apiVersions:[],namespaces:[a.COLLECTION,a.VIEW],description:"Performs a full-text search on the specified field(s).",comment:"/**\n * index: The name of the Search index.\n * text: Analyzed search, with required fields of query and path, the analyzed field(s) to search. Use matchCriteria to match 'any' or 'all' query terms.\n * compound: Combines ops.\n * span: Find in text field regions.\n * exists: Test for presence of a field.\n * near: Find near number or date.\n * range: Find in numeric or date range.\n */\n",snippet:"{\n index: '${1:string}',\n text: {\n query: '${2:string}',\n path: '${3:string}',\n matchCriteria: '${4:any}',\n }\n}"},{name:"$searchMeta",value:"$searchMeta",label:"$searchMeta",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS],meta:"stage",version:"4.4.9",apiVersions:[],namespaces:[a.COLLECTION,a.VIEW],description:"Performs a full-text search on the specified field(s) and gets back only the generated search meta data from a query.",comment:"/**\n * index: The name of the Search index.\n * count: The count of the results.\n * facet: {\n * operator: Analyzed search, with required fields of query and path, can either be replaced with the name of a valid operator.\n * facets: {\n * stringFacet: Narrows search results based on unique string values, with required fields of type and path.\n * numberFacet: Narrows search results by breaking them up into separate ranges of numbers, with required fields of type, path, and boundaries.\n * dateFacet: Narrows search results by breaking them up into separate ranges of dates, with required fields of type, path, and boundaries.\n * }\n * }\n */\n",snippet:"{\n index: ${1:string},\n facet: {\n operator: {\n text: {\n query: ${2:string},\n path: ${3:string}\n }\n },\n facets: {\n ${4:stringFacet}: {\n type: ${5:string},\n path: ${6:string},\n numBuckets: ${7:integer}\n },\n numberFacet: {\n type: 'number',\n path: ${8:string},\n boundaries: [${9:lowerbound}, ${10:upperbound}, ...],\n default: ${11:string}\n }\n }\n }\n}"},{name:"$set",value:"$set",label:"$set",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"4.2.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Adds new fields to documents. $set outputs documents that contain all existing fields from the input documents and newly added fields.",comment:"/**\n * field: The field name\n * expression: The expression.\n */\n",snippet:"{\n ${1:field}: ${2:expression}\n}"},{name:"$setWindowFields",value:"$setWindowFields",label:"$setWindowFields",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"5.0.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Capable of partitioning incoming data, and can apply one or more functions to defined windows within each partition.",comment:"/**\n * partitionBy: partitioning of data.\n * sortBy: fields to sort by.\n * output: {\n * path: {\n * function: The window function to compute over the given window.\n * window: {\n * documents: A number of documents before and after the current document.\n * range: A range of possible values around the value in the current document's sortBy field.\n * unit: Specifies the units for the window bounds.\n * }\n * }\n * }\n */\n",snippet:"{\n partitionBy: ${1:expression},\n sortBy: ${2:sortSpec},\n output: {\n ${3:path}: {\n ${4:function}: ${5:functionArgs},\n window: {\n documents: [${6:lowerbound}, ${7:upperbound}],\n range: [${8:lowerbound}, ${9:upperbound}],\n unit: ${10:string}\n }\n },\n ${11:path2}: ...\n }\n}"},{name:"$skip",value:"$skip",label:"$skip",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"2.2.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Skips a specified number of documents before advancing to the next stage.",comment:"/**\n * Provide the number of documents to skip.\n */\n",snippet:"${1:number}"},{name:"$sort",value:"$sort",label:"$sort",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"2.2.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Reorders the document stream by a specified sort key and direction.",comment:"/**\n * Provide any number of field/order pairs.\n */\n",snippet:"{\n ${1:field1}: ${2:sortOrder}\n}"},{name:"$sortByCount",value:"$sortByCount",label:"$sortByCount",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"3.4.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Groups incoming documents based on the value of a specified expression, then computes the count of documents in each distinct group.",comment:"/**\n * expression: Grouping expression or string.\n */\n",snippet:"{\n ${1:expression}\n}"},{name:"$unionWith",value:"$unionWith",label:"$unionWith",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"4.4.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Perform a union with a pipeline on another collection.",comment:"/**\n * coll: The collection name.\n * pipeline: The pipeline on the other collection.\n */\n",snippet:"{\n coll: '${1:coll}',\n pipeline: [${2:pipeline}]\n}"},{name:"$unset",value:"$unset",label:"$unset",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"4.2.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Excludes fields from the result document.",comment:"/**\n * Provide the field name to exclude.\n * To exclude multiple fields, pass the field names in an array.\n */\n",snippet:"'${1:string}'"},{name:"$unwind",value:"$unwind",label:"$unwind",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"2.2.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Outputs a new document for each element in a specified array. ",comment:"/**\n * path: Path to the array field.\n * includeArrayIndex: Optional name for index.\n * preserveNullAndEmptyArrays: Optional\n * toggle to unwind null and empty values.\n */\n",snippet:"{\n path: ${1:path},\n includeArrayIndex: '${2:string}',\n preserveNullAndEmptyArrays: ${3:boolean}\n}"},{name:"$vectorSearch",value:"$vectorSearch",label:"$vectorSearch",outputStage:!1,fullScan:!1,firstStage:!0,score:1,env:[r.ATLAS],meta:"stage",version:">=6.0.10 <7.0.0 || >=7.0.2",apiVersions:[],namespaces:[a.COLLECTION,a.VIEW],description:"Performs a kNN search on embeddings in the specified field(s)",comment:"/**\n * queryVector: Array of numbers of BSON types `int` or `double` that represent the query vector. The array size must match the number of vector dimensions specified in the index for the field. (Required)\n * path: The field to search. (Required)\n * numCandidates: Number of nearest neighbors to use during the search. You can specify a number higher than the number of documents to return (`limit`) to increase accuracy. (Required)\n * index: Name of the Atlas Search index to use. (Required)\n * limit: Number (of type `int` only) of documents to return in the results. (Required)\n * filter: Any MongoDB Query Language (MQL) match expression that compares an indexed field with a boolean, number (not decimals), or string to use as a prefilter. (Optional)\n * exact: Choose between false for ANN (Approximate Nearest Neighbor) and true for ENN (Exact Nearest Neighbor). Defaults to false. (Optional)\n */\n",snippet:"{\n queryVector: [${1:dimension1}, ${2:dimension2}, ...],\n path: ${3:string},\n numCandidates: ${4:numCandidates},\n index: ${5:string},\n limit: ${6:limit},\n filter: {${7:expression}},\n exact: ${8:boolean}\n}"}];t.STAGE_OPERATORS=s;const i=s.map((e=>e.name));t.STAGE_OPERATOR_NAMES=i;const o=s.filter((e=>e.outputStage));t.OUT_STAGES=o;const l=s.filter((e=>e.fullScan));t.FULL_SCAN_STAGES=l;const c=s.filter((e=>e.firstStage));t.REQUIRED_AS_FIRST_STAGE=c},40811:(e,t,n)=>{var r=n(4414),a=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],s=["scalar","sequence","mapping"];e.exports=function(e,t){var n,i;if(t=t||{},Object.keys(t).forEach((function(t){if(-1===a.indexOf(t))throw new r('Unknown option "'+t+'" is met in definition of "'+e+'" YAML type.')})),this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(e){return e},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.defaultStyle=t.defaultStyle||null,this.styleAliases=(n=t.styleAliases||null,i={},null!==n&&Object.keys(n).forEach((function(e){n[e].forEach((function(t){i[String(t)]=e}))})),i),-1===s.indexOf(this.kind))throw new r('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}},40957:function(e,t,n){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.VIEW_PIPELINE_UTILS=void 0;const a=r(n(59591)),s="8.0.0",i="8.1.0";t.VIEW_PIPELINE_UTILS={MIN_VERSION_FOR_VIEW_SEARCH_COMPATIBILITY_DE:s,MIN_VERSION_FOR_VIEW_SEARCH_COMPATIBILITY_COMPASS:i,isPipelineSearchQueryable:e=>{for(const t of e){const e=Object.keys(t)[0];if("$addFields"!==e&&"$set"!==e&&"$match"!==e)return!1;if("$match"===e){const e=t.$match,n=Object.keys(e||{});if(1!==n.length||!n.includes("$expr"))return!1}}return!0},isVersionSearchCompatibleForViewsDataExplorer:e=>{try{return a.default.gte(e,s)}catch{return!1}},isVersionSearchCompatibleForViewsCompass:e=>{try{return a.default.gte(e,i)}catch{return!1}}}},41163:(e,t,n)=>{var r;Object.defineProperty(t,"__esModule",{value:!0}),t.unload=t.load=t.onExit=t.signals=void 0;const a=n(40030);Object.defineProperty(t,"signals",{enumerable:!0,get:function(){return a.signals}});const s=e=>!!e&&"object"==typeof e&&"function"==typeof e.removeListener&&"function"==typeof e.emit&&"function"==typeof e.reallyExit&&"function"==typeof e.listeners&&"function"==typeof e.kill&&"number"==typeof e.pid&&"function"==typeof e.on,i=Symbol.for("signal-exit emitter"),o=globalThis,l=Object.defineProperty.bind(Object);class c{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(o[i])return o[i];l(o,i,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(e,t){this.listeners[e].push(t)}removeListener(e,t){const n=this.listeners[e],r=n.indexOf(t);-1!==r&&(0===r&&1===n.length?n.length=0:n.splice(r,1))}emit(e,t,n){if(this.emitted[e])return!1;this.emitted[e]=!0;let r=!1;for(const a of this.listeners[e])r=!0===a(t,n)||r;return"exit"===e&&(r=this.emit("afterExit",t,n)||r),r}}class u{}const p=globalThis.process;var d;d=s(p)?new class extends u{#e="win32"===p.platform?"SIGINT":"SIGHUP";#t=new c;#n;#r;#a;#s={};#i=!1;constructor(e){super(),this.#n=e,this.#s={};for(const t of a.signals)this.#s[t]=()=>{const n=this.#n.listeners(t);let{count:r}=this.#t;const a=e;if("object"==typeof a.__signal_exit_emitter__&&"number"==typeof a.__signal_exit_emitter__.count&&(r+=a.__signal_exit_emitter__.count),n.length===r){this.unload();const n=this.#t.emit("exit",null,t),r="SIGHUP"===t?this.#e:t;n||e.kill(e.pid,r)}};this.#a=e.reallyExit,this.#r=e.emit}onExit(e,t){if(!s(this.#n))return()=>{};!1===this.#i&&this.load();const n=t?.alwaysLast?"afterExit":"exit";return this.#t.on(n,e),()=>{this.#t.removeListener(n,e),0===this.#t.listeners.exit.length&&0===this.#t.listeners.afterExit.length&&this.unload()}}load(){if(!this.#i){this.#i=!0,this.#t.count+=1;for(const e of a.signals)try{const t=this.#s[e];t&&this.#n.on(e,t)}catch(e){}this.#n.emit=(e,...t)=>this.#o(e,...t),this.#n.reallyExit=e=>this.#l(e)}}unload(){this.#i&&(this.#i=!1,a.signals.forEach((e=>{const t=this.#s[e];if(!t)throw new Error("Listener not defined for signal: "+e);try{this.#n.removeListener(e,t)}catch(e){}})),this.#n.emit=this.#r,this.#n.reallyExit=this.#a,this.#t.count-=1)}#l(e){return s(this.#n)?(this.#n.exitCode=e||0,this.#t.emit("exit",this.#n.exitCode,null),this.#a.call(this.#n,this.#n.exitCode)):0}#o(e,...t){const n=this.#r;if("exit"===e&&s(this.#n)){"number"==typeof t[0]&&(this.#n.exitCode=t[0]);const r=n.call(this.#n,e,...t);return this.#t.emit("exit",this.#n.exitCode,null),r}return n.call(this.#n,e,...t)}}(p):new class extends u{onExit(){return()=>{}}load(){}unload(){}},r={onExit:(e,t)=>d.onExit(e,t),load:()=>d.load(),unload:()=>d.unload()},t.onExit=r.onExit,t.load=r.load,t.unload=r.unload},41573:(e,t,n)=>{n.d(t,{Ay:()=>a});var r=n(87494);const a=r;r.MAX_DATABASE_NAME_LENGTH,r.sort},41694:(e,t,n)=>{const r=n(72082),{MAX_LENGTH:a,MAX_SAFE_INTEGER:s}=n(4292),{safeRe:i,t:o}=n(18104),l=n(8573),{compareIdentifiers:c}=n(90733);class u{constructor(e,t){if(t=l(t),e instanceof u){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if("string"!=typeof e)throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>a)throw new TypeError(`version is longer than ${a} characters`);r("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const n=e.trim().match(t.loose?i[o.LOOSE]:i[o.FULL]);if(!n)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>s||this.major<0)throw new TypeError("Invalid major version");if(this.minor>s||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>s||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t<s)return t}return e})):this.prerelease=[],this.build=n[5]?n[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(r("SemVer.compare",this.version,this.options,e),!(e instanceof u)){if("string"==typeof e&&e===this.version)return 0;e=new u(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof u||(e=new u(e,this.options)),c(this.major,e.major)||c(this.minor,e.minor)||c(this.patch,e.patch)}comparePre(e){if(e instanceof u||(e=new u(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{const n=this.prerelease[t],a=e.prerelease[t];if(r("prerelease compare",t,n,a),void 0===n&&void 0===a)return 0;if(void 0===a)return 1;if(void 0===n)return-1;if(n!==a)return c(n,a)}while(++t)}compareBuild(e){e instanceof u||(e=new u(e,this.options));let t=0;do{const n=this.build[t],a=e.build[t];if(r("build compare",t,n,a),void 0===n&&void 0===a)return 0;if(void 0===a)return 1;if(void 0===n)return-1;if(n!==a)return c(n,a)}while(++t)}inc(e,t,n){if(e.startsWith("pre")){if(!t&&!1===n)throw new Error("invalid increment argument: identifier is empty");if(t){const e=`-${t}`.match(this.options.loose?i[o.PRERELEASELOOSE]:i[o.PRERELEASE]);if(!e||e[1]!==t)throw new Error(`invalid identifier: ${t}`)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,n);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,n);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,n),this.inc("pre",t,n);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t,n),this.inc("pre",t,n);break;case"release":if(0===this.prerelease.length)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":{const e=Number(n)?1:0;if(0===this.prerelease.length)this.prerelease=[e];else{let r=this.prerelease.length;for(;--r>=0;)"number"==typeof this.prerelease[r]&&(this.prerelease[r]++,r=-2);if(-1===r){if(t===this.prerelease.join(".")&&!1===n)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(t){let r=[t,e];!1===n&&(r=[t]),0===c(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=r):this.prerelease=r}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}e.exports=u},41738:(e,t,n)=>{const r=n(92625),a=n(24159),s=n(48381),i=n(5286),o=n(34219),l=n(24482),c=n(10017),u=n(11420),p=n(77277),d=n(78853),m=n(74145),h=n(86506),f=n(30044),v=n(77203),g=n(36059),y=n(68716),$=n(47538),b=n(88770),E=n(38506),S=n(58809),A=n(20038),_=n(45160),x=n(25812),w=n(54506),O=n(66239),N=n(88108),I=n(13559),T=n(55141),R=n(20332),C=n(43301),k=n(39044),L=n(8999),P=n(10933),M=n(98696),j=n(15011),D=n(32910),F=n(76130),V=n(89975),q=n(78519),B=n(18894),U=n(34335);e.exports={parse:o,valid:l,clean:c,inc:u,diff:p,major:d,minor:m,patch:h,prerelease:f,compare:v,rcompare:g,compareLoose:y,compareBuild:$,sort:b,rsort:E,gt:S,lt:A,eq:_,neq:x,gte:w,lte:O,cmp:N,coerce:I,Comparator:T,Range:R,satisfies:C,toComparators:k,maxSatisfying:L,minSatisfying:P,minVersion:M,validRange:j,outside:D,gtr:F,ltr:V,intersects:q,simplifyRange:B,subset:U,SemVer:s,re:r.re,src:r.src,tokens:r.t,SEMVER_SPEC_VERSION:a.SEMVER_SPEC_VERSION,RELEASE_TYPES:a.RELEASE_TYPES,compareIdentifiers:i.compareIdentifiers,rcompareIdentifiers:i.rcompareIdentifiers}},41755:(e,t,n)=>{const r=n(32674);e.exports=(e,t,n)=>0===r(e,t,n)},42396:(e,t,n)=>{n.d(t,{Z:()=>s});class r extends Error{constructor(e,t){super(e),this.name="ParseError",this.type=t.type,this.field=t.field,this.value=t.value,this.line=t.line}}function a(e){}class s extends TransformStream{constructor({onError:e,onRetry:t,onComment:n}={}){let s;super({start(i){s=function(e){if("function"==typeof e)throw new TypeError("`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?");const{onEvent:t=a,onError:n=a,onRetry:s=a,onComment:i}=e;let o,l="",c=!0,u="",p="";function d(e){if(""===e)return u.length>0&&t({id:o,event:p||void 0,data:u.endsWith("\n")?u.slice(0,-1):u}),o=void 0,u="",void(p="");if(e.startsWith(":"))return void(i&&i(e.slice(e.startsWith(": ")?2:1)));const n=e.indexOf(":");if(-1===n)m(e,"",e);else{const t=e.slice(0,n),r=" "===e[n+1]?2:1;m(t,e.slice(n+r),e)}}function m(e,t,a){switch(e){case"event":p=t;break;case"data":u=`${u}${t}\n`;break;case"id":o=t.includes("\0")?void 0:t;break;case"retry":/^\d+$/.test(t)?s(parseInt(t,10)):n(new r(`Invalid \`retry\` value: "${t}"`,{type:"invalid-retry",value:t,line:a}));break;default:n(new r(`Unknown field "${e.length>20?`${e.slice(0,20)}…`:e}"`,{type:"unknown-field",field:e,value:t,line:a}))}}return{feed:function(e){const t=c?e.replace(/^\xEF\xBB\xBF/,""):e,[n,r]=function(e){const t=[];let n="",r=0;for(;r<e.length;){const a=e.indexOf("\r",r),s=e.indexOf("\n",r);let i=-1;if(-1!==a&&-1!==s?i=Math.min(a,s):-1!==a?i=a===e.length-1?-1:a:-1!==s&&(i=s),-1===i){n=e.slice(r);break}{const n=e.slice(r,i);t.push(n),r=i+1,"\r"===e[r-1]&&"\n"===e[r]&&r++}}return[t,n]}(`${l}${t}`);for(const e of n)d(e);l=r,c=!1},reset:function(e={}){l&&e.consume&&d(l),c=!0,o=void 0,u="",p="",l=""}}}({onEvent:e=>{i.enqueue(e)},onError(t){"terminate"===e?i.error(t):"function"==typeof e&&e(t)},onRetry:t,onComment:n})},transform(e){s.feed(e)}})}}},42734:(e,t,n)=>{const r=n(99430);e.exports=(e,t,n)=>r(e,t,n)>0},42945:(e,t,n)=>{const r=n(87391);e.exports=(e,t)=>e.sort(((e,n)=>r(e,n,t)))},42997:(e,t,n)=>{const r=n(99430);e.exports=(e,t,n)=>0!==r(e,t,n)},43143:(e,t,n)=>{const r=n(57544),a=n(75732),{ANY:s}=a,i=n(95323),o=n(67338),l=n(72608),c=n(86391),u=n(75092),p=n(70509);e.exports=(e,t,n,d)=>{let m,h,f,v,g;switch(e=new r(e,d),t=new i(t,d),n){case">":m=l,h=u,f=c,v=">",g=">=";break;case"<":m=c,h=p,f=l,v="<",g="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(o(e,t,d))return!1;for(let n=0;n<t.set.length;++n){const r=t.set[n];let i=null,o=null;if(r.forEach((e=>{e.semver===s&&(e=new a(">=0.0.0")),i=i||e,o=o||e,m(e.semver,i.semver,d)?i=e:f(e.semver,o.semver,d)&&(o=e)})),i.operator===v||i.operator===g)return!1;if((!o.operator||o.operator===v)&&h(e,o.semver))return!1;if(o.operator===g&&f(e,o.semver))return!1}return!0}},43287:e=>{e.exports=class{constructor(){this.max=1e3,this.map=new Map}get(e){const t=this.map.get(e);return void 0===t?void 0:(this.map.delete(e),this.map.set(e,t),t)}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&void 0!==t){if(this.map.size>=this.max){const e=this.map.keys().next().value;this.delete(e)}this.map.set(e,t)}return this}}},43301:(e,t,n)=>{const r=n(20332);e.exports=(e,t,n)=>{try{t=new r(t,n)}catch(e){return!1}return t.test(e)}},43334:(e,t,n)=>{const r=n(40289);e.exports=(e,t,n)=>r(e,t,n)>0},43639:e=>{const t=Object.freeze({loose:!0}),n=Object.freeze({});e.exports=e=>e?"object"!=typeof e?t:e:n},43959:function(e,t,n){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.VIEW_PIPELINE_UTILS=void 0;const a=r(n(88769)),s="8.0.0",i="8.1.0";t.VIEW_PIPELINE_UTILS={MIN_VERSION_FOR_VIEW_SEARCH_COMPATIBILITY_DE:s,MIN_VERSION_FOR_VIEW_SEARCH_COMPATIBILITY_COMPASS:i,isPipelineSearchQueryable:e=>{for(const t of e){const e=Object.keys(t)[0];if("$addFields"!==e&&"$set"!==e&&"$match"!==e)return!1;if("$match"===e){const e=t.$match,n=Object.keys(e||{});if(1!==n.length||!n.includes("$expr"))return!1}}return!0},isVersionSearchCompatibleForViewsDataExplorer:e=>{try{return a.default.gte(e,s)}catch{return!1}},isVersionSearchCompatibleForViewsCompass:e=>{try{return a.default.gte(e,i)}catch{return!1}}}},44016:(e,t,n)=>{const r=n(41694),a=n(71333);e.exports=(e,t,n)=>{let s=null,i=null,o=null;try{o=new a(t,n)}catch(e){return null}return e.forEach((e=>{o.test(e)&&(s&&1!==i.compare(e)||(s=e,i=new r(s,n)))})),s}},44455:(e,t,n)=>{const r=n(9350);e.exports=(e,t,n)=>{const a=new r(e,n),s=new r(t,n);return a.compare(s)||a.compareBuild(s)}},44490:(e,t,n)=>{var r=n(99174),a=n(40811),s=new RegExp("^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),i=/^[-+]?[0-9]+e/;e.exports=new a("tag:yaml.org,2002:float",{kind:"scalar",resolve:function(e){return null!==e&&!(!s.test(e)||"_"===e[e.length-1])},construct:function(e){var t,n,r,a;return n="-"===(t=e.replace(/_/g,"").toLowerCase())[0]?-1:1,a=[],"+-".indexOf(t[0])>=0&&(t=t.slice(1)),".inf"===t?1===n?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===t?NaN:t.indexOf(":")>=0?(t.split(":").forEach((function(e){a.unshift(parseFloat(e,10))})),t=0,r=1,a.forEach((function(e){t+=e*r,r*=60})),n*t):n*parseFloat(t,10)},predicate:function(e){return"[object Number]"===Object.prototype.toString.call(e)&&(e%1!=0||r.isNegativeZero(e))},represent:function(e,t){var n;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(r.isNegativeZero(e))return"-0.0";return n=e.toString(10),i.test(n)?n.replace("e",".e"):n},defaultStyle:"lowercase"})},44601:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ALL_CONSTANTS=void 0,t.createConstantFilter=f,t.wrapField=function(e,t=!1){return t||!function(e){if(/[.\s"'()[\];={}:]/.test(e))return!1;try{return new Function(`"use strict";let _ = { ${e}: 0 };`),!0}catch{return!1}}(e)?`"${e.replace(/["\\]/g,"\\$&")}"`:e},t.getFilteredCompletions=function(e={},n=t.ALL_CONSTANTS){const{serverVersion:r=m,fields:a=[],meta:s,stage:i}=e,o=f({serverVersion:r,meta:s,stage:i});return n.concat(a.flatMap((e=>{const{value:t,description:n}=function(e){return"string"==typeof e?{value:e}:{value:e.name,description:e.description}}(e);return[{value:t,meta:"field:identifier",version:"0.0.0",description:n},{value:`$${t}`,meta:"field:reference",version:"0.0.0",description:n}]}))).filter((e=>o(e)))};const r=n(35647),a=n(62280),s=n(63547),i=n(85665),o=n(48543),l=n(58313),c=n(13821),u=n(46699),p=n(71925),d=n(3794);t.ALL_CONSTANTS=[...a.ACCUMULATORS,...i.BSON_TYPES,...s.BSON_TYPE_ALIASES,...o.CONVERSION_OPERATORS,...l.EXPRESSION_OPERATORS,...c.JSON_SCHEMA,...u.QUERY_OPERATORS,...p.STAGE_OPERATORS,...d.SYSTEM_VARIABLES];const m="999.999.999";function h(e,t){return void 0===e||void 0===t||(e=Array.isArray(e)?e:[e]).some((e=>t.includes(e)))}function f({meta:e,serverVersion:t=m,stage:n={}}={}){const a=/^(?<version>\d+\.\d+\.\d+)/.exec(t)?.groups?.version??m;return({version:t,meta:s,env:i,namespaces:o,apiVersions:l})=>function(e,t){const n=/^\d+\.\d+\.\d+$/.test(t);return(0,r.satisfies)(e,n?`>=${t}`:t)}(a,t)&&h(n.env,i)&&h(n.namespace,o)&&h(n.apiVersion,l)&&(!e||function(e,t){const n=t.split(":");return e.some((e=>{const t=e.split(":");return t.length===n.length&&t.every(((e,t)=>"*"===e||e===n[t]))}))}(e,s))}},44719:(e,t,n)=>{n.d(t,{Tf:()=>a,Zt:()=>i,zM:()=>s});var r=n(49976);r.ACCUMULATORS,r.ADL,r.ANY_COLLECTION_NAMESPACE,r.ANY_NAMESPACE,r.ATLAS,r.ATLAS_SEARCH_TEMPLATES,r.ATLAS_VECTOR_SEARCH_TEMPLATE,r.BSON_TYPES,r.BSON_TYPE_ALIASES,r.COLLECTION,r.CONVERSION_OPERATORS,r.DATABASE,r.ENVS,r.EXPRESSION_OPERATORS,r.FULL_SCAN_STAGES,r.JSON_SCHEMA,r.ON_PREM,r.OUT_STAGES,r.QUERY_OPERATORS,r.REQUIRED_AS_FIRST_STAGE,r.STAGE_OPERATORS;const a=r.STAGE_OPERATOR_NAMES,s=(r.SYSTEM_VARIABLES,r.TIME_SERIES,r.VALIDATION_TEMPLATE,r.VIEW,r.VIEW_PIPELINE_UTILS,r.getFilteredCompletions),i=r.wrapField},44948:(e,t,n)=>{const r=n(33629);e.exports=(e,t)=>{try{return new r(e,t).range||"*"}catch(e){return null}}},45006:(e,t,n)=>{const r=n(33629),a=n(96506),{ANY:s}=a,i=n(52992),o=n(99430),l=[new a(">=0.0.0-0")],c=[new a(">=0.0.0")],u=(e,t,n)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===s){if(1===t.length&&t[0].semver===s)return!0;e=n.includePrerelease?l:c}if(1===t.length&&t[0].semver===s){if(n.includePrerelease)return!0;t=c}const r=new Set;let a,u,m,h,f,v,g;for(const t of e)">"===t.operator||">="===t.operator?a=p(a,t,n):"<"===t.operator||"<="===t.operator?u=d(u,t,n):r.add(t.semver);if(r.size>1)return null;if(a&&u){if(m=o(a.semver,u.semver,n),m>0)return null;if(0===m&&(">="!==a.operator||"<="!==u.operator))return null}for(const e of r){if(a&&!i(e,String(a),n))return null;if(u&&!i(e,String(u),n))return null;for(const r of t)if(!i(e,String(r),n))return!1;return!0}let y=!(!u||n.includePrerelease||!u.semver.prerelease.length)&&u.semver,$=!(!a||n.includePrerelease||!a.semver.prerelease.length)&&a.semver;y&&1===y.prerelease.length&&"<"===u.operator&&0===y.prerelease[0]&&(y=!1);for(const e of t){if(g=g||">"===e.operator||">="===e.operator,v=v||"<"===e.operator||"<="===e.operator,a)if($&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===$.major&&e.semver.minor===$.minor&&e.semver.patch===$.patch&&($=!1),">"===e.operator||">="===e.operator){if(h=p(a,e,n),h===e&&h!==a)return!1}else if(">="===a.operator&&!i(a.semver,String(e),n))return!1;if(u)if(y&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===y.major&&e.semver.minor===y.minor&&e.semver.patch===y.patch&&(y=!1),"<"===e.operator||"<="===e.operator){if(f=d(u,e,n),f===e&&f!==u)return!1}else if("<="===u.operator&&!i(u.semver,String(e),n))return!1;if(!e.operator&&(u||a)&&0!==m)return!1}return!(a&&v&&!u&&0!==m||u&&g&&!a&&0!==m||$||y)},p=(e,t,n)=>{if(!e)return t;const r=o(e.semver,t.semver,n);return r>0?e:r<0||">"===t.operator&&">="===e.operator?t:e},d=(e,t,n)=>{if(!e)return t;const r=o(e.semver,t.semver,n);return r<0?e:r>0||"<"===t.operator&&"<="===e.operator?t:e};e.exports=(e,t,n={})=>{if(e===t)return!0;e=new r(e,n),t=new r(t,n);let a=!1;e:for(const r of e.set){for(const e of t.set){const t=u(r,e,n);if(a=a||null!==t,t)continue e}if(a)return!1}return!0}},45160:(e,t,n)=>{const r=n(77203);e.exports=(e,t,n)=>0===r(e,t,n)},45848:(e,t,n)=>{var r=n(40811);e.exports=new r("tag:yaml.org,2002:merge",{kind:"scalar",resolve:function(e){return"<<"===e||null===e}})},45962:(e,t,n)=>{var r,a;n.d(t,{BRAND:()=>Me,DIRTY:()=>$,EMPTY_PATH:()=>f,INVALID:()=>y,NEVER:()=>It,OK:()=>b,ParseStatus:()=>g,Schema:()=>T,ZodAny:()=>oe,ZodArray:()=>pe,ZodBigInt:()=>te,ZodBoolean:()=>ne,ZodBranded:()=>je,ZodCatch:()=>Le,ZodDate:()=>re,ZodDefault:()=>ke,ZodDiscriminatedUnion:()=>ve,ZodEffects:()=>Te,ZodEnum:()=>Oe,ZodError:()=>c,ZodFirstPartyTypeKind:()=>Ue,ZodFunction:()=>Ae,ZodIntersection:()=>ye,ZodIssueCode:()=>o,ZodLazy:()=>_e,ZodLiteral:()=>xe,ZodMap:()=>Ee,ZodNaN:()=>Pe,ZodNativeEnum:()=>Ne,ZodNever:()=>ce,ZodNull:()=>ie,ZodNullable:()=>Ce,ZodNumber:()=>ee,ZodObject:()=>me,ZodOptional:()=>Re,ZodParsedType:()=>s,ZodPipeline:()=>De,ZodPromise:()=>Ie,ZodReadonly:()=>Fe,ZodRecord:()=>be,ZodSchema:()=>T,ZodSet:()=>Se,ZodString:()=>J,ZodSymbol:()=>ae,ZodTransformer:()=>Te,ZodTuple:()=>$e,ZodType:()=>T,ZodUndefined:()=>se,ZodUnion:()=>he,ZodUnknown:()=>le,ZodVoid:()=>ue,addIssueToContext:()=>v,any:()=>et,array:()=>at,bigint:()=>We,boolean:()=>He,coerce:()=>Nt,custom:()=>qe,date:()=>Ke,datetimeRegex:()=>H,defaultErrorMap:()=>u,discriminatedUnion:()=>lt,effect:()=>bt,enum:()=>gt,function:()=>ht,getErrorMap:()=>m,getParsedType:()=>i,instanceof:()=>Ye,intersection:()=>ct,isAborted:()=>E,isAsync:()=>_,isDirty:()=>S,isValid:()=>A,late:()=>Be,lazy:()=>ft,literal:()=>vt,makeIssue:()=>h,map:()=>dt,nan:()=>Ge,nativeEnum:()=>yt,never:()=>nt,null:()=>Qe,nullable:()=>St,number:()=>Ze,object:()=>st,objectUtil:()=>a,oboolean:()=>Ot,onumber:()=>wt,optional:()=>Et,ostring:()=>xt,pipeline:()=>_t,preprocess:()=>At,promise:()=>$t,quotelessJson:()=>l,record:()=>pt,set:()=>mt,setErrorMap:()=>d,strictObject:()=>it,string:()=>ze,symbol:()=>Xe,transformer:()=>bt,tuple:()=>ut,undefined:()=>Je,union:()=>ot,unknown:()=>tt,util:()=>r,void:()=>rt}),n.r(t),function(e){e.assertEqual=e=>{},e.assertIs=function(e){},e.assertNever=function(e){throw new Error},e.arrayToEnum=e=>{const t={};for(const n of e)t[n]=n;return t},e.getValidEnumValues=t=>{const n=e.objectKeys(t).filter((e=>"number"!=typeof t[t[e]])),r={};for(const e of n)r[e]=t[e];return e.objectValues(r)},e.objectValues=t=>e.objectKeys(t).map((function(e){return t[e]})),e.objectKeys="function"==typeof Object.keys?e=>Object.keys(e):e=>{const t=[];for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t},e.find=(e,t)=>{for(const n of e)if(t(n))return n},e.isInteger="function"==typeof Number.isInteger?e=>Number.isInteger(e):e=>"number"==typeof e&&Number.isFinite(e)&&Math.floor(e)===e,e.joinValues=function(e,t=" | "){return e.map((e=>"string"==typeof e?`'${e}'`:e)).join(t)},e.jsonStringifyReplacer=(e,t)=>"bigint"==typeof t?t.toString():t}(r||(r={})),function(e){e.mergeShapes=(e,t)=>({...e,...t})}(a||(a={}));const s=r.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),i=e=>{switch(typeof e){case"undefined":return s.undefined;case"string":return s.string;case"number":return Number.isNaN(e)?s.nan:s.number;case"boolean":return s.boolean;case"function":return s.function;case"bigint":return s.bigint;case"symbol":return s.symbol;case"object":return Array.isArray(e)?s.array:null===e?s.null:e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch?s.promise:"undefined"!=typeof Map&&e instanceof Map?s.map:"undefined"!=typeof Set&&e instanceof Set?s.set:"undefined"!=typeof Date&&e instanceof Date?s.date:s.object;default:return s.unknown}},o=r.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"]),l=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class c extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};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(e){return e.message},n={_errors:[]},r=e=>{for(const a of e.issues)if("invalid_union"===a.code)a.unionErrors.map(r);else if("invalid_return_type"===a.code)r(a.returnTypeError);else if("invalid_arguments"===a.code)r(a.argumentsError);else if(0===a.path.length)n._errors.push(t(a));else{let e=n,r=0;for(;r<a.path.length;){const n=a.path[r];r===a.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(a))):e[n]=e[n]||{_errors:[]},e=e[n],r++}}};return r(this),n}static assert(e){if(!(e instanceof c))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,r.jsonStringifyReplacer,2)}get isEmpty(){return 0===this.issues.length}flatten(e=e=>e.message){const t={},n=[];for(const r of this.issues)if(r.path.length>0){const n=r.path[0];t[n]=t[n]||[],t[n].push(e(r))}else n.push(e(r));return{formErrors:n,fieldErrors:t}}get formErrors(){return this.flatten()}}c.create=e=>new c(e);const u=(e,t)=>{let n;switch(e.code){case o.invalid_type:n=e.received===s.undefined?"Required":`Expected ${e.expected}, received ${e.received}`;break;case o.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,r.jsonStringifyReplacer)}`;break;case o.unrecognized_keys:n=`Unrecognized key(s) in object: ${r.joinValues(e.keys,", ")}`;break;case o.invalid_union:n="Invalid input";break;case o.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${r.joinValues(e.options)}`;break;case o.invalid_enum_value:n=`Invalid enum value. Expected ${r.joinValues(e.options)}, received '${e.received}'`;break;case o.invalid_arguments:n="Invalid function arguments";break;case o.invalid_return_type:n="Invalid function return type";break;case o.invalid_date:n="Invalid date";break;case o.invalid_string:"object"==typeof e.validation?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,"number"==typeof e.validation.position&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:r.assertNever(e.validation):n="regex"!==e.validation?`Invalid ${e.validation}`:"Invalid";break;case o.too_small:n="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:"number"===e.type||"bigint"===e.type?`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:"date"===e.type?`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:"Invalid input";break;case o.too_big:n="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"bigint"===e.type?`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"date"===e.type?`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:"Invalid input";break;case o.custom:n="Invalid input";break;case o.invalid_intersection_types:n="Intersection results could not be merged";break;case o.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case o.not_finite:n="Number must be finite";break;default:n=t.defaultError,r.assertNever(e)}return{message:n}};let p=u;function d(e){p=e}function m(){return p}const h=e=>{const{data:t,path:n,errorMaps:r,issueData:a}=e,s=[...n,...a.path||[]],i={...a,path:s};if(void 0!==a.message)return{...a,path:s,message:a.message};let o="";const l=r.filter((e=>!!e)).slice().reverse();for(const e of l)o=e(i,{data:t,defaultError:o}).message;return{...a,path:s,message:o}},f=[];function v(e,t){const n=m(),r=h({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===u?void 0:u].filter((e=>!!e))});e.common.issues.push(r)}class g{constructor(){this.value="valid"}dirty(){"valid"===this.value&&(this.value="dirty")}abort(){"aborted"!==this.value&&(this.value="aborted")}static mergeArray(e,t){const n=[];for(const r of t){if("aborted"===r.status)return y;"dirty"===r.status&&e.dirty(),n.push(r.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,t){const n=[];for(const e of t){const t=await e.key,r=await e.value;n.push({key:t,value:r})}return g.mergeObjectSync(e,n)}static mergeObjectSync(e,t){const n={};for(const r of t){const{key:t,value:a}=r;if("aborted"===t.status)return y;if("aborted"===a.status)return y;"dirty"===t.status&&e.dirty(),"dirty"===a.status&&e.dirty(),"__proto__"===t.value||void 0===a.value&&!r.alwaysSet||(n[t.value]=a.value)}return{status:e.value,value:n}}}const y=Object.freeze({status:"aborted"}),$=e=>({status:"dirty",value:e}),b=e=>({status:"valid",value:e}),E=e=>"aborted"===e.status,S=e=>"dirty"===e.status,A=e=>"valid"===e.status,_=e=>"undefined"!=typeof Promise&&e instanceof Promise;var x;!function(e){e.errToObj=e=>"string"==typeof e?{message:e}:e||{},e.toString=e=>"string"==typeof e?e:e?.message}(x||(x={}));var w=n(9606).URL;class O{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||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const N=(e,t)=>{if(A(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new c(e.common.issues);return this._error=t,this._error}}};function I(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:a}=e;if(t&&(n||r))throw new Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');return t?{errorMap:t,description:a}:{errorMap:(t,a)=>{const{message:s}=e;return"invalid_enum_value"===t.code?{message:s??a.defaultError}:void 0===a.data?{message:s??r??a.defaultError}:"invalid_type"!==t.code?{message:a.defaultError}:{message:s??n??a.defaultError}},description:a}}class T{get description(){return this._def.description}_getType(e){return i(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:i(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new g,ctx:{common:e.parent.common,data:e.data,parsedType:i(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(_(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){const n={common:{issues:[],async:t?.async??!1,contextualErrorMap:t?.errorMap},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:i(e)},r=this._parseSync({data:e,path:n.path,parent:n});return N(n,r)}"~validate"(e){const t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:i(e)};if(!this["~standard"].async)try{const n=this._parseSync({data:e,path:[],parent:t});return A(n)?{value:n.value}:{issues:t.common.issues}}catch(e){e?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then((e=>A(e)?{value:e.value}:{issues:t.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?.errorMap,async:!0},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:i(e)},r=this._parse({data:e,path:n.path,parent:n}),a=await(_(r)?r:Promise.resolve(r));return N(n,a)}refine(e,t){const n=e=>"string"==typeof t||void 0===t?{message:t}:"function"==typeof t?t(e):t;return this._refinement(((t,r)=>{const a=e(t),s=()=>r.addIssue({code:o.custom,...n(t)});return"undefined"!=typeof Promise&&a instanceof Promise?a.then((e=>!!e||(s(),!1))):!!a||(s(),!1)}))}refinement(e,t){return this._refinement(((n,r)=>!!e(n)||(r.addIssue("function"==typeof t?t(n,r):t),!1)))}_refinement(e){return new Te({schema:this,typeName:Ue.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:e=>this["~validate"](e)}}optional(){return Re.create(this,this._def)}nullable(){return Ce.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return pe.create(this)}promise(){return Ie.create(this,this._def)}or(e){return he.create([this,e],this._def)}and(e){return ye.create(this,e,this._def)}transform(e){return new Te({...I(this._def),schema:this,typeName:Ue.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t="function"==typeof e?e:()=>e;return new ke({...I(this._def),innerType:this,defaultValue:t,typeName:Ue.ZodDefault})}brand(){return new je({typeName:Ue.ZodBranded,type:this,...I(this._def)})}catch(e){const t="function"==typeof e?e:()=>e;return new Le({...I(this._def),innerType:this,catchValue:t,typeName:Ue.ZodCatch})}describe(e){return new(0,this.constructor)({...this._def,description:e})}pipe(e){return De.create(this,e)}readonly(){return Fe.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const R=/^c[^\s-]{8,}$/i,C=/^[0-9a-z]+$/,k=/^[0-9A-HJKMNP-TV-Z]{26}$/i,L=/^[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,P=/^[a-z0-9_-]{21}$/i,M=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,j=/^[-+]?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)?)??$/,D=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i;let F;const V=/^(?:(?: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])$/,q=/^(?:(?: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])$/,B=/^(([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]))$/,U=/^(([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])$/,Y=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,z=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Z="((\\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])))",G=new RegExp(`^${Z}$`);function W(e){let t="[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:null==e.precision&&(t=`${t}(\\.\\d+)?`),`([01]\\d|2[0-3]):[0-5]\\d(:${t})${e.precision?"+":"?"}`}function H(e){let t=`${Z}T${W(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function K(e,t){if(!M.test(e))return!1;try{const[n]=e.split(".");if(!n)return!1;const r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),a=JSON.parse(atob(r));return!("object"!=typeof a||null===a||"typ"in a&&"JWT"!==a?.typ||!a.alg||t&&a.alg!==t)}catch{return!1}}function X(e,t){return!("v4"!==t&&t||!q.test(e))||!("v6"!==t&&t||!U.test(e))}class J extends T{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==s.string){const t=this._getOrReturnCtx(e);return v(t,{code:o.invalid_type,expected:s.string,received:t.parsedType}),y}const t=new g;let n;for(const s of this._def.checks)if("min"===s.kind)e.data.length<s.value&&(n=this._getOrReturnCtx(e,n),v(n,{code:o.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),t.dirty());else if("max"===s.kind)e.data.length>s.value&&(n=this._getOrReturnCtx(e,n),v(n,{code:o.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),t.dirty());else if("length"===s.kind){const r=e.data.length>s.value,a=e.data.length<s.value;(r||a)&&(n=this._getOrReturnCtx(e,n),r?v(n,{code:o.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):a&&v(n,{code:o.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),t.dirty())}else if("email"===s.kind)D.test(e.data)||(n=this._getOrReturnCtx(e,n),v(n,{validation:"email",code:o.invalid_string,message:s.message}),t.dirty());else if("emoji"===s.kind)F||(F=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),F.test(e.data)||(n=this._getOrReturnCtx(e,n),v(n,{validation:"emoji",code:o.invalid_string,message:s.message}),t.dirty());else if("uuid"===s.kind)L.test(e.data)||(n=this._getOrReturnCtx(e,n),v(n,{validation:"uuid",code:o.invalid_string,message:s.message}),t.dirty());else if("nanoid"===s.kind)P.test(e.data)||(n=this._getOrReturnCtx(e,n),v(n,{validation:"nanoid",code:o.invalid_string,message:s.message}),t.dirty());else if("cuid"===s.kind)R.test(e.data)||(n=this._getOrReturnCtx(e,n),v(n,{validation:"cuid",code:o.invalid_string,message:s.message}),t.dirty());else if("cuid2"===s.kind)C.test(e.data)||(n=this._getOrReturnCtx(e,n),v(n,{validation:"cuid2",code:o.invalid_string,message:s.message}),t.dirty());else if("ulid"===s.kind)k.test(e.data)||(n=this._getOrReturnCtx(e,n),v(n,{validation:"ulid",code:o.invalid_string,message:s.message}),t.dirty());else if("url"===s.kind)try{new w(e.data)}catch{n=this._getOrReturnCtx(e,n),v(n,{validation:"url",code:o.invalid_string,message:s.message}),t.dirty()}else"regex"===s.kind?(s.regex.lastIndex=0,s.regex.test(e.data)||(n=this._getOrReturnCtx(e,n),v(n,{validation:"regex",code:o.invalid_string,message:s.message}),t.dirty())):"trim"===s.kind?e.data=e.data.trim():"includes"===s.kind?e.data.includes(s.value,s.position)||(n=this._getOrReturnCtx(e,n),v(n,{code:o.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),t.dirty()):"toLowerCase"===s.kind?e.data=e.data.toLowerCase():"toUpperCase"===s.kind?e.data=e.data.toUpperCase():"startsWith"===s.kind?e.data.startsWith(s.value)||(n=this._getOrReturnCtx(e,n),v(n,{code:o.invalid_string,validation:{startsWith:s.value},message:s.message}),t.dirty()):"endsWith"===s.kind?e.data.endsWith(s.value)||(n=this._getOrReturnCtx(e,n),v(n,{code:o.invalid_string,validation:{endsWith:s.value},message:s.message}),t.dirty()):"datetime"===s.kind?H(s).test(e.data)||(n=this._getOrReturnCtx(e,n),v(n,{code:o.invalid_string,validation:"datetime",message:s.message}),t.dirty()):"date"===s.kind?G.test(e.data)||(n=this._getOrReturnCtx(e,n),v(n,{code:o.invalid_string,validation:"date",message:s.message}),t.dirty()):"time"===s.kind?new RegExp(`^${W(s)}$`).test(e.data)||(n=this._getOrReturnCtx(e,n),v(n,{code:o.invalid_string,validation:"time",message:s.message}),t.dirty()):"duration"===s.kind?j.test(e.data)||(n=this._getOrReturnCtx(e,n),v(n,{validation:"duration",code:o.invalid_string,message:s.message}),t.dirty()):"ip"===s.kind?(a=e.data,("v4"!==(i=s.version)&&i||!V.test(a))&&("v6"!==i&&i||!B.test(a))&&(n=this._getOrReturnCtx(e,n),v(n,{validation:"ip",code:o.invalid_string,message:s.message}),t.dirty())):"jwt"===s.kind?K(e.data,s.alg)||(n=this._getOrReturnCtx(e,n),v(n,{validation:"jwt",code:o.invalid_string,message:s.message}),t.dirty()):"cidr"===s.kind?X(e.data,s.version)||(n=this._getOrReturnCtx(e,n),v(n,{validation:"cidr",code:o.invalid_string,message:s.message}),t.dirty()):"base64"===s.kind?Y.test(e.data)||(n=this._getOrReturnCtx(e,n),v(n,{validation:"base64",code:o.invalid_string,message:s.message}),t.dirty()):"base64url"===s.kind?z.test(e.data)||(n=this._getOrReturnCtx(e,n),v(n,{validation:"base64url",code:o.invalid_string,message:s.message}),t.dirty()):r.assertNever(s);var a,i;return{status:t.value,value:e.data}}_regex(e,t,n){return this.refinement((t=>e.test(t)),{validation:t,code:o.invalid_string,...x.errToObj(n)})}_addCheck(e){return new J({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...x.errToObj(e)})}url(e){return this._addCheck({kind:"url",...x.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...x.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...x.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...x.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...x.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...x.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...x.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...x.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...x.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...x.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...x.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...x.errToObj(e)})}datetime(e){return"string"==typeof e?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:void 0===e?.precision?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...x.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return"string"==typeof e?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:void 0===e?.precision?null:e?.precision,...x.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...x.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...x.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t?.position,...x.errToObj(t?.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...x.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...x.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...x.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...x.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...x.errToObj(t)})}nonempty(e){return this.min(1,x.errToObj(e))}trim(){return new J({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new J({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new J({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find((e=>"datetime"===e.kind))}get isDate(){return!!this._def.checks.find((e=>"date"===e.kind))}get isTime(){return!!this._def.checks.find((e=>"time"===e.kind))}get isDuration(){return!!this._def.checks.find((e=>"duration"===e.kind))}get isEmail(){return!!this._def.checks.find((e=>"email"===e.kind))}get isURL(){return!!this._def.checks.find((e=>"url"===e.kind))}get isEmoji(){return!!this._def.checks.find((e=>"emoji"===e.kind))}get isUUID(){return!!this._def.checks.find((e=>"uuid"===e.kind))}get isNANOID(){return!!this._def.checks.find((e=>"nanoid"===e.kind))}get isCUID(){return!!this._def.checks.find((e=>"cuid"===e.kind))}get isCUID2(){return!!this._def.checks.find((e=>"cuid2"===e.kind))}get isULID(){return!!this._def.checks.find((e=>"ulid"===e.kind))}get isIP(){return!!this._def.checks.find((e=>"ip"===e.kind))}get isCIDR(){return!!this._def.checks.find((e=>"cidr"===e.kind))}get isBase64(){return!!this._def.checks.find((e=>"base64"===e.kind))}get isBase64url(){return!!this._def.checks.find((e=>"base64url"===e.kind))}get minLength(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}function Q(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,a=n>r?n:r;return Number.parseInt(e.toFixed(a).replace(".",""))%Number.parseInt(t.toFixed(a).replace(".",""))/10**a}J.create=e=>new J({checks:[],typeName:Ue.ZodString,coerce:e?.coerce??!1,...I(e)});class ee extends T{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)!==s.number){const t=this._getOrReturnCtx(e);return v(t,{code:o.invalid_type,expected:s.number,received:t.parsedType}),y}let t;const n=new g;for(const a of this._def.checks)"int"===a.kind?r.isInteger(e.data)||(t=this._getOrReturnCtx(e,t),v(t,{code:o.invalid_type,expected:"integer",received:"float",message:a.message}),n.dirty()):"min"===a.kind?(a.inclusive?e.data<a.value:e.data<=a.value)&&(t=this._getOrReturnCtx(e,t),v(t,{code:o.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),n.dirty()):"max"===a.kind?(a.inclusive?e.data>a.value:e.data>=a.value)&&(t=this._getOrReturnCtx(e,t),v(t,{code:o.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),n.dirty()):"multipleOf"===a.kind?0!==Q(e.data,a.value)&&(t=this._getOrReturnCtx(e,t),v(t,{code:o.not_multiple_of,multipleOf:a.value,message:a.message}),n.dirty()):"finite"===a.kind?Number.isFinite(e.data)||(t=this._getOrReturnCtx(e,t),v(t,{code:o.not_finite,message:a.message}),n.dirty()):r.assertNever(a);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,x.toString(t))}gt(e,t){return this.setLimit("min",e,!1,x.toString(t))}lte(e,t){return this.setLimit("max",e,!0,x.toString(t))}lt(e,t){return this.setLimit("max",e,!1,x.toString(t))}setLimit(e,t,n,r){return new ee({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:x.toString(r)}]})}_addCheck(e){return new ee({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:x.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:x.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:x.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:x.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:x.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:x.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:x.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:x.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:x.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find((e=>"int"===e.kind||"multipleOf"===e.kind&&r.isInteger(e.value)))}get isFinite(){let e=null,t=null;for(const n of this._def.checks){if("finite"===n.kind||"int"===n.kind||"multipleOf"===n.kind)return!0;"min"===n.kind?(null===t||n.value>t)&&(t=n.value):"max"===n.kind&&(null===e||n.value<e)&&(e=n.value)}return Number.isFinite(t)&&Number.isFinite(e)}}ee.create=e=>new ee({checks:[],typeName:Ue.ZodNumber,coerce:e?.coerce||!1,...I(e)});class te extends T{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)!==s.bigint)return this._getInvalidInput(e);let t;const n=new g;for(const a of this._def.checks)"min"===a.kind?(a.inclusive?e.data<a.value:e.data<=a.value)&&(t=this._getOrReturnCtx(e,t),v(t,{code:o.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),n.dirty()):"max"===a.kind?(a.inclusive?e.data>a.value:e.data>=a.value)&&(t=this._getOrReturnCtx(e,t),v(t,{code:o.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),n.dirty()):"multipleOf"===a.kind?e.data%a.value!==BigInt(0)&&(t=this._getOrReturnCtx(e,t),v(t,{code:o.not_multiple_of,multipleOf:a.value,message:a.message}),n.dirty()):r.assertNever(a);return{status:n.value,value:e.data}}_getInvalidInput(e){const t=this._getOrReturnCtx(e);return v(t,{code:o.invalid_type,expected:s.bigint,received:t.parsedType}),y}gte(e,t){return this.setLimit("min",e,!0,x.toString(t))}gt(e,t){return this.setLimit("min",e,!1,x.toString(t))}lte(e,t){return this.setLimit("max",e,!0,x.toString(t))}lt(e,t){return this.setLimit("max",e,!1,x.toString(t))}setLimit(e,t,n,r){return new te({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:x.toString(r)}]})}_addCheck(e){return new te({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:x.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:x.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:x.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:x.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:x.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}te.create=e=>new te({checks:[],typeName:Ue.ZodBigInt,coerce:e?.coerce??!1,...I(e)});class ne extends T{_parse(e){if(this._def.coerce&&(e.data=Boolean(e.data)),this._getType(e)!==s.boolean){const t=this._getOrReturnCtx(e);return v(t,{code:o.invalid_type,expected:s.boolean,received:t.parsedType}),y}return b(e.data)}}ne.create=e=>new ne({typeName:Ue.ZodBoolean,coerce:e?.coerce||!1,...I(e)});class re extends T{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==s.date){const t=this._getOrReturnCtx(e);return v(t,{code:o.invalid_type,expected:s.date,received:t.parsedType}),y}if(Number.isNaN(e.data.getTime()))return v(this._getOrReturnCtx(e),{code:o.invalid_date}),y;const t=new g;let n;for(const a of this._def.checks)"min"===a.kind?e.data.getTime()<a.value&&(n=this._getOrReturnCtx(e,n),v(n,{code:o.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),t.dirty()):"max"===a.kind?e.data.getTime()>a.value&&(n=this._getOrReturnCtx(e,n),v(n,{code:o.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),t.dirty()):r.assertNever(a);return{status:t.value,value:new Date(e.data.getTime())}}_addCheck(e){return new re({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:x.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:x.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return null!=e?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return null!=e?new Date(e):null}}re.create=e=>new re({checks:[],coerce:e?.coerce||!1,typeName:Ue.ZodDate,...I(e)});class ae extends T{_parse(e){if(this._getType(e)!==s.symbol){const t=this._getOrReturnCtx(e);return v(t,{code:o.invalid_type,expected:s.symbol,received:t.parsedType}),y}return b(e.data)}}ae.create=e=>new ae({typeName:Ue.ZodSymbol,...I(e)});class se extends T{_parse(e){if(this._getType(e)!==s.undefined){const t=this._getOrReturnCtx(e);return v(t,{code:o.invalid_type,expected:s.undefined,received:t.parsedType}),y}return b(e.data)}}se.create=e=>new se({typeName:Ue.ZodUndefined,...I(e)});class ie extends T{_parse(e){if(this._getType(e)!==s.null){const t=this._getOrReturnCtx(e);return v(t,{code:o.invalid_type,expected:s.null,received:t.parsedType}),y}return b(e.data)}}ie.create=e=>new ie({typeName:Ue.ZodNull,...I(e)});class oe extends T{constructor(){super(...arguments),this._any=!0}_parse(e){return b(e.data)}}oe.create=e=>new oe({typeName:Ue.ZodAny,...I(e)});class le extends T{constructor(){super(...arguments),this._unknown=!0}_parse(e){return b(e.data)}}le.create=e=>new le({typeName:Ue.ZodUnknown,...I(e)});class ce extends T{_parse(e){const t=this._getOrReturnCtx(e);return v(t,{code:o.invalid_type,expected:s.never,received:t.parsedType}),y}}ce.create=e=>new ce({typeName:Ue.ZodNever,...I(e)});class ue extends T{_parse(e){if(this._getType(e)!==s.undefined){const t=this._getOrReturnCtx(e);return v(t,{code:o.invalid_type,expected:s.void,received:t.parsedType}),y}return b(e.data)}}ue.create=e=>new ue({typeName:Ue.ZodVoid,...I(e)});class pe extends T{_parse(e){const{ctx:t,status:n}=this._processInputParams(e),r=this._def;if(t.parsedType!==s.array)return v(t,{code:o.invalid_type,expected:s.array,received:t.parsedType}),y;if(null!==r.exactLength){const e=t.data.length>r.exactLength.value,a=t.data.length<r.exactLength.value;(e||a)&&(v(t,{code:e?o.too_big:o.too_small,minimum:a?r.exactLength.value:void 0,maximum:e?r.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:r.exactLength.message}),n.dirty())}if(null!==r.minLength&&t.data.length<r.minLength.value&&(v(t,{code:o.too_small,minimum:r.minLength.value,type:"array",inclusive:!0,exact:!1,message:r.minLength.message}),n.dirty()),null!==r.maxLength&&t.data.length>r.maxLength.value&&(v(t,{code:o.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(((e,n)=>r.type._parseAsync(new O(t,e,t.path,n))))).then((e=>g.mergeArray(n,e)));const a=[...t.data].map(((e,n)=>r.type._parseSync(new O(t,e,t.path,n))));return g.mergeArray(n,a)}get element(){return this._def.type}min(e,t){return new pe({...this._def,minLength:{value:e,message:x.toString(t)}})}max(e,t){return new pe({...this._def,maxLength:{value:e,message:x.toString(t)}})}length(e,t){return new pe({...this._def,exactLength:{value:e,message:x.toString(t)}})}nonempty(e){return this.min(1,e)}}function de(e){if(e instanceof me){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Re.create(de(r))}return new me({...e._def,shape:()=>t})}return e instanceof pe?new pe({...e._def,type:de(e.element)}):e instanceof Re?Re.create(de(e.unwrap())):e instanceof Ce?Ce.create(de(e.unwrap())):e instanceof $e?$e.create(e.items.map((e=>de(e)))):e}pe.create=(e,t)=>new pe({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Ue.ZodArray,...I(t)});class me extends T{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(null!==this._cached)return this._cached;const e=this._def.shape(),t=r.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==s.object){const t=this._getOrReturnCtx(e);return v(t,{code:o.invalid_type,expected:s.object,received:t.parsedType}),y}const{status:t,ctx:n}=this._processInputParams(e),{shape:r,keys:a}=this._getCached(),i=[];if(!(this._def.catchall instanceof ce&&"strip"===this._def.unknownKeys))for(const e in n.data)a.includes(e)||i.push(e);const l=[];for(const e of a){const t=r[e],a=n.data[e];l.push({key:{status:"valid",value:e},value:t._parse(new O(n,a,n.path,e)),alwaysSet:e in n.data})}if(this._def.catchall instanceof ce){const e=this._def.unknownKeys;if("passthrough"===e)for(const e of i)l.push({key:{status:"valid",value:e},value:{status:"valid",value:n.data[e]}});else if("strict"===e)i.length>0&&(v(n,{code:o.unrecognized_keys,keys:i}),t.dirty());else if("strip"!==e)throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const e=this._def.catchall;for(const t of i){const r=n.data[t];l.push({key:{status:"valid",value:t},value:e._parse(new O(n,r,n.path,t)),alwaysSet:t in n.data})}}return n.common.async?Promise.resolve().then((async()=>{const e=[];for(const t of l){const n=await t.key,r=await t.value;e.push({key:n,value:r,alwaysSet:t.alwaysSet})}return e})).then((e=>g.mergeObjectSync(t,e))):g.mergeObjectSync(t,l)}get shape(){return this._def.shape()}strict(e){return x.errToObj,new me({...this._def,unknownKeys:"strict",...void 0!==e?{errorMap:(t,n)=>{const r=this._def.errorMap?.(t,n).message??n.defaultError;return"unrecognized_keys"===t.code?{message:x.errToObj(e).message??r}:{message:r}}}:{}})}strip(){return new me({...this._def,unknownKeys:"strip"})}passthrough(){return new me({...this._def,unknownKeys:"passthrough"})}extend(e){return new me({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new me({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:Ue.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new me({...this._def,catchall:e})}pick(e){const t={};for(const n of r.objectKeys(e))e[n]&&this.shape[n]&&(t[n]=this.shape[n]);return new me({...this._def,shape:()=>t})}omit(e){const t={};for(const n of r.objectKeys(this.shape))e[n]||(t[n]=this.shape[n]);return new me({...this._def,shape:()=>t})}deepPartial(){return de(this)}partial(e){const t={};for(const n of r.objectKeys(this.shape)){const r=this.shape[n];e&&!e[n]?t[n]=r:t[n]=r.optional()}return new me({...this._def,shape:()=>t})}required(e){const t={};for(const n of r.objectKeys(this.shape))if(e&&!e[n])t[n]=this.shape[n];else{let e=this.shape[n];for(;e instanceof Re;)e=e._def.innerType;t[n]=e}return new me({...this._def,shape:()=>t})}keyof(){return we(r.objectKeys(this.shape))}}me.create=(e,t)=>new me({shape:()=>e,unknownKeys:"strip",catchall:ce.create(),typeName:Ue.ZodObject,...I(t)}),me.strictCreate=(e,t)=>new me({shape:()=>e,unknownKeys:"strict",catchall:ce.create(),typeName:Ue.ZodObject,...I(t)}),me.lazycreate=(e,t)=>new me({shape:e,unknownKeys:"strip",catchall:ce.create(),typeName:Ue.ZodObject,...I(t)});class he extends T{_parse(e){const{ctx:t}=this._processInputParams(e),n=this._def.options;if(t.common.async)return Promise.all(n.map((async e=>{const n={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:n}),ctx:n}}))).then((function(e){for(const t of e)if("valid"===t.result.status)return t.result;for(const n of e)if("dirty"===n.result.status)return t.common.issues.push(...n.ctx.common.issues),n.result;const n=e.map((e=>new c(e.ctx.common.issues)));return v(t,{code:o.invalid_union,unionErrors:n}),y}));{let e;const r=[];for(const a of n){const n={...t,common:{...t.common,issues:[]},parent:null},s=a._parseSync({data:t.data,path:t.path,parent:n});if("valid"===s.status)return s;"dirty"!==s.status||e||(e={result:s,ctx:n}),n.common.issues.length&&r.push(n.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;const a=r.map((e=>new c(e)));return v(t,{code:o.invalid_union,unionErrors:a}),y}}get options(){return this._def.options}}he.create=(e,t)=>new he({options:e,typeName:Ue.ZodUnion,...I(t)});const fe=e=>e instanceof _e?fe(e.schema):e instanceof Te?fe(e.innerType()):e instanceof xe?[e.value]:e instanceof Oe?e.options:e instanceof Ne?r.objectValues(e.enum):e instanceof ke?fe(e._def.innerType):e instanceof se?[void 0]:e instanceof ie?[null]:e instanceof Re?[void 0,...fe(e.unwrap())]:e instanceof Ce?[null,...fe(e.unwrap())]:e instanceof je||e instanceof Fe?fe(e.unwrap()):e instanceof Le?fe(e._def.innerType):[];class ve extends T{_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==s.object)return v(t,{code:o.invalid_type,expected:s.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}):(v(t,{code:o.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 n of t){const t=fe(n.shape[e]);if(!t.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const a of t){if(r.has(a))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(a)}`);r.set(a,n)}}return new ve({typeName:Ue.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:r,...I(n)})}}function ge(e,t){const n=i(e),a=i(t);if(e===t)return{valid:!0,data:e};if(n===s.object&&a===s.object){const n=r.objectKeys(t),a=r.objectKeys(e).filter((e=>-1!==n.indexOf(e))),s={...e,...t};for(const n of a){const r=ge(e[n],t[n]);if(!r.valid)return{valid:!1};s[n]=r.data}return{valid:!0,data:s}}if(n===s.array&&a===s.array){if(e.length!==t.length)return{valid:!1};const n=[];for(let r=0;r<e.length;r++){const a=ge(e[r],t[r]);if(!a.valid)return{valid:!1};n.push(a.data)}return{valid:!0,data:n}}return n===s.date&&a===s.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class ye extends T{_parse(e){const{status:t,ctx:n}=this._processInputParams(e),r=(e,r)=>{if(E(e)||E(r))return y;const a=ge(e.value,r.value);return a.valid?((S(e)||S(r))&&t.dirty(),{status:t.value,value:a.data}):(v(n,{code:o.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((([e,t])=>r(e,t))):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}))}}ye.create=(e,t,n)=>new ye({left:e,right:t,typeName:Ue.ZodIntersection,...I(n)});class $e extends T{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==s.array)return v(n,{code:o.invalid_type,expected:s.array,received:n.parsedType}),y;if(n.data.length<this._def.items.length)return v(n,{code:o.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),y;!this._def.rest&&n.data.length>this._def.items.length&&(v(n,{code:o.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const r=[...n.data].map(((e,t)=>{const r=this._def.items[t]||this._def.rest;return r?r._parse(new O(n,e,n.path,t)):null})).filter((e=>!!e));return n.common.async?Promise.all(r).then((e=>g.mergeArray(t,e))):g.mergeArray(t,r)}get items(){return this._def.items}rest(e){return new $e({...this._def,rest:e})}}$e.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new $e({items:e,typeName:Ue.ZodTuple,rest:null,...I(t)})};class be extends T{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!==s.object)return v(n,{code:o.invalid_type,expected:s.object,received:n.parsedType}),y;const r=[],a=this._def.keyType,i=this._def.valueType;for(const e in n.data)r.push({key:a._parse(new O(n,e,n.path,e)),value:i._parse(new O(n,n.data[e],n.path,e)),alwaysSet:e in n.data});return n.common.async?g.mergeObjectAsync(t,r):g.mergeObjectSync(t,r)}get element(){return this._def.valueType}static create(e,t,n){return new be(t instanceof T?{keyType:e,valueType:t,typeName:Ue.ZodRecord,...I(n)}:{keyType:J.create(),valueType:e,typeName:Ue.ZodRecord,...I(t)})}}class Ee extends T{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!==s.map)return v(n,{code:o.invalid_type,expected:s.map,received:n.parsedType}),y;const r=this._def.keyType,a=this._def.valueType,i=[...n.data.entries()].map((([e,t],s)=>({key:r._parse(new O(n,e,n.path,[s,"key"])),value:a._parse(new O(n,t,n.path,[s,"value"]))})));if(n.common.async){const e=new Map;return Promise.resolve().then((async()=>{for(const n of i){const r=await n.key,a=await n.value;if("aborted"===r.status||"aborted"===a.status)return y;"dirty"!==r.status&&"dirty"!==a.status||t.dirty(),e.set(r.value,a.value)}return{status:t.value,value:e}}))}{const e=new Map;for(const n of i){const r=n.key,a=n.value;if("aborted"===r.status||"aborted"===a.status)return y;"dirty"!==r.status&&"dirty"!==a.status||t.dirty(),e.set(r.value,a.value)}return{status:t.value,value:e}}}}Ee.create=(e,t,n)=>new Ee({valueType:t,keyType:e,typeName:Ue.ZodMap,...I(n)});class Se extends T{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==s.set)return v(n,{code:o.invalid_type,expected:s.set,received:n.parsedType}),y;const r=this._def;null!==r.minSize&&n.data.size<r.minSize.value&&(v(n,{code:o.too_small,minimum:r.minSize.value,type:"set",inclusive:!0,exact:!1,message:r.minSize.message}),t.dirty()),null!==r.maxSize&&n.data.size>r.maxSize.value&&(v(n,{code:o.too_big,maximum:r.maxSize.value,type:"set",inclusive:!0,exact:!1,message:r.maxSize.message}),t.dirty());const a=this._def.valueType;function i(e){const n=new Set;for(const r of e){if("aborted"===r.status)return y;"dirty"===r.status&&t.dirty(),n.add(r.value)}return{status:t.value,value:n}}const l=[...n.data.values()].map(((e,t)=>a._parse(new O(n,e,n.path,t))));return n.common.async?Promise.all(l).then((e=>i(e))):i(l)}min(e,t){return new Se({...this._def,minSize:{value:e,message:x.toString(t)}})}max(e,t){return new Se({...this._def,maxSize:{value:e,message:x.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}Se.create=(e,t)=>new Se({valueType:e,minSize:null,maxSize:null,typeName:Ue.ZodSet,...I(t)});class Ae extends T{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==s.function)return v(t,{code:o.invalid_type,expected:s.function,received:t.parsedType}),y;function n(e,n){return h({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,m(),u].filter((e=>!!e)),issueData:{code:o.invalid_arguments,argumentsError:n}})}function r(e,n){return h({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,m(),u].filter((e=>!!e)),issueData:{code:o.invalid_return_type,returnTypeError:n}})}const a={errorMap:t.common.contextualErrorMap},i=t.data;if(this._def.returns instanceof Ie){const e=this;return b((async function(...t){const s=new c([]),o=await e._def.args.parseAsync(t,a).catch((e=>{throw s.addIssue(n(t,e)),s})),l=await Reflect.apply(i,this,o);return await e._def.returns._def.type.parseAsync(l,a).catch((e=>{throw s.addIssue(r(l,e)),s}))}))}{const e=this;return b((function(...t){const s=e._def.args.safeParse(t,a);if(!s.success)throw new c([n(t,s.error)]);const o=Reflect.apply(i,this,s.data),l=e._def.returns.safeParse(o,a);if(!l.success)throw new c([r(o,l.error)]);return l.data}))}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new Ae({...this._def,args:$e.create(e).rest(le.create())})}returns(e){return new Ae({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,n){return new Ae({args:e||$e.create([]).rest(le.create()),returns:t||le.create(),typeName:Ue.ZodFunction,...I(n)})}}class _e extends T{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})}}_e.create=(e,t)=>new _e({getter:e,typeName:Ue.ZodLazy,...I(t)});class xe extends T{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return v(t,{received:t.data,code:o.invalid_literal,expected:this._def.value}),y}return{status:"valid",value:e.data}}get value(){return this._def.value}}function we(e,t){return new Oe({values:e,typeName:Ue.ZodEnum,...I(t)})}xe.create=(e,t)=>new xe({value:e,typeName:Ue.ZodLiteral,...I(t)});class Oe extends T{_parse(e){if("string"!=typeof e.data){const t=this._getOrReturnCtx(e),n=this._def.values;return v(t,{expected:r.joinValues(n),received:t.parsedType,code:o.invalid_type}),y}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const t=this._getOrReturnCtx(e),n=this._def.values;return v(t,{received:t.data,code:o.invalid_enum_value,options:n}),y}return b(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 Oe.create(e,{...this._def,...t})}exclude(e,t=this._def){return Oe.create(this.options.filter((t=>!e.includes(t))),{...this._def,...t})}}Oe.create=we;class Ne extends T{_parse(e){const t=r.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==s.string&&n.parsedType!==s.number){const e=r.objectValues(t);return v(n,{expected:r.joinValues(e),received:n.parsedType,code:o.invalid_type}),y}if(this._cache||(this._cache=new Set(r.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const e=r.objectValues(t);return v(n,{received:n.data,code:o.invalid_enum_value,options:e}),y}return b(e.data)}get enum(){return this._def.values}}Ne.create=(e,t)=>new Ne({values:e,typeName:Ue.ZodNativeEnum,...I(t)});class Ie extends T{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==s.promise&&!1===t.common.async)return v(t,{code:o.invalid_type,expected:s.promise,received:t.parsedType}),y;const n=t.parsedType===s.promise?t.data:Promise.resolve(t.data);return b(n.then((e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap}))))}}Ie.create=(e,t)=>new Ie({type:e,typeName:Ue.ZodPromise,...I(t)});class Te extends T{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Ue.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:n}=this._processInputParams(e),a=this._def.effect||null,s={addIssue:e=>{v(n,e),e.fatal?t.abort():t.dirty()},get path(){return n.path}};if(s.addIssue=s.addIssue.bind(s),"preprocess"===a.type){const e=a.transform(n.data,s);if(n.common.async)return Promise.resolve(e).then((async e=>{if("aborted"===t.value)return y;const r=await this._def.schema._parseAsync({data:e,path:n.path,parent:n});return"aborted"===r.status?y:"dirty"===r.status||"dirty"===t.value?$(r.value):r}));{if("aborted"===t.value)return y;const r=this._def.schema._parseSync({data:e,path:n.path,parent:n});return"aborted"===r.status?y:"dirty"===r.status||"dirty"===t.value?$(r.value):r}}if("refinement"===a.type){const e=e=>{const t=a.refinement(e,s);if(n.common.async)return Promise.resolve(t);if(t instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return e};if(!1===n.common.async){const r=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return"aborted"===r.status?y:("dirty"===r.status&&t.dirty(),e(r.value),{status:t.value,value:r.value})}return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then((n=>"aborted"===n.status?y:("dirty"===n.status&&t.dirty(),e(n.value).then((()=>({status:t.value,value:n.value}))))))}if("transform"===a.type){if(!1===n.common.async){const e=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!A(e))return y;const r=a.transform(e.value,s);if(r instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:r}}return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then((e=>A(e)?Promise.resolve(a.transform(e.value,s)).then((e=>({status:t.value,value:e}))):y))}r.assertNever(a)}}Te.create=(e,t,n)=>new Te({schema:e,typeName:Ue.ZodEffects,effect:t,...I(n)}),Te.createWithPreprocess=(e,t,n)=>new Te({schema:t,effect:{type:"preprocess",transform:e},typeName:Ue.ZodEffects,...I(n)});class Re extends T{_parse(e){return this._getType(e)===s.undefined?b(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Re.create=(e,t)=>new Re({innerType:e,typeName:Ue.ZodOptional,...I(t)});class Ce extends T{_parse(e){return this._getType(e)===s.null?b(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Ce.create=(e,t)=>new Ce({innerType:e,typeName:Ue.ZodNullable,...I(t)});class ke extends T{_parse(e){const{ctx:t}=this._processInputParams(e);let n=t.data;return t.parsedType===s.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}ke.create=(e,t)=>new ke({innerType:e,typeName:Ue.ZodDefault,defaultValue:"function"==typeof t.default?t.default:()=>t.default,...I(t)});class Le extends T{_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 _(r)?r.then((e=>({status:"valid",value:"valid"===e.status?e.value:this._def.catchValue({get error(){return new c(n.common.issues)},input:n.data})}))):{status:"valid",value:"valid"===r.status?r.value:this._def.catchValue({get error(){return new c(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}Le.create=(e,t)=>new Le({innerType:e,typeName:Ue.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:()=>t.catch,...I(t)});class Pe extends T{_parse(e){if(this._getType(e)!==s.nan){const t=this._getOrReturnCtx(e);return v(t,{code:o.invalid_type,expected:s.nan,received:t.parsedType}),y}return{status:"valid",value:e.data}}}Pe.create=e=>new Pe({typeName:Ue.ZodNaN,...I(e)});const Me=Symbol("zod_brand");class je extends T{_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 De extends T{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{const e=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return"aborted"===e.status?y:"dirty"===e.status?(t.dirty(),$(e.value)):this._def.out._parseAsync({data:e.value,path:n.path,parent:n})})();{const e=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return"aborted"===e.status?y:"dirty"===e.status?(t.dirty(),{status:"dirty",value:e.value}):this._def.out._parseSync({data:e.value,path:n.path,parent:n})}}static create(e,t){return new De({in:e,out:t,typeName:Ue.ZodPipeline})}}class Fe extends T{_parse(e){const t=this._def.innerType._parse(e),n=e=>(A(e)&&(e.value=Object.freeze(e.value)),e);return _(t)?t.then((e=>n(e))):n(t)}unwrap(){return this._def.innerType}}function Ve(e,t){const n="function"==typeof e?e(t):"string"==typeof e?{message:e}:e;return"string"==typeof n?{message:n}:n}function qe(e,t={},n){return e?oe.create().superRefine(((r,a)=>{const s=e(r);if(s instanceof Promise)return s.then((e=>{if(!e){const e=Ve(t,r),s=e.fatal??n??!0;a.addIssue({code:"custom",...e,fatal:s})}}));if(!s){const e=Ve(t,r),s=e.fatal??n??!0;a.addIssue({code:"custom",...e,fatal:s})}})):oe.create()}Fe.create=(e,t)=>new Fe({innerType:e,typeName:Ue.ZodReadonly,...I(t)});const Be={object:me.lazycreate};var Ue;!function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"}(Ue||(Ue={}));const Ye=(e,t={message:`Input not instance of ${e.name}`})=>qe((t=>t instanceof e),t),ze=J.create,Ze=ee.create,Ge=Pe.create,We=te.create,He=ne.create,Ke=re.create,Xe=ae.create,Je=se.create,Qe=ie.create,et=oe.create,tt=le.create,nt=ce.create,rt=ue.create,at=pe.create,st=me.create,it=me.strictCreate,ot=he.create,lt=ve.create,ct=ye.create,ut=$e.create,pt=be.create,dt=Ee.create,mt=Se.create,ht=Ae.create,ft=_e.create,vt=xe.create,gt=Oe.create,yt=Ne.create,$t=Ie.create,bt=Te.create,Et=Re.create,St=Ce.create,At=Te.createWithPreprocess,_t=De.create,xt=()=>ze().optional(),wt=()=>Ze().optional(),Ot=()=>He().optional(),Nt={string:e=>J.create({...e,coerce:!0}),number:e=>ee.create({...e,coerce:!0}),boolean:e=>ne.create({...e,coerce:!0}),bigint:e=>te.create({...e,coerce:!0}),date:e=>re.create({...e,coerce:!0})},It=y},46432:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ACCUMULATORS=void 0,t.ACCUMULATORS=[{name:"$accumulator",value:"$accumulator",score:1,meta:"accumulator",version:"4.4.0"},{name:"$addToSet",value:"$addToSet",score:1,meta:"accumulator",version:"2.2.0"},{name:"$avg",value:"$avg",score:1,meta:"accumulator",version:"2.2.0",projectVersion:"3.2.0"},{name:"$bottom",value:"$bottom",score:1,meta:"accumulator:bottom-n",version:"5.2.0"},{name:"$bottomN",value:"$bottomN",score:1,meta:"accumulator:bottom-n",version:"5.2.0"},{name:"$covariancePop",value:"$covariancePop",score:1,meta:"accumulator:window",version:"5.0.0"},{name:"$covarianceSamp",value:"$covarianceSamp",score:1,meta:"accumulator:window",version:"5.0.0"},{name:"$count",value:"$count",score:1,meta:"accumulator",version:"5.0.0"},{name:"$derivative",value:"$derivative",score:1,meta:"accumulator:window",version:"5.0.0"},{name:"$denseRank",value:"$denseRank",score:1,meta:"accumulator:window",version:"5.0.0"},{name:"$documentNumber",value:"$documentNumber",score:1,meta:"accumulator:window",version:"5.0.0"},{name:"$expMovingAvg",value:"$expMovingAvg",score:1,meta:"accumulator:window",version:"5.0.0"},{name:"$first",value:"$first",score:1,meta:"accumulator",version:"2.2.0"},{name:"$firstN",value:"$firstN",score:1,meta:"accumulator",version:"5.1.0"},{name:"$integral",value:"$integral",score:1,meta:"accumulator:window",version:"5.0.0"},{name:"$last",value:"$last",score:1,meta:"accumulator",version:"2.2.0"},{name:"$lastN",value:"$lastN",score:1,meta:"accumulator",version:"5.2.0"},{name:"$max",value:"$max",score:1,meta:"accumulator",version:"2.2.0",projectVersion:"3.2.0"},{name:"$maxN",value:"$maxN",score:1,meta:"accumulator",version:"5.2.0"},{name:"$median",value:"$median",score:1,meta:"accumulator",version:"7.0.0"},{name:"$min",value:"$min",score:1,meta:"accumulator",version:"2.2.0",projectVersion:"3.2.0"},{name:"$minN",value:"$minN",score:1,meta:"accumulator",version:"5.2.0"},{name:"$percentile",value:"$percentile",score:1,meta:"accumulator",version:"7.0.0"},{name:"$push",value:"$push",score:1,meta:"accumulator",version:"2.2.0"},{name:"$rank",value:"$rank",score:1,meta:"accumulator:window",version:"5.0.0"},{name:"$stdDevPop",value:"$stdDevPop",score:1,meta:"accumulator",version:"3.2.0",projectVersion:"3.2.0"},{name:"$stdDevSamp",value:"$stdDevSamp",score:1,meta:"accumulator",version:"3.2.0",projectVersion:"3.2.0"},{name:"$shift",value:"$shift",score:1,meta:"accumulator:window",version:"5.0.0"},{name:"$sum",value:"$sum",score:1,meta:"accumulator",version:"2.2.0",projectVersion:"3.2.0"},{name:"$top",value:"$top",score:1,meta:"accumulator:top-n",version:"5.2.0"},{name:"$topN",value:"$topN",score:1,meta:"accumulator:top-n",version:"5.2.0"},{name:"$locf",value:"$locf",score:1,meta:"accumulator:window",version:"5.3.0"},{name:"$linearFill",value:"$linearFill",score:1,meta:"accumulator:window",version:"5.3.0"}]},46526:(e,t,n)=>{const r=n(98855);e.exports=(e,t)=>{const n=r(e,t);return n?n.version:null}},46699:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.QUERY_OPERATORS=void 0,t.QUERY_OPERATORS=[{name:"$all",value:"$all",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$and",value:"$and",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$bitsAllClear",value:"$bitsAllClear",score:1,meta:"query",version:"3.2.0",geospatial:!1},{name:"$bitsAllSet",value:"$bitsAllSet",score:1,meta:"query",version:"3.2.0",geospatial:!1},{name:"$bitsAnyClear",value:"$bitsAnyClear",score:1,meta:"query",version:"3.2.0",geospatial:!1},{name:"$bitsAnySet",value:"$bitsAnySet",score:1,meta:"query",version:"3.2.0",geospatial:!1},{name:"$comment",value:"$comment",score:1,meta:"query",version:"3.2.0",geospatial:!1},{name:"$elemMatch",value:"$elemMatch",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$eq",value:"$eq",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$exists",value:"$exists",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$expr",value:"$expr",score:1,meta:"query",version:"3.6.0",geospatial:!1},{name:"$geoIntersects",value:"$geoIntersects",score:1,meta:"query",version:"2.2.0",geospatial:!0},{name:"$geoWithin",value:"$geoWithin",score:1,meta:"query",version:"2.2.0",geospatial:!0},{name:"$gt",value:"$gt",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$gte",value:"$gte",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$in",value:"$in",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$jsonSchema",value:"$jsonSchema",score:1,meta:"query",version:"3.6.0",geospatial:!1},{name:"$lt",value:"$lt",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$lte",value:"$lte",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$mod",value:"$mod",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$ne",value:"$ne",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$near",value:"$near",score:1,meta:"query",version:"2.2.0",geospatial:!0},{name:"$nearSphere",value:"$nearSphere",score:1,meta:"query",version:"2.2.0",geospatial:!0},{name:"$nin",value:"$nin",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$not",value:"$not",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$nor",value:"$nor",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$or",value:"$or",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$regex",value:"$regex",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$size",value:"$size",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$slice",value:"$slice",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$text",value:"$text",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$type",value:"$type",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$where",value:"$where",score:1,meta:"query",version:"2.2.0",geospatial:!1}]},46970:(e,t,n)=>{const r=n(12196);e.exports=(e,t)=>{const n=r(e,t);return n?n.version:null}},47384:(e,t,n)=>{const r=n(88825);e.exports=(e,t,n,a,s)=>{"string"==typeof n&&(s=a,a=n,n=void 0);try{return new r(e instanceof r?e.version:e,n).inc(t,a,s).version}catch(e){return null}}},47501:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CONVERSION_OPERATORS=void 0,t.CONVERSION_OPERATORS=[{name:"$convert",value:"$convert",score:1,meta:"conv",version:"3.7.2"},{name:"$ltrim",value:"$ltrim",score:1,meta:"accumulator",version:"3.7.2"},{name:"$rtrim",value:"$rtrim",score:1,meta:"accumulator",version:"3.7.2"},{name:"$toBool",value:"$toBool",score:1,meta:"conv",version:"3.7.2"},{name:"$toDate",value:"$toDate",score:1,meta:"conv",version:"3.7.2"},{name:"$toDecimal",value:"$toDecimal",score:1,meta:"conv",version:"3.7.2"},{name:"$toDouble",value:"$toDouble",score:1,meta:"conv",version:"3.7.2"},{name:"$toInt",value:"$toInt",score:1,meta:"conv",version:"3.7.2"},{name:"$toLong",value:"$toLong",score:1,meta:"conv",version:"3.7.2"},{name:"$toObjectId",value:"$toObjectId",score:1,meta:"conv",version:"3.7.2"},{name:"$toString",value:"$toString",score:1,meta:"conv",version:"3.7.2"},{name:"$trim",value:"$trim",score:1,meta:"accumulator",version:"3.7.2"}]},47530:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CONVERSION_OPERATORS=void 0,t.CONVERSION_OPERATORS=[{name:"$convert",value:"$convert",score:1,meta:"conv",version:"3.7.2"},{name:"$ltrim",value:"$ltrim",score:1,meta:"accumulator",version:"3.7.2"},{name:"$rtrim",value:"$rtrim",score:1,meta:"accumulator",version:"3.7.2"},{name:"$toBool",value:"$toBool",score:1,meta:"conv",version:"3.7.2"},{name:"$toDate",value:"$toDate",score:1,meta:"conv",version:"3.7.2"},{name:"$toDecimal",value:"$toDecimal",score:1,meta:"conv",version:"3.7.2"},{name:"$toDouble",value:"$toDouble",score:1,meta:"conv",version:"3.7.2"},{name:"$toInt",value:"$toInt",score:1,meta:"conv",version:"3.7.2"},{name:"$toLong",value:"$toLong",score:1,meta:"conv",version:"3.7.2"},{name:"$toObjectId",value:"$toObjectId",score:1,meta:"conv",version:"3.7.2"},{name:"$toString",value:"$toString",score:1,meta:"conv",version:"3.7.2"},{name:"$trim",value:"$trim",score:1,meta:"accumulator",version:"3.7.2"}]},47538:(e,t,n)=>{const r=n(48381);e.exports=(e,t,n)=>{const a=new r(e,n),s=new r(t,n);return a.compare(s)||a.compareBuild(s)}},47544:(e,t,n)=>{const r=n(20360);e.exports=(e,t)=>new r(e,t).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" ")))},47755:e=>{const t=Number.MAX_SAFE_INTEGER||9007199254740991;e.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:t,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}},47775:(e,t,n)=>{const r=n(40289);e.exports=(e,t,n)=>r(e,t,n)>=0},47969:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.EXPRESSION_OPERATORS=void 0,t.EXPRESSION_OPERATORS=[{name:"$abs",value:"$abs",score:1,meta:"expr:arith",version:"3.2.0"},{name:"$accumulator",value:"$accumulator",score:1,meta:"expr:arith",version:"4.4.0"},{name:"$add",value:"$add",score:1,meta:"expr:arith",version:"2.2.0"},{name:"$allElementsTrue",value:"$allElementsTrue",score:1,meta:"expr:set",version:"2.6.0"},{name:"$and",value:"$and",score:1,meta:"expr:bool",version:"2.2.0"},{name:"$anyElementTrue",value:"$anyElementTrue",score:1,meta:"expr:set",version:"2.6.0"},{name:"$arrayElemAt",value:"$arrayElemAt",score:1,meta:"expr:array",version:"3.2.0"},{name:"$arrayToObject",value:"$arrayToObject",score:1,meta:"expr:array",version:"3.4.4"},{name:"$binarySize",value:"$binarySize",score:1,meta:"expr:obj",version:"4.4.0"},{name:"$bsonSize",value:"$bsonSize",score:1,meta:"expr:obj",version:"4.4.0"},{name:"$ceil",value:"$ceil",score:1,meta:"expr:arith",version:"3.2.0"},{name:"$cmp",value:"$cmp",score:1,meta:"expr:comp",version:"2.2.0"},{name:"$concat",value:"$concat",score:1,meta:"expr:string",version:"2.4.0"},{name:"$concatArrays",value:"$concatArrays",score:1,meta:"expr:array",version:"3.2.0"},{name:"$cond",value:"$cond",score:1,meta:"expr:cond",version:"2.6.0"},{name:"$dateAdd",value:"$dateAdd",score:1,meta:"expr:date",version:"5.0.0"},{name:"$dateDiff",value:"$dateDiff",score:1,meta:"expr:date",version:"5.0.0"},{name:"$dateFromParts",value:"$dateFromParts",score:1,meta:"expr:date",version:"3.6.0"},{name:"$dateFromString",value:"$dateFromString",score:1,meta:"expr:date",version:"3.6.0"},{name:"$dateSubtract",value:"$dateSubtract",score:1,meta:"expr:date",version:"5.0.0"},{name:"$dateToParts",value:"$dateToParts",score:1,meta:"expr:date",version:"3.6.0"},{name:"$dateToString",value:"$dateToString",score:1,meta:"expr:date",version:"3.6.0"},{name:"$dateTrunc",value:"$dateTrunc",score:1,meta:"expr:date",version:"5.0.0"},{name:"$dayOfMonth",value:"$dayOfMonth",score:1,meta:"expr:date",version:"2.2.0"},{name:"$dayOfWeek",value:"$dayOfWeek",score:1,meta:"expr:date",version:"2.2.0"},{name:"$dayOfYear",value:"$dayOfYear",score:1,meta:"expr:date",version:"2.2.0"},{name:"$dateToString",value:"$dateToString",score:1,meta:"expr:date",version:"3.0.0"},{name:"$divide",value:"$divide",score:1,meta:"expr:arith",version:"2.2.0"},{name:"$eq",value:"$eq",score:1,meta:"expr:comp",version:"2.2.0"},{name:"$exp",value:"$exp",score:1,meta:"expr:arith",version:"3.2.0"},{name:"$filter",value:"$filter",score:1,meta:"expr:array",version:"3.2.0"},{name:"$first",value:"$first",score:1,meta:"expr:array",version:"4.4.0"},{name:"$floor",value:"$floor",score:1,meta:"expr:arith",version:"3.2.0"},{name:"$function",value:"$function",score:1,meta:"expr:arith",version:"4.4.0"},{name:"$getField",value:"$getField",score:1,meta:"expr:get",version:"5.0.0"},{name:"$gt",value:"$gt",score:1,meta:"expr:comp",version:"2.2.0"},{name:"$gte",value:"$gte",score:1,meta:"expr:comp",version:"2.2.0"},{name:"$hour",value:"$hour",score:1,meta:"expr:date",version:"2.2.0"},{name:"$ifNull",value:"$ifNull",score:1,meta:"expr:cond",version:"2.2.0"},{name:"$in",value:"$in",score:1,meta:"expr:array",version:"3.4.0"},{name:"$indexOfArray",value:"$indexOfArray",score:1,meta:"expr:array",version:"3.4.0"},{name:"$indexOfBytes",value:"$indexOfBytes",score:1,meta:"expr:string",version:"3.4.0"},{name:"$indexOfCP",value:"$indexOfCP",score:1,meta:"expr:string",version:"3.4.0"},{name:"$isArray",value:"$isArray",score:1,meta:"expr:array",version:"3.2.0"},{name:"$isNumber",value:"$isNumber",score:1,meta:"expr:arith",version:"4.4.0"},{name:"$isoDayOfWeek",value:"$isoDayOfWeek",score:1,meta:"expr:date",version:"3.4.0"},{name:"$isoWeek",value:"$isoWeek",score:1,meta:"expr:date",version:"3.4.0"},{name:"$isoWeekYear",value:"$isoWeekYear",score:1,meta:"expr:date",version:"3.4.0"},{name:"$last",value:"$last",score:1,meta:"expr:array",version:"4.4.0"},{name:"$let",value:"$let",score:1,meta:"expr:var",version:"2.6.0"},{name:"$literal",value:"$literal",score:1,meta:"expr:literal",version:"2.6.0"},{name:"$lt",value:"$lt",score:1,meta:"expr:comp",version:"2.2.0"},{name:"$lt",value:"$lte",score:1,meta:"expr:comp",version:"2.2.0"},{name:"$ln",value:"$ln",score:1,meta:"expr:arith",version:"3.2.0"},{name:"$log",value:"$log",score:1,meta:"expr:arith",version:"3.2.0"},{name:"$log10",value:"$log10",score:1,meta:"expr:arith",version:"3.2.0"},{name:"$map",value:"$map",score:1,meta:"expr:array",version:"2.6.0"},{name:"$mergeObjects",value:"$mergeObjects",score:1,meta:"expr:obj",version:"3.6.0"},{name:"$meta",value:"$meta",score:1,meta:"expr:text",version:"2.6.0"},{name:"$millisecond",value:"$millisecond",score:1,meta:"expr:date",version:"2.4.0"},{name:"$minute",value:"$minute",score:1,meta:"expr:date",version:"2.2.0"},{name:"$mod",value:"$mod",score:1,meta:"expr:arith",version:"2.2.0"},{name:"$month",value:"$month",score:1,meta:"expr:date",version:"2.2.0"},{name:"$multiply",value:"$multiply",score:1,meta:"expr:arith",version:"2.2.0"},{name:"$new",value:"$new",score:1,meta:"expr:comp",version:"2.2.0"},{name:"$not",value:"$not",score:1,meta:"expr:bool",version:"2.2.0"},{name:"$objectToArray",value:"$objectToArray",score:1,meta:"expr:array",version:"3.4.4"},{name:"$or",value:"$or",score:1,meta:"expr:bool",version:"2.2.0"},{name:"$pow",value:"$pow",score:1,meta:"expr:arith",version:"3.2.0"},{name:"$range",value:"$range",score:1,meta:"expr:array",version:"3.4.0"},{name:"$reduce",value:"$reduce",score:1,meta:"expr:array",version:"3.4.0"},{name:"$regexFind",value:"$regexFind",score:1,meta:"expr:regex",version:"4.1.11"},{name:"$regexFindAll",value:"$regexFindAll",score:1,meta:"expr:regex",version:"4.1.11"},{name:"$regexMatch",value:"$regexMatch",score:1,meta:"expr:regex",version:"4.1.11"},{name:"$replaceAll",value:"$replaceAll",score:1,meta:"expr:string",version:"4.4.0"},{name:"$replaceOne",value:"$replaceOne",score:1,meta:"expr:string",version:"4.4.0"},{name:"$reverseArray",value:"$reverseArray",score:1,meta:"expr:array",version:"3.4.0"},{name:"$second",value:"$second",score:1,meta:"expr:date",version:"2.2.0"},{name:"$setDifference",value:"$setDifference",score:1,meta:"expr:set",version:"2.6.0"},{name:"$setEquals",value:"$setEquals",score:1,meta:"expr:set",version:"2.6.0"},{name:"$setIntersection",value:"$setIntersection",score:1,meta:"expr:set",version:"2.6.0"},{name:"$setIsSubset",value:"$setIsSubset",score:1,meta:"expr:set",version:"2.6.0"},{name:"$setUnion",value:"$setUnion",score:1,meta:"expr:set",version:"2.6.0"},{name:"$similarityCosine",value:"$similarityCosine",score:1,meta:"expr:arith",version:"8.2.0"},{name:"$similarityDotProduct",value:"$similarityDotProduct",score:1,meta:"expr:arith",version:"8.2.0"},{name:"$similarityEuclidean",value:"$similarityEuclidean",score:1,meta:"expr:arith",version:"8.2.0"},{name:"$size",value:"$size",score:1,meta:"expr:array",version:"2.6.0"},{name:"$slice",value:"$slice",score:1,meta:"expr:array",version:"3.2.0"},{name:"$sortArray",value:"$sortArray",score:1,meta:"expr:array",version:"5.2.0"},{name:"$split",value:"$split",score:1,meta:"expr:string",version:"3.4.0"},{name:"$sqrt",value:"$sqrt",score:1,meta:"expr:arith",version:"3.2.0"},{name:"$strcasecmp",value:"$strcasecmp",score:1,meta:"expr:string",version:"2.2.0"},{name:"$strLenBytes",value:"$strLenBytes",score:1,meta:"expr:string",version:"3.4.0"},{name:"$strLenCP",value:"$strLenCP",score:1,meta:"expr:string",version:"3.4.0"},{name:"$substr",value:"$substr",score:1,meta:"expr:string",version:"2.2.0",deprecated:"3.4.0",replacement:"$substrBytes"},{name:"$substrBytes",value:"$substrBytes",score:1,meta:"expr:string",version:"3.4.0"},{name:"$substrCP",value:"$substrCP",score:1,meta:"expr:string",version:"3.4.0"},{name:"$subtract",value:"$subtract",score:1,meta:"expr:arith",version:"3.2.0"},{name:"$switch",value:"$switch",score:1,meta:"expr:cond",version:"3.4.0"},{name:"$toHashedIndexKey",value:"$toHashedIndexKey",score:1,meta:"expr:arith",version:"4.2.24"},{name:"$toLower",value:"$toLower",score:1,meta:"expr:string",version:"2.2.0"},{name:"$toUpper",value:"$toUpper",score:1,meta:"expr:string",version:"2.2.0"},{name:"$tsSecond",value:"$tsSecond",score:1,meta:"expr:date",version:"5.1.0"},{name:"$tsIncrement",value:"$tsIncrement",score:1,meta:"expr:date",version:"5.1.0"},{name:"$trunc",value:"$trunc",score:1,meta:"expr:arith",version:"3.2.0"},{name:"$type",value:"$type",score:1,meta:"expr:type",version:"3.4.0"},{name:"$week",value:"$week",score:1,meta:"expr:date",version:"2.2.0"},{name:"$year",value:"$year",score:1,meta:"expr:date",version:"2.2.0"},{name:"$zip",value:"$zip",score:1,meta:"expr:array",version:"3.4.0"},{name:"$bitAnd",value:"$bitAnd",score:1,meta:"expr:bit",version:"7.0.0"},{name:"$bitOr",value:"$bitOr",score:1,meta:"expr:bit",version:"7.0.0"},{name:"$bitXor",value:"$bitXor",score:1,meta:"expr:bit",version:"7.0.0"},{name:"$bitNot",value:"$bitNot",score:1,meta:"expr:bit",version:"7.0.0"}]},48013:(e,t,n)=>{var r=n(99174),a=n(40811);function s(e){return 48<=e&&e<=55}function i(e){return 48<=e&&e<=57}e.exports=new a("tag:yaml.org,2002:int",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t,n,r=e.length,a=0,o=!1;if(!r)return!1;if("-"!==(t=e[a])&&"+"!==t||(t=e[++a]),"0"===t){if(a+1===r)return!0;if("b"===(t=e[++a])){for(a++;a<r;a++)if("_"!==(t=e[a])){if("0"!==t&&"1"!==t)return!1;o=!0}return o&&"_"!==t}if("x"===t){for(a++;a<r;a++)if("_"!==(t=e[a])){if(!(48<=(n=e.charCodeAt(a))&&n<=57||65<=n&&n<=70||97<=n&&n<=102))return!1;o=!0}return o&&"_"!==t}for(;a<r;a++)if("_"!==(t=e[a])){if(!s(e.charCodeAt(a)))return!1;o=!0}return o&&"_"!==t}if("_"===t)return!1;for(;a<r;a++)if("_"!==(t=e[a])){if(":"===t)break;if(!i(e.charCodeAt(a)))return!1;o=!0}return!(!o||"_"===t)&&(":"!==t||/^(:[0-5]?[0-9])+$/.test(e.slice(a)))},construct:function(e){var t,n,r=e,a=1,s=[];return-1!==r.indexOf("_")&&(r=r.replace(/_/g,"")),"-"!==(t=r[0])&&"+"!==t||("-"===t&&(a=-1),t=(r=r.slice(1))[0]),"0"===r?0:"0"===t?"b"===r[1]?a*parseInt(r.slice(2),2):"x"===r[1]?a*parseInt(r,16):a*parseInt(r,8):-1!==r.indexOf(":")?(r.split(":").forEach((function(e){s.unshift(parseInt(e,10))})),r=0,n=1,s.forEach((function(e){r+=e*n,n*=60})),a*r):a*parseInt(r,10)},predicate:function(e){return"[object Number]"===Object.prototype.toString.call(e)&&e%1==0&&!r.isNegativeZero(e)},represent:{binary:function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0"+e.toString(8):"-0"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})},48080:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.JSON_SCHEMA=void 0,t.JSON_SCHEMA=[{name:"bsonType",value:"bsonType",label:"bsonType",score:1,meta:"json-schema",version:"3.6.0",description:"Accepts same string aliases used for the $type operator"},{name:"enum",value:"enum",label:"enum",score:1,meta:"json-schema",version:"3.6.0",description:"Enumerates all possible values of the field"},{name:"type",value:"type",label:"type",score:1,meta:"json-schema",version:"3.6.0",description:"Enumerates the possible JSON types of the field"},{name:"allOf",value:"allOf",label:"allOf",score:1,meta:"json-schema",version:"3.6.0",description:"Field must match all specified schemas"},{name:"anyOf",value:"anyOf",label:"anyOf",score:1,meta:"json-schema",version:"3.6.0",description:"Field must match at least one of the specified schemas"},{name:"oneOf",value:"oneOf",label:"oneOf",score:1,meta:"json-schema",version:"3.6.0",description:"Field must match exactly one of the specified schemas"},{name:"not",value:"not",label:"not",score:1,meta:"json-schema",version:"3.6.0",description:"Field must not match the schema"},{name:"multipleOf",value:"multipleOf",label:"multipleOf",score:1,meta:"json-schema",version:"3.6.0",description:"Field must be a multiple of this value"},{name:"maximum",value:"maximum",label:"maximum",score:1,meta:"json-schema",version:"3.6.0",description:"Indicates the maximum value of the field"},{name:"exclusiveMaximum",value:"exclusiveMaximum",label:"exclusiveMaximum",score:1,meta:"json-schema",version:"3.6.0",description:"If true and field is a number, maximum is an exclusive maximum"},{name:"minimum",value:"minimum",label:"minimum",score:1,meta:"json-schema",version:"3.6.0",description:"Indicates the minimum value of the field"},{name:"exclusiveMinimum",value:"exclusiveMinimum",label:"exclusiveMinimum",score:1,meta:"json-schema",version:"3.6.0",description:"If true, minimum is an exclusive minimum"},{name:"maxLength",value:"maxLength",label:"maxLength",score:1,meta:"json-schema",version:"3.6.0",description:"Indicates the maximum length of the field"},{name:"minLength",value:"minLength",label:"minLength",score:1,meta:"json-schema",version:"3.6.0",description:"Indicates the minimum length of the field"},{name:"pattern",value:"pattern",label:"pattern",score:1,meta:"json-schema",version:"3.6.0",description:"Field must match the regular expression"},{name:"maxProperties",value:"maxProperties",label:"maxProperties",score:1,meta:"json-schema",version:"3.6.0",description:"Indicates the field’s maximum number of properties"},{name:"minProperties",value:"minProperties",label:"minProperties",score:1,meta:"json-schema",version:"3.6.0",description:"Indicates the field’s minimum number of properties"},{name:"required",value:"required",label:"required",score:1,meta:"json-schema",version:"3.6.0",description:"Object’s property set must contain all the specified elements in the array"},{name:"additionalProperties",value:"additionalProperties",label:"additionalProperties",score:1,meta:"json-schema",version:"3.6.0",description:"If true, additional fields are allowed"},{name:"properties",value:"properties",label:"properties",score:1,meta:"json-schema",version:"3.6.0",description:"A valid JSON Schema where each value is also a valid JSON Schema object"},{name:"patternProperties",value:"patternProperties",label:"patternProperties",score:1,meta:"json-schema",version:"3.6.0",description:"In addition to properties requirements, each property name of this object must be a valid regular expression"},{name:"dependencies",value:"dependencies",label:"dependencies",score:1,meta:"json-schema",version:"3.6.0",description:"Describes field or schema dependencies"},{name:"additionalItems",value:"additionalItems",label:"additionalItems",score:1,meta:"json-schema",version:"3.6.0",description:"If an object, must be a valid JSON Schema"},{name:"items",value:"items",label:"items",score:1,meta:"json-schema",version:"3.6.0",description:"Must be either a valid JSON Schema, or an array of valid JSON Schemas"},{name:"maxItems",value:"maxItems",label:"maxItems",score:1,meta:"json-schema",version:"3.6.0",description:"Indicates the maximum length of array"},{name:"minItems",value:"minItems",label:"minItems",score:1,meta:"json-schema",version:"3.6.0",description:"Indicates the minimum length of array"},{name:"uniqueItems",value:"uniqueItems",label:"uniqueItems",score:1,meta:"json-schema",version:"3.6.0",description:"If true, each item in the array must be unique"},{name:"title",value:"title",label:"title",score:1,meta:"json-schema",version:"3.6.0",description:"A descriptive title string with no effect"},{name:"description",value:"description",label:"description",score:1,meta:"json-schema",version:"3.6.0",description:"A string that describes the schema and has no effect."}]},48195:(e,t,n)=>{const r=n(12876),a=n(32674);e.exports=(e,t,n)=>{const s=[];let i=null,o=null;const l=e.sort(((e,t)=>a(e,t,n)));for(const e of l)r(e,t,n)?(o=e,i||(i=e)):(o&&s.push([i,o]),o=null,i=null);i&&s.push([i,null]);const c=[];for(const[e,t]of s)e===t?c.push(e):t||e!==l[0]?t?e===l[0]?c.push(`<=${t}`):c.push(`${e} - ${t}`):c.push(`>=${e}`):c.push("*");const u=c.join(" || "),p="string"==typeof t.raw?t.raw:String(t);return u.length<p.length?u:t}},48381:(e,t,n)=>{const r=n(29385),{MAX_LENGTH:a,MAX_SAFE_INTEGER:s}=n(24159),{safeRe:i,t:o}=n(92625),l=n(83214),{compareIdentifiers:c}=n(5286);class u{constructor(e,t){if(t=l(t),e instanceof u){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if("string"!=typeof e)throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>a)throw new TypeError(`version is longer than ${a} characters`);r("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const n=e.trim().match(t.loose?i[o.LOOSE]:i[o.FULL]);if(!n)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>s||this.major<0)throw new TypeError("Invalid major version");if(this.minor>s||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>s||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t<s)return t}return e})):this.prerelease=[],this.build=n[5]?n[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(r("SemVer.compare",this.version,this.options,e),!(e instanceof u)){if("string"==typeof e&&e===this.version)return 0;e=new u(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof u||(e=new u(e,this.options)),c(this.major,e.major)||c(this.minor,e.minor)||c(this.patch,e.patch)}comparePre(e){if(e instanceof u||(e=new u(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{const n=this.prerelease[t],a=e.prerelease[t];if(r("prerelease compare",t,n,a),void 0===n&&void 0===a)return 0;if(void 0===a)return 1;if(void 0===n)return-1;if(n!==a)return c(n,a)}while(++t)}compareBuild(e){e instanceof u||(e=new u(e,this.options));let t=0;do{const n=this.build[t],a=e.build[t];if(r("build compare",t,n,a),void 0===n&&void 0===a)return 0;if(void 0===a)return 1;if(void 0===n)return-1;if(n!==a)return c(n,a)}while(++t)}inc(e,t,n){if(e.startsWith("pre")){if(!t&&!1===n)throw new Error("invalid increment argument: identifier is empty");if(t){const e=`-${t}`.match(this.options.loose?i[o.PRERELEASELOOSE]:i[o.PRERELEASE]);if(!e||e[1]!==t)throw new Error(`invalid identifier: ${t}`)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,n);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,n);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,n),this.inc("pre",t,n);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t,n),this.inc("pre",t,n);break;case"release":if(0===this.prerelease.length)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":{const e=Number(n)?1:0;if(0===this.prerelease.length)this.prerelease=[e];else{let r=this.prerelease.length;for(;--r>=0;)"number"==typeof this.prerelease[r]&&(this.prerelease[r]++,r=-2);if(-1===r){if(t===this.prerelease.join(".")&&!1===n)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(t){let r=[t,e];!1===n&&(r=[t]),0===c(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=r):this.prerelease=r}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}e.exports=u},48543:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CONVERSION_OPERATORS=void 0,t.CONVERSION_OPERATORS=[{name:"$convert",value:"$convert",score:1,meta:"conv",version:"3.7.2"},{name:"$ltrim",value:"$ltrim",score:1,meta:"accumulator",version:"3.7.2"},{name:"$rtrim",value:"$rtrim",score:1,meta:"accumulator",version:"3.7.2"},{name:"$toBool",value:"$toBool",score:1,meta:"conv",version:"3.7.2"},{name:"$toDate",value:"$toDate",score:1,meta:"conv",version:"3.7.2"},{name:"$toDecimal",value:"$toDecimal",score:1,meta:"conv",version:"3.7.2"},{name:"$toDouble",value:"$toDouble",score:1,meta:"conv",version:"3.7.2"},{name:"$toInt",value:"$toInt",score:1,meta:"conv",version:"3.7.2"},{name:"$toLong",value:"$toLong",score:1,meta:"conv",version:"3.7.2"},{name:"$toObjectId",value:"$toObjectId",score:1,meta:"conv",version:"3.7.2"},{name:"$toString",value:"$toString",score:1,meta:"conv",version:"3.7.2"},{name:"$trim",value:"$trim",score:1,meta:"accumulator",version:"3.7.2"}]},49014:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ENVS=t.ON_PREM=t.ADL=t.ATLAS=void 0;const n="atlas";t.ATLAS=n,t.ADL="adl";const r="on-prem";t.ON_PREM=r;const a=[n,"adl",r];t.ENVS=a},49189:(e,t,n)=>{function r(e,t,n){function r(n,r){var a;Object.defineProperty(n,"_zod",{value:n._zod??{},enumerable:!1}),(a=n._zod).traits??(a.traits=new Set),n._zod.traits.add(e),t(n,r);for(const e in i.prototype)e in n||Object.defineProperty(n,e,{value:i.prototype[e].bind(n)});n._zod.constr=i,n._zod.def=r}const a=n?.Parent??Object;class s extends a{}function i(e){var t;const a=n?.Parent?new s:this;r(a,e),(t=a._zod).deferred??(t.deferred=[]);for(const e of a._zod.deferred)e();return a}return Object.defineProperty(s,"name",{value:e}),Object.defineProperty(i,"init",{value:r}),Object.defineProperty(i,Symbol.hasInstance,{value:t=>!!(n?.Parent&&t instanceof n.Parent)||t?._zod?.traits?.has(e)}),Object.defineProperty(i,"name",{value:e}),i}n.d(t,{$W:()=>i,GT:()=>a,cr:()=>s,xI:()=>r}),Object.freeze({status:"aborted"}),Symbol("zod_brand");class a extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}const s={};function i(e){return e&&Object.assign(s,e),s}},49764:(e,t,n)=>{var r=n(65994).e;const a="object"==typeof r&&r.env&&r.env.NODE_DEBUG&&/\bsemver\b/i.test(r.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};e.exports=a},49976:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var a=Object.getOwnPropertyDescriptor(t,n);a&&!("get"in a?!t.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,a)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),a=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.wrapField=t.getFilteredCompletions=void 0,a(n(22849),t),a(n(58516),t),a(n(77192),t),a(n(47530),t),a(n(63875),t),a(n(36744),t),a(n(91934),t),a(n(80417),t),a(n(28968),t),a(n(85426),t),a(n(86987),t),a(n(17624),t);var s=n(54316);Object.defineProperty(t,"getFilteredCompletions",{enumerable:!0,get:function(){return s.getFilteredCompletions}}),Object.defineProperty(t,"wrapField",{enumerable:!0,get:function(){return s.wrapField}}),a(n(69750),t),a(n(51778),t)},50066:(e,t,n)=>{const r=n(71598),{MAX_LENGTH:a,MAX_SAFE_INTEGER:s}=n(47755),{safeRe:i,t:o}=n(65684),l=n(31145),{compareIdentifiers:c}=n(76393);class u{constructor(e,t){if(t=l(t),e instanceof u){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if("string"!=typeof e)throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>a)throw new TypeError(`version is longer than ${a} characters`);r("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const n=e.trim().match(t.loose?i[o.LOOSE]:i[o.FULL]);if(!n)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>s||this.major<0)throw new TypeError("Invalid major version");if(this.minor>s||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>s||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t<s)return t}return e})):this.prerelease=[],this.build=n[5]?n[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(r("SemVer.compare",this.version,this.options,e),!(e instanceof u)){if("string"==typeof e&&e===this.version)return 0;e=new u(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof u||(e=new u(e,this.options)),c(this.major,e.major)||c(this.minor,e.minor)||c(this.patch,e.patch)}comparePre(e){if(e instanceof u||(e=new u(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{const n=this.prerelease[t],a=e.prerelease[t];if(r("prerelease compare",t,n,a),void 0===n&&void 0===a)return 0;if(void 0===a)return 1;if(void 0===n)return-1;if(n!==a)return c(n,a)}while(++t)}compareBuild(e){e instanceof u||(e=new u(e,this.options));let t=0;do{const n=this.build[t],a=e.build[t];if(r("build compare",t,n,a),void 0===n&&void 0===a)return 0;if(void 0===a)return 1;if(void 0===n)return-1;if(n!==a)return c(n,a)}while(++t)}inc(e,t,n){if(e.startsWith("pre")){if(!t&&!1===n)throw new Error("invalid increment argument: identifier is empty");if(t){const e=`-${t}`.match(this.options.loose?i[o.PRERELEASELOOSE]:i[o.PRERELEASE]);if(!e||e[1]!==t)throw new Error(`invalid identifier: ${t}`)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,n);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,n);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,n),this.inc("pre",t,n);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t,n),this.inc("pre",t,n);break;case"release":if(0===this.prerelease.length)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":{const e=Number(n)?1:0;if(0===this.prerelease.length)this.prerelease=[e];else{let r=this.prerelease.length;for(;--r>=0;)"number"==typeof this.prerelease[r]&&(this.prerelease[r]++,r=-2);if(-1===r){if(t===this.prerelease.join(".")&&!1===n)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(t){let r=[t,e];!1===n&&(r=[t]),0===c(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=r):this.prerelease=r}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}e.exports=u},50363:(e,t,n)=>{const r=n(38366);e.exports=(e,t,n)=>{try{t=new r(t,n)}catch(e){return!1}return t.test(e)}},50418:(e,t,n)=>{const r=n(57544);e.exports=(e,t)=>new r(e,t).minor},50678:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BSON_TYPES=void 0,t.BSON_TYPES=[{name:"Code",value:"Code",label:"Code",score:1,meta:"bson",version:"0.0.0",description:"BSON Code type",snippet:"Code('${1:code}')"},{name:"ObjectId",value:"ObjectId",label:"ObjectId",score:1,meta:"bson",version:"0.0.0",description:"BSON ObjectId type",snippet:"ObjectId('${1:id}')"},{name:"Binary",value:"Binary",label:"Binary",score:1,meta:"bson",version:"0.0.0",description:"BSON Binary type",snippet:"Binary('${1:data}', '${2:subType}')"},{name:"DBRef",value:"DBRef",label:"DBRef",score:1,meta:"bson",version:"0.0.0",description:"BSON DBRef type",snippet:"DBRef('${1:ns}', '${2:oid}')"},{name:"Timestamp",value:"Timestamp",label:"Timestamp",score:1,meta:"bson",version:"0.0.0",description:"BSON Timestamp type",snippet:"Timestamp(${1:low}, ${2:high})"},{name:"NumberInt",value:"NumberInt",label:"NumberInt",score:1,meta:"bson",version:"0.0.0",description:"BSON 32 bit Integer type",snippet:"NumberInt(${1:value})"},{name:"NumberLong",value:"NumberLong",label:"NumberLong",score:1,meta:"bson",version:"0.0.0",description:"BSON 64 but Integer type",snippet:"NumberLong(${1:value})"},{name:"NumberDecimal",value:"NumberDecimal",label:"NumberDecimal",score:1,meta:"bson",version:"3.4.0",description:"BSON Decimal128 type",snippet:"NumberDecimal('${1:value}')"},{name:"MaxKey",value:"MaxKey",label:"MaxKey",score:1,meta:"bson",version:"0.0.0",description:"BSON MaxKey type",snippet:"MaxKey()"},{name:"MinKey",value:"MinKey",label:"MinKey",score:1,meta:"bson",version:"0.0.0",description:"BSON MinKey type",snippet:"MinKey()"},{name:"ISODate",value:"ISODate",label:"ISODate",score:1,meta:"bson",version:"0.0.0",description:"BSON Date type",snippet:"ISODate('${1:date}')"},{name:"RegExp",value:"RegExp",label:"RegExp",score:1,meta:"bson",version:"0.0.0",description:"BSON Regex type",snippet:"RegExp('${1:source}', '${2:opts}')"}]},51098:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.QUERY_OPERATORS=void 0,t.QUERY_OPERATORS=[{name:"$all",value:"$all",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$and",value:"$and",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$bitsAllClear",value:"$bitsAllClear",score:1,meta:"query",version:"3.2.0",geospatial:!1},{name:"$bitsAllSet",value:"$bitsAllSet",score:1,meta:"query",version:"3.2.0",geospatial:!1},{name:"$bitsAnyClear",value:"$bitsAnyClear",score:1,meta:"query",version:"3.2.0",geospatial:!1},{name:"$bitsAnySet",value:"$bitsAnySet",score:1,meta:"query",version:"3.2.0",geospatial:!1},{name:"$comment",value:"$comment",score:1,meta:"query",version:"3.2.0",geospatial:!1},{name:"$elemMatch",value:"$elemMatch",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$eq",value:"$eq",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$exists",value:"$exists",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$expr",value:"$expr",score:1,meta:"query",version:"3.6.0",geospatial:!1},{name:"$geoIntersects",value:"$geoIntersects",score:1,meta:"query",version:"2.2.0",geospatial:!0},{name:"$geoWithin",value:"$geoWithin",score:1,meta:"query",version:"2.2.0",geospatial:!0},{name:"$gt",value:"$gt",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$gte",value:"$gte",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$in",value:"$in",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$jsonSchema",value:"$jsonSchema",score:1,meta:"query",version:"3.6.0",geospatial:!1},{name:"$lt",value:"$lt",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$lte",value:"$lte",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$mod",value:"$mod",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$ne",value:"$ne",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$near",value:"$near",score:1,meta:"query",version:"2.2.0",geospatial:!0},{name:"$nearSphere",value:"$nearSphere",score:1,meta:"query",version:"2.2.0",geospatial:!0},{name:"$nin",value:"$nin",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$not",value:"$not",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$nor",value:"$nor",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$or",value:"$or",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$regex",value:"$regex",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$size",value:"$size",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$slice",value:"$slice",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$text",value:"$text",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$type",value:"$type",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$where",value:"$where",score:1,meta:"query",version:"2.2.0",geospatial:!1}]},51138:(e,t,n)=>{var r=n(40811);e.exports=new r("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:function(){return!0},construct:function(){},predicate:function(e){return void 0===e},represent:function(){return""}})},51228:(e,t,n)=>{var r=n(40811),a=Object.prototype.hasOwnProperty;e.exports=new r("tag:yaml.org,2002:set",{kind:"mapping",resolve:function(e){if(null===e)return!0;var t,n=e;for(t in n)if(a.call(n,t)&&null!==n[t])return!1;return!0},construct:function(e){return null!==e?e:{}}})},51269:(e,t,n)=>{const r=n(25583);e.exports=(e,t,n)=>r(e,t,n)>0},51456:(e,t,n)=>{const r=n(99430);e.exports=(e,t,n)=>r(t,e,n)},51626:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BSON_TYPES=void 0,t.BSON_TYPES=[{name:"Code",value:"Code",label:"Code",score:1,meta:"bson",version:"0.0.0",description:"BSON Code type",snippet:"Code('${1:code}')"},{name:"ObjectId",value:"ObjectId",label:"ObjectId",score:1,meta:"bson",version:"0.0.0",description:"BSON ObjectId type",snippet:"ObjectId('${1:id}')"},{name:"Binary",value:"Binary",label:"Binary",score:1,meta:"bson",version:"0.0.0",description:"BSON Binary type",snippet:"Binary('${1:data}', '${2:subType}')"},{name:"DBRef",value:"DBRef",label:"DBRef",score:1,meta:"bson",version:"0.0.0",description:"BSON DBRef type",snippet:"DBRef('${1:ns}', '${2:oid}')"},{name:"Timestamp",value:"Timestamp",label:"Timestamp",score:1,meta:"bson",version:"0.0.0",description:"BSON Timestamp type",snippet:"Timestamp(${1:low}, ${2:high})"},{name:"NumberInt",value:"NumberInt",label:"NumberInt",score:1,meta:"bson",version:"0.0.0",description:"BSON 32 bit Integer type",snippet:"NumberInt(${1:value})"},{name:"NumberLong",value:"NumberLong",label:"NumberLong",score:1,meta:"bson",version:"0.0.0",description:"BSON 64 but Integer type",snippet:"NumberLong(${1:value})"},{name:"NumberDecimal",value:"NumberDecimal",label:"NumberDecimal",score:1,meta:"bson",version:"3.4.0",description:"BSON Decimal128 type",snippet:"NumberDecimal('${1:value}')"},{name:"MaxKey",value:"MaxKey",label:"MaxKey",score:1,meta:"bson",version:"0.0.0",description:"BSON MaxKey type",snippet:"MaxKey()"},{name:"MinKey",value:"MinKey",label:"MinKey",score:1,meta:"bson",version:"0.0.0",description:"BSON MinKey type",snippet:"MinKey()"},{name:"ISODate",value:"ISODate",label:"ISODate",score:1,meta:"bson",version:"0.0.0",description:"BSON Date type",snippet:"ISODate('${1:date}')"},{name:"RegExp",value:"RegExp",label:"RegExp",score:1,meta:"bson",version:"0.0.0",description:"BSON Regex type",snippet:"RegExp('${1:source}', '${2:opts}')"}]},51688:(e,t,n)=>{n.d(t,{vl:()=>Hs,ut:()=>Ks,gM:()=>As});var r=n(12240),a=n(42396),s=n(39581),i=n(72510);class o{constructor(e){this.counter=0,this.metadataRegistry=e?.metadata??s.fd,this.target=e?.target??"draft-2020-12",this.unrepresentable=e?.unrepresentable??"throw",this.override=e?.override??(()=>{}),this.io=e?.io??"output",this.seen=new Map}process(e,t={path:[],schemaPath:[]}){var n;const r=e._zod.def,a={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},s=this.seen.get(e);if(s)return s.count++,t.schemaPath.includes(e)&&(s.cycle=t.path),s.schema;const o={schema:{},count:1,cycle:void 0,path:t.path};this.seen.set(e,o);const c=e._zod.toJSONSchema?.();if(c)o.schema=c;else{const n={...t,schemaPath:[...t.schemaPath,e],path:t.path},s=e._zod.parent;if(s)o.ref=s,this.process(s,n),this.seen.get(s).isParent=!0;else{const t=o.schema;switch(r.type){case"string":{const n=t;n.type="string";const{minimum:r,maximum:s,format:i,patterns:l,contentEncoding:c}=e._zod.bag;if("number"==typeof r&&(n.minLength=r),"number"==typeof s&&(n.maxLength=s),i&&(n.format=a[i]??i,""===n.format&&delete n.format),c&&(n.contentEncoding=c),l&&l.size>0){const e=[...l];1===e.length?n.pattern=e[0].source:e.length>1&&(o.schema.allOf=[...e.map((e=>({..."draft-7"===this.target?{type:"string"}:{},pattern:e.source})))])}break}case"number":{const n=t,{minimum:r,maximum:a,format:s,multipleOf:i,exclusiveMaximum:o,exclusiveMinimum:l}=e._zod.bag;"string"==typeof s&&s.includes("int")?n.type="integer":n.type="number","number"==typeof l&&(n.exclusiveMinimum=l),"number"==typeof r&&(n.minimum=r,"number"==typeof l&&(l>=r?delete n.minimum:delete n.exclusiveMinimum)),"number"==typeof o&&(n.exclusiveMaximum=o),"number"==typeof a&&(n.maximum=a,"number"==typeof o&&(o<=a?delete n.maximum:delete n.exclusiveMaximum)),"number"==typeof i&&(n.multipleOf=i);break}case"boolean":case"success":t.type="boolean";break;case"bigint":if("throw"===this.unrepresentable)throw new Error("BigInt cannot be represented in JSON Schema");break;case"symbol":if("throw"===this.unrepresentable)throw new Error("Symbols cannot be represented in JSON Schema");break;case"null":t.type="null";break;case"any":case"unknown":break;case"undefined":if("throw"===this.unrepresentable)throw new Error("Undefined cannot be represented in JSON Schema");break;case"void":if("throw"===this.unrepresentable)throw new Error("Void cannot be represented in JSON Schema");break;case"never":t.not={};break;case"date":if("throw"===this.unrepresentable)throw new Error("Date cannot be represented in JSON Schema");break;case"array":{const a=t,{minimum:s,maximum:i}=e._zod.bag;"number"==typeof s&&(a.minItems=s),"number"==typeof i&&(a.maxItems=i),a.type="array",a.items=this.process(r.element,{...n,path:[...n.path,"items"]});break}case"object":{const e=t;e.type="object",e.properties={};const a=r.shape;for(const t in a)e.properties[t]=this.process(a[t],{...n,path:[...n.path,"properties",t]});const s=new Set(Object.keys(a)),i=new Set([...s].filter((e=>{const t=r.shape[e]._zod;return"input"===this.io?void 0===t.optin:void 0===t.optout})));i.size>0&&(e.required=Array.from(i)),"never"===r.catchall?._zod.def.type?e.additionalProperties=!1:r.catchall?r.catchall&&(e.additionalProperties=this.process(r.catchall,{...n,path:[...n.path,"additionalProperties"]})):"output"===this.io&&(e.additionalProperties=!1);break}case"union":t.anyOf=r.options.map(((e,t)=>this.process(e,{...n,path:[...n.path,"anyOf",t]})));break;case"intersection":{const e=t,a=this.process(r.left,{...n,path:[...n.path,"allOf",0]}),s=this.process(r.right,{...n,path:[...n.path,"allOf",1]}),i=e=>"allOf"in e&&1===Object.keys(e).length,o=[...i(a)?a.allOf:[a],...i(s)?s.allOf:[s]];e.allOf=o;break}case"tuple":{const a=t;a.type="array";const s=r.items.map(((e,t)=>this.process(e,{...n,path:[...n.path,"prefixItems",t]})));if("draft-2020-12"===this.target?a.prefixItems=s:a.items=s,r.rest){const e=this.process(r.rest,{...n,path:[...n.path,"items"]});"draft-2020-12"===this.target?a.items=e:a.additionalItems=e}r.rest&&(a.items=this.process(r.rest,{...n,path:[...n.path,"items"]}));const{minimum:i,maximum:o}=e._zod.bag;"number"==typeof i&&(a.minItems=i),"number"==typeof o&&(a.maxItems=o);break}case"record":{const e=t;e.type="object",e.propertyNames=this.process(r.keyType,{...n,path:[...n.path,"propertyNames"]}),e.additionalProperties=this.process(r.valueType,{...n,path:[...n.path,"additionalProperties"]});break}case"map":if("throw"===this.unrepresentable)throw new Error("Map cannot be represented in JSON Schema");break;case"set":if("throw"===this.unrepresentable)throw new Error("Set cannot be represented in JSON Schema");break;case"enum":{const e=t,n=(0,i.w5)(r.entries);n.every((e=>"number"==typeof e))&&(e.type="number"),n.every((e=>"string"==typeof e))&&(e.type="string"),e.enum=n;break}case"literal":{const e=t,n=[];for(const e of r.values)if(void 0===e){if("throw"===this.unrepresentable)throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if("bigint"==typeof e){if("throw"===this.unrepresentable)throw new Error("BigInt literals cannot be represented in JSON Schema");n.push(Number(e))}else n.push(e);if(0===n.length);else if(1===n.length){const t=n[0];e.type=null===t?"null":typeof t,e.const=t}else n.every((e=>"number"==typeof e))&&(e.type="number"),n.every((e=>"string"==typeof e))&&(e.type="string"),n.every((e=>"boolean"==typeof e))&&(e.type="string"),n.every((e=>null===e))&&(e.type="null"),e.enum=n;break}case"file":{const n=t,r={type:"string",format:"binary",contentEncoding:"binary"},{minimum:a,maximum:s,mime:i}=e._zod.bag;void 0!==a&&(r.minLength=a),void 0!==s&&(r.maxLength=s),i?1===i.length?(r.contentMediaType=i[0],Object.assign(n,r)):n.anyOf=i.map((e=>({...r,contentMediaType:e}))):Object.assign(n,r);break}case"transform":if("throw"===this.unrepresentable)throw new Error("Transforms cannot be represented in JSON Schema");break;case"nullable":{const e=this.process(r.innerType,n);t.anyOf=[e,{type:"null"}];break}case"nonoptional":case"promise":case"optional":this.process(r.innerType,n),o.ref=r.innerType;break;case"default":this.process(r.innerType,n),o.ref=r.innerType,t.default=JSON.parse(JSON.stringify(r.defaultValue));break;case"prefault":this.process(r.innerType,n),o.ref=r.innerType,"input"===this.io&&(t._prefault=JSON.parse(JSON.stringify(r.defaultValue)));break;case"catch":{let e;this.process(r.innerType,n),o.ref=r.innerType;try{e=r.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}t.default=e;break}case"nan":if("throw"===this.unrepresentable)throw new Error("NaN cannot be represented in JSON Schema");break;case"template_literal":{const n=t,r=e._zod.pattern;if(!r)throw new Error("Pattern not found in template literal");n.type="string",n.pattern=r.source;break}case"pipe":{const e="input"===this.io?"transform"===r.in._zod.def.type?r.out:r.in:r.out;this.process(e,n),o.ref=e;break}case"readonly":this.process(r.innerType,n),o.ref=r.innerType,t.readOnly=!0;break;case"lazy":{const t=e._zod.innerType;this.process(t,n),o.ref=t;break}case"custom":if("throw"===this.unrepresentable)throw new Error("Custom types cannot be represented in JSON Schema")}}}const u=this.metadataRegistry.get(e);return u&&Object.assign(o.schema,u),"input"===this.io&&l(e)&&(delete o.schema.examples,delete o.schema.default),"input"===this.io&&o.schema._prefault&&((n=o.schema).default??(n.default=o.schema._prefault)),delete o.schema._prefault,this.seen.get(e).schema}emit(e,t){const n={cycles:t?.cycles??"ref",reused:t?.reused??"inline",external:t?.external??void 0},r=this.seen.get(e);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");const a=e=>{const t="draft-2020-12"===this.target?"$defs":"definitions";if(n.external){const r=n.external.registry.get(e[0])?.id,a=n.external.uri??(e=>e);if(r)return{ref:a(r)};const s=e[1].defId??e[1].schema.id??"schema"+this.counter++;return e[1].defId=s,{defId:s,ref:`${a("__shared")}#/${t}/${s}`}}if(e[1]===r)return{ref:"#"};const a=`#/${t}/`,s=e[1].schema.id??"__schema"+this.counter++;return{defId:s,ref:a+s}},s=e=>{if(e[1].schema.$ref)return;const t=e[1],{ref:n,defId:r}=a(e);t.def={...t.schema},r&&(t.defId=r);const s=t.schema;for(const e in s)delete s[e];s.$ref=n};if("throw"===n.cycles)for(const e of this.seen.entries()){const t=e[1];if(t.cycle)throw new Error(`Cycle detected: #/${t.cycle?.join("/")}/<root>\n\nSet the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const t of this.seen.entries()){const r=t[1];if(e===t[0]){s(t);continue}if(n.external){const r=n.external.registry.get(t[0])?.id;if(e!==t[0]&&r){s(t);continue}}const a=this.metadataRegistry.get(t[0])?.id;(a||r.cycle||r.count>1&&"ref"===n.reused)&&s(t)}const i=(e,t)=>{const n=this.seen.get(e),r=n.def??n.schema,a={...r};if(null===n.ref)return;const s=n.ref;if(n.ref=null,s){i(s,t);const e=this.seen.get(s).schema;e.$ref&&"draft-7"===t.target?(r.allOf=r.allOf??[],r.allOf.push(e)):(Object.assign(r,e),Object.assign(r,a))}n.isParent||this.override({zodSchema:e,jsonSchema:r,path:n.path??[]})};for(const e of[...this.seen.entries()].reverse())i(e[0],{target:this.target});const o={};if("draft-2020-12"===this.target?o.$schema="https://json-schema.org/draft/2020-12/schema":"draft-7"===this.target?o.$schema="http://json-schema.org/draft-07/schema#":console.warn(`Invalid target: ${this.target}`),n.external?.uri){const t=n.external.registry.get(e)?.id;if(!t)throw new Error("Schema is missing an `id` property");o.$id=n.external.uri(t)}Object.assign(o,r.def);const l=n.external?.defs??{};for(const e of this.seen.entries()){const t=e[1];t.def&&t.defId&&(l[t.defId]=t.def)}n.external||Object.keys(l).length>0&&("draft-2020-12"===this.target?o.$defs=l:o.definitions=l);try{return JSON.parse(JSON.stringify(o))}catch(e){throw new Error("Error converting schema to JSON.")}}}function l(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const r=e._zod.def;switch(r.type){case"string":case"number":case"bigint":case"boolean":case"date":case"symbol":case"undefined":case"null":case"any":case"unknown":case"never":case"void":case"literal":case"enum":case"nan":case"file":case"template_literal":case"custom":case"success":case"catch":return!1;case"array":return l(r.element,n);case"object":for(const e in r.shape)if(l(r.shape[e],n))return!0;return!1;case"union":for(const e of r.options)if(l(e,n))return!0;return!1;case"intersection":return l(r.left,n)||l(r.right,n);case"tuple":for(const e of r.items)if(l(e,n))return!0;return!(!r.rest||!l(r.rest,n));case"record":case"map":return l(r.keyType,n)||l(r.valueType,n);case"set":return l(r.valueType,n);case"promise":case"optional":case"nonoptional":case"nullable":case"readonly":case"default":case"prefault":return l(r.innerType,n);case"lazy":return l(r.getter(),n);case"transform":return!0;case"pipe":return l(r.in,n)||l(r.out,n)}throw new Error(`Unknown schema type: ${r.type}`)}var c,u,p=n(2420);!function(e){e.assertEqual=e=>{},e.assertIs=function(e){},e.assertNever=function(e){throw new Error},e.arrayToEnum=e=>{const t={};for(const n of e)t[n]=n;return t},e.getValidEnumValues=t=>{const n=e.objectKeys(t).filter((e=>"number"!=typeof t[t[e]])),r={};for(const e of n)r[e]=t[e];return e.objectValues(r)},e.objectValues=t=>e.objectKeys(t).map((function(e){return t[e]})),e.objectKeys="function"==typeof Object.keys?e=>Object.keys(e):e=>{const t=[];for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t},e.find=(e,t)=>{for(const n of e)if(t(n))return n},e.isInteger="function"==typeof Number.isInteger?e=>Number.isInteger(e):e=>"number"==typeof e&&Number.isFinite(e)&&Math.floor(e)===e,e.joinValues=function(e,t=" | "){return e.map((e=>"string"==typeof e?`'${e}'`:e)).join(t)},e.jsonStringifyReplacer=(e,t)=>"bigint"==typeof t?t.toString():t}(c||(c={})),function(e){e.mergeShapes=(e,t)=>({...e,...t})}(u||(u={}));const d=c.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),m=e=>{switch(typeof e){case"undefined":return d.undefined;case"string":return d.string;case"number":return Number.isNaN(e)?d.nan:d.number;case"boolean":return d.boolean;case"function":return d.function;case"bigint":return d.bigint;case"symbol":return d.symbol;case"object":return Array.isArray(e)?d.array:null===e?d.null:e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch?d.promise:"undefined"!=typeof Map&&e instanceof Map?d.map:"undefined"!=typeof Set&&e instanceof Set?d.set:"undefined"!=typeof Date&&e instanceof Date?d.date:d.object;default:return d.unknown}},h=c.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class f extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};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(e){return e.message},n={_errors:[]},r=e=>{for(const a of e.issues)if("invalid_union"===a.code)a.unionErrors.map(r);else if("invalid_return_type"===a.code)r(a.returnTypeError);else if("invalid_arguments"===a.code)r(a.argumentsError);else if(0===a.path.length)n._errors.push(t(a));else{let e=n,r=0;for(;r<a.path.length;){const n=a.path[r];r===a.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(a))):e[n]=e[n]||{_errors:[]},e=e[n],r++}}};return r(this),n}static assert(e){if(!(e instanceof f))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,c.jsonStringifyReplacer,2)}get isEmpty(){return 0===this.issues.length}flatten(e=e=>e.message){const t={},n=[];for(const r of this.issues)if(r.path.length>0){const n=r.path[0];t[n]=t[n]||[],t[n].push(e(r))}else n.push(e(r));return{formErrors:n,fieldErrors:t}}get formErrors(){return this.flatten()}}f.create=e=>new f(e);const v=(e,t)=>{let n;switch(e.code){case h.invalid_type:n=e.received===d.undefined?"Required":`Expected ${e.expected}, received ${e.received}`;break;case h.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,c.jsonStringifyReplacer)}`;break;case h.unrecognized_keys:n=`Unrecognized key(s) in object: ${c.joinValues(e.keys,", ")}`;break;case h.invalid_union:n="Invalid input";break;case h.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${c.joinValues(e.options)}`;break;case h.invalid_enum_value:n=`Invalid enum value. Expected ${c.joinValues(e.options)}, received '${e.received}'`;break;case h.invalid_arguments:n="Invalid function arguments";break;case h.invalid_return_type:n="Invalid function return type";break;case h.invalid_date:n="Invalid date";break;case h.invalid_string:"object"==typeof e.validation?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,"number"==typeof e.validation.position&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:c.assertNever(e.validation):n="regex"!==e.validation?`Invalid ${e.validation}`:"Invalid";break;case h.too_small:n="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:"number"===e.type||"bigint"===e.type?`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:"date"===e.type?`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:"Invalid input";break;case h.too_big:n="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"bigint"===e.type?`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"date"===e.type?`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:"Invalid input";break;case h.custom:n="Invalid input";break;case h.invalid_intersection_types:n="Intersection results could not be merged";break;case h.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case h.not_finite:n="Number must be finite";break;default:n=t.defaultError,c.assertNever(e)}return{message:n}};let g=v;var y;!function(e){e.errToObj=e=>"string"==typeof e?{message:e}:e||{},e.toString=e=>"string"==typeof e?e:e?.message}(y||(y={}));function $(e,t){const n=g,r=(e=>{const{data:t,path:n,errorMaps:r,issueData:a}=e,s=[...n,...a.path||[]],i={...a,path:s};if(void 0!==a.message)return{...a,path:s,message:a.message};let o="";const l=r.filter((e=>!!e)).slice().reverse();for(const e of l)o=e(i,{data:t,defaultError:o}).message;return{...a,path:s,message:o}})({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===v?void 0:v].filter((e=>!!e))});e.common.issues.push(r)}class b{constructor(){this.value="valid"}dirty(){"valid"===this.value&&(this.value="dirty")}abort(){"aborted"!==this.value&&(this.value="aborted")}static mergeArray(e,t){const n=[];for(const r of t){if("aborted"===r.status)return E;"dirty"===r.status&&e.dirty(),n.push(r.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,t){const n=[];for(const e of t){const t=await e.key,r=await e.value;n.push({key:t,value:r})}return b.mergeObjectSync(e,n)}static mergeObjectSync(e,t){const n={};for(const r of t){const{key:t,value:a}=r;if("aborted"===t.status)return E;if("aborted"===a.status)return E;"dirty"===t.status&&e.dirty(),"dirty"===a.status&&e.dirty(),"__proto__"===t.value||void 0===a.value&&!r.alwaysSet||(n[t.value]=a.value)}return{status:e.value,value:n}}}const E=Object.freeze({status:"aborted"}),S=e=>({status:"dirty",value:e}),A=e=>({status:"valid",value:e}),_=e=>"aborted"===e.status,x=e=>"dirty"===e.status,w=e=>"valid"===e.status,O=e=>"undefined"!=typeof Promise&&e instanceof Promise;var N=n(9606).URL;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||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const T=(e,t)=>{if(w(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new f(e.common.issues);return this._error=t,this._error}}};function R(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:a}=e;if(t&&(n||r))throw new Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');return t?{errorMap:t,description:a}:{errorMap:(t,a)=>{const{message:s}=e;return"invalid_enum_value"===t.code?{message:s??a.defaultError}:void 0===a.data?{message:s??r??a.defaultError}:"invalid_type"!==t.code?{message:a.defaultError}:{message:s??n??a.defaultError}},description:a}}class C{get description(){return this._def.description}_getType(e){return m(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:m(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new b,ctx:{common:e.parent.common,data:e.data,parsedType:m(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(O(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){const n={common:{issues:[],async:t?.async??!1,contextualErrorMap:t?.errorMap},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:m(e)},r=this._parseSync({data:e,path:n.path,parent:n});return T(n,r)}"~validate"(e){const t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:m(e)};if(!this["~standard"].async)try{const n=this._parseSync({data:e,path:[],parent:t});return w(n)?{value:n.value}:{issues:t.common.issues}}catch(e){e?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then((e=>w(e)?{value:e.value}:{issues:t.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?.errorMap,async:!0},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:m(e)},r=this._parse({data:e,path:n.path,parent:n}),a=await(O(r)?r:Promise.resolve(r));return T(n,a)}refine(e,t){const n=e=>"string"==typeof t||void 0===t?{message:t}:"function"==typeof t?t(e):t;return this._refinement(((t,r)=>{const a=e(t),s=()=>r.addIssue({code:h.custom,...n(t)});return"undefined"!=typeof Promise&&a instanceof Promise?a.then((e=>!!e||(s(),!1))):!!a||(s(),!1)}))}refinement(e,t){return this._refinement(((n,r)=>!!e(n)||(r.addIssue("function"==typeof t?t(n,r):t),!1)))}_refinement(e){return new Ne({schema:this,typeName:je.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:e=>this["~validate"](e)}}optional(){return Ie.create(this,this._def)}nullable(){return Te.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return me.create(this)}promise(){return Oe.create(this,this._def)}or(e){return ve.create([this,e],this._def)}and(e){return ye.create(this,e,this._def)}transform(e){return new Ne({...R(this._def),schema:this,typeName:je.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t="function"==typeof e?e:()=>e;return new Re({...R(this._def),innerType:this,defaultValue:t,typeName:je.ZodDefault})}brand(){return new Le({typeName:je.ZodBranded,type:this,...R(this._def)})}catch(e){const t="function"==typeof e?e:()=>e;return new Ce({...R(this._def),innerType:this,catchValue:t,typeName:je.ZodCatch})}describe(e){return new(0,this.constructor)({...this._def,description:e})}pipe(e){return Pe.create(this,e)}readonly(){return Me.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const k=/^c[^\s-]{8,}$/i,L=/^[0-9a-z]+$/,P=/^[0-9A-HJKMNP-TV-Z]{26}$/i,M=/^[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,j=/^[a-z0-9_-]{21}$/i,D=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,F=/^[-+]?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)?)??$/,V=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i;let q;const B=/^(?:(?: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])$/,U=/^(?:(?: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])$/,Y=/^(([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]))$/,z=/^(([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])$/,Z=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,G=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,W="((\\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])))",H=new RegExp(`^${W}$`);function K(e){let t="[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:null==e.precision&&(t=`${t}(\\.\\d+)?`),`([01]\\d|2[0-3]):[0-5]\\d(:${t})${e.precision?"+":"?"}`}function X(e){let t=`${W}T${K(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function J(e,t){if(!D.test(e))return!1;try{const[n]=e.split(".");if(!n)return!1;const r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),a=JSON.parse(atob(r));return!("object"!=typeof a||null===a||"typ"in a&&"JWT"!==a?.typ||!a.alg||t&&a.alg!==t)}catch{return!1}}function Q(e,t){return!("v4"!==t&&t||!U.test(e))||!("v6"!==t&&t||!z.test(e))}class ee extends C{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==d.string){const t=this._getOrReturnCtx(e);return $(t,{code:h.invalid_type,expected:d.string,received:t.parsedType}),E}const t=new b;let n;for(const s of this._def.checks)if("min"===s.kind)e.data.length<s.value&&(n=this._getOrReturnCtx(e,n),$(n,{code:h.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),t.dirty());else if("max"===s.kind)e.data.length>s.value&&(n=this._getOrReturnCtx(e,n),$(n,{code:h.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),t.dirty());else if("length"===s.kind){const r=e.data.length>s.value,a=e.data.length<s.value;(r||a)&&(n=this._getOrReturnCtx(e,n),r?$(n,{code:h.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):a&&$(n,{code:h.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),t.dirty())}else if("email"===s.kind)V.test(e.data)||(n=this._getOrReturnCtx(e,n),$(n,{validation:"email",code:h.invalid_string,message:s.message}),t.dirty());else if("emoji"===s.kind)q||(q=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),q.test(e.data)||(n=this._getOrReturnCtx(e,n),$(n,{validation:"emoji",code:h.invalid_string,message:s.message}),t.dirty());else if("uuid"===s.kind)M.test(e.data)||(n=this._getOrReturnCtx(e,n),$(n,{validation:"uuid",code:h.invalid_string,message:s.message}),t.dirty());else if("nanoid"===s.kind)j.test(e.data)||(n=this._getOrReturnCtx(e,n),$(n,{validation:"nanoid",code:h.invalid_string,message:s.message}),t.dirty());else if("cuid"===s.kind)k.test(e.data)||(n=this._getOrReturnCtx(e,n),$(n,{validation:"cuid",code:h.invalid_string,message:s.message}),t.dirty());else if("cuid2"===s.kind)L.test(e.data)||(n=this._getOrReturnCtx(e,n),$(n,{validation:"cuid2",code:h.invalid_string,message:s.message}),t.dirty());else if("ulid"===s.kind)P.test(e.data)||(n=this._getOrReturnCtx(e,n),$(n,{validation:"ulid",code:h.invalid_string,message:s.message}),t.dirty());else if("url"===s.kind)try{new N(e.data)}catch{n=this._getOrReturnCtx(e,n),$(n,{validation:"url",code:h.invalid_string,message:s.message}),t.dirty()}else"regex"===s.kind?(s.regex.lastIndex=0,s.regex.test(e.data)||(n=this._getOrReturnCtx(e,n),$(n,{validation:"regex",code:h.invalid_string,message:s.message}),t.dirty())):"trim"===s.kind?e.data=e.data.trim():"includes"===s.kind?e.data.includes(s.value,s.position)||(n=this._getOrReturnCtx(e,n),$(n,{code:h.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),t.dirty()):"toLowerCase"===s.kind?e.data=e.data.toLowerCase():"toUpperCase"===s.kind?e.data=e.data.toUpperCase():"startsWith"===s.kind?e.data.startsWith(s.value)||(n=this._getOrReturnCtx(e,n),$(n,{code:h.invalid_string,validation:{startsWith:s.value},message:s.message}),t.dirty()):"endsWith"===s.kind?e.data.endsWith(s.value)||(n=this._getOrReturnCtx(e,n),$(n,{code:h.invalid_string,validation:{endsWith:s.value},message:s.message}),t.dirty()):"datetime"===s.kind?X(s).test(e.data)||(n=this._getOrReturnCtx(e,n),$(n,{code:h.invalid_string,validation:"datetime",message:s.message}),t.dirty()):"date"===s.kind?H.test(e.data)||(n=this._getOrReturnCtx(e,n),$(n,{code:h.invalid_string,validation:"date",message:s.message}),t.dirty()):"time"===s.kind?new RegExp(`^${K(s)}$`).test(e.data)||(n=this._getOrReturnCtx(e,n),$(n,{code:h.invalid_string,validation:"time",message:s.message}),t.dirty()):"duration"===s.kind?F.test(e.data)||(n=this._getOrReturnCtx(e,n),$(n,{validation:"duration",code:h.invalid_string,message:s.message}),t.dirty()):"ip"===s.kind?(r=e.data,("v4"!==(a=s.version)&&a||!B.test(r))&&("v6"!==a&&a||!Y.test(r))&&(n=this._getOrReturnCtx(e,n),$(n,{validation:"ip",code:h.invalid_string,message:s.message}),t.dirty())):"jwt"===s.kind?J(e.data,s.alg)||(n=this._getOrReturnCtx(e,n),$(n,{validation:"jwt",code:h.invalid_string,message:s.message}),t.dirty()):"cidr"===s.kind?Q(e.data,s.version)||(n=this._getOrReturnCtx(e,n),$(n,{validation:"cidr",code:h.invalid_string,message:s.message}),t.dirty()):"base64"===s.kind?Z.test(e.data)||(n=this._getOrReturnCtx(e,n),$(n,{validation:"base64",code:h.invalid_string,message:s.message}),t.dirty()):"base64url"===s.kind?G.test(e.data)||(n=this._getOrReturnCtx(e,n),$(n,{validation:"base64url",code:h.invalid_string,message:s.message}),t.dirty()):c.assertNever(s);var r,a;return{status:t.value,value:e.data}}_regex(e,t,n){return this.refinement((t=>e.test(t)),{validation:t,code:h.invalid_string,...y.errToObj(n)})}_addCheck(e){return new ee({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...y.errToObj(e)})}url(e){return this._addCheck({kind:"url",...y.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...y.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...y.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...y.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...y.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...y.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...y.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...y.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...y.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...y.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...y.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...y.errToObj(e)})}datetime(e){return"string"==typeof e?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:void 0===e?.precision?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...y.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return"string"==typeof e?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:void 0===e?.precision?null:e?.precision,...y.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...y.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...y.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t?.position,...y.errToObj(t?.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...y.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...y.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...y.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...y.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...y.errToObj(t)})}nonempty(e){return this.min(1,y.errToObj(e))}trim(){return new ee({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new ee({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new ee({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find((e=>"datetime"===e.kind))}get isDate(){return!!this._def.checks.find((e=>"date"===e.kind))}get isTime(){return!!this._def.checks.find((e=>"time"===e.kind))}get isDuration(){return!!this._def.checks.find((e=>"duration"===e.kind))}get isEmail(){return!!this._def.checks.find((e=>"email"===e.kind))}get isURL(){return!!this._def.checks.find((e=>"url"===e.kind))}get isEmoji(){return!!this._def.checks.find((e=>"emoji"===e.kind))}get isUUID(){return!!this._def.checks.find((e=>"uuid"===e.kind))}get isNANOID(){return!!this._def.checks.find((e=>"nanoid"===e.kind))}get isCUID(){return!!this._def.checks.find((e=>"cuid"===e.kind))}get isCUID2(){return!!this._def.checks.find((e=>"cuid2"===e.kind))}get isULID(){return!!this._def.checks.find((e=>"ulid"===e.kind))}get isIP(){return!!this._def.checks.find((e=>"ip"===e.kind))}get isCIDR(){return!!this._def.checks.find((e=>"cidr"===e.kind))}get isBase64(){return!!this._def.checks.find((e=>"base64"===e.kind))}get isBase64url(){return!!this._def.checks.find((e=>"base64url"===e.kind))}get minLength(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}function te(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,a=n>r?n:r;return Number.parseInt(e.toFixed(a).replace(".",""))%Number.parseInt(t.toFixed(a).replace(".",""))/10**a}ee.create=e=>new ee({checks:[],typeName:je.ZodString,coerce:e?.coerce??!1,...R(e)});class ne extends C{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)!==d.number){const t=this._getOrReturnCtx(e);return $(t,{code:h.invalid_type,expected:d.number,received:t.parsedType}),E}let t;const n=new b;for(const r of this._def.checks)"int"===r.kind?c.isInteger(e.data)||(t=this._getOrReturnCtx(e,t),$(t,{code:h.invalid_type,expected:"integer",received:"float",message:r.message}),n.dirty()):"min"===r.kind?(r.inclusive?e.data<r.value:e.data<=r.value)&&(t=this._getOrReturnCtx(e,t),$(t,{code:h.too_small,minimum:r.value,type:"number",inclusive:r.inclusive,exact:!1,message:r.message}),n.dirty()):"max"===r.kind?(r.inclusive?e.data>r.value:e.data>=r.value)&&(t=this._getOrReturnCtx(e,t),$(t,{code:h.too_big,maximum:r.value,type:"number",inclusive:r.inclusive,exact:!1,message:r.message}),n.dirty()):"multipleOf"===r.kind?0!==te(e.data,r.value)&&(t=this._getOrReturnCtx(e,t),$(t,{code:h.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):"finite"===r.kind?Number.isFinite(e.data)||(t=this._getOrReturnCtx(e,t),$(t,{code:h.not_finite,message:r.message}),n.dirty()):c.assertNever(r);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,y.toString(t))}gt(e,t){return this.setLimit("min",e,!1,y.toString(t))}lte(e,t){return this.setLimit("max",e,!0,y.toString(t))}lt(e,t){return this.setLimit("max",e,!1,y.toString(t))}setLimit(e,t,n,r){return new ne({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:y.toString(r)}]})}_addCheck(e){return new ne({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:y.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:y.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:y.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:y.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:y.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:y.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:y.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:y.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:y.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find((e=>"int"===e.kind||"multipleOf"===e.kind&&c.isInteger(e.value)))}get isFinite(){let e=null,t=null;for(const n of this._def.checks){if("finite"===n.kind||"int"===n.kind||"multipleOf"===n.kind)return!0;"min"===n.kind?(null===t||n.value>t)&&(t=n.value):"max"===n.kind&&(null===e||n.value<e)&&(e=n.value)}return Number.isFinite(t)&&Number.isFinite(e)}}ne.create=e=>new ne({checks:[],typeName:je.ZodNumber,coerce:e?.coerce||!1,...R(e)});class re extends C{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)!==d.bigint)return this._getInvalidInput(e);let t;const n=new b;for(const r of this._def.checks)"min"===r.kind?(r.inclusive?e.data<r.value:e.data<=r.value)&&(t=this._getOrReturnCtx(e,t),$(t,{code:h.too_small,type:"bigint",minimum:r.value,inclusive:r.inclusive,message:r.message}),n.dirty()):"max"===r.kind?(r.inclusive?e.data>r.value:e.data>=r.value)&&(t=this._getOrReturnCtx(e,t),$(t,{code:h.too_big,type:"bigint",maximum:r.value,inclusive:r.inclusive,message:r.message}),n.dirty()):"multipleOf"===r.kind?e.data%r.value!==BigInt(0)&&(t=this._getOrReturnCtx(e,t),$(t,{code:h.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):c.assertNever(r);return{status:n.value,value:e.data}}_getInvalidInput(e){const t=this._getOrReturnCtx(e);return $(t,{code:h.invalid_type,expected:d.bigint,received:t.parsedType}),E}gte(e,t){return this.setLimit("min",e,!0,y.toString(t))}gt(e,t){return this.setLimit("min",e,!1,y.toString(t))}lte(e,t){return this.setLimit("max",e,!0,y.toString(t))}lt(e,t){return this.setLimit("max",e,!1,y.toString(t))}setLimit(e,t,n,r){return new re({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:y.toString(r)}]})}_addCheck(e){return new re({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:y.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:y.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:y.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:y.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:y.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}re.create=e=>new re({checks:[],typeName:je.ZodBigInt,coerce:e?.coerce??!1,...R(e)});class ae extends C{_parse(e){if(this._def.coerce&&(e.data=Boolean(e.data)),this._getType(e)!==d.boolean){const t=this._getOrReturnCtx(e);return $(t,{code:h.invalid_type,expected:d.boolean,received:t.parsedType}),E}return A(e.data)}}ae.create=e=>new ae({typeName:je.ZodBoolean,coerce:e?.coerce||!1,...R(e)});class se extends C{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==d.date){const t=this._getOrReturnCtx(e);return $(t,{code:h.invalid_type,expected:d.date,received:t.parsedType}),E}if(Number.isNaN(e.data.getTime()))return $(this._getOrReturnCtx(e),{code:h.invalid_date}),E;const t=new b;let n;for(const r of this._def.checks)"min"===r.kind?e.data.getTime()<r.value&&(n=this._getOrReturnCtx(e,n),$(n,{code:h.too_small,message:r.message,inclusive:!0,exact:!1,minimum:r.value,type:"date"}),t.dirty()):"max"===r.kind?e.data.getTime()>r.value&&(n=this._getOrReturnCtx(e,n),$(n,{code:h.too_big,message:r.message,inclusive:!0,exact:!1,maximum:r.value,type:"date"}),t.dirty()):c.assertNever(r);return{status:t.value,value:new Date(e.data.getTime())}}_addCheck(e){return new se({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:y.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:y.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return null!=e?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return null!=e?new Date(e):null}}se.create=e=>new se({checks:[],coerce:e?.coerce||!1,typeName:je.ZodDate,...R(e)});class ie extends C{_parse(e){if(this._getType(e)!==d.symbol){const t=this._getOrReturnCtx(e);return $(t,{code:h.invalid_type,expected:d.symbol,received:t.parsedType}),E}return A(e.data)}}ie.create=e=>new ie({typeName:je.ZodSymbol,...R(e)});class oe extends C{_parse(e){if(this._getType(e)!==d.undefined){const t=this._getOrReturnCtx(e);return $(t,{code:h.invalid_type,expected:d.undefined,received:t.parsedType}),E}return A(e.data)}}oe.create=e=>new oe({typeName:je.ZodUndefined,...R(e)});class le extends C{_parse(e){if(this._getType(e)!==d.null){const t=this._getOrReturnCtx(e);return $(t,{code:h.invalid_type,expected:d.null,received:t.parsedType}),E}return A(e.data)}}le.create=e=>new le({typeName:je.ZodNull,...R(e)});class ce extends C{constructor(){super(...arguments),this._any=!0}_parse(e){return A(e.data)}}ce.create=e=>new ce({typeName:je.ZodAny,...R(e)});class ue extends C{constructor(){super(...arguments),this._unknown=!0}_parse(e){return A(e.data)}}ue.create=e=>new ue({typeName:je.ZodUnknown,...R(e)});class pe extends C{_parse(e){const t=this._getOrReturnCtx(e);return $(t,{code:h.invalid_type,expected:d.never,received:t.parsedType}),E}}pe.create=e=>new pe({typeName:je.ZodNever,...R(e)});class de extends C{_parse(e){if(this._getType(e)!==d.undefined){const t=this._getOrReturnCtx(e);return $(t,{code:h.invalid_type,expected:d.void,received:t.parsedType}),E}return A(e.data)}}de.create=e=>new de({typeName:je.ZodVoid,...R(e)});class me extends C{_parse(e){const{ctx:t,status:n}=this._processInputParams(e),r=this._def;if(t.parsedType!==d.array)return $(t,{code:h.invalid_type,expected:d.array,received:t.parsedType}),E;if(null!==r.exactLength){const e=t.data.length>r.exactLength.value,a=t.data.length<r.exactLength.value;(e||a)&&($(t,{code:e?h.too_big:h.too_small,minimum:a?r.exactLength.value:void 0,maximum:e?r.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:r.exactLength.message}),n.dirty())}if(null!==r.minLength&&t.data.length<r.minLength.value&&($(t,{code:h.too_small,minimum:r.minLength.value,type:"array",inclusive:!0,exact:!1,message:r.minLength.message}),n.dirty()),null!==r.maxLength&&t.data.length>r.maxLength.value&&($(t,{code:h.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(((e,n)=>r.type._parseAsync(new I(t,e,t.path,n))))).then((e=>b.mergeArray(n,e)));const a=[...t.data].map(((e,n)=>r.type._parseSync(new I(t,e,t.path,n))));return b.mergeArray(n,a)}get element(){return this._def.type}min(e,t){return new me({...this._def,minLength:{value:e,message:y.toString(t)}})}max(e,t){return new me({...this._def,maxLength:{value:e,message:y.toString(t)}})}length(e,t){return new me({...this._def,exactLength:{value:e,message:y.toString(t)}})}nonempty(e){return this.min(1,e)}}function he(e){if(e instanceof fe){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Ie.create(he(r))}return new fe({...e._def,shape:()=>t})}return e instanceof me?new me({...e._def,type:he(e.element)}):e instanceof Ie?Ie.create(he(e.unwrap())):e instanceof Te?Te.create(he(e.unwrap())):e instanceof $e?$e.create(e.items.map((e=>he(e)))):e}me.create=(e,t)=>new me({type:e,minLength:null,maxLength:null,exactLength:null,typeName:je.ZodArray,...R(t)});class fe extends C{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(null!==this._cached)return this._cached;const e=this._def.shape(),t=c.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==d.object){const t=this._getOrReturnCtx(e);return $(t,{code:h.invalid_type,expected:d.object,received:t.parsedType}),E}const{status:t,ctx:n}=this._processInputParams(e),{shape:r,keys:a}=this._getCached(),s=[];if(!(this._def.catchall instanceof pe&&"strip"===this._def.unknownKeys))for(const e in n.data)a.includes(e)||s.push(e);const i=[];for(const e of a){const t=r[e],a=n.data[e];i.push({key:{status:"valid",value:e},value:t._parse(new I(n,a,n.path,e)),alwaysSet:e in n.data})}if(this._def.catchall instanceof pe){const e=this._def.unknownKeys;if("passthrough"===e)for(const e of s)i.push({key:{status:"valid",value:e},value:{status:"valid",value:n.data[e]}});else if("strict"===e)s.length>0&&($(n,{code:h.unrecognized_keys,keys:s}),t.dirty());else if("strip"!==e)throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const e=this._def.catchall;for(const t of s){const r=n.data[t];i.push({key:{status:"valid",value:t},value:e._parse(new I(n,r,n.path,t)),alwaysSet:t in n.data})}}return n.common.async?Promise.resolve().then((async()=>{const e=[];for(const t of i){const n=await t.key,r=await t.value;e.push({key:n,value:r,alwaysSet:t.alwaysSet})}return e})).then((e=>b.mergeObjectSync(t,e))):b.mergeObjectSync(t,i)}get shape(){return this._def.shape()}strict(e){return y.errToObj,new fe({...this._def,unknownKeys:"strict",...void 0!==e?{errorMap:(t,n)=>{const r=this._def.errorMap?.(t,n).message??n.defaultError;return"unrecognized_keys"===t.code?{message:y.errToObj(e).message??r}:{message:r}}}:{}})}strip(){return new fe({...this._def,unknownKeys:"strip"})}passthrough(){return new fe({...this._def,unknownKeys:"passthrough"})}extend(e){return new fe({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new fe({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:je.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new fe({...this._def,catchall:e})}pick(e){const t={};for(const n of c.objectKeys(e))e[n]&&this.shape[n]&&(t[n]=this.shape[n]);return new fe({...this._def,shape:()=>t})}omit(e){const t={};for(const n of c.objectKeys(this.shape))e[n]||(t[n]=this.shape[n]);return new fe({...this._def,shape:()=>t})}deepPartial(){return he(this)}partial(e){const t={};for(const n of c.objectKeys(this.shape)){const r=this.shape[n];e&&!e[n]?t[n]=r:t[n]=r.optional()}return new fe({...this._def,shape:()=>t})}required(e){const t={};for(const n of c.objectKeys(this.shape))if(e&&!e[n])t[n]=this.shape[n];else{let e=this.shape[n];for(;e instanceof Ie;)e=e._def.innerType;t[n]=e}return new fe({...this._def,shape:()=>t})}keyof(){return _e(c.objectKeys(this.shape))}}fe.create=(e,t)=>new fe({shape:()=>e,unknownKeys:"strip",catchall:pe.create(),typeName:je.ZodObject,...R(t)}),fe.strictCreate=(e,t)=>new fe({shape:()=>e,unknownKeys:"strict",catchall:pe.create(),typeName:je.ZodObject,...R(t)}),fe.lazycreate=(e,t)=>new fe({shape:e,unknownKeys:"strip",catchall:pe.create(),typeName:je.ZodObject,...R(t)});class ve extends C{_parse(e){const{ctx:t}=this._processInputParams(e),n=this._def.options;if(t.common.async)return Promise.all(n.map((async e=>{const n={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:n}),ctx:n}}))).then((function(e){for(const t of e)if("valid"===t.result.status)return t.result;for(const n of e)if("dirty"===n.result.status)return t.common.issues.push(...n.ctx.common.issues),n.result;const n=e.map((e=>new f(e.ctx.common.issues)));return $(t,{code:h.invalid_union,unionErrors:n}),E}));{let e;const r=[];for(const a of n){const n={...t,common:{...t.common,issues:[]},parent:null},s=a._parseSync({data:t.data,path:t.path,parent:n});if("valid"===s.status)return s;"dirty"!==s.status||e||(e={result:s,ctx:n}),n.common.issues.length&&r.push(n.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;const a=r.map((e=>new f(e)));return $(t,{code:h.invalid_union,unionErrors:a}),E}}get options(){return this._def.options}}function ge(e,t){const n=m(e),r=m(t);if(e===t)return{valid:!0,data:e};if(n===d.object&&r===d.object){const n=c.objectKeys(t),r=c.objectKeys(e).filter((e=>-1!==n.indexOf(e))),a={...e,...t};for(const n of r){const r=ge(e[n],t[n]);if(!r.valid)return{valid:!1};a[n]=r.data}return{valid:!0,data:a}}if(n===d.array&&r===d.array){if(e.length!==t.length)return{valid:!1};const n=[];for(let r=0;r<e.length;r++){const a=ge(e[r],t[r]);if(!a.valid)return{valid:!1};n.push(a.data)}return{valid:!0,data:n}}return n===d.date&&r===d.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}ve.create=(e,t)=>new ve({options:e,typeName:je.ZodUnion,...R(t)});class ye extends C{_parse(e){const{status:t,ctx:n}=this._processInputParams(e),r=(e,r)=>{if(_(e)||_(r))return E;const a=ge(e.value,r.value);return a.valid?((x(e)||x(r))&&t.dirty(),{status:t.value,value:a.data}):($(n,{code:h.invalid_intersection_types}),E)};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((([e,t])=>r(e,t))):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}))}}ye.create=(e,t,n)=>new ye({left:e,right:t,typeName:je.ZodIntersection,...R(n)});class $e extends C{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==d.array)return $(n,{code:h.invalid_type,expected:d.array,received:n.parsedType}),E;if(n.data.length<this._def.items.length)return $(n,{code:h.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),E;!this._def.rest&&n.data.length>this._def.items.length&&($(n,{code:h.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const r=[...n.data].map(((e,t)=>{const r=this._def.items[t]||this._def.rest;return r?r._parse(new I(n,e,n.path,t)):null})).filter((e=>!!e));return n.common.async?Promise.all(r).then((e=>b.mergeArray(t,e))):b.mergeArray(t,r)}get items(){return this._def.items}rest(e){return new $e({...this._def,rest:e})}}$e.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new $e({items:e,typeName:je.ZodTuple,rest:null,...R(t)})};class be extends C{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!==d.map)return $(n,{code:h.invalid_type,expected:d.map,received:n.parsedType}),E;const r=this._def.keyType,a=this._def.valueType,s=[...n.data.entries()].map((([e,t],s)=>({key:r._parse(new I(n,e,n.path,[s,"key"])),value:a._parse(new I(n,t,n.path,[s,"value"]))})));if(n.common.async){const e=new Map;return Promise.resolve().then((async()=>{for(const n of s){const r=await n.key,a=await n.value;if("aborted"===r.status||"aborted"===a.status)return E;"dirty"!==r.status&&"dirty"!==a.status||t.dirty(),e.set(r.value,a.value)}return{status:t.value,value:e}}))}{const e=new Map;for(const n of s){const r=n.key,a=n.value;if("aborted"===r.status||"aborted"===a.status)return E;"dirty"!==r.status&&"dirty"!==a.status||t.dirty(),e.set(r.value,a.value)}return{status:t.value,value:e}}}}be.create=(e,t,n)=>new be({valueType:t,keyType:e,typeName:je.ZodMap,...R(n)});class Ee extends C{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==d.set)return $(n,{code:h.invalid_type,expected:d.set,received:n.parsedType}),E;const r=this._def;null!==r.minSize&&n.data.size<r.minSize.value&&($(n,{code:h.too_small,minimum:r.minSize.value,type:"set",inclusive:!0,exact:!1,message:r.minSize.message}),t.dirty()),null!==r.maxSize&&n.data.size>r.maxSize.value&&($(n,{code:h.too_big,maximum:r.maxSize.value,type:"set",inclusive:!0,exact:!1,message:r.maxSize.message}),t.dirty());const a=this._def.valueType;function s(e){const n=new Set;for(const r of e){if("aborted"===r.status)return E;"dirty"===r.status&&t.dirty(),n.add(r.value)}return{status:t.value,value:n}}const i=[...n.data.values()].map(((e,t)=>a._parse(new I(n,e,n.path,t))));return n.common.async?Promise.all(i).then((e=>s(e))):s(i)}min(e,t){return new Ee({...this._def,minSize:{value:e,message:y.toString(t)}})}max(e,t){return new Ee({...this._def,maxSize:{value:e,message:y.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}Ee.create=(e,t)=>new Ee({valueType:e,minSize:null,maxSize:null,typeName:je.ZodSet,...R(t)});class Se extends C{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})}}Se.create=(e,t)=>new Se({getter:e,typeName:je.ZodLazy,...R(t)});class Ae extends C{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return $(t,{received:t.data,code:h.invalid_literal,expected:this._def.value}),E}return{status:"valid",value:e.data}}get value(){return this._def.value}}function _e(e,t){return new xe({values:e,typeName:je.ZodEnum,...R(t)})}Ae.create=(e,t)=>new Ae({value:e,typeName:je.ZodLiteral,...R(t)});class xe extends C{_parse(e){if("string"!=typeof e.data){const t=this._getOrReturnCtx(e),n=this._def.values;return $(t,{expected:c.joinValues(n),received:t.parsedType,code:h.invalid_type}),E}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const t=this._getOrReturnCtx(e),n=this._def.values;return $(t,{received:t.data,code:h.invalid_enum_value,options:n}),E}return A(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 xe.create(e,{...this._def,...t})}exclude(e,t=this._def){return xe.create(this.options.filter((t=>!e.includes(t))),{...this._def,...t})}}xe.create=_e;class we extends C{_parse(e){const t=c.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==d.string&&n.parsedType!==d.number){const e=c.objectValues(t);return $(n,{expected:c.joinValues(e),received:n.parsedType,code:h.invalid_type}),E}if(this._cache||(this._cache=new Set(c.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const e=c.objectValues(t);return $(n,{received:n.data,code:h.invalid_enum_value,options:e}),E}return A(e.data)}get enum(){return this._def.values}}we.create=(e,t)=>new we({values:e,typeName:je.ZodNativeEnum,...R(t)});class Oe extends C{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==d.promise&&!1===t.common.async)return $(t,{code:h.invalid_type,expected:d.promise,received:t.parsedType}),E;const n=t.parsedType===d.promise?t.data:Promise.resolve(t.data);return A(n.then((e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap}))))}}Oe.create=(e,t)=>new Oe({type:e,typeName:je.ZodPromise,...R(t)});class Ne extends C{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===je.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:e=>{$(n,e),e.fatal?t.abort():t.dirty()},get path(){return n.path}};if(a.addIssue=a.addIssue.bind(a),"preprocess"===r.type){const e=r.transform(n.data,a);if(n.common.async)return Promise.resolve(e).then((async e=>{if("aborted"===t.value)return E;const r=await this._def.schema._parseAsync({data:e,path:n.path,parent:n});return"aborted"===r.status?E:"dirty"===r.status||"dirty"===t.value?S(r.value):r}));{if("aborted"===t.value)return E;const r=this._def.schema._parseSync({data:e,path:n.path,parent:n});return"aborted"===r.status?E:"dirty"===r.status||"dirty"===t.value?S(r.value):r}}if("refinement"===r.type){const e=e=>{const t=r.refinement(e,a);if(n.common.async)return Promise.resolve(t);if(t instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return e};if(!1===n.common.async){const r=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return"aborted"===r.status?E:("dirty"===r.status&&t.dirty(),e(r.value),{status:t.value,value:r.value})}return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then((n=>"aborted"===n.status?E:("dirty"===n.status&&t.dirty(),e(n.value).then((()=>({status:t.value,value:n.value}))))))}if("transform"===r.type){if(!1===n.common.async){const e=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!w(e))return E;const s=r.transform(e.value,a);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:s}}return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then((e=>w(e)?Promise.resolve(r.transform(e.value,a)).then((e=>({status:t.value,value:e}))):E))}c.assertNever(r)}}Ne.create=(e,t,n)=>new Ne({schema:e,typeName:je.ZodEffects,effect:t,...R(n)}),Ne.createWithPreprocess=(e,t,n)=>new Ne({schema:t,effect:{type:"preprocess",transform:e},typeName:je.ZodEffects,...R(n)});class Ie extends C{_parse(e){return this._getType(e)===d.undefined?A(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Ie.create=(e,t)=>new Ie({innerType:e,typeName:je.ZodOptional,...R(t)});class Te extends C{_parse(e){return this._getType(e)===d.null?A(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Te.create=(e,t)=>new Te({innerType:e,typeName:je.ZodNullable,...R(t)});class Re extends C{_parse(e){const{ctx:t}=this._processInputParams(e);let n=t.data;return t.parsedType===d.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}Re.create=(e,t)=>new Re({innerType:e,typeName:je.ZodDefault,defaultValue:"function"==typeof t.default?t.default:()=>t.default,...R(t)});class Ce extends C{_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 O(r)?r.then((e=>({status:"valid",value:"valid"===e.status?e.value:this._def.catchValue({get error(){return new f(n.common.issues)},input:n.data})}))):{status:"valid",value:"valid"===r.status?r.value:this._def.catchValue({get error(){return new f(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}Ce.create=(e,t)=>new Ce({innerType:e,typeName:je.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:()=>t.catch,...R(t)});class ke extends C{_parse(e){if(this._getType(e)!==d.nan){const t=this._getOrReturnCtx(e);return $(t,{code:h.invalid_type,expected:d.nan,received:t.parsedType}),E}return{status:"valid",value:e.data}}}ke.create=e=>new ke({typeName:je.ZodNaN,...R(e)}),Symbol("zod_brand");class Le extends C{_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 C{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{const e=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return"aborted"===e.status?E:"dirty"===e.status?(t.dirty(),S(e.value)):this._def.out._parseAsync({data:e.value,path:n.path,parent:n})})();{const e=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return"aborted"===e.status?E:"dirty"===e.status?(t.dirty(),{status:"dirty",value:e.value}):this._def.out._parseSync({data:e.value,path:n.path,parent:n})}}static create(e,t){return new Pe({in:e,out:t,typeName:je.ZodPipeline})}}class Me extends C{_parse(e){const t=this._def.innerType._parse(e),n=e=>(w(e)&&(e.value=Object.freeze(e.value)),e);return O(t)?t.then((e=>n(e))):n(t)}unwrap(){return this._def.innerType}}var je,De;function Fe(){return new DOMException("Delay was aborted","AbortError")}Me.create=(e,t)=>new Me({innerType:e,typeName:je.ZodReadonly,...R(t)}),fe.lazycreate,(De=je||(je={})).ZodString="ZodString",De.ZodNumber="ZodNumber",De.ZodNaN="ZodNaN",De.ZodBigInt="ZodBigInt",De.ZodBoolean="ZodBoolean",De.ZodDate="ZodDate",De.ZodSymbol="ZodSymbol",De.ZodUndefined="ZodUndefined",De.ZodNull="ZodNull",De.ZodAny="ZodAny",De.ZodUnknown="ZodUnknown",De.ZodNever="ZodNever",De.ZodVoid="ZodVoid",De.ZodArray="ZodArray",De.ZodObject="ZodObject",De.ZodUnion="ZodUnion",De.ZodDiscriminatedUnion="ZodDiscriminatedUnion",De.ZodIntersection="ZodIntersection",De.ZodTuple="ZodTuple",De.ZodRecord="ZodRecord",De.ZodMap="ZodMap",De.ZodSet="ZodSet",De.ZodFunction="ZodFunction",De.ZodLazy="ZodLazy",De.ZodLiteral="ZodLiteral",De.ZodEnum="ZodEnum",De.ZodEffects="ZodEffects",De.ZodNativeEnum="ZodNativeEnum",De.ZodOptional="ZodOptional",De.ZodNullable="ZodNullable",De.ZodDefault="ZodDefault",De.ZodCatch="ZodCatch",De.ZodPromise="ZodPromise",De.ZodBranded="ZodBranded",De.ZodPipeline="ZodPipeline",De.ZodReadonly="ZodReadonly",ee.create,ne.create,ke.create,re.create,ae.create,se.create,ie.create,oe.create,le.create,ce.create,ue.create,pe.create,de.create,me.create,fe.create,fe.strictCreate,ve.create,ye.create,$e.create,be.create,Ee.create,Se.create,Ae.create,xe.create,we.create,Oe.create,Ne.create,Ie.create,Te.create,Ne.createWithPreprocess,Pe.create,n(65994).e;var Ve=({prefix:e,size:t=16,alphabet:n="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",separator:a="-"}={})=>{const s=()=>{const e=n.length,r=new Array(t);for(let a=0;a<t;a++)r[a]=n[Math.random()*e|0];return r.join("")};if(null==e)return s;if(n.includes(a))throw new r.Di({argument:"separator",message:`The separator "${a}" must not be part of the alphabet "${n}".`});return()=>`${e}${a}${s()}`},qe=Ve();function Be(e){return null==e?"unknown error":"string"==typeof e?e:e instanceof Error?e.message:JSON.stringify(e)}function Ue(e){return(e instanceof Error||e instanceof DOMException)&&("AbortError"===e.name||"ResponseAborted"===e.name||"TimeoutError"===e.name)}var Ye=/"__proto__"\s*:/,ze=/"constructor"\s*:/;function Ze(e){const{stackTraceLimit:t}=Error;Error.stackTraceLimit=0;try{return function(e){const t=JSON.parse(e);return null===t||"object"!=typeof t||!1===Ye.test(e)&&!1===ze.test(e)?t:function(e){let t=[e];for(;t.length;){const e=t;t=[];for(const n of e){if(Object.prototype.hasOwnProperty.call(n,"__proto__"))throw new SyntaxError("Object contains forbidden prototype property");if(Object.prototype.hasOwnProperty.call(n,"constructor")&&Object.prototype.hasOwnProperty.call(n.constructor,"prototype"))throw new SyntaxError("Object contains forbidden prototype property");for(const e in n){const r=n[e];r&&"object"==typeof r&&t.push(r)}}}return e}(t)}(e)}finally{Error.stackTraceLimit=t}}var Ge=Symbol.for("vercel.ai.validator");async function We({value:e,schema:t}){const n=await He({value:e,schema:t});if(!n.success)throw r.iM.wrap({value:e,cause:n.error});return n.value}async function He({value:e,schema:t}){const n=function(e){return function(e){return"object"==typeof e&&null!==e&&Ge in e&&!0===e[Ge]&&"validate"in e}(e)?e:(t=e,n=async e=>{const n=await t["~standard"].validate(e);return null==n.issues?{success:!0,value:n.value}:{success:!1,error:new r.iM({value:e,cause:n.issues})}},{[Ge]:!0,validate:n});var t,n}(t);try{if(null==n.validate)return{success:!0,value:e,rawValue:e};const t=await n.validate(e);return t.success?{success:!0,value:t.value,rawValue:e}:{success:!1,error:r.iM.wrap({value:e,cause:t.error}),rawValue:e}}catch(t){return{success:!1,error:r.iM.wrap({value:e,cause:t}),rawValue:e}}}async function Ke({text:e,schema:t}){try{const n=Ze(e);return null==t?{success:!0,value:n,rawValue:n}:await He({value:n,schema:t})}catch(t){return{success:!1,error:r.u6.isInstance(t)?t:new r.u6({text:e,cause:t}),rawValue:void 0}}}async function Xe(e){return"function"==typeof e&&(e=e()),Promise.resolve(e)}var Je=(e,t)=>{let n=0;for(;n<e.length&&n<t.length&&e[n]===t[n];n++);return[(e.length-n).toString(),...t.slice(n)].join("/")},Qe=Symbol("Let zodToJsonSchema decide on which parser to use"),et={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",strictUnions:!1,definitions:{},errorMessages:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref"};function tt(e,t){return vt(e.type._def,t)}function nt(e,t,n){const r=null!=n?n:t.dateStrategy;if(Array.isArray(r))return{anyOf:r.map(((n,r)=>nt(e,t,n)))};switch(r){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return rt(e)}}var rt=e=>{const t={type:"integer",format:"unix-time"};for(const n of e.checks)switch(n.kind){case"min":t.minimum=n.value;break;case"max":t.maximum=n.value}return t},at=void 0,st={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>(void 0===at&&(at=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),at),uuid:/^[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}$/,ipv4:/^(?:(?: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])$/,ipv4Cidr:/^(?:(?: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])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([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])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};function it(e,t){const n={type:"string"};if(e.checks)for(const r of e.checks)switch(r.kind){case"min":n.minLength="number"==typeof n.minLength?Math.max(n.minLength,r.value):r.value;break;case"max":n.maxLength="number"==typeof n.maxLength?Math.min(n.maxLength,r.value):r.value;break;case"email":switch(t.emailStrategy){case"format:email":ct(n,"email",r.message,t);break;case"format:idn-email":ct(n,"idn-email",r.message,t);break;case"pattern:zod":ut(n,st.email,r.message,t)}break;case"url":ct(n,"uri",r.message,t);break;case"uuid":ct(n,"uuid",r.message,t);break;case"regex":ut(n,r.regex,r.message,t);break;case"cuid":ut(n,st.cuid,r.message,t);break;case"cuid2":ut(n,st.cuid2,r.message,t);break;case"startsWith":ut(n,RegExp(`^${ot(r.value,t)}`),r.message,t);break;case"endsWith":ut(n,RegExp(`${ot(r.value,t)}$`),r.message,t);break;case"datetime":ct(n,"date-time",r.message,t);break;case"date":ct(n,"date",r.message,t);break;case"time":ct(n,"time",r.message,t);break;case"duration":ct(n,"duration",r.message,t);break;case"length":n.minLength="number"==typeof n.minLength?Math.max(n.minLength,r.value):r.value,n.maxLength="number"==typeof n.maxLength?Math.min(n.maxLength,r.value):r.value;break;case"includes":ut(n,RegExp(ot(r.value,t)),r.message,t);break;case"ip":"v6"!==r.version&&ct(n,"ipv4",r.message,t),"v4"!==r.version&&ct(n,"ipv6",r.message,t);break;case"base64url":ut(n,st.base64url,r.message,t);break;case"jwt":ut(n,st.jwt,r.message,t);break;case"cidr":"v6"!==r.version&&ut(n,st.ipv4Cidr,r.message,t),"v4"!==r.version&&ut(n,st.ipv6Cidr,r.message,t);break;case"emoji":ut(n,st.emoji(),r.message,t);break;case"ulid":ut(n,st.ulid,r.message,t);break;case"base64":switch(t.base64Strategy){case"format:binary":ct(n,"binary",r.message,t);break;case"contentEncoding:base64":n.contentEncoding="base64";break;case"pattern:zod":ut(n,st.base64,r.message,t)}break;case"nanoid":ut(n,st.nanoid,r.message,t)}return n}function ot(e,t){return"escape"===t.patternStrategy?function(e){let t="";for(let n=0;n<e.length;n++)lt.has(e[n])||(t+="\\"),t+=e[n];return t}(e):e}var lt=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function ct(e,t,n,r){var a;e.format||(null==(a=e.anyOf)?void 0:a.some((e=>e.format)))?(e.anyOf||(e.anyOf=[]),e.format&&(e.anyOf.push({format:e.format}),delete e.format),e.anyOf.push({format:t,...n&&r.errorMessages&&{errorMessage:{format:n}}})):e.format=t}function ut(e,t,n,r){var a;e.pattern||(null==(a=e.allOf)?void 0:a.some((e=>e.pattern)))?(e.allOf||(e.allOf=[]),e.pattern&&(e.allOf.push({pattern:e.pattern}),delete e.pattern),e.allOf.push({pattern:pt(t,r),...n&&r.errorMessages&&{errorMessage:{pattern:n}}})):e.pattern=pt(t,r)}function pt(e,t){var n;if(!t.applyRegexFlags||!e.flags)return e.source;const r=e.flags.includes("i"),a=e.flags.includes("m"),s=e.flags.includes("s"),i=r?e.source.toLowerCase():e.source;let o="",l=!1,c=!1,u=!1;for(let e=0;e<i.length;e++)if(l)o+=i[e],l=!1;else{if(r)if(c){if(i[e].match(/[a-z]/)){u?(o+=i[e],o+=`${i[e-2]}-${i[e]}`.toUpperCase(),u=!1):"-"===i[e+1]&&(null==(n=i[e+2])?void 0:n.match(/[a-z]/))?(o+=i[e],u=!0):o+=`${i[e]}${i[e].toUpperCase()}`;continue}}else if(i[e].match(/[a-z]/)){o+=`[${i[e]}${i[e].toUpperCase()}]`;continue}if(a){if("^"===i[e]){o+="(^|(?<=[\r\n]))";continue}if("$"===i[e]){o+="($|(?=[\r\n]))";continue}}s&&"."===i[e]?o+=c?`${i[e]}\r\n`:`[${i[e]}\r\n]`:(o+=i[e],"\\"===i[e]?l=!0:c&&"]"===i[e]?c=!1:c||"["!==i[e]||(c=!0))}try{new RegExp(o)}catch(n){return console.warn(`Could not convert regex pattern at ${t.currentPath.join("/")} to a flag-independent form! Falling back to the flag-ignorant source`),e.source}return o}function dt(e,t){var n,r,a,s,i,o;const l={type:"object",additionalProperties:null!=(n=vt(e.valueType._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]}))?n:t.allowedAdditionalProperties};if((null==(r=e.keyType)?void 0:r._def.typeName)===je.ZodString&&(null==(a=e.keyType._def.checks)?void 0:a.length)){const{type:n,...r}=it(e.keyType._def,t);return{...l,propertyNames:r}}if((null==(s=e.keyType)?void 0:s._def.typeName)===je.ZodEnum)return{...l,propertyNames:{enum:e.keyType._def.values}};if((null==(i=e.keyType)?void 0:i._def.typeName)===je.ZodBranded&&e.keyType._def.type._def.typeName===je.ZodString&&(null==(o=e.keyType._def.type._def.checks)?void 0:o.length)){const{type:n,...r}=tt(e.keyType._def,t);return{...l,propertyNames:r}}return l}var mt={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};function ht(e){try{return e.isOptional()}catch(e){return!0}}var ft=(e,t,n)=>{switch(t){case je.ZodString:return it(e,n);case je.ZodNumber:return function(e){const t={type:"number"};if(!e.checks)return t;for(const n of e.checks)switch(n.kind){case"int":t.type="integer";break;case"min":n.inclusive?t.minimum=n.value:t.exclusiveMinimum=n.value;break;case"max":n.inclusive?t.maximum=n.value:t.exclusiveMaximum=n.value;break;case"multipleOf":t.multipleOf=n.value}return t}(e);case je.ZodObject:return function(e,t){const n={type:"object",properties:{}},r=[],a=e.shape();for(const e in a){let s=a[e];if(void 0===s||void 0===s._def)continue;const i=ht(s),o=vt(s._def,{...t,currentPath:[...t.currentPath,"properties",e],propertyPath:[...t.currentPath,"properties",e]});void 0!==o&&(n.properties[e]=o,i||r.push(e))}r.length&&(n.required=r);const s=function(e,t){if("ZodNever"!==e.catchall._def.typeName)return vt(e.catchall._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]});switch(e.unknownKeys){case"passthrough":return t.allowedAdditionalProperties;case"strict":return t.rejectedAdditionalProperties;case"strip":return"strict"===t.removeAdditionalStrategy?t.allowedAdditionalProperties:t.rejectedAdditionalProperties}}(e,t);return void 0!==s&&(n.additionalProperties=s),n}(e,n);case je.ZodBigInt:return function(e){const t={type:"integer",format:"int64"};if(!e.checks)return t;for(const n of e.checks)switch(n.kind){case"min":n.inclusive?t.minimum=n.value:t.exclusiveMinimum=n.value;break;case"max":n.inclusive?t.maximum=n.value:t.exclusiveMaximum=n.value;break;case"multipleOf":t.multipleOf=n.value}return t}(e);case je.ZodBoolean:return{type:"boolean"};case je.ZodDate:return nt(e,n);case je.ZodUndefined:return{not:{}};case je.ZodNull:return{type:"null"};case je.ZodArray:return function(e,t){var n,r,a;const s={type:"array"};return(null==(n=e.type)?void 0:n._def)&&(null==(a=null==(r=e.type)?void 0:r._def)?void 0:a.typeName)!==je.ZodAny&&(s.items=vt(e.type._def,{...t,currentPath:[...t.currentPath,"items"]})),e.minLength&&(s.minItems=e.minLength.value),e.maxLength&&(s.maxItems=e.maxLength.value),e.exactLength&&(s.minItems=e.exactLength.value,s.maxItems=e.exactLength.value),s}(e,n);case je.ZodUnion:case je.ZodDiscriminatedUnion:return function(e,t){const n=e.options instanceof Map?Array.from(e.options.values()):e.options;if(n.every((e=>e._def.typeName in mt&&(!e._def.checks||!e._def.checks.length)))){const e=n.reduce(((e,t)=>{const n=mt[t._def.typeName];return n&&!e.includes(n)?[...e,n]:e}),[]);return{type:e.length>1?e:e[0]}}if(n.every((e=>"ZodLiteral"===e._def.typeName&&!e.description))){const e=n.reduce(((e,t)=>{const n=typeof t._def.value;switch(n){case"string":case"number":case"boolean":return[...e,n];case"bigint":return[...e,"integer"];case"object":if(null===t._def.value)return[...e,"null"];default:return e}}),[]);if(e.length===n.length){const t=e.filter(((e,t,n)=>n.indexOf(e)===t));return{type:t.length>1?t:t[0],enum:n.reduce(((e,t)=>e.includes(t._def.value)?e:[...e,t._def.value]),[])}}}else if(n.every((e=>"ZodEnum"===e._def.typeName)))return{type:"string",enum:n.reduce(((e,t)=>[...e,...t._def.values.filter((t=>!e.includes(t)))]),[])};return((e,t)=>{const n=(e.options instanceof Map?Array.from(e.options.values()):e.options).map(((e,n)=>vt(e._def,{...t,currentPath:[...t.currentPath,"anyOf",`${n}`]}))).filter((e=>!!e&&(!t.strictUnions||"object"==typeof e&&Object.keys(e).length>0)));return n.length?{anyOf:n}:void 0})(e,t)}(e,n);case je.ZodIntersection:return function(e,t){const n=[vt(e.left._def,{...t,currentPath:[...t.currentPath,"allOf","0"]}),vt(e.right._def,{...t,currentPath:[...t.currentPath,"allOf","1"]})].filter((e=>!!e)),r=[];return n.forEach((e=>{if("type"in(t=e)&&"string"===t.type||!("allOf"in t)){let t=e;if("additionalProperties"in e&&!1===e.additionalProperties){const{additionalProperties:n,...r}=e;t=r}r.push(t)}else r.push(...e.allOf);var t})),r.length?{allOf:r}:void 0}(e,n);case je.ZodTuple:return function(e,t){return e.rest?{type:"array",minItems:e.items.length,items:e.items.map(((e,n)=>vt(e._def,{...t,currentPath:[...t.currentPath,"items",`${n}`]}))).reduce(((e,t)=>void 0===t?e:[...e,t]),[]),additionalItems:vt(e.rest._def,{...t,currentPath:[...t.currentPath,"additionalItems"]})}:{type:"array",minItems:e.items.length,maxItems:e.items.length,items:e.items.map(((e,n)=>vt(e._def,{...t,currentPath:[...t.currentPath,"items",`${n}`]}))).reduce(((e,t)=>void 0===t?e:[...e,t]),[])}}(e,n);case je.ZodRecord:return dt(e,n);case je.ZodLiteral:return function(e){const t=typeof e.value;return"bigint"!==t&&"number"!==t&&"boolean"!==t&&"string"!==t?{type:Array.isArray(e.value)?"array":"object"}:{type:"bigint"===t?"integer":t,const:e.value}}(e);case je.ZodEnum:return function(e){return{type:"string",enum:Array.from(e.values)}}(e);case je.ZodNativeEnum:return function(e){const t=e.values,n=Object.keys(e.values).filter((e=>"number"!=typeof t[t[e]])).map((e=>t[e])),r=Array.from(new Set(n.map((e=>typeof e))));return{type:1===r.length?"string"===r[0]?"string":"number":["string","number"],enum:n}}(e);case je.ZodNullable:return function(e,t){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes(e.innerType._def.typeName)&&(!e.innerType._def.checks||!e.innerType._def.checks.length))return{type:[mt[e.innerType._def.typeName],"null"]};const n=vt(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","0"]});return n&&{anyOf:[n,{type:"null"}]}}(e,n);case je.ZodOptional:return((e,t)=>{var n;if(t.currentPath.toString()===(null==(n=t.propertyPath)?void 0:n.toString()))return vt(e.innerType._def,t);const r=vt(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","1"]});return r?{anyOf:[{not:{}},r]}:{}})(e,n);case je.ZodMap:return function(e,t){return"record"===t.mapStrategy?dt(e,t):{type:"array",maxItems:125,items:{type:"array",items:[vt(e.keyType._def,{...t,currentPath:[...t.currentPath,"items","items","0"]})||{},vt(e.valueType._def,{...t,currentPath:[...t.currentPath,"items","items","1"]})||{}],minItems:2,maxItems:2}}}(e,n);case je.ZodSet:return function(e,t){const n={type:"array",uniqueItems:!0,items:vt(e.valueType._def,{...t,currentPath:[...t.currentPath,"items"]})};return e.minSize&&(n.minItems=e.minSize.value),e.maxSize&&(n.maxItems=e.maxSize.value),n}(e,n);case je.ZodLazy:return()=>e.getter()._def;case je.ZodPromise:return function(e,t){return vt(e.type._def,t)}(e,n);case je.ZodNaN:case je.ZodNever:return{not:{}};case je.ZodEffects:return function(e,t){return"input"===t.effectStrategy?vt(e.schema._def,t):{}}(e,n);case je.ZodAny:case je.ZodUnknown:return{};case je.ZodDefault:return function(e,t){return{...vt(e.innerType._def,t),default:e.defaultValue()}}(e,n);case je.ZodBranded:return tt(e,n);case je.ZodReadonly:case je.ZodCatch:return((e,t)=>vt(e.innerType._def,t))(e,n);case je.ZodPipeline:return((e,t)=>{if("input"===t.pipeStrategy)return vt(e.in._def,t);if("output"===t.pipeStrategy)return vt(e.out._def,t);const n=vt(e.in._def,{...t,currentPath:[...t.currentPath,"allOf","0"]});return{allOf:[n,vt(e.out._def,{...t,currentPath:[...t.currentPath,"allOf",n?"1":"0"]})].filter((e=>void 0!==e))}})(e,n);case je.ZodFunction:case je.ZodVoid:case je.ZodSymbol:default:return}};function vt(e,t,n=!1){var r;const a=t.seen.get(e);if(t.override){const s=null==(r=t.override)?void 0:r.call(t,e,t,a,n);if(s!==Qe)return s}if(a&&!n){const e=gt(a,t);if(void 0!==e)return e}const s={def:e,path:t.currentPath,jsonSchema:void 0};t.seen.set(e,s);const i=ft(e,e.typeName,t),o="function"==typeof i?vt(i(),t):i;if(o&&yt(e,t,o),t.postProcess){const n=t.postProcess(o,e,t);return s.jsonSchema=o,n}return s.jsonSchema=o,o}var gt=(e,t)=>{switch(t.$refStrategy){case"root":return{$ref:e.path.join("/")};case"relative":return{$ref:Je(t.currentPath,e.path)};case"none":case"seen":return e.path.length<t.currentPath.length&&e.path.every(((e,n)=>t.currentPath[n]===e))?(console.warn(`Recursive reference detected at ${t.currentPath.join("/")}! Defaulting to any`),{}):"seen"===t.$refStrategy?{}:void 0}},yt=(e,t,n)=>(e.description&&(n.description=e.description),n),$t=(e,t)=>{var n;const r=(e=>{const t=(e=>"string"==typeof e?{...et,name:e}:{...et,...e})(e),n=void 0!==t.name?[...t.basePath,t.definitionPath,t.name]:t.basePath;return{...t,currentPath:n,propertyPath:void 0,seen:new Map(Object.entries(t.definitions).map((([e,n])=>[n._def,{def:n._def,path:[...t.basePath,t.definitionPath,e],jsonSchema:void 0}])))}})(t);let a="object"==typeof t&&t.definitions?Object.entries(t.definitions).reduce(((e,[t,n])=>{var a;return{...e,[t]:null!=(a=vt(n._def,{...r,currentPath:[...r.basePath,r.definitionPath,t]},!0))?a:{}}}),{}):void 0;const s="string"==typeof t?t:"title"===(null==t?void 0:t.nameStrategy)||null==t?void 0:t.name,i=null!=(n=vt(e._def,void 0===s?r:{...r,currentPath:[...r.basePath,r.definitionPath,s]},!1))?n:{},o="object"==typeof t&&void 0!==t.name&&"title"===t.nameStrategy?t.name:void 0;void 0!==o&&(i.title=o);const l=void 0===s?a?{...i,[r.definitionPath]:a}:i:{$ref:[..."relative"===r.$refStrategy?[]:r.basePath,r.definitionPath,s].join("/"),[r.definitionPath]:{...a,[s]:i}};return l.$schema="http://json-schema.org/draft-07/schema#",l};function bt(e,t){return function(e){return"_zod"in e}(e)?function(e,t){var n;const r=null!=(n=null==t?void 0:t.useReferences)&&n,a=function(e,t){if(e instanceof s.rs){const n=new o(t),r={};for(const t of e._idmap.entries()){const[e,r]=t;n.process(r)}const a={},s={registry:e,uri:t?.uri,defs:r};for(const r of e._idmap.entries()){const[e,i]=r;a[e]=n.emit(i,{...t,external:s})}if(Object.keys(r).length>0){const e="draft-2020-12"===n.target?"$defs":"definitions";a.__shared={[e]:r}}return{schemas:a}}const n=new o(t);return n.process(e),n.emit(e,t)}(e,{target:"draft-7",io:"output",reused:r?"ref":"inline"});return St(a,{validate:async t=>{const n=await p.bp(e,t);return n.success?{success:!0,value:n.data}:{success:!1,error:n.error}}})}(e,t):function(e,t){var n;const r=null!=(n=null==t?void 0:t.useReferences)&&n;return St($t(e,{$refStrategy:r?"root":"none"}),{validate:async t=>{const n=await e.safeParseAsync(t);return n.success?{success:!0,value:n.data}:{success:!1,error:n.error}}})}(e,t)}var Et=Symbol.for("vercel.ai.schema");function St(e,{validate:t}={}){return{[Et]:!0,_type:void 0,[Ge]:!0,jsonSchema:e,validate:t}}function At(e){return null==e?St({properties:{},additionalProperties:!1}):"object"==typeof(t=e)&&null!==t&&Et in t&&!0===t[Et]&&"jsonSchema"in t&&"validate"in t?e:bt(e);var t}var{btoa:_t,atob:xt}=globalThis;function wt(e){const t=e.replace(/-/g,"+").replace(/_/g,"/"),n=xt(t);return Uint8Array.from(n,(e=>e.codePointAt(0)))}function Ot(e){let t="";for(let n=0;n<e.length;n++)t+=String.fromCodePoint(e[n]);return _t(t)}var Nt=n(65994).e;function It(...e){return e.reduce(((e,t)=>({...e,...null!=t?t:{}})),{})}function Tt(e){return Object.fromEntries([...e.headers])}function Rt(e){return(e instanceof Error||e instanceof DOMException)&&("AbortError"===e.name||"ResponseAborted"===e.name||"TimeoutError"===e.name)}(({prefix:e,size:t=16,alphabet:n="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",separator:a="-"}={})=>{if(null==e)return()=>{const e=n.length,r=new Array(t);for(let a=0;a<t;a++)r[a]=n[Math.random()*e|0];return r.join("")};if(n.includes(a))throw new r.Di({argument:"separator",message:`The separator "${a}" must not be part of the alphabet "${n}".`})})();var Ct=["fetch failed","failed to fetch"];function kt({error:e,url:t,requestBodyValues:n}){if(Rt(e))return e;if(e instanceof TypeError&&Ct.includes(e.message.toLowerCase())){const a=e.cause;if(null!=a)return new r.hL({message:`Cannot connect to API: ${a.message}`,cause:a,url:t,requestBodyValues:n,isRetryable:!0})}return e}function Lt(e){return Object.fromEntries(Object.entries(e).filter((([e,t])=>null!=t)))}var Pt=()=>globalThis.fetch;function Mt({settingValue:e,environmentVariableName:t}){return"string"==typeof e||null==e&&void 0!==Nt&&null!=(e=Nt.env[t])&&"string"==typeof e?e:void 0}var jt=/"__proto__"\s*:/,Dt=/"constructor"\s*:/;function Ft(e){const{stackTraceLimit:t}=Error;Error.stackTraceLimit=0;try{return function(e){const t=JSON.parse(e);return null===t||"object"!=typeof t||!1===jt.test(e)&&!1===Dt.test(e)?t:function(e){let t=[e];for(;t.length;){const e=t;t=[];for(const n of e){if(Object.prototype.hasOwnProperty.call(n,"__proto__"))throw new SyntaxError("Object contains forbidden prototype property");if(Object.prototype.hasOwnProperty.call(n,"constructor")&&Object.prototype.hasOwnProperty.call(n.constructor,"prototype"))throw new SyntaxError("Object contains forbidden prototype property");for(const e in n){const r=n[e];r&&"object"==typeof r&&t.push(r)}}}return e}(t)}(e)}finally{Error.stackTraceLimit=t}}var Vt=Symbol.for("vercel.ai.validator");async function qt({value:e,schema:t}){const n=function(e){return function(e){return"object"==typeof e&&null!==e&&Vt in e&&!0===e[Vt]&&"validate"in e}(e)?e:(t=e,n=async e=>{const n=await t["~standard"].validate(e);return null==n.issues?{success:!0,value:n.value}:{success:!1,error:new r.iM({value:e,cause:n.issues})}},{[Vt]:!0,validate:n});var t,n}(t);try{if(null==n.validate)return{success:!0,value:e,rawValue:e};const t=await n.validate(e);return t.success?{success:!0,value:t.value,rawValue:e}:{success:!1,error:r.iM.wrap({value:e,cause:t.error}),rawValue:e}}catch(t){return{success:!1,error:r.iM.wrap({value:e,cause:t}),rawValue:e}}}async function Bt({text:e,schema:t}){try{const n=Ft(e);return null==t?{success:!0,value:n,rawValue:n}:await qt({value:n,schema:t})}catch(t){return{success:!1,error:r.u6.isInstance(t)?t:new r.u6({text:e,cause:t}),rawValue:void 0}}}function Ut({stream:e,schema:t}){return e.pipeThrough(new TextDecoderStream).pipeThrough(new a.Z).pipeThrough(new TransformStream({async transform({data:e},n){"[DONE]"!==e&&n.enqueue(await Bt({text:e,schema:t}))}}))}var Yt=()=>globalThis.fetch,zt=async({url:e,headers:t,body:n,failedResponseHandler:r,successfulResponseHandler:a,abortSignal:s,fetch:i})=>Zt({url:e,headers:{"Content-Type":"application/json",...t},body:{content:JSON.stringify(n),values:n},failedResponseHandler:r,successfulResponseHandler:a,abortSignal:s,fetch:i}),Zt=async({url:e,headers:t={},body:n,successfulResponseHandler:a,failedResponseHandler:s,abortSignal:i,fetch:o=Yt()})=>{try{const l=await o(e,{method:"POST",headers:Lt(t),body:n.content,signal:i}),c=Tt(l);if(!l.ok){let t;try{t=await s({response:l,url:e,requestBodyValues:n.values})}catch(t){if(Rt(t)||r.hL.isInstance(t))throw t;throw new r.hL({message:"Failed to process error response",cause:t,statusCode:l.status,url:e,responseHeaders:c,requestBodyValues:n.values})}throw t.value}try{return await a({response:l,url:e,requestBodyValues:n.values})}catch(t){if(t instanceof Error&&(Rt(t)||r.hL.isInstance(t)))throw t;throw new r.hL({message:"Failed to process successful response",cause:t,statusCode:l.status,url:e,responseHeaders:c,requestBodyValues:n.values})}}catch(t){throw kt({error:t,url:e,requestBodyValues:n.values})}};async function Gt(e){return"function"==typeof e&&(e=e()),Promise.resolve(e)}var Wt=({errorSchema:e,errorToMessage:t,isRetryable:n})=>async({response:a,url:s,requestBodyValues:i})=>{const o=await a.text(),l=Tt(a);if(""===o.trim())return{responseHeaders:l,value:new r.hL({message:a.statusText,url:s,requestBodyValues:i,statusCode:a.status,responseHeaders:l,responseBody:o,isRetryable:null==n?void 0:n(a)})};try{const c=await async function({text:e,schema:t}){try{const n=Ft(e);return null==t?n:async function({value:e,schema:t}){const n=await qt({value:e,schema:t});if(!n.success)throw r.iM.wrap({value:e,cause:n.error});return n.value}({value:n,schema:t})}catch(t){if(r.u6.isInstance(t)||r.iM.isInstance(t))throw t;throw new r.u6({text:e,cause:t})}}({text:o,schema:e});return{responseHeaders:l,value:new r.hL({message:t(c),url:s,requestBodyValues:i,statusCode:a.status,responseHeaders:l,responseBody:o,data:c,isRetryable:null==n?void 0:n(a,c)})}}catch(e){return{responseHeaders:l,value:new r.hL({message:a.statusText,url:s,requestBodyValues:i,statusCode:a.status,responseHeaders:l,responseBody:o,isRetryable:null==n?void 0:n(a)})}}},Ht=e=>async({response:t,url:n,requestBodyValues:a})=>{const s=await t.text(),i=await Bt({text:s,schema:e}),o=Tt(t);if(!i.success)throw new r.hL({message:"Invalid JSON response",cause:i.error,statusCode:t.status,responseHeaders:o,responseBody:s,url:n,requestBodyValues:a});return{responseHeaders:o,value:i.value,rawValue:i.rawValue}};Symbol("Let zodToJsonSchema decide on which parser to use"),new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789"),Symbol.for("vercel.ai.schema");var Kt,Xt,Jt,Qt,en,tn,nn,rn,an,sn,on,ln,cn,un,{btoa:pn,atob:dn}=globalThis,mn=n(94893),hn=n(67787).Buffer,fn=n(9606).URL,vn=n(65994).e,gn=Symbol.for("vercel.ai.gateway.error"),yn=class e extends(Xt=Error,Kt=gn,Xt){constructor({message:e,statusCode:t=500,cause:n}){super(e),this[Kt]=!0,this.statusCode=t,this.cause=n}static isInstance(t){return e.hasMarker(t)}static hasMarker(e){return"object"==typeof e&&null!==e&&gn in e&&!0===e[gn]}},$n="GatewayAuthenticationError",bn=`vercel.ai.gateway.error.${$n}`,En=Symbol.for(bn),Sn=class e extends(Qt=yn,Jt=En,Qt){constructor({message:e="Authentication failed",statusCode:t=401,cause:n}={}){super({message:e,statusCode:t,cause:n}),this[Jt]=!0,this.name=$n,this.type="authentication_error"}static isInstance(e){return yn.hasMarker(e)&&En in e}static createContextualError({apiKeyProvided:t,oidcTokenProvided:n,message:r="Authentication failed",statusCode:a=401,cause:s}){let i;return i=t?"AI Gateway authentication failed: Invalid API key provided.\n\nThe token is expected to be provided via the 'apiKey' option or 'AI_GATEWAY_API_KEY' environment variable.":n?"AI Gateway authentication failed: Invalid OIDC token provided.\n\nThe token is expected to be provided via the 'VERCEL_OIDC_TOKEN' environment variable. It expires every 12 hours.\n- make sure your Vercel project settings have OIDC enabled\n- if running locally with 'vercel dev', the token is automatically obtained and refreshed\n- if running locally with your own dev server, run 'vercel env pull' to fetch the token\n- in production/preview, the token is automatically obtained and refreshed\n\nAlternative: Provide an API key via 'apiKey' option or 'AI_GATEWAY_API_KEY' environment variable.":"AI Gateway authentication failed: No authentication provided.\n\nProvide either an API key or OIDC token.\n\nAPI key instructions:\n\nThe token is expected to be provided via the 'apiKey' option or 'AI_GATEWAY_API_KEY' environment variable.\n\nOIDC token instructions:\n\nThe token is expected to be provided via the 'VERCEL_OIDC_TOKEN' environment variable. It expires every 12 hours.\n- make sure your Vercel project settings have OIDC enabled\n- if running locally with 'vercel dev', the token is automatically obtained and refreshed\n- if running locally with your own dev server, run 'vercel env pull' to fetch the token\n- in production/preview, the token is automatically obtained and refreshed",new e({message:i,statusCode:a,cause:s})}},An="GatewayInvalidRequestError",_n=`vercel.ai.gateway.error.${An}`,xn=Symbol.for(_n),wn=class extends(tn=yn,en=xn,tn){constructor({message:e="Invalid request",statusCode:t=400,cause:n}={}){super({message:e,statusCode:t,cause:n}),this[en]=!0,this.name=An,this.type="invalid_request_error"}static isInstance(e){return yn.hasMarker(e)&&xn in e}},On="GatewayRateLimitError",Nn=`vercel.ai.gateway.error.${On}`,In=Symbol.for(Nn),Tn=class extends(rn=yn,nn=In,rn){constructor({message:e="Rate limit exceeded",statusCode:t=429,cause:n}={}){super({message:e,statusCode:t,cause:n}),this[nn]=!0,this.name=On,this.type="rate_limit_exceeded"}static isInstance(e){return yn.hasMarker(e)&&In in e}},Rn="GatewayModelNotFoundError",Cn=`vercel.ai.gateway.error.${Rn}`,kn=Symbol.for(Cn),Ln=mn.Ik({modelId:mn.Yj()}),Pn=class extends(sn=yn,an=kn,sn){constructor({message:e="Model not found",statusCode:t=404,modelId:n,cause:r}={}){super({message:e,statusCode:t,cause:r}),this[an]=!0,this.name=Rn,this.type="model_not_found",this.modelId=n}static isInstance(e){return yn.hasMarker(e)&&kn in e}},Mn="GatewayInternalServerError",jn=`vercel.ai.gateway.error.${Mn}`,Dn=Symbol.for(jn),Fn=class extends(ln=yn,on=Dn,ln){constructor({message:e="Internal server error",statusCode:t=500,cause:n}={}){super({message:e,statusCode:t,cause:n}),this[on]=!0,this.name=Mn,this.type="internal_server_error"}static isInstance(e){return yn.hasMarker(e)&&Dn in e}},Vn="GatewayResponseError",qn=`vercel.ai.gateway.error.${Vn}`,Bn=Symbol.for(qn),Un=class extends(un=yn,cn=Bn,un){constructor({message:e="Invalid response from Gateway",statusCode:t=502,response:n,validationError:r,cause:a}={}){super({message:e,statusCode:t,cause:a}),this[cn]=!0,this.name=Vn,this.type="response_error",this.response=n,this.validationError=r}static isInstance(e){return yn.hasMarker(e)&&Bn in e}};function Yn({response:e,statusCode:t,defaultMessage:n="Gateway request failed",cause:r,authMethod:a}){const s=zn.safeParse(e);if(!s.success)return new Un({message:`Invalid error response format: ${n}`,statusCode:t,response:e,validationError:s.error,cause:r});const i=s.data,o=i.error.type,l=i.error.message;switch(o){case"authentication_error":return Sn.createContextualError({apiKeyProvided:"api-key"===a,oidcTokenProvided:"oidc"===a,statusCode:t,cause:r});case"invalid_request_error":return new wn({message:l,statusCode:t,cause:r});case"rate_limit_exceeded":return new Tn({message:l,statusCode:t,cause:r});case"model_not_found":{const e=Ln.safeParse(i.error.param);return new Pn({message:l,statusCode:t,modelId:e.success?e.data.modelId:void 0,cause:r})}default:return new Fn({message:l,statusCode:t,cause:r})}}var zn=mn.Ik({error:mn.Ik({message:mn.Yj(),type:mn.Yj().nullish(),param:mn.L5().nullish(),code:mn.KC([mn.Yj(),mn.ai()]).nullish()})});function Zn(e,t){var n;return yn.isInstance(e)?e:r.hL.isInstance(e)?Yn({response:Gn(e),statusCode:null!=(n=e.statusCode)?n:500,defaultMessage:"Gateway request failed",cause:e,authMethod:t}):Yn({response:{},statusCode:500,defaultMessage:e instanceof Error?`Gateway request failed: ${e.message}`:"Unknown Gateway error",cause:e,authMethod:t})}function Gn(e){if(void 0!==e.data)return e.data;if(null!=e.responseBody)try{return JSON.parse(e.responseBody)}catch(t){return e.responseBody}return{}}var Wn="ai-gateway-auth-method";function Hn(e){const t=Kn.safeParse(e[Wn]);return t.success?t.data:void 0}var Kn=mn.KC([mn.eu("api-key"),mn.eu("oidc")]),Xn=class{constructor(e){this.config=e}async getAvailableModels(){try{const{value:e}=await(async({url:e,headers:t={},successfulResponseHandler:n,failedResponseHandler:a,abortSignal:s,fetch:i=Pt()})=>{try{const o=await i(e,{method:"GET",headers:Lt(t),signal:s}),l=Tt(o);if(!o.ok){let t;try{t=await a({response:o,url:e,requestBodyValues:{}})}catch(t){if(Rt(t)||r.hL.isInstance(t))throw t;throw new r.hL({message:"Failed to process error response",cause:t,statusCode:o.status,url:e,responseHeaders:l,requestBodyValues:{}})}throw t.value}try{return await n({response:o,url:e,requestBodyValues:{}})}catch(t){if(t instanceof Error&&(Rt(t)||r.hL.isInstance(t)))throw t;throw new r.hL({message:"Failed to process successful response",cause:t,statusCode:o.status,url:e,responseHeaders:l,requestBodyValues:{}})}}catch(t){throw kt({error:t,url:e,requestBodyValues:{}})}})({url:`${this.config.baseURL}/config`,headers:await Gt(this.config.headers()),successfulResponseHandler:Ht(tr),failedResponseHandler:Wt({errorSchema:mn.bz(),errorToMessage:e=>e}),fetch:this.config.fetch});return e}catch(e){throw Zn(e)}}},Jn=mn.Ik({specificationVersion:mn.eu("v2"),provider:mn.Yj(),modelId:mn.Yj()}),Qn=mn.Ik({input:mn.Yj(),output:mn.Yj(),input_cache_read:mn.Yj().nullish(),input_cache_write:mn.Yj().nullish()}).transform((({input:e,output:t,input_cache_read:n,input_cache_write:r})=>({input:e,output:t,...n?{cachedInputTokens:n}:{},...r?{cacheCreationInputTokens:r}:{}}))),er=mn.Ik({id:mn.Yj(),name:mn.Yj(),description:mn.Yj().nullish(),pricing:Qn.nullish(),specification:Jn,modelType:mn.k5(["language","embedding","image"]).nullish()}),tr=mn.Ik({models:mn.YO(er)}),nr=class{constructor(e,t){this.modelId=e,this.config=t,this.specificationVersion="v2",this.supportedUrls={"*/*":[/.*/]}}get provider(){return this.config.provider}async getArgs(e){const{abortSignal:t,...n}=e;return{args:this.maybeEncodeFileParts(n),warnings:[]}}async doGenerate(e){const{args:t,warnings:n}=await this.getArgs(e),{abortSignal:r}=e,a=await Gt(this.config.headers());try{const{responseHeaders:s,value:i,rawValue:o}=await zt({url:this.getUrl(),headers:It(a,e.headers,this.getModelConfigHeaders(this.modelId,!1),await Gt(this.config.o11yHeaders)),body:t,successfulResponseHandler:Ht(mn.bz()),failedResponseHandler:Wt({errorSchema:mn.bz(),errorToMessage:e=>e}),...r&&{abortSignal:r},fetch:this.config.fetch});return{...i,request:{body:t},response:{headers:s,body:o},warnings:n}}catch(e){throw Zn(e,Hn(a))}}async doStream(e){const{args:t,warnings:n}=await this.getArgs(e),{abortSignal:a}=e,s=await Gt(this.config.headers());try{const{value:o,responseHeaders:l}=await zt({url:this.getUrl(),headers:It(s,e.headers,this.getModelConfigHeaders(this.modelId,!0),await Gt(this.config.o11yHeaders)),body:t,successfulResponseHandler:(i=mn.bz(),async({response:e})=>{const t=Tt(e);if(null==e.body)throw new r.Tt({});return{responseHeaders:t,value:Ut({stream:e.body,schema:i})}}),failedResponseHandler:Wt({errorSchema:mn.bz(),errorToMessage:e=>e}),...a&&{abortSignal:a},fetch:this.config.fetch});return{stream:o.pipeThrough(new TransformStream({start(e){n.length>0&&e.enqueue({type:"stream-start",warnings:n})},transform(t,n){if(t.success){const r=t.value;if("raw"===r.type&&!e.includeRawChunks)return;"response-metadata"===r.type&&r.timestamp&&"string"==typeof r.timestamp&&(r.timestamp=new Date(r.timestamp)),n.enqueue(r)}else n.error(t.error)}})),request:{body:t},response:{headers:l}}}catch(e){throw Zn(e,Hn(s))}var i}isFilePart(e){return e&&"object"==typeof e&&"type"in e&&"file"===e.type}maybeEncodeFileParts(e){for(const t of e.prompt)for(const e of t.content)if(this.isFilePart(e)){const t=e;if(t.data instanceof Uint8Array){const e=Uint8Array.from(t.data),n=hn.from(e).toString("base64");t.data=new fn(`data:${t.mediaType||"application/octet-stream"};base64,${n}`)}}return e}getUrl(){return`${this.config.baseURL}/language-model`}getModelConfigHeaders(e,t){return{"ai-language-model-specification-version":"2","ai-language-model-id":e,"ai-language-model-streaming":String(t)}}},rr=class{constructor(e,t){this.modelId=e,this.config=t,this.specificationVersion="v2",this.maxEmbeddingsPerCall=2048,this.supportsParallelCalls=!0}get provider(){return this.config.provider}async doEmbed({values:e,headers:t,abortSignal:n,providerOptions:r}){var a;const s=await Gt(this.config.headers());try{const{responseHeaders:i,value:o,rawValue:l}=await zt({url:this.getUrl(),headers:It(s,null!=t?t:{},this.getModelConfigHeaders(),await Gt(this.config.o11yHeaders)),body:{input:1===e.length?e[0]:e,...null!=r?r:{}},successfulResponseHandler:Ht(ar),failedResponseHandler:Wt({errorSchema:mn.bz(),errorToMessage:e=>e}),...n&&{abortSignal:n},fetch:this.config.fetch});return{embeddings:o.embeddings,usage:null!=(a=o.usage)?a:void 0,providerMetadata:o.providerMetadata,response:{headers:i,body:l}}}catch(e){throw Zn(e,Hn(s))}}getUrl(){return`${this.config.baseURL}/embedding-model`}getModelConfigHeaders(){return{"ai-embedding-model-specification-version":"2","ai-model-id":this.modelId}}},ar=mn.Ik({embeddings:mn.YO(mn.YO(mn.ai())),usage:mn.Ik({tokens:mn.ai()}).nullish(),providerMetadata:mn.g1(mn.Yj(),mn.g1(mn.Yj(),mn.L5())).optional()}),sr=Symbol.for("@vercel/request-context");function ir(){var e,t,n;return null!=(n=null==(t=null==(e=globalThis[sr])?void 0:e.get)?void 0:t.call(e))?n:{}}var or,lr=function(e={}){var t,n;let a=null,s=null;const i=null!=(t=e.metadataCacheRefreshMillis)?t:3e5;let o=0;const l=null!=(n=null==(c=e.baseURL)?void 0:c.replace(/\/$/,""))?n:"https://ai-gateway.vercel.sh/v1/ai";var c;const u=async()=>{const t=await async function(e){const t=Mt({settingValue:e.apiKey,environmentVariableName:"AI_GATEWAY_API_KEY"});if(t)return{token:t,authMethod:"api-key"};try{const e=await async function(){var e,t;const n=null!=(t=null==(e=ir().headers)?void 0:e["x-vercel-oidc-token"])?t:vn.env.VERCEL_OIDC_TOKEN;if(!n)throw new Sn({message:"OIDC token not available",statusCode:401});return n}();return{token:e,authMethod:"oidc"}}catch(e){return null}}(e);if(t)return{Authorization:`Bearer ${t.token}`,"ai-gateway-protocol-version":"0.0.1",[Wn]:t.authMethod,...e.headers};throw Sn.createContextualError({apiKeyProvided:!1,oidcTokenProvided:!1,statusCode:401})},p=()=>{const e=Mt({settingValue:void 0,environmentVariableName:"VERCEL_DEPLOYMENT_ID"}),t=Mt({settingValue:void 0,environmentVariableName:"VERCEL_ENV"}),n=Mt({settingValue:void 0,environmentVariableName:"VERCEL_REGION"});return async()=>{const r=await async function(){var e;return null==(e=ir().headers)?void 0:e["x-vercel-id"]}();return{...e&&{"ai-o11y-deployment-id":e},...t&&{"ai-o11y-environment":t},...n&&{"ai-o11y-region":n},...r&&{"ai-o11y-request-id":r}}}},d=t=>new nr(t,{provider:"gateway",baseURL:l,headers:u,fetch:e.fetch,o11yHeaders:p()}),m=function(e){if(new.target)throw new Error("The Gateway Provider model function cannot be called with the new keyword.");return d(e)};return m.getAvailableModels=async()=>{var t,n,r;const c=null!=(r=null==(n=null==(t=e._internal)?void 0:t.currentDate)?void 0:n.call(t).getTime())?r:Date.now();return(!a||c-o>i)&&(o=c,a=new Xn({baseURL:l,headers:u,fetch:e.fetch}).getAvailableModels().then((e=>(s=e,e))).catch((async e=>{throw Zn(e,Hn(await u()))}))),s?Promise.resolve(s):a},m.imageModel=e=>{throw new r.eM({modelId:e,modelType:"imageModel"})},m.languageModel=d,m.textEmbeddingModel=t=>new rr(t,{provider:"gateway",baseURL:l,headers:u,fetch:e.fetch,o11yHeaders:p()}),m}(),cr=n(26767),ur=n(19917),pr=n(9606).URL,dr=Object.defineProperty,mr="AI_NoOutputSpecifiedError",hr=`vercel.ai.error.${mr}`,fr=Symbol.for(hr),vr=class extends r.bD{constructor({message:e="No output specified."}={}){super({name:mr,message:e}),this[or]=!0}static isInstance(e){return r.bD.hasMarker(e,hr)}};or=fr;var gr,yr="AI_InvalidArgumentError",$r=`vercel.ai.error.${yr}`,br=Symbol.for($r),Er=class extends r.bD{constructor({parameter:e,value:t,message:n}){super({name:yr,message:`Invalid argument for parameter ${e}: ${n}`}),this[gr]=!0,this.parameter=e,this.value=t}static isInstance(e){return r.bD.hasMarker(e,$r)}};gr=br;var Sr=Symbol.for("vercel.ai.error.AI_InvalidStreamPartError");r.bD;var Ar,_r="AI_InvalidToolInputError",xr=`vercel.ai.error.${_r}`,wr=Symbol.for(xr),Or=class extends r.bD{constructor({toolInput:e,toolName:t,cause:n,message:a=`Invalid input for tool ${t}: ${(0,r.u1)(n)}`}){super({name:_r,message:a,cause:n}),this[Ar]=!0,this.toolInput=e,this.toolName=t}static isInstance(e){return r.bD.hasMarker(e,xr)}};Ar=wr;var Nr=Symbol.for("vercel.ai.error.AI_MCPClientError");r.bD;var Ir=Symbol.for("vercel.ai.error.AI_NoImageGeneratedError");r.bD;var Tr,Rr="AI_NoObjectGeneratedError",Cr=`vercel.ai.error.${Rr}`,kr=Symbol.for(Cr),Lr=class extends r.bD{constructor({message:e="No object generated.",cause:t,text:n,response:r,usage:a,finishReason:s}){super({name:Rr,message:e,cause:t}),this[Tr]=!0,this.text=n,this.response=r,this.usage=a,this.finishReason=s}static isInstance(e){return r.bD.hasMarker(e,Cr)}};Tr=kr;var Pr,Mr="AI_NoOutputGeneratedError",jr=`vercel.ai.error.${Mr}`,Dr=Symbol.for(jr),Fr=class extends r.bD{constructor({message:e="No output generated.",cause:t}={}){super({name:Mr,message:e,cause:t}),this[Pr]=!0}static isInstance(e){return r.bD.hasMarker(e,jr)}};Pr=Dr;var Vr,qr="AI_NoSuchToolError",Br=`vercel.ai.error.${qr}`,Ur=Symbol.for(Br),Yr=class extends r.bD{constructor({toolName:e,availableTools:t,message:n=`Model tried to call unavailable tool '${e}'. ${void 0===t?"No tools are available.":`Available tools: ${t.join(", ")}.`}`}){super({name:qr,message:n}),this[Vr]=!0,this.toolName=e,this.availableTools=t}static isInstance(e){return r.bD.hasMarker(e,Br)}};Vr=Ur;var zr,Zr="AI_ToolCallRepairError",Gr=`vercel.ai.error.${Zr}`,Wr=Symbol.for(Gr),Hr=class extends r.bD{constructor({cause:e,originalError:t,message:n=`Error repairing tool call: ${(0,r.u1)(e)}`}){super({name:Zr,message:n,cause:e}),this[zr]=!0,this.originalError=t}static isInstance(e){return r.bD.hasMarker(e,Gr)}};zr=Wr;var Kr=class extends r.bD{constructor(e){super({name:"AI_UnsupportedModelVersionError",message:`Unsupported model version ${e.version} for provider "${e.provider}" and model "${e.modelId}". AI SDK 5 only supports models that implement specification version "v2".`}),this.version=e.version,this.provider=e.provider,this.modelId=e.modelId}},Xr=Symbol.for("vercel.ai.error.AI_InvalidDataContentError");r.bD;var Jr,Qr="AI_InvalidMessageRoleError",ea=`vercel.ai.error.${Qr}`,ta=Symbol.for(ea),na=class extends r.bD{constructor({role:e,message:t=`Invalid message role: '${e}'. Must be one of: "system", "user", "assistant", "tool".`}){super({name:Qr,message:t}),this[Jr]=!0,this.role=e}static isInstance(e){return r.bD.hasMarker(e,ea)}};Jr=ta;var ra,aa="AI_MessageConversionError",sa=`vercel.ai.error.${aa}`,ia=Symbol.for(sa),oa=class extends r.bD{constructor({originalMessage:e,message:t}){super({name:aa,message:t}),this[ra]=!0,this.originalMessage=e}static isInstance(e){return r.bD.hasMarker(e,sa)}};ra=ia;var la,ca="AI_DownloadError",ua=`vercel.ai.error.${ca}`,pa=Symbol.for(ua),da=class extends r.bD{constructor({url:e,statusCode:t,statusText:n,cause:r,message:a=(null==r?`Failed to download ${e}: ${t} ${n}`:`Failed to download ${e}: ${r}`)}){super({name:ca,message:a,cause:r}),this[la]=!0,this.url=e,this.statusCode=t,this.statusText=n}static isInstance(e){return r.bD.hasMarker(e,ua)}};la=pa;var ma,ha="AI_RetryError",fa=`vercel.ai.error.${ha}`,va=Symbol.for(fa),ga=class extends r.bD{constructor({message:e,reason:t,errors:n}){super({name:ha,message:e}),this[ma]=!0,this.reason=t,this.errors=n,this.lastError=n[n.length-1]}static isInstance(e){return r.bD.hasMarker(e,fa)}};function ya(e){if("string"!=typeof e){if("v2"!==e.specificationVersion)throw new Kr({version:e.specificationVersion,provider:e.provider,modelId:e.modelId});return e}return(null!=(t=globalThis.AI_SDK_DEFAULT_PROVIDER)?t:lr).languageModel(e);var t}ma=va;var $a=[{mediaType:"image/gif",bytesPrefix:[71,73,70],base64Prefix:"R0lG"},{mediaType:"image/png",bytesPrefix:[137,80,78,71],base64Prefix:"iVBORw"},{mediaType:"image/jpeg",bytesPrefix:[255,216],base64Prefix:"/9j/"},{mediaType:"image/webp",bytesPrefix:[82,73,70,70],base64Prefix:"UklGRg"},{mediaType:"image/bmp",bytesPrefix:[66,77],base64Prefix:"Qk"},{mediaType:"image/tiff",bytesPrefix:[73,73,42,0],base64Prefix:"SUkqAA"},{mediaType:"image/tiff",bytesPrefix:[77,77,0,42],base64Prefix:"TU0AKg"},{mediaType:"image/avif",bytesPrefix:[0,0,0,32,102,116,121,112,97,118,105,102],base64Prefix:"AAAAIGZ0eXBhdmlm"},{mediaType:"image/heic",bytesPrefix:[0,0,0,32,102,116,121,112,104,101,105,99],base64Prefix:"AAAAIGZ0eXBoZWlj"}],ba=e=>{const t="string"==typeof e?wt(e):e,n=(127&t[6])<<21|(127&t[7])<<14|(127&t[8])<<7|127&t[9];return t.slice(n+10)};async function Ea({url:e}){var t;const n=e.toString();try{const e=await fetch(n);if(!e.ok)throw new da({url:n,statusCode:e.status,statusText:e.statusText});return{data:new Uint8Array(await e.arrayBuffer()),mediaType:null!=(t=e.headers.get("content-type"))?t:void 0}}catch(e){if(da.isInstance(e))throw e;throw new da({url:n,cause:e})}}var Sa=mn.KC([mn.Yj(),mn.Nl(Uint8Array),mn.Nl(ArrayBuffer),mn.Ie((e=>{var t,n;return null!=(n=null==(t=globalThis.Buffer)?void 0:t.isBuffer(e))&&n}),{message:"Must be a Buffer"})]);function Aa(e){if(e instanceof Uint8Array)return{data:e,mediaType:void 0};if(e instanceof ArrayBuffer)return{data:new Uint8Array(e),mediaType:void 0};if("string"==typeof e)try{e=new pr(e)}catch(e){}if(e instanceof pr&&"data:"===e.protocol){const{mediaType:t,base64Content:n}=function(e){try{const[t,n]=e.split(",");return{mediaType:t.split(";")[0].split(":")[1],base64Content:n}}catch(e){return{mediaType:void 0,base64Content:void 0}}}(e.toString());if(null==t||null==n)throw new r.bD({name:"InvalidDataContentError",message:`Invalid data URL format in content ${e.toString()}`});return{data:n,mediaType:t}}return{data:e,mediaType:void 0}}async function _a({prompt:e,supportedUrls:t,downloadImplementation:n=Ea}){const r=await async function(e,t,n){const r=e.filter((e=>"user"===e.role)).map((e=>e.content)).filter((e=>Array.isArray(e))).flat().filter((e=>"image"===e.type||"file"===e.type)).map((e=>{var t;const n=null!=(t=e.mediaType)?t:"image"===e.type?"image/*":void 0;let r="image"===e.type?e.image:e.data;if("string"==typeof r)try{r=new pr(r)}catch(e){}return{mediaType:n,data:r}})).filter((e=>e.data instanceof pr&&null!=e.mediaType&&!function({mediaType:e,url:t,supportedUrls:n}){return t=t.toLowerCase(),e=e.toLowerCase(),Object.entries(n).map((([e,t])=>{const n=e.toLowerCase();return"*"===n||"*/*"===n?{mediaTypePrefix:"",regexes:t}:{mediaTypePrefix:n.replace(/\*/,""),regexes:t}})).filter((({mediaTypePrefix:t})=>e.startsWith(t))).flatMap((({regexes:e})=>e)).some((e=>e.test(t)))}({url:e.data.toString(),mediaType:e.mediaType,supportedUrls:n}))).map((e=>e.data)),a=await Promise.all(r.map((async e=>({url:e,data:await t({url:e})}))));return Object.fromEntries(a.map((({url:e,data:t})=>[e.toString(),t])))}(e.messages,n,t);return[...null!=e.system?[{role:"system",content:e.system}]:[],...e.messages.map((e=>function({message:e,downloadedAssets:t}){const n=e.role;switch(n){case"system":return{role:"system",content:e.content,providerOptions:e.providerOptions};case"user":return"string"==typeof e.content?{role:"user",content:[{type:"text",text:e.content}],providerOptions:e.providerOptions}:{role:"user",content:e.content.map((e=>function(e,t){var n;if("text"===e.type)return{type:"text",text:e.text,providerOptions:e.providerOptions};let r;const a=e.type;switch(a){case"image":r=e.image;break;case"file":r=e.data;break;default:throw new Error(`Unsupported part type: ${a}`)}const{data:s,mediaType:i}=Aa(r);let o=null!=i?i:e.mediaType,l=s;if(l instanceof pr){const e=t[l.toString()];e&&(l=e.data,null!=o||(o=e.mediaType))}switch(a){case"image":return(l instanceof Uint8Array||"string"==typeof l)&&(o=null!=(n=function({data:e,signatures:t}){const n=function(e){return"string"==typeof e&&e.startsWith("SUQz")||"string"!=typeof e&&e.length>10&&73===e[0]&&68===e[1]&&51===e[2]?ba(e):e}(e);for(const e of t)if("string"==typeof n?n.startsWith(e.base64Prefix):n.length>=e.bytesPrefix.length&&e.bytesPrefix.every(((e,t)=>n[t]===e)))return e.mediaType}({data:l,signatures:$a}))?n:o),{type:"file",mediaType:null!=o?o:"image/*",filename:void 0,data:l,providerOptions:e.providerOptions};case"file":if(null==o)throw new Error("Media type is missing for file part");return{type:"file",mediaType:o,filename:e.filename,data:l,providerOptions:e.providerOptions}}}(e,t))).filter((e=>"text"!==e.type||""!==e.text)),providerOptions:e.providerOptions};case"assistant":return"string"==typeof e.content?{role:"assistant",content:[{type:"text",text:e.content}],providerOptions:e.providerOptions}:{role:"assistant",content:e.content.filter((e=>"text"!==e.type||""!==e.text)).map((e=>{const t=e.providerOptions;switch(e.type){case"file":{const{data:n,mediaType:r}=Aa(e.data);return{type:"file",data:n,filename:e.filename,mediaType:null!=r?r:e.mediaType,providerOptions:t}}case"reasoning":return{type:"reasoning",text:e.text,providerOptions:t};case"text":return{type:"text",text:e.text,providerOptions:t};case"tool-call":return{type:"tool-call",toolCallId:e.toolCallId,toolName:e.toolName,input:e.input,providerExecuted:e.providerExecuted,providerOptions:t};case"tool-result":return{type:"tool-result",toolCallId:e.toolCallId,toolName:e.toolName,output:e.output,providerOptions:t}}})),providerOptions:e.providerOptions};case"tool":return{role:"tool",content:e.content.map((e=>({type:"tool-result",toolCallId:e.toolCallId,toolName:e.toolName,output:e.output,providerOptions:e.providerOptions}))),providerOptions:e.providerOptions};default:throw new na({role:n})}}({message:e,downloadedAssets:r})))]}var xa=mn.RZ((()=>mn.KC([mn.ch(),mn.Yj(),mn.ai(),mn.zM(),mn.g1(mn.Yj(),xa),mn.YO(xa)]))),wa=mn.g1(mn.Yj(),mn.g1(mn.Yj(),xa)),Oa=mn.Ik({type:mn.eu("text"),text:mn.Yj(),providerOptions:wa.optional()}),Na=mn.Ik({type:mn.eu("image"),image:mn.KC([Sa,mn.Nl(pr)]),mediaType:mn.Yj().optional(),providerOptions:wa.optional()}),Ia=mn.Ik({type:mn.eu("file"),data:mn.KC([Sa,mn.Nl(pr)]),filename:mn.Yj().optional(),mediaType:mn.Yj(),providerOptions:wa.optional()}),Ta=mn.Ik({type:mn.eu("reasoning"),text:mn.Yj(),providerOptions:wa.optional()}),Ra=mn.Ik({type:mn.eu("tool-call"),toolCallId:mn.Yj(),toolName:mn.Yj(),input:mn.L5(),providerOptions:wa.optional(),providerExecuted:mn.zM().optional()}),Ca=mn.gM("type",[mn.Ik({type:mn.eu("text"),value:mn.Yj()}),mn.Ik({type:mn.eu("json"),value:xa}),mn.Ik({type:mn.eu("error-text"),value:mn.Yj()}),mn.Ik({type:mn.eu("error-json"),value:xa}),mn.Ik({type:mn.eu("content"),value:mn.YO(mn.KC([mn.Ik({type:mn.eu("text"),text:mn.Yj()}),mn.Ik({type:mn.eu("media"),data:mn.Yj(),mediaType:mn.Yj()})]))})]),ka=mn.Ik({type:mn.eu("tool-result"),toolCallId:mn.Yj(),toolName:mn.Yj(),output:Ca,providerOptions:wa.optional()}),La=mn.Ik({role:mn.eu("system"),content:mn.Yj(),providerOptions:wa.optional()}),Pa=mn.Ik({role:mn.eu("user"),content:mn.KC([mn.Yj(),mn.YO(mn.KC([Oa,Na,Ia]))]),providerOptions:wa.optional()}),Ma=mn.Ik({role:mn.eu("assistant"),content:mn.KC([mn.Yj(),mn.YO(mn.KC([Oa,Ia,Ta,Ra,ka]))]),providerOptions:wa.optional()}),ja=mn.Ik({role:mn.eu("tool"),content:mn.YO(ka),providerOptions:wa.optional()}),Da=mn.KC([La,Pa,Ma,ja]);function Fa({operationId:e,telemetry:t}){return{"operation.name":`${e}${null!=(null==t?void 0:t.functionId)?` ${t.functionId}`:""}`,"resource.name":null==t?void 0:t.functionId,"ai.operationId":e,"ai.telemetry.functionId":null==t?void 0:t.functionId}}var Va={startSpan:()=>qa,startActiveSpan:(e,t,n,r)=>"function"==typeof t?t(qa):"function"==typeof n?n(qa):"function"==typeof r?r(qa):void 0},qa={spanContext:()=>Ba,setAttribute(){return this},setAttributes(){return this},addEvent(){return this},addLink(){return this},addLinks(){return this},setStatus(){return this},updateName(){return this},end(){return this},isRecording:()=>!1,recordException(){return this}},Ba={traceId:"",spanId:"",traceFlags:0};function Ua({name:e,tracer:t,attributes:n,fn:r,endWhenDone:a=!0}){return t.startActiveSpan(e,{attributes:n},(async e=>{try{const t=await r(e);return a&&e.end(),t}catch(t){try{Ya(e,t)}finally{e.end()}throw t}}))}function Ya(e,t){t instanceof Error?(e.recordException({name:t.name,message:t.message,stack:t.stack}),e.setStatus({code:ur.s.ERROR,message:t.message})):e.setStatus({code:ur.s.ERROR})}function za({telemetry:e,attributes:t}){return!0!==(null==e?void 0:e.isEnabled)?{}:Object.entries(t).reduce(((t,[n,r])=>{if(null==r)return t;if("object"==typeof r&&"input"in r&&"function"==typeof r.input){if(!1===(null==e?void 0:e.recordInputs))return t;const a=r.input();return null==a?t:{...t,[n]:a}}if("object"==typeof r&&"output"in r&&"function"==typeof r.output){if(!1===(null==e?void 0:e.recordOutputs))return t;const a=r.output();return null==a?t:{...t,[n]:a}}return{...t,[n]:r}}),{})}function Za(e,t){return null==e&&null==t?void 0:(null!=e?e:0)+(null!=t?t:0)}function Ga(e){return void 0===e?[]:Array.isArray(e)?e:[e]}var Wa=({maxRetries:e=2,initialDelayInMs:t=2e3,backoffFactor:n=2,abortSignal:r}={})=>async a=>Ha(a,{maxRetries:e,delayInMs:t,backoffFactor:n,abortSignal:r});async function Ha(e,{maxRetries:t,delayInMs:n,backoffFactor:a,abortSignal:s},i=[]){try{return await e()}catch(o){if(Ue(o))throw o;if(0===t)throw o;const l=Be(o),c=[...i,o],u=c.length;if(u>t)throw new ga({message:`Failed after ${u} attempts. Last error: ${l}`,reason:"maxRetriesExceeded",errors:c});if(o instanceof Error&&r.hL.isInstance(o)&&!0===o.isRetryable&&u<=t)return await async function(e,t){if(null==e)return Promise.resolve();const n=null==t?void 0:t.abortSignal;return new Promise(((t,r)=>{if(null==n?void 0:n.aborted)return void r(Fe());const a=setTimeout((()=>{s(),t()}),e),s=()=>{clearTimeout(a),null==n||n.removeEventListener("abort",i)},i=()=>{s(),r(Fe())};null==n||n.addEventListener("abort",i)}))}(function({error:e,exponentialBackoffDelay:t}){const n=e.responseHeaders;if(!n)return t;let r;const a=n["retry-after-ms"];if(a){const e=parseFloat(a);Number.isNaN(e)||(r=e)}const s=n["retry-after"];if(s&&void 0===r){const e=parseFloat(s);r=Number.isNaN(e)?Date.parse(s)-Date.now():1e3*e}return null!=r&&!Number.isNaN(r)&&0<=r&&(r<6e4||r<t)?r:t}({error:o,exponentialBackoffDelay:n}),{abortSignal:s}),Ha(e,{maxRetries:t,delayInMs:a*n,backoffFactor:a,abortSignal:s},c);if(1===u)throw o;throw new ga({message:`Failed after ${u} attempts with non-retryable error: '${l}'`,reason:"errorNotRetryable",errors:c})}}var Ka=class{constructor({data:e,mediaType:t}){const n=e instanceof Uint8Array;this.base64Data=n?void 0:e,this.uint8ArrayData=n?e:void 0,this.mediaType=t}get base64(){return null==this.base64Data&&(this.base64Data=Ot(this.uint8ArrayData)),this.base64Data}get uint8Array(){return null==this.uint8ArrayData&&(this.uint8ArrayData=wt(this.base64Data)),this.uint8ArrayData}},Xa=class extends Ka{constructor(e){super(e),this.type="file"}};async function Ja({toolCall:e,tools:t}){const n=e.toolName,r=t[n];if(null==r)throw new Yr({toolName:e.toolName,availableTools:Object.keys(t)});const a=At(r.inputSchema),s=""===e.input.trim()?await He({value:{},schema:a}):await Ke({text:e.input,schema:a});if(!1===s.success)throw new Or({toolName:n,toolInput:e.input,cause:s.error});return"dynamic"===r.type?{type:"tool-call",toolCallId:e.toolCallId,toolName:e.toolName,input:s.value,providerExecuted:e.providerExecuted,providerMetadata:e.providerMetadata,dynamic:!0}:{type:"tool-call",toolCallId:e.toolCallId,toolName:n,input:s.value,providerExecuted:e.providerExecuted,providerMetadata:e.providerMetadata}}var Qa=class{constructor({content:e,finishReason:t,usage:n,warnings:r,request:a,response:s,providerMetadata:i}){this.content=e,this.finishReason=t,this.usage=n,this.warnings=r,this.request=a,this.response=s,this.providerMetadata=i}get text(){return this.content.filter((e=>"text"===e.type)).map((e=>e.text)).join("")}get reasoning(){return this.content.filter((e=>"reasoning"===e.type))}get reasoningText(){return 0===this.reasoning.length?void 0:this.reasoning.map((e=>e.text)).join("")}get files(){return this.content.filter((e=>"file"===e.type)).map((e=>e.file))}get sources(){return this.content.filter((e=>"source"===e.type))}get toolCalls(){return this.content.filter((e=>"tool-call"===e.type))}get staticToolCalls(){return this.toolCalls.filter((e=>!1===e.dynamic))}get dynamicToolCalls(){return this.toolCalls.filter((e=>!0===e.dynamic))}get toolResults(){return this.content.filter((e=>"tool-result"===e.type))}get staticToolResults(){return this.toolResults.filter((e=>!1===e.dynamic))}get dynamicToolResults(){return this.toolResults.filter((e=>!0===e.dynamic))}};function es(e){return({steps:t})=>t.length===e}function ts({output:e,tool:t,errorMode:n}){return"text"===n?{type:"error-text",value:(0,r.u1)(e)}:"json"===n?{type:"error-json",value:ns(e)}:(null==t?void 0:t.toModelOutput)?t.toModelOutput(e):"string"==typeof e?{type:"text",value:e}:{type:"json",value:ns(e)}}function ns(e){return void 0===e?null:e}function rs({content:e,tools:t}){const n=[],r=e.filter((e=>"source"!==e.type)).filter((e=>("tool-result"!==e.type||e.providerExecuted)&&("tool-error"!==e.type||e.providerExecuted))).filter((e=>"text"!==e.type||e.text.length>0)).map((e=>{switch(e.type){case"text":return{type:"text",text:e.text,providerOptions:e.providerMetadata};case"reasoning":return{type:"reasoning",text:e.text,providerOptions:e.providerMetadata};case"file":return{type:"file",data:e.file.base64,mediaType:e.file.mediaType,providerOptions:e.providerMetadata};case"tool-call":return{type:"tool-call",toolCallId:e.toolCallId,toolName:e.toolName,input:e.input,providerExecuted:e.providerExecuted,providerOptions:e.providerMetadata};case"tool-result":return{type:"tool-result",toolCallId:e.toolCallId,toolName:e.toolName,output:ts({tool:null==t?void 0:t[e.toolName],output:e.output,errorMode:"none"}),providerExecuted:!0,providerOptions:e.providerMetadata};case"tool-error":return{type:"tool-result",toolCallId:e.toolCallId,toolName:e.toolName,output:ts({tool:null==t?void 0:t[e.toolName],output:e.error,errorMode:"json"}),providerOptions:e.providerMetadata}}}));r.length>0&&n.push({role:"assistant",content:r});const a=e.filter((e=>"tool-result"===e.type||"tool-error"===e.type)).filter((e=>!e.providerExecuted)).map((e=>({type:"tool-result",toolCallId:e.toolCallId,toolName:e.toolName,output:ts({tool:null==t?void 0:t[e.toolName],output:"tool-result"===e.type?e.output:e.error,errorMode:"tool-error"===e.type?"text":"none"})})));return a.length>0&&n.push({role:"tool",content:a}),n}function as(e,t){const n=new Headers(null!=e?e:{});for(const[e,r]of Object.entries(t))n.has(e)||n.set(e,r);return n}function ss({response:e,status:t,statusText:n,headers:r,stream:a}){e.writeHead(null!=t?t:200,n,r);const s=a.getReader();(async()=>{try{for(;;){const{done:t,value:n}=await s.read();if(t)break;e.write(n)}}catch(e){throw e}finally{e.end()}})()}Ve({prefix:"aitxt",size:24});var is=class extends TransformStream{constructor(){super({transform(e,t){t.enqueue(`data: ${JSON.stringify(e)}\n\n`)},flush(e){e.enqueue("data: [DONE]\n\n")}})}},os={"content-type":"text/event-stream","cache-control":"no-cache",connection:"keep-alive","x-vercel-ai-ui-message-stream":"v1","x-accel-buffering":"no"},ls=mn.KC([mn.re({type:mn.eu("text-start"),id:mn.Yj(),providerMetadata:wa.optional()}),mn.re({type:mn.eu("text-delta"),id:mn.Yj(),delta:mn.Yj(),providerMetadata:wa.optional()}),mn.re({type:mn.eu("text-end"),id:mn.Yj(),providerMetadata:wa.optional()}),mn.re({type:mn.eu("error"),errorText:mn.Yj()}),mn.re({type:mn.eu("tool-input-start"),toolCallId:mn.Yj(),toolName:mn.Yj(),providerExecuted:mn.zM().optional(),dynamic:mn.zM().optional()}),mn.re({type:mn.eu("tool-input-delta"),toolCallId:mn.Yj(),inputTextDelta:mn.Yj()}),mn.re({type:mn.eu("tool-input-available"),toolCallId:mn.Yj(),toolName:mn.Yj(),input:mn.L5(),providerExecuted:mn.zM().optional(),providerMetadata:wa.optional(),dynamic:mn.zM().optional()}),mn.re({type:mn.eu("tool-input-error"),toolCallId:mn.Yj(),toolName:mn.Yj(),input:mn.L5(),providerExecuted:mn.zM().optional(),providerMetadata:wa.optional(),dynamic:mn.zM().optional(),errorText:mn.Yj()}),mn.re({type:mn.eu("tool-output-available"),toolCallId:mn.Yj(),output:mn.L5(),providerExecuted:mn.zM().optional(),dynamic:mn.zM().optional(),preliminary:mn.zM().optional()}),mn.re({type:mn.eu("tool-output-error"),toolCallId:mn.Yj(),errorText:mn.Yj(),providerExecuted:mn.zM().optional(),dynamic:mn.zM().optional()}),mn.re({type:mn.eu("reasoning"),text:mn.Yj(),providerMetadata:wa.optional()}),mn.re({type:mn.eu("reasoning-start"),id:mn.Yj(),providerMetadata:wa.optional()}),mn.re({type:mn.eu("reasoning-delta"),id:mn.Yj(),delta:mn.Yj(),providerMetadata:wa.optional()}),mn.re({type:mn.eu("reasoning-end"),id:mn.Yj(),providerMetadata:wa.optional()}),mn.re({type:mn.eu("reasoning-part-finish")}),mn.re({type:mn.eu("source-url"),sourceId:mn.Yj(),url:mn.Yj(),title:mn.Yj().optional(),providerMetadata:wa.optional()}),mn.re({type:mn.eu("source-document"),sourceId:mn.Yj(),mediaType:mn.Yj(),title:mn.Yj(),filename:mn.Yj().optional(),providerMetadata:wa.optional()}),mn.re({type:mn.eu("file"),url:mn.Yj(),mediaType:mn.Yj(),providerMetadata:wa.optional()}),mn.re({type:mn.Yj().startsWith("data-"),id:mn.Yj().optional(),data:mn.L5(),transient:mn.zM().optional()}),mn.re({type:mn.eu("start-step")}),mn.re({type:mn.eu("finish-step")}),mn.re({type:mn.eu("start"),messageId:mn.Yj().optional(),messageMetadata:mn.L5().optional()}),mn.re({type:mn.eu("finish"),messageMetadata:mn.L5().optional()}),mn.re({type:mn.eu("abort")}),mn.re({type:mn.eu("message-metadata"),messageMetadata:mn.L5()})]);function cs(e,t){if(void 0===e&&void 0===t)return;if(void 0===e)return t;if(void 0===t)return e;const n={...e};for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)){const a=t[r];if(void 0===a)continue;const s=r in e?e[r]:void 0,i=!(null===a||"object"!=typeof a||Array.isArray(a)||a instanceof Date||a instanceof RegExp),o=!(null==s||"object"!=typeof s||Array.isArray(s)||s instanceof Date||s instanceof RegExp);n[r]=i&&o?cs(s,a):a}return n}function us(e){const t=["ROOT"];let n=-1,r=null;function a(e,a,s){switch(e){case'"':n=a,t.pop(),t.push(s),t.push("INSIDE_STRING");break;case"f":case"t":case"n":n=a,r=a,t.pop(),t.push(s),t.push("INSIDE_LITERAL");break;case"-":t.pop(),t.push(s),t.push("INSIDE_NUMBER");break;case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":n=a,t.pop(),t.push(s),t.push("INSIDE_NUMBER");break;case"{":n=a,t.pop(),t.push(s),t.push("INSIDE_OBJECT_START");break;case"[":n=a,t.pop(),t.push(s),t.push("INSIDE_ARRAY_START")}}function s(e,r){switch(e){case",":t.pop(),t.push("INSIDE_OBJECT_AFTER_COMMA");break;case"}":n=r,t.pop()}}function i(e,r){switch(e){case",":t.pop(),t.push("INSIDE_ARRAY_AFTER_COMMA");break;case"]":n=r,t.pop()}}for(let o=0;o<e.length;o++){const l=e[o];switch(t[t.length-1]){case"ROOT":a(l,o,"FINISH");break;case"INSIDE_OBJECT_START":switch(l){case'"':t.pop(),t.push("INSIDE_OBJECT_KEY");break;case"}":n=o,t.pop()}break;case"INSIDE_OBJECT_AFTER_COMMA":'"'===l&&(t.pop(),t.push("INSIDE_OBJECT_KEY"));break;case"INSIDE_OBJECT_KEY":'"'===l&&(t.pop(),t.push("INSIDE_OBJECT_AFTER_KEY"));break;case"INSIDE_OBJECT_AFTER_KEY":":"===l&&(t.pop(),t.push("INSIDE_OBJECT_BEFORE_VALUE"));break;case"INSIDE_OBJECT_BEFORE_VALUE":a(l,o,"INSIDE_OBJECT_AFTER_VALUE");break;case"INSIDE_OBJECT_AFTER_VALUE":s(l,o);break;case"INSIDE_STRING":switch(l){case'"':t.pop(),n=o;break;case"\\":t.push("INSIDE_STRING_ESCAPE");break;default:n=o}break;case"INSIDE_ARRAY_START":"]"===l?(n=o,t.pop()):(n=o,a(l,o,"INSIDE_ARRAY_AFTER_VALUE"));break;case"INSIDE_ARRAY_AFTER_VALUE":switch(l){case",":t.pop(),t.push("INSIDE_ARRAY_AFTER_COMMA");break;case"]":n=o,t.pop();break;default:n=o}break;case"INSIDE_ARRAY_AFTER_COMMA":a(l,o,"INSIDE_ARRAY_AFTER_VALUE");break;case"INSIDE_STRING_ESCAPE":t.pop(),n=o;break;case"INSIDE_NUMBER":switch(l){case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":n=o;break;case"e":case"E":case"-":case".":break;case",":t.pop(),"INSIDE_ARRAY_AFTER_VALUE"===t[t.length-1]&&i(l,o),"INSIDE_OBJECT_AFTER_VALUE"===t[t.length-1]&&s(l,o);break;case"}":t.pop(),"INSIDE_OBJECT_AFTER_VALUE"===t[t.length-1]&&s(l,o);break;case"]":t.pop(),"INSIDE_ARRAY_AFTER_VALUE"===t[t.length-1]&&i(l,o);break;default:t.pop()}break;case"INSIDE_LITERAL":{const a=e.substring(r,o+1);"false".startsWith(a)||"true".startsWith(a)||"null".startsWith(a)?n=o:(t.pop(),"INSIDE_OBJECT_AFTER_VALUE"===t[t.length-1]?s(l,o):"INSIDE_ARRAY_AFTER_VALUE"===t[t.length-1]&&i(l,o));break}}}let o=e.slice(0,n+1);for(let n=t.length-1;n>=0;n--)switch(t[n]){case"INSIDE_STRING":o+='"';break;case"INSIDE_OBJECT_KEY":case"INSIDE_OBJECT_AFTER_KEY":case"INSIDE_OBJECT_AFTER_COMMA":case"INSIDE_OBJECT_START":case"INSIDE_OBJECT_BEFORE_VALUE":case"INSIDE_OBJECT_AFTER_VALUE":o+="}";break;case"INSIDE_ARRAY_START":case"INSIDE_ARRAY_AFTER_COMMA":case"INSIDE_ARRAY_AFTER_VALUE":o+="]";break;case"INSIDE_LITERAL":{const t=e.substring(r,e.length);"true".startsWith(t)?o+="true".slice(t.length):"false".startsWith(t)?o+="false".slice(t.length):"null".startsWith(t)&&(o+="null".slice(t.length))}}return o}async function ps(e){if(void 0===e)return{value:void 0,state:"undefined-input"};let t=await Ke({text:e});return t.success?{value:t.value,state:"successful-parse"}:(t=await Ke({text:us(e)}),t.success?{value:t.value,state:"repaired-parse"}:{value:void 0,state:"failed-parse"})}function ds(e){return e.type.startsWith("tool-")}function ms(e){return ds(e)||function(e){return"dynamic-tool"===e.type}(e)}function hs(e){return e.type.split("-").slice(1).join("-")}function fs({lastMessage:e,messageId:t}){return{message:"assistant"===(null==e?void 0:e.role)?e:{id:t,metadata:void 0,role:"assistant",parts:[]},activeTextParts:{},activeReasoningParts:{},partialToolCalls:{}}}function vs({stream:e,messageMetadataSchema:t,dataPartSchemas:n,runUpdateMessageJob:r,onError:a,onToolCall:s,onData:i}){return e.pipeThrough(new TransformStream({async transform(e,o){await r((async({state:r,write:l})=>{var c,u,p,d;function m(e){const t=r.message.parts.filter(ds).find((t=>t.toolCallId===e));if(null==t)throw new Error("tool-output-error must be preceded by a tool-input-available");return t}function h(e){const t=r.message.parts.filter((e=>"dynamic-tool"===e.type)).find((t=>t.toolCallId===e));if(null==t)throw new Error("tool-output-error must be preceded by a tool-input-available");return t}function f(e){var t;const n=r.message.parts.find((t=>ds(t)&&t.toolCallId===e.toolCallId)),a=e,s=n;null!=n?(n.state=e.state,s.input=a.input,s.output=a.output,s.errorText=a.errorText,s.rawInput=a.rawInput,s.preliminary=a.preliminary,s.providerExecuted=null!=(t=a.providerExecuted)?t:n.providerExecuted,null!=a.providerMetadata&&"input-available"===n.state&&(n.callProviderMetadata=a.providerMetadata)):r.message.parts.push({type:`tool-${e.toolName}`,toolCallId:e.toolCallId,state:e.state,input:a.input,output:a.output,rawInput:a.rawInput,errorText:a.errorText,providerExecuted:a.providerExecuted,preliminary:a.preliminary,...null!=a.providerMetadata?{callProviderMetadata:a.providerMetadata}:{}})}function v(e){var t;const n=r.message.parts.find((t=>"dynamic-tool"===t.type&&t.toolCallId===e.toolCallId)),a=e,s=n;null!=n?(n.state=e.state,s.toolName=e.toolName,s.input=a.input,s.output=a.output,s.errorText=a.errorText,s.rawInput=null!=(t=a.rawInput)?t:s.rawInput,s.preliminary=a.preliminary,null!=a.providerMetadata&&"input-available"===n.state&&(n.callProviderMetadata=a.providerMetadata)):r.message.parts.push({type:"dynamic-tool",toolName:e.toolName,toolCallId:e.toolCallId,state:e.state,input:a.input,output:a.output,errorText:a.errorText,preliminary:a.preliminary,...null!=a.providerMetadata?{callProviderMetadata:a.providerMetadata}:{}})}async function g(e){if(null!=e){const n=null!=r.message.metadata?cs(r.message.metadata,e):e;null!=t&&await We({value:n,schema:t}),r.message.metadata=n}}switch(e.type){case"text-start":{const t={type:"text",text:"",providerMetadata:e.providerMetadata,state:"streaming"};r.activeTextParts[e.id]=t,r.message.parts.push(t),l();break}case"text-delta":{const t=r.activeTextParts[e.id];t.text+=e.delta,t.providerMetadata=null!=(c=e.providerMetadata)?c:t.providerMetadata,l();break}case"text-end":{const t=r.activeTextParts[e.id];t.state="done",t.providerMetadata=null!=(u=e.providerMetadata)?u:t.providerMetadata,delete r.activeTextParts[e.id],l();break}case"reasoning-start":{const t={type:"reasoning",text:"",providerMetadata:e.providerMetadata,state:"streaming"};r.activeReasoningParts[e.id]=t,r.message.parts.push(t),l();break}case"reasoning-delta":{const t=r.activeReasoningParts[e.id];t.text+=e.delta,t.providerMetadata=null!=(p=e.providerMetadata)?p:t.providerMetadata,l();break}case"reasoning-end":{const t=r.activeReasoningParts[e.id];t.providerMetadata=null!=(d=e.providerMetadata)?d:t.providerMetadata,t.state="done",delete r.activeReasoningParts[e.id],l();break}case"file":r.message.parts.push({type:"file",mediaType:e.mediaType,url:e.url}),l();break;case"source-url":r.message.parts.push({type:"source-url",sourceId:e.sourceId,url:e.url,title:e.title,providerMetadata:e.providerMetadata}),l();break;case"source-document":r.message.parts.push({type:"source-document",sourceId:e.sourceId,mediaType:e.mediaType,title:e.title,filename:e.filename,providerMetadata:e.providerMetadata}),l();break;case"tool-input-start":{const t=r.message.parts.filter(ds);r.partialToolCalls[e.toolCallId]={text:"",toolName:e.toolName,index:t.length,dynamic:e.dynamic},e.dynamic?v({toolCallId:e.toolCallId,toolName:e.toolName,state:"input-streaming",input:void 0}):f({toolCallId:e.toolCallId,toolName:e.toolName,state:"input-streaming",input:void 0,providerExecuted:e.providerExecuted}),l();break}case"tool-input-delta":{const t=r.partialToolCalls[e.toolCallId];t.text+=e.inputTextDelta;const{value:n}=await ps(t.text);t.dynamic?v({toolCallId:e.toolCallId,toolName:t.toolName,state:"input-streaming",input:n}):f({toolCallId:e.toolCallId,toolName:t.toolName,state:"input-streaming",input:n}),l();break}case"tool-input-available":e.dynamic?v({toolCallId:e.toolCallId,toolName:e.toolName,state:"input-available",input:e.input,providerMetadata:e.providerMetadata}):f({toolCallId:e.toolCallId,toolName:e.toolName,state:"input-available",input:e.input,providerExecuted:e.providerExecuted,providerMetadata:e.providerMetadata}),l(),s&&!e.providerExecuted&&await s({toolCall:e});break;case"tool-input-error":e.dynamic?v({toolCallId:e.toolCallId,toolName:e.toolName,state:"output-error",input:e.input,errorText:e.errorText,providerMetadata:e.providerMetadata}):f({toolCallId:e.toolCallId,toolName:e.toolName,state:"output-error",input:void 0,rawInput:e.input,errorText:e.errorText,providerExecuted:e.providerExecuted,providerMetadata:e.providerMetadata}),l();break;case"tool-output-available":if(e.dynamic){const t=h(e.toolCallId);v({toolCallId:e.toolCallId,toolName:t.toolName,state:"output-available",input:t.input,output:e.output,preliminary:e.preliminary})}else{const t=m(e.toolCallId);f({toolCallId:e.toolCallId,toolName:hs(t),state:"output-available",input:t.input,output:e.output,providerExecuted:e.providerExecuted,preliminary:e.preliminary})}l();break;case"tool-output-error":if(e.dynamic){const t=h(e.toolCallId);v({toolCallId:e.toolCallId,toolName:t.toolName,state:"output-error",input:t.input,errorText:e.errorText})}else{const t=m(e.toolCallId);f({toolCallId:e.toolCallId,toolName:hs(t),state:"output-error",input:t.input,rawInput:t.rawInput,errorText:e.errorText})}l();break;case"start-step":r.message.parts.push({type:"step-start"});break;case"finish-step":r.activeTextParts={},r.activeReasoningParts={};break;case"start":null!=e.messageId&&(r.message.id=e.messageId),await g(e.messageMetadata),null==e.messageId&&null==e.messageMetadata||l();break;case"finish":case"message-metadata":await g(e.messageMetadata),null!=e.messageMetadata&&l();break;case"error":null==a||a(new Error(e.errorText));break;default:if(function(e){return e.type.startsWith("data-")}(e)){null!=(null==n?void 0:n[e.type])&&await We({value:e.data,schema:n[e.type]});const t=e;if(t.transient){null==i||i(t);break}const a=null!=t.id?r.message.parts.find((e=>t.type===e.type&&t.id===e.id)):void 0;null!=a?a.data=t.data:r.message.parts.push(t),null==i||i(t),l()}}o.enqueue(e)}))}}))}function gs(e){const t=e.pipeThrough(new TransformStream);return t[Symbol.asyncIterator]=function(){const e=this.getReader();let t=!1;async function n(n){var r;t=!0;try{n&&await(null==(r=e.cancel)?void 0:r.call(e))}finally{try{e.releaseLock()}catch(e){}}}return{async next(){if(t)return{done:!0,value:void 0};const{done:r,value:a}=await e.read();return r?(await n(!0),{done:!0,value:void 0}):{done:!1,value:a}},return:async()=>(await n(!0),{done:!0,value:void 0}),async throw(e){throw await n(!0),e}}},t}async function ys({stream:e,onError:t}){const n=e.getReader();try{for(;;){const{done:e}=await n.read();if(e)break}}catch(e){null==t||t(e)}finally{n.releaseLock()}}function $s(){let e,t;return{promise:new Promise(((n,r)=>{e=n,t=r})),resolve:e,reject:t}}var bs=class{constructor(){this.status={type:"pending"},this._resolve=void 0,this._reject=void 0}get promise(){return this._promise||(this._promise=new Promise(((e,t)=>{"resolved"===this.status.type?e(this.status.value):"rejected"===this.status.type&&t(this.status.error),this._resolve=e,this._reject=t}))),this._promise}resolve(e){var t;this.status={type:"resolved",value:e},this._promise&&(null==(t=this._resolve)||t.call(this,e))}reject(e){var t;this.status={type:"rejected",error:e},this._promise&&(null==(t=this._reject)||t.call(this,e))}};function Es(){var e,t;return null!=(t=null==(e=null==globalThis?void 0:globalThis.performance)?void 0:e.now())?t:Date.now()}var Ss=Ve({prefix:"aitxt",size:24});function As({model:e,tools:t,toolChoice:n,system:r,prompt:a,messages:s,maxRetries:i,abortSignal:o,headers:l,stopWhen:c=es(1),experimental_output:u,experimental_telemetry:p,prepareStep:d,providerOptions:m,experimental_activeTools:h,activeTools:f=h,experimental_repairToolCall:v,experimental_transform:g,includeRawChunks:y=!1,onChunk:$,onError:b=({error:e})=>{console.error(e)},onFinish:E,onAbort:S,onStepFinish:A,experimental_context:_,_internal:{now:x=Es,generateId:w=Ss,currentDate:O=()=>new Date}={},...N}){return new _s({model:ya(e),telemetry:p,headers:l,settings:N,maxRetries:i,abortSignal:o,system:r,prompt:a,messages:s,tools:t,toolChoice:n,transforms:Ga(g),activeTools:f,repairToolCall:v,stopConditions:Ga(c),output:u,providerOptions:m,prepareStep:d,includeRawChunks:y,onChunk:$,onError:b,onFinish:E,onAbort:S,onStepFinish:A,now:x,currentDate:O,generateId:w,experimental_context:_})}var _s=class{constructor({model:e,telemetry:t,headers:n,settings:a,maxRetries:s,abortSignal:i,system:o,prompt:l,messages:c,tools:u,toolChoice:p,transforms:d,activeTools:m,repairToolCall:h,stopConditions:f,output:v,providerOptions:g,prepareStep:y,includeRawChunks:$,now:b,currentDate:E,generateId:S,onChunk:A,onError:_,onFinish:x,onAbort:w,onStepFinish:O,experimental_context:N}){let I;this._totalUsage=new bs,this._finishReason=new bs,this._steps=new bs,this.output=v,this.includeRawChunks=$,this.tools=u;let T=[];const R=[];let C,k,L={},P=[];const M=[];let j,D={},F={};const V=new TransformStream({async transform(e,t){var n,a,s;t.enqueue(e);const{part:i}=e;if("text-delta"!==i.type&&"reasoning-delta"!==i.type&&"source"!==i.type&&"tool-call"!==i.type&&"tool-result"!==i.type&&"tool-input-start"!==i.type&&"tool-input-delta"!==i.type&&"raw"!==i.type||await(null==A?void 0:A({chunk:i})),"error"===i.type&&await _({error:(o=i.error,Sn.isInstance(o)||Pn.isInstance(o)?new r.bD({name:"GatewayError",message:"Vercel AI Gateway access failed. If you want to use AI SDK providers directly, use the providers, e.g. @ai-sdk/openai, or register a different global default provider.",cause:o}):o)}),"text-start"===i.type&&(D[i.id]={type:"text",text:"",providerMetadata:i.providerMetadata},T.push(D[i.id])),"text-delta"===i.type){const e=D[i.id];if(null==e)return void t.enqueue({part:{type:"error",error:`text part ${i.id} not found`},partialOutput:void 0});e.text+=i.text,e.providerMetadata=null!=(n=i.providerMetadata)?n:e.providerMetadata}var o;if("text-end"===i.type&&delete D[i.id],"reasoning-start"===i.type&&(F[i.id]={type:"reasoning",text:"",providerMetadata:i.providerMetadata},T.push(F[i.id])),"reasoning-delta"===i.type){const e=F[i.id];if(null==e)return void t.enqueue({part:{type:"error",error:`reasoning part ${i.id} not found`},partialOutput:void 0});e.text+=i.text,e.providerMetadata=null!=(a=i.providerMetadata)?a:e.providerMetadata}if("reasoning-end"===i.type){const e=F[i.id];if(null==e)return void t.enqueue({part:{type:"error",error:`reasoning part ${i.id} not found`},partialOutput:void 0});e.providerMetadata=null!=(s=i.providerMetadata)?s:e.providerMetadata,delete F[i.id]}if("file"===i.type&&T.push({type:"file",file:i.file}),"source"===i.type&&T.push(i),"tool-call"===i.type&&T.push(i),"tool-result"!==i.type||i.preliminary||T.push(i),"tool-error"===i.type&&T.push(i),"start-step"===i.type&&(L=i.request,P=i.warnings),"finish-step"===i.type){const e=rs({content:T,tools:u}),t=new Qa({content:T,finishReason:i.finishReason,usage:i.usage,warnings:P,request:L,response:{...i.response,messages:[...R,...e]},providerMetadata:i.providerMetadata});await(null==O?void 0:O(t)),M.push(t),T=[],F={},D={},R.push(...e),I.resolve()}"finish"===i.type&&(k=i.totalUsage,C=i.finishReason)},async flush(e){try{if(0===M.length){const e=new Fr({message:"No output generated. Check the stream for errors."});return H._finishReason.reject(e),H._totalUsage.reject(e),void H._steps.reject(e)}const e=null!=C?C:"unknown",n=null!=k?k:{inputTokens:void 0,outputTokens:void 0,totalTokens:void 0};H._finishReason.resolve(e),H._totalUsage.resolve(n),H._steps.resolve(M);const r=M[M.length-1];await(null==x?void 0:x({finishReason:e,totalUsage:n,usage:r.usage,content:r.content,text:r.text,reasoningText:r.reasoningText,reasoning:r.reasoning,files:r.files,sources:r.sources,toolCalls:r.toolCalls,staticToolCalls:r.staticToolCalls,dynamicToolCalls:r.dynamicToolCalls,toolResults:r.toolResults,staticToolResults:r.staticToolResults,dynamicToolResults:r.dynamicToolResults,request:r.request,response:r.response,warnings:r.warnings,providerMetadata:r.providerMetadata,steps:M})),j.setAttributes(za({telemetry:t,attributes:{"ai.response.finishReason":e,"ai.response.text":{output:()=>r.text},"ai.response.toolCalls":{output:()=>{var e;return(null==(e=r.toolCalls)?void 0:e.length)?JSON.stringify(r.toolCalls):void 0}},"ai.response.providerMetadata":JSON.stringify(r.providerMetadata),"ai.usage.inputTokens":n.inputTokens,"ai.usage.outputTokens":n.outputTokens,"ai.usage.totalTokens":n.totalTokens,"ai.usage.reasoningTokens":n.reasoningTokens,"ai.usage.cachedInputTokens":n.cachedInputTokens}}))}catch(t){e.error(t)}finally{j.end()}}}),q=function(){let e=[],t=null,n=!1,r=$s();const a=()=>{n=!0,r.resolve(),e.forEach((e=>e.cancel())),e=[],null==t||t.close()},s=async()=>{if(n&&0===e.length)null==t||t.close();else{if(0===e.length)return r=$s(),await r.promise,s();try{const{value:r,done:a}=await e[0].read();a?(e.shift(),e.length>0?await s():n&&(null==t||t.close())):null==t||t.enqueue(r)}catch(n){null==t||t.error(n),e.shift(),a()}}};return{stream:new ReadableStream({start(e){t=e},pull:s,async cancel(){for(const t of e)await t.cancel();e=[],n=!0}}),addStream:t=>{if(n)throw new Error("Cannot add inner stream: outer stream is closed");e.push(t.getReader()),r.resolve()},close:()=>{n=!0,r.resolve(),0===e.length&&(null==t||t.close())},terminate:a}}();this.addStream=q.addStream,this.closeStream=q.close;const B=q.stream.getReader();let U=new ReadableStream({async start(e){e.enqueue({type:"start"})},async pull(e){function t(){null==w||w({steps:M}),e.enqueue({type:"abort"}),e.close()}try{const{done:n,value:r}=await B.read();if(n)return void e.close();if(null==i?void 0:i.aborted)return void t();e.enqueue(r)}catch(n){Ue(n)&&(null==i?void 0:i.aborted)?t():e.error(n)}},cancel:e=>q.stream.cancel(e)});for(const e of d)U=U.pipeThrough(e({tools:u,stopStream(){q.terminate()}}));this.baseStream=U.pipeThrough(function(e){if(!e)return new TransformStream({transform(e,t){t.enqueue({part:e,partialOutput:void 0})}});let t,n="",r="",a="";function s({controller:e,partialOutput:n}){e.enqueue({part:{type:"text-delta",id:t,text:r},partialOutput:n}),r=""}return new TransformStream({async transform(i,o){if("finish-step"===i.type&&r.length>0&&s({controller:o}),"text-delta"!==i.type&&"text-start"!==i.type&&"text-end"!==i.type)return void o.enqueue({part:i,partialOutput:void 0});if(null==t)t=i.id;else if(i.id!==t)return void o.enqueue({part:i,partialOutput:void 0});if("text-start"===i.type)return void o.enqueue({part:i,partialOutput:void 0});if("text-end"===i.type)return r.length>0&&s({controller:o}),void o.enqueue({part:i,partialOutput:void 0});n+=i.text,r+=i.text;const l=await e.parsePartial({text:n});if(null!=l){const e=JSON.stringify(l.partial);e!==a&&(s({controller:o,partialOutput:l.partial}),a=e)}}})}(v)).pipeThrough(V);const{maxRetries:Y,retry:z}=function({maxRetries:e,abortSignal:t}){if(null!=e){if(!Number.isInteger(e))throw new Er({parameter:"maxRetries",value:e,message:"maxRetries must be an integer"});if(e<0)throw new Er({parameter:"maxRetries",value:e,message:"maxRetries must be >= 0"})}const n=null!=e?e:2;return{maxRetries:n,retry:Wa({maxRetries:n,abortSignal:t})}}({maxRetries:s,abortSignal:i}),Z=function({isEnabled:e=!1,tracer:t}={}){return e?t||cr.u.getTracer("ai"):Va}(t),G=function({maxOutputTokens:e,temperature:t,topP:n,topK:r,presencePenalty:a,frequencyPenalty:s,seed:i,stopSequences:o}){if(null!=e){if(!Number.isInteger(e))throw new Er({parameter:"maxOutputTokens",value:e,message:"maxOutputTokens must be an integer"});if(e<1)throw new Er({parameter:"maxOutputTokens",value:e,message:"maxOutputTokens must be >= 1"})}if(null!=t&&"number"!=typeof t)throw new Er({parameter:"temperature",value:t,message:"temperature must be a number"});if(null!=n&&"number"!=typeof n)throw new Er({parameter:"topP",value:n,message:"topP must be a number"});if(null!=r&&"number"!=typeof r)throw new Er({parameter:"topK",value:r,message:"topK must be a number"});if(null!=a&&"number"!=typeof a)throw new Er({parameter:"presencePenalty",value:a,message:"presencePenalty must be a number"});if(null!=s&&"number"!=typeof s)throw new Er({parameter:"frequencyPenalty",value:s,message:"frequencyPenalty must be a number"});if(null!=i&&!Number.isInteger(i))throw new Er({parameter:"seed",value:i,message:"seed must be an integer"});return{maxOutputTokens:e,temperature:t,topP:n,topK:r,presencePenalty:a,frequencyPenalty:s,stopSequences:o,seed:i}}(a),W=function({model:e,settings:t,telemetry:n,headers:r}){var a;return{"ai.model.provider":e.provider,"ai.model.id":e.modelId,...Object.entries(t).reduce(((e,[t,n])=>(e[`ai.settings.${t}`]=n,e)),{}),...Object.entries(null!=(a=null==n?void 0:n.metadata)?a:{}).reduce(((e,[t,n])=>(e[`ai.telemetry.metadata.${t}`]=n,e)),{}),...Object.entries(null!=r?r:{}).reduce(((e,[t,n])=>(void 0!==n&&(e[`ai.request.headers.${t}`]=n),e)),{})}}({model:e,telemetry:t,headers:n,settings:{...G,maxRetries:Y}}),H=this;Ua({name:"ai.streamText",attributes:za({telemetry:t,attributes:{...Fa({operationId:"ai.streamText",telemetry:t}),...W,"ai.prompt":{input:()=>JSON.stringify({system:o,prompt:l,messages:c})}}}),tracer:Z,endWhenDone:!1,fn:async a=>{j=a,await async function a({currentStep:s,responseMessages:d,usage:$}){var A,_,x,w,O;const T=H.includeRawChunks;I=new bs;const R=await async function(e){if(null==e.prompt&&null==e.messages)throw new r.M3({prompt:e,message:"prompt or messages must be defined"});if(null!=e.prompt&&null!=e.messages)throw new r.M3({prompt:e,message:"prompt and messages cannot be defined at the same time"});if(null!=e.system&&"string"!=typeof e.system)throw new r.M3({prompt:e,message:"system must be a string"});let t;if(null!=e.prompt&&"string"==typeof e.prompt)t=[{role:"user",content:e.prompt}];else if(null!=e.prompt&&Array.isArray(e.prompt))t=e.prompt;else{if(null==e.messages)throw new r.M3({prompt:e,message:"prompt or messages must be defined"});t=e.messages}if(0===t.length)throw new r.M3({prompt:e,message:"messages must not be empty"});const n=await He({value:t,schema:mn.YO(Da)});if(!n.success)throw new r.M3({prompt:e,message:"The messages must be a ModelMessage[]. If you have passed a UIMessage[], you can use convertToModelMessages to convert them.",cause:n.error});return{messages:t,system:e.system}}({system:o,prompt:l,messages:c}),C=[...R.messages,...d],k=await(null==y?void 0:y({model:e,steps:M,stepNumber:M.length,messages:C})),L=await _a({prompt:{system:null!=(A=null==k?void 0:k.system)?A:R.system,messages:null!=(_=null==k?void 0:k.messages)?_:C},supportedUrls:await e.supportedUrls}),P=ya(null!=(x=null==k?void 0:k.model)?x:e),{toolChoice:j,tools:D}=function({tools:e,toolChoice:t,activeTools:n}){return null!=(r=e)&&Object.keys(r).length>0?{tools:(null!=n?Object.entries(e).filter((([e])=>n.includes(e))):Object.entries(e)).map((([e,t])=>{const n=t.type;switch(n){case void 0:case"dynamic":case"function":return{type:"function",name:e,description:t.description,inputSchema:At(t.inputSchema).jsonSchema,providerOptions:t.providerOptions};case"provider-defined":return{type:"provider-defined",name:e,id:t.id,args:t.args};default:throw new Error(`Unsupported tool type: ${n}`)}})),toolChoice:null==t?{type:"auto"}:"string"==typeof t?{type:t}:{type:"tool",toolName:t.toolName}}:{tools:void 0,toolChoice:void 0};var r}({tools:u,toolChoice:null!=(w=null==k?void 0:k.toolChoice)?w:p,activeTools:null!=(O=null==k?void 0:k.activeTools)?O:m}),{result:{stream:F,response:V,request:q},doStreamSpan:B,startTimestampMs:U}=await z((()=>Ua({name:"ai.streamText.doStream",attributes:za({telemetry:t,attributes:{...Fa({operationId:"ai.streamText.doStream",telemetry:t}),...W,"ai.model.provider":P.provider,"ai.model.id":P.modelId,"ai.prompt.messages":{input:()=>function(e){return JSON.stringify(e.map((e=>({...e,content:"string"==typeof e.content?e.content:e.content.map((e=>{return"file"===e.type?{...e,data:e.data instanceof Uint8Array?(t=e.data,"string"==typeof t?t:t instanceof ArrayBuffer?Ot(new Uint8Array(t)):Ot(t)):e.data}:e;var t}))}))))}(L)},"ai.prompt.tools":{input:()=>null==D?void 0:D.map((e=>JSON.stringify(e)))},"ai.prompt.toolChoice":{input:()=>null!=j?JSON.stringify(j):void 0},"gen_ai.system":P.provider,"gen_ai.request.model":P.modelId,"gen_ai.request.frequency_penalty":G.frequencyPenalty,"gen_ai.request.max_tokens":G.maxOutputTokens,"gen_ai.request.presence_penalty":G.presencePenalty,"gen_ai.request.stop_sequences":G.stopSequences,"gen_ai.request.temperature":G.temperature,"gen_ai.request.top_k":G.topK,"gen_ai.request.top_p":G.topP}}),tracer:Z,endWhenDone:!1,fn:async e=>({startTimestampMs:b(),doStreamSpan:e,result:await P.doStream({...G,tools:D,toolChoice:j,responseFormat:null==v?void 0:v.responseFormat,prompt:L,providerOptions:g,abortSignal:i,headers:n,includeRawChunks:T})})}))),Y=function({tools:e,generatorStream:t,tracer:n,telemetry:r,system:a,messages:s,abortSignal:i,repairToolCall:o,experimental_context:l}){let c=null;const u=new ReadableStream({start(e){c=e}}),p=new Set,d=new Map;let m,h=!1;function f(){h&&0===p.size&&(null!=m&&c.enqueue(m),c.close())}const v=new TransformStream({async transform(t,u){const h=t.type;switch(h){case"stream-start":case"text-start":case"text-delta":case"text-end":case"reasoning-start":case"reasoning-delta":case"reasoning-end":case"tool-input-start":case"tool-input-delta":case"tool-input-end":case"source":case"response-metadata":case"error":case"raw":u.enqueue(t);break;case"file":u.enqueue({type:"file",file:new Xa({data:t.data,mediaType:t.mediaType})});break;case"finish":m={type:"finish",finishReason:t.finishReason,usage:t.usage,providerMetadata:t.providerMetadata};break;case"tool-call":try{const m=await async function({toolCall:e,tools:t,repairToolCall:n,system:r,messages:a}){try{if(null==t)throw new Yr({toolName:e.toolName});try{return await Ja({toolCall:e,tools:t})}catch(s){if(null==n||!Yr.isInstance(s)&&!Or.isInstance(s))throw s;let i=null;try{i=await n({toolCall:e,tools:t,inputSchema:({toolName:e})=>{const{inputSchema:n}=t[e];return At(n).jsonSchema},system:r,messages:a,error:s})}catch(e){throw new Hr({cause:e,originalError:s})}if(null==i)throw s;return await Ja({toolCall:i,tools:t})}}catch(t){const n=await Ke({text:e.input}),r=n.success?n.value:e.input;return{type:"tool-call",toolCallId:e.toolCallId,toolName:e.toolName,input:r,dynamic:!0,invalid:!0,error:t}}}({toolCall:t,tools:e,repairToolCall:o,system:a,messages:s});if(u.enqueue(m),m.invalid){c.enqueue({type:"tool-error",toolCallId:m.toolCallId,toolName:m.toolName,input:m.input,error:Be(m.error),dynamic:!0});break}const h=e[m.toolName];if(d.set(m.toolCallId,m.input),null!=h.onInputAvailable&&await h.onInputAvailable({input:m.input,toolCallId:m.toolCallId,messages:s,abortSignal:i,experimental_context:l}),null!=h.execute&&!0!==m.providerExecuted){const e=qe();p.add(e),Ua({name:"ai.toolCall",attributes:za({telemetry:r,attributes:{...Fa({operationId:"ai.toolCall",telemetry:r}),"ai.toolCall.name":m.toolName,"ai.toolCall.id":m.toolCallId,"ai.toolCall.args":{output:()=>JSON.stringify(m.input)}}}),tracer:n,fn:async t=>{let n;try{const e=async function*({execute:e,input:t,options:n}){const r=e(t,n);if(null!=(a=r)&&"function"==typeof a[Symbol.asyncIterator]){let e;for await(const t of r)e=t,yield{type:"preliminary",output:t};yield{type:"final",output:e}}else yield{type:"final",output:await r};var a}({execute:h.execute.bind(h),input:m.input,options:{toolCallId:m.toolCallId,messages:s,abortSignal:i,experimental_context:l}});for await(const t of e)c.enqueue({...m,type:"tool-result",output:t.output,..."preliminary"===t.type&&{preliminary:!0}}),"final"===t.type&&(n=t.output)}catch(n){return Ya(t,n),c.enqueue({...m,type:"tool-error",error:n}),p.delete(e),void f()}p.delete(e),f();try{t.setAttributes(za({telemetry:r,attributes:{"ai.toolCall.result":{output:()=>JSON.stringify(n)}}}))}catch(e){}}})}}catch(e){c.enqueue({type:"error",error:e})}break;case"tool-result":{const e=t.toolName;t.isError?c.enqueue({type:"tool-error",toolCallId:t.toolCallId,toolName:e,input:d.get(t.toolCallId),providerExecuted:t.providerExecuted,error:t.result}):u.enqueue({type:"tool-result",toolCallId:t.toolCallId,toolName:e,input:d.get(t.toolCallId),output:t.result,providerExecuted:t.providerExecuted});break}default:throw new Error(`Unhandled chunk type: ${h}`)}},flush(){h=!0,f()}});return new ReadableStream({start:async e=>Promise.all([t.pipeThrough(v).pipeTo(new WritableStream({write(t){e.enqueue(t)},close(){}})),u.pipeTo(new WritableStream({write(t){e.enqueue(t)},close(){e.close()}}))])})}({tools:u,generatorStream:F,tracer:Z,telemetry:t,system:o,messages:C,repairToolCall:h,abortSignal:i,experimental_context:N}),K=null!=q?q:{},X=[],J=[];let Q;const ee={};let te,ne="unknown",re={inputTokens:void 0,outputTokens:void 0,totalTokens:void 0},ae=!0,se={id:S(),timestamp:E(),modelId:e.modelId},ie="";H.addStream(Y.pipeThrough(new TransformStream({async transform(e,t){var n,r,a,s;if("stream-start"===e.type)return void(Q=e.warnings);if(ae){const e=b()-U;ae=!1,B.addEvent("ai.stream.firstChunk",{"ai.response.msToFirstChunk":e}),B.setAttributes({"ai.response.msToFirstChunk":e}),t.enqueue({type:"start-step",request:K,warnings:null!=Q?Q:[]})}const o=e.type;switch(o){case"text-start":case"text-end":case"reasoning-start":case"reasoning-end":case"file":case"source":t.enqueue(e);break;case"text-delta":e.delta.length>0&&(t.enqueue({type:"text-delta",id:e.id,text:e.delta,providerMetadata:e.providerMetadata}),ie+=e.delta);break;case"reasoning-delta":t.enqueue({type:"reasoning-delta",id:e.id,text:e.delta,providerMetadata:e.providerMetadata});break;case"tool-call":t.enqueue(e),X.push(e);break;case"tool-result":t.enqueue(e),e.preliminary||J.push(e);break;case"tool-error":t.enqueue(e),J.push(e);break;case"response-metadata":se={id:null!=(n=e.id)?n:se.id,timestamp:null!=(r=e.timestamp)?r:se.timestamp,modelId:null!=(a=e.modelId)?a:se.modelId};break;case"finish":{re=e.usage,ne=e.finishReason,te=e.providerMetadata;const t=b()-U;B.addEvent("ai.stream.finish"),B.setAttributes({"ai.response.msToFinish":t,"ai.response.avgOutputTokensPerSecond":1e3*(null!=(s=re.outputTokens)?s:0)/t});break}case"tool-input-start":{ee[e.id]=e.toolName;const n=null==u?void 0:u[e.toolName];null!=(null==n?void 0:n.onInputStart)&&await n.onInputStart({toolCallId:e.id,messages:C,abortSignal:i,experimental_context:N}),t.enqueue({...e,dynamic:"dynamic"===(null==n?void 0:n.type)});break}case"tool-input-end":delete ee[e.id],t.enqueue(e);break;case"tool-input-delta":{const n=ee[e.id],r=null==u?void 0:u[n];null!=(null==r?void 0:r.onInputDelta)&&await r.onInputDelta({inputTextDelta:e.delta,toolCallId:e.id,messages:C,abortSignal:i,experimental_context:N}),t.enqueue(e);break}case"error":t.enqueue(e),ne="error";break;case"raw":T&&t.enqueue(e);break;default:throw new Error(`Unknown chunk type: ${o}`)}},async flush(e){const n=X.length>0?JSON.stringify(X):void 0;try{B.setAttributes(za({telemetry:t,attributes:{"ai.response.finishReason":ne,"ai.response.text":{output:()=>ie},"ai.response.toolCalls":{output:()=>n},"ai.response.id":se.id,"ai.response.model":se.modelId,"ai.response.timestamp":se.timestamp.toISOString(),"ai.response.providerMetadata":JSON.stringify(te),"ai.usage.inputTokens":re.inputTokens,"ai.usage.outputTokens":re.outputTokens,"ai.usage.totalTokens":re.totalTokens,"ai.usage.reasoningTokens":re.reasoningTokens,"ai.usage.cachedInputTokens":re.cachedInputTokens,"gen_ai.response.finish_reasons":[ne],"gen_ai.response.id":se.id,"gen_ai.response.model":se.modelId,"gen_ai.usage.input_tokens":re.inputTokens,"gen_ai.usage.output_tokens":re.outputTokens}}))}catch(e){}finally{B.end()}e.enqueue({type:"finish-step",finishReason:ne,usage:re,providerMetadata:te,response:{...se,headers:null==V?void 0:V.headers}});const r=(o=re,{inputTokens:Za((i=$).inputTokens,o.inputTokens),outputTokens:Za(i.outputTokens,o.outputTokens),totalTokens:Za(i.totalTokens,o.totalTokens),reasoningTokens:Za(i.reasoningTokens,o.reasoningTokens),cachedInputTokens:Za(i.cachedInputTokens,o.cachedInputTokens)});var i,o;await I.promise;const l=X.filter((e=>!0!==e.providerExecuted)),c=J.filter((e=>!0!==e.providerExecuted));if(l.length>0&&c.length===l.length&&!await async function({stopConditions:e,steps:t}){return(await Promise.all(e.map((e=>e({steps:t}))))).some((e=>e))}({stopConditions:f,steps:M})){d.push(...rs({content:M[M.length-1].content,tools:u}));try{await a({currentStep:s+1,responseMessages:d,usage:r})}catch(t){e.enqueue({type:"error",error:t}),H.closeStream()}}else e.enqueue({type:"finish",finishReason:ne,totalUsage:r}),H.closeStream()}})))}({currentStep:0,responseMessages:[],usage:{inputTokens:void 0,outputTokens:void 0,totalTokens:void 0}})}}).catch((e=>{H.addStream(new ReadableStream({start(t){t.enqueue({type:"error",error:e}),t.close()}})),H.closeStream()}))}get steps(){return this.consumeStream(),this._steps.promise}get finalStep(){return this.steps.then((e=>e[e.length-1]))}get content(){return this.finalStep.then((e=>e.content))}get warnings(){return this.finalStep.then((e=>e.warnings))}get providerMetadata(){return this.finalStep.then((e=>e.providerMetadata))}get text(){return this.finalStep.then((e=>e.text))}get reasoningText(){return this.finalStep.then((e=>e.reasoningText))}get reasoning(){return this.finalStep.then((e=>e.reasoning))}get sources(){return this.finalStep.then((e=>e.sources))}get files(){return this.finalStep.then((e=>e.files))}get toolCalls(){return this.finalStep.then((e=>e.toolCalls))}get staticToolCalls(){return this.finalStep.then((e=>e.staticToolCalls))}get dynamicToolCalls(){return this.finalStep.then((e=>e.dynamicToolCalls))}get toolResults(){return this.finalStep.then((e=>e.toolResults))}get staticToolResults(){return this.finalStep.then((e=>e.staticToolResults))}get dynamicToolResults(){return this.finalStep.then((e=>e.dynamicToolResults))}get usage(){return this.finalStep.then((e=>e.usage))}get request(){return this.finalStep.then((e=>e.request))}get response(){return this.finalStep.then((e=>e.response))}get totalUsage(){return this.consumeStream(),this._totalUsage.promise}get finishReason(){return this.consumeStream(),this._finishReason.promise}teeStream(){const[e,t]=this.baseStream.tee();return this.baseStream=t,e}get textStream(){return gs(this.teeStream().pipeThrough(new TransformStream({transform({part:e},t){"text-delta"===e.type&&t.enqueue(e.text)}})))}get fullStream(){return gs(this.teeStream().pipeThrough(new TransformStream({transform({part:e},t){t.enqueue(e)}})))}async consumeStream(e){var t;try{await ys({stream:this.fullStream,onError:null==e?void 0:e.onError})}catch(n){null==(t=null==e?void 0:e.onError)||t.call(e,n)}}get experimental_partialOutputStream(){if(null==this.output)throw new vr;return gs(this.teeStream().pipeThrough(new TransformStream({transform({partialOutput:e},t){null!=e&&t.enqueue(e)}})))}toUIMessageStream({originalMessages:e,generateMessageId:t,onFinish:n,messageMetadata:a,sendReasoning:s=!0,sendSources:i=!1,sendStart:o=!0,sendFinish:l=!0,onError:c=r.u1}={}){const u=null!=t?function({originalMessages:e,responseMessageId:t}){if(null==e)return;const n=e[e.length-1];return"assistant"===(null==n?void 0:n.role)?n.id:"function"==typeof t?t():t}({originalMessages:e,responseMessageId:t}):void 0,p={},d=e=>{var t,n;const r=p[e];return!("dynamic"!==(null==(n=null==(t=this.tools)?void 0:t[r])?void 0:n.type))||void 0};return gs(function({messageId:e,originalMessages:t=[],onFinish:n,onError:r,stream:a}){let s=null==t?void 0:t[t.length-1];"assistant"!==(null==s?void 0:s.role)?s=void 0:e=s.id;let i=!1;const o=a.pipeThrough(new TransformStream({transform(t,n){if("start"===t.type){const n=t;null==n.messageId&&null!=e&&(n.messageId=e)}"abort"===t.type&&(i=!0),n.enqueue(t)}}));if(null==n)return o;const l=fs({lastMessage:s?structuredClone(s):void 0,messageId:null!=e?e:""});let c=!1;const u=async()=>{if(c||!n)return;c=!0;const e=l.message.id===(null==s?void 0:s.id);await n({isAborted:i,isContinuation:e,responseMessage:l.message,messages:[...e?t.slice(0,-1):t,l.message]})};return vs({stream:o,runUpdateMessageJob:async e=>{await e({state:l,write:()=>{}})},onError:r}).pipeThrough(new TransformStream({transform(e,t){t.enqueue(e)},async cancel(){await u()},async flush(){await u()}}))}({stream:this.fullStream.pipeThrough(new TransformStream({transform:async(e,t)=>{const n=null==a?void 0:a({part:e}),r=e.type;switch(r){case"text-start":t.enqueue({type:"text-start",id:e.id,...null!=e.providerMetadata?{providerMetadata:e.providerMetadata}:{}});break;case"text-delta":t.enqueue({type:"text-delta",id:e.id,delta:e.text,...null!=e.providerMetadata?{providerMetadata:e.providerMetadata}:{}});break;case"text-end":t.enqueue({type:"text-end",id:e.id,...null!=e.providerMetadata?{providerMetadata:e.providerMetadata}:{}});break;case"reasoning-start":t.enqueue({type:"reasoning-start",id:e.id,...null!=e.providerMetadata?{providerMetadata:e.providerMetadata}:{}});break;case"reasoning-delta":s&&t.enqueue({type:"reasoning-delta",id:e.id,delta:e.text,...null!=e.providerMetadata?{providerMetadata:e.providerMetadata}:{}});break;case"reasoning-end":t.enqueue({type:"reasoning-end",id:e.id,...null!=e.providerMetadata?{providerMetadata:e.providerMetadata}:{}});break;case"file":t.enqueue({type:"file",mediaType:e.file.mediaType,url:`data:${e.file.mediaType};base64,${e.file.base64}`});break;case"source":i&&"url"===e.sourceType&&t.enqueue({type:"source-url",sourceId:e.id,url:e.url,title:e.title,...null!=e.providerMetadata?{providerMetadata:e.providerMetadata}:{}}),i&&"document"===e.sourceType&&t.enqueue({type:"source-document",sourceId:e.id,mediaType:e.mediaType,title:e.title,filename:e.filename,...null!=e.providerMetadata?{providerMetadata:e.providerMetadata}:{}});break;case"tool-input-start":{p[e.id]=e.toolName;const n=d(e.id);t.enqueue({type:"tool-input-start",toolCallId:e.id,toolName:e.toolName,...null!=e.providerExecuted?{providerExecuted:e.providerExecuted}:{},...null!=n?{dynamic:n}:{}});break}case"tool-input-delta":t.enqueue({type:"tool-input-delta",toolCallId:e.id,inputTextDelta:e.delta});break;case"tool-call":{p[e.toolCallId]=e.toolName;const n=d(e.toolCallId);e.invalid?t.enqueue({type:"tool-input-error",toolCallId:e.toolCallId,toolName:e.toolName,input:e.input,...null!=e.providerExecuted?{providerExecuted:e.providerExecuted}:{},...null!=e.providerMetadata?{providerMetadata:e.providerMetadata}:{},...null!=n?{dynamic:n}:{},errorText:c(e.error)}):t.enqueue({type:"tool-input-available",toolCallId:e.toolCallId,toolName:e.toolName,input:e.input,...null!=e.providerExecuted?{providerExecuted:e.providerExecuted}:{},...null!=e.providerMetadata?{providerMetadata:e.providerMetadata}:{},...null!=n?{dynamic:n}:{}});break}case"tool-result":{const n=d(e.toolCallId);t.enqueue({type:"tool-output-available",toolCallId:e.toolCallId,output:e.output,...null!=e.providerExecuted?{providerExecuted:e.providerExecuted}:{},...null!=e.preliminary?{preliminary:e.preliminary}:{},...null!=n?{dynamic:n}:{}});break}case"tool-error":{const n=d(e.toolCallId);t.enqueue({type:"tool-output-error",toolCallId:e.toolCallId,errorText:c(e.error),...null!=e.providerExecuted?{providerExecuted:e.providerExecuted}:{},...null!=n?{dynamic:n}:{}});break}case"error":t.enqueue({type:"error",errorText:c(e.error)});break;case"start-step":t.enqueue({type:"start-step"});break;case"finish-step":t.enqueue({type:"finish-step"});break;case"start":o&&t.enqueue({type:"start",...null!=n?{messageMetadata:n}:{},...null!=u?{messageId:u}:{}});break;case"finish":l&&t.enqueue({type:"finish",...null!=n?{messageMetadata:n}:{}});break;case"abort":t.enqueue(e);break;case"tool-input-end":case"raw":break;default:throw new Error(`Unknown chunk type: ${r}`)}null!=n&&"start"!==r&&"finish"!==r&&t.enqueue({type:"message-metadata",messageMetadata:n})}})),messageId:null!=u?u:null==t?void 0:t(),originalMessages:e,onFinish:n,onError:c}))}pipeUIMessageStreamToResponse(e,{originalMessages:t,generateMessageId:n,onFinish:r,messageMetadata:a,sendReasoning:s,sendSources:i,sendFinish:o,sendStart:l,onError:c,...u}={}){!function({response:e,status:t,statusText:n,headers:r,stream:a,consumeSseStream:s}){let i=a.pipeThrough(new is);if(s){const[e,t]=i.tee();i=e,s({stream:t})}ss({response:e,status:t,statusText:n,headers:Object.fromEntries(as(r,os).entries()),stream:i.pipeThrough(new TextEncoderStream)})}({response:e,stream:this.toUIMessageStream({originalMessages:t,generateMessageId:n,onFinish:r,messageMetadata:a,sendReasoning:s,sendSources:i,sendFinish:o,sendStart:l,onError:c}),...u})}pipeTextStreamToResponse(e,t){!function({response:e,status:t,statusText:n,headers:r,textStream:a}){ss({response:e,status:t,statusText:n,headers:Object.fromEntries(as(r,{"content-type":"text/plain; charset=utf-8"}).entries()),stream:a.pipeThrough(new TextEncoderStream)})}({response:e,textStream:this.textStream,...t})}toUIMessageStreamResponse({originalMessages:e,generateMessageId:t,onFinish:n,messageMetadata:r,sendReasoning:a,sendSources:s,sendFinish:i,sendStart:o,onError:l,...c}={}){return function({status:e,statusText:t,headers:n,stream:r,consumeSseStream:a}){let s=r.pipeThrough(new is);if(a){const[e,t]=s.tee();s=e,a({stream:t})}return new Response(s.pipeThrough(new TextEncoderStream),{status:e,statusText:t,headers:as(n,os)})}({stream:this.toUIMessageStream({originalMessages:e,generateMessageId:t,onFinish:n,messageMetadata:r,sendReasoning:a,sendSources:s,sendFinish:i,sendStart:o,onError:l}),...c})}toTextStreamResponse(e){return function({status:e,statusText:t,headers:n,textStream:r}){return new Response(r.pipeThrough(new TextEncoderStream),{status:null!=e?e:200,statusText:t,headers:as(n,{"content-type":"text/plain; charset=utf-8"})})}({textStream:this.textStream,...e})}};Ve({prefix:"aiobj",size:24});var xs=class{constructor(){this.queue=[],this.isProcessing=!1}async processQueue(){if(!this.isProcessing){for(this.isProcessing=!0;this.queue.length>0;)await this.queue[0](),this.queue.shift();this.isProcessing=!1}}async run(e){return new Promise(((t,n)=>{this.queue.push((async()=>{try{await e(),t()}catch(e){n(e)}})),this.processQueue()}))}};Ve({prefix:"aiobj",size:24}),r.bD,((e,t)=>{for(var n in t)dr(e,n,{get:t[n],enumerable:!0})})({},{object:()=>Os,text:()=>ws});var ws=()=>({type:"text",responseFormat:{type:"text"},parsePartial:async({text:e})=>({partial:e}),parseOutput:async({text:e})=>e}),Os=({schema:e})=>{const t=At(e);return{type:"object",responseFormat:{type:"json",schema:t.jsonSchema},async parsePartial({text:e}){const t=await ps(e);switch(t.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":return{partial:t.value};default:{const e=t.state;throw new Error(`Unsupported parse state: ${e}`)}}},async parseOutput({text:e},n){const r=await Ke({text:e});if(!r.success)throw new Lr({message:"No object generated: could not parse the response.",cause:r.error,text:e,response:n.response,usage:n.usage,finishReason:n.finishReason});const a=await He({value:r.value,schema:t});if(!a.success)throw new Lr({message:"No object generated: response did not match schema.",cause:a.error,text:e,response:n.response,usage:n.usage,finishReason:n.finishReason});return a.value}}},Ns=Symbol.for("vercel.ai.error.AI_NoSuchProviderError");r.eM;var Is=mn._H({name:mn.Yj(),version:mn.Yj()}),Ts=mn._H({_meta:mn.lq(mn.Ik({}).loose())}),Rs=Ts,Cs=mn.Ik({method:mn.Yj(),params:mn.lq(Ts)}),ks=mn._H({experimental:mn.lq(mn.Ik({}).loose()),logging:mn.lq(mn.Ik({}).loose()),prompts:mn.lq(mn._H({listChanged:mn.lq(mn.zM())})),resources:mn.lq(mn._H({subscribe:mn.lq(mn.zM()),listChanged:mn.lq(mn.zM())})),tools:mn.lq(mn._H({listChanged:mn.lq(mn.zM())}))}),Ls=(Rs.extend({protocolVersion:mn.Yj(),capabilities:ks,serverInfo:Is,instructions:mn.lq(mn.Yj())}),Rs.extend({nextCursor:mn.lq(mn.Yj())})),Ps=mn.Ik({name:mn.Yj(),description:mn.lq(mn.Yj()),inputSchema:mn.Ik({type:mn.eu("object"),properties:mn.lq(mn.Ik({}).loose())}).loose()}).loose(),Ms=(Ls.extend({tools:mn.YO(Ps)}),mn.Ik({type:mn.eu("text"),text:mn.Yj()}).loose()),js=mn.Ik({type:mn.eu("image"),data:mn.K3(),mimeType:mn.Yj()}).loose(),Ds=mn.Ik({uri:mn.Yj(),mimeType:mn.lq(mn.Yj())}).loose(),Fs=Ds.extend({text:mn.Yj()}),Vs=Ds.extend({blob:mn.K3()}),qs=mn.Ik({type:mn.eu("resource"),resource:mn.KC([Fs,Vs])}).loose(),Bs=(Rs.extend({content:mn.YO(mn.KC([Ms,js,qs])),isError:mn.zM().default(!1).optional()}).or(Rs.extend({toolResult:mn.L5()})),"2.0"),Us=mn.Ik({jsonrpc:mn.eu(Bs),id:mn.KC([mn.Yj(),mn.ai().int()])}).merge(Cs).strict(),Ys=mn.Ik({jsonrpc:mn.eu(Bs),id:mn.KC([mn.Yj(),mn.ai().int()]),result:Rs}).strict(),zs=mn.Ik({jsonrpc:mn.eu(Bs),id:mn.KC([mn.Yj(),mn.ai().int()]),error:mn.Ik({code:mn.ai().int(),message:mn.Yj(),data:mn.lq(mn.L5())})}).strict(),Zs=mn.Ik({jsonrpc:mn.eu(Bs)}).merge(mn.Ik({method:mn.Yj(),params:mn.lq(Ts)})).strict();mn.KC([Us,Zs,Ys,zs]),r.bD;var Gs=class{constructor({api:e="/api/chat",credentials:t,headers:n,body:r,fetch:a,prepareSendMessagesRequest:s,prepareReconnectToStreamRequest:i}){this.api=e,this.credentials=t,this.headers=n,this.body=r,this.fetch=a,this.prepareSendMessagesRequest=s,this.prepareReconnectToStreamRequest=i}async sendMessages({abortSignal:e,...t}){var n,r,a,s,i;const o=await Xe(this.body),l=await Xe(this.headers),c=await Xe(this.credentials),u=await(null==(n=this.prepareSendMessagesRequest)?void 0:n.call(this,{api:this.api,id:t.chatId,messages:t.messages,body:{...o,...t.body},headers:{...l,...t.headers},credentials:c,requestMetadata:t.metadata,trigger:t.trigger,messageId:t.messageId})),p=null!=(r=null==u?void 0:u.api)?r:this.api,d=void 0!==(null==u?void 0:u.headers)?u.headers:{...l,...t.headers},m=void 0!==(null==u?void 0:u.body)?u.body:{...o,...t.body,id:t.chatId,messages:t.messages,trigger:t.trigger,messageId:t.messageId},h=null!=(a=null==u?void 0:u.credentials)?a:c,f=null!=(s=this.fetch)?s:globalThis.fetch,v=await f(p,{method:"POST",headers:{"Content-Type":"application/json",...d},body:JSON.stringify(m),credentials:h,signal:e});if(!v.ok)throw new Error(null!=(i=await v.text())?i:"Failed to fetch the chat response.");if(!v.body)throw new Error("The response body is empty.");return this.processResponseStream(v.body)}async reconnectToStream(e){var t,n,r,a,s;const i=await Xe(this.body),o=await Xe(this.headers),l=await Xe(this.credentials),c=await(null==(t=this.prepareReconnectToStreamRequest)?void 0:t.call(this,{api:this.api,id:e.chatId,body:{...i,...e.body},headers:{...o,...e.headers},credentials:l,requestMetadata:e.metadata})),u=null!=(n=null==c?void 0:c.api)?n:`${this.api}/${e.chatId}/stream`,p=void 0!==(null==c?void 0:c.headers)?c.headers:{...o,...e.headers},d=null!=(r=null==c?void 0:c.credentials)?r:l,m=null!=(a=this.fetch)?a:globalThis.fetch,h=await m(u,{method:"GET",headers:p,credentials:d});if(204===h.status)return null;if(!h.ok)throw new Error(null!=(s=await h.text())?s:"Failed to fetch the chat response.");if(!h.body)throw new Error("The response body is empty.");return this.processResponseStream(h.body)}},Ws=class extends Gs{constructor(e={}){super(e)}processResponseStream(e){return function({stream:e,schema:t}){return e.pipeThrough(new TextDecoderStream).pipeThrough(new a.Z).pipeThrough(new TransformStream({async transform({data:e},n){"[DONE]"!==e&&n.enqueue(await Ke({text:e,schema:t}))}}))}({stream:e,schema:ls}).pipeThrough(new TransformStream({async transform(e,t){if(!e.success)throw e.error;t.enqueue(e.value)}}))}},Hs=class{constructor({generateId:e=qe,id:t=e(),transport:n=new Ws,messageMetadataSchema:r,dataPartSchemas:a,state:s,onError:i,onToolCall:o,onFinish:l,onData:c,sendAutomaticallyWhen:u}){this.activeResponse=void 0,this.jobExecutor=new xs,this.sendMessage=async(e,t)=>{var n,r,a,s;if(null==e)return void await this.makeRequest({trigger:"submit-message",messageId:null==(n=this.lastMessage)?void 0:n.id,...t});let i;if("text"in e||"files"in e){const t=Array.isArray(e.files)?e.files:await async function(e){if(null==e)return[];if(!(globalThis.FileList&&e instanceof globalThis.FileList))throw new Error("FileList is not supported in the current environment");return Promise.all(Array.from(e).map((async e=>{const{name:t,type:n}=e;return{type:"file",mediaType:n,filename:t,url:await new Promise(((t,n)=>{const r=new FileReader;r.onload=e=>{var n;t(null==(n=e.target)?void 0:n.result)},r.onerror=e=>n(e),r.readAsDataURL(e)}))}})))}(e.files);i={parts:[...t,..."text"in e&&null!=e.text?[{type:"text",text:e.text}]:[]]}}else i=e;if(null!=e.messageId){const t=this.state.messages.findIndex((t=>t.id===e.messageId));if(-1===t)throw new Error(`message with id ${e.messageId} not found`);if("user"!==this.state.messages[t].role)throw new Error(`message with id ${e.messageId} is not a user message`);this.state.messages=this.state.messages.slice(0,t+1),this.state.replaceMessage(t,{...i,id:e.messageId,role:null!=(r=i.role)?r:"user",metadata:e.metadata})}else this.state.pushMessage({...i,id:null!=(a=i.id)?a:this.generateId(),role:null!=(s=i.role)?s:"user",metadata:e.metadata});await this.makeRequest({trigger:"submit-message",messageId:e.messageId,...t})},this.regenerate=async({messageId:e,...t}={})=>{const n=null==e?this.state.messages.length-1:this.state.messages.findIndex((t=>t.id===e));if(-1===n)throw new Error(`message ${e} not found`);this.state.messages=this.state.messages.slice(0,"assistant"===this.messages[n].role?n:n+1),await this.makeRequest({trigger:"regenerate-message",messageId:e,...t})},this.resumeStream=async(e={})=>{await this.makeRequest({trigger:"resume-stream",...e})},this.clearError=()=>{"error"===this.status&&(this.state.error=void 0,this.setStatus({status:"ready"}))},this.addToolResult=async({tool:e,toolCallId:t,output:n})=>this.jobExecutor.run((async()=>{var e,r;const a=this.state.messages,s=a[a.length-1];this.state.replaceMessage(a.length-1,{...s,parts:s.parts.map((e=>ms(e)&&e.toolCallId===t?{...e,state:"output-available",output:n}:e))}),this.activeResponse&&(this.activeResponse.state.message.parts=this.activeResponse.state.message.parts.map((e=>ms(e)&&e.toolCallId===t?{...e,state:"output-available",output:n,errorText:void 0}:e))),"streaming"!==this.status&&"submitted"!==this.status&&(null==(e=this.sendAutomaticallyWhen)?void 0:e.call(this,{messages:this.state.messages}))&&this.makeRequest({trigger:"submit-message",messageId:null==(r=this.lastMessage)?void 0:r.id})})),this.stop=async()=>{var e;"streaming"!==this.status&&"submitted"!==this.status||(null==(e=this.activeResponse)?void 0:e.abortController)&&this.activeResponse.abortController.abort()},this.id=t,this.transport=n,this.generateId=e,this.messageMetadataSchema=r,this.dataPartSchemas=a,this.state=s,this.onError=i,this.onToolCall=o,this.onFinish=l,this.onData=c,this.sendAutomaticallyWhen=u}get status(){return this.state.status}setStatus({status:e,error:t}){this.status!==e&&(this.state.status=e,this.state.error=t)}get error(){return this.state.error}get messages(){return this.state.messages}get lastMessage(){return this.state.messages[this.state.messages.length-1]}set messages(e){this.state.messages=e}async makeRequest({trigger:e,metadata:t,headers:n,body:r,messageId:a}){var s,i,o;this.setStatus({status:"submitted",error:void 0});const l=this.lastMessage;try{const i={state:fs({lastMessage:this.state.snapshot(l),messageId:this.generateId()}),abortController:new AbortController};let o;if(this.activeResponse=i,"resume-stream"===e){const e=await this.transport.reconnectToStream({chatId:this.id,metadata:t,headers:n,body:r});if(null==e)return void this.setStatus({status:"ready"});o=e}else o=await this.transport.sendMessages({chatId:this.id,messages:this.state.messages,abortSignal:i.abortController.signal,metadata:t,headers:n,body:r,trigger:e,messageId:a});const c=e=>this.jobExecutor.run((()=>e({state:i.state,write:()=>{var e;this.setStatus({status:"streaming"}),i.state.message.id===(null==(e=this.lastMessage)?void 0:e.id)?this.state.replaceMessage(this.state.messages.length-1,i.state.message):this.state.pushMessage(i.state.message)}})));await ys({stream:vs({stream:o,onToolCall:this.onToolCall,onData:this.onData,messageMetadataSchema:this.messageMetadataSchema,dataPartSchemas:this.dataPartSchemas,runUpdateMessageJob:c,onError:e=>{throw e}}),onError:e=>{throw e}}),null==(s=this.onFinish)||s.call(this,{message:i.state.message,messages:this.state.messages}),this.setStatus({status:"ready"})}catch(e){if("AbortError"===e.name)return this.setStatus({status:"ready"}),null;this.onError&&e instanceof Error&&this.onError(e),this.setStatus({status:"error",error:e})}finally{this.activeResponse=void 0}(null==(i=this.sendAutomaticallyWhen)?void 0:i.call(this,{messages:this.state.messages}))&&await this.makeRequest({trigger:"submit-message",messageId:null==(o=this.lastMessage)?void 0:o.id,metadata:t,headers:n,body:r})}};function Ks(e,t){const n=[];(null==t?void 0:t.ignoreIncompleteToolCalls)&&(e=e.map((e=>({...e,parts:e.parts.filter((e=>!ms(e)||"input-streaming"!==e.state&&"input-available"!==e.state))}))));for(const r of e)switch(r.role){case"system":{const e=r.parts.filter((e=>"text"===e.type)),t=e.reduce(((e,t)=>null!=t.providerMetadata?{...e,...t.providerMetadata}:e),{});n.push({role:"system",content:e.map((e=>e.text)).join(""),...Object.keys(t).length>0?{providerOptions:t}:{}});break}case"user":n.push({role:"user",content:r.parts.filter((e=>"text"===e.type||"file"===e.type)).map((e=>{switch(e.type){case"text":return{type:"text",text:e.text,...null!=e.providerMetadata?{providerOptions:e.providerMetadata}:{}};case"file":return{type:"file",mediaType:e.mediaType,filename:e.filename,data:e.url,...null!=e.providerMetadata?{providerOptions:e.providerMetadata}:{}};default:return e}}))});break;case"assistant":if(null!=r.parts){let e=function(){var e,r;if(0===a.length)return;const s=[];for(const n of a)if("text"===n.type)s.push({type:"text",text:n.text,...null!=n.providerMetadata?{providerOptions:n.providerMetadata}:{}});else if("file"===n.type)s.push({type:"file",mediaType:n.mediaType,filename:n.filename,data:n.url});else if("reasoning"===n.type)s.push({type:"reasoning",text:n.text,providerOptions:n.providerMetadata});else if("dynamic-tool"===n.type){const e=n.toolName;"input-streaming"!==n.state&&s.push({type:"tool-call",toolCallId:n.toolCallId,toolName:e,input:n.input,...null!=n.callProviderMetadata?{providerOptions:n.callProviderMetadata}:{}})}else{if(!ds(n))throw new Error(`Unsupported part: ${n}`);{const a=hs(n);"input-streaming"!==n.state&&(s.push({type:"tool-call",toolCallId:n.toolCallId,toolName:a,input:"output-error"===n.state?null!=(e=n.input)?e:n.rawInput:n.input,providerExecuted:n.providerExecuted,...null!=n.callProviderMetadata?{providerOptions:n.callProviderMetadata}:{}}),!0!==n.providerExecuted||"output-available"!==n.state&&"output-error"!==n.state||s.push({type:"tool-result",toolCallId:n.toolCallId,toolName:a,output:ts({output:"output-error"===n.state?n.errorText:n.output,tool:null==(r=null==t?void 0:t.tools)?void 0:r[a],errorMode:"output-error"===n.state?"json":"none"})}))}}n.push({role:"assistant",content:s});const i=a.filter((e=>ds(e)&&!0!==e.providerExecuted||"dynamic-tool"===e.type));i.length>0&&n.push({role:"tool",content:i.map((e=>{var n;switch(e.state){case"output-error":case"output-available":{const r="dynamic-tool"===e.type?e.toolName:hs(e);return{type:"tool-result",toolCallId:e.toolCallId,toolName:r,output:ts({output:"output-error"===e.state?e.errorText:e.output,tool:null==(n=null==t?void 0:t.tools)?void 0:n[r],errorMode:"output-error"===e.state?"text":"none"})}}default:return null}})).filter((e=>null!=e))}),a=[]},a=[];for(const t of r.parts)"text"===t.type||"reasoning"===t.type||"file"===t.type||"dynamic-tool"===t.type||ds(t)?a.push(t):"step-start"===t.type&&e();e();break}break;default:{const e=r.role;throw new oa({originalMessage:r,message:`Unsupported role: ${e}`})}}return n}var Xs=mn.Ik({type:mn.eu("text"),text:mn.Yj(),state:mn.k5(["streaming","done"]).optional(),providerMetadata:wa.optional()}),Js=mn.Ik({type:mn.eu("reasoning"),text:mn.Yj(),state:mn.k5(["streaming","done"]).optional(),providerMetadata:wa.optional()}),Qs=mn.Ik({type:mn.eu("source-url"),sourceId:mn.Yj(),url:mn.Yj(),title:mn.Yj().optional(),providerMetadata:wa.optional()}),ei=mn.Ik({type:mn.eu("source-document"),sourceId:mn.Yj(),mediaType:mn.Yj(),title:mn.Yj(),filename:mn.Yj().optional(),providerMetadata:wa.optional()}),ti=mn.Ik({type:mn.eu("file"),mediaType:mn.Yj(),filename:mn.Yj().optional(),url:mn.Yj(),providerMetadata:wa.optional()}),ni=mn.Ik({type:mn.eu("step-start")}),ri=mn.Ik({type:mn.Yj().startsWith("data-"),id:mn.Yj().optional(),data:mn.L5()}),ai=[mn.Ik({type:mn.eu("dynamic-tool"),toolName:mn.Yj(),toolCallId:mn.Yj(),state:mn.eu("input-streaming"),input:mn.L5().optional(),output:mn.Zm().optional(),errorText:mn.Zm().optional()}),mn.Ik({type:mn.eu("dynamic-tool"),toolName:mn.Yj(),toolCallId:mn.Yj(),state:mn.eu("input-available"),input:mn.L5(),output:mn.Zm().optional(),errorText:mn.Zm().optional(),callProviderMetadata:wa.optional()}),mn.Ik({type:mn.eu("dynamic-tool"),toolName:mn.Yj(),toolCallId:mn.Yj(),state:mn.eu("output-available"),input:mn.L5(),output:mn.L5(),errorText:mn.Zm().optional(),callProviderMetadata:wa.optional(),preliminary:mn.zM().optional()}),mn.Ik({type:mn.eu("dynamic-tool"),toolName:mn.Yj(),toolCallId:mn.Yj(),state:mn.eu("output-error"),input:mn.L5(),output:mn.Zm().optional(),errorText:mn.Yj(),callProviderMetadata:wa.optional()})],si=[mn.Ik({type:mn.Yj().startsWith("tool-"),toolCallId:mn.Yj(),state:mn.eu("input-streaming"),input:mn.L5().optional(),output:mn.Zm().optional(),errorText:mn.Zm().optional()}),mn.Ik({type:mn.Yj().startsWith("tool-"),toolCallId:mn.Yj(),state:mn.eu("input-available"),input:mn.L5(),output:mn.Zm().optional(),errorText:mn.Zm().optional(),callProviderMetadata:wa.optional()}),mn.Ik({type:mn.Yj().startsWith("tool-"),toolCallId:mn.Yj(),state:mn.eu("output-available"),input:mn.L5(),output:mn.L5(),errorText:mn.Zm().optional(),callProviderMetadata:wa.optional(),preliminary:mn.zM().optional()}),mn.Ik({type:mn.Yj().startsWith("tool-"),toolCallId:mn.Yj(),state:mn.eu("output-error"),input:mn.L5(),output:mn.Zm().optional(),errorText:mn.Yj(),callProviderMetadata:wa.optional()})];mn.Ik({id:mn.Yj(),role:mn.k5(["system","user","assistant"]),metadata:mn.L5().optional(),parts:mn.YO(mn.KC([Xs,Js,Qs,ei,ti,ni,ri,...ai,...si]))})},51699:(e,t,n)=>{const r=n(65684),a=n(47755),s=n(50066),i=n(76393),o=n(38358),l=n(99451),c=n(97660),u=n(18157),p=n(59818),d=n(12815),m=n(4496),h=n(67223),f=n(86543),v=n(32674),g=n(17620),y=n(80321),$=n(9331),b=n(68821),E=n(71595),S=n(18106),A=n(28141),_=n(41755),x=n(97369),w=n(74227),O=n(24078),N=n(98249),I=n(67812),T=n(67094),R=n(72857),C=n(12876),k=n(70449),L=n(92222),P=n(540),M=n(29087),j=n(59984),D=n(99597),F=n(19789),V=n(13012),q=n(11742),B=n(48195),U=n(40194);e.exports={parse:o,valid:l,clean:c,inc:u,diff:p,major:d,minor:m,patch:h,prerelease:f,compare:v,rcompare:g,compareLoose:y,compareBuild:$,sort:b,rsort:E,gt:S,lt:A,eq:_,neq:x,gte:w,lte:O,cmp:N,coerce:I,Comparator:T,Range:R,satisfies:C,toComparators:k,maxSatisfying:L,minSatisfying:P,minVersion:M,validRange:j,outside:D,gtr:F,ltr:V,intersects:q,simplifyRange:B,subset:U,SemVer:s,re:r.re,src:r.src,tokens:r.t,SEMVER_SPEC_VERSION:a.SEMVER_SPEC_VERSION,RELEASE_TYPES:a.RELEASE_TYPES,compareIdentifiers:i.compareIdentifiers,rcompareIdentifiers:i.rcompareIdentifiers}},51778:function(e,t,n){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.VIEW_PIPELINE_UTILS=void 0;const a=r(n(80184)),s="8.0.0",i="8.1.0";t.VIEW_PIPELINE_UTILS={MIN_VERSION_FOR_VIEW_SEARCH_COMPATIBILITY_DE:s,MIN_VERSION_FOR_VIEW_SEARCH_COMPATIBILITY_COMPASS:i,isPipelineSearchQueryable:e=>{for(const t of e){const e=Object.keys(t)[0];if("$addFields"!==e&&"$set"!==e&&"$match"!==e)return!1;if("$match"===e){const e=t.$match,n=Object.keys(e||{});if(1!==n.length||!n.includes("$expr"))return!1}}return!0},isVersionSearchCompatibleForViewsDataExplorer:e=>{try{return a.default.gte(e,s)}catch{return!1}},isVersionSearchCompatibleForViewsCompass:e=>{try{return a.default.gte(e,i)}catch{return!1}}}},52189:(e,t,n)=>{const r=n(33629);e.exports=(e,t)=>new r(e,t).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" ")))},52378:(e,t,n)=>{var r=n(65994).e;const a="object"==typeof r&&r.env&&r.env.NODE_DEBUG&&/\bsemver\b/i.test(r.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};e.exports=a},52539:(e,t,n)=>{const r=n(88825),a=n(98855),{safeRe:s,t:i}=n(36165);e.exports=(e,t)=>{if(e instanceof r)return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;let n=null;if((t=t||{}).rtl){const r=t.includePrerelease?s[i.COERCERTLFULL]:s[i.COERCERTL];let a;for(;(a=r.exec(e))&&(!n||n.index+n[0].length!==e.length);)n&&a.index+a[0].length===n.index+n[0].length||(n=a),r.lastIndex=a.index+a[1].length+a[2].length;r.lastIndex=-1}else n=e.match(t.includePrerelease?s[i.COERCEFULL]:s[i.COERCE]);if(null===n)return null;const o=n[2],l=n[3]||"0",c=n[4]||"0",u=t.includePrerelease&&n[5]?`-${n[5]}`:"",p=t.includePrerelease&&n[6]?`+${n[6]}`:"";return a(`${o}.${l}.${c}${u}${p}`,t)}},52711:(e,t,n)=>{var r;try{r=n(67787).Buffer}catch(e){}var a=n(40811),s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";e.exports=new a("tag:yaml.org,2002:binary",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t,n,r=0,a=e.length,i=s;for(n=0;n<a;n++)if(!((t=i.indexOf(e.charAt(n)))>64)){if(t<0)return!1;r+=6}return r%8==0},construct:function(e){var t,n,a=e.replace(/[\r\n=]/g,""),i=a.length,o=s,l=0,c=[];for(t=0;t<i;t++)t%4==0&&t&&(c.push(l>>16&255),c.push(l>>8&255),c.push(255&l)),l=l<<6|o.indexOf(a.charAt(t));return 0==(n=i%4*6)?(c.push(l>>16&255),c.push(l>>8&255),c.push(255&l)):18===n?(c.push(l>>10&255),c.push(l>>2&255)):12===n&&c.push(l>>4&255),r?r.from?r.from(c):new r(c):c},predicate:function(e){return r&&r.isBuffer(e)},represent:function(e){var t,n,r="",a=0,i=e.length,o=s;for(t=0;t<i;t++)t%3==0&&t&&(r+=o[a>>18&63],r+=o[a>>12&63],r+=o[a>>6&63],r+=o[63&a]),a=(a<<8)+e[t];return 0==(n=i%3)?(r+=o[a>>18&63],r+=o[a>>12&63],r+=o[a>>6&63],r+=o[63&a]):2===n?(r+=o[a>>10&63],r+=o[a>>4&63],r+=o[a<<2&63],r+=o[64]):1===n&&(r+=o[a>>2&63],r+=o[a<<4&63],r+=o[64],r+=o[64]),r}})},52992:(e,t,n)=>{const r=n(33629);e.exports=(e,t,n)=>{try{t=new r(t,n)}catch(e){return!1}return t.test(e)}},53354:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var a=Object.getOwnPropertyDescriptor(t,n);a&&!("get"in a?!t.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,a)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),a=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.wrapField=t.getFilteredCompletions=void 0,a(n(17807),t),a(n(5698),t),a(n(50678),t),a(n(66272),t),a(n(49014),t),a(n(20474),t),a(n(79188),t),a(n(93555),t),a(n(10094),t),a(n(86812),t),a(n(30629),t),a(n(21482),t);var s=n(69334);Object.defineProperty(t,"getFilteredCompletions",{enumerable:!0,get:function(){return s.getFilteredCompletions}}),Object.defineProperty(t,"wrapField",{enumerable:!0,get:function(){return s.wrapField}}),a(n(15580),t),a(n(10036),t)},53831:(e,t,n)=>{const r=n(99430);e.exports=(e,t,n)=>0===r(e,t,n)},54316:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ALL_CONSTANTS=void 0,t.createConstantFilter=f,t.wrapField=function(e,t=!1){return t||!function(e){if(/[.\s"'()[\];={}:]/.test(e))return!1;try{return new Function(`"use strict";let _ = { ${e}: 0 };`),!0}catch{return!1}}(e)?`"${e.replace(/["\\]/g,"\\$&")}"`:e},t.getFilteredCompletions=function(e={},n=t.ALL_CONSTANTS){const{serverVersion:r=m,fields:a=[],meta:s,stage:i}=e,o=f({serverVersion:r,meta:s,stage:i});return n.concat(a.flatMap((e=>{const{value:t,description:n}=function(e){return"string"==typeof e?{value:e}:{value:e.name,description:e.description}}(e);return[{value:t,meta:"field:identifier",version:"0.0.0",description:n},{value:`$${t}`,meta:"field:reference",version:"0.0.0",description:n}]}))).filter((e=>o(e)))};const r=n(80184),a=n(22849),s=n(58516),i=n(77192),o=n(47530),l=n(36744),c=n(91934),u=n(28968),p=n(85426),d=n(86987);t.ALL_CONSTANTS=[...a.ACCUMULATORS,...i.BSON_TYPES,...s.BSON_TYPE_ALIASES,...o.CONVERSION_OPERATORS,...l.EXPRESSION_OPERATORS,...c.JSON_SCHEMA,...u.QUERY_OPERATORS,...p.STAGE_OPERATORS,...d.SYSTEM_VARIABLES];const m="999.999.999";function h(e,t){return void 0===e||void 0===t||(e=Array.isArray(e)?e:[e]).some((e=>t.includes(e)))}function f({meta:e,serverVersion:t=m,stage:n={}}={}){const a=/^(?<version>\d+\.\d+\.\d+)/.exec(t)?.groups?.version??m;return({version:t,meta:s,env:i,namespaces:o,apiVersions:l})=>function(e,t){const n=/^\d+\.\d+\.\d+$/.test(t);return(0,r.satisfies)(e,n?`>=${t}`:t)}(a,t)&&h(n.env,i)&&h(n.namespace,o)&&h(n.apiVersion,l)&&(!e||function(e,t){const n=t.split(":");return e.some((e=>{const t=e.split(":");return t.length===n.length&&t.every(((e,t)=>"*"===e||e===n[t]))}))}(e,s))}},54395:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.JSON_SCHEMA=void 0,t.JSON_SCHEMA=[{name:"bsonType",value:"bsonType",label:"bsonType",score:1,meta:"json-schema",version:"3.6.0",description:"Accepts same string aliases used for the $type operator"},{name:"enum",value:"enum",label:"enum",score:1,meta:"json-schema",version:"3.6.0",description:"Enumerates all possible values of the field"},{name:"type",value:"type",label:"type",score:1,meta:"json-schema",version:"3.6.0",description:"Enumerates the possible JSON types of the field"},{name:"allOf",value:"allOf",label:"allOf",score:1,meta:"json-schema",version:"3.6.0",description:"Field must match all specified schemas"},{name:"anyOf",value:"anyOf",label:"anyOf",score:1,meta:"json-schema",version:"3.6.0",description:"Field must match at least one of the specified schemas"},{name:"oneOf",value:"oneOf",label:"oneOf",score:1,meta:"json-schema",version:"3.6.0",description:"Field must match exactly one of the specified schemas"},{name:"not",value:"not",label:"not",score:1,meta:"json-schema",version:"3.6.0",description:"Field must not match the schema"},{name:"multipleOf",value:"multipleOf",label:"multipleOf",score:1,meta:"json-schema",version:"3.6.0",description:"Field must be a multiple of this value"},{name:"maximum",value:"maximum",label:"maximum",score:1,meta:"json-schema",version:"3.6.0",description:"Indicates the maximum value of the field"},{name:"exclusiveMaximum",value:"exclusiveMaximum",label:"exclusiveMaximum",score:1,meta:"json-schema",version:"3.6.0",description:"If true and field is a number, maximum is an exclusive maximum"},{name:"minimum",value:"minimum",label:"minimum",score:1,meta:"json-schema",version:"3.6.0",description:"Indicates the minimum value of the field"},{name:"exclusiveMinimum",value:"exclusiveMinimum",label:"exclusiveMinimum",score:1,meta:"json-schema",version:"3.6.0",description:"If true, minimum is an exclusive minimum"},{name:"maxLength",value:"maxLength",label:"maxLength",score:1,meta:"json-schema",version:"3.6.0",description:"Indicates the maximum length of the field"},{name:"minLength",value:"minLength",label:"minLength",score:1,meta:"json-schema",version:"3.6.0",description:"Indicates the minimum length of the field"},{name:"pattern",value:"pattern",label:"pattern",score:1,meta:"json-schema",version:"3.6.0",description:"Field must match the regular expression"},{name:"maxProperties",value:"maxProperties",label:"maxProperties",score:1,meta:"json-schema",version:"3.6.0",description:"Indicates the field’s maximum number of properties"},{name:"minProperties",value:"minProperties",label:"minProperties",score:1,meta:"json-schema",version:"3.6.0",description:"Indicates the field’s minimum number of properties"},{name:"required",value:"required",label:"required",score:1,meta:"json-schema",version:"3.6.0",description:"Object’s property set must contain all the specified elements in the array"},{name:"additionalProperties",value:"additionalProperties",label:"additionalProperties",score:1,meta:"json-schema",version:"3.6.0",description:"If true, additional fields are allowed"},{name:"properties",value:"properties",label:"properties",score:1,meta:"json-schema",version:"3.6.0",description:"A valid JSON Schema where each value is also a valid JSON Schema object"},{name:"patternProperties",value:"patternProperties",label:"patternProperties",score:1,meta:"json-schema",version:"3.6.0",description:"In addition to properties requirements, each property name of this object must be a valid regular expression"},{name:"dependencies",value:"dependencies",label:"dependencies",score:1,meta:"json-schema",version:"3.6.0",description:"Describes field or schema dependencies"},{name:"additionalItems",value:"additionalItems",label:"additionalItems",score:1,meta:"json-schema",version:"3.6.0",description:"If an object, must be a valid JSON Schema"},{name:"items",value:"items",label:"items",score:1,meta:"json-schema",version:"3.6.0",description:"Must be either a valid JSON Schema, or an array of valid JSON Schemas"},{name:"maxItems",value:"maxItems",label:"maxItems",score:1,meta:"json-schema",version:"3.6.0",description:"Indicates the maximum length of array"},{name:"minItems",value:"minItems",label:"minItems",score:1,meta:"json-schema",version:"3.6.0",description:"Indicates the minimum length of array"},{name:"uniqueItems",value:"uniqueItems",label:"uniqueItems",score:1,meta:"json-schema",version:"3.6.0",description:"If true, each item in the array must be unique"},{name:"title",value:"title",label:"title",score:1,meta:"json-schema",version:"3.6.0",description:"A descriptive title string with no effect"},{name:"description",value:"description",label:"description",score:1,meta:"json-schema",version:"3.6.0",description:"A string that describes the schema and has no effect."}]},54420:(e,t,n)=>{var r=n(99174),a=n(4414),s=n(40811);function i(e,t,n){var r=[];return e.include.forEach((function(e){n=i(e,t,n)})),e[t].forEach((function(e){n.forEach((function(t,n){t.tag===e.tag&&t.kind===e.kind&&r.push(n)})),n.push(e)})),n.filter((function(e,t){return-1===r.indexOf(t)}))}function o(e){this.include=e.include||[],this.implicit=e.implicit||[],this.explicit=e.explicit||[],this.implicit.forEach((function(e){if(e.loadKind&&"scalar"!==e.loadKind)throw new a("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")})),this.compiledImplicit=i(this,"implicit",[]),this.compiledExplicit=i(this,"explicit",[]),this.compiledTypeMap=function(){var e,t,n={scalar:{},sequence:{},mapping:{},fallback:{}};function r(e){n[e.kind][e.tag]=n.fallback[e.tag]=e}for(e=0,t=arguments.length;e<t;e+=1)arguments[e].forEach(r);return n}(this.compiledImplicit,this.compiledExplicit)}o.DEFAULT=null,o.create=function(){var e,t;switch(arguments.length){case 1:e=o.DEFAULT,t=arguments[0];break;case 2:e=arguments[0],t=arguments[1];break;default:throw new a("Wrong number of arguments for Schema.create function")}if(e=r.toArray(e),t=r.toArray(t),!e.every((function(e){return e instanceof o})))throw new a("Specified list of super schemas (or a single Schema object) contains a non-Schema object.");if(!t.every((function(e){return e instanceof s})))throw new a("Specified list of YAML types (or a single Type object) contains a non-Type object.");return new o({include:e,explicit:t})},e.exports=o},54506:(e,t,n)=>{const r=n(77203);e.exports=(e,t,n)=>r(e,t,n)>=0},54597:(e,t,n)=>{const r=n(40289);e.exports=(e,t)=>r(e,t,!0)},54737:(e,t,n)=>{const r=n(57544);e.exports=(e,t)=>new r(e,t).patch},54838:(e,t,n)=>{const r=n(25583);e.exports=(e,t,n)=>r(e,t,n)>=0},55069:(e,t,n)=>{n.d(t,{Zt:()=>a});var r=n(29299);r.ACCUMULATORS,r.ADL,r.ANY_COLLECTION_NAMESPACE,r.ANY_NAMESPACE,r.ATLAS,r.ATLAS_SEARCH_TEMPLATES,r.ATLAS_VECTOR_SEARCH_TEMPLATE,r.BSON_TYPES,r.BSON_TYPE_ALIASES,r.COLLECTION,r.CONVERSION_OPERATORS,r.DATABASE,r.ENVS,r.EXPRESSION_OPERATORS,r.FULL_SCAN_STAGES,r.JSON_SCHEMA,r.ON_PREM,r.OUT_STAGES,r.QUERY_OPERATORS,r.REQUIRED_AS_FIRST_STAGE,r.STAGE_OPERATORS,r.STAGE_OPERATOR_NAMES,r.SYSTEM_VARIABLES,r.TIME_SERIES,r.VALIDATION_TEMPLATE,r.VIEW,r.VIEW_PIPELINE_UTILS,r.getFilteredCompletions;const a=r.wrapField},55141:(e,t,n)=>{const r=Symbol("SemVer ANY");class a{static get ANY(){return r}constructor(e,t){if(t=s(t),e instanceof a){if(e.loose===!!t.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),c("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===r?this.value="":this.value=this.operator+this.semver.version,c("comp",this)}parse(e){const t=this.options.loose?i[o.COMPARATORLOOSE]:i[o.COMPARATOR],n=e.match(t);if(!n)throw new TypeError(`Invalid comparator: ${e}`);this.operator=void 0!==n[1]?n[1]:"","="===this.operator&&(this.operator=""),n[2]?this.semver=new u(n[2],this.options.loose):this.semver=r}toString(){return this.value}test(e){if(c("Comparator.test",e,this.options.loose),this.semver===r||e===r)return!0;if("string"==typeof e)try{e=new u(e,this.options)}catch(e){return!1}return l(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof a))throw new TypeError("a Comparator is required");return""===this.operator?""===this.value||new p(e.value,t).test(this.value):""===e.operator?""===e.value||new p(this.value,t).test(e.semver):!((t=s(t)).includePrerelease&&("<0.0.0-0"===this.value||"<0.0.0-0"===e.value)||!t.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))||(!this.operator.startsWith(">")||!e.operator.startsWith(">"))&&(!this.operator.startsWith("<")||!e.operator.startsWith("<"))&&(this.semver.version!==e.semver.version||!this.operator.includes("=")||!e.operator.includes("="))&&!(l(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<"))&&!(l(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}}e.exports=a;const s=n(83214),{safeRe:i,t:o}=n(92625),l=n(88108),c=n(29385),u=n(48381),p=n(20332)},56206:(e,t,n)=>{const r=n(88825);e.exports=(e,t,n)=>{const a=new r(e,n),s=new r(t,n);return a.compare(s)||a.compareBuild(s)}},56565:e=>{e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t),t}},56741:(e,t,n)=>{const r=n(71333);e.exports=(e,t)=>new r(e,t).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" ")))},56911:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.VALIDATION_TEMPLATE=void 0,t.VALIDATION_TEMPLATE='/**\n * This is a starter template for a schema validation rule for a collection.\n * More information on schema validation rules can be found at:\n * https://www.mongodb.com/docs/manual/core/schema-validation/\n */\n{\n $jsonSchema: {\n title: "Library.books",\n bsonType: "object",\n required: ["fieldname1", "fieldname2"],\n properties: {\n fieldname1: {\n bsonType: "string",\n description: "Fieldname1 must be a string",\n },\n fieldname2: {\n bsonType: "int",\n description: "Fieldname2 must be an integer",\n },\n arrayFieldName: {\n bsonType: "array",\n items: {\n bsonType: "string"\n },\n description: "arrayFieldName must be an array of strings"\n },\n }\n }\n}'},57116:(e,t,n)=>{var r=n(54420);e.exports=r.DEFAULT=new r({include:[n(18184)],explicit:[n(51138),n(14753),n(10560)]})},57136:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ATLAS_VECTOR_SEARCH_TEMPLATE=t.ATLAS_SEARCH_TEMPLATES=void 0,t.ATLAS_SEARCH_TEMPLATES=[{name:"Dynamic field mappings",snippet:'{\n "mappings": {\n "dynamic": true\n }\n}',version:"4.4.0"},{name:"Static field mappings",snippet:'{\n "mappings": {\n "dynamic": false,\n "fields": {\n ${1:<string field name>}: {\n "type": "string"\n },\n ${2:<number field name>}: {\n "type": "number"\n },\n ${3:<date field name>}: {\n "type": "date"\n },\n ${4:<geo field name>}: {\n "type": "geo"\n },\n } \n }\n}',version:"4.4.0"},{name:"Text field mappings",snippet:'{\n "mappings": {\n "dynamic": true,\n "fields": {\n ${1:<string field name>}: [\n {\n // Enables text queries\n "type": "string"\n },\n {\n // Enables autocomplete queries\n "type": "autocomplete"\n \n },\n {\n // Enables sorting\n "type": "token"\n }\n ] \n } \n }\n}',version:"4.4.0"},{name:"Facet field mappings",snippet:'{\n "mappings": {\n "dynamic": true,\n "fields": {\n ${1:<number field name for faceting>}: [\n {\n "type": "numberFacet"\n },\n {\n "type": "number"\n },\n ],\n ${2:<date field name for faceting>}: [\n {\n "type": "dateFacet"\n }\n {\n "type": "date"\n }\n ],\n ${3:<string field name for faceting>}: [\n {\n "type": "stringFacet"\n },\n {\n "type": "string",\n "analyzer": "lucene.keyword"\n },\n ],\n } \n }\n}',version:"4.4.0"},{name:"KNN Vector field mapping",snippet:'{\n "mappings": {\n "dynamic": true,\n "fields": {\n ${1:<vector embedding field name>}: [\n {\n "type": "knnVector",\n "dimensions": ${2:<number of dimensions>},\n "similarity": "${3:<euclidean | cosine | dotProduct>}"\n } \n ] \n } \n }\n}',version:"4.4.0"}],t.ATLAS_VECTOR_SEARCH_TEMPLATE={name:"Vector Search default template",snippet:'{\n "fields": [{\n "type": "vector",\n "path": "${1:<field name to index>}",\n "numDimensions": ${2:<number of dimensions>},\n "similarity": "${3:<euclidean | cosine | dotProduct>}"\n }]\n}',version:"4.4.0"}},57544:(e,t,n)=>{const r=n(49764),{MAX_LENGTH:a,MAX_SAFE_INTEGER:s}=n(66078),{safeRe:i,t:o}=n(25522),l=n(43639),{compareIdentifiers:c}=n(40383);class u{constructor(e,t){if(t=l(t),e instanceof u){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if("string"!=typeof e)throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>a)throw new TypeError(`version is longer than ${a} characters`);r("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const n=e.trim().match(t.loose?i[o.LOOSE]:i[o.FULL]);if(!n)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>s||this.major<0)throw new TypeError("Invalid major version");if(this.minor>s||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>s||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t<s)return t}return e})):this.prerelease=[],this.build=n[5]?n[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(r("SemVer.compare",this.version,this.options,e),!(e instanceof u)){if("string"==typeof e&&e===this.version)return 0;e=new u(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof u||(e=new u(e,this.options)),c(this.major,e.major)||c(this.minor,e.minor)||c(this.patch,e.patch)}comparePre(e){if(e instanceof u||(e=new u(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{const n=this.prerelease[t],a=e.prerelease[t];if(r("prerelease compare",t,n,a),void 0===n&&void 0===a)return 0;if(void 0===a)return 1;if(void 0===n)return-1;if(n!==a)return c(n,a)}while(++t)}compareBuild(e){e instanceof u||(e=new u(e,this.options));let t=0;do{const n=this.build[t],a=e.build[t];if(r("build compare",t,n,a),void 0===n&&void 0===a)return 0;if(void 0===a)return 1;if(void 0===n)return-1;if(n!==a)return c(n,a)}while(++t)}inc(e,t,n){if(e.startsWith("pre")){if(!t&&!1===n)throw new Error("invalid increment argument: identifier is empty");if(t){const e=`-${t}`.match(this.options.loose?i[o.PRERELEASELOOSE]:i[o.PRERELEASE]);if(!e||e[1]!==t)throw new Error(`invalid identifier: ${t}`)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,n);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,n);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,n),this.inc("pre",t,n);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t,n),this.inc("pre",t,n);break;case"release":if(0===this.prerelease.length)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":{const e=Number(n)?1:0;if(0===this.prerelease.length)this.prerelease=[e];else{let r=this.prerelease.length;for(;--r>=0;)"number"==typeof this.prerelease[r]&&(this.prerelease[r]++,r=-2);if(-1===r){if(t===this.prerelease.join(".")&&!1===n)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(t){let r=[t,e];!1===n&&(r=[t]),0===c(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=r):this.prerelease=r}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}e.exports=u},57578:(e,t,n)=>{const r=n(43143);e.exports=(e,t,n)=>r(e,t,"<",n)},57681:(e,t,n)=>{const r=n(9350),a=n(96506),{ANY:s}=a,i=n(33629),o=n(52992),l=n(42734),c=n(63825),u=n(90898),p=n(66135);e.exports=(e,t,n,d)=>{let m,h,f,v,g;switch(e=new r(e,d),t=new i(t,d),n){case">":m=l,h=u,f=c,v=">",g=">=";break;case"<":m=c,h=p,f=l,v="<",g="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(o(e,t,d))return!1;for(let n=0;n<t.set.length;++n){const r=t.set[n];let i=null,o=null;if(r.forEach((e=>{e.semver===s&&(e=new a(">=0.0.0")),i=i||e,o=o||e,m(e.semver,i.semver,d)?i=e:f(e.semver,o.semver,d)&&(o=e)})),i.operator===v||i.operator===g)return!1;if((!o.operator||o.operator===v)&&h(e,o.semver))return!1;if(o.operator===g&&f(e,o.semver))return!1}return!0}},58313:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.EXPRESSION_OPERATORS=void 0,t.EXPRESSION_OPERATORS=[{name:"$abs",value:"$abs",score:1,meta:"expr:arith",version:"3.2.0"},{name:"$accumulator",value:"$accumulator",score:1,meta:"expr:arith",version:"4.4.0"},{name:"$add",value:"$add",score:1,meta:"expr:arith",version:"2.2.0"},{name:"$allElementsTrue",value:"$allElementsTrue",score:1,meta:"expr:set",version:"2.6.0"},{name:"$and",value:"$and",score:1,meta:"expr:bool",version:"2.2.0"},{name:"$anyElementTrue",value:"$anyElementTrue",score:1,meta:"expr:set",version:"2.6.0"},{name:"$arrayElemAt",value:"$arrayElemAt",score:1,meta:"expr:array",version:"3.2.0"},{name:"$arrayToObject",value:"$arrayToObject",score:1,meta:"expr:array",version:"3.4.4"},{name:"$binarySize",value:"$binarySize",score:1,meta:"expr:obj",version:"4.4.0"},{name:"$bsonSize",value:"$bsonSize",score:1,meta:"expr:obj",version:"4.4.0"},{name:"$ceil",value:"$ceil",score:1,meta:"expr:arith",version:"3.2.0"},{name:"$cmp",value:"$cmp",score:1,meta:"expr:comp",version:"2.2.0"},{name:"$concat",value:"$concat",score:1,meta:"expr:string",version:"2.4.0"},{name:"$concatArrays",value:"$concatArrays",score:1,meta:"expr:array",version:"3.2.0"},{name:"$cond",value:"$cond",score:1,meta:"expr:cond",version:"2.6.0"},{name:"$dateAdd",value:"$dateAdd",score:1,meta:"expr:date",version:"5.0.0"},{name:"$dateDiff",value:"$dateDiff",score:1,meta:"expr:date",version:"5.0.0"},{name:"$dateFromParts",value:"$dateFromParts",score:1,meta:"expr:date",version:"3.6.0"},{name:"$dateFromString",value:"$dateFromString",score:1,meta:"expr:date",version:"3.6.0"},{name:"$dateSubtract",value:"$dateSubtract",score:1,meta:"expr:date",version:"5.0.0"},{name:"$dateToParts",value:"$dateToParts",score:1,meta:"expr:date",version:"3.6.0"},{name:"$dateToString",value:"$dateToString",score:1,meta:"expr:date",version:"3.6.0"},{name:"$dateTrunc",value:"$dateTrunc",score:1,meta:"expr:date",version:"5.0.0"},{name:"$dayOfMonth",value:"$dayOfMonth",score:1,meta:"expr:date",version:"2.2.0"},{name:"$dayOfWeek",value:"$dayOfWeek",score:1,meta:"expr:date",version:"2.2.0"},{name:"$dayOfYear",value:"$dayOfYear",score:1,meta:"expr:date",version:"2.2.0"},{name:"$dateToString",value:"$dateToString",score:1,meta:"expr:date",version:"3.0.0"},{name:"$divide",value:"$divide",score:1,meta:"expr:arith",version:"2.2.0"},{name:"$eq",value:"$eq",score:1,meta:"expr:comp",version:"2.2.0"},{name:"$exp",value:"$exp",score:1,meta:"expr:arith",version:"3.2.0"},{name:"$filter",value:"$filter",score:1,meta:"expr:array",version:"3.2.0"},{name:"$first",value:"$first",score:1,meta:"expr:array",version:"4.4.0"},{name:"$floor",value:"$floor",score:1,meta:"expr:arith",version:"3.2.0"},{name:"$function",value:"$function",score:1,meta:"expr:arith",version:"4.4.0"},{name:"$getField",value:"$getField",score:1,meta:"expr:get",version:"5.0.0"},{name:"$gt",value:"$gt",score:1,meta:"expr:comp",version:"2.2.0"},{name:"$gte",value:"$gte",score:1,meta:"expr:comp",version:"2.2.0"},{name:"$hour",value:"$hour",score:1,meta:"expr:date",version:"2.2.0"},{name:"$ifNull",value:"$ifNull",score:1,meta:"expr:cond",version:"2.2.0"},{name:"$in",value:"$in",score:1,meta:"expr:array",version:"3.4.0"},{name:"$indexOfArray",value:"$indexOfArray",score:1,meta:"expr:array",version:"3.4.0"},{name:"$indexOfBytes",value:"$indexOfBytes",score:1,meta:"expr:string",version:"3.4.0"},{name:"$indexOfCP",value:"$indexOfCP",score:1,meta:"expr:string",version:"3.4.0"},{name:"$isArray",value:"$isArray",score:1,meta:"expr:array",version:"3.2.0"},{name:"$isNumber",value:"$isNumber",score:1,meta:"expr:arith",version:"4.4.0"},{name:"$isoDayOfWeek",value:"$isoDayOfWeek",score:1,meta:"expr:date",version:"3.4.0"},{name:"$isoWeek",value:"$isoWeek",score:1,meta:"expr:date",version:"3.4.0"},{name:"$isoWeekYear",value:"$isoWeekYear",score:1,meta:"expr:date",version:"3.4.0"},{name:"$last",value:"$last",score:1,meta:"expr:array",version:"4.4.0"},{name:"$let",value:"$let",score:1,meta:"expr:var",version:"2.6.0"},{name:"$literal",value:"$literal",score:1,meta:"expr:literal",version:"2.6.0"},{name:"$lt",value:"$lt",score:1,meta:"expr:comp",version:"2.2.0"},{name:"$lt",value:"$lte",score:1,meta:"expr:comp",version:"2.2.0"},{name:"$ln",value:"$ln",score:1,meta:"expr:arith",version:"3.2.0"},{name:"$log",value:"$log",score:1,meta:"expr:arith",version:"3.2.0"},{name:"$log10",value:"$log10",score:1,meta:"expr:arith",version:"3.2.0"},{name:"$map",value:"$map",score:1,meta:"expr:array",version:"2.6.0"},{name:"$mergeObjects",value:"$mergeObjects",score:1,meta:"expr:obj",version:"3.6.0"},{name:"$meta",value:"$meta",score:1,meta:"expr:text",version:"2.6.0"},{name:"$millisecond",value:"$millisecond",score:1,meta:"expr:date",version:"2.4.0"},{name:"$minute",value:"$minute",score:1,meta:"expr:date",version:"2.2.0"},{name:"$mod",value:"$mod",score:1,meta:"expr:arith",version:"2.2.0"},{name:"$month",value:"$month",score:1,meta:"expr:date",version:"2.2.0"},{name:"$multiply",value:"$multiply",score:1,meta:"expr:arith",version:"2.2.0"},{name:"$new",value:"$new",score:1,meta:"expr:comp",version:"2.2.0"},{name:"$not",value:"$not",score:1,meta:"expr:bool",version:"2.2.0"},{name:"$objectToArray",value:"$objectToArray",score:1,meta:"expr:array",version:"3.4.4"},{name:"$or",value:"$or",score:1,meta:"expr:bool",version:"2.2.0"},{name:"$pow",value:"$pow",score:1,meta:"expr:arith",version:"3.2.0"},{name:"$range",value:"$range",score:1,meta:"expr:array",version:"3.4.0"},{name:"$reduce",value:"$reduce",score:1,meta:"expr:array",version:"3.4.0"},{name:"$regexFind",value:"$regexFind",score:1,meta:"expr:regex",version:"4.1.11"},{name:"$regexFindAll",value:"$regexFindAll",score:1,meta:"expr:regex",version:"4.1.11"},{name:"$regexMatch",value:"$regexMatch",score:1,meta:"expr:regex",version:"4.1.11"},{name:"$replaceAll",value:"$replaceAll",score:1,meta:"expr:string",version:"4.4.0"},{name:"$replaceOne",value:"$replaceOne",score:1,meta:"expr:string",version:"4.4.0"},{name:"$reverseArray",value:"$reverseArray",score:1,meta:"expr:array",version:"3.4.0"},{name:"$second",value:"$second",score:1,meta:"expr:date",version:"2.2.0"},{name:"$setDifference",value:"$setDifference",score:1,meta:"expr:set",version:"2.6.0"},{name:"$setEquals",value:"$setEquals",score:1,meta:"expr:set",version:"2.6.0"},{name:"$setIntersection",value:"$setIntersection",score:1,meta:"expr:set",version:"2.6.0"},{name:"$setIsSubset",value:"$setIsSubset",score:1,meta:"expr:set",version:"2.6.0"},{name:"$setUnion",value:"$setUnion",score:1,meta:"expr:set",version:"2.6.0"},{name:"$similarityCosine",value:"$similarityCosine",score:1,meta:"expr:arith",version:"8.2.0"},{name:"$similarityDotProduct",value:"$similarityDotProduct",score:1,meta:"expr:arith",version:"8.2.0"},{name:"$similarityEuclidean",value:"$similarityEuclidean",score:1,meta:"expr:arith",version:"8.2.0"},{name:"$size",value:"$size",score:1,meta:"expr:array",version:"2.6.0"},{name:"$slice",value:"$slice",score:1,meta:"expr:array",version:"3.2.0"},{name:"$sortArray",value:"$sortArray",score:1,meta:"expr:array",version:"5.2.0"},{name:"$split",value:"$split",score:1,meta:"expr:string",version:"3.4.0"},{name:"$sqrt",value:"$sqrt",score:1,meta:"expr:arith",version:"3.2.0"},{name:"$strcasecmp",value:"$strcasecmp",score:1,meta:"expr:string",version:"2.2.0"},{name:"$strLenBytes",value:"$strLenBytes",score:1,meta:"expr:string",version:"3.4.0"},{name:"$strLenCP",value:"$strLenCP",score:1,meta:"expr:string",version:"3.4.0"},{name:"$substr",value:"$substr",score:1,meta:"expr:string",version:"2.2.0",deprecated:"3.4.0",replacement:"$substrBytes"},{name:"$substrBytes",value:"$substrBytes",score:1,meta:"expr:string",version:"3.4.0"},{name:"$substrCP",value:"$substrCP",score:1,meta:"expr:string",version:"3.4.0"},{name:"$subtract",value:"$subtract",score:1,meta:"expr:arith",version:"3.2.0"},{name:"$switch",value:"$switch",score:1,meta:"expr:cond",version:"3.4.0"},{name:"$toHashedIndexKey",value:"$toHashedIndexKey",score:1,meta:"expr:arith",version:"4.2.24"},{name:"$toLower",value:"$toLower",score:1,meta:"expr:string",version:"2.2.0"},{name:"$toUpper",value:"$toUpper",score:1,meta:"expr:string",version:"2.2.0"},{name:"$tsSecond",value:"$tsSecond",score:1,meta:"expr:date",version:"5.1.0"},{name:"$tsIncrement",value:"$tsIncrement",score:1,meta:"expr:date",version:"5.1.0"},{name:"$trunc",value:"$trunc",score:1,meta:"expr:arith",version:"3.2.0"},{name:"$type",value:"$type",score:1,meta:"expr:type",version:"3.4.0"},{name:"$week",value:"$week",score:1,meta:"expr:date",version:"2.2.0"},{name:"$year",value:"$year",score:1,meta:"expr:date",version:"2.2.0"},{name:"$zip",value:"$zip",score:1,meta:"expr:array",version:"3.4.0"},{name:"$bitAnd",value:"$bitAnd",score:1,meta:"expr:bit",version:"7.0.0"},{name:"$bitOr",value:"$bitOr",score:1,meta:"expr:bit",version:"7.0.0"},{name:"$bitXor",value:"$bitXor",score:1,meta:"expr:bit",version:"7.0.0"},{name:"$bitNot",value:"$bitNot",score:1,meta:"expr:bit",version:"7.0.0"}]},58387:(e,t,n)=>{const r=Symbol("SemVer ANY");class a{static get ANY(){return r}constructor(e,t){if(t=s(t),e instanceof a){if(e.loose===!!t.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),c("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===r?this.value="":this.value=this.operator+this.semver.version,c("comp",this)}parse(e){const t=this.options.loose?i[o.COMPARATORLOOSE]:i[o.COMPARATOR],n=e.match(t);if(!n)throw new TypeError(`Invalid comparator: ${e}`);this.operator=void 0!==n[1]?n[1]:"","="===this.operator&&(this.operator=""),n[2]?this.semver=new u(n[2],this.options.loose):this.semver=r}toString(){return this.value}test(e){if(c("Comparator.test",e,this.options.loose),this.semver===r||e===r)return!0;if("string"==typeof e)try{e=new u(e,this.options)}catch(e){return!1}return l(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof a))throw new TypeError("a Comparator is required");return""===this.operator?""===this.value||new p(e.value,t).test(this.value):""===e.operator?""===e.value||new p(this.value,t).test(e.semver):!((t=s(t)).includePrerelease&&("<0.0.0-0"===this.value||"<0.0.0-0"===e.value)||!t.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))||(!this.operator.startsWith(">")||!e.operator.startsWith(">"))&&(!this.operator.startsWith("<")||!e.operator.startsWith("<"))&&(this.semver.version!==e.semver.version||!this.operator.includes("=")||!e.operator.includes("="))&&!(l(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<"))&&!(l(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}}e.exports=a;const s=n(69348),{safeRe:i,t:o}=n(415),l=n(59382),c=n(67767),u=n(66283),p=n(38366)},58395:(e,t,n)=>{const r=n(9350);e.exports=(e,t)=>new r(e,t).patch},58505:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.VALIDATION_TEMPLATE=void 0,t.VALIDATION_TEMPLATE='/**\n * This is a starter template for a schema validation rule for a collection.\n * More information on schema validation rules can be found at:\n * https://www.mongodb.com/docs/manual/core/schema-validation/\n */\n{\n $jsonSchema: {\n title: "Library.books",\n bsonType: "object",\n required: ["fieldname1", "fieldname2"],\n properties: {\n fieldname1: {\n bsonType: "string",\n description: "Fieldname1 must be a string",\n },\n fieldname2: {\n bsonType: "int",\n description: "Fieldname2 must be an integer",\n },\n arrayFieldName: {\n bsonType: "array",\n items: {\n bsonType: "string"\n },\n description: "arrayFieldName must be an array of strings"\n },\n }\n }\n}'},58516:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BSON_TYPE_ALIASES=void 0,t.BSON_TYPE_ALIASES=[{name:"double",value:"double",label:"double",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"string",value:"string",label:"string",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"object",value:"object",label:"object",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"array",value:"array",label:"array",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"binData",value:"binData",label:"binData",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"objectId",value:"objectId",label:"objectId",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"bool",value:"bool",label:"bool",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"date",value:"date",label:"date",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"null",value:"null",label:"null",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"double",value:"double",label:"double",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"regex",value:"regex",label:"regex",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"javascript",value:"javascript",label:"javascript",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"javascriptWithScope",value:"javascriptWithScope",label:"javascriptWithScope",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"int",value:"int",label:"int",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"timestamp",value:"timestamp",label:"timestamp",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"long",value:"long",label:"long",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"decimal",value:"decimal",label:"decimal",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"minKey",value:"minKey",label:"minKey",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"maxKey",value:"maxKey",label:"maxKey",score:1,meta:"bson-type-aliases",version:"3.6.0"}]},58809:(e,t,n)=>{const r=n(77203);e.exports=(e,t,n)=>r(e,t,n)>0},59025:(e,t,n)=>{const r=n(99385);e.exports=(e,t,n)=>r(e,t,">",n)},59263:(e,t,n)=>{const r=n(52992),a=n(99430);e.exports=(e,t,n)=>{const s=[];let i=null,o=null;const l=e.sort(((e,t)=>a(e,t,n)));for(const e of l)r(e,t,n)?(o=e,i||(i=e)):(o&&s.push([i,o]),o=null,i=null);i&&s.push([i,null]);const c=[];for(const[e,t]of s)e===t?c.push(e):t||e!==l[0]?t?e===l[0]?c.push(`<=${t}`):c.push(`${e} - ${t}`):c.push(`>=${e}`):c.push("*");const u=c.join(" || "),p="string"==typeof t.raw?t.raw:String(t);return u.length<p.length?u:t}},59382:(e,t,n)=>{const r=n(98746),a=n(78654),s=n(61607),i=n(15844),o=n(91152),l=n(80829);e.exports=(e,t,n,c)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e===n;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e!==n;case"":case"=":case"==":return r(e,n,c);case"!=":return a(e,n,c);case">":return s(e,n,c);case">=":return i(e,n,c);case"<":return o(e,n,c);case"<=":return l(e,n,c);default:throw new TypeError(`Invalid operator: ${t}`)}}},59441:(e,t,n)=>{const r=n(66283);e.exports=(e,t,n=!1)=>{if(e instanceof r)return e;try{return new r(e,t)}catch(e){if(!n)return null;throw e}}},59588:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ANY_NAMESPACE=t.ANY_COLLECTION_NAMESPACE=t.TIME_SERIES=t.VIEW=t.COLLECTION=t.DATABASE=void 0,t.DATABASE="db";const n="coll";t.COLLECTION=n;const r="view";t.VIEW=r;const a="timeseries";t.TIME_SERIES=a;const s=[n,r,a];t.ANY_COLLECTION_NAMESPACE=s;const i=["db",...s];t.ANY_NAMESPACE=i},59591:(e,t,n)=>{const r=n(18104),a=n(4292),s=n(41694),i=n(90733),o=n(83586),l=n(20903),c=n(15144),u=n(89065),p=n(76654),d=n(86912),m=n(32924),h=n(65011),f=n(30403),v=n(40289),g=n(19896),y=n(54597),$=n(87391),b=n(42945),E=n(37359),S=n(43334),A=n(3449),_=n(94463),x=n(36749),w=n(47775),O=n(9418),N=n(94706),I=n(65816),T=n(96082),R=n(71333),C=n(9480),k=n(56741),L=n(34218),P=n(44016),M=n(77467),j=n(37276),D=n(99385),F=n(59025),V=n(5992),q=n(73634),B=n(96775),U=n(36582);e.exports={parse:o,valid:l,clean:c,inc:u,diff:p,major:d,minor:m,patch:h,prerelease:f,compare:v,rcompare:g,compareLoose:y,compareBuild:$,sort:b,rsort:E,gt:S,lt:A,eq:_,neq:x,gte:w,lte:O,cmp:N,coerce:I,Comparator:T,Range:R,satisfies:C,toComparators:k,maxSatisfying:L,minSatisfying:P,minVersion:M,validRange:j,outside:D,gtr:F,ltr:V,intersects:q,simplifyRange:B,subset:U,SemVer:s,re:r.re,src:r.src,tokens:r.t,SEMVER_SPEC_VERSION:a.SEMVER_SPEC_VERSION,RELEASE_TYPES:a.RELEASE_TYPES,compareIdentifiers:i.compareIdentifiers,rcompareIdentifiers:i.rcompareIdentifiers}},59818:(e,t,n)=>{const r=n(38358);e.exports=(e,t)=>{const n=r(e,null,!0),a=r(t,null,!0),s=n.compare(a);if(0===s)return null;const i=s>0,o=i?n:a,l=i?a:n,c=!!o.prerelease.length;if(l.prerelease.length&&!c){if(!l.patch&&!l.minor)return"major";if(0===l.compareMain(o))return l.minor&&!l.patch?"minor":"patch"}const u=c?"pre":"";return n.major!==a.major?u+"major":n.minor!==a.minor?u+"minor":n.patch!==a.patch?u+"patch":"prerelease"}},59934:(e,t,n)=>{const r=n(57544),a=n(95323),s=n(72608);e.exports=(e,t)=>{e=new a(e,t);let n=new r("0.0.0");if(e.test(n))return n;if(n=new r("0.0.0-0"),e.test(n))return n;n=null;for(let t=0;t<e.set.length;++t){const a=e.set[t];let i=null;a.forEach((e=>{const t=new r(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":i&&!s(t,i)||(i=t);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${e.operator}`)}})),!i||n&&!s(n,i)||(n=i)}return n&&e.test(n)?n:null}},59984:(e,t,n)=>{const r=n(72857);e.exports=(e,t)=>{try{return new r(e,t).range||"*"}catch(e){return null}}},60098:(e,t,n)=>{const r=n(9350),a=n(33629);e.exports=(e,t,n)=>{let s=null,i=null,o=null;try{o=new a(t,n)}catch(e){return null}return e.forEach((e=>{o.test(e)&&(s&&-1!==i.compare(e)||(s=e,i=new r(s,n)))})),s}},60501:(e,t,n)=>{const r=n(66283);e.exports=(e,t,n)=>new r(e,n).compare(new r(t,n))},60679:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.QUERY_OPERATORS=void 0,t.QUERY_OPERATORS=[{name:"$all",value:"$all",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$and",value:"$and",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$bitsAllClear",value:"$bitsAllClear",score:1,meta:"query",version:"3.2.0",geospatial:!1},{name:"$bitsAllSet",value:"$bitsAllSet",score:1,meta:"query",version:"3.2.0",geospatial:!1},{name:"$bitsAnyClear",value:"$bitsAnyClear",score:1,meta:"query",version:"3.2.0",geospatial:!1},{name:"$bitsAnySet",value:"$bitsAnySet",score:1,meta:"query",version:"3.2.0",geospatial:!1},{name:"$comment",value:"$comment",score:1,meta:"query",version:"3.2.0",geospatial:!1},{name:"$elemMatch",value:"$elemMatch",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$eq",value:"$eq",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$exists",value:"$exists",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$expr",value:"$expr",score:1,meta:"query",version:"3.6.0",geospatial:!1},{name:"$geoIntersects",value:"$geoIntersects",score:1,meta:"query",version:"2.2.0",geospatial:!0},{name:"$geoWithin",value:"$geoWithin",score:1,meta:"query",version:"2.2.0",geospatial:!0},{name:"$gt",value:"$gt",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$gte",value:"$gte",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$in",value:"$in",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$jsonSchema",value:"$jsonSchema",score:1,meta:"query",version:"3.6.0",geospatial:!1},{name:"$lt",value:"$lt",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$lte",value:"$lte",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$mod",value:"$mod",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$ne",value:"$ne",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$near",value:"$near",score:1,meta:"query",version:"2.2.0",geospatial:!0},{name:"$nearSphere",value:"$nearSphere",score:1,meta:"query",version:"2.2.0",geospatial:!0},{name:"$nin",value:"$nin",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$not",value:"$not",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$nor",value:"$nor",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$or",value:"$or",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$regex",value:"$regex",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$size",value:"$size",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$slice",value:"$slice",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$text",value:"$text",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$type",value:"$type",score:1,meta:"query",version:"2.2.0",geospatial:!1},{name:"$where",value:"$where",score:1,meta:"query",version:"2.2.0",geospatial:!1}]},61607:(e,t,n)=>{const r=n(60501);e.exports=(e,t,n)=>r(e,t,n)>0},62280:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ACCUMULATORS=void 0,t.ACCUMULATORS=[{name:"$accumulator",value:"$accumulator",score:1,meta:"accumulator",version:"4.4.0"},{name:"$addToSet",value:"$addToSet",score:1,meta:"accumulator",version:"2.2.0"},{name:"$avg",value:"$avg",score:1,meta:"accumulator",version:"2.2.0",projectVersion:"3.2.0"},{name:"$bottom",value:"$bottom",score:1,meta:"accumulator:bottom-n",version:"5.2.0"},{name:"$bottomN",value:"$bottomN",score:1,meta:"accumulator:bottom-n",version:"5.2.0"},{name:"$covariancePop",value:"$covariancePop",score:1,meta:"accumulator:window",version:"5.0.0"},{name:"$covarianceSamp",value:"$covarianceSamp",score:1,meta:"accumulator:window",version:"5.0.0"},{name:"$count",value:"$count",score:1,meta:"accumulator",version:"5.0.0"},{name:"$derivative",value:"$derivative",score:1,meta:"accumulator:window",version:"5.0.0"},{name:"$denseRank",value:"$denseRank",score:1,meta:"accumulator:window",version:"5.0.0"},{name:"$documentNumber",value:"$documentNumber",score:1,meta:"accumulator:window",version:"5.0.0"},{name:"$expMovingAvg",value:"$expMovingAvg",score:1,meta:"accumulator:window",version:"5.0.0"},{name:"$first",value:"$first",score:1,meta:"accumulator",version:"2.2.0"},{name:"$firstN",value:"$firstN",score:1,meta:"accumulator",version:"5.1.0"},{name:"$integral",value:"$integral",score:1,meta:"accumulator:window",version:"5.0.0"},{name:"$last",value:"$last",score:1,meta:"accumulator",version:"2.2.0"},{name:"$lastN",value:"$lastN",score:1,meta:"accumulator",version:"5.2.0"},{name:"$max",value:"$max",score:1,meta:"accumulator",version:"2.2.0",projectVersion:"3.2.0"},{name:"$maxN",value:"$maxN",score:1,meta:"accumulator",version:"5.2.0"},{name:"$median",value:"$median",score:1,meta:"accumulator",version:"7.0.0"},{name:"$min",value:"$min",score:1,meta:"accumulator",version:"2.2.0",projectVersion:"3.2.0"},{name:"$minN",value:"$minN",score:1,meta:"accumulator",version:"5.2.0"},{name:"$percentile",value:"$percentile",score:1,meta:"accumulator",version:"7.0.0"},{name:"$push",value:"$push",score:1,meta:"accumulator",version:"2.2.0"},{name:"$rank",value:"$rank",score:1,meta:"accumulator:window",version:"5.0.0"},{name:"$stdDevPop",value:"$stdDevPop",score:1,meta:"accumulator",version:"3.2.0",projectVersion:"3.2.0"},{name:"$stdDevSamp",value:"$stdDevSamp",score:1,meta:"accumulator",version:"3.2.0",projectVersion:"3.2.0"},{name:"$shift",value:"$shift",score:1,meta:"accumulator:window",version:"5.0.0"},{name:"$sum",value:"$sum",score:1,meta:"accumulator",version:"2.2.0",projectVersion:"3.2.0"},{name:"$top",value:"$top",score:1,meta:"accumulator:top-n",version:"5.2.0"},{name:"$topN",value:"$topN",score:1,meta:"accumulator:top-n",version:"5.2.0"},{name:"$locf",value:"$locf",score:1,meta:"accumulator:window",version:"5.3.0"},{name:"$linearFill",value:"$linearFill",score:1,meta:"accumulator:window",version:"5.3.0"}]},62525:(e,t,n)=>{const r=n(99430);e.exports=(e,t)=>r(e,t,!0)},62893:(e,t,n)=>{const r=n(12196);e.exports=(e,t)=>{const n=r(e,t);return n&&n.prerelease.length?n.prerelease:null}},62921:(e,t,n)=>{const r=n(57681);e.exports=(e,t,n)=>r(e,t,">",n)},63131:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ACCUMULATORS=void 0,t.ACCUMULATORS=[{name:"$accumulator",value:"$accumulator",score:1,meta:"accumulator",version:"4.4.0"},{name:"$addToSet",value:"$addToSet",score:1,meta:"accumulator",version:"2.2.0"},{name:"$avg",value:"$avg",score:1,meta:"accumulator",version:"2.2.0",projectVersion:"3.2.0"},{name:"$bottom",value:"$bottom",score:1,meta:"accumulator:bottom-n",version:"5.2.0"},{name:"$bottomN",value:"$bottomN",score:1,meta:"accumulator:bottom-n",version:"5.2.0"},{name:"$covariancePop",value:"$covariancePop",score:1,meta:"accumulator:window",version:"5.0.0"},{name:"$covarianceSamp",value:"$covarianceSamp",score:1,meta:"accumulator:window",version:"5.0.0"},{name:"$count",value:"$count",score:1,meta:"accumulator",version:"5.0.0"},{name:"$derivative",value:"$derivative",score:1,meta:"accumulator:window",version:"5.0.0"},{name:"$denseRank",value:"$denseRank",score:1,meta:"accumulator:window",version:"5.0.0"},{name:"$documentNumber",value:"$documentNumber",score:1,meta:"accumulator:window",version:"5.0.0"},{name:"$expMovingAvg",value:"$expMovingAvg",score:1,meta:"accumulator:window",version:"5.0.0"},{name:"$first",value:"$first",score:1,meta:"accumulator",version:"2.2.0"},{name:"$firstN",value:"$firstN",score:1,meta:"accumulator",version:"5.1.0"},{name:"$integral",value:"$integral",score:1,meta:"accumulator:window",version:"5.0.0"},{name:"$last",value:"$last",score:1,meta:"accumulator",version:"2.2.0"},{name:"$lastN",value:"$lastN",score:1,meta:"accumulator",version:"5.2.0"},{name:"$max",value:"$max",score:1,meta:"accumulator",version:"2.2.0",projectVersion:"3.2.0"},{name:"$maxN",value:"$maxN",score:1,meta:"accumulator",version:"5.2.0"},{name:"$median",value:"$median",score:1,meta:"accumulator",version:"7.0.0"},{name:"$min",value:"$min",score:1,meta:"accumulator",version:"2.2.0",projectVersion:"3.2.0"},{name:"$minN",value:"$minN",score:1,meta:"accumulator",version:"5.2.0"},{name:"$percentile",value:"$percentile",score:1,meta:"accumulator",version:"7.0.0"},{name:"$push",value:"$push",score:1,meta:"accumulator",version:"2.2.0"},{name:"$rank",value:"$rank",score:1,meta:"accumulator:window",version:"5.0.0"},{name:"$stdDevPop",value:"$stdDevPop",score:1,meta:"accumulator",version:"3.2.0",projectVersion:"3.2.0"},{name:"$stdDevSamp",value:"$stdDevSamp",score:1,meta:"accumulator",version:"3.2.0",projectVersion:"3.2.0"},{name:"$shift",value:"$shift",score:1,meta:"accumulator:window",version:"5.0.0"},{name:"$sum",value:"$sum",score:1,meta:"accumulator",version:"2.2.0",projectVersion:"3.2.0"},{name:"$top",value:"$top",score:1,meta:"accumulator:top-n",version:"5.2.0"},{name:"$topN",value:"$topN",score:1,meta:"accumulator:top-n",version:"5.2.0"},{name:"$locf",value:"$locf",score:1,meta:"accumulator:window",version:"5.3.0"},{name:"$linearFill",value:"$linearFill",score:1,meta:"accumulator:window",version:"5.3.0"}]},63547:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BSON_TYPE_ALIASES=void 0,t.BSON_TYPE_ALIASES=[{name:"double",value:"double",label:"double",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"string",value:"string",label:"string",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"object",value:"object",label:"object",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"array",value:"array",label:"array",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"binData",value:"binData",label:"binData",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"objectId",value:"objectId",label:"objectId",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"bool",value:"bool",label:"bool",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"date",value:"date",label:"date",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"null",value:"null",label:"null",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"double",value:"double",label:"double",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"regex",value:"regex",label:"regex",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"javascript",value:"javascript",label:"javascript",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"javascriptWithScope",value:"javascriptWithScope",label:"javascriptWithScope",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"int",value:"int",label:"int",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"timestamp",value:"timestamp",label:"timestamp",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"long",value:"long",label:"long",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"decimal",value:"decimal",label:"decimal",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"minKey",value:"minKey",label:"minKey",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"maxKey",value:"maxKey",label:"maxKey",score:1,meta:"bson-type-aliases",version:"3.6.0"}]},63825:(e,t,n)=>{const r=n(99430);e.exports=(e,t,n)=>r(e,t,n)<0},63875:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ENVS=t.ON_PREM=t.ADL=t.ATLAS=void 0;const n="atlas";t.ATLAS=n,t.ADL="adl";const r="on-prem";t.ON_PREM=r;const a=[n,"adl",r];t.ENVS=a},63876:(e,t,n)=>{const r=n(24472);e.exports=(e,t,n)=>r(e,t,">",n)},64097:(e,t,n)=>{n.d(t,{Ah:()=>s,BF:()=>c,DP:()=>u,L5:()=>l,MD:()=>d,Ub:()=>a,gR:()=>m,n:()=>p,nP:()=>i,qp:()=>o,rd:()=>h,zM:()=>f});var r=n(14982);r.ACCUMULATORS;const a=r.ADL,s=(r.ANY_COLLECTION_NAMESPACE,r.ANY_NAMESPACE,r.ATLAS),i=(r.ATLAS_SEARCH_TEMPLATES,r.ATLAS_VECTOR_SEARCH_TEMPLATE,r.BSON_TYPES,r.BSON_TYPE_ALIASES,r.COLLECTION),o=(r.CONVERSION_OPERATORS,r.DATABASE,r.ENVS,r.EXPRESSION_OPERATORS,r.FULL_SCAN_STAGES),l=(r.JSON_SCHEMA,r.ON_PREM),c=r.OUT_STAGES,u=(r.QUERY_OPERATORS,r.REQUIRED_AS_FIRST_STAGE),p=r.STAGE_OPERATORS,d=(r.STAGE_OPERATOR_NAMES,r.SYSTEM_VARIABLES,r.TIME_SERIES),m=(r.VALIDATION_TEMPLATE,r.VIEW),h=r.VIEW_PIPELINE_UTILS,f=r.getFilteredCompletions;r.wrapField},64136:e=>{const t=Number.MAX_SAFE_INTEGER||9007199254740991;e.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:t,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}},64279:e=>{const{AbortController:t,AbortSignal:n}="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0;e.exports=t,e.exports.AbortSignal=n,e.exports.default=t},64757:function(e,t,n){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.VIEW_PIPELINE_UTILS=void 0;const a=r(n(35647)),s="8.0.0",i="8.1.0";t.VIEW_PIPELINE_UTILS={MIN_VERSION_FOR_VIEW_SEARCH_COMPATIBILITY_DE:s,MIN_VERSION_FOR_VIEW_SEARCH_COMPATIBILITY_COMPASS:i,isPipelineSearchQueryable:e=>{for(const t of e){const e=Object.keys(t)[0];if("$addFields"!==e&&"$set"!==e&&"$match"!==e)return!1;if("$match"===e){const e=t.$match,n=Object.keys(e||{});if(1!==n.length||!n.includes("$expr"))return!1}}return!0},isVersionSearchCompatibleForViewsDataExplorer:e=>{try{return a.default.gte(e,s)}catch{return!1}},isVersionSearchCompatibleForViewsCompass:e=>{try{return a.default.gte(e,i)}catch{return!1}}}},64900:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CONVERSION_OPERATORS=void 0,t.CONVERSION_OPERATORS=[{name:"$convert",value:"$convert",score:1,meta:"conv",version:"3.7.2"},{name:"$ltrim",value:"$ltrim",score:1,meta:"accumulator",version:"3.7.2"},{name:"$rtrim",value:"$rtrim",score:1,meta:"accumulator",version:"3.7.2"},{name:"$toBool",value:"$toBool",score:1,meta:"conv",version:"3.7.2"},{name:"$toDate",value:"$toDate",score:1,meta:"conv",version:"3.7.2"},{name:"$toDecimal",value:"$toDecimal",score:1,meta:"conv",version:"3.7.2"},{name:"$toDouble",value:"$toDouble",score:1,meta:"conv",version:"3.7.2"},{name:"$toInt",value:"$toInt",score:1,meta:"conv",version:"3.7.2"},{name:"$toLong",value:"$toLong",score:1,meta:"conv",version:"3.7.2"},{name:"$toObjectId",value:"$toObjectId",score:1,meta:"conv",version:"3.7.2"},{name:"$toString",value:"$toString",score:1,meta:"conv",version:"3.7.2"},{name:"$trim",value:"$trim",score:1,meta:"accumulator",version:"3.7.2"}]},65011:(e,t,n)=>{const r=n(41694);e.exports=(e,t)=>new r(e,t).patch},65684:(e,t,n)=>{const{MAX_SAFE_COMPONENT_LENGTH:r,MAX_SAFE_BUILD_LENGTH:a,MAX_LENGTH:s}=n(47755),i=n(71598),o=(t=e.exports={}).re=[],l=t.safeRe=[],c=t.src=[],u=t.safeSrc=[],p=t.t={};let d=0;const m="[a-zA-Z0-9-]",h=[["\\s",1],["\\d",s],[m,a]],f=(e,t,n)=>{const r=(e=>{for(const[t,n]of h)e=e.split(`${t}*`).join(`${t}{0,${n}}`).split(`${t}+`).join(`${t}{1,${n}}`);return e})(t),a=d++;i(e,a,t),p[e]=a,c[a]=t,u[a]=r,o[a]=new RegExp(t,n?"g":void 0),l[a]=new RegExp(r,n?"g":void 0)};f("NUMERICIDENTIFIER","0|[1-9]\\d*"),f("NUMERICIDENTIFIERLOOSE","\\d+"),f("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${m}*`),f("MAINVERSION",`(${c[p.NUMERICIDENTIFIER]})\\.(${c[p.NUMERICIDENTIFIER]})\\.(${c[p.NUMERICIDENTIFIER]})`),f("MAINVERSIONLOOSE",`(${c[p.NUMERICIDENTIFIERLOOSE]})\\.(${c[p.NUMERICIDENTIFIERLOOSE]})\\.(${c[p.NUMERICIDENTIFIERLOOSE]})`),f("PRERELEASEIDENTIFIER",`(?:${c[p.NONNUMERICIDENTIFIER]}|${c[p.NUMERICIDENTIFIER]})`),f("PRERELEASEIDENTIFIERLOOSE",`(?:${c[p.NONNUMERICIDENTIFIER]}|${c[p.NUMERICIDENTIFIERLOOSE]})`),f("PRERELEASE",`(?:-(${c[p.PRERELEASEIDENTIFIER]}(?:\\.${c[p.PRERELEASEIDENTIFIER]})*))`),f("PRERELEASELOOSE",`(?:-?(${c[p.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${c[p.PRERELEASEIDENTIFIERLOOSE]})*))`),f("BUILDIDENTIFIER",`${m}+`),f("BUILD",`(?:\\+(${c[p.BUILDIDENTIFIER]}(?:\\.${c[p.BUILDIDENTIFIER]})*))`),f("FULLPLAIN",`v?${c[p.MAINVERSION]}${c[p.PRERELEASE]}?${c[p.BUILD]}?`),f("FULL",`^${c[p.FULLPLAIN]}$`),f("LOOSEPLAIN",`[v=\\s]*${c[p.MAINVERSIONLOOSE]}${c[p.PRERELEASELOOSE]}?${c[p.BUILD]}?`),f("LOOSE",`^${c[p.LOOSEPLAIN]}$`),f("GTLT","((?:<|>)?=?)"),f("XRANGEIDENTIFIERLOOSE",`${c[p.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),f("XRANGEIDENTIFIER",`${c[p.NUMERICIDENTIFIER]}|x|X|\\*`),f("XRANGEPLAIN",`[v=\\s]*(${c[p.XRANGEIDENTIFIER]})(?:\\.(${c[p.XRANGEIDENTIFIER]})(?:\\.(${c[p.XRANGEIDENTIFIER]})(?:${c[p.PRERELEASE]})?${c[p.BUILD]}?)?)?`),f("XRANGEPLAINLOOSE",`[v=\\s]*(${c[p.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[p.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[p.XRANGEIDENTIFIERLOOSE]})(?:${c[p.PRERELEASELOOSE]})?${c[p.BUILD]}?)?)?`),f("XRANGE",`^${c[p.GTLT]}\\s*${c[p.XRANGEPLAIN]}$`),f("XRANGELOOSE",`^${c[p.GTLT]}\\s*${c[p.XRANGEPLAINLOOSE]}$`),f("COERCEPLAIN",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?`),f("COERCE",`${c[p.COERCEPLAIN]}(?:$|[^\\d])`),f("COERCEFULL",c[p.COERCEPLAIN]+`(?:${c[p.PRERELEASE]})?`+`(?:${c[p.BUILD]})?(?:$|[^\\d])`),f("COERCERTL",c[p.COERCE],!0),f("COERCERTLFULL",c[p.COERCEFULL],!0),f("LONETILDE","(?:~>?)"),f("TILDETRIM",`(\\s*)${c[p.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",f("TILDE",`^${c[p.LONETILDE]}${c[p.XRANGEPLAIN]}$`),f("TILDELOOSE",`^${c[p.LONETILDE]}${c[p.XRANGEPLAINLOOSE]}$`),f("LONECARET","(?:\\^)"),f("CARETTRIM",`(\\s*)${c[p.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",f("CARET",`^${c[p.LONECARET]}${c[p.XRANGEPLAIN]}$`),f("CARETLOOSE",`^${c[p.LONECARET]}${c[p.XRANGEPLAINLOOSE]}$`),f("COMPARATORLOOSE",`^${c[p.GTLT]}\\s*(${c[p.LOOSEPLAIN]})$|^$`),f("COMPARATOR",`^${c[p.GTLT]}\\s*(${c[p.FULLPLAIN]})$|^$`),f("COMPARATORTRIM",`(\\s*)${c[p.GTLT]}\\s*(${c[p.LOOSEPLAIN]}|${c[p.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",f("HYPHENRANGE",`^\\s*(${c[p.XRANGEPLAIN]})\\s+-\\s+(${c[p.XRANGEPLAIN]})\\s*$`),f("HYPHENRANGELOOSE",`^\\s*(${c[p.XRANGEPLAINLOOSE]})\\s+-\\s+(${c[p.XRANGEPLAINLOOSE]})\\s*$`),f("STAR","(<|>)?=?\\s*\\*"),f("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),f("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")},65789:(e,t,n)=>{const r=n(98855);e.exports=(e,t)=>{const n=r(e.trim().replace(/^[=v]+/,""),t);return n?n.version:null}},65816:(e,t,n)=>{const r=n(41694),a=n(83586),{safeRe:s,t:i}=n(18104);e.exports=(e,t)=>{if(e instanceof r)return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;let n=null;if((t=t||{}).rtl){const r=t.includePrerelease?s[i.COERCERTLFULL]:s[i.COERCERTL];let a;for(;(a=r.exec(e))&&(!n||n.index+n[0].length!==e.length);)n&&a.index+a[0].length===n.index+n[0].length||(n=a),r.lastIndex=a.index+a[1].length+a[2].length;r.lastIndex=-1}else n=e.match(t.includePrerelease?s[i.COERCEFULL]:s[i.COERCE]);if(null===n)return null;const o=n[2],l=n[3]||"0",c=n[4]||"0",u=t.includePrerelease&&n[5]?`-${n[5]}`:"",p=t.includePrerelease&&n[6]?`+${n[6]}`:"";return a(`${o}.${l}.${c}${u}${p}`,t)}},66078:e=>{const t=Number.MAX_SAFE_INTEGER||9007199254740991;e.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:t,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}},66135:(e,t,n)=>{const r=n(99430);e.exports=(e,t,n)=>r(e,t,n)>=0},66239:(e,t,n)=>{const r=n(77203);e.exports=(e,t,n)=>r(e,t,n)<=0},66272:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CONVERSION_OPERATORS=void 0,t.CONVERSION_OPERATORS=[{name:"$convert",value:"$convert",score:1,meta:"conv",version:"3.7.2"},{name:"$ltrim",value:"$ltrim",score:1,meta:"accumulator",version:"3.7.2"},{name:"$rtrim",value:"$rtrim",score:1,meta:"accumulator",version:"3.7.2"},{name:"$toBool",value:"$toBool",score:1,meta:"conv",version:"3.7.2"},{name:"$toDate",value:"$toDate",score:1,meta:"conv",version:"3.7.2"},{name:"$toDecimal",value:"$toDecimal",score:1,meta:"conv",version:"3.7.2"},{name:"$toDouble",value:"$toDouble",score:1,meta:"conv",version:"3.7.2"},{name:"$toInt",value:"$toInt",score:1,meta:"conv",version:"3.7.2"},{name:"$toLong",value:"$toLong",score:1,meta:"conv",version:"3.7.2"},{name:"$toObjectId",value:"$toObjectId",score:1,meta:"conv",version:"3.7.2"},{name:"$toString",value:"$toString",score:1,meta:"conv",version:"3.7.2"},{name:"$trim",value:"$trim",score:1,meta:"accumulator",version:"3.7.2"}]},66283:(e,t,n)=>{const r=n(67767),{MAX_LENGTH:a,MAX_SAFE_INTEGER:s}=n(77693),{safeRe:i,t:o}=n(415),l=n(69348),{compareIdentifiers:c}=n(78900);class u{constructor(e,t){if(t=l(t),e instanceof u){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if("string"!=typeof e)throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>a)throw new TypeError(`version is longer than ${a} characters`);r("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const n=e.trim().match(t.loose?i[o.LOOSE]:i[o.FULL]);if(!n)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>s||this.major<0)throw new TypeError("Invalid major version");if(this.minor>s||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>s||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t<s)return t}return e})):this.prerelease=[],this.build=n[5]?n[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(r("SemVer.compare",this.version,this.options,e),!(e instanceof u)){if("string"==typeof e&&e===this.version)return 0;e=new u(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof u||(e=new u(e,this.options)),c(this.major,e.major)||c(this.minor,e.minor)||c(this.patch,e.patch)}comparePre(e){if(e instanceof u||(e=new u(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{const n=this.prerelease[t],a=e.prerelease[t];if(r("prerelease compare",t,n,a),void 0===n&&void 0===a)return 0;if(void 0===a)return 1;if(void 0===n)return-1;if(n!==a)return c(n,a)}while(++t)}compareBuild(e){e instanceof u||(e=new u(e,this.options));let t=0;do{const n=this.build[t],a=e.build[t];if(r("build compare",t,n,a),void 0===n&&void 0===a)return 0;if(void 0===a)return 1;if(void 0===n)return-1;if(n!==a)return c(n,a)}while(++t)}inc(e,t,n){if(e.startsWith("pre")){if(!t&&!1===n)throw new Error("invalid increment argument: identifier is empty");if(t){const e=`-${t}`.match(this.options.loose?i[o.PRERELEASELOOSE]:i[o.PRERELEASE]);if(!e||e[1]!==t)throw new Error(`invalid identifier: ${t}`)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,n);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,n);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,n),this.inc("pre",t,n);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t,n),this.inc("pre",t,n);break;case"release":if(0===this.prerelease.length)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":{const e=Number(n)?1:0;if(0===this.prerelease.length)this.prerelease=[e];else{let r=this.prerelease.length;for(;--r>=0;)"number"==typeof this.prerelease[r]&&(this.prerelease[r]++,r=-2);if(-1===r){if(t===this.prerelease.join(".")&&!1===n)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(t){let r=[t,e];!1===n&&(r=[t]),0===c(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=r):this.prerelease=r}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}e.exports=u},66529:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BSON_TYPE_ALIASES=void 0,t.BSON_TYPE_ALIASES=[{name:"double",value:"double",label:"double",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"string",value:"string",label:"string",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"object",value:"object",label:"object",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"array",value:"array",label:"array",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"binData",value:"binData",label:"binData",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"objectId",value:"objectId",label:"objectId",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"bool",value:"bool",label:"bool",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"date",value:"date",label:"date",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"null",value:"null",label:"null",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"double",value:"double",label:"double",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"regex",value:"regex",label:"regex",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"javascript",value:"javascript",label:"javascript",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"javascriptWithScope",value:"javascriptWithScope",label:"javascriptWithScope",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"int",value:"int",label:"int",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"timestamp",value:"timestamp",label:"timestamp",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"long",value:"long",label:"long",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"decimal",value:"decimal",label:"decimal",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"minKey",value:"minKey",label:"minKey",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"maxKey",value:"maxKey",label:"maxKey",score:1,meta:"bson-type-aliases",version:"3.6.0"}]},67094:(e,t,n)=>{const r=Symbol("SemVer ANY");class a{static get ANY(){return r}constructor(e,t){if(t=s(t),e instanceof a){if(e.loose===!!t.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),c("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===r?this.value="":this.value=this.operator+this.semver.version,c("comp",this)}parse(e){const t=this.options.loose?i[o.COMPARATORLOOSE]:i[o.COMPARATOR],n=e.match(t);if(!n)throw new TypeError(`Invalid comparator: ${e}`);this.operator=void 0!==n[1]?n[1]:"","="===this.operator&&(this.operator=""),n[2]?this.semver=new u(n[2],this.options.loose):this.semver=r}toString(){return this.value}test(e){if(c("Comparator.test",e,this.options.loose),this.semver===r||e===r)return!0;if("string"==typeof e)try{e=new u(e,this.options)}catch(e){return!1}return l(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof a))throw new TypeError("a Comparator is required");return""===this.operator?""===this.value||new p(e.value,t).test(this.value):""===e.operator?""===e.value||new p(this.value,t).test(e.semver):!((t=s(t)).includePrerelease&&("<0.0.0-0"===this.value||"<0.0.0-0"===e.value)||!t.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))||(!this.operator.startsWith(">")||!e.operator.startsWith(">"))&&(!this.operator.startsWith("<")||!e.operator.startsWith("<"))&&(this.semver.version!==e.semver.version||!this.operator.includes("=")||!e.operator.includes("="))&&!(l(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<"))&&!(l(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}}e.exports=a;const s=n(31145),{safeRe:i,t:o}=n(65684),l=n(98249),c=n(71598),u=n(50066),p=n(72857)},67105:(e,t,n)=>{const r=Symbol("SemVer ANY");class a{static get ANY(){return r}constructor(e,t){if(t=s(t),e instanceof a){if(e.loose===!!t.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),c("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===r?this.value="":this.value=this.operator+this.semver.version,c("comp",this)}parse(e){const t=this.options.loose?i[o.COMPARATORLOOSE]:i[o.COMPARATOR],n=e.match(t);if(!n)throw new TypeError(`Invalid comparator: ${e}`);this.operator=void 0!==n[1]?n[1]:"","="===this.operator&&(this.operator=""),n[2]?this.semver=new u(n[2],this.options.loose):this.semver=r}toString(){return this.value}test(e){if(c("Comparator.test",e,this.options.loose),this.semver===r||e===r)return!0;if("string"==typeof e)try{e=new u(e,this.options)}catch(e){return!1}return l(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof a))throw new TypeError("a Comparator is required");return""===this.operator?""===this.value||new p(e.value,t).test(this.value):""===e.operator?""===e.value||new p(this.value,t).test(e.semver):!((t=s(t)).includePrerelease&&("<0.0.0-0"===this.value||"<0.0.0-0"===e.value)||!t.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))||(!this.operator.startsWith(">")||!e.operator.startsWith(">"))&&(!this.operator.startsWith("<")||!e.operator.startsWith("<"))&&(this.semver.version!==e.semver.version||!this.operator.includes("=")||!e.operator.includes("="))&&!(l(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<"))&&!(l(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}}e.exports=a;const s=n(40594),{safeRe:i,t:o}=n(36165),l=n(5544),c=n(95869),u=n(88825),p=n(20360)},67171:(e,t,n)=>{const r=n(57544);e.exports=(e,t,n,a,s)=>{"string"==typeof n&&(s=a,a=n,n=void 0);try{return new r(e instanceof r?e.version:e,n).inc(t,a,s).version}catch(e){return null}}},67223:(e,t,n)=>{const r=n(50066);e.exports=(e,t)=>new r(e,t).patch},67274:e=>{const t=/^[0-9]+$/,n=(e,n)=>{const r=t.test(e),a=t.test(n);return r&&a&&(e=+e,n=+n),e===n?0:r&&!a?-1:a&&!r?1:e<n?-1:1};e.exports={compareIdentifiers:n,rcompareIdentifiers:(e,t)=>n(t,e)}},67338:(e,t,n)=>{const r=n(95323);e.exports=(e,t,n)=>{try{t=new r(t,n)}catch(e){return!1}return t.test(e)}},67360:(e,t,n)=>{const r=n(85216);e.exports=(e,t)=>e.sort(((e,n)=>r(e,n,t)))},67531:(e,t,n)=>{const r=n(70692);e.exports=(e,t,n)=>0!==r(e,t,n)},67767:(e,t,n)=>{var r=n(65994).e;const a="object"==typeof r&&r.env&&r.env.NODE_DEBUG&&/\bsemver\b/i.test(r.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};e.exports=a},67812:(e,t,n)=>{const r=n(50066),a=n(38358),{safeRe:s,t:i}=n(65684);e.exports=(e,t)=>{if(e instanceof r)return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;let n=null;if((t=t||{}).rtl){const r=t.includePrerelease?s[i.COERCERTLFULL]:s[i.COERCERTL];let a;for(;(a=r.exec(e))&&(!n||n.index+n[0].length!==e.length);)n&&a.index+a[0].length===n.index+n[0].length||(n=a),r.lastIndex=a.index+a[1].length+a[2].length;r.lastIndex=-1}else n=e.match(t.includePrerelease?s[i.COERCEFULL]:s[i.COERCE]);if(null===n)return null;const o=n[2],l=n[3]||"0",c=n[4]||"0",u=t.includePrerelease&&n[5]?`-${n[5]}`:"",p=t.includePrerelease&&n[6]?`+${n[6]}`:"";return a(`${o}.${l}.${c}${u}${p}`,t)}},67994:(e,t,n)=>{const r=n(60501);e.exports=(e,t)=>r(e,t,!0)},68303:(e,t,n)=>{const r=n(70692);e.exports=(e,t)=>r(e,t,!0)},68716:(e,t,n)=>{const r=n(77203);e.exports=(e,t)=>r(e,t,!0)},68752:(e,t,n)=>{const{MAX_SAFE_COMPONENT_LENGTH:r,MAX_SAFE_BUILD_LENGTH:a,MAX_LENGTH:s}=n(28892),i=n(52378),o=(t=e.exports={}).re=[],l=t.safeRe=[],c=t.src=[],u=t.safeSrc=[],p=t.t={};let d=0;const m="[a-zA-Z0-9-]",h=[["\\s",1],["\\d",s],[m,a]],f=(e,t,n)=>{const r=(e=>{for(const[t,n]of h)e=e.split(`${t}*`).join(`${t}{0,${n}}`).split(`${t}+`).join(`${t}{1,${n}}`);return e})(t),a=d++;i(e,a,t),p[e]=a,c[a]=t,u[a]=r,o[a]=new RegExp(t,n?"g":void 0),l[a]=new RegExp(r,n?"g":void 0)};f("NUMERICIDENTIFIER","0|[1-9]\\d*"),f("NUMERICIDENTIFIERLOOSE","\\d+"),f("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${m}*`),f("MAINVERSION",`(${c[p.NUMERICIDENTIFIER]})\\.(${c[p.NUMERICIDENTIFIER]})\\.(${c[p.NUMERICIDENTIFIER]})`),f("MAINVERSIONLOOSE",`(${c[p.NUMERICIDENTIFIERLOOSE]})\\.(${c[p.NUMERICIDENTIFIERLOOSE]})\\.(${c[p.NUMERICIDENTIFIERLOOSE]})`),f("PRERELEASEIDENTIFIER",`(?:${c[p.NONNUMERICIDENTIFIER]}|${c[p.NUMERICIDENTIFIER]})`),f("PRERELEASEIDENTIFIERLOOSE",`(?:${c[p.NONNUMERICIDENTIFIER]}|${c[p.NUMERICIDENTIFIERLOOSE]})`),f("PRERELEASE",`(?:-(${c[p.PRERELEASEIDENTIFIER]}(?:\\.${c[p.PRERELEASEIDENTIFIER]})*))`),f("PRERELEASELOOSE",`(?:-?(${c[p.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${c[p.PRERELEASEIDENTIFIERLOOSE]})*))`),f("BUILDIDENTIFIER",`${m}+`),f("BUILD",`(?:\\+(${c[p.BUILDIDENTIFIER]}(?:\\.${c[p.BUILDIDENTIFIER]})*))`),f("FULLPLAIN",`v?${c[p.MAINVERSION]}${c[p.PRERELEASE]}?${c[p.BUILD]}?`),f("FULL",`^${c[p.FULLPLAIN]}$`),f("LOOSEPLAIN",`[v=\\s]*${c[p.MAINVERSIONLOOSE]}${c[p.PRERELEASELOOSE]}?${c[p.BUILD]}?`),f("LOOSE",`^${c[p.LOOSEPLAIN]}$`),f("GTLT","((?:<|>)?=?)"),f("XRANGEIDENTIFIERLOOSE",`${c[p.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),f("XRANGEIDENTIFIER",`${c[p.NUMERICIDENTIFIER]}|x|X|\\*`),f("XRANGEPLAIN",`[v=\\s]*(${c[p.XRANGEIDENTIFIER]})(?:\\.(${c[p.XRANGEIDENTIFIER]})(?:\\.(${c[p.XRANGEIDENTIFIER]})(?:${c[p.PRERELEASE]})?${c[p.BUILD]}?)?)?`),f("XRANGEPLAINLOOSE",`[v=\\s]*(${c[p.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[p.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[p.XRANGEIDENTIFIERLOOSE]})(?:${c[p.PRERELEASELOOSE]})?${c[p.BUILD]}?)?)?`),f("XRANGE",`^${c[p.GTLT]}\\s*${c[p.XRANGEPLAIN]}$`),f("XRANGELOOSE",`^${c[p.GTLT]}\\s*${c[p.XRANGEPLAINLOOSE]}$`),f("COERCEPLAIN",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?`),f("COERCE",`${c[p.COERCEPLAIN]}(?:$|[^\\d])`),f("COERCEFULL",c[p.COERCEPLAIN]+`(?:${c[p.PRERELEASE]})?`+`(?:${c[p.BUILD]})?(?:$|[^\\d])`),f("COERCERTL",c[p.COERCE],!0),f("COERCERTLFULL",c[p.COERCEFULL],!0),f("LONETILDE","(?:~>?)"),f("TILDETRIM",`(\\s*)${c[p.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",f("TILDE",`^${c[p.LONETILDE]}${c[p.XRANGEPLAIN]}$`),f("TILDELOOSE",`^${c[p.LONETILDE]}${c[p.XRANGEPLAINLOOSE]}$`),f("LONECARET","(?:\\^)"),f("CARETTRIM",`(\\s*)${c[p.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",f("CARET",`^${c[p.LONECARET]}${c[p.XRANGEPLAIN]}$`),f("CARETLOOSE",`^${c[p.LONECARET]}${c[p.XRANGEPLAINLOOSE]}$`),f("COMPARATORLOOSE",`^${c[p.GTLT]}\\s*(${c[p.LOOSEPLAIN]})$|^$`),f("COMPARATOR",`^${c[p.GTLT]}\\s*(${c[p.FULLPLAIN]})$|^$`),f("COMPARATORTRIM",`(\\s*)${c[p.GTLT]}\\s*(${c[p.LOOSEPLAIN]}|${c[p.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",f("HYPHENRANGE",`^\\s*(${c[p.XRANGEPLAIN]})\\s+-\\s+(${c[p.XRANGEPLAIN]})\\s*$`),f("HYPHENRANGELOOSE",`^\\s*(${c[p.XRANGEPLAINLOOSE]})\\s+-\\s+(${c[p.XRANGEPLAINLOOSE]})\\s*$`),f("STAR","(<|>)?=?\\s*\\*"),f("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),f("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")},68821:(e,t,n)=>{const r=n(9331);e.exports=(e,t)=>e.sort(((e,n)=>r(e,n,t)))},69316:(e,t,n)=>{var r=n(99174),a=n(4414),s=n(11710),i=n(18184),o=n(57116),l=Object.prototype.hasOwnProperty,c=1,u=2,p=3,d=4,m=1,h=2,f=3,v=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,g=/[\x85\u2028\u2029]/,y=/[,\[\]\{\}]/,$=/^(?:!|!!|![a-z\-]+!)$/i,b=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function E(e){return Object.prototype.toString.call(e)}function S(e){return 10===e||13===e}function A(e){return 9===e||32===e}function _(e){return 9===e||32===e||10===e||13===e}function x(e){return 44===e||91===e||93===e||123===e||125===e}function w(e){var t;return 48<=e&&e<=57?e-48:97<=(t=32|e)&&t<=102?t-97+10:-1}function O(e){return 48===e?"\0":97===e?"":98===e?"\b":116===e||9===e?"\t":110===e?"\n":118===e?"\v":102===e?"\f":114===e?"\r":101===e?"":32===e?" ":34===e?'"':47===e?"/":92===e?"\\":78===e?"…":95===e?" ":76===e?"\u2028":80===e?"\u2029":""}function N(e){return e<=65535?String.fromCharCode(e):String.fromCharCode(55296+(e-65536>>10),56320+(e-65536&1023))}for(var I=new Array(256),T=new Array(256),R=0;R<256;R++)I[R]=O(R)?1:0,T[R]=O(R);function C(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||o,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}function k(e,t){return new a(t,new s(e.filename,e.input,e.position,e.line,e.position-e.lineStart))}function L(e,t){throw k(e,t)}function P(e,t){e.onWarning&&e.onWarning.call(null,k(e,t))}var M={YAML:function(e,t,n){var r,a,s;null!==e.version&&L(e,"duplication of %YAML directive"),1!==n.length&&L(e,"YAML directive accepts exactly one argument"),null===(r=/^([0-9]+)\.([0-9]+)$/.exec(n[0]))&&L(e,"ill-formed argument of the YAML directive"),a=parseInt(r[1],10),s=parseInt(r[2],10),1!==a&&L(e,"unacceptable YAML version of the document"),e.version=n[0],e.checkLineBreaks=s<2,1!==s&&2!==s&&P(e,"unsupported YAML version of the document")},TAG:function(e,t,n){var r,a;2!==n.length&&L(e,"TAG directive accepts exactly two arguments"),r=n[0],a=n[1],$.test(r)||L(e,"ill-formed tag handle (first argument) of the TAG directive"),l.call(e.tagMap,r)&&L(e,'there is a previously declared suffix for "'+r+'" tag handle'),b.test(a)||L(e,"ill-formed tag prefix (second argument) of the TAG directive"),e.tagMap[r]=a}};function j(e,t,n,r){var a,s,i,o;if(t<n){if(o=e.input.slice(t,n),r)for(a=0,s=o.length;a<s;a+=1)9===(i=o.charCodeAt(a))||32<=i&&i<=1114111||L(e,"expected valid JSON character");else v.test(o)&&L(e,"the stream contains non-printable characters");e.result+=o}}function D(e,t,n,a){var s,i,o,c;for(r.isObject(n)||L(e,"cannot merge mappings; the provided source object is unacceptable"),o=0,c=(s=Object.keys(n)).length;o<c;o+=1)i=s[o],l.call(t,i)||(t[i]=n[i],a[i]=!0)}function F(e,t,n,r,a,s,i,o){var c,u;if(Array.isArray(a))for(c=0,u=(a=Array.prototype.slice.call(a)).length;c<u;c+=1)Array.isArray(a[c])&&L(e,"nested arrays are not supported inside keys"),"object"==typeof a&&"[object Object]"===E(a[c])&&(a[c]="[object Object]");if("object"==typeof a&&"[object Object]"===E(a)&&(a="[object Object]"),a=String(a),null===t&&(t={}),"tag:yaml.org,2002:merge"===r)if(Array.isArray(s))for(c=0,u=s.length;c<u;c+=1)D(e,t,s[c],n);else D(e,t,s,n);else e.json||l.call(n,a)||!l.call(t,a)||(e.line=i||e.line,e.position=o||e.position,L(e,"duplicated mapping key")),t[a]=s,delete n[a];return t}function V(e){var t;10===(t=e.input.charCodeAt(e.position))?e.position++:13===t?(e.position++,10===e.input.charCodeAt(e.position)&&e.position++):L(e,"a line break is expected"),e.line+=1,e.lineStart=e.position}function q(e,t,n){for(var r=0,a=e.input.charCodeAt(e.position);0!==a;){for(;A(a);)a=e.input.charCodeAt(++e.position);if(t&&35===a)do{a=e.input.charCodeAt(++e.position)}while(10!==a&&13!==a&&0!==a);if(!S(a))break;for(V(e),a=e.input.charCodeAt(e.position),r++,e.lineIndent=0;32===a;)e.lineIndent++,a=e.input.charCodeAt(++e.position)}return-1!==n&&0!==r&&e.lineIndent<n&&P(e,"deficient indentation"),r}function B(e){var t,n=e.position;return!(45!==(t=e.input.charCodeAt(n))&&46!==t||t!==e.input.charCodeAt(n+1)||t!==e.input.charCodeAt(n+2)||(n+=3,0!==(t=e.input.charCodeAt(n))&&!_(t)))}function U(e,t){1===t?e.result+=" ":t>1&&(e.result+=r.repeat("\n",t-1))}function Y(e,t){var n,r,a=e.tag,s=e.anchor,i=[],o=!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=i),r=e.input.charCodeAt(e.position);0!==r&&45===r&&_(e.input.charCodeAt(e.position+1));)if(o=!0,e.position++,q(e,!0,-1)&&e.lineIndent<=t)i.push(null),r=e.input.charCodeAt(e.position);else if(n=e.line,G(e,t,p,!1,!0),i.push(e.result),q(e,!0,-1),r=e.input.charCodeAt(e.position),(e.line===n||e.lineIndent>t)&&0!==r)L(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break;return!!o&&(e.tag=a,e.anchor=s,e.kind="sequence",e.result=i,!0)}function z(e){var t,n,r,a,s=!1,i=!1;if(33!==(a=e.input.charCodeAt(e.position)))return!1;if(null!==e.tag&&L(e,"duplication of a tag property"),60===(a=e.input.charCodeAt(++e.position))?(s=!0,a=e.input.charCodeAt(++e.position)):33===a?(i=!0,n="!!",a=e.input.charCodeAt(++e.position)):n="!",t=e.position,s){do{a=e.input.charCodeAt(++e.position)}while(0!==a&&62!==a);e.position<e.length?(r=e.input.slice(t,e.position),a=e.input.charCodeAt(++e.position)):L(e,"unexpected end of the stream within a verbatim tag")}else{for(;0!==a&&!_(a);)33===a&&(i?L(e,"tag suffix cannot contain exclamation marks"):(n=e.input.slice(t-1,e.position+1),$.test(n)||L(e,"named tag handle cannot contain such characters"),i=!0,t=e.position+1)),a=e.input.charCodeAt(++e.position);r=e.input.slice(t,e.position),y.test(r)&&L(e,"tag suffix cannot contain flow indicator characters")}return r&&!b.test(r)&&L(e,"tag name cannot contain such characters: "+r),s?e.tag=r:l.call(e.tagMap,n)?e.tag=e.tagMap[n]+r:"!"===n?e.tag="!"+r:"!!"===n?e.tag="tag:yaml.org,2002:"+r:L(e,'undeclared tag handle "'+n+'"'),!0}function Z(e){var t,n;if(38!==(n=e.input.charCodeAt(e.position)))return!1;for(null!==e.anchor&&L(e,"duplication of an anchor property"),n=e.input.charCodeAt(++e.position),t=e.position;0!==n&&!_(n)&&!x(n);)n=e.input.charCodeAt(++e.position);return e.position===t&&L(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function G(e,t,n,a,s){var i,o,v,g,y,$,b,E,O=1,R=!1,C=!1;if(null!==e.listener&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,i=o=v=d===n||p===n,a&&q(e,!0,-1)&&(R=!0,e.lineIndent>t?O=1:e.lineIndent===t?O=0:e.lineIndent<t&&(O=-1)),1===O)for(;z(e)||Z(e);)q(e,!0,-1)?(R=!0,v=i,e.lineIndent>t?O=1:e.lineIndent===t?O=0:e.lineIndent<t&&(O=-1)):v=!1;if(v&&(v=R||s),1!==O&&d!==n||(b=c===n||u===n?t:t+1,E=e.position-e.lineStart,1===O?v&&(Y(e,E)||function(e,t,n){var r,a,s,i,o,l=e.tag,c=e.anchor,p={},m={},h=null,f=null,v=null,g=!1,y=!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=p),o=e.input.charCodeAt(e.position);0!==o;){if(r=e.input.charCodeAt(e.position+1),s=e.line,i=e.position,63!==o&&58!==o||!_(r)){if(!G(e,n,u,!1,!0))break;if(e.line===s){for(o=e.input.charCodeAt(e.position);A(o);)o=e.input.charCodeAt(++e.position);if(58===o)_(o=e.input.charCodeAt(++e.position))||L(e,"a whitespace character is expected after the key-value separator within a block mapping"),g&&(F(e,p,m,h,f,null),h=f=v=null),y=!0,g=!1,a=!1,h=e.tag,f=e.result;else{if(!y)return e.tag=l,e.anchor=c,!0;L(e,"can not read an implicit mapping pair; a colon is missed")}}else{if(!y)return e.tag=l,e.anchor=c,!0;L(e,"can not read a block mapping entry; a multiline key may not be an implicit key")}}else 63===o?(g&&(F(e,p,m,h,f,null),h=f=v=null),y=!0,g=!0,a=!0):g?(g=!1,a=!0):L(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,o=r;if((e.line===s||e.lineIndent>t)&&(G(e,t,d,!0,a)&&(g?f=e.result:v=e.result),g||(F(e,p,m,h,f,v,s,i),h=f=v=null),q(e,!0,-1),o=e.input.charCodeAt(e.position)),e.lineIndent>t&&0!==o)L(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return g&&F(e,p,m,h,f,null),y&&(e.tag=l,e.anchor=c,e.kind="mapping",e.result=p),y}(e,E,b))||function(e,t){var n,r,a,s,i,o,l,u,p,d,m=!0,h=e.tag,f=e.anchor,v={};if(91===(d=e.input.charCodeAt(e.position)))a=93,o=!1,r=[];else{if(123!==d)return!1;a=125,o=!0,r={}}for(null!==e.anchor&&(e.anchorMap[e.anchor]=r),d=e.input.charCodeAt(++e.position);0!==d;){if(q(e,!0,t),(d=e.input.charCodeAt(e.position))===a)return e.position++,e.tag=h,e.anchor=f,e.kind=o?"mapping":"sequence",e.result=r,!0;m||L(e,"missed comma between flow collection entries"),p=null,s=i=!1,63===d&&_(e.input.charCodeAt(e.position+1))&&(s=i=!0,e.position++,q(e,!0,t)),n=e.line,G(e,t,c,!1,!0),u=e.tag,l=e.result,q(e,!0,t),d=e.input.charCodeAt(e.position),!i&&e.line!==n||58!==d||(s=!0,d=e.input.charCodeAt(++e.position),q(e,!0,t),G(e,t,c,!1,!0),p=e.result),o?F(e,r,v,u,l,p):s?r.push(F(e,null,v,u,l,p)):r.push(l),q(e,!0,t),44===(d=e.input.charCodeAt(e.position))?(m=!0,d=e.input.charCodeAt(++e.position)):m=!1}L(e,"unexpected end of the stream within a flow collection")}(e,b)?C=!0:(o&&function(e,t){var n,a,s,i,o,l=m,c=!1,u=!1,p=t,d=0,v=!1;if(124===(i=e.input.charCodeAt(e.position)))a=!1;else{if(62!==i)return!1;a=!0}for(e.kind="scalar",e.result="";0!==i;)if(43===(i=e.input.charCodeAt(++e.position))||45===i)m===l?l=43===i?f:h:L(e,"repeat of a chomping mode identifier");else{if(!((s=48<=(o=i)&&o<=57?o-48:-1)>=0))break;0===s?L(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):u?L(e,"repeat of an indentation width identifier"):(p=t+s-1,u=!0)}if(A(i)){do{i=e.input.charCodeAt(++e.position)}while(A(i));if(35===i)do{i=e.input.charCodeAt(++e.position)}while(!S(i)&&0!==i)}for(;0!==i;){for(V(e),e.lineIndent=0,i=e.input.charCodeAt(e.position);(!u||e.lineIndent<p)&&32===i;)e.lineIndent++,i=e.input.charCodeAt(++e.position);if(!u&&e.lineIndent>p&&(p=e.lineIndent),S(i))d++;else{if(e.lineIndent<p){l===f?e.result+=r.repeat("\n",c?1+d:d):l===m&&c&&(e.result+="\n");break}for(a?A(i)?(v=!0,e.result+=r.repeat("\n",c?1+d:d)):v?(v=!1,e.result+=r.repeat("\n",d+1)):0===d?c&&(e.result+=" "):e.result+=r.repeat("\n",d):e.result+=r.repeat("\n",c?1+d:d),c=!0,u=!0,d=0,n=e.position;!S(i)&&0!==i;)i=e.input.charCodeAt(++e.position);j(e,n,e.position,!1)}}return!0}(e,b)||function(e,t){var n,r,a;if(39!==(n=e.input.charCodeAt(e.position)))return!1;for(e.kind="scalar",e.result="",e.position++,r=a=e.position;0!==(n=e.input.charCodeAt(e.position));)if(39===n){if(j(e,r,e.position,!0),39!==(n=e.input.charCodeAt(++e.position)))return!0;r=e.position,e.position++,a=e.position}else S(n)?(j(e,r,a,!0),U(e,q(e,!1,t)),r=a=e.position):e.position===e.lineStart&&B(e)?L(e,"unexpected end of the document within a single quoted scalar"):(e.position++,a=e.position);L(e,"unexpected end of the stream within a single quoted scalar")}(e,b)||function(e,t){var n,r,a,s,i,o,l;if(34!==(o=e.input.charCodeAt(e.position)))return!1;for(e.kind="scalar",e.result="",e.position++,n=r=e.position;0!==(o=e.input.charCodeAt(e.position));){if(34===o)return j(e,n,e.position,!0),e.position++,!0;if(92===o){if(j(e,n,e.position,!0),S(o=e.input.charCodeAt(++e.position)))q(e,!1,t);else if(o<256&&I[o])e.result+=T[o],e.position++;else if((i=120===(l=o)?2:117===l?4:85===l?8:0)>0){for(a=i,s=0;a>0;a--)(i=w(o=e.input.charCodeAt(++e.position)))>=0?s=(s<<4)+i:L(e,"expected hexadecimal character");e.result+=N(s),e.position++}else L(e,"unknown escape sequence");n=r=e.position}else S(o)?(j(e,n,r,!0),U(e,q(e,!1,t)),n=r=e.position):e.position===e.lineStart&&B(e)?L(e,"unexpected end of the document within a double quoted scalar"):(e.position++,r=e.position)}L(e,"unexpected end of the stream within a double quoted scalar")}(e,b)?C=!0:function(e){var t,n,r;if(42!==(r=e.input.charCodeAt(e.position)))return!1;for(r=e.input.charCodeAt(++e.position),t=e.position;0!==r&&!_(r)&&!x(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&L(e,"name of an alias node must contain at least one character"),n=e.input.slice(t,e.position),l.call(e.anchorMap,n)||L(e,'unidentified alias "'+n+'"'),e.result=e.anchorMap[n],q(e,!0,-1),!0}(e)?(C=!0,null===e.tag&&null===e.anchor||L(e,"alias node should not have any properties")):function(e,t,n){var r,a,s,i,o,l,c,u,p=e.kind,d=e.result;if(_(u=e.input.charCodeAt(e.position))||x(u)||35===u||38===u||42===u||33===u||124===u||62===u||39===u||34===u||37===u||64===u||96===u)return!1;if((63===u||45===u)&&(_(r=e.input.charCodeAt(e.position+1))||n&&x(r)))return!1;for(e.kind="scalar",e.result="",a=s=e.position,i=!1;0!==u;){if(58===u){if(_(r=e.input.charCodeAt(e.position+1))||n&&x(r))break}else if(35===u){if(_(e.input.charCodeAt(e.position-1)))break}else{if(e.position===e.lineStart&&B(e)||n&&x(u))break;if(S(u)){if(o=e.line,l=e.lineStart,c=e.lineIndent,q(e,!1,-1),e.lineIndent>=t){i=!0,u=e.input.charCodeAt(e.position);continue}e.position=s,e.line=o,e.lineStart=l,e.lineIndent=c;break}}i&&(j(e,a,s,!1),U(e,e.line-o),a=s=e.position,i=!1),A(u)||(s=e.position+1),u=e.input.charCodeAt(++e.position)}return j(e,a,s,!1),!!e.result||(e.kind=p,e.result=d,!1)}(e,b,c===n)&&(C=!0,null===e.tag&&(e.tag="?")),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):0===O&&(C=v&&Y(e,E))),null!==e.tag&&"!"!==e.tag)if("?"===e.tag){for(null!==e.result&&"scalar"!==e.kind&&L(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),g=0,y=e.implicitTypes.length;g<y;g+=1)if(($=e.implicitTypes[g]).resolve(e.result)){e.result=$.construct(e.result),e.tag=$.tag,null!==e.anchor&&(e.anchorMap[e.anchor]=e.result);break}}else l.call(e.typeMap[e.kind||"fallback"],e.tag)?($=e.typeMap[e.kind||"fallback"][e.tag],null!==e.result&&$.kind!==e.kind&&L(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+$.kind+'", not "'+e.kind+'"'),$.resolve(e.result)?(e.result=$.construct(e.result),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):L(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")):L(e,"unknown tag !<"+e.tag+">");return null!==e.listener&&e.listener("close",e),null!==e.tag||null!==e.anchor||C}function W(e){var t,n,r,a,s=e.position,i=!1;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap={},e.anchorMap={};0!==(a=e.input.charCodeAt(e.position))&&(q(e,!0,-1),a=e.input.charCodeAt(e.position),!(e.lineIndent>0||37!==a));){for(i=!0,a=e.input.charCodeAt(++e.position),t=e.position;0!==a&&!_(a);)a=e.input.charCodeAt(++e.position);for(r=[],(n=e.input.slice(t,e.position)).length<1&&L(e,"directive name must not be less than one character in length");0!==a;){for(;A(a);)a=e.input.charCodeAt(++e.position);if(35===a){do{a=e.input.charCodeAt(++e.position)}while(0!==a&&!S(a));break}if(S(a))break;for(t=e.position;0!==a&&!_(a);)a=e.input.charCodeAt(++e.position);r.push(e.input.slice(t,e.position))}0!==a&&V(e),l.call(M,n)?M[n](e,n,r):P(e,'unknown document directive "'+n+'"')}q(e,!0,-1),0===e.lineIndent&&45===e.input.charCodeAt(e.position)&&45===e.input.charCodeAt(e.position+1)&&45===e.input.charCodeAt(e.position+2)?(e.position+=3,q(e,!0,-1)):i&&L(e,"directives end mark is expected"),G(e,e.lineIndent-1,d,!1,!0),q(e,!0,-1),e.checkLineBreaks&&g.test(e.input.slice(s,e.position))&&P(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&B(e)?46===e.input.charCodeAt(e.position)&&(e.position+=3,q(e,!0,-1)):e.position<e.length-1&&L(e,"end of the stream or a document separator is expected")}function H(e,t){t=t||{},0!==(e=String(e)).length&&(10!==e.charCodeAt(e.length-1)&&13!==e.charCodeAt(e.length-1)&&(e+="\n"),65279===e.charCodeAt(0)&&(e=e.slice(1)));var n=new C(e,t),r=e.indexOf("\0");for(-1!==r&&(n.position=r,L(n,"null byte is not allowed in input")),n.input+="\0";32===n.input.charCodeAt(n.position);)n.lineIndent+=1,n.position+=1;for(;n.position<n.length-1;)W(n);return n.documents}function K(e,t,n){null!==t&&"object"==typeof t&&void 0===n&&(n=t,t=null);var r=H(e,n);if("function"!=typeof t)return r;for(var a=0,s=r.length;a<s;a+=1)t(r[a])}function X(e,t){var n=H(e,t);if(0!==n.length){if(1===n.length)return n[0];throw new a("expected a single document in the stream, but found more")}}e.exports.loadAll=K,e.exports.load=X,e.exports.safeLoadAll=function(e,t,n){return"object"==typeof t&&null!==t&&void 0===n&&(n=t,t=null),K(e,t,r.extend({schema:i},n))},e.exports.safeLoad=function(e,t){return X(e,r.extend({schema:i},t))}},69334:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ALL_CONSTANTS=void 0,t.createConstantFilter=f,t.wrapField=function(e,t=!1){return t||!function(e){if(/[.\s"'()[\];={}:]/.test(e))return!1;try{return new Function(`"use strict";let _ = { ${e}: 0 };`),!0}catch{return!1}}(e)?`"${e.replace(/["\\]/g,"\\$&")}"`:e},t.getFilteredCompletions=function(e={},n=t.ALL_CONSTANTS){const{serverVersion:r=m,fields:a=[],meta:s,stage:i}=e,o=f({serverVersion:r,meta:s,stage:i});return n.concat(a.flatMap((e=>{const{value:t,description:n}=function(e){return"string"==typeof e?{value:e}:{value:e.name,description:e.description}}(e);return[{value:t,meta:"field:identifier",version:"0.0.0",description:n},{value:`$${t}`,meta:"field:reference",version:"0.0.0",description:n}]}))).filter((e=>o(e)))};const r=n(41738),a=n(17807),s=n(5698),i=n(50678),o=n(66272),l=n(20474),c=n(79188),u=n(10094),p=n(86812),d=n(30629);t.ALL_CONSTANTS=[...a.ACCUMULATORS,...i.BSON_TYPES,...s.BSON_TYPE_ALIASES,...o.CONVERSION_OPERATORS,...l.EXPRESSION_OPERATORS,...c.JSON_SCHEMA,...u.QUERY_OPERATORS,...p.STAGE_OPERATORS,...d.SYSTEM_VARIABLES];const m="999.999.999";function h(e,t){return void 0===e||void 0===t||(e=Array.isArray(e)?e:[e]).some((e=>t.includes(e)))}function f({meta:e,serverVersion:t=m,stage:n={}}={}){const a=/^(?<version>\d+\.\d+\.\d+)/.exec(t)?.groups?.version??m;return({version:t,meta:s,env:i,namespaces:o,apiVersions:l})=>function(e,t){const n=/^\d+\.\d+\.\d+$/.test(t);return(0,r.satisfies)(e,n?`>=${t}`:t)}(a,t)&&h(n.env,i)&&h(n.namespace,o)&&h(n.apiVersion,l)&&(!e||function(e,t){const n=t.split(":");return e.some((e=>{const t=e.split(":");return t.length===n.length&&t.every(((e,t)=>"*"===e||e===n[t]))}))}(e,s))}},69348:e=>{const t=Object.freeze({loose:!0}),n=Object.freeze({});e.exports=e=>e?"object"!=typeof e?t:e:n},69750:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ATLAS_VECTOR_SEARCH_TEMPLATE=t.ATLAS_SEARCH_TEMPLATES=void 0,t.ATLAS_SEARCH_TEMPLATES=[{name:"Dynamic field mappings",snippet:'{\n "mappings": {\n "dynamic": true\n }\n}',version:"4.4.0"},{name:"Static field mappings",snippet:'{\n "mappings": {\n "dynamic": false,\n "fields": {\n ${1:<string field name>}: {\n "type": "string"\n },\n ${2:<number field name>}: {\n "type": "number"\n },\n ${3:<date field name>}: {\n "type": "date"\n },\n ${4:<geo field name>}: {\n "type": "geo"\n },\n } \n }\n}',version:"4.4.0"},{name:"Text field mappings",snippet:'{\n "mappings": {\n "dynamic": true,\n "fields": {\n ${1:<string field name>}: [\n {\n // Enables text queries\n "type": "string"\n },\n {\n // Enables autocomplete queries\n "type": "autocomplete"\n \n },\n {\n // Enables sorting\n "type": "token"\n }\n ] \n } \n }\n}',version:"4.4.0"},{name:"Facet field mappings",snippet:'{\n "mappings": {\n "dynamic": true,\n "fields": {\n ${1:<number field name for faceting>}: [\n {\n "type": "numberFacet"\n },\n {\n "type": "number"\n },\n ],\n ${2:<date field name for faceting>}: [\n {\n "type": "dateFacet"\n }\n {\n "type": "date"\n }\n ],\n ${3:<string field name for faceting>}: [\n {\n "type": "stringFacet"\n },\n {\n "type": "string",\n "analyzer": "lucene.keyword"\n },\n ],\n } \n }\n}',version:"4.4.0"},{name:"KNN Vector field mapping",snippet:'{\n "mappings": {\n "dynamic": true,\n "fields": {\n ${1:<vector embedding field name>}: [\n {\n "type": "knnVector",\n "dimensions": ${2:<number of dimensions>},\n "similarity": "${3:<euclidean | cosine | dotProduct>}"\n } \n ] \n } \n }\n}',version:"4.4.0"}],t.ATLAS_VECTOR_SEARCH_TEMPLATE={name:"Vector Search default template",snippet:'{\n "fields": [{\n "type": "vector",\n "path": "${1:<field name to index>}",\n "numDimensions": ${2:<number of dimensions>},\n "similarity": "${3:<euclidean | cosine | dotProduct>}"\n }]\n}',version:"4.4.0"}},69904:(e,t,n)=>{const r=n(57681);e.exports=(e,t,n)=>r(e,t,"<",n)},70449:(e,t,n)=>{const r=n(72857);e.exports=(e,t)=>new r(e,t).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" ")))},70509:(e,t,n)=>{const r=n(70692);e.exports=(e,t,n)=>r(e,t,n)>=0},70545:(e,t,n)=>{var r=n(65994).e;e.exports=async function(e,t,n,s){n instanceof Function&&(s=n,n={});const u=async function(e,t,n={}){let s,u;"string"==typeof n&&(n={encoding:n});const p=i(m((()=>u))),f=o.resolve(e);try{await function(e){return new Promise((t=>{c[e]||(c[e]=[]),c[e].push(t),1===c[e].length&&t()}))}(f);const i=await l(a.realpath)(e).catch((()=>e));if(u=d(i),!n.mode||!n.chown){const e=await l(a.stat)(i).catch((()=>{}));e&&(null==n.mode&&(n.mode=e.mode),null==n.chown&&r.getuid&&(n.chown={uid:e.uid,gid:e.gid}))}s=await l(a.open)(u,"w",n.mode),n.tmpfileCreated&&await n.tmpfileCreated(u),ArrayBuffer.isView(t)?await l(a.write)(s,t,0,t.length,0):null!=t&&await l(a.write)(s,String(t),0,String(n.encoding||"utf8")),!1!==n.fsync&&await l(a.fsync)(s),await l(a.close)(s),s=null,n.chown&&await l(a.chown)(u,n.chown.uid,n.chown.gid).catch((e=>{if(!h(e))throw e})),n.mode&&await l(a.chmod)(u,n.mode).catch((e=>{if(!h(e))throw e})),await l(a.rename)(u,i)}finally{s&&await l(a.close)(s).catch((()=>{})),p(),await l(a.unlink)(u).catch((()=>{})),c[f].shift(),c[f].length>0?c[f][0]():delete c[f]}}(e,t,n);if(s)try{return s(await u)}catch(e){return s(e)}return u},e.exports.sync=function(e,t,n){"string"==typeof n?n={encoding:n}:n||(n={});try{e=a.realpathSync(e)}catch(e){}const s=d(e);if(!n.mode||!n.chown)try{const t=a.statSync(e);(n=Object.assign({},n)).mode||(n.mode=t.mode),!n.chown&&r.getuid&&(n.chown={uid:t.uid,gid:t.gid})}catch(e){}let o;const l=m(s),c=i(l);let u=!0;try{if(o=a.openSync(s,"w",n.mode||438),n.tmpfileCreated&&n.tmpfileCreated(s),ArrayBuffer.isView(t)?a.writeSync(o,t,0,t.length,0):null!=t&&a.writeSync(o,String(t),0,String(n.encoding||"utf8")),!1!==n.fsync&&a.fsyncSync(o),a.closeSync(o),o=null,n.chown)try{a.chownSync(s,n.chown.uid,n.chown.gid)}catch(e){if(!h(e))throw e}if(n.mode)try{a.chmodSync(s,n.mode)}catch(e){if(!h(e))throw e}a.renameSync(s,e),u=!1}finally{if(o)try{a.closeSync(o)}catch(e){}c(),u&&l()}},e.exports._getTmpname=d,e.exports._cleanupOnExit=m;const a=n(36374),s=n(88906),{onExit:i}=n(41163),o=n(17642),{promisify:l}=n(98437),c={},u=function(){try{return n(86983).threadId}catch(e){return 0}}();let p=0;function d(e){return e+"."+s("/index.js").hash(String(r.pid)).hash(String(u)).hash(String(++p)).result()}function m(e){return()=>{try{a.unlinkSync("function"==typeof e?e():e)}catch{}}}function h(e){return"ENOSYS"===e.code||!(r.getuid&&0===r.getuid()||"EINVAL"!==e.code&&"EPERM"!==e.code)}},70692:(e,t,n)=>{const r=n(57544);e.exports=(e,t,n)=>new r(e,n).compare(new r(t,n))},71080:(e,t,n)=>{const r=n(95323);e.exports=(e,t,n)=>(e=new r(e,n),t=new r(t,n),e.intersects(t,n))},71174:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SYSTEM_VARIABLES=void 0,t.SYSTEM_VARIABLES=[{name:"$$NOW",value:"$$NOW",score:1,meta:"variable:system",version:"4.2.0",description:"A variable that returns the current datetime value. NOW returns the same value for all members of the deployment and remains the same throughout all stages of the aggregation pipeline."},{name:"$$CLUSTER_TIME",value:"$$CLUSTER_TIME",score:1,meta:"variable:system",version:"4.2.0",description:"A variable that returns the current timestamp value. CLUSTER_TIME is only available on replica sets and sharded clusters. CLUSTER_TIME returns the same value for all members of the deployment and remains the same throughout all stages of the pipeline."},{name:"$$ROOT",value:"$$ROOT",score:1,meta:"variable:system",version:"2.4.0",description:"References the root document, i.e. the top-level document, currently being processed in the aggregation pipeline stage."},{name:"$$CURRENT",value:"$$CURRENT",score:1,meta:"variable:system",version:"2.4.0",description:"References the start of the field path being processed in the aggregation pipeline stage. Unless documented otherwise, all stages start with CURRENT the same as ROOT. CURRENT is modifiable. However, since `$<field>` is equivalent to `$$CURRENT.<field>`, rebinding CURRENT changes the meaning of `$` accesses."},{name:"$$REMOVE",value:"$$REMOVE",score:1,meta:"variable:system",version:"3.6.0",description:"A variable which evaluates to the missing value. Allows for the conditional exclusion of fields. In a `$project`, a field set to the variable REMOVE is excluded from the output."},{name:"$$DESCEND",value:"$$DESCEND",score:1,meta:"variable:system",version:"3.0.0",description:"One of the allowed results of a `$redact` expression."},{name:"$$PRUNE",value:"$$PRUNE",score:1,meta:"variable:system",version:"3.0.0",description:"One of the allowed results of a `$redact` expression."},{name:"$$KEEP",value:"$$KEEP",score:1,meta:"variable:system",version:"3.0.0",description:"One of the allowed results of a `$redact` expression."},{name:"$$SEARCH_META",value:"$$SEARCH_META",score:1,meta:"variable:system",version:"5.0.0",description:"A variable that stores the metadata results of an Atlas Search query. In all supported aggregation pipeline stages, a field set to the variable SEARCH_META returns the metadata results for the query. For an example of its usage, see Atlas Search facet and count."},{name:"$$USER_ROLES",value:"$$USER_ROLES",score:1,meta:"variable:system",version:"7.0.0",description:"A variable that stores the role names of the authenticated user running the command."}]},71295:(e,t,n)=>{n.d(t,{DG:()=>v,E6:()=>E,J:()=>b,J_:()=>c,Jk:()=>u,KH:()=>p,Kk:()=>m,NI:()=>g,QP:()=>i,RM:()=>h,Tt:()=>$,Yk:()=>d,kH:()=>y,ql:()=>f,sm:()=>l,v$:()=>S});var r=n(49189),a=n(7263),s=n(72510);const i=r.xI("$ZodCheck",((e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])})),o={number:"number",bigint:"bigint",object:"date"},l=r.xI("$ZodCheckLessThan",((e,t)=>{i.init(e,t);const n=o[typeof t.value];e._zod.onattach.push((e=>{const n=e._zod.bag,r=(t.inclusive?n.maximum:n.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<r&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)})),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:"too_big",maximum:t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}})),c=r.xI("$ZodCheckGreaterThan",((e,t)=>{i.init(e,t);const n=o[typeof t.value];e._zod.onattach.push((e=>{const n=e._zod.bag,r=(t.inclusive?n.minimum:n.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>r&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)})),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:"too_small",minimum:t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}})),u=r.xI("$ZodCheckMultipleOf",((e,t)=>{i.init(e,t),e._zod.onattach.push((e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)})),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");("bigint"==typeof n.value?n.value%t.value===BigInt(0):0===s.LG(n.value,t.value))||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}})),p=r.xI("$ZodCheckNumberFormat",((e,t)=>{i.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),r=n?"int":"number",[o,l]=s.zH[t.format];e._zod.onattach.push((e=>{const r=e._zod.bag;r.format=t.format,r.minimum=o,r.maximum=l,n&&(r.pattern=a.nd)})),e._zod.check=a=>{const s=a.value;if(n){if(!Number.isInteger(s))return void a.issues.push({expected:r,format:t.format,code:"invalid_type",input:s,inst:e});if(!Number.isSafeInteger(s))return void(s>0?a.issues.push({input:s,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,continue:!t.abort}):a.issues.push({input:s,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,continue:!t.abort}))}s<o&&a.issues.push({origin:"number",input:s,code:"too_small",minimum:o,inclusive:!0,inst:e,continue:!t.abort}),s>l&&a.issues.push({origin:"number",input:s,code:"too_big",maximum:l,inst:e})}})),d=r.xI("$ZodCheckMaxLength",((e,t)=>{var n;i.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!s.cl(t)&&void 0!==t.length}),e._zod.onattach.push((e=>{const n=e._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(e._zod.bag.maximum=t.maximum)})),e._zod.check=n=>{const r=n.value;if(r.length<=t.maximum)return;const a=s.Rc(r);n.issues.push({origin:a,code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}})),m=r.xI("$ZodCheckMinLength",((e,t)=>{var n;i.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!s.cl(t)&&void 0!==t.length}),e._zod.onattach.push((e=>{const n=e._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(e._zod.bag.minimum=t.minimum)})),e._zod.check=n=>{const r=n.value;if(r.length>=t.minimum)return;const a=s.Rc(r);n.issues.push({origin:a,code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}})),h=r.xI("$ZodCheckLengthEquals",((e,t)=>{var n;i.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!s.cl(t)&&void 0!==t.length}),e._zod.onattach.push((e=>{const n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length})),e._zod.check=n=>{const r=n.value,a=r.length;if(a===t.length)return;const i=s.Rc(r),o=a>t.length;n.issues.push({origin:i,...o?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}})),f=r.xI("$ZodCheckStringFormat",((e,t)=>{var n,r;i.init(e,t),e._zod.onattach.push((e=>{const n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??(n.patterns=new Set),n.patterns.add(t.pattern))})),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,t.pattern.test(n.value)||n.issues.push({origin:"string",code:"invalid_format",format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})})),v=r.xI("$ZodCheckRegex",((e,t)=>{f.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,t.pattern.test(n.value)||n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}})),g=r.xI("$ZodCheckLowerCase",((e,t)=>{t.pattern??(t.pattern=a.AC),f.init(e,t)})),y=r.xI("$ZodCheckUpperCase",((e,t)=>{t.pattern??(t.pattern=a.Zv),f.init(e,t)})),$=r.xI("$ZodCheckIncludes",((e,t)=>{i.init(e,t);const n=s.$f(t.includes),r=new RegExp("number"==typeof t.position?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push((e=>{const t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(r)})),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:n.value,inst:e,continue:!t.abort})}})),b=r.xI("$ZodCheckStartsWith",((e,t)=>{i.init(e,t);const n=new RegExp(`^${s.$f(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push((e=>{const t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(n)})),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}})),E=r.xI("$ZodCheckEndsWith",((e,t)=>{i.init(e,t);const n=new RegExp(`.*${s.$f(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push((e=>{const t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(n)})),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}})),S=r.xI("$ZodCheckOverwrite",((e,t)=>{i.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}))},71333:(e,t,n)=>{const r=/\s+/g;class a{constructor(e,t){if(t=i(t),e instanceof a)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new a(e.raw,t);if(e instanceof o)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e.trim().replace(r," "),this.set=this.raw.split("||").map((e=>this.parseRange(e.trim()))).filter((e=>e.length)),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter((e=>!g(e[0]))),0===this.set.length)this.set=[e];else if(this.set.length>1)for(const e of this.set)if(1===e.length&&y(e[0])){this.set=[e];break}}this.formatted=void 0}get range(){if(void 0===this.formatted){this.formatted="";for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+="||");const t=this.set[e];for(let e=0;e<t.length;e++)e>0&&(this.formatted+=" "),this.formatted+=t[e].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){const t=((this.options.includePrerelease&&f)|(this.options.loose&&v))+":"+e,n=s.get(t);if(n)return n;const r=this.options.loose,a=r?u[p.HYPHENRANGELOOSE]:u[p.HYPHENRANGE];e=e.replace(a,T(this.options.includePrerelease)),l("hyphen replace",e),e=e.replace(u[p.COMPARATORTRIM],d),l("comparator trim",e),e=e.replace(u[p.TILDETRIM],m),l("tilde trim",e),e=e.replace(u[p.CARETTRIM],h),l("caret trim",e);let i=e.split(" ").map((e=>b(e,this.options))).join(" ").split(/\s+/).map((e=>I(e,this.options)));r&&(i=i.filter((e=>(l("loose invalid filter",e,this.options),!!e.match(u[p.COMPARATORLOOSE]))))),l("range list",i);const c=new Map,y=i.map((e=>new o(e,this.options)));for(const e of y){if(g(e))return[e];c.set(e.value,e)}c.size>1&&c.has("")&&c.delete("");const $=[...c.values()];return s.set(t,$),$}intersects(e,t){if(!(e instanceof a))throw new TypeError("a Range is required");return this.set.some((n=>$(n,t)&&e.set.some((e=>$(e,t)&&n.every((n=>e.every((e=>n.intersects(e,t)))))))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new c(e,this.options)}catch(e){return!1}for(let t=0;t<this.set.length;t++)if(R(this.set[t],e,this.options))return!0;return!1}}e.exports=a;const s=new(n(21212)),i=n(8573),o=n(96082),l=n(72082),c=n(41694),{safeRe:u,t:p,comparatorTrimReplace:d,tildeTrimReplace:m,caretTrimReplace:h}=n(18104),{FLAG_INCLUDE_PRERELEASE:f,FLAG_LOOSE:v}=n(4292),g=e=>"<0.0.0-0"===e.value,y=e=>""===e.value,$=(e,t)=>{let n=!0;const r=e.slice();let a=r.pop();for(;n&&r.length;)n=r.every((e=>a.intersects(e,t))),a=r.pop();return n},b=(e,t)=>(l("comp",e,t),e=_(e,t),l("caret",e),e=S(e,t),l("tildes",e),e=w(e,t),l("xrange",e),e=N(e,t),l("stars",e),e),E=e=>!e||"x"===e.toLowerCase()||"*"===e,S=(e,t)=>e.trim().split(/\s+/).map((e=>A(e,t))).join(" "),A=(e,t)=>{const n=t.loose?u[p.TILDELOOSE]:u[p.TILDE];return e.replace(n,((t,n,r,a,s)=>{let i;return l("tilde",e,t,n,r,a,s),E(n)?i="":E(r)?i=`>=${n}.0.0 <${+n+1}.0.0-0`:E(a)?i=`>=${n}.${r}.0 <${n}.${+r+1}.0-0`:s?(l("replaceTilde pr",s),i=`>=${n}.${r}.${a}-${s} <${n}.${+r+1}.0-0`):i=`>=${n}.${r}.${a} <${n}.${+r+1}.0-0`,l("tilde return",i),i}))},_=(e,t)=>e.trim().split(/\s+/).map((e=>x(e,t))).join(" "),x=(e,t)=>{l("caret",e,t);const n=t.loose?u[p.CARETLOOSE]:u[p.CARET],r=t.includePrerelease?"-0":"";return e.replace(n,((t,n,a,s,i)=>{let o;return l("caret",e,t,n,a,s,i),E(n)?o="":E(a)?o=`>=${n}.0.0${r} <${+n+1}.0.0-0`:E(s)?o="0"===n?`>=${n}.${a}.0${r} <${n}.${+a+1}.0-0`:`>=${n}.${a}.0${r} <${+n+1}.0.0-0`:i?(l("replaceCaret pr",i),o="0"===n?"0"===a?`>=${n}.${a}.${s}-${i} <${n}.${a}.${+s+1}-0`:`>=${n}.${a}.${s}-${i} <${n}.${+a+1}.0-0`:`>=${n}.${a}.${s}-${i} <${+n+1}.0.0-0`):(l("no pr"),o="0"===n?"0"===a?`>=${n}.${a}.${s}${r} <${n}.${a}.${+s+1}-0`:`>=${n}.${a}.${s}${r} <${n}.${+a+1}.0-0`:`>=${n}.${a}.${s} <${+n+1}.0.0-0`),l("caret return",o),o}))},w=(e,t)=>(l("replaceXRanges",e,t),e.split(/\s+/).map((e=>O(e,t))).join(" ")),O=(e,t)=>{e=e.trim();const n=t.loose?u[p.XRANGELOOSE]:u[p.XRANGE];return e.replace(n,((n,r,a,s,i,o)=>{l("xRange",e,n,r,a,s,i,o);const c=E(a),u=c||E(s),p=u||E(i),d=p;return"="===r&&d&&(r=""),o=t.includePrerelease?"-0":"",c?n=">"===r||"<"===r?"<0.0.0-0":"*":r&&d?(u&&(s=0),i=0,">"===r?(r=">=",u?(a=+a+1,s=0,i=0):(s=+s+1,i=0)):"<="===r&&(r="<",u?a=+a+1:s=+s+1),"<"===r&&(o="-0"),n=`${r+a}.${s}.${i}${o}`):u?n=`>=${a}.0.0${o} <${+a+1}.0.0-0`:p&&(n=`>=${a}.${s}.0${o} <${a}.${+s+1}.0-0`),l("xRange return",n),n}))},N=(e,t)=>(l("replaceStars",e,t),e.trim().replace(u[p.STAR],"")),I=(e,t)=>(l("replaceGTE0",e,t),e.trim().replace(u[t.includePrerelease?p.GTE0PRE:p.GTE0],"")),T=e=>(t,n,r,a,s,i,o,l,c,u,p,d)=>`${n=E(r)?"":E(a)?`>=${r}.0.0${e?"-0":""}`:E(s)?`>=${r}.${a}.0${e?"-0":""}`:i?`>=${n}`:`>=${n}${e?"-0":""}`} ${l=E(c)?"":E(u)?`<${+c+1}.0.0-0`:E(p)?`<${c}.${+u+1}.0-0`:d?`<=${c}.${u}.${p}-${d}`:e?`<${c}.${u}.${+p+1}-0`:`<=${l}`}`.trim(),R=(e,t,n)=>{for(let n=0;n<e.length;n++)if(!e[n].test(t))return!1;if(t.prerelease.length&&!n.includePrerelease){for(let n=0;n<e.length;n++)if(l(e[n].semver),e[n].semver!==o.ANY&&e[n].semver.prerelease.length>0){const r=e[n].semver;if(r.major===t.major&&r.minor===t.minor&&r.patch===t.patch)return!0}return!1}return!0}},71595:(e,t,n)=>{const r=n(9331);e.exports=(e,t)=>e.sort(((e,n)=>r(n,e,t)))},71598:(e,t,n)=>{var r=n(65994).e;const a="object"==typeof r&&r.env&&r.env.NODE_DEBUG&&/\bsemver\b/i.test(r.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};e.exports=a},71773:(e,t,n)=>{const r=n(60501);e.exports=(e,t,n)=>r(t,e,n)},71851:(e,t,n)=>{const r=n(25583);e.exports=(e,t,n)=>r(e,t,n)<=0},71925:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.REQUIRED_AS_FIRST_STAGE=t.FULL_SCAN_STAGES=t.OUT_STAGES=t.STAGE_OPERATOR_NAMES=t.STAGE_OPERATORS=void 0;const r=n(97008),a=n(59588),s=[{name:"$addFields",value:"$addFields",label:"$addFields",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"3.4.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Adds new field(s) to a document with a computed value, or reassigns an existing field(s) with a computed value.",comment:"/**\n * newField: The new field name.\n * expression: The new field expression.\n */\n",snippet:"{\n ${1:newField}: ${2:expression}, ${3:...}\n}"},{name:"$bucket",value:"$bucket",label:"$bucket",outputStage:!1,fullScan:!0,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"3.4.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Categorizes incoming documents into groups, called buckets, based on specified boundaries.",comment:"/**\n * groupBy: The expression to group by.\n * boundaries: An array of the lower boundaries for each bucket.\n * default: The bucket name for documents that do not fall within the specified boundaries\n * output: {\n * outputN: Optional. The output object may contain a single or numerous field names used to accumulate values per bucket.\n * }\n */\n",snippet:"{\n groupBy: ${1:expression},\n boundaries: [ ${2:lowerbound}, ${3:...} ],\n default: ${4:literal},\n output: {\n ${5:outputN}: { ${6:accumulator} }, ${7:...}\n }\n}"},{name:"$bucketAuto",value:"$bucketAuto",label:"$bucketAuto",outputStage:!1,fullScan:!0,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"3.4.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Automatically categorizes documents into a specified number of buckets, attempting even distribution if possible.",comment:"/**\n * groupBy: The expression to group by.\n * buckets: The desired number of buckets\n * output: {\n * outputN: Optional. The output object may contain a single or numerous field names used to accumulate values per bucket.\n * }\n * granularity: Optional number series\n */\n",snippet:"{\n groupBy: ${1:expression},\n buckets: ${2:number},\n output: {\n ${3:outputN}: ${4:accumulator}, ${5:...}\n },\n granularity: '${6:string}'\n}"},{name:"$changeStream",value:"$changeStream",label:"$changeStream",outputStage:!1,fullScan:!1,firstStage:!0,score:1,env:[r.ATLAS,r.ON_PREM],meta:"stage",version:"4.2.0",apiVersions:[1],namespaces:[a.DATABASE],description:"Returns a Change Stream cursor for the collection.",comment:"/**\n * allChangesForCluster: Optional boolean to include all changes in the cluster.\n * fullDocument: Optional value to request a copy of full document when modified by update operations (Introduced in 6.0).\n * fullDocumentBeforeChange: Value to configure whether to return a full document before the change or not.\n * resumeAfter: Specifies a resume token as the logical starting point for the change stream. Cannot be used with startAfter or startAtOperationTime fields.\n * showExpandedEvents: Specifies whether to include additional change events, such as such as DDL and index operations (Introduced in 6.0).\n * startAfter: Specifies a resume token as the logical starting point for the change stream. Cannot be used with resumeAfter or startAtOperationTime fields.\n * startAtOperationTime: Specifies a time as the logical starting point for the change stream. Cannot be used with resumeAfter or startAfter fields.\n */\n",snippet:"{\n allChangesForCluster: ${1:boolean},\n fullDocument: '${2:string}',\n fullDocumentBeforeChange: '${3:string}',\n resumeAfter: ${4:resumeToken},\n showExpandedEvents: ${5:boolean},\n startAfter: ${6:resumeToken},\n startAtOperationTime: ${7:time},\n}"},{name:"$collStats",value:"$collStats",label:"$collStats",outputStage:!1,fullScan:!1,firstStage:!0,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"3.4.0",apiVersions:[],namespaces:[...a.ANY_COLLECTION_NAMESPACE],description:"Returns statistics regarding a collection or view.",comment:"/**\n * histograms: Optional latency histograms.\n * storageStats: Optional storage stats.\n */\n",snippet:"{\n latencyStats: {\n histograms: ${1:boolean}\n },\n storageStats: {${2:}},\n}"},{name:"$count",value:"$count",label:"$count",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"2.2.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Returns a count of the number of documents at this stage of the aggregation pipeline.",comment:"/**\n * Provide the field name for the count.\n */\n",snippet:"'${1:string}'"},{name:"$currentOp",value:"$currentOp",label:"$currentOp",outputStage:!1,fullScan:!1,firstStage:!0,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"3.6.0",apiVersions:[1],namespaces:[a.DATABASE],description:"Returns a cursor over information on active and/or dormant operations for the MongoDB deployment as well as inactive sessions that are holding locks as part of a transaction.",comment:"/**\n * allUsers: Optional boolean value to specify whether to return operations for all users or not.\n * idleConnections: Optional boolean value to specify whether to return all operations including idle connections or not.\n * idleCursors: Optional boolean value to specify whether to report on cursors that are idle or not.\n * idleSessions: Optional boolean value to specify whether to report on dormant sessions or not.\n * localOps: Optional boolean value to specify whether to report on operations running locally on targetted mongos or not.\n * backtrace: Optional boolean value to specify whether callstack information is returned as part of the waitingForLatch output field.\n */\n",snippet:"{\n allUsers: ${1:false},\n idleConnections: ${2:false},\n idleCursors: ${3:false},\n idleSessions: ${4:true},\n localOps: ${5:false},\n backtrace: ${6:false},\n}"},{name:"$densify",value:"$densify",label:"$densify",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"5.1.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Creates new documents to eliminate the gaps in the time or numeric domain at the required granularity level.",comment:"/**\n * field: The required field to densify.\n * partitionByFields: The set of fields that acts as a compound key to define each partition.\n * range: {\n * step: The amount to increment the field value in each document.\n * unit: If specified field must evaluate to a date for every document in the collection, otherwise must evaluate to a numeric.\n * bounds: A string or array of numeric/date bounds, corresponding to the type of the field.\n * }\n */\n",snippet:"{\n field: ${1:string},\n partitionByFields: [${2:string}, ${3:string}, ...],\n range: {\n step: ${4:number},\n unit: ${5:string},\n bounds: [${6:lowerbound}, ${7:upperbound}, ...]\n }\n}"},{name:"$documents",value:"$documents",label:"$documents",outputStage:!1,fullScan:!1,firstStage:!0,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"4.4.9",apiVersions:[1],namespaces:[a.DATABASE],description:"Returns literal documents from input values.",comment:"/**\n * expression: Any valid expression.\n */\n",snippet:"{\n ${1:expression}\n}"},{name:"$facet",value:"$facet",label:"$facet",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"3.4.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Allows for multiple parellel aggregations to be specified.",comment:"/**\n * outputFieldN: The first output field.\n * stageN: The first aggregation stage.\n */\n",snippet:"{\n ${1:outputFieldN}: [ ${2:stageN}, ${3:...} ]\n}"},{name:"$fill",value:"$fill",label:"$fill",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"5.3.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Populates null and missing field values within documents.",comment:'/**\n * sortBy: Syntax is the same as $sort, required if "method" is used in at least one output spec otherwise optional\n * partitionBy: Optional, default is a single partition. Specification is the same as _id in $group (same as partitionBy in window functions).\n * partitionByFields: Optional, set of fields that acts as a compound key to define each partition.\n * output - Required, object for each field to fill in. For a single field, can be a single object.\n * output.<field> - A field to be filled with value, if missing or null in the current document.\n */\n',snippet:"{\n sortBy: ${1:sortSpec},\n partitionBy: ${2:expression},\n partitionByFields: [${3:string}, ${4:string}, ...],\n output: {\n field1: {value: ${5:expression}},\n field2: {method: ${6:string}},\n ...\n }\n}"},{name:"$geoNear",value:"$geoNear",label:"$geoNear",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"2.4.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Returns documents based on proximity to a geospatial point.",comment:"/**\n * near: The point to search near.\n * distanceField: The calculated distance.\n * maxDistance: The maximum distance, in meters, documents can be before being excluded from results.\n * query: Limits results that match the query\n * includeLocs: Optional. Labels and includes the point used to match the document.\n * num: Optional. The maximum number of documents to return.\n * spherical: Defaults to false. Specifies whether to use spherical geometry.\n */\n",snippet:"{\n near: { type: 'Point', coordinates: [ ${1:number}, ${2:number} ] },\n distanceField: '${3:string}',\n maxDistance: ${4:number},\n query: {${5}},\n includeLocs: '${6}',\n num: ${7:number},\n spherical: ${8:boolean}\n}"},{name:"$graphLookup",value:"$graphLookup",label:"$graphLookup",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"3.4.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Performs a recursive search on a collection.",comment:"/**\n * from: The target collection.\n * startWith: Expression to start.\n * connectFromField: Field to connect.\n * connectToField: Field to connect to.\n * as: Name of the array field.\n * maxDepth: Optional max recursion depth.\n * depthField: Optional Name of the depth field.\n * restrictSearchWithMatch: Optional query.\n */\n",snippet:"{\n from: '${1:string}',\n startWith: ${2:expression},\n connectFromField: '${3:string}',\n connectToField: '${4:string}',\n as: '${5:string}',\n maxDepth: ${6:number},\n depthField: '${7:string}',\n restrictSearchWithMatch: {${8}}\n}"},{name:"$group",value:"$group",label:"$group",outputStage:!1,fullScan:!0,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"2.2.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Groups documents by a specified expression.",comment:"/**\n * _id: The id of the group.\n * fieldN: The first field name.\n */\n",snippet:"{\n _id: ${1:expression},\n ${2:fieldN}: {\n ${3:accumulatorN}: ${4:expressionN}\n }\n}"},{name:"$indexStats",value:"$indexStats",label:"$indexStats",outputStage:!1,fullScan:!1,firstStage:!0,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"3.2.0",apiVersions:[],namespaces:[...a.ANY_NAMESPACE],description:"Returns statistics regarding the use of each index for the collection.",comment:"/**\n * No parameters.\n */\n",snippet:"{}"},{name:"$limit",value:"$limit",label:"$limit",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"2.2.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Limits the number of documents that flow into subsequent stages.",comment:"/**\n * Provide the number of documents to limit.\n */\n",snippet:"${1:number}"},{name:"$listLocalSessions",value:"$listLocalSessions",label:"$listLocalSessions",outputStage:!1,fullScan:!1,firstStage:!0,score:1,env:[r.ATLAS,r.ON_PREM],meta:"stage",version:"3.6.0",apiVersions:[1],namespaces:[a.DATABASE],description:"Lists the sessions cached in memory by the mongod or mongos instance.",comment:"/**\n * users: Optional list of users for which local sessions need to be returned.\n * allUsers: Optional boolean value to specify whether to return local sessions for all users or not.\n */\n",snippet:"{\n allUsers: ${1:false},\n users: [\n { user: '${2:string}', db: '${3:string}' }\n ]\n}"},{name:"$lookup",value:"$lookup",label:"$lookup",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"3.2.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Performs a join between two collections.",comment:"/**\n * from: The target collection.\n * localField: The local join field.\n * foreignField: The target join field.\n * as: The name for the results.\n * pipeline: Optional pipeline to run on the foreign collection.\n * let: Optional variables to use in the pipeline field stages.\n */\n",snippet:"{\n from: ${1:collection},\n localField: ${2:field},\n foreignField: ${3:field},\n as: ${4:result}\n}"},{name:"$match",value:"$match",label:"$match",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"2.2.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Filters the document stream to allow only matching documents to pass through to subsequent stages.",comment:"/**\n * query: The query in MQL.\n */\n",snippet:"{\n ${1:query}\n}"},{name:"$merge",value:"$merge",label:"$merge",outputStage:!0,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ON_PREM],meta:"stage",version:"4.1.11",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Merges the resulting documents into a collection, optionally overriding existing documents.",comment:"/**\n * into: The target collection.\n * on: Fields to identify.\n * let: Defined variables.\n * whenMatched: Action for matching docs.\n * whenNotMatched: Action for non-matching docs.\n */\n",snippet:"{\n into: '${1:string}',\n on: '${2:string}',\n let: '${3:specification(s)}',\n whenMatched: '${4:string}',\n whenNotMatched: '${5:string}'\n}"},{name:"$merge",value:"$merge",label:"$merge",outputStage:!0,fullScan:!1,firstStage:!1,score:1,env:[r.ADL],meta:"stage",version:"4.0.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Merges the resulting documents into a collection, optionally overriding existing documents.",comment:"/**\n * atlas: Location to write the documents from the aggregation pipeline.\n * on: Fields to identify.\n * let: Defined variables.\n * whenMatched: Action for matching docs.\n * whenNotMatched: Action for non-matching docs.\n */\n",snippet:"{\n into: {\n atlas: {\n clusterName: '${1:atlasClusterName}',\n db: '${2:database}',\n coll: '${3:collection}',\n projectId: '${4:optionalAtlasProjectId}'\n }\n },\n on: '${5:identifier}',\n let: { ${6:specification(s)} },\n whenMatched: '${7:string}',\n whenNotMatched: '${8:string}'\n}"},{name:"$out",value:"$out",label:"$out",outputStage:!0,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ON_PREM],meta:"stage",version:"2.2.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Writes the result of a pipeline to a new or existing collection.",comment:"/**\n * Provide the name of the output database and collection.\n */\n",snippet:"{\n db: '${1:string}',\n coll: '${2:string}',\n /*\n timeseries: {\n timeField: '${3:field}',\n bucketMaxSpanSeconds: '${4:number}',\n granularity: '${5:granularity}'\n }\n */\n}"},{name:"$out",value:"$out",label:"$out",outputStage:!0,fullScan:!1,firstStage:!1,score:1,env:[r.ADL],meta:"stage",version:"4.0.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Writes the result of a pipeline to an Atlas cluster, S3 bucket, or Azure Blob Storage.",comment:"/**\n * Use any one of the following:\n * s3: Parameters to save the data to S3.\n * atlas: Parameters to save the data to Atlas. Example:\n * {\n * atlas: {\n * db: 'string',\n * coll: 'string',\n * projectId: 'string',\n * clusterName: 'string'\n * }\n * },\n * azure: Parameters to save the data to Azure. Example:\n * {\n * azure: {\n * serviceURL: 'string',\n * containerName: 'string',\n * region: 'string,\n * filename: 'string',\n * format: {\n * name: 'string',\n * maxFileSize: 'string',\n * maxRowGroupSize: 'string',\n * columnCompression: 'string'\n * },\n * errorMode: 'string'\n * }\n * }\n */\n",snippet:"{\n s3: {\n bucket: '${1:string}',\n region: '${2:string}',\n filename: '${3:string}',\n format: {\n name: '${4:string}',\n maxFileSize: '${5:bytes}',\n maxRowGroupSize: '${6:string}',\n columnCompression: '${7:string}'\n },\n errorMode: '${8:string}'\n }\n}"},{name:"$project",value:"$project",label:"$project",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"2.2.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Adds new field(s) to a document with a computed value, or reassigns an existing field(s) with a computed value. Unlike $addFields, $project can also remove fields.",comment:"/**\n * specifications: The fields to\n * include or exclude.\n */\n",snippet:"{\n ${1:specification(s)}\n}"},{name:"$rankFusion",value:"$rankFusion",label:"$rankFusion",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS],meta:"stage",version:"8.0.14",apiVersions:[],namespaces:[a.COLLECTION],description:"Combines multiple pipelines using reciprocal rank fusion to create hybrid search results.",comment:'/**\n * input.pipelines: Required. Map from name to input pipeline. Each pipeline must be a Ranked Selection Pipeline operating on the same collection. Minimum of one pipeline.\n * combination.weights: Optional. Map from pipeline name to numbers (non-negative). If unspecified, default weight is 1 for each pipeline.\n * scoreDetails: Optional. Default false. Set to true to include detailed scoring information in {$meta: "scoreDetails"} for debugging and tuning.\n */\n',snippet:"{\n input: {\n pipelines: {\n ${1:searchPipeline}: [\n {$search: {${2:searchStage}}},\n {$limit: ${3:limit}}\n ],\n ${4:vectorPipeline}: [\n {$vectorSearch: {${5:vectorSearchStage}}}\n ]\n }\n },\n combination: {\n weights: {\n ${6:searchPipeline}: ${7:number},\n ${8:vectorPipeline}: ${9:number}\n }\n },\n scoreDetails: ${10:false}\n}"},{name:"$redact",value:"$redact",label:"$redact",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"2.6.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Restricts the content for each document based on information stored in the documents themselves",comment:"/**\n * expression: Any valid expression that\n * evaluates to $$DESCEND, $$PRUNE, or $$KEEP.\n */\n",snippet:"{\n ${1:expression}\n}"},{name:"$replaceRoot",value:"$replaceRoot",label:"$replaceRoot",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"3.4.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Replaces a document with the specified embedded document.",comment:"/**\n * replacementDocument: A document or string.\n */\n",snippet:"{\n newRoot: ${1:replacementDocument}\n}"},{name:"$replaceWith",value:"$replaceWith",label:"$replaceWith",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"4.2.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Replaces a document with the specified embedded document.",comment:"/**\n * replacementDocument: A document or string.\n */\n",snippet:"{\n newWith: ${1:replacementDocument}\n}"},{name:"$sample",value:"$sample",label:"$sample",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"3.2.0",apiVersions:[1],namespaces:[...a.ANY_COLLECTION_NAMESPACE],description:"Randomly selects the specified number of documents from its input.",comment:"/**\n * size: The number of documents to sample.\n */\n",snippet:"{\n size: ${1:number}\n}"},{name:"$scoreFusion",value:"$scoreFusion",label:"$scoreFusion",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS],meta:"stage",version:"8.2.0",apiVersions:[],namespaces:[a.COLLECTION],description:"Combines multiple pipelines using relative score fusion to create hybrid search results.",comment:"/**\n * input.pipelines: Required. Map from name to input pipeline. Each pipeline must be operating on the same collection. Minimum of one pipeline.\n * input.normalization: Required. Normalizes the score to the range 0 to 1 before combining the results. Value can be none, sigmoid or minMaxScaler.\n * combination.weights: Optional. Map from pipeline name to numbers (non-negative). If unspecified, default weight is 1 for each pipeline.\n * combination.method: Optional. Specifies method for combining scores. Value can be avg or expression. Default is avg.\n * combination.expression: Optional. This is the custom expression that is used when combination.method is set to expression.\n * scoreDetails: Optional. Default false. Set to true to include detailed scoring information.\n */\n",snippet:"{\n input: {\n pipelines: {\n ${1:searchPipeline}: [\n {$search: {${2:searchStage}}},\n {$limit: ${3:limit}}\n ],\n ${4:vectorPipeline}: [\n {$vectorSearch: {${5:vectorSearchStage}}}\n ]\n },\n normalization: '${6:none|sigmoid|minMaxScaler}'\n },\n combination: {\n weights: {\n ${7:searchPipeline}: ${8:number},\n ${9:vectorPipeline}: ${10:number}\n },\n method: '${11:avg|expression}',\n expression: '${12:expression}'\n },\n scoreDetails: ${13:false}\n}"},{name:"$search",value:"$search",label:"$search",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS],meta:"stage",version:"4.1.11",apiVersions:[],namespaces:[a.COLLECTION,a.VIEW],description:"Performs a full-text search on the specified field(s).",comment:"/**\n * index: The name of the Search index.\n * text: Analyzed search, with required fields of query and path, the analyzed field(s) to search. Use matchCriteria to match 'any' or 'all' query terms.\n * compound: Combines ops.\n * span: Find in text field regions.\n * exists: Test for presence of a field.\n * near: Find near number or date.\n * range: Find in numeric or date range.\n */\n",snippet:"{\n index: '${1:string}',\n text: {\n query: '${2:string}',\n path: '${3:string}',\n matchCriteria: '${4:any}',\n }\n}"},{name:"$searchMeta",value:"$searchMeta",label:"$searchMeta",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS],meta:"stage",version:"4.4.9",apiVersions:[],namespaces:[a.COLLECTION,a.VIEW],description:"Performs a full-text search on the specified field(s) and gets back only the generated search meta data from a query.",comment:"/**\n * index: The name of the Search index.\n * count: The count of the results.\n * facet: {\n * operator: Analyzed search, with required fields of query and path, can either be replaced with the name of a valid operator.\n * facets: {\n * stringFacet: Narrows search results based on unique string values, with required fields of type and path.\n * numberFacet: Narrows search results by breaking them up into separate ranges of numbers, with required fields of type, path, and boundaries.\n * dateFacet: Narrows search results by breaking them up into separate ranges of dates, with required fields of type, path, and boundaries.\n * }\n * }\n */\n",snippet:"{\n index: ${1:string},\n facet: {\n operator: {\n text: {\n query: ${2:string},\n path: ${3:string}\n }\n },\n facets: {\n ${4:stringFacet}: {\n type: ${5:string},\n path: ${6:string},\n numBuckets: ${7:integer}\n },\n numberFacet: {\n type: 'number',\n path: ${8:string},\n boundaries: [${9:lowerbound}, ${10:upperbound}, ...],\n default: ${11:string}\n }\n }\n }\n}"},{name:"$set",value:"$set",label:"$set",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"4.2.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Adds new fields to documents. $set outputs documents that contain all existing fields from the input documents and newly added fields.",comment:"/**\n * field: The field name\n * expression: The expression.\n */\n",snippet:"{\n ${1:field}: ${2:expression}\n}"},{name:"$setWindowFields",value:"$setWindowFields",label:"$setWindowFields",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"5.0.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Capable of partitioning incoming data, and can apply one or more functions to defined windows within each partition.",comment:"/**\n * partitionBy: partitioning of data.\n * sortBy: fields to sort by.\n * output: {\n * path: {\n * function: The window function to compute over the given window.\n * window: {\n * documents: A number of documents before and after the current document.\n * range: A range of possible values around the value in the current document's sortBy field.\n * unit: Specifies the units for the window bounds.\n * }\n * }\n * }\n */\n",snippet:"{\n partitionBy: ${1:expression},\n sortBy: ${2:sortSpec},\n output: {\n ${3:path}: {\n ${4:function}: ${5:functionArgs},\n window: {\n documents: [${6:lowerbound}, ${7:upperbound}],\n range: [${8:lowerbound}, ${9:upperbound}],\n unit: ${10:string}\n }\n },\n ${11:path2}: ...\n }\n}"},{name:"$skip",value:"$skip",label:"$skip",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"2.2.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Skips a specified number of documents before advancing to the next stage.",comment:"/**\n * Provide the number of documents to skip.\n */\n",snippet:"${1:number}"},{name:"$sort",value:"$sort",label:"$sort",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"2.2.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Reorders the document stream by a specified sort key and direction.",comment:"/**\n * Provide any number of field/order pairs.\n */\n",snippet:"{\n ${1:field1}: ${2:sortOrder}\n}"},{name:"$sortByCount",value:"$sortByCount",label:"$sortByCount",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"3.4.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Groups incoming documents based on the value of a specified expression, then computes the count of documents in each distinct group.",comment:"/**\n * expression: Grouping expression or string.\n */\n",snippet:"{\n ${1:expression}\n}"},{name:"$unionWith",value:"$unionWith",label:"$unionWith",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"4.4.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Perform a union with a pipeline on another collection.",comment:"/**\n * coll: The collection name.\n * pipeline: The pipeline on the other collection.\n */\n",snippet:"{\n coll: '${1:coll}',\n pipeline: [${2:pipeline}]\n}"},{name:"$unset",value:"$unset",label:"$unset",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"4.2.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Excludes fields from the result document.",comment:"/**\n * Provide the field name to exclude.\n * To exclude multiple fields, pass the field names in an array.\n */\n",snippet:"'${1:string}'"},{name:"$unwind",value:"$unwind",label:"$unwind",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"2.2.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Outputs a new document for each element in a specified array. ",comment:"/**\n * path: Path to the array field.\n * includeArrayIndex: Optional name for index.\n * preserveNullAndEmptyArrays: Optional\n * toggle to unwind null and empty values.\n */\n",snippet:"{\n path: ${1:path},\n includeArrayIndex: '${2:string}',\n preserveNullAndEmptyArrays: ${3:boolean}\n}"},{name:"$vectorSearch",value:"$vectorSearch",label:"$vectorSearch",outputStage:!1,fullScan:!1,firstStage:!0,score:1,env:[r.ATLAS],meta:"stage",version:">=6.0.10 <7.0.0 || >=7.0.2",apiVersions:[],namespaces:[a.COLLECTION,a.VIEW],description:"Performs a kNN search on embeddings in the specified field(s)",comment:"/**\n * queryVector: Array of numbers of BSON types `int` or `double` that represent the query vector. The array size must match the number of vector dimensions specified in the index for the field. (Required)\n * path: The field to search. (Required)\n * numCandidates: Number of nearest neighbors to use during the search. You can specify a number higher than the number of documents to return (`limit`) to increase accuracy. (Required)\n * index: Name of the Atlas Search index to use. (Required)\n * limit: Number (of type `int` only) of documents to return in the results. (Required)\n * filter: Any MongoDB Query Language (MQL) match expression that compares an indexed field with a boolean, number (not decimals), or string to use as a prefilter. (Optional)\n * exact: Choose between false for ANN (Approximate Nearest Neighbor) and true for ENN (Exact Nearest Neighbor). Defaults to false. (Optional)\n */\n",snippet:"{\n queryVector: [${1:dimension1}, ${2:dimension2}, ...],\n path: ${3:string},\n numCandidates: ${4:numCandidates},\n index: ${5:string},\n limit: ${6:limit},\n filter: {${7:expression}},\n exact: ${8:boolean}\n}"}];t.STAGE_OPERATORS=s;const i=s.map((e=>e.name));t.STAGE_OPERATOR_NAMES=i;const o=s.filter((e=>e.outputStage));t.OUT_STAGES=o;const l=s.filter((e=>e.fullScan));t.FULL_SCAN_STAGES=l;const c=s.filter((e=>e.firstStage));t.REQUIRED_AS_FIRST_STAGE=c},72082:(e,t,n)=>{var r=n(65994).e;const a="object"==typeof r&&r.env&&r.env.NODE_DEBUG&&/\bsemver\b/i.test(r.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};e.exports=a},72510:(e,t,n)=>{function r(e){const t=Object.values(e).filter((e=>"number"==typeof e));return Object.entries(e).filter((([e,n])=>-1===t.indexOf(+e))).map((([e,t])=>t))}function a(e,t){return"bigint"==typeof t?t.toString():t}function s(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function i(e){return null==e}function o(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function l(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,a=n>r?n:r;return Number.parseInt(e.toFixed(a).replace(".",""))%Number.parseInt(t.toFixed(a).replace(".",""))/10**a}function c(e,t,n){Object.defineProperty(e,t,{get(){{const r=n();return e[t]=r,r}},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function u(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function p(e){return JSON.stringify(e)}n.d(t,{$f:()=>g,A2:()=>$,Gv:()=>m,LG:()=>l,NM:()=>b,OH:()=>w,PO:()=>s,QH:()=>N,Qd:()=>f,Rc:()=>C,UQ:()=>p,Up:()=>S,Vy:()=>u,X$:()=>_,cJ:()=>A,cl:()=>i,gJ:()=>c,gx:()=>d,h1:()=>x,hI:()=>h,iR:()=>R,k8:()=>a,lQ:()=>I,mw:()=>O,o8:()=>y,p6:()=>o,qQ:()=>v,sn:()=>k,w5:()=>r,zH:()=>E});const d=Error.captureStackTrace?Error.captureStackTrace:(...e)=>{};function m(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}const h=s((()=>{if("undefined"!=typeof navigator&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch(e){return!1}}));function f(e){if(!1===m(e))return!1;const t=e.constructor;if(void 0===t)return!0;const n=t.prototype;return!1!==m(n)&&!1!==Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")}const v=new Set(["string","number","symbol"]);function g(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function y(e,t,n){const r=new e._zod.constr(t??e._zod.def);return t&&!n?.parent||(r._zod.parent=e),r}function $(e){const t=e;if(!t)return{};if("string"==typeof t)return{error:()=>t};if(void 0!==t?.message){if(void 0!==t?.error)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,"string"==typeof t.error?{...t,error:()=>t.error}:t}function b(e){return Object.keys(e).filter((t=>"optional"===e[t]._zod.optin&&"optional"===e[t]._zod.optout))}new Set(["string","number","bigint","boolean","symbol","undefined"]);const E={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function S(e,t){const n={},r=e._zod.def;for(const e in t){if(!(e in r.shape))throw new Error(`Unrecognized key: "${e}"`);t[e]&&(n[e]=r.shape[e])}return y(e,{...e._zod.def,shape:n,checks:[]})}function A(e,t){const n={...e._zod.def.shape},r=e._zod.def;for(const e in t){if(!(e in r.shape))throw new Error(`Unrecognized key: "${e}"`);t[e]&&delete n[e]}return y(e,{...e._zod.def,shape:n,checks:[]})}function _(e,t){if(!f(t))throw new Error("Invalid input to extend: expected a plain object");const n={...e._zod.def,get shape(){const n={...e._zod.def.shape,...t};return u(this,"shape",n),n},checks:[]};return y(e,n)}function x(e,t){return y(e,{...e._zod.def,get shape(){const n={...e._zod.def.shape,...t._zod.def.shape};return u(this,"shape",n),n},catchall:t._zod.def.catchall,checks:[]})}function w(e,t,n){const r=t._zod.def.shape,a={...r};if(n)for(const t in n){if(!(t in r))throw new Error(`Unrecognized key: "${t}"`);n[t]&&(a[t]=e?new e({type:"optional",innerType:r[t]}):r[t])}else for(const t in r)a[t]=e?new e({type:"optional",innerType:r[t]}):r[t];return y(t,{...t._zod.def,shape:a,checks:[]})}function O(e,t,n){const r=t._zod.def.shape,a={...r};if(n)for(const t in n){if(!(t in a))throw new Error(`Unrecognized key: "${t}"`);n[t]&&(a[t]=new e({type:"nonoptional",innerType:r[t]}))}else for(const t in r)a[t]=new e({type:"nonoptional",innerType:r[t]});return y(t,{...t._zod.def,shape:a,checks:[]})}function N(e,t=0){for(let n=t;n<e.issues.length;n++)if(!0!==e.issues[n]?.continue)return!0;return!1}function I(e,t){return t.map((t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t}))}function T(e){return"string"==typeof e?e:e?.message}function R(e,t,n){const r={...e,path:e.path??[]};if(!e.message){const a=T(e.inst?._zod.def?.error?.(e))??T(t?.error?.(e))??T(n.customError?.(e))??T(n.localeError?.(e))??"Invalid input";r.message=a}return delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function C(e){return Array.isArray(e)?"array":"string"==typeof e?"string":"unknown"}function k(...e){const[t,n,r]=e;return"string"==typeof t?{message:t,code:"custom",input:n,inst:r}:{...t}}},72608:(e,t,n)=>{const r=n(70692);e.exports=(e,t,n)=>r(e,t,n)>0},72849:(e,t,n)=>{const r=n(20360);e.exports=(e,t,n)=>{try{t=new r(t,n)}catch(e){return!1}return t.test(e)}},72857:(e,t,n)=>{const r=/\s+/g;class a{constructor(e,t){if(t=i(t),e instanceof a)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new a(e.raw,t);if(e instanceof o)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e.trim().replace(r," "),this.set=this.raw.split("||").map((e=>this.parseRange(e.trim()))).filter((e=>e.length)),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter((e=>!g(e[0]))),0===this.set.length)this.set=[e];else if(this.set.length>1)for(const e of this.set)if(1===e.length&&y(e[0])){this.set=[e];break}}this.formatted=void 0}get range(){if(void 0===this.formatted){this.formatted="";for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+="||");const t=this.set[e];for(let e=0;e<t.length;e++)e>0&&(this.formatted+=" "),this.formatted+=t[e].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){const t=((this.options.includePrerelease&&f)|(this.options.loose&&v))+":"+e,n=s.get(t);if(n)return n;const r=this.options.loose,a=r?u[p.HYPHENRANGELOOSE]:u[p.HYPHENRANGE];e=e.replace(a,T(this.options.includePrerelease)),l("hyphen replace",e),e=e.replace(u[p.COMPARATORTRIM],d),l("comparator trim",e),e=e.replace(u[p.TILDETRIM],m),l("tilde trim",e),e=e.replace(u[p.CARETTRIM],h),l("caret trim",e);let i=e.split(" ").map((e=>b(e,this.options))).join(" ").split(/\s+/).map((e=>I(e,this.options)));r&&(i=i.filter((e=>(l("loose invalid filter",e,this.options),!!e.match(u[p.COMPARATORLOOSE]))))),l("range list",i);const c=new Map,y=i.map((e=>new o(e,this.options)));for(const e of y){if(g(e))return[e];c.set(e.value,e)}c.size>1&&c.has("")&&c.delete("");const $=[...c.values()];return s.set(t,$),$}intersects(e,t){if(!(e instanceof a))throw new TypeError("a Range is required");return this.set.some((n=>$(n,t)&&e.set.some((e=>$(e,t)&&n.every((n=>e.every((e=>n.intersects(e,t)))))))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new c(e,this.options)}catch(e){return!1}for(let t=0;t<this.set.length;t++)if(R(this.set[t],e,this.options))return!0;return!1}}e.exports=a;const s=new(n(13016)),i=n(31145),o=n(67094),l=n(71598),c=n(50066),{safeRe:u,t:p,comparatorTrimReplace:d,tildeTrimReplace:m,caretTrimReplace:h}=n(65684),{FLAG_INCLUDE_PRERELEASE:f,FLAG_LOOSE:v}=n(47755),g=e=>"<0.0.0-0"===e.value,y=e=>""===e.value,$=(e,t)=>{let n=!0;const r=e.slice();let a=r.pop();for(;n&&r.length;)n=r.every((e=>a.intersects(e,t))),a=r.pop();return n},b=(e,t)=>(l("comp",e,t),e=_(e,t),l("caret",e),e=S(e,t),l("tildes",e),e=w(e,t),l("xrange",e),e=N(e,t),l("stars",e),e),E=e=>!e||"x"===e.toLowerCase()||"*"===e,S=(e,t)=>e.trim().split(/\s+/).map((e=>A(e,t))).join(" "),A=(e,t)=>{const n=t.loose?u[p.TILDELOOSE]:u[p.TILDE];return e.replace(n,((t,n,r,a,s)=>{let i;return l("tilde",e,t,n,r,a,s),E(n)?i="":E(r)?i=`>=${n}.0.0 <${+n+1}.0.0-0`:E(a)?i=`>=${n}.${r}.0 <${n}.${+r+1}.0-0`:s?(l("replaceTilde pr",s),i=`>=${n}.${r}.${a}-${s} <${n}.${+r+1}.0-0`):i=`>=${n}.${r}.${a} <${n}.${+r+1}.0-0`,l("tilde return",i),i}))},_=(e,t)=>e.trim().split(/\s+/).map((e=>x(e,t))).join(" "),x=(e,t)=>{l("caret",e,t);const n=t.loose?u[p.CARETLOOSE]:u[p.CARET],r=t.includePrerelease?"-0":"";return e.replace(n,((t,n,a,s,i)=>{let o;return l("caret",e,t,n,a,s,i),E(n)?o="":E(a)?o=`>=${n}.0.0${r} <${+n+1}.0.0-0`:E(s)?o="0"===n?`>=${n}.${a}.0${r} <${n}.${+a+1}.0-0`:`>=${n}.${a}.0${r} <${+n+1}.0.0-0`:i?(l("replaceCaret pr",i),o="0"===n?"0"===a?`>=${n}.${a}.${s}-${i} <${n}.${a}.${+s+1}-0`:`>=${n}.${a}.${s}-${i} <${n}.${+a+1}.0-0`:`>=${n}.${a}.${s}-${i} <${+n+1}.0.0-0`):(l("no pr"),o="0"===n?"0"===a?`>=${n}.${a}.${s}${r} <${n}.${a}.${+s+1}-0`:`>=${n}.${a}.${s}${r} <${n}.${+a+1}.0-0`:`>=${n}.${a}.${s} <${+n+1}.0.0-0`),l("caret return",o),o}))},w=(e,t)=>(l("replaceXRanges",e,t),e.split(/\s+/).map((e=>O(e,t))).join(" ")),O=(e,t)=>{e=e.trim();const n=t.loose?u[p.XRANGELOOSE]:u[p.XRANGE];return e.replace(n,((n,r,a,s,i,o)=>{l("xRange",e,n,r,a,s,i,o);const c=E(a),u=c||E(s),p=u||E(i),d=p;return"="===r&&d&&(r=""),o=t.includePrerelease?"-0":"",c?n=">"===r||"<"===r?"<0.0.0-0":"*":r&&d?(u&&(s=0),i=0,">"===r?(r=">=",u?(a=+a+1,s=0,i=0):(s=+s+1,i=0)):"<="===r&&(r="<",u?a=+a+1:s=+s+1),"<"===r&&(o="-0"),n=`${r+a}.${s}.${i}${o}`):u?n=`>=${a}.0.0${o} <${+a+1}.0.0-0`:p&&(n=`>=${a}.${s}.0${o} <${a}.${+s+1}.0-0`),l("xRange return",n),n}))},N=(e,t)=>(l("replaceStars",e,t),e.trim().replace(u[p.STAR],"")),I=(e,t)=>(l("replaceGTE0",e,t),e.trim().replace(u[t.includePrerelease?p.GTE0PRE:p.GTE0],"")),T=e=>(t,n,r,a,s,i,o,l,c,u,p,d)=>`${n=E(r)?"":E(a)?`>=${r}.0.0${e?"-0":""}`:E(s)?`>=${r}.${a}.0${e?"-0":""}`:i?`>=${n}`:`>=${n}${e?"-0":""}`} ${l=E(c)?"":E(u)?`<${+c+1}.0.0-0`:E(p)?`<${c}.${+u+1}.0-0`:d?`<=${c}.${u}.${p}-${d}`:e?`<${c}.${u}.${+p+1}-0`:`<=${l}`}`.trim(),R=(e,t,n)=>{for(let n=0;n<e.length;n++)if(!e[n].test(t))return!1;if(t.prerelease.length&&!n.includePrerelease){for(let n=0;n<e.length;n++)if(l(e[n].semver),e[n].semver!==o.ANY&&e[n].semver.prerelease.length>0){const r=e[n].semver;if(r.major===t.major&&r.minor===t.minor&&r.patch===t.patch)return!0}return!1}return!0}},73634:(e,t,n)=>{const r=n(71333);e.exports=(e,t,n)=>(e=new r(e,n),t=new r(t,n),e.intersects(t,n))},73746:(e,t,n)=>{const r=n(66283);e.exports=(e,t,n,a,s)=>{"string"==typeof n&&(s=a,a=n,n=void 0);try{return new r(e instanceof r?e.version:e,n).inc(t,a,s).version}catch(e){return null}}},74145:(e,t,n)=>{const r=n(48381);e.exports=(e,t)=>new r(e,t).minor},74227:(e,t,n)=>{const r=n(32674);e.exports=(e,t,n)=>r(e,t,n)>=0},75092:(e,t,n)=>{const r=n(70692);e.exports=(e,t,n)=>r(e,t,n)<=0},75265:(e,t,n)=>{const r=n(57544);e.exports=(e,t,n)=>{const a=new r(e,n),s=new r(t,n);return a.compare(s)||a.compareBuild(s)}},75459:(e,t,n)=>{var r=n(40811);e.exports=new r("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return null!==e?e:""}})},75689:(e,t,n)=>{const r=n(66283),a=n(59441),{safeRe:s,t:i}=n(415);e.exports=(e,t)=>{if(e instanceof r)return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;let n=null;if((t=t||{}).rtl){const r=t.includePrerelease?s[i.COERCERTLFULL]:s[i.COERCERTL];let a;for(;(a=r.exec(e))&&(!n||n.index+n[0].length!==e.length);)n&&a.index+a[0].length===n.index+n[0].length||(n=a),r.lastIndex=a.index+a[1].length+a[2].length;r.lastIndex=-1}else n=e.match(t.includePrerelease?s[i.COERCEFULL]:s[i.COERCE]);if(null===n)return null;const o=n[2],l=n[3]||"0",c=n[4]||"0",u=t.includePrerelease&&n[5]?`-${n[5]}`:"",p=t.includePrerelease&&n[6]?`+${n[6]}`:"";return a(`${o}.${l}.${c}${u}${p}`,t)}},75732:(e,t,n)=>{const r=Symbol("SemVer ANY");class a{static get ANY(){return r}constructor(e,t){if(t=s(t),e instanceof a){if(e.loose===!!t.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),c("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===r?this.value="":this.value=this.operator+this.semver.version,c("comp",this)}parse(e){const t=this.options.loose?i[o.COMPARATORLOOSE]:i[o.COMPARATOR],n=e.match(t);if(!n)throw new TypeError(`Invalid comparator: ${e}`);this.operator=void 0!==n[1]?n[1]:"","="===this.operator&&(this.operator=""),n[2]?this.semver=new u(n[2],this.options.loose):this.semver=r}toString(){return this.value}test(e){if(c("Comparator.test",e,this.options.loose),this.semver===r||e===r)return!0;if("string"==typeof e)try{e=new u(e,this.options)}catch(e){return!1}return l(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof a))throw new TypeError("a Comparator is required");return""===this.operator?""===this.value||new p(e.value,t).test(this.value):""===e.operator?""===e.value||new p(this.value,t).test(e.semver):!((t=s(t)).includePrerelease&&("<0.0.0-0"===this.value||"<0.0.0-0"===e.value)||!t.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))||(!this.operator.startsWith(">")||!e.operator.startsWith(">"))&&(!this.operator.startsWith("<")||!e.operator.startsWith("<"))&&(this.semver.version!==e.semver.version||!this.operator.includes("=")||!e.operator.includes("="))&&!(l(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<"))&&!(l(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}}e.exports=a;const s=n(43639),{safeRe:i,t:o}=n(25522),l=n(77043),c=n(49764),u=n(57544),p=n(95323)},75982:(e,t,n)=>{const r=n(36165),a=n(64136),s=n(88825),i=n(67274),o=n(98855),l=n(46526),c=n(65789),u=n(47384),p=n(4113),d=n(12169),m=n(9357),h=n(29478),f=n(160),v=n(25583),g=n(24975),y=n(98736),$=n(56206),b=n(9982),E=n(81521),S=n(51269),A=n(18082),_=n(26620),x=n(32056),w=n(54838),O=n(71851),N=n(5544),I=n(52539),T=n(67105),R=n(20360),C=n(72849),k=n(47544),L=n(79779),P=n(38185),M=n(23252),j=n(78767),D=n(87866),F=n(22038),V=n(4827),q=n(27995),B=n(88834),U=n(99571);e.exports={parse:o,valid:l,clean:c,inc:u,diff:p,major:d,minor:m,patch:h,prerelease:f,compare:v,rcompare:g,compareLoose:y,compareBuild:$,sort:b,rsort:E,gt:S,lt:A,eq:_,neq:x,gte:w,lte:O,cmp:N,coerce:I,Comparator:T,Range:R,satisfies:C,toComparators:k,maxSatisfying:L,minSatisfying:P,minVersion:M,validRange:j,outside:D,gtr:F,ltr:V,intersects:q,simplifyRange:B,subset:U,SemVer:s,re:r.re,src:r.src,tokens:r.t,SEMVER_SPEC_VERSION:a.SEMVER_SPEC_VERSION,RELEASE_TYPES:a.RELEASE_TYPES,compareIdentifiers:i.compareIdentifiers,rcompareIdentifiers:i.rcompareIdentifiers}},76130:(e,t,n)=>{const r=n(32910);e.exports=(e,t,n)=>r(e,t,">",n)},76393:e=>{const t=/^[0-9]+$/,n=(e,n)=>{const r=t.test(e),a=t.test(n);return r&&a&&(e=+e,n=+n),e===n?0:r&&!a?-1:a&&!r?1:e<n?-1:1};e.exports={compareIdentifiers:n,rcompareIdentifiers:(e,t)=>n(t,e)}},76462:(e,t,n)=>{var r=n(99174),a=n(4414),s=n(57116),i=n(18184),o=Object.prototype.toString,l=Object.prototype.hasOwnProperty,c=9,u=10,p=13,d=32,m=33,h=34,f=35,v=37,g=38,y=39,$=42,b=44,E=45,S=58,A=61,_=62,x=63,w=64,O=91,N=93,I=96,T=123,R=124,C=125,k={0:"\\0",7:"\\a",8:"\\b",9:"\\t",10:"\\n",11:"\\v",12:"\\f",13:"\\r",27:"\\e",34:'\\"',92:"\\\\",133:"\\N",160:"\\_",8232:"\\L",8233:"\\P"},L=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];function P(e){var t,n,s;if(t=e.toString(16).toUpperCase(),e<=255)n="x",s=2;else if(e<=65535)n="u",s=4;else{if(!(e<=4294967295))throw new a("code point within a string may not be greater than 0xFFFFFFFF");n="U",s=8}return"\\"+n+r.repeat("0",s-t.length)+t}function M(e){this.schema=e.schema||s,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=r.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=function(e,t){var n,r,a,s,i,o,c;if(null===t)return{};for(n={},a=0,s=(r=Object.keys(t)).length;a<s;a+=1)i=r[a],o=String(t[i]),"!!"===i.slice(0,2)&&(i="tag:yaml.org,2002:"+i.slice(2)),(c=e.compiledTypeMap.fallback[i])&&l.call(c.styleAliases,o)&&(o=c.styleAliases[o]),n[i]=o;return n}(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function j(e,t){for(var n,a=r.repeat(" ",t),s=0,i=-1,o="",l=e.length;s<l;)-1===(i=e.indexOf("\n",s))?(n=e.slice(s),s=l):(n=e.slice(s,i+1),s=i+1),n.length&&"\n"!==n&&(o+=a),o+=n;return o}function D(e,t){return"\n"+r.repeat(" ",e.indent*t)}function F(e){return e===d||e===c}function V(e){return 32<=e&&e<=126||161<=e&&e<=55295&&8232!==e&&8233!==e||57344<=e&&e<=65533&&65279!==e||65536<=e&&e<=1114111}function q(e,t){return V(e)&&65279!==e&&e!==b&&e!==O&&e!==N&&e!==T&&e!==C&&e!==S&&(e!==f||t&&function(e){return V(e)&&!F(e)&&65279!==e&&e!==p&&e!==u}(t))}function B(e){return/^\n* /.test(e)}var U=1,Y=2,z=3,Z=4,G=5;function W(e,t,n,r){e.dump=function(){if(0===t.length)return"''";if(!e.noCompatMode&&-1!==L.indexOf(t))return"'"+t+"'";var s=e.indent*Math.max(1,n),i=-1===e.lineWidth?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-s),o=r||e.flowLevel>-1&&n>=e.flowLevel;switch(function(e,t,n,r,a){var s,i,o,l,c=!1,p=!1,d=-1!==r,k=-1,L=V(l=e.charCodeAt(0))&&65279!==l&&!F(l)&&l!==E&&l!==x&&l!==S&&l!==b&&l!==O&&l!==N&&l!==T&&l!==C&&l!==f&&l!==g&&l!==$&&l!==m&&l!==R&&l!==A&&l!==_&&l!==y&&l!==h&&l!==v&&l!==w&&l!==I&&!F(e.charCodeAt(e.length-1));if(t)for(s=0;s<e.length;s++){if(!V(i=e.charCodeAt(s)))return G;o=s>0?e.charCodeAt(s-1):null,L=L&&q(i,o)}else{for(s=0;s<e.length;s++){if((i=e.charCodeAt(s))===u)c=!0,d&&(p=p||s-k-1>r&&" "!==e[k+1],k=s);else if(!V(i))return G;o=s>0?e.charCodeAt(s-1):null,L=L&&q(i,o)}p=p||d&&s-k-1>r&&" "!==e[k+1]}return c||p?n>9&&B(e)?G:p?Z:z:L&&!a(e)?U:Y}(t,o,e.indent,i,(function(t){return function(e,t){var n,r;for(n=0,r=e.implicitTypes.length;n<r;n+=1)if(e.implicitTypes[n].resolve(t))return!0;return!1}(e,t)}))){case U:return t;case Y:return"'"+t.replace(/'/g,"''")+"'";case z:return"|"+H(t,e.indent)+K(j(t,s));case Z:return">"+H(t,e.indent)+K(j(function(e,t){for(var n,r,a,s=/(\n+)([^\n]*)/g,i=(a=-1!==(a=e.indexOf("\n"))?a:e.length,s.lastIndex=a,X(e.slice(0,a),t)),o="\n"===e[0]||" "===e[0];r=s.exec(e);){var l=r[1],c=r[2];n=" "===c[0],i+=l+(o||n||""===c?"":"\n")+X(c,t),o=n}return i}(t,i),s));case G:return'"'+function(e){for(var t,n,r,a="",s=0;s<e.length;s++)(t=e.charCodeAt(s))>=55296&&t<=56319&&(n=e.charCodeAt(s+1))>=56320&&n<=57343?(a+=P(1024*(t-55296)+n-56320+65536),s++):a+=!(r=k[t])&&V(t)?e[s]:r||P(t);return a}(t)+'"';default:throw new a("impossible error: invalid scalar style")}}()}function H(e,t){var n=B(e)?String(t):"",r="\n"===e[e.length-1];return n+(!r||"\n"!==e[e.length-2]&&"\n"!==e?r?"":"-":"+")+"\n"}function K(e){return"\n"===e[e.length-1]?e.slice(0,-1):e}function X(e,t){if(""===e||" "===e[0])return e;for(var n,r,a=/ [^ ]/g,s=0,i=0,o=0,l="";n=a.exec(e);)(o=n.index)-s>t&&(r=i>s?i:o,l+="\n"+e.slice(s,r),s=r+1),i=o;return l+="\n",e.length-s>t&&i>s?l+=e.slice(s,i)+"\n"+e.slice(i+1):l+=e.slice(s),l.slice(1)}function J(e,t,n){var r,s,i,c,u,p;for(i=0,c=(s=n?e.explicitTypes:e.implicitTypes).length;i<c;i+=1)if(((u=s[i]).instanceOf||u.predicate)&&(!u.instanceOf||"object"==typeof t&&t instanceof u.instanceOf)&&(!u.predicate||u.predicate(t))){if(e.tag=n?u.tag:"?",u.represent){if(p=e.styleMap[u.tag]||u.defaultStyle,"[object Function]"===o.call(u.represent))r=u.represent(t,p);else{if(!l.call(u.represent,p))throw new a("!<"+u.tag+'> tag resolver accepts not "'+p+'" style');r=u.represent[p](t,p)}e.dump=r}return!0}return!1}function Q(e,t,n,r,s,i){e.tag=null,e.dump=n,J(e,n,!1)||J(e,n,!0);var l=o.call(e.dump);r&&(r=e.flowLevel<0||e.flowLevel>t);var c,p,d="[object Object]"===l||"[object Array]"===l;if(d&&(p=-1!==(c=e.duplicates.indexOf(n))),(null!==e.tag&&"?"!==e.tag||p||2!==e.indent&&t>0)&&(s=!1),p&&e.usedDuplicates[c])e.dump="*ref_"+c;else{if(d&&p&&!e.usedDuplicates[c]&&(e.usedDuplicates[c]=!0),"[object Object]"===l)r&&0!==Object.keys(e.dump).length?(function(e,t,n,r){var s,i,o,l,c,p,d="",m=e.tag,h=Object.keys(n);if(!0===e.sortKeys)h.sort();else if("function"==typeof e.sortKeys)h.sort(e.sortKeys);else if(e.sortKeys)throw new a("sortKeys must be a boolean or a function");for(s=0,i=h.length;s<i;s+=1)p="",r&&0===s||(p+=D(e,t)),l=n[o=h[s]],Q(e,t+1,o,!0,!0,!0)&&((c=null!==e.tag&&"?"!==e.tag||e.dump&&e.dump.length>1024)&&(e.dump&&u===e.dump.charCodeAt(0)?p+="?":p+="? "),p+=e.dump,c&&(p+=D(e,t)),Q(e,t+1,l,!0,c)&&(e.dump&&u===e.dump.charCodeAt(0)?p+=":":p+=": ",d+=p+=e.dump));e.tag=m,e.dump=d||"{}"}(e,t,e.dump,s),p&&(e.dump="&ref_"+c+e.dump)):(function(e,t,n){var r,a,s,i,o,l="",c=e.tag,u=Object.keys(n);for(r=0,a=u.length;r<a;r+=1)o="",0!==r&&(o+=", "),e.condenseFlow&&(o+='"'),i=n[s=u[r]],Q(e,t,s,!1,!1)&&(e.dump.length>1024&&(o+="? "),o+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),Q(e,t,i,!1,!1)&&(l+=o+=e.dump));e.tag=c,e.dump="{"+l+"}"}(e,t,e.dump),p&&(e.dump="&ref_"+c+" "+e.dump));else if("[object Array]"===l){var m=e.noArrayIndent&&t>0?t-1:t;r&&0!==e.dump.length?(function(e,t,n,r){var a,s,i="",o=e.tag;for(a=0,s=n.length;a<s;a+=1)Q(e,t+1,n[a],!0,!0)&&(r&&0===a||(i+=D(e,t)),e.dump&&u===e.dump.charCodeAt(0)?i+="-":i+="- ",i+=e.dump);e.tag=o,e.dump=i||"[]"}(e,m,e.dump,s),p&&(e.dump="&ref_"+c+e.dump)):(function(e,t,n){var r,a,s="",i=e.tag;for(r=0,a=n.length;r<a;r+=1)Q(e,t,n[r],!1,!1)&&(0!==r&&(s+=","+(e.condenseFlow?"":" ")),s+=e.dump);e.tag=i,e.dump="["+s+"]"}(e,m,e.dump),p&&(e.dump="&ref_"+c+" "+e.dump))}else{if("[object String]"!==l){if(e.skipInvalid)return!1;throw new a("unacceptable kind of an object to dump "+l)}"?"!==e.tag&&W(e,e.dump,t,i)}null!==e.tag&&"?"!==e.tag&&(e.dump="!<"+e.tag+"> "+e.dump)}return!0}function ee(e,t){var n,r,a=[],s=[];for(te(e,a,s),n=0,r=s.length;n<r;n+=1)t.duplicates.push(a[s[n]]);t.usedDuplicates=new Array(r)}function te(e,t,n){var r,a,s;if(null!==e&&"object"==typeof e)if(-1!==(a=t.indexOf(e)))-1===n.indexOf(a)&&n.push(a);else if(t.push(e),Array.isArray(e))for(a=0,s=e.length;a<s;a+=1)te(e[a],t,n);else for(a=0,s=(r=Object.keys(e)).length;a<s;a+=1)te(e[r[a]],t,n)}function ne(e,t){var n=new M(t=t||{});return n.noRefs||ee(e,n),Q(n,0,e,!0,!0)?n.dump+"\n":""}e.exports.dump=ne,e.exports.safeDump=function(e,t){return ne(e,r.extend({schema:i},t))}},76654:(e,t,n)=>{const r=n(83586);e.exports=(e,t)=>{const n=r(e,null,!0),a=r(t,null,!0),s=n.compare(a);if(0===s)return null;const i=s>0,o=i?n:a,l=i?a:n,c=!!o.prerelease.length;if(l.prerelease.length&&!c){if(!l.patch&&!l.minor)return"major";if(0===l.compareMain(o))return l.minor&&!l.patch?"minor":"patch"}const u=c?"pre":"";return n.major!==a.major?u+"major":n.minor!==a.minor?u+"minor":n.patch!==a.patch?u+"patch":"prerelease"}},77043:(e,t,n)=>{const r=n(35229),a=n(67531),s=n(72608),i=n(70509),o=n(86391),l=n(75092);e.exports=(e,t,n,c)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e===n;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e!==n;case"":case"=":case"==":return r(e,n,c);case"!=":return a(e,n,c);case">":return s(e,n,c);case">=":return i(e,n,c);case"<":return o(e,n,c);case"<=":return l(e,n,c);default:throw new TypeError(`Invalid operator: ${t}`)}}},77192:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BSON_TYPES=void 0,t.BSON_TYPES=[{name:"Code",value:"Code",label:"Code",score:1,meta:"bson",version:"0.0.0",description:"BSON Code type",snippet:"Code('${1:code}')"},{name:"ObjectId",value:"ObjectId",label:"ObjectId",score:1,meta:"bson",version:"0.0.0",description:"BSON ObjectId type",snippet:"ObjectId('${1:id}')"},{name:"Binary",value:"Binary",label:"Binary",score:1,meta:"bson",version:"0.0.0",description:"BSON Binary type",snippet:"Binary('${1:data}', '${2:subType}')"},{name:"DBRef",value:"DBRef",label:"DBRef",score:1,meta:"bson",version:"0.0.0",description:"BSON DBRef type",snippet:"DBRef('${1:ns}', '${2:oid}')"},{name:"Timestamp",value:"Timestamp",label:"Timestamp",score:1,meta:"bson",version:"0.0.0",description:"BSON Timestamp type",snippet:"Timestamp(${1:low}, ${2:high})"},{name:"NumberInt",value:"NumberInt",label:"NumberInt",score:1,meta:"bson",version:"0.0.0",description:"BSON 32 bit Integer type",snippet:"NumberInt(${1:value})"},{name:"NumberLong",value:"NumberLong",label:"NumberLong",score:1,meta:"bson",version:"0.0.0",description:"BSON 64 but Integer type",snippet:"NumberLong(${1:value})"},{name:"NumberDecimal",value:"NumberDecimal",label:"NumberDecimal",score:1,meta:"bson",version:"3.4.0",description:"BSON Decimal128 type",snippet:"NumberDecimal('${1:value}')"},{name:"MaxKey",value:"MaxKey",label:"MaxKey",score:1,meta:"bson",version:"0.0.0",description:"BSON MaxKey type",snippet:"MaxKey()"},{name:"MinKey",value:"MinKey",label:"MinKey",score:1,meta:"bson",version:"0.0.0",description:"BSON MinKey type",snippet:"MinKey()"},{name:"ISODate",value:"ISODate",label:"ISODate",score:1,meta:"bson",version:"0.0.0",description:"BSON Date type",snippet:"ISODate('${1:date}')"},{name:"RegExp",value:"RegExp",label:"RegExp",score:1,meta:"bson",version:"0.0.0",description:"BSON Regex type",snippet:"RegExp('${1:source}', '${2:opts}')"}]},77203:(e,t,n)=>{const r=n(48381);e.exports=(e,t,n)=>new r(e,n).compare(new r(t,n))},77277:(e,t,n)=>{const r=n(34219);e.exports=(e,t)=>{const n=r(e,null,!0),a=r(t,null,!0),s=n.compare(a);if(0===s)return null;const i=s>0,o=i?n:a,l=i?a:n,c=!!o.prerelease.length;if(l.prerelease.length&&!c){if(!l.patch&&!l.minor)return"major";if(0===l.compareMain(o))return l.minor&&!l.patch?"minor":"patch"}const u=c?"pre":"";return n.major!==a.major?u+"major":n.minor!==a.minor?u+"minor":n.patch!==a.patch?u+"patch":"prerelease"}},77467:(e,t,n)=>{const r=n(41694),a=n(71333),s=n(43334);e.exports=(e,t)=>{e=new a(e,t);let n=new r("0.0.0");if(e.test(n))return n;if(n=new r("0.0.0-0"),e.test(n))return n;n=null;for(let t=0;t<e.set.length;++t){const a=e.set[t];let i=null;a.forEach((e=>{const t=new r(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":i&&!s(t,i)||(i=t);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${e.operator}`)}})),!i||n&&!s(n,i)||(n=i)}return n&&e.test(n)?n:null}},77693:e=>{const t=Number.MAX_SAFE_INTEGER||9007199254740991;e.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:t,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}},77973:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BSON_TYPES=void 0,t.BSON_TYPES=[{name:"Code",value:"Code",label:"Code",score:1,meta:"bson",version:"0.0.0",description:"BSON Code type",snippet:"Code('${1:code}')"},{name:"ObjectId",value:"ObjectId",label:"ObjectId",score:1,meta:"bson",version:"0.0.0",description:"BSON ObjectId type",snippet:"ObjectId('${1:id}')"},{name:"Binary",value:"Binary",label:"Binary",score:1,meta:"bson",version:"0.0.0",description:"BSON Binary type",snippet:"Binary('${1:data}', '${2:subType}')"},{name:"DBRef",value:"DBRef",label:"DBRef",score:1,meta:"bson",version:"0.0.0",description:"BSON DBRef type",snippet:"DBRef('${1:ns}', '${2:oid}')"},{name:"Timestamp",value:"Timestamp",label:"Timestamp",score:1,meta:"bson",version:"0.0.0",description:"BSON Timestamp type",snippet:"Timestamp(${1:low}, ${2:high})"},{name:"NumberInt",value:"NumberInt",label:"NumberInt",score:1,meta:"bson",version:"0.0.0",description:"BSON 32 bit Integer type",snippet:"NumberInt(${1:value})"},{name:"NumberLong",value:"NumberLong",label:"NumberLong",score:1,meta:"bson",version:"0.0.0",description:"BSON 64 but Integer type",snippet:"NumberLong(${1:value})"},{name:"NumberDecimal",value:"NumberDecimal",label:"NumberDecimal",score:1,meta:"bson",version:"3.4.0",description:"BSON Decimal128 type",snippet:"NumberDecimal('${1:value}')"},{name:"MaxKey",value:"MaxKey",label:"MaxKey",score:1,meta:"bson",version:"0.0.0",description:"BSON MaxKey type",snippet:"MaxKey()"},{name:"MinKey",value:"MinKey",label:"MinKey",score:1,meta:"bson",version:"0.0.0",description:"BSON MinKey type",snippet:"MinKey()"},{name:"ISODate",value:"ISODate",label:"ISODate",score:1,meta:"bson",version:"0.0.0",description:"BSON Date type",snippet:"ISODate('${1:date}')"},{name:"RegExp",value:"RegExp",label:"RegExp",score:1,meta:"bson",version:"0.0.0",description:"BSON Regex type",snippet:"RegExp('${1:source}', '${2:opts}')"}]},78145:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ALL_CONSTANTS=void 0,t.createConstantFilter=f,t.wrapField=function(e,t=!1){return t||!function(e){if(/[.\s"'()[\];={}:]/.test(e))return!1;try{return new Function(`"use strict";let _ = { ${e}: 0 };`),!0}catch{return!1}}(e)?`"${e.replace(/["\\]/g,"\\$&")}"`:e},t.getFilteredCompletions=function(e={},n=t.ALL_CONSTANTS){const{serverVersion:r=m,fields:a=[],meta:s,stage:i}=e,o=f({serverVersion:r,meta:s,stage:i});return n.concat(a.flatMap((e=>{const{value:t,description:n}=function(e){return"string"==typeof e?{value:e}:{value:e.name,description:e.description}}(e);return[{value:t,meta:"field:identifier",version:"0.0.0",description:n},{value:`$${t}`,meta:"field:reference",version:"0.0.0",description:n}]}))).filter((e=>o(e)))};const r=n(59591),a=n(46432),s=n(81379),i=n(34889),o=n(82663),l=n(47969),c=n(17941),u=n(28131),p=n(19133),d=n(10282);t.ALL_CONSTANTS=[...a.ACCUMULATORS,...i.BSON_TYPES,...s.BSON_TYPE_ALIASES,...o.CONVERSION_OPERATORS,...l.EXPRESSION_OPERATORS,...c.JSON_SCHEMA,...u.QUERY_OPERATORS,...p.STAGE_OPERATORS,...d.SYSTEM_VARIABLES];const m="999.999.999";function h(e,t){return void 0===e||void 0===t||(e=Array.isArray(e)?e:[e]).some((e=>t.includes(e)))}function f({meta:e,serverVersion:t=m,stage:n={}}={}){const a=/^(?<version>\d+\.\d+\.\d+)/.exec(t)?.groups?.version??m;return({version:t,meta:s,env:i,namespaces:o,apiVersions:l})=>function(e,t){const n=/^\d+\.\d+\.\d+$/.test(t);return(0,r.satisfies)(e,n?`>=${t}`:t)}(a,t)&&h(n.env,i)&&h(n.namespace,o)&&h(n.apiVersion,l)&&(!e||function(e,t){const n=t.split(":");return e.some((e=>{const t=e.split(":");return t.length===n.length&&t.every(((e,t)=>"*"===e||e===n[t]))}))}(e,s))}},78316:(e,t,n)=>{var r=n(40811),a=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),s=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");e.exports=new r("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:function(e){return null!==e&&(null!==a.exec(e)||null!==s.exec(e))},construct:function(e){var t,n,r,i,o,l,c,u,p=0,d=null;if(null===(t=a.exec(e))&&(t=s.exec(e)),null===t)throw new Error("Date resolve error");if(n=+t[1],r=+t[2]-1,i=+t[3],!t[4])return new Date(Date.UTC(n,r,i));if(o=+t[4],l=+t[5],c=+t[6],t[7]){for(p=t[7].slice(0,3);p.length<3;)p+="0";p=+p}return t[9]&&(d=6e4*(60*+t[10]+ +(t[11]||0)),"-"===t[9]&&(d=-d)),u=new Date(Date.UTC(n,r,i,o,l,c,p)),d&&u.setTime(u.getTime()-d),u},instanceOf:Date,represent:function(e){return e.toISOString()}})},78462:(e,t,n)=>{const r=n(70692);e.exports=(e,t,n)=>r(t,e,n)},78519:(e,t,n)=>{const r=n(20332);e.exports=(e,t,n)=>(e=new r(e,n),t=new r(t,n),e.intersects(t,n))},78654:(e,t,n)=>{const r=n(60501);e.exports=(e,t,n)=>0!==r(e,t,n)},78767:(e,t,n)=>{const r=n(20360);e.exports=(e,t)=>{try{return new r(e,t).range||"*"}catch(e){return null}}},78853:(e,t,n)=>{const r=n(48381);e.exports=(e,t)=>new r(e,t).major},78900:e=>{const t=/^[0-9]+$/,n=(e,n)=>{const r=t.test(e),a=t.test(n);return r&&a&&(e=+e,n=+n),e===n?0:r&&!a?-1:a&&!r?1:e<n?-1:1};e.exports={compareIdentifiers:n,rcompareIdentifiers:(e,t)=>n(t,e)}},78970:(e,t,n)=>{const r=n(12196);e.exports=(e,t)=>{const n=r(e.trim().replace(/^[=v]+/,""),t);return n?n.version:null}},79188:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.JSON_SCHEMA=void 0,t.JSON_SCHEMA=[{name:"bsonType",value:"bsonType",label:"bsonType",score:1,meta:"json-schema",version:"3.6.0",description:"Accepts same string aliases used for the $type operator"},{name:"enum",value:"enum",label:"enum",score:1,meta:"json-schema",version:"3.6.0",description:"Enumerates all possible values of the field"},{name:"type",value:"type",label:"type",score:1,meta:"json-schema",version:"3.6.0",description:"Enumerates the possible JSON types of the field"},{name:"allOf",value:"allOf",label:"allOf",score:1,meta:"json-schema",version:"3.6.0",description:"Field must match all specified schemas"},{name:"anyOf",value:"anyOf",label:"anyOf",score:1,meta:"json-schema",version:"3.6.0",description:"Field must match at least one of the specified schemas"},{name:"oneOf",value:"oneOf",label:"oneOf",score:1,meta:"json-schema",version:"3.6.0",description:"Field must match exactly one of the specified schemas"},{name:"not",value:"not",label:"not",score:1,meta:"json-schema",version:"3.6.0",description:"Field must not match the schema"},{name:"multipleOf",value:"multipleOf",label:"multipleOf",score:1,meta:"json-schema",version:"3.6.0",description:"Field must be a multiple of this value"},{name:"maximum",value:"maximum",label:"maximum",score:1,meta:"json-schema",version:"3.6.0",description:"Indicates the maximum value of the field"},{name:"exclusiveMaximum",value:"exclusiveMaximum",label:"exclusiveMaximum",score:1,meta:"json-schema",version:"3.6.0",description:"If true and field is a number, maximum is an exclusive maximum"},{name:"minimum",value:"minimum",label:"minimum",score:1,meta:"json-schema",version:"3.6.0",description:"Indicates the minimum value of the field"},{name:"exclusiveMinimum",value:"exclusiveMinimum",label:"exclusiveMinimum",score:1,meta:"json-schema",version:"3.6.0",description:"If true, minimum is an exclusive minimum"},{name:"maxLength",value:"maxLength",label:"maxLength",score:1,meta:"json-schema",version:"3.6.0",description:"Indicates the maximum length of the field"},{name:"minLength",value:"minLength",label:"minLength",score:1,meta:"json-schema",version:"3.6.0",description:"Indicates the minimum length of the field"},{name:"pattern",value:"pattern",label:"pattern",score:1,meta:"json-schema",version:"3.6.0",description:"Field must match the regular expression"},{name:"maxProperties",value:"maxProperties",label:"maxProperties",score:1,meta:"json-schema",version:"3.6.0",description:"Indicates the field’s maximum number of properties"},{name:"minProperties",value:"minProperties",label:"minProperties",score:1,meta:"json-schema",version:"3.6.0",description:"Indicates the field’s minimum number of properties"},{name:"required",value:"required",label:"required",score:1,meta:"json-schema",version:"3.6.0",description:"Object’s property set must contain all the specified elements in the array"},{name:"additionalProperties",value:"additionalProperties",label:"additionalProperties",score:1,meta:"json-schema",version:"3.6.0",description:"If true, additional fields are allowed"},{name:"properties",value:"properties",label:"properties",score:1,meta:"json-schema",version:"3.6.0",description:"A valid JSON Schema where each value is also a valid JSON Schema object"},{name:"patternProperties",value:"patternProperties",label:"patternProperties",score:1,meta:"json-schema",version:"3.6.0",description:"In addition to properties requirements, each property name of this object must be a valid regular expression"},{name:"dependencies",value:"dependencies",label:"dependencies",score:1,meta:"json-schema",version:"3.6.0",description:"Describes field or schema dependencies"},{name:"additionalItems",value:"additionalItems",label:"additionalItems",score:1,meta:"json-schema",version:"3.6.0",description:"If an object, must be a valid JSON Schema"},{name:"items",value:"items",label:"items",score:1,meta:"json-schema",version:"3.6.0",description:"Must be either a valid JSON Schema, or an array of valid JSON Schemas"},{name:"maxItems",value:"maxItems",label:"maxItems",score:1,meta:"json-schema",version:"3.6.0",description:"Indicates the maximum length of array"},{name:"minItems",value:"minItems",label:"minItems",score:1,meta:"json-schema",version:"3.6.0",description:"Indicates the minimum length of array"},{name:"uniqueItems",value:"uniqueItems",label:"uniqueItems",score:1,meta:"json-schema",version:"3.6.0",description:"If true, each item in the array must be unique"},{name:"title",value:"title",label:"title",score:1,meta:"json-schema",version:"3.6.0",description:"A descriptive title string with no effect"},{name:"description",value:"description",label:"description",score:1,meta:"json-schema",version:"3.6.0",description:"A string that describes the schema and has no effect."}]},79223:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ANY_NAMESPACE=t.ANY_COLLECTION_NAMESPACE=t.TIME_SERIES=t.VIEW=t.COLLECTION=t.DATABASE=void 0,t.DATABASE="db";const n="coll";t.COLLECTION=n;const r="view";t.VIEW=r;const a="timeseries";t.TIME_SERIES=a;const s=[n,r,a];t.ANY_COLLECTION_NAMESPACE=s;const i=["db",...s];t.ANY_NAMESPACE=i},79779:(e,t,n)=>{const r=n(88825),a=n(20360);e.exports=(e,t,n)=>{let s=null,i=null,o=null;try{o=new a(t,n)}catch(e){return null}return e.forEach((e=>{o.test(e)&&(s&&-1!==i.compare(e)||(s=e,i=new r(s,n)))})),s}},79984:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.REQUIRED_AS_FIRST_STAGE=t.FULL_SCAN_STAGES=t.OUT_STAGES=t.STAGE_OPERATOR_NAMES=t.STAGE_OPERATORS=void 0;const r=n(92133),a=n(79223),s=[{name:"$addFields",value:"$addFields",label:"$addFields",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"3.4.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Adds new field(s) to a document with a computed value, or reassigns an existing field(s) with a computed value.",comment:"/**\n * newField: The new field name.\n * expression: The new field expression.\n */\n",snippet:"{\n ${1:newField}: ${2:expression}, ${3:...}\n}"},{name:"$bucket",value:"$bucket",label:"$bucket",outputStage:!1,fullScan:!0,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"3.4.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Categorizes incoming documents into groups, called buckets, based on specified boundaries.",comment:"/**\n * groupBy: The expression to group by.\n * boundaries: An array of the lower boundaries for each bucket.\n * default: The bucket name for documents that do not fall within the specified boundaries\n * output: {\n * outputN: Optional. The output object may contain a single or numerous field names used to accumulate values per bucket.\n * }\n */\n",snippet:"{\n groupBy: ${1:expression},\n boundaries: [ ${2:lowerbound}, ${3:...} ],\n default: ${4:literal},\n output: {\n ${5:outputN}: { ${6:accumulator} }, ${7:...}\n }\n}"},{name:"$bucketAuto",value:"$bucketAuto",label:"$bucketAuto",outputStage:!1,fullScan:!0,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"3.4.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Automatically categorizes documents into a specified number of buckets, attempting even distribution if possible.",comment:"/**\n * groupBy: The expression to group by.\n * buckets: The desired number of buckets\n * output: {\n * outputN: Optional. The output object may contain a single or numerous field names used to accumulate values per bucket.\n * }\n * granularity: Optional number series\n */\n",snippet:"{\n groupBy: ${1:expression},\n buckets: ${2:number},\n output: {\n ${3:outputN}: ${4:accumulator}, ${5:...}\n },\n granularity: '${6:string}'\n}"},{name:"$changeStream",value:"$changeStream",label:"$changeStream",outputStage:!1,fullScan:!1,firstStage:!0,score:1,env:[r.ATLAS,r.ON_PREM],meta:"stage",version:"4.2.0",apiVersions:[1],namespaces:[a.DATABASE],description:"Returns a Change Stream cursor for the collection.",comment:"/**\n * allChangesForCluster: Optional boolean to include all changes in the cluster.\n * fullDocument: Optional value to request a copy of full document when modified by update operations (Introduced in 6.0).\n * fullDocumentBeforeChange: Value to configure whether to return a full document before the change or not.\n * resumeAfter: Specifies a resume token as the logical starting point for the change stream. Cannot be used with startAfter or startAtOperationTime fields.\n * showExpandedEvents: Specifies whether to include additional change events, such as such as DDL and index operations (Introduced in 6.0).\n * startAfter: Specifies a resume token as the logical starting point for the change stream. Cannot be used with resumeAfter or startAtOperationTime fields.\n * startAtOperationTime: Specifies a time as the logical starting point for the change stream. Cannot be used with resumeAfter or startAfter fields.\n */\n",snippet:"{\n allChangesForCluster: ${1:boolean},\n fullDocument: '${2:string}',\n fullDocumentBeforeChange: '${3:string}',\n resumeAfter: ${4:resumeToken},\n showExpandedEvents: ${5:boolean},\n startAfter: ${6:resumeToken},\n startAtOperationTime: ${7:time},\n}"},{name:"$collStats",value:"$collStats",label:"$collStats",outputStage:!1,fullScan:!1,firstStage:!0,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"3.4.0",apiVersions:[],namespaces:[...a.ANY_COLLECTION_NAMESPACE],description:"Returns statistics regarding a collection or view.",comment:"/**\n * histograms: Optional latency histograms.\n * storageStats: Optional storage stats.\n */\n",snippet:"{\n latencyStats: {\n histograms: ${1:boolean}\n },\n storageStats: {${2:}},\n}"},{name:"$count",value:"$count",label:"$count",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"2.2.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Returns a count of the number of documents at this stage of the aggregation pipeline.",comment:"/**\n * Provide the field name for the count.\n */\n",snippet:"'${1:string}'"},{name:"$currentOp",value:"$currentOp",label:"$currentOp",outputStage:!1,fullScan:!1,firstStage:!0,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"3.6.0",apiVersions:[1],namespaces:[a.DATABASE],description:"Returns a cursor over information on active and/or dormant operations for the MongoDB deployment as well as inactive sessions that are holding locks as part of a transaction.",comment:"/**\n * allUsers: Optional boolean value to specify whether to return operations for all users or not.\n * idleConnections: Optional boolean value to specify whether to return all operations including idle connections or not.\n * idleCursors: Optional boolean value to specify whether to report on cursors that are idle or not.\n * idleSessions: Optional boolean value to specify whether to report on dormant sessions or not.\n * localOps: Optional boolean value to specify whether to report on operations running locally on targetted mongos or not.\n * backtrace: Optional boolean value to specify whether callstack information is returned as part of the waitingForLatch output field.\n */\n",snippet:"{\n allUsers: ${1:false},\n idleConnections: ${2:false},\n idleCursors: ${3:false},\n idleSessions: ${4:true},\n localOps: ${5:false},\n backtrace: ${6:false},\n}"},{name:"$densify",value:"$densify",label:"$densify",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"5.1.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Creates new documents to eliminate the gaps in the time or numeric domain at the required granularity level.",comment:"/**\n * field: The required field to densify.\n * partitionByFields: The set of fields that acts as a compound key to define each partition.\n * range: {\n * step: The amount to increment the field value in each document.\n * unit: If specified field must evaluate to a date for every document in the collection, otherwise must evaluate to a numeric.\n * bounds: A string or array of numeric/date bounds, corresponding to the type of the field.\n * }\n */\n",snippet:"{\n field: ${1:string},\n partitionByFields: [${2:string}, ${3:string}, ...],\n range: {\n step: ${4:number},\n unit: ${5:string},\n bounds: [${6:lowerbound}, ${7:upperbound}, ...]\n }\n}"},{name:"$documents",value:"$documents",label:"$documents",outputStage:!1,fullScan:!1,firstStage:!0,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"4.4.9",apiVersions:[1],namespaces:[a.DATABASE],description:"Returns literal documents from input values.",comment:"/**\n * expression: Any valid expression.\n */\n",snippet:"{\n ${1:expression}\n}"},{name:"$facet",value:"$facet",label:"$facet",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"3.4.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Allows for multiple parellel aggregations to be specified.",comment:"/**\n * outputFieldN: The first output field.\n * stageN: The first aggregation stage.\n */\n",snippet:"{\n ${1:outputFieldN}: [ ${2:stageN}, ${3:...} ]\n}"},{name:"$fill",value:"$fill",label:"$fill",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"5.3.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Populates null and missing field values within documents.",comment:'/**\n * sortBy: Syntax is the same as $sort, required if "method" is used in at least one output spec otherwise optional\n * partitionBy: Optional, default is a single partition. Specification is the same as _id in $group (same as partitionBy in window functions).\n * partitionByFields: Optional, set of fields that acts as a compound key to define each partition.\n * output - Required, object for each field to fill in. For a single field, can be a single object.\n * output.<field> - A field to be filled with value, if missing or null in the current document.\n */\n',snippet:"{\n sortBy: ${1:sortSpec},\n partitionBy: ${2:expression},\n partitionByFields: [${3:string}, ${4:string}, ...],\n output: {\n field1: {value: ${5:expression}},\n field2: {method: ${6:string}},\n ...\n }\n}"},{name:"$geoNear",value:"$geoNear",label:"$geoNear",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"2.4.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Returns documents based on proximity to a geospatial point.",comment:"/**\n * near: The point to search near.\n * distanceField: The calculated distance.\n * maxDistance: The maximum distance, in meters, documents can be before being excluded from results.\n * query: Limits results that match the query\n * includeLocs: Optional. Labels and includes the point used to match the document.\n * num: Optional. The maximum number of documents to return.\n * spherical: Defaults to false. Specifies whether to use spherical geometry.\n */\n",snippet:"{\n near: { type: 'Point', coordinates: [ ${1:number}, ${2:number} ] },\n distanceField: '${3:string}',\n maxDistance: ${4:number},\n query: {${5}},\n includeLocs: '${6}',\n num: ${7:number},\n spherical: ${8:boolean}\n}"},{name:"$graphLookup",value:"$graphLookup",label:"$graphLookup",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"3.4.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Performs a recursive search on a collection.",comment:"/**\n * from: The target collection.\n * startWith: Expression to start.\n * connectFromField: Field to connect.\n * connectToField: Field to connect to.\n * as: Name of the array field.\n * maxDepth: Optional max recursion depth.\n * depthField: Optional Name of the depth field.\n * restrictSearchWithMatch: Optional query.\n */\n",snippet:"{\n from: '${1:string}',\n startWith: ${2:expression},\n connectFromField: '${3:string}',\n connectToField: '${4:string}',\n as: '${5:string}',\n maxDepth: ${6:number},\n depthField: '${7:string}',\n restrictSearchWithMatch: {${8}}\n}"},{name:"$group",value:"$group",label:"$group",outputStage:!1,fullScan:!0,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"2.2.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Groups documents by a specified expression.",comment:"/**\n * _id: The id of the group.\n * fieldN: The first field name.\n */\n",snippet:"{\n _id: ${1:expression},\n ${2:fieldN}: {\n ${3:accumulatorN}: ${4:expressionN}\n }\n}"},{name:"$indexStats",value:"$indexStats",label:"$indexStats",outputStage:!1,fullScan:!1,firstStage:!0,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"3.2.0",apiVersions:[],namespaces:[...a.ANY_NAMESPACE],description:"Returns statistics regarding the use of each index for the collection.",comment:"/**\n * No parameters.\n */\n",snippet:"{}"},{name:"$limit",value:"$limit",label:"$limit",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"2.2.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Limits the number of documents that flow into subsequent stages.",comment:"/**\n * Provide the number of documents to limit.\n */\n",snippet:"${1:number}"},{name:"$listLocalSessions",value:"$listLocalSessions",label:"$listLocalSessions",outputStage:!1,fullScan:!1,firstStage:!0,score:1,env:[r.ATLAS,r.ON_PREM],meta:"stage",version:"3.6.0",apiVersions:[1],namespaces:[a.DATABASE],description:"Lists the sessions cached in memory by the mongod or mongos instance.",comment:"/**\n * users: Optional list of users for which local sessions need to be returned.\n * allUsers: Optional boolean value to specify whether to return local sessions for all users or not.\n */\n",snippet:"{\n allUsers: ${1:false},\n users: [\n { user: '${2:string}', db: '${3:string}' }\n ]\n}"},{name:"$lookup",value:"$lookup",label:"$lookup",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"3.2.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Performs a join between two collections.",comment:"/**\n * from: The target collection.\n * localField: The local join field.\n * foreignField: The target join field.\n * as: The name for the results.\n * pipeline: Optional pipeline to run on the foreign collection.\n * let: Optional variables to use in the pipeline field stages.\n */\n",snippet:"{\n from: ${1:collection},\n localField: ${2:field},\n foreignField: ${3:field},\n as: ${4:result}\n}"},{name:"$match",value:"$match",label:"$match",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"2.2.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Filters the document stream to allow only matching documents to pass through to subsequent stages.",comment:"/**\n * query: The query in MQL.\n */\n",snippet:"{\n ${1:query}\n}"},{name:"$merge",value:"$merge",label:"$merge",outputStage:!0,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ON_PREM],meta:"stage",version:"4.1.11",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Merges the resulting documents into a collection, optionally overriding existing documents.",comment:"/**\n * into: The target collection.\n * on: Fields to identify.\n * let: Defined variables.\n * whenMatched: Action for matching docs.\n * whenNotMatched: Action for non-matching docs.\n */\n",snippet:"{\n into: '${1:string}',\n on: '${2:string}',\n let: '${3:specification(s)}',\n whenMatched: '${4:string}',\n whenNotMatched: '${5:string}'\n}"},{name:"$merge",value:"$merge",label:"$merge",outputStage:!0,fullScan:!1,firstStage:!1,score:1,env:[r.ADL],meta:"stage",version:"4.0.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Merges the resulting documents into a collection, optionally overriding existing documents.",comment:"/**\n * atlas: Location to write the documents from the aggregation pipeline.\n * on: Fields to identify.\n * let: Defined variables.\n * whenMatched: Action for matching docs.\n * whenNotMatched: Action for non-matching docs.\n */\n",snippet:"{\n into: {\n atlas: {\n clusterName: '${1:atlasClusterName}',\n db: '${2:database}',\n coll: '${3:collection}',\n projectId: '${4:optionalAtlasProjectId}'\n }\n },\n on: '${5:identifier}',\n let: { ${6:specification(s)} },\n whenMatched: '${7:string}',\n whenNotMatched: '${8:string}'\n}"},{name:"$out",value:"$out",label:"$out",outputStage:!0,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ON_PREM],meta:"stage",version:"2.2.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Writes the result of a pipeline to a new or existing collection.",comment:"/**\n * Provide the name of the output database and collection.\n */\n",snippet:"{\n db: '${1:string}',\n coll: '${2:string}',\n /*\n timeseries: {\n timeField: '${3:field}',\n bucketMaxSpanSeconds: '${4:number}',\n granularity: '${5:granularity}'\n }\n */\n}"},{name:"$out",value:"$out",label:"$out",outputStage:!0,fullScan:!1,firstStage:!1,score:1,env:[r.ADL],meta:"stage",version:"4.0.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Writes the result of a pipeline to an Atlas cluster, S3 bucket, or Azure Blob Storage.",comment:"/**\n * Use any one of the following:\n * s3: Parameters to save the data to S3.\n * atlas: Parameters to save the data to Atlas. Example:\n * {\n * atlas: {\n * db: 'string',\n * coll: 'string',\n * projectId: 'string',\n * clusterName: 'string'\n * }\n * },\n * azure: Parameters to save the data to Azure. Example:\n * {\n * azure: {\n * serviceURL: 'string',\n * containerName: 'string',\n * region: 'string,\n * filename: 'string',\n * format: {\n * name: 'string',\n * maxFileSize: 'string',\n * maxRowGroupSize: 'string',\n * columnCompression: 'string'\n * },\n * errorMode: 'string'\n * }\n * }\n */\n",snippet:"{\n s3: {\n bucket: '${1:string}',\n region: '${2:string}',\n filename: '${3:string}',\n format: {\n name: '${4:string}',\n maxFileSize: '${5:bytes}',\n maxRowGroupSize: '${6:string}',\n columnCompression: '${7:string}'\n },\n errorMode: '${8:string}'\n }\n}"},{name:"$project",value:"$project",label:"$project",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"2.2.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Adds new field(s) to a document with a computed value, or reassigns an existing field(s) with a computed value. Unlike $addFields, $project can also remove fields.",comment:"/**\n * specifications: The fields to\n * include or exclude.\n */\n",snippet:"{\n ${1:specification(s)}\n}"},{name:"$rankFusion",value:"$rankFusion",label:"$rankFusion",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS],meta:"stage",version:"8.0.14",apiVersions:[],namespaces:[a.COLLECTION],description:"Combines multiple pipelines using reciprocal rank fusion to create hybrid search results.",comment:'/**\n * input.pipelines: Required. Map from name to input pipeline. Each pipeline must be a Ranked Selection Pipeline operating on the same collection. Minimum of one pipeline.\n * combination.weights: Optional. Map from pipeline name to numbers (non-negative). If unspecified, default weight is 1 for each pipeline.\n * scoreDetails: Optional. Default false. Set to true to include detailed scoring information in {$meta: "scoreDetails"} for debugging and tuning.\n */\n',snippet:"{\n input: {\n pipelines: {\n ${1:searchPipeline}: [\n {$search: {${2:searchStage}}},\n {$limit: ${3:limit}}\n ],\n ${4:vectorPipeline}: [\n {$vectorSearch: {${5:vectorSearchStage}}}\n ]\n }\n },\n combination: {\n weights: {\n ${6:searchPipeline}: ${7:number},\n ${8:vectorPipeline}: ${9:number}\n }\n },\n scoreDetails: ${10:false}\n}"},{name:"$redact",value:"$redact",label:"$redact",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"2.6.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Restricts the content for each document based on information stored in the documents themselves",comment:"/**\n * expression: Any valid expression that\n * evaluates to $$DESCEND, $$PRUNE, or $$KEEP.\n */\n",snippet:"{\n ${1:expression}\n}"},{name:"$replaceRoot",value:"$replaceRoot",label:"$replaceRoot",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"3.4.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Replaces a document with the specified embedded document.",comment:"/**\n * replacementDocument: A document or string.\n */\n",snippet:"{\n newRoot: ${1:replacementDocument}\n}"},{name:"$replaceWith",value:"$replaceWith",label:"$replaceWith",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"4.2.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Replaces a document with the specified embedded document.",comment:"/**\n * replacementDocument: A document or string.\n */\n",snippet:"{\n newWith: ${1:replacementDocument}\n}"},{name:"$sample",value:"$sample",label:"$sample",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"3.2.0",apiVersions:[1],namespaces:[...a.ANY_COLLECTION_NAMESPACE],description:"Randomly selects the specified number of documents from its input.",comment:"/**\n * size: The number of documents to sample.\n */\n",snippet:"{\n size: ${1:number}\n}"},{name:"$scoreFusion",value:"$scoreFusion",label:"$scoreFusion",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS],meta:"stage",version:"8.2.0",apiVersions:[],namespaces:[a.COLLECTION],description:"Combines multiple pipelines using relative score fusion to create hybrid search results.",comment:"/**\n * input.pipelines: Required. Map from name to input pipeline. Each pipeline must be operating on the same collection. Minimum of one pipeline.\n * input.normalization: Required. Normalizes the score to the range 0 to 1 before combining the results. Value can be none, sigmoid or minMaxScaler.\n * combination.weights: Optional. Map from pipeline name to numbers (non-negative). If unspecified, default weight is 1 for each pipeline.\n * combination.method: Optional. Specifies method for combining scores. Value can be avg or expression. Default is avg.\n * combination.expression: Optional. This is the custom expression that is used when combination.method is set to expression.\n * scoreDetails: Optional. Default false. Set to true to include detailed scoring information.\n */\n",snippet:"{\n input: {\n pipelines: {\n ${1:searchPipeline}: [\n {$search: {${2:searchStage}}},\n {$limit: ${3:limit}}\n ],\n ${4:vectorPipeline}: [\n {$vectorSearch: {${5:vectorSearchStage}}}\n ]\n },\n normalization: '${6:none|sigmoid|minMaxScaler}'\n },\n combination: {\n weights: {\n ${7:searchPipeline}: ${8:number},\n ${9:vectorPipeline}: ${10:number}\n },\n method: '${11:avg|expression}',\n expression: '${12:expression}'\n },\n scoreDetails: ${13:false}\n}"},{name:"$search",value:"$search",label:"$search",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS],meta:"stage",version:"4.1.11",apiVersions:[],namespaces:[a.COLLECTION,a.VIEW],description:"Performs a full-text search on the specified field(s).",comment:"/**\n * index: The name of the Search index.\n * text: Analyzed search, with required fields of query and path, the analyzed field(s) to search. Use matchCriteria to match 'any' or 'all' query terms.\n * compound: Combines ops.\n * span: Find in text field regions.\n * exists: Test for presence of a field.\n * near: Find near number or date.\n * range: Find in numeric or date range.\n */\n",snippet:"{\n index: '${1:string}',\n text: {\n query: '${2:string}',\n path: '${3:string}',\n matchCriteria: '${4:any}',\n }\n}"},{name:"$searchMeta",value:"$searchMeta",label:"$searchMeta",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS],meta:"stage",version:"4.4.9",apiVersions:[],namespaces:[a.COLLECTION,a.VIEW],description:"Performs a full-text search on the specified field(s) and gets back only the generated search meta data from a query.",comment:"/**\n * index: The name of the Search index.\n * count: The count of the results.\n * facet: {\n * operator: Analyzed search, with required fields of query and path, can either be replaced with the name of a valid operator.\n * facets: {\n * stringFacet: Narrows search results based on unique string values, with required fields of type and path.\n * numberFacet: Narrows search results by breaking them up into separate ranges of numbers, with required fields of type, path, and boundaries.\n * dateFacet: Narrows search results by breaking them up into separate ranges of dates, with required fields of type, path, and boundaries.\n * }\n * }\n */\n",snippet:"{\n index: ${1:string},\n facet: {\n operator: {\n text: {\n query: ${2:string},\n path: ${3:string}\n }\n },\n facets: {\n ${4:stringFacet}: {\n type: ${5:string},\n path: ${6:string},\n numBuckets: ${7:integer}\n },\n numberFacet: {\n type: 'number',\n path: ${8:string},\n boundaries: [${9:lowerbound}, ${10:upperbound}, ...],\n default: ${11:string}\n }\n }\n }\n}"},{name:"$set",value:"$set",label:"$set",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"4.2.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Adds new fields to documents. $set outputs documents that contain all existing fields from the input documents and newly added fields.",comment:"/**\n * field: The field name\n * expression: The expression.\n */\n",snippet:"{\n ${1:field}: ${2:expression}\n}"},{name:"$setWindowFields",value:"$setWindowFields",label:"$setWindowFields",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"5.0.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Capable of partitioning incoming data, and can apply one or more functions to defined windows within each partition.",comment:"/**\n * partitionBy: partitioning of data.\n * sortBy: fields to sort by.\n * output: {\n * path: {\n * function: The window function to compute over the given window.\n * window: {\n * documents: A number of documents before and after the current document.\n * range: A range of possible values around the value in the current document's sortBy field.\n * unit: Specifies the units for the window bounds.\n * }\n * }\n * }\n */\n",snippet:"{\n partitionBy: ${1:expression},\n sortBy: ${2:sortSpec},\n output: {\n ${3:path}: {\n ${4:function}: ${5:functionArgs},\n window: {\n documents: [${6:lowerbound}, ${7:upperbound}],\n range: [${8:lowerbound}, ${9:upperbound}],\n unit: ${10:string}\n }\n },\n ${11:path2}: ...\n }\n}"},{name:"$skip",value:"$skip",label:"$skip",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"2.2.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Skips a specified number of documents before advancing to the next stage.",comment:"/**\n * Provide the number of documents to skip.\n */\n",snippet:"${1:number}"},{name:"$sort",value:"$sort",label:"$sort",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"2.2.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Reorders the document stream by a specified sort key and direction.",comment:"/**\n * Provide any number of field/order pairs.\n */\n",snippet:"{\n ${1:field1}: ${2:sortOrder}\n}"},{name:"$sortByCount",value:"$sortByCount",label:"$sortByCount",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"3.4.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Groups incoming documents based on the value of a specified expression, then computes the count of documents in each distinct group.",comment:"/**\n * expression: Grouping expression or string.\n */\n",snippet:"{\n ${1:expression}\n}"},{name:"$unionWith",value:"$unionWith",label:"$unionWith",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"4.4.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Perform a union with a pipeline on another collection.",comment:"/**\n * coll: The collection name.\n * pipeline: The pipeline on the other collection.\n */\n",snippet:"{\n coll: '${1:coll}',\n pipeline: [${2:pipeline}]\n}"},{name:"$unset",value:"$unset",label:"$unset",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"4.2.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Excludes fields from the result document.",comment:"/**\n * Provide the field name to exclude.\n * To exclude multiple fields, pass the field names in an array.\n */\n",snippet:"'${1:string}'"},{name:"$unwind",value:"$unwind",label:"$unwind",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"2.2.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Outputs a new document for each element in a specified array. ",comment:"/**\n * path: Path to the array field.\n * includeArrayIndex: Optional name for index.\n * preserveNullAndEmptyArrays: Optional\n * toggle to unwind null and empty values.\n */\n",snippet:"{\n path: ${1:path},\n includeArrayIndex: '${2:string}',\n preserveNullAndEmptyArrays: ${3:boolean}\n}"},{name:"$vectorSearch",value:"$vectorSearch",label:"$vectorSearch",outputStage:!1,fullScan:!1,firstStage:!0,score:1,env:[r.ATLAS],meta:"stage",version:">=6.0.10 <7.0.0 || >=7.0.2",apiVersions:[],namespaces:[a.COLLECTION,a.VIEW],description:"Performs a kNN search on embeddings in the specified field(s)",comment:"/**\n * queryVector: Array of numbers of BSON types `int` or `double` that represent the query vector. The array size must match the number of vector dimensions specified in the index for the field. (Required)\n * path: The field to search. (Required)\n * numCandidates: Number of nearest neighbors to use during the search. You can specify a number higher than the number of documents to return (`limit`) to increase accuracy. (Required)\n * index: Name of the Atlas Search index to use. (Required)\n * limit: Number (of type `int` only) of documents to return in the results. (Required)\n * filter: Any MongoDB Query Language (MQL) match expression that compares an indexed field with a boolean, number (not decimals), or string to use as a prefilter. (Optional)\n * exact: Choose between false for ANN (Approximate Nearest Neighbor) and true for ENN (Exact Nearest Neighbor). Defaults to false. (Optional)\n */\n",snippet:"{\n queryVector: [${1:dimension1}, ${2:dimension2}, ...],\n path: ${3:string},\n numCandidates: ${4:numCandidates},\n index: ${5:string},\n limit: ${6:limit},\n filter: {${7:expression}},\n exact: ${8:boolean}\n}"}];t.STAGE_OPERATORS=s;const i=s.map((e=>e.name));t.STAGE_OPERATOR_NAMES=i;const o=s.filter((e=>e.outputStage));t.OUT_STAGES=o;const l=s.filter((e=>e.fullScan));t.FULL_SCAN_STAGES=l;const c=s.filter((e=>e.firstStage));t.REQUIRED_AS_FIRST_STAGE=c},80003:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CONVERSION_OPERATORS=void 0,t.CONVERSION_OPERATORS=[{name:"$convert",value:"$convert",score:1,meta:"conv",version:"3.7.2"},{name:"$ltrim",value:"$ltrim",score:1,meta:"accumulator",version:"3.7.2"},{name:"$rtrim",value:"$rtrim",score:1,meta:"accumulator",version:"3.7.2"},{name:"$toBool",value:"$toBool",score:1,meta:"conv",version:"3.7.2"},{name:"$toDate",value:"$toDate",score:1,meta:"conv",version:"3.7.2"},{name:"$toDecimal",value:"$toDecimal",score:1,meta:"conv",version:"3.7.2"},{name:"$toDouble",value:"$toDouble",score:1,meta:"conv",version:"3.7.2"},{name:"$toInt",value:"$toInt",score:1,meta:"conv",version:"3.7.2"},{name:"$toLong",value:"$toLong",score:1,meta:"conv",version:"3.7.2"},{name:"$toObjectId",value:"$toObjectId",score:1,meta:"conv",version:"3.7.2"},{name:"$toString",value:"$toString",score:1,meta:"conv",version:"3.7.2"},{name:"$trim",value:"$trim",score:1,meta:"accumulator",version:"3.7.2"}]},80184:(e,t,n)=>{const r=n(415),a=n(77693),s=n(66283),i=n(78900),o=n(59441),l=n(22156),c=n(35735),u=n(73746),p=n(9703),d=n(36719),m=n(32939),h=n(91716),f=n(20242),v=n(60501),g=n(71773),y=n(67994),$=n(85216),b=n(67360),E=n(10760),S=n(61607),A=n(91152),_=n(98746),x=n(78654),w=n(15844),O=n(80829),N=n(59382),I=n(75689),T=n(58387),R=n(38366),C=n(50363),k=n(32654),L=n(5081),P=n(96675),M=n(25546),j=n(92945),D=n(24472),F=n(63876),V=n(94045),q=n(88345),B=n(21148),U=n(82913);e.exports={parse:o,valid:l,clean:c,inc:u,diff:p,major:d,minor:m,patch:h,prerelease:f,compare:v,rcompare:g,compareLoose:y,compareBuild:$,sort:b,rsort:E,gt:S,lt:A,eq:_,neq:x,gte:w,lte:O,cmp:N,coerce:I,Comparator:T,Range:R,satisfies:C,toComparators:k,maxSatisfying:L,minSatisfying:P,minVersion:M,validRange:j,outside:D,gtr:F,ltr:V,intersects:q,simplifyRange:B,subset:U,SemVer:s,re:r.re,src:r.src,tokens:r.t,SEMVER_SPEC_VERSION:a.SEMVER_SPEC_VERSION,RELEASE_TYPES:a.RELEASE_TYPES,compareIdentifiers:i.compareIdentifiers,rcompareIdentifiers:i.rcompareIdentifiers}},80196:(e,t,n)=>{const r=n(12196);e.exports=(e,t)=>{const n=r(e,null,!0),a=r(t,null,!0),s=n.compare(a);if(0===s)return null;const i=s>0,o=i?n:a,l=i?a:n,c=!!o.prerelease.length;if(l.prerelease.length&&!c){if(!l.patch&&!l.minor)return"major";if(0===l.compareMain(o))return l.minor&&!l.patch?"minor":"patch"}const u=c?"pre":"";return n.major!==a.major?u+"major":n.minor!==a.minor?u+"minor":n.patch!==a.patch?u+"patch":"prerelease"}},80321:(e,t,n)=>{const r=n(32674);e.exports=(e,t)=>r(e,t,!0)},80417:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ANY_NAMESPACE=t.ANY_COLLECTION_NAMESPACE=t.TIME_SERIES=t.VIEW=t.COLLECTION=t.DATABASE=void 0,t.DATABASE="db";const n="coll";t.COLLECTION=n;const r="view";t.VIEW=r;const a="timeseries";t.TIME_SERIES=a;const s=[n,r,a];t.ANY_COLLECTION_NAMESPACE=s;const i=["db",...s];t.ANY_NAMESPACE=i},80661:e=>{const t=/^[0-9]+$/,n=(e,n)=>{const r=t.test(e),a=t.test(n);return r&&a&&(e=+e,n=+n),e===n?0:r&&!a?-1:a&&!r?1:e<n?-1:1};e.exports={compareIdentifiers:n,rcompareIdentifiers:(e,t)=>n(t,e)}},80829:(e,t,n)=>{const r=n(60501);e.exports=(e,t,n)=>r(e,t,n)<=0},81379:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BSON_TYPE_ALIASES=void 0,t.BSON_TYPE_ALIASES=[{name:"double",value:"double",label:"double",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"string",value:"string",label:"string",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"object",value:"object",label:"object",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"array",value:"array",label:"array",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"binData",value:"binData",label:"binData",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"objectId",value:"objectId",label:"objectId",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"bool",value:"bool",label:"bool",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"date",value:"date",label:"date",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"null",value:"null",label:"null",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"double",value:"double",label:"double",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"regex",value:"regex",label:"regex",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"javascript",value:"javascript",label:"javascript",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"javascriptWithScope",value:"javascriptWithScope",label:"javascriptWithScope",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"int",value:"int",label:"int",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"timestamp",value:"timestamp",label:"timestamp",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"long",value:"long",label:"long",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"decimal",value:"decimal",label:"decimal",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"minKey",value:"minKey",label:"minKey",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"maxKey",value:"maxKey",label:"maxKey",score:1,meta:"bson-type-aliases",version:"3.6.0"}]},81521:(e,t,n)=>{const r=n(56206);e.exports=(e,t)=>e.sort(((e,n)=>r(n,e,t)))},81602:(e,t,n)=>{var r=n(40811);e.exports=new r("tag:yaml.org,2002:bool",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t=e.length;return 4===t&&("true"===e||"True"===e||"TRUE"===e)||5===t&&("false"===e||"False"===e||"FALSE"===e)},construct:function(e){return"true"===e||"True"===e||"TRUE"===e},predicate:function(e){return"[object Boolean]"===Object.prototype.toString.call(e)},represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"})},82214:(e,t,n)=>{const r=n(17914);e.exports=(e,t)=>{const n=r(e,null,!0),a=r(t,null,!0),s=n.compare(a);if(0===s)return null;const i=s>0,o=i?n:a,l=i?a:n,c=!!o.prerelease.length;if(l.prerelease.length&&!c){if(!l.patch&&!l.minor)return"major";if(0===l.compareMain(o))return l.minor&&!l.patch?"minor":"patch"}const u=c?"pre":"";return n.major!==a.major?u+"major":n.minor!==a.minor?u+"minor":n.patch!==a.patch?u+"patch":"prerelease"}},82660:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SYSTEM_VARIABLES=void 0,t.SYSTEM_VARIABLES=[{name:"$$NOW",value:"$$NOW",score:1,meta:"variable:system",version:"4.2.0",description:"A variable that returns the current datetime value. NOW returns the same value for all members of the deployment and remains the same throughout all stages of the aggregation pipeline."},{name:"$$CLUSTER_TIME",value:"$$CLUSTER_TIME",score:1,meta:"variable:system",version:"4.2.0",description:"A variable that returns the current timestamp value. CLUSTER_TIME is only available on replica sets and sharded clusters. CLUSTER_TIME returns the same value for all members of the deployment and remains the same throughout all stages of the pipeline."},{name:"$$ROOT",value:"$$ROOT",score:1,meta:"variable:system",version:"2.4.0",description:"References the root document, i.e. the top-level document, currently being processed in the aggregation pipeline stage."},{name:"$$CURRENT",value:"$$CURRENT",score:1,meta:"variable:system",version:"2.4.0",description:"References the start of the field path being processed in the aggregation pipeline stage. Unless documented otherwise, all stages start with CURRENT the same as ROOT. CURRENT is modifiable. However, since `$<field>` is equivalent to `$$CURRENT.<field>`, rebinding CURRENT changes the meaning of `$` accesses."},{name:"$$REMOVE",value:"$$REMOVE",score:1,meta:"variable:system",version:"3.6.0",description:"A variable which evaluates to the missing value. Allows for the conditional exclusion of fields. In a `$project`, a field set to the variable REMOVE is excluded from the output."},{name:"$$DESCEND",value:"$$DESCEND",score:1,meta:"variable:system",version:"3.0.0",description:"One of the allowed results of a `$redact` expression."},{name:"$$PRUNE",value:"$$PRUNE",score:1,meta:"variable:system",version:"3.0.0",description:"One of the allowed results of a `$redact` expression."},{name:"$$KEEP",value:"$$KEEP",score:1,meta:"variable:system",version:"3.0.0",description:"One of the allowed results of a `$redact` expression."},{name:"$$SEARCH_META",value:"$$SEARCH_META",score:1,meta:"variable:system",version:"5.0.0",description:"A variable that stores the metadata results of an Atlas Search query. In all supported aggregation pipeline stages, a field set to the variable SEARCH_META returns the metadata results for the query. For an example of its usage, see Atlas Search facet and count."},{name:"$$USER_ROLES",value:"$$USER_ROLES",score:1,meta:"variable:system",version:"7.0.0",description:"A variable that stores the role names of the authenticated user running the command."}]},82663:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CONVERSION_OPERATORS=void 0,t.CONVERSION_OPERATORS=[{name:"$convert",value:"$convert",score:1,meta:"conv",version:"3.7.2"},{name:"$ltrim",value:"$ltrim",score:1,meta:"accumulator",version:"3.7.2"},{name:"$rtrim",value:"$rtrim",score:1,meta:"accumulator",version:"3.7.2"},{name:"$toBool",value:"$toBool",score:1,meta:"conv",version:"3.7.2"},{name:"$toDate",value:"$toDate",score:1,meta:"conv",version:"3.7.2"},{name:"$toDecimal",value:"$toDecimal",score:1,meta:"conv",version:"3.7.2"},{name:"$toDouble",value:"$toDouble",score:1,meta:"conv",version:"3.7.2"},{name:"$toInt",value:"$toInt",score:1,meta:"conv",version:"3.7.2"},{name:"$toLong",value:"$toLong",score:1,meta:"conv",version:"3.7.2"},{name:"$toObjectId",value:"$toObjectId",score:1,meta:"conv",version:"3.7.2"},{name:"$toString",value:"$toString",score:1,meta:"conv",version:"3.7.2"},{name:"$trim",value:"$trim",score:1,meta:"accumulator",version:"3.7.2"}]},82913:(e,t,n)=>{const r=n(38366),a=n(58387),{ANY:s}=a,i=n(50363),o=n(60501),l=[new a(">=0.0.0-0")],c=[new a(">=0.0.0")],u=(e,t,n)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===s){if(1===t.length&&t[0].semver===s)return!0;e=n.includePrerelease?l:c}if(1===t.length&&t[0].semver===s){if(n.includePrerelease)return!0;t=c}const r=new Set;let a,u,m,h,f,v,g;for(const t of e)">"===t.operator||">="===t.operator?a=p(a,t,n):"<"===t.operator||"<="===t.operator?u=d(u,t,n):r.add(t.semver);if(r.size>1)return null;if(a&&u){if(m=o(a.semver,u.semver,n),m>0)return null;if(0===m&&(">="!==a.operator||"<="!==u.operator))return null}for(const e of r){if(a&&!i(e,String(a),n))return null;if(u&&!i(e,String(u),n))return null;for(const r of t)if(!i(e,String(r),n))return!1;return!0}let y=!(!u||n.includePrerelease||!u.semver.prerelease.length)&&u.semver,$=!(!a||n.includePrerelease||!a.semver.prerelease.length)&&a.semver;y&&1===y.prerelease.length&&"<"===u.operator&&0===y.prerelease[0]&&(y=!1);for(const e of t){if(g=g||">"===e.operator||">="===e.operator,v=v||"<"===e.operator||"<="===e.operator,a)if($&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===$.major&&e.semver.minor===$.minor&&e.semver.patch===$.patch&&($=!1),">"===e.operator||">="===e.operator){if(h=p(a,e,n),h===e&&h!==a)return!1}else if(">="===a.operator&&!i(a.semver,String(e),n))return!1;if(u)if(y&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===y.major&&e.semver.minor===y.minor&&e.semver.patch===y.patch&&(y=!1),"<"===e.operator||"<="===e.operator){if(f=d(u,e,n),f===e&&f!==u)return!1}else if("<="===u.operator&&!i(u.semver,String(e),n))return!1;if(!e.operator&&(u||a)&&0!==m)return!1}return!(a&&v&&!u&&0!==m||u&&g&&!a&&0!==m||$||y)},p=(e,t,n)=>{if(!e)return t;const r=o(e.semver,t.semver,n);return r>0?e:r<0||">"===t.operator&&">="===e.operator?t:e},d=(e,t,n)=>{if(!e)return t;const r=o(e.semver,t.semver,n);return r<0?e:r>0||"<"===t.operator&&"<="===e.operator?t:e};e.exports=(e,t,n={})=>{if(e===t)return!0;e=new r(e,n),t=new r(t,n);let a=!1;e:for(const r of e.set){for(const e of t.set){const t=u(r,e,n);if(a=a||null!==t,t)continue e}if(a)return!1}return!0}},83214:e=>{const t=Object.freeze({loose:!0}),n=Object.freeze({});e.exports=e=>e?"object"!=typeof e?t:e:n},83586:(e,t,n)=>{const r=n(41694);e.exports=(e,t,n=!1)=>{if(e instanceof r)return e;try{return new r(e,t)}catch(e){if(!n)return null;throw e}}},84112:(e,t,n)=>{const r=n(9350),a=n(17914),{safeRe:s,t:i}=n(68752);e.exports=(e,t)=>{if(e instanceof r)return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;let n=null;if((t=t||{}).rtl){const r=t.includePrerelease?s[i.COERCERTLFULL]:s[i.COERCERTL];let a;for(;(a=r.exec(e))&&(!n||n.index+n[0].length!==e.length);)n&&a.index+a[0].length===n.index+n[0].length||(n=a),r.lastIndex=a.index+a[1].length+a[2].length;r.lastIndex=-1}else n=e.match(t.includePrerelease?s[i.COERCEFULL]:s[i.COERCE]);if(null===n)return null;const o=n[2],l=n[3]||"0",c=n[4]||"0",u=t.includePrerelease&&n[5]?`-${n[5]}`:"",p=t.includePrerelease&&n[6]?`+${n[6]}`:"";return a(`${o}.${l}.${c}${u}${p}`,t)}},84527:(e,t,n)=>{n.d(t,{Od:()=>l,Rb:()=>o,Tj:()=>i,bp:()=>p,wG:()=>u,xL:()=>c});var r=n(49189),a=n(99629),s=n(72510);const i=e=>(t,n,a,i)=>{const o=a?Object.assign(a,{async:!1}):{async:!1},l=t._zod.run({value:n,issues:[]},o);if(l instanceof Promise)throw new r.GT;if(l.issues.length){const t=new(i?.Err??e)(l.issues.map((e=>s.iR(e,o,r.$W()))));throw s.gx(t,i?.callee),t}return l.value},o=(a.Kd,e=>async(t,n,a,i)=>{const o=a?Object.assign(a,{async:!0}):{async:!0};let l=t._zod.run({value:n,issues:[]},o);if(l instanceof Promise&&(l=await l),l.issues.length){const t=new(i?.Err??e)(l.issues.map((e=>s.iR(e,o,r.$W()))));throw s.gx(t,i?.callee),t}return l.value}),l=(a.Kd,e=>(t,n,i)=>{const o=i?{...i,async:!1}:{async:!1},l=t._zod.run({value:n,issues:[]},o);if(l instanceof Promise)throw new r.GT;return l.issues.length?{success:!1,error:new(e??a.a$)(l.issues.map((e=>s.iR(e,o,r.$W()))))}:{success:!0,data:l.value}}),c=l(a.Kd),u=e=>async(t,n,a)=>{const i=a?Object.assign(a,{async:!0}):{async:!0};let o=t._zod.run({value:n,issues:[]},i);return o instanceof Promise&&(o=await o),o.issues.length?{success:!1,error:new e(o.issues.map((e=>s.iR(e,i,r.$W()))))}:{success:!0,data:o.value}},p=u(a.Kd)},84537:function(e,t){!function(e){var t=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,80,3,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,343,9,54,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,726,6,110,6,6,9,4759,9,787719,239],n=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,4,51,13,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,39,27,10,22,251,41,7,1,17,2,60,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,200,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,42,9,8936,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,496,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4153,7,221,3,5761,15,7472,16,621,2467,541,1507,4938,6,4191],r="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲊᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꟍꟐꟑꟓꟕ-Ƛꟲ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",a={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},s="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this",i={5:s,"5module":s+" export import",6:s+" const class extends export import super"},o=/^in(stanceof)?$/,l=new RegExp("["+r+"]"),c=new RegExp("["+r+"‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࢗ-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-ᫎᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‌‍‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・]");function u(e,t){for(var n=65536,r=0;r<t.length;r+=2){if((n+=t[r])>e)return!1;if((n+=t[r+1])>=e)return!0}return!1}function p(e,t){return e<65?36===e:e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&l.test(String.fromCharCode(e)):!1!==t&&u(e,n)))}function d(e,r){return e<48?36===e:e<58||!(e<65)&&(e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&c.test(String.fromCharCode(e)):!1!==r&&(u(e,n)||u(e,t)))))}var m=function(e,t){void 0===t&&(t={}),this.label=e,this.keyword=t.keyword,this.beforeExpr=!!t.beforeExpr,this.startsExpr=!!t.startsExpr,this.isLoop=!!t.isLoop,this.isAssign=!!t.isAssign,this.prefix=!!t.prefix,this.postfix=!!t.postfix,this.binop=t.binop||null,this.updateContext=null};function h(e,t){return new m(e,{beforeExpr:!0,binop:t})}var f={beforeExpr:!0},v={startsExpr:!0},g={};function y(e,t){return void 0===t&&(t={}),t.keyword=e,g[e]=new m(e,t)}var $={num:new m("num",v),regexp:new m("regexp",v),string:new m("string",v),name:new m("name",v),privateId:new m("privateId",v),eof:new m("eof"),bracketL:new m("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new m("]"),braceL:new m("{",{beforeExpr:!0,startsExpr:!0}),braceR:new m("}"),parenL:new m("(",{beforeExpr:!0,startsExpr:!0}),parenR:new m(")"),comma:new m(",",f),semi:new m(";",f),colon:new m(":",f),dot:new m("."),question:new m("?",f),questionDot:new m("?."),arrow:new m("=>",f),template:new m("template"),invalidTemplate:new m("invalidTemplate"),ellipsis:new m("...",f),backQuote:new m("`",v),dollarBraceL:new m("${",{beforeExpr:!0,startsExpr:!0}),eq:new m("=",{beforeExpr:!0,isAssign:!0}),assign:new m("_=",{beforeExpr:!0,isAssign:!0}),incDec:new m("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new m("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:h("||",1),logicalAND:h("&&",2),bitwiseOR:h("|",3),bitwiseXOR:h("^",4),bitwiseAND:h("&",5),equality:h("==/!=/===/!==",6),relational:h("</>/<=/>=",7),bitShift:h("<</>>/>>>",8),plusMin:new m("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:h("%",10),star:h("*",10),slash:h("/",10),starstar:new m("**",{beforeExpr:!0}),coalesce:h("??",1),_break:y("break"),_case:y("case",f),_catch:y("catch"),_continue:y("continue"),_debugger:y("debugger"),_default:y("default",f),_do:y("do",{isLoop:!0,beforeExpr:!0}),_else:y("else",f),_finally:y("finally"),_for:y("for",{isLoop:!0}),_function:y("function",v),_if:y("if"),_return:y("return",f),_switch:y("switch"),_throw:y("throw",f),_try:y("try"),_var:y("var"),_const:y("const"),_while:y("while",{isLoop:!0}),_with:y("with"),_new:y("new",{beforeExpr:!0,startsExpr:!0}),_this:y("this",v),_super:y("super",v),_class:y("class",v),_extends:y("extends",f),_export:y("export"),_import:y("import",v),_null:y("null",v),_true:y("true",v),_false:y("false",v),_in:y("in",{beforeExpr:!0,binop:7}),_instanceof:y("instanceof",{beforeExpr:!0,binop:7}),_typeof:y("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:y("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:y("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},b=/\r\n?|\n|\u2028|\u2029/,E=new RegExp(b.source,"g");function S(e){return 10===e||13===e||8232===e||8233===e}function A(e,t,n){void 0===n&&(n=e.length);for(var r=t;r<n;r++){var a=e.charCodeAt(r);if(S(a))return r<n-1&&13===a&&10===e.charCodeAt(r+1)?r+2:r+1}return-1}var _=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,x=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,w=Object.prototype,O=w.hasOwnProperty,N=w.toString,I=Object.hasOwn||function(e,t){return O.call(e,t)},T=Array.isArray||function(e){return"[object Array]"===N.call(e)},R=Object.create(null);function C(e){return R[e]||(R[e]=new RegExp("^(?:"+e.replace(/ /g,"|")+")$"))}function k(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10),56320+(1023&e)))}var L=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,P=function(e,t){this.line=e,this.column=t};P.prototype.offset=function(e){return new P(this.line,this.column+e)};var M=function(e,t,n){this.start=t,this.end=n,null!==e.sourceFile&&(this.source=e.sourceFile)};function j(e,t){for(var n=1,r=0;;){var a=A(e,r,t);if(a<0)return new P(n,t-r);++n,r=a}}var D={ecmaVersion:null,sourceType:"script",onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:!1,checkPrivateFields:!0,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1},F=!1;function V(e){var t={};for(var n in D)t[n]=e&&I(e,n)?e[n]:D[n];if("latest"===t.ecmaVersion?t.ecmaVersion=1e8:null==t.ecmaVersion?(!F&&"object"==typeof console&&console.warn&&(F=!0,console.warn("Since Acorn 8.0.0, options.ecmaVersion is required.\nDefaulting to 2020, but this will stop working in the future.")),t.ecmaVersion=11):t.ecmaVersion>=2015&&(t.ecmaVersion-=2009),null==t.allowReserved&&(t.allowReserved=t.ecmaVersion<5),e&&null!=e.allowHashBang||(t.allowHashBang=t.ecmaVersion>=14),T(t.onToken)){var r=t.onToken;t.onToken=function(e){return r.push(e)}}return T(t.onComment)&&(t.onComment=function(e,t){return function(n,r,a,s,i,o){var l={type:n?"Block":"Line",value:r,start:a,end:s};e.locations&&(l.loc=new M(this,i,o)),e.ranges&&(l.range=[a,s]),t.push(l)}}(t,t.onComment)),t}var q=256,B=259;function U(e,t){return 2|(e?4:0)|(t?8:0)}var Y=function(e,t,n){this.options=e=V(e),this.sourceFile=e.sourceFile,this.keywords=C(i[e.ecmaVersion>=6?6:"module"===e.sourceType?"5module":5]);var r="";!0!==e.allowReserved&&(r=a[e.ecmaVersion>=6?6:5===e.ecmaVersion?5:3],"module"===e.sourceType&&(r+=" await")),this.reservedWords=C(r);var s=(r?r+" ":"")+a.strict;this.reservedWordsStrict=C(s),this.reservedWordsStrictBind=C(s+" "+a.strictBind),this.input=String(t),this.containsEsc=!1,n?(this.pos=n,this.lineStart=this.input.lastIndexOf("\n",n-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(b).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=$.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule="module"===e.sourceType,this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),0===this.pos&&e.allowHashBang&&"#!"===this.input.slice(0,2)&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(1),this.regexpState=null,this.privateNameStack=[]},z={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},inClassStaticBlock:{configurable:!0}};Y.prototype.parse=function(){var e=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(e)},z.inFunction.get=function(){return(2&this.currentVarScope().flags)>0},z.inGenerator.get=function(){return(8&this.currentVarScope().flags)>0},z.inAsync.get=function(){return(4&this.currentVarScope().flags)>0},z.canAwait.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e].flags;if(768&t)return!1;if(2&t)return(4&t)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction},z.allowSuper.get=function(){return(64&this.currentThisScope().flags)>0||this.options.allowSuperOutsideMethod},z.allowDirectSuper.get=function(){return(128&this.currentThisScope().flags)>0},z.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())},z.allowNewDotTarget.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e].flags;if(768&t||2&t&&!(16&t))return!0}return!1},z.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&q)>0},Y.extend=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];for(var n=this,r=0;r<e.length;r++)n=e[r](n);return n},Y.parse=function(e,t){return new this(t,e).parse()},Y.parseExpressionAt=function(e,t,n){var r=new this(n,e,t);return r.nextToken(),r.parseExpression()},Y.tokenizer=function(e,t){return new this(t,e)},Object.defineProperties(Y.prototype,z);var Z=Y.prototype,G=/^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;Z.strictDirective=function(e){if(this.options.ecmaVersion<5)return!1;for(;;){x.lastIndex=e,e+=x.exec(this.input)[0].length;var t=G.exec(this.input.slice(e));if(!t)return!1;if("use strict"===(t[1]||t[2])){x.lastIndex=e+t[0].length;var n=x.exec(this.input),r=n.index+n[0].length,a=this.input.charAt(r);return";"===a||"}"===a||b.test(n[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(a)||"!"===a&&"="===this.input.charAt(r+1))}e+=t[0].length,x.lastIndex=e,e+=x.exec(this.input)[0].length,";"===this.input[e]&&e++}},Z.eat=function(e){return this.type===e&&(this.next(),!0)},Z.isContextual=function(e){return this.type===$.name&&this.value===e&&!this.containsEsc},Z.eatContextual=function(e){return!!this.isContextual(e)&&(this.next(),!0)},Z.expectContextual=function(e){this.eatContextual(e)||this.unexpected()},Z.canInsertSemicolon=function(){return this.type===$.eof||this.type===$.braceR||b.test(this.input.slice(this.lastTokEnd,this.start))},Z.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},Z.semicolon=function(){this.eat($.semi)||this.insertSemicolon()||this.unexpected()},Z.afterTrailingComma=function(e,t){if(this.type===e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),t||this.next(),!0},Z.expect=function(e){this.eat(e)||this.unexpected()},Z.unexpected=function(e){this.raise(null!=e?e:this.start,"Unexpected token")};var W=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};Z.checkPatternErrors=function(e,t){if(e){e.trailingComma>-1&&this.raiseRecoverable(e.trailingComma,"Comma is not permitted after the rest element");var n=t?e.parenthesizedAssign:e.parenthesizedBind;n>-1&&this.raiseRecoverable(n,t?"Assigning to rvalue":"Parenthesized pattern")}},Z.checkExpressionErrors=function(e,t){if(!e)return!1;var n=e.shorthandAssign,r=e.doubleProto;if(!t)return n>=0||r>=0;n>=0&&this.raise(n,"Shorthand property assignments are valid only in destructuring patterns"),r>=0&&this.raiseRecoverable(r,"Redefinition of __proto__ property")},Z.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos<this.awaitPos)&&this.raise(this.yieldPos,"Yield expression cannot be a default value"),this.awaitPos&&this.raise(this.awaitPos,"Await expression cannot be a default value")},Z.isSimpleAssignTarget=function(e){return"ParenthesizedExpression"===e.type?this.isSimpleAssignTarget(e.expression):"Identifier"===e.type||"MemberExpression"===e.type};var H=Y.prototype;H.parseTopLevel=function(e){var t=Object.create(null);for(e.body||(e.body=[]);this.type!==$.eof;){var n=this.parseStatement(null,!0,t);e.body.push(n)}if(this.inModule)for(var r=0,a=Object.keys(this.undefinedExports);r<a.length;r+=1){var s=a[r];this.raiseRecoverable(this.undefinedExports[s].start,"Export '"+s+"' is not defined")}return this.adaptDirectivePrologue(e.body),this.next(),e.sourceType=this.options.sourceType,this.finishNode(e,"Program")};var K={kind:"loop"},X={kind:"switch"};H.isLet=function(e){if(this.options.ecmaVersion<6||!this.isContextual("let"))return!1;x.lastIndex=this.pos;var t=x.exec(this.input),n=this.pos+t[0].length,r=this.input.charCodeAt(n);if(91===r||92===r)return!0;if(e)return!1;if(123===r||r>55295&&r<56320)return!0;if(p(r,!0)){for(var a=n+1;d(r=this.input.charCodeAt(a),!0);)++a;if(92===r||r>55295&&r<56320)return!0;var s=this.input.slice(n,a);if(!o.test(s))return!0}return!1},H.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;x.lastIndex=this.pos;var e,t=x.exec(this.input),n=this.pos+t[0].length;return!(b.test(this.input.slice(this.pos,n))||"function"!==this.input.slice(n,n+8)||n+8!==this.input.length&&(d(e=this.input.charCodeAt(n+8))||e>55295&&e<56320))},H.isUsingKeyword=function(e,t){if(this.options.ecmaVersion<17||!this.isContextual(e?"await":"using"))return!1;x.lastIndex=this.pos;var n=x.exec(this.input),r=this.pos+n[0].length;if(b.test(this.input.slice(this.pos,r)))return!1;if(e){var a,s=r+5;if("using"!==this.input.slice(r,s)||s===this.input.length||d(a=this.input.charCodeAt(s))||a>55295&&a<56320)return!1;x.lastIndex=s;var i=x.exec(this.input);if(i&&b.test(this.input.slice(s,s+i[0].length)))return!1}if(t){var o,l=r+2;if(!("of"!==this.input.slice(r,l)||l!==this.input.length&&(d(o=this.input.charCodeAt(l))||o>55295&&o<56320)))return!1}var c=this.input.charCodeAt(r);return p(c,!0)||92===c},H.isAwaitUsing=function(e){return this.isUsingKeyword(!0,e)},H.isUsing=function(e){return this.isUsingKeyword(!1,e)},H.parseStatement=function(e,t,n){var r,a=this.type,s=this.startNode();switch(this.isLet(e)&&(a=$._var,r="let"),a){case $._break:case $._continue:return this.parseBreakContinueStatement(s,a.keyword);case $._debugger:return this.parseDebuggerStatement(s);case $._do:return this.parseDoStatement(s);case $._for:return this.parseForStatement(s);case $._function:return e&&(this.strict||"if"!==e&&"label"!==e)&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(s,!1,!e);case $._class:return e&&this.unexpected(),this.parseClass(s,!0);case $._if:return this.parseIfStatement(s);case $._return:return this.parseReturnStatement(s);case $._switch:return this.parseSwitchStatement(s);case $._throw:return this.parseThrowStatement(s);case $._try:return this.parseTryStatement(s);case $._const:case $._var:return r=r||this.value,e&&"var"!==r&&this.unexpected(),this.parseVarStatement(s,r);case $._while:return this.parseWhileStatement(s);case $._with:return this.parseWithStatement(s);case $.braceL:return this.parseBlock(!0,s);case $.semi:return this.parseEmptyStatement(s);case $._export:case $._import:if(this.options.ecmaVersion>10&&a===$._import){x.lastIndex=this.pos;var i=x.exec(this.input),o=this.pos+i[0].length,l=this.input.charCodeAt(o);if(40===l||46===l)return this.parseExpressionStatement(s,this.parseExpression())}return this.options.allowImportExportEverywhere||(t||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),a===$._import?this.parseImport(s):this.parseExport(s,n);default:if(this.isAsyncFunction())return e&&this.unexpected(),this.next(),this.parseFunctionStatement(s,!0,!e);var c=this.isAwaitUsing(!1)?"await using":this.isUsing(!1)?"using":null;if(c)return t&&"script"===this.options.sourceType&&this.raise(this.start,"Using declaration cannot appear in the top level when source type is `script`"),"await using"===c&&(this.canAwait||this.raise(this.start,"Await using cannot appear outside of async function"),this.next()),this.next(),this.parseVar(s,!1,c),this.semicolon(),this.finishNode(s,"VariableDeclaration");var u=this.value,p=this.parseExpression();return a===$.name&&"Identifier"===p.type&&this.eat($.colon)?this.parseLabeledStatement(s,u,p,e):this.parseExpressionStatement(s,p)}},H.parseBreakContinueStatement=function(e,t){var n="break"===t;this.next(),this.eat($.semi)||this.insertSemicolon()?e.label=null:this.type!==$.name?this.unexpected():(e.label=this.parseIdent(),this.semicolon());for(var r=0;r<this.labels.length;++r){var a=this.labels[r];if(null==e.label||a.name===e.label.name){if(null!=a.kind&&(n||"loop"===a.kind))break;if(e.label&&n)break}}return r===this.labels.length&&this.raise(e.start,"Unsyntactic "+t),this.finishNode(e,n?"BreakStatement":"ContinueStatement")},H.parseDebuggerStatement=function(e){return this.next(),this.semicolon(),this.finishNode(e,"DebuggerStatement")},H.parseDoStatement=function(e){return this.next(),this.labels.push(K),e.body=this.parseStatement("do"),this.labels.pop(),this.expect($._while),e.test=this.parseParenExpression(),this.options.ecmaVersion>=6?this.eat($.semi):this.semicolon(),this.finishNode(e,"DoWhileStatement")},H.parseForStatement=function(e){this.next();var t=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(K),this.enterScope(0),this.expect($.parenL),this.type===$.semi)return t>-1&&this.unexpected(t),this.parseFor(e,null);var n=this.isLet();if(this.type===$._var||this.type===$._const||n){var r=this.startNode(),a=n?"let":this.value;return this.next(),this.parseVar(r,!0,a),this.finishNode(r,"VariableDeclaration"),this.parseForAfterInit(e,r,t)}var s=this.isContextual("let"),i=!1,o=this.isUsing(!0)?"using":this.isAwaitUsing(!0)?"await using":null;if(o){var l=this.startNode();return this.next(),"await using"===o&&this.next(),this.parseVar(l,!0,o),this.finishNode(l,"VariableDeclaration"),this.parseForAfterInit(e,l,t)}var c=this.containsEsc,u=new W,p=this.start,d=t>-1?this.parseExprSubscripts(u,"await"):this.parseExpression(!0,u);return this.type===$._in||(i=this.options.ecmaVersion>=6&&this.isContextual("of"))?(t>-1?(this.type===$._in&&this.unexpected(t),e.await=!0):i&&this.options.ecmaVersion>=8&&(d.start!==p||c||"Identifier"!==d.type||"async"!==d.name?this.options.ecmaVersion>=9&&(e.await=!1):this.unexpected()),s&&i&&this.raise(d.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(d,!1,u),this.checkLValPattern(d),this.parseForIn(e,d)):(this.checkExpressionErrors(u,!0),t>-1&&this.unexpected(t),this.parseFor(e,d))},H.parseForAfterInit=function(e,t,n){return(this.type===$._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&1===t.declarations.length?(this.options.ecmaVersion>=9&&(this.type===$._in?n>-1&&this.unexpected(n):e.await=n>-1),this.parseForIn(e,t)):(n>-1&&this.unexpected(n),this.parseFor(e,t))},H.parseFunctionStatement=function(e,t,n){return this.next(),this.parseFunction(e,Q|(n?0:ee),!1,t)},H.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement("if"),e.alternate=this.eat($._else)?this.parseStatement("if"):null,this.finishNode(e,"IfStatement")},H.parseReturnStatement=function(e){return this.inFunction||this.options.allowReturnOutsideFunction||this.raise(this.start,"'return' outside of function"),this.next(),this.eat($.semi)||this.insertSemicolon()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")},H.parseSwitchStatement=function(e){var t;this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect($.braceL),this.labels.push(X),this.enterScope(0);for(var n=!1;this.type!==$.braceR;)if(this.type===$._case||this.type===$._default){var r=this.type===$._case;t&&this.finishNode(t,"SwitchCase"),e.cases.push(t=this.startNode()),t.consequent=[],this.next(),r?t.test=this.parseExpression():(n&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),n=!0,t.test=null),this.expect($.colon)}else t||this.unexpected(),t.consequent.push(this.parseStatement(null));return this.exitScope(),t&&this.finishNode(t,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(e,"SwitchStatement")},H.parseThrowStatement=function(e){return this.next(),b.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")};var J=[];H.parseCatchClauseParam=function(){var e=this.parseBindingAtom(),t="Identifier"===e.type;return this.enterScope(t?32:0),this.checkLValPattern(e,t?4:2),this.expect($.parenR),e},H.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===$._catch){var t=this.startNode();this.next(),this.eat($.parenL)?t.param=this.parseCatchClauseParam():(this.options.ecmaVersion<10&&this.unexpected(),t.param=null,this.enterScope(0)),t.body=this.parseBlock(!1),this.exitScope(),e.handler=this.finishNode(t,"CatchClause")}return e.finalizer=this.eat($._finally)?this.parseBlock():null,e.handler||e.finalizer||this.raise(e.start,"Missing catch or finally clause"),this.finishNode(e,"TryStatement")},H.parseVarStatement=function(e,t,n){return this.next(),this.parseVar(e,!1,t,n),this.semicolon(),this.finishNode(e,"VariableDeclaration")},H.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(K),e.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(e,"WhileStatement")},H.parseWithStatement=function(e){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),e.object=this.parseParenExpression(),e.body=this.parseStatement("with"),this.finishNode(e,"WithStatement")},H.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,"EmptyStatement")},H.parseLabeledStatement=function(e,t,n,r){for(var a=0,s=this.labels;a<s.length;a+=1)s[a].name===t&&this.raise(n.start,"Label '"+t+"' is already declared");for(var i=this.type.isLoop?"loop":this.type===$._switch?"switch":null,o=this.labels.length-1;o>=0;o--){var l=this.labels[o];if(l.statementStart!==e.start)break;l.statementStart=this.start,l.kind=i}return this.labels.push({name:t,kind:i,statementStart:this.start}),e.body=this.parseStatement(r?-1===r.indexOf("label")?r+"label":r:"label"),this.labels.pop(),e.label=n,this.finishNode(e,"LabeledStatement")},H.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")},H.parseBlock=function(e,t,n){for(void 0===e&&(e=!0),void 0===t&&(t=this.startNode()),t.body=[],this.expect($.braceL),e&&this.enterScope(0);this.type!==$.braceR;){var r=this.parseStatement(null);t.body.push(r)}return n&&(this.strict=!1),this.next(),e&&this.exitScope(),this.finishNode(t,"BlockStatement")},H.parseFor=function(e,t){return e.init=t,this.expect($.semi),e.test=this.type===$.semi?null:this.parseExpression(),this.expect($.semi),e.update=this.type===$.parenR?null:this.parseExpression(),this.expect($.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,"ForStatement")},H.parseForIn=function(e,t){var n=this.type===$._in;return this.next(),"VariableDeclaration"===t.type&&null!=t.declarations[0].init&&(!n||this.options.ecmaVersion<8||this.strict||"var"!==t.kind||"Identifier"!==t.declarations[0].id.type)&&this.raise(t.start,(n?"for-in":"for-of")+" loop variable declaration may not have an initializer"),e.left=t,e.right=n?this.parseExpression():this.parseMaybeAssign(),this.expect($.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,n?"ForInStatement":"ForOfStatement")},H.parseVar=function(e,t,n,r){for(e.declarations=[],e.kind=n;;){var a=this.startNode();if(this.parseVarId(a,n),this.eat($.eq)?a.init=this.parseMaybeAssign(t):r||"const"!==n||this.type===$._in||this.options.ecmaVersion>=6&&this.isContextual("of")?r||"using"!==n&&"await using"!==n||!(this.options.ecmaVersion>=17)||this.type===$._in||this.isContextual("of")?r||"Identifier"===a.id.type||t&&(this.type===$._in||this.isContextual("of"))?a.init=null:this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):this.raise(this.lastTokEnd,"Missing initializer in "+n+" declaration"):this.unexpected(),e.declarations.push(this.finishNode(a,"VariableDeclarator")),!this.eat($.comma))break}return e},H.parseVarId=function(e,t){e.id="using"===t||"await using"===t?this.parseIdent():this.parseBindingAtom(),this.checkLValPattern(e.id,"var"===t?1:2,!1)};var Q=1,ee=2;function te(e,t){var n=t.key.name,r=e[n],a="true";return"MethodDefinition"!==t.type||"get"!==t.kind&&"set"!==t.kind||(a=(t.static?"s":"i")+t.kind),"iget"===r&&"iset"===a||"iset"===r&&"iget"===a||"sget"===r&&"sset"===a||"sset"===r&&"sget"===a?(e[n]="true",!1):!!r||(e[n]=a,!1)}function ne(e,t){var n=e.computed,r=e.key;return!n&&("Identifier"===r.type&&r.name===t||"Literal"===r.type&&r.value===t)}H.parseFunction=function(e,t,n,r,a){this.initFunction(e),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!r)&&(this.type===$.star&&t&ee&&this.unexpected(),e.generator=this.eat($.star)),this.options.ecmaVersion>=8&&(e.async=!!r),t&Q&&(e.id=4&t&&this.type!==$.name?null:this.parseIdent(),!e.id||t&ee||this.checkLValSimple(e.id,this.strict||e.generator||e.async?this.treatFunctionsAsVar?1:2:3));var s=this.yieldPos,i=this.awaitPos,o=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(U(e.async,e.generator)),t&Q||(e.id=this.type===$.name?this.parseIdent():null),this.parseFunctionParams(e),this.parseFunctionBody(e,n,!1,a),this.yieldPos=s,this.awaitPos=i,this.awaitIdentPos=o,this.finishNode(e,t&Q?"FunctionDeclaration":"FunctionExpression")},H.parseFunctionParams=function(e){this.expect($.parenL),e.params=this.parseBindingList($.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()},H.parseClass=function(e,t){this.next();var n=this.strict;this.strict=!0,this.parseClassId(e,t),this.parseClassSuper(e);var r=this.enterClassBody(),a=this.startNode(),s=!1;for(a.body=[],this.expect($.braceL);this.type!==$.braceR;){var i=this.parseClassElement(null!==e.superClass);i&&(a.body.push(i),"MethodDefinition"===i.type&&"constructor"===i.kind?(s&&this.raiseRecoverable(i.start,"Duplicate constructor in the same class"),s=!0):i.key&&"PrivateIdentifier"===i.key.type&&te(r,i)&&this.raiseRecoverable(i.key.start,"Identifier '#"+i.key.name+"' has already been declared"))}return this.strict=n,this.next(),e.body=this.finishNode(a,"ClassBody"),this.exitClassBody(),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")},H.parseClassElement=function(e){if(this.eat($.semi))return null;var t=this.options.ecmaVersion,n=this.startNode(),r="",a=!1,s=!1,i="method",o=!1;if(this.eatContextual("static")){if(t>=13&&this.eat($.braceL))return this.parseClassStaticBlock(n),n;this.isClassElementNameStart()||this.type===$.star?o=!0:r="static"}if(n.static=o,!r&&t>=8&&this.eatContextual("async")&&(!this.isClassElementNameStart()&&this.type!==$.star||this.canInsertSemicolon()?r="async":s=!0),!r&&(t>=9||!s)&&this.eat($.star)&&(a=!0),!r&&!s&&!a){var l=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?i=l:r=l)}if(r?(n.computed=!1,n.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),n.key.name=r,this.finishNode(n.key,"Identifier")):this.parseClassElementName(n),t<13||this.type===$.parenL||"method"!==i||a||s){var c=!n.static&&ne(n,"constructor"),u=c&&e;c&&"method"!==i&&this.raise(n.key.start,"Constructor can't have get/set modifier"),n.kind=c?"constructor":i,this.parseClassMethod(n,a,s,u)}else this.parseClassField(n);return n},H.isClassElementNameStart=function(){return this.type===$.name||this.type===$.privateId||this.type===$.num||this.type===$.string||this.type===$.bracketL||this.type.keyword},H.parseClassElementName=function(e){this.type===$.privateId?("constructor"===this.value&&this.raise(this.start,"Classes can't have an element named '#constructor'"),e.computed=!1,e.key=this.parsePrivateIdent()):this.parsePropertyName(e)},H.parseClassMethod=function(e,t,n,r){var a=e.key;"constructor"===e.kind?(t&&this.raise(a.start,"Constructor can't be a generator"),n&&this.raise(a.start,"Constructor can't be an async method")):e.static&&ne(e,"prototype")&&this.raise(a.start,"Classes may not have a static property named prototype");var s=e.value=this.parseMethod(t,n,r);return"get"===e.kind&&0!==s.params.length&&this.raiseRecoverable(s.start,"getter should have no params"),"set"===e.kind&&1!==s.params.length&&this.raiseRecoverable(s.start,"setter should have exactly one param"),"set"===e.kind&&"RestElement"===s.params[0].type&&this.raiseRecoverable(s.params[0].start,"Setter cannot use rest params"),this.finishNode(e,"MethodDefinition")},H.parseClassField=function(e){return ne(e,"constructor")?this.raise(e.key.start,"Classes can't have a field named 'constructor'"):e.static&&ne(e,"prototype")&&this.raise(e.key.start,"Classes can't have a static field named 'prototype'"),this.eat($.eq)?(this.enterScope(576),e.value=this.parseMaybeAssign(),this.exitScope()):e.value=null,this.semicolon(),this.finishNode(e,"PropertyDefinition")},H.parseClassStaticBlock=function(e){e.body=[];var t=this.labels;for(this.labels=[],this.enterScope(320);this.type!==$.braceR;){var n=this.parseStatement(null);e.body.push(n)}return this.next(),this.exitScope(),this.labels=t,this.finishNode(e,"StaticBlock")},H.parseClassId=function(e,t){this.type===$.name?(e.id=this.parseIdent(),t&&this.checkLValSimple(e.id,2,!1)):(!0===t&&this.unexpected(),e.id=null)},H.parseClassSuper=function(e){e.superClass=this.eat($._extends)?this.parseExprSubscripts(null,!1):null},H.enterClassBody=function(){var e={declared:Object.create(null),used:[]};return this.privateNameStack.push(e),e.declared},H.exitClassBody=function(){var e=this.privateNameStack.pop(),t=e.declared,n=e.used;if(this.options.checkPrivateFields)for(var r=this.privateNameStack.length,a=0===r?null:this.privateNameStack[r-1],s=0;s<n.length;++s){var i=n[s];I(t,i.name)||(a?a.used.push(i):this.raiseRecoverable(i.start,"Private field '#"+i.name+"' must be declared in an enclosing class"))}},H.parseExportAllDeclaration=function(e,t){return this.options.ecmaVersion>=11&&(this.eatContextual("as")?(e.exported=this.parseModuleExportName(),this.checkExport(t,e.exported,this.lastTokStart)):e.exported=null),this.expectContextual("from"),this.type!==$.string&&this.unexpected(),e.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(e,"ExportAllDeclaration")},H.parseExport=function(e,t){if(this.next(),this.eat($.star))return this.parseExportAllDeclaration(e,t);if(this.eat($._default))return this.checkExport(t,"default",this.lastTokStart),e.declaration=this.parseExportDefaultDeclaration(),this.finishNode(e,"ExportDefaultDeclaration");if(this.shouldParseExportStatement())e.declaration=this.parseExportDeclaration(e),"VariableDeclaration"===e.declaration.type?this.checkVariableExport(t,e.declaration.declarations):this.checkExport(t,e.declaration.id,e.declaration.id.start),e.specifiers=[],e.source=null,this.options.ecmaVersion>=16&&(e.attributes=[]);else{if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(t),this.eatContextual("from"))this.type!==$.string&&this.unexpected(),e.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause());else{for(var n=0,r=e.specifiers;n<r.length;n+=1){var a=r[n];this.checkUnreserved(a.local),this.checkLocalExport(a.local),"Literal"===a.local.type&&this.raise(a.local.start,"A string literal cannot be used as an exported binding without `from`.")}e.source=null,this.options.ecmaVersion>=16&&(e.attributes=[])}this.semicolon()}return this.finishNode(e,"ExportNamedDeclaration")},H.parseExportDeclaration=function(e){return this.parseStatement(null)},H.parseExportDefaultDeclaration=function(){var e;if(this.type===$._function||(e=this.isAsyncFunction())){var t=this.startNode();return this.next(),e&&this.next(),this.parseFunction(t,4|Q,!1,e)}if(this.type===$._class){var n=this.startNode();return this.parseClass(n,"nullableID")}var r=this.parseMaybeAssign();return this.semicolon(),r},H.checkExport=function(e,t,n){e&&("string"!=typeof t&&(t="Identifier"===t.type?t.name:t.value),I(e,t)&&this.raiseRecoverable(n,"Duplicate export '"+t+"'"),e[t]=!0)},H.checkPatternExport=function(e,t){var n=t.type;if("Identifier"===n)this.checkExport(e,t,t.start);else if("ObjectPattern"===n)for(var r=0,a=t.properties;r<a.length;r+=1){var s=a[r];this.checkPatternExport(e,s)}else if("ArrayPattern"===n)for(var i=0,o=t.elements;i<o.length;i+=1){var l=o[i];l&&this.checkPatternExport(e,l)}else"Property"===n?this.checkPatternExport(e,t.value):"AssignmentPattern"===n?this.checkPatternExport(e,t.left):"RestElement"===n&&this.checkPatternExport(e,t.argument)},H.checkVariableExport=function(e,t){if(e)for(var n=0,r=t;n<r.length;n+=1){var a=r[n];this.checkPatternExport(e,a.id)}},H.shouldParseExportStatement=function(){return"var"===this.type.keyword||"const"===this.type.keyword||"class"===this.type.keyword||"function"===this.type.keyword||this.isLet()||this.isAsyncFunction()},H.parseExportSpecifier=function(e){var t=this.startNode();return t.local=this.parseModuleExportName(),t.exported=this.eatContextual("as")?this.parseModuleExportName():t.local,this.checkExport(e,t.exported,t.exported.start),this.finishNode(t,"ExportSpecifier")},H.parseExportSpecifiers=function(e){var t=[],n=!0;for(this.expect($.braceL);!this.eat($.braceR);){if(n)n=!1;else if(this.expect($.comma),this.afterTrailingComma($.braceR))break;t.push(this.parseExportSpecifier(e))}return t},H.parseImport=function(e){return this.next(),this.type===$.string?(e.specifiers=J,e.source=this.parseExprAtom()):(e.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),e.source=this.type===$.string?this.parseExprAtom():this.unexpected()),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(e,"ImportDeclaration")},H.parseImportSpecifier=function(){var e=this.startNode();return e.imported=this.parseModuleExportName(),this.eatContextual("as")?e.local=this.parseIdent():(this.checkUnreserved(e.imported),e.local=e.imported),this.checkLValSimple(e.local,2),this.finishNode(e,"ImportSpecifier")},H.parseImportDefaultSpecifier=function(){var e=this.startNode();return e.local=this.parseIdent(),this.checkLValSimple(e.local,2),this.finishNode(e,"ImportDefaultSpecifier")},H.parseImportNamespaceSpecifier=function(){var e=this.startNode();return this.next(),this.expectContextual("as"),e.local=this.parseIdent(),this.checkLValSimple(e.local,2),this.finishNode(e,"ImportNamespaceSpecifier")},H.parseImportSpecifiers=function(){var e=[],t=!0;if(this.type===$.name&&(e.push(this.parseImportDefaultSpecifier()),!this.eat($.comma)))return e;if(this.type===$.star)return e.push(this.parseImportNamespaceSpecifier()),e;for(this.expect($.braceL);!this.eat($.braceR);){if(t)t=!1;else if(this.expect($.comma),this.afterTrailingComma($.braceR))break;e.push(this.parseImportSpecifier())}return e},H.parseWithClause=function(){var e=[];if(!this.eat($._with))return e;this.expect($.braceL);for(var t={},n=!0;!this.eat($.braceR);){if(n)n=!1;else if(this.expect($.comma),this.afterTrailingComma($.braceR))break;var r=this.parseImportAttribute(),a="Identifier"===r.key.type?r.key.name:r.key.value;I(t,a)&&this.raiseRecoverable(r.key.start,"Duplicate attribute key '"+a+"'"),t[a]=!0,e.push(r)}return e},H.parseImportAttribute=function(){var e=this.startNode();return e.key=this.type===$.string?this.parseExprAtom():this.parseIdent("never"!==this.options.allowReserved),this.expect($.colon),this.type!==$.string&&this.unexpected(),e.value=this.parseExprAtom(),this.finishNode(e,"ImportAttribute")},H.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===$.string){var e=this.parseLiteral(this.value);return L.test(e.value)&&this.raise(e.start,"An export name cannot include a lone surrogate."),e}return this.parseIdent(!0)},H.adaptDirectivePrologue=function(e){for(var t=0;t<e.length&&this.isDirectiveCandidate(e[t]);++t)e[t].directive=e[t].expression.raw.slice(1,-1)},H.isDirectiveCandidate=function(e){return this.options.ecmaVersion>=5&&"ExpressionStatement"===e.type&&"Literal"===e.expression.type&&"string"==typeof e.expression.value&&('"'===this.input[e.start]||"'"===this.input[e.start])};var re=Y.prototype;re.toAssignable=function(e,t,n){if(this.options.ecmaVersion>=6&&e)switch(e.type){case"Identifier":this.inAsync&&"await"===e.name&&this.raise(e.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":e.type="ObjectPattern",n&&this.checkPatternErrors(n,!0);for(var r=0,a=e.properties;r<a.length;r+=1){var s=a[r];this.toAssignable(s,t),"RestElement"!==s.type||"ArrayPattern"!==s.argument.type&&"ObjectPattern"!==s.argument.type||this.raise(s.argument.start,"Unexpected token")}break;case"Property":"init"!==e.kind&&this.raise(e.key.start,"Object pattern can't contain getter or setter"),this.toAssignable(e.value,t);break;case"ArrayExpression":e.type="ArrayPattern",n&&this.checkPatternErrors(n,!0),this.toAssignableList(e.elements,t);break;case"SpreadElement":e.type="RestElement",this.toAssignable(e.argument,t),"AssignmentPattern"===e.argument.type&&this.raise(e.argument.start,"Rest elements cannot have a default value");break;case"AssignmentExpression":"="!==e.operator&&this.raise(e.left.end,"Only '=' operator can be used for specifying default value."),e.type="AssignmentPattern",delete e.operator,this.toAssignable(e.left,t);break;case"ParenthesizedExpression":this.toAssignable(e.expression,t,n);break;case"ChainExpression":this.raiseRecoverable(e.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":if(!t)break;default:this.raise(e.start,"Assigning to rvalue")}else n&&this.checkPatternErrors(n,!0);return e},re.toAssignableList=function(e,t){for(var n=e.length,r=0;r<n;r++){var a=e[r];a&&this.toAssignable(a,t)}if(n){var s=e[n-1];6===this.options.ecmaVersion&&t&&s&&"RestElement"===s.type&&"Identifier"!==s.argument.type&&this.unexpected(s.argument.start)}return e},re.parseSpread=function(e){var t=this.startNode();return this.next(),t.argument=this.parseMaybeAssign(!1,e),this.finishNode(t,"SpreadElement")},re.parseRestBinding=function(){var e=this.startNode();return this.next(),6===this.options.ecmaVersion&&this.type!==$.name&&this.unexpected(),e.argument=this.parseBindingAtom(),this.finishNode(e,"RestElement")},re.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case $.bracketL:var e=this.startNode();return this.next(),e.elements=this.parseBindingList($.bracketR,!0,!0),this.finishNode(e,"ArrayPattern");case $.braceL:return this.parseObj(!0)}return this.parseIdent()},re.parseBindingList=function(e,t,n,r){for(var a=[],s=!0;!this.eat(e);)if(s?s=!1:this.expect($.comma),t&&this.type===$.comma)a.push(null);else{if(n&&this.afterTrailingComma(e))break;if(this.type===$.ellipsis){var i=this.parseRestBinding();this.parseBindingListItem(i),a.push(i),this.type===$.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.expect(e);break}a.push(this.parseAssignableListItem(r))}return a},re.parseAssignableListItem=function(e){var t=this.parseMaybeDefault(this.start,this.startLoc);return this.parseBindingListItem(t),t},re.parseBindingListItem=function(e){return e},re.parseMaybeDefault=function(e,t,n){if(n=n||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat($.eq))return n;var r=this.startNodeAt(e,t);return r.left=n,r.right=this.parseMaybeAssign(),this.finishNode(r,"AssignmentPattern")},re.checkLValSimple=function(e,t,n){void 0===t&&(t=0);var r=0!==t;switch(e.type){case"Identifier":this.strict&&this.reservedWordsStrictBind.test(e.name)&&this.raiseRecoverable(e.start,(r?"Binding ":"Assigning to ")+e.name+" in strict mode"),r&&(2===t&&"let"===e.name&&this.raiseRecoverable(e.start,"let is disallowed as a lexically bound name"),n&&(I(n,e.name)&&this.raiseRecoverable(e.start,"Argument name clash"),n[e.name]=!0),5!==t&&this.declareName(e.name,t,e.start));break;case"ChainExpression":this.raiseRecoverable(e.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":r&&this.raiseRecoverable(e.start,"Binding member expression");break;case"ParenthesizedExpression":return r&&this.raiseRecoverable(e.start,"Binding parenthesized expression"),this.checkLValSimple(e.expression,t,n);default:this.raise(e.start,(r?"Binding":"Assigning to")+" rvalue")}},re.checkLValPattern=function(e,t,n){switch(void 0===t&&(t=0),e.type){case"ObjectPattern":for(var r=0,a=e.properties;r<a.length;r+=1){var s=a[r];this.checkLValInnerPattern(s,t,n)}break;case"ArrayPattern":for(var i=0,o=e.elements;i<o.length;i+=1){var l=o[i];l&&this.checkLValInnerPattern(l,t,n)}break;default:this.checkLValSimple(e,t,n)}},re.checkLValInnerPattern=function(e,t,n){switch(void 0===t&&(t=0),e.type){case"Property":this.checkLValInnerPattern(e.value,t,n);break;case"AssignmentPattern":this.checkLValPattern(e.left,t,n);break;case"RestElement":this.checkLValPattern(e.argument,t,n);break;default:this.checkLValPattern(e,t,n)}};var ae=function(e,t,n,r,a){this.token=e,this.isExpr=!!t,this.preserveSpace=!!n,this.override=r,this.generator=!!a},se={b_stat:new ae("{",!1),b_expr:new ae("{",!0),b_tmpl:new ae("${",!1),p_stat:new ae("(",!1),p_expr:new ae("(",!0),q_tmpl:new ae("`",!0,!0,(function(e){return e.tryReadTemplateToken()})),f_stat:new ae("function",!1),f_expr:new ae("function",!0),f_expr_gen:new ae("function",!0,!1,null,!0),f_gen:new ae("function",!1,!1,null,!0)},ie=Y.prototype;ie.initialContext=function(){return[se.b_stat]},ie.curContext=function(){return this.context[this.context.length-1]},ie.braceIsBlock=function(e){var t=this.curContext();return t===se.f_expr||t===se.f_stat||(e!==$.colon||t!==se.b_stat&&t!==se.b_expr?e===$._return||e===$.name&&this.exprAllowed?b.test(this.input.slice(this.lastTokEnd,this.start)):e===$._else||e===$.semi||e===$.eof||e===$.parenR||e===$.arrow||(e===$.braceL?t===se.b_stat:e!==$._var&&e!==$._const&&e!==$.name&&!this.exprAllowed):!t.isExpr)},ie.inGeneratorContext=function(){for(var e=this.context.length-1;e>=1;e--){var t=this.context[e];if("function"===t.token)return t.generator}return!1},ie.updateContext=function(e){var t,n=this.type;n.keyword&&e===$.dot?this.exprAllowed=!1:(t=n.updateContext)?t.call(this,e):this.exprAllowed=n.beforeExpr},ie.overrideContext=function(e){this.curContext()!==e&&(this.context[this.context.length-1]=e)},$.parenR.updateContext=$.braceR.updateContext=function(){if(1!==this.context.length){var e=this.context.pop();e===se.b_stat&&"function"===this.curContext().token&&(e=this.context.pop()),this.exprAllowed=!e.isExpr}else this.exprAllowed=!0},$.braceL.updateContext=function(e){this.context.push(this.braceIsBlock(e)?se.b_stat:se.b_expr),this.exprAllowed=!0},$.dollarBraceL.updateContext=function(){this.context.push(se.b_tmpl),this.exprAllowed=!0},$.parenL.updateContext=function(e){var t=e===$._if||e===$._for||e===$._with||e===$._while;this.context.push(t?se.p_stat:se.p_expr),this.exprAllowed=!0},$.incDec.updateContext=function(){},$._function.updateContext=$._class.updateContext=function(e){!e.beforeExpr||e===$._else||e===$.semi&&this.curContext()!==se.p_stat||e===$._return&&b.test(this.input.slice(this.lastTokEnd,this.start))||(e===$.colon||e===$.braceL)&&this.curContext()===se.b_stat?this.context.push(se.f_stat):this.context.push(se.f_expr),this.exprAllowed=!1},$.colon.updateContext=function(){"function"===this.curContext().token&&this.context.pop(),this.exprAllowed=!0},$.backQuote.updateContext=function(){this.curContext()===se.q_tmpl?this.context.pop():this.context.push(se.q_tmpl),this.exprAllowed=!1},$.star.updateContext=function(e){if(e===$._function){var t=this.context.length-1;this.context[t]===se.f_expr?this.context[t]=se.f_expr_gen:this.context[t]=se.f_gen}this.exprAllowed=!0},$.name.updateContext=function(e){var t=!1;this.options.ecmaVersion>=6&&e!==$.dot&&("of"===this.value&&!this.exprAllowed||"yield"===this.value&&this.inGeneratorContext())&&(t=!0),this.exprAllowed=t};var oe=Y.prototype;function le(e){return"Identifier"===e.type||"ParenthesizedExpression"===e.type&&le(e.expression)}function ce(e){return"MemberExpression"===e.type&&"PrivateIdentifier"===e.property.type||"ChainExpression"===e.type&&ce(e.expression)||"ParenthesizedExpression"===e.type&&ce(e.expression)}oe.checkPropClash=function(e,t,n){if(!(this.options.ecmaVersion>=9&&"SpreadElement"===e.type||this.options.ecmaVersion>=6&&(e.computed||e.method||e.shorthand))){var r,a=e.key;switch(a.type){case"Identifier":r=a.name;break;case"Literal":r=String(a.value);break;default:return}var s=e.kind;if(this.options.ecmaVersion>=6)"__proto__"===r&&"init"===s&&(t.proto&&(n?n.doubleProto<0&&(n.doubleProto=a.start):this.raiseRecoverable(a.start,"Redefinition of __proto__ property")),t.proto=!0);else{var i=t[r="$"+r];i?("init"===s?this.strict&&i.init||i.get||i.set:i.init||i[s])&&this.raiseRecoverable(a.start,"Redefinition of property"):i=t[r]={init:!1,get:!1,set:!1},i[s]=!0}}},oe.parseExpression=function(e,t){var n=this.start,r=this.startLoc,a=this.parseMaybeAssign(e,t);if(this.type===$.comma){var s=this.startNodeAt(n,r);for(s.expressions=[a];this.eat($.comma);)s.expressions.push(this.parseMaybeAssign(e,t));return this.finishNode(s,"SequenceExpression")}return a},oe.parseMaybeAssign=function(e,t,n){if(this.isContextual("yield")){if(this.inGenerator)return this.parseYield(e);this.exprAllowed=!1}var r=!1,a=-1,s=-1,i=-1;t?(a=t.parenthesizedAssign,s=t.trailingComma,i=t.doubleProto,t.parenthesizedAssign=t.trailingComma=-1):(t=new W,r=!0);var o=this.start,l=this.startLoc;this.type!==$.parenL&&this.type!==$.name||(this.potentialArrowAt=this.start,this.potentialArrowInForAwait="await"===e);var c=this.parseMaybeConditional(e,t);if(n&&(c=n.call(this,c,o,l)),this.type.isAssign){var u=this.startNodeAt(o,l);return u.operator=this.value,this.type===$.eq&&(c=this.toAssignable(c,!1,t)),r||(t.parenthesizedAssign=t.trailingComma=t.doubleProto=-1),t.shorthandAssign>=c.start&&(t.shorthandAssign=-1),this.type===$.eq?this.checkLValPattern(c):this.checkLValSimple(c),u.left=c,this.next(),u.right=this.parseMaybeAssign(e),i>-1&&(t.doubleProto=i),this.finishNode(u,"AssignmentExpression")}return r&&this.checkExpressionErrors(t,!0),a>-1&&(t.parenthesizedAssign=a),s>-1&&(t.trailingComma=s),c},oe.parseMaybeConditional=function(e,t){var n=this.start,r=this.startLoc,a=this.parseExprOps(e,t);if(this.checkExpressionErrors(t))return a;if(this.eat($.question)){var s=this.startNodeAt(n,r);return s.test=a,s.consequent=this.parseMaybeAssign(),this.expect($.colon),s.alternate=this.parseMaybeAssign(e),this.finishNode(s,"ConditionalExpression")}return a},oe.parseExprOps=function(e,t){var n=this.start,r=this.startLoc,a=this.parseMaybeUnary(t,!1,!1,e);return this.checkExpressionErrors(t)||a.start===n&&"ArrowFunctionExpression"===a.type?a:this.parseExprOp(a,n,r,-1,e)},oe.parseExprOp=function(e,t,n,r,a){var s=this.type.binop;if(null!=s&&(!a||this.type!==$._in)&&s>r){var i=this.type===$.logicalOR||this.type===$.logicalAND,o=this.type===$.coalesce;o&&(s=$.logicalAND.binop);var l=this.value;this.next();var c=this.start,u=this.startLoc,p=this.parseExprOp(this.parseMaybeUnary(null,!1,!1,a),c,u,s,a),d=this.buildBinary(t,n,e,p,l,i||o);return(i&&this.type===$.coalesce||o&&(this.type===$.logicalOR||this.type===$.logicalAND))&&this.raiseRecoverable(this.start,"Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"),this.parseExprOp(d,t,n,r,a)}return e},oe.buildBinary=function(e,t,n,r,a,s){"PrivateIdentifier"===r.type&&this.raise(r.start,"Private identifier can only be left side of binary expression");var i=this.startNodeAt(e,t);return i.left=n,i.operator=a,i.right=r,this.finishNode(i,s?"LogicalExpression":"BinaryExpression")},oe.parseMaybeUnary=function(e,t,n,r){var a,s=this.start,i=this.startLoc;if(this.isContextual("await")&&this.canAwait)a=this.parseAwait(r),t=!0;else if(this.type.prefix){var o=this.startNode(),l=this.type===$.incDec;o.operator=this.value,o.prefix=!0,this.next(),o.argument=this.parseMaybeUnary(null,!0,l,r),this.checkExpressionErrors(e,!0),l?this.checkLValSimple(o.argument):this.strict&&"delete"===o.operator&&le(o.argument)?this.raiseRecoverable(o.start,"Deleting local variable in strict mode"):"delete"===o.operator&&ce(o.argument)?this.raiseRecoverable(o.start,"Private fields can not be deleted"):t=!0,a=this.finishNode(o,l?"UpdateExpression":"UnaryExpression")}else if(t||this.type!==$.privateId){if(a=this.parseExprSubscripts(e,r),this.checkExpressionErrors(e))return a;for(;this.type.postfix&&!this.canInsertSemicolon();){var c=this.startNodeAt(s,i);c.operator=this.value,c.prefix=!1,c.argument=a,this.checkLValSimple(a),this.next(),a=this.finishNode(c,"UpdateExpression")}}else(r||0===this.privateNameStack.length)&&this.options.checkPrivateFields&&this.unexpected(),a=this.parsePrivateIdent(),this.type!==$._in&&this.unexpected();return n||!this.eat($.starstar)?a:t?void this.unexpected(this.lastTokStart):this.buildBinary(s,i,a,this.parseMaybeUnary(null,!1,!1,r),"**",!1)},oe.parseExprSubscripts=function(e,t){var n=this.start,r=this.startLoc,a=this.parseExprAtom(e,t);if("ArrowFunctionExpression"===a.type&&")"!==this.input.slice(this.lastTokStart,this.lastTokEnd))return a;var s=this.parseSubscripts(a,n,r,!1,t);return e&&"MemberExpression"===s.type&&(e.parenthesizedAssign>=s.start&&(e.parenthesizedAssign=-1),e.parenthesizedBind>=s.start&&(e.parenthesizedBind=-1),e.trailingComma>=s.start&&(e.trailingComma=-1)),s},oe.parseSubscripts=function(e,t,n,r,a){for(var s=this.options.ecmaVersion>=8&&"Identifier"===e.type&&"async"===e.name&&this.lastTokEnd===e.end&&!this.canInsertSemicolon()&&e.end-e.start==5&&this.potentialArrowAt===e.start,i=!1;;){var o=this.parseSubscript(e,t,n,r,s,i,a);if(o.optional&&(i=!0),o===e||"ArrowFunctionExpression"===o.type){if(i){var l=this.startNodeAt(t,n);l.expression=o,o=this.finishNode(l,"ChainExpression")}return o}e=o}},oe.shouldParseAsyncArrow=function(){return!this.canInsertSemicolon()&&this.eat($.arrow)},oe.parseSubscriptAsyncArrow=function(e,t,n,r){return this.parseArrowExpression(this.startNodeAt(e,t),n,!0,r)},oe.parseSubscript=function(e,t,n,r,a,s,i){var o=this.options.ecmaVersion>=11,l=o&&this.eat($.questionDot);r&&l&&this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");var c=this.eat($.bracketL);if(c||l&&this.type!==$.parenL&&this.type!==$.backQuote||this.eat($.dot)){var u=this.startNodeAt(t,n);u.object=e,c?(u.property=this.parseExpression(),this.expect($.bracketR)):this.type===$.privateId&&"Super"!==e.type?u.property=this.parsePrivateIdent():u.property=this.parseIdent("never"!==this.options.allowReserved),u.computed=!!c,o&&(u.optional=l),e=this.finishNode(u,"MemberExpression")}else if(!r&&this.eat($.parenL)){var p=new W,d=this.yieldPos,m=this.awaitPos,h=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var f=this.parseExprList($.parenR,this.options.ecmaVersion>=8,!1,p);if(a&&!l&&this.shouldParseAsyncArrow())return this.checkPatternErrors(p,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0&&this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function"),this.yieldPos=d,this.awaitPos=m,this.awaitIdentPos=h,this.parseSubscriptAsyncArrow(t,n,f,i);this.checkExpressionErrors(p,!0),this.yieldPos=d||this.yieldPos,this.awaitPos=m||this.awaitPos,this.awaitIdentPos=h||this.awaitIdentPos;var v=this.startNodeAt(t,n);v.callee=e,v.arguments=f,o&&(v.optional=l),e=this.finishNode(v,"CallExpression")}else if(this.type===$.backQuote){(l||s)&&this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions");var g=this.startNodeAt(t,n);g.tag=e,g.quasi=this.parseTemplate({isTagged:!0}),e=this.finishNode(g,"TaggedTemplateExpression")}return e},oe.parseExprAtom=function(e,t,n){this.type===$.slash&&this.readRegexp();var r,a=this.potentialArrowAt===this.start;switch(this.type){case $._super:return this.allowSuper||this.raise(this.start,"'super' keyword outside a method"),r=this.startNode(),this.next(),this.type!==$.parenL||this.allowDirectSuper||this.raise(r.start,"super() call outside constructor of a subclass"),this.type!==$.dot&&this.type!==$.bracketL&&this.type!==$.parenL&&this.unexpected(),this.finishNode(r,"Super");case $._this:return r=this.startNode(),this.next(),this.finishNode(r,"ThisExpression");case $.name:var s=this.start,i=this.startLoc,o=this.containsEsc,l=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!o&&"async"===l.name&&!this.canInsertSemicolon()&&this.eat($._function))return this.overrideContext(se.f_expr),this.parseFunction(this.startNodeAt(s,i),0,!1,!0,t);if(a&&!this.canInsertSemicolon()){if(this.eat($.arrow))return this.parseArrowExpression(this.startNodeAt(s,i),[l],!1,t);if(this.options.ecmaVersion>=8&&"async"===l.name&&this.type===$.name&&!o&&(!this.potentialArrowInForAwait||"of"!==this.value||this.containsEsc))return l=this.parseIdent(!1),!this.canInsertSemicolon()&&this.eat($.arrow)||this.unexpected(),this.parseArrowExpression(this.startNodeAt(s,i),[l],!0,t)}return l;case $.regexp:var c=this.value;return(r=this.parseLiteral(c.value)).regex={pattern:c.pattern,flags:c.flags},r;case $.num:case $.string:return this.parseLiteral(this.value);case $._null:case $._true:case $._false:return(r=this.startNode()).value=this.type===$._null?null:this.type===$._true,r.raw=this.type.keyword,this.next(),this.finishNode(r,"Literal");case $.parenL:var u=this.start,p=this.parseParenAndDistinguishExpression(a,t);return e&&(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(p)&&(e.parenthesizedAssign=u),e.parenthesizedBind<0&&(e.parenthesizedBind=u)),p;case $.bracketL:return r=this.startNode(),this.next(),r.elements=this.parseExprList($.bracketR,!0,!0,e),this.finishNode(r,"ArrayExpression");case $.braceL:return this.overrideContext(se.b_expr),this.parseObj(!1,e);case $._function:return r=this.startNode(),this.next(),this.parseFunction(r,0);case $._class:return this.parseClass(this.startNode(),!1);case $._new:return this.parseNew();case $.backQuote:return this.parseTemplate();case $._import:return this.options.ecmaVersion>=11?this.parseExprImport(n):this.unexpected();default:return this.parseExprAtomDefault()}},oe.parseExprAtomDefault=function(){this.unexpected()},oe.parseExprImport=function(e){var t=this.startNode();if(this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import"),this.next(),this.type===$.parenL&&!e)return this.parseDynamicImport(t);if(this.type===$.dot){var n=this.startNodeAt(t.start,t.loc&&t.loc.start);return n.name="import",t.meta=this.finishNode(n,"Identifier"),this.parseImportMeta(t)}this.unexpected()},oe.parseDynamicImport=function(e){if(this.next(),e.source=this.parseMaybeAssign(),this.options.ecmaVersion>=16)this.eat($.parenR)?e.options=null:(this.expect($.comma),this.afterTrailingComma($.parenR)?e.options=null:(e.options=this.parseMaybeAssign(),this.eat($.parenR)||(this.expect($.comma),this.afterTrailingComma($.parenR)||this.unexpected())));else if(!this.eat($.parenR)){var t=this.start;this.eat($.comma)&&this.eat($.parenR)?this.raiseRecoverable(t,"Trailing comma is not allowed in import()"):this.unexpected(t)}return this.finishNode(e,"ImportExpression")},oe.parseImportMeta=function(e){this.next();var t=this.containsEsc;return e.property=this.parseIdent(!0),"meta"!==e.property.name&&this.raiseRecoverable(e.property.start,"The only valid meta property for import is 'import.meta'"),t&&this.raiseRecoverable(e.start,"'import.meta' must not contain escaped characters"),"module"===this.options.sourceType||this.options.allowImportExportEverywhere||this.raiseRecoverable(e.start,"Cannot use 'import.meta' outside a module"),this.finishNode(e,"MetaProperty")},oe.parseLiteral=function(e){var t=this.startNode();return t.value=e,t.raw=this.input.slice(this.start,this.end),110===t.raw.charCodeAt(t.raw.length-1)&&(t.bigint=null!=t.value?t.value.toString():t.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(t,"Literal")},oe.parseParenExpression=function(){this.expect($.parenL);var e=this.parseExpression();return this.expect($.parenR),e},oe.shouldParseArrow=function(e){return!this.canInsertSemicolon()},oe.parseParenAndDistinguishExpression=function(e,t){var n,r=this.start,a=this.startLoc,s=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var i,o=this.start,l=this.startLoc,c=[],u=!0,p=!1,d=new W,m=this.yieldPos,h=this.awaitPos;for(this.yieldPos=0,this.awaitPos=0;this.type!==$.parenR;){if(u?u=!1:this.expect($.comma),s&&this.afterTrailingComma($.parenR,!0)){p=!0;break}if(this.type===$.ellipsis){i=this.start,c.push(this.parseParenItem(this.parseRestBinding())),this.type===$.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}c.push(this.parseMaybeAssign(!1,d,this.parseParenItem))}var f=this.lastTokEnd,v=this.lastTokEndLoc;if(this.expect($.parenR),e&&this.shouldParseArrow(c)&&this.eat($.arrow))return this.checkPatternErrors(d,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=m,this.awaitPos=h,this.parseParenArrowList(r,a,c,t);c.length&&!p||this.unexpected(this.lastTokStart),i&&this.unexpected(i),this.checkExpressionErrors(d,!0),this.yieldPos=m||this.yieldPos,this.awaitPos=h||this.awaitPos,c.length>1?((n=this.startNodeAt(o,l)).expressions=c,this.finishNodeAt(n,"SequenceExpression",f,v)):n=c[0]}else n=this.parseParenExpression();if(this.options.preserveParens){var g=this.startNodeAt(r,a);return g.expression=n,this.finishNode(g,"ParenthesizedExpression")}return n},oe.parseParenItem=function(e){return e},oe.parseParenArrowList=function(e,t,n,r){return this.parseArrowExpression(this.startNodeAt(e,t),n,!1,r)};var ue=[];oe.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");var e=this.startNode();if(this.next(),this.options.ecmaVersion>=6&&this.type===$.dot){var t=this.startNodeAt(e.start,e.loc&&e.loc.start);t.name="new",e.meta=this.finishNode(t,"Identifier"),this.next();var n=this.containsEsc;return e.property=this.parseIdent(!0),"target"!==e.property.name&&this.raiseRecoverable(e.property.start,"The only valid meta property for new is 'new.target'"),n&&this.raiseRecoverable(e.start,"'new.target' must not contain escaped characters"),this.allowNewDotTarget||this.raiseRecoverable(e.start,"'new.target' can only be used in functions and class static block"),this.finishNode(e,"MetaProperty")}var r=this.start,a=this.startLoc;return e.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),r,a,!0,!1),this.eat($.parenL)?e.arguments=this.parseExprList($.parenR,this.options.ecmaVersion>=8,!1):e.arguments=ue,this.finishNode(e,"NewExpression")},oe.parseTemplateElement=function(e){var t=e.isTagged,n=this.startNode();return this.type===$.invalidTemplate?(t||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),n.value={raw:this.value.replace(/\r\n?/g,"\n"),cooked:null}):n.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,"\n"),cooked:this.value},this.next(),n.tail=this.type===$.backQuote,this.finishNode(n,"TemplateElement")},oe.parseTemplate=function(e){void 0===e&&(e={});var t=e.isTagged;void 0===t&&(t=!1);var n=this.startNode();this.next(),n.expressions=[];var r=this.parseTemplateElement({isTagged:t});for(n.quasis=[r];!r.tail;)this.type===$.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect($.dollarBraceL),n.expressions.push(this.parseExpression()),this.expect($.braceR),n.quasis.push(r=this.parseTemplateElement({isTagged:t}));return this.next(),this.finishNode(n,"TemplateLiteral")},oe.isAsyncProp=function(e){return!e.computed&&"Identifier"===e.key.type&&"async"===e.key.name&&(this.type===$.name||this.type===$.num||this.type===$.string||this.type===$.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===$.star)&&!b.test(this.input.slice(this.lastTokEnd,this.start))},oe.parseObj=function(e,t){var n=this.startNode(),r=!0,a={};for(n.properties=[],this.next();!this.eat($.braceR);){if(r)r=!1;else if(this.expect($.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma($.braceR))break;var s=this.parseProperty(e,t);e||this.checkPropClash(s,a,t),n.properties.push(s)}return this.finishNode(n,e?"ObjectPattern":"ObjectExpression")},oe.parseProperty=function(e,t){var n,r,a,s,i=this.startNode();if(this.options.ecmaVersion>=9&&this.eat($.ellipsis))return e?(i.argument=this.parseIdent(!1),this.type===$.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.finishNode(i,"RestElement")):(i.argument=this.parseMaybeAssign(!1,t),this.type===$.comma&&t&&t.trailingComma<0&&(t.trailingComma=this.start),this.finishNode(i,"SpreadElement"));this.options.ecmaVersion>=6&&(i.method=!1,i.shorthand=!1,(e||t)&&(a=this.start,s=this.startLoc),e||(n=this.eat($.star)));var o=this.containsEsc;return this.parsePropertyName(i),!e&&!o&&this.options.ecmaVersion>=8&&!n&&this.isAsyncProp(i)?(r=!0,n=this.options.ecmaVersion>=9&&this.eat($.star),this.parsePropertyName(i)):r=!1,this.parsePropertyValue(i,e,n,r,a,s,t,o),this.finishNode(i,"Property")},oe.parseGetterSetter=function(e){var t=e.key.name;this.parsePropertyName(e),e.value=this.parseMethod(!1),e.kind=t;var n="get"===e.kind?0:1;if(e.value.params.length!==n){var r=e.value.start;"get"===e.kind?this.raiseRecoverable(r,"getter should have no params"):this.raiseRecoverable(r,"setter should have exactly one param")}else"set"===e.kind&&"RestElement"===e.value.params[0].type&&this.raiseRecoverable(e.value.params[0].start,"Setter cannot use rest params")},oe.parsePropertyValue=function(e,t,n,r,a,s,i,o){(n||r)&&this.type===$.colon&&this.unexpected(),this.eat($.colon)?(e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,i),e.kind="init"):this.options.ecmaVersion>=6&&this.type===$.parenL?(t&&this.unexpected(),e.method=!0,e.value=this.parseMethod(n,r),e.kind="init"):t||o||!(this.options.ecmaVersion>=5)||e.computed||"Identifier"!==e.key.type||"get"!==e.key.name&&"set"!==e.key.name||this.type===$.comma||this.type===$.braceR||this.type===$.eq?this.options.ecmaVersion>=6&&!e.computed&&"Identifier"===e.key.type?((n||r)&&this.unexpected(),this.checkUnreserved(e.key),"await"!==e.key.name||this.awaitIdentPos||(this.awaitIdentPos=a),t?e.value=this.parseMaybeDefault(a,s,this.copyNode(e.key)):this.type===$.eq&&i?(i.shorthandAssign<0&&(i.shorthandAssign=this.start),e.value=this.parseMaybeDefault(a,s,this.copyNode(e.key))):e.value=this.copyNode(e.key),e.kind="init",e.shorthand=!0):this.unexpected():((n||r)&&this.unexpected(),this.parseGetterSetter(e))},oe.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat($.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect($.bracketR),e.key;e.computed=!1}return e.key=this.type===$.num||this.type===$.string?this.parseExprAtom():this.parseIdent("never"!==this.options.allowReserved)},oe.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)},oe.parseMethod=function(e,t,n){var r=this.startNode(),a=this.yieldPos,s=this.awaitPos,i=this.awaitIdentPos;return this.initFunction(r),this.options.ecmaVersion>=6&&(r.generator=e),this.options.ecmaVersion>=8&&(r.async=!!t),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(64|U(t,r.generator)|(n?128:0)),this.expect($.parenL),r.params=this.parseBindingList($.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(r,!1,!0,!1),this.yieldPos=a,this.awaitPos=s,this.awaitIdentPos=i,this.finishNode(r,"FunctionExpression")},oe.parseArrowExpression=function(e,t,n,r){var a=this.yieldPos,s=this.awaitPos,i=this.awaitIdentPos;return this.enterScope(16|U(n,!1)),this.initFunction(e),this.options.ecmaVersion>=8&&(e.async=!!n),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,e.params=this.toAssignableList(t,!0),this.parseFunctionBody(e,!0,!1,r),this.yieldPos=a,this.awaitPos=s,this.awaitIdentPos=i,this.finishNode(e,"ArrowFunctionExpression")},oe.parseFunctionBody=function(e,t,n,r){var a=t&&this.type!==$.braceL,s=this.strict,i=!1;if(a)e.body=this.parseMaybeAssign(r),e.expression=!0,this.checkParams(e,!1);else{var o=this.options.ecmaVersion>=7&&!this.isSimpleParamList(e.params);s&&!o||(i=this.strictDirective(this.end))&&o&&this.raiseRecoverable(e.start,"Illegal 'use strict' directive in function with non-simple parameter list");var l=this.labels;this.labels=[],i&&(this.strict=!0),this.checkParams(e,!s&&!i&&!t&&!n&&this.isSimpleParamList(e.params)),this.strict&&e.id&&this.checkLValSimple(e.id,5),e.body=this.parseBlock(!1,void 0,i&&!s),e.expression=!1,this.adaptDirectivePrologue(e.body.body),this.labels=l}this.exitScope()},oe.isSimpleParamList=function(e){for(var t=0,n=e;t<n.length;t+=1)if("Identifier"!==n[t].type)return!1;return!0},oe.checkParams=function(e,t){for(var n=Object.create(null),r=0,a=e.params;r<a.length;r+=1){var s=a[r];this.checkLValInnerPattern(s,1,t?null:n)}},oe.parseExprList=function(e,t,n,r){for(var a=[],s=!0;!this.eat(e);){if(s)s=!1;else if(this.expect($.comma),t&&this.afterTrailingComma(e))break;var i=void 0;n&&this.type===$.comma?i=null:this.type===$.ellipsis?(i=this.parseSpread(r),r&&this.type===$.comma&&r.trailingComma<0&&(r.trailingComma=this.start)):i=this.parseMaybeAssign(!1,r),a.push(i)}return a},oe.checkUnreserved=function(e){var t=e.start,n=e.end,r=e.name;this.inGenerator&&"yield"===r&&this.raiseRecoverable(t,"Cannot use 'yield' as identifier inside a generator"),this.inAsync&&"await"===r&&this.raiseRecoverable(t,"Cannot use 'await' as identifier inside an async function"),this.currentThisScope().flags&B||"arguments"!==r||this.raiseRecoverable(t,"Cannot use 'arguments' in class field initializer"),!this.inClassStaticBlock||"arguments"!==r&&"await"!==r||this.raise(t,"Cannot use "+r+" in class static initialization block"),this.keywords.test(r)&&this.raise(t,"Unexpected keyword '"+r+"'"),this.options.ecmaVersion<6&&-1!==this.input.slice(t,n).indexOf("\\")||(this.strict?this.reservedWordsStrict:this.reservedWords).test(r)&&(this.inAsync||"await"!==r||this.raiseRecoverable(t,"Cannot use keyword 'await' outside an async function"),this.raiseRecoverable(t,"The keyword '"+r+"' is reserved"))},oe.parseIdent=function(e){var t=this.parseIdentNode();return this.next(!!e),this.finishNode(t,"Identifier"),e||(this.checkUnreserved(t),"await"!==t.name||this.awaitIdentPos||(this.awaitIdentPos=t.start)),t},oe.parseIdentNode=function(){var e=this.startNode();return this.type===$.name?e.name=this.value:this.type.keyword?(e.name=this.type.keyword,"class"!==e.name&&"function"!==e.name||this.lastTokEnd===this.lastTokStart+1&&46===this.input.charCodeAt(this.lastTokStart)||this.context.pop(),this.type=$.name):this.unexpected(),e},oe.parsePrivateIdent=function(){var e=this.startNode();return this.type===$.privateId?e.name=this.value:this.unexpected(),this.next(),this.finishNode(e,"PrivateIdentifier"),this.options.checkPrivateFields&&(0===this.privateNameStack.length?this.raise(e.start,"Private field '#"+e.name+"' must be declared in an enclosing class"):this.privateNameStack[this.privateNameStack.length-1].used.push(e)),e},oe.parseYield=function(e){this.yieldPos||(this.yieldPos=this.start);var t=this.startNode();return this.next(),this.type===$.semi||this.canInsertSemicolon()||this.type!==$.star&&!this.type.startsExpr?(t.delegate=!1,t.argument=null):(t.delegate=this.eat($.star),t.argument=this.parseMaybeAssign(e)),this.finishNode(t,"YieldExpression")},oe.parseAwait=function(e){this.awaitPos||(this.awaitPos=this.start);var t=this.startNode();return this.next(),t.argument=this.parseMaybeUnary(null,!0,!1,e),this.finishNode(t,"AwaitExpression")};var pe=Y.prototype;pe.raise=function(e,t){var n=j(this.input,e);t+=" ("+n.line+":"+n.column+")",this.sourceFile&&(t+=" in "+this.sourceFile);var r=new SyntaxError(t);throw r.pos=e,r.loc=n,r.raisedAt=this.pos,r},pe.raiseRecoverable=pe.raise,pe.curPosition=function(){if(this.options.locations)return new P(this.curLine,this.pos-this.lineStart)};var de=Y.prototype,me=function(e){this.flags=e,this.var=[],this.lexical=[],this.functions=[]};de.enterScope=function(e){this.scopeStack.push(new me(e))},de.exitScope=function(){this.scopeStack.pop()},de.treatFunctionsAsVarInScope=function(e){return 2&e.flags||!this.inModule&&1&e.flags},de.declareName=function(e,t,n){var r=!1;if(2===t){var a=this.currentScope();r=a.lexical.indexOf(e)>-1||a.functions.indexOf(e)>-1||a.var.indexOf(e)>-1,a.lexical.push(e),this.inModule&&1&a.flags&&delete this.undefinedExports[e]}else if(4===t)this.currentScope().lexical.push(e);else if(3===t){var s=this.currentScope();r=this.treatFunctionsAsVar?s.lexical.indexOf(e)>-1:s.lexical.indexOf(e)>-1||s.var.indexOf(e)>-1,s.functions.push(e)}else for(var i=this.scopeStack.length-1;i>=0;--i){var o=this.scopeStack[i];if(o.lexical.indexOf(e)>-1&&!(32&o.flags&&o.lexical[0]===e)||!this.treatFunctionsAsVarInScope(o)&&o.functions.indexOf(e)>-1){r=!0;break}if(o.var.push(e),this.inModule&&1&o.flags&&delete this.undefinedExports[e],o.flags&B)break}r&&this.raiseRecoverable(n,"Identifier '"+e+"' has already been declared")},de.checkLocalExport=function(e){-1===this.scopeStack[0].lexical.indexOf(e.name)&&-1===this.scopeStack[0].var.indexOf(e.name)&&(this.undefinedExports[e.name]=e)},de.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]},de.currentVarScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(771&t.flags)return t}},de.currentThisScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(771&t.flags&&!(16&t.flags))return t}};var he=function(e,t,n){this.type="",this.start=t,this.end=0,e.options.locations&&(this.loc=new M(e,n)),e.options.directSourceFile&&(this.sourceFile=e.options.directSourceFile),e.options.ranges&&(this.range=[t,0])},fe=Y.prototype;function ve(e,t,n,r){return e.type=t,e.end=n,this.options.locations&&(e.loc.end=r),this.options.ranges&&(e.range[1]=n),e}fe.startNode=function(){return new he(this,this.start,this.startLoc)},fe.startNodeAt=function(e,t){return new he(this,e,t)},fe.finishNode=function(e,t){return ve.call(this,e,t,this.lastTokEnd,this.lastTokEndLoc)},fe.finishNodeAt=function(e,t,n,r){return ve.call(this,e,t,n,r)},fe.copyNode=function(e){var t=new he(this,e.start,this.startLoc);for(var n in e)t[n]=e[n];return t};var ge,ye,$e="ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS",be=$e+" Extended_Pictographic",Ee=be+" EBase EComp EMod EPres ExtPict",Se={9:$e,10:be,11:be,12:Ee,13:Ee,14:Ee},Ae={9:"",10:"",11:"",12:"",13:"",14:"Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji"},_e="Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu",xe="Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb",we=xe+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",Oe=we+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",Ne=Oe+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",Ie=Ne+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",Te={9:xe,10:we,11:Oe,12:Ne,13:Ie,14:Ie+" Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai Krai Nag_Mundari Nagm Ol_Onal Onao Sunu Sunuwar Todhri Todr Tulu_Tigalari Tutg Unknown Zzzz"},Re={};for(var Ce=0,ke=[9,10,11,12,13,14];Ce<ke.length;Ce+=1)ye=void 0,(ye=Re[ge=ke[Ce]]={binary:C(Se[ge]+" "+_e),binaryOfStrings:C(Ae[ge]),nonBinary:{General_Category:C(_e),Script:C(Te[ge])}}).nonBinary.Script_Extensions=ye.nonBinary.Script,ye.nonBinary.gc=ye.nonBinary.General_Category,ye.nonBinary.sc=ye.nonBinary.Script,ye.nonBinary.scx=ye.nonBinary.Script_Extensions;var Le=Y.prototype,Pe=function(e,t){this.parent=e,this.base=t||this};Pe.prototype.separatedFrom=function(e){for(var t=this;t;t=t.parent)for(var n=e;n;n=n.parent)if(t.base===n.base&&t!==n)return!0;return!1},Pe.prototype.sibling=function(){return new Pe(this.parent,this.base)};var Me=function(e){this.parser=e,this.validFlags="gim"+(e.options.ecmaVersion>=6?"uy":"")+(e.options.ecmaVersion>=9?"s":"")+(e.options.ecmaVersion>=13?"d":"")+(e.options.ecmaVersion>=15?"v":""),this.unicodeProperties=Re[e.options.ecmaVersion>=14?14:e.options.ecmaVersion],this.source="",this.flags="",this.start=0,this.switchU=!1,this.switchV=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue="",this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=Object.create(null),this.backReferenceNames=[],this.branchID=null};function je(e){return 105===e||109===e||115===e}function De(e){return 36===e||e>=40&&e<=43||46===e||63===e||e>=91&&e<=94||e>=123&&e<=125}function Fe(e){return e>=65&&e<=90||e>=97&&e<=122}Me.prototype.reset=function(e,t,n){var r=-1!==n.indexOf("v"),a=-1!==n.indexOf("u");this.start=0|e,this.source=t+"",this.flags=n,r&&this.parser.options.ecmaVersion>=15?(this.switchU=!0,this.switchV=!0,this.switchN=!0):(this.switchU=a&&this.parser.options.ecmaVersion>=6,this.switchV=!1,this.switchN=a&&this.parser.options.ecmaVersion>=9)},Me.prototype.raise=function(e){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+e)},Me.prototype.at=function(e,t){void 0===t&&(t=!1);var n=this.source,r=n.length;if(e>=r)return-1;var a=n.charCodeAt(e);if(!t&&!this.switchU||a<=55295||a>=57344||e+1>=r)return a;var s=n.charCodeAt(e+1);return s>=56320&&s<=57343?(a<<10)+s-56613888:a},Me.prototype.nextIndex=function(e,t){void 0===t&&(t=!1);var n=this.source,r=n.length;if(e>=r)return r;var a,s=n.charCodeAt(e);return!t&&!this.switchU||s<=55295||s>=57344||e+1>=r||(a=n.charCodeAt(e+1))<56320||a>57343?e+1:e+2},Me.prototype.current=function(e){return void 0===e&&(e=!1),this.at(this.pos,e)},Me.prototype.lookahead=function(e){return void 0===e&&(e=!1),this.at(this.nextIndex(this.pos,e),e)},Me.prototype.advance=function(e){void 0===e&&(e=!1),this.pos=this.nextIndex(this.pos,e)},Me.prototype.eat=function(e,t){return void 0===t&&(t=!1),this.current(t)===e&&(this.advance(t),!0)},Me.prototype.eatChars=function(e,t){void 0===t&&(t=!1);for(var n=this.pos,r=0,a=e;r<a.length;r+=1){var s=a[r],i=this.at(n,t);if(-1===i||i!==s)return!1;n=this.nextIndex(n,t)}return this.pos=n,!0},Le.validateRegExpFlags=function(e){for(var t=e.validFlags,n=e.flags,r=!1,a=!1,s=0;s<n.length;s++){var i=n.charAt(s);-1===t.indexOf(i)&&this.raise(e.start,"Invalid regular expression flag"),n.indexOf(i,s+1)>-1&&this.raise(e.start,"Duplicate regular expression flag"),"u"===i&&(r=!0),"v"===i&&(a=!0)}this.options.ecmaVersion>=15&&r&&a&&this.raise(e.start,"Invalid regular expression flag")},Le.validateRegExpPattern=function(e){this.regexp_pattern(e),!e.switchN&&this.options.ecmaVersion>=9&&function(e){for(var t in e)return!0;return!1}(e.groupNames)&&(e.switchN=!0,this.regexp_pattern(e))},Le.regexp_pattern=function(e){e.pos=0,e.lastIntValue=0,e.lastStringValue="",e.lastAssertionIsQuantifiable=!1,e.numCapturingParens=0,e.maxBackReference=0,e.groupNames=Object.create(null),e.backReferenceNames.length=0,e.branchID=null,this.regexp_disjunction(e),e.pos!==e.source.length&&(e.eat(41)&&e.raise("Unmatched ')'"),(e.eat(93)||e.eat(125))&&e.raise("Lone quantifier brackets")),e.maxBackReference>e.numCapturingParens&&e.raise("Invalid escape");for(var t=0,n=e.backReferenceNames;t<n.length;t+=1){var r=n[t];e.groupNames[r]||e.raise("Invalid named capture referenced")}},Le.regexp_disjunction=function(e){var t=this.options.ecmaVersion>=16;for(t&&(e.branchID=new Pe(e.branchID,null)),this.regexp_alternative(e);e.eat(124);)t&&(e.branchID=e.branchID.sibling()),this.regexp_alternative(e);t&&(e.branchID=e.branchID.parent),this.regexp_eatQuantifier(e,!0)&&e.raise("Nothing to repeat"),e.eat(123)&&e.raise("Lone quantifier brackets")},Le.regexp_alternative=function(e){for(;e.pos<e.source.length&&this.regexp_eatTerm(e););},Le.regexp_eatTerm=function(e){return this.regexp_eatAssertion(e)?(e.lastAssertionIsQuantifiable&&this.regexp_eatQuantifier(e)&&e.switchU&&e.raise("Invalid quantifier"),!0):!!(e.switchU?this.regexp_eatAtom(e):this.regexp_eatExtendedAtom(e))&&(this.regexp_eatQuantifier(e),!0)},Le.regexp_eatAssertion=function(e){var t=e.pos;if(e.lastAssertionIsQuantifiable=!1,e.eat(94)||e.eat(36))return!0;if(e.eat(92)){if(e.eat(66)||e.eat(98))return!0;e.pos=t}if(e.eat(40)&&e.eat(63)){var n=!1;if(this.options.ecmaVersion>=9&&(n=e.eat(60)),e.eat(61)||e.eat(33))return this.regexp_disjunction(e),e.eat(41)||e.raise("Unterminated group"),e.lastAssertionIsQuantifiable=!n,!0}return e.pos=t,!1},Le.regexp_eatQuantifier=function(e,t){return void 0===t&&(t=!1),!!this.regexp_eatQuantifierPrefix(e,t)&&(e.eat(63),!0)},Le.regexp_eatQuantifierPrefix=function(e,t){return e.eat(42)||e.eat(43)||e.eat(63)||this.regexp_eatBracedQuantifier(e,t)},Le.regexp_eatBracedQuantifier=function(e,t){var n=e.pos;if(e.eat(123)){var r=0,a=-1;if(this.regexp_eatDecimalDigits(e)&&(r=e.lastIntValue,e.eat(44)&&this.regexp_eatDecimalDigits(e)&&(a=e.lastIntValue),e.eat(125)))return-1!==a&&a<r&&!t&&e.raise("numbers out of order in {} quantifier"),!0;e.switchU&&!t&&e.raise("Incomplete quantifier"),e.pos=n}return!1},Le.regexp_eatAtom=function(e){return this.regexp_eatPatternCharacters(e)||e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)},Le.regexp_eatReverseSolidusAtomEscape=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatAtomEscape(e))return!0;e.pos=t}return!1},Le.regexp_eatUncapturingGroup=function(e){var t=e.pos;if(e.eat(40)){if(e.eat(63)){if(this.options.ecmaVersion>=16){var n=this.regexp_eatModifiers(e),r=e.eat(45);if(n||r){for(var a=0;a<n.length;a++){var s=n.charAt(a);n.indexOf(s,a+1)>-1&&e.raise("Duplicate regular expression modifiers")}if(r){var i=this.regexp_eatModifiers(e);n||i||58!==e.current()||e.raise("Invalid regular expression modifiers");for(var o=0;o<i.length;o++){var l=i.charAt(o);(i.indexOf(l,o+1)>-1||n.indexOf(l)>-1)&&e.raise("Duplicate regular expression modifiers")}}}}if(e.eat(58)){if(this.regexp_disjunction(e),e.eat(41))return!0;e.raise("Unterminated group")}}e.pos=t}return!1},Le.regexp_eatCapturingGroup=function(e){if(e.eat(40)){if(this.options.ecmaVersion>=9?this.regexp_groupSpecifier(e):63===e.current()&&e.raise("Invalid group"),this.regexp_disjunction(e),e.eat(41))return e.numCapturingParens+=1,!0;e.raise("Unterminated group")}return!1},Le.regexp_eatModifiers=function(e){for(var t="",n=0;-1!==(n=e.current())&&je(n);)t+=k(n),e.advance();return t},Le.regexp_eatExtendedAtom=function(e){return e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)||this.regexp_eatInvalidBracedQuantifier(e)||this.regexp_eatExtendedPatternCharacter(e)},Le.regexp_eatInvalidBracedQuantifier=function(e){return this.regexp_eatBracedQuantifier(e,!0)&&e.raise("Nothing to repeat"),!1},Le.regexp_eatSyntaxCharacter=function(e){var t=e.current();return!!De(t)&&(e.lastIntValue=t,e.advance(),!0)},Le.regexp_eatPatternCharacters=function(e){for(var t=e.pos,n=0;-1!==(n=e.current())&&!De(n);)e.advance();return e.pos!==t},Le.regexp_eatExtendedPatternCharacter=function(e){var t=e.current();return!(-1===t||36===t||t>=40&&t<=43||46===t||63===t||91===t||94===t||124===t||(e.advance(),0))},Le.regexp_groupSpecifier=function(e){if(e.eat(63)){this.regexp_eatGroupName(e)||e.raise("Invalid group");var t=this.options.ecmaVersion>=16,n=e.groupNames[e.lastStringValue];if(n)if(t)for(var r=0,a=n;r<a.length;r+=1)a[r].separatedFrom(e.branchID)||e.raise("Duplicate capture group name");else e.raise("Duplicate capture group name");t?(n||(e.groupNames[e.lastStringValue]=[])).push(e.branchID):e.groupNames[e.lastStringValue]=!0}},Le.regexp_eatGroupName=function(e){if(e.lastStringValue="",e.eat(60)){if(this.regexp_eatRegExpIdentifierName(e)&&e.eat(62))return!0;e.raise("Invalid capture group name")}return!1},Le.regexp_eatRegExpIdentifierName=function(e){if(e.lastStringValue="",this.regexp_eatRegExpIdentifierStart(e)){for(e.lastStringValue+=k(e.lastIntValue);this.regexp_eatRegExpIdentifierPart(e);)e.lastStringValue+=k(e.lastIntValue);return!0}return!1},Le.regexp_eatRegExpIdentifierStart=function(e){var t=e.pos,n=this.options.ecmaVersion>=11,r=e.current(n);return e.advance(n),92===r&&this.regexp_eatRegExpUnicodeEscapeSequence(e,n)&&(r=e.lastIntValue),function(e){return p(e,!0)||36===e||95===e}(r)?(e.lastIntValue=r,!0):(e.pos=t,!1)},Le.regexp_eatRegExpIdentifierPart=function(e){var t=e.pos,n=this.options.ecmaVersion>=11,r=e.current(n);return e.advance(n),92===r&&this.regexp_eatRegExpUnicodeEscapeSequence(e,n)&&(r=e.lastIntValue),function(e){return d(e,!0)||36===e||95===e||8204===e||8205===e}(r)?(e.lastIntValue=r,!0):(e.pos=t,!1)},Le.regexp_eatAtomEscape=function(e){return!!(this.regexp_eatBackReference(e)||this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)||e.switchN&&this.regexp_eatKGroupName(e))||(e.switchU&&(99===e.current()&&e.raise("Invalid unicode escape"),e.raise("Invalid escape")),!1)},Le.regexp_eatBackReference=function(e){var t=e.pos;if(this.regexp_eatDecimalEscape(e)){var n=e.lastIntValue;if(e.switchU)return n>e.maxBackReference&&(e.maxBackReference=n),!0;if(n<=e.numCapturingParens)return!0;e.pos=t}return!1},Le.regexp_eatKGroupName=function(e){if(e.eat(107)){if(this.regexp_eatGroupName(e))return e.backReferenceNames.push(e.lastStringValue),!0;e.raise("Invalid named reference")}return!1},Le.regexp_eatCharacterEscape=function(e){return this.regexp_eatControlEscape(e)||this.regexp_eatCControlLetter(e)||this.regexp_eatZero(e)||this.regexp_eatHexEscapeSequence(e)||this.regexp_eatRegExpUnicodeEscapeSequence(e,!1)||!e.switchU&&this.regexp_eatLegacyOctalEscapeSequence(e)||this.regexp_eatIdentityEscape(e)},Le.regexp_eatCControlLetter=function(e){var t=e.pos;if(e.eat(99)){if(this.regexp_eatControlLetter(e))return!0;e.pos=t}return!1},Le.regexp_eatZero=function(e){return 48===e.current()&&!Be(e.lookahead())&&(e.lastIntValue=0,e.advance(),!0)},Le.regexp_eatControlEscape=function(e){var t=e.current();return 116===t?(e.lastIntValue=9,e.advance(),!0):110===t?(e.lastIntValue=10,e.advance(),!0):118===t?(e.lastIntValue=11,e.advance(),!0):102===t?(e.lastIntValue=12,e.advance(),!0):114===t&&(e.lastIntValue=13,e.advance(),!0)},Le.regexp_eatControlLetter=function(e){var t=e.current();return!!Fe(t)&&(e.lastIntValue=t%32,e.advance(),!0)},Le.regexp_eatRegExpUnicodeEscapeSequence=function(e,t){void 0===t&&(t=!1);var n,r=e.pos,a=t||e.switchU;if(e.eat(117)){if(this.regexp_eatFixedHexDigits(e,4)){var s=e.lastIntValue;if(a&&s>=55296&&s<=56319){var i=e.pos;if(e.eat(92)&&e.eat(117)&&this.regexp_eatFixedHexDigits(e,4)){var o=e.lastIntValue;if(o>=56320&&o<=57343)return e.lastIntValue=1024*(s-55296)+(o-56320)+65536,!0}e.pos=i,e.lastIntValue=s}return!0}if(a&&e.eat(123)&&this.regexp_eatHexDigits(e)&&e.eat(125)&&((n=e.lastIntValue)>=0&&n<=1114111))return!0;a&&e.raise("Invalid unicode escape"),e.pos=r}return!1},Le.regexp_eatIdentityEscape=function(e){if(e.switchU)return!!this.regexp_eatSyntaxCharacter(e)||!!e.eat(47)&&(e.lastIntValue=47,!0);var t=e.current();return!(99===t||e.switchN&&107===t||(e.lastIntValue=t,e.advance(),0))},Le.regexp_eatDecimalEscape=function(e){e.lastIntValue=0;var t=e.current();if(t>=49&&t<=57){do{e.lastIntValue=10*e.lastIntValue+(t-48),e.advance()}while((t=e.current())>=48&&t<=57);return!0}return!1};function Ve(e){return Fe(e)||95===e}function qe(e){return Ve(e)||Be(e)}function Be(e){return e>=48&&e<=57}function Ue(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function Ye(e){return e>=65&&e<=70?e-65+10:e>=97&&e<=102?e-97+10:e-48}function ze(e){return e>=48&&e<=55}Le.regexp_eatCharacterClassEscape=function(e){var t=e.current();if(function(e){return 100===e||68===e||115===e||83===e||119===e||87===e}(t))return e.lastIntValue=-1,e.advance(),1;var n=!1;if(e.switchU&&this.options.ecmaVersion>=9&&((n=80===t)||112===t)){var r;if(e.lastIntValue=-1,e.advance(),e.eat(123)&&(r=this.regexp_eatUnicodePropertyValueExpression(e))&&e.eat(125))return n&&2===r&&e.raise("Invalid property name"),r;e.raise("Invalid property name")}return 0},Le.regexp_eatUnicodePropertyValueExpression=function(e){var t=e.pos;if(this.regexp_eatUnicodePropertyName(e)&&e.eat(61)){var n=e.lastStringValue;if(this.regexp_eatUnicodePropertyValue(e)){var r=e.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(e,n,r),1}}if(e.pos=t,this.regexp_eatLoneUnicodePropertyNameOrValue(e)){var a=e.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(e,a)}return 0},Le.regexp_validateUnicodePropertyNameAndValue=function(e,t,n){I(e.unicodeProperties.nonBinary,t)||e.raise("Invalid property name"),e.unicodeProperties.nonBinary[t].test(n)||e.raise("Invalid property value")},Le.regexp_validateUnicodePropertyNameOrValue=function(e,t){return e.unicodeProperties.binary.test(t)?1:e.switchV&&e.unicodeProperties.binaryOfStrings.test(t)?2:void e.raise("Invalid property name")},Le.regexp_eatUnicodePropertyName=function(e){var t=0;for(e.lastStringValue="";Ve(t=e.current());)e.lastStringValue+=k(t),e.advance();return""!==e.lastStringValue},Le.regexp_eatUnicodePropertyValue=function(e){var t=0;for(e.lastStringValue="";qe(t=e.current());)e.lastStringValue+=k(t),e.advance();return""!==e.lastStringValue},Le.regexp_eatLoneUnicodePropertyNameOrValue=function(e){return this.regexp_eatUnicodePropertyValue(e)},Le.regexp_eatCharacterClass=function(e){if(e.eat(91)){var t=e.eat(94),n=this.regexp_classContents(e);return e.eat(93)||e.raise("Unterminated character class"),t&&2===n&&e.raise("Negated character class may contain strings"),!0}return!1},Le.regexp_classContents=function(e){return 93===e.current()?1:e.switchV?this.regexp_classSetExpression(e):(this.regexp_nonEmptyClassRanges(e),1)},Le.regexp_nonEmptyClassRanges=function(e){for(;this.regexp_eatClassAtom(e);){var t=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassAtom(e)){var n=e.lastIntValue;!e.switchU||-1!==t&&-1!==n||e.raise("Invalid character class"),-1!==t&&-1!==n&&t>n&&e.raise("Range out of order in character class")}}},Le.regexp_eatClassAtom=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatClassEscape(e))return!0;if(e.switchU){var n=e.current();(99===n||ze(n))&&e.raise("Invalid class escape"),e.raise("Invalid escape")}e.pos=t}var r=e.current();return 93!==r&&(e.lastIntValue=r,e.advance(),!0)},Le.regexp_eatClassEscape=function(e){var t=e.pos;if(e.eat(98))return e.lastIntValue=8,!0;if(e.switchU&&e.eat(45))return e.lastIntValue=45,!0;if(!e.switchU&&e.eat(99)){if(this.regexp_eatClassControlLetter(e))return!0;e.pos=t}return this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)},Le.regexp_classSetExpression=function(e){var t,n=1;if(this.regexp_eatClassSetRange(e));else if(t=this.regexp_eatClassSetOperand(e)){2===t&&(n=2);for(var r=e.pos;e.eatChars([38,38]);)38!==e.current()&&(t=this.regexp_eatClassSetOperand(e))?2!==t&&(n=1):e.raise("Invalid character in character class");if(r!==e.pos)return n;for(;e.eatChars([45,45]);)this.regexp_eatClassSetOperand(e)||e.raise("Invalid character in character class");if(r!==e.pos)return n}else e.raise("Invalid character in character class");for(;;)if(!this.regexp_eatClassSetRange(e)){if(!(t=this.regexp_eatClassSetOperand(e)))return n;2===t&&(n=2)}},Le.regexp_eatClassSetRange=function(e){var t=e.pos;if(this.regexp_eatClassSetCharacter(e)){var n=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassSetCharacter(e)){var r=e.lastIntValue;return-1!==n&&-1!==r&&n>r&&e.raise("Range out of order in character class"),!0}e.pos=t}return!1},Le.regexp_eatClassSetOperand=function(e){return this.regexp_eatClassSetCharacter(e)?1:this.regexp_eatClassStringDisjunction(e)||this.regexp_eatNestedClass(e)},Le.regexp_eatNestedClass=function(e){var t=e.pos;if(e.eat(91)){var n=e.eat(94),r=this.regexp_classContents(e);if(e.eat(93))return n&&2===r&&e.raise("Negated character class may contain strings"),r;e.pos=t}if(e.eat(92)){var a=this.regexp_eatCharacterClassEscape(e);if(a)return a;e.pos=t}return null},Le.regexp_eatClassStringDisjunction=function(e){var t=e.pos;if(e.eatChars([92,113])){if(e.eat(123)){var n=this.regexp_classStringDisjunctionContents(e);if(e.eat(125))return n}else e.raise("Invalid escape");e.pos=t}return null},Le.regexp_classStringDisjunctionContents=function(e){for(var t=this.regexp_classString(e);e.eat(124);)2===this.regexp_classString(e)&&(t=2);return t},Le.regexp_classString=function(e){for(var t=0;this.regexp_eatClassSetCharacter(e);)t++;return 1===t?1:2},Le.regexp_eatClassSetCharacter=function(e){var t=e.pos;if(e.eat(92))return!(!this.regexp_eatCharacterEscape(e)&&!this.regexp_eatClassSetReservedPunctuator(e)&&(e.eat(98)?(e.lastIntValue=8,0):(e.pos=t,1)));var n=e.current();return!(n<0||n===e.lookahead()&&function(e){return 33===e||e>=35&&e<=38||e>=42&&e<=44||46===e||e>=58&&e<=64||94===e||96===e||126===e}(n)||function(e){return 40===e||41===e||45===e||47===e||e>=91&&e<=93||e>=123&&e<=125}(n)||(e.advance(),e.lastIntValue=n,0))},Le.regexp_eatClassSetReservedPunctuator=function(e){var t=e.current();return!!function(e){return 33===e||35===e||37===e||38===e||44===e||45===e||e>=58&&e<=62||64===e||96===e||126===e}(t)&&(e.lastIntValue=t,e.advance(),!0)},Le.regexp_eatClassControlLetter=function(e){var t=e.current();return!(!Be(t)&&95!==t||(e.lastIntValue=t%32,e.advance(),0))},Le.regexp_eatHexEscapeSequence=function(e){var t=e.pos;if(e.eat(120)){if(this.regexp_eatFixedHexDigits(e,2))return!0;e.switchU&&e.raise("Invalid escape"),e.pos=t}return!1},Le.regexp_eatDecimalDigits=function(e){var t=e.pos,n=0;for(e.lastIntValue=0;Be(n=e.current());)e.lastIntValue=10*e.lastIntValue+(n-48),e.advance();return e.pos!==t},Le.regexp_eatHexDigits=function(e){var t=e.pos,n=0;for(e.lastIntValue=0;Ue(n=e.current());)e.lastIntValue=16*e.lastIntValue+Ye(n),e.advance();return e.pos!==t},Le.regexp_eatLegacyOctalEscapeSequence=function(e){if(this.regexp_eatOctalDigit(e)){var t=e.lastIntValue;if(this.regexp_eatOctalDigit(e)){var n=e.lastIntValue;t<=3&&this.regexp_eatOctalDigit(e)?e.lastIntValue=64*t+8*n+e.lastIntValue:e.lastIntValue=8*t+n}else e.lastIntValue=t;return!0}return!1},Le.regexp_eatOctalDigit=function(e){var t=e.current();return ze(t)?(e.lastIntValue=t-48,e.advance(),!0):(e.lastIntValue=0,!1)},Le.regexp_eatFixedHexDigits=function(e,t){var n=e.pos;e.lastIntValue=0;for(var r=0;r<t;++r){var a=e.current();if(!Ue(a))return e.pos=n,!1;e.lastIntValue=16*e.lastIntValue+Ye(a),e.advance()}return!0};var Ze=function(e){this.type=e.type,this.value=e.value,this.start=e.start,this.end=e.end,e.options.locations&&(this.loc=new M(e,e.startLoc,e.endLoc)),e.options.ranges&&(this.range=[e.start,e.end])},Ge=Y.prototype;function We(e){return"function"!=typeof BigInt?null:BigInt(e.replace(/_/g,""))}Ge.next=function(e){!e&&this.type.keyword&&this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword "+this.type.keyword),this.options.onToken&&this.options.onToken(new Ze(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()},Ge.getToken=function(){return this.next(),new Ze(this)},"undefined"!=typeof Symbol&&(Ge[Symbol.iterator]=function(){var e=this;return{next:function(){var t=e.getToken();return{done:t.type===$.eof,value:t}}}}),Ge.nextToken=function(){var e=this.curContext();return e&&e.preserveSpace||this.skipSpace(),this.start=this.pos,this.options.locations&&(this.startLoc=this.curPosition()),this.pos>=this.input.length?this.finishToken($.eof):e.override?e.override(this):void this.readToken(this.fullCharCodeAtPos())},Ge.readToken=function(e){return p(e,this.options.ecmaVersion>=6)||92===e?this.readWord():this.getTokenFromCode(e)},Ge.fullCharCodeAtPos=function(){var e=this.input.charCodeAt(this.pos);if(e<=55295||e>=56320)return e;var t=this.input.charCodeAt(this.pos+1);return t<=56319||t>=57344?e:(e<<10)+t-56613888},Ge.skipBlockComment=function(){var e=this.options.onComment&&this.curPosition(),t=this.pos,n=this.input.indexOf("*/",this.pos+=2);if(-1===n&&this.raise(this.pos-2,"Unterminated comment"),this.pos=n+2,this.options.locations)for(var r=void 0,a=t;(r=A(this.input,a,this.pos))>-1;)++this.curLine,a=this.lineStart=r;this.options.onComment&&this.options.onComment(!0,this.input.slice(t+2,n),t,this.pos,e,this.curPosition())},Ge.skipLineComment=function(e){for(var t=this.pos,n=this.options.onComment&&this.curPosition(),r=this.input.charCodeAt(this.pos+=e);this.pos<this.input.length&&!S(r);)r=this.input.charCodeAt(++this.pos);this.options.onComment&&this.options.onComment(!1,this.input.slice(t+e,this.pos),t,this.pos,n,this.curPosition())},Ge.skipSpace=function(){e:for(;this.pos<this.input.length;){var e=this.input.charCodeAt(this.pos);switch(e){case 32:case 160:++this.pos;break;case 13:10===this.input.charCodeAt(this.pos+1)&&++this.pos;case 10:case 8232:case 8233:++this.pos,this.options.locations&&(++this.curLine,this.lineStart=this.pos);break;case 47:switch(this.input.charCodeAt(this.pos+1)){case 42:this.skipBlockComment();break;case 47:this.skipLineComment(2);break;default:break e}break;default:if(!(e>8&&e<14||e>=5760&&_.test(String.fromCharCode(e))))break e;++this.pos}}},Ge.finishToken=function(e,t){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var n=this.type;this.type=e,this.value=t,this.updateContext(n)},Ge.readToken_dot=function(){var e=this.input.charCodeAt(this.pos+1);if(e>=48&&e<=57)return this.readNumber(!0);var t=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&46===e&&46===t?(this.pos+=3,this.finishToken($.ellipsis)):(++this.pos,this.finishToken($.dot))},Ge.readToken_slash=function(){var e=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):61===e?this.finishOp($.assign,2):this.finishOp($.slash,1)},Ge.readToken_mult_modulo_exp=function(e){var t=this.input.charCodeAt(this.pos+1),n=1,r=42===e?$.star:$.modulo;return this.options.ecmaVersion>=7&&42===e&&42===t&&(++n,r=$.starstar,t=this.input.charCodeAt(this.pos+2)),61===t?this.finishOp($.assign,n+1):this.finishOp(r,n)},Ge.readToken_pipe_amp=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?this.options.ecmaVersion>=12&&61===this.input.charCodeAt(this.pos+2)?this.finishOp($.assign,3):this.finishOp(124===e?$.logicalOR:$.logicalAND,2):61===t?this.finishOp($.assign,2):this.finishOp(124===e?$.bitwiseOR:$.bitwiseAND,1)},Ge.readToken_caret=function(){return 61===this.input.charCodeAt(this.pos+1)?this.finishOp($.assign,2):this.finishOp($.bitwiseXOR,1)},Ge.readToken_plus_min=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?45!==t||this.inModule||62!==this.input.charCodeAt(this.pos+2)||0!==this.lastTokEnd&&!b.test(this.input.slice(this.lastTokEnd,this.pos))?this.finishOp($.incDec,2):(this.skipLineComment(3),this.skipSpace(),this.nextToken()):61===t?this.finishOp($.assign,2):this.finishOp($.plusMin,1)},Ge.readToken_lt_gt=function(e){var t=this.input.charCodeAt(this.pos+1),n=1;return t===e?(n=62===e&&62===this.input.charCodeAt(this.pos+2)?3:2,61===this.input.charCodeAt(this.pos+n)?this.finishOp($.assign,n+1):this.finishOp($.bitShift,n)):33!==t||60!==e||this.inModule||45!==this.input.charCodeAt(this.pos+2)||45!==this.input.charCodeAt(this.pos+3)?(61===t&&(n=2),this.finishOp($.relational,n)):(this.skipLineComment(4),this.skipSpace(),this.nextToken())},Ge.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.pos+1);return 61===t?this.finishOp($.equality,61===this.input.charCodeAt(this.pos+2)?3:2):61===e&&62===t&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken($.arrow)):this.finishOp(61===e?$.eq:$.prefix,1)},Ge.readToken_question=function(){var e=this.options.ecmaVersion;if(e>=11){var t=this.input.charCodeAt(this.pos+1);if(46===t){var n=this.input.charCodeAt(this.pos+2);if(n<48||n>57)return this.finishOp($.questionDot,2)}if(63===t)return e>=12&&61===this.input.charCodeAt(this.pos+2)?this.finishOp($.assign,3):this.finishOp($.coalesce,2)}return this.finishOp($.question,1)},Ge.readToken_numberSign=function(){var e=35;if(this.options.ecmaVersion>=13&&(++this.pos,p(e=this.fullCharCodeAtPos(),!0)||92===e))return this.finishToken($.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+k(e)+"'")},Ge.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken($.parenL);case 41:return++this.pos,this.finishToken($.parenR);case 59:return++this.pos,this.finishToken($.semi);case 44:return++this.pos,this.finishToken($.comma);case 91:return++this.pos,this.finishToken($.bracketL);case 93:return++this.pos,this.finishToken($.bracketR);case 123:return++this.pos,this.finishToken($.braceL);case 125:return++this.pos,this.finishToken($.braceR);case 58:return++this.pos,this.finishToken($.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken($.backQuote);case 48:var t=this.input.charCodeAt(this.pos+1);if(120===t||88===t)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(111===t||79===t)return this.readRadixNumber(8);if(98===t||66===t)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(e);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(e);case 124:case 38:return this.readToken_pipe_amp(e);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(e);case 60:case 62:return this.readToken_lt_gt(e);case 61:case 33:return this.readToken_eq_excl(e);case 63:return this.readToken_question();case 126:return this.finishOp($.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+k(e)+"'")},Ge.finishOp=function(e,t){var n=this.input.slice(this.pos,this.pos+t);return this.pos+=t,this.finishToken(e,n)},Ge.readRegexp=function(){for(var e,t,n=this.pos;;){this.pos>=this.input.length&&this.raise(n,"Unterminated regular expression");var r=this.input.charAt(this.pos);if(b.test(r)&&this.raise(n,"Unterminated regular expression"),e)e=!1;else{if("["===r)t=!0;else if("]"===r&&t)t=!1;else if("/"===r&&!t)break;e="\\"===r}++this.pos}var a=this.input.slice(n,this.pos);++this.pos;var s=this.pos,i=this.readWord1();this.containsEsc&&this.unexpected(s);var o=this.regexpState||(this.regexpState=new Me(this));o.reset(n,a,i),this.validateRegExpFlags(o),this.validateRegExpPattern(o);var l=null;try{l=new RegExp(a,i)}catch(e){}return this.finishToken($.regexp,{pattern:a,flags:i,value:l})},Ge.readInt=function(e,t,n){for(var r=this.options.ecmaVersion>=12&&void 0===t,a=n&&48===this.input.charCodeAt(this.pos),s=this.pos,i=0,o=0,l=0,c=null==t?1/0:t;l<c;++l,++this.pos){var u=this.input.charCodeAt(this.pos),p=void 0;if(r&&95===u)a&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed in legacy octal numeric literals"),95===o&&this.raiseRecoverable(this.pos,"Numeric separator must be exactly one underscore"),0===l&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed at the first of digits"),o=u;else{if((p=u>=97?u-97+10:u>=65?u-65+10:u>=48&&u<=57?u-48:1/0)>=e)break;o=u,i=i*e+p}}return r&&95===o&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===s||null!=t&&this.pos-s!==t?null:i},Ge.readRadixNumber=function(e){var t=this.pos;this.pos+=2;var n=this.readInt(e);return null==n&&this.raise(this.start+2,"Expected number in radix "+e),this.options.ecmaVersion>=11&&110===this.input.charCodeAt(this.pos)?(n=We(this.input.slice(t,this.pos)),++this.pos):p(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken($.num,n)},Ge.readNumber=function(e){var t=this.pos;e||null!==this.readInt(10,void 0,!0)||this.raise(t,"Invalid number");var n=this.pos-t>=2&&48===this.input.charCodeAt(t);n&&this.strict&&this.raise(t,"Invalid number");var r=this.input.charCodeAt(this.pos);if(!n&&!e&&this.options.ecmaVersion>=11&&110===r){var a=We(this.input.slice(t,this.pos));return++this.pos,p(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken($.num,a)}n&&/[89]/.test(this.input.slice(t,this.pos))&&(n=!1),46!==r||n||(++this.pos,this.readInt(10),r=this.input.charCodeAt(this.pos)),69!==r&&101!==r||n||(43!==(r=this.input.charCodeAt(++this.pos))&&45!==r||++this.pos,null===this.readInt(10)&&this.raise(t,"Invalid number")),p(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var s,i=(s=this.input.slice(t,this.pos),n?parseInt(s,8):parseFloat(s.replace(/_/g,"")));return this.finishToken($.num,i)},Ge.readCodePoint=function(){var e;if(123===this.input.charCodeAt(this.pos)){this.options.ecmaVersion<6&&this.unexpected();var t=++this.pos;e=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,e>1114111&&this.invalidStringToken(t,"Code point out of bounds")}else e=this.readHexChar(4);return e},Ge.readString=function(e){for(var t="",n=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var r=this.input.charCodeAt(this.pos);if(r===e)break;92===r?(t+=this.input.slice(n,this.pos),t+=this.readEscapedChar(!1),n=this.pos):8232===r||8233===r?(this.options.ecmaVersion<10&&this.raise(this.start,"Unterminated string constant"),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):(S(r)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return t+=this.input.slice(n,this.pos++),this.finishToken($.string,t)};var He={};Ge.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(e){if(e!==He)throw e;this.readInvalidTemplateToken()}this.inTemplateElement=!1},Ge.invalidStringToken=function(e,t){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw He;this.raise(e,t)},Ge.readTmplToken=function(){for(var e="",t=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var n=this.input.charCodeAt(this.pos);if(96===n||36===n&&123===this.input.charCodeAt(this.pos+1))return this.pos!==this.start||this.type!==$.template&&this.type!==$.invalidTemplate?(e+=this.input.slice(t,this.pos),this.finishToken($.template,e)):36===n?(this.pos+=2,this.finishToken($.dollarBraceL)):(++this.pos,this.finishToken($.backQuote));if(92===n)e+=this.input.slice(t,this.pos),e+=this.readEscapedChar(!0),t=this.pos;else if(S(n)){switch(e+=this.input.slice(t,this.pos),++this.pos,n){case 13:10===this.input.charCodeAt(this.pos)&&++this.pos;case 10:e+="\n";break;default:e+=String.fromCharCode(n)}this.options.locations&&(++this.curLine,this.lineStart=this.pos),t=this.pos}else++this.pos}},Ge.readInvalidTemplateToken=function(){for(;this.pos<this.input.length;this.pos++)switch(this.input[this.pos]){case"\\":++this.pos;break;case"$":if("{"!==this.input[this.pos+1])break;case"`":return this.finishToken($.invalidTemplate,this.input.slice(this.start,this.pos));case"\r":"\n"===this.input[this.pos+1]&&++this.pos;case"\n":case"\u2028":case"\u2029":++this.curLine,this.lineStart=this.pos+1}this.raise(this.start,"Unterminated template")},Ge.readEscapedChar=function(e){var t=this.input.charCodeAt(++this.pos);switch(++this.pos,t){case 110:return"\n";case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return k(this.readCodePoint());case 116:return"\t";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:10===this.input.charCodeAt(this.pos)&&++this.pos;case 10:return this.options.locations&&(this.lineStart=this.pos,++this.curLine),"";case 56:case 57:if(this.strict&&this.invalidStringToken(this.pos-1,"Invalid escape sequence"),e){var n=this.pos-1;this.invalidStringToken(n,"Invalid escape sequence in template string")}default:if(t>=48&&t<=55){var r=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],a=parseInt(r,8);return a>255&&(r=r.slice(0,-1),a=parseInt(r,8)),this.pos+=r.length-1,t=this.input.charCodeAt(this.pos),"0"===r&&56!==t&&57!==t||!this.strict&&!e||this.invalidStringToken(this.pos-1-r.length,e?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(a)}return S(t)?(this.options.locations&&(this.lineStart=this.pos,++this.curLine),""):String.fromCharCode(t)}},Ge.readHexChar=function(e){var t=this.pos,n=this.readInt(16,e);return null===n&&this.invalidStringToken(t,"Bad character escape sequence"),n},Ge.readWord1=function(){this.containsEsc=!1;for(var e="",t=!0,n=this.pos,r=this.options.ecmaVersion>=6;this.pos<this.input.length;){var a=this.fullCharCodeAtPos();if(d(a,r))this.pos+=a<=65535?1:2;else{if(92!==a)break;this.containsEsc=!0,e+=this.input.slice(n,this.pos);var s=this.pos;117!==this.input.charCodeAt(++this.pos)&&this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.pos;var i=this.readCodePoint();(t?p:d)(i,r)||this.invalidStringToken(s,"Invalid Unicode escape"),e+=k(i),n=this.pos}t=!1}return e+this.input.slice(n,this.pos)},Ge.readWord=function(){var e=this.readWord1(),t=$.name;return this.keywords.test(e)&&(t=g[e]),this.finishToken(t,e)};var Ke="8.15.0";Y.acorn={Parser:Y,version:Ke,defaultOptions:D,Position:P,SourceLocation:M,getLineInfo:j,Node:he,TokenType:m,tokTypes:$,keywordTypes:g,TokContext:ae,tokContexts:se,isIdentifierChar:d,isIdentifierStart:p,Token:Ze,isNewLine:S,lineBreak:b,lineBreakG:E,nonASCIIwhitespace:_},e.Node=he,e.Parser=Y,e.Position=P,e.SourceLocation=M,e.TokContext=ae,e.Token=Ze,e.TokenType=m,e.defaultOptions=D,e.getLineInfo=j,e.isIdentifierChar=d,e.isIdentifierStart=p,e.isNewLine=S,e.keywordTypes=g,e.lineBreak=b,e.lineBreakG=E,e.nonASCIIwhitespace=_,e.parse=function(e,t){return Y.parse(e,t)},e.parseExpressionAt=function(e,t,n){return Y.parseExpressionAt(e,t,n)},e.tokContexts=se,e.tokTypes=$,e.tokenizer=function(e,t){return Y.tokenizer(e,t)},e.version=Ke}(t)},84591:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var a=Object.getOwnPropertyDescriptor(t,n);a&&!("get"in a?!t.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,a)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),a=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.wrapField=t.getFilteredCompletions=void 0,a(n(46432),t),a(n(81379),t),a(n(34889),t),a(n(82663),t),a(n(99352),t),a(n(47969),t),a(n(17941),t),a(n(37724),t),a(n(28131),t),a(n(19133),t),a(n(10282),t),a(n(56911),t);var s=n(78145);Object.defineProperty(t,"getFilteredCompletions",{enumerable:!0,get:function(){return s.getFilteredCompletions}}),Object.defineProperty(t,"wrapField",{enumerable:!0,get:function(){return s.wrapField}}),a(n(96807),t),a(n(40957),t)},85070:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.EXPRESSION_OPERATORS=void 0,t.EXPRESSION_OPERATORS=[{name:"$abs",value:"$abs",score:1,meta:"expr:arith",version:"3.2.0"},{name:"$accumulator",value:"$accumulator",score:1,meta:"expr:arith",version:"4.4.0"},{name:"$add",value:"$add",score:1,meta:"expr:arith",version:"2.2.0"},{name:"$allElementsTrue",value:"$allElementsTrue",score:1,meta:"expr:set",version:"2.6.0"},{name:"$and",value:"$and",score:1,meta:"expr:bool",version:"2.2.0"},{name:"$anyElementTrue",value:"$anyElementTrue",score:1,meta:"expr:set",version:"2.6.0"},{name:"$arrayElemAt",value:"$arrayElemAt",score:1,meta:"expr:array",version:"3.2.0"},{name:"$arrayToObject",value:"$arrayToObject",score:1,meta:"expr:array",version:"3.4.4"},{name:"$binarySize",value:"$binarySize",score:1,meta:"expr:obj",version:"4.4.0"},{name:"$bsonSize",value:"$bsonSize",score:1,meta:"expr:obj",version:"4.4.0"},{name:"$ceil",value:"$ceil",score:1,meta:"expr:arith",version:"3.2.0"},{name:"$cmp",value:"$cmp",score:1,meta:"expr:comp",version:"2.2.0"},{name:"$concat",value:"$concat",score:1,meta:"expr:string",version:"2.4.0"},{name:"$concatArrays",value:"$concatArrays",score:1,meta:"expr:array",version:"3.2.0"},{name:"$cond",value:"$cond",score:1,meta:"expr:cond",version:"2.6.0"},{name:"$dateAdd",value:"$dateAdd",score:1,meta:"expr:date",version:"5.0.0"},{name:"$dateDiff",value:"$dateDiff",score:1,meta:"expr:date",version:"5.0.0"},{name:"$dateFromParts",value:"$dateFromParts",score:1,meta:"expr:date",version:"3.6.0"},{name:"$dateFromString",value:"$dateFromString",score:1,meta:"expr:date",version:"3.6.0"},{name:"$dateSubtract",value:"$dateSubtract",score:1,meta:"expr:date",version:"5.0.0"},{name:"$dateToParts",value:"$dateToParts",score:1,meta:"expr:date",version:"3.6.0"},{name:"$dateToString",value:"$dateToString",score:1,meta:"expr:date",version:"3.6.0"},{name:"$dateTrunc",value:"$dateTrunc",score:1,meta:"expr:date",version:"5.0.0"},{name:"$dayOfMonth",value:"$dayOfMonth",score:1,meta:"expr:date",version:"2.2.0"},{name:"$dayOfWeek",value:"$dayOfWeek",score:1,meta:"expr:date",version:"2.2.0"},{name:"$dayOfYear",value:"$dayOfYear",score:1,meta:"expr:date",version:"2.2.0"},{name:"$dateToString",value:"$dateToString",score:1,meta:"expr:date",version:"3.0.0"},{name:"$divide",value:"$divide",score:1,meta:"expr:arith",version:"2.2.0"},{name:"$eq",value:"$eq",score:1,meta:"expr:comp",version:"2.2.0"},{name:"$exp",value:"$exp",score:1,meta:"expr:arith",version:"3.2.0"},{name:"$filter",value:"$filter",score:1,meta:"expr:array",version:"3.2.0"},{name:"$first",value:"$first",score:1,meta:"expr:array",version:"4.4.0"},{name:"$floor",value:"$floor",score:1,meta:"expr:arith",version:"3.2.0"},{name:"$function",value:"$function",score:1,meta:"expr:arith",version:"4.4.0"},{name:"$getField",value:"$getField",score:1,meta:"expr:get",version:"5.0.0"},{name:"$gt",value:"$gt",score:1,meta:"expr:comp",version:"2.2.0"},{name:"$gte",value:"$gte",score:1,meta:"expr:comp",version:"2.2.0"},{name:"$hour",value:"$hour",score:1,meta:"expr:date",version:"2.2.0"},{name:"$ifNull",value:"$ifNull",score:1,meta:"expr:cond",version:"2.2.0"},{name:"$in",value:"$in",score:1,meta:"expr:array",version:"3.4.0"},{name:"$indexOfArray",value:"$indexOfArray",score:1,meta:"expr:array",version:"3.4.0"},{name:"$indexOfBytes",value:"$indexOfBytes",score:1,meta:"expr:string",version:"3.4.0"},{name:"$indexOfCP",value:"$indexOfCP",score:1,meta:"expr:string",version:"3.4.0"},{name:"$isArray",value:"$isArray",score:1,meta:"expr:array",version:"3.2.0"},{name:"$isNumber",value:"$isNumber",score:1,meta:"expr:arith",version:"4.4.0"},{name:"$isoDayOfWeek",value:"$isoDayOfWeek",score:1,meta:"expr:date",version:"3.4.0"},{name:"$isoWeek",value:"$isoWeek",score:1,meta:"expr:date",version:"3.4.0"},{name:"$isoWeekYear",value:"$isoWeekYear",score:1,meta:"expr:date",version:"3.4.0"},{name:"$last",value:"$last",score:1,meta:"expr:array",version:"4.4.0"},{name:"$let",value:"$let",score:1,meta:"expr:var",version:"2.6.0"},{name:"$literal",value:"$literal",score:1,meta:"expr:literal",version:"2.6.0"},{name:"$lt",value:"$lt",score:1,meta:"expr:comp",version:"2.2.0"},{name:"$lt",value:"$lte",score:1,meta:"expr:comp",version:"2.2.0"},{name:"$ln",value:"$ln",score:1,meta:"expr:arith",version:"3.2.0"},{name:"$log",value:"$log",score:1,meta:"expr:arith",version:"3.2.0"},{name:"$log10",value:"$log10",score:1,meta:"expr:arith",version:"3.2.0"},{name:"$map",value:"$map",score:1,meta:"expr:array",version:"2.6.0"},{name:"$mergeObjects",value:"$mergeObjects",score:1,meta:"expr:obj",version:"3.6.0"},{name:"$meta",value:"$meta",score:1,meta:"expr:text",version:"2.6.0"},{name:"$millisecond",value:"$millisecond",score:1,meta:"expr:date",version:"2.4.0"},{name:"$minute",value:"$minute",score:1,meta:"expr:date",version:"2.2.0"},{name:"$mod",value:"$mod",score:1,meta:"expr:arith",version:"2.2.0"},{name:"$month",value:"$month",score:1,meta:"expr:date",version:"2.2.0"},{name:"$multiply",value:"$multiply",score:1,meta:"expr:arith",version:"2.2.0"},{name:"$new",value:"$new",score:1,meta:"expr:comp",version:"2.2.0"},{name:"$not",value:"$not",score:1,meta:"expr:bool",version:"2.2.0"},{name:"$objectToArray",value:"$objectToArray",score:1,meta:"expr:array",version:"3.4.4"},{name:"$or",value:"$or",score:1,meta:"expr:bool",version:"2.2.0"},{name:"$pow",value:"$pow",score:1,meta:"expr:arith",version:"3.2.0"},{name:"$range",value:"$range",score:1,meta:"expr:array",version:"3.4.0"},{name:"$reduce",value:"$reduce",score:1,meta:"expr:array",version:"3.4.0"},{name:"$regexFind",value:"$regexFind",score:1,meta:"expr:regex",version:"4.1.11"},{name:"$regexFindAll",value:"$regexFindAll",score:1,meta:"expr:regex",version:"4.1.11"},{name:"$regexMatch",value:"$regexMatch",score:1,meta:"expr:regex",version:"4.1.11"},{name:"$replaceAll",value:"$replaceAll",score:1,meta:"expr:string",version:"4.4.0"},{name:"$replaceOne",value:"$replaceOne",score:1,meta:"expr:string",version:"4.4.0"},{name:"$reverseArray",value:"$reverseArray",score:1,meta:"expr:array",version:"3.4.0"},{name:"$second",value:"$second",score:1,meta:"expr:date",version:"2.2.0"},{name:"$setDifference",value:"$setDifference",score:1,meta:"expr:set",version:"2.6.0"},{name:"$setEquals",value:"$setEquals",score:1,meta:"expr:set",version:"2.6.0"},{name:"$setIntersection",value:"$setIntersection",score:1,meta:"expr:set",version:"2.6.0"},{name:"$setIsSubset",value:"$setIsSubset",score:1,meta:"expr:set",version:"2.6.0"},{name:"$setUnion",value:"$setUnion",score:1,meta:"expr:set",version:"2.6.0"},{name:"$similarityCosine",value:"$similarityCosine",score:1,meta:"expr:arith",version:"8.2.0"},{name:"$similarityDotProduct",value:"$similarityDotProduct",score:1,meta:"expr:arith",version:"8.2.0"},{name:"$similarityEuclidean",value:"$similarityEuclidean",score:1,meta:"expr:arith",version:"8.2.0"},{name:"$size",value:"$size",score:1,meta:"expr:array",version:"2.6.0"},{name:"$slice",value:"$slice",score:1,meta:"expr:array",version:"3.2.0"},{name:"$sortArray",value:"$sortArray",score:1,meta:"expr:array",version:"5.2.0"},{name:"$split",value:"$split",score:1,meta:"expr:string",version:"3.4.0"},{name:"$sqrt",value:"$sqrt",score:1,meta:"expr:arith",version:"3.2.0"},{name:"$strcasecmp",value:"$strcasecmp",score:1,meta:"expr:string",version:"2.2.0"},{name:"$strLenBytes",value:"$strLenBytes",score:1,meta:"expr:string",version:"3.4.0"},{name:"$strLenCP",value:"$strLenCP",score:1,meta:"expr:string",version:"3.4.0"},{name:"$substr",value:"$substr",score:1,meta:"expr:string",version:"2.2.0",deprecated:"3.4.0",replacement:"$substrBytes"},{name:"$substrBytes",value:"$substrBytes",score:1,meta:"expr:string",version:"3.4.0"},{name:"$substrCP",value:"$substrCP",score:1,meta:"expr:string",version:"3.4.0"},{name:"$subtract",value:"$subtract",score:1,meta:"expr:arith",version:"3.2.0"},{name:"$switch",value:"$switch",score:1,meta:"expr:cond",version:"3.4.0"},{name:"$toHashedIndexKey",value:"$toHashedIndexKey",score:1,meta:"expr:arith",version:"4.2.24"},{name:"$toLower",value:"$toLower",score:1,meta:"expr:string",version:"2.2.0"},{name:"$toUpper",value:"$toUpper",score:1,meta:"expr:string",version:"2.2.0"},{name:"$tsSecond",value:"$tsSecond",score:1,meta:"expr:date",version:"5.1.0"},{name:"$tsIncrement",value:"$tsIncrement",score:1,meta:"expr:date",version:"5.1.0"},{name:"$trunc",value:"$trunc",score:1,meta:"expr:arith",version:"3.2.0"},{name:"$type",value:"$type",score:1,meta:"expr:type",version:"3.4.0"},{name:"$week",value:"$week",score:1,meta:"expr:date",version:"2.2.0"},{name:"$year",value:"$year",score:1,meta:"expr:date",version:"2.2.0"},{name:"$zip",value:"$zip",score:1,meta:"expr:array",version:"3.4.0"},{name:"$bitAnd",value:"$bitAnd",score:1,meta:"expr:bit",version:"7.0.0"},{name:"$bitOr",value:"$bitOr",score:1,meta:"expr:bit",version:"7.0.0"},{name:"$bitXor",value:"$bitXor",score:1,meta:"expr:bit",version:"7.0.0"},{name:"$bitNot",value:"$bitNot",score:1,meta:"expr:bit",version:"7.0.0"}]},85216:(e,t,n)=>{const r=n(66283);e.exports=(e,t,n)=>{const a=new r(e,n),s=new r(t,n);return a.compare(s)||a.compareBuild(s)}},85426:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.REQUIRED_AS_FIRST_STAGE=t.FULL_SCAN_STAGES=t.OUT_STAGES=t.STAGE_OPERATOR_NAMES=t.STAGE_OPERATORS=void 0;const r=n(63875),a=n(80417),s=[{name:"$addFields",value:"$addFields",label:"$addFields",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"3.4.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Adds new field(s) to a document with a computed value, or reassigns an existing field(s) with a computed value.",comment:"/**\n * newField: The new field name.\n * expression: The new field expression.\n */\n",snippet:"{\n ${1:newField}: ${2:expression}, ${3:...}\n}"},{name:"$bucket",value:"$bucket",label:"$bucket",outputStage:!1,fullScan:!0,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"3.4.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Categorizes incoming documents into groups, called buckets, based on specified boundaries.",comment:"/**\n * groupBy: The expression to group by.\n * boundaries: An array of the lower boundaries for each bucket.\n * default: The bucket name for documents that do not fall within the specified boundaries\n * output: {\n * outputN: Optional. The output object may contain a single or numerous field names used to accumulate values per bucket.\n * }\n */\n",snippet:"{\n groupBy: ${1:expression},\n boundaries: [ ${2:lowerbound}, ${3:...} ],\n default: ${4:literal},\n output: {\n ${5:outputN}: { ${6:accumulator} }, ${7:...}\n }\n}"},{name:"$bucketAuto",value:"$bucketAuto",label:"$bucketAuto",outputStage:!1,fullScan:!0,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"3.4.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Automatically categorizes documents into a specified number of buckets, attempting even distribution if possible.",comment:"/**\n * groupBy: The expression to group by.\n * buckets: The desired number of buckets\n * output: {\n * outputN: Optional. The output object may contain a single or numerous field names used to accumulate values per bucket.\n * }\n * granularity: Optional number series\n */\n",snippet:"{\n groupBy: ${1:expression},\n buckets: ${2:number},\n output: {\n ${3:outputN}: ${4:accumulator}, ${5:...}\n },\n granularity: '${6:string}'\n}"},{name:"$changeStream",value:"$changeStream",label:"$changeStream",outputStage:!1,fullScan:!1,firstStage:!0,score:1,env:[r.ATLAS,r.ON_PREM],meta:"stage",version:"4.2.0",apiVersions:[1],namespaces:[a.DATABASE],description:"Returns a Change Stream cursor for the collection.",comment:"/**\n * allChangesForCluster: Optional boolean to include all changes in the cluster.\n * fullDocument: Optional value to request a copy of full document when modified by update operations (Introduced in 6.0).\n * fullDocumentBeforeChange: Value to configure whether to return a full document before the change or not.\n * resumeAfter: Specifies a resume token as the logical starting point for the change stream. Cannot be used with startAfter or startAtOperationTime fields.\n * showExpandedEvents: Specifies whether to include additional change events, such as such as DDL and index operations (Introduced in 6.0).\n * startAfter: Specifies a resume token as the logical starting point for the change stream. Cannot be used with resumeAfter or startAtOperationTime fields.\n * startAtOperationTime: Specifies a time as the logical starting point for the change stream. Cannot be used with resumeAfter or startAfter fields.\n */\n",snippet:"{\n allChangesForCluster: ${1:boolean},\n fullDocument: '${2:string}',\n fullDocumentBeforeChange: '${3:string}',\n resumeAfter: ${4:resumeToken},\n showExpandedEvents: ${5:boolean},\n startAfter: ${6:resumeToken},\n startAtOperationTime: ${7:time},\n}"},{name:"$collStats",value:"$collStats",label:"$collStats",outputStage:!1,fullScan:!1,firstStage:!0,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"3.4.0",apiVersions:[],namespaces:[...a.ANY_COLLECTION_NAMESPACE],description:"Returns statistics regarding a collection or view.",comment:"/**\n * histograms: Optional latency histograms.\n * storageStats: Optional storage stats.\n */\n",snippet:"{\n latencyStats: {\n histograms: ${1:boolean}\n },\n storageStats: {${2:}},\n}"},{name:"$count",value:"$count",label:"$count",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"2.2.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Returns a count of the number of documents at this stage of the aggregation pipeline.",comment:"/**\n * Provide the field name for the count.\n */\n",snippet:"'${1:string}'"},{name:"$currentOp",value:"$currentOp",label:"$currentOp",outputStage:!1,fullScan:!1,firstStage:!0,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"3.6.0",apiVersions:[1],namespaces:[a.DATABASE],description:"Returns a cursor over information on active and/or dormant operations for the MongoDB deployment as well as inactive sessions that are holding locks as part of a transaction.",comment:"/**\n * allUsers: Optional boolean value to specify whether to return operations for all users or not.\n * idleConnections: Optional boolean value to specify whether to return all operations including idle connections or not.\n * idleCursors: Optional boolean value to specify whether to report on cursors that are idle or not.\n * idleSessions: Optional boolean value to specify whether to report on dormant sessions or not.\n * localOps: Optional boolean value to specify whether to report on operations running locally on targetted mongos or not.\n * backtrace: Optional boolean value to specify whether callstack information is returned as part of the waitingForLatch output field.\n */\n",snippet:"{\n allUsers: ${1:false},\n idleConnections: ${2:false},\n idleCursors: ${3:false},\n idleSessions: ${4:true},\n localOps: ${5:false},\n backtrace: ${6:false},\n}"},{name:"$densify",value:"$densify",label:"$densify",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"5.1.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Creates new documents to eliminate the gaps in the time or numeric domain at the required granularity level.",comment:"/**\n * field: The required field to densify.\n * partitionByFields: The set of fields that acts as a compound key to define each partition.\n * range: {\n * step: The amount to increment the field value in each document.\n * unit: If specified field must evaluate to a date for every document in the collection, otherwise must evaluate to a numeric.\n * bounds: A string or array of numeric/date bounds, corresponding to the type of the field.\n * }\n */\n",snippet:"{\n field: ${1:string},\n partitionByFields: [${2:string}, ${3:string}, ...],\n range: {\n step: ${4:number},\n unit: ${5:string},\n bounds: [${6:lowerbound}, ${7:upperbound}, ...]\n }\n}"},{name:"$documents",value:"$documents",label:"$documents",outputStage:!1,fullScan:!1,firstStage:!0,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"4.4.9",apiVersions:[1],namespaces:[a.DATABASE],description:"Returns literal documents from input values.",comment:"/**\n * expression: Any valid expression.\n */\n",snippet:"{\n ${1:expression}\n}"},{name:"$facet",value:"$facet",label:"$facet",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"3.4.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Allows for multiple parellel aggregations to be specified.",comment:"/**\n * outputFieldN: The first output field.\n * stageN: The first aggregation stage.\n */\n",snippet:"{\n ${1:outputFieldN}: [ ${2:stageN}, ${3:...} ]\n}"},{name:"$fill",value:"$fill",label:"$fill",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"5.3.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Populates null and missing field values within documents.",comment:'/**\n * sortBy: Syntax is the same as $sort, required if "method" is used in at least one output spec otherwise optional\n * partitionBy: Optional, default is a single partition. Specification is the same as _id in $group (same as partitionBy in window functions).\n * partitionByFields: Optional, set of fields that acts as a compound key to define each partition.\n * output - Required, object for each field to fill in. For a single field, can be a single object.\n * output.<field> - A field to be filled with value, if missing or null in the current document.\n */\n',snippet:"{\n sortBy: ${1:sortSpec},\n partitionBy: ${2:expression},\n partitionByFields: [${3:string}, ${4:string}, ...],\n output: {\n field1: {value: ${5:expression}},\n field2: {method: ${6:string}},\n ...\n }\n}"},{name:"$geoNear",value:"$geoNear",label:"$geoNear",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"2.4.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Returns documents based on proximity to a geospatial point.",comment:"/**\n * near: The point to search near.\n * distanceField: The calculated distance.\n * maxDistance: The maximum distance, in meters, documents can be before being excluded from results.\n * query: Limits results that match the query\n * includeLocs: Optional. Labels and includes the point used to match the document.\n * num: Optional. The maximum number of documents to return.\n * spherical: Defaults to false. Specifies whether to use spherical geometry.\n */\n",snippet:"{\n near: { type: 'Point', coordinates: [ ${1:number}, ${2:number} ] },\n distanceField: '${3:string}',\n maxDistance: ${4:number},\n query: {${5}},\n includeLocs: '${6}',\n num: ${7:number},\n spherical: ${8:boolean}\n}"},{name:"$graphLookup",value:"$graphLookup",label:"$graphLookup",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"3.4.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Performs a recursive search on a collection.",comment:"/**\n * from: The target collection.\n * startWith: Expression to start.\n * connectFromField: Field to connect.\n * connectToField: Field to connect to.\n * as: Name of the array field.\n * maxDepth: Optional max recursion depth.\n * depthField: Optional Name of the depth field.\n * restrictSearchWithMatch: Optional query.\n */\n",snippet:"{\n from: '${1:string}',\n startWith: ${2:expression},\n connectFromField: '${3:string}',\n connectToField: '${4:string}',\n as: '${5:string}',\n maxDepth: ${6:number},\n depthField: '${7:string}',\n restrictSearchWithMatch: {${8}}\n}"},{name:"$group",value:"$group",label:"$group",outputStage:!1,fullScan:!0,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"2.2.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Groups documents by a specified expression.",comment:"/**\n * _id: The id of the group.\n * fieldN: The first field name.\n */\n",snippet:"{\n _id: ${1:expression},\n ${2:fieldN}: {\n ${3:accumulatorN}: ${4:expressionN}\n }\n}"},{name:"$indexStats",value:"$indexStats",label:"$indexStats",outputStage:!1,fullScan:!1,firstStage:!0,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"3.2.0",apiVersions:[],namespaces:[...a.ANY_NAMESPACE],description:"Returns statistics regarding the use of each index for the collection.",comment:"/**\n * No parameters.\n */\n",snippet:"{}"},{name:"$limit",value:"$limit",label:"$limit",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"2.2.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Limits the number of documents that flow into subsequent stages.",comment:"/**\n * Provide the number of documents to limit.\n */\n",snippet:"${1:number}"},{name:"$listLocalSessions",value:"$listLocalSessions",label:"$listLocalSessions",outputStage:!1,fullScan:!1,firstStage:!0,score:1,env:[r.ATLAS,r.ON_PREM],meta:"stage",version:"3.6.0",apiVersions:[1],namespaces:[a.DATABASE],description:"Lists the sessions cached in memory by the mongod or mongos instance.",comment:"/**\n * users: Optional list of users for which local sessions need to be returned.\n * allUsers: Optional boolean value to specify whether to return local sessions for all users or not.\n */\n",snippet:"{\n allUsers: ${1:false},\n users: [\n { user: '${2:string}', db: '${3:string}' }\n ]\n}"},{name:"$lookup",value:"$lookup",label:"$lookup",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"3.2.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Performs a join between two collections.",comment:"/**\n * from: The target collection.\n * localField: The local join field.\n * foreignField: The target join field.\n * as: The name for the results.\n * pipeline: Optional pipeline to run on the foreign collection.\n * let: Optional variables to use in the pipeline field stages.\n */\n",snippet:"{\n from: ${1:collection},\n localField: ${2:field},\n foreignField: ${3:field},\n as: ${4:result}\n}"},{name:"$match",value:"$match",label:"$match",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"2.2.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Filters the document stream to allow only matching documents to pass through to subsequent stages.",comment:"/**\n * query: The query in MQL.\n */\n",snippet:"{\n ${1:query}\n}"},{name:"$merge",value:"$merge",label:"$merge",outputStage:!0,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ON_PREM],meta:"stage",version:"4.1.11",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Merges the resulting documents into a collection, optionally overriding existing documents.",comment:"/**\n * into: The target collection.\n * on: Fields to identify.\n * let: Defined variables.\n * whenMatched: Action for matching docs.\n * whenNotMatched: Action for non-matching docs.\n */\n",snippet:"{\n into: '${1:string}',\n on: '${2:string}',\n let: '${3:specification(s)}',\n whenMatched: '${4:string}',\n whenNotMatched: '${5:string}'\n}"},{name:"$merge",value:"$merge",label:"$merge",outputStage:!0,fullScan:!1,firstStage:!1,score:1,env:[r.ADL],meta:"stage",version:"4.0.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Merges the resulting documents into a collection, optionally overriding existing documents.",comment:"/**\n * atlas: Location to write the documents from the aggregation pipeline.\n * on: Fields to identify.\n * let: Defined variables.\n * whenMatched: Action for matching docs.\n * whenNotMatched: Action for non-matching docs.\n */\n",snippet:"{\n into: {\n atlas: {\n clusterName: '${1:atlasClusterName}',\n db: '${2:database}',\n coll: '${3:collection}',\n projectId: '${4:optionalAtlasProjectId}'\n }\n },\n on: '${5:identifier}',\n let: { ${6:specification(s)} },\n whenMatched: '${7:string}',\n whenNotMatched: '${8:string}'\n}"},{name:"$out",value:"$out",label:"$out",outputStage:!0,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ON_PREM],meta:"stage",version:"2.2.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Writes the result of a pipeline to a new or existing collection.",comment:"/**\n * Provide the name of the output database and collection.\n */\n",snippet:"{\n db: '${1:string}',\n coll: '${2:string}',\n /*\n timeseries: {\n timeField: '${3:field}',\n bucketMaxSpanSeconds: '${4:number}',\n granularity: '${5:granularity}'\n }\n */\n}"},{name:"$out",value:"$out",label:"$out",outputStage:!0,fullScan:!1,firstStage:!1,score:1,env:[r.ADL],meta:"stage",version:"4.0.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Writes the result of a pipeline to an Atlas cluster, S3 bucket, or Azure Blob Storage.",comment:"/**\n * Use any one of the following:\n * s3: Parameters to save the data to S3.\n * atlas: Parameters to save the data to Atlas. Example:\n * {\n * atlas: {\n * db: 'string',\n * coll: 'string',\n * projectId: 'string',\n * clusterName: 'string'\n * }\n * },\n * azure: Parameters to save the data to Azure. Example:\n * {\n * azure: {\n * serviceURL: 'string',\n * containerName: 'string',\n * region: 'string,\n * filename: 'string',\n * format: {\n * name: 'string',\n * maxFileSize: 'string',\n * maxRowGroupSize: 'string',\n * columnCompression: 'string'\n * },\n * errorMode: 'string'\n * }\n * }\n */\n",snippet:"{\n s3: {\n bucket: '${1:string}',\n region: '${2:string}',\n filename: '${3:string}',\n format: {\n name: '${4:string}',\n maxFileSize: '${5:bytes}',\n maxRowGroupSize: '${6:string}',\n columnCompression: '${7:string}'\n },\n errorMode: '${8:string}'\n }\n}"},{name:"$project",value:"$project",label:"$project",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"2.2.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Adds new field(s) to a document with a computed value, or reassigns an existing field(s) with a computed value. Unlike $addFields, $project can also remove fields.",comment:"/**\n * specifications: The fields to\n * include or exclude.\n */\n",snippet:"{\n ${1:specification(s)}\n}"},{name:"$rankFusion",value:"$rankFusion",label:"$rankFusion",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS],meta:"stage",version:"8.0.14",apiVersions:[],namespaces:[a.COLLECTION],description:"Combines multiple pipelines using reciprocal rank fusion to create hybrid search results.",comment:'/**\n * input.pipelines: Required. Map from name to input pipeline. Each pipeline must be a Ranked Selection Pipeline operating on the same collection. Minimum of one pipeline.\n * combination.weights: Optional. Map from pipeline name to numbers (non-negative). If unspecified, default weight is 1 for each pipeline.\n * scoreDetails: Optional. Default false. Set to true to include detailed scoring information in {$meta: "scoreDetails"} for debugging and tuning.\n */\n',snippet:"{\n input: {\n pipelines: {\n ${1:searchPipeline}: [\n {$search: {${2:searchStage}}},\n {$limit: ${3:limit}}\n ],\n ${4:vectorPipeline}: [\n {$vectorSearch: {${5:vectorSearchStage}}}\n ]\n }\n },\n combination: {\n weights: {\n ${6:searchPipeline}: ${7:number},\n ${8:vectorPipeline}: ${9:number}\n }\n },\n scoreDetails: ${10:false}\n}"},{name:"$redact",value:"$redact",label:"$redact",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"2.6.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Restricts the content for each document based on information stored in the documents themselves",comment:"/**\n * expression: Any valid expression that\n * evaluates to $$DESCEND, $$PRUNE, or $$KEEP.\n */\n",snippet:"{\n ${1:expression}\n}"},{name:"$replaceRoot",value:"$replaceRoot",label:"$replaceRoot",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"3.4.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Replaces a document with the specified embedded document.",comment:"/**\n * replacementDocument: A document or string.\n */\n",snippet:"{\n newRoot: ${1:replacementDocument}\n}"},{name:"$replaceWith",value:"$replaceWith",label:"$replaceWith",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"4.2.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Replaces a document with the specified embedded document.",comment:"/**\n * replacementDocument: A document or string.\n */\n",snippet:"{\n newWith: ${1:replacementDocument}\n}"},{name:"$sample",value:"$sample",label:"$sample",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"3.2.0",apiVersions:[1],namespaces:[...a.ANY_COLLECTION_NAMESPACE],description:"Randomly selects the specified number of documents from its input.",comment:"/**\n * size: The number of documents to sample.\n */\n",snippet:"{\n size: ${1:number}\n}"},{name:"$scoreFusion",value:"$scoreFusion",label:"$scoreFusion",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS],meta:"stage",version:"8.2.0",apiVersions:[],namespaces:[a.COLLECTION],description:"Combines multiple pipelines using relative score fusion to create hybrid search results.",comment:"/**\n * input.pipelines: Required. Map from name to input pipeline. Each pipeline must be operating on the same collection. Minimum of one pipeline.\n * input.normalization: Required. Normalizes the score to the range 0 to 1 before combining the results. Value can be none, sigmoid or minMaxScaler.\n * combination.weights: Optional. Map from pipeline name to numbers (non-negative). If unspecified, default weight is 1 for each pipeline.\n * combination.method: Optional. Specifies method for combining scores. Value can be avg or expression. Default is avg.\n * combination.expression: Optional. This is the custom expression that is used when combination.method is set to expression.\n * scoreDetails: Optional. Default false. Set to true to include detailed scoring information.\n */\n",snippet:"{\n input: {\n pipelines: {\n ${1:searchPipeline}: [\n {$search: {${2:searchStage}}},\n {$limit: ${3:limit}}\n ],\n ${4:vectorPipeline}: [\n {$vectorSearch: {${5:vectorSearchStage}}}\n ]\n },\n normalization: '${6:none|sigmoid|minMaxScaler}'\n },\n combination: {\n weights: {\n ${7:searchPipeline}: ${8:number},\n ${9:vectorPipeline}: ${10:number}\n },\n method: '${11:avg|expression}',\n expression: '${12:expression}'\n },\n scoreDetails: ${13:false}\n}"},{name:"$search",value:"$search",label:"$search",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS],meta:"stage",version:"4.1.11",apiVersions:[],namespaces:[a.COLLECTION,a.VIEW],description:"Performs a full-text search on the specified field(s).",comment:"/**\n * index: The name of the Search index.\n * text: Analyzed search, with required fields of query and path, the analyzed field(s) to search. Use matchCriteria to match 'any' or 'all' query terms.\n * compound: Combines ops.\n * span: Find in text field regions.\n * exists: Test for presence of a field.\n * near: Find near number or date.\n * range: Find in numeric or date range.\n */\n",snippet:"{\n index: '${1:string}',\n text: {\n query: '${2:string}',\n path: '${3:string}',\n matchCriteria: '${4:any}',\n }\n}"},{name:"$searchMeta",value:"$searchMeta",label:"$searchMeta",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS],meta:"stage",version:"4.4.9",apiVersions:[],namespaces:[a.COLLECTION,a.VIEW],description:"Performs a full-text search on the specified field(s) and gets back only the generated search meta data from a query.",comment:"/**\n * index: The name of the Search index.\n * count: The count of the results.\n * facet: {\n * operator: Analyzed search, with required fields of query and path, can either be replaced with the name of a valid operator.\n * facets: {\n * stringFacet: Narrows search results based on unique string values, with required fields of type and path.\n * numberFacet: Narrows search results by breaking them up into separate ranges of numbers, with required fields of type, path, and boundaries.\n * dateFacet: Narrows search results by breaking them up into separate ranges of dates, with required fields of type, path, and boundaries.\n * }\n * }\n */\n",snippet:"{\n index: ${1:string},\n facet: {\n operator: {\n text: {\n query: ${2:string},\n path: ${3:string}\n }\n },\n facets: {\n ${4:stringFacet}: {\n type: ${5:string},\n path: ${6:string},\n numBuckets: ${7:integer}\n },\n numberFacet: {\n type: 'number',\n path: ${8:string},\n boundaries: [${9:lowerbound}, ${10:upperbound}, ...],\n default: ${11:string}\n }\n }\n }\n}"},{name:"$set",value:"$set",label:"$set",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"4.2.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Adds new fields to documents. $set outputs documents that contain all existing fields from the input documents and newly added fields.",comment:"/**\n * field: The field name\n * expression: The expression.\n */\n",snippet:"{\n ${1:field}: ${2:expression}\n}"},{name:"$setWindowFields",value:"$setWindowFields",label:"$setWindowFields",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"5.0.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Capable of partitioning incoming data, and can apply one or more functions to defined windows within each partition.",comment:"/**\n * partitionBy: partitioning of data.\n * sortBy: fields to sort by.\n * output: {\n * path: {\n * function: The window function to compute over the given window.\n * window: {\n * documents: A number of documents before and after the current document.\n * range: A range of possible values around the value in the current document's sortBy field.\n * unit: Specifies the units for the window bounds.\n * }\n * }\n * }\n */\n",snippet:"{\n partitionBy: ${1:expression},\n sortBy: ${2:sortSpec},\n output: {\n ${3:path}: {\n ${4:function}: ${5:functionArgs},\n window: {\n documents: [${6:lowerbound}, ${7:upperbound}],\n range: [${8:lowerbound}, ${9:upperbound}],\n unit: ${10:string}\n }\n },\n ${11:path2}: ...\n }\n}"},{name:"$skip",value:"$skip",label:"$skip",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"2.2.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Skips a specified number of documents before advancing to the next stage.",comment:"/**\n * Provide the number of documents to skip.\n */\n",snippet:"${1:number}"},{name:"$sort",value:"$sort",label:"$sort",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"2.2.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Reorders the document stream by a specified sort key and direction.",comment:"/**\n * Provide any number of field/order pairs.\n */\n",snippet:"{\n ${1:field1}: ${2:sortOrder}\n}"},{name:"$sortByCount",value:"$sortByCount",label:"$sortByCount",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"3.4.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Groups incoming documents based on the value of a specified expression, then computes the count of documents in each distinct group.",comment:"/**\n * expression: Grouping expression or string.\n */\n",snippet:"{\n ${1:expression}\n}"},{name:"$unionWith",value:"$unionWith",label:"$unionWith",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"4.4.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Perform a union with a pipeline on another collection.",comment:"/**\n * coll: The collection name.\n * pipeline: The pipeline on the other collection.\n */\n",snippet:"{\n coll: '${1:coll}',\n pipeline: [${2:pipeline}]\n}"},{name:"$unset",value:"$unset",label:"$unset",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"4.2.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Excludes fields from the result document.",comment:"/**\n * Provide the field name to exclude.\n * To exclude multiple fields, pass the field names in an array.\n */\n",snippet:"'${1:string}'"},{name:"$unwind",value:"$unwind",label:"$unwind",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"2.2.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Outputs a new document for each element in a specified array. ",comment:"/**\n * path: Path to the array field.\n * includeArrayIndex: Optional name for index.\n * preserveNullAndEmptyArrays: Optional\n * toggle to unwind null and empty values.\n */\n",snippet:"{\n path: ${1:path},\n includeArrayIndex: '${2:string}',\n preserveNullAndEmptyArrays: ${3:boolean}\n}"},{name:"$vectorSearch",value:"$vectorSearch",label:"$vectorSearch",outputStage:!1,fullScan:!1,firstStage:!0,score:1,env:[r.ATLAS],meta:"stage",version:">=6.0.10 <7.0.0 || >=7.0.2",apiVersions:[],namespaces:[a.COLLECTION,a.VIEW],description:"Performs a kNN search on embeddings in the specified field(s)",comment:"/**\n * queryVector: Array of numbers of BSON types `int` or `double` that represent the query vector. The array size must match the number of vector dimensions specified in the index for the field. (Required)\n * path: The field to search. (Required)\n * numCandidates: Number of nearest neighbors to use during the search. You can specify a number higher than the number of documents to return (`limit`) to increase accuracy. (Required)\n * index: Name of the Atlas Search index to use. (Required)\n * limit: Number (of type `int` only) of documents to return in the results. (Required)\n * filter: Any MongoDB Query Language (MQL) match expression that compares an indexed field with a boolean, number (not decimals), or string to use as a prefilter. (Optional)\n * exact: Choose between false for ANN (Approximate Nearest Neighbor) and true for ENN (Exact Nearest Neighbor). Defaults to false. (Optional)\n */\n",snippet:"{\n queryVector: [${1:dimension1}, ${2:dimension2}, ...],\n path: ${3:string},\n numCandidates: ${4:numCandidates},\n index: ${5:string},\n limit: ${6:limit},\n filter: {${7:expression}},\n exact: ${8:boolean}\n}"}];t.STAGE_OPERATORS=s;const i=s.map((e=>e.name));t.STAGE_OPERATOR_NAMES=i;const o=s.filter((e=>e.outputStage));t.OUT_STAGES=o;const l=s.filter((e=>e.fullScan));t.FULL_SCAN_STAGES=l;const c=s.filter((e=>e.firstStage));t.REQUIRED_AS_FIRST_STAGE=c},85623:(e,t,n)=>{const r=n(44455);e.exports=(e,t)=>e.sort(((e,n)=>r(n,e,t)))},85665:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BSON_TYPES=void 0,t.BSON_TYPES=[{name:"Code",value:"Code",label:"Code",score:1,meta:"bson",version:"0.0.0",description:"BSON Code type",snippet:"Code('${1:code}')"},{name:"ObjectId",value:"ObjectId",label:"ObjectId",score:1,meta:"bson",version:"0.0.0",description:"BSON ObjectId type",snippet:"ObjectId('${1:id}')"},{name:"Binary",value:"Binary",label:"Binary",score:1,meta:"bson",version:"0.0.0",description:"BSON Binary type",snippet:"Binary('${1:data}', '${2:subType}')"},{name:"DBRef",value:"DBRef",label:"DBRef",score:1,meta:"bson",version:"0.0.0",description:"BSON DBRef type",snippet:"DBRef('${1:ns}', '${2:oid}')"},{name:"Timestamp",value:"Timestamp",label:"Timestamp",score:1,meta:"bson",version:"0.0.0",description:"BSON Timestamp type",snippet:"Timestamp(${1:low}, ${2:high})"},{name:"NumberInt",value:"NumberInt",label:"NumberInt",score:1,meta:"bson",version:"0.0.0",description:"BSON 32 bit Integer type",snippet:"NumberInt(${1:value})"},{name:"NumberLong",value:"NumberLong",label:"NumberLong",score:1,meta:"bson",version:"0.0.0",description:"BSON 64 but Integer type",snippet:"NumberLong(${1:value})"},{name:"NumberDecimal",value:"NumberDecimal",label:"NumberDecimal",score:1,meta:"bson",version:"3.4.0",description:"BSON Decimal128 type",snippet:"NumberDecimal('${1:value}')"},{name:"MaxKey",value:"MaxKey",label:"MaxKey",score:1,meta:"bson",version:"0.0.0",description:"BSON MaxKey type",snippet:"MaxKey()"},{name:"MinKey",value:"MinKey",label:"MinKey",score:1,meta:"bson",version:"0.0.0",description:"BSON MinKey type",snippet:"MinKey()"},{name:"ISODate",value:"ISODate",label:"ISODate",score:1,meta:"bson",version:"0.0.0",description:"BSON Date type",snippet:"ISODate('${1:date}')"},{name:"RegExp",value:"RegExp",label:"RegExp",score:1,meta:"bson",version:"0.0.0",description:"BSON Regex type",snippet:"RegExp('${1:source}', '${2:opts}')"}]},86391:(e,t,n)=>{const r=n(70692);e.exports=(e,t,n)=>r(e,t,n)<0},86506:(e,t,n)=>{const r=n(48381);e.exports=(e,t)=>new r(e,t).patch},86543:(e,t,n)=>{const r=n(38358);e.exports=(e,t)=>{const n=r(e,t);return n&&n.prerelease.length?n.prerelease:null}},86812:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.REQUIRED_AS_FIRST_STAGE=t.FULL_SCAN_STAGES=t.OUT_STAGES=t.STAGE_OPERATOR_NAMES=t.STAGE_OPERATORS=void 0;const r=n(49014),a=n(93555),s=[{name:"$addFields",value:"$addFields",label:"$addFields",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"3.4.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Adds new field(s) to a document with a computed value, or reassigns an existing field(s) with a computed value.",comment:"/**\n * newField: The new field name.\n * expression: The new field expression.\n */\n",snippet:"{\n ${1:newField}: ${2:expression}, ${3:...}\n}"},{name:"$bucket",value:"$bucket",label:"$bucket",outputStage:!1,fullScan:!0,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"3.4.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Categorizes incoming documents into groups, called buckets, based on specified boundaries.",comment:"/**\n * groupBy: The expression to group by.\n * boundaries: An array of the lower boundaries for each bucket.\n * default: The bucket name for documents that do not fall within the specified boundaries\n * output: {\n * outputN: Optional. The output object may contain a single or numerous field names used to accumulate values per bucket.\n * }\n */\n",snippet:"{\n groupBy: ${1:expression},\n boundaries: [ ${2:lowerbound}, ${3:...} ],\n default: ${4:literal},\n output: {\n ${5:outputN}: { ${6:accumulator} }, ${7:...}\n }\n}"},{name:"$bucketAuto",value:"$bucketAuto",label:"$bucketAuto",outputStage:!1,fullScan:!0,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"3.4.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Automatically categorizes documents into a specified number of buckets, attempting even distribution if possible.",comment:"/**\n * groupBy: The expression to group by.\n * buckets: The desired number of buckets\n * output: {\n * outputN: Optional. The output object may contain a single or numerous field names used to accumulate values per bucket.\n * }\n * granularity: Optional number series\n */\n",snippet:"{\n groupBy: ${1:expression},\n buckets: ${2:number},\n output: {\n ${3:outputN}: ${4:accumulator}, ${5:...}\n },\n granularity: '${6:string}'\n}"},{name:"$changeStream",value:"$changeStream",label:"$changeStream",outputStage:!1,fullScan:!1,firstStage:!0,score:1,env:[r.ATLAS,r.ON_PREM],meta:"stage",version:"4.2.0",apiVersions:[1],namespaces:[a.DATABASE],description:"Returns a Change Stream cursor for the collection.",comment:"/**\n * allChangesForCluster: Optional boolean to include all changes in the cluster.\n * fullDocument: Optional value to request a copy of full document when modified by update operations (Introduced in 6.0).\n * fullDocumentBeforeChange: Value to configure whether to return a full document before the change or not.\n * resumeAfter: Specifies a resume token as the logical starting point for the change stream. Cannot be used with startAfter or startAtOperationTime fields.\n * showExpandedEvents: Specifies whether to include additional change events, such as such as DDL and index operations (Introduced in 6.0).\n * startAfter: Specifies a resume token as the logical starting point for the change stream. Cannot be used with resumeAfter or startAtOperationTime fields.\n * startAtOperationTime: Specifies a time as the logical starting point for the change stream. Cannot be used with resumeAfter or startAfter fields.\n */\n",snippet:"{\n allChangesForCluster: ${1:boolean},\n fullDocument: '${2:string}',\n fullDocumentBeforeChange: '${3:string}',\n resumeAfter: ${4:resumeToken},\n showExpandedEvents: ${5:boolean},\n startAfter: ${6:resumeToken},\n startAtOperationTime: ${7:time},\n}"},{name:"$collStats",value:"$collStats",label:"$collStats",outputStage:!1,fullScan:!1,firstStage:!0,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"3.4.0",apiVersions:[],namespaces:[...a.ANY_COLLECTION_NAMESPACE],description:"Returns statistics regarding a collection or view.",comment:"/**\n * histograms: Optional latency histograms.\n * storageStats: Optional storage stats.\n */\n",snippet:"{\n latencyStats: {\n histograms: ${1:boolean}\n },\n storageStats: {${2:}},\n}"},{name:"$count",value:"$count",label:"$count",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"2.2.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Returns a count of the number of documents at this stage of the aggregation pipeline.",comment:"/**\n * Provide the field name for the count.\n */\n",snippet:"'${1:string}'"},{name:"$currentOp",value:"$currentOp",label:"$currentOp",outputStage:!1,fullScan:!1,firstStage:!0,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"3.6.0",apiVersions:[1],namespaces:[a.DATABASE],description:"Returns a cursor over information on active and/or dormant operations for the MongoDB deployment as well as inactive sessions that are holding locks as part of a transaction.",comment:"/**\n * allUsers: Optional boolean value to specify whether to return operations for all users or not.\n * idleConnections: Optional boolean value to specify whether to return all operations including idle connections or not.\n * idleCursors: Optional boolean value to specify whether to report on cursors that are idle or not.\n * idleSessions: Optional boolean value to specify whether to report on dormant sessions or not.\n * localOps: Optional boolean value to specify whether to report on operations running locally on targetted mongos or not.\n * backtrace: Optional boolean value to specify whether callstack information is returned as part of the waitingForLatch output field.\n */\n",snippet:"{\n allUsers: ${1:false},\n idleConnections: ${2:false},\n idleCursors: ${3:false},\n idleSessions: ${4:true},\n localOps: ${5:false},\n backtrace: ${6:false},\n}"},{name:"$densify",value:"$densify",label:"$densify",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"5.1.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Creates new documents to eliminate the gaps in the time or numeric domain at the required granularity level.",comment:"/**\n * field: The required field to densify.\n * partitionByFields: The set of fields that acts as a compound key to define each partition.\n * range: {\n * step: The amount to increment the field value in each document.\n * unit: If specified field must evaluate to a date for every document in the collection, otherwise must evaluate to a numeric.\n * bounds: A string or array of numeric/date bounds, corresponding to the type of the field.\n * }\n */\n",snippet:"{\n field: ${1:string},\n partitionByFields: [${2:string}, ${3:string}, ...],\n range: {\n step: ${4:number},\n unit: ${5:string},\n bounds: [${6:lowerbound}, ${7:upperbound}, ...]\n }\n}"},{name:"$documents",value:"$documents",label:"$documents",outputStage:!1,fullScan:!1,firstStage:!0,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"4.4.9",apiVersions:[1],namespaces:[a.DATABASE],description:"Returns literal documents from input values.",comment:"/**\n * expression: Any valid expression.\n */\n",snippet:"{\n ${1:expression}\n}"},{name:"$facet",value:"$facet",label:"$facet",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"3.4.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Allows for multiple parellel aggregations to be specified.",comment:"/**\n * outputFieldN: The first output field.\n * stageN: The first aggregation stage.\n */\n",snippet:"{\n ${1:outputFieldN}: [ ${2:stageN}, ${3:...} ]\n}"},{name:"$fill",value:"$fill",label:"$fill",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"5.3.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Populates null and missing field values within documents.",comment:'/**\n * sortBy: Syntax is the same as $sort, required if "method" is used in at least one output spec otherwise optional\n * partitionBy: Optional, default is a single partition. Specification is the same as _id in $group (same as partitionBy in window functions).\n * partitionByFields: Optional, set of fields that acts as a compound key to define each partition.\n * output - Required, object for each field to fill in. For a single field, can be a single object.\n * output.<field> - A field to be filled with value, if missing or null in the current document.\n */\n',snippet:"{\n sortBy: ${1:sortSpec},\n partitionBy: ${2:expression},\n partitionByFields: [${3:string}, ${4:string}, ...],\n output: {\n field1: {value: ${5:expression}},\n field2: {method: ${6:string}},\n ...\n }\n}"},{name:"$geoNear",value:"$geoNear",label:"$geoNear",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"2.4.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Returns documents based on proximity to a geospatial point.",comment:"/**\n * near: The point to search near.\n * distanceField: The calculated distance.\n * maxDistance: The maximum distance, in meters, documents can be before being excluded from results.\n * query: Limits results that match the query\n * includeLocs: Optional. Labels and includes the point used to match the document.\n * num: Optional. The maximum number of documents to return.\n * spherical: Defaults to false. Specifies whether to use spherical geometry.\n */\n",snippet:"{\n near: { type: 'Point', coordinates: [ ${1:number}, ${2:number} ] },\n distanceField: '${3:string}',\n maxDistance: ${4:number},\n query: {${5}},\n includeLocs: '${6}',\n num: ${7:number},\n spherical: ${8:boolean}\n}"},{name:"$graphLookup",value:"$graphLookup",label:"$graphLookup",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"3.4.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Performs a recursive search on a collection.",comment:"/**\n * from: The target collection.\n * startWith: Expression to start.\n * connectFromField: Field to connect.\n * connectToField: Field to connect to.\n * as: Name of the array field.\n * maxDepth: Optional max recursion depth.\n * depthField: Optional Name of the depth field.\n * restrictSearchWithMatch: Optional query.\n */\n",snippet:"{\n from: '${1:string}',\n startWith: ${2:expression},\n connectFromField: '${3:string}',\n connectToField: '${4:string}',\n as: '${5:string}',\n maxDepth: ${6:number},\n depthField: '${7:string}',\n restrictSearchWithMatch: {${8}}\n}"},{name:"$group",value:"$group",label:"$group",outputStage:!1,fullScan:!0,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"2.2.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Groups documents by a specified expression.",comment:"/**\n * _id: The id of the group.\n * fieldN: The first field name.\n */\n",snippet:"{\n _id: ${1:expression},\n ${2:fieldN}: {\n ${3:accumulatorN}: ${4:expressionN}\n }\n}"},{name:"$indexStats",value:"$indexStats",label:"$indexStats",outputStage:!1,fullScan:!1,firstStage:!0,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"3.2.0",apiVersions:[],namespaces:[...a.ANY_NAMESPACE],description:"Returns statistics regarding the use of each index for the collection.",comment:"/**\n * No parameters.\n */\n",snippet:"{}"},{name:"$limit",value:"$limit",label:"$limit",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"2.2.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Limits the number of documents that flow into subsequent stages.",comment:"/**\n * Provide the number of documents to limit.\n */\n",snippet:"${1:number}"},{name:"$listLocalSessions",value:"$listLocalSessions",label:"$listLocalSessions",outputStage:!1,fullScan:!1,firstStage:!0,score:1,env:[r.ATLAS,r.ON_PREM],meta:"stage",version:"3.6.0",apiVersions:[1],namespaces:[a.DATABASE],description:"Lists the sessions cached in memory by the mongod or mongos instance.",comment:"/**\n * users: Optional list of users for which local sessions need to be returned.\n * allUsers: Optional boolean value to specify whether to return local sessions for all users or not.\n */\n",snippet:"{\n allUsers: ${1:false},\n users: [\n { user: '${2:string}', db: '${3:string}' }\n ]\n}"},{name:"$lookup",value:"$lookup",label:"$lookup",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"3.2.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Performs a join between two collections.",comment:"/**\n * from: The target collection.\n * localField: The local join field.\n * foreignField: The target join field.\n * as: The name for the results.\n * pipeline: Optional pipeline to run on the foreign collection.\n * let: Optional variables to use in the pipeline field stages.\n */\n",snippet:"{\n from: ${1:collection},\n localField: ${2:field},\n foreignField: ${3:field},\n as: ${4:result}\n}"},{name:"$match",value:"$match",label:"$match",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"2.2.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Filters the document stream to allow only matching documents to pass through to subsequent stages.",comment:"/**\n * query: The query in MQL.\n */\n",snippet:"{\n ${1:query}\n}"},{name:"$merge",value:"$merge",label:"$merge",outputStage:!0,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ON_PREM],meta:"stage",version:"4.1.11",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Merges the resulting documents into a collection, optionally overriding existing documents.",comment:"/**\n * into: The target collection.\n * on: Fields to identify.\n * let: Defined variables.\n * whenMatched: Action for matching docs.\n * whenNotMatched: Action for non-matching docs.\n */\n",snippet:"{\n into: '${1:string}',\n on: '${2:string}',\n let: '${3:specification(s)}',\n whenMatched: '${4:string}',\n whenNotMatched: '${5:string}'\n}"},{name:"$merge",value:"$merge",label:"$merge",outputStage:!0,fullScan:!1,firstStage:!1,score:1,env:[r.ADL],meta:"stage",version:"4.0.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Merges the resulting documents into a collection, optionally overriding existing documents.",comment:"/**\n * atlas: Location to write the documents from the aggregation pipeline.\n * on: Fields to identify.\n * let: Defined variables.\n * whenMatched: Action for matching docs.\n * whenNotMatched: Action for non-matching docs.\n */\n",snippet:"{\n into: {\n atlas: {\n clusterName: '${1:atlasClusterName}',\n db: '${2:database}',\n coll: '${3:collection}',\n projectId: '${4:optionalAtlasProjectId}'\n }\n },\n on: '${5:identifier}',\n let: { ${6:specification(s)} },\n whenMatched: '${7:string}',\n whenNotMatched: '${8:string}'\n}"},{name:"$out",value:"$out",label:"$out",outputStage:!0,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ON_PREM],meta:"stage",version:"2.2.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Writes the result of a pipeline to a new or existing collection.",comment:"/**\n * Provide the name of the output database and collection.\n */\n",snippet:"{\n db: '${1:string}',\n coll: '${2:string}',\n /*\n timeseries: {\n timeField: '${3:field}',\n bucketMaxSpanSeconds: '${4:number}',\n granularity: '${5:granularity}'\n }\n */\n}"},{name:"$out",value:"$out",label:"$out",outputStage:!0,fullScan:!1,firstStage:!1,score:1,env:[r.ADL],meta:"stage",version:"4.0.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Writes the result of a pipeline to an Atlas cluster, S3 bucket, or Azure Blob Storage.",comment:"/**\n * Use any one of the following:\n * s3: Parameters to save the data to S3.\n * atlas: Parameters to save the data to Atlas. Example:\n * {\n * atlas: {\n * db: 'string',\n * coll: 'string',\n * projectId: 'string',\n * clusterName: 'string'\n * }\n * },\n * azure: Parameters to save the data to Azure. Example:\n * {\n * azure: {\n * serviceURL: 'string',\n * containerName: 'string',\n * region: 'string,\n * filename: 'string',\n * format: {\n * name: 'string',\n * maxFileSize: 'string',\n * maxRowGroupSize: 'string',\n * columnCompression: 'string'\n * },\n * errorMode: 'string'\n * }\n * }\n */\n",snippet:"{\n s3: {\n bucket: '${1:string}',\n region: '${2:string}',\n filename: '${3:string}',\n format: {\n name: '${4:string}',\n maxFileSize: '${5:bytes}',\n maxRowGroupSize: '${6:string}',\n columnCompression: '${7:string}'\n },\n errorMode: '${8:string}'\n }\n}"},{name:"$project",value:"$project",label:"$project",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"2.2.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Adds new field(s) to a document with a computed value, or reassigns an existing field(s) with a computed value. Unlike $addFields, $project can also remove fields.",comment:"/**\n * specifications: The fields to\n * include or exclude.\n */\n",snippet:"{\n ${1:specification(s)}\n}"},{name:"$rankFusion",value:"$rankFusion",label:"$rankFusion",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS],meta:"stage",version:"8.0.14",apiVersions:[],namespaces:[a.COLLECTION],description:"Combines multiple pipelines using reciprocal rank fusion to create hybrid search results.",comment:'/**\n * input.pipelines: Required. Map from name to input pipeline. Each pipeline must be a Ranked Selection Pipeline operating on the same collection. Minimum of one pipeline.\n * combination.weights: Optional. Map from pipeline name to numbers (non-negative). If unspecified, default weight is 1 for each pipeline.\n * scoreDetails: Optional. Default false. Set to true to include detailed scoring information in {$meta: "scoreDetails"} for debugging and tuning.\n */\n',snippet:"{\n input: {\n pipelines: {\n ${1:searchPipeline}: [\n {$search: {${2:searchStage}}},\n {$limit: ${3:limit}}\n ],\n ${4:vectorPipeline}: [\n {$vectorSearch: {${5:vectorSearchStage}}}\n ]\n }\n },\n combination: {\n weights: {\n ${6:searchPipeline}: ${7:number},\n ${8:vectorPipeline}: ${9:number}\n }\n },\n scoreDetails: ${10:false}\n}"},{name:"$redact",value:"$redact",label:"$redact",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"2.6.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Restricts the content for each document based on information stored in the documents themselves",comment:"/**\n * expression: Any valid expression that\n * evaluates to $$DESCEND, $$PRUNE, or $$KEEP.\n */\n",snippet:"{\n ${1:expression}\n}"},{name:"$replaceRoot",value:"$replaceRoot",label:"$replaceRoot",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"3.4.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Replaces a document with the specified embedded document.",comment:"/**\n * replacementDocument: A document or string.\n */\n",snippet:"{\n newRoot: ${1:replacementDocument}\n}"},{name:"$replaceWith",value:"$replaceWith",label:"$replaceWith",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"4.2.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Replaces a document with the specified embedded document.",comment:"/**\n * replacementDocument: A document or string.\n */\n",snippet:"{\n newWith: ${1:replacementDocument}\n}"},{name:"$sample",value:"$sample",label:"$sample",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"3.2.0",apiVersions:[1],namespaces:[...a.ANY_COLLECTION_NAMESPACE],description:"Randomly selects the specified number of documents from its input.",comment:"/**\n * size: The number of documents to sample.\n */\n",snippet:"{\n size: ${1:number}\n}"},{name:"$scoreFusion",value:"$scoreFusion",label:"$scoreFusion",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS],meta:"stage",version:"8.2.0",apiVersions:[],namespaces:[a.COLLECTION],description:"Combines multiple pipelines using relative score fusion to create hybrid search results.",comment:"/**\n * input.pipelines: Required. Map from name to input pipeline. Each pipeline must be operating on the same collection. Minimum of one pipeline.\n * input.normalization: Required. Normalizes the score to the range 0 to 1 before combining the results. Value can be none, sigmoid or minMaxScaler.\n * combination.weights: Optional. Map from pipeline name to numbers (non-negative). If unspecified, default weight is 1 for each pipeline.\n * combination.method: Optional. Specifies method for combining scores. Value can be avg or expression. Default is avg.\n * combination.expression: Optional. This is the custom expression that is used when combination.method is set to expression.\n * scoreDetails: Optional. Default false. Set to true to include detailed scoring information.\n */\n",snippet:"{\n input: {\n pipelines: {\n ${1:searchPipeline}: [\n {$search: {${2:searchStage}}},\n {$limit: ${3:limit}}\n ],\n ${4:vectorPipeline}: [\n {$vectorSearch: {${5:vectorSearchStage}}}\n ]\n },\n normalization: '${6:none|sigmoid|minMaxScaler}'\n },\n combination: {\n weights: {\n ${7:searchPipeline}: ${8:number},\n ${9:vectorPipeline}: ${10:number}\n },\n method: '${11:avg|expression}',\n expression: '${12:expression}'\n },\n scoreDetails: ${13:false}\n}"},{name:"$search",value:"$search",label:"$search",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS],meta:"stage",version:"4.1.11",apiVersions:[],namespaces:[a.COLLECTION,a.VIEW],description:"Performs a full-text search on the specified field(s).",comment:"/**\n * index: The name of the Search index.\n * text: Analyzed search, with required fields of query and path, the analyzed field(s) to search. Use matchCriteria to match 'any' or 'all' query terms.\n * compound: Combines ops.\n * span: Find in text field regions.\n * exists: Test for presence of a field.\n * near: Find near number or date.\n * range: Find in numeric or date range.\n */\n",snippet:"{\n index: '${1:string}',\n text: {\n query: '${2:string}',\n path: '${3:string}',\n matchCriteria: '${4:any}',\n }\n}"},{name:"$searchMeta",value:"$searchMeta",label:"$searchMeta",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS],meta:"stage",version:"4.4.9",apiVersions:[],namespaces:[a.COLLECTION,a.VIEW],description:"Performs a full-text search on the specified field(s) and gets back only the generated search meta data from a query.",comment:"/**\n * index: The name of the Search index.\n * count: The count of the results.\n * facet: {\n * operator: Analyzed search, with required fields of query and path, can either be replaced with the name of a valid operator.\n * facets: {\n * stringFacet: Narrows search results based on unique string values, with required fields of type and path.\n * numberFacet: Narrows search results by breaking them up into separate ranges of numbers, with required fields of type, path, and boundaries.\n * dateFacet: Narrows search results by breaking them up into separate ranges of dates, with required fields of type, path, and boundaries.\n * }\n * }\n */\n",snippet:"{\n index: ${1:string},\n facet: {\n operator: {\n text: {\n query: ${2:string},\n path: ${3:string}\n }\n },\n facets: {\n ${4:stringFacet}: {\n type: ${5:string},\n path: ${6:string},\n numBuckets: ${7:integer}\n },\n numberFacet: {\n type: 'number',\n path: ${8:string},\n boundaries: [${9:lowerbound}, ${10:upperbound}, ...],\n default: ${11:string}\n }\n }\n }\n}"},{name:"$set",value:"$set",label:"$set",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"4.2.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Adds new fields to documents. $set outputs documents that contain all existing fields from the input documents and newly added fields.",comment:"/**\n * field: The field name\n * expression: The expression.\n */\n",snippet:"{\n ${1:field}: ${2:expression}\n}"},{name:"$setWindowFields",value:"$setWindowFields",label:"$setWindowFields",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"5.0.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Capable of partitioning incoming data, and can apply one or more functions to defined windows within each partition.",comment:"/**\n * partitionBy: partitioning of data.\n * sortBy: fields to sort by.\n * output: {\n * path: {\n * function: The window function to compute over the given window.\n * window: {\n * documents: A number of documents before and after the current document.\n * range: A range of possible values around the value in the current document's sortBy field.\n * unit: Specifies the units for the window bounds.\n * }\n * }\n * }\n */\n",snippet:"{\n partitionBy: ${1:expression},\n sortBy: ${2:sortSpec},\n output: {\n ${3:path}: {\n ${4:function}: ${5:functionArgs},\n window: {\n documents: [${6:lowerbound}, ${7:upperbound}],\n range: [${8:lowerbound}, ${9:upperbound}],\n unit: ${10:string}\n }\n },\n ${11:path2}: ...\n }\n}"},{name:"$skip",value:"$skip",label:"$skip",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"2.2.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Skips a specified number of documents before advancing to the next stage.",comment:"/**\n * Provide the number of documents to skip.\n */\n",snippet:"${1:number}"},{name:"$sort",value:"$sort",label:"$sort",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"2.2.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Reorders the document stream by a specified sort key and direction.",comment:"/**\n * Provide any number of field/order pairs.\n */\n",snippet:"{\n ${1:field1}: ${2:sortOrder}\n}"},{name:"$sortByCount",value:"$sortByCount",label:"$sortByCount",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"3.4.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Groups incoming documents based on the value of a specified expression, then computes the count of documents in each distinct group.",comment:"/**\n * expression: Grouping expression or string.\n */\n",snippet:"{\n ${1:expression}\n}"},{name:"$unionWith",value:"$unionWith",label:"$unionWith",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"4.4.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Perform a union with a pipeline on another collection.",comment:"/**\n * coll: The collection name.\n * pipeline: The pipeline on the other collection.\n */\n",snippet:"{\n coll: '${1:coll}',\n pipeline: [${2:pipeline}]\n}"},{name:"$unset",value:"$unset",label:"$unset",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"4.2.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Excludes fields from the result document.",comment:"/**\n * Provide the field name to exclude.\n * To exclude multiple fields, pass the field names in an array.\n */\n",snippet:"'${1:string}'"},{name:"$unwind",value:"$unwind",label:"$unwind",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"2.2.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Outputs a new document for each element in a specified array. ",comment:"/**\n * path: Path to the array field.\n * includeArrayIndex: Optional name for index.\n * preserveNullAndEmptyArrays: Optional\n * toggle to unwind null and empty values.\n */\n",snippet:"{\n path: ${1:path},\n includeArrayIndex: '${2:string}',\n preserveNullAndEmptyArrays: ${3:boolean}\n}"},{name:"$vectorSearch",value:"$vectorSearch",label:"$vectorSearch",outputStage:!1,fullScan:!1,firstStage:!0,score:1,env:[r.ATLAS],meta:"stage",version:">=6.0.10 <7.0.0 || >=7.0.2",apiVersions:[],namespaces:[a.COLLECTION,a.VIEW],description:"Performs a kNN search on embeddings in the specified field(s)",comment:"/**\n * queryVector: Array of numbers of BSON types `int` or `double` that represent the query vector. The array size must match the number of vector dimensions specified in the index for the field. (Required)\n * path: The field to search. (Required)\n * numCandidates: Number of nearest neighbors to use during the search. You can specify a number higher than the number of documents to return (`limit`) to increase accuracy. (Required)\n * index: Name of the Atlas Search index to use. (Required)\n * limit: Number (of type `int` only) of documents to return in the results. (Required)\n * filter: Any MongoDB Query Language (MQL) match expression that compares an indexed field with a boolean, number (not decimals), or string to use as a prefilter. (Optional)\n * exact: Choose between false for ANN (Approximate Nearest Neighbor) and true for ENN (Exact Nearest Neighbor). Defaults to false. (Optional)\n */\n",snippet:"{\n queryVector: [${1:dimension1}, ${2:dimension2}, ...],\n path: ${3:string},\n numCandidates: ${4:numCandidates},\n index: ${5:string},\n limit: ${6:limit},\n filter: {${7:expression}},\n exact: ${8:boolean}\n}"}];t.STAGE_OPERATORS=s;const i=s.map((e=>e.name));t.STAGE_OPERATOR_NAMES=i;const o=s.filter((e=>e.outputStage));t.OUT_STAGES=o;const l=s.filter((e=>e.fullScan));t.FULL_SCAN_STAGES=l;const c=s.filter((e=>e.firstStage));t.REQUIRED_AS_FIRST_STAGE=c},86912:(e,t,n)=>{const r=n(41694);e.exports=(e,t)=>new r(e,t).major},86987:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SYSTEM_VARIABLES=void 0,t.SYSTEM_VARIABLES=[{name:"$$NOW",value:"$$NOW",score:1,meta:"variable:system",version:"4.2.0",description:"A variable that returns the current datetime value. NOW returns the same value for all members of the deployment and remains the same throughout all stages of the aggregation pipeline."},{name:"$$CLUSTER_TIME",value:"$$CLUSTER_TIME",score:1,meta:"variable:system",version:"4.2.0",description:"A variable that returns the current timestamp value. CLUSTER_TIME is only available on replica sets and sharded clusters. CLUSTER_TIME returns the same value for all members of the deployment and remains the same throughout all stages of the pipeline."},{name:"$$ROOT",value:"$$ROOT",score:1,meta:"variable:system",version:"2.4.0",description:"References the root document, i.e. the top-level document, currently being processed in the aggregation pipeline stage."},{name:"$$CURRENT",value:"$$CURRENT",score:1,meta:"variable:system",version:"2.4.0",description:"References the start of the field path being processed in the aggregation pipeline stage. Unless documented otherwise, all stages start with CURRENT the same as ROOT. CURRENT is modifiable. However, since `$<field>` is equivalent to `$$CURRENT.<field>`, rebinding CURRENT changes the meaning of `$` accesses."},{name:"$$REMOVE",value:"$$REMOVE",score:1,meta:"variable:system",version:"3.6.0",description:"A variable which evaluates to the missing value. Allows for the conditional exclusion of fields. In a `$project`, a field set to the variable REMOVE is excluded from the output."},{name:"$$DESCEND",value:"$$DESCEND",score:1,meta:"variable:system",version:"3.0.0",description:"One of the allowed results of a `$redact` expression."},{name:"$$PRUNE",value:"$$PRUNE",score:1,meta:"variable:system",version:"3.0.0",description:"One of the allowed results of a `$redact` expression."},{name:"$$KEEP",value:"$$KEEP",score:1,meta:"variable:system",version:"3.0.0",description:"One of the allowed results of a `$redact` expression."},{name:"$$SEARCH_META",value:"$$SEARCH_META",score:1,meta:"variable:system",version:"5.0.0",description:"A variable that stores the metadata results of an Atlas Search query. In all supported aggregation pipeline stages, a field set to the variable SEARCH_META returns the metadata results for the query. For an example of its usage, see Atlas Search facet and count."},{name:"$$USER_ROLES",value:"$$USER_ROLES",score:1,meta:"variable:system",version:"7.0.0",description:"A variable that stores the role names of the authenticated user running the command."}]},87155:(e,t,n)=>{n.d(t,{r:()=>Fe});var r=n(12240),a=n(42396);Symbol("Let zodToJsonSchema decide on which parser to use"),new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");var s=n(65994).e;function i(...e){return e.reduce(((e,t)=>({...e,...null!=t?t:{}})),{})}function o(e){return Object.fromEntries([...e.headers])}var l=(({prefix:e,size:t=16,alphabet:n="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",separator:a="-"}={})=>{const s=()=>{const e=n.length,r=new Array(t);for(let a=0;a<t;a++)r[a]=n[Math.random()*e|0];return r.join("")};if(null==e)return s;if(n.includes(a))throw new r.Di({argument:"separator",message:`The separator "${a}" must not be part of the alphabet "${n}".`});return()=>`${e}${a}${s()}`})();function c(e){return(e instanceof Error||e instanceof DOMException)&&("AbortError"===e.name||"ResponseAborted"===e.name||"TimeoutError"===e.name)}var u=["fetch failed","failed to fetch"];function p({apiKey:e,environmentVariableName:t,apiKeyParameterName:n="apiKey",description:a}){if("string"==typeof e)return e;if(null!=e)throw new r.Kq({message:`${a} API key must be a string.`});if(void 0===s)throw new r.Kq({message:`${a} API key is missing. Pass it using the '${n}' parameter. Environment variables is not supported in this environment.`});if(null==(e=s.env[t]))throw new r.Kq({message:`${a} API key is missing. Pass it using the '${n}' parameter or the ${t} environment variable.`});if("string"!=typeof e)throw new r.Kq({message:`${a} API key must be a string. The value of the ${t} environment variable is not a string.`});return e}var d=/"__proto__"\s*:/,m=/"constructor"\s*:/;function h(e){const{stackTraceLimit:t}=Error;Error.stackTraceLimit=0;try{return function(e){const t=JSON.parse(e);return null===t||"object"!=typeof t||!1===d.test(e)&&!1===m.test(e)?t:function(e){let t=[e];for(;t.length;){const e=t;t=[];for(const n of e){if(Object.prototype.hasOwnProperty.call(n,"__proto__"))throw new SyntaxError("Object contains forbidden prototype property");if(Object.prototype.hasOwnProperty.call(n,"constructor")&&Object.prototype.hasOwnProperty.call(n.constructor,"prototype"))throw new SyntaxError("Object contains forbidden prototype property");for(const e in n){const r=n[e];r&&"object"==typeof r&&t.push(r)}}}return e}(t)}(e)}finally{Error.stackTraceLimit=t}}var f=Symbol.for("vercel.ai.validator");async function v({value:e,schema:t}){const n=function(e){return function(e){return"object"==typeof e&&null!==e&&f in e&&!0===e[f]&&"validate"in e}(e)?e:(t=e,n=async e=>{const n=await t["~standard"].validate(e);return null==n.issues?{success:!0,value:n.value}:{success:!1,error:new r.iM({value:e,cause:n.issues})}},{[f]:!0,validate:n});var t,n}(t);try{if(null==n.validate)return{success:!0,value:e,rawValue:e};const t=await n.validate(e);return t.success?{success:!0,value:t.value,rawValue:e}:{success:!1,error:r.iM.wrap({value:e,cause:t.error}),rawValue:e}}catch(t){return{success:!1,error:r.iM.wrap({value:e,cause:t}),rawValue:e}}}async function g({text:e,schema:t}){try{const n=h(e);return null==t?{success:!0,value:n,rawValue:n}:await v({value:n,schema:t})}catch(t){return{success:!1,error:r.u6.isInstance(t)?t:new r.u6({text:e,cause:t}),rawValue:void 0}}}function y(e){try{return h(e),!0}catch(e){return!1}}function $({stream:e,schema:t}){return e.pipeThrough(new TextDecoderStream).pipeThrough(new a.Z).pipeThrough(new TransformStream({async transform({data:e},n){"[DONE]"!==e&&n.enqueue(await g({text:e,schema:t}))}}))}async function b({provider:e,providerOptions:t,schema:n}){if(null==(null==t?void 0:t[e]))return;const a=await v({value:t[e],schema:n});if(!a.success)throw new r.Di({argument:"providerOptions",message:`invalid ${e} provider options`,cause:a.error});return a.value}var E=()=>globalThis.fetch,S=async({url:e,headers:t,body:n,failedResponseHandler:r,successfulResponseHandler:a,abortSignal:s,fetch:i})=>A({url:e,headers:{"Content-Type":"application/json",...t},body:{content:JSON.stringify(n),values:n},failedResponseHandler:r,successfulResponseHandler:a,abortSignal:s,fetch:i}),A=async({url:e,headers:t={},body:n,successfulResponseHandler:a,failedResponseHandler:s,abortSignal:i,fetch:l=E()})=>{try{const u=await l(e,{method:"POST",headers:(p=t,Object.fromEntries(Object.entries(p).filter((([e,t])=>null!=t)))),body:n.content,signal:i}),d=o(u);if(!u.ok){let t;try{t=await s({response:u,url:e,requestBodyValues:n.values})}catch(t){if(c(t)||r.hL.isInstance(t))throw t;throw new r.hL({message:"Failed to process error response",cause:t,statusCode:u.status,url:e,responseHeaders:d,requestBodyValues:n.values})}throw t.value}try{return await a({response:u,url:e,requestBodyValues:n.values})}catch(t){if(t instanceof Error&&(c(t)||r.hL.isInstance(t)))throw t;throw new r.hL({message:"Failed to process successful response",cause:t,statusCode:u.status,url:e,responseHeaders:d,requestBodyValues:n.values})}}catch(t){throw function({error:e,url:t,requestBodyValues:n}){if(c(e))return e;if(e instanceof TypeError&&u.includes(e.message.toLowerCase())){const a=e.cause;if(null!=a)return new r.hL({message:`Cannot connect to API: ${a.message}`,cause:a,url:t,requestBodyValues:n,isRetryable:!0})}return e}({error:t,url:e,requestBodyValues:n.values})}var p};function _({id:e,name:t,inputSchema:n}){return({execute:r,outputSchema:a,toModelOutput:s,onInputStart:i,onInputDelta:o,onInputAvailable:l,...c})=>({type:"provider-defined",id:e,name:t,args:c,inputSchema:n,outputSchema:a,execute:r,toModelOutput:s,onInputStart:i,onInputDelta:o,onInputAvailable:l})}var x=e=>async({response:t})=>{const n=o(t);if(null==t.body)throw new r.Tt({});return{responseHeaders:n,value:$({stream:t.body,schema:e})}},w=e=>async({response:t,url:n,requestBodyValues:a})=>{const s=await t.text(),i=await g({text:s,schema:e}),l=o(t);if(!i.success)throw new r.hL({message:"Invalid JSON response",cause:i.error,statusCode:t.status,responseHeaders:l,responseBody:s,url:n,requestBodyValues:a});return{responseHeaders:l,value:i.value,rawValue:i.rawValue}};Symbol.for("vercel.ai.schema");var{btoa:O,atob:N}=globalThis;function I(e){const t=e.replace(/-/g,"+").replace(/_/g,"/"),n=N(t);return Uint8Array.from(n,(e=>e.codePointAt(0)))}function T(e){return e instanceof Uint8Array?function(e){let t="";for(let n=0;n<e.length;n++)t+=String.fromCodePoint(e[n]);return O(t)}(e):e}var R=n(94893),C=n(1280),k=n(9606).URL,L=R.Ik({error:R.Ik({message:R.Yj(),type:R.Yj().nullish(),param:R.bz().nullish(),code:R.KC([R.Yj(),R.ai()]).nullish()})}),P=(({errorSchema:e,errorToMessage:t,isRetryable:n})=>async({response:a,url:s,requestBodyValues:i})=>{const l=await a.text(),c=o(a);if(""===l.trim())return{responseHeaders:c,value:new r.hL({message:a.statusText,url:s,requestBodyValues:i,statusCode:a.status,responseHeaders:c,responseBody:l,isRetryable:null==n?void 0:n(a)})};try{const o=await async function({text:e,schema:t}){try{const n=h(e);return null==t?n:async function({value:e,schema:t}){const n=await v({value:e,schema:t});if(!n.success)throw r.iM.wrap({value:e,cause:n.error});return n.value}({value:n,schema:t})}catch(t){if(r.u6.isInstance(t)||r.iM.isInstance(t))throw t;throw new r.u6({text:e,cause:t})}}({text:l,schema:e});return{responseHeaders:c,value:new r.hL({message:t(o),url:s,requestBodyValues:i,statusCode:a.status,responseHeaders:c,responseBody:l,data:o,isRetryable:null==n?void 0:n(a,o)})}}catch(e){return{responseHeaders:c,value:new r.hL({message:a.statusText,url:s,requestBodyValues:i,statusCode:a.status,responseHeaders:c,responseBody:l,isRetryable:null==n?void 0:n(a)})}}})({errorSchema:L,errorToMessage:e=>e.error.message});function M({id:e,model:t,created:n}){return{id:null!=e?e:void 0,modelId:null!=t?t:void 0,timestamp:null!=n?new Date(1e3*n):void 0}}function j(e){switch(e){case"stop":return"stop";case"length":return"length";case"content_filter":return"content-filter";case"function_call":case"tool_calls":return"tool-calls";default:return"unknown"}}var D=R.Ik({logitBias:R.g1(C.qG(R.rS,undefined),R.ai()).optional(),logprobs:R.KC([R.zM(),R.ai()]).optional(),parallelToolCalls:R.zM().optional(),user:R.Yj().optional(),reasoningEffort:R.k5(["minimal","low","medium","high"]).optional(),maxCompletionTokens:R.ai().optional(),store:R.zM().optional(),metadata:R.g1(R.Yj().max(64),R.Yj().max(512)).optional(),prediction:R.g1(R.Yj(),R.bz()).optional(),structuredOutputs:R.zM().optional(),serviceTier:R.k5(["auto","flex","priority"]).optional(),strictJsonSchema:R.zM().optional(),textVerbosity:R.k5(["low","medium","high"]).optional()}),F=R.Ik({key:R.Yj(),type:R.k5(["eq","ne","gt","gte","lt","lte"]),value:R.KC([R.Yj(),R.ai(),R.zM()])}),V=R.Ik({type:R.k5(["and","or"]),filters:R.YO(R.KC([F,R.RZ((()=>V))]))}),q=R.KC([F,V]),B=R.Ik({vectorStoreIds:R.YO(R.Yj()).optional(),maxNumResults:R.ai().optional(),ranking:R.Ik({ranker:R.k5(["auto","default-2024-08-21"]).optional()}).optional(),filters:q.optional()}),U=_({id:"openai.file_search",name:"file_search",inputSchema:R.Ik({query:R.Yj()})}),Y=R.Ik({searchContextSize:R.k5(["low","medium","high"]).optional(),userLocation:R.Ik({type:R.eu("approximate"),country:R.Yj().optional(),city:R.Yj().optional(),region:R.Yj().optional(),timezone:R.Yj().optional()}).optional()}),z=_({id:"openai.web_search_preview",name:"web_search_preview",inputSchema:R.Ik({})}),Z=class{constructor(e,t){this.specificationVersion="v2",this.supportedUrls={"image/*":[/^https?:\/\/.*$/]},this.modelId=e,this.config=t}get provider(){return this.config.provider}async getArgs({prompt:e,maxOutputTokens:t,temperature:n,topP:a,topK:s,frequencyPenalty:i,presencePenalty:o,stopSequences:l,responseFormat:c,seed:u,tools:p,toolChoice:d,providerOptions:m}){var h,f,v,g;const y=[],$=null!=(h=await b({provider:"openai",providerOptions:m,schema:D}))?h:{},E=null==(f=$.structuredOutputs)||f;null!=s&&y.push({type:"unsupported-setting",setting:"topK"}),"json"!==(null==c?void 0:c.type)||null==c.schema||E||y.push({type:"unsupported-setting",setting:"responseFormat",details:"JSON response format schema is only supported with structuredOutputs"});const{messages:S,warnings:A}=function({prompt:e,systemMessageMode:t="system"}){const n=[],a=[];for(const{role:s,content:i}of e)switch(s){case"system":switch(t){case"system":n.push({role:"system",content:i});break;case"developer":n.push({role:"developer",content:i});break;case"remove":a.push({type:"other",message:"system messages are removed for this model"});break;default:throw new Error(`Unsupported system message mode: ${t}`)}break;case"user":if(1===i.length&&"text"===i[0].type){n.push({role:"user",content:i[0].text});break}n.push({role:"user",content:i.map(((e,t)=>{var n,a,s;switch(e.type){case"text":return{type:"text",text:e.text};case"file":if(e.mediaType.startsWith("image/")){const t="image/*"===e.mediaType?"image/jpeg":e.mediaType;return{type:"image_url",image_url:{url:e.data instanceof k?e.data.toString():`data:${t};base64,${T(e.data)}`,detail:null==(a=null==(n=e.providerOptions)?void 0:n.openai)?void 0:a.imageDetail}}}if(!e.mediaType.startsWith("audio/")){if("application/pdf"===e.mediaType){if(e.data instanceof k)throw new r.b8({functionality:"PDF file parts with URLs"});return{type:"file",file:"string"==typeof e.data&&e.data.startsWith("file-")?{file_id:e.data}:{filename:null!=(s=e.filename)?s:`part-${t}.pdf`,file_data:`data:application/pdf;base64,${T(e.data)}`}}}throw new r.b8({functionality:`file part media type ${e.mediaType}`})}if(e.data instanceof k)throw new r.b8({functionality:"audio file parts with URLs"});switch(e.mediaType){case"audio/wav":return{type:"input_audio",input_audio:{data:T(e.data),format:"wav"}};case"audio/mp3":case"audio/mpeg":return{type:"input_audio",input_audio:{data:T(e.data),format:"mp3"}};default:throw new r.b8({functionality:`audio content parts with media type ${e.mediaType}`})}}}))});break;case"assistant":{let e="";const t=[];for(const n of i)switch(n.type){case"text":e+=n.text;break;case"tool-call":t.push({id:n.toolCallId,type:"function",function:{name:n.toolName,arguments:JSON.stringify(n.input)}})}n.push({role:"assistant",content:e,tool_calls:t.length>0?t:void 0});break}case"tool":for(const e of i){const t=e.output;let r;switch(t.type){case"text":case"error-text":r=t.value;break;case"content":case"json":case"error-json":r=JSON.stringify(t.value)}n.push({role:"tool",tool_call_id:e.toolCallId,content:r})}break;default:throw new Error(`Unsupported role: ${s}`)}return{messages:n,warnings:a}}({prompt:e,systemMessageMode:X(this.modelId)});y.push(...A);const _=null!=(v=$.strictJsonSchema)&&v,x={model:this.modelId,logit_bias:$.logitBias,logprobs:!0===$.logprobs||"number"==typeof $.logprobs||void 0,top_logprobs:"number"==typeof $.logprobs?$.logprobs:"boolean"==typeof $.logprobs&&$.logprobs?0:void 0,user:$.user,parallel_tool_calls:$.parallelToolCalls,max_tokens:t,temperature:n,top_p:a,frequency_penalty:i,presence_penalty:o,response_format:"json"===(null==c?void 0:c.type)?E&&null!=c.schema?{type:"json_schema",json_schema:{schema:c.schema,strict:_,name:null!=(g=c.name)?g:"response",description:c.description}}:{type:"json_object"}:void 0,stop:l,seed:u,verbosity:$.textVerbosity,max_completion_tokens:$.maxCompletionTokens,store:$.store,metadata:$.metadata,prediction:$.prediction,reasoning_effort:$.reasoningEffort,service_tier:$.serviceTier,messages:S};var w;K(this.modelId)?(null!=x.temperature&&(x.temperature=void 0,y.push({type:"unsupported-setting",setting:"temperature",details:"temperature is not supported for reasoning models"})),null!=x.top_p&&(x.top_p=void 0,y.push({type:"unsupported-setting",setting:"topP",details:"topP is not supported for reasoning models"})),null!=x.frequency_penalty&&(x.frequency_penalty=void 0,y.push({type:"unsupported-setting",setting:"frequencyPenalty",details:"frequencyPenalty is not supported for reasoning models"})),null!=x.presence_penalty&&(x.presence_penalty=void 0,y.push({type:"unsupported-setting",setting:"presencePenalty",details:"presencePenalty is not supported for reasoning models"})),null!=x.logit_bias&&(x.logit_bias=void 0,y.push({type:"other",message:"logitBias is not supported for reasoning models"})),null!=x.logprobs&&(x.logprobs=void 0,y.push({type:"other",message:"logprobs is not supported for reasoning models"})),null!=x.top_logprobs&&(x.top_logprobs=void 0,y.push({type:"other",message:"topLogprobs is not supported for reasoning models"})),null!=x.max_tokens&&(null==x.max_completion_tokens&&(x.max_completion_tokens=x.max_tokens),x.max_tokens=void 0)):(this.modelId.startsWith("gpt-4o-search-preview")||this.modelId.startsWith("gpt-4o-mini-search-preview"))&&null!=x.temperature&&(x.temperature=void 0,y.push({type:"unsupported-setting",setting:"temperature",details:"temperature is not supported for the search preview models and has been removed."})),"flex"!==$.serviceTier||(w=this.modelId).startsWith("o3")||w.startsWith("o4-mini")||w.startsWith("gpt-5")||(y.push({type:"unsupported-setting",setting:"serviceTier",details:"flex processing is only available for o3, o4-mini, and gpt-5 models"}),x.service_tier=void 0),"priority"!==$.serviceTier||function(e){return e.startsWith("gpt-4")||e.startsWith("gpt-5-mini")||e.startsWith("gpt-5")&&!e.startsWith("gpt-5-nano")||e.startsWith("o3")||e.startsWith("o4-mini")}(this.modelId)||(y.push({type:"unsupported-setting",setting:"serviceTier",details:"priority processing is only available for supported models (gpt-4, gpt-5, gpt-5-mini, o3, o4-mini) and requires Enterprise access. gpt-5-nano is not supported"}),x.service_tier=void 0);const{tools:O,toolChoice:N,toolWarnings:I}=function({tools:e,toolChoice:t,structuredOutputs:n,strictJsonSchema:a}){const s=[];if(null==(e=(null==e?void 0:e.length)?e:void 0))return{tools:void 0,toolChoice:void 0,toolWarnings:s};const i=[];for(const t of e)switch(t.type){case"function":i.push({type:"function",function:{name:t.name,description:t.description,parameters:t.inputSchema,strict:n?a:void 0}});break;case"provider-defined":switch(t.id){case"openai.file_search":{const e=B.parse(t.args);i.push({type:"file_search",vector_store_ids:e.vectorStoreIds,max_num_results:e.maxNumResults,ranking_options:e.ranking?{ranker:e.ranking.ranker}:void 0,filters:e.filters});break}case"openai.web_search_preview":{const e=Y.parse(t.args);i.push({type:"web_search_preview",search_context_size:e.searchContextSize,user_location:e.userLocation});break}default:s.push({type:"unsupported-tool",tool:t})}break;default:s.push({type:"unsupported-tool",tool:t})}if(null==t)return{tools:i,toolChoice:void 0,toolWarnings:s};const o=t.type;switch(o){case"auto":case"none":case"required":return{tools:i,toolChoice:o,toolWarnings:s};case"tool":return{tools:i,toolChoice:{type:"function",function:{name:t.toolName}},toolWarnings:s};default:{const e=o;throw new r.b8({functionality:`tool choice type: ${e}`})}}}({tools:p,toolChoice:d,structuredOutputs:E,strictJsonSchema:_});return{args:{...x,tools:O,tool_choice:N},warnings:[...y,...I]}}async doGenerate(e){var t,n,r,a,s,o,c,u,p,d,m,h,f,v;const{args:g,warnings:y}=await this.getArgs(e),{responseHeaders:$,value:b,rawValue:E}=await S({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:i(this.config.headers(),e.headers),body:g,failedResponseHandler:P,successfulResponseHandler:w(W),abortSignal:e.abortSignal,fetch:this.config.fetch}),A=b.choices[0],_=[],x=A.message.content;null!=x&&x.length>0&&_.push({type:"text",text:x});for(const e of null!=(t=A.message.tool_calls)?t:[])_.push({type:"tool-call",toolCallId:null!=(n=e.id)?n:l(),toolName:e.function.name,input:e.function.arguments});for(const e of null!=(r=A.message.annotations)?r:[])_.push({type:"source",sourceType:"url",id:l(),url:e.url,title:e.title});const O=null==(a=b.usage)?void 0:a.completion_tokens_details,N=null==(s=b.usage)?void 0:s.prompt_tokens_details,I={openai:{}};return null!=(null==O?void 0:O.accepted_prediction_tokens)&&(I.openai.acceptedPredictionTokens=null==O?void 0:O.accepted_prediction_tokens),null!=(null==O?void 0:O.rejected_prediction_tokens)&&(I.openai.rejectedPredictionTokens=null==O?void 0:O.rejected_prediction_tokens),null!=(null==(o=A.logprobs)?void 0:o.content)&&(I.openai.logprobs=A.logprobs.content),{content:_,finishReason:j(A.finish_reason),usage:{inputTokens:null!=(u=null==(c=b.usage)?void 0:c.prompt_tokens)?u:void 0,outputTokens:null!=(d=null==(p=b.usage)?void 0:p.completion_tokens)?d:void 0,totalTokens:null!=(h=null==(m=b.usage)?void 0:m.total_tokens)?h:void 0,reasoningTokens:null!=(f=null==O?void 0:O.reasoning_tokens)?f:void 0,cachedInputTokens:null!=(v=null==N?void 0:N.cached_tokens)?v:void 0},request:{body:g},response:{...M(b),headers:$,body:E},warnings:y,providerMetadata:I}}async doStream(e){const{args:t,warnings:n}=await this.getArgs(e),a={...t,stream:!0,stream_options:{include_usage:!0}},{responseHeaders:s,value:o}=await S({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:i(this.config.headers(),e.headers),body:a,failedResponseHandler:P,successfulResponseHandler:x(H),abortSignal:e.abortSignal,fetch:this.config.fetch}),c=[];let u="unknown";const p={inputTokens:void 0,outputTokens:void 0,totalTokens:void 0};let d=!0,m=!1;const h={openai:{}};return{stream:o.pipeThrough(new TransformStream({start(e){e.enqueue({type:"stream-start",warnings:n})},transform(t,n){var a,s,i,o,f,v,g,$,b,E,S,A,_,x,w,O,N,I,T,R,C,k,L,P;if(e.includeRawChunks&&n.enqueue({type:"raw",rawValue:t.rawValue}),!t.success)return u="error",void n.enqueue({type:"error",error:t.error});const D=t.value;if("error"in D)return u="error",void n.enqueue({type:"error",error:D.error});d&&(d=!1,n.enqueue({type:"response-metadata",...M(D)})),null!=D.usage&&(p.inputTokens=null!=(a=D.usage.prompt_tokens)?a:void 0,p.outputTokens=null!=(s=D.usage.completion_tokens)?s:void 0,p.totalTokens=null!=(i=D.usage.total_tokens)?i:void 0,p.reasoningTokens=null!=(f=null==(o=D.usage.completion_tokens_details)?void 0:o.reasoning_tokens)?f:void 0,p.cachedInputTokens=null!=(g=null==(v=D.usage.prompt_tokens_details)?void 0:v.cached_tokens)?g:void 0,null!=(null==($=D.usage.completion_tokens_details)?void 0:$.accepted_prediction_tokens)&&(h.openai.acceptedPredictionTokens=null==(b=D.usage.completion_tokens_details)?void 0:b.accepted_prediction_tokens),null!=(null==(E=D.usage.completion_tokens_details)?void 0:E.rejected_prediction_tokens)&&(h.openai.rejectedPredictionTokens=null==(S=D.usage.completion_tokens_details)?void 0:S.rejected_prediction_tokens));const F=D.choices[0];if(null!=(null==F?void 0:F.finish_reason)&&(u=j(F.finish_reason)),null!=(null==(A=null==F?void 0:F.logprobs)?void 0:A.content)&&(h.openai.logprobs=F.logprobs.content),null==(null==F?void 0:F.delta))return;const V=F.delta;if(null!=V.content&&(m||(n.enqueue({type:"text-start",id:"0"}),m=!0),n.enqueue({type:"text-delta",id:"0",delta:V.content})),null!=V.tool_calls)for(const e of V.tool_calls){const t=e.index;if(null==c[t]){if("function"!==e.type)throw new r.xn({data:e,message:"Expected 'function' type."});if(null==e.id)throw new r.xn({data:e,message:"Expected 'id' to be a string."});if(null==(null==(_=e.function)?void 0:_.name))throw new r.xn({data:e,message:"Expected 'function.name' to be a string."});n.enqueue({type:"tool-input-start",id:e.id,toolName:e.function.name}),c[t]={id:e.id,type:"function",function:{name:e.function.name,arguments:null!=(x=e.function.arguments)?x:""},hasFinished:!1};const a=c[t];null!=(null==(w=a.function)?void 0:w.name)&&null!=(null==(O=a.function)?void 0:O.arguments)&&(a.function.arguments.length>0&&n.enqueue({type:"tool-input-delta",id:a.id,delta:a.function.arguments}),y(a.function.arguments)&&(n.enqueue({type:"tool-input-end",id:a.id}),n.enqueue({type:"tool-call",toolCallId:null!=(N=a.id)?N:l(),toolName:a.function.name,input:a.function.arguments}),a.hasFinished=!0));continue}const a=c[t];a.hasFinished||(null!=(null==(I=e.function)?void 0:I.arguments)&&(a.function.arguments+=null!=(R=null==(T=e.function)?void 0:T.arguments)?R:""),n.enqueue({type:"tool-input-delta",id:a.id,delta:null!=(C=e.function.arguments)?C:""}),null!=(null==(k=a.function)?void 0:k.name)&&null!=(null==(L=a.function)?void 0:L.arguments)&&y(a.function.arguments)&&(n.enqueue({type:"tool-input-end",id:a.id}),n.enqueue({type:"tool-call",toolCallId:null!=(P=a.id)?P:l(),toolName:a.function.name,input:a.function.arguments}),a.hasFinished=!0))}if(null!=V.annotations)for(const e of V.annotations)n.enqueue({type:"source",sourceType:"url",id:l(),url:e.url,title:e.title})},flush(e){m&&e.enqueue({type:"text-end",id:"0"}),e.enqueue({type:"finish",finishReason:u,usage:p,...null!=h?{providerMetadata:h}:{}})}})),request:{body:a},response:{headers:s}}}},G=R.Ik({prompt_tokens:R.ai().nullish(),completion_tokens:R.ai().nullish(),total_tokens:R.ai().nullish(),prompt_tokens_details:R.Ik({cached_tokens:R.ai().nullish()}).nullish(),completion_tokens_details:R.Ik({reasoning_tokens:R.ai().nullish(),accepted_prediction_tokens:R.ai().nullish(),rejected_prediction_tokens:R.ai().nullish()}).nullish()}).nullish(),W=R.Ik({id:R.Yj().nullish(),created:R.ai().nullish(),model:R.Yj().nullish(),choices:R.YO(R.Ik({message:R.Ik({role:R.eu("assistant").nullish(),content:R.Yj().nullish(),tool_calls:R.YO(R.Ik({id:R.Yj().nullish(),type:R.eu("function"),function:R.Ik({name:R.Yj(),arguments:R.Yj()})})).nullish(),annotations:R.YO(R.Ik({type:R.eu("url_citation"),start_index:R.ai(),end_index:R.ai(),url:R.Yj(),title:R.Yj()})).nullish()}),index:R.ai(),logprobs:R.Ik({content:R.YO(R.Ik({token:R.Yj(),logprob:R.ai(),top_logprobs:R.YO(R.Ik({token:R.Yj(),logprob:R.ai()}))})).nullish()}).nullish(),finish_reason:R.Yj().nullish()})),usage:G}),H=R.KC([R.Ik({id:R.Yj().nullish(),created:R.ai().nullish(),model:R.Yj().nullish(),choices:R.YO(R.Ik({delta:R.Ik({role:R.k5(["assistant"]).nullish(),content:R.Yj().nullish(),tool_calls:R.YO(R.Ik({index:R.ai(),id:R.Yj().nullish(),type:R.eu("function").nullish(),function:R.Ik({name:R.Yj().nullish(),arguments:R.Yj().nullish()})})).nullish(),annotations:R.YO(R.Ik({type:R.eu("url_citation"),start_index:R.ai(),end_index:R.ai(),url:R.Yj(),title:R.Yj()})).nullish()}).nullish(),logprobs:R.Ik({content:R.YO(R.Ik({token:R.Yj(),logprob:R.ai(),top_logprobs:R.YO(R.Ik({token:R.Yj(),logprob:R.ai()}))})).nullish()}).nullish(),finish_reason:R.Yj().nullish(),index:R.ai()})),usage:G}),L]);function K(e){return e.startsWith("o")||e.startsWith("gpt-5")}function X(e){var t,n;return K(e)?null!=(n=null==(t=J[e])?void 0:t.systemMessageMode)?n:"developer":"system"}var J={"o1-mini":{systemMessageMode:"remove"},"o1-mini-2024-09-12":{systemMessageMode:"remove"},"o1-preview":{systemMessageMode:"remove"},"o1-preview-2024-09-12":{systemMessageMode:"remove"},o3:{systemMessageMode:"developer"},"o3-2025-04-16":{systemMessageMode:"developer"},"o3-mini":{systemMessageMode:"developer"},"o3-mini-2025-01-31":{systemMessageMode:"developer"},"o4-mini":{systemMessageMode:"developer"},"o4-mini-2025-04-16":{systemMessageMode:"developer"}};function Q({id:e,model:t,created:n}){return{id:null!=e?e:void 0,modelId:null!=t?t:void 0,timestamp:null!=n?new Date(1e3*n):void 0}}function ee(e){switch(e){case"stop":return"stop";case"length":return"length";case"content_filter":return"content-filter";case"function_call":case"tool_calls":return"tool-calls";default:return"unknown"}}var te=R.Ik({echo:R.zM().optional(),logitBias:R.g1(R.Yj(),R.ai()).optional(),suffix:R.Yj().optional(),user:R.Yj().optional(),logprobs:R.KC([R.zM(),R.ai()]).optional()}),ne=class{constructor(e,t){this.specificationVersion="v2",this.supportedUrls={},this.modelId=e,this.config=t}get providerOptionsName(){return this.config.provider.split(".")[0].trim()}get provider(){return this.config.provider}async getArgs({prompt:e,maxOutputTokens:t,temperature:n,topP:a,topK:s,frequencyPenalty:i,presencePenalty:o,stopSequences:l,responseFormat:c,tools:u,toolChoice:p,seed:d,providerOptions:m}){const h=[],f={...await b({provider:"openai",providerOptions:m,schema:te}),...await b({provider:this.providerOptionsName,providerOptions:m,schema:te})};null!=s&&h.push({type:"unsupported-setting",setting:"topK"}),(null==u?void 0:u.length)&&h.push({type:"unsupported-setting",setting:"tools"}),null!=p&&h.push({type:"unsupported-setting",setting:"toolChoice"}),null!=c&&"text"!==c.type&&h.push({type:"unsupported-setting",setting:"responseFormat",details:"JSON response format is not supported."});const{prompt:v,stopSequences:g}=function({prompt:e,user:t="user",assistant:n="assistant"}){let a="";"system"===e[0].role&&(a+=`${e[0].content}\n\n`,e=e.slice(1));for(const{role:s,content:i}of e)switch(s){case"system":throw new r.M3({message:"Unexpected system message in prompt: ${content}",prompt:e});case"user":a+=`${t}:\n${i.map((e=>{if("text"===e.type)return e.text})).filter(Boolean).join("")}\n\n`;break;case"assistant":a+=`${n}:\n${i.map((e=>{switch(e.type){case"text":return e.text;case"tool-call":throw new r.b8({functionality:"tool-call messages"})}})).join("")}\n\n`;break;case"tool":throw new r.b8({functionality:"tool messages"});default:throw new Error(`Unsupported role: ${s}`)}return a+=`${n}:\n`,{prompt:a,stopSequences:[`\n${t}:`]}}({prompt:e}),y=[...null!=g?g:[],...null!=l?l:[]];return{args:{model:this.modelId,echo:f.echo,logit_bias:f.logitBias,logprobs:!0===(null==f?void 0:f.logprobs)?0:!1===(null==f?void 0:f.logprobs)||null==f?void 0:f.logprobs,suffix:f.suffix,user:f.user,max_tokens:t,temperature:n,top_p:a,frequency_penalty:i,presence_penalty:o,seed:d,prompt:v,stop:y.length>0?y:void 0},warnings:h}}async doGenerate(e){var t,n,r;const{args:a,warnings:s}=await this.getArgs(e),{responseHeaders:o,value:l,rawValue:c}=await S({url:this.config.url({path:"/completions",modelId:this.modelId}),headers:i(this.config.headers(),e.headers),body:a,failedResponseHandler:P,successfulResponseHandler:w(ae),abortSignal:e.abortSignal,fetch:this.config.fetch}),u=l.choices[0],p={openai:{}};return null!=u.logprobs&&(p.openai.logprobs=u.logprobs),{content:[{type:"text",text:u.text}],usage:{inputTokens:null==(t=l.usage)?void 0:t.prompt_tokens,outputTokens:null==(n=l.usage)?void 0:n.completion_tokens,totalTokens:null==(r=l.usage)?void 0:r.total_tokens},finishReason:ee(u.finish_reason),request:{body:a},response:{...Q(l),headers:o,body:c},providerMetadata:p,warnings:s}}async doStream(e){const{args:t,warnings:n}=await this.getArgs(e),r={...t,stream:!0,stream_options:{include_usage:!0}},{responseHeaders:a,value:s}=await S({url:this.config.url({path:"/completions",modelId:this.modelId}),headers:i(this.config.headers(),e.headers),body:r,failedResponseHandler:P,successfulResponseHandler:x(se),abortSignal:e.abortSignal,fetch:this.config.fetch});let o="unknown";const l={openai:{}},c={inputTokens:void 0,outputTokens:void 0,totalTokens:void 0};let u=!0;return{stream:s.pipeThrough(new TransformStream({start(e){e.enqueue({type:"stream-start",warnings:n})},transform(t,n){if(e.includeRawChunks&&n.enqueue({type:"raw",rawValue:t.rawValue}),!t.success)return o="error",void n.enqueue({type:"error",error:t.error});const r=t.value;if("error"in r)return o="error",void n.enqueue({type:"error",error:r.error});u&&(u=!1,n.enqueue({type:"response-metadata",...Q(r)}),n.enqueue({type:"text-start",id:"0"})),null!=r.usage&&(c.inputTokens=r.usage.prompt_tokens,c.outputTokens=r.usage.completion_tokens,c.totalTokens=r.usage.total_tokens);const a=r.choices[0];null!=(null==a?void 0:a.finish_reason)&&(o=ee(a.finish_reason)),null!=(null==a?void 0:a.logprobs)&&(l.openai.logprobs=a.logprobs),null!=(null==a?void 0:a.text)&&a.text.length>0&&n.enqueue({type:"text-delta",id:"0",delta:a.text})},flush(e){u||e.enqueue({type:"text-end",id:"0"}),e.enqueue({type:"finish",finishReason:o,providerMetadata:l,usage:c})}})),request:{body:r},response:{headers:a}}}},re=R.Ik({prompt_tokens:R.ai(),completion_tokens:R.ai(),total_tokens:R.ai()}),ae=R.Ik({id:R.Yj().nullish(),created:R.ai().nullish(),model:R.Yj().nullish(),choices:R.YO(R.Ik({text:R.Yj(),finish_reason:R.Yj(),logprobs:R.Ik({tokens:R.YO(R.Yj()),token_logprobs:R.YO(R.ai()),top_logprobs:R.YO(R.g1(R.Yj(),R.ai())).nullish()}).nullish()})),usage:re.nullish()}),se=R.KC([R.Ik({id:R.Yj().nullish(),created:R.ai().nullish(),model:R.Yj().nullish(),choices:R.YO(R.Ik({text:R.Yj(),finish_reason:R.Yj().nullish(),index:R.ai(),logprobs:R.Ik({tokens:R.YO(R.Yj()),token_logprobs:R.YO(R.ai()),top_logprobs:R.YO(R.g1(R.Yj(),R.ai())).nullish()}).nullish()})),usage:re.nullish()}),L]),ie=R.Ik({dimensions:R.ai().optional(),user:R.Yj().optional()}),oe=class{constructor(e,t){this.specificationVersion="v2",this.maxEmbeddingsPerCall=2048,this.supportsParallelCalls=!0,this.modelId=e,this.config=t}get provider(){return this.config.provider}async doEmbed({values:e,headers:t,abortSignal:n,providerOptions:a}){var s;if(e.length>this.maxEmbeddingsPerCall)throw new r.Ch({provider:this.provider,modelId:this.modelId,maxEmbeddingsPerCall:this.maxEmbeddingsPerCall,values:e});const o=null!=(s=await b({provider:"openai",providerOptions:a,schema:ie}))?s:{},{responseHeaders:l,value:c,rawValue:u}=await S({url:this.config.url({path:"/embeddings",modelId:this.modelId}),headers:i(this.config.headers(),t),body:{model:this.modelId,input:e,encoding_format:"float",dimensions:o.dimensions,user:o.user},failedResponseHandler:P,successfulResponseHandler:w(le),abortSignal:n,fetch:this.config.fetch});return{embeddings:c.data.map((e=>e.embedding)),usage:c.usage?{tokens:c.usage.prompt_tokens}:void 0,response:{headers:l,body:u}}}},le=R.Ik({data:R.YO(R.Ik({embedding:R.YO(R.ai())})),usage:R.Ik({prompt_tokens:R.ai()}).nullish()}),ce={"dall-e-3":1,"dall-e-2":10,"gpt-image-1":10},ue=new Set(["gpt-image-1"]),pe=class{constructor(e,t){this.modelId=e,this.config=t,this.specificationVersion="v2"}get maxImagesPerCall(){var e;return null!=(e=ce[this.modelId])?e:1}get provider(){return this.config.provider}async doGenerate({prompt:e,n:t,size:n,aspectRatio:r,seed:a,providerOptions:s,headers:o,abortSignal:l}){var c,u,p,d;const m=[];null!=r&&m.push({type:"unsupported-setting",setting:"aspectRatio",details:"This model does not support aspect ratio. Use `size` instead."}),null!=a&&m.push({type:"unsupported-setting",setting:"seed"});const h=null!=(p=null==(u=null==(c=this.config._internal)?void 0:c.currentDate)?void 0:u.call(c))?p:new Date,{value:f,responseHeaders:v}=await S({url:this.config.url({path:"/images/generations",modelId:this.modelId}),headers:i(this.config.headers(),o),body:{model:this.modelId,prompt:e,n:t,size:n,...null!=(d=s.openai)?d:{},...ue.has(this.modelId)?{}:{response_format:"b64_json"}},failedResponseHandler:P,successfulResponseHandler:w(de),abortSignal:l,fetch:this.config.fetch});return{images:f.data.map((e=>e.b64_json)),warnings:m,response:{timestamp:h,modelId:this.modelId,headers:v},providerMetadata:{openai:{images:f.data.map((e=>e.revised_prompt?{revisedPrompt:e.revised_prompt}:null))}}}}},de=R.Ik({data:R.YO(R.Ik({b64_json:R.Yj(),revised_prompt:R.Yj().optional()}))}),me=R.Ik({container:R.KC([R.Yj(),R.Ik({fileIds:R.YO(R.Yj()).optional()})]).optional()}),he={codeInterpreter:_({id:"openai.code_interpreter",name:"code_interpreter",inputSchema:R.Ik({})}),fileSearch:U,webSearchPreview:z},fe=R.Ik({itemId:R.Yj().nullish(),reasoningEncryptedContent:R.Yj().nullish()});function ve({finishReason:e,hasToolCalls:t}){switch(e){case void 0:case null:return t?"tool-calls":"stop";case"max_output_tokens":return"length";case"content_filter":return"content-filter";default:return t?"tool-calls":"unknown"}}var ge=class{constructor(e,t){this.specificationVersion="v2",this.supportedUrls={"image/*":[/^https?:\/\/.*$/]},this.modelId=e,this.config=t}get provider(){return this.config.provider}async getArgs({maxOutputTokens:e,temperature:t,stopSequences:n,topP:a,topK:s,presencePenalty:i,frequencyPenalty:o,seed:l,prompt:c,providerOptions:u,tools:p,toolChoice:d,responseFormat:m}){var h,f;const v=[],g=function(e){return e.startsWith("o")||e.startsWith("gpt-5")||e.startsWith("codex-")||e.startsWith("computer-use")?e.startsWith("o1-mini")||e.startsWith("o1-preview")?{isReasoningModel:!0,systemMessageMode:"remove",requiredAutoTruncation:!1}:{isReasoningModel:!0,systemMessageMode:"developer",requiredAutoTruncation:!1}:{isReasoningModel:!1,systemMessageMode:"system",requiredAutoTruncation:!1}}(this.modelId);null!=s&&v.push({type:"unsupported-setting",setting:"topK"}),null!=l&&v.push({type:"unsupported-setting",setting:"seed"}),null!=i&&v.push({type:"unsupported-setting",setting:"presencePenalty"}),null!=o&&v.push({type:"unsupported-setting",setting:"frequencyPenalty"}),null!=n&&v.push({type:"unsupported-setting",setting:"stopSequences"});const{messages:y,warnings:$}=await async function({prompt:e,systemMessageMode:t}){var n,a,s,i,o,l;const c=[],u=[];for(const{role:p,content:d}of e)switch(p){case"system":switch(t){case"system":c.push({role:"system",content:d});break;case"developer":c.push({role:"developer",content:d});break;case"remove":u.push({type:"other",message:"system messages are removed for this model"});break;default:throw new Error(`Unsupported system message mode: ${t}`)}break;case"user":c.push({role:"user",content:d.map(((e,t)=>{var n,a,s;switch(e.type){case"text":return{type:"input_text",text:e.text};case"file":if(e.mediaType.startsWith("image/")){const t="image/*"===e.mediaType?"image/jpeg":e.mediaType;return{type:"input_image",...e.data instanceof k?{image_url:e.data.toString()}:"string"==typeof e.data&&e.data.startsWith("file-")?{file_id:e.data}:{image_url:`data:${t};base64,${T(e.data)}`},detail:null==(a=null==(n=e.providerOptions)?void 0:n.openai)?void 0:a.imageDetail}}if("application/pdf"===e.mediaType){if(e.data instanceof k)throw new r.b8({functionality:"PDF file parts with URLs"});return{type:"input_file",..."string"==typeof e.data&&e.data.startsWith("file-")?{file_id:e.data}:{filename:null!=(s=e.filename)?s:`part-${t}.pdf`,file_data:`data:application/pdf;base64,${T(e.data)}`}}}throw new r.b8({functionality:`file part media type ${e.mediaType}`})}}))});break;case"assistant":{const e={};for(const t of d)switch(t.type){case"text":c.push({role:"assistant",content:[{type:"output_text",text:t.text}],id:null!=(s=null==(a=null==(n=t.providerOptions)?void 0:n.openai)?void 0:a.itemId)?s:void 0});break;case"tool-call":if(t.providerExecuted)break;c.push({type:"function_call",call_id:t.toolCallId,name:t.toolName,arguments:JSON.stringify(t.input),id:null!=(l=null==(o=null==(i=t.providerOptions)?void 0:i.openai)?void 0:o.itemId)?l:void 0});break;case"tool-result":u.push({type:"other",message:"tool result parts in assistant messages are not supported for OpenAI responses"});break;case"reasoning":{const n=await b({provider:"openai",providerOptions:t.providerOptions,schema:fe}),r=null==n?void 0:n.itemId;if(null!=r){const a=e[r],s=[];t.text.length>0?s.push({type:"summary_text",text:t.text}):void 0!==a&&u.push({type:"other",message:`Cannot append empty reasoning part to existing reasoning sequence. Skipping reasoning part: ${JSON.stringify(t)}.`}),void 0===a?(e[r]={type:"reasoning",id:r,encrypted_content:null==n?void 0:n.reasoningEncryptedContent,summary:s},c.push(e[r])):a.summary.push(...s)}else u.push({type:"other",message:`Non-OpenAI reasoning parts are not supported. Skipping reasoning part: ${JSON.stringify(t)}.`});break}}break}case"tool":for(const e of d){const t=e.output;let n;switch(t.type){case"text":case"error-text":n=t.value;break;case"content":case"json":case"error-json":n=JSON.stringify(t.value)}c.push({type:"function_call_output",call_id:e.toolCallId,output:n})}break;default:throw new Error(`Unsupported role: ${p}`)}return{messages:c,warnings:u}}({prompt:c,systemMessageMode:g.systemMessageMode});v.push(...$);const E=await b({provider:"openai",providerOptions:u,schema:Ce}),S=null!=(h=null==E?void 0:E.strictJsonSchema)&&h,A={model:this.modelId,input:y,temperature:t,top_p:a,max_output_tokens:e,...("json"===(null==m?void 0:m.type)||(null==E?void 0:E.textVerbosity))&&{text:{..."json"===(null==m?void 0:m.type)&&{format:null!=m.schema?{type:"json_schema",strict:S,name:null!=(f=m.name)?f:"response",description:m.description,schema:m.schema}:{type:"json_object"}},...(null==E?void 0:E.textVerbosity)&&{verbosity:E.textVerbosity}}},metadata:null==E?void 0:E.metadata,parallel_tool_calls:null==E?void 0:E.parallelToolCalls,previous_response_id:null==E?void 0:E.previousResponseId,store:null==E?void 0:E.store,user:null==E?void 0:E.user,instructions:null==E?void 0:E.instructions,service_tier:null==E?void 0:E.serviceTier,include:null==E?void 0:E.include,...g.isReasoningModel&&(null!=(null==E?void 0:E.reasoningEffort)||null!=(null==E?void 0:E.reasoningSummary))&&{reasoning:{...null!=(null==E?void 0:E.reasoningEffort)&&{effort:E.reasoningEffort},...null!=(null==E?void 0:E.reasoningSummary)&&{summary:E.reasoningSummary}}},...g.requiredAutoTruncation&&{truncation:"auto"}};var _;g.isReasoningModel?(null!=A.temperature&&(A.temperature=void 0,v.push({type:"unsupported-setting",setting:"temperature",details:"temperature is not supported for reasoning models"})),null!=A.top_p&&(A.top_p=void 0,v.push({type:"unsupported-setting",setting:"topP",details:"topP is not supported for reasoning models"}))):(null!=(null==E?void 0:E.reasoningEffort)&&v.push({type:"unsupported-setting",setting:"reasoningEffort",details:"reasoningEffort is not supported for non-reasoning models"}),null!=(null==E?void 0:E.reasoningSummary)&&v.push({type:"unsupported-setting",setting:"reasoningSummary",details:"reasoningSummary is not supported for non-reasoning models"})),"flex"!==(null==E?void 0:E.serviceTier)||(_=this.modelId).startsWith("o3")||_.startsWith("o4-mini")||_.startsWith("gpt-5")||(v.push({type:"unsupported-setting",setting:"serviceTier",details:"flex processing is only available for o3, o4-mini, and gpt-5 models"}),delete A.service_tier),"priority"!==(null==E?void 0:E.serviceTier)||function(e){return e.startsWith("gpt-4")||e.startsWith("gpt-5-mini")||e.startsWith("gpt-5")&&!e.startsWith("gpt-5-nano")||e.startsWith("o3")||e.startsWith("o4-mini")}(this.modelId)||(v.push({type:"unsupported-setting",setting:"serviceTier",details:"priority processing is only available for supported models (gpt-4, gpt-5, gpt-5-mini, o3, o4-mini) and requires Enterprise access. gpt-5-nano is not supported"}),delete A.service_tier);const{tools:x,toolChoice:w,toolWarnings:O}=function({tools:e,toolChoice:t,strictJsonSchema:n}){const a=[];if(null==(e=(null==e?void 0:e.length)?e:void 0))return{tools:void 0,toolChoice:void 0,toolWarnings:a};const s=[];for(const t of e)switch(t.type){case"function":s.push({type:"function",name:t.name,description:t.description,parameters:t.inputSchema,strict:n});break;case"provider-defined":switch(t.id){case"openai.file_search":{const e=B.parse(t.args);s.push({type:"file_search",vector_store_ids:e.vectorStoreIds,max_num_results:e.maxNumResults,ranking_options:e.ranking?{ranker:e.ranking.ranker}:void 0,filters:e.filters});break}case"openai.web_search_preview":{const e=Y.parse(t.args);s.push({type:"web_search_preview",search_context_size:e.searchContextSize,user_location:e.userLocation});break}case"openai.code_interpreter":{const e=me.parse(t.args);s.push({type:"code_interpreter",container:null==e.container?{type:"auto",file_ids:void 0}:"string"==typeof e.container?e.container:{type:"auto",file_ids:e.container.fileIds}});break}default:a.push({type:"unsupported-tool",tool:t})}break;default:a.push({type:"unsupported-tool",tool:t})}if(null==t)return{tools:s,toolChoice:void 0,toolWarnings:a};const i=t.type;switch(i){case"auto":case"none":case"required":return{tools:s,toolChoice:i,toolWarnings:a};case"tool":return{tools:s,toolChoice:"code_interpreter"===t.toolName||"file_search"===t.toolName||"web_search_preview"===t.toolName?{type:t.toolName}:{type:"function",name:t.toolName},toolWarnings:a};default:{const e=i;throw new r.b8({functionality:`tool choice type: ${e}`})}}}({tools:p,toolChoice:d,strictJsonSchema:S});return{args:{...A,tools:x,tool_choice:w},warnings:[...v,...O]}}async doGenerate(e){var t,n,a,s,o,c,u,p,d;const{args:m,warnings:h}=await this.getArgs(e),f=this.config.url({path:"/responses",modelId:this.modelId}),{responseHeaders:v,value:g,rawValue:y}=await S({url:f,headers:i(this.config.headers(),e.headers),body:m,failedResponseHandler:P,successfulResponseHandler:w(R.Ik({id:R.Yj(),created_at:R.ai(),error:R.Ik({code:R.Yj(),message:R.Yj()}).nullish(),model:R.Yj(),output:R.YO(R.gM("type",[R.Ik({type:R.eu("message"),role:R.eu("assistant"),id:R.Yj(),content:R.YO(R.Ik({type:R.eu("output_text"),text:R.Yj(),annotations:R.YO(R.Ik({type:R.eu("url_citation"),start_index:R.ai(),end_index:R.ai(),url:R.Yj(),title:R.Yj()}))}))}),R.Ik({type:R.eu("function_call"),call_id:R.Yj(),name:R.Yj(),arguments:R.Yj(),id:R.Yj()}),R.Ik({type:R.eu("web_search_call"),id:R.Yj(),status:R.Yj().optional()}),R.Ik({type:R.eu("computer_call"),id:R.Yj(),status:R.Yj().optional()}),R.Ik({type:R.eu("file_search_call"),id:R.Yj(),status:R.Yj().optional()}),R.Ik({type:R.eu("reasoning"),id:R.Yj(),encrypted_content:R.Yj().nullish(),summary:R.YO(R.Ik({type:R.eu("summary_text"),text:R.Yj()}))})])),incomplete_details:R.Ik({reason:R.Yj()}).nullable(),usage:ye})),abortSignal:e.abortSignal,fetch:this.config.fetch});if(g.error)throw new r.hL({message:g.error.message,url:f,requestBodyValues:m,statusCode:400,responseHeaders:v,responseBody:y,isRetryable:!1});const $=[];for(const e of g.output)switch(e.type){case"reasoning":0===e.summary.length&&e.summary.push({type:"summary_text",text:""});for(const n of e.summary)$.push({type:"reasoning",text:n.text,providerMetadata:{openai:{itemId:e.id,reasoningEncryptedContent:null!=(t=e.encrypted_content)?t:null}}});break;case"message":for(const t of e.content){$.push({type:"text",text:t.text,providerMetadata:{openai:{itemId:e.id}}});for(const e of t.annotations)$.push({type:"source",sourceType:"url",id:null!=(s=null==(a=(n=this.config).generateId)?void 0:a.call(n))?s:l(),url:e.url,title:e.title})}break;case"function_call":$.push({type:"tool-call",toolCallId:e.call_id,toolName:e.name,input:e.arguments,providerMetadata:{openai:{itemId:e.id}}});break;case"web_search_call":$.push({type:"tool-call",toolCallId:e.id,toolName:"web_search_preview",input:"",providerExecuted:!0}),$.push({type:"tool-result",toolCallId:e.id,toolName:"web_search_preview",result:{status:e.status||"completed"},providerExecuted:!0});break;case"computer_call":$.push({type:"tool-call",toolCallId:e.id,toolName:"computer_use",input:"",providerExecuted:!0}),$.push({type:"tool-result",toolCallId:e.id,toolName:"computer_use",result:{type:"computer_use_tool_result",status:e.status||"completed"},providerExecuted:!0});break;case"file_search_call":$.push({type:"tool-call",toolCallId:e.id,toolName:"file_search",input:"",providerExecuted:!0}),$.push({type:"tool-result",toolCallId:e.id,toolName:"file_search",result:{type:"file_search_tool_result",status:e.status||"completed"},providerExecuted:!0})}return{content:$,finishReason:ve({finishReason:null==(o=g.incomplete_details)?void 0:o.reason,hasToolCalls:$.some((e=>"tool-call"===e.type))}),usage:{inputTokens:g.usage.input_tokens,outputTokens:g.usage.output_tokens,totalTokens:g.usage.input_tokens+g.usage.output_tokens,reasoningTokens:null!=(u=null==(c=g.usage.output_tokens_details)?void 0:c.reasoning_tokens)?u:void 0,cachedInputTokens:null!=(d=null==(p=g.usage.input_tokens_details)?void 0:p.cached_tokens)?d:void 0},request:{body:m},response:{id:g.id,timestamp:new Date(1e3*g.created_at),modelId:g.model,headers:v,body:y},providerMetadata:{openai:{responseId:g.id}},warnings:h}}async doStream(e){const{args:t,warnings:n}=await this.getArgs(e),{responseHeaders:r,value:a}=await S({url:this.config.url({path:"/responses",modelId:this.modelId}),headers:i(this.config.headers(),e.headers),body:{...t,stream:!0},failedResponseHandler:P,successfulResponseHandler:x(Ie),abortSignal:e.abortSignal,fetch:this.config.fetch}),s=this;let o="unknown";const c={inputTokens:void 0,outputTokens:void 0,totalTokens:void 0};let u=null;const p={};let d=!1;const m={};return{stream:a.pipeThrough(new TransformStream({start(e){e.enqueue({type:"stream-start",warnings:n})},transform(t,n){var r,a,i,h,f,v,g,y,$,b,E,S,A;if(e.includeRawChunks&&n.enqueue({type:"raw",rawValue:t.rawValue}),!t.success)return o="error",void n.enqueue({type:"error",error:t.error});const _=t.value;if(Re(_))"function_call"===_.item.type?(p[_.output_index]={toolName:_.item.name,toolCallId:_.item.call_id},n.enqueue({type:"tool-input-start",id:_.item.call_id,toolName:_.item.name})):"web_search_call"===_.item.type?(p[_.output_index]={toolName:"web_search_preview",toolCallId:_.item.id},n.enqueue({type:"tool-input-start",id:_.item.id,toolName:"web_search_preview"})):"computer_call"===_.item.type?(p[_.output_index]={toolName:"computer_use",toolCallId:_.item.id},n.enqueue({type:"tool-input-start",id:_.item.id,toolName:"computer_use"})):"message"===_.item.type?n.enqueue({type:"text-start",id:_.item.id,providerMetadata:{openai:{itemId:_.item.id}}}):function(e){return Re(e)&&"reasoning"===e.item.type}(_)&&(m[_.item.id]={encryptedContent:_.item.encrypted_content,summaryParts:[0]},n.enqueue({type:"reasoning-start",id:`${_.item.id}:0`,providerMetadata:{openai:{itemId:_.item.id,reasoningEncryptedContent:null!=(r=_.item.encrypted_content)?r:null}}}));else if(Te(_)){if("function_call"===_.item.type)p[_.output_index]=void 0,d=!0,n.enqueue({type:"tool-input-end",id:_.item.call_id}),n.enqueue({type:"tool-call",toolCallId:_.item.call_id,toolName:_.item.name,input:_.item.arguments,providerMetadata:{openai:{itemId:_.item.id}}});else if("web_search_call"===_.item.type)p[_.output_index]=void 0,d=!0,n.enqueue({type:"tool-input-end",id:_.item.id}),n.enqueue({type:"tool-call",toolCallId:_.item.id,toolName:"web_search_preview",input:"",providerExecuted:!0}),n.enqueue({type:"tool-result",toolCallId:_.item.id,toolName:"web_search_preview",result:{type:"web_search_tool_result",status:_.item.status||"completed"},providerExecuted:!0});else if("computer_call"===_.item.type)p[_.output_index]=void 0,d=!0,n.enqueue({type:"tool-input-end",id:_.item.id}),n.enqueue({type:"tool-call",toolCallId:_.item.id,toolName:"computer_use",input:"",providerExecuted:!0}),n.enqueue({type:"tool-result",toolCallId:_.item.id,toolName:"computer_use",result:{type:"computer_use_tool_result",status:_.item.status||"completed"},providerExecuted:!0});else if("message"===_.item.type)n.enqueue({type:"text-end",id:_.item.id});else if(function(e){return Te(e)&&"reasoning"===e.item.type}(_)){const e=m[_.item.id];for(const t of e.summaryParts)n.enqueue({type:"reasoning-end",id:`${_.item.id}:${t}`,providerMetadata:{openai:{itemId:_.item.id,reasoningEncryptedContent:null!=(a=_.item.encrypted_content)?a:null}}});delete m[_.item.id]}}else if(function(e){return"response.function_call_arguments.delta"===e.type}(_)){const e=p[_.output_index];null!=e&&n.enqueue({type:"tool-input-delta",id:e.toolCallId,delta:_.delta})}else!function(e){return"response.created"===e.type}(_)?function(e){return"response.output_text.delta"===e.type}(_)?n.enqueue({type:"text-delta",id:_.item_id,delta:_.delta}):function(e){return"response.reasoning_summary_part.added"===e.type}(_)?_.summary_index>0&&(null==(i=m[_.item_id])||i.summaryParts.push(_.summary_index),n.enqueue({type:"reasoning-start",id:`${_.item_id}:${_.summary_index}`,providerMetadata:{openai:{itemId:_.item_id,reasoningEncryptedContent:null!=(f=null==(h=m[_.item_id])?void 0:h.encryptedContent)?f:null}}})):function(e){return"response.reasoning_summary_text.delta"===e.type}(_)?n.enqueue({type:"reasoning-delta",id:`${_.item_id}:${_.summary_index}`,delta:_.delta,providerMetadata:{openai:{itemId:_.item_id}}}):function(e){return"response.completed"===e.type||"response.incomplete"===e.type}(_)?(o=ve({finishReason:null==(v=_.response.incomplete_details)?void 0:v.reason,hasToolCalls:d}),c.inputTokens=_.response.usage.input_tokens,c.outputTokens=_.response.usage.output_tokens,c.totalTokens=_.response.usage.input_tokens+_.response.usage.output_tokens,c.reasoningTokens=null!=(y=null==(g=_.response.usage.output_tokens_details)?void 0:g.reasoning_tokens)?y:void 0,c.cachedInputTokens=null!=(b=null==($=_.response.usage.input_tokens_details)?void 0:$.cached_tokens)?b:void 0):function(e){return"response.output_text.annotation.added"===e.type}(_)?n.enqueue({type:"source",sourceType:"url",id:null!=(A=null==(S=(E=s.config).generateId)?void 0:S.call(E))?A:l(),url:_.annotation.url,title:_.annotation.title}):function(e){return"error"===e.type}(_)&&n.enqueue({type:"error",error:_}):(u=_.response.id,n.enqueue({type:"response-metadata",id:_.response.id,timestamp:new Date(1e3*_.response.created_at),modelId:_.response.model}))},flush(e){e.enqueue({type:"finish",finishReason:o,usage:c,providerMetadata:{openai:{responseId:u}}})}})),request:{body:t},response:{headers:r}}}},ye=R.Ik({input_tokens:R.ai(),input_tokens_details:R.Ik({cached_tokens:R.ai().nullish()}).nullish(),output_tokens:R.ai(),output_tokens_details:R.Ik({reasoning_tokens:R.ai().nullish()}).nullish()}),$e=R.Ik({type:R.eu("response.output_text.delta"),item_id:R.Yj(),delta:R.Yj()}),be=R.Ik({type:R.eu("error"),code:R.Yj(),message:R.Yj(),param:R.Yj().nullish(),sequence_number:R.ai()}),Ee=R.Ik({type:R.k5(["response.completed","response.incomplete"]),response:R.Ik({incomplete_details:R.Ik({reason:R.Yj()}).nullish(),usage:ye})}),Se=R.Ik({type:R.eu("response.created"),response:R.Ik({id:R.Yj(),created_at:R.ai(),model:R.Yj()})}),Ae=R.Ik({type:R.eu("response.output_item.added"),output_index:R.ai(),item:R.gM("type",[R.Ik({type:R.eu("message"),id:R.Yj()}),R.Ik({type:R.eu("reasoning"),id:R.Yj(),encrypted_content:R.Yj().nullish()}),R.Ik({type:R.eu("function_call"),id:R.Yj(),call_id:R.Yj(),name:R.Yj(),arguments:R.Yj()}),R.Ik({type:R.eu("web_search_call"),id:R.Yj(),status:R.Yj()}),R.Ik({type:R.eu("computer_call"),id:R.Yj(),status:R.Yj()}),R.Ik({type:R.eu("file_search_call"),id:R.Yj(),status:R.Yj()})])}),_e=R.Ik({type:R.eu("response.output_item.done"),output_index:R.ai(),item:R.gM("type",[R.Ik({type:R.eu("message"),id:R.Yj()}),R.Ik({type:R.eu("reasoning"),id:R.Yj(),encrypted_content:R.Yj().nullish()}),R.Ik({type:R.eu("function_call"),id:R.Yj(),call_id:R.Yj(),name:R.Yj(),arguments:R.Yj(),status:R.eu("completed")}),R.Ik({type:R.eu("web_search_call"),id:R.Yj(),status:R.eu("completed")}),R.Ik({type:R.eu("computer_call"),id:R.Yj(),status:R.eu("completed")}),R.Ik({type:R.eu("file_search_call"),id:R.Yj(),status:R.eu("completed")})])}),xe=R.Ik({type:R.eu("response.function_call_arguments.delta"),item_id:R.Yj(),output_index:R.ai(),delta:R.Yj()}),we=R.Ik({type:R.eu("response.output_text.annotation.added"),annotation:R.Ik({type:R.eu("url_citation"),url:R.Yj(),title:R.Yj()})}),Oe=R.Ik({type:R.eu("response.reasoning_summary_part.added"),item_id:R.Yj(),summary_index:R.ai()}),Ne=R.Ik({type:R.eu("response.reasoning_summary_text.delta"),item_id:R.Yj(),summary_index:R.ai(),delta:R.Yj()}),Ie=R.KC([$e,Ee,Se,Ae,_e,xe,we,Oe,Ne,be,R.Ik({type:R.Yj()}).loose()]);function Te(e){return"response.output_item.done"===e.type}function Re(e){return"response.output_item.added"===e.type}var Ce=R.Ik({metadata:R.bz().nullish(),parallelToolCalls:R.zM().nullish(),previousResponseId:R.Yj().nullish(),store:R.zM().nullish(),user:R.Yj().nullish(),reasoningEffort:R.Yj().nullish(),strictJsonSchema:R.zM().nullish(),instructions:R.Yj().nullish(),reasoningSummary:R.Yj().nullish(),serviceTier:R.k5(["auto","flex","priority"]).nullish(),include:R.YO(R.k5(["reasoning.encrypted_content","file_search_call.results"])).nullish(),textVerbosity:R.k5(["low","medium","high"]).nullish()}),ke=R.Ik({instructions:R.Yj().nullish(),speed:R.ai().min(.25).max(4).default(1).nullish()}),Le=class{constructor(e,t){this.modelId=e,this.config=t,this.specificationVersion="v2"}get provider(){return this.config.provider}async getArgs({text:e,voice:t="alloy",outputFormat:n="mp3",speed:r,instructions:a,language:s,providerOptions:i}){const o=[],l=await b({provider:"openai",providerOptions:i,schema:ke}),c={model:this.modelId,input:e,voice:t,response_format:"mp3",speed:r,instructions:a};if(n&&(["mp3","opus","aac","flac","wav","pcm"].includes(n)?c.response_format=n:o.push({type:"unsupported-setting",setting:"outputFormat",details:`Unsupported output format: ${n}. Using mp3 instead.`})),l){const e={};for(const t in e){const n=e[t];void 0!==n&&(c[t]=n)}}return s&&o.push({type:"unsupported-setting",setting:"language",details:`OpenAI speech models do not support language selection. Language parameter "${s}" was ignored.`}),{requestBody:c,warnings:o}}async doGenerate(e){var t,n,a;const s=null!=(a=null==(n=null==(t=this.config._internal)?void 0:t.currentDate)?void 0:n.call(t))?a:new Date,{requestBody:l,warnings:c}=await this.getArgs(e),{value:u,responseHeaders:p,rawValue:d}=await S({url:this.config.url({path:"/audio/speech",modelId:this.modelId}),headers:i(this.config.headers(),e.headers),body:l,failedResponseHandler:P,successfulResponseHandler:async({response:e,url:t,requestBodyValues:n})=>{const a=o(e);if(!e.body)throw new r.hL({message:"Response body is empty",url:t,requestBodyValues:n,statusCode:e.status,responseHeaders:a,responseBody:void 0});try{const t=await e.arrayBuffer();return{responseHeaders:a,value:new Uint8Array(t)}}catch(s){throw new r.hL({message:"Failed to read response as array buffer",url:t,requestBodyValues:n,statusCode:e.status,responseHeaders:a,responseBody:void 0,cause:s})}},abortSignal:e.abortSignal,fetch:this.config.fetch});return{audio:u,warnings:c,request:{body:JSON.stringify(l)},response:{timestamp:s,modelId:this.modelId,headers:p,body:d}}}},Pe=R.Ik({include:R.YO(R.Yj()).optional(),language:R.Yj().optional(),prompt:R.Yj().optional(),temperature:R.ai().min(0).max(1).default(0).optional(),timestampGranularities:R.YO(R.k5(["word","segment"])).default(["segment"]).optional()}),Me={afrikaans:"af",arabic:"ar",armenian:"hy",azerbaijani:"az",belarusian:"be",bosnian:"bs",bulgarian:"bg",catalan:"ca",chinese:"zh",croatian:"hr",czech:"cs",danish:"da",dutch:"nl",english:"en",estonian:"et",finnish:"fi",french:"fr",galician:"gl",german:"de",greek:"el",hebrew:"he",hindi:"hi",hungarian:"hu",icelandic:"is",indonesian:"id",italian:"it",japanese:"ja",kannada:"kn",kazakh:"kk",korean:"ko",latvian:"lv",lithuanian:"lt",macedonian:"mk",malay:"ms",marathi:"mr",maori:"mi",nepali:"ne",norwegian:"no",persian:"fa",polish:"pl",portuguese:"pt",romanian:"ro",russian:"ru",serbian:"sr",slovak:"sk",slovenian:"sl",spanish:"es",swahili:"sw",swedish:"sv",tagalog:"tl",tamil:"ta",thai:"th",turkish:"tr",ukrainian:"uk",urdu:"ur",vietnamese:"vi",welsh:"cy"},je=class{constructor(e,t){this.modelId=e,this.config=t,this.specificationVersion="v2"}get provider(){return this.config.provider}async getArgs({audio:e,mediaType:t,providerOptions:n}){const r=await b({provider:"openai",providerOptions:n,schema:Pe}),a=new FormData,s=e instanceof Uint8Array?new Blob([e]):new Blob([I(e)]);if(a.append("model",this.modelId),a.append("file",new File([s],"audio",{type:t})),r){const e={include:r.include,language:r.language,prompt:r.prompt,temperature:r.temperature,timestamp_granularities:r.timestampGranularities};for(const[t,n]of Object.entries(e))null!=n&&a.append(t,String(n))}return{formData:a,warnings:[]}}async doGenerate(e){var t,n,r,a,s,o;const l=null!=(r=null==(n=null==(t=this.config._internal)?void 0:t.currentDate)?void 0:n.call(t))?r:new Date,{formData:c,warnings:u}=await this.getArgs(e),{value:p,responseHeaders:d,rawValue:m}=await(async({url:e,headers:t,formData:n,failedResponseHandler:r,successfulResponseHandler:a,abortSignal:s,fetch:i})=>A({url:e,headers:t,body:{content:n,values:Object.fromEntries(n.entries())},failedResponseHandler:r,successfulResponseHandler:a,abortSignal:s,fetch:i}))({url:this.config.url({path:"/audio/transcriptions",modelId:this.modelId}),headers:i(this.config.headers(),e.headers),formData:c,failedResponseHandler:P,successfulResponseHandler:w(De),abortSignal:e.abortSignal,fetch:this.config.fetch}),h=null!=p.language&&p.language in Me?Me[p.language]:void 0;return{text:p.text,segments:null!=(s=null==(a=p.words)?void 0:a.map((e=>({text:e.word,startSecond:e.start,endSecond:e.end}))))?s:[],language:h,durationInSeconds:null!=(o=p.duration)?o:void 0,warnings:u,response:{timestamp:l,modelId:this.modelId,headers:d,body:m}}}},De=R.Ik({text:R.Yj(),language:R.Yj().nullish(),duration:R.ai().nullish(),words:R.YO(R.Ik({word:R.Yj(),start:R.ai(),end:R.ai()})).nullish()});function Fe(e={}){var t,n;const r=null!=(t=null==(a=e.baseURL)?void 0:a.replace(/\/$/,""))?t:"https://api.openai.com/v1";var a;const s=null!=(n=e.name)?n:"openai",i=()=>({Authorization:`Bearer ${p({apiKey:e.apiKey,environmentVariableName:"OPENAI_API_KEY",description:"OpenAI"})}`,"OpenAI-Organization":e.organization,"OpenAI-Project":e.project,...e.headers}),o=t=>new oe(t,{provider:`${s}.embedding`,url:({path:e})=>`${r}${e}`,headers:i,fetch:e.fetch}),l=t=>new pe(t,{provider:`${s}.image`,url:({path:e})=>`${r}${e}`,headers:i,fetch:e.fetch}),c=t=>new je(t,{provider:`${s}.transcription`,url:({path:e})=>`${r}${e}`,headers:i,fetch:e.fetch}),u=t=>new Le(t,{provider:`${s}.speech`,url:({path:e})=>`${r}${e}`,headers:i,fetch:e.fetch}),d=e=>{if(new.target)throw new Error("The OpenAI model function cannot be called with the new keyword.");return m(e)},m=t=>new ge(t,{provider:`${s}.responses`,url:({path:e})=>`${r}${e}`,headers:i,fetch:e.fetch}),h=function(e){return d(e)};return h.languageModel=d,h.chat=t=>new Z(t,{provider:`${s}.chat`,url:({path:e})=>`${r}${e}`,headers:i,fetch:e.fetch}),h.completion=t=>new ne(t,{provider:`${s}.completion`,url:({path:e})=>`${r}${e}`,headers:i,fetch:e.fetch}),h.responses=m,h.embedding=o,h.textEmbedding=o,h.textEmbeddingModel=o,h.image=l,h.imageModel=l,h.transcription=c,h.transcriptionModel=c,h.speech=u,h.speechModel=u,h.tools=he,h}Fe()},87225:(e,t,n)=>{const r=n(57544);e.exports=(e,t)=>new r(e,t).major},87391:(e,t,n)=>{const r=n(41694);e.exports=(e,t,n)=>{const a=new r(e,n),s=new r(t,n);return a.compare(s)||a.compareBuild(s)}},87494:e=>{const t=function(e){return e=e.toString(),this instanceof t?(this.ns=e,this.dotIndex=e.indexOf("."),-1===this.dotIndex?(this.database=e,this.collection=""):(this.database=e.slice(0,this.dotIndex),this.collection=e.slice(this.dotIndex+1)),this.system=/^(?:system(?!\.profile$).*|enxcol_)\./.test(this.collection),this.oplog=/local\.oplog\.(\$main|rs)/.test(e),this.command="$cmd"===this.collection||0===this.collection.indexOf("$cmd.sys"),this.special=this.oplog||this.command||this.system||"config"===this.database||/^__mdb_internal_\w/.test(this.database),this.specialish=this.special||["local","admin"].indexOf(this.database)>-1,this.normal=this.oplog||-1===this.ns.indexOf("$"),this.validDatabaseName=new RegExp('^[^\\\\/". ]*$').test(this.database)&&this.database.length<=t.MAX_DATABASE_NAME_LENGTH,this.validCollectionName=this.collection.length>0&&(this.oplog||/^[^\0$]*$/.test(this.collection)),this.databaseHash=7,this.ns.split("").every(((e,t)=>"."!==e&&(this.databaseHash+=11*this.ns.charCodeAt(t),this.databaseHash*=3,!0))),this):new t(e)};t.prototype.database="",t.prototype.databaseHash=0,t.prototype.collection="",t.prototype.command=!1,t.prototype.special=!1,t.prototype.system=!1,t.prototype.oplog=!1,t.prototype.normal=!1,t.prototype.specialish=!1,t.prototype.isCommand=function(){return this.command},t.prototype.isSpecial=function(){return this.special},t.prototype.isSystem=function(){return this.system},t.prototype.isNormal=function(){return this.normal},t.prototype.isOplog=function(){return this.oplog},t.prototype.isConf=function(){},t.prototype.toString=function(){return this.ns},t.MAX_DATABASE_NAME_LENGTH=128,t.sort=function(e){return e.sort((function(e,n){return new t(e).specialish&&new t(n).specialish?0:new t(e).specialish&&!new t(n).specialish?1:!new t(e).specialish&&new t(n).specialish?-1:e>n?1:-1})),e},e.exports=t},87866:(e,t,n)=>{const r=n(88825),a=n(67105),{ANY:s}=a,i=n(20360),o=n(72849),l=n(51269),c=n(18082),u=n(71851),p=n(54838);e.exports=(e,t,n,d)=>{let m,h,f,v,g;switch(e=new r(e,d),t=new i(t,d),n){case">":m=l,h=u,f=c,v=">",g=">=";break;case"<":m=c,h=p,f=l,v="<",g="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(o(e,t,d))return!1;for(let n=0;n<t.set.length;++n){const r=t.set[n];let i=null,o=null;if(r.forEach((e=>{e.semver===s&&(e=new a(">=0.0.0")),i=i||e,o=o||e,m(e.semver,i.semver,d)?i=e:f(e.semver,o.semver,d)&&(o=e)})),i.operator===v||i.operator===g)return!1;if((!o.operator||o.operator===v)&&h(e,o.semver))return!1;if(o.operator===g&&f(e,o.semver))return!1}return!0}},88099:(e,t,n)=>{const r=n(9350),a=n(33629),s=n(42734);e.exports=(e,t)=>{e=new a(e,t);let n=new r("0.0.0");if(e.test(n))return n;if(n=new r("0.0.0-0"),e.test(n))return n;n=null;for(let t=0;t<e.set.length;++t){const a=e.set[t];let i=null;a.forEach((e=>{const t=new r(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":i&&!s(t,i)||(i=t);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${e.operator}`)}})),!i||n&&!s(n,i)||(n=i)}return n&&e.test(n)?n:null}},88108:(e,t,n)=>{const r=n(45160),a=n(25812),s=n(58809),i=n(54506),o=n(20038),l=n(66239);e.exports=(e,t,n,c)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e===n;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e!==n;case"":case"=":case"==":return r(e,n,c);case"!=":return a(e,n,c);case">":return s(e,n,c);case">=":return i(e,n,c);case"<":return o(e,n,c);case"<=":return l(e,n,c);default:throw new TypeError(`Invalid operator: ${t}`)}}},88345:(e,t,n)=>{const r=n(38366);e.exports=(e,t,n)=>(e=new r(e,n),t=new r(t,n),e.intersects(t,n))},88769:(e,t,n)=>{const r=n(25522),a=n(66078),s=n(57544),i=n(40383),o=n(12196),l=n(46970),c=n(78970),u=n(67171),p=n(80196),d=n(87225),m=n(50418),h=n(54737),f=n(62893),v=n(70692),g=n(78462),y=n(68303),$=n(75265),b=n(11451),E=n(11249),S=n(72608),A=n(86391),_=n(35229),x=n(67531),w=n(70509),O=n(75092),N=n(77043),I=n(36326),T=n(75732),R=n(95323),C=n(67338),k=n(1451),L=n(14e3),P=n(37354),M=n(59934),j=n(97830),D=n(43143),F=n(37391),V=n(57578),q=n(71080),B=n(28553),U=n(94916);e.exports={parse:o,valid:l,clean:c,inc:u,diff:p,major:d,minor:m,patch:h,prerelease:f,compare:v,rcompare:g,compareLoose:y,compareBuild:$,sort:b,rsort:E,gt:S,lt:A,eq:_,neq:x,gte:w,lte:O,cmp:N,coerce:I,Comparator:T,Range:R,satisfies:C,toComparators:k,maxSatisfying:L,minSatisfying:P,minVersion:M,validRange:j,outside:D,gtr:F,ltr:V,intersects:q,simplifyRange:B,subset:U,SemVer:s,re:r.re,src:r.src,tokens:r.t,SEMVER_SPEC_VERSION:a.SEMVER_SPEC_VERSION,RELEASE_TYPES:a.RELEASE_TYPES,compareIdentifiers:i.compareIdentifiers,rcompareIdentifiers:i.rcompareIdentifiers}},88770:(e,t,n)=>{const r=n(47538);e.exports=(e,t)=>e.sort(((e,n)=>r(e,n,t)))},88825:(e,t,n)=>{const r=n(95869),{MAX_LENGTH:a,MAX_SAFE_INTEGER:s}=n(64136),{safeRe:i,t:o}=n(36165),l=n(40594),{compareIdentifiers:c}=n(67274);class u{constructor(e,t){if(t=l(t),e instanceof u){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if("string"!=typeof e)throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>a)throw new TypeError(`version is longer than ${a} characters`);r("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const n=e.trim().match(t.loose?i[o.LOOSE]:i[o.FULL]);if(!n)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>s||this.major<0)throw new TypeError("Invalid major version");if(this.minor>s||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>s||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t<s)return t}return e})):this.prerelease=[],this.build=n[5]?n[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(r("SemVer.compare",this.version,this.options,e),!(e instanceof u)){if("string"==typeof e&&e===this.version)return 0;e=new u(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof u||(e=new u(e,this.options)),c(this.major,e.major)||c(this.minor,e.minor)||c(this.patch,e.patch)}comparePre(e){if(e instanceof u||(e=new u(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{const n=this.prerelease[t],a=e.prerelease[t];if(r("prerelease compare",t,n,a),void 0===n&&void 0===a)return 0;if(void 0===a)return 1;if(void 0===n)return-1;if(n!==a)return c(n,a)}while(++t)}compareBuild(e){e instanceof u||(e=new u(e,this.options));let t=0;do{const n=this.build[t],a=e.build[t];if(r("build compare",t,n,a),void 0===n&&void 0===a)return 0;if(void 0===a)return 1;if(void 0===n)return-1;if(n!==a)return c(n,a)}while(++t)}inc(e,t,n){if(e.startsWith("pre")){if(!t&&!1===n)throw new Error("invalid increment argument: identifier is empty");if(t){const e=`-${t}`.match(this.options.loose?i[o.PRERELEASELOOSE]:i[o.PRERELEASE]);if(!e||e[1]!==t)throw new Error(`invalid identifier: ${t}`)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,n);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,n);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,n),this.inc("pre",t,n);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t,n),this.inc("pre",t,n);break;case"release":if(0===this.prerelease.length)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":{const e=Number(n)?1:0;if(0===this.prerelease.length)this.prerelease=[e];else{let r=this.prerelease.length;for(;--r>=0;)"number"==typeof this.prerelease[r]&&(this.prerelease[r]++,r=-2);if(-1===r){if(t===this.prerelease.join(".")&&!1===n)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(t){let r=[t,e];!1===n&&(r=[t]),0===c(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=r):this.prerelease=r}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}e.exports=u},88834:(e,t,n)=>{const r=n(72849),a=n(25583);e.exports=(e,t,n)=>{const s=[];let i=null,o=null;const l=e.sort(((e,t)=>a(e,t,n)));for(const e of l)r(e,t,n)?(o=e,i||(i=e)):(o&&s.push([i,o]),o=null,i=null);i&&s.push([i,null]);const c=[];for(const[e,t]of s)e===t?c.push(e):t||e!==l[0]?t?e===l[0]?c.push(`<=${t}`):c.push(`${e} - ${t}`):c.push(`>=${e}`):c.push("*");const u=c.join(" || "),p="string"==typeof t.raw?t.raw:String(t);return u.length<p.length?u:t}},89065:(e,t,n)=>{const r=n(41694);e.exports=(e,t,n,a,s)=>{"string"==typeof n&&(s=a,a=n,n=void 0);try{return new r(e instanceof r?e.version:e,n).inc(t,a,s).version}catch(e){return null}}},89247:(e,t,n)=>{n.d(t,{nF:()=>a});var r=n(53354);r.ACCUMULATORS,r.ADL,r.ANY_COLLECTION_NAMESPACE,r.ANY_NAMESPACE,r.ATLAS,r.ATLAS_SEARCH_TEMPLATES,r.ATLAS_VECTOR_SEARCH_TEMPLATE,r.BSON_TYPES,r.BSON_TYPE_ALIASES,r.COLLECTION,r.CONVERSION_OPERATORS,r.DATABASE,r.ENVS,r.EXPRESSION_OPERATORS,r.FULL_SCAN_STAGES,r.JSON_SCHEMA,r.ON_PREM,r.OUT_STAGES,r.QUERY_OPERATORS,r.REQUIRED_AS_FIRST_STAGE,r.STAGE_OPERATORS,r.STAGE_OPERATOR_NAMES,r.SYSTEM_VARIABLES,r.TIME_SERIES;const a=r.VALIDATION_TEMPLATE;r.VIEW,r.VIEW_PIPELINE_UTILS,r.getFilteredCompletions,r.wrapField},89295:(e,t,n)=>{var r=n(40811);e.exports=new r("tag:yaml.org,2002:null",{kind:"scalar",resolve:function(e){if(null===e)return!0;var t=e.length;return 1===t&&"~"===e||4===t&&("null"===e||"Null"===e||"NULL"===e)},construct:function(){return null},predicate:function(e){return null===e},represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})},89834:(e,t,n)=>{const r=n(33629);e.exports=(e,t,n)=>(e=new r(e,n),t=new r(t,n),e.intersects(t,n))},89975:(e,t,n)=>{const r=n(32910);e.exports=(e,t,n)=>r(e,t,"<",n)},90216:(e,t,n)=>{const r=n(9350);e.exports=(e,t)=>new r(e,t).major},90733:e=>{const t=/^[0-9]+$/,n=(e,n)=>{const r=t.test(e),a=t.test(n);return r&&a&&(e=+e,n=+n),e===n?0:r&&!a?-1:a&&!r?1:e<n?-1:1};e.exports={compareIdentifiers:n,rcompareIdentifiers:(e,t)=>n(t,e)}},90898:(e,t,n)=>{const r=n(99430);e.exports=(e,t,n)=>r(e,t,n)<=0},91030:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ENVS=t.ON_PREM=t.ADL=t.ATLAS=void 0;const n="atlas";t.ATLAS=n,t.ADL="adl";const r="on-prem";t.ON_PREM=r;const a=[n,"adl",r];t.ENVS=a},91152:(e,t,n)=>{const r=n(60501);e.exports=(e,t,n)=>r(e,t,n)<0},91597:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ATLAS_VECTOR_SEARCH_TEMPLATE=t.ATLAS_SEARCH_TEMPLATES=void 0,t.ATLAS_SEARCH_TEMPLATES=[{name:"Dynamic field mappings",snippet:'{\n "mappings": {\n "dynamic": true\n }\n}',version:"4.4.0"},{name:"Static field mappings",snippet:'{\n "mappings": {\n "dynamic": false,\n "fields": {\n ${1:<string field name>}: {\n "type": "string"\n },\n ${2:<number field name>}: {\n "type": "number"\n },\n ${3:<date field name>}: {\n "type": "date"\n },\n ${4:<geo field name>}: {\n "type": "geo"\n },\n } \n }\n}',version:"4.4.0"},{name:"Text field mappings",snippet:'{\n "mappings": {\n "dynamic": true,\n "fields": {\n ${1:<string field name>}: [\n {\n // Enables text queries\n "type": "string"\n },\n {\n // Enables autocomplete queries\n "type": "autocomplete"\n \n },\n {\n // Enables sorting\n "type": "token"\n }\n ] \n } \n }\n}',version:"4.4.0"},{name:"Facet field mappings",snippet:'{\n "mappings": {\n "dynamic": true,\n "fields": {\n ${1:<number field name for faceting>}: [\n {\n "type": "numberFacet"\n },\n {\n "type": "number"\n },\n ],\n ${2:<date field name for faceting>}: [\n {\n "type": "dateFacet"\n }\n {\n "type": "date"\n }\n ],\n ${3:<string field name for faceting>}: [\n {\n "type": "stringFacet"\n },\n {\n "type": "string",\n "analyzer": "lucene.keyword"\n },\n ],\n } \n }\n}',version:"4.4.0"},{name:"KNN Vector field mapping",snippet:'{\n "mappings": {\n "dynamic": true,\n "fields": {\n ${1:<vector embedding field name>}: [\n {\n "type": "knnVector",\n "dimensions": ${2:<number of dimensions>},\n "similarity": "${3:<euclidean | cosine | dotProduct>}"\n } \n ] \n } \n }\n}',version:"4.4.0"}],t.ATLAS_VECTOR_SEARCH_TEMPLATE={name:"Vector Search default template",snippet:'{\n "fields": [{\n "type": "vector",\n "path": "${1:<field name to index>}",\n "numDimensions": ${2:<number of dimensions>},\n "similarity": "${3:<euclidean | cosine | dotProduct>}"\n }]\n}',version:"4.4.0"}},91714:(e,t,n)=>{var r=n(54420);e.exports=new r({explicit:[n(75459),n(98727),n(1726)]})},91716:(e,t,n)=>{const r=n(66283);e.exports=(e,t)=>new r(e,t).patch},91871:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BSON_TYPE_ALIASES=void 0,t.BSON_TYPE_ALIASES=[{name:"double",value:"double",label:"double",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"string",value:"string",label:"string",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"object",value:"object",label:"object",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"array",value:"array",label:"array",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"binData",value:"binData",label:"binData",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"objectId",value:"objectId",label:"objectId",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"bool",value:"bool",label:"bool",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"date",value:"date",label:"date",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"null",value:"null",label:"null",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"double",value:"double",label:"double",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"regex",value:"regex",label:"regex",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"javascript",value:"javascript",label:"javascript",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"javascriptWithScope",value:"javascriptWithScope",label:"javascriptWithScope",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"int",value:"int",label:"int",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"timestamp",value:"timestamp",label:"timestamp",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"long",value:"long",label:"long",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"decimal",value:"decimal",label:"decimal",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"minKey",value:"minKey",label:"minKey",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"maxKey",value:"maxKey",label:"maxKey",score:1,meta:"bson-type-aliases",version:"3.6.0"}]},91934:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.JSON_SCHEMA=void 0,t.JSON_SCHEMA=[{name:"bsonType",value:"bsonType",label:"bsonType",score:1,meta:"json-schema",version:"3.6.0",description:"Accepts same string aliases used for the $type operator"},{name:"enum",value:"enum",label:"enum",score:1,meta:"json-schema",version:"3.6.0",description:"Enumerates all possible values of the field"},{name:"type",value:"type",label:"type",score:1,meta:"json-schema",version:"3.6.0",description:"Enumerates the possible JSON types of the field"},{name:"allOf",value:"allOf",label:"allOf",score:1,meta:"json-schema",version:"3.6.0",description:"Field must match all specified schemas"},{name:"anyOf",value:"anyOf",label:"anyOf",score:1,meta:"json-schema",version:"3.6.0",description:"Field must match at least one of the specified schemas"},{name:"oneOf",value:"oneOf",label:"oneOf",score:1,meta:"json-schema",version:"3.6.0",description:"Field must match exactly one of the specified schemas"},{name:"not",value:"not",label:"not",score:1,meta:"json-schema",version:"3.6.0",description:"Field must not match the schema"},{name:"multipleOf",value:"multipleOf",label:"multipleOf",score:1,meta:"json-schema",version:"3.6.0",description:"Field must be a multiple of this value"},{name:"maximum",value:"maximum",label:"maximum",score:1,meta:"json-schema",version:"3.6.0",description:"Indicates the maximum value of the field"},{name:"exclusiveMaximum",value:"exclusiveMaximum",label:"exclusiveMaximum",score:1,meta:"json-schema",version:"3.6.0",description:"If true and field is a number, maximum is an exclusive maximum"},{name:"minimum",value:"minimum",label:"minimum",score:1,meta:"json-schema",version:"3.6.0",description:"Indicates the minimum value of the field"},{name:"exclusiveMinimum",value:"exclusiveMinimum",label:"exclusiveMinimum",score:1,meta:"json-schema",version:"3.6.0",description:"If true, minimum is an exclusive minimum"},{name:"maxLength",value:"maxLength",label:"maxLength",score:1,meta:"json-schema",version:"3.6.0",description:"Indicates the maximum length of the field"},{name:"minLength",value:"minLength",label:"minLength",score:1,meta:"json-schema",version:"3.6.0",description:"Indicates the minimum length of the field"},{name:"pattern",value:"pattern",label:"pattern",score:1,meta:"json-schema",version:"3.6.0",description:"Field must match the regular expression"},{name:"maxProperties",value:"maxProperties",label:"maxProperties",score:1,meta:"json-schema",version:"3.6.0",description:"Indicates the field’s maximum number of properties"},{name:"minProperties",value:"minProperties",label:"minProperties",score:1,meta:"json-schema",version:"3.6.0",description:"Indicates the field’s minimum number of properties"},{name:"required",value:"required",label:"required",score:1,meta:"json-schema",version:"3.6.0",description:"Object’s property set must contain all the specified elements in the array"},{name:"additionalProperties",value:"additionalProperties",label:"additionalProperties",score:1,meta:"json-schema",version:"3.6.0",description:"If true, additional fields are allowed"},{name:"properties",value:"properties",label:"properties",score:1,meta:"json-schema",version:"3.6.0",description:"A valid JSON Schema where each value is also a valid JSON Schema object"},{name:"patternProperties",value:"patternProperties",label:"patternProperties",score:1,meta:"json-schema",version:"3.6.0",description:"In addition to properties requirements, each property name of this object must be a valid regular expression"},{name:"dependencies",value:"dependencies",label:"dependencies",score:1,meta:"json-schema",version:"3.6.0",description:"Describes field or schema dependencies"},{name:"additionalItems",value:"additionalItems",label:"additionalItems",score:1,meta:"json-schema",version:"3.6.0",description:"If an object, must be a valid JSON Schema"},{name:"items",value:"items",label:"items",score:1,meta:"json-schema",version:"3.6.0",description:"Must be either a valid JSON Schema, or an array of valid JSON Schemas"},{name:"maxItems",value:"maxItems",label:"maxItems",score:1,meta:"json-schema",version:"3.6.0",description:"Indicates the maximum length of array"},{name:"minItems",value:"minItems",label:"minItems",score:1,meta:"json-schema",version:"3.6.0",description:"Indicates the minimum length of array"},{name:"uniqueItems",value:"uniqueItems",label:"uniqueItems",score:1,meta:"json-schema",version:"3.6.0",description:"If true, each item in the array must be unique"},{name:"title",value:"title",label:"title",score:1,meta:"json-schema",version:"3.6.0",description:"A descriptive title string with no effect"},{name:"description",value:"description",label:"description",score:1,meta:"json-schema",version:"3.6.0",description:"A string that describes the schema and has no effect."}]},91989:(e,t,n)=>{var r,a;n.d(t,{YO:()=>Le,zM:()=>ke,ai:()=>Ce,Ik:()=>Pe,Yj:()=>Re,KC:()=>Me}),function(e){e.assertEqual=e=>{},e.assertIs=function(e){},e.assertNever=function(e){throw new Error},e.arrayToEnum=e=>{const t={};for(const n of e)t[n]=n;return t},e.getValidEnumValues=t=>{const n=e.objectKeys(t).filter((e=>"number"!=typeof t[t[e]])),r={};for(const e of n)r[e]=t[e];return e.objectValues(r)},e.objectValues=t=>e.objectKeys(t).map((function(e){return t[e]})),e.objectKeys="function"==typeof Object.keys?e=>Object.keys(e):e=>{const t=[];for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t},e.find=(e,t)=>{for(const n of e)if(t(n))return n},e.isInteger="function"==typeof Number.isInteger?e=>Number.isInteger(e):e=>"number"==typeof e&&Number.isFinite(e)&&Math.floor(e)===e,e.joinValues=function(e,t=" | "){return e.map((e=>"string"==typeof e?`'${e}'`:e)).join(t)},e.jsonStringifyReplacer=(e,t)=>"bigint"==typeof t?t.toString():t}(r||(r={})),function(e){e.mergeShapes=(e,t)=>({...e,...t})}(a||(a={}));const s=r.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),i=e=>{switch(typeof e){case"undefined":return s.undefined;case"string":return s.string;case"number":return Number.isNaN(e)?s.nan:s.number;case"boolean":return s.boolean;case"function":return s.function;case"bigint":return s.bigint;case"symbol":return s.symbol;case"object":return Array.isArray(e)?s.array:null===e?s.null:e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch?s.promise:"undefined"!=typeof Map&&e instanceof Map?s.map:"undefined"!=typeof Set&&e instanceof Set?s.set:"undefined"!=typeof Date&&e instanceof Date?s.date:s.object;default:return s.unknown}},o=r.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class l extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};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(e){return e.message},n={_errors:[]},r=e=>{for(const a of e.issues)if("invalid_union"===a.code)a.unionErrors.map(r);else if("invalid_return_type"===a.code)r(a.returnTypeError);else if("invalid_arguments"===a.code)r(a.argumentsError);else if(0===a.path.length)n._errors.push(t(a));else{let e=n,r=0;for(;r<a.path.length;){const n=a.path[r];r===a.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(a))):e[n]=e[n]||{_errors:[]},e=e[n],r++}}};return r(this),n}static assert(e){if(!(e instanceof l))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,r.jsonStringifyReplacer,2)}get isEmpty(){return 0===this.issues.length}flatten(e=e=>e.message){const t={},n=[];for(const r of this.issues)if(r.path.length>0){const n=r.path[0];t[n]=t[n]||[],t[n].push(e(r))}else n.push(e(r));return{formErrors:n,fieldErrors:t}}get formErrors(){return this.flatten()}}l.create=e=>new l(e);const c=(e,t)=>{let n;switch(e.code){case o.invalid_type:n=e.received===s.undefined?"Required":`Expected ${e.expected}, received ${e.received}`;break;case o.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,r.jsonStringifyReplacer)}`;break;case o.unrecognized_keys:n=`Unrecognized key(s) in object: ${r.joinValues(e.keys,", ")}`;break;case o.invalid_union:n="Invalid input";break;case o.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${r.joinValues(e.options)}`;break;case o.invalid_enum_value:n=`Invalid enum value. Expected ${r.joinValues(e.options)}, received '${e.received}'`;break;case o.invalid_arguments:n="Invalid function arguments";break;case o.invalid_return_type:n="Invalid function return type";break;case o.invalid_date:n="Invalid date";break;case o.invalid_string:"object"==typeof e.validation?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,"number"==typeof e.validation.position&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:r.assertNever(e.validation):n="regex"!==e.validation?`Invalid ${e.validation}`:"Invalid";break;case o.too_small:n="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:"number"===e.type||"bigint"===e.type?`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:"date"===e.type?`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:"Invalid input";break;case o.too_big:n="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"bigint"===e.type?`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"date"===e.type?`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:"Invalid input";break;case o.custom:n="Invalid input";break;case o.invalid_intersection_types:n="Intersection results could not be merged";break;case o.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case o.not_finite:n="Number must be finite";break;default:n=t.defaultError,r.assertNever(e)}return{message:n}};let u=c;var p;!function(e){e.errToObj=e=>"string"==typeof e?{message:e}:e||{},e.toString=e=>"string"==typeof e?e:e?.message}(p||(p={}));function d(e,t){const n=u,r=(e=>{const{data:t,path:n,errorMaps:r,issueData:a}=e,s=[...n,...a.path||[]],i={...a,path:s};if(void 0!==a.message)return{...a,path:s,message:a.message};let o="";const l=r.filter((e=>!!e)).slice().reverse();for(const e of l)o=e(i,{data:t,defaultError:o}).message;return{...a,path:s,message:o}})({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===c?void 0:c].filter((e=>!!e))});e.common.issues.push(r)}class m{constructor(){this.value="valid"}dirty(){"valid"===this.value&&(this.value="dirty")}abort(){"aborted"!==this.value&&(this.value="aborted")}static mergeArray(e,t){const n=[];for(const r of t){if("aborted"===r.status)return h;"dirty"===r.status&&e.dirty(),n.push(r.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,t){const n=[];for(const e of t){const t=await e.key,r=await e.value;n.push({key:t,value:r})}return m.mergeObjectSync(e,n)}static mergeObjectSync(e,t){const n={};for(const r of t){const{key:t,value:a}=r;if("aborted"===t.status)return h;if("aborted"===a.status)return h;"dirty"===t.status&&e.dirty(),"dirty"===a.status&&e.dirty(),"__proto__"===t.value||void 0===a.value&&!r.alwaysSet||(n[t.value]=a.value)}return{status:e.value,value:n}}}const h=Object.freeze({status:"aborted"}),f=e=>({status:"dirty",value:e}),v=e=>({status:"valid",value:e}),g=e=>"aborted"===e.status,y=e=>"dirty"===e.status,$=e=>"valid"===e.status,b=e=>"undefined"!=typeof Promise&&e instanceof Promise;var E=n(9606).URL;class S{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||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const A=(e,t)=>{if($(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new l(e.common.issues);return this._error=t,this._error}}};function _(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:a}=e;if(t&&(n||r))throw new Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');return t?{errorMap:t,description:a}:{errorMap:(t,a)=>{const{message:s}=e;return"invalid_enum_value"===t.code?{message:s??a.defaultError}:void 0===a.data?{message:s??r??a.defaultError}:"invalid_type"!==t.code?{message:a.defaultError}:{message:s??n??a.defaultError}},description:a}}class x{get description(){return this._def.description}_getType(e){return i(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:i(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new m,ctx:{common:e.parent.common,data:e.data,parsedType:i(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(b(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){const n={common:{issues:[],async:t?.async??!1,contextualErrorMap:t?.errorMap},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:i(e)},r=this._parseSync({data:e,path:n.path,parent:n});return A(n,r)}"~validate"(e){const t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:i(e)};if(!this["~standard"].async)try{const n=this._parseSync({data:e,path:[],parent:t});return $(n)?{value:n.value}:{issues:t.common.issues}}catch(e){e?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then((e=>$(e)?{value:e.value}:{issues:t.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?.errorMap,async:!0},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:i(e)},r=this._parse({data:e,path:n.path,parent:n}),a=await(b(r)?r:Promise.resolve(r));return A(n,a)}refine(e,t){const n=e=>"string"==typeof t||void 0===t?{message:t}:"function"==typeof t?t(e):t;return this._refinement(((t,r)=>{const a=e(t),s=()=>r.addIssue({code:o.custom,...n(t)});return"undefined"!=typeof Promise&&a instanceof Promise?a.then((e=>!!e||(s(),!1))):!!a||(s(),!1)}))}refinement(e,t){return this._refinement(((n,r)=>!!e(n)||(r.addIssue("function"==typeof t?t(n,r):t),!1)))}_refinement(e){return new Ee({schema:this,typeName:Te.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:e=>this["~validate"](e)}}optional(){return Se.create(this,this._def)}nullable(){return Ae.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ie.create(this)}promise(){return be.create(this,this._def)}or(e){return ce.create([this,e],this._def)}and(e){return pe.create(this,e,this._def)}transform(e){return new Ee({..._(this._def),schema:this,typeName:Te.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t="function"==typeof e?e:()=>e;return new _e({..._(this._def),innerType:this,defaultValue:t,typeName:Te.ZodDefault})}brand(){return new Oe({typeName:Te.ZodBranded,type:this,..._(this._def)})}catch(e){const t="function"==typeof e?e:()=>e;return new xe({..._(this._def),innerType:this,catchValue:t,typeName:Te.ZodCatch})}describe(e){return new(0,this.constructor)({...this._def,description:e})}pipe(e){return Ne.create(this,e)}readonly(){return Ie.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const w=/^c[^\s-]{8,}$/i,O=/^[0-9a-z]+$/,N=/^[0-9A-HJKMNP-TV-Z]{26}$/i,I=/^[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,R=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,C=/^[-+]?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)?)??$/,k=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i;let L;const P=/^(?:(?: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])$/,M=/^(?:(?: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])$/,j=/^(([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]))$/,D=/^(([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])$/,F=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,V=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,q="((\\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])))",B=new RegExp(`^${q}$`);function U(e){let t="[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:null==e.precision&&(t=`${t}(\\.\\d+)?`),`([01]\\d|2[0-3]):[0-5]\\d(:${t})${e.precision?"+":"?"}`}function Y(e){let t=`${q}T${U(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function z(e,t){if(!R.test(e))return!1;try{const[n]=e.split(".");if(!n)return!1;const r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),a=JSON.parse(atob(r));return!("object"!=typeof a||null===a||"typ"in a&&"JWT"!==a?.typ||!a.alg||t&&a.alg!==t)}catch{return!1}}function Z(e,t){return!("v4"!==t&&t||!M.test(e))||!("v6"!==t&&t||!D.test(e))}class G extends x{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==s.string){const t=this._getOrReturnCtx(e);return d(t,{code:o.invalid_type,expected:s.string,received:t.parsedType}),h}const t=new m;let n;for(const s of this._def.checks)if("min"===s.kind)e.data.length<s.value&&(n=this._getOrReturnCtx(e,n),d(n,{code:o.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),t.dirty());else if("max"===s.kind)e.data.length>s.value&&(n=this._getOrReturnCtx(e,n),d(n,{code:o.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),t.dirty());else if("length"===s.kind){const r=e.data.length>s.value,a=e.data.length<s.value;(r||a)&&(n=this._getOrReturnCtx(e,n),r?d(n,{code:o.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):a&&d(n,{code:o.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),t.dirty())}else if("email"===s.kind)k.test(e.data)||(n=this._getOrReturnCtx(e,n),d(n,{validation:"email",code:o.invalid_string,message:s.message}),t.dirty());else if("emoji"===s.kind)L||(L=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),L.test(e.data)||(n=this._getOrReturnCtx(e,n),d(n,{validation:"emoji",code:o.invalid_string,message:s.message}),t.dirty());else if("uuid"===s.kind)I.test(e.data)||(n=this._getOrReturnCtx(e,n),d(n,{validation:"uuid",code:o.invalid_string,message:s.message}),t.dirty());else if("nanoid"===s.kind)T.test(e.data)||(n=this._getOrReturnCtx(e,n),d(n,{validation:"nanoid",code:o.invalid_string,message:s.message}),t.dirty());else if("cuid"===s.kind)w.test(e.data)||(n=this._getOrReturnCtx(e,n),d(n,{validation:"cuid",code:o.invalid_string,message:s.message}),t.dirty());else if("cuid2"===s.kind)O.test(e.data)||(n=this._getOrReturnCtx(e,n),d(n,{validation:"cuid2",code:o.invalid_string,message:s.message}),t.dirty());else if("ulid"===s.kind)N.test(e.data)||(n=this._getOrReturnCtx(e,n),d(n,{validation:"ulid",code:o.invalid_string,message:s.message}),t.dirty());else if("url"===s.kind)try{new E(e.data)}catch{n=this._getOrReturnCtx(e,n),d(n,{validation:"url",code:o.invalid_string,message:s.message}),t.dirty()}else"regex"===s.kind?(s.regex.lastIndex=0,s.regex.test(e.data)||(n=this._getOrReturnCtx(e,n),d(n,{validation:"regex",code:o.invalid_string,message:s.message}),t.dirty())):"trim"===s.kind?e.data=e.data.trim():"includes"===s.kind?e.data.includes(s.value,s.position)||(n=this._getOrReturnCtx(e,n),d(n,{code:o.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),t.dirty()):"toLowerCase"===s.kind?e.data=e.data.toLowerCase():"toUpperCase"===s.kind?e.data=e.data.toUpperCase():"startsWith"===s.kind?e.data.startsWith(s.value)||(n=this._getOrReturnCtx(e,n),d(n,{code:o.invalid_string,validation:{startsWith:s.value},message:s.message}),t.dirty()):"endsWith"===s.kind?e.data.endsWith(s.value)||(n=this._getOrReturnCtx(e,n),d(n,{code:o.invalid_string,validation:{endsWith:s.value},message:s.message}),t.dirty()):"datetime"===s.kind?Y(s).test(e.data)||(n=this._getOrReturnCtx(e,n),d(n,{code:o.invalid_string,validation:"datetime",message:s.message}),t.dirty()):"date"===s.kind?B.test(e.data)||(n=this._getOrReturnCtx(e,n),d(n,{code:o.invalid_string,validation:"date",message:s.message}),t.dirty()):"time"===s.kind?new RegExp(`^${U(s)}$`).test(e.data)||(n=this._getOrReturnCtx(e,n),d(n,{code:o.invalid_string,validation:"time",message:s.message}),t.dirty()):"duration"===s.kind?C.test(e.data)||(n=this._getOrReturnCtx(e,n),d(n,{validation:"duration",code:o.invalid_string,message:s.message}),t.dirty()):"ip"===s.kind?(a=e.data,("v4"!==(i=s.version)&&i||!P.test(a))&&("v6"!==i&&i||!j.test(a))&&(n=this._getOrReturnCtx(e,n),d(n,{validation:"ip",code:o.invalid_string,message:s.message}),t.dirty())):"jwt"===s.kind?z(e.data,s.alg)||(n=this._getOrReturnCtx(e,n),d(n,{validation:"jwt",code:o.invalid_string,message:s.message}),t.dirty()):"cidr"===s.kind?Z(e.data,s.version)||(n=this._getOrReturnCtx(e,n),d(n,{validation:"cidr",code:o.invalid_string,message:s.message}),t.dirty()):"base64"===s.kind?F.test(e.data)||(n=this._getOrReturnCtx(e,n),d(n,{validation:"base64",code:o.invalid_string,message:s.message}),t.dirty()):"base64url"===s.kind?V.test(e.data)||(n=this._getOrReturnCtx(e,n),d(n,{validation:"base64url",code:o.invalid_string,message:s.message}),t.dirty()):r.assertNever(s);var a,i;return{status:t.value,value:e.data}}_regex(e,t,n){return this.refinement((t=>e.test(t)),{validation:t,code:o.invalid_string,...p.errToObj(n)})}_addCheck(e){return new G({...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){return"string"==typeof e?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:void 0===e?.precision?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...p.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return"string"==typeof e?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:void 0===e?.precision?null:e?.precision,...p.errToObj(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?.position,...p.errToObj(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 G({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new G({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new G({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find((e=>"datetime"===e.kind))}get isDate(){return!!this._def.checks.find((e=>"date"===e.kind))}get isTime(){return!!this._def.checks.find((e=>"time"===e.kind))}get isDuration(){return!!this._def.checks.find((e=>"duration"===e.kind))}get isEmail(){return!!this._def.checks.find((e=>"email"===e.kind))}get isURL(){return!!this._def.checks.find((e=>"url"===e.kind))}get isEmoji(){return!!this._def.checks.find((e=>"emoji"===e.kind))}get isUUID(){return!!this._def.checks.find((e=>"uuid"===e.kind))}get isNANOID(){return!!this._def.checks.find((e=>"nanoid"===e.kind))}get isCUID(){return!!this._def.checks.find((e=>"cuid"===e.kind))}get isCUID2(){return!!this._def.checks.find((e=>"cuid2"===e.kind))}get isULID(){return!!this._def.checks.find((e=>"ulid"===e.kind))}get isIP(){return!!this._def.checks.find((e=>"ip"===e.kind))}get isCIDR(){return!!this._def.checks.find((e=>"cidr"===e.kind))}get isBase64(){return!!this._def.checks.find((e=>"base64"===e.kind))}get isBase64url(){return!!this._def.checks.find((e=>"base64url"===e.kind))}get minLength(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}function W(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,a=n>r?n:r;return Number.parseInt(e.toFixed(a).replace(".",""))%Number.parseInt(t.toFixed(a).replace(".",""))/10**a}G.create=e=>new G({checks:[],typeName:Te.ZodString,coerce:e?.coerce??!1,..._(e)});class H extends x{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)!==s.number){const t=this._getOrReturnCtx(e);return d(t,{code:o.invalid_type,expected:s.number,received:t.parsedType}),h}let t;const n=new m;for(const a of this._def.checks)"int"===a.kind?r.isInteger(e.data)||(t=this._getOrReturnCtx(e,t),d(t,{code:o.invalid_type,expected:"integer",received:"float",message:a.message}),n.dirty()):"min"===a.kind?(a.inclusive?e.data<a.value:e.data<=a.value)&&(t=this._getOrReturnCtx(e,t),d(t,{code:o.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),n.dirty()):"max"===a.kind?(a.inclusive?e.data>a.value:e.data>=a.value)&&(t=this._getOrReturnCtx(e,t),d(t,{code:o.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),n.dirty()):"multipleOf"===a.kind?0!==W(e.data,a.value)&&(t=this._getOrReturnCtx(e,t),d(t,{code:o.not_multiple_of,multipleOf:a.value,message:a.message}),n.dirty()):"finite"===a.kind?Number.isFinite(e.data)||(t=this._getOrReturnCtx(e,t),d(t,{code:o.not_finite,message:a.message}),n.dirty()):r.assertNever(a);return{status:n.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 H({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:p.toString(r)}]})}_addCheck(e){return new H({...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)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find((e=>"int"===e.kind||"multipleOf"===e.kind&&r.isInteger(e.value)))}get isFinite(){let e=null,t=null;for(const n of this._def.checks){if("finite"===n.kind||"int"===n.kind||"multipleOf"===n.kind)return!0;"min"===n.kind?(null===t||n.value>t)&&(t=n.value):"max"===n.kind&&(null===e||n.value<e)&&(e=n.value)}return Number.isFinite(t)&&Number.isFinite(e)}}H.create=e=>new H({checks:[],typeName:Te.ZodNumber,coerce:e?.coerce||!1,..._(e)});class K extends x{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)!==s.bigint)return this._getInvalidInput(e);let t;const n=new m;for(const a of this._def.checks)"min"===a.kind?(a.inclusive?e.data<a.value:e.data<=a.value)&&(t=this._getOrReturnCtx(e,t),d(t,{code:o.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),n.dirty()):"max"===a.kind?(a.inclusive?e.data>a.value:e.data>=a.value)&&(t=this._getOrReturnCtx(e,t),d(t,{code:o.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),n.dirty()):"multipleOf"===a.kind?e.data%a.value!==BigInt(0)&&(t=this._getOrReturnCtx(e,t),d(t,{code:o.not_multiple_of,multipleOf:a.value,message:a.message}),n.dirty()):r.assertNever(a);return{status:n.value,value:e.data}}_getInvalidInput(e){const t=this._getOrReturnCtx(e);return d(t,{code:o.invalid_type,expected:s.bigint,received:t.parsedType}),h}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 K({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:p.toString(r)}]})}_addCheck(e){return new K({...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)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}K.create=e=>new K({checks:[],typeName:Te.ZodBigInt,coerce:e?.coerce??!1,..._(e)});class X extends x{_parse(e){if(this._def.coerce&&(e.data=Boolean(e.data)),this._getType(e)!==s.boolean){const t=this._getOrReturnCtx(e);return d(t,{code:o.invalid_type,expected:s.boolean,received:t.parsedType}),h}return v(e.data)}}X.create=e=>new X({typeName:Te.ZodBoolean,coerce:e?.coerce||!1,..._(e)});class J extends x{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==s.date){const t=this._getOrReturnCtx(e);return d(t,{code:o.invalid_type,expected:s.date,received:t.parsedType}),h}if(Number.isNaN(e.data.getTime()))return d(this._getOrReturnCtx(e),{code:o.invalid_date}),h;const t=new m;let n;for(const a of this._def.checks)"min"===a.kind?e.data.getTime()<a.value&&(n=this._getOrReturnCtx(e,n),d(n,{code:o.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),t.dirty()):"max"===a.kind?e.data.getTime()>a.value&&(n=this._getOrReturnCtx(e,n),d(n,{code:o.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),t.dirty()):r.assertNever(a);return{status:t.value,value:new Date(e.data.getTime())}}_addCheck(e){return new J({...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)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return null!=e?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return null!=e?new Date(e):null}}J.create=e=>new J({checks:[],coerce:e?.coerce||!1,typeName:Te.ZodDate,..._(e)});class Q extends x{_parse(e){if(this._getType(e)!==s.symbol){const t=this._getOrReturnCtx(e);return d(t,{code:o.invalid_type,expected:s.symbol,received:t.parsedType}),h}return v(e.data)}}Q.create=e=>new Q({typeName:Te.ZodSymbol,..._(e)});class ee extends x{_parse(e){if(this._getType(e)!==s.undefined){const t=this._getOrReturnCtx(e);return d(t,{code:o.invalid_type,expected:s.undefined,received:t.parsedType}),h}return v(e.data)}}ee.create=e=>new ee({typeName:Te.ZodUndefined,..._(e)});class te extends x{_parse(e){if(this._getType(e)!==s.null){const t=this._getOrReturnCtx(e);return d(t,{code:o.invalid_type,expected:s.null,received:t.parsedType}),h}return v(e.data)}}te.create=e=>new te({typeName:Te.ZodNull,..._(e)});class ne extends x{constructor(){super(...arguments),this._any=!0}_parse(e){return v(e.data)}}ne.create=e=>new ne({typeName:Te.ZodAny,..._(e)});class re extends x{constructor(){super(...arguments),this._unknown=!0}_parse(e){return v(e.data)}}re.create=e=>new re({typeName:Te.ZodUnknown,..._(e)});class ae extends x{_parse(e){const t=this._getOrReturnCtx(e);return d(t,{code:o.invalid_type,expected:s.never,received:t.parsedType}),h}}ae.create=e=>new ae({typeName:Te.ZodNever,..._(e)});class se extends x{_parse(e){if(this._getType(e)!==s.undefined){const t=this._getOrReturnCtx(e);return d(t,{code:o.invalid_type,expected:s.void,received:t.parsedType}),h}return v(e.data)}}se.create=e=>new se({typeName:Te.ZodVoid,..._(e)});class ie extends x{_parse(e){const{ctx:t,status:n}=this._processInputParams(e),r=this._def;if(t.parsedType!==s.array)return d(t,{code:o.invalid_type,expected:s.array,received:t.parsedType}),h;if(null!==r.exactLength){const e=t.data.length>r.exactLength.value,a=t.data.length<r.exactLength.value;(e||a)&&(d(t,{code:e?o.too_big:o.too_small,minimum:a?r.exactLength.value:void 0,maximum:e?r.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:r.exactLength.message}),n.dirty())}if(null!==r.minLength&&t.data.length<r.minLength.value&&(d(t,{code:o.too_small,minimum:r.minLength.value,type:"array",inclusive:!0,exact:!1,message:r.minLength.message}),n.dirty()),null!==r.maxLength&&t.data.length>r.maxLength.value&&(d(t,{code:o.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(((e,n)=>r.type._parseAsync(new S(t,e,t.path,n))))).then((e=>m.mergeArray(n,e)));const a=[...t.data].map(((e,n)=>r.type._parseSync(new S(t,e,t.path,n))));return m.mergeArray(n,a)}get element(){return this._def.type}min(e,t){return new ie({...this._def,minLength:{value:e,message:p.toString(t)}})}max(e,t){return new ie({...this._def,maxLength:{value:e,message:p.toString(t)}})}length(e,t){return new ie({...this._def,exactLength:{value:e,message:p.toString(t)}})}nonempty(e){return this.min(1,e)}}function oe(e){if(e instanceof le){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Se.create(oe(r))}return new le({...e._def,shape:()=>t})}return e instanceof ie?new ie({...e._def,type:oe(e.element)}):e instanceof Se?Se.create(oe(e.unwrap())):e instanceof Ae?Ae.create(oe(e.unwrap())):e instanceof de?de.create(e.items.map((e=>oe(e)))):e}ie.create=(e,t)=>new ie({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Te.ZodArray,..._(t)});class le extends x{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(null!==this._cached)return this._cached;const e=this._def.shape(),t=r.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==s.object){const t=this._getOrReturnCtx(e);return d(t,{code:o.invalid_type,expected:s.object,received:t.parsedType}),h}const{status:t,ctx:n}=this._processInputParams(e),{shape:r,keys:a}=this._getCached(),i=[];if(!(this._def.catchall instanceof ae&&"strip"===this._def.unknownKeys))for(const e in n.data)a.includes(e)||i.push(e);const l=[];for(const e of a){const t=r[e],a=n.data[e];l.push({key:{status:"valid",value:e},value:t._parse(new S(n,a,n.path,e)),alwaysSet:e in n.data})}if(this._def.catchall instanceof ae){const e=this._def.unknownKeys;if("passthrough"===e)for(const e of i)l.push({key:{status:"valid",value:e},value:{status:"valid",value:n.data[e]}});else if("strict"===e)i.length>0&&(d(n,{code:o.unrecognized_keys,keys:i}),t.dirty());else if("strip"!==e)throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const e=this._def.catchall;for(const t of i){const r=n.data[t];l.push({key:{status:"valid",value:t},value:e._parse(new S(n,r,n.path,t)),alwaysSet:t in n.data})}}return n.common.async?Promise.resolve().then((async()=>{const e=[];for(const t of l){const n=await t.key,r=await t.value;e.push({key:n,value:r,alwaysSet:t.alwaysSet})}return e})).then((e=>m.mergeObjectSync(t,e))):m.mergeObjectSync(t,l)}get shape(){return this._def.shape()}strict(e){return p.errToObj,new le({...this._def,unknownKeys:"strict",...void 0!==e?{errorMap:(t,n)=>{const r=this._def.errorMap?.(t,n).message??n.defaultError;return"unrecognized_keys"===t.code?{message:p.errToObj(e).message??r}:{message:r}}}:{}})}strip(){return new le({...this._def,unknownKeys:"strip"})}passthrough(){return new le({...this._def,unknownKeys:"passthrough"})}extend(e){return new le({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new le({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:Te.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new le({...this._def,catchall:e})}pick(e){const t={};for(const n of r.objectKeys(e))e[n]&&this.shape[n]&&(t[n]=this.shape[n]);return new le({...this._def,shape:()=>t})}omit(e){const t={};for(const n of r.objectKeys(this.shape))e[n]||(t[n]=this.shape[n]);return new le({...this._def,shape:()=>t})}deepPartial(){return oe(this)}partial(e){const t={};for(const n of r.objectKeys(this.shape)){const r=this.shape[n];e&&!e[n]?t[n]=r:t[n]=r.optional()}return new le({...this._def,shape:()=>t})}required(e){const t={};for(const n of r.objectKeys(this.shape))if(e&&!e[n])t[n]=this.shape[n];else{let e=this.shape[n];for(;e instanceof Se;)e=e._def.innerType;t[n]=e}return new le({...this._def,shape:()=>t})}keyof(){return ge(r.objectKeys(this.shape))}}le.create=(e,t)=>new le({shape:()=>e,unknownKeys:"strip",catchall:ae.create(),typeName:Te.ZodObject,..._(t)}),le.strictCreate=(e,t)=>new le({shape:()=>e,unknownKeys:"strict",catchall:ae.create(),typeName:Te.ZodObject,..._(t)}),le.lazycreate=(e,t)=>new le({shape:e,unknownKeys:"strip",catchall:ae.create(),typeName:Te.ZodObject,..._(t)});class ce extends x{_parse(e){const{ctx:t}=this._processInputParams(e),n=this._def.options;if(t.common.async)return Promise.all(n.map((async e=>{const n={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:n}),ctx:n}}))).then((function(e){for(const t of e)if("valid"===t.result.status)return t.result;for(const n of e)if("dirty"===n.result.status)return t.common.issues.push(...n.ctx.common.issues),n.result;const n=e.map((e=>new l(e.ctx.common.issues)));return d(t,{code:o.invalid_union,unionErrors:n}),h}));{let e;const r=[];for(const a of n){const n={...t,common:{...t.common,issues:[]},parent:null},s=a._parseSync({data:t.data,path:t.path,parent:n});if("valid"===s.status)return s;"dirty"!==s.status||e||(e={result:s,ctx:n}),n.common.issues.length&&r.push(n.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;const a=r.map((e=>new l(e)));return d(t,{code:o.invalid_union,unionErrors:a}),h}}get options(){return this._def.options}}function ue(e,t){const n=i(e),a=i(t);if(e===t)return{valid:!0,data:e};if(n===s.object&&a===s.object){const n=r.objectKeys(t),a=r.objectKeys(e).filter((e=>-1!==n.indexOf(e))),s={...e,...t};for(const n of a){const r=ue(e[n],t[n]);if(!r.valid)return{valid:!1};s[n]=r.data}return{valid:!0,data:s}}if(n===s.array&&a===s.array){if(e.length!==t.length)return{valid:!1};const n=[];for(let r=0;r<e.length;r++){const a=ue(e[r],t[r]);if(!a.valid)return{valid:!1};n.push(a.data)}return{valid:!0,data:n}}return n===s.date&&a===s.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}ce.create=(e,t)=>new ce({options:e,typeName:Te.ZodUnion,..._(t)});class pe extends x{_parse(e){const{status:t,ctx:n}=this._processInputParams(e),r=(e,r)=>{if(g(e)||g(r))return h;const a=ue(e.value,r.value);return a.valid?((y(e)||y(r))&&t.dirty(),{status:t.value,value:a.data}):(d(n,{code:o.invalid_intersection_types}),h)};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((([e,t])=>r(e,t))):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}))}}pe.create=(e,t,n)=>new pe({left:e,right:t,typeName:Te.ZodIntersection,..._(n)});class de extends x{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==s.array)return d(n,{code:o.invalid_type,expected:s.array,received:n.parsedType}),h;if(n.data.length<this._def.items.length)return d(n,{code:o.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),h;!this._def.rest&&n.data.length>this._def.items.length&&(d(n,{code:o.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const r=[...n.data].map(((e,t)=>{const r=this._def.items[t]||this._def.rest;return r?r._parse(new S(n,e,n.path,t)):null})).filter((e=>!!e));return n.common.async?Promise.all(r).then((e=>m.mergeArray(t,e))):m.mergeArray(t,r)}get items(){return this._def.items}rest(e){return new de({...this._def,rest:e})}}de.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new de({items:e,typeName:Te.ZodTuple,rest:null,..._(t)})};class me extends x{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!==s.map)return d(n,{code:o.invalid_type,expected:s.map,received:n.parsedType}),h;const r=this._def.keyType,a=this._def.valueType,i=[...n.data.entries()].map((([e,t],s)=>({key:r._parse(new S(n,e,n.path,[s,"key"])),value:a._parse(new S(n,t,n.path,[s,"value"]))})));if(n.common.async){const e=new Map;return Promise.resolve().then((async()=>{for(const n of i){const r=await n.key,a=await n.value;if("aborted"===r.status||"aborted"===a.status)return h;"dirty"!==r.status&&"dirty"!==a.status||t.dirty(),e.set(r.value,a.value)}return{status:t.value,value:e}}))}{const e=new Map;for(const n of i){const r=n.key,a=n.value;if("aborted"===r.status||"aborted"===a.status)return h;"dirty"!==r.status&&"dirty"!==a.status||t.dirty(),e.set(r.value,a.value)}return{status:t.value,value:e}}}}me.create=(e,t,n)=>new me({valueType:t,keyType:e,typeName:Te.ZodMap,..._(n)});class he extends x{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==s.set)return d(n,{code:o.invalid_type,expected:s.set,received:n.parsedType}),h;const r=this._def;null!==r.minSize&&n.data.size<r.minSize.value&&(d(n,{code:o.too_small,minimum:r.minSize.value,type:"set",inclusive:!0,exact:!1,message:r.minSize.message}),t.dirty()),null!==r.maxSize&&n.data.size>r.maxSize.value&&(d(n,{code:o.too_big,maximum:r.maxSize.value,type:"set",inclusive:!0,exact:!1,message:r.maxSize.message}),t.dirty());const a=this._def.valueType;function i(e){const n=new Set;for(const r of e){if("aborted"===r.status)return h;"dirty"===r.status&&t.dirty(),n.add(r.value)}return{status:t.value,value:n}}const l=[...n.data.values()].map(((e,t)=>a._parse(new S(n,e,n.path,t))));return n.common.async?Promise.all(l).then((e=>i(e))):i(l)}min(e,t){return new he({...this._def,minSize:{value:e,message:p.toString(t)}})}max(e,t){return new he({...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)}}he.create=(e,t)=>new he({valueType:e,minSize:null,maxSize:null,typeName:Te.ZodSet,..._(t)});class fe extends x{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})}}fe.create=(e,t)=>new fe({getter:e,typeName:Te.ZodLazy,..._(t)});class ve extends x{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return d(t,{received:t.data,code:o.invalid_literal,expected:this._def.value}),h}return{status:"valid",value:e.data}}get value(){return this._def.value}}function ge(e,t){return new ye({values:e,typeName:Te.ZodEnum,..._(t)})}ve.create=(e,t)=>new ve({value:e,typeName:Te.ZodLiteral,..._(t)});class ye extends x{_parse(e){if("string"!=typeof e.data){const t=this._getOrReturnCtx(e),n=this._def.values;return d(t,{expected:r.joinValues(n),received:t.parsedType,code:o.invalid_type}),h}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const t=this._getOrReturnCtx(e),n=this._def.values;return d(t,{received:t.data,code:o.invalid_enum_value,options:n}),h}return v(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 ye.create(e,{...this._def,...t})}exclude(e,t=this._def){return ye.create(this.options.filter((t=>!e.includes(t))),{...this._def,...t})}}ye.create=ge;class $e extends x{_parse(e){const t=r.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==s.string&&n.parsedType!==s.number){const e=r.objectValues(t);return d(n,{expected:r.joinValues(e),received:n.parsedType,code:o.invalid_type}),h}if(this._cache||(this._cache=new Set(r.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const e=r.objectValues(t);return d(n,{received:n.data,code:o.invalid_enum_value,options:e}),h}return v(e.data)}get enum(){return this._def.values}}$e.create=(e,t)=>new $e({values:e,typeName:Te.ZodNativeEnum,..._(t)});class be extends x{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==s.promise&&!1===t.common.async)return d(t,{code:o.invalid_type,expected:s.promise,received:t.parsedType}),h;const n=t.parsedType===s.promise?t.data:Promise.resolve(t.data);return v(n.then((e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap}))))}}be.create=(e,t)=>new be({type:e,typeName:Te.ZodPromise,..._(t)});class Ee extends x{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Te.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:n}=this._processInputParams(e),a=this._def.effect||null,s={addIssue:e=>{d(n,e),e.fatal?t.abort():t.dirty()},get path(){return n.path}};if(s.addIssue=s.addIssue.bind(s),"preprocess"===a.type){const e=a.transform(n.data,s);if(n.common.async)return Promise.resolve(e).then((async e=>{if("aborted"===t.value)return h;const r=await this._def.schema._parseAsync({data:e,path:n.path,parent:n});return"aborted"===r.status?h:"dirty"===r.status||"dirty"===t.value?f(r.value):r}));{if("aborted"===t.value)return h;const r=this._def.schema._parseSync({data:e,path:n.path,parent:n});return"aborted"===r.status?h:"dirty"===r.status||"dirty"===t.value?f(r.value):r}}if("refinement"===a.type){const e=e=>{const t=a.refinement(e,s);if(n.common.async)return Promise.resolve(t);if(t instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return e};if(!1===n.common.async){const r=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return"aborted"===r.status?h:("dirty"===r.status&&t.dirty(),e(r.value),{status:t.value,value:r.value})}return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then((n=>"aborted"===n.status?h:("dirty"===n.status&&t.dirty(),e(n.value).then((()=>({status:t.value,value:n.value}))))))}if("transform"===a.type){if(!1===n.common.async){const e=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!$(e))return h;const r=a.transform(e.value,s);if(r instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:r}}return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then((e=>$(e)?Promise.resolve(a.transform(e.value,s)).then((e=>({status:t.value,value:e}))):h))}r.assertNever(a)}}Ee.create=(e,t,n)=>new Ee({schema:e,typeName:Te.ZodEffects,effect:t,..._(n)}),Ee.createWithPreprocess=(e,t,n)=>new Ee({schema:t,effect:{type:"preprocess",transform:e},typeName:Te.ZodEffects,..._(n)});class Se extends x{_parse(e){return this._getType(e)===s.undefined?v(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Se.create=(e,t)=>new Se({innerType:e,typeName:Te.ZodOptional,..._(t)});class Ae extends x{_parse(e){return this._getType(e)===s.null?v(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Ae.create=(e,t)=>new Ae({innerType:e,typeName:Te.ZodNullable,..._(t)});class _e extends x{_parse(e){const{ctx:t}=this._processInputParams(e);let n=t.data;return t.parsedType===s.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}_e.create=(e,t)=>new _e({innerType:e,typeName:Te.ZodDefault,defaultValue:"function"==typeof t.default?t.default:()=>t.default,..._(t)});class xe extends x{_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 b(r)?r.then((e=>({status:"valid",value:"valid"===e.status?e.value:this._def.catchValue({get error(){return new l(n.common.issues)},input:n.data})}))):{status:"valid",value:"valid"===r.status?r.value:this._def.catchValue({get error(){return new l(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}xe.create=(e,t)=>new xe({innerType:e,typeName:Te.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:()=>t.catch,..._(t)});class we extends x{_parse(e){if(this._getType(e)!==s.nan){const t=this._getOrReturnCtx(e);return d(t,{code:o.invalid_type,expected:s.nan,received:t.parsedType}),h}return{status:"valid",value:e.data}}}we.create=e=>new we({typeName:Te.ZodNaN,..._(e)}),Symbol("zod_brand");class Oe extends x{_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 Ne extends x{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{const e=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return"aborted"===e.status?h:"dirty"===e.status?(t.dirty(),f(e.value)):this._def.out._parseAsync({data:e.value,path:n.path,parent:n})})();{const e=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return"aborted"===e.status?h:"dirty"===e.status?(t.dirty(),{status:"dirty",value:e.value}):this._def.out._parseSync({data:e.value,path:n.path,parent:n})}}static create(e,t){return new Ne({in:e,out:t,typeName:Te.ZodPipeline})}}class Ie extends x{_parse(e){const t=this._def.innerType._parse(e),n=e=>($(e)&&(e.value=Object.freeze(e.value)),e);return b(t)?t.then((e=>n(e))):n(t)}unwrap(){return this._def.innerType}}var Te;Ie.create=(e,t)=>new Ie({innerType:e,typeName:Te.ZodReadonly,..._(t)}),le.lazycreate,function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"}(Te||(Te={}));const Re=G.create,Ce=H.create,ke=(we.create,K.create,X.create),Le=(J.create,Q.create,ee.create,te.create,ne.create,re.create,ae.create,se.create,ie.create),Pe=le.create,Me=(le.strictCreate,ce.create);pe.create,de.create,me.create,he.create,fe.create,ve.create,ye.create,$e.create,be.create,Ee.create,Se.create,Ae.create,Ee.createWithPreprocess,Ne.create},92133:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ENVS=t.ON_PREM=t.ADL=t.ATLAS=void 0;const n="atlas";t.ATLAS=n,t.ADL="adl";const r="on-prem";t.ON_PREM=r;const a=[n,"adl",r];t.ENVS=a},92222:(e,t,n)=>{const r=n(50066),a=n(72857);e.exports=(e,t,n)=>{let s=null,i=null,o=null;try{o=new a(t,n)}catch(e){return null}return e.forEach((e=>{o.test(e)&&(s&&-1!==i.compare(e)||(s=e,i=new r(s,n)))})),s}},92625:(e,t,n)=>{const{MAX_SAFE_COMPONENT_LENGTH:r,MAX_SAFE_BUILD_LENGTH:a,MAX_LENGTH:s}=n(24159),i=n(29385),o=(t=e.exports={}).re=[],l=t.safeRe=[],c=t.src=[],u=t.safeSrc=[],p=t.t={};let d=0;const m="[a-zA-Z0-9-]",h=[["\\s",1],["\\d",s],[m,a]],f=(e,t,n)=>{const r=(e=>{for(const[t,n]of h)e=e.split(`${t}*`).join(`${t}{0,${n}}`).split(`${t}+`).join(`${t}{1,${n}}`);return e})(t),a=d++;i(e,a,t),p[e]=a,c[a]=t,u[a]=r,o[a]=new RegExp(t,n?"g":void 0),l[a]=new RegExp(r,n?"g":void 0)};f("NUMERICIDENTIFIER","0|[1-9]\\d*"),f("NUMERICIDENTIFIERLOOSE","\\d+"),f("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${m}*`),f("MAINVERSION",`(${c[p.NUMERICIDENTIFIER]})\\.(${c[p.NUMERICIDENTIFIER]})\\.(${c[p.NUMERICIDENTIFIER]})`),f("MAINVERSIONLOOSE",`(${c[p.NUMERICIDENTIFIERLOOSE]})\\.(${c[p.NUMERICIDENTIFIERLOOSE]})\\.(${c[p.NUMERICIDENTIFIERLOOSE]})`),f("PRERELEASEIDENTIFIER",`(?:${c[p.NONNUMERICIDENTIFIER]}|${c[p.NUMERICIDENTIFIER]})`),f("PRERELEASEIDENTIFIERLOOSE",`(?:${c[p.NONNUMERICIDENTIFIER]}|${c[p.NUMERICIDENTIFIERLOOSE]})`),f("PRERELEASE",`(?:-(${c[p.PRERELEASEIDENTIFIER]}(?:\\.${c[p.PRERELEASEIDENTIFIER]})*))`),f("PRERELEASELOOSE",`(?:-?(${c[p.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${c[p.PRERELEASEIDENTIFIERLOOSE]})*))`),f("BUILDIDENTIFIER",`${m}+`),f("BUILD",`(?:\\+(${c[p.BUILDIDENTIFIER]}(?:\\.${c[p.BUILDIDENTIFIER]})*))`),f("FULLPLAIN",`v?${c[p.MAINVERSION]}${c[p.PRERELEASE]}?${c[p.BUILD]}?`),f("FULL",`^${c[p.FULLPLAIN]}$`),f("LOOSEPLAIN",`[v=\\s]*${c[p.MAINVERSIONLOOSE]}${c[p.PRERELEASELOOSE]}?${c[p.BUILD]}?`),f("LOOSE",`^${c[p.LOOSEPLAIN]}$`),f("GTLT","((?:<|>)?=?)"),f("XRANGEIDENTIFIERLOOSE",`${c[p.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),f("XRANGEIDENTIFIER",`${c[p.NUMERICIDENTIFIER]}|x|X|\\*`),f("XRANGEPLAIN",`[v=\\s]*(${c[p.XRANGEIDENTIFIER]})(?:\\.(${c[p.XRANGEIDENTIFIER]})(?:\\.(${c[p.XRANGEIDENTIFIER]})(?:${c[p.PRERELEASE]})?${c[p.BUILD]}?)?)?`),f("XRANGEPLAINLOOSE",`[v=\\s]*(${c[p.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[p.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[p.XRANGEIDENTIFIERLOOSE]})(?:${c[p.PRERELEASELOOSE]})?${c[p.BUILD]}?)?)?`),f("XRANGE",`^${c[p.GTLT]}\\s*${c[p.XRANGEPLAIN]}$`),f("XRANGELOOSE",`^${c[p.GTLT]}\\s*${c[p.XRANGEPLAINLOOSE]}$`),f("COERCEPLAIN",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?`),f("COERCE",`${c[p.COERCEPLAIN]}(?:$|[^\\d])`),f("COERCEFULL",c[p.COERCEPLAIN]+`(?:${c[p.PRERELEASE]})?`+`(?:${c[p.BUILD]})?(?:$|[^\\d])`),f("COERCERTL",c[p.COERCE],!0),f("COERCERTLFULL",c[p.COERCEFULL],!0),f("LONETILDE","(?:~>?)"),f("TILDETRIM",`(\\s*)${c[p.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",f("TILDE",`^${c[p.LONETILDE]}${c[p.XRANGEPLAIN]}$`),f("TILDELOOSE",`^${c[p.LONETILDE]}${c[p.XRANGEPLAINLOOSE]}$`),f("LONECARET","(?:\\^)"),f("CARETTRIM",`(\\s*)${c[p.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",f("CARET",`^${c[p.LONECARET]}${c[p.XRANGEPLAIN]}$`),f("CARETLOOSE",`^${c[p.LONECARET]}${c[p.XRANGEPLAINLOOSE]}$`),f("COMPARATORLOOSE",`^${c[p.GTLT]}\\s*(${c[p.LOOSEPLAIN]})$|^$`),f("COMPARATOR",`^${c[p.GTLT]}\\s*(${c[p.FULLPLAIN]})$|^$`),f("COMPARATORTRIM",`(\\s*)${c[p.GTLT]}\\s*(${c[p.LOOSEPLAIN]}|${c[p.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",f("HYPHENRANGE",`^\\s*(${c[p.XRANGEPLAIN]})\\s+-\\s+(${c[p.XRANGEPLAIN]})\\s*$`),f("HYPHENRANGELOOSE",`^\\s*(${c[p.XRANGEPLAINLOOSE]})\\s+-\\s+(${c[p.XRANGEPLAINLOOSE]})\\s*$`),f("STAR","(<|>)?=?\\s*\\*"),f("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),f("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")},92660:e=>{e.exports=class{constructor(){this.max=1e3,this.map=new Map}get(e){const t=this.map.get(e);return void 0===t?void 0:(this.map.delete(e),this.map.set(e,t),t)}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&void 0!==t){if(this.map.size>=this.max){const e=this.map.keys().next().value;this.delete(e)}this.map.set(e,t)}return this}}},92721:e=>{e.exports=class{constructor(){this.max=1e3,this.map=new Map}get(e){const t=this.map.get(e);return void 0===t?void 0:(this.map.delete(e),this.map.set(e,t),t)}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&void 0!==t){if(this.map.size>=this.max){const e=this.map.keys().next().value;this.delete(e)}this.map.set(e,t)}return this}}},92926:e=>{e.exports=function(e){var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var r=n.css,a=n.media,s=n.sourceMap;a?e.setAttribute("media",a):e.removeAttribute("media"),s&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(s))))," */")),t.styleTagTransform(r,e)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},92945:(e,t,n)=>{const r=n(38366);e.exports=(e,t)=>{try{return new r(e,t).range||"*"}catch(e){return null}}},93555:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ANY_NAMESPACE=t.ANY_COLLECTION_NAMESPACE=t.TIME_SERIES=t.VIEW=t.COLLECTION=t.DATABASE=void 0,t.DATABASE="db";const n="coll";t.COLLECTION=n;const r="view";t.VIEW=r;const a="timeseries";t.TIME_SERIES=a;const s=[n,r,a];t.ANY_COLLECTION_NAMESPACE=s;const i=["db",...s];t.ANY_NAMESPACE=i},93766:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BSON_TYPE_ALIASES=void 0,t.BSON_TYPE_ALIASES=[{name:"double",value:"double",label:"double",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"string",value:"string",label:"string",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"object",value:"object",label:"object",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"array",value:"array",label:"array",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"binData",value:"binData",label:"binData",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"objectId",value:"objectId",label:"objectId",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"bool",value:"bool",label:"bool",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"date",value:"date",label:"date",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"null",value:"null",label:"null",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"double",value:"double",label:"double",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"regex",value:"regex",label:"regex",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"javascript",value:"javascript",label:"javascript",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"javascriptWithScope",value:"javascriptWithScope",label:"javascriptWithScope",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"int",value:"int",label:"int",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"timestamp",value:"timestamp",label:"timestamp",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"long",value:"long",label:"long",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"decimal",value:"decimal",label:"decimal",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"minKey",value:"minKey",label:"minKey",score:1,meta:"bson-type-aliases",version:"3.6.0"},{name:"maxKey",value:"maxKey",label:"maxKey",score:1,meta:"bson-type-aliases",version:"3.6.0"}]},94045:(e,t,n)=>{const r=n(24472);e.exports=(e,t,n)=>r(e,t,"<",n)},94463:(e,t,n)=>{const r=n(40289);e.exports=(e,t,n)=>0===r(e,t,n)},94706:(e,t,n)=>{const r=n(94463),a=n(36749),s=n(43334),i=n(47775),o=n(3449),l=n(9418);e.exports=(e,t,n,c)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e===n;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e!==n;case"":case"=":case"==":return r(e,n,c);case"!=":return a(e,n,c);case">":return s(e,n,c);case">=":return i(e,n,c);case"<":return o(e,n,c);case"<=":return l(e,n,c);default:throw new TypeError(`Invalid operator: ${t}`)}}},94715:(e,t,n)=>{const r=n(17914);e.exports=(e,t)=>{const n=r(e,t);return n&&n.prerelease.length?n.prerelease:null}},94893:(e,t,n)=>{n.d(t,{rS:()=>Qe,EB:()=>Ce,bz:()=>lt,YO:()=>ht,K3:()=>He,zM:()=>at,Ie:()=>zt,gM:()=>St,k5:()=>Ot,Nl:()=>Zt,RZ:()=>Ut,eu:()=>It,_H:()=>yt,Zm:()=>dt,ch:()=>it,ai:()=>et,Ik:()=>vt,lq:()=>Ct,g1:()=>xt,re:()=>gt,Yj:()=>Re,KC:()=>bt,L5:()=>ut});var r=n(49189),a=n(71295);class s{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if("function"==typeof e)return e(this,{execution:"sync"}),void e(this,{execution:"async"});const t=e.split("\n").filter((e=>e)),n=Math.min(...t.map((e=>e.length-e.trimStart().length))),r=t.map((e=>e.slice(n))).map((e=>" ".repeat(2*this.indent)+e));for(const e of r)this.content.push(e)}compile(){const e=Function,t=this?.args;return new e(...t,[...(this?.content??[""]).map((e=>` ${e}`))].join("\n"))}}var i=n(84527),o=n(7263),l=n(72510);const c={major:4,minor:0,patch:0};var u=n(9606).URL;const p=r.xI("$ZodType",((e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=c;const a=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&a.unshift(e);for(const t of a)for(const n of t._zod.onattach)n(e);if(0===a.length)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push((()=>{e._zod.run=e._zod.parse}));else{const t=(e,t,n)=>{let a,s=l.QH(e);for(const i of t){if(i._zod.def.when){if(!i._zod.def.when(e))continue}else if(s)continue;const t=e.issues.length,o=i._zod.check(e);if(o instanceof Promise&&!1===n?.async)throw new r.GT;if(a||o instanceof Promise)a=(a??Promise.resolve()).then((async()=>{await o,e.issues.length!==t&&(s||(s=l.QH(e,t)))}));else{if(e.issues.length===t)continue;s||(s=l.QH(e,t))}}return a?a.then((()=>e)):e};e._zod.run=(n,s)=>{const i=e._zod.parse(n,s);if(i instanceof Promise){if(!1===s.async)throw new r.GT;return i.then((e=>t(e,a,s)))}return t(i,a,s)}}e["~standard"]={validate:t=>{try{const n=(0,i.xL)(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch(n){return(0,i.bp)(e,t).then((e=>e.success?{value:e.data}:{issues:e.error?.issues}))}},vendor:"zod",version:1}})),d=r.xI("$ZodString",((e,t)=>{p.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??o.Yj(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch(r){}return"string"==typeof n.value||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}})),m=r.xI("$ZodStringFormat",((e,t)=>{a.ql.init(e,t),d.init(e,t)})),h=r.xI("$ZodGUID",((e,t)=>{t.pattern??(t.pattern=o.Os),m.init(e,t)})),f=r.xI("$ZodUUID",((e,t)=>{if(t.version){const e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(void 0===e)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=o.uR(e))}else t.pattern??(t.pattern=o.uR());m.init(e,t)})),v=r.xI("$ZodEmail",((e,t)=>{t.pattern??(t.pattern=o.Rp),m.init(e,t)})),g=r.xI("$ZodURL",((e,t)=>{m.init(e,t),e._zod.check=n=>{try{const r=n.value,a=new u(r),s=a.href;return t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(a.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:o.OI.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(a.protocol.endsWith(":")?a.protocol.slice(0,-1):a.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),void(!r.endsWith("/")&&s.endsWith("/")?n.value=s.slice(0,-1):n.value=s)}catch(r){n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}})),y=r.xI("$ZodEmoji",((e,t)=>{t.pattern??(t.pattern=o.Zg()),m.init(e,t)})),$=r.xI("$ZodNanoID",((e,t)=>{t.pattern??(t.pattern=o.Ak),m.init(e,t)})),b=r.xI("$ZodCUID",((e,t)=>{t.pattern??(t.pattern=o.gF),m.init(e,t)})),E=r.xI("$ZodCUID2",((e,t)=>{t.pattern??(t.pattern=o.Gl),m.init(e,t)})),S=r.xI("$ZodULID",((e,t)=>{t.pattern??(t.pattern=o.Z0),m.init(e,t)})),A=r.xI("$ZodXID",((e,t)=>{t.pattern??(t.pattern=o.kM),m.init(e,t)})),_=r.xI("$ZodKSUID",((e,t)=>{t.pattern??(t.pattern=o.fO),m.init(e,t)})),x=r.xI("$ZodISODateTime",((e,t)=>{t.pattern??(t.pattern=o.w$(t)),m.init(e,t)})),w=r.xI("$ZodISODate",((e,t)=>{t.pattern??(t.pattern=o.p6),m.init(e,t)})),O=r.xI("$ZodISOTime",((e,t)=>{t.pattern??(t.pattern=o.kB(t)),m.init(e,t)})),N=r.xI("$ZodISODuration",((e,t)=>{t.pattern??(t.pattern=o.p0),m.init(e,t)})),I=r.xI("$ZodIPv4",((e,t)=>{t.pattern??(t.pattern=o.uX),m.init(e,t),e._zod.onattach.push((e=>{e._zod.bag.format="ipv4"}))})),T=r.xI("$ZodIPv6",((e,t)=>{t.pattern??(t.pattern=o.ug),m.init(e,t),e._zod.onattach.push((e=>{e._zod.bag.format="ipv6"})),e._zod.check=n=>{try{new u(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}})),R=r.xI("$ZodCIDRv4",((e,t)=>{t.pattern??(t.pattern=o.zr),m.init(e,t)})),C=r.xI("$ZodCIDRv6",((e,t)=>{t.pattern??(t.pattern=o.l7),m.init(e,t),e._zod.check=n=>{const[r,a]=n.value.split("/");try{if(!a)throw new Error;const e=Number(a);if(`${e}`!==a)throw new Error;if(e<0||e>128)throw new Error;new u(`http://[${r}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}}));function k(e){if(""===e)return!0;if(e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}const L=r.xI("$ZodBase64",((e,t)=>{t.pattern??(t.pattern=o.K3),m.init(e,t),e._zod.onattach.push((e=>{e._zod.bag.contentEncoding="base64"})),e._zod.check=n=>{k(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}})),P=r.xI("$ZodBase64URL",((e,t)=>{t.pattern??(t.pattern=o.r0),m.init(e,t),e._zod.onattach.push((e=>{e._zod.bag.contentEncoding="base64url"})),e._zod.check=n=>{(function(e){if(!o.r0.test(e))return!1;const t=e.replace(/[-_]/g,(e=>"-"===e?"+":"/"));return k(t.padEnd(4*Math.ceil(t.length/4),"="))})(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}})),M=r.xI("$ZodE164",((e,t)=>{t.pattern??(t.pattern=o.hQ),m.init(e,t)})),j=r.xI("$ZodJWT",((e,t)=>{m.init(e,t),e._zod.check=n=>{(function(e,t=null){try{const n=e.split(".");if(3!==n.length)return!1;const[r]=n;if(!r)return!1;const a=JSON.parse(atob(r));return!("typ"in a&&"JWT"!==a?.typ||!a.alg||t&&(!("alg"in a)||a.alg!==t))}catch{return!1}})(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}})),D=r.xI("$ZodNumber",((e,t)=>{p.init(e,t),e._zod.pattern=e._zod.bag.pattern??o.ai,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch(e){}const a=n.value;if("number"==typeof a&&!Number.isNaN(a)&&Number.isFinite(a))return n;const s="number"==typeof a?Number.isNaN(a)?"NaN":Number.isFinite(a)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:a,inst:e,...s?{received:s}:{}}),n}})),F=r.xI("$ZodNumber",((e,t)=>{a.KH.init(e,t),D.init(e,t)})),V=r.xI("$ZodBoolean",((e,t)=>{p.init(e,t),e._zod.pattern=o.zM,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Boolean(n.value)}catch(e){}const a=n.value;return"boolean"==typeof a||n.issues.push({expected:"boolean",code:"invalid_type",input:a,inst:e}),n}})),q=r.xI("$ZodNull",((e,t)=>{p.init(e,t),e._zod.pattern=o.ch,e._zod.values=new Set([null]),e._zod.parse=(t,n)=>{const r=t.value;return null===r||t.issues.push({expected:"null",code:"invalid_type",input:r,inst:e}),t}})),B=r.xI("$ZodAny",((e,t)=>{p.init(e,t),e._zod.parse=e=>e})),U=r.xI("$ZodUnknown",((e,t)=>{p.init(e,t),e._zod.parse=e=>e})),Y=r.xI("$ZodNever",((e,t)=>{p.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:"never",code:"invalid_type",input:t.value,inst:e}),t)}));function z(e,t,n){e.issues.length&&t.issues.push(...l.lQ(n,e.issues)),t.value[n]=e.value}const Z=r.xI("$ZodArray",((e,t)=>{p.init(e,t),e._zod.parse=(n,r)=>{const a=n.value;if(!Array.isArray(a))return n.issues.push({expected:"array",code:"invalid_type",input:a,inst:e}),n;n.value=Array(a.length);const s=[];for(let e=0;e<a.length;e++){const i=a[e],o=t.element._zod.run({value:i,issues:[]},r);o instanceof Promise?s.push(o.then((t=>z(t,n,e)))):z(o,n,e)}return s.length?Promise.all(s).then((()=>n)):n}}));function G(e,t,n){e.issues.length&&t.issues.push(...l.lQ(n,e.issues)),t.value[n]=e.value}function W(e,t,n,r){e.issues.length?void 0===r[n]?t.value[n]=n in r?void 0:e.value:t.issues.push(...l.lQ(n,e.issues)):void 0===e.value?n in r&&(t.value[n]=void 0):t.value[n]=e.value}const H=r.xI("$ZodObject",((e,t)=>{p.init(e,t);const n=l.PO((()=>{const e=Object.keys(t.shape);for(const n of e)if(!(t.shape[n]instanceof p))throw new Error(`Invalid element at key "${n}": expected a Zod schema`);const n=l.NM(t.shape);return{shape:t.shape,keys:e,keySet:new Set(e),numKeys:e.length,optionalKeys:new Set(n)}}));let a;l.gJ(e._zod,"propValues",(()=>{const e=t.shape,n={};for(const t in e){const r=e[t]._zod;if(r.values){n[t]??(n[t]=new Set);for(const e of r.values)n[t].add(e)}}return n}));const i=l.Gv,o=!r.cr.jitless,c=l.hI,u=o&&c.value,d=t.catchall;let m;e._zod.parse=(r,c)=>{m??(m=n.value);const p=r.value;if(!i(p))return r.issues.push({expected:"object",code:"invalid_type",input:p,inst:e}),r;const h=[];if(o&&u&&!1===c?.async&&!0!==c.jitless)a||(a=(e=>{const t=new s(["shape","payload","ctx"]),r=n.value,a=e=>{const t=l.UQ(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write("const input = payload.value;");const i=Object.create(null);let o=0;for(const e of r.keys)i[e]="key_"+o++;t.write("const newResult = {}");for(const e of r.keys)if(r.optionalKeys.has(e)){const n=i[e];t.write(`const ${n} = ${a(e)};`);const r=l.UQ(e);t.write(`\n if (${n}.issues.length) {\n if (input[${r}] === undefined) {\n if (${r} in input) {\n newResult[${r}] = undefined;\n }\n } else {\n payload.issues = payload.issues.concat(\n ${n}.issues.map((iss) => ({\n ...iss,\n path: iss.path ? [${r}, ...iss.path] : [${r}],\n }))\n );\n }\n } else if (${n}.value === undefined) {\n if (${r} in input) newResult[${r}] = undefined;\n } else {\n newResult[${r}] = ${n}.value;\n }\n `)}else{const n=i[e];t.write(`const ${n} = ${a(e)};`),t.write(`\n if (${n}.issues.length) payload.issues = payload.issues.concat(${n}.issues.map(iss => ({\n ...iss,\n path: iss.path ? [${l.UQ(e)}, ...iss.path] : [${l.UQ(e)}]\n })));`),t.write(`newResult[${l.UQ(e)}] = ${n}.value`)}t.write("payload.value = newResult;"),t.write("return payload;");const c=t.compile();return(t,n)=>c(e,t,n)})(t.shape)),r=a(r,c);else{r.value={};const e=m.shape;for(const t of m.keys){const n=e[t],a=n._zod.run({value:p[t],issues:[]},c),s="optional"===n._zod.optin&&"optional"===n._zod.optout;a instanceof Promise?h.push(a.then((e=>s?W(e,r,t,p):G(e,r,t)))):s?W(a,r,t,p):G(a,r,t)}}if(!d)return h.length?Promise.all(h).then((()=>r)):r;const f=[],v=m.keySet,g=d._zod,y=g.def.type;for(const e of Object.keys(p)){if(v.has(e))continue;if("never"===y){f.push(e);continue}const t=g.run({value:p[e],issues:[]},c);t instanceof Promise?h.push(t.then((t=>G(t,r,e)))):G(t,r,e)}return f.length&&r.issues.push({code:"unrecognized_keys",keys:f,input:p,inst:e}),h.length?Promise.all(h).then((()=>r)):r}}));function K(e,t,n,a){for(const n of e)if(0===n.issues.length)return t.value=n.value,t;return t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map((e=>e.issues.map((e=>l.iR(e,a,r.$W())))))}),t}const X=r.xI("$ZodUnion",((e,t)=>{p.init(e,t),l.gJ(e._zod,"optin",(()=>t.options.some((e=>"optional"===e._zod.optin))?"optional":void 0)),l.gJ(e._zod,"optout",(()=>t.options.some((e=>"optional"===e._zod.optout))?"optional":void 0)),l.gJ(e._zod,"values",(()=>{if(t.options.every((e=>e._zod.values)))return new Set(t.options.flatMap((e=>Array.from(e._zod.values))))})),l.gJ(e._zod,"pattern",(()=>{if(t.options.every((e=>e._zod.pattern))){const e=t.options.map((e=>e._zod.pattern));return new RegExp(`^(${e.map((e=>l.p6(e.source))).join("|")})$`)}})),e._zod.parse=(n,r)=>{let a=!1;const s=[];for(const e of t.options){const t=e._zod.run({value:n.value,issues:[]},r);if(t instanceof Promise)s.push(t),a=!0;else{if(0===t.issues.length)return t;s.push(t)}}return a?Promise.all(s).then((t=>K(t,n,e,r))):K(s,n,e,r)}})),J=r.xI("$ZodDiscriminatedUnion",((e,t)=>{X.init(e,t);const n=e._zod.parse;l.gJ(e._zod,"propValues",(()=>{const e={};for(const n of t.options){const r=n._zod.propValues;if(!r||0===Object.keys(r).length)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(n)}"`);for(const[t,n]of Object.entries(r)){e[t]||(e[t]=new Set);for(const r of n)e[t].add(r)}}return e}));const r=l.PO((()=>{const e=t.options,n=new Map;for(const r of e){const e=r._zod.propValues[t.discriminator];if(!e||0===e.size)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(r)}"`);for(const t of e){if(n.has(t))throw new Error(`Duplicate discriminator value "${String(t)}"`);n.set(t,r)}}return n}));e._zod.parse=(a,s)=>{const i=a.value;if(!l.Gv(i))return a.issues.push({code:"invalid_type",expected:"object",input:i,inst:e}),a;const o=r.value.get(i?.[t.discriminator]);return o?o._zod.run(a,s):t.unionFallback?n(a,s):(a.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",input:i,path:[t.discriminator],inst:e}),a)}})),Q=r.xI("$ZodIntersection",((e,t)=>{p.init(e,t),e._zod.parse=(e,n)=>{const r=e.value,a=t.left._zod.run({value:r,issues:[]},n),s=t.right._zod.run({value:r,issues:[]},n);return a instanceof Promise||s instanceof Promise?Promise.all([a,s]).then((([t,n])=>te(e,t,n))):te(e,a,s)}}));function ee(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(l.Qd(e)&&l.Qd(t)){const n=Object.keys(t),r=Object.keys(e).filter((e=>-1!==n.indexOf(e))),a={...e,...t};for(const n of r){const r=ee(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};a[n]=r.data}return{valid:!0,data:a}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let r=0;r<e.length;r++){const a=ee(e[r],t[r]);if(!a.valid)return{valid:!1,mergeErrorPath:[r,...a.mergeErrorPath]};n.push(a.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function te(e,t,n){if(t.issues.length&&e.issues.push(...t.issues),n.issues.length&&e.issues.push(...n.issues),l.QH(e))return e;const r=ee(t.value,n.value);if(!r.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(r.mergeErrorPath)}`);return e.value=r.data,e}const ne=r.xI("$ZodRecord",((e,t)=>{p.init(e,t),e._zod.parse=(n,a)=>{const s=n.value;if(!l.Qd(s))return n.issues.push({expected:"record",code:"invalid_type",input:s,inst:e}),n;const i=[];if(t.keyType._zod.values){const r=t.keyType._zod.values;n.value={};for(const e of r)if("string"==typeof e||"number"==typeof e||"symbol"==typeof e){const r=t.valueType._zod.run({value:s[e],issues:[]},a);r instanceof Promise?i.push(r.then((t=>{t.issues.length&&n.issues.push(...l.lQ(e,t.issues)),n.value[e]=t.value}))):(r.issues.length&&n.issues.push(...l.lQ(e,r.issues)),n.value[e]=r.value)}let o;for(const e in s)r.has(e)||(o=o??[],o.push(e));o&&o.length>0&&n.issues.push({code:"unrecognized_keys",input:s,inst:e,keys:o})}else{n.value={};for(const o of Reflect.ownKeys(s)){if("__proto__"===o)continue;const c=t.keyType._zod.run({value:o,issues:[]},a);if(c instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(c.issues.length){n.issues.push({origin:"record",code:"invalid_key",issues:c.issues.map((e=>l.iR(e,a,r.$W()))),input:o,path:[o],inst:e}),n.value[c.value]=c.value;continue}const u=t.valueType._zod.run({value:s[o],issues:[]},a);u instanceof Promise?i.push(u.then((e=>{e.issues.length&&n.issues.push(...l.lQ(o,e.issues)),n.value[c.value]=e.value}))):(u.issues.length&&n.issues.push(...l.lQ(o,u.issues)),n.value[c.value]=u.value)}}return i.length?Promise.all(i).then((()=>n)):n}})),re=r.xI("$ZodEnum",((e,t)=>{p.init(e,t);const n=l.w5(t.entries);e._zod.values=new Set(n),e._zod.pattern=new RegExp(`^(${n.filter((e=>l.qQ.has(typeof e))).map((e=>"string"==typeof e?l.$f(e):e.toString())).join("|")})$`),e._zod.parse=(t,r)=>{const a=t.value;return e._zod.values.has(a)||t.issues.push({code:"invalid_value",values:n,input:a,inst:e}),t}})),ae=r.xI("$ZodLiteral",((e,t)=>{p.init(e,t),e._zod.values=new Set(t.values),e._zod.pattern=new RegExp(`^(${t.values.map((e=>"string"==typeof e?l.$f(e):e?e.toString():String(e))).join("|")})$`),e._zod.parse=(n,r)=>{const a=n.value;return e._zod.values.has(a)||n.issues.push({code:"invalid_value",values:t.values,input:a,inst:e}),n}})),se=r.xI("$ZodTransform",((e,t)=>{p.init(e,t),e._zod.parse=(e,n)=>{const a=t.transform(e.value,e);if(n.async)return(a instanceof Promise?a:Promise.resolve(a)).then((t=>(e.value=t,e)));if(a instanceof Promise)throw new r.GT;return e.value=a,e}})),ie=r.xI("$ZodOptional",((e,t)=>{p.init(e,t),e._zod.optin="optional",e._zod.optout="optional",l.gJ(e._zod,"values",(()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0)),l.gJ(e._zod,"pattern",(()=>{const e=t.innerType._zod.pattern;return e?new RegExp(`^(${l.p6(e.source)})?$`):void 0})),e._zod.parse=(e,n)=>"optional"===t.innerType._zod.optin?t.innerType._zod.run(e,n):void 0===e.value?e:t.innerType._zod.run(e,n)})),oe=r.xI("$ZodNullable",((e,t)=>{p.init(e,t),l.gJ(e._zod,"optin",(()=>t.innerType._zod.optin)),l.gJ(e._zod,"optout",(()=>t.innerType._zod.optout)),l.gJ(e._zod,"pattern",(()=>{const e=t.innerType._zod.pattern;return e?new RegExp(`^(${l.p6(e.source)}|null)$`):void 0})),l.gJ(e._zod,"values",(()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0)),e._zod.parse=(e,n)=>null===e.value?e:t.innerType._zod.run(e,n)})),le=r.xI("$ZodDefault",((e,t)=>{p.init(e,t),e._zod.optin="optional",l.gJ(e._zod,"values",(()=>t.innerType._zod.values)),e._zod.parse=(e,n)=>{if(void 0===e.value)return e.value=t.defaultValue,e;const r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then((e=>ce(e,t))):ce(r,t)}}));function ce(e,t){return void 0===e.value&&(e.value=t.defaultValue),e}const ue=r.xI("$ZodPrefault",((e,t)=>{p.init(e,t),e._zod.optin="optional",l.gJ(e._zod,"values",(()=>t.innerType._zod.values)),e._zod.parse=(e,n)=>(void 0===e.value&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))})),pe=r.xI("$ZodNonOptional",((e,t)=>{p.init(e,t),l.gJ(e._zod,"values",(()=>{const e=t.innerType._zod.values;return e?new Set([...e].filter((e=>void 0!==e))):void 0})),e._zod.parse=(n,r)=>{const a=t.innerType._zod.run(n,r);return a instanceof Promise?a.then((t=>de(t,e))):de(a,e)}}));function de(e,t){return e.issues.length||void 0!==e.value||e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const me=r.xI("$ZodCatch",((e,t)=>{p.init(e,t),e._zod.optin="optional",l.gJ(e._zod,"optout",(()=>t.innerType._zod.optout)),l.gJ(e._zod,"values",(()=>t.innerType._zod.values)),e._zod.parse=(e,n)=>{const a=t.innerType._zod.run(e,n);return a instanceof Promise?a.then((a=>(e.value=a.value,a.issues.length&&(e.value=t.catchValue({...e,error:{issues:a.issues.map((e=>l.iR(e,n,r.$W())))},input:e.value}),e.issues=[]),e))):(e.value=a.value,a.issues.length&&(e.value=t.catchValue({...e,error:{issues:a.issues.map((e=>l.iR(e,n,r.$W())))},input:e.value}),e.issues=[]),e)}})),he=r.xI("$ZodPipe",((e,t)=>{p.init(e,t),l.gJ(e._zod,"values",(()=>t.in._zod.values)),l.gJ(e._zod,"optin",(()=>t.in._zod.optin)),l.gJ(e._zod,"optout",(()=>t.out._zod.optout)),e._zod.parse=(e,n)=>{const r=t.in._zod.run(e,n);return r instanceof Promise?r.then((e=>fe(e,t,n))):fe(r,t,n)}}));function fe(e,t,n){return l.QH(e)?e:t.out._zod.run({value:e.value,issues:e.issues},n)}const ve=r.xI("$ZodReadonly",((e,t)=>{p.init(e,t),l.gJ(e._zod,"propValues",(()=>t.innerType._zod.propValues)),l.gJ(e._zod,"values",(()=>t.innerType._zod.values)),l.gJ(e._zod,"optin",(()=>t.innerType._zod.optin)),l.gJ(e._zod,"optout",(()=>t.innerType._zod.optout)),e._zod.parse=(e,n)=>{const r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(ge):ge(r)}}));function ge(e){return e.value=Object.freeze(e.value),e}const ye=r.xI("$ZodLazy",((e,t)=>{p.init(e,t),l.gJ(e._zod,"innerType",(()=>t.getter())),l.gJ(e._zod,"pattern",(()=>e._zod.innerType._zod.pattern)),l.gJ(e._zod,"propValues",(()=>e._zod.innerType._zod.propValues)),l.gJ(e._zod,"optin",(()=>e._zod.innerType._zod.optin)),l.gJ(e._zod,"optout",(()=>e._zod.innerType._zod.optout)),e._zod.parse=(t,n)=>e._zod.innerType._zod.run(t,n)})),$e=r.xI("$ZodCustom",((e,t)=>{a.QP.init(e,t),p.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{const r=n.value,a=t.fn(r);if(a instanceof Promise)return a.then((t=>be(t,n,r,e)));be(a,n,r,e)}}));function be(e,t,n,r){if(!e){const e={code:"custom",input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(l.sn(e))}}var Ee=n(39581),Se=n(1280);const Ae=r.xI("ZodISODateTime",((e,t)=>{x.init(e,t),Ce.init(e,t)})),_e=r.xI("ZodISODate",((e,t)=>{w.init(e,t),Ce.init(e,t)})),xe=r.xI("ZodISOTime",((e,t)=>{O.init(e,t),Ce.init(e,t)})),we=r.xI("ZodISODuration",((e,t)=>{N.init(e,t),Ce.init(e,t)}));var Oe=n(2420);const Ne=r.xI("ZodType",((e,t)=>(p.init(e,t),e.def=t,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone({...t,checks:[...t.checks??[],...n.map((e=>"function"==typeof e?{_zod:{check:e,def:{check:"custom"},onattach:[]}}:e))]}),e.clone=(t,n)=>l.o8(e,t,n),e.brand=()=>e,e.register=(t,n)=>(t.add(e,n),e),e.parse=(t,n)=>Oe.qg(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>Oe.xL(e,t,n),e.parseAsync=async(t,n)=>Oe.EJ(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>Oe.bp(e,t,n),e.spa=e.safeParseAsync,e.refine=(t,n)=>e.check(function(e,t={}){return Se.fU(Yt,e,t)}(t,n)),e.superRefine=t=>e.check(function(e){const t=function(e){const t=new a.QP({check:"custom"});return t._zod.check=e,t}((n=>(n.addIssue=e=>{if("string"==typeof e)n.issues.push(l.sn(e,n.value,t._zod.def));else{const r=e;r.fatal&&(r.continue=!1),r.code??(r.code="custom"),r.input??(r.input=n.value),r.inst??(r.inst=t),r.continue??(r.continue=!t._zod.def.abort),n.issues.push(l.sn(r))}},e(n.value,n))));return t}(t)),e.overwrite=t=>e.check(Se.bS(t)),e.optional=()=>Ct(e),e.nullable=()=>Lt(e),e.nullish=()=>Ct(Lt(e)),e.nonoptional=t=>function(e,t){return new jt({type:"nonoptional",innerType:e,...l.A2(t)})}(e,t),e.array=()=>ht(e),e.or=t=>bt([e,t]),e.and=t=>new At({type:"intersection",left:e,right:t}),e.transform=t=>Vt(e,new Tt({type:"transform",transform:t})),e.default=t=>{return n=t,new Pt({type:"default",innerType:e,get defaultValue(){return"function"==typeof n?n():n}});var n},e.prefault=t=>{return n=t,new Mt({type:"prefault",innerType:e,get defaultValue(){return"function"==typeof n?n():n}});var n},e.catch=t=>{return new Dt({type:"catch",innerType:e,catchValue:"function"==typeof(n=t)?n:()=>n});var n},e.pipe=t=>Vt(e,t),e.readonly=()=>new qt({type:"readonly",innerType:e}),e.describe=t=>{const n=e.clone();return Ee.fd.add(n,{description:t}),n},Object.defineProperty(e,"description",{get:()=>Ee.fd.get(e)?.description,configurable:!0}),e.meta=(...t)=>{if(0===t.length)return Ee.fd.get(e);const n=e.clone();return Ee.fd.add(n,t[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e))),Ie=r.xI("_ZodString",((e,t)=>{d.init(e,t),Ne.init(e,t);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...t)=>e.check(Se.Fk(...t)),e.includes=(...t)=>e.check(Se.dR(...t)),e.startsWith=(...t)=>e.check(Se.$S(...t)),e.endsWith=(...t)=>e.check(Se.ER(...t)),e.min=(...t)=>e.check(Se.m9(...t)),e.max=(...t)=>e.check(Se.Eb(...t)),e.length=(...t)=>e.check(Se.YA(...t)),e.nonempty=(...t)=>e.check(Se.m9(1,...t)),e.lowercase=t=>e.check(Se.hH(t)),e.uppercase=t=>e.check(Se.qF(t)),e.trim=()=>e.check(Se.WN()),e.normalize=(...t)=>e.check(Se.lo(...t)),e.toLowerCase=()=>e.check(Se.Il()),e.toUpperCase=()=>e.check(Se.xY())})),Te=r.xI("ZodString",((e,t)=>{d.init(e,t),Ie.init(e,t),e.email=t=>e.check(Se.Mu(ke,t)),e.url=t=>e.check(Se.Fn(Me,t)),e.jwt=t=>e.check(Se.rk(Je,t)),e.emoji=t=>e.check(Se.aC(je,t)),e.guid=t=>e.check(Se.tB(Le,t)),e.uuid=t=>e.check(Se.Be(Pe,t)),e.uuidv4=t=>e.check(Se.nA(Pe,t)),e.uuidv6=t=>e.check(Se.pY(Pe,t)),e.uuidv7=t=>e.check(Se.wA(Pe,t)),e.nanoid=t=>e.check(Se.Dl(De,t)),e.guid=t=>e.check(Se.tB(Le,t)),e.cuid=t=>e.check(Se.fs(Fe,t)),e.cuid2=t=>e.check(Se.Bj(Ve,t)),e.ulid=t=>e.check(Se.Ct(qe,t)),e.base64=t=>e.check(Se.rt(We,t)),e.base64url=t=>e.check(Se.cU(Ke,t)),e.xid=t=>e.check(Se.Pw(Be,t)),e.ksuid=t=>e.check(Se._z(Ue,t)),e.ipv4=t=>e.check(Se.Ny(Ye,t)),e.ipv6=t=>e.check(Se.$O(ze,t)),e.cidrv4=t=>e.check(Se.Uy(Ze,t)),e.cidrv6=t=>e.check(Se.gP(Ge,t)),e.e164=t=>e.check(Se.KB(Xe,t)),e.datetime=t=>e.check(function(e){return Se.G1(Ae,e)}(t)),e.date=t=>e.check(function(e){return Se.db(_e,e)}(t)),e.time=t=>e.check(function(e){return Se.Kn(xe,e)}(t)),e.duration=t=>e.check(function(e){return Se.f2(we,e)}(t))}));function Re(e){return Se.Rl(Te,e)}const Ce=r.xI("ZodStringFormat",((e,t)=>{m.init(e,t),Ie.init(e,t)})),ke=r.xI("ZodEmail",((e,t)=>{v.init(e,t),Ce.init(e,t)})),Le=r.xI("ZodGUID",((e,t)=>{h.init(e,t),Ce.init(e,t)})),Pe=r.xI("ZodUUID",((e,t)=>{f.init(e,t),Ce.init(e,t)})),Me=r.xI("ZodURL",((e,t)=>{g.init(e,t),Ce.init(e,t)})),je=r.xI("ZodEmoji",((e,t)=>{y.init(e,t),Ce.init(e,t)})),De=r.xI("ZodNanoID",((e,t)=>{$.init(e,t),Ce.init(e,t)})),Fe=r.xI("ZodCUID",((e,t)=>{b.init(e,t),Ce.init(e,t)})),Ve=r.xI("ZodCUID2",((e,t)=>{E.init(e,t),Ce.init(e,t)})),qe=r.xI("ZodULID",((e,t)=>{S.init(e,t),Ce.init(e,t)})),Be=r.xI("ZodXID",((e,t)=>{A.init(e,t),Ce.init(e,t)})),Ue=r.xI("ZodKSUID",((e,t)=>{_.init(e,t),Ce.init(e,t)})),Ye=r.xI("ZodIPv4",((e,t)=>{I.init(e,t),Ce.init(e,t)})),ze=r.xI("ZodIPv6",((e,t)=>{T.init(e,t),Ce.init(e,t)})),Ze=r.xI("ZodCIDRv4",((e,t)=>{R.init(e,t),Ce.init(e,t)})),Ge=r.xI("ZodCIDRv6",((e,t)=>{C.init(e,t),Ce.init(e,t)})),We=r.xI("ZodBase64",((e,t)=>{L.init(e,t),Ce.init(e,t)}));function He(e){return Se.rt(We,e)}const Ke=r.xI("ZodBase64URL",((e,t)=>{P.init(e,t),Ce.init(e,t)})),Xe=r.xI("ZodE164",((e,t)=>{M.init(e,t),Ce.init(e,t)})),Je=r.xI("ZodJWT",((e,t)=>{j.init(e,t),Ce.init(e,t)})),Qe=r.xI("ZodNumber",((e,t)=>{D.init(e,t),Ne.init(e,t),e.gt=(t,n)=>e.check(Se.Tx(t,n)),e.gte=(t,n)=>e.check(Se.qm(t,n)),e.min=(t,n)=>e.check(Se.qm(t,n)),e.lt=(t,n)=>e.check(Se.Au(t,n)),e.lte=(t,n)=>e.check(Se.Zm(t,n)),e.max=(t,n)=>e.check(Se.Zm(t,n)),e.int=t=>e.check(nt(t)),e.safe=t=>e.check(nt(t)),e.positive=t=>e.check(Se.Tx(0,t)),e.nonnegative=t=>e.check(Se.qm(0,t)),e.negative=t=>e.check(Se.Au(0,t)),e.nonpositive=t=>e.check(Se.Zm(0,t)),e.multipleOf=(t,n)=>e.check(Se.Hi(t,n)),e.step=(t,n)=>e.check(Se.Hi(t,n)),e.finite=()=>e;const n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null}));function et(e){return Se.F7(Qe,e)}const tt=r.xI("ZodNumberFormat",((e,t)=>{F.init(e,t),Qe.init(e,t)}));function nt(e){return Se.LK(tt,e)}const rt=r.xI("ZodBoolean",((e,t)=>{V.init(e,t),Ne.init(e,t)}));function at(e){return Se._L(rt,e)}const st=r.xI("ZodNull",((e,t)=>{q.init(e,t),Ne.init(e,t)}));function it(e){return Se.jw(st,e)}const ot=r.xI("ZodAny",((e,t)=>{B.init(e,t),Ne.init(e,t)}));function lt(){return Se.KA(ot)}const ct=r.xI("ZodUnknown",((e,t)=>{U.init(e,t),Ne.init(e,t)}));function ut(){return Se.em(ct)}const pt=r.xI("ZodNever",((e,t)=>{Y.init(e,t),Ne.init(e,t)}));function dt(e){return Se.G8(pt,e)}const mt=r.xI("ZodArray",((e,t)=>{Z.init(e,t),Ne.init(e,t),e.element=t.element,e.min=(t,n)=>e.check(Se.m9(t,n)),e.nonempty=t=>e.check(Se.m9(1,t)),e.max=(t,n)=>e.check(Se.Eb(t,n)),e.length=(t,n)=>e.check(Se.YA(t,n)),e.unwrap=()=>e.element}));function ht(e,t){return Se.dZ(mt,e,t)}const ft=r.xI("ZodObject",((e,t)=>{H.init(e,t),Ne.init(e,t),l.gJ(e,"shape",(()=>t.shape)),e.keyof=()=>Ot(Object.keys(e._zod.def.shape)),e.catchall=t=>e.clone({...e._zod.def,catchall:t}),e.passthrough=()=>e.clone({...e._zod.def,catchall:ut()}),e.loose=()=>e.clone({...e._zod.def,catchall:ut()}),e.strict=()=>e.clone({...e._zod.def,catchall:dt()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=t=>l.X$(e,t),e.merge=t=>l.h1(e,t),e.pick=t=>l.Up(e,t),e.omit=t=>l.cJ(e,t),e.partial=(...t)=>l.OH(Rt,e,t[0]),e.required=(...t)=>l.mw(jt,e,t[0])}));function vt(e,t){const n={type:"object",get shape(){return l.Vy(this,"shape",{...e}),this.shape},...l.A2(t)};return new ft(n)}function gt(e,t){return new ft({type:"object",get shape(){return l.Vy(this,"shape",{...e}),this.shape},catchall:dt(),...l.A2(t)})}function yt(e,t){return new ft({type:"object",get shape(){return l.Vy(this,"shape",{...e}),this.shape},catchall:ut(),...l.A2(t)})}const $t=r.xI("ZodUnion",((e,t)=>{X.init(e,t),Ne.init(e,t),e.options=t.options}));function bt(e,t){return new $t({type:"union",options:e,...l.A2(t)})}const Et=r.xI("ZodDiscriminatedUnion",((e,t)=>{$t.init(e,t),J.init(e,t)}));function St(e,t,n){return new Et({type:"union",options:t,discriminator:e,...l.A2(n)})}const At=r.xI("ZodIntersection",((e,t)=>{Q.init(e,t),Ne.init(e,t)})),_t=r.xI("ZodRecord",((e,t)=>{ne.init(e,t),Ne.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType}));function xt(e,t,n){return new _t({type:"record",keyType:e,valueType:t,...l.A2(n)})}const wt=r.xI("ZodEnum",((e,t)=>{re.init(e,t),Ne.init(e,t),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{const a={};for(const r of e){if(!n.has(r))throw new Error(`Key ${r} not found in enum`);a[r]=t.entries[r]}return new wt({...t,checks:[],...l.A2(r),entries:a})},e.exclude=(e,r)=>{const a={...t.entries};for(const t of e){if(!n.has(t))throw new Error(`Key ${t} not found in enum`);delete a[t]}return new wt({...t,checks:[],...l.A2(r),entries:a})}}));function Ot(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map((e=>[e,e]))):e;return new wt({type:"enum",entries:n,...l.A2(t)})}const Nt=r.xI("ZodLiteral",((e,t)=>{ae.init(e,t),Ne.init(e,t),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})}));function It(e,t){return new Nt({type:"literal",values:Array.isArray(e)?e:[e],...l.A2(t)})}const Tt=r.xI("ZodTransform",((e,t)=>{se.init(e,t),Ne.init(e,t),e._zod.parse=(n,r)=>{n.addIssue=r=>{if("string"==typeof r)n.issues.push(l.sn(r,n.value,t));else{const t=r;t.fatal&&(t.continue=!1),t.code??(t.code="custom"),t.input??(t.input=n.value),t.inst??(t.inst=e),t.continue??(t.continue=!0),n.issues.push(l.sn(t))}};const a=t.transform(n.value,n);return a instanceof Promise?a.then((e=>(n.value=e,n))):(n.value=a,n)}}));const Rt=r.xI("ZodOptional",((e,t)=>{ie.init(e,t),Ne.init(e,t),e.unwrap=()=>e._zod.def.innerType}));function Ct(e){return new Rt({type:"optional",innerType:e})}const kt=r.xI("ZodNullable",((e,t)=>{oe.init(e,t),Ne.init(e,t),e.unwrap=()=>e._zod.def.innerType}));function Lt(e){return new kt({type:"nullable",innerType:e})}const Pt=r.xI("ZodDefault",((e,t)=>{le.init(e,t),Ne.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap})),Mt=r.xI("ZodPrefault",((e,t)=>{ue.init(e,t),Ne.init(e,t),e.unwrap=()=>e._zod.def.innerType})),jt=r.xI("ZodNonOptional",((e,t)=>{pe.init(e,t),Ne.init(e,t),e.unwrap=()=>e._zod.def.innerType})),Dt=r.xI("ZodCatch",((e,t)=>{me.init(e,t),Ne.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap})),Ft=r.xI("ZodPipe",((e,t)=>{he.init(e,t),Ne.init(e,t),e.in=t.in,e.out=t.out}));function Vt(e,t){return new Ft({type:"pipe",in:e,out:t})}const qt=r.xI("ZodReadonly",((e,t)=>{ve.init(e,t),Ne.init(e,t)})),Bt=r.xI("ZodLazy",((e,t)=>{ye.init(e,t),Ne.init(e,t),e.unwrap=()=>e._zod.def.getter()}));function Ut(e){return new Bt({type:"lazy",getter:e})}const Yt=r.xI("ZodCustom",((e,t)=>{$e.init(e,t),Ne.init(e,t)}));function zt(e,t){return Se.FO(Yt,e??(()=>!0),t)}function Zt(e,t={error:`Input not instance of ${e.name}`}){const n=new Yt({type:"custom",check:"custom",fn:t=>t instanceof e,abort:!0,...l.A2(t)});return n._zod.bag.Class=e,n}},94916:(e,t,n)=>{const r=n(95323),a=n(75732),{ANY:s}=a,i=n(67338),o=n(70692),l=[new a(">=0.0.0-0")],c=[new a(">=0.0.0")],u=(e,t,n)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===s){if(1===t.length&&t[0].semver===s)return!0;e=n.includePrerelease?l:c}if(1===t.length&&t[0].semver===s){if(n.includePrerelease)return!0;t=c}const r=new Set;let a,u,m,h,f,v,g;for(const t of e)">"===t.operator||">="===t.operator?a=p(a,t,n):"<"===t.operator||"<="===t.operator?u=d(u,t,n):r.add(t.semver);if(r.size>1)return null;if(a&&u){if(m=o(a.semver,u.semver,n),m>0)return null;if(0===m&&(">="!==a.operator||"<="!==u.operator))return null}for(const e of r){if(a&&!i(e,String(a),n))return null;if(u&&!i(e,String(u),n))return null;for(const r of t)if(!i(e,String(r),n))return!1;return!0}let y=!(!u||n.includePrerelease||!u.semver.prerelease.length)&&u.semver,$=!(!a||n.includePrerelease||!a.semver.prerelease.length)&&a.semver;y&&1===y.prerelease.length&&"<"===u.operator&&0===y.prerelease[0]&&(y=!1);for(const e of t){if(g=g||">"===e.operator||">="===e.operator,v=v||"<"===e.operator||"<="===e.operator,a)if($&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===$.major&&e.semver.minor===$.minor&&e.semver.patch===$.patch&&($=!1),">"===e.operator||">="===e.operator){if(h=p(a,e,n),h===e&&h!==a)return!1}else if(">="===a.operator&&!i(a.semver,String(e),n))return!1;if(u)if(y&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===y.major&&e.semver.minor===y.minor&&e.semver.patch===y.patch&&(y=!1),"<"===e.operator||"<="===e.operator){if(f=d(u,e,n),f===e&&f!==u)return!1}else if("<="===u.operator&&!i(u.semver,String(e),n))return!1;if(!e.operator&&(u||a)&&0!==m)return!1}return!(a&&v&&!u&&0!==m||u&&g&&!a&&0!==m||$||y)},p=(e,t,n)=>{if(!e)return t;const r=o(e.semver,t.semver,n);return r>0?e:r<0||">"===t.operator&&">="===e.operator?t:e},d=(e,t,n)=>{if(!e)return t;const r=o(e.semver,t.semver,n);return r<0?e:r>0||"<"===t.operator&&"<="===e.operator?t:e};e.exports=(e,t,n={})=>{if(e===t)return!0;e=new r(e,n),t=new r(t,n);let a=!1;e:for(const r of e.set){for(const e of t.set){const t=u(r,e,n);if(a=a||null!==t,t)continue e}if(a)return!1}return!0}},95153:function(e,t,n){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.VIEW_PIPELINE_UTILS=void 0;const a=r(n(51699)),s="8.0.0",i="8.1.0";t.VIEW_PIPELINE_UTILS={MIN_VERSION_FOR_VIEW_SEARCH_COMPATIBILITY_DE:s,MIN_VERSION_FOR_VIEW_SEARCH_COMPATIBILITY_COMPASS:i,isPipelineSearchQueryable:e=>{for(const t of e){const e=Object.keys(t)[0];if("$addFields"!==e&&"$set"!==e&&"$match"!==e)return!1;if("$match"===e){const e=t.$match,n=Object.keys(e||{});if(1!==n.length||!n.includes("$expr"))return!1}}return!0},isVersionSearchCompatibleForViewsDataExplorer:e=>{try{return a.default.gte(e,s)}catch{return!1}},isVersionSearchCompatibleForViewsCompass:e=>{try{return a.default.gte(e,i)}catch{return!1}}}},95323:(e,t,n)=>{const r=/\s+/g;class a{constructor(e,t){if(t=i(t),e instanceof a)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new a(e.raw,t);if(e instanceof o)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e.trim().replace(r," "),this.set=this.raw.split("||").map((e=>this.parseRange(e.trim()))).filter((e=>e.length)),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter((e=>!g(e[0]))),0===this.set.length)this.set=[e];else if(this.set.length>1)for(const e of this.set)if(1===e.length&&y(e[0])){this.set=[e];break}}this.formatted=void 0}get range(){if(void 0===this.formatted){this.formatted="";for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+="||");const t=this.set[e];for(let e=0;e<t.length;e++)e>0&&(this.formatted+=" "),this.formatted+=t[e].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){const t=((this.options.includePrerelease&&f)|(this.options.loose&&v))+":"+e,n=s.get(t);if(n)return n;const r=this.options.loose,a=r?u[p.HYPHENRANGELOOSE]:u[p.HYPHENRANGE];e=e.replace(a,T(this.options.includePrerelease)),l("hyphen replace",e),e=e.replace(u[p.COMPARATORTRIM],d),l("comparator trim",e),e=e.replace(u[p.TILDETRIM],m),l("tilde trim",e),e=e.replace(u[p.CARETTRIM],h),l("caret trim",e);let i=e.split(" ").map((e=>b(e,this.options))).join(" ").split(/\s+/).map((e=>I(e,this.options)));r&&(i=i.filter((e=>(l("loose invalid filter",e,this.options),!!e.match(u[p.COMPARATORLOOSE]))))),l("range list",i);const c=new Map,y=i.map((e=>new o(e,this.options)));for(const e of y){if(g(e))return[e];c.set(e.value,e)}c.size>1&&c.has("")&&c.delete("");const $=[...c.values()];return s.set(t,$),$}intersects(e,t){if(!(e instanceof a))throw new TypeError("a Range is required");return this.set.some((n=>$(n,t)&&e.set.some((e=>$(e,t)&&n.every((n=>e.every((e=>n.intersects(e,t)))))))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new c(e,this.options)}catch(e){return!1}for(let t=0;t<this.set.length;t++)if(R(this.set[t],e,this.options))return!0;return!1}}e.exports=a;const s=new(n(97382)),i=n(43639),o=n(75732),l=n(49764),c=n(57544),{safeRe:u,t:p,comparatorTrimReplace:d,tildeTrimReplace:m,caretTrimReplace:h}=n(25522),{FLAG_INCLUDE_PRERELEASE:f,FLAG_LOOSE:v}=n(66078),g=e=>"<0.0.0-0"===e.value,y=e=>""===e.value,$=(e,t)=>{let n=!0;const r=e.slice();let a=r.pop();for(;n&&r.length;)n=r.every((e=>a.intersects(e,t))),a=r.pop();return n},b=(e,t)=>(l("comp",e,t),e=_(e,t),l("caret",e),e=S(e,t),l("tildes",e),e=w(e,t),l("xrange",e),e=N(e,t),l("stars",e),e),E=e=>!e||"x"===e.toLowerCase()||"*"===e,S=(e,t)=>e.trim().split(/\s+/).map((e=>A(e,t))).join(" "),A=(e,t)=>{const n=t.loose?u[p.TILDELOOSE]:u[p.TILDE];return e.replace(n,((t,n,r,a,s)=>{let i;return l("tilde",e,t,n,r,a,s),E(n)?i="":E(r)?i=`>=${n}.0.0 <${+n+1}.0.0-0`:E(a)?i=`>=${n}.${r}.0 <${n}.${+r+1}.0-0`:s?(l("replaceTilde pr",s),i=`>=${n}.${r}.${a}-${s} <${n}.${+r+1}.0-0`):i=`>=${n}.${r}.${a} <${n}.${+r+1}.0-0`,l("tilde return",i),i}))},_=(e,t)=>e.trim().split(/\s+/).map((e=>x(e,t))).join(" "),x=(e,t)=>{l("caret",e,t);const n=t.loose?u[p.CARETLOOSE]:u[p.CARET],r=t.includePrerelease?"-0":"";return e.replace(n,((t,n,a,s,i)=>{let o;return l("caret",e,t,n,a,s,i),E(n)?o="":E(a)?o=`>=${n}.0.0${r} <${+n+1}.0.0-0`:E(s)?o="0"===n?`>=${n}.${a}.0${r} <${n}.${+a+1}.0-0`:`>=${n}.${a}.0${r} <${+n+1}.0.0-0`:i?(l("replaceCaret pr",i),o="0"===n?"0"===a?`>=${n}.${a}.${s}-${i} <${n}.${a}.${+s+1}-0`:`>=${n}.${a}.${s}-${i} <${n}.${+a+1}.0-0`:`>=${n}.${a}.${s}-${i} <${+n+1}.0.0-0`):(l("no pr"),o="0"===n?"0"===a?`>=${n}.${a}.${s}${r} <${n}.${a}.${+s+1}-0`:`>=${n}.${a}.${s}${r} <${n}.${+a+1}.0-0`:`>=${n}.${a}.${s} <${+n+1}.0.0-0`),l("caret return",o),o}))},w=(e,t)=>(l("replaceXRanges",e,t),e.split(/\s+/).map((e=>O(e,t))).join(" ")),O=(e,t)=>{e=e.trim();const n=t.loose?u[p.XRANGELOOSE]:u[p.XRANGE];return e.replace(n,((n,r,a,s,i,o)=>{l("xRange",e,n,r,a,s,i,o);const c=E(a),u=c||E(s),p=u||E(i),d=p;return"="===r&&d&&(r=""),o=t.includePrerelease?"-0":"",c?n=">"===r||"<"===r?"<0.0.0-0":"*":r&&d?(u&&(s=0),i=0,">"===r?(r=">=",u?(a=+a+1,s=0,i=0):(s=+s+1,i=0)):"<="===r&&(r="<",u?a=+a+1:s=+s+1),"<"===r&&(o="-0"),n=`${r+a}.${s}.${i}${o}`):u?n=`>=${a}.0.0${o} <${+a+1}.0.0-0`:p&&(n=`>=${a}.${s}.0${o} <${a}.${+s+1}.0-0`),l("xRange return",n),n}))},N=(e,t)=>(l("replaceStars",e,t),e.trim().replace(u[p.STAR],"")),I=(e,t)=>(l("replaceGTE0",e,t),e.trim().replace(u[t.includePrerelease?p.GTE0PRE:p.GTE0],"")),T=e=>(t,n,r,a,s,i,o,l,c,u,p,d)=>`${n=E(r)?"":E(a)?`>=${r}.0.0${e?"-0":""}`:E(s)?`>=${r}.${a}.0${e?"-0":""}`:i?`>=${n}`:`>=${n}${e?"-0":""}`} ${l=E(c)?"":E(u)?`<${+c+1}.0.0-0`:E(p)?`<${c}.${+u+1}.0-0`:d?`<=${c}.${u}.${p}-${d}`:e?`<${c}.${u}.${+p+1}-0`:`<=${l}`}`.trim(),R=(e,t,n)=>{for(let n=0;n<e.length;n++)if(!e[n].test(t))return!1;if(t.prerelease.length&&!n.includePrerelease){for(let n=0;n<e.length;n++)if(l(e[n].semver),e[n].semver!==o.ANY&&e[n].semver.prerelease.length>0){const r=e[n].semver;if(r.major===t.major&&r.minor===t.minor&&r.patch===t.patch)return!0}return!1}return!0}},95593:e=>{var t=[];function n(e){for(var n=-1,r=0;r<t.length;r++)if(t[r].identifier===e){n=r;break}return n}function r(e,r){for(var s={},i=[],o=0;o<e.length;o++){var l=e[o],c=r.base?l[0]+r.base:l[0],u=s[c]||0,p="".concat(c," ").concat(u);s[c]=u+1;var d=n(p),m={css:l[1],media:l[2],sourceMap:l[3]};-1!==d?(t[d].references++,t[d].updater(m)):t.push({identifier:p,updater:a(m,r),references:1}),i.push(p)}return i}function a(e,t){var n=t.domAPI(t);return n.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;n.update(e=t)}else n.remove()}}e.exports=function(e,a){var s=r(e=e||[],a=a||{});return function(e){e=e||[];for(var i=0;i<s.length;i++){var o=n(s[i]);t[o].references--}for(var l=r(e,a),c=0;c<s.length;c++){var u=n(s[c]);0===t[u].references&&(t[u].updater(),t.splice(u,1))}s=l}}},95831:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.VALIDATION_TEMPLATE=void 0,t.VALIDATION_TEMPLATE='/**\n * This is a starter template for a schema validation rule for a collection.\n * More information on schema validation rules can be found at:\n * https://www.mongodb.com/docs/manual/core/schema-validation/\n */\n{\n $jsonSchema: {\n title: "Library.books",\n bsonType: "object",\n required: ["fieldname1", "fieldname2"],\n properties: {\n fieldname1: {\n bsonType: "string",\n description: "Fieldname1 must be a string",\n },\n fieldname2: {\n bsonType: "int",\n description: "Fieldname2 must be an integer",\n },\n arrayFieldName: {\n bsonType: "array",\n items: {\n bsonType: "string"\n },\n description: "arrayFieldName must be an array of strings"\n },\n }\n }\n}'},95869:(e,t,n)=>{var r=n(65994).e;const a="object"==typeof r&&r.env&&r.env.NODE_DEBUG&&/\bsemver\b/i.test(r.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};e.exports=a},96082:(e,t,n)=>{const r=Symbol("SemVer ANY");class a{static get ANY(){return r}constructor(e,t){if(t=s(t),e instanceof a){if(e.loose===!!t.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),c("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===r?this.value="":this.value=this.operator+this.semver.version,c("comp",this)}parse(e){const t=this.options.loose?i[o.COMPARATORLOOSE]:i[o.COMPARATOR],n=e.match(t);if(!n)throw new TypeError(`Invalid comparator: ${e}`);this.operator=void 0!==n[1]?n[1]:"","="===this.operator&&(this.operator=""),n[2]?this.semver=new u(n[2],this.options.loose):this.semver=r}toString(){return this.value}test(e){if(c("Comparator.test",e,this.options.loose),this.semver===r||e===r)return!0;if("string"==typeof e)try{e=new u(e,this.options)}catch(e){return!1}return l(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof a))throw new TypeError("a Comparator is required");return""===this.operator?""===this.value||new p(e.value,t).test(this.value):""===e.operator?""===e.value||new p(this.value,t).test(e.semver):!((t=s(t)).includePrerelease&&("<0.0.0-0"===this.value||"<0.0.0-0"===e.value)||!t.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))||(!this.operator.startsWith(">")||!e.operator.startsWith(">"))&&(!this.operator.startsWith("<")||!e.operator.startsWith("<"))&&(this.semver.version!==e.semver.version||!this.operator.includes("=")||!e.operator.includes("="))&&!(l(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<"))&&!(l(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}}e.exports=a;const s=n(8573),{safeRe:i,t:o}=n(18104),l=n(94706),c=n(72082),u=n(41694),p=n(71333)},96506:(e,t,n)=>{const r=Symbol("SemVer ANY");class a{static get ANY(){return r}constructor(e,t){if(t=s(t),e instanceof a){if(e.loose===!!t.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),c("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===r?this.value="":this.value=this.operator+this.semver.version,c("comp",this)}parse(e){const t=this.options.loose?i[o.COMPARATORLOOSE]:i[o.COMPARATOR],n=e.match(t);if(!n)throw new TypeError(`Invalid comparator: ${e}`);this.operator=void 0!==n[1]?n[1]:"","="===this.operator&&(this.operator=""),n[2]?this.semver=new u(n[2],this.options.loose):this.semver=r}toString(){return this.value}test(e){if(c("Comparator.test",e,this.options.loose),this.semver===r||e===r)return!0;if("string"==typeof e)try{e=new u(e,this.options)}catch(e){return!1}return l(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof a))throw new TypeError("a Comparator is required");return""===this.operator?""===this.value||new p(e.value,t).test(this.value):""===e.operator?""===e.value||new p(this.value,t).test(e.semver):!((t=s(t)).includePrerelease&&("<0.0.0-0"===this.value||"<0.0.0-0"===e.value)||!t.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))||(!this.operator.startsWith(">")||!e.operator.startsWith(">"))&&(!this.operator.startsWith("<")||!e.operator.startsWith("<"))&&(this.semver.version!==e.semver.version||!this.operator.includes("=")||!e.operator.includes("="))&&!(l(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<"))&&!(l(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}}e.exports=a;const s=n(34773),{safeRe:i,t:o}=n(68752),l=n(39149),c=n(52378),u=n(9350),p=n(33629)},96651:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.EXPRESSION_OPERATORS=void 0,t.EXPRESSION_OPERATORS=[{name:"$abs",value:"$abs",score:1,meta:"expr:arith",version:"3.2.0"},{name:"$accumulator",value:"$accumulator",score:1,meta:"expr:arith",version:"4.4.0"},{name:"$add",value:"$add",score:1,meta:"expr:arith",version:"2.2.0"},{name:"$allElementsTrue",value:"$allElementsTrue",score:1,meta:"expr:set",version:"2.6.0"},{name:"$and",value:"$and",score:1,meta:"expr:bool",version:"2.2.0"},{name:"$anyElementTrue",value:"$anyElementTrue",score:1,meta:"expr:set",version:"2.6.0"},{name:"$arrayElemAt",value:"$arrayElemAt",score:1,meta:"expr:array",version:"3.2.0"},{name:"$arrayToObject",value:"$arrayToObject",score:1,meta:"expr:array",version:"3.4.4"},{name:"$binarySize",value:"$binarySize",score:1,meta:"expr:obj",version:"4.4.0"},{name:"$bsonSize",value:"$bsonSize",score:1,meta:"expr:obj",version:"4.4.0"},{name:"$ceil",value:"$ceil",score:1,meta:"expr:arith",version:"3.2.0"},{name:"$cmp",value:"$cmp",score:1,meta:"expr:comp",version:"2.2.0"},{name:"$concat",value:"$concat",score:1,meta:"expr:string",version:"2.4.0"},{name:"$concatArrays",value:"$concatArrays",score:1,meta:"expr:array",version:"3.2.0"},{name:"$cond",value:"$cond",score:1,meta:"expr:cond",version:"2.6.0"},{name:"$dateAdd",value:"$dateAdd",score:1,meta:"expr:date",version:"5.0.0"},{name:"$dateDiff",value:"$dateDiff",score:1,meta:"expr:date",version:"5.0.0"},{name:"$dateFromParts",value:"$dateFromParts",score:1,meta:"expr:date",version:"3.6.0"},{name:"$dateFromString",value:"$dateFromString",score:1,meta:"expr:date",version:"3.6.0"},{name:"$dateSubtract",value:"$dateSubtract",score:1,meta:"expr:date",version:"5.0.0"},{name:"$dateToParts",value:"$dateToParts",score:1,meta:"expr:date",version:"3.6.0"},{name:"$dateToString",value:"$dateToString",score:1,meta:"expr:date",version:"3.6.0"},{name:"$dateTrunc",value:"$dateTrunc",score:1,meta:"expr:date",version:"5.0.0"},{name:"$dayOfMonth",value:"$dayOfMonth",score:1,meta:"expr:date",version:"2.2.0"},{name:"$dayOfWeek",value:"$dayOfWeek",score:1,meta:"expr:date",version:"2.2.0"},{name:"$dayOfYear",value:"$dayOfYear",score:1,meta:"expr:date",version:"2.2.0"},{name:"$dateToString",value:"$dateToString",score:1,meta:"expr:date",version:"3.0.0"},{name:"$divide",value:"$divide",score:1,meta:"expr:arith",version:"2.2.0"},{name:"$eq",value:"$eq",score:1,meta:"expr:comp",version:"2.2.0"},{name:"$exp",value:"$exp",score:1,meta:"expr:arith",version:"3.2.0"},{name:"$filter",value:"$filter",score:1,meta:"expr:array",version:"3.2.0"},{name:"$first",value:"$first",score:1,meta:"expr:array",version:"4.4.0"},{name:"$floor",value:"$floor",score:1,meta:"expr:arith",version:"3.2.0"},{name:"$function",value:"$function",score:1,meta:"expr:arith",version:"4.4.0"},{name:"$getField",value:"$getField",score:1,meta:"expr:get",version:"5.0.0"},{name:"$gt",value:"$gt",score:1,meta:"expr:comp",version:"2.2.0"},{name:"$gte",value:"$gte",score:1,meta:"expr:comp",version:"2.2.0"},{name:"$hour",value:"$hour",score:1,meta:"expr:date",version:"2.2.0"},{name:"$ifNull",value:"$ifNull",score:1,meta:"expr:cond",version:"2.2.0"},{name:"$in",value:"$in",score:1,meta:"expr:array",version:"3.4.0"},{name:"$indexOfArray",value:"$indexOfArray",score:1,meta:"expr:array",version:"3.4.0"},{name:"$indexOfBytes",value:"$indexOfBytes",score:1,meta:"expr:string",version:"3.4.0"},{name:"$indexOfCP",value:"$indexOfCP",score:1,meta:"expr:string",version:"3.4.0"},{name:"$isArray",value:"$isArray",score:1,meta:"expr:array",version:"3.2.0"},{name:"$isNumber",value:"$isNumber",score:1,meta:"expr:arith",version:"4.4.0"},{name:"$isoDayOfWeek",value:"$isoDayOfWeek",score:1,meta:"expr:date",version:"3.4.0"},{name:"$isoWeek",value:"$isoWeek",score:1,meta:"expr:date",version:"3.4.0"},{name:"$isoWeekYear",value:"$isoWeekYear",score:1,meta:"expr:date",version:"3.4.0"},{name:"$last",value:"$last",score:1,meta:"expr:array",version:"4.4.0"},{name:"$let",value:"$let",score:1,meta:"expr:var",version:"2.6.0"},{name:"$literal",value:"$literal",score:1,meta:"expr:literal",version:"2.6.0"},{name:"$lt",value:"$lt",score:1,meta:"expr:comp",version:"2.2.0"},{name:"$lt",value:"$lte",score:1,meta:"expr:comp",version:"2.2.0"},{name:"$ln",value:"$ln",score:1,meta:"expr:arith",version:"3.2.0"},{name:"$log",value:"$log",score:1,meta:"expr:arith",version:"3.2.0"},{name:"$log10",value:"$log10",score:1,meta:"expr:arith",version:"3.2.0"},{name:"$map",value:"$map",score:1,meta:"expr:array",version:"2.6.0"},{name:"$mergeObjects",value:"$mergeObjects",score:1,meta:"expr:obj",version:"3.6.0"},{name:"$meta",value:"$meta",score:1,meta:"expr:text",version:"2.6.0"},{name:"$millisecond",value:"$millisecond",score:1,meta:"expr:date",version:"2.4.0"},{name:"$minute",value:"$minute",score:1,meta:"expr:date",version:"2.2.0"},{name:"$mod",value:"$mod",score:1,meta:"expr:arith",version:"2.2.0"},{name:"$month",value:"$month",score:1,meta:"expr:date",version:"2.2.0"},{name:"$multiply",value:"$multiply",score:1,meta:"expr:arith",version:"2.2.0"},{name:"$new",value:"$new",score:1,meta:"expr:comp",version:"2.2.0"},{name:"$not",value:"$not",score:1,meta:"expr:bool",version:"2.2.0"},{name:"$objectToArray",value:"$objectToArray",score:1,meta:"expr:array",version:"3.4.4"},{name:"$or",value:"$or",score:1,meta:"expr:bool",version:"2.2.0"},{name:"$pow",value:"$pow",score:1,meta:"expr:arith",version:"3.2.0"},{name:"$range",value:"$range",score:1,meta:"expr:array",version:"3.4.0"},{name:"$reduce",value:"$reduce",score:1,meta:"expr:array",version:"3.4.0"},{name:"$regexFind",value:"$regexFind",score:1,meta:"expr:regex",version:"4.1.11"},{name:"$regexFindAll",value:"$regexFindAll",score:1,meta:"expr:regex",version:"4.1.11"},{name:"$regexMatch",value:"$regexMatch",score:1,meta:"expr:regex",version:"4.1.11"},{name:"$replaceAll",value:"$replaceAll",score:1,meta:"expr:string",version:"4.4.0"},{name:"$replaceOne",value:"$replaceOne",score:1,meta:"expr:string",version:"4.4.0"},{name:"$reverseArray",value:"$reverseArray",score:1,meta:"expr:array",version:"3.4.0"},{name:"$second",value:"$second",score:1,meta:"expr:date",version:"2.2.0"},{name:"$setDifference",value:"$setDifference",score:1,meta:"expr:set",version:"2.6.0"},{name:"$setEquals",value:"$setEquals",score:1,meta:"expr:set",version:"2.6.0"},{name:"$setIntersection",value:"$setIntersection",score:1,meta:"expr:set",version:"2.6.0"},{name:"$setIsSubset",value:"$setIsSubset",score:1,meta:"expr:set",version:"2.6.0"},{name:"$setUnion",value:"$setUnion",score:1,meta:"expr:set",version:"2.6.0"},{name:"$similarityCosine",value:"$similarityCosine",score:1,meta:"expr:arith",version:"8.2.0"},{name:"$similarityDotProduct",value:"$similarityDotProduct",score:1,meta:"expr:arith",version:"8.2.0"},{name:"$similarityEuclidean",value:"$similarityEuclidean",score:1,meta:"expr:arith",version:"8.2.0"},{name:"$size",value:"$size",score:1,meta:"expr:array",version:"2.6.0"},{name:"$slice",value:"$slice",score:1,meta:"expr:array",version:"3.2.0"},{name:"$sortArray",value:"$sortArray",score:1,meta:"expr:array",version:"5.2.0"},{name:"$split",value:"$split",score:1,meta:"expr:string",version:"3.4.0"},{name:"$sqrt",value:"$sqrt",score:1,meta:"expr:arith",version:"3.2.0"},{name:"$strcasecmp",value:"$strcasecmp",score:1,meta:"expr:string",version:"2.2.0"},{name:"$strLenBytes",value:"$strLenBytes",score:1,meta:"expr:string",version:"3.4.0"},{name:"$strLenCP",value:"$strLenCP",score:1,meta:"expr:string",version:"3.4.0"},{name:"$substr",value:"$substr",score:1,meta:"expr:string",version:"2.2.0",deprecated:"3.4.0",replacement:"$substrBytes"},{name:"$substrBytes",value:"$substrBytes",score:1,meta:"expr:string",version:"3.4.0"},{name:"$substrCP",value:"$substrCP",score:1,meta:"expr:string",version:"3.4.0"},{name:"$subtract",value:"$subtract",score:1,meta:"expr:arith",version:"3.2.0"},{name:"$switch",value:"$switch",score:1,meta:"expr:cond",version:"3.4.0"},{name:"$toHashedIndexKey",value:"$toHashedIndexKey",score:1,meta:"expr:arith",version:"4.2.24"},{name:"$toLower",value:"$toLower",score:1,meta:"expr:string",version:"2.2.0"},{name:"$toUpper",value:"$toUpper",score:1,meta:"expr:string",version:"2.2.0"},{name:"$tsSecond",value:"$tsSecond",score:1,meta:"expr:date",version:"5.1.0"},{name:"$tsIncrement",value:"$tsIncrement",score:1,meta:"expr:date",version:"5.1.0"},{name:"$trunc",value:"$trunc",score:1,meta:"expr:arith",version:"3.2.0"},{name:"$type",value:"$type",score:1,meta:"expr:type",version:"3.4.0"},{name:"$week",value:"$week",score:1,meta:"expr:date",version:"2.2.0"},{name:"$year",value:"$year",score:1,meta:"expr:date",version:"2.2.0"},{name:"$zip",value:"$zip",score:1,meta:"expr:array",version:"3.4.0"},{name:"$bitAnd",value:"$bitAnd",score:1,meta:"expr:bit",version:"7.0.0"},{name:"$bitOr",value:"$bitOr",score:1,meta:"expr:bit",version:"7.0.0"},{name:"$bitXor",value:"$bitXor",score:1,meta:"expr:bit",version:"7.0.0"},{name:"$bitNot",value:"$bitNot",score:1,meta:"expr:bit",version:"7.0.0"}]},96675:(e,t,n)=>{const r=n(66283),a=n(38366);e.exports=(e,t,n)=>{let s=null,i=null,o=null;try{o=new a(t,n)}catch(e){return null}return e.forEach((e=>{o.test(e)&&(s&&1!==i.compare(e)||(s=e,i=new r(s,n)))})),s}},96775:(e,t,n)=>{const r=n(9480),a=n(40289);e.exports=(e,t,n)=>{const s=[];let i=null,o=null;const l=e.sort(((e,t)=>a(e,t,n)));for(const e of l)r(e,t,n)?(o=e,i||(i=e)):(o&&s.push([i,o]),o=null,i=null);i&&s.push([i,null]);const c=[];for(const[e,t]of s)e===t?c.push(e):t||e!==l[0]?t?e===l[0]?c.push(`<=${t}`):c.push(`${e} - ${t}`):c.push(`>=${e}`):c.push("*");const u=c.join(" || "),p="string"==typeof t.raw?t.raw:String(t);return u.length<p.length?u:t}},96807:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ATLAS_VECTOR_SEARCH_TEMPLATE=t.ATLAS_SEARCH_TEMPLATES=void 0,t.ATLAS_SEARCH_TEMPLATES=[{name:"Dynamic field mappings",snippet:'{\n "mappings": {\n "dynamic": true\n }\n}',version:"4.4.0"},{name:"Static field mappings",snippet:'{\n "mappings": {\n "dynamic": false,\n "fields": {\n ${1:<string field name>}: {\n "type": "string"\n },\n ${2:<number field name>}: {\n "type": "number"\n },\n ${3:<date field name>}: {\n "type": "date"\n },\n ${4:<geo field name>}: {\n "type": "geo"\n },\n } \n }\n}',version:"4.4.0"},{name:"Text field mappings",snippet:'{\n "mappings": {\n "dynamic": true,\n "fields": {\n ${1:<string field name>}: [\n {\n // Enables text queries\n "type": "string"\n },\n {\n // Enables autocomplete queries\n "type": "autocomplete"\n \n },\n {\n // Enables sorting\n "type": "token"\n }\n ] \n } \n }\n}',version:"4.4.0"},{name:"Facet field mappings",snippet:'{\n "mappings": {\n "dynamic": true,\n "fields": {\n ${1:<number field name for faceting>}: [\n {\n "type": "numberFacet"\n },\n {\n "type": "number"\n },\n ],\n ${2:<date field name for faceting>}: [\n {\n "type": "dateFacet"\n }\n {\n "type": "date"\n }\n ],\n ${3:<string field name for faceting>}: [\n {\n "type": "stringFacet"\n },\n {\n "type": "string",\n "analyzer": "lucene.keyword"\n },\n ],\n } \n }\n}',version:"4.4.0"},{name:"KNN Vector field mapping",snippet:'{\n "mappings": {\n "dynamic": true,\n "fields": {\n ${1:<vector embedding field name>}: [\n {\n "type": "knnVector",\n "dimensions": ${2:<number of dimensions>},\n "similarity": "${3:<euclidean | cosine | dotProduct>}"\n } \n ] \n } \n }\n}',version:"4.4.0"}],t.ATLAS_VECTOR_SEARCH_TEMPLATE={name:"Vector Search default template",snippet:'{\n "fields": [{\n "type": "vector",\n "path": "${1:<field name to index>}",\n "numDimensions": ${2:<number of dimensions>},\n "similarity": "${3:<euclidean | cosine | dotProduct>}"\n }]\n}',version:"4.4.0"}},97008:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ENVS=t.ON_PREM=t.ADL=t.ATLAS=void 0;const n="atlas";t.ATLAS=n,t.ADL="adl";const r="on-prem";t.ON_PREM=r;const a=[n,"adl",r];t.ENVS=a},97369:(e,t,n)=>{const r=n(32674);e.exports=(e,t,n)=>0!==r(e,t,n)},97382:e=>{e.exports=class{constructor(){this.max=1e3,this.map=new Map}get(e){const t=this.map.get(e);return void 0===t?void 0:(this.map.delete(e),this.map.set(e,t),t)}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&void 0!==t){if(this.map.size>=this.max){const e=this.map.keys().next().value;this.delete(e)}this.map.set(e,t)}return this}}},97660:(e,t,n)=>{const r=n(38358);e.exports=(e,t)=>{const n=r(e.trim().replace(/^[=v]+/,""),t);return n?n.version:null}},97830:(e,t,n)=>{const r=n(95323);e.exports=(e,t)=>{try{return new r(e,t).range||"*"}catch(e){return null}}},98010:(e,t,n)=>{n.d(t,{rv:()=>a});var r=n(9895);r.ACCUMULATORS,r.ADL,r.ANY_COLLECTION_NAMESPACE,r.ANY_NAMESPACE,r.ATLAS,r.ATLAS_SEARCH_TEMPLATES,r.ATLAS_VECTOR_SEARCH_TEMPLATE,r.BSON_TYPES,r.BSON_TYPE_ALIASES,r.COLLECTION,r.CONVERSION_OPERATORS,r.DATABASE,r.ENVS,r.EXPRESSION_OPERATORS,r.FULL_SCAN_STAGES,r.JSON_SCHEMA,r.ON_PREM,r.OUT_STAGES;const a=r.QUERY_OPERATORS;r.REQUIRED_AS_FIRST_STAGE,r.STAGE_OPERATORS,r.STAGE_OPERATOR_NAMES,r.SYSTEM_VARIABLES,r.TIME_SERIES,r.VALIDATION_TEMPLATE,r.VIEW,r.VIEW_PIPELINE_UTILS,r.getFilteredCompletions,r.wrapField},98249:(e,t,n)=>{const r=n(41755),a=n(97369),s=n(18106),i=n(74227),o=n(28141),l=n(24078);e.exports=(e,t,n,c)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e===n;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e!==n;case"":case"=":case"==":return r(e,n,c);case"!=":return a(e,n,c);case">":return s(e,n,c);case">=":return i(e,n,c);case"<":return o(e,n,c);case"<=":return l(e,n,c);default:throw new TypeError(`Invalid operator: ${t}`)}}},98582:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ACCUMULATORS=void 0,t.ACCUMULATORS=[{name:"$accumulator",value:"$accumulator",score:1,meta:"accumulator",version:"4.4.0"},{name:"$addToSet",value:"$addToSet",score:1,meta:"accumulator",version:"2.2.0"},{name:"$avg",value:"$avg",score:1,meta:"accumulator",version:"2.2.0",projectVersion:"3.2.0"},{name:"$bottom",value:"$bottom",score:1,meta:"accumulator:bottom-n",version:"5.2.0"},{name:"$bottomN",value:"$bottomN",score:1,meta:"accumulator:bottom-n",version:"5.2.0"},{name:"$covariancePop",value:"$covariancePop",score:1,meta:"accumulator:window",version:"5.0.0"},{name:"$covarianceSamp",value:"$covarianceSamp",score:1,meta:"accumulator:window",version:"5.0.0"},{name:"$count",value:"$count",score:1,meta:"accumulator",version:"5.0.0"},{name:"$derivative",value:"$derivative",score:1,meta:"accumulator:window",version:"5.0.0"},{name:"$denseRank",value:"$denseRank",score:1,meta:"accumulator:window",version:"5.0.0"},{name:"$documentNumber",value:"$documentNumber",score:1,meta:"accumulator:window",version:"5.0.0"},{name:"$expMovingAvg",value:"$expMovingAvg",score:1,meta:"accumulator:window",version:"5.0.0"},{name:"$first",value:"$first",score:1,meta:"accumulator",version:"2.2.0"},{name:"$firstN",value:"$firstN",score:1,meta:"accumulator",version:"5.1.0"},{name:"$integral",value:"$integral",score:1,meta:"accumulator:window",version:"5.0.0"},{name:"$last",value:"$last",score:1,meta:"accumulator",version:"2.2.0"},{name:"$lastN",value:"$lastN",score:1,meta:"accumulator",version:"5.2.0"},{name:"$max",value:"$max",score:1,meta:"accumulator",version:"2.2.0",projectVersion:"3.2.0"},{name:"$maxN",value:"$maxN",score:1,meta:"accumulator",version:"5.2.0"},{name:"$median",value:"$median",score:1,meta:"accumulator",version:"7.0.0"},{name:"$min",value:"$min",score:1,meta:"accumulator",version:"2.2.0",projectVersion:"3.2.0"},{name:"$minN",value:"$minN",score:1,meta:"accumulator",version:"5.2.0"},{name:"$percentile",value:"$percentile",score:1,meta:"accumulator",version:"7.0.0"},{name:"$push",value:"$push",score:1,meta:"accumulator",version:"2.2.0"},{name:"$rank",value:"$rank",score:1,meta:"accumulator:window",version:"5.0.0"},{name:"$stdDevPop",value:"$stdDevPop",score:1,meta:"accumulator",version:"3.2.0",projectVersion:"3.2.0"},{name:"$stdDevSamp",value:"$stdDevSamp",score:1,meta:"accumulator",version:"3.2.0",projectVersion:"3.2.0"},{name:"$shift",value:"$shift",score:1,meta:"accumulator:window",version:"5.0.0"},{name:"$sum",value:"$sum",score:1,meta:"accumulator",version:"2.2.0",projectVersion:"3.2.0"},{name:"$top",value:"$top",score:1,meta:"accumulator:top-n",version:"5.2.0"},{name:"$topN",value:"$topN",score:1,meta:"accumulator:top-n",version:"5.2.0"},{name:"$locf",value:"$locf",score:1,meta:"accumulator:window",version:"5.3.0"},{name:"$linearFill",value:"$linearFill",score:1,meta:"accumulator:window",version:"5.3.0"}]},98696:(e,t,n)=>{const r=n(48381),a=n(20332),s=n(58809);e.exports=(e,t)=>{e=new a(e,t);let n=new r("0.0.0");if(e.test(n))return n;if(n=new r("0.0.0-0"),e.test(n))return n;n=null;for(let t=0;t<e.set.length;++t){const a=e.set[t];let i=null;a.forEach((e=>{const t=new r(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":i&&!s(t,i)||(i=t);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${e.operator}`)}})),!i||n&&!s(n,i)||(n=i)}return n&&e.test(n)?n:null}},98727:(e,t,n)=>{var r=n(40811);e.exports=new r("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return null!==e?e:[]}})},98736:(e,t,n)=>{const r=n(25583);e.exports=(e,t)=>r(e,t,!0)},98746:(e,t,n)=>{const r=n(60501);e.exports=(e,t,n)=>0===r(e,t,n)},98855:(e,t,n)=>{const r=n(88825);e.exports=(e,t,n=!1)=>{if(e instanceof r)return e;try{return new r(e,t)}catch(e){if(!n)return null;throw e}}},99174:e=>{function t(e){return null==e}e.exports.isNothing=t,e.exports.isObject=function(e){return"object"==typeof e&&null!==e},e.exports.toArray=function(e){return Array.isArray(e)?e:t(e)?[]:[e]},e.exports.repeat=function(e,t){var n,r="";for(n=0;n<t;n+=1)r+=e;return r},e.exports.isNegativeZero=function(e){return 0===e&&Number.NEGATIVE_INFINITY===1/e},e.exports.extend=function(e,t){var n,r,a,s;if(t)for(n=0,r=(s=Object.keys(t)).length;n<r;n+=1)e[a=s[n]]=t[a];return e}},99352:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ENVS=t.ON_PREM=t.ADL=t.ATLAS=void 0;const n="atlas";t.ATLAS=n,t.ADL="adl";const r="on-prem";t.ON_PREM=r;const a=[n,"adl",r];t.ENVS=a},99385:(e,t,n)=>{const r=n(41694),a=n(96082),{ANY:s}=a,i=n(71333),o=n(9480),l=n(43334),c=n(3449),u=n(9418),p=n(47775);e.exports=(e,t,n,d)=>{let m,h,f,v,g;switch(e=new r(e,d),t=new i(t,d),n){case">":m=l,h=u,f=c,v=">",g=">=";break;case"<":m=c,h=p,f=l,v="<",g="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(o(e,t,d))return!1;for(let n=0;n<t.set.length;++n){const r=t.set[n];let i=null,o=null;if(r.forEach((e=>{e.semver===s&&(e=new a(">=0.0.0")),i=i||e,o=o||e,m(e.semver,i.semver,d)?i=e:f(e.semver,o.semver,d)&&(o=e)})),i.operator===v||i.operator===g)return!1;if((!o.operator||o.operator===v)&&h(e,o.semver))return!1;if(o.operator===g&&f(e,o.semver))return!1}return!0}},99430:(e,t,n)=>{const r=n(9350);e.exports=(e,t,n)=>new r(e,n).compare(new r(t,n))},99451:(e,t,n)=>{const r=n(38358);e.exports=(e,t)=>{const n=r(e,t);return n?n.version:null}},99571:(e,t,n)=>{const r=n(20360),a=n(67105),{ANY:s}=a,i=n(72849),o=n(25583),l=[new a(">=0.0.0-0")],c=[new a(">=0.0.0")],u=(e,t,n)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===s){if(1===t.length&&t[0].semver===s)return!0;e=n.includePrerelease?l:c}if(1===t.length&&t[0].semver===s){if(n.includePrerelease)return!0;t=c}const r=new Set;let a,u,m,h,f,v,g;for(const t of e)">"===t.operator||">="===t.operator?a=p(a,t,n):"<"===t.operator||"<="===t.operator?u=d(u,t,n):r.add(t.semver);if(r.size>1)return null;if(a&&u){if(m=o(a.semver,u.semver,n),m>0)return null;if(0===m&&(">="!==a.operator||"<="!==u.operator))return null}for(const e of r){if(a&&!i(e,String(a),n))return null;if(u&&!i(e,String(u),n))return null;for(const r of t)if(!i(e,String(r),n))return!1;return!0}let y=!(!u||n.includePrerelease||!u.semver.prerelease.length)&&u.semver,$=!(!a||n.includePrerelease||!a.semver.prerelease.length)&&a.semver;y&&1===y.prerelease.length&&"<"===u.operator&&0===y.prerelease[0]&&(y=!1);for(const e of t){if(g=g||">"===e.operator||">="===e.operator,v=v||"<"===e.operator||"<="===e.operator,a)if($&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===$.major&&e.semver.minor===$.minor&&e.semver.patch===$.patch&&($=!1),">"===e.operator||">="===e.operator){if(h=p(a,e,n),h===e&&h!==a)return!1}else if(">="===a.operator&&!i(a.semver,String(e),n))return!1;if(u)if(y&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===y.major&&e.semver.minor===y.minor&&e.semver.patch===y.patch&&(y=!1),"<"===e.operator||"<="===e.operator){if(f=d(u,e,n),f===e&&f!==u)return!1}else if("<="===u.operator&&!i(u.semver,String(e),n))return!1;if(!e.operator&&(u||a)&&0!==m)return!1}return!(a&&v&&!u&&0!==m||u&&g&&!a&&0!==m||$||y)},p=(e,t,n)=>{if(!e)return t;const r=o(e.semver,t.semver,n);return r>0?e:r<0||">"===t.operator&&">="===e.operator?t:e},d=(e,t,n)=>{if(!e)return t;const r=o(e.semver,t.semver,n);return r<0?e:r>0||"<"===t.operator&&"<="===e.operator?t:e};e.exports=(e,t,n={})=>{if(e===t)return!0;e=new r(e,n),t=new r(t,n);let a=!1;e:for(const r of e.set){for(const e of t.set){const t=u(r,e,n);if(a=a||null!==t,t)continue e}if(a)return!1}return!0}},99597:(e,t,n)=>{const r=n(50066),a=n(67094),{ANY:s}=a,i=n(72857),o=n(12876),l=n(18106),c=n(28141),u=n(24078),p=n(74227);e.exports=(e,t,n,d)=>{let m,h,f,v,g;switch(e=new r(e,d),t=new i(t,d),n){case">":m=l,h=u,f=c,v=">",g=">=";break;case"<":m=c,h=p,f=l,v="<",g="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(o(e,t,d))return!1;for(let n=0;n<t.set.length;++n){const r=t.set[n];let i=null,o=null;if(r.forEach((e=>{e.semver===s&&(e=new a(">=0.0.0")),i=i||e,o=o||e,m(e.semver,i.semver,d)?i=e:f(e.semver,o.semver,d)&&(o=e)})),i.operator===v||i.operator===g)return!1;if((!o.operator||o.operator===v)&&h(e,o.semver))return!1;if(o.operator===g&&f(e,o.semver))return!1}return!0}},99625:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.REQUIRED_AS_FIRST_STAGE=t.FULL_SCAN_STAGES=t.OUT_STAGES=t.STAGE_OPERATOR_NAMES=t.STAGE_OPERATORS=void 0;const r=n(1276),a=n(39560),s=[{name:"$addFields",value:"$addFields",label:"$addFields",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"3.4.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Adds new field(s) to a document with a computed value, or reassigns an existing field(s) with a computed value.",comment:"/**\n * newField: The new field name.\n * expression: The new field expression.\n */\n",snippet:"{\n ${1:newField}: ${2:expression}, ${3:...}\n}"},{name:"$bucket",value:"$bucket",label:"$bucket",outputStage:!1,fullScan:!0,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"3.4.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Categorizes incoming documents into groups, called buckets, based on specified boundaries.",comment:"/**\n * groupBy: The expression to group by.\n * boundaries: An array of the lower boundaries for each bucket.\n * default: The bucket name for documents that do not fall within the specified boundaries\n * output: {\n * outputN: Optional. The output object may contain a single or numerous field names used to accumulate values per bucket.\n * }\n */\n",snippet:"{\n groupBy: ${1:expression},\n boundaries: [ ${2:lowerbound}, ${3:...} ],\n default: ${4:literal},\n output: {\n ${5:outputN}: { ${6:accumulator} }, ${7:...}\n }\n}"},{name:"$bucketAuto",value:"$bucketAuto",label:"$bucketAuto",outputStage:!1,fullScan:!0,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"3.4.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Automatically categorizes documents into a specified number of buckets, attempting even distribution if possible.",comment:"/**\n * groupBy: The expression to group by.\n * buckets: The desired number of buckets\n * output: {\n * outputN: Optional. The output object may contain a single or numerous field names used to accumulate values per bucket.\n * }\n * granularity: Optional number series\n */\n",snippet:"{\n groupBy: ${1:expression},\n buckets: ${2:number},\n output: {\n ${3:outputN}: ${4:accumulator}, ${5:...}\n },\n granularity: '${6:string}'\n}"},{name:"$changeStream",value:"$changeStream",label:"$changeStream",outputStage:!1,fullScan:!1,firstStage:!0,score:1,env:[r.ATLAS,r.ON_PREM],meta:"stage",version:"4.2.0",apiVersions:[1],namespaces:[a.DATABASE],description:"Returns a Change Stream cursor for the collection.",comment:"/**\n * allChangesForCluster: Optional boolean to include all changes in the cluster.\n * fullDocument: Optional value to request a copy of full document when modified by update operations (Introduced in 6.0).\n * fullDocumentBeforeChange: Value to configure whether to return a full document before the change or not.\n * resumeAfter: Specifies a resume token as the logical starting point for the change stream. Cannot be used with startAfter or startAtOperationTime fields.\n * showExpandedEvents: Specifies whether to include additional change events, such as such as DDL and index operations (Introduced in 6.0).\n * startAfter: Specifies a resume token as the logical starting point for the change stream. Cannot be used with resumeAfter or startAtOperationTime fields.\n * startAtOperationTime: Specifies a time as the logical starting point for the change stream. Cannot be used with resumeAfter or startAfter fields.\n */\n",snippet:"{\n allChangesForCluster: ${1:boolean},\n fullDocument: '${2:string}',\n fullDocumentBeforeChange: '${3:string}',\n resumeAfter: ${4:resumeToken},\n showExpandedEvents: ${5:boolean},\n startAfter: ${6:resumeToken},\n startAtOperationTime: ${7:time},\n}"},{name:"$collStats",value:"$collStats",label:"$collStats",outputStage:!1,fullScan:!1,firstStage:!0,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"3.4.0",apiVersions:[],namespaces:[...a.ANY_COLLECTION_NAMESPACE],description:"Returns statistics regarding a collection or view.",comment:"/**\n * histograms: Optional latency histograms.\n * storageStats: Optional storage stats.\n */\n",snippet:"{\n latencyStats: {\n histograms: ${1:boolean}\n },\n storageStats: {${2:}},\n}"},{name:"$count",value:"$count",label:"$count",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"2.2.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Returns a count of the number of documents at this stage of the aggregation pipeline.",comment:"/**\n * Provide the field name for the count.\n */\n",snippet:"'${1:string}'"},{name:"$currentOp",value:"$currentOp",label:"$currentOp",outputStage:!1,fullScan:!1,firstStage:!0,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"3.6.0",apiVersions:[1],namespaces:[a.DATABASE],description:"Returns a cursor over information on active and/or dormant operations for the MongoDB deployment as well as inactive sessions that are holding locks as part of a transaction.",comment:"/**\n * allUsers: Optional boolean value to specify whether to return operations for all users or not.\n * idleConnections: Optional boolean value to specify whether to return all operations including idle connections or not.\n * idleCursors: Optional boolean value to specify whether to report on cursors that are idle or not.\n * idleSessions: Optional boolean value to specify whether to report on dormant sessions or not.\n * localOps: Optional boolean value to specify whether to report on operations running locally on targetted mongos or not.\n * backtrace: Optional boolean value to specify whether callstack information is returned as part of the waitingForLatch output field.\n */\n",snippet:"{\n allUsers: ${1:false},\n idleConnections: ${2:false},\n idleCursors: ${3:false},\n idleSessions: ${4:true},\n localOps: ${5:false},\n backtrace: ${6:false},\n}"},{name:"$densify",value:"$densify",label:"$densify",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"5.1.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Creates new documents to eliminate the gaps in the time or numeric domain at the required granularity level.",comment:"/**\n * field: The required field to densify.\n * partitionByFields: The set of fields that acts as a compound key to define each partition.\n * range: {\n * step: The amount to increment the field value in each document.\n * unit: If specified field must evaluate to a date for every document in the collection, otherwise must evaluate to a numeric.\n * bounds: A string or array of numeric/date bounds, corresponding to the type of the field.\n * }\n */\n",snippet:"{\n field: ${1:string},\n partitionByFields: [${2:string}, ${3:string}, ...],\n range: {\n step: ${4:number},\n unit: ${5:string},\n bounds: [${6:lowerbound}, ${7:upperbound}, ...]\n }\n}"},{name:"$documents",value:"$documents",label:"$documents",outputStage:!1,fullScan:!1,firstStage:!0,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"4.4.9",apiVersions:[1],namespaces:[a.DATABASE],description:"Returns literal documents from input values.",comment:"/**\n * expression: Any valid expression.\n */\n",snippet:"{\n ${1:expression}\n}"},{name:"$facet",value:"$facet",label:"$facet",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"3.4.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Allows for multiple parellel aggregations to be specified.",comment:"/**\n * outputFieldN: The first output field.\n * stageN: The first aggregation stage.\n */\n",snippet:"{\n ${1:outputFieldN}: [ ${2:stageN}, ${3:...} ]\n}"},{name:"$fill",value:"$fill",label:"$fill",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"5.3.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Populates null and missing field values within documents.",comment:'/**\n * sortBy: Syntax is the same as $sort, required if "method" is used in at least one output spec otherwise optional\n * partitionBy: Optional, default is a single partition. Specification is the same as _id in $group (same as partitionBy in window functions).\n * partitionByFields: Optional, set of fields that acts as a compound key to define each partition.\n * output - Required, object for each field to fill in. For a single field, can be a single object.\n * output.<field> - A field to be filled with value, if missing or null in the current document.\n */\n',snippet:"{\n sortBy: ${1:sortSpec},\n partitionBy: ${2:expression},\n partitionByFields: [${3:string}, ${4:string}, ...],\n output: {\n field1: {value: ${5:expression}},\n field2: {method: ${6:string}},\n ...\n }\n}"},{name:"$geoNear",value:"$geoNear",label:"$geoNear",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"2.4.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Returns documents based on proximity to a geospatial point.",comment:"/**\n * near: The point to search near.\n * distanceField: The calculated distance.\n * maxDistance: The maximum distance, in meters, documents can be before being excluded from results.\n * query: Limits results that match the query\n * includeLocs: Optional. Labels and includes the point used to match the document.\n * num: Optional. The maximum number of documents to return.\n * spherical: Defaults to false. Specifies whether to use spherical geometry.\n */\n",snippet:"{\n near: { type: 'Point', coordinates: [ ${1:number}, ${2:number} ] },\n distanceField: '${3:string}',\n maxDistance: ${4:number},\n query: {${5}},\n includeLocs: '${6}',\n num: ${7:number},\n spherical: ${8:boolean}\n}"},{name:"$graphLookup",value:"$graphLookup",label:"$graphLookup",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"3.4.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Performs a recursive search on a collection.",comment:"/**\n * from: The target collection.\n * startWith: Expression to start.\n * connectFromField: Field to connect.\n * connectToField: Field to connect to.\n * as: Name of the array field.\n * maxDepth: Optional max recursion depth.\n * depthField: Optional Name of the depth field.\n * restrictSearchWithMatch: Optional query.\n */\n",snippet:"{\n from: '${1:string}',\n startWith: ${2:expression},\n connectFromField: '${3:string}',\n connectToField: '${4:string}',\n as: '${5:string}',\n maxDepth: ${6:number},\n depthField: '${7:string}',\n restrictSearchWithMatch: {${8}}\n}"},{name:"$group",value:"$group",label:"$group",outputStage:!1,fullScan:!0,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"2.2.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Groups documents by a specified expression.",comment:"/**\n * _id: The id of the group.\n * fieldN: The first field name.\n */\n",snippet:"{\n _id: ${1:expression},\n ${2:fieldN}: {\n ${3:accumulatorN}: ${4:expressionN}\n }\n}"},{name:"$indexStats",value:"$indexStats",label:"$indexStats",outputStage:!1,fullScan:!1,firstStage:!0,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"3.2.0",apiVersions:[],namespaces:[...a.ANY_NAMESPACE],description:"Returns statistics regarding the use of each index for the collection.",comment:"/**\n * No parameters.\n */\n",snippet:"{}"},{name:"$limit",value:"$limit",label:"$limit",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"2.2.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Limits the number of documents that flow into subsequent stages.",comment:"/**\n * Provide the number of documents to limit.\n */\n",snippet:"${1:number}"},{name:"$listLocalSessions",value:"$listLocalSessions",label:"$listLocalSessions",outputStage:!1,fullScan:!1,firstStage:!0,score:1,env:[r.ATLAS,r.ON_PREM],meta:"stage",version:"3.6.0",apiVersions:[1],namespaces:[a.DATABASE],description:"Lists the sessions cached in memory by the mongod or mongos instance.",comment:"/**\n * users: Optional list of users for which local sessions need to be returned.\n * allUsers: Optional boolean value to specify whether to return local sessions for all users or not.\n */\n",snippet:"{\n allUsers: ${1:false},\n users: [\n { user: '${2:string}', db: '${3:string}' }\n ]\n}"},{name:"$lookup",value:"$lookup",label:"$lookup",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"3.2.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Performs a join between two collections.",comment:"/**\n * from: The target collection.\n * localField: The local join field.\n * foreignField: The target join field.\n * as: The name for the results.\n * pipeline: Optional pipeline to run on the foreign collection.\n * let: Optional variables to use in the pipeline field stages.\n */\n",snippet:"{\n from: ${1:collection},\n localField: ${2:field},\n foreignField: ${3:field},\n as: ${4:result}\n}"},{name:"$match",value:"$match",label:"$match",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"2.2.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Filters the document stream to allow only matching documents to pass through to subsequent stages.",comment:"/**\n * query: The query in MQL.\n */\n",snippet:"{\n ${1:query}\n}"},{name:"$merge",value:"$merge",label:"$merge",outputStage:!0,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ON_PREM],meta:"stage",version:"4.1.11",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Merges the resulting documents into a collection, optionally overriding existing documents.",comment:"/**\n * into: The target collection.\n * on: Fields to identify.\n * let: Defined variables.\n * whenMatched: Action for matching docs.\n * whenNotMatched: Action for non-matching docs.\n */\n",snippet:"{\n into: '${1:string}',\n on: '${2:string}',\n let: '${3:specification(s)}',\n whenMatched: '${4:string}',\n whenNotMatched: '${5:string}'\n}"},{name:"$merge",value:"$merge",label:"$merge",outputStage:!0,fullScan:!1,firstStage:!1,score:1,env:[r.ADL],meta:"stage",version:"4.0.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Merges the resulting documents into a collection, optionally overriding existing documents.",comment:"/**\n * atlas: Location to write the documents from the aggregation pipeline.\n * on: Fields to identify.\n * let: Defined variables.\n * whenMatched: Action for matching docs.\n * whenNotMatched: Action for non-matching docs.\n */\n",snippet:"{\n into: {\n atlas: {\n clusterName: '${1:atlasClusterName}',\n db: '${2:database}',\n coll: '${3:collection}',\n projectId: '${4:optionalAtlasProjectId}'\n }\n },\n on: '${5:identifier}',\n let: { ${6:specification(s)} },\n whenMatched: '${7:string}',\n whenNotMatched: '${8:string}'\n}"},{name:"$out",value:"$out",label:"$out",outputStage:!0,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ON_PREM],meta:"stage",version:"2.2.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Writes the result of a pipeline to a new or existing collection.",comment:"/**\n * Provide the name of the output database and collection.\n */\n",snippet:"{\n db: '${1:string}',\n coll: '${2:string}',\n /*\n timeseries: {\n timeField: '${3:field}',\n bucketMaxSpanSeconds: '${4:number}',\n granularity: '${5:granularity}'\n }\n */\n}"},{name:"$out",value:"$out",label:"$out",outputStage:!0,fullScan:!1,firstStage:!1,score:1,env:[r.ADL],meta:"stage",version:"4.0.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Writes the result of a pipeline to an Atlas cluster, S3 bucket, or Azure Blob Storage.",comment:"/**\n * Use any one of the following:\n * s3: Parameters to save the data to S3.\n * atlas: Parameters to save the data to Atlas. Example:\n * {\n * atlas: {\n * db: 'string',\n * coll: 'string',\n * projectId: 'string',\n * clusterName: 'string'\n * }\n * },\n * azure: Parameters to save the data to Azure. Example:\n * {\n * azure: {\n * serviceURL: 'string',\n * containerName: 'string',\n * region: 'string,\n * filename: 'string',\n * format: {\n * name: 'string',\n * maxFileSize: 'string',\n * maxRowGroupSize: 'string',\n * columnCompression: 'string'\n * },\n * errorMode: 'string'\n * }\n * }\n */\n",snippet:"{\n s3: {\n bucket: '${1:string}',\n region: '${2:string}',\n filename: '${3:string}',\n format: {\n name: '${4:string}',\n maxFileSize: '${5:bytes}',\n maxRowGroupSize: '${6:string}',\n columnCompression: '${7:string}'\n },\n errorMode: '${8:string}'\n }\n}"},{name:"$project",value:"$project",label:"$project",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"2.2.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Adds new field(s) to a document with a computed value, or reassigns an existing field(s) with a computed value. Unlike $addFields, $project can also remove fields.",comment:"/**\n * specifications: The fields to\n * include or exclude.\n */\n",snippet:"{\n ${1:specification(s)}\n}"},{name:"$rankFusion",value:"$rankFusion",label:"$rankFusion",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS],meta:"stage",version:"8.0.14",apiVersions:[],namespaces:[a.COLLECTION],description:"Combines multiple pipelines using reciprocal rank fusion to create hybrid search results.",comment:'/**\n * input.pipelines: Required. Map from name to input pipeline. Each pipeline must be a Ranked Selection Pipeline operating on the same collection. Minimum of one pipeline.\n * combination.weights: Optional. Map from pipeline name to numbers (non-negative). If unspecified, default weight is 1 for each pipeline.\n * scoreDetails: Optional. Default false. Set to true to include detailed scoring information in {$meta: "scoreDetails"} for debugging and tuning.\n */\n',snippet:"{\n input: {\n pipelines: {\n ${1:searchPipeline}: [\n {$search: {${2:searchStage}}},\n {$limit: ${3:limit}}\n ],\n ${4:vectorPipeline}: [\n {$vectorSearch: {${5:vectorSearchStage}}}\n ]\n }\n },\n combination: {\n weights: {\n ${6:searchPipeline}: ${7:number},\n ${8:vectorPipeline}: ${9:number}\n }\n },\n scoreDetails: ${10:false}\n}"},{name:"$redact",value:"$redact",label:"$redact",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"2.6.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Restricts the content for each document based on information stored in the documents themselves",comment:"/**\n * expression: Any valid expression that\n * evaluates to $$DESCEND, $$PRUNE, or $$KEEP.\n */\n",snippet:"{\n ${1:expression}\n}"},{name:"$replaceRoot",value:"$replaceRoot",label:"$replaceRoot",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"3.4.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Replaces a document with the specified embedded document.",comment:"/**\n * replacementDocument: A document or string.\n */\n",snippet:"{\n newRoot: ${1:replacementDocument}\n}"},{name:"$replaceWith",value:"$replaceWith",label:"$replaceWith",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"4.2.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Replaces a document with the specified embedded document.",comment:"/**\n * replacementDocument: A document or string.\n */\n",snippet:"{\n newWith: ${1:replacementDocument}\n}"},{name:"$sample",value:"$sample",label:"$sample",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"3.2.0",apiVersions:[1],namespaces:[...a.ANY_COLLECTION_NAMESPACE],description:"Randomly selects the specified number of documents from its input.",comment:"/**\n * size: The number of documents to sample.\n */\n",snippet:"{\n size: ${1:number}\n}"},{name:"$scoreFusion",value:"$scoreFusion",label:"$scoreFusion",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS],meta:"stage",version:"8.2.0",apiVersions:[],namespaces:[a.COLLECTION],description:"Combines multiple pipelines using relative score fusion to create hybrid search results.",comment:"/**\n * input.pipelines: Required. Map from name to input pipeline. Each pipeline must be operating on the same collection. Minimum of one pipeline.\n * input.normalization: Required. Normalizes the score to the range 0 to 1 before combining the results. Value can be none, sigmoid or minMaxScaler.\n * combination.weights: Optional. Map from pipeline name to numbers (non-negative). If unspecified, default weight is 1 for each pipeline.\n * combination.method: Optional. Specifies method for combining scores. Value can be avg or expression. Default is avg.\n * combination.expression: Optional. This is the custom expression that is used when combination.method is set to expression.\n * scoreDetails: Optional. Default false. Set to true to include detailed scoring information.\n */\n",snippet:"{\n input: {\n pipelines: {\n ${1:searchPipeline}: [\n {$search: {${2:searchStage}}},\n {$limit: ${3:limit}}\n ],\n ${4:vectorPipeline}: [\n {$vectorSearch: {${5:vectorSearchStage}}}\n ]\n },\n normalization: '${6:none|sigmoid|minMaxScaler}'\n },\n combination: {\n weights: {\n ${7:searchPipeline}: ${8:number},\n ${9:vectorPipeline}: ${10:number}\n },\n method: '${11:avg|expression}',\n expression: '${12:expression}'\n },\n scoreDetails: ${13:false}\n}"},{name:"$search",value:"$search",label:"$search",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS],meta:"stage",version:"4.1.11",apiVersions:[],namespaces:[a.COLLECTION,a.VIEW],description:"Performs a full-text search on the specified field(s).",comment:"/**\n * index: The name of the Search index.\n * text: Analyzed search, with required fields of query and path, the analyzed field(s) to search. Use matchCriteria to match 'any' or 'all' query terms.\n * compound: Combines ops.\n * span: Find in text field regions.\n * exists: Test for presence of a field.\n * near: Find near number or date.\n * range: Find in numeric or date range.\n */\n",snippet:"{\n index: '${1:string}',\n text: {\n query: '${2:string}',\n path: '${3:string}',\n matchCriteria: '${4:any}',\n }\n}"},{name:"$searchMeta",value:"$searchMeta",label:"$searchMeta",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS],meta:"stage",version:"4.4.9",apiVersions:[],namespaces:[a.COLLECTION,a.VIEW],description:"Performs a full-text search on the specified field(s) and gets back only the generated search meta data from a query.",comment:"/**\n * index: The name of the Search index.\n * count: The count of the results.\n * facet: {\n * operator: Analyzed search, with required fields of query and path, can either be replaced with the name of a valid operator.\n * facets: {\n * stringFacet: Narrows search results based on unique string values, with required fields of type and path.\n * numberFacet: Narrows search results by breaking them up into separate ranges of numbers, with required fields of type, path, and boundaries.\n * dateFacet: Narrows search results by breaking them up into separate ranges of dates, with required fields of type, path, and boundaries.\n * }\n * }\n */\n",snippet:"{\n index: ${1:string},\n facet: {\n operator: {\n text: {\n query: ${2:string},\n path: ${3:string}\n }\n },\n facets: {\n ${4:stringFacet}: {\n type: ${5:string},\n path: ${6:string},\n numBuckets: ${7:integer}\n },\n numberFacet: {\n type: 'number',\n path: ${8:string},\n boundaries: [${9:lowerbound}, ${10:upperbound}, ...],\n default: ${11:string}\n }\n }\n }\n}"},{name:"$set",value:"$set",label:"$set",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"4.2.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Adds new fields to documents. $set outputs documents that contain all existing fields from the input documents and newly added fields.",comment:"/**\n * field: The field name\n * expression: The expression.\n */\n",snippet:"{\n ${1:field}: ${2:expression}\n}"},{name:"$setWindowFields",value:"$setWindowFields",label:"$setWindowFields",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"5.0.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Capable of partitioning incoming data, and can apply one or more functions to defined windows within each partition.",comment:"/**\n * partitionBy: partitioning of data.\n * sortBy: fields to sort by.\n * output: {\n * path: {\n * function: The window function to compute over the given window.\n * window: {\n * documents: A number of documents before and after the current document.\n * range: A range of possible values around the value in the current document's sortBy field.\n * unit: Specifies the units for the window bounds.\n * }\n * }\n * }\n */\n",snippet:"{\n partitionBy: ${1:expression},\n sortBy: ${2:sortSpec},\n output: {\n ${3:path}: {\n ${4:function}: ${5:functionArgs},\n window: {\n documents: [${6:lowerbound}, ${7:upperbound}],\n range: [${8:lowerbound}, ${9:upperbound}],\n unit: ${10:string}\n }\n },\n ${11:path2}: ...\n }\n}"},{name:"$skip",value:"$skip",label:"$skip",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"2.2.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Skips a specified number of documents before advancing to the next stage.",comment:"/**\n * Provide the number of documents to skip.\n */\n",snippet:"${1:number}"},{name:"$sort",value:"$sort",label:"$sort",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"2.2.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Reorders the document stream by a specified sort key and direction.",comment:"/**\n * Provide any number of field/order pairs.\n */\n",snippet:"{\n ${1:field1}: ${2:sortOrder}\n}"},{name:"$sortByCount",value:"$sortByCount",label:"$sortByCount",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"3.4.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Groups incoming documents based on the value of a specified expression, then computes the count of documents in each distinct group.",comment:"/**\n * expression: Grouping expression or string.\n */\n",snippet:"{\n ${1:expression}\n}"},{name:"$unionWith",value:"$unionWith",label:"$unionWith",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"4.4.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Perform a union with a pipeline on another collection.",comment:"/**\n * coll: The collection name.\n * pipeline: The pipeline on the other collection.\n */\n",snippet:"{\n coll: '${1:coll}',\n pipeline: [${2:pipeline}]\n}"},{name:"$unset",value:"$unset",label:"$unset",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"4.2.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Excludes fields from the result document.",comment:"/**\n * Provide the field name to exclude.\n * To exclude multiple fields, pass the field names in an array.\n */\n",snippet:"'${1:string}'"},{name:"$unwind",value:"$unwind",label:"$unwind",outputStage:!1,fullScan:!1,firstStage:!1,score:1,env:[r.ATLAS,r.ADL,r.ON_PREM],meta:"stage",version:"2.2.0",apiVersions:[1],namespaces:[...a.ANY_NAMESPACE],description:"Outputs a new document for each element in a specified array. ",comment:"/**\n * path: Path to the array field.\n * includeArrayIndex: Optional name for index.\n * preserveNullAndEmptyArrays: Optional\n * toggle to unwind null and empty values.\n */\n",snippet:"{\n path: ${1:path},\n includeArrayIndex: '${2:string}',\n preserveNullAndEmptyArrays: ${3:boolean}\n}"},{name:"$vectorSearch",value:"$vectorSearch",label:"$vectorSearch",outputStage:!1,fullScan:!1,firstStage:!0,score:1,env:[r.ATLAS],meta:"stage",version:">=6.0.10 <7.0.0 || >=7.0.2",apiVersions:[],namespaces:[a.COLLECTION,a.VIEW],description:"Performs a kNN search on embeddings in the specified field(s)",comment:"/**\n * queryVector: Array of numbers of BSON types `int` or `double` that represent the query vector. The array size must match the number of vector dimensions specified in the index for the field. (Required)\n * path: The field to search. (Required)\n * numCandidates: Number of nearest neighbors to use during the search. You can specify a number higher than the number of documents to return (`limit`) to increase accuracy. (Required)\n * index: Name of the Atlas Search index to use. (Required)\n * limit: Number (of type `int` only) of documents to return in the results. (Required)\n * filter: Any MongoDB Query Language (MQL) match expression that compares an indexed field with a boolean, number (not decimals), or string to use as a prefilter. (Optional)\n * exact: Choose between false for ANN (Approximate Nearest Neighbor) and true for ENN (Exact Nearest Neighbor). Defaults to false. (Optional)\n */\n",snippet:"{\n queryVector: [${1:dimension1}, ${2:dimension2}, ...],\n path: ${3:string},\n numCandidates: ${4:numCandidates},\n index: ${5:string},\n limit: ${6:limit},\n filter: {${7:expression}},\n exact: ${8:boolean}\n}"}];t.STAGE_OPERATORS=s;const i=s.map((e=>e.name));t.STAGE_OPERATOR_NAMES=i;const o=s.filter((e=>e.outputStage));t.OUT_STAGES=o;const l=s.filter((e=>e.fullScan));t.FULL_SCAN_STAGES=l;const c=s.filter((e=>e.firstStage));t.REQUIRED_AS_FIRST_STAGE=c},99629:(e,t,n)=>{n.d(t,{JM:()=>l,Kd:()=>o,Wk:()=>c,a$:()=>i});var r=n(49189),a=n(72510);const s=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),Object.defineProperty(e,"message",{get:()=>JSON.stringify(t,a.k8,2),enumerable:!0}),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},i=(0,r.xI)("$ZodError",s),o=(0,r.xI)("$ZodError",s,{Parent:Error});function l(e,t=e=>e.message){const n={},r=[];for(const a of e.issues)a.path.length>0?(n[a.path[0]]=n[a.path[0]]||[],n[a.path[0]].push(t(a))):r.push(t(a));return{formErrors:r,fieldErrors:n}}function c(e,t){const n=t||function(e){return e.message},r={_errors:[]},a=e=>{for(const t of e.issues)if("invalid_union"===t.code&&t.errors.length)t.errors.map((e=>a({issues:e})));else if("invalid_key"===t.code)a({issues:t.issues});else if("invalid_element"===t.code)a({issues:t.issues});else if(0===t.path.length)r._errors.push(n(t));else{let e=r,a=0;for(;a<t.path.length;){const r=t.path[a];a===t.path.length-1?(e[r]=e[r]||{_errors:[]},e[r]._errors.push(n(t))):e[r]=e[r]||{_errors:[]},e=e[r],a++}}};return a(e),r}}};